Skip to contentSkip to conversation

Add support for two RTCs

PATCH Superseded Michael Walle 2 participants 6 messages Nov 14, 2025 – Nov 17, 2025 Real time clock (RTC)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

Michael Walle (2):
drivers: rtc: add PCF85063 support
drivers: rtc: add RV3032 support

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

PATCH 1/2 drivers: rtc: add PCF85063 support

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 ed903999f06..2336f2e57c9 100644
@@ -161,6 +161,14 @@ config RTC_MAX313XX
 	  - Temperature sensor
 	  - CLKOUT generation
 
+config RTC_PCF85063
+	tristate "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
 	tristate "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
#2 lore raw

Re: [PATCH 1/2] drivers: rtc: add PCF85063 support

Quoted 17 lines · 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 +0 -0
index ed903999f06..2336f2e57c9 100644

drivers/rtc/Kconfig config RTC_MAX313XX · line 165

Quoted 5 lines
drivers/rtc/Kconfig +2 -0
@@ -161,6 +161,14 @@ config RTC_MAX313XX
 	  - Temperature sensor
 	  - CLKOUT generation
 
+config RTC_PCF85063
+	tristate "Enable PCF85063 driver"

tristate is wrong for U-Boot, only bool is meaningful (and I need to go update checkpatch.pl to complain about this). This is I assume otherwise checkpatch warning free and compiles on sandbox?

Signature · 1 line
Tom
#3 lore raw

Re: [PATCH 1/2] drivers: rtc: add PCF85063 support

Quoted 5 lines

drivers/rtc/Kconfig config RTC_MAX313XX · line 165

Quoted 2 lines
drivers/rtc/Kconfig +2 -0
+config RTC_PCF85063
+	tristate "Enable PCF85063 driver"

tristate is wrong for U-Boot, only bool is meaningful (and I need to go update checkpatch.pl to complain about this).

Yeah, sorry, This was a copy and paste error from the very next config entry. I'll fix it in v2 and add a patch to convert the existing tristate to bool.

Quoted 2 lines

This is I assume otherwise
checkpatch warning free and compiles on sandbox?

Yeah, except for the missing maintainers entry.

-michael

#4 lore raw

Re: [PATCH 1/2] drivers: rtc: add PCF85063 support

Quoted 6 lines · Michael Walle
Quoted 5 lines

drivers/rtc/Kconfig config RTC_MAX313XX · line 165

Quoted 2 lines
drivers/rtc/Kconfig +2 -0
+config RTC_PCF85063
+	tristate "Enable PCF85063 driver"

tristate is wrong for U-Boot, only bool is meaningful (and I need to go update checkpatch.pl to complain about this).

Quoted 8 lines

Yeah, sorry, This was a copy and paste error from the very next config entry. I'll fix it in v2 and add a patch to convert the existing tristate to bool.

Quoted 2 lines

This is I assume otherwise
checkpatch warning free and compiles on sandbox?

Yeah, except for the missing maintainers entry.

OK, thanks!

Signature · 1 line
Tom
#5 lore raw

PATCH 2/2 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 2336f2e57c9..c6c6a02221a 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