Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: OMAP5: Fix the bypass clock source for dpll_iva and others

Fixes 85dc74e9 (ARM: dts: omap5 clock data)

On OMAP54xx, For DPLL_IVA, the ref clock(CLKINP) is connected to sys_clk1 and
the bypass input(CLKINPULOW) is connected to iva_dpll_hs_clk_div clock.
But the bypass input is not directly routed to bypass clkout instead
both CLKINP and CLKINPULOW are connected to bypass clkout via a mux.

This mux is controlled by the bit - CM_CLKSEL_DPLL_IVA[23]:DPLL_BYP_CLKSEL
and it's POR value is zero which selects the CLKINP as bypass clkout.
which means iva_dpll_hs_clk_div is not the bypass clock for dpll_iva_ck

Fix this by adding another mux clock as parent in bypass mode.

This design is common to most of the PLLs and the rest have only one bypass
clock. Below is a list of the DPLLs that need this fix:

DPLL_IVA,
DPLL_PER,
DPLL_USB and DPLL_CORE

Signed-off-by: Ravikumar Kattekola <rk@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

authored by

Ravikumar Kattekola and committed by
Tony Lindgren
ac92abcb d2192ea0

+37 -4
+37 -4
arch/arm/boot/dts/omap54xx-clocks.dtsi
··· 167 167 ti,index-starts-at-one; 168 168 }; 169 169 170 + dpll_core_byp_mux: dpll_core_byp_mux { 171 + #clock-cells = <0>; 172 + compatible = "ti,mux-clock"; 173 + clocks = <&sys_clkin>, <&dpll_abe_m3x2_ck>; 174 + ti,bit-shift = <23>; 175 + reg = <0x012c>; 176 + }; 177 + 170 178 dpll_core_ck: dpll_core_ck { 171 179 #clock-cells = <0>; 172 180 compatible = "ti,omap4-dpll-core-clock"; 173 - clocks = <&sys_clkin>, <&dpll_abe_m3x2_ck>; 181 + clocks = <&sys_clkin>, <&dpll_core_byp_mux>; 174 182 reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; 175 183 }; 176 184 ··· 302 294 clock-div = <1>; 303 295 }; 304 296 297 + dpll_iva_byp_mux: dpll_iva_byp_mux { 298 + #clock-cells = <0>; 299 + compatible = "ti,mux-clock"; 300 + clocks = <&sys_clkin>, <&iva_dpll_hs_clk_div>; 301 + ti,bit-shift = <23>; 302 + reg = <0x01ac>; 303 + }; 304 + 305 305 dpll_iva_ck: dpll_iva_ck { 306 306 #clock-cells = <0>; 307 307 compatible = "ti,omap4-dpll-clock"; 308 - clocks = <&sys_clkin>, <&iva_dpll_hs_clk_div>; 308 + clocks = <&sys_clkin>, <&dpll_iva_byp_mux>; 309 309 reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; 310 310 }; 311 311 ··· 615 599 }; 616 600 }; 617 601 &cm_core_clocks { 602 + 603 + dpll_per_byp_mux: dpll_per_byp_mux { 604 + #clock-cells = <0>; 605 + compatible = "ti,mux-clock"; 606 + clocks = <&sys_clkin>, <&per_dpll_hs_clk_div>; 607 + ti,bit-shift = <23>; 608 + reg = <0x014c>; 609 + }; 610 + 618 611 dpll_per_ck: dpll_per_ck { 619 612 #clock-cells = <0>; 620 613 compatible = "ti,omap4-dpll-clock"; 621 - clocks = <&sys_clkin>, <&per_dpll_hs_clk_div>; 614 + clocks = <&sys_clkin>, <&dpll_per_byp_mux>; 622 615 reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; 623 616 }; 624 617 ··· 739 714 ti,index-starts-at-one; 740 715 }; 741 716 717 + dpll_usb_byp_mux: dpll_usb_byp_mux { 718 + #clock-cells = <0>; 719 + compatible = "ti,mux-clock"; 720 + clocks = <&sys_clkin>, <&usb_dpll_hs_clk_div>; 721 + ti,bit-shift = <23>; 722 + reg = <0x018c>; 723 + }; 724 + 742 725 dpll_usb_ck: dpll_usb_ck { 743 726 #clock-cells = <0>; 744 727 compatible = "ti,omap4-dpll-j-type-clock"; 745 - clocks = <&sys_clkin>, <&usb_dpll_hs_clk_div>; 728 + clocks = <&sys_clkin>, <&dpll_usb_byp_mux>; 746 729 reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; 747 730 }; 748 731