Skip to content

Commit 0038d69

Browse files
DiDi
authored andcommitted
fix
1 parent 372d242 commit 0038d69

14 files changed

Lines changed: 140 additions & 181 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ zmk_*
66
venv
77
.env
88
zephyr
9-
modules
9+
modules
10+
build

boards/shields/azoteq_sofle/azoteq_sofle_left.overlay

Lines changed: 0 additions & 32 deletions
This file was deleted.

boards/shields/azoteq_sofle/azoteq_sofle_right.overlay

Lines changed: 0 additions & 29 deletions
This file was deleted.

boards/shields/azoteq_sofle/Kconfig.defconfig renamed to config/boards/shields/azoteq_sofle/Kconfig.defconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
if SHIELD_AZOTEQ_SOFLE_LEFT || SHIELD_AZOTEQ_SOFLE_RIGHT
22

3-
#config AZOTEQ_SOFLE_FEATURES
4-
# bool
5-
# default y
6-
# select ZMK_WPM
7-
# select ZMK_KEYCODE_EVENTS
8-
93
config ZMK_KEYBOARD_NAME
104
default "Stelmakh"
115

File renamed without changes.

boards/shields/azoteq_sofle/azoteq_sofle-layouts.dtsi renamed to config/boards/shields/azoteq_sofle/azoteq_sofle-layouts.dtsi

File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
&pinctrl {
2+
3+
spi3_default: spi3_default {
4+
group1 {
5+
psels = <NRF_PSEL(SPIM_MOSI, 1, 12)>; // WS2812_VEXT_DATA - old (SPIM_MOSI, 0, 6)
6+
};
7+
};
8+
9+
spi3_sleep: spi3_sleep {
10+
group1 {
11+
psels = <NRF_PSEL(SPIM_MOSI, 1, 12)>;
12+
low-power-enable;
13+
};
14+
};
15+
16+
i2c0_default: i2c0_default {
17+
group1 {
18+
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
19+
<NRF_PSEL(TWIM_SCL, 0, 20)>; // OLD: (TWIM_SDA, 0, 22) | (TWIM_SCL, 0, 24)
20+
};
21+
};
22+
23+
i2c0_sleep: i2c0_sleep {
24+
group1 {
25+
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
26+
<NRF_PSEL(TWIM_SCL, 0, 20)>;
27+
low-power-enable;
28+
};
29+
};
30+
31+
};

boards/shields/azoteq_sofle/azoteq_sofle.dtsi renamed to config/boards/shields/azoteq_sofle/azoteq_sofle.dtsi

Lines changed: 73 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2,103 +2,14 @@
22
#include <dt-bindings/led/led.h>
33
#include <zephyr/dt-bindings/i2c/i2c.h>
44
#include <dt-bindings/pinctrl/nrf-pinctrl.h>
5+
56
#include "azoteq_sofle-layouts.dtsi"
7+
#include "azoteq_sofle-pinctrl.dtsi"
68

79
&azoteq_sofle_layout {
810
transform = <&default_transform>;
911
};
1012

