diff mbox series

[2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED

Message ID 20210106150525.15403-3-andre.przywara@arm.com (mailing list archive)
State New, archived
Headers show
Series arm64: dts: allwinner: Various DT fixes | expand

Commit Message

Andre Przywara Jan. 6, 2021, 3:05 p.m. UTC
The Pine64-LTS board features a blue status LED on pin PL7.

Describe it in the DT.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Chen-Yu Tsai Jan. 6, 2021, 3:53 p.m. UTC | #1
Hi,

On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The Pine64-LTS board features a blue status LED on pin PL7.

I'd like some clarification about this.

My Pine64-LTS was a used unit personally given to me by TL Lim, which came
with LEDs that I assume were soldered on by hand as their mounting angles
are slightly off. My Pine64+ (the original from the Kickstarter campaign)
and SoPine baseboard (a new unit, also given to me by TL Lim) came without
LEDs soldered on.

I'm OK with adding the LED to the device tree. I'm just not sure about the
color.


ChenYu

> Describe it in the DT.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> index 302e24be0a31..55bf4a0fc31c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> @@ -1,10 +1,21 @@
>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>  // Copyright (c) 2018 ARM Ltd.
>
> +#include <dt-bindings/leds/common.h>
>  #include "sun50i-a64-sopine-baseboard.dts"
>
>  / {
>         model = "Pine64 LTS";
>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>                      "allwinner,sun50i-a64";
> +
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               status {
> +                       function = LED_FUNCTION_STATUS;
> +                       color = <LED_COLOR_ID_BLUE>;
> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
> +               };
> +       };
>  };
> --
> 2.17.5
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.
Maxime Ripard Jan. 6, 2021, 4:01 p.m. UTC | #2
On Wed, Jan 06, 2021 at 03:05:20PM +0000, Andre Przywara wrote:
> The Pine64-LTS board features a blue status LED on pin PL7.
> 
> Describe it in the DT.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> index 302e24be0a31..55bf4a0fc31c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> @@ -1,10 +1,21 @@
>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>  // Copyright (c) 2018 ARM Ltd.
>  
> +#include <dt-bindings/leds/common.h>
>  #include "sun50i-a64-sopine-baseboard.dts"
>  
>  / {
>  	model = "Pine64 LTS";
>  	compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>  		     "allwinner,sun50i-a64";
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		status {

In addition to Chen-Yu comments, the node name should be led

Maxime
Andre Przywara Jan. 6, 2021, 4:08 p.m. UTC | #3
On 06/01/2021 15:53, Chen-Yu Tsai wrote:

Hi,

> On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>>
>> The Pine64-LTS board features a blue status LED on pin PL7.
> 
> I'd like some clarification about this.
> 
> My Pine64-LTS was a used unit personally given to me by TL Lim, which came
> with LEDs that I assume were soldered on by hand as their mounting angles
> are slightly off. My Pine64+ (the original from the Kickstarter campaign)
> and SoPine baseboard (a new unit, also given to me by TL Lim) came without
> LEDs soldered on.

The situation is similar here ;-), and that's why I checked the pictures
in the store. The LEDs look slightly different (not angled), but the
location of the pads is the same and I see two LEDs on the picture. The
schematic seems to confirm both the pins, the polarity and the colour.
Hence I am highly confident that it's a blue LED on PL7, active low.

But we can wait for other people to confirm.

Thanks!
Andre

> I'm OK with adding the LED to the device tree. I'm just not sure about the
> color.
> 
> 
> ChenYu
> 
>> Describe it in the DT.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> index 302e24be0a31..55bf4a0fc31c 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> @@ -1,10 +1,21 @@
>>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>  // Copyright (c) 2018 ARM Ltd.
>>
>> +#include <dt-bindings/leds/common.h>
>>  #include "sun50i-a64-sopine-baseboard.dts"
>>
>>  / {
>>         model = "Pine64 LTS";
>>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>>                      "allwinner,sun50i-a64";
>> +
>> +       leds {
>> +               compatible = "gpio-leds";
>> +
>> +               status {
>> +                       function = LED_FUNCTION_STATUS;
>> +                       color = <LED_COLOR_ID_BLUE>;
>> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
>> +               };
>> +       };
>>  };
>> --
>> 2.17.5
>>
>> --
>> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.
Emmanuel Vadot Jan. 13, 2021, 2:02 p.m. UTC | #4
On Wed, 6 Jan 2021 16:08:30 +0000
André Przywara <andre.przywara@arm.com> wrote:

> On 06/01/2021 15:53, Chen-Yu Tsai wrote:
> 
> Hi,
> 
> > On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >>
> >> The Pine64-LTS board features a blue status LED on pin PL7.
> > 
> > I'd like some clarification about this.
> > 
> > My Pine64-LTS was a used unit personally given to me by TL Lim, which came
> > with LEDs that I assume were soldered on by hand as their mounting angles
> > are slightly off. My Pine64+ (the original from the Kickstarter campaign)
> > and SoPine baseboard (a new unit, also given to me by TL Lim) came without
> > LEDs soldered on.
> 
> The situation is similar here ;-), and that's why I checked the pictures
> in the store. The LEDs look slightly different (not angled), but the
> location of the pads is the same and I see two LEDs on the picture. The
> schematic seems to confirm both the pins, the polarity and the colour.
> Hence I am highly confident that it's a blue LED on PL7, active low.
> 
> But we can wait for other people to confirm.
> 
> Thanks!
> Andre

 I have three boards :

 - Pine64, no led (bought after the kickstarter)
 - A64-LTS, blue color, and active low, no weird mounting angles here
(don't remember if I bought this one or not)
 - Sopine Baseboard, no led (definitly bought this myself)

> > I'm OK with adding the LED to the device tree. I'm just not sure about the
> > color.
> > 
> > 
> > ChenYu
> > 
> >> Describe it in the DT.
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
> >>  1 file changed, 11 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> index 302e24be0a31..55bf4a0fc31c 100644
> >> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> @@ -1,10 +1,21 @@
> >>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >>  // Copyright (c) 2018 ARM Ltd.
> >>
> >> +#include <dt-bindings/leds/common.h>
> >>  #include "sun50i-a64-sopine-baseboard.dts"
> >>
> >>  / {
> >>         model = "Pine64 LTS";
> >>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
> >>                      "allwinner,sun50i-a64";
> >> +
> >> +       leds {
> >> +               compatible = "gpio-leds";
> >> +
> >> +               status {
> >> +                       function = LED_FUNCTION_STATUS;
> >> +                       color = <LED_COLOR_ID_BLUE>;
> >> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
> >> +               };
> >> +       };
> >>  };
> >> --
> >> 2.17.5
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> >> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
index 302e24be0a31..55bf4a0fc31c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
@@ -1,10 +1,21 @@ 
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 // Copyright (c) 2018 ARM Ltd.
 
+#include <dt-bindings/leds/common.h>
 #include "sun50i-a64-sopine-baseboard.dts"
 
 / {
 	model = "Pine64 LTS";
 	compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
 		     "allwinner,sun50i-a64";
+
+	leds {
+		compatible = "gpio-leds";
+
+		status {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+		};
+	};
 };