1 From patchwork Fri Dec 8 09:42:24 2017
2 Content-Type: text/plain; charset="utf-8"
4 Content-Transfer-Encoding: 7bit
5 Subject: [v4,06/12] clk: qcom: Add IPQ806X's HFPLLs
6 From: Sricharan R <sricharan@codeaurora.org>
7 X-Patchwork-Id: 10102047
8 Message-Id: <1512726150-7204-7-git-send-email-sricharan@codeaurora.org>
9 To: mturquette@baylibre.com, sboyd@codeaurora.org,
10 devicetree@vger.kernel.org, linux-pm@vger.kernel.org,
11 linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
12 viresh.kumar@linaro.org, linux-arm-kernel@lists.infradead.org
13 Cc: sricharan@codeaurora.org
14 Date: Fri, 8 Dec 2017 15:12:24 +0530
16 From: Stephen Boyd <sboyd@codeaurora.org>
18 Describe the HFPLLs present on IPQ806X devices.
20 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
22 drivers/clk/qcom/gcc-ipq806x.c | 82 ++++++++++++++++++++++++++++++++++++++++++
23 1 file changed, 82 insertions(+)
25 --- a/drivers/clk/qcom/gcc-ipq806x.c
26 +++ b/drivers/clk/qcom/gcc-ipq806x.c
30 #include "clk-branch.h"
31 +#include "clk-hfpll.h"
34 static struct clk_pll pll0 = {
35 @@ -113,6 +114,84 @@ static struct clk_regmap pll8_vote = {
39 +static struct hfpll_data hfpll0_data = {
44 + .config_reg = 0x3204,
45 + .status_reg = 0x321c,
46 + .config_val = 0x7845c665,
47 + .droop_reg = 0x3214,
48 + .droop_val = 0x0108c000,
49 + .min_rate = 600000000UL,
50 + .max_rate = 1800000000UL,
53 +static struct clk_hfpll hfpll0 = {
55 + .clkr.hw.init = &(struct clk_init_data){
56 + .parent_names = (const char *[]){ "pxo" },
59 + .ops = &clk_ops_hfpll,
60 + .flags = CLK_IGNORE_UNUSED,
62 + .lock = __SPIN_LOCK_UNLOCKED(hfpll0.lock),
65 +static struct hfpll_data hfpll1_data = {
70 + .config_reg = 0x3244,
71 + .status_reg = 0x325c,
72 + .config_val = 0x7845c665,
73 + .droop_reg = 0x3314,
74 + .droop_val = 0x0108c000,
75 + .min_rate = 600000000UL,
76 + .max_rate = 1800000000UL,
79 +static struct clk_hfpll hfpll1 = {
81 + .clkr.hw.init = &(struct clk_init_data){
82 + .parent_names = (const char *[]){ "pxo" },
85 + .ops = &clk_ops_hfpll,
86 + .flags = CLK_IGNORE_UNUSED,
88 + .lock = __SPIN_LOCK_UNLOCKED(hfpll1.lock),
91 +static struct hfpll_data hfpll_l2_data = {
96 + .config_reg = 0x3304,
97 + .status_reg = 0x331c,
98 + .config_val = 0x7845c665,
99 + .droop_reg = 0x3314,
100 + .droop_val = 0x0108c000,
101 + .min_rate = 600000000UL,
102 + .max_rate = 1800000000UL,
105 +static struct clk_hfpll hfpll_l2 = {
106 + .d = &hfpll_l2_data,
107 + .clkr.hw.init = &(struct clk_init_data){
108 + .parent_names = (const char *[]){ "pxo" },
110 + .name = "hfpll_l2",
111 + .ops = &clk_ops_hfpll,
112 + .flags = CLK_IGNORE_UNUSED,
114 + .lock = __SPIN_LOCK_UNLOCKED(hfpll_l2.lock),
117 static struct clk_pll pll14 = {
120 @@ -2801,6 +2880,9 @@ static struct clk_regmap *gcc_ipq806x_cl
121 [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr,
122 [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr,
123 [NSSTCM_CLK] = &nss_tcm_clk.clkr,
124 + [PLL9] = &hfpll0.clkr,
125 + [PLL10] = &hfpll1.clkr,
126 + [PLL12] = &hfpll_l2.clkr,
129 static const struct qcom_reset_map gcc_ipq806x_resets[] = {