[PATCH 3/3] ipq40xx: wr-1: wire up switch LEDs

Tomasz Maciej Nowak tmn505 at terefe.re
Thu Mar 12 12:46:00 PDT 2026


From: Tomasz Maciej Nowak <tmn505 at gmail.com>

This will allow controlling them from sysfs.

Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 .../linux/ipq40xx/dts/qcom-ipq4018-wr-1.dts   | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)

diff --git a/target/linux/ipq40xx/dts/qcom-ipq4018-wr-1.dts b/target/linux/ipq40xx/dts/qcom-ipq4018-wr-1.dts
index b3fb85714e3f..6fb90b66273b 100644
--- a/target/linux/ipq40xx/dts/qcom-ipq4018-wr-1.dts
+++ b/target/linux/ipq40xx/dts/qcom-ipq4018-wr-1.dts
@@ -176,6 +176,80 @@
 	status = "okay";
 };
 
+&ethphy0 {
+	leds {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led at 1 {
+			reg = <1>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <4>;
+			default-state = "keep";
+		};
+	};
+};
+
+&ethphy1 {
+	leds {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led at 1 {
+			reg = <1>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <3>;
+			default-state = "keep";
+		};
+	};
+};
+
+&ethphy2 {
+	leds {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led at 1 {
+			reg = <1>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <2>;
+			default-state = "keep";
+		};
+	};
+};
+
+&ethphy3 {
+	leds {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led at 1 {
+			reg = <1>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <1>;
+			default-state = "keep";
+		};
+	};
+};
+
+&ethphy4 {
+	leds {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led at 1 {
+			reg = <1>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WAN;
+			default-state = "keep";
+		};
+	};
+};
+
 &gmac {
 	status = "okay";
 };
-- 
2.53.0




More information about the openwrt-devel mailing list