Skip to content

Commit

Permalink
rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S…
Browse files Browse the repository at this point in the history
… SoC

The RTC IP (RTCA-3) available on the Renesas RZ/G3S SoC has calendar count
mode and binary count mode (selectable though RCR2.CNTMD) capabilities,
alarm capabilities, clock error correction capabilities. It can generate
alarm, period, carry interrupts.

Add a driver for RTCA-3 IP. The driver implements calendar count mode (as
the conversion b/w RTC and system time is simpler, done with bcd2bin(),
bin2bcd()), read and set time, read and set alarm, read and set
an offset.

Signed-off-by: Claudiu Beznea <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
claudiubeznea authored and alexandrebelloni committed Oct 31, 2024
1 parent 71c61a4 commit d448837
Show file tree
Hide file tree
Showing 4 changed files with 918 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -19721,6 +19721,14 @@ S: Supported
F: Documentation/devicetree/bindings/timer/renesas,rz-mtu3.yaml
F: drivers/counter/rz-mtu3-cnt.c

RENESAS RTCA-3 RTC DRIVER
M: Claudiu Beznea <[email protected]>
L: [email protected]
L: [email protected]
S: Supported
F: Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml
F: drivers/rtc/rtc-renesas-rtca3.c

RENESAS RZ/N1 A5PSW SWITCH DRIVER
M: Clément Léger <[email protected]>
L: [email protected]
Expand Down
10 changes: 10 additions & 0 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,16 @@ config RTC_DRV_MA35D1
This driver can also be built as a module, if so, the module
will be called "rtc-ma35d1".

config RTC_DRV_RENESAS_RTCA3
tristate "Renesas RTCA-3 RTC"
depends on ARCH_RENESAS
help
If you say yes here you get support for the Renesas RTCA-3 RTC
available on the Renesas RZ/G3S SoC.

This driver can also be built as a module, if so, the module
will be called "rtc-rtca3".

comment "HID Sensor RTC drivers"

config RTC_DRV_HID_SENSOR_TIME
Expand Down
1 change: 1 addition & 0 deletions drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ obj-$(CONFIG_RTC_DRV_RX8025) += rtc-rx8025.o
obj-$(CONFIG_RTC_DRV_RX8111) += rtc-rx8111.o
obj-$(CONFIG_RTC_DRV_RX8581) += rtc-rx8581.o
obj-$(CONFIG_RTC_DRV_RZN1) += rtc-rzn1.o
obj-$(CONFIG_RTC_DRV_RENESAS_RTCA3) += rtc-renesas-rtca3.o
obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o
obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
obj-$(CONFIG_RTC_DRV_S5M) += rtc-s5m.o
Expand Down
Loading

0 comments on commit d448837

Please sign in to comment.