linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: lan966x: add led configuration
@ 2022-09-02  6:24 Horatiu Vultur
  2022-09-02  8:57 ` Claudiu.Beznea
  0 siblings, 1 reply; 2+ messages in thread
From: Horatiu Vultur @ 2022-09-02  6:24 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: robh+dt, krzysztof.kozlowski+dt, claudiu.beznea, nicolas.ferre,
	UNGLinuxDriver, Horatiu Vultur

Add led configuration for pcb8291 and pcb8309. Both pcbs have 4 leds which
are connected to the sgpio controller.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
v1->v2:
- remove status from the leds node as default is okay
---
 arch/arm/boot/dts/lan966x-pcb8291.dts | 28 +++++++++++++++++++++++++++
 arch/arm/boot/dts/lan966x-pcb8309.dts | 28 +++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/arch/arm/boot/dts/lan966x-pcb8291.dts b/arch/arm/boot/dts/lan966x-pcb8291.dts
index 24d9055c4a08..289a31649422 100644
--- a/arch/arm/boot/dts/lan966x-pcb8291.dts
+++ b/arch/arm/boot/dts/lan966x-pcb8291.dts
@@ -23,6 +23,34 @@ gpio-restart {
 		gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
 		priority = <200>;
 	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-s0-blue {
+			label = "s0:blue";
+			gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led-s0-green {
+			label = "s0:green";
+			gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led-s1-blue {
+			label = "s1:blue";
+			gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led-s1-green {
+			label = "s1:green";
+			gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
 };
 
 &gpio {
diff --git a/arch/arm/boot/dts/lan966x-pcb8309.dts b/arch/arm/boot/dts/lan966x-pcb8309.dts
index 05ce27ed5648..cfd7c8933703 100644
--- a/arch/arm/boot/dts/lan966x-pcb8309.dts
+++ b/arch/arm/boot/dts/lan966x-pcb8309.dts
@@ -42,6 +42,34 @@ i2c103: i2c-sfp@2 {
 		};
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		led-s0-green {
+			label = "s0:green";
+			gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led-s0-red {
+			label = "s0:red";
+			gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led-s1-green {
+			label = "s1:green";
+			gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led-s1-red {
+			label = "s1:red";
+			gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
+
 	mux: mux-controller {
 		compatible = "gpio-mux";
 		#mux-control-cells = <0>;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ARM: dts: lan966x: add led configuration
  2022-09-02  6:24 [PATCH v2] ARM: dts: lan966x: add led configuration Horatiu Vultur
@ 2022-09-02  8:57 ` Claudiu.Beznea
  0 siblings, 0 replies; 2+ messages in thread
From: Claudiu.Beznea @ 2022-09-02  8:57 UTC (permalink / raw)
  To: Horatiu.Vultur, devicetree, linux-kernel
  Cc: robh+dt, krzysztof.kozlowski+dt, Nicolas.Ferre, UNGLinuxDriver

On 02.09.2022 09:24, Horatiu Vultur wrote:
> Add led configuration for pcb8291 and pcb8309. Both pcbs have 4 leds which
> are connected to the sgpio controller.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>

Applied to at91-dt, thanks!

> ---
> v1->v2:
> - remove status from the leds node as default is okay
> ---
>  arch/arm/boot/dts/lan966x-pcb8291.dts | 28 +++++++++++++++++++++++++++
>  arch/arm/boot/dts/lan966x-pcb8309.dts | 28 +++++++++++++++++++++++++++
>  2 files changed, 56 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/lan966x-pcb8291.dts b/arch/arm/boot/dts/lan966x-pcb8291.dts
> index 24d9055c4a08..289a31649422 100644
> --- a/arch/arm/boot/dts/lan966x-pcb8291.dts
> +++ b/arch/arm/boot/dts/lan966x-pcb8291.dts
> @@ -23,6 +23,34 @@ gpio-restart {
>  		gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
>  		priority = <200>;
>  	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		led-s0-blue {
> +			label = "s0:blue";
> +			gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +
> +		led-s0-green {
> +			label = "s0:green";
> +			gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +
> +		led-s1-blue {
> +			label = "s1:blue";
> +			gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +
> +		led-s1-green {
> +			label = "s1:green";
> +			gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +	};
>  };
>  
>  &gpio {
> diff --git a/arch/arm/boot/dts/lan966x-pcb8309.dts b/arch/arm/boot/dts/lan966x-pcb8309.dts
> index 05ce27ed5648..cfd7c8933703 100644
> --- a/arch/arm/boot/dts/lan966x-pcb8309.dts
> +++ b/arch/arm/boot/dts/lan966x-pcb8309.dts
> @@ -42,6 +42,34 @@ i2c103: i2c-sfp@2 {
>  		};
>  	};
>  
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		led-s0-green {
> +			label = "s0:green";
> +			gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +
> +		led-s0-red {
> +			label = "s0:red";
> +			gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +
> +		led-s1-green {
> +			label = "s1:green";
> +			gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +
> +		led-s1-red {
> +			label = "s1:red";
> +			gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +		};
> +	};
> +
>  	mux: mux-controller {
>  		compatible = "gpio-mux";
>  		#mux-control-cells = <0>;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-02  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02  6:24 [PATCH v2] ARM: dts: lan966x: add led configuration Horatiu Vultur
2022-09-02  8:57 ` Claudiu.Beznea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).