mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <Horatiu.Vultur@microchip.com>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<Nicolas.Ferre@microchip.com>, <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH] ARM: dts: lan966x: add led configuration
Date: Thu, 1 Sep 2022 09:56:47 +0000	[thread overview]
Message-ID: <53130a5f-653a-1814-c7e0-d455865fc4c3@microchip.com> (raw)
In-Reply-To: <20220831194430.53108-1-horatiu.vultur@microchip.com>

On 31.08.2022 22:44, 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>
> ---
>  arch/arm/boot/dts/lan966x-pcb8291.dts | 29 +++++++++++++++++++++++++++
>  arch/arm/boot/dts/lan966x-pcb8309.dts | 29 +++++++++++++++++++++++++++
>  2 files changed, 58 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/lan966x-pcb8291.dts b/arch/arm/boot/dts/lan966x-pcb8291.dts
> index 24d9055c4a08..649cfe69d98d 100644
> --- a/arch/arm/boot/dts/lan966x-pcb8291.dts
> +++ b/arch/arm/boot/dts/lan966x-pcb8291.dts
> @@ -23,6 +23,35 @@ gpio-restart {
>  		gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
>  		priority = <200>;
>  	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		status = "okay";

There is no need for status here. Default is okay.

> +
> +		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..4f30975b4a13 100644
> --- a/arch/arm/boot/dts/lan966x-pcb8309.dts
> +++ b/arch/arm/boot/dts/lan966x-pcb8309.dts
> @@ -42,6 +42,35 @@ i2c103: i2c-sfp@2 {
>  		};
>  	};
>  
> +	leds {
> +		compatible = "gpio-leds";
> +		status = "okay";

Ditto

> +
> +		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>;


  reply	other threads:[~2022-09-01  9:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 19:44 Horatiu Vultur
2022-09-01  9:56 ` Claudiu.Beznea [this message]
2022-09-30 10:45 ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53130a5f-653a-1814-c7e0-d455865fc4c3@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=Horatiu.Vultur@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®