diff options
author | Padmavathi Venna <padma.v@samsung.com> | 2015-01-13 06:27:42 -0500 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2015-01-15 09:18:51 -0500 |
commit | 9f930a39e135d370d17e7a1ab73ddebcfb896f98 (patch) | |
tree | 12340bca7d6811a19524f13f648fa3085e471fc8 /drivers/clk | |
parent | ee74b56ab2f72c088fc5a8ba3797ef6a452d692a (diff) |
clk: samsung: exynos7: add clocks for audio block
Add required clk support for I2S, PCM and SPDIF.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/samsung/clk-exynos7.c | 143 |
1 files changed, 141 insertions, 2 deletions
diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c index d40c09d580b8..03d36e847b78 100644 --- a/drivers/clk/samsung/clk-exynos7.c +++ b/drivers/clk/samsung/clk-exynos7.c | |||
@@ -46,6 +46,7 @@ static struct samsung_fixed_factor_clock topc_fixed_factor_clks[] __initdata = { | |||
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* List of parent clocks for Muxes in CMU_TOPC */ | 48 | /* List of parent clocks for Muxes in CMU_TOPC */ |
49 | PNAME(mout_aud_pll_ctrl_p) = { "fin_pll", "fout_aud_pll" }; | ||
49 | PNAME(mout_bus0_pll_ctrl_p) = { "fin_pll", "fout_bus0_pll" }; | 50 | PNAME(mout_bus0_pll_ctrl_p) = { "fin_pll", "fout_bus0_pll" }; |
50 | PNAME(mout_bus1_pll_ctrl_p) = { "fin_pll", "fout_bus1_pll" }; | 51 | PNAME(mout_bus1_pll_ctrl_p) = { "fin_pll", "fout_bus1_pll" }; |
51 | PNAME(mout_cc_pll_ctrl_p) = { "fin_pll", "fout_cc_pll" }; | 52 | PNAME(mout_cc_pll_ctrl_p) = { "fin_pll", "fout_cc_pll" }; |
@@ -105,6 +106,7 @@ static struct samsung_mux_clock topc_mux_clks[] __initdata = { | |||
105 | 106 | ||
106 | MUX(0, "mout_sclk_bus0_pll_out", mout_sclk_bus0_pll_out_p, | 107 | MUX(0, "mout_sclk_bus0_pll_out", mout_sclk_bus0_pll_out_p, |
107 | MUX_SEL_TOPC1, 16, 1), | 108 | MUX_SEL_TOPC1, 16, 1), |
109 | MUX(0, "mout_aud_pll_ctrl", mout_aud_pll_ctrl_p, MUX_SEL_TOPC1, 0, 1), | ||
108 | 110 | ||
109 | MUX(0, "mout_aclk_ccore_133", mout_topc_group2, MUX_SEL_TOPC2, 4, 2), | 111 | MUX(0, "mout_aclk_ccore_133", mout_topc_group2, MUX_SEL_TOPC2, 4, 2), |
110 | 112 | ||
@@ -129,6 +131,13 @@ static struct samsung_div_clock topc_div_clks[] __initdata = { | |||
129 | DIV_TOPC3, 12, 3), | 131 | DIV_TOPC3, 12, 3), |
130 | DIV(DOUT_SCLK_MFC_PLL, "dout_sclk_mfc_pll", "mout_mfc_pll_ctrl", | 132 | DIV(DOUT_SCLK_MFC_PLL, "dout_sclk_mfc_pll", "mout_mfc_pll_ctrl", |
131 | DIV_TOPC3, 16, 3), | 133 | DIV_TOPC3, 16, 3), |
134 | DIV(DOUT_SCLK_AUD_PLL, "dout_sclk_aud_pll", "mout_aud_pll_ctrl", | ||
135 | DIV_TOPC3, 28, 3), | ||
136 | }; | ||
137 | |||
138 | static struct samsung_pll_rate_table pll1460x_24mhz_tbl[] __initdata = { | ||
139 | PLL_36XX_RATE(491520000, 20, 1, 0, 31457), | ||
140 | {}, | ||
132 | }; | 141 | }; |
133 | 142 | ||
134 | static struct samsung_gate_clock topc_gate_clks[] __initdata = { | 143 | static struct samsung_gate_clock topc_gate_clks[] __initdata = { |
@@ -145,8 +154,8 @@ static struct samsung_pll_clock topc_pll_clks[] __initdata = { | |||
145 | BUS1_DPLL_CON0, NULL), | 154 | BUS1_DPLL_CON0, NULL), |
146 | PLL(pll_1452x, 0, "fout_mfc_pll", "fin_pll", MFC_PLL_LOCK, | 155 | PLL(pll_1452x, 0, "fout_mfc_pll", "fin_pll", MFC_PLL_LOCK, |
147 | MFC_PLL_CON0, NULL), | 156 | MFC_PLL_CON0, NULL), |
148 | PLL(pll_1460x, 0, "fout_aud_pll", "fin_pll", AUD_PLL_LOCK, | 157 | PLL(pll_1460x, FOUT_AUD_PLL, "fout_aud_pll", "fin_pll", AUD_PLL_LOCK, |
149 | AUD_PLL_CON0, NULL), | 158 | AUD_PLL_CON0, pll1460x_24mhz_tbl), |
150 | }; | 159 | }; |
151 | 160 | ||
152 | static struct samsung_cmu_info topc_cmu_info __initdata = { | 161 | static struct samsung_cmu_info topc_cmu_info __initdata = { |
@@ -177,13 +186,16 @@ CLK_OF_DECLARE(exynos7_clk_topc, "samsung,exynos7-clock-topc", | |||
177 | #define MUX_SEL_TOP00 0x0200 | 186 | #define MUX_SEL_TOP00 0x0200 |
178 | #define MUX_SEL_TOP01 0x0204 | 187 | #define MUX_SEL_TOP01 0x0204 |
179 | #define MUX_SEL_TOP03 0x020C | 188 | #define MUX_SEL_TOP03 0x020C |
189 | #define MUX_SEL_TOP0_PERIC0 0x0230 | ||
180 | #define MUX_SEL_TOP0_PERIC1 0x0234 | 190 | #define MUX_SEL_TOP0_PERIC1 0x0234 |
181 | #define MUX_SEL_TOP0_PERIC2 0x0238 | 191 | #define MUX_SEL_TOP0_PERIC2 0x0238 |
182 | #define MUX_SEL_TOP0_PERIC3 0x023C | 192 | #define MUX_SEL_TOP0_PERIC3 0x023C |
183 | #define DIV_TOP03 0x060C | 193 | #define DIV_TOP03 0x060C |
194 | #define DIV_TOP0_PERIC0 0x0630 | ||
184 | #define DIV_TOP0_PERIC1 0x0634 | 195 | #define DIV_TOP0_PERIC1 0x0634 |
185 | #define DIV_TOP0_PERIC2 0x0638 | 196 | #define DIV_TOP0_PERIC2 0x0638 |
186 | #define DIV_TOP0_PERIC3 0x063C | 197 | #define DIV_TOP0_PERIC3 0x063C |
198 | #define ENABLE_SCLK_TOP0_PERIC0 0x0A30 | ||
187 | #define ENABLE_SCLK_TOP0_PERIC1 0x0A34 | 199 | #define ENABLE_SCLK_TOP0_PERIC1 0x0A34 |
188 | #define ENABLE_SCLK_TOP0_PERIC2 0x0A38 | 200 | #define ENABLE_SCLK_TOP0_PERIC2 0x0A38 |
189 | #define ENABLE_SCLK_TOP0_PERIC3 0x0A3C | 201 | #define ENABLE_SCLK_TOP0_PERIC3 0x0A3C |
@@ -193,6 +205,7 @@ PNAME(mout_bus0_pll_p) = { "fin_pll", "dout_sclk_bus0_pll" }; | |||
193 | PNAME(mout_bus1_pll_p) = { "fin_pll", "dout_sclk_bus1_pll" }; | 205 | PNAME(mout_bus1_pll_p) = { "fin_pll", "dout_sclk_bus1_pll" }; |
194 | PNAME(mout_cc_pll_p) = { "fin_pll", "dout_sclk_cc_pll" }; | 206 | PNAME(mout_cc_pll_p) = { "fin_pll", "dout_sclk_cc_pll" }; |
195 | PNAME(mout_mfc_pll_p) = { "fin_pll", "dout_sclk_mfc_pll" }; | 207 | PNAME(mout_mfc_pll_p) = { "fin_pll", "dout_sclk_mfc_pll" }; |
208 | PNAME(mout_aud_pll_p) = { "fin_pll", "dout_sclk_aud_pll" }; | ||
196 | 209 | ||
197 | PNAME(mout_top0_half_bus0_pll_p) = {"mout_top0_bus0_pll", | 210 | PNAME(mout_top0_half_bus0_pll_p) = {"mout_top0_bus0_pll", |
198 | "ffac_top0_bus0_pll_div2"}; | 211 | "ffac_top0_bus0_pll_div2"}; |
@@ -206,24 +219,34 @@ PNAME(mout_top0_half_mfc_pll_p) = {"mout_top0_mfc_pll", | |||
206 | PNAME(mout_top0_group1) = {"mout_top0_half_bus0_pll", | 219 | PNAME(mout_top0_group1) = {"mout_top0_half_bus0_pll", |
207 | "mout_top0_half_bus1_pll", "mout_top0_half_cc_pll", | 220 | "mout_top0_half_bus1_pll", "mout_top0_half_cc_pll", |
208 | "mout_top0_half_mfc_pll"}; | 221 | "mout_top0_half_mfc_pll"}; |
222 | PNAME(mout_top0_group3) = {"ioclk_audiocdclk0", | ||
223 | "ioclk_audiocdclk1", "ioclk_spdif_extclk", | ||
224 | "mout_top0_aud_pll", "mout_top0_half_bus0_pll", | ||
225 | "mout_top0_half_bus1_pll"}; | ||
226 | PNAME(mout_top0_group4) = {"ioclk_audiocdclk1", "mout_top0_aud_pll", | ||
227 | "mout_top0_half_bus0_pll", "mout_top0_half_bus1_pll"}; | ||
209 | 228 | ||
210 | static unsigned long top0_clk_regs[] __initdata = { | 229 | static unsigned long top0_clk_regs[] __initdata = { |
211 | MUX_SEL_TOP00, | 230 | MUX_SEL_TOP00, |
212 | MUX_SEL_TOP01, | 231 | MUX_SEL_TOP01, |
213 | MUX_SEL_TOP03, | 232 | MUX_SEL_TOP03, |
233 | MUX_SEL_TOP0_PERIC0, | ||
214 | MUX_SEL_TOP0_PERIC1, | 234 | MUX_SEL_TOP0_PERIC1, |
215 | MUX_SEL_TOP0_PERIC2, | 235 | MUX_SEL_TOP0_PERIC2, |
216 | MUX_SEL_TOP0_PERIC3, | 236 | MUX_SEL_TOP0_PERIC3, |
217 | DIV_TOP03, | 237 | DIV_TOP03, |
238 | DIV_TOP0_PERIC0, | ||
218 | DIV_TOP0_PERIC1, | 239 | DIV_TOP0_PERIC1, |
219 | DIV_TOP0_PERIC2, | 240 | DIV_TOP0_PERIC2, |
220 | DIV_TOP0_PERIC3, | 241 | DIV_TOP0_PERIC3, |
242 | ENABLE_SCLK_TOP0_PERIC0, | ||
221 | ENABLE_SCLK_TOP0_PERIC1, | 243 | ENABLE_SCLK_TOP0_PERIC1, |
222 | ENABLE_SCLK_TOP0_PERIC2, | 244 | ENABLE_SCLK_TOP0_PERIC2, |
223 | ENABLE_SCLK_TOP0_PERIC3, | 245 | ENABLE_SCLK_TOP0_PERIC3, |
224 | }; | 246 | }; |
225 | 247 | ||
226 | static struct samsung_mux_clock top0_mux_clks[] __initdata = { | 248 | static struct samsung_mux_clock top0_mux_clks[] __initdata = { |
249 | MUX(0, "mout_top0_aud_pll", mout_aud_pll_p, MUX_SEL_TOP00, 0, 1), | ||
227 | MUX(0, "mout_top0_mfc_pll", mout_mfc_pll_p, MUX_SEL_TOP00, 4, 1), | 250 | MUX(0, "mout_top0_mfc_pll", mout_mfc_pll_p, MUX_SEL_TOP00, 4, 1), |
228 | MUX(0, "mout_top0_cc_pll", mout_cc_pll_p, MUX_SEL_TOP00, 8, 1), | 251 | MUX(0, "mout_top0_cc_pll", mout_cc_pll_p, MUX_SEL_TOP00, 8, 1), |
229 | MUX(0, "mout_top0_bus1_pll", mout_bus1_pll_p, MUX_SEL_TOP00, 12, 1), | 252 | MUX(0, "mout_top0_bus1_pll", mout_bus1_pll_p, MUX_SEL_TOP00, 12, 1), |
@@ -241,6 +264,10 @@ static struct samsung_mux_clock top0_mux_clks[] __initdata = { | |||
241 | MUX(0, "mout_aclk_peric1_66", mout_top0_group1, MUX_SEL_TOP03, 12, 2), | 264 | MUX(0, "mout_aclk_peric1_66", mout_top0_group1, MUX_SEL_TOP03, 12, 2), |
242 | MUX(0, "mout_aclk_peric0_66", mout_top0_group1, MUX_SEL_TOP03, 20, 2), | 265 | MUX(0, "mout_aclk_peric0_66", mout_top0_group1, MUX_SEL_TOP03, 20, 2), |
243 | 266 | ||
267 | MUX(0, "mout_sclk_spdif", mout_top0_group3, MUX_SEL_TOP0_PERIC0, 4, 3), | ||
268 | MUX(0, "mout_sclk_pcm1", mout_top0_group4, MUX_SEL_TOP0_PERIC0, 8, 2), | ||
269 | MUX(0, "mout_sclk_i2s1", mout_top0_group4, MUX_SEL_TOP0_PERIC0, 20, 2), | ||
270 | |||
244 | MUX(0, "mout_sclk_spi1", mout_top0_group1, MUX_SEL_TOP0_PERIC1, 8, 2), | 271 | MUX(0, "mout_sclk_spi1", mout_top0_group1, MUX_SEL_TOP0_PERIC1, 8, 2), |
245 | MUX(0, "mout_sclk_spi0", mout_top0_group1, MUX_SEL_TOP0_PERIC1, 20, 2), | 272 | MUX(0, "mout_sclk_spi0", mout_top0_group1, MUX_SEL_TOP0_PERIC1, 20, 2), |
246 | 273 | ||
@@ -259,6 +286,10 @@ static struct samsung_div_clock top0_div_clks[] __initdata = { | |||
259 | DIV(DOUT_ACLK_PERIC0, "dout_aclk_peric0_66", "mout_aclk_peric0_66", | 286 | DIV(DOUT_ACLK_PERIC0, "dout_aclk_peric0_66", "mout_aclk_peric0_66", |
260 | DIV_TOP03, 20, 6), | 287 | DIV_TOP03, 20, 6), |
261 | 288 | ||
289 | DIV(0, "dout_sclk_spdif", "mout_sclk_spdif", DIV_TOP0_PERIC0, 4, 4), | ||
290 | DIV(0, "dout_sclk_pcm1", "mout_sclk_pcm1", DIV_TOP0_PERIC0, 8, 12), | ||
291 | DIV(0, "dout_sclk_i2s1", "mout_sclk_i2s1", DIV_TOP0_PERIC0, 20, 10), | ||
292 | |||
262 | DIV(0, "dout_sclk_spi1", "mout_sclk_spi1", DIV_TOP0_PERIC1, 8, 12), | 293 | DIV(0, "dout_sclk_spi1", "mout_sclk_spi1", DIV_TOP0_PERIC1, 8, 12), |
263 | DIV(0, "dout_sclk_spi0", "mout_sclk_spi0", DIV_TOP0_PERIC1, 20, 12), | 294 | DIV(0, "dout_sclk_spi0", "mout_sclk_spi0", DIV_TOP0_PERIC1, 20, 12), |
264 | 295 | ||
@@ -273,6 +304,13 @@ static struct samsung_div_clock top0_div_clks[] __initdata = { | |||
273 | }; | 304 | }; |
274 | 305 | ||
275 | static struct samsung_gate_clock top0_gate_clks[] __initdata = { | 306 | static struct samsung_gate_clock top0_gate_clks[] __initdata = { |
307 | GATE(CLK_SCLK_SPDIF, "sclk_spdif", "dout_sclk_spdif", | ||
308 | ENABLE_SCLK_TOP0_PERIC0, 4, CLK_SET_RATE_PARENT, 0), | ||
309 | GATE(CLK_SCLK_PCM1, "sclk_pcm1", "dout_sclk_pcm1", | ||
310 | ENABLE_SCLK_TOP0_PERIC0, 8, CLK_SET_RATE_PARENT, 0), | ||
311 | GATE(CLK_SCLK_I2S1, "sclk_i2s1", "dout_sclk_i2s1", | ||
312 | ENABLE_SCLK_TOP0_PERIC0, 20, CLK_SET_RATE_PARENT, 0), | ||
313 | |||
276 | GATE(CLK_SCLK_SPI1, "sclk_spi1", "dout_sclk_spi1", | 314 | GATE(CLK_SCLK_SPI1, "sclk_spi1", "dout_sclk_spi1", |
277 | ENABLE_SCLK_TOP0_PERIC1, 8, CLK_SET_RATE_PARENT, 0), | 315 | ENABLE_SCLK_TOP0_PERIC1, 8, CLK_SET_RATE_PARENT, 0), |
278 | GATE(CLK_SCLK_SPI0, "sclk_spi0", "dout_sclk_spi0", | 316 | GATE(CLK_SCLK_SPI0, "sclk_spi0", "dout_sclk_spi0", |
@@ -642,6 +680,12 @@ static struct samsung_gate_clock peric1_gate_clks[] __initdata = { | |||
642 | ENABLE_PCLK_PERIC1, 15, 0, 0), | 680 | ENABLE_PCLK_PERIC1, 15, 0, 0), |
643 | GATE(PCLK_SPI4, "pclk_spi4", "mout_aclk_peric1_66_user", | 681 | GATE(PCLK_SPI4, "pclk_spi4", "mout_aclk_peric1_66_user", |
644 | ENABLE_PCLK_PERIC1, 16, 0, 0), | 682 | ENABLE_PCLK_PERIC1, 16, 0, 0), |
683 | GATE(PCLK_I2S1, "pclk_i2s1", "mout_aclk_peric1_66_user", | ||
684 | ENABLE_PCLK_PERIC1, 17, CLK_SET_RATE_PARENT, 0), | ||
685 | GATE(PCLK_PCM1, "pclk_pcm1", "mout_aclk_peric1_66_user", | ||
686 | ENABLE_PCLK_PERIC1, 18, 0, 0), | ||
687 | GATE(PCLK_SPDIF, "pclk_spdif", "mout_aclk_peric1_66_user", | ||
688 | ENABLE_PCLK_PERIC1, 19, 0, 0), | ||
645 | 689 | ||
646 | GATE(SCLK_UART1, "sclk_uart1_user", "mout_sclk_uart1_user", | 690 | GATE(SCLK_UART1, "sclk_uart1_user", "mout_sclk_uart1_user", |
647 | ENABLE_SCLK_PERIC10, 9, 0, 0), | 691 | ENABLE_SCLK_PERIC10, 9, 0, 0), |
@@ -659,6 +703,12 @@ static struct samsung_gate_clock peric1_gate_clks[] __initdata = { | |||
659 | ENABLE_SCLK_PERIC10, 15, CLK_SET_RATE_PARENT, 0), | 703 | ENABLE_SCLK_PERIC10, 15, CLK_SET_RATE_PARENT, 0), |
660 | GATE(SCLK_SPI4, "sclk_spi4_user", "mout_sclk_spi4_user", | 704 | GATE(SCLK_SPI4, "sclk_spi4_user", "mout_sclk_spi4_user", |
661 | ENABLE_SCLK_PERIC10, 16, CLK_SET_RATE_PARENT, 0), | 705 | ENABLE_SCLK_PERIC10, 16, CLK_SET_RATE_PARENT, 0), |
706 | GATE(SCLK_I2S1, "sclk_i2s1_user", "sclk_i2s1", | ||
707 | ENABLE_SCLK_PERIC10, 17, CLK_SET_RATE_PARENT, 0), | ||
708 | GATE(SCLK_PCM1, "sclk_pcm1_user", "sclk_pcm1", | ||
709 | ENABLE_SCLK_PERIC10, 18, CLK_SET_RATE_PARENT, 0), | ||
710 | GATE(SCLK_SPDIF, "sclk_spdif_user", "sclk_spdif", | ||
711 | ENABLE_SCLK_PERIC10, 19, CLK_SET_RATE_PARENT, 0), | ||
662 | }; | 712 | }; |
663 | 713 | ||
664 | static struct samsung_cmu_info peric1_cmu_info __initdata = { | 714 | static struct samsung_cmu_info peric1_cmu_info __initdata = { |
@@ -1006,3 +1056,92 @@ static void __init exynos7_clk_mscl_init(struct device_node *np) | |||
1006 | 1056 | ||
1007 | CLK_OF_DECLARE(exynos7_clk_mscl, "samsung,exynos7-clock-mscl", | 1057 | CLK_OF_DECLARE(exynos7_clk_mscl, "samsung,exynos7-clock-mscl", |
1008 | exynos7_clk_mscl_init); | 1058 | exynos7_clk_mscl_init); |
1059 | |||
1060 | /* Register Offset definitions for CMU_AUD (0x114C0000) */ | ||
1061 | #define MUX_SEL_AUD 0x0200 | ||
1062 | #define DIV_AUD0 0x0600 | ||
1063 | #define DIV_AUD1 0x0604 | ||
1064 | #define ENABLE_ACLK_AUD 0x0800 | ||
1065 | #define ENABLE_PCLK_AUD 0x0900 | ||
1066 | #define ENABLE_SCLK_AUD 0x0A00 | ||
1067 | |||
1068 | /* | ||
1069 | * List of parent clocks for Muxes in CMU_AUD | ||
1070 | */ | ||
1071 | PNAME(mout_aud_pll_user_p) = { "fin_pll", "fout_aud_pll" }; | ||
1072 | PNAME(mout_aud_group_p) = { "dout_aud_cdclk", "ioclk_audiocdclk0" }; | ||
1073 | |||
1074 | static unsigned long aud_clk_regs[] __initdata = { | ||
1075 | MUX_SEL_AUD, | ||
1076 | DIV_AUD0, | ||
1077 | DIV_AUD1, | ||
1078 | ENABLE_ACLK_AUD, | ||
1079 | ENABLE_PCLK_AUD, | ||
1080 | ENABLE_SCLK_AUD, | ||
1081 | }; | ||
1082 | |||
1083 | static struct samsung_mux_clock aud_mux_clks[] __initdata = { | ||
1084 | MUX(0, "mout_sclk_i2s", mout_aud_group_p, MUX_SEL_AUD, 12, 1), | ||
1085 | MUX(0, "mout_sclk_pcm", mout_aud_group_p, MUX_SEL_AUD, 16, 1), | ||
1086 | MUX(0, "mout_aud_pll_user", mout_aud_pll_user_p, MUX_SEL_AUD, 20, 1), | ||
1087 | }; | ||
1088 | |||
1089 | static struct samsung_div_clock aud_div_clks[] __initdata = { | ||
1090 | DIV(0, "dout_aud_ca5", "mout_aud_pll_user", DIV_AUD0, 0, 4), | ||
1091 | DIV(0, "dout_aclk_aud", "dout_aud_ca5", DIV_AUD0, 4, 4), | ||
1092 | DIV(0, "dout_aud_pclk_dbg", "dout_aud_ca5", DIV_AUD0, 8, 4), | ||
1093 | |||
1094 | DIV(0, "dout_sclk_i2s", "mout_sclk_i2s", DIV_AUD1, 0, 4), | ||
1095 | DIV(0, "dout_sclk_pcm", "mout_sclk_pcm", DIV_AUD1, 4, 8), | ||
1096 | DIV(0, "dout_sclk_uart", "dout_aud_cdclk", DIV_AUD1, 12, 4), | ||
1097 | DIV(0, "dout_sclk_slimbus", "dout_aud_cdclk", DIV_AUD1, 16, 5), | ||
1098 | DIV(0, "dout_aud_cdclk", "mout_aud_pll_user", DIV_AUD1, 24, 4), | ||
1099 | }; | ||
1100 | |||
1101 | static struct samsung_gate_clock aud_gate_clks[] __initdata = { | ||
1102 | GATE(SCLK_PCM, "sclk_pcm", "dout_sclk_pcm", | ||
1103 | ENABLE_SCLK_AUD, 27, CLK_SET_RATE_PARENT, 0), | ||
1104 | GATE(SCLK_I2S, "sclk_i2s", "dout_sclk_i2s", | ||
1105 | ENABLE_SCLK_AUD, 28, CLK_SET_RATE_PARENT, 0), | ||
1106 | GATE(0, "sclk_uart", "dout_sclk_uart", ENABLE_SCLK_AUD, 29, 0, 0), | ||
1107 | GATE(0, "sclk_slimbus", "dout_sclk_slimbus", | ||
1108 | ENABLE_SCLK_AUD, 30, 0, 0), | ||
1109 | |||
1110 | GATE(0, "pclk_dbg_aud", "dout_aud_pclk_dbg", ENABLE_PCLK_AUD, 19, 0, 0), | ||
1111 | GATE(0, "pclk_gpio_aud", "dout_aclk_aud", ENABLE_PCLK_AUD, 20, 0, 0), | ||
1112 | GATE(0, "pclk_wdt1", "dout_aclk_aud", ENABLE_PCLK_AUD, 22, 0, 0), | ||
1113 | GATE(0, "pclk_wdt0", "dout_aclk_aud", ENABLE_PCLK_AUD, 23, 0, 0), | ||
1114 | GATE(0, "pclk_slimbus", "dout_aclk_aud", ENABLE_PCLK_AUD, 24, 0, 0), | ||
1115 | GATE(0, "pclk_uart", "dout_aclk_aud", ENABLE_PCLK_AUD, 25, 0, 0), | ||
1116 | GATE(PCLK_PCM, "pclk_pcm", "dout_aclk_aud", | ||
1117 | ENABLE_PCLK_AUD, 26, CLK_SET_RATE_PARENT, 0), | ||
1118 | GATE(PCLK_I2S, "pclk_i2s", "dout_aclk_aud", | ||
1119 | ENABLE_PCLK_AUD, 27, CLK_SET_RATE_PARENT, 0), | ||
1120 | GATE(0, "pclk_timer", "dout_aclk_aud", ENABLE_PCLK_AUD, 28, 0, 0), | ||
1121 | GATE(0, "pclk_smmu_aud", "dout_aclk_aud", ENABLE_PCLK_AUD, 31, 0, 0), | ||
1122 | |||
1123 | GATE(0, "aclk_smmu_aud", "dout_aclk_aud", ENABLE_ACLK_AUD, 27, 0, 0), | ||
1124 | GATE(0, "aclk_acel_lh_async_si_top", "dout_aclk_aud", | ||
1125 | ENABLE_ACLK_AUD, 28, 0, 0), | ||
1126 | GATE(ACLK_ADMA, "aclk_dmac", "dout_aclk_aud", ENABLE_ACLK_AUD, 31, 0, 0), | ||
1127 | }; | ||
1128 | |||
1129 | static struct samsung_cmu_info aud_cmu_info __initdata = { | ||
1130 | .mux_clks = aud_mux_clks, | ||
1131 | .nr_mux_clks = ARRAY_SIZE(aud_mux_clks), | ||
1132 | .div_clks = aud_div_clks, | ||
1133 | .nr_div_clks = ARRAY_SIZE(aud_div_clks), | ||
1134 | .gate_clks = aud_gate_clks, | ||
1135 | .nr_gate_clks = ARRAY_SIZE(aud_gate_clks), | ||
1136 | .nr_clk_ids = AUD_NR_CLK, | ||
1137 | .clk_regs = aud_clk_regs, | ||
1138 | .nr_clk_regs = ARRAY_SIZE(aud_clk_regs), | ||
1139 | }; | ||
1140 | |||
1141 | static void __init exynos7_clk_aud_init(struct device_node *np) | ||
1142 | { | ||
1143 | samsung_cmu_register_one(np, &aud_cmu_info); | ||
1144 | } | ||
1145 | |||
1146 | CLK_OF_DECLARE(exynos7_clk_aud, "samsung,exynos7-clock-aud", | ||
1147 | exynos7_clk_aud_init); | ||