[PATCH v2 0/4] Add driver for NXP PCF8525 RTC

From: Shiv Prakash Gupta

Date: Mon Aug 24 2026 - 02:55:49 EST


The PCF8525 is an NXP I2C real-time clock with integrated crystal
oscillator, dual timestamp capture inputs, backup battery switch-over,
a windowed watchdog, and an on-chip temperature sensor.

This series adds:
- DT binding (YAML schema)
- Core RTC driver: timekeeping, alarms, dual timestamps, crystal
configuration, backup switch-over, and clock offset correction
- Watchdog support via the Linux watchdog framework
- Temperature sensor support via the hwmon framework

Changes in v2:
- Fix include: use <linux/pm_wakeirq.h> instead of <pm_wakeup.h>
- Add spinlock_t ts_lock to protect ts[]/ts_valid[] from IRQ/sysfs race
- Fix W0C ordering: clear AF/TSF flags before acting on alarm/timestamp
events
- Use dev_pm_set_wake_irq() for suspend wakeup wiring
- Clear stale WDTF before unmasking watchdog interrupt on INTB to prevent
boot loop when battery-backed flag persists across resets
- Add watchdog_notify_pretimeout() call in INTB IRQ handler
- Set WDOG_HW_RUNNING if bootloader left watchdog running at probe time
- Register hwmon device first, then enable PCF8525_CTRL5_TEMP_RD_EN only
after successful registration

Shiv Prakash Gupta (4):
dt-bindings: rtc: Add NXP PCF8525 RTC
rtc: pcf8525: Add NXP PCF8525 RTC driver
rtc: pcf8525: Add watchdog support
rtc: pcf8525: Add temperature sensor support via hwmon

.../devicetree/bindings/rtc/nxp,pcf8525.yaml | 86 +
drivers/rtc/Kconfig | 26 +
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-pcf8525.c | 1422 +++++++++++++++++
4 files changed, 1535 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml
create mode 100644 drivers/rtc/rtc-pcf8525.c

--
2.34.1