[PATCH v17 0/9] clk: realtek: Add RTD1625 clock support
From: Yu-Chun Lin
Date: Mon Nov 23 2026 - 21:37:55 EST
Hello,
This patch series adds the clock controller support for Realtek's
RTD1625 SoC platform.
Because the reset controllers share the same register space with the
clock controllers on this platform, we utilize the Auxiliary Bus framework
to decouple them. The clock controllers act as the primary devices,
registering the reset controllers as auxiliary devices.
The series includes:
1. Device Tree Bindings:
- Add bindings for the Realtek RTD1625 Clock & Reset Controllers.
2. Clock Subsystem Infrastructure:
- Introduce a common probe, and add support for basic clocks including
PLLs, gate clocks, mux clocks, and MMC-tuned PLLs.
3. Clock Platform Drivers:
- Add the clock controller drivers for RTD1625-CRT and RTD1625-ISO.
- These drivers provide the clock sources and instantiate the
corresponding auxiliary reset devices.
Best regards,
Yu-Chun Lin
---
Changes in v17:
Patch 1 (dt-binding):
- Move the 'clocks' and 'clock-names' item descriptions to the top level, and
keep only the item counts in the if/else branches.
Patch 2:
- Make the "Realtek Clock Common" Kconfig symbol a bare tristate and drop its
prompt and help text.
- Change the type of aux_name from 'char *' to 'const char *'.
Patch 3 (PLL):
- Move the power-on sequence from '.enable()' to '.prepare()', and use
'regmap_read_poll_timeout()' instead of the atomic variant: 'wait_freq_ready()'
can take up to 500 us, which is too long to busy-wait in atomic context.
- Drop the spinlock now that '.prepare()', '.unprepare()' and '.set_rate()'
are all serialized by 'prepare_lock'.
- Turn 'ftbl_find_closest_by_rate()' into a macro so that tables other than
'struct rtk_freq_table' can use it.
Patch 4 (GATE):
- Return 0 instead of the error code from '.is_enabled()'.
Patch 6 (MMC PLL):
- Reuse the 'ftbl_find_closest_by_rate()' macro and drop the local duplicate.
- Make 'rate_tbl' optional and add a built-in default table, which also covers
the SPI-NAND operating point at 99,999,206 Hz.
- Add an 'ssc' flag to 'struct rtk_clk_pll_mmc_rate', so that the SSC analog
registers are left untouched in SPI-NAND mode.
- Replace 'shift' with 'phsel_mask' in 'struct rtk_clk_pll_mmc_phase', and use
'field_prep()'/'field_get()'.
- '.recalc_rate()' always computes the rate from the dividers instead of
reverse-matching the rate table.
Patch 7 (CRT):
Add '.suppress_bind_attrs = true'
v16: https://lore.kernel.org/lkml/20261112052544.555563-1-eleanor.lin@xxxxxxxxxxx/
v15: https://lore.kernel.org/lkml/20261002074331.3066919-1-eleanor.lin@xxxxxxxxxxx/
v14: https://lore.kernel.org/lkml/20260901072446.2563145-1-eleanor.lin@xxxxxxxxxxx/
v13: https://lore.kernel.org/lkml/20260812020009.3480538-1-eleanor.lin@xxxxxxxxxxx/
v12: https://lore.kernel.org/lkml/20260804163807.1285869-1-eleanor.lin@xxxxxxxxxxx/
v11: https://lore.kernel.org/lkml/20260728142806.1954638-1-eleanor.lin@xxxxxxxxxxx/
v10: https://lore.kernel.org/lkml/20260713155630.3054636-1-eleanor.lin@xxxxxxxxxxx/
v9: https://lore.kernel.org/lkml/20260624112940.3475605-1-eleanor.lin@xxxxxxxxxxx/
v8: https://lore.kernel.org/lkml/20260610080824.255063-1-eleanor.lin@xxxxxxxxxxx/
v7: https://lore.kernel.org/lkml/20260508111641.3192177-1-eleanor.lin@xxxxxxxxxxx/
v6: https://lore.kernel.org/lkml/20260402073957.2742459-1-eleanor.lin@xxxxxxxxxxx/
v5: https://lore.kernel.org/lkml/20260324025332.3416977-1-eleanor.lin@xxxxxxxxxxx/
v4: https://lore.kernel.org/lkml/20260313081100.596224-1-eleanor.lin@xxxxxxxxxxx/
v3: https://lore.kernel.org/lkml/20260122110857.12995-1-eleanor.lin@xxxxxxxxxxx/
v2: https://lore.kernel.org/lkml/20260113112333.821-1-eleanor.lin@xxxxxxxxxxx/
v1: https://lore.kernel.org/lkml/20251229075313.27254-1-eleanor.lin@xxxxxxxxxxx/
Cheng-Yu Lee (7):
clk: realtek: Introduce common probe()
clk: realtek: Add support for phase locked loops (PLLs)
clk: realtek: Add support for gate clock
clk: realtek: Add support for mux clock
clk: realtek: Add support for MMC-tuned PLL clocks
clk: realtek: Add RTD1625-CRT clock controller driver
clk: realtek: Add RTD1625-ISO clock controller driver
Yu-Chun Lin (2):
dt-bindings: clock: Add Realtek RTD1625 Clock & Reset Controller
arm64: dts: realtek: Add clock support for RTD1625
.../bindings/clock/realtek,rtd1625-clk.yaml | 93 ++
MAINTAINERS | 7 +
arch/arm64/boot/dts/realtek/kent.dtsi | 41 +
drivers/clk/Kconfig | 1 +
drivers/clk/Makefile | 1 +
drivers/clk/realtek/Kconfig | 39 +
drivers/clk/realtek/Makefile | 12 +
drivers/clk/realtek/clk-regmap-gate.c | 59 ++
drivers/clk/realtek/clk-regmap-gate.h | 54 ++
drivers/clk/realtek/clk-regmap-mux.c | 40 +
drivers/clk/realtek/clk-regmap-mux.h | 42 +
drivers/clk/realtek/clk-regmap-pll-mmc.c | 443 +++++++++
drivers/clk/realtek/clk-regmap-pll-mmc.h | 69 ++
drivers/clk/realtek/clk-regmap-pll.c | 177 ++++
drivers/clk/realtek/clk-regmap-pll.h | 44 +
drivers/clk/realtek/clk-rtd1625-crt.c | 859 ++++++++++++++++++
drivers/clk/realtek/clk-rtd1625-iso.c | 140 +++
drivers/clk/realtek/clk-rtk-common.c | 84 ++
drivers/clk/realtek/clk-rtk-common.h | 37 +
drivers/clk/realtek/freq_table.c | 39 +
drivers/clk/realtek/freq_table.h | 45 +
.../dt-bindings/clock/realtek,rtd1625-clk.h | 166 ++++
22 files changed, 2492 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/realtek,rtd1625-clk.yaml
create mode 100644 drivers/clk/realtek/Kconfig
create mode 100644 drivers/clk/realtek/Makefile
create mode 100644 drivers/clk/realtek/clk-regmap-gate.c
create mode 100644 drivers/clk/realtek/clk-regmap-gate.h
create mode 100644 drivers/clk/realtek/clk-regmap-mux.c
create mode 100644 drivers/clk/realtek/clk-regmap-mux.h
create mode 100644 drivers/clk/realtek/clk-regmap-pll-mmc.c
create mode 100644 drivers/clk/realtek/clk-regmap-pll-mmc.h
create mode 100644 drivers/clk/realtek/clk-regmap-pll.c
create mode 100644 drivers/clk/realtek/clk-regmap-pll.h
create mode 100644 drivers/clk/realtek/clk-rtd1625-crt.c
create mode 100644 drivers/clk/realtek/clk-rtd1625-iso.c
create mode 100644 drivers/clk/realtek/clk-rtk-common.c
create mode 100644 drivers/clk/realtek/clk-rtk-common.h
create mode 100644 drivers/clk/realtek/freq_table.c
create mode 100644 drivers/clk/realtek/freq_table.h
create mode 100644 include/dt-bindings/clock/realtek,rtd1625-clk.h
--
2.43.0