mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@ cat <<EOF >/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
|
||||
|
||||
+4
@@ -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 <<CONF >/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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
# routing and LED config are intentionally left to the working defaults.
|
||||
cat <<CONF >/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"
|
||||
|
||||
Reference in New Issue
Block a user