2 * OMAP DPLL clock support
4 * Copyright (C) 2013 Texas Instruments, Inc.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
13 * kind, whether express or implied; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
18 #include <linux/clk.h>
19 #include <linux/clk-provider.h>
20 #include <linux/slab.h>
21 #include <linux/err.h>
23 #include <linux/of_address.h>
24 #include <linux/clk/ti.h>
28 #define pr_fmt(fmt) "%s: " fmt, __func__
30 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
31 defined(CONFIG_SOC_DRA7XX)
32 static const struct clk_ops dpll_m4xen_ck_ops = {
33 .enable = &omap3_noncore_dpll_enable,
34 .disable = &omap3_noncore_dpll_disable,
35 .recalc_rate = &omap4_dpll_regm4xen_recalc,
36 .round_rate = &omap4_dpll_regm4xen_round_rate,
37 .set_rate = &omap3_noncore_dpll_set_rate,
38 .set_parent = &omap3_noncore_dpll_set_parent,
39 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
40 .determine_rate = &omap4_dpll_regm4xen_determine_rate,
41 .get_parent = &omap2_init_dpll_parent,
42 .save_context = &omap3_core_dpll_save_context,
43 .restore_context = &omap3_core_dpll_restore_context,
46 static const struct clk_ops dpll_m4xen_ck_ops = {};
49 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) || \
50 defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX) || \
51 defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
52 static const struct clk_ops dpll_core_ck_ops = {
53 .recalc_rate = &omap3_dpll_recalc,
54 .get_parent = &omap2_init_dpll_parent,
57 static const struct clk_ops dpll_ck_ops = {
58 .enable = &omap3_noncore_dpll_enable,
59 .disable = &omap3_noncore_dpll_disable,
60 .recalc_rate = &omap3_dpll_recalc,
61 .round_rate = &omap2_dpll_round_rate,
62 .set_rate = &omap3_noncore_dpll_set_rate,
63 .set_parent = &omap3_noncore_dpll_set_parent,
64 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
65 .determine_rate = &omap3_noncore_dpll_determine_rate,
66 .get_parent = &omap2_init_dpll_parent,
67 .save_context = &omap3_noncore_dpll_save_context,
68 .restore_context = &omap3_noncore_dpll_restore_context,
71 static const struct clk_ops dpll_no_gate_ck_ops = {
72 .recalc_rate = &omap3_dpll_recalc,
73 .get_parent = &omap2_init_dpll_parent,
74 .round_rate = &omap2_dpll_round_rate,
75 .set_rate = &omap3_noncore_dpll_set_rate,
76 .set_parent = &omap3_noncore_dpll_set_parent,
77 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
78 .determine_rate = &omap3_noncore_dpll_determine_rate,
79 .save_context = &omap3_noncore_dpll_save_context,
80 .restore_context = &omap3_noncore_dpll_restore_context
83 static const struct clk_ops dpll_core_ck_ops = {};
84 static const struct clk_ops dpll_ck_ops = {};
85 static const struct clk_ops dpll_no_gate_ck_ops = {};
86 const struct clk_hw_omap_ops clkhwops_omap3_dpll = {};
89 #ifdef CONFIG_ARCH_OMAP2
90 static const struct clk_ops omap2_dpll_core_ck_ops = {
91 .get_parent = &omap2_init_dpll_parent,
92 .recalc_rate = &omap2_dpllcore_recalc,
93 .round_rate = &omap2_dpll_round_rate,
94 .set_rate = &omap2_reprogram_dpllcore,
97 static const struct clk_ops omap2_dpll_core_ck_ops = {};
100 #ifdef CONFIG_ARCH_OMAP3
101 static const struct clk_ops omap3_dpll_core_ck_ops = {
102 .get_parent = &omap2_init_dpll_parent,
103 .recalc_rate = &omap3_dpll_recalc,
104 .round_rate = &omap2_dpll_round_rate,
107 static const struct clk_ops omap3_dpll_core_ck_ops = {};
110 #ifdef CONFIG_ARCH_OMAP3
111 static const struct clk_ops omap3_dpll_ck_ops = {
112 .enable = &omap3_noncore_dpll_enable,
113 .disable = &omap3_noncore_dpll_disable,
114 .get_parent = &omap2_init_dpll_parent,
115 .recalc_rate = &omap3_dpll_recalc,
116 .set_rate = &omap3_noncore_dpll_set_rate,
117 .set_parent = &omap3_noncore_dpll_set_parent,
118 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
119 .determine_rate = &omap3_noncore_dpll_determine_rate,
120 .round_rate = &omap2_dpll_round_rate,
123 static const struct clk_ops omap3_dpll5_ck_ops = {
124 .enable = &omap3_noncore_dpll_enable,
125 .disable = &omap3_noncore_dpll_disable,
126 .get_parent = &omap2_init_dpll_parent,
127 .recalc_rate = &omap3_dpll_recalc,
128 .set_rate = &omap3_dpll5_set_rate,
129 .set_parent = &omap3_noncore_dpll_set_parent,
130 .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent,
131 .determine_rate = &omap3_noncore_dpll_determine_rate,
132 .round_rate = &omap2_dpll_round_rate,
135 static const struct clk_ops omap3_dpll_per_ck_ops = {
136 .enable = &omap3_noncore_dpll_enable,
137 .disable = &omap3_noncore_dpll_disable,
138 .get_parent = &omap2_init_dpll_parent,
139 .recalc_rate = &omap3_dpll_recalc,
140 .set_rate = &omap3_dpll4_set_rate,
141 .set_parent = &omap3_noncore_dpll_set_parent,
142 .set_rate_and_parent = &omap3_dpll4_set_rate_and_parent,
143 .determine_rate = &omap3_noncore_dpll_determine_rate,
144 .round_rate = &omap2_dpll_round_rate,
148 static const struct clk_ops dpll_x2_ck_ops = {
149 .recalc_rate = &omap3_clkoutx2_recalc,
153 * _register_dpll - low level registration of a DPLL clock
154 * @user: pointer to the hardware clock definition for the clock
155 * @node: device node for the clock
157 * Finalizes DPLL registration process. In case a failure (clk-ref or
158 * clk-bypass is missing), the clock is added to retry list and
159 * the initialization is retried on later stage.
161 static void __init _register_dpll(void *user,
162 struct device_node *node)
164 struct clk_hw *hw = user;
165 struct clk_hw_omap *clk_hw = to_clk_hw_omap(hw);
166 struct dpll_data *dd = clk_hw->dpll_data;
168 const struct clk_init_data *init = hw->init;
170 clk = of_clk_get(node, 0);
172 pr_debug("clk-ref missing for %pOFn, retry later\n",
174 if (!ti_clk_retry_init(node, hw, _register_dpll))
180 dd->clk_ref = __clk_get_hw(clk);
182 clk = of_clk_get(node, 1);
185 pr_debug("clk-bypass missing for %pOFn, retry later\n",
187 if (!ti_clk_retry_init(node, hw, _register_dpll))
193 dd->clk_bypass = __clk_get_hw(clk);
195 /* register the clock */
196 clk = ti_clk_register_omap_hw(NULL, &clk_hw->hw, node->name);
199 of_clk_add_provider(node, of_clk_src_simple_get, clk);
200 kfree(init->parent_names);
206 kfree(clk_hw->dpll_data);
207 kfree(init->parent_names);
212 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
213 defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \
214 defined(CONFIG_SOC_AM43XX)
216 * _register_dpll_x2 - Registers a DPLLx2 clock
217 * @node: device node for this clock
218 * @ops: clk_ops for this clock
219 * @hw_ops: clk_hw_ops for this clock
221 * Initializes a DPLL x 2 clock from device tree data.
223 static void _register_dpll_x2(struct device_node *node,
224 const struct clk_ops *ops,
225 const struct clk_hw_omap_ops *hw_ops)
228 struct clk_init_data init = { NULL };
229 struct clk_hw_omap *clk_hw;
230 const char *name = node->name;
231 const char *parent_name;
233 parent_name = of_clk_get_parent_name(node, 0);
235 pr_err("%pOFn must have parent\n", node);
239 clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
243 clk_hw->ops = hw_ops;
244 clk_hw->hw.init = &init;
248 init.parent_names = &parent_name;
249 init.num_parents = 1;
251 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
252 defined(CONFIG_SOC_DRA7XX)
253 if (hw_ops == &clkhwops_omap4_dpllmx) {
256 /* Check if register defined, if not, drop hw-ops */
257 ret = of_property_count_elems_of_size(node, "reg", 1);
260 } else if (ti_clk_get_reg_addr(node, 0, &clk_hw->clksel_reg)) {
267 /* register the clock */
268 clk = ti_clk_register_omap_hw(NULL, &clk_hw->hw, name);
273 of_clk_add_provider(node, of_clk_src_simple_get, clk);
278 * of_ti_dpll_setup - Setup function for OMAP DPLL clocks
279 * @node: device node containing the DPLL info
280 * @ops: ops for the DPLL
281 * @ddt: DPLL data template to use
283 * Initializes a DPLL clock from device tree data.
285 static void __init of_ti_dpll_setup(struct device_node *node,
286 const struct clk_ops *ops,
287 const struct dpll_data *ddt)
289 struct clk_hw_omap *clk_hw = NULL;
290 struct clk_init_data *init = NULL;
291 const char **parent_names = NULL;
292 struct dpll_data *dd = NULL;
297 dd = kmemdup(ddt, sizeof(*dd), GFP_KERNEL);
298 clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
299 init = kzalloc(sizeof(*init), GFP_KERNEL);
300 if (!dd || !clk_hw || !init)
303 clk_hw->dpll_data = dd;
304 clk_hw->ops = &clkhwops_omap3_dpll;
305 clk_hw->hw.init = init;
307 init->name = node->name;
310 init->num_parents = of_clk_get_parent_count(node);
311 if (!init->num_parents) {
312 pr_err("%pOFn must have parent(s)\n", node);
316 parent_names = kcalloc(init->num_parents, sizeof(char *), GFP_KERNEL);
320 of_clk_parent_fill(node, parent_names, init->num_parents);
322 init->parent_names = parent_names;
324 if (ti_clk_get_reg_addr(node, 0, &dd->control_reg))
328 * Special case for OMAP2 DPLL, register order is different due to
329 * missing idlest_reg, also clkhwops is different. Detected from
330 * missing idlest_mask.
332 if (!dd->idlest_mask) {
333 if (ti_clk_get_reg_addr(node, 1, &dd->mult_div1_reg))
335 #ifdef CONFIG_ARCH_OMAP2
336 clk_hw->ops = &clkhwops_omap2xxx_dpll;
337 omap2xxx_clkt_dpllcore_init(&clk_hw->hw);
340 if (ti_clk_get_reg_addr(node, 1, &dd->idlest_reg))
343 if (ti_clk_get_reg_addr(node, 2, &dd->mult_div1_reg))
347 if (dd->autoidle_mask) {
348 if (ti_clk_get_reg_addr(node, 3, &dd->autoidle_reg))
356 if (dd->ssc_deltam_int_mask && dd->ssc_deltam_frac_mask &&
357 dd->ssc_modfreq_mant_mask && dd->ssc_modfreq_exp_mask) {
358 if (ti_clk_get_reg_addr(node, ssc_clk_index++,
359 &dd->ssc_deltam_reg))
362 if (ti_clk_get_reg_addr(node, ssc_clk_index++,
363 &dd->ssc_modfreq_reg))
366 of_property_read_u32(node, "ti,ssc-modfreq-hz",
368 of_property_read_u32(node, "ti,ssc-deltam", &dd->ssc_deltam);
370 of_property_read_bool(node, "ti,ssc-downspread");
373 if (of_property_read_bool(node, "ti,low-power-stop"))
374 dpll_mode |= 1 << DPLL_LOW_POWER_STOP;
376 if (of_property_read_bool(node, "ti,low-power-bypass"))
377 dpll_mode |= 1 << DPLL_LOW_POWER_BYPASS;
379 if (of_property_read_bool(node, "ti,lock"))
380 dpll_mode |= 1 << DPLL_LOCKED;
382 if (!of_property_read_u32(node, "ti,min-div", &min_div) &&
383 min_div > dd->min_divider)
384 dd->min_divider = min_div;
387 dd->modes = dpll_mode;
389 _register_dpll(&clk_hw->hw, node);
399 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
400 defined(CONFIG_SOC_DRA7XX)
401 static void __init of_ti_omap4_dpll_x2_setup(struct device_node *node)
403 _register_dpll_x2(node, &dpll_x2_ck_ops, &clkhwops_omap4_dpllmx);
405 CLK_OF_DECLARE(ti_omap4_dpll_x2_clock, "ti,omap4-dpll-x2-clock",
406 of_ti_omap4_dpll_x2_setup);
409 #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
410 static void __init of_ti_am3_dpll_x2_setup(struct device_node *node)
412 _register_dpll_x2(node, &dpll_x2_ck_ops, NULL);
414 CLK_OF_DECLARE(ti_am3_dpll_x2_clock, "ti,am3-dpll-x2-clock",
415 of_ti_am3_dpll_x2_setup);
418 #ifdef CONFIG_ARCH_OMAP3
419 static void __init of_ti_omap3_dpll_setup(struct device_node *node)
421 const struct dpll_data dd = {
424 .autoidle_mask = 0x7,
425 .mult_mask = 0x7ff << 8,
427 .max_multiplier = 2047,
430 .freqsel_mask = 0xf0,
431 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
434 if ((of_machine_is_compatible("ti,omap3630") ||
435 of_machine_is_compatible("ti,omap36xx")) &&
436 of_node_name_eq(node, "dpll5_ck"))
437 of_ti_dpll_setup(node, &omap3_dpll5_ck_ops, &dd);
439 of_ti_dpll_setup(node, &omap3_dpll_ck_ops, &dd);
441 CLK_OF_DECLARE(ti_omap3_dpll_clock, "ti,omap3-dpll-clock",
442 of_ti_omap3_dpll_setup);
444 static void __init of_ti_omap3_core_dpll_setup(struct device_node *node)
446 const struct dpll_data dd = {
449 .autoidle_mask = 0x7,
450 .mult_mask = 0x7ff << 16,
451 .div1_mask = 0x7f << 8,
452 .max_multiplier = 2047,
455 .freqsel_mask = 0xf0,
458 of_ti_dpll_setup(node, &omap3_dpll_core_ck_ops, &dd);
460 CLK_OF_DECLARE(ti_omap3_core_dpll_clock, "ti,omap3-dpll-core-clock",
461 of_ti_omap3_core_dpll_setup);
463 static void __init of_ti_omap3_per_dpll_setup(struct device_node *node)
465 const struct dpll_data dd = {
466 .idlest_mask = 0x1 << 1,
467 .enable_mask = 0x7 << 16,
468 .autoidle_mask = 0x7 << 3,
469 .mult_mask = 0x7ff << 8,
471 .max_multiplier = 2047,
474 .freqsel_mask = 0xf00000,
475 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
478 of_ti_dpll_setup(node, &omap3_dpll_per_ck_ops, &dd);
480 CLK_OF_DECLARE(ti_omap3_per_dpll_clock, "ti,omap3-dpll-per-clock",
481 of_ti_omap3_per_dpll_setup);
483 static void __init of_ti_omap3_per_jtype_dpll_setup(struct device_node *node)
485 const struct dpll_data dd = {
486 .idlest_mask = 0x1 << 1,
487 .enable_mask = 0x7 << 16,
488 .autoidle_mask = 0x7 << 3,
489 .mult_mask = 0xfff << 8,
491 .max_multiplier = 4095,
494 .sddiv_mask = 0xff << 24,
495 .dco_mask = 0xe << 20,
496 .flags = DPLL_J_TYPE,
497 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
500 of_ti_dpll_setup(node, &omap3_dpll_per_ck_ops, &dd);
502 CLK_OF_DECLARE(ti_omap3_per_jtype_dpll_clock, "ti,omap3-dpll-per-j-type-clock",
503 of_ti_omap3_per_jtype_dpll_setup);
506 static void __init of_ti_omap4_dpll_setup(struct device_node *node)
508 const struct dpll_data dd = {
511 .autoidle_mask = 0x7,
512 .mult_mask = 0x7ff << 8,
514 .max_multiplier = 2047,
517 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
520 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
522 CLK_OF_DECLARE(ti_omap4_dpll_clock, "ti,omap4-dpll-clock",
523 of_ti_omap4_dpll_setup);
525 static void __init of_ti_omap5_mpu_dpll_setup(struct device_node *node)
527 const struct dpll_data dd = {
530 .autoidle_mask = 0x7,
531 .mult_mask = 0x7ff << 8,
533 .max_multiplier = 2047,
536 .dcc_rate = 1400000000, /* DCC beyond 1.4GHz */
538 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
541 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
543 CLK_OF_DECLARE(of_ti_omap5_mpu_dpll_clock, "ti,omap5-mpu-dpll-clock",
544 of_ti_omap5_mpu_dpll_setup);
546 static void __init of_ti_omap4_core_dpll_setup(struct device_node *node)
548 const struct dpll_data dd = {
551 .autoidle_mask = 0x7,
552 .mult_mask = 0x7ff << 8,
554 .max_multiplier = 2047,
557 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
560 of_ti_dpll_setup(node, &dpll_core_ck_ops, &dd);
562 CLK_OF_DECLARE(ti_omap4_core_dpll_clock, "ti,omap4-dpll-core-clock",
563 of_ti_omap4_core_dpll_setup);
565 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
566 defined(CONFIG_SOC_DRA7XX)
567 static void __init of_ti_omap4_m4xen_dpll_setup(struct device_node *node)
569 const struct dpll_data dd = {
572 .autoidle_mask = 0x7,
573 .mult_mask = 0x7ff << 8,
575 .max_multiplier = 2047,
579 .lpmode_mask = 1 << 10,
580 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
583 of_ti_dpll_setup(node, &dpll_m4xen_ck_ops, &dd);
585 CLK_OF_DECLARE(ti_omap4_m4xen_dpll_clock, "ti,omap4-dpll-m4xen-clock",
586 of_ti_omap4_m4xen_dpll_setup);
588 static void __init of_ti_omap4_jtype_dpll_setup(struct device_node *node)
590 const struct dpll_data dd = {
593 .autoidle_mask = 0x7,
594 .mult_mask = 0xfff << 8,
596 .max_multiplier = 4095,
599 .sddiv_mask = 0xff << 24,
600 .flags = DPLL_J_TYPE,
601 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
604 of_ti_dpll_setup(node, &dpll_m4xen_ck_ops, &dd);
606 CLK_OF_DECLARE(ti_omap4_jtype_dpll_clock, "ti,omap4-dpll-j-type-clock",
607 of_ti_omap4_jtype_dpll_setup);
610 static void __init of_ti_am3_no_gate_dpll_setup(struct device_node *node)
612 const struct dpll_data dd = {
615 .ssc_enable_mask = 0x1 << 12,
616 .ssc_downspread_mask = 0x1 << 14,
617 .mult_mask = 0x7ff << 8,
619 .ssc_deltam_int_mask = 0x3 << 18,
620 .ssc_deltam_frac_mask = 0x3ffff,
621 .ssc_modfreq_mant_mask = 0x7f,
622 .ssc_modfreq_exp_mask = 0x7 << 8,
623 .max_multiplier = 2047,
626 .max_rate = 1000000000,
627 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
630 of_ti_dpll_setup(node, &dpll_no_gate_ck_ops, &dd);
632 CLK_OF_DECLARE(ti_am3_no_gate_dpll_clock, "ti,am3-dpll-no-gate-clock",
633 of_ti_am3_no_gate_dpll_setup);
635 static void __init of_ti_am3_jtype_dpll_setup(struct device_node *node)
637 const struct dpll_data dd = {
640 .mult_mask = 0x7ff << 8,
642 .max_multiplier = 4095,
645 .flags = DPLL_J_TYPE,
646 .max_rate = 2000000000,
647 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
650 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
652 CLK_OF_DECLARE(ti_am3_jtype_dpll_clock, "ti,am3-dpll-j-type-clock",
653 of_ti_am3_jtype_dpll_setup);
655 static void __init of_ti_am3_no_gate_jtype_dpll_setup(struct device_node *node)
657 const struct dpll_data dd = {
660 .mult_mask = 0x7ff << 8,
662 .max_multiplier = 2047,
665 .max_rate = 2000000000,
666 .flags = DPLL_J_TYPE,
667 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
670 of_ti_dpll_setup(node, &dpll_no_gate_ck_ops, &dd);
672 CLK_OF_DECLARE(ti_am3_no_gate_jtype_dpll_clock,
673 "ti,am3-dpll-no-gate-j-type-clock",
674 of_ti_am3_no_gate_jtype_dpll_setup);
676 static void __init of_ti_am3_dpll_setup(struct device_node *node)
678 const struct dpll_data dd = {
681 .ssc_enable_mask = 0x1 << 12,
682 .ssc_downspread_mask = 0x1 << 14,
683 .mult_mask = 0x7ff << 8,
685 .ssc_deltam_int_mask = 0x3 << 18,
686 .ssc_deltam_frac_mask = 0x3ffff,
687 .ssc_modfreq_mant_mask = 0x7f,
688 .ssc_modfreq_exp_mask = 0x7 << 8,
689 .max_multiplier = 2047,
692 .max_rate = 1000000000,
693 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
696 of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
698 CLK_OF_DECLARE(ti_am3_dpll_clock, "ti,am3-dpll-clock", of_ti_am3_dpll_setup);
700 static void __init of_ti_am3_core_dpll_setup(struct device_node *node)
702 const struct dpll_data dd = {
705 .mult_mask = 0x7ff << 8,
707 .max_multiplier = 2047,
710 .max_rate = 1000000000,
711 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
714 of_ti_dpll_setup(node, &dpll_core_ck_ops, &dd);
716 CLK_OF_DECLARE(ti_am3_core_dpll_clock, "ti,am3-dpll-core-clock",
717 of_ti_am3_core_dpll_setup);
719 static void __init of_ti_omap2_core_dpll_setup(struct device_node *node)
721 const struct dpll_data dd = {
723 .mult_mask = 0x3ff << 12,
724 .div1_mask = 0xf << 8,
729 of_ti_dpll_setup(node, &omap2_dpll_core_ck_ops, &dd);
731 CLK_OF_DECLARE(ti_omap2_core_dpll_clock, "ti,omap2-dpll-core-clock",
732 of_ti_omap2_core_dpll_setup);