Message ID | 20241030110120.332802-1-claudiu.beznea.uj@bp.renesas.com (mailing list archive) |
---|---|
Headers | show |
Series | Add RTC support for the Renesas RZ/G3S SoC | expand |
Hi Mike, Stephen, Alexander, On Wed, Oct 30, 2024 at 12:01 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > On the Renesas RZ/G3S SoC the RTC clock is provided by the VBATTB > IP. A 32 KHz crystall oscillator could be connected to the VBATTB > input pins. The logic to control this clock (and pass it to RTC) > is inside the VBATTB IP. For this, the clk-vbattb driver was added > (patches 01-03/12). > > Patches: > - 01-03/10: add VBATTB support that provides the RTC clock > - 04-05/10: add the RTC driver > - 06-09/10: update the device trees with proper nodes to enable RTC > - 10/10: enable proper config flags for RTC to work on RZ/G3S SoC > > Merge strategy, if any: > - clock patches (01-03/10) need to go though the same tree because of > patch 03/10 using the devm_clk_hw_register_gate_parent_hw() introduced > in patch 02/12 Once Mike/Stephen are happy with 02, I can queue patches 01-03 in renesas-clk. > - RTC patches (04-05/10) can go though RTC tree > - DTS and defconfig patches can go though Renesas tree Patches 06 and 08 I can queue in renesas-devel soon. For 07 and 09, I am waiting for feedback from Alexandre on the RTC DT bindings. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
On 30/10/2024 16:50:43+0100, Geert Uytterhoeven wrote: > Hi Mike, Stephen, Alexander, > > On Wed, Oct 30, 2024 at 12:01 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: > > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > On the Renesas RZ/G3S SoC the RTC clock is provided by the VBATTB > > IP. A 32 KHz crystall oscillator could be connected to the VBATTB > > input pins. The logic to control this clock (and pass it to RTC) > > is inside the VBATTB IP. For this, the clk-vbattb driver was added > > (patches 01-03/12). > > > > Patches: > > - 01-03/10: add VBATTB support that provides the RTC clock > > - 04-05/10: add the RTC driver > > - 06-09/10: update the device trees with proper nodes to enable RTC > > - 10/10: enable proper config flags for RTC to work on RZ/G3S SoC > > > > Merge strategy, if any: > > - clock patches (01-03/10) need to go though the same tree because of > > patch 03/10 using the devm_clk_hw_register_gate_parent_hw() introduced > > in patch 02/12 > > Once Mike/Stephen are happy with 02, I can queue patches 01-03 in > renesas-clk. > > > - RTC patches (04-05/10) can go though RTC tree > > - DTS and defconfig patches can go though Renesas tree > > Patches 06 and 08 I can queue in renesas-devel soon. > For 07 and 09, I am waiting for feedback from Alexandre on the RTC > DT bindings. I'll take 4 and 5 this cycle. > > Thanks! > > Gr{oetje,eeting}s, > > Geert > > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
On Wed, 30 Oct 2024 13:01:10 +0200, Claudiu wrote: > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > Hi, > > On the Renesas RZ/G3S SoC the RTC clock is provided by the VBATTB > IP. A 32 KHz crystall oscillator could be connected to the VBATTB > input pins. The logic to control this clock (and pass it to RTC) > is inside the VBATTB IP. For this, the clk-vbattb driver was added > (patches 01-03/12). > > [...] Applied, thanks! [04/10] dt-bindings: rtc: renesas,rzg3s-rtc: Document the Renesas RTCA-3 IP https://git.kernel.org/abelloni/c/71c61a45c951 [05/10] rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC https://git.kernel.org/abelloni/c/d4488377609e Best regards,
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Hi, On the Renesas RZ/G3S SoC the RTC clock is provided by the VBATTB IP. A 32 KHz crystall oscillator could be connected to the VBATTB input pins. The logic to control this clock (and pass it to RTC) is inside the VBATTB IP. For this, the clk-vbattb driver was added (patches 01-03/12). Patches: - 01-03/10: add VBATTB support that provides the RTC clock - 04-05/10: add the RTC driver - 06-09/10: update the device trees with proper nodes to enable RTC - 10/10: enable proper config flags for RTC to work on RZ/G3S SoC Merge strategy, if any: - clock patches (01-03/10) need to go though the same tree because of patch 03/10 using the devm_clk_hw_register_gate_parent_hw() introduced in patch 02/12 - RTC patches (04-05/10) can go though RTC tree - DTS and defconfig patches can go though Renesas tree Thank you, Claudiu Beznea Changes in v5: - dropped patches already applied - fixed build on rtc yaml file - fixed indentation in patch 01/10 description - collected tags - per patch changes are listed in individual patches Changes in v4: - added patches "dt-bindings: clock: r9a08g045-cpg: Add power domain ID for RTC" "clk: renesas: r9a08g045: Add power domain for RTC" - squashed the following patches from v3: "Add clock IDs for the VBATTB controller" "dt-bindings: clock: renesas,r9a08g045-vbattb: Document VBATTB" - fixed typos in commit description - moved assigned-clocks, assigned-clock-parents from the RTC documentation to the VBATTB documentation; same adjustment has been done on the device tree patches - renamed include/dt-bindings/clock/r9a08g045-vbattb.h to include/dt-bindings/clock/renesas,r9a08g045-vbattb.h - used quartz-load-femtofarads - used RTC_TIMESTAMP_BEGIN_2000 and RTC_TIMESTAMP_BEGIN_2099 in the RTC driver and added a comment in remove API to mention RTC cannot power on the system - squashed defconfig patches - collected tags - per patch changes are listed in individual patches Changes in v3: - dropped patches "mfd: renesas-vbattb: Add a MFD driver for the Renesas VBATTB IP" - added patches: -- dt-bindings: clock: r9a08g045-vbattb: Add clock IDs for the VBATTB controller -- clk: linux/clk-provider.h: Add devm_clk_hw_register_gate_parent_hw() - moved Documentation/devicetree/bindings/mfd/renesas,r9a08g045-vbattb.yaml to Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.yaml - addressed review comments - per patch changes are listed in individual patches Changes in v2: - dropped patch "clk: renesas: r9a08g045: Add clock, reset and power domain support for the VBATTB IP" as it was already integrated - kept only a documentation file for both VBATT MFD and clock drivers as suggested - addressed review comments - used cleanup.h lock helpers - update startup sequence for the RTC driver - switch to 24 hours mode on the RTC driver - fixed range for the RTC driver - added a generic compatible for the RTC driver as this will also be used by RZ/V2H - used clkin/xin clock names for the VBATTB clock driver to determine if bypass should be configured on registers instead of having dedicated DT property - added mfd driver for VBATTB - updated Kconfig flag names to include vendor name - removed DT node labels from Documentation files - used items to describe the interrupts and clocks Claudiu Beznea (10): dt-bindings: clock: renesas,r9a08g045-vbattb: Document VBATTB clk: linux/clk-provider.h: Add devm_clk_hw_register_gate_parent_hw() clk: renesas: clk-vbattb: Add VBATTB clock driver dt-bindings: rtc: renesas,rzg3s-rtc: Document the Renesas RTCA-3 IP rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC arm64: dts: renesas: r9a08g045: Add VBATTB node arm64: dts: renesas: r9a08g045: Add RTC node arm64: dts: renesas: rzg3s-smarc-som: Enable VBATTB arm64: dts: renesas: rzg3s-smarc-som: Enable RTC arm64: defconfig: Enable VBATTB clock and Renesas RTCA-3 flags .../clock/renesas,r9a08g045-vbattb.yaml | 84 ++ .../bindings/rtc/renesas,rz-rtca3.yaml | 84 ++ MAINTAINERS | 8 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 34 + .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 16 + arch/arm64/configs/defconfig | 2 + drivers/clk/renesas/Kconfig | 4 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/clk-vbattb.c | 205 ++++ drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-renesas-rtca3.c | 899 ++++++++++++++++++ .../clock/renesas,r9a08g045-vbattb.h | 13 + include/linux/clk-provider.h | 18 + 14 files changed, 1379 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.yaml create mode 100644 Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml create mode 100644 drivers/clk/renesas/clk-vbattb.c create mode 100644 drivers/rtc/rtc-renesas-rtca3.c create mode 100644 include/dt-bindings/clock/renesas,r9a08g045-vbattb.h