[PATCH 0/2] leds: Add StarFive JHB100 heartbeat LED driver

From: lianfeng.ouyang

Date: Thu Dec 03 2026 - 21:07:30 EST


From: Lianfeng Ouyang <lianfeng.ouyang@xxxxxxxxxxxxxxxx>

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