2 * Clock definitions for u8540 platform.
4 * Copyright (C) 2012 ST-Ericsson SA
5 * Author: Ulf Hansson <ulf.hansson@linaro.org>
7 * License terms: GNU General Public License (GPL) version 2
10 #include <linux/clk.h>
11 #include <linux/clkdev.h>
12 #include <linux/clk-provider.h>
13 #include <linux/mfd/dbx500-prcmu.h>
14 #include <linux/platform_data/clk-ux500.h>
17 void u8540_clk_init(u32 clkrst1_base
, u32 clkrst2_base
, u32 clkrst3_base
,
18 u32 clkrst5_base
, u32 clkrst6_base
)
24 clk
= clk_reg_prcmu_gate("soc0_pll", NULL
, PRCMU_PLLSOC0
,
25 CLK_IS_ROOT
|CLK_IGNORE_UNUSED
);
26 clk_register_clkdev(clk
, "soc0_pll", NULL
);
28 clk
= clk_reg_prcmu_gate("soc1_pll", NULL
, PRCMU_PLLSOC1
,
29 CLK_IS_ROOT
|CLK_IGNORE_UNUSED
);
30 clk_register_clkdev(clk
, "soc1_pll", NULL
);
32 clk
= clk_reg_prcmu_gate("ddr_pll", NULL
, PRCMU_PLLDDR
,
33 CLK_IS_ROOT
|CLK_IGNORE_UNUSED
);
34 clk_register_clkdev(clk
, "ddr_pll", NULL
);
36 clk
= clk_register_fixed_rate(NULL
, "rtc32k", NULL
,
37 CLK_IS_ROOT
|CLK_IGNORE_UNUSED
,
39 clk_register_clkdev(clk
, "clk32k", NULL
);
40 clk_register_clkdev(clk
, "apb_pclk", "rtc-pl031");
42 clk
= clk_register_fixed_rate(NULL
, "ulp38m4", NULL
,
43 CLK_IS_ROOT
|CLK_IGNORE_UNUSED
,
46 clk
= clk_reg_prcmu_gate("uartclk", NULL
, PRCMU_UARTCLK
, CLK_IS_ROOT
);
47 clk_register_clkdev(clk
, NULL
, "UART");
49 /* msp02clk needs a abx500 clk as parent. Handle by abx500 clk driver */
50 clk
= clk_reg_prcmu_gate("msp02clk", "ab9540_sysclk12_b1",
52 clk_register_clkdev(clk
, NULL
, "MSP02");
54 clk
= clk_reg_prcmu_gate("msp1clk", NULL
, PRCMU_MSP1CLK
, CLK_IS_ROOT
);
55 clk_register_clkdev(clk
, NULL
, "MSP1");
57 clk
= clk_reg_prcmu_gate("i2cclk", NULL
, PRCMU_I2CCLK
, CLK_IS_ROOT
);
58 clk_register_clkdev(clk
, NULL
, "I2C");
60 clk
= clk_reg_prcmu_gate("slimclk", NULL
, PRCMU_SLIMCLK
, CLK_IS_ROOT
);
61 clk_register_clkdev(clk
, NULL
, "slim");
63 clk
= clk_reg_prcmu_gate("per1clk", NULL
, PRCMU_PER1CLK
, CLK_IS_ROOT
);
64 clk_register_clkdev(clk
, NULL
, "PERIPH1");
66 clk
= clk_reg_prcmu_gate("per2clk", NULL
, PRCMU_PER2CLK
, CLK_IS_ROOT
);
67 clk_register_clkdev(clk
, NULL
, "PERIPH2");
69 clk
= clk_reg_prcmu_gate("per3clk", NULL
, PRCMU_PER3CLK
, CLK_IS_ROOT
);
70 clk_register_clkdev(clk
, NULL
, "PERIPH3");
72 clk
= clk_reg_prcmu_gate("per5clk", NULL
, PRCMU_PER5CLK
, CLK_IS_ROOT
);
73 clk_register_clkdev(clk
, NULL
, "PERIPH5");
75 clk
= clk_reg_prcmu_gate("per6clk", NULL
, PRCMU_PER6CLK
, CLK_IS_ROOT
);
76 clk_register_clkdev(clk
, NULL
, "PERIPH6");
78 clk
= clk_reg_prcmu_gate("per7clk", NULL
, PRCMU_PER7CLK
, CLK_IS_ROOT
);
79 clk_register_clkdev(clk
, NULL
, "PERIPH7");
81 clk
= clk_reg_prcmu_scalable("lcdclk", NULL
, PRCMU_LCDCLK
, 0,
82 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
83 clk_register_clkdev(clk
, NULL
, "lcd");
84 clk_register_clkdev(clk
, "lcd", "mcde");
86 clk
= clk_reg_prcmu_opp_gate("bmlclk", NULL
, PRCMU_BMLCLK
,
88 clk_register_clkdev(clk
, NULL
, "bml");
90 clk
= clk_reg_prcmu_scalable("hsitxclk", NULL
, PRCMU_HSITXCLK
, 0,
91 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
93 clk
= clk_reg_prcmu_scalable("hsirxclk", NULL
, PRCMU_HSIRXCLK
, 0,
94 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
96 clk
= clk_reg_prcmu_scalable("hdmiclk", NULL
, PRCMU_HDMICLK
, 0,
97 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
98 clk_register_clkdev(clk
, NULL
, "hdmi");
99 clk_register_clkdev(clk
, "hdmi", "mcde");
101 clk
= clk_reg_prcmu_gate("apeatclk", NULL
, PRCMU_APEATCLK
, CLK_IS_ROOT
);
102 clk_register_clkdev(clk
, NULL
, "apeat");
104 clk
= clk_reg_prcmu_gate("apetraceclk", NULL
, PRCMU_APETRACECLK
,
106 clk_register_clkdev(clk
, NULL
, "apetrace");
108 clk
= clk_reg_prcmu_gate("mcdeclk", NULL
, PRCMU_MCDECLK
, CLK_IS_ROOT
);
109 clk_register_clkdev(clk
, NULL
, "mcde");
110 clk_register_clkdev(clk
, "mcde", "mcde");
111 clk_register_clkdev(clk
, NULL
, "dsilink.0");
112 clk_register_clkdev(clk
, NULL
, "dsilink.1");
113 clk_register_clkdev(clk
, NULL
, "dsilink.2");
115 clk
= clk_reg_prcmu_opp_gate("ipi2cclk", NULL
, PRCMU_IPI2CCLK
,
117 clk_register_clkdev(clk
, NULL
, "ipi2");
119 clk
= clk_reg_prcmu_gate("dsialtclk", NULL
, PRCMU_DSIALTCLK
,
121 clk_register_clkdev(clk
, NULL
, "dsialt");
123 clk
= clk_reg_prcmu_gate("dmaclk", NULL
, PRCMU_DMACLK
, CLK_IS_ROOT
);
124 clk_register_clkdev(clk
, NULL
, "dma40.0");
126 clk
= clk_reg_prcmu_gate("b2r2clk", NULL
, PRCMU_B2R2CLK
, CLK_IS_ROOT
);
127 clk_register_clkdev(clk
, NULL
, "b2r2");
128 clk_register_clkdev(clk
, NULL
, "b2r2_core");
129 clk_register_clkdev(clk
, NULL
, "U8500-B2R2.0");
130 clk_register_clkdev(clk
, NULL
, "b2r2_1_core");
132 clk
= clk_reg_prcmu_scalable("tvclk", NULL
, PRCMU_TVCLK
, 0,
133 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
134 clk_register_clkdev(clk
, NULL
, "tv");
135 clk_register_clkdev(clk
, "tv", "mcde");
137 clk
= clk_reg_prcmu_gate("sspclk", NULL
, PRCMU_SSPCLK
, CLK_IS_ROOT
);
138 clk_register_clkdev(clk
, NULL
, "SSP");
140 clk
= clk_reg_prcmu_gate("rngclk", NULL
, PRCMU_RNGCLK
, CLK_IS_ROOT
);
141 clk_register_clkdev(clk
, NULL
, "rngclk");
143 clk
= clk_reg_prcmu_gate("uiccclk", NULL
, PRCMU_UICCCLK
, CLK_IS_ROOT
);
144 clk_register_clkdev(clk
, NULL
, "uicc");
146 clk
= clk_reg_prcmu_gate("timclk", NULL
, PRCMU_TIMCLK
, CLK_IS_ROOT
);
147 clk_register_clkdev(clk
, NULL
, "mtu0");
148 clk_register_clkdev(clk
, NULL
, "mtu1");
150 clk
= clk_reg_prcmu_opp_volt_scalable("sdmmcclk", NULL
,
151 PRCMU_SDMMCCLK
, 100000000,
152 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
153 clk_register_clkdev(clk
, NULL
, "sdmmc");
155 clk
= clk_reg_prcmu_opp_volt_scalable("sdmmchclk", NULL
,
156 PRCMU_SDMMCHCLK
, 400000000,
157 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
158 clk_register_clkdev(clk
, NULL
, "sdmmchclk");
160 clk
= clk_reg_prcmu_gate("hvaclk", NULL
, PRCMU_HVACLK
, CLK_IS_ROOT
);
161 clk_register_clkdev(clk
, NULL
, "hva");
163 clk
= clk_reg_prcmu_gate("g1clk", NULL
, PRCMU_G1CLK
, CLK_IS_ROOT
);
164 clk_register_clkdev(clk
, NULL
, "g1");
166 clk
= clk_reg_prcmu_scalable("spare1clk", NULL
, PRCMU_SPARE1CLK
, 0,
167 CLK_IS_ROOT
|CLK_SET_RATE_GATE
);
168 clk_register_clkdev(clk
, "dsilcd", "mcde");
170 clk
= clk_reg_prcmu_scalable("dsi_pll", "hdmiclk",
171 PRCMU_PLLDSI
, 0, CLK_SET_RATE_GATE
);
172 clk_register_clkdev(clk
, "dsihs2", "mcde");
173 clk_register_clkdev(clk
, "hs_clk", "dsilink.2");
175 clk
= clk_reg_prcmu_scalable("dsilcd_pll", "spare1clk",
176 PRCMU_PLLDSI_LCD
, 0, CLK_SET_RATE_GATE
);
177 clk_register_clkdev(clk
, "dsilcd_pll", "mcde");
179 clk
= clk_reg_prcmu_scalable("dsi0clk", "dsi_pll",
180 PRCMU_DSI0CLK
, 0, CLK_SET_RATE_GATE
);
181 clk_register_clkdev(clk
, "dsihs0", "mcde");
183 clk
= clk_reg_prcmu_scalable("dsi0lcdclk", "dsilcd_pll",
184 PRCMU_DSI0CLK_LCD
, 0, CLK_SET_RATE_GATE
);
185 clk_register_clkdev(clk
, "dsihs0", "mcde");
186 clk_register_clkdev(clk
, "hs_clk", "dsilink.0");
188 clk
= clk_reg_prcmu_scalable("dsi1clk", "dsi_pll",
189 PRCMU_DSI1CLK
, 0, CLK_SET_RATE_GATE
);
190 clk_register_clkdev(clk
, "dsihs1", "mcde");
192 clk
= clk_reg_prcmu_scalable("dsi1lcdclk", "dsilcd_pll",
193 PRCMU_DSI1CLK_LCD
, 0, CLK_SET_RATE_GATE
);
194 clk_register_clkdev(clk
, "dsihs1", "mcde");
195 clk_register_clkdev(clk
, "hs_clk", "dsilink.1");
197 clk
= clk_reg_prcmu_scalable("dsi0escclk", "tvclk",
198 PRCMU_DSI0ESCCLK
, 0, CLK_SET_RATE_GATE
);
199 clk_register_clkdev(clk
, "lp_clk", "dsilink.0");
200 clk_register_clkdev(clk
, "dsilp0", "mcde");
202 clk
= clk_reg_prcmu_scalable("dsi1escclk", "tvclk",
203 PRCMU_DSI1ESCCLK
, 0, CLK_SET_RATE_GATE
);
204 clk_register_clkdev(clk
, "lp_clk", "dsilink.1");
205 clk_register_clkdev(clk
, "dsilp1", "mcde");
207 clk
= clk_reg_prcmu_scalable("dsi2escclk", "tvclk",
208 PRCMU_DSI2ESCCLK
, 0, CLK_SET_RATE_GATE
);
209 clk_register_clkdev(clk
, "lp_clk", "dsilink.2");
210 clk_register_clkdev(clk
, "dsilp2", "mcde");
212 clk
= clk_reg_prcmu_scalable_rate("armss", NULL
,
213 PRCMU_ARMSS
, 0, CLK_IS_ROOT
|CLK_IGNORE_UNUSED
);
214 clk_register_clkdev(clk
, "armss", NULL
);
216 clk
= clk_register_fixed_factor(NULL
, "smp_twd", "armss",
217 CLK_IGNORE_UNUSED
, 1, 2);
218 clk_register_clkdev(clk
, NULL
, "smp_twd");
221 /* Peripheral 1 : PRCC P-clocks */
222 clk
= clk_reg_prcc_pclk("p1_pclk0", "per1clk", clkrst1_base
,
224 clk_register_clkdev(clk
, "apb_pclk", "uart0");
226 clk
= clk_reg_prcc_pclk("p1_pclk1", "per1clk", clkrst1_base
,
228 clk_register_clkdev(clk
, "apb_pclk", "uart1");
230 clk
= clk_reg_prcc_pclk("p1_pclk2", "per1clk", clkrst1_base
,
232 clk_register_clkdev(clk
, "apb_pclk", "nmk-i2c.1");
234 clk
= clk_reg_prcc_pclk("p1_pclk3", "per1clk", clkrst1_base
,
236 clk_register_clkdev(clk
, "apb_pclk", "msp0");
237 clk_register_clkdev(clk
, "apb_pclk", "dbx5x0-msp-i2s.0");
239 clk
= clk_reg_prcc_pclk("p1_pclk4", "per1clk", clkrst1_base
,
241 clk_register_clkdev(clk
, "apb_pclk", "msp1");
242 clk_register_clkdev(clk
, "apb_pclk", "dbx5x0-msp-i2s.1");
244 clk
= clk_reg_prcc_pclk("p1_pclk5", "per1clk", clkrst1_base
,
246 clk_register_clkdev(clk
, "apb_pclk", "sdi0");
248 clk
= clk_reg_prcc_pclk("p1_pclk6", "per1clk", clkrst1_base
,
250 clk_register_clkdev(clk
, "apb_pclk", "nmk-i2c.2");
252 clk
= clk_reg_prcc_pclk("p1_pclk7", "per1clk", clkrst1_base
,
254 clk_register_clkdev(clk
, NULL
, "spi3");
256 clk
= clk_reg_prcc_pclk("p1_pclk8", "per1clk", clkrst1_base
,
258 clk_register_clkdev(clk
, "apb_pclk", "slimbus0");
260 clk
= clk_reg_prcc_pclk("p1_pclk9", "per1clk", clkrst1_base
,
262 clk_register_clkdev(clk
, NULL
, "gpio.0");
263 clk_register_clkdev(clk
, NULL
, "gpio.1");
264 clk_register_clkdev(clk
, NULL
, "gpioblock0");
265 clk_register_clkdev(clk
, "apb_pclk", "ab85xx-codec.0");
267 clk
= clk_reg_prcc_pclk("p1_pclk10", "per1clk", clkrst1_base
,
269 clk_register_clkdev(clk
, "apb_pclk", "nmk-i2c.4");
271 clk
= clk_reg_prcc_pclk("p1_pclk11", "per1clk", clkrst1_base
,
273 clk_register_clkdev(clk
, "apb_pclk", "msp3");
274 clk_register_clkdev(clk
, "apb_pclk", "dbx5x0-msp-i2s.3");
276 /* Peripheral 2 : PRCC P-clocks */
277 clk
= clk_reg_prcc_pclk("p2_pclk0", "per2clk", clkrst2_base
,
279 clk_register_clkdev(clk
, "apb_pclk", "nmk-i2c.3");
281 clk
= clk_reg_prcc_pclk("p2_pclk1", "per2clk", clkrst2_base
,
283 clk_register_clkdev(clk
, NULL
, "spi2");
285 clk
= clk_reg_prcc_pclk("p2_pclk2", "per2clk", clkrst2_base
,
287 clk_register_clkdev(clk
, NULL
, "spi1");
289 clk
= clk_reg_prcc_pclk("p2_pclk3", "per2clk", clkrst2_base
,
291 clk_register_clkdev(clk
, NULL
, "pwl");
293 clk
= clk_reg_prcc_pclk("p2_pclk4", "per2clk", clkrst2_base
,
295 clk_register_clkdev(clk
, "apb_pclk", "sdi4");
297 clk
= clk_reg_prcc_pclk("p2_pclk5", "per2clk", clkrst2_base
,
299 clk_register_clkdev(clk
, "apb_pclk", "msp2");
300 clk_register_clkdev(clk
, "apb_pclk", "dbx5x0-msp-i2s.2");
302 clk
= clk_reg_prcc_pclk("p2_pclk6", "per2clk", clkrst2_base
,
304 clk_register_clkdev(clk
, "apb_pclk", "sdi1");
306 clk
= clk_reg_prcc_pclk("p2_pclk7", "per2clk", clkrst2_base
,
308 clk_register_clkdev(clk
, "apb_pclk", "sdi3");
310 clk
= clk_reg_prcc_pclk("p2_pclk8", "per2clk", clkrst2_base
,
312 clk_register_clkdev(clk
, NULL
, "spi0");
314 clk
= clk_reg_prcc_pclk("p2_pclk9", "per2clk", clkrst2_base
,
316 clk_register_clkdev(clk
, "hsir_hclk", "ste_hsi.0");
318 clk
= clk_reg_prcc_pclk("p2_pclk10", "per2clk", clkrst2_base
,
320 clk_register_clkdev(clk
, "hsit_hclk", "ste_hsi.0");
322 clk
= clk_reg_prcc_pclk("p2_pclk11", "per2clk", clkrst2_base
,
324 clk_register_clkdev(clk
, NULL
, "gpio.6");
325 clk_register_clkdev(clk
, NULL
, "gpio.7");
326 clk_register_clkdev(clk
, NULL
, "gpioblock1");
328 clk
= clk_reg_prcc_pclk("p2_pclk12", "per2clk", clkrst2_base
,
330 clk_register_clkdev(clk
, "msp4-pclk", "ab85xx-codec.0");
332 /* Peripheral 3 : PRCC P-clocks */
333 clk
= clk_reg_prcc_pclk("p3_pclk0", "per3clk", clkrst3_base
,
335 clk_register_clkdev(clk
, NULL
, "fsmc");
337 clk
= clk_reg_prcc_pclk("p3_pclk1", "per3clk", clkrst3_base
,
339 clk_register_clkdev(clk
, "apb_pclk", "ssp0");
341 clk
= clk_reg_prcc_pclk("p3_pclk2", "per3clk", clkrst3_base
,
343 clk_register_clkdev(clk
, "apb_pclk", "ssp1");
345 clk
= clk_reg_prcc_pclk("p3_pclk3", "per3clk", clkrst3_base
,
347 clk_register_clkdev(clk
, "apb_pclk", "nmk-i2c.0");
349 clk
= clk_reg_prcc_pclk("p3_pclk4", "per3clk", clkrst3_base
,
351 clk_register_clkdev(clk
, "apb_pclk", "sdi2");
353 clk
= clk_reg_prcc_pclk("p3_pclk5", "per3clk", clkrst3_base
,
355 clk_register_clkdev(clk
, "apb_pclk", "ske");
356 clk_register_clkdev(clk
, "apb_pclk", "nmk-ske-keypad");
358 clk
= clk_reg_prcc_pclk("p3_pclk6", "per3clk", clkrst3_base
,
360 clk_register_clkdev(clk
, "apb_pclk", "uart2");
362 clk
= clk_reg_prcc_pclk("p3_pclk7", "per3clk", clkrst3_base
,
364 clk_register_clkdev(clk
, "apb_pclk", "sdi5");
366 clk
= clk_reg_prcc_pclk("p3_pclk8", "per3clk", clkrst3_base
,
368 clk_register_clkdev(clk
, NULL
, "gpio.2");
369 clk_register_clkdev(clk
, NULL
, "gpio.3");
370 clk_register_clkdev(clk
, NULL
, "gpio.4");
371 clk_register_clkdev(clk
, NULL
, "gpio.5");
372 clk_register_clkdev(clk
, NULL
, "gpioblock2");
374 clk
= clk_reg_prcc_pclk("p3_pclk9", "per3clk", clkrst3_base
,
376 clk_register_clkdev(clk
, "apb_pclk", "nmk-i2c.5");
378 clk
= clk_reg_prcc_pclk("p3_pclk10", "per3clk", clkrst3_base
,
380 clk_register_clkdev(clk
, "apb_pclk", "nmk-i2c.6");
382 clk
= clk_reg_prcc_pclk("p3_pclk11", "per3clk", clkrst3_base
,
384 clk_register_clkdev(clk
, "apb_pclk", "uart3");
386 clk
= clk_reg_prcc_pclk("p3_pclk12", "per3clk", clkrst3_base
,
388 clk_register_clkdev(clk
, "apb_pclk", "uart4");
390 /* Peripheral 5 : PRCC P-clocks */
391 clk
= clk_reg_prcc_pclk("p5_pclk0", "per5clk", clkrst5_base
,
393 clk_register_clkdev(clk
, "usb", "musb-ux500.0");
394 clk_register_clkdev(clk
, "usbclk", "ab-iddet.0");
396 clk
= clk_reg_prcc_pclk("p5_pclk1", "per5clk", clkrst5_base
,
398 clk_register_clkdev(clk
, NULL
, "gpio.8");
399 clk_register_clkdev(clk
, NULL
, "gpioblock3");
401 /* Peripheral 6 : PRCC P-clocks */
402 clk
= clk_reg_prcc_pclk("p6_pclk0", "per6clk", clkrst6_base
,
404 clk_register_clkdev(clk
, "apb_pclk", "rng");
406 clk
= clk_reg_prcc_pclk("p6_pclk1", "per6clk", clkrst6_base
,
408 clk_register_clkdev(clk
, NULL
, "cryp0");
409 clk_register_clkdev(clk
, NULL
, "cryp1");
411 clk
= clk_reg_prcc_pclk("p6_pclk2", "per6clk", clkrst6_base
,
413 clk_register_clkdev(clk
, NULL
, "hash0");
415 clk
= clk_reg_prcc_pclk("p6_pclk3", "per6clk", clkrst6_base
,
417 clk_register_clkdev(clk
, NULL
, "pka");
419 clk
= clk_reg_prcc_pclk("p6_pclk4", "per6clk", clkrst6_base
,
421 clk_register_clkdev(clk
, NULL
, "db8540-hash1");
423 clk
= clk_reg_prcc_pclk("p6_pclk5", "per6clk", clkrst6_base
,
425 clk_register_clkdev(clk
, NULL
, "cfgreg");
427 clk
= clk_reg_prcc_pclk("p6_pclk6", "per6clk", clkrst6_base
,
429 clk_register_clkdev(clk
, "apb_pclk", "mtu0");
431 clk
= clk_reg_prcc_pclk("p6_pclk7", "per6clk", clkrst6_base
,
433 clk_register_clkdev(clk
, "apb_pclk", "mtu1");
436 * PRCC K-clocks ==> see table PRCC_PCKEN/PRCC_KCKEN
437 * This differs from the internal implementation:
438 * We don't use the PERPIH[n| clock as parent, since those _should_
439 * only be used as parents for the P-clocks.
440 * TODO: "parentjoin" with corresponding P-clocks for all K-clocks.
443 /* Peripheral 1 : PRCC K-clocks */
444 clk
= clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk",
445 clkrst1_base
, BIT(0), CLK_SET_RATE_GATE
);
446 clk_register_clkdev(clk
, NULL
, "uart0");
448 clk
= clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk",
449 clkrst1_base
, BIT(1), CLK_SET_RATE_GATE
);
450 clk_register_clkdev(clk
, NULL
, "uart1");
452 clk
= clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk",
453 clkrst1_base
, BIT(2), CLK_SET_RATE_GATE
);
454 clk_register_clkdev(clk
, NULL
, "nmk-i2c.1");
456 clk
= clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk",
457 clkrst1_base
, BIT(3), CLK_SET_RATE_GATE
);
458 clk_register_clkdev(clk
, NULL
, "msp0");
459 clk_register_clkdev(clk
, NULL
, "dbx5x0-msp-i2s.0");
461 clk
= clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk",
462 clkrst1_base
, BIT(4), CLK_SET_RATE_GATE
);
463 clk_register_clkdev(clk
, NULL
, "msp1");
464 clk_register_clkdev(clk
, NULL
, "dbx5x0-msp-i2s.1");
466 clk
= clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmchclk",
467 clkrst1_base
, BIT(5), CLK_SET_RATE_GATE
);
468 clk_register_clkdev(clk
, NULL
, "sdi0");
470 clk
= clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk",
471 clkrst1_base
, BIT(6), CLK_SET_RATE_GATE
);
472 clk_register_clkdev(clk
, NULL
, "nmk-i2c.2");
474 clk
= clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk",
475 clkrst1_base
, BIT(8), CLK_SET_RATE_GATE
);
476 clk_register_clkdev(clk
, NULL
, "slimbus0");
478 clk
= clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk",
479 clkrst1_base
, BIT(9), CLK_SET_RATE_GATE
);
480 clk_register_clkdev(clk
, NULL
, "nmk-i2c.4");
482 clk
= clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk",
483 clkrst1_base
, BIT(10), CLK_SET_RATE_GATE
);
484 clk_register_clkdev(clk
, NULL
, "msp3");
485 clk_register_clkdev(clk
, NULL
, "dbx5x0-msp-i2s.3");
487 /* Peripheral 2 : PRCC K-clocks */
488 clk
= clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk",
489 clkrst2_base
, BIT(0), CLK_SET_RATE_GATE
);
490 clk_register_clkdev(clk
, NULL
, "nmk-i2c.3");
492 clk
= clk_reg_prcc_kclk("p2_pwl_kclk", "rtc32k",
493 clkrst2_base
, BIT(1), CLK_SET_RATE_GATE
);
494 clk_register_clkdev(clk
, NULL
, "pwl");
496 clk
= clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmchclk",
497 clkrst2_base
, BIT(2), CLK_SET_RATE_GATE
);
498 clk_register_clkdev(clk
, NULL
, "sdi4");
500 clk
= clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk",
501 clkrst2_base
, BIT(3), CLK_SET_RATE_GATE
);
502 clk_register_clkdev(clk
, NULL
, "msp2");
503 clk_register_clkdev(clk
, NULL
, "dbx5x0-msp-i2s.2");
505 clk
= clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmchclk",
506 clkrst2_base
, BIT(4), CLK_SET_RATE_GATE
);
507 clk_register_clkdev(clk
, NULL
, "sdi1");
509 clk
= clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk",
510 clkrst2_base
, BIT(5), CLK_SET_RATE_GATE
);
511 clk_register_clkdev(clk
, NULL
, "sdi3");
513 clk
= clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk",
514 clkrst2_base
, BIT(6),
515 CLK_SET_RATE_GATE
|CLK_SET_RATE_PARENT
);
516 clk_register_clkdev(clk
, "hsir_hsirxclk", "ste_hsi.0");
518 clk
= clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk",
519 clkrst2_base
, BIT(7),
520 CLK_SET_RATE_GATE
|CLK_SET_RATE_PARENT
);
521 clk_register_clkdev(clk
, "hsit_hsitxclk", "ste_hsi.0");
523 /* Should only be 9540, but might be added for 85xx as well */
524 clk
= clk_reg_prcc_kclk("p2_msp4_kclk", "msp02clk",
525 clkrst2_base
, BIT(9), CLK_SET_RATE_GATE
);
526 clk_register_clkdev(clk
, NULL
, "msp4");
527 clk_register_clkdev(clk
, "msp4", "ab85xx-codec.0");
529 /* Peripheral 3 : PRCC K-clocks */
530 clk
= clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk",
531 clkrst3_base
, BIT(1), CLK_SET_RATE_GATE
);
532 clk_register_clkdev(clk
, NULL
, "ssp0");
534 clk
= clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk",
535 clkrst3_base
, BIT(2), CLK_SET_RATE_GATE
);
536 clk_register_clkdev(clk
, NULL
, "ssp1");
538 clk
= clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk",
539 clkrst3_base
, BIT(3), CLK_SET_RATE_GATE
);
540 clk_register_clkdev(clk
, NULL
, "nmk-i2c.0");
542 clk
= clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmchclk",
543 clkrst3_base
, BIT(4), CLK_SET_RATE_GATE
);
544 clk_register_clkdev(clk
, NULL
, "sdi2");
546 clk
= clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k",
547 clkrst3_base
, BIT(5), CLK_SET_RATE_GATE
);
548 clk_register_clkdev(clk
, NULL
, "ske");
549 clk_register_clkdev(clk
, NULL
, "nmk-ske-keypad");
551 clk
= clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk",
552 clkrst3_base
, BIT(6), CLK_SET_RATE_GATE
);
553 clk_register_clkdev(clk
, NULL
, "uart2");
555 clk
= clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk",
556 clkrst3_base
, BIT(7), CLK_SET_RATE_GATE
);
557 clk_register_clkdev(clk
, NULL
, "sdi5");
559 clk
= clk_reg_prcc_kclk("p3_i2c5_kclk", "i2cclk",
560 clkrst3_base
, BIT(8), CLK_SET_RATE_GATE
);
561 clk_register_clkdev(clk
, NULL
, "nmk-i2c.5");
563 clk
= clk_reg_prcc_kclk("p3_i2c6_kclk", "i2cclk",
564 clkrst3_base
, BIT(9), CLK_SET_RATE_GATE
);
565 clk_register_clkdev(clk
, NULL
, "nmk-i2c.6");
567 clk
= clk_reg_prcc_kclk("p3_uart3_kclk", "uartclk",
568 clkrst3_base
, BIT(10), CLK_SET_RATE_GATE
);
569 clk_register_clkdev(clk
, NULL
, "uart3");
571 clk
= clk_reg_prcc_kclk("p3_uart4_kclk", "uartclk",
572 clkrst3_base
, BIT(11), CLK_SET_RATE_GATE
);
573 clk_register_clkdev(clk
, NULL
, "uart4");
575 /* Peripheral 6 : PRCC K-clocks */
576 clk
= clk_reg_prcc_kclk("p6_rng_kclk", "rngclk",
577 clkrst6_base
, BIT(0), CLK_SET_RATE_GATE
);
578 clk_register_clkdev(clk
, NULL
, "rng");