From c30548c60dec6adb45c0eaf13d912b39b2c8bdd2 Mon Sep 17 00:00:00 2001 From: ghhccghk <2137610394@qq.com> Date: Tue, 2 Dec 2025 22:52:01 +0800 Subject: [PATCH] Update Aiot-rk3588a device tree: correct GPIO for heartbeat LED, enable and configure ADC keys --- .../dt/rk3588-aiot-rk3588a.dts | 54 +++++++++---------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/patch/kernel/rk35xx-vendor-6.1/dt/rk3588-aiot-rk3588a.dts b/patch/kernel/rk35xx-vendor-6.1/dt/rk3588-aiot-rk3588a.dts index 9b5a9f4f4..b55463d0f 100644 --- a/patch/kernel/rk35xx-vendor-6.1/dt/rk3588-aiot-rk3588a.dts +++ b/patch/kernel/rk35xx-vendor-6.1/dt/rk3588-aiot-rk3588a.dts @@ -17,10 +17,10 @@ bootargs = "earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0"; }; - leds { + gpio_leds: gpio-leds { compatible = "gpio-leds"; led_work_heartbeat: work_heartbeat { - gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>; + gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; }; led_work_default_on: work_default_on { @@ -28,45 +28,46 @@ 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"; - linux,code = <0x73>; + linux,code = ; press-threshold-microvolt = <0x4268>; }; - vol-down-key { + vol_down_key: key-volume-down { label = "volume down"; - linux,code = <0x72>; + linux,code = ; press-threshold-microvolt = <0x65ce8>; }; - menu-key { + menu_key: key-menu { label = "menu"; - linux,code = <0x8b>; + linux,code = ; press-threshold-microvolt = <0xd9490>; }; - back-key { + back_key: key-back { label = "back"; - linux,code = <0x9e>; + linux,code = ; press-threshold-microvolt = <0x12d838>; }; - uboot-key { + uboot_key: key-uboot { label = "uboot key"; - linux,code = <0x73>; + linux,code = ; /* U-Boot 一般也用 VUP */ press-threshold-microvolt = <0x30d40>; }; - };*/ + }; panel-edp0 { compatible = "simple-panel"; @@ -163,7 +164,6 @@ regulator-max-microvolt = <0xb71b00>; }; }; - &pinctrl { mcu { mcum0_pins:mcum0-pins { @@ -194,7 +194,6 @@ rockchip,pins = <0x03 0x1d 0x00 0x1a3>; }; }; - }; &i2c6 { @@ -204,23 +203,20 @@ nca9555: nca9555@20 { reg = <0x20>; - compatible = "novosense,nca9555"; + compatible = "novosense,nca9555","nxp,pca9555"; status = "okay"; gpio-controller; #gpio-cells = <2>; - ngpios = <16>; //可选:如果连接了 INT 引脚 - //interrupt-parent = <&gpio1>; - //interrupts = <61 IRQ_TYPE_EDGE_FALLING>; }; mcuinf: mcuinf@62 { compatible = "smdtmcu,STM8S00K3"; - status = "okay"; + status = "disabled"; reg = <0x62>; #pwm-cells = <2>; /* MCU interrupt pin: GPIO0_B0 */ - int-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; + // int-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; }; usbc0: fusb302@22 {