diff mbox series

arm64: dts: allwinner: a64: olinuxino: add user red LED

Message ID 20200325205924.30736-1-ynezz@true.cz (mailing list archive)
State New, archived
Headers show
Series arm64: dts: allwinner: a64: olinuxino: add user red LED | expand

Commit Message

Petr Štetiar March 25, 2020, 8:59 p.m. UTC
There is a red LED marked as `GPIO_LED1` on the silkscreen and connected
to PE17 by default. So lets add this missing bit in the current hardware
description.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Maxime Ripard March 30, 2020, 5:53 p.m. UTC | #1
On Wed, Mar 25, 2020 at 09:59:24PM +0100, Petr Štetiar wrote:
> There is a red LED marked as `GPIO_LED1` on the silkscreen and connected
> to PE17 by default. So lets add this missing bit in the current hardware
> description.
>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>

QUeued for 5.8, thanks!
Maxime
Chen-Yu Tsai March 31, 2020, 1:19 a.m. UTC | #2
On Tue, Mar 31, 2020 at 1:53 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Wed, Mar 25, 2020 at 09:59:24PM +0100, Petr Štetiar wrote:
> > There is a red LED marked as `GPIO_LED1` on the silkscreen and connected
> > to PE17 by default. So lets add this missing bit in the current hardware
> > description.
> >
> > Signed-off-by: Petr Štetiar <ynezz@true.cz>
>
> QUeued for 5.8, thanks!

The gpio-led binding seems to prefer "led-0" up to "led-f" (^led-[0-9a-f])
as the child node name. This was recently brought to my attention. Do we
want to follow suit here?

ChenYu
Petr Štetiar March 31, 2020, 8:26 a.m. UTC | #3
Chen-Yu Tsai <wens@csie.org> [2020-03-31 09:19:57]:

Hi,

> On Tue, Mar 31, 2020 at 1:53 AM Maxime Ripard <maxime@cerno.tech> wrote:
> >
> > On Wed, Mar 25, 2020 at 09:59:24PM +0100, Petr Štetiar wrote:
> > > There is a red LED marked as `GPIO_LED1` on the silkscreen and connected
> > > to PE17 by default. So lets add this missing bit in the current hardware
> > > description.
> > >
> > > Signed-off-by: Petr Štetiar <ynezz@true.cz>
> >
> > QUeued for 5.8, thanks!
> 
> The gpio-led binding seems to prefer "led-0" up to "led-f" (^led-[0-9a-f])
> as the child node name. This was recently brought to my attention. Do we
> want to follow suit here?

I can see following in Documentation/devicetree/bindings/leds/leds-gpio.yaml:

 patternProperties:
   # 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)":

So it seems like `led-0` is indeed preferred, should I send v2 or a new patch
as a fix on top of the previous one?

-- ynezz
Maxime Ripard March 31, 2020, 9 a.m. UTC | #4
On Tue, Mar 31, 2020 at 09:19:57AM +0800, Chen-Yu Tsai wrote:
> On Tue, Mar 31, 2020 at 1:53 AM Maxime Ripard <maxime@cerno.tech> wrote:
> >
> > On Wed, Mar 25, 2020 at 09:59:24PM +0100, Petr Štetiar wrote:
> > > There is a red LED marked as `GPIO_LED1` on the silkscreen and connected
> > > to PE17 by default. So lets add this missing bit in the current hardware
> > > description.
> > >
> > > Signed-off-by: Petr Štetiar <ynezz@true.cz>
> >
> > QUeued for 5.8, thanks!
>
> The gpio-led binding seems to prefer "led-0" up to "led-f" (^led-[0-9a-f])
> as the child node name. This was recently brought to my attention. Do we
> want to follow suit here?

I've fixed it up, thanks!
Maxime
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 6dfafa1c879b..b9f90e19c035 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -32,6 +32,15 @@ 
 		};
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		user {
+			label = "a64-olinuxino:red:user";
+			gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
+		};
+	};
+
 	reg_usb1_vbus: usb1-vbus {
 		compatible = "regulator-fixed";
 		regulator-name = "usb1-vbus";