Skip to content

Commit 5a40efb

Browse files
frank-wAngeloGioacchino Del Regno
authored andcommitted
arm64: dts: mediatek: mt7988a-bpi-r4: add gpio leds
Bananapi R4 has a green and a blue led which can be switched by gpio. Green led is for running state so default on. Green led also shares pin with eeprom writeprotect where led off allows writing to eeprom. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20250706132213.20412-14-linux@fw-web.de [Angelo: Fixed missing dt-bindings/leds/common.h header inclusion] Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
1 parent bc51660 commit 5a40efb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/dts-v1/;
44

55
#include <dt-bindings/gpio/gpio.h>
6+
#include <dt-bindings/leds/common.h>
67
#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
78

89
#include "mt7988a.dtsi"
@@ -21,6 +22,25 @@
2122
status = "okay";
2223
};
2324

25+
gpio-leds {
26+
compatible = "gpio-leds";
27+
28+
led_green: led-green {
29+
function = LED_FUNCTION_STATUS;
30+
color = <LED_COLOR_ID_GREEN>;
31+
gpios = <&pio 79 GPIO_ACTIVE_HIGH>;
32+
default-state = "on";
33+
};
34+
35+
led_blue: led-blue {
36+
function = LED_FUNCTION_WPS;
37+
color = <LED_COLOR_ID_BLUE>;
38+
gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
39+
default-state = "off";
40+
};
41+
};
42+
43+
2444
reg_1p8v: regulator-1p8v {
2545
compatible = "regulator-fixed";
2646
regulator-name = "fixed-1.8V";

0 commit comments

Comments
 (0)