Skip to content

Commit a82a0ec

Browse files
committed
feat(shields): Add splitkb.com Aurora Lily58.
1 parent b7b563a commit a82a0ec

10 files changed

+382
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright (c) 2022 The ZMK Contributors
2+
# SPDX-License-Identifier: MIT
3+
4+
if SHIELD_SPLITKB_AURORA_LILY58_LEFT
5+
6+
config ZMK_KEYBOARD_NAME
7+
default "Aurora Lily58"
8+
9+
config ZMK_SPLIT_ROLE_CENTRAL
10+
default y
11+
12+
endif # SHIELD_SPLITKB_AURORA_LILY58_LEFT
13+
14+
if SHIELD_SPLITKB_AURORA_LILY58_LEFT || SHIELD_SPLITKB_AURORA_LILY58_RIGHT
15+
16+
config ZMK_SPLIT
17+
default y
18+
19+
config ZMK_RGB_UNDERGLOW
20+
select WS2812_STRIP
21+
select SPI
22+
23+
config ZMK_DISPLAY
24+
25+
if ZMK_DISPLAY
26+
27+
config SSD1306
28+
default y
29+
30+
config I2C
31+
default y
32+
33+
config SSD1306_REVERSE_MODE
34+
default y
35+
36+
endif # ZMK_DISPLAY
37+
38+
if LVGL
39+
40+
config LVGL_VDB_SIZE
41+
default 64
42+
43+
config LVGL_DPI
44+
default 148
45+
46+
config LVGL_BITS_PER_PIXEL
47+
default 1
48+
49+
choice LVGL_COLOR_DEPTH
50+
default LVGL_COLOR_DEPTH_1
51+
endchoice
52+
53+
endif # LVGL
54+
55+
endif # SHIELD_SPLITKB_AURORA_LILY58_LEFT || SHIELD_SPLITKB_AURORA_LILY58_RIGHT
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2022 The ZMK Contributors
2+
# SPDX-License-Identifier: MIT
3+
4+
config SHIELD_SPLITKB_AURORA_LILY58_LEFT
5+
def_bool $(shields_list_contains,splitkb_aurora_lily58_left)
6+
7+
config SHIELD_SPLITKB_AURORA_LILY58_RIGHT
8+
def_bool $(shields_list_contains,splitkb_aurora_lily58_right)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include <dt-bindings/led/led.h>
2+
3+
&spi1 {
4+
compatible = "nordic,nrf-spim";
5+
status = "okay";
6+
mosi-pin = <6>;
7+
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
8+
sck-pin = <5>;
9+
miso-pin = <7>;
10+
11+
led_strip: ws2812@0 {
12+
compatible = "worldsemi,ws2812-spi";
13+
label = "WS2812";
14+
15+
/* SPI */
16+
reg = <0>; /* ignored, but necessary for SPI bindings */
17+
spi-max-frequency = <4000000>;
18+
19+
/* WS2812 */
20+
chain-length = <5>; /* arbitrary; change at will */
21+
spi-one-frame = <0x70>;
22+
spi-zero-frame = <0x40>;
23+
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
24+
};
25+
};
26+
27+
/ {
28+
chosen {
29+
zmk,underglow = &led_strip;
30+
};
31+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include <dt-bindings/led/led.h>
2+
3+
&spi1 {
4+
compatible = "nordic,nrf-spim";
5+
status = "okay";
6+
mosi-pin = <6>;
7+
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
8+
sck-pin = <5>;
9+
miso-pin = <7>;
10+
11+
led_strip: ws2812@0 {
12+
compatible = "worldsemi,ws2812-spi";
13+
label = "WS2812";
14+
15+
/* SPI */
16+
reg = <0>; /* ignored, but necessary for SPI bindings */
17+
spi-max-frequency = <4000000>;
18+
19+
/* WS2812 */
20+
chain-length = <5>; /* arbitrary; change at will */
21+
spi-one-frame = <0x70>;
22+
spi-zero-frame = <0x40>;
23+
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
24+
};
25+
};
26+
27+
/ {
28+
chosen {
29+
zmk,underglow = &led_strip;
30+
};
31+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Uncomment these two line to add support for encoders to your firmware
2+
# CONFIG_EC11=y
3+
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
4+
5+
# Uncomment the following line to enable the OLED Display
6+
# CONFIG_ZMK_DISPLAY=y
7+
8+
# Uncomment the following lines to enable RGB underglow
9+
# CONFIG_ZMK_RGB_UNDERGLOW=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Copyright (c) 2022 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#include <dt-bindings/zmk/matrix_transform.h>
8+
9+
/ {
10+
11+
chosen {
12+
zephyr,display = &oled;
13+
zmk,matrix_transform = &default_transform;
14+
};
15+
16+
default_transform: keymap_transform_0 {
17+
compatible = "zmk,matrix-transform";
18+
columns = <14>;
19+
rows = <5>;
20+
// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 |
21+
// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 |
22+
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
23+
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 | | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
24+
// | SW29 | SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | SW29 |
25+
map = <
26+
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)
27+
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)
28+
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)
29+
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
30+
RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9)
31+
>;
32+
};
33+
34+
left_encoder: left_encoder {
35+
compatible = "alps,ec11";
36+
label = "L_ENCODER";
37+
resolution = <4>;
38+
status = "disabled";
39+
40+
a-gpios = <&pro_micro 5 GPIO_PULL_UP>;
41+
b-gpios = <&pro_micro 4 GPIO_PULL_UP>;
42+
};
43+
44+
right_encoder: right_encoder {
45+
compatible = "alps,ec11";
46+
label = "R_ENCODER";
47+
resolution = <4>;
48+
status = "disabled";
49+
50+
a-gpios = <&pro_micro 18 GPIO_PULL_UP>;
51+
b-gpios = <&pro_micro 19 GPIO_PULL_UP>;
52+
};
53+
54+
sensors {
55+
compatible = "zmk,keymap-sensors";
56+
sensors = <&left_encoder &right_encoder>;
57+
};
58+
};
59+
60+
&pro_micro_i2c {
61+
status = "okay";
62+
63+
oled: ssd1306@3c {
64+
compatible = "solomon,ssd1306fb";
65+
reg = <0x3c>;
66+
label = "DISPLAY";
67+
width = <128>;
68+
height = <32>;
69+
segment-offset = <0>;
70+
page-offset = <0>;
71+
display-offset = <0>;
72+
multiplex-ratio = <31>;
73+
segment-remap;
74+
com-invdir;
75+
com-sequential;
76+
prechargep = <0x22>;
77+
};
78+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Copyright (c) 2022 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#include <behaviors.dtsi>
8+
#include <dt-bindings/zmk/keys.h>
9+
#include <dt-bindings/zmk/bt.h>
10+
#include <dt-bindings/zmk/ext_power.h>
11+
12+
/ {
13+
keymap {
14+
compatible = "zmk,keymap";
15+
16+
default_layer {
17+
// ------------------------------------------------------------------------------------------------------------
18+
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
19+
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | - |
20+
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
21+
// | SHIFT | Z | X | C | V | B | "[" | | "]" | N | M | , | . | / | SHIFT |
22+
// | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI |
23+
bindings = <
24+
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp GRAVE
25+
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS
26+
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
27+
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
28+
&kp LALT &kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp BSPC &kp RGUI
29+
>;
30+
31+
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
32+
};
33+
34+
lower_layer {
35+
// ------------------------------------------------------------------------------------------------------------
36+
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
37+
// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
38+
// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ |
39+
// | | | | | | | | | | | _ | + | { | } | "|" |
40+
// | | | | | | | | | |
41+
bindings = <
42+
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
43+
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
44+
&kp GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &kp TILDE
45+
&trans &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &trans &trans &trans &trans &trans &kp MINUS &kp PLUS &kp LBRC &kp RBRC &kp PIPE
46+
&trans &trans &trans &trans &trans &trans &trans &trans
47+
>;
48+
49+
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
50+
};
51+
52+
raise_layer {
53+
// ------------------------------------------------------------------------------------------------------------
54+
// | | | | | | | | | | | | | |
55+
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
56+
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | v | ^ | -> | |
57+
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ |
58+
// | | | | | | | | | |
59+
bindings = <
60+
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
61+
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
62+
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans
63+
&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
64+
&trans &trans &trans &trans &trans &trans &trans &trans
65+
>;
66+
67+
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
68+
};
69+
};
70+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
file_format: "1"
2+
id: splitkb_aurora_lily58
3+
name: splitkb.com Aurora Lily58
4+
type: shield
5+
url: https://splitkb.com/products/aurora-lily58-pcb-kit
6+
requires: [pro_micro]
7+
exposes: [i2c_oled]
8+
features:
9+
- keys
10+
siblings:
11+
- splitkb_aurora_lily58_left
12+
- splitkb_aurora_lily58_right
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2022 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#include "splitkb_aurora_lily58.dtsi"
8+
9+
/ {
10+
chosen {
11+
zmk,kscan = &kscan;
12+
};
13+
14+
kscan: kscan {
15+
compatible = "zmk,kscan-gpio-matrix";
16+
17+
label = "KSCAN";
18+
diode-direction = "row2col";
19+
20+
row-gpios
21+
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
22+
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
23+
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
24+
, <&pro_micro 7 GPIO_ACTIVE_HIGH>
25+
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
26+
;
27+
28+
col-gpios
29+
= <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
30+
, <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
31+
, <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
32+
, <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
33+
, <&pro_micro 16 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
34+
, <&pro_micro 10 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
35+
;
36+
};
37+
};
38+
39+
&left_encoder {
40+
status = "okay";
41+
};
42+
43+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright (c) 2022 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#include "splitkb_aurora_lily58.dtsi"
8+
9+
/ {
10+
chosen {
11+
zmk,kscan = &kscan;
12+
};
13+
14+
kscan: kscan {
15+
compatible = "zmk,kscan-gpio-matrix";
16+
17+
label = "KSCAN";
18+
diode-direction = "row2col";
19+
20+
row-gpios
21+
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
22+
, <&pro_micro 4 GPIO_ACTIVE_HIGH>
23+
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
24+
, <&pro_micro 16 GPIO_ACTIVE_HIGH>
25+
, <&pro_micro 10 GPIO_ACTIVE_HIGH>
26+
;
27+
28+
col-gpios
29+
= <&pro_micro 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
30+
, <&pro_micro 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
31+
, <&pro_micro 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
32+
, <&pro_micro 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
33+
, <&pro_micro 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
34+
, <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
35+
;
36+
};
37+
};
38+
39+
&right_encoder {
40+
status = "okay";
41+
};
42+
43+
&default_transform {
44+
col-offset = <6>;
45+
};

0 commit comments

Comments
 (0)