arm64: dts: freescale: sl28: enable LED support
authorMichael Walle <michael@walle.cc>
Mon, 14 Sep 2020 21:43:39 +0000 (23:43 +0200)
committerShawn Guo <shawnguo@kernel.org>
Tue, 22 Sep 2020 09:06:04 +0000 (17:06 +0800)
Now that we have support for GPIO lines of the SMARC connector, enable
LED support on the KBox A-230-LS. There are two LEDs without fixed
functions, one is yellow and one is green. Unfortunately, it is just one
multi-color LED, thus while it is possible to enable both at the same
time it is hard to tell the difference between "yellow only" and "yellow
and green".

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dts

index 4b4cc6a1573d340d9cc665fc6934eee517c62540..d66d8b2c3d1ac9709daca9c558bed0322e6f8ccb 100644 (file)
 
 /dts-v1/;
 #include "fsl-ls1028a-kontron-sl28-var4.dts"
+#include <dt-bindings/leds/common.h>
 
 / {
        model = "Kontron KBox A-230-LS";
        compatible = "kontron,kbox-a-230-ls", "kontron,sl28-var4",
                     "kontron,sl28", "fsl,ls1028a";
+
+       leds {
+               compatible = "gpio-leds";
+
+               alarm-led {
+                       function = LED_FUNCTION_ALARM;
+                       color = <LED_COLOR_ID_YELLOW>;
+                       gpios = <&sl28cpld_gpio0 0 GPIO_ACTIVE_HIGH>;
+               };
+
+               power-led {
+                       linux,default-trigger = "default-on";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&sl28cpld_gpio1 3 GPIO_ACTIVE_HIGH>;
+               };
+       };
 };
 
 &enetc_mdio_pf3 {