]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
riscv: dts: spacemit: add LEDs for Milk-V Jupiter board
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 26 Mar 2026 18:35:29 +0000 (19:35 +0100)
committerYixun Lan <dlan@kernel.org>
Fri, 27 Mar 2026 02:17:28 +0000 (02:17 +0000)
The Milk-V Jupiter board provides support for two LEDs through the front
panel header. The "Power LED" indicates the system is running, and the
"HDD LED" shows disk activity. Configure the corresponding LED triggers
accordingly.

Caveats:
- The LEDs are driven through a 4.7k series resistor, making them
  quite faint.
- The disk activity trigger requires a storage controller on the M.2 or
  PCIe interface. That said, it matches the purpose and the vendor
  kernel.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://lore.kernel.org/r/20260326183745.1370642-2-aurelien@aurel32.net
Signed-off-by: Yixun Lan <dlan@kernel.org>
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts

index 9959c8023ece076b6b2fcfc0c844bc5dba23dcc5..3cd83c5924e4f9f768a892a7400938217e1b2198 100644 (file)
                stdout-path = "serial0";
        };
 
+       leds {
+               compatible = "gpio-leds";
+
+               led1 {
+                       label = "pwr-led";
+                       gpios = <&gpio K1_GPIO(96) GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-on";
+                       default-state = "on";
+               };
+
+               led2 {
+                       label = "hdd-led";
+                       gpios = <&gpio K1_GPIO(92) GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "disk-activity";
+               };
+       };
+
        reg_dc_in: regulator-dc-in-12v {
                compatible = "regulator-fixed";
                regulator-name = "dc_in_12v";