Skip to content

Commit 598e4b6

Browse files
committed
clk: sunxi-ng: add support for the A523/T527 MCU CCU
The A523/T527 SoCs have a new MCU PRCM, which has more clocks and reset controls for the RISC-V MCU and other peripherals. There is a second audio PLL, but no bus clock dividers. The BSP driver uses the 24MHz main oscillator as the parent for all the bus clocks. But the diagram suggests busses from the other PRCM are used in this block as well. Add a driver to support this part. Unlike the BSP driver, the SoC's main MBUS clock is chosen as the parent for the MCU MBUS clock, and the latter then serves as the parent of the MCU DMA controller's MBUS clock. The bus gate clocks also use their respective bus clocks as parents according to the system bus tree diagram. In cases where a block does not appear in that diagram, an educated guess is made. Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://patch.msgid.link/20250911174710.3149589-6-wens@kernel.org Signed-off-by: Chen-Yu Tsai <wens@csie.org>
1 parent 44293ed commit 598e4b6

3 files changed

Lines changed: 476 additions & 0 deletions

File tree

drivers/clk/sunxi-ng/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ config SUN55I_A523_CCU
5757
default ARCH_SUNXI
5858
depends on ARM64 || COMPILE_TEST
5959

60+
config SUN55I_A523_MCU_CCU
61+
tristate "Support for the Allwinner A523/T527 MCU CCU"
62+
default ARCH_SUNXI
63+
depends on ARM64 || COMPILE_TEST
64+
6065
config SUN55I_A523_R_CCU
6166
tristate "Support for the Allwinner A523/T527 PRCM CCU"
6267
default ARCH_SUNXI

drivers/clk/sunxi-ng/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ obj-$(CONFIG_SUN50I_H6_CCU) += sun50i-h6-ccu.o
3434
obj-$(CONFIG_SUN50I_H6_R_CCU) += sun50i-h6-r-ccu.o
3535
obj-$(CONFIG_SUN50I_H616_CCU) += sun50i-h616-ccu.o
3636
obj-$(CONFIG_SUN55I_A523_CCU) += sun55i-a523-ccu.o
37+
obj-$(CONFIG_SUN55I_A523_MCU_CCU) += sun55i-a523-mcu-ccu.o
3738
obj-$(CONFIG_SUN55I_A523_R_CCU) += sun55i-a523-r-ccu.o
3839
obj-$(CONFIG_SUN4I_A10_CCU) += sun4i-a10-ccu.o
3940
obj-$(CONFIG_SUN5I_CCU) += sun5i-ccu.o
@@ -61,6 +62,7 @@ sun50i-h6-ccu-y += ccu-sun50i-h6.o
6162
sun50i-h6-r-ccu-y += ccu-sun50i-h6-r.o
6263
sun50i-h616-ccu-y += ccu-sun50i-h616.o
6364
sun55i-a523-ccu-y += ccu-sun55i-a523.o
65+
sun55i-a523-mcu-ccu-y += ccu-sun55i-a523-mcu.o
6466
sun55i-a523-r-ccu-y += ccu-sun55i-a523-r.o
6567
sun4i-a10-ccu-y += ccu-sun4i-a10.o
6668
sun5i-ccu-y += ccu-sun5i.o

0 commit comments

Comments
 (0)