summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrikun98 <krikun98@gmail.com>2020-11-05 23:45:26 +0300
committerinnovaker <66737976+innovaker@users.noreply.github.com>2020-11-17 16:23:39 +0000
commit3d030ec2abed9c8d48387e0002066c70bd5f085c (patch)
treed3899ac8eddbcbf28bb5f51793e868df1507536f
parent9388b24e7a9ad2b6b4f3e66647c5278bf37de8b8 (diff)
Jorne shield
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--app/boards/shields/jorne/Kconfig.defconfig58
-rw-r--r--app/boards/shields/jorne/Kconfig.shield8
-rw-r--r--app/boards/shields/jorne/boards/nice_nano.overlay29
-rw-r--r--app/boards/shields/jorne/jorne.conf6
-rw-r--r--app/boards/shields/jorne/jorne.dtsi98
-rw-r--r--app/boards/shields/jorne/jorne.keymap74
-rw-r--r--app/boards/shields/jorne/jorne_left.conf2
-rw-r--r--app/boards/shields/jorne/jorne_left.overlay18
-rw-r--r--app/boards/shields/jorne/jorne_right.conf2
-rw-r--r--app/boards/shields/jorne/jorne_right.overlay22
-rw-r--r--docs/docs/hardware.md1
-rw-r--r--docs/static/setup.ps14
-rw-r--r--docs/static/setup.sh3
14 files changed, 324 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e6be31a..7e688dd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,6 +25,8 @@ jobs:
- lily58_right
- iris_left
- iris_right
+ - jorne_left
+ - jorne_right
- reviung41
- romac
- romac_plus
diff --git a/app/boards/shields/jorne/Kconfig.defconfig b/app/boards/shields/jorne/Kconfig.defconfig
new file mode 100644
index 0000000..a8cf29b
--- /dev/null
+++ b/app/boards/shields/jorne/Kconfig.defconfig
@@ -0,0 +1,58 @@
+
+if SHIELD_JORNE_LEFT
+
+config ZMK_KEYBOARD_NAME
+ default "Jorne Left"
+
+endif
+
+
+if SHIELD_JORNE_RIGHT
+
+config ZMK_KEYBOARD_NAME
+ default "Jorne Right"
+
+endif
+
+if SHIELD_JORNE_LEFT || SHIELD_JORNE_RIGHT
+
+config ZMK_SPLIT
+ default y
+
+if ZMK_DISPLAY
+
+config I2C
+ default y
+
+config SSD1306
+ default y
+
+config SSD1306_REVERSE_MODE
+ default y
+
+endif # ZMK_DISPLAY
+
+if LVGL
+
+config LVGL_HOR_RES
+ default 128
+
+config LVGL_VER_RES
+ default 32
+
+config LVGL_VDB_SIZE
+ default 64
+
+config LVGL_DPI
+ default 148
+
+config LVGL_BITS_PER_PIXEL
+ default 1
+
+choice LVGL_COLOR_DEPTH
+ default LVGL_COLOR_DEPTH_1
+endchoice
+
+endif # LVGL
+
+endif
diff --git a/app/boards/shields/jorne/Kconfig.shield b/app/boards/shields/jorne/Kconfig.shield
new file mode 100644
index 0000000..1176611
--- /dev/null
+++ b/app/boards/shields/jorne/Kconfig.shield
@@ -0,0 +1,8 @@
+# Copyright (c) 2020 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+config SHIELD_JORNE_LEFT
+ def_bool $(shields_list_contains,jorne_left)
+
+config SHIELD_JORNE_RIGHT
+ def_bool $(shields_list_contains,jorne_right)
diff --git a/app/boards/shields/jorne/boards/nice_nano.overlay b/app/boards/shields/jorne/boards/nice_nano.overlay
new file mode 100644
index 0000000..03b868c
--- /dev/null
+++ b/app/boards/shields/jorne/boards/nice_nano.overlay
@@ -0,0 +1,29 @@
+&spi1 {
+ compatible = "nordic,nrf-spim";
+ /* Cannot be used together with i2c0. */
+ status = "okay";
+ mosi-pin = <6>;
+ // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
+ sck-pin = <5>;
+ miso-pin = <7>;
+
+ led_strip: ws2812@0 {
+ compatible = "worldsemi,ws2812-spi";
+ label = "WS2812";
+
+ /* SPI */
+ reg = <0>; /* ignored, but necessary for SPI bindings */
+ spi-max-frequency = <4000000>;
+
+ /* WS2812 */
+ chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */
+ spi-one-frame = <0x70>;
+ spi-zero-frame = <0x40>;
+ };
+};
+
+/ {
+ chosen {
+ zmk,underglow = &led_strip;
+ };
+};
diff --git a/app/boards/shields/jorne/jorne.conf b/app/boards/shields/jorne/jorne.conf
new file mode 100644
index 0000000..c4e62fc
--- /dev/null
+++ b/app/boards/shields/jorne/jorne.conf
@@ -0,0 +1,6 @@
+# Uncomment the following lines to enable the Jorne RGB Underglow
+# CONFIG_ZMK_RGB_UNDERGLOW=y
+# CONFIG_WS2812_STRIP=y
+
+# Uncomment the following line to enable the Jorne OLED Display
+# CONFIG_ZMK_DISPLAY=y
diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi
new file mode 100644
index 0000000..7e6cfd8
--- /dev/null
+++ b/app/boards/shields/jorne/jorne.dtsi
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <dt-bindings/zmk/matrix-transform.h>
+
+/ {
+ chosen {
+ zmk,kscan = &kscan0;
+ zmk,matrix_transform = &default_transform;
+ };
+
+ default_transform: keymap_transform_0 {
+ compatible = "zmk,matrix-transform";
+ columns = <12>;
+ rows = <4>;
+// | SW0 | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | SW0 |
+// | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
+// | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
+// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
+ 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(0,10) RC(0,11) RC(3,11)
+ 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(1,10) RC(1,11)
+ 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(2,10) RC(2,11)
+ RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
+ >;
+ };
+
+ crkbd_transform: keymap_transform_1 {
+ compatible = "zmk,matrix-transform";
+ columns = <12>;
+ rows = <4>;
+// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
+// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
+// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
+// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
+ map = <
+ 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(0,10) RC(0,11)
+ 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(1,10) RC(1,11)
+ 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(2,10) RC(2,11)
+ RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
+ >;
+ };
+
+ five_column_transform: keymap_transform_2 {
+ compatible = "zmk,matrix-transform";
+ columns = <10>;
+ rows = <4>;
+// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
+// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
+// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
+// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
+ map = <
+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(0,10)
+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(1,10)
+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(2,10)
+ RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
+ >;
+ };
+
+ kscan0: kscan {
+ compatible = "zmk,kscan-gpio-matrix";
+ label = "KSCAN";
+
+ diode-direction = "col2row";
+ row-gpios
+ = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
+ ;
+
+ };
+
+ // TODO: per-key RGB node(s)?
+};
+
+&pro_micro_i2c {
+ status = "okay";
+
+ oled: ssd1306@3c {
+ compatible = "solomon,ssd1306fb";
+ reg = <0x3c>;
+ label = "DISPLAY";
+ width = <128>;
+ height = <32>;
+ segment-offset = <0>;
+ page-offset = <0>;
+ display-offset = <0>;
+ multiplex-ratio = <31>;
+ segment-remap;
+ com-invdir;
+ com-sequential;
+ prechargep = <0x22>;
+ };
+};
diff --git a/app/boards/shields/jorne/jorne.keymap b/app/boards/shields/jorne/jorne.keymap
new file mode 100644
index 0000000..256bc51
--- /dev/null
+++ b/app/boards/shields/jorne/jorne.keymap
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <behaviors.dtsi>
+#include <dt-bindings/zmk/keys.h>
+#include <dt-bindings/zmk/bt.h>
+
+#define DEF 0
+#define LWR 1
+#define RSE 2
+#define ADJ 3
+
+/ {
+ keymap {
+ compatible = "zmk,keymap";
+
+ default_layer {
+// -----------------------------------------------------------------------------------------
+// | GUI | ~ | Q | W | E | R | T | | Y | U | I | O | P | [ | GUI/] |
+// | CTRL | A | S | D | F | G | | H | J | K | L | ; |CTRL/'|
+// | LALT | Z | X | C | V | B | | N | M | , | . | / | RALT |
+// | RSE | SPC | LWR | | LWR | BKSP | RSE |
+ bindings = <
+ &kp LWIN &kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &mt RWIN RBKT
+ &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &mt RCTRL QUOT
+ &kp LALT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BSLH
+ &lt RSE TAB &mt LSHFT SPC &lt LWR RET &lt LWR ESC &mt RSHFT BSPC &lt RSE DEL
+ >;
+ };
+ lower_layer {
+// -----------------------------------------------------------------------------------------
+// | | _ | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
+// | + | ! | @ | # | $ | % | | ^ | & | * | ( | ) | - |
+// | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
+// | GUI | | SPC | | ENT | | ALT |
+ bindings = <
+ &trans &kp UNDER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &mt RGUI F12
+ &mt LCTRL PLUS &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CRRT &kp AMPS &kp STAR &kp LPAR &kp RPAR &mt RCTRL MINUS
+ &mt LALT EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
+ &lt ADJ TAB &trans &trans &trans &trans &lt ADJ DEL
+ >;
+ };
+
+ raise_layer {
+// -----------------------------------------------------------------------------------------
+// | | NMLK | / | 7 | 8 | 9 | - | | VOLU| HOME| PRSC| PGUP| SCLK| CLCK| |
+// | CTRL | * | 4 | 5 | 6 | + | | MUT | LEFT| UP | RGHT| INS | APP |
+// | | 0 | 1 | 2 | 3 | . | | VOLD| END | DOWN| PGDN| PAUS| |
+// | | | ADJ | | ADJ | | |
+ bindings = <
+ &trans &kp KP_NUM &kp KP_SLASH &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp C_VOL_UP &kp HOME &kp PSCRN &kp PG_UP &kp SLCK &kp CAPS &trans
+ &mt LCTRL EQL &kp KP_MULTIPLY &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp INS &mt RCTRL K_APP
+ &trans &kp KP_N0 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_DOT &kp C_VOL_DN &kp END &kp DOWN &kp PG_DN &kp PAUS &trans
+ &trans &trans &lt ADJ RET &lt ADJ ESC &trans &trans
+ >;
+ };
+ adjust_layer {
+// -----------------------------------------------------------------------------------------
+// | RST | BLDR | | | | | | | | | | | | BLDR | RST |
+// | BTCLR| BT0 | BT1 | BT2 | BT3 | BT4 | | BT4 | BT3 | BT2 | BT1 | BT0 | BTCLR|
+// | | | | | | | | | | | | | |
+// | | | | | | | |
+ bindings = <
+ &reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &reset
+ &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR
+ &none &none &none &none &none &none &none &none &none &none &none &none
+ &trans &none &trans &trans &none &trans
+ >;
+ };
+ };
+};
diff --git a/app/boards/shields/jorne/jorne_left.conf b/app/boards/shields/jorne/jorne_left.conf
new file mode 100644
index 0000000..1e028a7
--- /dev/null
+++ b/app/boards/shields/jorne/jorne_left.conf
@@ -0,0 +1,2 @@
+CONFIG_ZMK_SPLIT=y
+CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
diff --git a/app/boards/shields/jorne/jorne_left.overlay b/app/boards/shields/jorne/jorne_left.overlay
new file mode 100644
index 0000000..ca6ad43
--- /dev/null
+++ b/app/boards/shields/jorne/jorne_left.overlay
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include "jorne.dtsi"
+
+&kscan0 {
+ col-gpios
+ = <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
+ ;
+};
diff --git a/app/boards/shields/jorne/jorne_right.conf b/app/boards/shields/jorne/jorne_right.conf
new file mode 100644
index 0000000..990cf7c
--- /dev/null
+++ b/app/boards/shields/jorne/jorne_right.conf
@@ -0,0 +1,2 @@
+CONFIG_ZMK_SPLIT=y
+CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
diff --git a/app/boards/shields/jorne/jorne_right.overlay b/app/boards/shields/jorne/jorne_right.overlay
new file mode 100644
index 0000000..6ae232e
--- /dev/null
+++ b/app/boards/shields/jorne/jorne_right.overlay
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2020 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include "jorne.dtsi"
+
+&default_transform {
+ col-offset = <6>;
+};
+
+&kscan0 {
+ col-gpios
+ = <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
+ , <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
+ ;
+};
diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md
index b142bda..ea7350d 100644
--- a/docs/docs/hardware.md
+++ b/docs/docs/hardware.md
@@ -32,6 +32,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what
- [RoMac v2](https://mechboards.co.uk/shop/kits/romac-macro-pad/) (`romac`)
- [Boardsource 3x4 Macro](https://boardsource.xyz/store/5ecc2008eee64242946c98c1) (`boardsource3x4`)
- [QAZ](https://www.cbkbd.com/product/qaz-keyboard-kit) (`qaz`)
+- [Jorne](https://github.com/joric/jorne) (`jorne`)
## Other Hardware
diff --git a/docs/static/setup.ps1 b/docs/static/setup.ps1
index 89ead01..bc5f30a 100644
--- a/docs/static/setup.ps1
+++ b/docs/static/setup.ps1
@@ -91,8 +91,8 @@ Write-Host "Keyboard Shield Selection:"
$prompt = "Pick a keyboard"
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
-$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE"
-$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble"
+$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne"
+$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n"
$choice = Get-Choice-From-Options -Options $options -Prompt $prompt
diff --git a/docs/static/setup.sh b/docs/static/setup.sh
index cdd6bc4..7457747 100644
--- a/docs/static/setup.sh
+++ b/docs/static/setup.sh
@@ -92,7 +92,7 @@ echo ""
echo "Keyboard Shield Selection:"
prompt="Pick an keyboard:"
-options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ")
+options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "Jorne")
PS3="$prompt "
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
@@ -115,6 +115,7 @@ select opt in "${options[@]}" "Quit"; do
12 ) shield_title="TG4X" shield="tg4x"; split="n"; break;;
13 ) shield_title="QAZ" shield="qaz"; split="n"; break;;
14 ) shield_title="NIBBLE" shield="nibble"; split="n"; break;;
+ 15 ) shield_title="Jorne" shield="jorne"; split="y"; break;;
# Add link to docs on adding your own custom shield in your ZMK config!
# $(( ${#options[@]}+1 )) ) echo "Other!"; break;;