linux/drivers/clk/renesas
Claudiu Beznea 3b42450ce1 clk: renesas: vbattb: Add VBATTB clock driver
The VBATTB IP of the Renesas RZ/G3S SoC controls the clock that is used
by the RTC. The input to the VBATTB could be a 32KHz crystal
or an external clock device.

The HW block diagram for the clock generator is as follows:

           +----------+ XC   `\
RTXIN  --->|          |----->| \       +----+  VBATTCLK
           | 32K clock|      |  |----->|gate|----------->
           | osc      | XBYP |  |      +----+
RTXOUT --->|          |----->| /
           +----------+      ,

After discussions w/ Stephen Boyd the clock tree associated with this
hardware block was exported in Linux as:

vbattb-xtal
   xbyp
   xc
      mux
         vbattbclk

where:
- input-xtal is the input clock (connected to RTXIN, RTXOUT pins)
- xc, xbyp are mux inputs
- mux is the internal mux
- vbattclk is the gate clock that feeds in the end the RTC

to allow selecting the input of the MUX though assigned-clock DT
properties, using the already existing clock drivers and avoid adding
other DT properties. If the crystal is connected on RTXIN,
RTXOUT pins the XC will be selected as mux input. If an external clock
device is connected on RTXIN, RTXOUT pins the XBYP will be selected as
mux input.

The load capacitance of the internal crystal can be configured
with renesas,vbattb-load-nanofarads DT property.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/20241101095720.2247815-4-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2024-11-06 08:52:45 +01:00
..
clk-div6.c clk: renesas: div6: Implement range checking 2021-05-11 09:58:13 +02:00
clk-div6.h We have two changes to the core framework this time around. The first being a 2017-11-17 20:04:24 -08:00
clk-emev2.c clk: renesas: emev2: Remove obsolete clkdev registration 2023-07-27 14:32:41 +02:00
clk-mstp.c clk: Use of_property_present() 2024-08-02 16:53:38 -07:00
clk-r8a73a4.c clk: renesas: Remove duplicate and trailing empty lines 2024-10-01 09:13:38 +02:00
clk-r8a7740.c clk: renesas: shmobile: Remove unused CLK_ENABLE_ON_INIT 2024-04-25 10:38:19 +02:00
clk-r8a7778.c clk: renesas: Remove duplicate and trailing empty lines 2024-10-01 09:13:38 +02:00
clk-r8a7779.c clk: renesas: r8a7779: Remove struct r8a7779_cpg 2022-06-13 11:53:18 +02:00
clk-rz.c clk: renesas: rza1: Remove struct rz_cpg 2022-06-13 11:53:18 +02:00
clk-sh73a0.c clk: renesas: shmobile: Remove unused CLK_ENABLE_ON_INIT 2024-04-25 10:38:19 +02:00
clk-vbattb.c clk: renesas: vbattb: Add VBATTB clock driver 2024-11-06 08:52:45 +01:00
Kconfig clk: renesas: vbattb: Add VBATTB clock driver 2024-11-06 08:52:45 +01:00
Makefile clk: renesas: vbattb: Add VBATTB clock driver 2024-11-06 08:52:45 +01:00
r7s9210-cpg-mssr.c clk: renesas: cpg-mssr: Use enum clk_reg_layout instead of a boolean flag 2020-09-17 15:30:08 +02:00
r8a774a1-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r8a774b1-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r8a774c0-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r8a774e1-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r8a779a0-cpg-mssr.c clk: renesas: Remove duplicate and trailing empty lines 2024-10-01 09:13:38 +02:00
r8a779f0-cpg-mssr.c clk: renesas: rcar-gen4: Remove unused default PLL2/3/4/6 configs 2024-07-30 10:44:19 +02:00
r8a779g0-cpg-mssr.c clk: renesas: rcar-gen4: Remove unused default PLL2/3/4/6 configs 2024-07-30 10:44:19 +02:00
r8a779h0-cpg-mssr.c clk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks 2024-10-14 10:04:31 +02:00
r8a7742-cpg-mssr.c clk: renesas: r8a7742: Add clk entry for VSPR 2020-09-04 09:42:01 +02:00
r8a7743-cpg-mssr.c clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) 2020-09-04 09:42:01 +02:00
r8a7745-cpg-mssr.c clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) 2020-09-04 09:42:01 +02:00
r8a7790-cpg-mssr.c clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) 2020-09-04 09:42:01 +02:00
r8a7791-cpg-mssr.c clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) 2020-09-04 09:42:01 +02:00
r8a7792-cpg-mssr.c clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) 2020-09-04 09:42:01 +02:00
r8a7794-cpg-mssr.c clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) 2020-09-04 09:42:01 +02:00
r8a7795-cpg-mssr.c clk: renesas: r8a7795: Constify r8a7795_*_clks 2023-09-26 09:38:00 +02:00
r8a7796-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r8a77470-cpg-mssr.c clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) 2020-09-04 09:42:01 +02:00
r8a77965-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r8a77970-cpg-mssr.c clk: renesas: r8a77970: Use common cpg_lock 2024-06-07 14:09:34 +02:00
r8a77980-cpg-mssr.c clk: renesas: r8a77980: Add I2C5 clock 2023-03-30 16:44:04 +02:00
r8a77990-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r8a77995-cpg-mssr.c clk: renesas: rcar-gen3: Add ADG clocks 2023-08-15 11:34:43 +02:00
r9a06g032-clocks.c clk: renesas: r9a06g032: Name anonymous structs 2023-09-18 10:05:23 +02:00
r9a07g043-cpg.c clk: renesas: r9a07g043: Add LCDC clock and reset entries 2024-07-30 10:28:39 +02:00
r9a07g044-cpg.c clk: renesas: r9a07g044: Mark resets array as const 2024-03-26 09:30:44 +01:00
r9a08g045-cpg.c clk: renesas: r9a08g045: Add power domain for RTC 2024-10-25 11:08:16 +02:00
r9a09g011-cpg.c clk: renesas: Remove duplicate and trailing empty lines 2024-10-01 09:13:38 +02:00
r9a09g057-cpg.c clk: renesas: r9a09g057: Add clock and reset entries for ICU 2024-10-07 10:33:51 +02:00
rcar-cpg-lib.c clk: renesas: Remove duplicate and trailing empty lines 2024-10-01 09:13:38 +02:00
rcar-cpg-lib.h clk: renesas: rcar-gen3: Switch to new SD clock handling 2021-11-19 11:32:39 +01:00
rcar-gen2-cpg.c clk: renesas: rcar-gen2: Use DEFINE_SPINLOCK() for static spinlock 2024-06-07 14:10:15 +02:00
rcar-gen2-cpg.h clk: renesas: rcar-gen2: Change multipliers and dividers to u8 2019-12-10 10:24:10 +01:00
rcar-gen3-cpg.c clk: renesas: Remove duplicate and trailing empty lines 2024-10-01 09:13:38 +02:00
rcar-gen3-cpg.h clk: renesas: rcar-gen3: Add support for ZG clock 2023-07-10 09:31:29 +02:00
rcar-gen4-cpg.c clk: renesas: rcar-gen4: Remove unused fixed PLL clock types 2024-07-30 10:44:19 +02:00
rcar-gen4-cpg.h clk: renesas: rcar-gen4: Remove unused default PLL2/3/4/6 configs 2024-07-30 10:44:19 +02:00
rcar-usb2-clock-sel.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
renesas-cpg-mssr.c clk: renesas: Remove duplicate and trailing empty lines 2024-10-01 09:13:38 +02:00
renesas-cpg-mssr.h clk: renesas: cpg-mssr: Add support for R-Car V4M 2024-01-31 11:19:21 +01:00
rzg2l-cpg.c clk: renesas: rzg2l: Fix FOUTPOSTDIV clk 2024-11-03 11:48:39 +01:00
rzg2l-cpg.h clk: renesas: rzg2l-cpg: Use GENPD_FLAG_* flags instead of local ones 2024-10-25 11:00:33 +02:00
rzv2h-cpg.c clk: renesas: rzv2h: Add support for dynamic switching divider clocks 2024-09-02 10:15:38 +02:00
rzv2h-cpg.h clk: renesas: r9a09g057: Add CA55 core clocks 2024-10-07 10:32:56 +02:00