linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: renesas: falcon-cpu: Add GP LEDs
@ 2021-03-22 17:20 Kieran Bingham
  2021-03-29  8:30 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Kieran Bingham @ 2021-03-22 17:20 UTC (permalink / raw)
  To: Geert Uytterhoeven, linux-renesas-soc, devicetree, linux-kernel
  Cc: Kieran Bingham

Three general purpose LEDs are provided on the Falcon CPU board.

Connect GP_LED1, GP_LED2, and GP_LED3 to the gpio-leds frameworks as
indicator LEDs.

These LEDs are arranged in a block of four LEDs on the board itself, but
the fourth LED is as yet unidentified.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

--
v2:
 - Move to r8a779a0-falcon-cpu.dtsi
 - Define the colour, and function.
---
 .../boot/dts/renesas/r8a779a0-falcon-cpu.dtsi | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
index 286a5d5b9b08..98aa918e716e 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
@@ -6,12 +6,37 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
 #include "r8a779a0.dtsi"
 
 / {
 	model = "Renesas Falcon CPU board";
 	compatible = "renesas,falcon-cpu", "renesas,r8a779a0";
 
+	leds {
+		compatible = "gpio-leds";
+
+		led1 {
+			gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_INDICATOR;
+			function-enumerator = <1>;
+		};
+		led2 {
+			gpios = <&gpio4 19 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_INDICATOR;
+			function-enumerator = <2>;
+		};
+		led3 {
+			gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_INDICATOR;
+			function-enumerator = <3>;
+		};
+	};
+
 	memory@48000000 {
 		device_type = "memory";
 		/* first 128MB is reserved for secure area. */
-- 
2.25.1


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

* Re: [PATCH v2] arm64: dts: renesas: falcon-cpu: Add GP LEDs
  2021-03-22 17:20 [PATCH v2] arm64: dts: renesas: falcon-cpu: Add GP LEDs Kieran Bingham
@ 2021-03-29  8:30 ` Geert Uytterhoeven
  2021-03-29  9:15   ` Kieran Bingham
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-03-29  8:30 UTC (permalink / raw)
  To: Kieran Bingham
  Cc: Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Kieran,

On Mon, Mar 22, 2021 at 6:20 PM Kieran Bingham
<kieran.bingham+renesas@ideasonboard.com> wrote:
> Three general purpose LEDs are provided on the Falcon CPU board.
>
> Connect GP_LED1, GP_LED2, and GP_LED3 to the gpio-leds frameworks as
> indicator LEDs.
>
> These LEDs are arranged in a block of four LEDs on the board itself, but
> the fourth LED is as yet unidentified.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Thanks for your patch (which does not apply against renesas-devel)!

> --

--- ;-)

> v2:
>  - Move to r8a779a0-falcon-cpu.dtsi
>  - Define the colour, and function.

> --- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
> @@ -6,12 +6,37 @@
>   */
>
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
> +
>  #include "r8a779a0.dtsi"
>
>  / {
>         model = "Renesas Falcon CPU board";
>         compatible = "renesas,falcon-cpu", "renesas,r8a779a0";
>
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               led1 {

led-1?

Documentation/devicetree/bindings/leds/leds-gpio.yaml says:

  # The first form is preferred, but fall back to just 'led' anywhere in the
  # node name to at least catch some child nodes.
  "(^led-[0-9a-f]$|led)":

> +                       gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>;
> +                       color = <LED_COLOR_ID_GREEN>;
> +                       function = LED_FUNCTION_INDICATOR;
> +                       function-enumerator = <1>;
> +               };
> +               led2 {
> +                       gpios = <&gpio4 19 GPIO_ACTIVE_HIGH>;
> +                       color = <LED_COLOR_ID_GREEN>;
> +                       function = LED_FUNCTION_INDICATOR;
> +                       function-enumerator = <2>;
> +               };
> +               led3 {
> +                       gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>;
> +                       color = <LED_COLOR_ID_GREEN>;
> +                       function = LED_FUNCTION_INDICATOR;
> +                       function-enumerator = <3>;
> +               };
> +       };
> +
>         memory@48000000 {
>                 device_type = "memory";
>                 /* first 128MB is reserved for secure area. */

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.13, with the above fixed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2] arm64: dts: renesas: falcon-cpu: Add GP LEDs
  2021-03-29  8:30 ` Geert Uytterhoeven
@ 2021-03-29  9:15   ` Kieran Bingham
  0 siblings, 0 replies; 3+ messages in thread
From: Kieran Bingham @ 2021-03-29  9:15 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Geert,

On 29/03/2021 09:30, Geert Uytterhoeven wrote:
> Hi Kieran,
> 
> On Mon, Mar 22, 2021 at 6:20 PM Kieran Bingham
> <kieran.bingham+renesas@ideasonboard.com> wrote:
>> Three general purpose LEDs are provided on the Falcon CPU board.
>>
>> Connect GP_LED1, GP_LED2, and GP_LED3 to the gpio-leds frameworks as
>> indicator LEDs.
>>
>> These LEDs are arranged in a block of four LEDs on the board itself, but
>> the fourth LED is as yet unidentified.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> 
> Thanks for your patch (which does not apply against renesas-devel)!

Oh, I'm sure I was based on renesas-devel/master when submitting that...
I guess I need to rebase my branch again.

> 
>> --
> 
> --- ;-)

