Skip to content

Commit 05359be

Browse files
wensmripard
authored andcommitted
clk: sunxi-ng: Add driver for A83T CCU
The A83T clock control unit is a hybrid of some new style clock designs from the A80, and old style layout from the other Allwinner SoCs. Like the A80, the SoC does not have a low speed 32.768 kHz oscillator. Unlike the A80, there is no clock input either. The only low speed clock available is the internal oscillator which runs at around 16 MHz, divided by 512, yielding a low speed clock around 31.250 kHz. Also, the MMC2 module clock supports switching to a "new timing" mode. This mode divides the clock output by half, and disables the CCU based clock delays. The MMC controller must be configure to the same mode, and then use its internal clock delays. This driver does not support runtime switching of the timing modes. Instead, the new timing mode is enforced at probe time. Consumers can check which mode is active by trying to get the current phase delay of the MMC2 phase clocks, which will return -ENOTSUPP if the new timing mode is active. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
1 parent 13e0dde commit 05359be

File tree

6 files changed

+1236
-0
lines changed

6 files changed

+1236
-0
lines changed

drivers/clk/sunxi-ng/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ config SUN8I_A33_CCU
116116
default MACH_SUN8I
117117
depends on MACH_SUN8I || COMPILE_TEST
118118

119+
config SUN8I_A83T_CCU
120+
bool "Support for the Allwinner A83T CCU"
121+
select SUNXI_CCU_DIV
122+
select SUNXI_CCU_GATE
123+
select SUNXI_CCU_MP
124+
select SUNXI_CCU_MUX
125+
select SUNXI_CCU_NKMP
126+
select SUNXI_CCU_NM
127+
select SUNXI_CCU_PHASE
128+
default MACH_SUN8I
129+
119130
config SUN8I_H3_CCU
120131
bool "Support for the Allwinner H3 CCU"
121132
select SUNXI_CCU_DIV

drivers/clk/sunxi-ng/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
2323
obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
2424
obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
2525
obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
26+
obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
2627
obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
2728
obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
2829
obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o

0 commit comments

Comments
 (0)