Skip to contentSkip to conversation

Add support for two RTCs

PATCH In review Michael Walle 2 participants 6 messages Nov 17, 2025 – Nov 30, 2025 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for two RTCs

I'll soon post support for the Kontron SMARC-sAM67 u-boot support. I'm still waiting for the linux device trees to be merged (in -next right now) and then to be synced to the u-boot tree. That board features two different RTCs and this will already support for these.

You can find the device tree at [1]. RTC nodes are in the overlays, though there is none for the RV3032 at the moment.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-am67a-kontron-sa67-base.dts

v2:
- new patch to convert existing tristate to bool
- use bool instead of tristate in the pcf85063 patch

Michael Walle (3):
drivers: rtc: convert tristate to bool
drivers: rtc: add PCF85063 support
drivers: rtc: add RV3032 support

 drivers/rtc/Kconfig    |  17 +++++-
 drivers/rtc/Makefile   |   2 +
 drivers/rtc/pcf85063.c | 107 ++++++++++++++++++++++++++++++++++++
 drivers/rtc/rv3032.c   | 121 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 246 insertions(+), 1 deletion(-)
 create mode 100644 drivers/rtc/pcf85063.c
 create mode 100644 drivers/rtc/rv3032.c
Signature · 1 line
2.47.3
#1 lore raw

PATCH v2 1/3 drivers: rtc: convert tristate to bool

As u-boot doesn't have any loadable modules, tristate doesn't make sense. Convert it to bool.

---
 drivers/rtc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/Kconfig +1 -1
index ed903999f06..202daa7bcd6 100644
@@ -162,7 +162,7 @@ config RTC_MAX313XX
 	  - CLKOUT generation
 
 config RTC_PCF8563
-	tristate "Philips PCF8563"
+	bool "Philips PCF8563"
 	help
 	  If you say yes here you get support for the Philips PCF8563 RTC
 	  and compatible chips.
Signature · 1 line
2.47.3
#3 lore raw

PATCH v2 2/3 drivers: rtc: add PCF85063 support

In reply to Michael Walle

Add support for the Microcrystal RV8263 and compatible RTCs. The driver's name was taken from linux. It should work with any NXP PCF85063 compatible RTCs. It was tested with a RV8263.

---
 drivers/rtc/Kconfig    |   8 +++
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/pcf85063.c | 107 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 116 insertions(+)
 create mode 100644 drivers/rtc/pcf85063.c
drivers/rtc/Kconfig +8 -0
index 202daa7bcd6..f8421e3bf58 100644
@@ -161,6 +161,14 @@ config RTC_MAX313XX
 	  - Temperature sensor
 	  - CLKOUT generation
 
+config RTC_PCF85063
+	bool "Enable PCF85063 driver"
+	depends on DM_I2C
+	depends on DM_RTC
+	help
+	  If you say yes here you get support for the NXP PCF85063 RTC
+	  and compatible chips.
+
 config RTC_PCF8563
 	bool "Philips PCF8563"
 	help
drivers/rtc/Makefile +1 -0
index a4ede413cd1..9d84aa836a1 100644
@@ -27,6 +27,7 @@ obj-$(CONFIG_RTC_MC146818) += mc146818.o
 obj-$(CONFIG_MCFRTC) += mcfrtc.o
 obj-$(CONFIG_RTC_MV) += mvrtc.o
 obj-$(CONFIG_RTC_MXS) += mxsrtc.o
+obj-$(CONFIG_RTC_PCF85063) += pcf85063.o
 obj-$(CONFIG_RTC_PCF8563) += pcf8563.o
 obj-$(CONFIG_RTC_PCF2127) += pcf2127.o
 obj-$(CONFIG_RTC_PL031) += pl031.o
drivers/rtc/pcf85063.c new file +107 -0

107 lines not on this page · raw message

Signature · 1 line
2.47.3
#4 lore raw

PATCH v2 3/3 drivers: rtc: add RV3032 support

In reply to Michael Walle

Add support for the Microcrystal RV3032 RTC.

---
 drivers/rtc/Kconfig  |   7 +++
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rv3032.c | 121 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 129 insertions(+)
 create mode 100644 drivers/rtc/rv3032.c
drivers/rtc/Kconfig +7 -0
index f8421e3bf58..ef1663f3450 100644
@@ -194,6 +194,13 @@ config RTC_RV3029
 	  This driver supports reading and writing the RTC/calendar and the
 	  battery-baced SRAM section.
 
+config RTC_RV3032
+	bool "Enable RV3032 driver"
+	depends on DM_RTC
+	help
+	  If you say yes here you get support for the Micro Crystal RV3032
+	  RTC.
+
 config RTC_RV8803
 	bool "Enable RV8803 driver"
 	depends on DM_RTC
drivers/rtc/Makefile +1 -0
index 9d84aa836a1..9df373d5148 100644
@@ -34,6 +34,7 @@ obj-$(CONFIG_RTC_PL031) += pl031.o
 obj-$(CONFIG_RTC_PT7C4338) += pt7c4338.o
 obj-$(CONFIG_RTC_RV3028) += rv3028.o
 obj-$(CONFIG_RTC_RV3029) += rv3029.o
+obj-$(CONFIG_RTC_RV3032) += rv3032.o
 obj-$(CONFIG_RTC_RV8803) += rv8803.o
 obj-$(CONFIG_RTC_RX8025) += rx8025.o
 obj-$(CONFIG_RTC_RX8010SJ) += rx8010sj.o
drivers/rtc/rv3032.c new file +121 -0

121 lines not on this page · raw message

Signature · 1 line
2.47.3
#5 lore raw
In reply to Michael Walle
Quoted 9 lines · Michael Walle

I'll soon post support for the Kontron SMARC-sAM67 u-boot support. I'm still waiting for the linux device trees to be merged (in -next right now) and then to be synced to the u-boot tree. That board features two different RTCs and this will already support for these.

You can find the device tree at [1]. RTC nodes are in the overlays, though there is none for the RV3032 at the moment.

[...]

Applied to u-boot/next, thanks!

[1/3] drivers: rtc: convert tristate to bool

      commit: aa2f8e35326276c81f94919b8173e386a6f6968f
[2/3] drivers: rtc: add PCF85063 support
      commit: 1c2a2253f7980355ecaec76e45a5901635f00621
[3/3] drivers: rtc: add RV3032 support
      commit: 788f2d3800e3d7e66a42aaffcb6cbc44390353d2
Signature · 1 line
Tom