rtc: Add StarFive JH7110 RTC support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 0 repliesNew
- v24 patches 6 repliesSuperseded
- v13 patches 2 repliesSuperseded
Changes in v3 from the cover letter
- dt-bindings: add Conor's Acked-by
- driver: add my copyright line; drop the extra space before the register bit field defines (as requested by E Shattow)
- dts: rename the node label from rtc to soc_rtc, leaving rtc free for a carrier board's RTC (as requested by E Shattow)
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | dt-bindings: rtc: Add StarFive JH7110 RTCDocumentation/ | +85 | 0 replies | |
| 2/4 | rtc: Add StarFive JH7110 RTC driverdrivers/ drivers/ drivers/ | +336 | 0 replies | |
| 3/4 | MAINTAINERS: Add entry for the StarFive JH7110 RTC driverMAINTAINERS | +7 | 0 replies | |
| 4/4 | riscv: dts: starfive: jh7110: Add the RTC nodearch/ | +14 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Conor Dooley |
|---|---|
| 1/4 | A-b |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/4] rtc: Add StarFive JH7110 RTC support
The JH7110 has an RTC in its always-on domain that mainline does not support. This series adds a binding, a driver, a MAINTAINERS entry and the SoC DT node.
The driver is based on the StarFive vendor driver (rtc-starfive.c, commit ebac2b5 in the StarFive 6.12 tree), reworked for mainline:
- hardware calibration and the default time set in probe are dropped
- wakeup uses the generic wake IRQ helpers instead of the irq_desc hack
- set_time waits for the counter to load the new time
- read_time re-reads if the time rolls over between TIME and DATE
- the offset rounds to the nearest step and follows the sysfs sign convention (positive = slower)
- the 32.768 kHz counter clock is described in the binding and enabled
Thanks to ziv.xu and Hal Feng at StarFive for the original driver.
Tested on a VisionFive 2 v1.3B with next-20261105 and v7.3.1: setting and reading the time across the 2000-2099 range (out-of-range years refused), leap day and century rollover, the alarm interrupt with cancel, the offset, the rate over 60 s, and setting the system clock at boot. Not tested: suspend wakeup, drift over hours, and keeping time across a power-off, as the board has no RTC battery connector.
Known behaviour: the RTC loses about the length of a reboot across a warm reboot; the counter appears to stop during reset. After the StarFive vendor kernel the first boot found an invalid time. I would appreciate an opinion on whether this is expected of the hardware or something the driver should handle.
Changes in v3:
- dt-bindings: add Conor's Acked-by
- driver: add my copyright line; drop the extra space before the register bit field defines (as requested by E Shattow)
- dts: rename the node label from rtc to soc_rtc, leaving rtc free for a carrier board's RTC (as requested by E Shattow)
Changes in v2:
- dt-bindings: list myself as maintainer instead of the RTC subsystem maintainer (as requested by Conor)
- MAINTAINERS: new patch adding an entry for the driver & binding
- driver: drop the <linux/mod_devicetable.h> include (as requested by Uwe)
v1: https://lore.kernel.org/r/[email protected]
v2: https://lore.kernel.org/r/[email protected]
Owen O'Hehir (3):
dt-bindings: rtc: Add StarFive JH7110 RTC
MAINTAINERS: Add entry for the StarFive JH7110 RTC driver
riscv: dts: starfive: jh7110: Add the RTC node
ziv.xu (1):
rtc: Add StarFive JH7110 RTC driver
.../bindings/rtc/starfive,jh7110-rtc.yaml | 85 +++++ MAINTAINERS | 7 + arch/riscv/boot/dts/starfive/jh7110.dtsi | 14 + drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-jh7110.c | 324 ++++++++++++++++++ 6 files changed, 442 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/starfive,jh7110-rtc.yaml create mode 100644 drivers/rtc/rtc-jh7110.c
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
Signature · 1 line
2.43.0