]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: add PWM LED support
authorNick Xie <nick@khadas.com>
Sat, 28 Feb 2026 06:37:49 +0000 (14:37 +0800)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 21 Apr 2026 13:55:20 +0000 (15:55 +0200)
The Khadas VIM1S board features a white LED connected to the PWM_G
controller (PWM channel 0).

Enable the PWM_G controller and add the pwm-leds node to support
using this LED as a heartbeat indicator.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260228063750.701887-4-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts

index d36533f5559a8cfd29d3f87da2584acba7af4207..0bd738c1e786221b3dd95995776023e878b36dea 100644 (file)
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "meson-s4.dtsi"
+#include <dt-bindings/leds/common.h>
 
 / {
        model = "Khadas VIM1S";
                reset-gpios = <&gpio GPIOB_9 GPIO_ACTIVE_LOW>;
        };
 
+       pwm-leds {
+               compatible = "pwm-leds";
+
+               led-1 {
+                       color = <LED_COLOR_ID_WHITE>;
+                       function = LED_FUNCTION_STATUS;
+                       linux,default-trigger = "heartbeat";
+                       max-brightness = <255>;
+                       pwms = <&pwm_gh 0 30040 0>;
+               };
+       };
+
        sdio_32k: sdio-32k {
                compatible = "pwm-clock";
                #clock-cells = <0>;
        pinctrl-names = "default";
 };
 
+&pwm_gh {
+       status = "okay";
+       pinctrl-0 = <&pwm_g_pins1>;
+       pinctrl-names = "default";
+};
+
 &pwm_ij {
        status = "okay";
 };