Yup - sorry ;-)

> 
>> v2:
>>  - Move to r8a779a0-falcon-cpu.dtsi
>>  - Define the colour, and function.
> 
>> --- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
>> +++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi
>> @@ -6,12 +6,37 @@
>>   */
>>
>>  #include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/leds/common.h>
>> +
>>  #include "r8a779a0.dtsi"
>>
>>  / {
>>         model = "Renesas Falcon CPU board";
>>         compatible = "renesas,falcon-cpu", "renesas,r8a779a0";
>>
>> +       leds {
>> +               compatible = "gpio-leds";
>> +
>> +               led1 {
> 
> led-1?
> 
> Documentation/devicetree/bindings/leds/leds-gpio.yaml says:
> 
>   # The first form is preferred, but fall back to just 'led' anywhere in the
>   # node name to at least catch some child nodes.
>   "(^led-[0-9a-f]$|led)":

Aha so picky ;-)


>> +                       gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>;
>> +                       color = <LED_COLOR_ID_GREEN>;
>> +                       function = LED_FUNCTION_INDICATOR;
>> +                       function-enumerator = <1>;
>> +               };
>> +               led2 {
>> +                       gpios = <&gpio4 19 GPIO_ACTIVE_HIGH>;
>> +                       color = <LED_COLOR_ID_GREEN>;
>> +                       function = LED_FUNCTION_INDICATOR;
>> +                       function-enumerator = <2>;
>> +               };
>> +               led3 {
>> +                       gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>;
>> +                       color = <LED_COLOR_ID_GREEN>;
>> +                       function = LED_FUNCTION_INDICATOR;
>> +                       function-enumerator = <3>;
>> +               };
>> +       };
>> +
>>         memory@48000000 {
>>                 device_type = "memory";
>>                 /* first 128MB is reserved for secure area. */
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-devel for v5.13, with the above fixed.

Thanks.

For reference only, As previously discussed there is a fourth led in
this block of LEDs arranged on the board.

I can only confirm that it is not controllable by either GPIO4{17,21}.

But I have not been able to locate what might be controlling it.

So for now, it remains ignored. It might not be the safest to go
flipping all of the GPIOs randomly on this board ;-)

--
Kieran


> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 


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

end of thread, other threads:[~2021-03-29  9:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 17:20 [PATCH v2] arm64: dts: renesas: falcon-cpu: Add GP LEDs Kieran Bingham
2021-03-29  8:30 ` Geert Uytterhoeven
2021-03-29  9:15   ` Kieran Bingham

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).