Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] leds: Add StarFive JHB100 heartbeat LED driver
@ 2026-12-04  2:07 lianfeng.ouyang
  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
  0 siblings, 2 replies; 4+ messages in thread
From: lianfeng.ouyang @ 2026-12-04  2:07 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Griffin Kroah-Hartman,
	Krzysztof Kozlowski, Rob Herring, Conor Dooley, Philipp Zabel
  Cc: linux-leds, devicetree, linux-kernel, Lianfeng Ouyang

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-04  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  2:07 [PATCH 0/2] leds: Add StarFive JHB100 heartbeat LED driver lianfeng.ouyang
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
2026-12-04  8:28   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox