From 8c11125e5e49b66b250ba6f229b12cfc911da87c Mon Sep 17 00:00:00 2001 From: Michel Lespinasse Date: Thu, 16 Jan 2025 00:50:01 -0800 Subject: [PATCH] rockchip: show boot stages on nanopi r6 Set up openwrt to show boot progress on the nanopi r6s/r6c system LED. The LED blinking states indicate the boot stage. The LED is defined as a power LED, but can still be set to heartbeat in /etc/config/system after the system is done booting. Signed-off-by: Michel Lespinasse Signed-off-by: Hauke Mehrtens --- .../boot/dts/rockchip/rk3588s-nanopi-r6.dtsi | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi index 660a0ef17..37d47f525 100644 --- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi @@ -16,12 +16,30 @@ ethernet0 = &gmac1; mmc0 = &sdmmc; mmc1 = &sdhci; + led-boot = &sys_led; + led-failsafe = &sys_led; + led-running = &sys_led; + led-upgrade = &sys_led; }; chosen { stdout-path = "serial2:1500000n8"; }; + adc-key-maskrom { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + button-maskrom { + label = "Maskrom"; + linux,code = ; + press-threshold-microvolt = <1800>; + }; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -30,7 +48,7 @@ button-user { debounce-interval = <50>; gpios = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>; - label = "User Button"; + label = "reset"; linux,code = ; }; }; @@ -40,9 +58,9 @@ sys_led: led-0 { color = ; - function = LED_FUNCTION_HEARTBEAT; + function = LED_FUNCTION_POWER; gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "heartbeat"; + default-state = "on"; pinctrl-names = "default"; pinctrl-0 = <&sys_led_pin>; };