ソースを参照

ipq40xx: improve Netgear LBR20 LED config

This aligns the LED behaviour with other Orbi devices. Orbi devices have
multiple RBG LEDs at the top of the device and two status LEDs at the
back next to the barrel jack.
The current behaviour of other Orbi devices is to use the multi-color
LEDs at the top for status indication and the green/red LEDs at the back
for running/panic-indication. This matches the vendor behaviour except
the color choice.
Other devices use green as running, blue on upgrade, red on failsafe and
white on bootup, so this aligns the LBR20 behaviour to the rest.

Signed-off-by: Christoph Krapp <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20558
Signed-off-by: Robert Marko <[email protected]>
Christoph Krapp 2 ヶ月 前
コミット
aa0c78f898

+ 18 - 27
target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-lbr20.dts

@@ -15,10 +15,10 @@
 	};
 	};
 
 
 	aliases {
 	aliases {
-		led-boot = &led_backlight_white;
-		led-failsafe = &led_status_green;
+		led-boot = &led_status_white;
+		led-failsafe = &led_status_red;
 		led-running = &led_status_green;
 		led-running = &led_status_green;
-		led-upgrade = &led_status_red;
+		led-upgrade = &led_status_blue;
 		label-mac-device = &gmac;
 		label-mac-device = &gmac;
 	};
 	};
 
 
@@ -41,17 +41,18 @@
 	leds {
 	leds {
 		compatible = "gpio-leds";
 		compatible = "gpio-leds";
 
 
-		led_status_green: led-status-green {
-			function = LED_FUNCTION_STATUS;
+		led-0 {
+			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_GREEN>;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
 			gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
-			default-state = "keep";
+			default-state = "on";
 		};
 		};
 
 
-		led_status_red: led-status-red {
-			function = LED_FUNCTION_STATUS;
+		led-1 {
+			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_RED>;
 			color = <LED_COLOR_ID_RED>;
 			gpios = <&tlmm 23 GPIO_ACTIVE_LOW>;
 			gpios = <&tlmm 23 GPIO_ACTIVE_LOW>;
+			panic-indicator;
 		};
 		};
 	};
 	};
 
 
@@ -81,7 +82,6 @@
 			gpio-export,output = <1>;
 			gpio-export,output = <1>;
 			gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
 			gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
 		};
 		};
-
 	};
 	};
 
 
 	soc {
 	soc {
@@ -111,7 +111,6 @@
 			reg = <0x1957000 0x100>;
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 		};
-
 	};
 	};
 };
 };
 
 
@@ -184,7 +183,7 @@
 
 
 	nand_pins: nand-pins {
 	nand_pins: nand-pins {
 		pullups {
 		pullups {
-			pins =	"gpio52", "gpio53", "gpio58", "gpio59";
+			pins = "gpio52", "gpio53", "gpio58", "gpio59";
 			function = "qpic";
 			function = "qpic";
 			bias-pull-up;
 			bias-pull-up;
 		};
 		};
@@ -298,7 +297,6 @@
 					precal_art_9000: precal@9000 {
 					precal_art_9000: precal@9000 {
 						reg = <0x9000 0x2f20>;
 						reg = <0x9000 0x2f20>;
 					};
 					};
-
 				};
 				};
 			};
 			};
 
 
@@ -347,7 +345,6 @@
 						reg = <0x12 0x6>;
 						reg = <0x12 0x6>;
 						#nvmem-cell-cells = <1>;
 						#nvmem-cell-cells = <1>;
 					};
 					};
-
 				};
 				};
 			};
 			};
 
 
@@ -401,7 +398,6 @@
 				label = "ubi";
 				label = "ubi";
 				reg = <0x0ad00000 0x05300000>;
 				reg = <0x0ad00000 0x05300000>;
 			};
 			};
-
 		};
 		};
 	};
 	};
 };
 };
@@ -415,34 +411,29 @@
 		compatible = "ti,tlc59108"; /* really is tlc59208f */
 		compatible = "ti,tlc59108"; /* really is tlc59208f */
 		reg = <0x27>;
 		reg = <0x27>;
 
 
-		led_backlight_green: led-backlight-green {
-			function = LED_FUNCTION_BACKLIGHT;
+		led_status_green: led-0 {
+			function = LED_FUNCTION_STATUS;
 			color = <LED_COLOR_ID_GREEN>;
 			color = <LED_COLOR_ID_GREEN>;
 			reg = <0x0>;
 			reg = <0x0>;
-			linux,default-trigger = "default-off";
 		};
 		};
 
 
-		led_backlight_red: led-backlight-red {
-			function = LED_FUNCTION_BACKLIGHT;
+		led_status_red: led-1 {
+			function = LED_FUNCTION_STATUS;
 			color = <LED_COLOR_ID_RED>;
 			color = <LED_COLOR_ID_RED>;
 			reg = <0x1>;
 			reg = <0x1>;
-			linux,default-trigger = "default-off";
 		};
 		};
 
 
-		led_backlight_blue: led-backlight-blue {
-			function = LED_FUNCTION_BACKLIGHT;
+		led_status_blue: led-2 {
+			function = LED_FUNCTION_STATUS;
 			color = <LED_COLOR_ID_BLUE>;
 			color = <LED_COLOR_ID_BLUE>;
 			reg = <0x2>;
 			reg = <0x2>;
-			linux,default-trigger = "default-off";
 		};
 		};
 
 
-		led_backlight_white: led-backlight-white {
-			function = LED_FUNCTION_BACKLIGHT;
+		led_status_white: led-3 {
+			function = LED_FUNCTION_STATUS;
 			color = <LED_COLOR_ID_WHITE>;
 			color = <LED_COLOR_ID_WHITE>;
 			reg = <0x3>;
 			reg = <0x3>;
-			linux,default-trigger = "default-off";
 		};
 		};
-
 	};
 	};
 };
 };