mvebu: macchiatobin-singleshot: enable heartbeat LED
[openwrt/openwrt.git] / target / linux / mvebu / patches-5.4 / 028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch
1 From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001
2 From: Tomasz Maciej Nowak <tmn505@gmail.com>
3 Date: Tue, 10 Nov 2020 16:38:31 +0100
4 Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED
5
6 With board revision 1.3, SolidRun moved the power LED to the middle of
7 the board. In old place of power LED a GPIO controllable heartbeat LED
8 was added. This commit only touches Single Shot variant, since only this
9 variant is all revision 1.3.
10
11 Note:
12 This is slightly modified patch. Some boards could be placed in an
13 enclosure, so the LED18 is enabled by default, since that'll be the only
14 visible indicator that the board is operating.
15
16 Reported-by: Alexandra Alth <alexandra@alth.de>
17 Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
18 Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
19 ---
20 .../marvell/armada-8040-mcbin-singleshot.dts | 22 +++++++++++++++++++
21 1 file changed, 22 insertions(+)
22
23 --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
24 +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
25 @@ -5,6 +5,8 @@
26 * Device Tree file for MACCHIATOBin Armada 8040 community board platform
27 */
28
29 +#include <dt-bindings/leds/common.h>
30 +
31 #include "armada-8040-mcbin.dtsi"
32
33 / {
34 @@ -12,6 +14,20 @@
35 compatible = "marvell,armada8040-mcbin-singleshot",
36 "marvell,armada8040-mcbin", "marvell,armada8040",
37 "marvell,armada-ap806-quad", "marvell,armada-ap806";
38 +
39 + leds {
40 + compatible = "gpio-leds";
41 + pinctrl-0 = <&cp0_led18_pins>;
42 + pinctrl-names = "default";
43 +
44 + led18 {
45 + gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>;
46 + function = LED_FUNCTION_HEARTBEAT;
47 + color = <LED_COLOR_ID_GREEN>;
48 + linux,default-trigger = "heartbeat";
49 + default-state = "on";
50 + };
51 + };
52 };
53
54 &cp0_eth0 {
55 @@ -27,3 +43,10 @@
56 managed = "in-band-status";
57 sfp = <&sfp_eth1>;
58 };
59 +
60 +&cp0_pinctrl {
61 + cp0_led18_pins: led18-pins {
62 + marvell,pins = "mpp33";
63 + marvell,function = "gpio";
64 + };
65 +};