Commit fcd104b5 authored by Subhajit Paul's avatar Subhajit Paul Committed by Tony Lindgren

ARM: dts: dra7xx-clocks: Use DPLL_GPU for GPU clocks

The GPU has two functional clocks - GPU_CORE_GCLK and GPU_HYD_GCLK.
Both of these are mux clocks and are derived from the DPLL_CORE
H14 output clock CORE_GPU_CLK by default. These clocks can also be
be derived from DPLL_PER or DPLL_GPU.

The GPU DPLL provides the output clocks primarily for the GPU.
Configuring the GPU for different OPP clock frequencies is easier
to achieve when using the DPLL_GPU rather than the other two DPLLs
due to:
1. minimal affect on any other output clocks from these DPLLs
2. may require an impossible post-divider values on existing DPLLs
   without affecting other clocks.

So, switch the GPU functional clocks to be sourced from GPU DPLL by
default. This is done using the DT standard properties "assigned-clocks"
and "assigned-clock-parents". Newer u-boots (from 2017.01 onwards) reuse
and can update these properties to choose an appropriate one-time fixed
OPP configuration as all the required ABB/AVS setup is performed within
the bootloader. Note that there is no DVFS supported for any of the
non-MPU domains. The DPLL will automatically transition into a low-power
stop mode when the associated output clocks are not utilized or gated
automatically.

This patch also sets the initial values for the DPLL_GPU outputs.
These values are chosen based on the OPP_NOM values defined as per
recommendation from design team. The DPLL locked frequency is kept
at 1277 MHz, so that the value for the divider clock, dpll_gpu_m2_ck,
can be set to 425.67 MHz for OPP_NOM.
Signed-off-by: default avatarSubhajit Paul <subhajit_paul@ti.com>
[s-anna@ti.com: revise patch description]
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
Acked-by: default avatarTero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 32a04832
...@@ -414,6 +414,8 @@ dpll_gpu_ck: dpll_gpu_ck@2d8 { ...@@ -414,6 +414,8 @@ dpll_gpu_ck: dpll_gpu_ck@2d8 {
compatible = "ti,omap4-dpll-clock"; compatible = "ti,omap4-dpll-clock";
clocks = <&sys_clkin1>, <&dpll_gpu_byp_mux>; clocks = <&sys_clkin1>, <&dpll_gpu_byp_mux>;
reg = <0x02d8>, <0x02dc>, <0x02e4>, <0x02e0>; reg = <0x02d8>, <0x02dc>, <0x02e4>, <0x02e0>;
assigned-clocks = <&dpll_gpu_ck>;
assigned-clock-rates = <1277000000>;
}; };
dpll_gpu_m2_ck: dpll_gpu_m2_ck@2e8 { dpll_gpu_m2_ck: dpll_gpu_m2_ck@2e8 {
...@@ -425,6 +427,8 @@ dpll_gpu_m2_ck: dpll_gpu_m2_ck@2e8 { ...@@ -425,6 +427,8 @@ dpll_gpu_m2_ck: dpll_gpu_m2_ck@2e8 {
reg = <0x02e8>; reg = <0x02e8>;
ti,index-starts-at-one; ti,index-starts-at-one;
ti,invert-autoidle-bit; ti,invert-autoidle-bit;
assigned-clocks = <&dpll_gpu_m2_ck>;
assigned-clock-rates = <425666667>;
}; };
dpll_core_m2_ck: dpll_core_m2_ck@130 { dpll_core_m2_ck: dpll_core_m2_ck@130 {
...@@ -1760,6 +1764,8 @@ gpu_core_gclk_mux: gpu_core_gclk_mux@1220 { ...@@ -1760,6 +1764,8 @@ gpu_core_gclk_mux: gpu_core_gclk_mux@1220 {
clocks = <&dpll_core_h14x2_ck>, <&dpll_per_h14x2_ck>, <&dpll_gpu_m2_ck>; clocks = <&dpll_core_h14x2_ck>, <&dpll_per_h14x2_ck>, <&dpll_gpu_m2_ck>;
ti,bit-shift = <24>; ti,bit-shift = <24>;
reg = <0x1220>; reg = <0x1220>;
assigned-clocks = <&gpu_core_gclk_mux>;
assigned-clock-parents = <&dpll_gpu_m2_ck>;
}; };
gpu_hyd_gclk_mux: gpu_hyd_gclk_mux@1220 { gpu_hyd_gclk_mux: gpu_hyd_gclk_mux@1220 {
...@@ -1768,6 +1774,8 @@ gpu_hyd_gclk_mux: gpu_hyd_gclk_mux@1220 { ...@@ -1768,6 +1774,8 @@ gpu_hyd_gclk_mux: gpu_hyd_gclk_mux@1220 {
clocks = <&dpll_core_h14x2_ck>, <&dpll_per_h14x2_ck>, <&dpll_gpu_m2_ck>; clocks = <&dpll_core_h14x2_ck>, <&dpll_per_h14x2_ck>, <&dpll_gpu_m2_ck>;
ti,bit-shift = <26>; ti,bit-shift = <26>;
reg = <0x1220>; reg = <0x1220>;
assigned-clocks = <&gpu_hyd_gclk_mux>;
assigned-clock-parents = <&dpll_gpu_m2_ck>;
}; };
l3instr_ts_gclk_div: l3instr_ts_gclk_div@e50 { l3instr_ts_gclk_div: l3instr_ts_gclk_div@e50 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment