[PATCH 15/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable leds
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Thu Oct 16 04:28:49 PDT 2025
Il 16/10/25 12:08, Sjoerd Simons ha scritto:
> 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 at 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 {
Please keep the nodes ordered by name.
Cheers,
Angelo
> + 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";
> + };
> + };
> };
>
> ð {
> @@ -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>;
>
More information about the linux-phy
mailing list