diff mbox series

[4/4] ARM: dts: BCM5301X: Add triggers for Luxul XWR-1200 network LEDs

Message ID 20220503153613.15320-4-zajec5@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/4] dt-bindings: net: add bitfield defines for Ethernet speeds | expand

Commit Message

Rafał Miłecki May 3, 2022, 3:36 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Those LEDs are not hardware controlled so bootloader / operating system
may want to control them manually depending on switch ports state.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 22 ++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
index 9316a36434f7..ee1b0fd3eb86 100644
--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
+++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
@@ -5,6 +5,8 @@ 
 
 /dts-v1/;
 
+#include <dt-bindings/net/eth.h>
+
 #include "bcm47081.dtsi"
 #include "bcm5301x-nand-cs0-bch4.dtsi"
 
@@ -38,24 +40,28 @@  power {
 		lan3 {
 			label = "bcm53xx:green:lan3";
 			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&port_lan3 SPEED_UNSPEC>;
 			linux,default-trigger = "none";
 		};
 
 		lan4 {
 			label = "bcm53xx:green:lan4";
 			gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&port_lan4 SPEED_UNSPEC>;
 			linux,default-trigger = "none";
 		};
 
 		wan {
 			label = "bcm53xx:green:wan";
 			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&port_wan SPEED_UNSPEC>;
 			linux,default-trigger = "none";
 		};
 
 		lan2 {
 			label = "bcm53xx:green:lan2";
 			gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&port_lan2 SPEED_UNSPEC>;
 			linux,default-trigger = "none";
 		};
 
@@ -87,6 +93,7 @@  status {
 		lan1 {
 			label = "bcm53xx:green:lan1";
 			gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&port_lan1 SPEED_UNSPEC>;
 			linux,default-trigger = "none";
 		};
 	};
@@ -114,29 +121,34 @@  &srab {
 	status = "okay";
 
 	ports {
-		port@0 {
+		port_lan4: port@0 {
 			reg = <0>;
 			label = "lan4";
+			#trigger-source-cells = <1>;
 		};
 
-		port@1 {
+		port_lan3: port@1 {
 			reg = <1>;
 			label = "lan3";
+			#trigger-source-cells = <1>;
 		};
 
-		port@2 {
+		port_lan2: port@2 {
 			reg = <2>;
 			label = "lan2";
+			#trigger-source-cells = <1>;
 		};
 
-		port@3 {
+		port_lan1: port@3 {
 			reg = <3>;
 			label = "lan1";
+			#trigger-source-cells = <1>;
 		};
 
-		port@4 {
+		port_wan: port@4 {
 			reg = <4>;
 			label = "wan";
+			#trigger-source-cells = <1>;
 		};
 
 		port@5 {