Skip to content

Commit b4be018

Browse files
nmenonTero Kristo
authored andcommitted
CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies
MPU DPLL on OMAP5, DRA75x, DRA72x has a limitation on the maximum frequency it can be locked at. Duty Cycle Correction circuit is used to recover a correct duty cycle for achieving higher frequencies (hardware internally switches output to M3 output(CLKOUTHIF) from M2 output (CLKOUT)). So provide support to setup required data to handle Duty cycle by the setting up the minimum frequency for DPLL. 1.4GHz is common for all these devices and is based on Technical Reference Manual information for OMAP5432((SWPU282U) chapter 3.6.3.3.1 "DPLLs Output Clocks Parameters", and equivalent information from DRA75x, DRA72x documentation(SPRUHP2E, SPRUHI2P). Signed-off-by: Nishanth Menon <[email protected]> [[email protected]: updated for latest dpll init API call] Signed-off-by: Tero Kristo <[email protected]>
1 parent ce369a5 commit b4be018

File tree

2 files changed

+22
-0
lines changed
  • Documentation/devicetree/bindings/clock/ti
  • drivers/clk/ti

2 files changed

+22
-0
lines changed

Documentation/devicetree/bindings/clock/ti/dpll.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Required properties:
2424
"ti,omap4-dpll-core-clock",
2525
"ti,omap4-dpll-m4xen-clock",
2626
"ti,omap4-dpll-j-type-clock",
27+
"ti,omap5-mpu-dpll-clock",
2728
"ti,am3-dpll-no-gate-clock",
2829
"ti,am3-dpll-j-type-clock",
2930
"ti,am3-dpll-no-gate-j-type-clock",

drivers/clk/ti/dpll.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,27 @@ static void __init of_ti_omap4_dpll_setup(struct device_node *node)
433433
CLK_OF_DECLARE(ti_omap4_dpll_clock, "ti,omap4-dpll-clock",
434434
of_ti_omap4_dpll_setup);
435435

436+
static void __init of_ti_omap5_mpu_dpll_setup(struct device_node *node)
437+
{
438+
const struct dpll_data dd = {
439+
.idlest_mask = 0x1,
440+
.enable_mask = 0x7,
441+
.autoidle_mask = 0x7,
442+
.mult_mask = 0x7ff << 8,
443+
.div1_mask = 0x7f,
444+
.max_multiplier = 2047,
445+
.max_divider = 128,
446+
.dcc_mask = BIT(22),
447+
.dcc_rate = 1400000000, /* DCC beyond 1.4GHz */
448+
.min_divider = 1,
449+
.modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
450+
};
451+
452+
of_ti_dpll_setup(node, &dpll_ck_ops, &dd);
453+
}
454+
CLK_OF_DECLARE(of_ti_omap5_mpu_dpll_clock, "ti,omap5-mpu-dpll-clock",
455+
of_ti_omap5_mpu_dpll_setup);
456+
436457
static void __init of_ti_omap4_core_dpll_setup(struct device_node *node)
437458
{
438459
const struct dpll_data dd = {

0 commit comments

Comments
 (0)