[PATCH v2 0/8] clk: sunxi-ng: Add support for Allwinner A733 CCU and PRCM
Junhui Liu
junhui.liu at pigmoral.tech
Sat Jul 11 01:10:26 PDT 2026
Add support for the main CCU and the PRCM module (R-CCU) found in the
Allwinner A733 SoC. The clock architecture of the A733 is an evolution
of the previous A523 design but introduces several significant changes.
One of the key changes is the introduction of a "pll-ref" clock that
normalizes the physical oscillator frequency (which can be 19.2MHz,
24MHz, or 26MHz) into a consistent 24MHz reference for the entire clock
tree. Additionally, while the A733 inherits many module clock structures
from the A523, the MCU_CCU has been removed, and the overall clock tree
has been expanded to support more new functional units.
Also update the sunxi-ng SDM (Sigma-Delta Modulation) helper to support
a new dual-pattern register design. On the A733, the SDM enable bit has
been moved from the main PLL register to a second pattern register
(PATTERN1). The driver is updated to handle this register layout to
ensure accurate frequency synthesis for "pll-audio0".
The parent clocks for several instances in the main CCU are difficult
to determine as the user manual provides limited information on their
specific clock sources. In these cases, the implementation follows
vendor practices and previous SoC designs, generally defaulting to
"hosc" where documentation is lacking. The bus clock gates in the PRCM
(R-CCU) are explicitly defined based on the Memory Map in the manual,
which clearly associates each module with its respective bus.
---
Changes in v2:
- Rework the clocks property in DT bindings to source hosc directly from
the oscillator to adapt to the new RTC binding
- Clean up the SDM dual-pattern helper macro and add the missing enable
parameter for pll-audio0
- Number single-instance clocks with 0, e.g. GPU0, VE_ENC0/VE_DEC0,
DRAM0, NAND0, GPADC0, THS0, etc
- Correct 8x PLL post-divider names to 12x for video and DE PLLs
(pll-videoX-12x, pll-de-12x)
- Drop gic, cpu-peri, nsi clocks
- Rename clocks: OWA -> SPDIF, USB_REF -> USB01_REF, HDMI_ESM -> HDCP_ESM,
PWMCTRL -> PWM
- Mark bus-dram0, ahb-store and mbus-store critical to avoid DMA, MMC and
SPI NOR failures when unused clocks are disabled
- Switch PRCM timer clocks to P-only helpers
- Fix bus gate bit positions for UARTs and correct the sysdap register
address
- Interleave bus clocks into function clocks
- Link to v1: https://lore.kernel.org/r/20260310-a733-clk-v1-0-36b4e9b24457@pigmoral.tech
---
Junhui Liu (8):
dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support
clk: sunxi-ng: sdm: Add dual patterns support
clk: sunxi-ng: a733: Add PRCM CCU
clk: sunxi-ng: a733: Add PLL clocks support
clk: sunxi-ng: a733: Add bus clocks support
clk: sunxi-ng: a733: Add mod clocks support
clk: sunxi-ng: a733: Add bus clock gates
clk: sunxi-ng: a733: Add reset lines
.../bindings/clock/allwinner,sun60i-a733-ccu.yaml | 107 +
drivers/clk/sunxi-ng/Kconfig | 10 +
drivers/clk/sunxi-ng/Makefile | 4 +
drivers/clk/sunxi-ng/ccu-sun60i-a733-r.c | 273 +++
drivers/clk/sunxi-ng/ccu-sun60i-a733.c | 2360 ++++++++++++++++++++
drivers/clk/sunxi-ng/ccu_sdm.c | 51 +-
drivers/clk/sunxi-ng/ccu_sdm.h | 29 +-
include/dt-bindings/clock/sun60i-a733-ccu.h | 290 +++
include/dt-bindings/clock/sun60i-a733-r-ccu.h | 39 +
include/dt-bindings/reset/sun60i-a733-ccu.h | 129 ++
include/dt-bindings/reset/sun60i-a733-r-ccu.h | 23 +
11 files changed, 3289 insertions(+), 26 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260202-a733-clk-0d4fc00a9f9c
Best regards,
--
Junhui Liu <junhui.liu at pigmoral.tech>
More information about the linux-riscv
mailing list