Update Aiot-rk3588a device tree: correct GPIO for heartbeat LED, enable and configure ADC keys

This commit is contained in:
ghhccghk 2025-12-02 22:52:01 +08:00
parent 73213f2f02
commit c30548c60d
1 changed files with 25 additions and 29 deletions

View File

@ -17,10 +17,10 @@
bootargs = "earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0"; bootargs = "earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0";
}; };
leds { gpio_leds: gpio-leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
led_work_heartbeat: work_heartbeat { led_work_heartbeat: work_heartbeat {
gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>; gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
led_work_default_on: work_default_on { led_work_default_on: work_default_on {
@ -28,45 +28,46 @@
linux,default-trigger = "default-on"; linux,default-trigger = "default-on";
}; };
}; };
/*
adc-keys {
compatible = "adc-keys";
io-channels = <0x1d5 0x01>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <0x1b7740>;
poll-interval = <0x64>;
status = "okay";
vol-up-key { adc_keys: adc-keys {
compatible = "adc-keys";
status = "okay";
io-channels = <&saradc 1>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <1800000>; /* 松手阈值 */
poll-interval = <100>;
vol_up_key: key-volume-up {
label = "volume up"; label = "volume up";
linux,code = <0x73>; linux,code = <KEY_VOLUMEUP>;
press-threshold-microvolt = <0x4268>; press-threshold-microvolt = <0x4268>;
}; };
vol-down-key { vol_down_key: key-volume-down {
label = "volume down"; label = "volume down";
linux,code = <0x72>; linux,code = <KEY_VOLUMEDOWN>;
press-threshold-microvolt = <0x65ce8>; press-threshold-microvolt = <0x65ce8>;
}; };
menu-key { menu_key: key-menu {
label = "menu"; label = "menu";
linux,code = <0x8b>; linux,code = <KEY_MENU>;
press-threshold-microvolt = <0xd9490>; press-threshold-microvolt = <0xd9490>;
}; };
back-key { back_key: key-back {
label = "back"; label = "back";
linux,code = <0x9e>; linux,code = <KEY_BACK>;
press-threshold-microvolt = <0x12d838>; press-threshold-microvolt = <0x12d838>;
}; };
uboot-key { uboot_key: key-uboot {
label = "uboot key"; label = "uboot key";
linux,code = <0x73>; linux,code = <KEY_VOLUMEUP>; /* U-Boot 一般也用 VUP */
press-threshold-microvolt = <0x30d40>; press-threshold-microvolt = <0x30d40>;
}; };
};*/ };
panel-edp0 { panel-edp0 {
compatible = "simple-panel"; compatible = "simple-panel";
@ -163,7 +164,6 @@
regulator-max-microvolt = <0xb71b00>; regulator-max-microvolt = <0xb71b00>;
}; };
}; };
&pinctrl { &pinctrl {
mcu { mcu {
mcum0_pins:mcum0-pins { mcum0_pins:mcum0-pins {
@ -194,7 +194,6 @@
rockchip,pins = <0x03 0x1d 0x00 0x1a3>; rockchip,pins = <0x03 0x1d 0x00 0x1a3>;
}; };
}; };
}; };
&i2c6 { &i2c6 {
@ -204,23 +203,20 @@
nca9555: nca9555@20 { nca9555: nca9555@20 {
reg = <0x20>; reg = <0x20>;
compatible = "novosense,nca9555"; compatible = "novosense,nca9555","nxp,pca9555";
status = "okay"; status = "okay";
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
ngpios = <16>;
//可选:如果连接了 INT 引脚 //可选:如果连接了 INT 引脚
//interrupt-parent = <&gpio1>;
//interrupts = <61 IRQ_TYPE_EDGE_FALLING>;
}; };
mcuinf: mcuinf@62 { mcuinf: mcuinf@62 {
compatible = "smdtmcu,STM8S00K3"; compatible = "smdtmcu,STM8S00K3";
status = "okay"; status = "disabled";
reg = <0x62>; reg = <0x62>;
#pwm-cells = <2>; #pwm-cells = <2>;
/* MCU interrupt pin: GPIO0_B0 */ /* MCU interrupt pin: GPIO0_B0 */
int-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; // int-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
}; };
usbc0: fusb302@22 { usbc0: fusb302@22 {