diff mbox series

[PATCH-22.03,07/10] ipq40xx: add LED functions for Google WiFi

Message ID 20230407132348.75330-7-openwrt@aiyionpri.me
State Rejected
Delegated to: Petr Štetiar
Headers show
Series [PATCH-22.03,01/10] ipq40xx: Support Chromium OS image-type creation | expand

Commit Message

Jan-Niklas Burfeind April 7, 2023, 1:23 p.m. UTC
From: Jan-Niklas Burfeind <git@aiyionpri.me>

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@aiyionpri.me>
Tested-by: Andrijan Möcker <amo@ct.de>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 9b005036f8d070594fc7f3374f82c81f0a692918)
---
 .../files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts  | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
diff mbox series

Patch

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 c48d6a75b3..173c6ff804 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
@@ -13,6 +13,13 @@ 
 	model = "Google WiFi (Gale)";
 	compatible = "google,wifi", "google,gale-v2", "qcom,ipq4019";
 
+	aliases {
+		led-boot = &led0_blue;
+		led-failsafe = &led0_red;
+		led-running = &led0_blue;
+		led-upgrade = &led0_red;
+	};
+
 	chosen {
 		/*
 		 * rootwait: in case we're booting from slow/async USB storage.
@@ -245,12 +252,13 @@ 
 		clock-mode = /bits/ 8 <1>;
 
 #if 1
-		led@0 {
+		led0_red: led@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@1 {
@@ -261,12 +269,13 @@ 
 			color = <LED_COLOR_ID_GREEN>;
 		};
 
-		led@2 {
+		led0_blue: led@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
 		/*
@@ -275,6 +284,7 @@ 
 		 * # echo 255 > /sys/class/leds/tricolor/brightness
 		 */
 		multi-led@2 {
+			function = LED_FUNCTION_POWER;
 			reg = <2>;
 			color = <LED_COLOR_ID_RGB>;
 			#address-cells = <1>;