arm64: dts: renesas: salvator-common: gpio-leds prototype
Subsystems (2)
Magnus Damm
maintainerFrom: Magnus Damm <[email protected]>
This patch adds support for a couple of LEDs on Salvator-X and XS boards.
I've verified that LED4, LED5 and LED6 work by exporting GPIOs for GP6_11, GP6_12 and GP6_13 on the board on port 9011. This patch has not yet been tested though. Also to make matters slightly more complicated, even if LEDs might work with this patch as-is, the code in this patch is most likely not suitable for upstream consumption. This since SW20, SW21 and SW22 are also using the same GPIOs as the LEDs.
---
arch/arm64/boot/dts/renesas/salvator-common.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/renesas/salvator-common.dtsi +14 -0
@@ -166,6 +166,20 @@ }; }; + leds { + compatible = "gpio-leds"; + + led4 { + gpios = <&gpio6 11 GPIO_ACTIVE_HIGH>; + }; + led5 { + gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; + }; + led6 { + gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; + }; + }; + reg_1p8v: regulator0 { compatible = "regulator-fixed"; regulator-name = "fixed-1.8V";
Geert Uytterhoeven
Reviewed-byHi Magnus,
Quoted 3 lines · Magnus Damm
From: Magnus Damm <[email protected]>
This patch adds support for a couple of LEDs on Salvator-X and XS boards.
Thanks for your patch!
Quoted 6 lines
I've verified that LED4, LED5 and LED6 work by exporting GPIOs for
GP6_11,GP6_12andGP6_13on the board on port 9011. This patch has not yet been tested though. Also to make matters slightly more complicated, even if LEDs might work with this patch as-is, the code in this patch is most likely not suitable for upstream consumption. This since SW20, SW21 and SW22 are also using the same GPIOs as the LEDs.
Indeed. I think we should add kernel support for sharing GPIOs this way, before we can describe the LEDs in DT. Else we'll introduce a regression, depending on which driver is bound first.
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>
As this matches with an old local patch of mine:
However, I'm not gonna apply it, without a fix for the sharing issue.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Magnus Damm
maintainerHi Geert,
Quoted 9 lines · Geert Uytterhoeven
Hi Magnus,
Quoted 3 lines · Magnus Damm
From: Magnus Damm <[email protected]>
This patch adds support for a couple of LEDs on Salvator-X and XS boards.
Thanks for your patch!
Thanks. Not exactly rocket science!
Quoted 10 lines
Quoted 6 lines
I've verified that LED4, LED5 and LED6 work by exporting GPIOs for
GP6_11,GP6_12andGP6_13on the board on port 9011. This patch has not yet been tested though. Also to make matters slightly more complicated, even if LEDs might work with this patch as-is, the code in this patch is most likely not suitable for upstream consumption. This since SW20, SW21 and SW22 are also using the same GPIOs as the LEDs.Indeed. I think we should add kernel support for sharing GPIOs this way, before we can describe the LEDs in DT. Else we'll introduce a regression, depending on which driver is bound first.
Totally agree.
Quoted 6 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>As this matches with an old local patch of mine:
Reviewed-by Geert Uytterhoeven <[email protected]>However, I'm not gonna apply it, without a fix for the sharing issue.
Sure, makes sense!
Thanks,
/ magnus