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

clk: qcom: Add IPQ806X's HFPLLs

Describe the HFPLLs present on IPQ806X devices.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Tested-by: Craig Tatlor <ctatlor97@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Stephen Boyd and committed by
Stephen Boyd
1f79131b 72ad7207

+82
+82
drivers/clk/qcom/gcc-ipq806x.c
··· 30 30 #include "clk-pll.h" 31 31 #include "clk-rcg.h" 32 32 #include "clk-branch.h" 33 + #include "clk-hfpll.h" 33 34 #include "reset.h" 34 35 35 36 static struct clk_pll pll0 = { ··· 112 111 .num_parents = 1, 113 112 .ops = &clk_pll_vote_ops, 114 113 }, 114 + }; 115 + 116 + static struct hfpll_data hfpll0_data = { 117 + .mode_reg = 0x3200, 118 + .l_reg = 0x3208, 119 + .m_reg = 0x320c, 120 + .n_reg = 0x3210, 121 + .config_reg = 0x3204, 122 + .status_reg = 0x321c, 123 + .config_val = 0x7845c665, 124 + .droop_reg = 0x3214, 125 + .droop_val = 0x0108c000, 126 + .min_rate = 600000000UL, 127 + .max_rate = 1800000000UL, 128 + }; 129 + 130 + static struct clk_hfpll hfpll0 = { 131 + .d = &hfpll0_data, 132 + .clkr.hw.init = &(struct clk_init_data){ 133 + .parent_names = (const char *[]){ "pxo" }, 134 + .num_parents = 1, 135 + .name = "hfpll0", 136 + .ops = &clk_ops_hfpll, 137 + .flags = CLK_IGNORE_UNUSED, 138 + }, 139 + .lock = __SPIN_LOCK_UNLOCKED(hfpll0.lock), 140 + }; 141 + 142 + static struct hfpll_data hfpll1_data = { 143 + .mode_reg = 0x3240, 144 + .l_reg = 0x3248, 145 + .m_reg = 0x324c, 146 + .n_reg = 0x3250, 147 + .config_reg = 0x3244, 148 + .status_reg = 0x325c, 149 + .config_val = 0x7845c665, 150 + .droop_reg = 0x3314, 151 + .droop_val = 0x0108c000, 152 + .min_rate = 600000000UL, 153 + .max_rate = 1800000000UL, 154 + }; 155 + 156 + static struct clk_hfpll hfpll1 = { 157 + .d = &hfpll1_data, 158 + .clkr.hw.init = &(struct clk_init_data){ 159 + .parent_names = (const char *[]){ "pxo" }, 160 + .num_parents = 1, 161 + .name = "hfpll1", 162 + .ops = &clk_ops_hfpll, 163 + .flags = CLK_IGNORE_UNUSED, 164 + }, 165 + .lock = __SPIN_LOCK_UNLOCKED(hfpll1.lock), 166 + }; 167 + 168 + static struct hfpll_data hfpll_l2_data = { 169 + .mode_reg = 0x3300, 170 + .l_reg = 0x3308, 171 + .m_reg = 0x330c, 172 + .n_reg = 0x3310, 173 + .config_reg = 0x3304, 174 + .status_reg = 0x331c, 175 + .config_val = 0x7845c665, 176 + .droop_reg = 0x3314, 177 + .droop_val = 0x0108c000, 178 + .min_rate = 600000000UL, 179 + .max_rate = 1800000000UL, 180 + }; 181 + 182 + static struct clk_hfpll hfpll_l2 = { 183 + .d = &hfpll_l2_data, 184 + .clkr.hw.init = &(struct clk_init_data){ 185 + .parent_names = (const char *[]){ "pxo" }, 186 + .num_parents = 1, 187 + .name = "hfpll_l2", 188 + .ops = &clk_ops_hfpll, 189 + .flags = CLK_IGNORE_UNUSED, 190 + }, 191 + .lock = __SPIN_LOCK_UNLOCKED(hfpll_l2.lock), 115 192 }; 116 193 117 194 static struct clk_pll pll14 = { ··· 2876 2797 [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr, 2877 2798 [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr, 2878 2799 [NSSTCM_CLK] = &nss_tcm_clk.clkr, 2800 + [PLL9] = &hfpll0.clkr, 2801 + [PLL10] = &hfpll1.clkr, 2802 + [PLL12] = &hfpll_l2.clkr, 2879 2803 }; 2880 2804 2881 2805 static const struct qcom_reset_map gcc_ipq806x_resets[] = {