[openwrt/openwrt] ipq40xx: add LED functions for Google WiFi

LEDE Commits lede-commits at lists.infradead.org
Fri Mar 31 10:39:54 PDT 2023


blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9b005036f8d070594fc7f3374f82c81f0a692918

commit 9b005036f8d070594fc7f3374f82c81f0a692918
Author: Jan-Niklas Burfeind <git at aiyionpri.me>
AuthorDate: Mon Mar 27 07:29:39 2023 +0200

    ipq40xx: add LED functions for Google WiFi
    
    Add LED function properties for the LED controller to avoid failing
    driver probe with kernel 5.15.
    
    While at it, also define the OpenWrt LED indicator patterns for this
    device.
    
    Ref commit 583ac0e11df7 ("mpc85xx: update lp5521 led-controller node for 5.10")
    
    Google uses white for running and red for an issue
    
    Signed-off-by: Jan-Niklas Burfeind <git at aiyionpri.me>
    Tested-by: Andrijan Möcker <amo at ct.de>
    Reviewed-by: Brian Norris <computersforpeace at gmail.com>
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts     | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
index e4f47431e5..f92c289738 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
@@ -15,6 +15,10 @@
 
 	aliases {
 		label-mac-device = &gmac0;
+		led-boot = &led0_blue;
+		led-failsafe = &led0_red;
+		led-running = &led0_blue;
+		led-upgrade = &led0_red;
 	};
 
 	chosen {
@@ -255,12 +259,13 @@
 		clock-mode = /bits/ 8 <1>;
 
 #if 1
-		led at 0 {
+		led0_red: led at 0 {
 			reg = <0>;
 			chan-name = "LED0_Red";
 			led-cur = /bits/ 8 <0x64>;
 			max-cur = /bits/ 8 <0x78>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_FAULT;
 		};
 
 		led at 1 {
@@ -271,12 +276,13 @@
 			color = <LED_COLOR_ID_GREEN>;
 		};
 
-		led at 2 {
+		led0_blue: led at 2 {
 			reg = <2>;
 			chan-name = "LED0_Blue";
 			led-cur = /bits/ 8 <0x64>;
 			max-cur = /bits/ 8 <0x78>;
 			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_POWER;
 		};
 #else
 		/*
@@ -285,6 +291,7 @@
 		 * # echo 255 > /sys/class/leds/tricolor/brightness
 		 */
 		multi-led at 2 {
+			function = LED_FUNCTION_POWER;
 			reg = <2>;
 			color = <LED_COLOR_ID_RGB>;
 			#address-cells = <1>;




More information about the lede-commits mailing list