11-
&pinctrl {
12-
i2c0_rewired_default: i2c0_rewired_default {
13-
group1 {
14-
psels = <NRF_PSEL(TWIM_SDA, 0, 22)>,
15-
<NRF_PSEL(TWIM_SCL, 0, 24)>;
16-
};
17-
};
18-
19-
i2c0_rewired_sleep: i2c0_rewired_sleep {
20-
group1 {
21-
psels = <NRF_PSEL(TWIM_SDA, 0, 22)>,
22-
<NRF_PSEL(TWIM_SCL, 0, 24)>;
23-
low-power-enable;
24-
};
25-
};
26-
27-
spi3_default: spi3_default {
28-
group1 {
29-
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
30-
};
31-
};
32-
33-
spi3_sleep: spi3_sleep {
34-
group1 {
35-
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
36-
low-power-enable;
37-
};
38-
};
39-
};
40-
41-
&spi3 {
42-
status = "okay";
43-
compatible = "nordic,nrf-spim";
44-
45-
pinctrl-0 = <&spi3_default>;
46-
pinctrl-1 = <&spi3_sleep>;
47-
pinctrl-names = "default", "sleep";
48-
49-
led_strip: ws2812@0 {
50-
compatible = "worldsemi,ws2812-spi";
51-
52-
/* SPI */
53-
reg = <0>; /* ignored, but necessary for SPI bindings */
54-
spi-max-frequency = <1000000>;
55-
56-
/* WS2812 */
57-
chain-length = <7>; /* 6 LEDs on dongle - just for initialization */
58-
spi-one-frame = <0x70>;
59-
spi-zero-frame = <0x40>;
60-
61-
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
62-
};
63-
};
64-
65-
&i2c0 {
66-
status = "okay";
67-
clock-frequency = <I2C_BITRATE_FAST>;
68-
69-
/* Use rewired pins for I2C0 */
70-
pinctrl-0 = <&i2c0_rewired_default>;
71-
pinctrl-1 = <&i2c0_rewired_sleep>;
72-
pinctrl-names = "default", "sleep";
73-
74-
tps43: iqs5xx@74 {
75-
status = "disabled";
76-
compatible = "azoteq,iqs5xx";
77-
reg = <0x74>;
78-
79-
one-finger-tap;
80-
press-and-hold;
81-
press-and-hold-time = <250>;
82-
two-finger-tap;
83-
84-
scroll;
85-
natural-scroll-y;
86-
natural-scroll-x;
87-
88-
bottom-beta = <5>;
89-
stationary-threshold = <5>;
90-
91-
flip-y;
92-
93-
/* Correct GPIO mapping for Nice Nano v2 physical connections:
94-
* RST - P1.11 (Nice Nano pin 1.11) - D14
95-
* RDY - P1.13 (Nice Nano pin 1.13) - D15
96-
*/
97-
reset-gpios = <&pro_micro 14 GPIO_ACTIVE_LOW>;
98-
rdy-gpios = <&pro_micro 15 GPIO_ACTIVE_HIGH>;
99-
100-
};
101-
};
10213

10314
/ {
10415
chosen {
@@ -110,8 +21,8 @@
11021

11122
default_transform: keymap_transform_0 {
11223
compatible = "zmk,matrix-transform";
113-
columns = <16>;
114-
rows = <4>;
24+
columns = <14>;
25+
rows = <5>;
11526
map = <
11627
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)
11728
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)
@@ -121,25 +32,87 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7)
12132
>;
12233
};
12334

124-
tps43_input: tps43_input {
125-
compatible = "zmk,input-listener";
126-
device = <&tps43>;
127-
};
128-
12935
kscan0: kscan {
13036
wakeup-source;
13137
diode-direction = "col2row";
38+
row-gpios
39+
= <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
40+
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
41+
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
42+
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
43+
, <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
44+
;
13245
};
13346

13447
left_encoder: encoder_left {
48+
status = "disabled";
13549
compatible = "alps,ec11";
50+
label = "LEFT_ENCODER";
51+
resolution = <4>;
52+
steps = <40>;
13653
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
13754
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
138-
steps = <80>;
139-
status = "disabled";
55+
};
56+
57+
sensors {
58+
compatible = "zmk,keymap-sensors";
59+
sensors = <&left_encoder>;
60+
};
61+
62+
ext-power {
63+
compatible = "zmk,ext-power-generic";
64+
label = "EXT_POWER";
65+
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
66+
init-delay-ms = <50>;
14067
};
14168

14269
vbatt: vbatt {
14370
compatible = "zmk,battery-nrf-vddh";
71+
init-delay-ms = <50>;
72+
};
73+
74+
};
75+
76+
&adc {
77+
status = "okay";
78+
};
79+
80+
&gpiote {
81+
status = "okay";
82+
};
83+
84+
&gpio0 {
85+
status = "okay";
86+
};
87+
88+
&gpio1 {
89+
status = "okay";
90+
};
91+
92+
&usbd {
93+
status = "okay";
94+
};
95+
96+
97+
&spi3 {
98+
status = "okay";
99+
compatible = "nordic,nrf-spim";
100+
pinctrl-0 = <&spi3_default>;
101+
pinctrl-1 = <&spi3_sleep>;
102+
pinctrl-names = "default", "sleep";
103+
104+
led_strip: ws2812@0 {
105+
compatible = "worldsemi,ws2812-spi";
106+
107+
/* SPI */
108+
reg = <0>; /* ignored, but necessary for SPI bindings */
109+
spi-max-frequency = <1000000>;
110+
111+
/* WS2812 */
112+
chain-length = <7>; /* 6 LEDs on dongle - just for initialization */
113+
spi-one-frame = <0x70>;
114+
spi-zero-frame = <0x40>;
115+
116+
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
144117
};
145118
};
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)