From 4385a37cbf4feee82e7747d9494fb09f33f4ef1f Mon Sep 17 00:00:00 2001 From: Douglas Teles Date: Tue, 7 Jul 2026 15:42:40 -0300 Subject: [PATCH] RK3326: fix Soysauce power LED polarity, surface DISABLE POWER LED Live debugging on the Soysauce (USB SSH, watcher on the led sysfs while the user drove the ES menu) showed the whole chain working but the LED responding inverted: the blue power LED is wired active high, so the GPIO_ACTIVE_LOW in the DTS made "off" light it and "on" darken it (heartbeat looked normal because a blink is a blink upside down). Flip the polarity and default the LED on so early boot keeps the stock look. The led-red node was a phantom: the physical red LED belongs to the charger IC and toggling GPIO0_A5 changes nothing, so drop it. The DISABLE POWER LED switch in ES is gated on DEVICE_PWR_LED_CONTROL, which sits in the 999-export allowlist but was never set by any quirk, so the item was invisible on every device. Set it for the R36S family. Co-Authored-By: Claude Fable 5 --- .../rockchip/rk3326-gameconsole-soysauce.dts | 17 ++++++++--------- .../devices/Game Console R33S/001-device_config | 4 ++++ .../001-device_config | 4 ++++ .../devices/Game Console R36S/001-device_config | 4 ++++ .../quirks/devices/R36S Clone/001-device_config | 4 ++++ 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts index e4f647ea71..a0163bac3b 100644 --- a/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts +++ b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-soysauce.dts @@ -24,20 +24,19 @@ this = "soysauce"; }; - /* LED indicators (soysauce-specific) */ + /* LED indicators (soysauce-specific). Only the blue power LED is + * GPIO-driven; the red one is hardwired to the charger IC (toggling + * the old led-red node on GPIO0_A5 did nothing on hardware, so the + * node was a phantom and got dropped). The line is active HIGH: + * declaring it active low inverted the whole ES power LED menu + * (off lit the LED, on darkened it, heartbeat looked normal). */ leds { compatible = "gpio-leds"; - led-red { - gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; - label = "red"; - default-state = "off"; - }; - led-blue { - gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; label = "blue"; - default-state = "off"; + default-state = "on"; }; }; diff --git a/projects/ArchR/packages/hardware/quirks/devices/Game Console R33S/001-device_config b/projects/ArchR/packages/hardware/quirks/devices/Game Console R33S/001-device_config index 574439fc1a..0d66db9c83 100755 --- a/projects/ArchR/packages/hardware/quirks/devices/Game Console R33S/001-device_config +++ b/projects/ArchR/packages/hardware/quirks/devices/Game Console R33S/001-device_config @@ -7,6 +7,10 @@ cat </storage/.config/profile.d/001-device_config DEVICE_PLAYBACK_PATH_SPK="HP" DEVICE_PLAYBACK_PATH_HP="SPK" # Mono blue power LED (GPIO2_B5, BSP gpio77, active low): sysfs blue:status. +# Surfaces the DISABLE POWER LED switch in ES (the var is already in +# the 999-export allowlist; no quirk ever set it, so the item was +# invisible on every device). +DEVICE_PWR_LED_CONTROL="true" DEVICE_POWER_LED="blue:status" DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp" EOF diff --git a/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S Soysauce/001-device_config b/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S Soysauce/001-device_config index 28ecae087f..b571ef8d6b 100755 --- a/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S Soysauce/001-device_config +++ b/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S Soysauce/001-device_config @@ -8,6 +8,10 @@ # exactly, so this folder name MUST equal the DTS `model` string. Audio # routing and LED config are intentionally left to the working defaults. cat </storage/.config/profile.d/001-device_config +# Surfaces the DISABLE POWER LED switch in ES (the var is already in +# the 999-export allowlist; no quirk ever set it, so the item was +# invisible on every device). +DEVICE_PWR_LED_CONTROL="true" DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp" DEVICE_GPU_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone1/temp" # Headphone/speaker switching (headphone_sense). The rk817 ext-amplifier patch diff --git a/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S/001-device_config b/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S/001-device_config index 86b6e3bb4d..2b8efa8398 100755 --- a/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S/001-device_config +++ b/projects/ArchR/packages/hardware/quirks/devices/Game Console R36S/001-device_config @@ -8,6 +8,10 @@ DEVICE_PLAYBACK_PATH_SPK="HP" DEVICE_PLAYBACK_PATH_HP="SPK" # Bicolor power LED on one line (GPIO2_B5, BSP gpio77): sysfs red:status; # brightness 1 = red, 0 = the green side. There is no hardware off. +# Surfaces the DISABLE POWER LED switch in ES (the var is already in +# the 999-export allowlist; no quirk ever set it, so the item was +# invisible on every device). +DEVICE_PWR_LED_CONTROL="true" DEVICE_POWER_LED="red:status" DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp" # thermal_zone1 is the gpu-thermal IP — System Information shows the diff --git a/projects/ArchR/packages/hardware/quirks/devices/R36S Clone/001-device_config b/projects/ArchR/packages/hardware/quirks/devices/R36S Clone/001-device_config index 8efdb742c8..4f7808b9af 100755 --- a/projects/ArchR/packages/hardware/quirks/devices/R36S Clone/001-device_config +++ b/projects/ArchR/packages/hardware/quirks/devices/R36S Clone/001-device_config @@ -9,6 +9,10 @@ # routing and LED config are intentionally left to the working defaults. cat </storage/.config/profile.d/001-device_config # LED nodes use color+function (no label), so sysfs is blue:power. +# Surfaces the DISABLE POWER LED switch in ES (the var is already in +# the 999-export allowlist; no quirk ever set it, so the item was +# invisible on every device). +DEVICE_PWR_LED_CONTROL="true" DEVICE_POWER_LED="blue:power" DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp" DEVICE_GPU_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone1/temp"