arm64: dts: allwinner: Pine64-LTS: Add status LED
authorAndre Przywara <andre.przywara@arm.com>
Wed, 13 Jan 2021 15:26:25 +0000 (15:26 +0000)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 14 Jan 2021 11:49:45 +0000 (12:49 +0100)
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>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210113152630.28810-4-andre.przywara@arm.com
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts

index 302e24b..437ffe3 100644 (file)
@@ -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";
+
+               led {
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+               };
+       };
 };