Skip to content

Commit c30548c

Browse files
committed
Update Aiot-rk3588a device tree: correct GPIO for heartbeat LED, enable and configure ADC keys
1 parent 73213f2 commit c30548c

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed

patch/kernel/rk35xx-vendor-6.1/dt/rk3588-aiot-rk3588a.dts

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,56 +17,57 @@
1717
bootargs = "earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0";
1818
};
1919

20-
leds {
20+
gpio_leds: gpio-leds {
2121
compatible = "gpio-leds";
2222
led_work_heartbeat: work_heartbeat {
23-
gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
23+
gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
2424
linux,default-trigger = "heartbeat";
2525
};
2626
led_work_default_on: work_default_on {
2727
gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
2828
linux,default-trigger = "default-on";
2929
};
3030
};
31-
/*
32-
adc-keys {
31+
32+
adc_keys: adc-keys {
3333
compatible = "adc-keys";
34-
io-channels = <0x1d5 0x01>;
35-
io-channel-names = "buttons";
36-
keyup-threshold-microvolt = <0x1b7740>;
37-
poll-interval = <0x64>;
3834
status = "okay";
35+
io-channels = <&saradc 1>;
36+
io-channel-names = "buttons";
37+
38+
keyup-threshold-microvolt = <1800000>; /* 松手阈值 */
39+
poll-interval = <100>;
3940

40-
vol-up-key {
41+
vol_up_key: key-volume-up {
4142
label = "volume up";
42-
linux,code = <0x73>;
43+
linux,code = <KEY_VOLUMEUP>;
4344
press-threshold-microvolt = <0x4268>;
4445
};
4546

46-
vol-down-key {
47+
vol_down_key: key-volume-down {
4748
label = "volume down";
48-
linux,code = <0x72>;
49+
linux,code = <KEY_VOLUMEDOWN>;
4950
press-threshold-microvolt = <0x65ce8>;
5051
};
5152

52-
menu-key {
53+
menu_key: key-menu {
5354
label = "menu";
54-
linux,code = <0x8b>;
55+
linux,code = <KEY_MENU>;
5556
press-threshold-microvolt = <0xd9490>;
5657
};
5758

58-
back-key {
59+
back_key: key-back {
5960
label = "back";
60-
linux,code = <0x9e>;
61+
linux,code = <KEY_BACK>;
6162
press-threshold-microvolt = <0x12d838>;
6263
};
6364

64-
uboot-key {
65+
uboot_key: key-uboot {
6566
label = "uboot key";
66-
linux,code = <0x73>;
67+
linux,code = <KEY_VOLUMEUP>; /* U-Boot 一般也用 VUP */
6768
press-threshold-microvolt = <0x30d40>;
6869
};
69-
};*/
70+
};
7071

7172
panel-edp0 {
7273
compatible = "simple-panel";
@@ -163,7 +164,6 @@
163164
regulator-max-microvolt = <0xb71b00>;
164165
};
165166
};
166-
167167
&pinctrl {
168168
mcu {
169169
mcum0_pins:mcum0-pins {
@@ -194,7 +194,6 @@
194194
rockchip,pins = <0x03 0x1d 0x00 0x1a3>;
195195
};
196196
};
197-
198197
};
199198

200199
&i2c6 {
@@ -204,23 +203,20 @@
204203

205204
nca9555: nca9555@20 {
206205
reg = <0x20>;
207-
compatible = "novosense,nca9555";
206+
compatible = "novosense,nca9555","nxp,pca9555";
208207
status = "okay";
209208
gpio-controller;
210209
#gpio-cells = <2>;
211-
ngpios = <16>;
212210
//可选:如果连接了 INT 引脚
213-
//interrupt-parent = <&gpio1>;
214-
//interrupts = <61 IRQ_TYPE_EDGE_FALLING>;
215211
};
216212

217213
mcuinf: mcuinf@62 {
218214
compatible = "smdtmcu,STM8S00K3";
219-
status = "okay";
215+
status = "disabled";
220216
reg = <0x62>;
221217
#pwm-cells = <2>;
222218
/* MCU interrupt pin: GPIO0_B0 */
223-
int-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
219+
// int-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
224220
};
225221

226222
usbc0: fusb302@22 {

0 commit comments

Comments
 (0)