devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: FUKAUMI Naoki <naoki@milkv.io>
To: kernel@esmil.dk
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
	FUKAUMI Naoki <naoki@milkv.io>
Subject: [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars
Date: Thu, 13 Jun 2024 11:48:26 +0900	[thread overview]
Message-ID: <20240613024827.36512-2-naoki@milkv.io> (raw)
In-Reply-To: <20240613024827.36512-1-naoki@milkv.io>

Milk-V Mars has a green LED to show system load. This patch enables
a green LED as a heartbeat LED.

Signed-off-by: FUKAUMI Naoki <naoki@milkv.io>
---
 arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
index fa0eac78e0ba..4f4bbf64dbe4 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
@@ -4,11 +4,24 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include "jh7110-common.dtsi"
 
 / {
 	model = "Milk-V Mars";
 	compatible = "milkv,mars", "starfive,jh7110";
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			gpios = <&aongpio 3 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			linux,default-trigger = "heartbeat";
+			function = LED_FUNCTION_HEARTBEAT;
+		};
+	};
 };
 
 &gmac0 {
-- 
2.43.0


  reply	other threads:[~2024-06-13  2:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13  2:48 [PATCH 1/2] riscv: defconfig: enable "heartbeat" led trigger FUKAUMI Naoki
2024-06-13  2:48 ` FUKAUMI Naoki [this message]
2024-06-20 23:13   ` [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars Heinrich Schuchardt
2024-06-21  1:02     ` FUKAUMI Naoki
2024-06-23 23:09       ` FUKAUMI Naoki
2024-06-24  9:44         ` Emil Renner Berthing
2024-06-24 10:42           ` FUKAUMI Naoki
  -- strict thread matches above, loose matches on Subject: below --
2024-06-13  0:58 [PATCH 1/2] riscv: defconfig: enable "heartbeat" led trigger FUKAUMI Naoki
2024-06-13  0:58 ` [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars FUKAUMI Naoki
2024-06-17 10:30   ` Emil Renner Berthing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240613024827.36512-2-naoki@milkv.io \
    --to=naoki@milkv.io \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@esmil.dk \
    --cc=krzk+dt@kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).