diff mbox series

[net-next,+,mvebu,v2,7/7] arm64: dts: armada-3720-turris-mox: add nodes for ethernet PHY LEDs

Message ID 20200909162552.11032-8-marek.behun@nic.cz
State New
Headers show
Series [net-next,+,leds,v2,1/7] dt-bindings: leds: document binding for HW controlled LEDs | expand

Commit Message

Marek Behún Sept. 9, 2020, 4:25 p.m. UTC
Add nodes for the green and yellow LEDs that are connected to the
ethernet PHY chip on Turris MOX A.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 .../dts/marvell/armada-3720-turris-mox.dts    | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

Pavel Machek Sept. 10, 2020, 12:25 p.m. UTC | #1
Hi!

> Add nodes for the green and yellow LEDs that are connected to the
> ethernet PHY chip on Turris MOX A.
> 
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> ---
>  .../dts/marvell/armada-3720-turris-mox.dts    | 23 +++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> index f3a678e0fd99b..6da03b6c69c0a 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> @@ -9,6 +9,7 @@
>  #include <dt-bindings/bus/moxtet.h>
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
>  #include "armada-372x.dtsi"
>  
>  / {
> @@ -273,6 +274,28 @@ &mdio {
>  
>  	phy1: ethernet-phy@1 {
>  		reg = <1>;
> +
> +		leds {
> +			compatible = "linux,hw-controlled-leds";

I don't believe this is suitable compatible.

Best regards,
									Pavel
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
index f3a678e0fd99b..6da03b6c69c0a 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
@@ -9,6 +9,7 @@ 
 #include <dt-bindings/bus/moxtet.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include "armada-372x.dtsi"
 
 / {
@@ -273,6 +274,28 @@  &mdio {
 
 	phy1: ethernet-phy@1 {
 		reg = <1>;
+
+		leds {
+			compatible = "linux,hw-controlled-leds";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led@0 {
+				reg = <0>;
+				color = <LED_COLOR_ID_GREEN>;
+				function = LED_FUNCTION_STATUS;
+				linux,default-trigger = "dev-hw-mode";
+				linux,default-hw-mode = "1Gbps/100Mbps/10Mbps";
+			};
+
+			led@1 {
+				reg = <1>;
+				color = <LED_COLOR_ID_YELLOW>;
+				function = LED_FUNCTION_ACTIVITY;
+				linux,default-trigger = "dev-hw-mode";
+				linux,default-hw-mode = "blink-act";
+			};
+		};
 	};
 
 	/* switch nodes are enabled by U-Boot if modules are present */