From 5c1c823c4ae2a3283b8e5ec0b68c4774456507f2 Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Sat, 16 Mar 2024 15:28:31 +0900 Subject: qualcommax: ipq807x: fix LEDs on QNAP QHora-301W On QNAP QHora-301W, all LEDs don't have "function" property and only "color" property is available for the newer binding of LED on Linux Kernel. 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format") removes "label" property from LEDs, then, multiple ":" (ex.: "amber:"/"green:"/"red:") will be appeared as LED names and renamed to ":_" ("ex.: "green:_1", "green:_2", ...) by kernel. logs: [ 4.246494] leds-gpio leds: Led green: renamed to green:_1 due to name collision [ 4.248978] leds-gpio leds: Led green: renamed to green:_2 due to name collision [ 4.256345] leds-gpio leds: Led green: renamed to green:_3 due to name collision [ 4.263770] leds-gpio leds: Led green: renamed to green:_4 due to name collision [ 4.271105] leds-gpio leds: Led amber: renamed to amber:_1 due to name collision [ 4.278487] leds-gpio leds: Led green: renamed to green:_5 due to name collision [ 4.285856] leds-gpio leds: Led amber: renamed to amber:_2 due to name collision [ 4.293257] leds-gpio leds: Led green: renamed to green:_6 due to name collision [ 4.300616] leds-gpio leds: Led amber: renamed to amber:_3 due to name collision [ 4.308002] leds-gpio leds: Led green: renamed to green:_7 due to name collision [ 4.315384] leds-gpio leds: Led amber: renamed to amber:_4 due to name collision [ 4.322760] leds-gpio leds: Led green: renamed to green:_8 due to name collision [ 4.330135] leds-gpio leds: Led amber: renamed to amber:_5 due to name collision /sys/class/leds: amber: amber:_4 green:_2 green:_6 amber:_1 green:_5 green:_3 green:_7 amber:_2 green: green:_4 green:_8 amber:_3 green:_1 green:_5 red: Fix this issue by adding missing "function" (and "function-enumerator") property to LEDs on QNAP QHora-301W. Note: there are no appropriate functions in dt-bindings/leds/common.h for some LEDs, so use the hardcoded strings for them instead. Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format") Signed-off-by: INAGAKI Hiroshi --- .../arch/arm64/boot/dts/qcom/ipq8072-301w.dts | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'target/linux/qualcommax/files/arch/arm64/boot') diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts index 081e932b5c..2fe723591e 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts @@ -63,81 +63,109 @@ led_system_green: led-system-green { gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_STATUS; }; led_system_red: led-system-red { gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_STATUS; }; led_pwr_green: led-pwr-green { gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_POWER; }; led-wifi-green { gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_WLAN; }; led-lan4-green { gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; }; led-lan4-amber { gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; }; led-lan3-green { gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; }; led-lan3-amber { gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; }; led-lan2-green { gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; }; led-lan2-amber { gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; }; led-lan1-green { gpios = <&tlmm 14 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; }; led-lan1-amber { gpios = <&tlmm 15 GPIO_ACTIVE_HIGH>; color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; }; led-10g-1-green { gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; color = ; + function = "10g"; + function-enumerator = <1>; }; led-10g-1-amber { gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>; color = ; + function = "10g"; + function-enumerator = <1>; }; led-10g-2-green { gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>; color = ; + function = "10g"; + function-enumerator = <2>; }; led-10g-2-amber { gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>; color = ; + function = "10g"; + function-enumerator = <2>; }; }; }; -- cgit v1.2.3