Skip to content

Commit d2b5d9b

Browse files
authored
Update cool642tb-mini_R.overlay
1 parent d634f70 commit d2b5d9b

1 file changed

Lines changed: 63 additions & 77 deletions

File tree

Lines changed: 63 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,63 @@
1-
#include "cool642tb-mini.dtsi"
2-
3-
&default_transform {
4-
col-offset = <6>;
5-
};
6-
7-
&kscan0 {
8-
col-gpios
9-
= <&xiao_d 10 GPIO_ACTIVE_HIGH>
10-
, <&xiao_d 9 GPIO_ACTIVE_HIGH>
11-
, <&xiao_d 8 GPIO_ACTIVE_HIGH>
12-
, <&xiao_d 7 GPIO_ACTIVE_HIGH>
13-
, <&gpio0 10 GPIO_ACTIVE_HIGH>
14-
;
15-
};
16-
17-
&pinctrl {
18-
spi0_default: spi0_default {
19-
group1 {
20-
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
21-
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
22-
<NRF_PSEL(SPIM_MISO, 0, 4)>;
23-
};
24-
};
25-
26-
spi0_sleep: spi0_sleep {
27-
group1 {
28-
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
29-
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
30-
<NRF_PSEL(SPIM_MISO, 0, 4)>;
31-
low-power-enable;
32-
};
33-
};
34-
};
35-
36-
&xiao_serial { status = "disabled"; };
37-
38-
&adc {
39-
status = "okay";
40-
};
41-
42-
&spi0 {
43-
status = "okay";
44-
compatible = "nordic,nrf-spim";
45-
pinctrl-0 = <&spi0_default>;
46-
pinctrl-1 = <&spi0_sleep>;
47-
pinctrl-names = "default", "sleep";
48-
cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
49-
50-
trackball: trackball@0 {
51-
status = "okay";
52-
compatible = "pixart,pmw3610";
53-
reg = <0>;
54-
spi-max-frequency = <2000000>;
55-
irq-gpios = <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
56-
automouse-layer = <4>;
57-
scroll-layers = <5>;
58-
};
59-
};
60-
61-
/ {
62-
chosen {
63-
zmk,battery = &vbatt;
64-
};
65-
66-
trackball_listener {
67-
compatible = "zmk,input-listener";
68-
device = <&trackball>;
69-
};
70-
71-
vbatt: vbatt {
72-
compatible = "zmk,battery-voltage-divider";
73-
io-channels = <&adc 7>;
74-
power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
75-
output-ohms = <510000>;
76-
full-ohms = <(1000000 + 510000)>;
77-
};
1+
#include "cool642tb-mini.dtsi"
2+
3+
&default_transform {
4+
col-offset = <6>;
5+
};
6+
7+
&kscan0 {
8+
col-gpios
9+
= <&xiao_d 10 GPIO_ACTIVE_HIGH>
10+
, <&xiao_d 9 GPIO_ACTIVE_HIGH>
11+
, <&xiao_d 8 GPIO_ACTIVE_HIGH>
12+
, <&xiao_d 7 GPIO_ACTIVE_HIGH>
13+
, <&gpio0 10 GPIO_ACTIVE_HIGH>
14+
;
15+
};
16+
17+
/ {
18+
trackball_listener {
19+
compatible = "zmk,input-listener";
20+
device = <&trackball>;
21+
22+
};
23+
};
24+
25+
&pinctrl {
26+
spi0_default: spi0_default {
27+
group1 {
28+
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
29+
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
30+
<NRF_PSEL(SPIM_MISO, 0, 4)>;
31+
};
32+
};
33+
34+
spi0_sleep: spi0_sleep {
35+
group1 {
36+
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
37+
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
38+
<NRF_PSEL(SPIM_MISO, 0, 4)>;
39+
low-power-enable;
40+
};
41+
};
42+
};
43+
44+
&xiao_serial { status = "disabled"; };
45+
46+
&spi0 {
47+
status = "okay";
48+
compatible = "nordic,nrf-spim";
49+
pinctrl-0 = <&spi0_default>;
50+
pinctrl-1 = <&spi0_sleep>;
51+
pinctrl-names = "default", "sleep";
52+
cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
53+
54+
trackball: trackball@0 {
55+
status = "okay";
56+
compatible = "pixart,pmw3610";
57+
reg = <0>;
58+
spi-max-frequency = <2000000>;
59+
irq-gpios = <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
60+
automouse-layer = <4>;
61+
scroll-layers = <5>;
62+
};
63+
};

0 commit comments

Comments
 (0)