Devicetree
 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 0/2] leds: Add StarFive JHB100 heartbeat LED driver
Date: Fri,  4 Dec 2026 10:07:00 +0800	[thread overview]
Message-ID: <20261204020702.3787-1-lianfeng.ouyang@starfivetech.com> (raw)

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

The StarFive JHB100 SoC has a hardware heartbeat generator that drives a
single LED with a programmable pulse width and period. This series adds
the devicetree binding and the LED class driver for it.

The generator can only blink. Holding the LED permanently on is only
possible by muxing the pin to GPIO, which is outside of this block. The
driver therefore registers an LED with a maximum brightness of 1, where
1 runs the heartbeat with the last applied timing and 0 stops it, and
implements blink_set() with the hardware timing.

The hardware uses the programmed period only while it sees bus activity
from the CPUs, and a second, longer "abnormal" period otherwise. The
driver does not touch the abnormal period.

The JHB100 device tree and the clock/reset provider of this block are
not in mainline yet, so this series has no DTS change. The node will be
added together with the SoC device tree.

The series was tested on the JHB100 EVB1 board on top of mainline, with
the JHB100 device tree and the clock/reset support it needs added
locally, as those are not upstream yet. The timer trigger was exercised
with different delay_on/delay_off values, and the brightness was set to
0 and 1.

An AI coding assistant (Claude) was used to review the driver over
several rounds and to draft parts of the code and the changelogs. I have
reviewed and tested all of it and take responsibility for the result.

Lianfeng Ouyang (2):
  dt-bindings: leds: Add StarFive JHB100 heartbeat LED controller
  leds: Add StarFive JHB100 heartbeat LED driver

 .../bindings/leds/starfive,jhb100-leds.yaml   |  57 ++++
 MAINTAINERS                                   |   6 +
 drivers/leds/Kconfig                          |  12 +
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-starfive-jhb100.c           | 286 ++++++++++++++++++
 5 files changed, 362 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/starfive,jhb100-leds.yaml
 create mode 100644 drivers/leds/leds-starfive-jhb100.c

-- 
2.43.0


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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  2:07 lianfeng.ouyang [this message]
2026-12-04  2:07 ` [PATCH 1/2] dt-bindings: leds: Add StarFive JHB100 heartbeat LED controller lianfeng.ouyang
2026-12-04  2:07 ` [PATCH 2/2] leds: Add StarFive JHB100 heartbeat LED driver lianfeng.ouyang

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-1-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