Linux LED subsystem development
 help / color / mirror / Atom feed
From: "lianfeng.ouyang" <lianfeng.ouyang@starfivetech.com>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Griffin Kroah-Hartman <griffin@kroah.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>
Subject: [PATCH 1/2] dt-bindings: leds: Add StarFive JHB100 heartbeat LED controller
Date: Fri,  4 Dec 2026 10:07:01 +0800	[thread overview]
Message-ID: <20261204020702.3787-2-lianfeng.ouyang@starfivetech.com> (raw)
In-Reply-To: <20261204020702.3787-1-lianfeng.ouyang@starfivetech.com>

From: Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>

The StarFive JHB100 SoC has a hardware heartbeat generator that drives a
single LED. It outputs a pulse with a programmable width and period,
both derived from its input clock. While the CPUs show no bus activity,
it uses a second, longer period instead. The output can only blink, it
cannot be held permanently on.

The LED is described by the controller node itself, so reference
common.yaml to allow the standard LED properties such as "function",
"color" and "default-state".

Signed-off-by: Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>
---
 .../bindings/leds/starfive,jhb100-leds.yaml   | 57 +++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/starfive,jhb100-leds.yaml

diff --git a/Documentation/devicetree/bindings/leds/starfive,jhb100-leds.yaml b/Documentation/devicetree/bindings/leds/starfive,jhb100-leds.yaml
new file mode 100644
index 000000000000..7bc0f4da1e75
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/starfive,jhb100-leds.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/starfive,jhb100-leds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JHB100 Heartbeat LED Controller
+
+maintainers:
+  - Lianfeng Ouyang <lianfeng.ouyang@starfivetech.com>
+
+description:
+  Hardware heartbeat generator of the StarFive JHB100 SoC. It drives a
+  single LED with a programmable pulse width and period derived from its
+  clock. While the CPUs show no bus activity, the hardware uses a second,
+  longer period instead. The output can only blink, it cannot be held
+  permanently on, so a default-state of "on" starts the heartbeat.
+
+allOf:
+  - $ref: common.yaml#
+
+properties:
+  compatible:
+    const: starfive,jhb100-leds
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - resets
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    led@13215000 {
+      compatible = "starfive,jhb100-leds";
+      reg = <0x13215000 0xc>;
+      clocks = <&cpucrg 19>;
+      resets = <&cpucrg 6>;
+      color = <LED_COLOR_ID_GREEN>;
+      function = LED_FUNCTION_HEARTBEAT;
+      default-state = "on";
+    };
+
+...
-- 
2.43.0


  reply	other threads:[~2026-12-04  2:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  2:07 [PATCH 0/2] leds: Add StarFive JHB100 heartbeat LED driver lianfeng.ouyang
2026-12-04  2:07 ` lianfeng.ouyang [this message]
2026-12-04  2:07 ` [PATCH 2/2] " lianfeng.ouyang
2026-12-04  2:17 ` [PATCH 0/2] " sashiko-bot

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=20261204020702.3787-2-lianfeng.ouyang@starfivetech.com \
    --to=lianfeng.ouyang@starfivetech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=griffin@kroah.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pavel@kernel.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