-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: first revision of standalone config
- Loading branch information
1 parent
8e24471
commit 82e5b13
Showing
16 changed files
with
400 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
config BOARD_ENABLE_DCDC | ||
bool "Enable DCDC mode" | ||
select SOC_DCDC_NRF52X | ||
default y | ||
depends on BOARD_NIGHTLINER_LEFT || BOARD_NIGHTLINER_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,12 @@ | ||
# | ||
# Copyright (c) 2023 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
config BOARD_NIGHTLINER_LEFT | ||
bool "nightliner_left" | ||
depends on SOC_NRF52840_QIAA | ||
|
||
config BOARD_NIGHTLINER_RIGHT | ||
bool "nightliner_right" | ||
depends on SOC_NRF52840_QIAA |
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,45 @@ | ||
# | ||
# Copyright (c) 2023 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
if BOARD_NIGHTLINER_LEFT | ||
|
||
config ZMK_KEYBOARD_NAME | ||
default "nightliner" | ||
|
||
config ZMK_SPLIT_ROLE_CENTRAL | ||
default y | ||
|
||
endif # BOARD_NIGHTLINER_LEFT | ||
|
||
if BOARD_NIGHTLINER_RIGHT | ||
|
||
config ZMK_KEYBOARD_NAME | ||
default "nightliner right" | ||
|
||
endif # BOARD_NIGHTLINER_RIGHT | ||
|
||
|
||
if BOARD_NIGHTLINER_LEFT || BOARD_NIGHTLINER_RIGHT | ||
|
||
config BOARD | ||
default "nightliner" | ||
|
||
config ZMK_SPLIT | ||
default y | ||
|
||
config BT_CTLR | ||
default BT | ||
|
||
if USB | ||
|
||
config USB_NRFX | ||
default y | ||
|
||
config USB_DEVICE_STACK | ||
default y | ||
|
||
endif # USB | ||
|
||
endif # BOARD_NIGHTLINER_LEFT || BOARD_NIGHTLINER_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,8 @@ | ||
# | ||
# Copyright (c) 2023 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") | ||
|
||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) |
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,7 @@ | ||
/* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
&pinctrl { | ||
}; |
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,110 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <nordic/nrf52840_qiaa.dtsi> | ||
|
||
#include <dt-bindings/led/led.h> | ||
#include <dt-bindings/zmk/matrix_transform.h> | ||
|
||
#include "nightliner-pinctrl.dtsi" | ||
|
||
/ { | ||
model = "nightliner"; | ||
compatible = "miro,nightliner"; | ||
|
||
chosen { | ||
zephyr,code-partition = &code_partition; | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,console = &cdc_acm_uart; | ||
zmk,kscan = &kscan0; | ||
zmk,battery = &vbatt; | ||
zmk,matrix-transform = &default_transform; | ||
}; | ||
|
||
default_transform: keymap_transform_0 { | ||
compatible = "zmk,matrix-transform"; | ||
columns = <10>; | ||
rows = <4>; | ||
|
||
|
||
map = < | ||
RC(3,0) RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(3,9) | ||
RC(3,1) RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(3,8) | ||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) | ||
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) | ||
>; | ||
}; | ||
|
||
vbatt: vbatt { | ||
compatible = "zmk,battery-voltage-divider"; | ||
io-channels = <&adc 7>; | ||
output-ohms = <2000000>; | ||
full-ohms = <(806000 + 2000000)>; | ||
}; | ||
|
||
}; | ||
|
||
&adc { | ||
status = "okay"; | ||
}; | ||
|
||
&gpiote { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio1 { | ||
status = "okay"; | ||
}; | ||
|
||
&usbd { | ||
status = "okay"; | ||
cdc_acm_uart: cdc_acm_uart { | ||
compatible = "zephyr,cdc-acm-uart"; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
/* | ||
* For more information, see: | ||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html | ||
*/ | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
sd_partition: partition@0 { | ||
reg = <0x00000000 0x00026000>; | ||
}; | ||
code_partition: partition@26000 { | ||
reg = <0x00026000 0x000c6000>; | ||
}; | ||
|
||
/* | ||
* The flash starting at 0x000ec000 and ending at | ||
* 0x000f3fff is reserved for use by the application. | ||
*/ | ||
|
||
/* | ||
* Storage partition will be used by FCB/LittleFS/NVS | ||
* if enabled. | ||
*/ | ||
storage_partition: partition@ec000 { | ||
reg = <0x000ec000 0x00008000>; | ||
}; | ||
|
||
boot_partition: partition@f4000 { | ||
reg = <0x000f4000 0x0000c000>; | ||
}; | ||
}; | ||
}; |
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,40 @@ | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/bt.h> | ||
|
||
#define DEFAULT 0 | ||
#define NAVI 1 | ||
#define MISC 2 | ||
|
||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC | ||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT | ||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH | ||
&mo MISC &kp SPACE &kp SPACE &mo NAVI &kp RETURN &kp SPACE | ||
>; | ||
}; | ||
|
||
nav_layer { | ||
bindings = < | ||
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC | ||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT | ||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH | ||
&kp SPACE &kp SPACE &kp SPACE &none &kp RETURN &kp SPACE | ||
>; | ||
}; | ||
|
||
misc_layer { | ||
bindings = < | ||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp Y &kp U &kp I &kp O &kp P &kp BSPC | ||
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT | ||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH | ||
&kp SPACE &kp SPACE &kp SPACE &none &kp RETURN &kp SPACE | ||
>; | ||
}; | ||
}; | ||
}; |
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,16 @@ | ||
identifier: nightliner | ||
name: nightliner | ||
type: keyboard | ||
arch: arm | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
- xtools | ||
supported: | ||
- gpio | ||
- counter | ||
- usb_device | ||
- nvs | ||
- can | ||
- kscan | ||
- ble |
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,14 @@ | ||
file_format: '1' | ||
id: nightliner | ||
name: nightliner | ||
type: board | ||
url: https://michaelrommel.com/create/2024-02-01_nightliner | ||
arch: arm | ||
features: | ||
- keys | ||
outputs: | ||
- usb | ||
- ble | ||
siblings: | ||
- nightliner_left | ||
- nightliner_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,30 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
#include "nightliner.dtsi" | ||
|
||
/{ | ||
kscan0: kscan { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
|
||
diode-direction = "col2row"; | ||
row-gpios | ||
= <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
; | ||
|
||
col-gpios | ||
= <&gpio0 19 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 21 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 23 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 12 GPIO_ACTIVE_HIGH> | ||
, <&gpio1 9 GPIO_ACTIVE_HIGH> | ||
; | ||
}; | ||
}; |
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,38 @@ | ||
# | ||
# Copyright (c) 2023 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
CONFIG_SOC_SERIES_NRF52X=y | ||
CONFIG_SOC_NRF52840_QIAA=y | ||
CONFIG_BOARD_NIGHTLINER_LEFT=y | ||
|
||
# Enable MPU | ||
CONFIG_ARM_MPU=y | ||
|
||
# enable GPIO | ||
CONFIG_GPIO=y | ||
|
||
# Enable writing to flash | ||
CONFIG_USE_DT_CODE_PARTITION=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_150PPM=y | ||
|
||
#Misc configuration | ||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y | ||
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y | ||
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y | ||
CONFIG_BUILD_OUTPUT_UF2=y | ||
CONFIG_ZMK_USB=y | ||
CONFIG_ZMK_BLE=y | ||
# Turn on logging, and set ZMK logging to debug output | ||
#CONFIG_ZMK_USB_LOGGING=y | ||
|
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,34 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
#include "nightliner.dtsi" | ||
|
||
/{ | ||
kscan0: kscan { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
|
||
diode-direction = "col2row"; | ||
row-gpios | ||
= <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
, <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||
; | ||
|
||
col-gpios | ||
= <&gpio0 21 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 19 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 23 GPIO_ACTIVE_HIGH> | ||
, <&gpio0 12 GPIO_ACTIVE_HIGH> | ||
, <&gpio1 9 GPIO_ACTIVE_HIGH> | ||
; | ||
}; | ||
}; | ||
|
||
&default_transform { | ||
col-offset = <5>; | ||
}; |
Oops, something went wrong.