forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39d7f86
commit 0239f18
Showing
9 changed files
with
455 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2022 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
config BOARD_CORNEISH_ZEN_LEFT | ||
bool | ||
|
||
config BOARD_CORNEISH_ZEN_RIGHT | ||
bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
file_format: "1" | ||
id: corneish_zen_v1 | ||
name: Corneish Zen v1 | ||
url: https://lowprokb.ca/collections/keyboards/products/corne-ish-zen | ||
type: board | ||
arch: arm | ||
features: | ||
- keys | ||
- display | ||
outputs: | ||
- usb | ||
- ble | ||
siblings: | ||
- corneish_zen_v1_left | ||
- corneish_zen_v1_right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* | ||
* | ||
* Copyright (c) 2021 Darryl deHaan | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
#include "corneish_zen.dtsi" | ||
|
||
/{ | ||
chosen { | ||
zephyr,display = &epd; | ||
zmk,battery = &fuelgauge; | ||
}; | ||
|
||
kscan0: kscan { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
label = "KSCAN"; | ||
|
||
diode-direction = "col2row"; | ||
row-gpios | ||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
; | ||
|
||
col-gpios | ||
= <&gpio0 21 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 23 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 12 GPIO_ACTIVE_HIGH> | ||
, <&gpio1 9 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 7 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 5 GPIO_ACTIVE_HIGH> | ||
; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
blue_led: led_0 { | ||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; | ||
label = "Blue LED"; | ||
}; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
spi2_default: spi2_default { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 8)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 22)>; | ||
}; | ||
}; | ||
|
||
spi2_sleep: spi2_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 8)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 22)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
i2c0_default: i2c0_default { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 6)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 26)>; | ||
}; | ||
}; | ||
|
||
i2c0_sleep: i2c0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 6)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 26)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&i2c0 { | ||
status = "okay"; | ||
compatible = "nordic,nrf-twim"; | ||
pinctrl-0 = <&i2c0_default>; | ||
pinctrl-1 = <&i2c0_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
clock-frequency = <100000>; | ||
|
||
fuelgauge: bq274xx@55 { | ||
compatible = "ti,bq274xx"; | ||
label = "BATTERY"; | ||
reg = <0x55>; | ||
design-voltage = <3700>; //Battery Design Volatge in mV | ||
design-capacity = <180>; //Battery Design Capacity in mAh | ||
taper-current = <2>; //Battery Taper current in mAh | ||
terminate-voltage = <2750>; //Battery Terminate Voltage in mV | ||
int-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
|
||
&spi2 { | ||
status = "okay"; | ||
compatible = "nordic,nrf-spim"; | ||
pinctrl-0 = <&spi2_default>; | ||
pinctrl-1 = <&spi2_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; | ||
|
||
epd: il0323@0 { | ||
compatible = "gooddisplay,il0323"; | ||
reg = <0>; | ||
label = "DISPLAY"; | ||
width = <80>; | ||
height = <128>; | ||
spi-max-frequency = <4000000>; | ||
dc-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; | ||
busy-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; | ||
reset-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; | ||
pwr = [03 00 26 26]; | ||
cdi = <0xd2>; | ||
tcon = <0x22>; | ||
}; | ||
}; |
76 changes: 76 additions & 0 deletions
76
app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# | ||
# Copyright (c) 2022 Darryl deHaan | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
CONFIG_SOC_SERIES_NRF52X=y | ||
CONFIG_SOC_NRF52840_QIAA=y | ||
CONFIG_BOARD_CORNEISH_ZEN_V1_LEFT=y | ||
CONFIG_ZMK_SLEEP=y | ||
CONFIG_ZMK_DISPLAY=y | ||
|
||
# Enable MPU | ||
CONFIG_ARM_MPU=y | ||
|
||
# enable pinctrl | ||
CONFIG_PINCTRL=y | ||
|
||
# enable GPIO | ||
CONFIG_GPIO=y | ||
|
||
# Enable I2C | ||
CONFIG_I2C=y | ||
CONFIG_I2C_NRFX=y | ||
|
||
# Enable SPI | ||
CONFIG_SPI_NRFX=y | ||
|
||
# Enable writing to flash | ||
CONFIG_USE_DT_CODE_PARTITION=y | ||
CONFIG_BUILD_OUTPUT_UF2=y | ||
CONFIG_MPU_ALLOW_FLASH_WRITE=y | ||
CONFIG_NVS=y | ||
CONFIG_SETTINGS_NVS=y | ||
CONFIG_FLASH=y | ||
CONFIG_FLASH_PAGE_LAYOUT=y | ||
CONFIG_FLASH_MAP=y | ||
|
||
# Enable 32kHz crystal | ||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y | ||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y | ||
|
||
# enable display drivers | ||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y | ||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 | ||
CONFIG_LV_Z_BITS_PER_PIXEL=1 | ||
CONFIG_LV_COLOR_DEPTH_1=y | ||
CONFIG_LV_DPI_DEF=145 | ||
CONFIG_LV_Z_VDB_SIZE=100 | ||
CONFIG_LV_USE_THEME_MONO=y | ||
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 | ||
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y | ||
CONFIG_LV_FONT_MONTSERRAT_26=y | ||
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y | ||
|
||
# custom status screens | ||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y | ||
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=n | ||
CONFIG_CUSTOM_WIDGET_BATTERY_STATUS=y | ||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n | ||
CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS=y | ||
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n | ||
CONFIG_CUSTOM_WIDGET_LAYER_STATUS=y | ||
CONFIG_ZMK_WIDGET_LAYER_STATUS=n | ||
|
||
# Turn on logging, and set ZMK logging to debug output | ||
#CONFIG_LOG=y | ||
#CONFIG_ZMK_USB_LOGGING=y | ||
#CONFIG_ZMK_LOG_LEVEL_DBG=y | ||
#CONFIG_LOG_BUFFER_SIZE=65536 | ||
#CONFIG_LOG_STRDUP_BUF_COUNT=160 | ||
#CONFIG_I2C_LOG_LEVEL_DBG=y | ||
#CONFIG_SPI_LOG_LEVEL_DBG=y | ||
#CONFIG_DISPLAY_LOG_LEVEL_DBG=y | ||
#CONFIG_LVGL_LOG_LEVEL_DBG=y | ||
#CONFIG_LVGL_USE_DEBUG=y | ||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y |
Oops, something went wrong.