blob: 6238b14c29e1a6436f5d5be4aa768c93f622eca5 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0
huang lin01aa7022015-11-17 14:20:16 +08002/*
3 * (C) Copyright 2015 Google, Inc
huang lin01aa7022015-11-17 14:20:16 +08004 */
5
6#include <common.h>
Stephen Warrena9622432016-06-17 09:44:00 -06007#include <clk-uclass.h>
huang lin01aa7022015-11-17 14:20:16 +08008#include <dm.h>
9#include <errno.h>
Simon Glass0f2af882020-05-10 11:40:05 -060010#include <log.h>
Simon Glass9bc15642020-02-03 07:36:16 -070011#include <malloc.h>
huang lin01aa7022015-11-17 14:20:16 +080012#include <syscon.h>
Kever Yang9fbe17c2019-03-28 11:01:23 +080013#include <asm/arch-rockchip/clock.h>
14#include <asm/arch-rockchip/cru_rk3036.h>
15#include <asm/arch-rockchip/hardware.h>
Simon Glass95588622020-12-22 19:30:28 -070016#include <dm/device-internal.h>
huang lin01aa7022015-11-17 14:20:16 +080017#include <dm/lists.h>
Simon Glass8d32f4b2016-01-21 19:43:38 -070018#include <dt-bindings/clock/rk3036-cru.h>
Simon Glassdbd79542020-05-10 11:40:11 -060019#include <linux/delay.h>
Heiko Stübner1b7dcc32016-07-22 23:51:06 +020020#include <linux/log2.h>
Simon Glassfb64e362020-05-10 11:40:09 -060021#include <linux/stringify.h>
huang lin01aa7022015-11-17 14:20:16 +080022
huang lin01aa7022015-11-17 14:20:16 +080023enum {
24 VCO_MAX_HZ = 2400U * 1000000,
25 VCO_MIN_HZ = 600 * 1000000,
26 OUTPUT_MAX_HZ = 2400U * 1000000,
27 OUTPUT_MIN_HZ = 24 * 1000000,
28};
29
30#define RATE_TO_DIV(input_rate, output_rate) \
31 ((input_rate) / (output_rate) - 1);
32
33#define DIV_TO_RATE(input_rate, div) ((input_rate) / ((div) + 1))
34
35#define PLL_DIVISORS(hz, _refdiv, _postdiv1, _postdiv2) {\
36 .refdiv = _refdiv,\
37 .fbdiv = (u32)((u64)hz * _refdiv * _postdiv1 * _postdiv2 / OSC_HZ),\
38 .postdiv1 = _postdiv1, .postdiv2 = _postdiv2};\
39 _Static_assert(((u64)hz * _refdiv * _postdiv1 * _postdiv2 / OSC_HZ) *\
40 OSC_HZ / (_refdiv * _postdiv1 * _postdiv2) == hz,\
41 #hz "Hz cannot be hit with PLL "\
42 "divisors on line " __stringify(__LINE__));
43
Kever Yangef5eb172017-06-13 10:03:11 +080044/* use integer mode*/
huang lin01aa7022015-11-17 14:20:16 +080045static const struct pll_div apll_init_cfg = PLL_DIVISORS(APLL_HZ, 1, 3, 1);
46static const struct pll_div gpll_init_cfg = PLL_DIVISORS(GPLL_HZ, 2, 2, 1);
47
huang lin01aa7022015-11-17 14:20:16 +080048static int rkclk_set_pll(struct rk3036_cru *cru, enum rk_clk_id clk_id,
49 const struct pll_div *div)
50{
51 int pll_id = rk_pll_id(clk_id);
52 struct rk3036_pll *pll = &cru->pll[pll_id];
53
54 /* All PLLs have same VCO and output frequency range restrictions. */
55 uint vco_hz = OSC_HZ / 1000 * div->fbdiv / div->refdiv * 1000;
56 uint output_hz = vco_hz / div->postdiv1 / div->postdiv2;
57
58 debug("PLL at %p: fbdiv=%d, refdiv=%d, postdiv1=%d, postdiv2=%d,\
59 vco=%u Hz, output=%u Hz\n",
60 pll, div->fbdiv, div->refdiv, div->postdiv1,
61 div->postdiv2, vco_hz, output_hz);
62 assert(vco_hz >= VCO_MIN_HZ && vco_hz <= VCO_MAX_HZ &&
63 output_hz >= OUTPUT_MIN_HZ && output_hz <= OUTPUT_MAX_HZ);
64
Kever Yangef5eb172017-06-13 10:03:11 +080065 /* use integer mode */
66 rk_setreg(&pll->con1, 1 << PLL_DSMPD_SHIFT);
huang lin01aa7022015-11-17 14:20:16 +080067
68 rk_clrsetreg(&pll->con0,
Kever Yangcb04ad22017-05-15 20:52:15 +080069 PLL_POSTDIV1_MASK | PLL_FBDIV_MASK,
huang lin01aa7022015-11-17 14:20:16 +080070 (div->postdiv1 << PLL_POSTDIV1_SHIFT) | div->fbdiv);
Kever Yangcb04ad22017-05-15 20:52:15 +080071 rk_clrsetreg(&pll->con1, PLL_POSTDIV2_MASK | PLL_REFDIV_MASK,
72 (div->postdiv2 << PLL_POSTDIV2_SHIFT |
73 div->refdiv << PLL_REFDIV_SHIFT));
huang lin01aa7022015-11-17 14:20:16 +080074
75 /* waiting for pll lock */
76 while (readl(&pll->con1) & (1 << PLL_LOCK_STATUS_SHIFT))
77 udelay(1);
78
79 return 0;
80}
81
82static void rkclk_init(struct rk3036_cru *cru)
83{
84 u32 aclk_div;
85 u32 hclk_div;
86 u32 pclk_div;
87
88 /* pll enter slow-mode */
89 rk_clrsetreg(&cru->cru_mode_con,
Kever Yangcb04ad22017-05-15 20:52:15 +080090 GPLL_MODE_MASK | APLL_MODE_MASK,
huang lin01aa7022015-11-17 14:20:16 +080091 GPLL_MODE_SLOW << GPLL_MODE_SHIFT |
92 APLL_MODE_SLOW << APLL_MODE_SHIFT);
93
94 /* init pll */
95 rkclk_set_pll(cru, CLK_ARM, &apll_init_cfg);
96 rkclk_set_pll(cru, CLK_GENERAL, &gpll_init_cfg);
97
98 /*
Kever Yangcb04ad22017-05-15 20:52:15 +080099 * select apll as cpu/core clock pll source and
100 * set up dependent divisors for PERI and ACLK clocks.
huang lin01aa7022015-11-17 14:20:16 +0800101 * core hz : apll = 1:1
102 */
103 aclk_div = APLL_HZ / CORE_ACLK_HZ - 1;
104 assert((aclk_div + 1) * CORE_ACLK_HZ == APLL_HZ && aclk_div < 0x7);
105
106 pclk_div = APLL_HZ / CORE_PERI_HZ - 1;
107 assert((pclk_div + 1) * CORE_PERI_HZ == APLL_HZ && pclk_div < 0xf);
108
109 rk_clrsetreg(&cru->cru_clksel_con[0],
Kever Yangcb04ad22017-05-15 20:52:15 +0800110 CORE_CLK_PLL_SEL_MASK | CORE_DIV_CON_MASK,
huang lin01aa7022015-11-17 14:20:16 +0800111 CORE_CLK_PLL_SEL_APLL << CORE_CLK_PLL_SEL_SHIFT |
112 0 << CORE_DIV_CON_SHIFT);
113
114 rk_clrsetreg(&cru->cru_clksel_con[1],
Kever Yangcb04ad22017-05-15 20:52:15 +0800115 CORE_ACLK_DIV_MASK | CORE_PERI_DIV_MASK,
huang lin01aa7022015-11-17 14:20:16 +0800116 aclk_div << CORE_ACLK_DIV_SHIFT |
117 pclk_div << CORE_PERI_DIV_SHIFT);
118
119 /*
Kever Yangb45fc402017-05-15 20:52:16 +0800120 * select apll as pd_bus bus clock source and
huang lin01aa7022015-11-17 14:20:16 +0800121 * set up dependent divisors for PCLK/HCLK and ACLK clocks.
122 */
Kever Yangb45fc402017-05-15 20:52:16 +0800123 aclk_div = GPLL_HZ / BUS_ACLK_HZ - 1;
124 assert((aclk_div + 1) * BUS_ACLK_HZ == GPLL_HZ && aclk_div <= 0x1f);
huang lin01aa7022015-11-17 14:20:16 +0800125
Kever Yangb45fc402017-05-15 20:52:16 +0800126 pclk_div = GPLL_HZ / BUS_PCLK_HZ - 1;
127 assert((pclk_div + 1) * BUS_PCLK_HZ == GPLL_HZ && pclk_div <= 0x7);
huang lin01aa7022015-11-17 14:20:16 +0800128
Kever Yangb45fc402017-05-15 20:52:16 +0800129 hclk_div = GPLL_HZ / BUS_HCLK_HZ - 1;
130 assert((hclk_div + 1) * BUS_HCLK_HZ == GPLL_HZ && hclk_div <= 0x3);
huang lin01aa7022015-11-17 14:20:16 +0800131
132 rk_clrsetreg(&cru->cru_clksel_con[0],
Kever Yangcb04ad22017-05-15 20:52:15 +0800133 BUS_ACLK_PLL_SEL_MASK | BUS_ACLK_DIV_MASK,
Kever Yangb45fc402017-05-15 20:52:16 +0800134 BUS_ACLK_PLL_SEL_GPLL << BUS_ACLK_PLL_SEL_SHIFT |
Kever Yangcb04ad22017-05-15 20:52:15 +0800135 aclk_div << BUS_ACLK_DIV_SHIFT);
huang lin01aa7022015-11-17 14:20:16 +0800136
137 rk_clrsetreg(&cru->cru_clksel_con[1],
Kever Yangcb04ad22017-05-15 20:52:15 +0800138 BUS_PCLK_DIV_MASK | BUS_HCLK_DIV_MASK,
139 pclk_div << BUS_PCLK_DIV_SHIFT |
140 hclk_div << BUS_HCLK_DIV_SHIFT);
huang lin01aa7022015-11-17 14:20:16 +0800141
142 /*
Kever Yangcb04ad22017-05-15 20:52:15 +0800143 * select gpll as pd_peri bus clock source and
huang lin01aa7022015-11-17 14:20:16 +0800144 * set up dependent divisors for PCLK/HCLK and ACLK clocks.
145 */
146 aclk_div = GPLL_HZ / PERI_ACLK_HZ - 1;
147 assert((aclk_div + 1) * PERI_ACLK_HZ == GPLL_HZ && aclk_div < 0x1f);
148
Heiko Stübner1b7dcc32016-07-22 23:51:06 +0200149 hclk_div = ilog2(PERI_ACLK_HZ / PERI_HCLK_HZ);
huang lin01aa7022015-11-17 14:20:16 +0800150 assert((1 << hclk_div) * PERI_HCLK_HZ ==
Kever Yangb45fc402017-05-15 20:52:16 +0800151 PERI_ACLK_HZ && (hclk_div < 0x4));
huang lin01aa7022015-11-17 14:20:16 +0800152
Heiko Stübner1b7dcc32016-07-22 23:51:06 +0200153 pclk_div = ilog2(PERI_ACLK_HZ / PERI_PCLK_HZ);
huang lin01aa7022015-11-17 14:20:16 +0800154 assert((1 << pclk_div) * PERI_PCLK_HZ ==
155 PERI_ACLK_HZ && pclk_div < 0x8);
156
157 rk_clrsetreg(&cru->cru_clksel_con[10],
Kever Yangcb04ad22017-05-15 20:52:15 +0800158 PERI_PLL_SEL_MASK | PERI_PCLK_DIV_MASK |
159 PERI_HCLK_DIV_MASK | PERI_ACLK_DIV_MASK,
huang lin01aa7022015-11-17 14:20:16 +0800160 PERI_PLL_GPLL << PERI_PLL_SEL_SHIFT |
161 pclk_div << PERI_PCLK_DIV_SHIFT |
162 hclk_div << PERI_HCLK_DIV_SHIFT |
163 aclk_div << PERI_ACLK_DIV_SHIFT);
164
165 /* PLL enter normal-mode */
166 rk_clrsetreg(&cru->cru_mode_con,
Kever Yangcb04ad22017-05-15 20:52:15 +0800167 GPLL_MODE_MASK | APLL_MODE_MASK,
huang lin01aa7022015-11-17 14:20:16 +0800168 GPLL_MODE_NORM << GPLL_MODE_SHIFT |
169 APLL_MODE_NORM << APLL_MODE_SHIFT);
170}
171
172/* Get pll rate by id */
173static uint32_t rkclk_pll_get_rate(struct rk3036_cru *cru,
174 enum rk_clk_id clk_id)
175{
176 uint32_t refdiv, fbdiv, postdiv1, postdiv2;
177 uint32_t con;
178 int pll_id = rk_pll_id(clk_id);
179 struct rk3036_pll *pll = &cru->pll[pll_id];
180 static u8 clk_shift[CLK_COUNT] = {
181 0xff, APLL_MODE_SHIFT, DPLL_MODE_SHIFT, 0xff,
182 GPLL_MODE_SHIFT, 0xff
183 };
Kever Yangcb04ad22017-05-15 20:52:15 +0800184 static u32 clk_mask[CLK_COUNT] = {
185 0xffffffff, APLL_MODE_MASK, DPLL_MODE_MASK, 0xffffffff,
186 GPLL_MODE_MASK, 0xffffffff
huang lin01aa7022015-11-17 14:20:16 +0800187 };
188 uint shift;
189 uint mask;
190
191 con = readl(&cru->cru_mode_con);
192 shift = clk_shift[clk_id];
193 mask = clk_mask[clk_id];
194
Kever Yangcb04ad22017-05-15 20:52:15 +0800195 switch ((con & mask) >> shift) {
huang lin01aa7022015-11-17 14:20:16 +0800196 case GPLL_MODE_SLOW:
197 return OSC_HZ;
198 case GPLL_MODE_NORM:
199
200 /* normal mode */
201 con = readl(&pll->con0);
Kever Yangcb04ad22017-05-15 20:52:15 +0800202 postdiv1 = (con & PLL_POSTDIV1_MASK) >> PLL_POSTDIV1_SHIFT;
203 fbdiv = (con & PLL_FBDIV_MASK) >> PLL_FBDIV_SHIFT;
huang lin01aa7022015-11-17 14:20:16 +0800204 con = readl(&pll->con1);
Kever Yangcb04ad22017-05-15 20:52:15 +0800205 postdiv2 = (con & PLL_POSTDIV2_MASK) >> PLL_POSTDIV2_SHIFT;
206 refdiv = (con & PLL_REFDIV_MASK) >> PLL_REFDIV_SHIFT;
huang lin01aa7022015-11-17 14:20:16 +0800207 return (24 * fbdiv / (refdiv * postdiv1 * postdiv2)) * 1000000;
208 case GPLL_MODE_DEEP:
209 default:
210 return 32768;
211 }
212}
213
214static ulong rockchip_mmc_get_clk(struct rk3036_cru *cru, uint clk_general_rate,
Simon Glass8d32f4b2016-01-21 19:43:38 -0700215 int periph)
huang lin01aa7022015-11-17 14:20:16 +0800216{
217 uint src_rate;
218 uint div, mux;
219 u32 con;
220
221 switch (periph) {
Simon Glass8d32f4b2016-01-21 19:43:38 -0700222 case HCLK_EMMC:
Xu Ziyuan6682b9b2017-04-16 17:44:43 +0800223 case SCLK_EMMC:
huang lin01aa7022015-11-17 14:20:16 +0800224 con = readl(&cru->cru_clksel_con[12]);
Kever Yangcb04ad22017-05-15 20:52:15 +0800225 mux = (con & EMMC_PLL_MASK) >> EMMC_PLL_SHIFT;
226 div = (con & EMMC_DIV_MASK) >> EMMC_DIV_SHIFT;
huang lin01aa7022015-11-17 14:20:16 +0800227 break;
Simon Glass8d32f4b2016-01-21 19:43:38 -0700228 case HCLK_SDIO:
Xu Ziyuan6682b9b2017-04-16 17:44:43 +0800229 case SCLK_SDIO:
huang lin01aa7022015-11-17 14:20:16 +0800230 con = readl(&cru->cru_clksel_con[12]);
Kever Yangcb04ad22017-05-15 20:52:15 +0800231 mux = (con & MMC0_PLL_MASK) >> MMC0_PLL_SHIFT;
232 div = (con & MMC0_DIV_MASK) >> MMC0_DIV_SHIFT;
huang lin01aa7022015-11-17 14:20:16 +0800233 break;
234 default:
235 return -EINVAL;
236 }
237
238 src_rate = mux == EMMC_SEL_24M ? OSC_HZ : clk_general_rate;
Kever Yang99b546d2017-07-27 12:54:01 +0800239 return DIV_TO_RATE(src_rate, div) / 2;
huang lin01aa7022015-11-17 14:20:16 +0800240}
241
242static ulong rockchip_mmc_set_clk(struct rk3036_cru *cru, uint clk_general_rate,
Simon Glass8d32f4b2016-01-21 19:43:38 -0700243 int periph, uint freq)
huang lin01aa7022015-11-17 14:20:16 +0800244{
245 int src_clk_div;
246 int mux;
247
248 debug("%s: clk_general_rate=%u\n", __func__, clk_general_rate);
249
250 /* mmc clock auto divide 2 in internal */
Kever Yang99b546d2017-07-27 12:54:01 +0800251 src_clk_div = DIV_ROUND_UP(clk_general_rate / 2, freq);
huang lin01aa7022015-11-17 14:20:16 +0800252
Kever Yangf20995b2017-07-27 12:54:02 +0800253 if (src_clk_div > 128) {
Kever Yang99b546d2017-07-27 12:54:01 +0800254 src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq);
Kever Yangf20995b2017-07-27 12:54:02 +0800255 assert(src_clk_div - 1 < 128);
huang lin01aa7022015-11-17 14:20:16 +0800256 mux = EMMC_SEL_24M;
257 } else {
258 mux = EMMC_SEL_GPLL;
259 }
260
261 switch (periph) {
Simon Glass8d32f4b2016-01-21 19:43:38 -0700262 case HCLK_EMMC:
Xu Ziyuan6682b9b2017-04-16 17:44:43 +0800263 case SCLK_EMMC:
huang lin01aa7022015-11-17 14:20:16 +0800264 rk_clrsetreg(&cru->cru_clksel_con[12],
Kever Yangcb04ad22017-05-15 20:52:15 +0800265 EMMC_PLL_MASK | EMMC_DIV_MASK,
huang lin01aa7022015-11-17 14:20:16 +0800266 mux << EMMC_PLL_SHIFT |
267 (src_clk_div - 1) << EMMC_DIV_SHIFT);
268 break;
Simon Glass8d32f4b2016-01-21 19:43:38 -0700269 case HCLK_SDIO:
Xu Ziyuan6682b9b2017-04-16 17:44:43 +0800270 case SCLK_SDIO:
huang lin01aa7022015-11-17 14:20:16 +0800271 rk_clrsetreg(&cru->cru_clksel_con[11],
Kever Yangcb04ad22017-05-15 20:52:15 +0800272 MMC0_PLL_MASK | MMC0_DIV_MASK,
huang lin01aa7022015-11-17 14:20:16 +0800273 mux << MMC0_PLL_SHIFT |
274 (src_clk_div - 1) << MMC0_DIV_SHIFT);
275 break;
276 default:
277 return -EINVAL;
278 }
279
280 return rockchip_mmc_get_clk(cru, clk_general_rate, periph);
281}
282
Stephen Warrena9622432016-06-17 09:44:00 -0600283static ulong rk3036_clk_get_rate(struct clk *clk)
huang lin01aa7022015-11-17 14:20:16 +0800284{
Stephen Warrena9622432016-06-17 09:44:00 -0600285 struct rk3036_clk_priv *priv = dev_get_priv(clk->dev);
huang lin01aa7022015-11-17 14:20:16 +0800286
Stephen Warrena9622432016-06-17 09:44:00 -0600287 switch (clk->id) {
288 case 0 ... 63:
289 return rkclk_pll_get_rate(priv->cru, clk->id);
290 default:
291 return -ENOENT;
292 }
huang lin01aa7022015-11-17 14:20:16 +0800293}
294
Stephen Warrena9622432016-06-17 09:44:00 -0600295static ulong rk3036_clk_set_rate(struct clk *clk, ulong rate)
huang lin01aa7022015-11-17 14:20:16 +0800296{
Stephen Warrena9622432016-06-17 09:44:00 -0600297 struct rk3036_clk_priv *priv = dev_get_priv(clk->dev);
298 ulong new_rate, gclk_rate;
huang lin01aa7022015-11-17 14:20:16 +0800299
Stephen Warrena9622432016-06-17 09:44:00 -0600300 gclk_rate = rkclk_pll_get_rate(priv->cru, CLK_GENERAL);
301 switch (clk->id) {
302 case 0 ... 63:
303 return 0;
Simon Glass8d32f4b2016-01-21 19:43:38 -0700304 case HCLK_EMMC:
Xu Ziyuan6682b9b2017-04-16 17:44:43 +0800305 case SCLK_EMMC:
Stephen Warrena9622432016-06-17 09:44:00 -0600306 new_rate = rockchip_mmc_set_clk(priv->cru, gclk_rate,
307 clk->id, rate);
huang lin01aa7022015-11-17 14:20:16 +0800308 break;
309 default:
310 return -ENOENT;
311 }
312
313 return new_rate;
314}
315
316static struct clk_ops rk3036_clk_ops = {
317 .get_rate = rk3036_clk_get_rate,
318 .set_rate = rk3036_clk_set_rate,
huang lin01aa7022015-11-17 14:20:16 +0800319};
320
Simon Glassaad29ae2020-12-03 16:55:21 -0700321static int rk3036_clk_of_to_plat(struct udevice *dev)
huang lin01aa7022015-11-17 14:20:16 +0800322{
huang lin01aa7022015-11-17 14:20:16 +0800323 struct rk3036_clk_priv *priv = dev_get_priv(dev);
324
Kever Yangd7d162c2018-02-11 11:53:05 +0800325 priv->cru = dev_read_addr_ptr(dev);
Kever Yang1e05ff12018-04-24 11:27:06 +0800326
327 return 0;
328}
329
330static int rk3036_clk_probe(struct udevice *dev)
331{
332 struct rk3036_clk_priv *priv = dev_get_priv(dev);
333
huang lin01aa7022015-11-17 14:20:16 +0800334 rkclk_init(priv->cru);
335
336 return 0;
337}
338
huang lin01aa7022015-11-17 14:20:16 +0800339static int rk3036_clk_bind(struct udevice *dev)
340{
Stephen Warrena9622432016-06-17 09:44:00 -0600341 int ret;
Kever Yang4fbb6c22017-11-03 15:16:13 +0800342 struct udevice *sys_child;
343 struct sysreset_reg *priv;
huang lin01aa7022015-11-17 14:20:16 +0800344
345 /* The reset driver does not have a device node, so bind it here */
Kever Yang4fbb6c22017-11-03 15:16:13 +0800346 ret = device_bind_driver(dev, "rockchip_sysreset", "sysreset",
347 &sys_child);
348 if (ret) {
349 debug("Warning: No sysreset driver: ret=%d\n", ret);
350 } else {
351 priv = malloc(sizeof(struct sysreset_reg));
352 priv->glb_srst_fst_value = offsetof(struct rk3036_cru,
353 cru_glb_srst_fst_value);
354 priv->glb_srst_snd_value = offsetof(struct rk3036_cru,
355 cru_glb_srst_snd_value);
Simon Glass95588622020-12-22 19:30:28 -0700356 dev_set_priv(sys_child, priv);
Kever Yang4fbb6c22017-11-03 15:16:13 +0800357 }
huang lin01aa7022015-11-17 14:20:16 +0800358
Heiko Stuebner416f8d32019-11-09 00:06:30 +0100359#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
Elaine Zhang432976f2017-12-19 18:22:38 +0800360 ret = offsetof(struct rk3036_cru, cru_softrst_con[0]);
361 ret = rockchip_reset_bind(dev, ret, 9);
362 if (ret)
Eugen Hristevf1798262023-04-11 10:17:56 +0300363 debug("Warning: software reset driver bind failed\n");
Elaine Zhang432976f2017-12-19 18:22:38 +0800364#endif
365
huang lin01aa7022015-11-17 14:20:16 +0800366 return 0;
367}
368
369static const struct udevice_id rk3036_clk_ids[] = {
370 { .compatible = "rockchip,rk3036-cru" },
371 { }
372};
373
Simon Glass3814f0e2016-10-01 20:04:50 -0600374U_BOOT_DRIVER(rockchip_rk3036_cru) = {
huang lin01aa7022015-11-17 14:20:16 +0800375 .name = "clk_rk3036",
376 .id = UCLASS_CLK,
377 .of_match = rk3036_clk_ids,
Simon Glass8a2b47f2020-12-03 16:55:17 -0700378 .priv_auto = sizeof(struct rk3036_clk_priv),
Simon Glassaad29ae2020-12-03 16:55:21 -0700379 .of_to_plat = rk3036_clk_of_to_plat,
huang lin01aa7022015-11-17 14:20:16 +0800380 .ops = &rk3036_clk_ops,
381 .bind = rk3036_clk_bind,
382 .probe = rk3036_clk_probe,
383};