Skip to contentSkip to conversation

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

PATCH Applied Petr Štetiar 3 participants 5 messages Mar 25, 2020 – Mar 31, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: allwinner: a64: olinuxino: add user red LED

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.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +9 -0
index 6dfafa1c879b..b9f90e19c035 100644
@@ -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";
#1 lore raw
Quoted 5 lines · Petr Štetiar

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.

QUeued for 5.8, thanks!
Maxime

#2 lore raw
Quoted 9 lines · Maxime Ripard
Quoted 5 lines · Petr Štetiar

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.

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

#3 lore raw

Chen-Yu Tsai <[email protected]> [2020-03-31 09:19:57]:

Hi,

Quoted 7 lines · Maxime Ripard
Quoted 6 lines · Petr Štetiar
Quoted 4 lines

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.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

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

#4 lore raw
In reply to Chen-Yu Tsai
Quoted 7 lines · Chen-Yu Tsai
Quoted 6 lines · Maxime Ripard
Quoted 4 lines · Petr Štetiar

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.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

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