[PATCH 15/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable leds

Sjoerd Simons
2025-10-16T10:09:27Z

The Openwrt One has 3 status leds at the front (red, white, green) as
well as 2 software controlled leds for the LAN jack (amber, green).

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
---
.../boot/dts/mediatek/mt7981b-openwrt-one.dts | 57 ++++++++++++++++++++++
1 file changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
index 4d1653c336e71..0c0878488ae98 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
@@ -43,6 +43,50 @@ reg_5v: regulator-5v {
regulator-boot-on;
regulator-always-on;
};
+
+ pwm-leds {
+ compatible = "pwm-leds";
+
+ led-0 {
+ color = <LED_COLOR_ID_WHITE>;
+ default-brightness = <0>;
+ function = LED_FUNCTION_STATUS;
+ max-brightness = <255>;
+ pwms = <&pwm 0 10000>;
+ };
+
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ default-brightness = <0>;
+ function = LED_FUNCTION_STATUS;
+ max-brightness = <255>;
+ pwms = <&pwm 1 10000>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-1 {
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_LAN;
+ gpios = <&pio 34 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "netdev";
+ };
+
+ led-2 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "netdev";
+ };
+ };
};

&eth {
@@ -109,6 +153,13 @@ mux {
};
};

+ pwm_pins: pwm-pins {
+ mux {
+ function = "pwm";
+ groups = "pwm0_0", "pwm1_1";
+ };
+ };
+
spi2_flash_pins: spi2-pins {
mux {
function = "spi";
@@ -152,6 +203,12 @@ conf {
};
};

+&pwm {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_pins>;
+ status = "okay";
+};
+
&spi2 {
pinctrl-names = "default";
pinctrl-0 = <&spi2_flash_pins>;

--
2.51.0