Message ID | 159282942947.12451.16657662841957319548.sendpatchset@octo (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | [PATCH/RFC] arm64: dts: renesas: r8a77995-draak: gpio-leds prototype | expand |
Hi Magnus, On Mon, Jun 22, 2020 at 2:51 PM Magnus Damm <magnus.damm@gmail.com> wrote: > From: Magnus Damm <damm+renesas@opensource.se> > > This patch adds support for a couple of LEDs on the r8a77995 Draak board. > > It also ignores the issue that push switches are also used on the same GPIOs. > > The approach is the same as in the earlier posted patch for other boards: > [PATCH/RFC] arm64: dts: renesas: salvator-common: gpio-leds prototype > > The limitations of DT bindings and kernel software support remain the same. > > As Geert pointed out we need to extend the software to allow sharing of > GPIOs somehow. On this board and several others the GPIOs used for LEDs > are also used for push switches. Both DT bindings and drivers need to > be extended, most likely together with the GPIO subsystem. And to make it > more fun it is probably possible to get interrupts from these GPIOs as well. > > In the patch the LED order and the GPIO number assignments look quite random > but match the schematics. > > Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- 0001/arch/arm64/boot/dts/renesas/r8a77995-draak.dts > +++ work/arch/arm64/boot/dts/renesas/r8a77995-draak.dts 2020-06-22 21:00:20.000000000 +0900 > @@ -91,6 +91,20 @@ > }; > }; > > + leds { > + compatible = "gpio-leds"; > + > + led13 { While a name like "led13" is still considered acceptable these days, the preferred format uses a hyphen ("^led-[0-9a-f]$"; whoops no one thought of more than 16 LEDs?) > + gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>; > + }; > + led12 { > + gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; > + }; > + led14 { > + gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>; > + }; > + }; > + > memory@48000000 { > device_type = "memory"; > /* first 128MB is reserved for secure area. */ Gr{oetje,eeting}s, Geert
--- 0001/arch/arm64/boot/dts/renesas/r8a77995-draak.dts +++ work/arch/arm64/boot/dts/renesas/r8a77995-draak.dts 2020-06-22 21:00:20.000000000 +0900 @@ -91,6 +91,20 @@ }; }; + leds { + compatible = "gpio-leds"; + + led13 { + gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>; + }; + led12 { + gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; + }; + led14 { + gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>; + }; + }; + memory@48000000 { device_type = "memory"; /* first 128MB is reserved for secure area. */