Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (c) 2018, The Linux Foundation. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | #include <linux/kernel.h> |
| 7 | #include <linux/bitops.h> |
| 8 | #include <linux/err.h> |
| 9 | #include <linux/platform_device.h> |
| 10 | #include <linux/module.h> |
| 11 | #include <linux/of.h> |
| 12 | #include <linux/of_device.h> |
| 13 | #include <linux/clk-provider.h> |
| 14 | #include <linux/regmap.h> |
| 15 | #include <linux/reset-controller.h> |
| 16 | |
| 17 | #include <dt-bindings/clock/qcom,gcc-sdm845.h> |
| 18 | |
| 19 | #include "common.h" |
| 20 | #include "clk-regmap.h" |
| 21 | #include "clk-pll.h" |
| 22 | #include "clk-rcg.h" |
| 23 | #include "clk-branch.h" |
| 24 | #include "clk-alpha-pll.h" |
| 25 | #include "gdsc.h" |
| 26 | #include "reset.h" |
| 27 | |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 28 | enum { |
| 29 | P_BI_TCXO, |
| 30 | P_AUD_REF_CLK, |
| 31 | P_CORE_BI_PLL_TEST_SE, |
| 32 | P_GPLL0_OUT_EVEN, |
| 33 | P_GPLL0_OUT_MAIN, |
| 34 | P_GPLL4_OUT_MAIN, |
| 35 | P_SLEEP_CLK, |
| 36 | }; |
| 37 | |
| 38 | static const struct parent_map gcc_parent_map_0[] = { |
| 39 | { P_BI_TCXO, 0 }, |
| 40 | { P_GPLL0_OUT_MAIN, 1 }, |
| 41 | { P_GPLL0_OUT_EVEN, 6 }, |
| 42 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 43 | }; |
| 44 | |
| 45 | static const char * const gcc_parent_names_0[] = { |
| 46 | "bi_tcxo", |
| 47 | "gpll0", |
| 48 | "gpll0_out_even", |
| 49 | "core_bi_pll_test_se", |
| 50 | }; |
| 51 | |
| 52 | static const struct parent_map gcc_parent_map_1[] = { |
| 53 | { P_BI_TCXO, 0 }, |
| 54 | { P_GPLL0_OUT_MAIN, 1 }, |
| 55 | { P_SLEEP_CLK, 5 }, |
| 56 | { P_GPLL0_OUT_EVEN, 6 }, |
| 57 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 58 | }; |
| 59 | |
| 60 | static const char * const gcc_parent_names_1[] = { |
| 61 | "bi_tcxo", |
| 62 | "gpll0", |
| 63 | "core_pi_sleep_clk", |
| 64 | "gpll0_out_even", |
| 65 | "core_bi_pll_test_se", |
| 66 | }; |
| 67 | |
| 68 | static const struct parent_map gcc_parent_map_2[] = { |
| 69 | { P_BI_TCXO, 0 }, |
| 70 | { P_SLEEP_CLK, 5 }, |
| 71 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 72 | }; |
| 73 | |
| 74 | static const char * const gcc_parent_names_2[] = { |
| 75 | "bi_tcxo", |
| 76 | "core_pi_sleep_clk", |
| 77 | "core_bi_pll_test_se", |
| 78 | }; |
| 79 | |
| 80 | static const struct parent_map gcc_parent_map_3[] = { |
| 81 | { P_BI_TCXO, 0 }, |
| 82 | { P_GPLL0_OUT_MAIN, 1 }, |
| 83 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 84 | }; |
| 85 | |
| 86 | static const char * const gcc_parent_names_3[] = { |
| 87 | "bi_tcxo", |
| 88 | "gpll0", |
| 89 | "core_bi_pll_test_se", |
| 90 | }; |
| 91 | |
| 92 | static const struct parent_map gcc_parent_map_4[] = { |
| 93 | { P_BI_TCXO, 0 }, |
| 94 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 95 | }; |
| 96 | |
| 97 | static const char * const gcc_parent_names_4[] = { |
| 98 | "bi_tcxo", |
| 99 | "core_bi_pll_test_se", |
| 100 | }; |
| 101 | |
| 102 | static const struct parent_map gcc_parent_map_5[] = { |
| 103 | { P_BI_TCXO, 0 }, |
| 104 | { P_GPLL0_OUT_MAIN, 1 }, |
| 105 | { P_GPLL4_OUT_MAIN, 5 }, |
| 106 | { P_GPLL0_OUT_EVEN, 6 }, |
| 107 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 108 | }; |
| 109 | |
| 110 | static const char * const gcc_parent_names_5[] = { |
| 111 | "bi_tcxo", |
| 112 | "gpll0", |
| 113 | "gpll4", |
| 114 | "gpll0_out_even", |
| 115 | "core_bi_pll_test_se", |
| 116 | }; |
| 117 | |
| 118 | static const struct parent_map gcc_parent_map_6[] = { |
| 119 | { P_BI_TCXO, 0 }, |
| 120 | { P_GPLL0_OUT_MAIN, 1 }, |
| 121 | { P_AUD_REF_CLK, 2 }, |
| 122 | { P_GPLL0_OUT_EVEN, 6 }, |
| 123 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 124 | }; |
| 125 | |
| 126 | static const char * const gcc_parent_names_6[] = { |
| 127 | "bi_tcxo", |
| 128 | "gpll0", |
| 129 | "aud_ref_clk", |
| 130 | "gpll0_out_even", |
| 131 | "core_bi_pll_test_se", |
| 132 | }; |
| 133 | |
| 134 | static const char * const gcc_parent_names_7[] = { |
| 135 | "bi_tcxo", |
| 136 | "gpll0", |
| 137 | "gpll0_out_even", |
| 138 | "core_bi_pll_test_se", |
| 139 | }; |
| 140 | |
| 141 | static const char * const gcc_parent_names_8[] = { |
| 142 | "bi_tcxo", |
| 143 | "gpll0", |
| 144 | "core_bi_pll_test_se", |
| 145 | }; |
| 146 | |
| 147 | static const struct parent_map gcc_parent_map_10[] = { |
| 148 | { P_BI_TCXO, 0 }, |
| 149 | { P_GPLL0_OUT_MAIN, 1 }, |
| 150 | { P_GPLL4_OUT_MAIN, 5 }, |
| 151 | { P_GPLL0_OUT_EVEN, 6 }, |
| 152 | { P_CORE_BI_PLL_TEST_SE, 7 }, |
| 153 | }; |
| 154 | |
| 155 | static const char * const gcc_parent_names_10[] = { |
| 156 | "bi_tcxo", |
| 157 | "gpll0", |
| 158 | "gpll4", |
| 159 | "gpll0_out_even", |
| 160 | "core_bi_pll_test_se", |
| 161 | }; |
| 162 | |
| 163 | static struct clk_alpha_pll gpll0 = { |
| 164 | .offset = 0x0, |
| 165 | .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], |
| 166 | .clkr = { |
| 167 | .enable_reg = 0x52000, |
| 168 | .enable_mask = BIT(0), |
| 169 | .hw.init = &(struct clk_init_data){ |
| 170 | .name = "gpll0", |
| 171 | .parent_names = (const char *[]){ "bi_tcxo" }, |
| 172 | .num_parents = 1, |
| 173 | .ops = &clk_alpha_pll_fixed_fabia_ops, |
| 174 | }, |
| 175 | }, |
| 176 | }; |
| 177 | |
| 178 | static struct clk_alpha_pll gpll4 = { |
| 179 | .offset = 0x76000, |
| 180 | .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], |
| 181 | .clkr = { |
| 182 | .enable_reg = 0x52000, |
| 183 | .enable_mask = BIT(4), |
| 184 | .hw.init = &(struct clk_init_data){ |
| 185 | .name = "gpll4", |
| 186 | .parent_names = (const char *[]){ "bi_tcxo" }, |
| 187 | .num_parents = 1, |
| 188 | .ops = &clk_alpha_pll_fixed_fabia_ops, |
| 189 | }, |
| 190 | }, |
| 191 | }; |
| 192 | |
| 193 | static const struct clk_div_table post_div_table_fabia_even[] = { |
| 194 | { 0x0, 1 }, |
| 195 | { 0x1, 2 }, |
| 196 | { 0x3, 4 }, |
| 197 | { 0x7, 8 }, |
| 198 | { } |
| 199 | }; |
| 200 | |
| 201 | static struct clk_alpha_pll_postdiv gpll0_out_even = { |
| 202 | .offset = 0x0, |
| 203 | .post_div_shift = 8, |
| 204 | .post_div_table = post_div_table_fabia_even, |
| 205 | .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), |
| 206 | .width = 4, |
| 207 | .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], |
| 208 | .clkr.hw.init = &(struct clk_init_data){ |
| 209 | .name = "gpll0_out_even", |
| 210 | .parent_names = (const char *[]){ "gpll0" }, |
| 211 | .num_parents = 1, |
| 212 | .ops = &clk_alpha_pll_postdiv_fabia_ops, |
| 213 | }, |
| 214 | }; |
| 215 | |
| 216 | static const struct freq_tbl ftbl_gcc_cpuss_ahb_clk_src[] = { |
| 217 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 218 | { } |
| 219 | }; |
| 220 | |
| 221 | static struct clk_rcg2 gcc_cpuss_ahb_clk_src = { |
| 222 | .cmd_rcgr = 0x48014, |
| 223 | .mnd_width = 0, |
| 224 | .hid_width = 5, |
| 225 | .parent_map = gcc_parent_map_0, |
| 226 | .freq_tbl = ftbl_gcc_cpuss_ahb_clk_src, |
| 227 | .clkr.hw.init = &(struct clk_init_data){ |
| 228 | .name = "gcc_cpuss_ahb_clk_src", |
| 229 | .parent_names = gcc_parent_names_7, |
| 230 | .num_parents = 4, |
| 231 | .ops = &clk_rcg2_ops, |
| 232 | }, |
| 233 | }; |
| 234 | |
| 235 | static const struct freq_tbl ftbl_gcc_cpuss_rbcpr_clk_src[] = { |
| 236 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 237 | { } |
| 238 | }; |
| 239 | |
| 240 | static struct clk_rcg2 gcc_cpuss_rbcpr_clk_src = { |
| 241 | .cmd_rcgr = 0x4815c, |
| 242 | .mnd_width = 0, |
| 243 | .hid_width = 5, |
| 244 | .parent_map = gcc_parent_map_3, |
| 245 | .freq_tbl = ftbl_gcc_cpuss_rbcpr_clk_src, |
| 246 | .clkr.hw.init = &(struct clk_init_data){ |
| 247 | .name = "gcc_cpuss_rbcpr_clk_src", |
| 248 | .parent_names = gcc_parent_names_8, |
| 249 | .num_parents = 3, |
| 250 | .ops = &clk_rcg2_ops, |
| 251 | }, |
| 252 | }; |
| 253 | |
| 254 | static const struct freq_tbl ftbl_gcc_gp1_clk_src[] = { |
| 255 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 256 | F(25000000, P_GPLL0_OUT_EVEN, 12, 0, 0), |
| 257 | F(50000000, P_GPLL0_OUT_EVEN, 6, 0, 0), |
| 258 | F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0), |
| 259 | F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0), |
| 260 | { } |
| 261 | }; |
| 262 | |
| 263 | static struct clk_rcg2 gcc_gp1_clk_src = { |
| 264 | .cmd_rcgr = 0x64004, |
| 265 | .mnd_width = 8, |
| 266 | .hid_width = 5, |
| 267 | .parent_map = gcc_parent_map_1, |
| 268 | .freq_tbl = ftbl_gcc_gp1_clk_src, |
| 269 | .clkr.hw.init = &(struct clk_init_data){ |
| 270 | .name = "gcc_gp1_clk_src", |
| 271 | .parent_names = gcc_parent_names_1, |
| 272 | .num_parents = 5, |
| 273 | .ops = &clk_rcg2_ops, |
| 274 | }, |
| 275 | }; |
| 276 | |
| 277 | static struct clk_rcg2 gcc_gp2_clk_src = { |
| 278 | .cmd_rcgr = 0x65004, |
| 279 | .mnd_width = 8, |
| 280 | .hid_width = 5, |
| 281 | .parent_map = gcc_parent_map_1, |
| 282 | .freq_tbl = ftbl_gcc_gp1_clk_src, |
| 283 | .clkr.hw.init = &(struct clk_init_data){ |
| 284 | .name = "gcc_gp2_clk_src", |
| 285 | .parent_names = gcc_parent_names_1, |
| 286 | .num_parents = 5, |
| 287 | .ops = &clk_rcg2_ops, |
| 288 | }, |
| 289 | }; |
| 290 | |
| 291 | static struct clk_rcg2 gcc_gp3_clk_src = { |
| 292 | .cmd_rcgr = 0x66004, |
| 293 | .mnd_width = 8, |
| 294 | .hid_width = 5, |
| 295 | .parent_map = gcc_parent_map_1, |
| 296 | .freq_tbl = ftbl_gcc_gp1_clk_src, |
| 297 | .clkr.hw.init = &(struct clk_init_data){ |
| 298 | .name = "gcc_gp3_clk_src", |
| 299 | .parent_names = gcc_parent_names_1, |
| 300 | .num_parents = 5, |
| 301 | .ops = &clk_rcg2_ops, |
| 302 | }, |
| 303 | }; |
| 304 | |
| 305 | static const struct freq_tbl ftbl_gcc_pcie_0_aux_clk_src[] = { |
| 306 | F(9600000, P_BI_TCXO, 2, 0, 0), |
| 307 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 308 | { } |
| 309 | }; |
| 310 | |
| 311 | static struct clk_rcg2 gcc_pcie_0_aux_clk_src = { |
| 312 | .cmd_rcgr = 0x6b028, |
| 313 | .mnd_width = 16, |
| 314 | .hid_width = 5, |
| 315 | .parent_map = gcc_parent_map_2, |
| 316 | .freq_tbl = ftbl_gcc_pcie_0_aux_clk_src, |
| 317 | .clkr.hw.init = &(struct clk_init_data){ |
| 318 | .name = "gcc_pcie_0_aux_clk_src", |
| 319 | .parent_names = gcc_parent_names_2, |
| 320 | .num_parents = 3, |
| 321 | .ops = &clk_rcg2_ops, |
| 322 | }, |
| 323 | }; |
| 324 | |
| 325 | static struct clk_rcg2 gcc_pcie_1_aux_clk_src = { |
| 326 | .cmd_rcgr = 0x8d028, |
| 327 | .mnd_width = 16, |
| 328 | .hid_width = 5, |
| 329 | .parent_map = gcc_parent_map_2, |
| 330 | .freq_tbl = ftbl_gcc_pcie_0_aux_clk_src, |
| 331 | .clkr.hw.init = &(struct clk_init_data){ |
| 332 | .name = "gcc_pcie_1_aux_clk_src", |
| 333 | .parent_names = gcc_parent_names_2, |
| 334 | .num_parents = 3, |
| 335 | .ops = &clk_rcg2_ops, |
| 336 | }, |
| 337 | }; |
| 338 | |
| 339 | static const struct freq_tbl ftbl_gcc_pcie_phy_refgen_clk_src[] = { |
| 340 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 341 | F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0), |
| 342 | { } |
| 343 | }; |
| 344 | |
| 345 | static struct clk_rcg2 gcc_pcie_phy_refgen_clk_src = { |
| 346 | .cmd_rcgr = 0x6f014, |
| 347 | .mnd_width = 0, |
| 348 | .hid_width = 5, |
| 349 | .parent_map = gcc_parent_map_0, |
| 350 | .freq_tbl = ftbl_gcc_pcie_phy_refgen_clk_src, |
| 351 | .clkr.hw.init = &(struct clk_init_data){ |
| 352 | .name = "gcc_pcie_phy_refgen_clk_src", |
| 353 | .parent_names = gcc_parent_names_0, |
| 354 | .num_parents = 4, |
| 355 | .ops = &clk_rcg2_ops, |
| 356 | }, |
| 357 | }; |
| 358 | |
| 359 | static const struct freq_tbl ftbl_gcc_pdm2_clk_src[] = { |
| 360 | F(9600000, P_BI_TCXO, 2, 0, 0), |
| 361 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 362 | F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0), |
| 363 | { } |
| 364 | }; |
| 365 | |
| 366 | static struct clk_rcg2 gcc_pdm2_clk_src = { |
| 367 | .cmd_rcgr = 0x33010, |
| 368 | .mnd_width = 0, |
| 369 | .hid_width = 5, |
| 370 | .parent_map = gcc_parent_map_0, |
| 371 | .freq_tbl = ftbl_gcc_pdm2_clk_src, |
| 372 | .clkr.hw.init = &(struct clk_init_data){ |
| 373 | .name = "gcc_pdm2_clk_src", |
| 374 | .parent_names = gcc_parent_names_0, |
| 375 | .num_parents = 4, |
| 376 | .ops = &clk_rcg2_ops, |
| 377 | }, |
| 378 | }; |
| 379 | |
| 380 | static const struct freq_tbl ftbl_gcc_qupv3_wrap0_s0_clk_src[] = { |
| 381 | F(7372800, P_GPLL0_OUT_EVEN, 1, 384, 15625), |
| 382 | F(14745600, P_GPLL0_OUT_EVEN, 1, 768, 15625), |
| 383 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 384 | F(29491200, P_GPLL0_OUT_EVEN, 1, 1536, 15625), |
| 385 | F(32000000, P_GPLL0_OUT_EVEN, 1, 8, 75), |
| 386 | F(48000000, P_GPLL0_OUT_EVEN, 1, 4, 25), |
| 387 | F(64000000, P_GPLL0_OUT_EVEN, 1, 16, 75), |
| 388 | F(80000000, P_GPLL0_OUT_EVEN, 1, 4, 15), |
| 389 | F(96000000, P_GPLL0_OUT_EVEN, 1, 8, 25), |
| 390 | F(100000000, P_GPLL0_OUT_EVEN, 3, 0, 0), |
| 391 | F(102400000, P_GPLL0_OUT_EVEN, 1, 128, 375), |
| 392 | F(112000000, P_GPLL0_OUT_EVEN, 1, 28, 75), |
| 393 | F(117964800, P_GPLL0_OUT_EVEN, 1, 6144, 15625), |
| 394 | F(120000000, P_GPLL0_OUT_EVEN, 2.5, 0, 0), |
| 395 | F(128000000, P_GPLL0_OUT_MAIN, 1, 16, 75), |
| 396 | { } |
| 397 | }; |
| 398 | |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 399 | static struct clk_init_data gcc_qupv3_wrap0_s0_clk_init = { |
| 400 | .name = "gcc_qupv3_wrap0_s0_clk_src", |
| 401 | .parent_names = gcc_parent_names_0, |
| 402 | .num_parents = 4, |
| 403 | .ops = &clk_rcg2_shared_ops, |
| 404 | }; |
| 405 | |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 406 | static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src = { |
| 407 | .cmd_rcgr = 0x17034, |
| 408 | .mnd_width = 16, |
| 409 | .hid_width = 5, |
| 410 | .parent_map = gcc_parent_map_0, |
| 411 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 412 | .clkr.hw.init = &gcc_qupv3_wrap0_s0_clk_init, |
| 413 | }; |
| 414 | |
| 415 | static struct clk_init_data gcc_qupv3_wrap0_s1_clk_init = { |
| 416 | .name = "gcc_qupv3_wrap0_s1_clk_src", |
| 417 | .parent_names = gcc_parent_names_0, |
| 418 | .num_parents = 4, |
| 419 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 420 | }; |
| 421 | |
| 422 | static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src = { |
| 423 | .cmd_rcgr = 0x17164, |
| 424 | .mnd_width = 16, |
| 425 | .hid_width = 5, |
| 426 | .parent_map = gcc_parent_map_0, |
| 427 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 428 | .clkr.hw.init = &gcc_qupv3_wrap0_s1_clk_init, |
| 429 | }; |
| 430 | |
| 431 | static struct clk_init_data gcc_qupv3_wrap0_s2_clk_init = { |
| 432 | .name = "gcc_qupv3_wrap0_s2_clk_src", |
| 433 | .parent_names = gcc_parent_names_0, |
| 434 | .num_parents = 4, |
| 435 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 436 | }; |
| 437 | |
| 438 | static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src = { |
| 439 | .cmd_rcgr = 0x17294, |
| 440 | .mnd_width = 16, |
| 441 | .hid_width = 5, |
| 442 | .parent_map = gcc_parent_map_0, |
| 443 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 444 | .clkr.hw.init = &gcc_qupv3_wrap0_s2_clk_init, |
| 445 | }; |
| 446 | |
| 447 | static struct clk_init_data gcc_qupv3_wrap0_s3_clk_init = { |
| 448 | .name = "gcc_qupv3_wrap0_s3_clk_src", |
| 449 | .parent_names = gcc_parent_names_0, |
| 450 | .num_parents = 4, |
| 451 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 452 | }; |
| 453 | |
| 454 | static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src = { |
| 455 | .cmd_rcgr = 0x173c4, |
| 456 | .mnd_width = 16, |
| 457 | .hid_width = 5, |
| 458 | .parent_map = gcc_parent_map_0, |
| 459 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 460 | .clkr.hw.init = &gcc_qupv3_wrap0_s3_clk_init, |
| 461 | }; |
| 462 | |
| 463 | static struct clk_init_data gcc_qupv3_wrap0_s4_clk_init = { |
| 464 | .name = "gcc_qupv3_wrap0_s4_clk_src", |
| 465 | .parent_names = gcc_parent_names_0, |
| 466 | .num_parents = 4, |
| 467 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 468 | }; |
| 469 | |
| 470 | static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src = { |
| 471 | .cmd_rcgr = 0x174f4, |
| 472 | .mnd_width = 16, |
| 473 | .hid_width = 5, |
| 474 | .parent_map = gcc_parent_map_0, |
| 475 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 476 | .clkr.hw.init = &gcc_qupv3_wrap0_s4_clk_init, |
| 477 | }; |
| 478 | |
| 479 | static struct clk_init_data gcc_qupv3_wrap0_s5_clk_init = { |
| 480 | .name = "gcc_qupv3_wrap0_s5_clk_src", |
| 481 | .parent_names = gcc_parent_names_0, |
| 482 | .num_parents = 4, |
| 483 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 484 | }; |
| 485 | |
| 486 | static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src = { |
| 487 | .cmd_rcgr = 0x17624, |
| 488 | .mnd_width = 16, |
| 489 | .hid_width = 5, |
| 490 | .parent_map = gcc_parent_map_0, |
| 491 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 492 | .clkr.hw.init = &gcc_qupv3_wrap0_s5_clk_init, |
| 493 | }; |
| 494 | |
| 495 | static struct clk_init_data gcc_qupv3_wrap0_s6_clk_init = { |
| 496 | .name = "gcc_qupv3_wrap0_s6_clk_src", |
| 497 | .parent_names = gcc_parent_names_0, |
| 498 | .num_parents = 4, |
| 499 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 500 | }; |
| 501 | |
| 502 | static struct clk_rcg2 gcc_qupv3_wrap0_s6_clk_src = { |
| 503 | .cmd_rcgr = 0x17754, |
| 504 | .mnd_width = 16, |
| 505 | .hid_width = 5, |
| 506 | .parent_map = gcc_parent_map_0, |
| 507 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 508 | .clkr.hw.init = &gcc_qupv3_wrap0_s6_clk_init, |
| 509 | }; |
| 510 | |
| 511 | static struct clk_init_data gcc_qupv3_wrap0_s7_clk_init = { |
| 512 | .name = "gcc_qupv3_wrap0_s7_clk_src", |
| 513 | .parent_names = gcc_parent_names_0, |
| 514 | .num_parents = 4, |
| 515 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 516 | }; |
| 517 | |
| 518 | static struct clk_rcg2 gcc_qupv3_wrap0_s7_clk_src = { |
| 519 | .cmd_rcgr = 0x17884, |
| 520 | .mnd_width = 16, |
| 521 | .hid_width = 5, |
| 522 | .parent_map = gcc_parent_map_0, |
| 523 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 524 | .clkr.hw.init = &gcc_qupv3_wrap0_s7_clk_init, |
| 525 | }; |
| 526 | |
| 527 | static struct clk_init_data gcc_qupv3_wrap1_s0_clk_init = { |
| 528 | .name = "gcc_qupv3_wrap1_s0_clk_src", |
| 529 | .parent_names = gcc_parent_names_0, |
| 530 | .num_parents = 4, |
| 531 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 532 | }; |
| 533 | |
| 534 | static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src = { |
| 535 | .cmd_rcgr = 0x18018, |
| 536 | .mnd_width = 16, |
| 537 | .hid_width = 5, |
| 538 | .parent_map = gcc_parent_map_0, |
| 539 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 540 | .clkr.hw.init = &gcc_qupv3_wrap1_s0_clk_init, |
| 541 | }; |
| 542 | |
| 543 | static struct clk_init_data gcc_qupv3_wrap1_s1_clk_init = { |
| 544 | .name = "gcc_qupv3_wrap1_s1_clk_src", |
| 545 | .parent_names = gcc_parent_names_0, |
| 546 | .num_parents = 4, |
| 547 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 548 | }; |
| 549 | |
| 550 | static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src = { |
| 551 | .cmd_rcgr = 0x18148, |
| 552 | .mnd_width = 16, |
| 553 | .hid_width = 5, |
| 554 | .parent_map = gcc_parent_map_0, |
| 555 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 556 | .clkr.hw.init = &gcc_qupv3_wrap1_s1_clk_init, |
| 557 | }; |
| 558 | |
| 559 | static struct clk_init_data gcc_qupv3_wrap1_s2_clk_init = { |
| 560 | .name = "gcc_qupv3_wrap1_s2_clk_src", |
| 561 | .parent_names = gcc_parent_names_0, |
| 562 | .num_parents = 4, |
| 563 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 564 | }; |
| 565 | |
| 566 | static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src = { |
| 567 | .cmd_rcgr = 0x18278, |
| 568 | .mnd_width = 16, |
| 569 | .hid_width = 5, |
| 570 | .parent_map = gcc_parent_map_0, |
| 571 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 572 | .clkr.hw.init = &gcc_qupv3_wrap1_s2_clk_init, |
| 573 | }; |
| 574 | |
| 575 | static struct clk_init_data gcc_qupv3_wrap1_s3_clk_init = { |
| 576 | .name = "gcc_qupv3_wrap1_s3_clk_src", |
| 577 | .parent_names = gcc_parent_names_0, |
| 578 | .num_parents = 4, |
| 579 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 580 | }; |
| 581 | |
| 582 | static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src = { |
| 583 | .cmd_rcgr = 0x183a8, |
| 584 | .mnd_width = 16, |
| 585 | .hid_width = 5, |
| 586 | .parent_map = gcc_parent_map_0, |
| 587 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 588 | .clkr.hw.init = &gcc_qupv3_wrap1_s3_clk_init, |
| 589 | }; |
| 590 | |
| 591 | static struct clk_init_data gcc_qupv3_wrap1_s4_clk_init = { |
| 592 | .name = "gcc_qupv3_wrap1_s4_clk_src", |
| 593 | .parent_names = gcc_parent_names_0, |
| 594 | .num_parents = 4, |
| 595 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 596 | }; |
| 597 | |
| 598 | static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src = { |
| 599 | .cmd_rcgr = 0x184d8, |
| 600 | .mnd_width = 16, |
| 601 | .hid_width = 5, |
| 602 | .parent_map = gcc_parent_map_0, |
| 603 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 604 | .clkr.hw.init = &gcc_qupv3_wrap1_s4_clk_init, |
| 605 | }; |
| 606 | |
| 607 | static struct clk_init_data gcc_qupv3_wrap1_s5_clk_init = { |
| 608 | .name = "gcc_qupv3_wrap1_s5_clk_src", |
| 609 | .parent_names = gcc_parent_names_0, |
| 610 | .num_parents = 4, |
| 611 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 612 | }; |
| 613 | |
| 614 | static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src = { |
| 615 | .cmd_rcgr = 0x18608, |
| 616 | .mnd_width = 16, |
| 617 | .hid_width = 5, |
| 618 | .parent_map = gcc_parent_map_0, |
| 619 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 620 | .clkr.hw.init = &gcc_qupv3_wrap1_s5_clk_init, |
| 621 | }; |
| 622 | |
| 623 | static struct clk_init_data gcc_qupv3_wrap1_s6_clk_init = { |
| 624 | .name = "gcc_qupv3_wrap1_s6_clk_src", |
| 625 | .parent_names = gcc_parent_names_0, |
| 626 | .num_parents = 4, |
| 627 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 628 | }; |
| 629 | |
| 630 | static struct clk_rcg2 gcc_qupv3_wrap1_s6_clk_src = { |
| 631 | .cmd_rcgr = 0x18738, |
| 632 | .mnd_width = 16, |
| 633 | .hid_width = 5, |
| 634 | .parent_map = gcc_parent_map_0, |
| 635 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 636 | .clkr.hw.init = &gcc_qupv3_wrap1_s6_clk_init, |
| 637 | }; |
| 638 | |
| 639 | static struct clk_init_data gcc_qupv3_wrap1_s7_clk_init = { |
| 640 | .name = "gcc_qupv3_wrap1_s7_clk_src", |
| 641 | .parent_names = gcc_parent_names_0, |
| 642 | .num_parents = 4, |
| 643 | .ops = &clk_rcg2_shared_ops, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 644 | }; |
| 645 | |
| 646 | static struct clk_rcg2 gcc_qupv3_wrap1_s7_clk_src = { |
| 647 | .cmd_rcgr = 0x18868, |
| 648 | .mnd_width = 16, |
| 649 | .hid_width = 5, |
| 650 | .parent_map = gcc_parent_map_0, |
| 651 | .freq_tbl = ftbl_gcc_qupv3_wrap0_s0_clk_src, |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 652 | .clkr.hw.init = &gcc_qupv3_wrap1_s7_clk_init, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 653 | }; |
| 654 | |
| 655 | static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src[] = { |
| 656 | F(400000, P_BI_TCXO, 12, 1, 4), |
| 657 | F(9600000, P_BI_TCXO, 2, 0, 0), |
| 658 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 659 | F(25000000, P_GPLL0_OUT_EVEN, 12, 0, 0), |
| 660 | F(50000000, P_GPLL0_OUT_EVEN, 6, 0, 0), |
| 661 | F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0), |
| 662 | F(201500000, P_GPLL4_OUT_MAIN, 4, 0, 0), |
| 663 | { } |
| 664 | }; |
| 665 | |
| 666 | static struct clk_rcg2 gcc_sdcc2_apps_clk_src = { |
| 667 | .cmd_rcgr = 0x1400c, |
| 668 | .mnd_width = 8, |
| 669 | .hid_width = 5, |
| 670 | .parent_map = gcc_parent_map_10, |
| 671 | .freq_tbl = ftbl_gcc_sdcc2_apps_clk_src, |
| 672 | .clkr.hw.init = &(struct clk_init_data){ |
| 673 | .name = "gcc_sdcc2_apps_clk_src", |
| 674 | .parent_names = gcc_parent_names_10, |
| 675 | .num_parents = 5, |
| 676 | .ops = &clk_rcg2_ops, |
| 677 | }, |
| 678 | }; |
| 679 | |
| 680 | static const struct freq_tbl ftbl_gcc_sdcc4_apps_clk_src[] = { |
| 681 | F(400000, P_BI_TCXO, 12, 1, 4), |
| 682 | F(9600000, P_BI_TCXO, 2, 0, 0), |
| 683 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 684 | F(25000000, P_GPLL0_OUT_MAIN, 12, 1, 2), |
| 685 | F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0), |
| 686 | F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0), |
| 687 | { } |
| 688 | }; |
| 689 | |
| 690 | static struct clk_rcg2 gcc_sdcc4_apps_clk_src = { |
| 691 | .cmd_rcgr = 0x1600c, |
| 692 | .mnd_width = 8, |
| 693 | .hid_width = 5, |
| 694 | .parent_map = gcc_parent_map_0, |
| 695 | .freq_tbl = ftbl_gcc_sdcc4_apps_clk_src, |
| 696 | .clkr.hw.init = &(struct clk_init_data){ |
| 697 | .name = "gcc_sdcc4_apps_clk_src", |
| 698 | .parent_names = gcc_parent_names_0, |
| 699 | .num_parents = 4, |
| 700 | .ops = &clk_rcg2_ops, |
| 701 | }, |
| 702 | }; |
| 703 | |
| 704 | static const struct freq_tbl ftbl_gcc_tsif_ref_clk_src[] = { |
| 705 | F(105495, P_BI_TCXO, 2, 1, 91), |
| 706 | { } |
| 707 | }; |
| 708 | |
| 709 | static struct clk_rcg2 gcc_tsif_ref_clk_src = { |
| 710 | .cmd_rcgr = 0x36010, |
| 711 | .mnd_width = 8, |
| 712 | .hid_width = 5, |
| 713 | .parent_map = gcc_parent_map_6, |
| 714 | .freq_tbl = ftbl_gcc_tsif_ref_clk_src, |
| 715 | .clkr.hw.init = &(struct clk_init_data){ |
| 716 | .name = "gcc_tsif_ref_clk_src", |
| 717 | .parent_names = gcc_parent_names_6, |
| 718 | .num_parents = 5, |
| 719 | .ops = &clk_rcg2_ops, |
| 720 | }, |
| 721 | }; |
| 722 | |
| 723 | static const struct freq_tbl ftbl_gcc_ufs_card_axi_clk_src[] = { |
| 724 | F(25000000, P_GPLL0_OUT_EVEN, 12, 0, 0), |
| 725 | F(50000000, P_GPLL0_OUT_EVEN, 6, 0, 0), |
| 726 | F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0), |
| 727 | F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0), |
| 728 | F(240000000, P_GPLL0_OUT_MAIN, 2.5, 0, 0), |
| 729 | { } |
| 730 | }; |
| 731 | |
| 732 | static struct clk_rcg2 gcc_ufs_card_axi_clk_src = { |
| 733 | .cmd_rcgr = 0x7501c, |
| 734 | .mnd_width = 8, |
| 735 | .hid_width = 5, |
| 736 | .parent_map = gcc_parent_map_0, |
| 737 | .freq_tbl = ftbl_gcc_ufs_card_axi_clk_src, |
| 738 | .clkr.hw.init = &(struct clk_init_data){ |
| 739 | .name = "gcc_ufs_card_axi_clk_src", |
| 740 | .parent_names = gcc_parent_names_0, |
| 741 | .num_parents = 4, |
| 742 | .ops = &clk_rcg2_shared_ops, |
| 743 | }, |
| 744 | }; |
| 745 | |
| 746 | static const struct freq_tbl ftbl_gcc_ufs_card_ice_core_clk_src[] = { |
| 747 | F(37500000, P_GPLL0_OUT_EVEN, 8, 0, 0), |
| 748 | F(75000000, P_GPLL0_OUT_EVEN, 4, 0, 0), |
| 749 | F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0), |
| 750 | F(300000000, P_GPLL0_OUT_MAIN, 2, 0, 0), |
| 751 | { } |
| 752 | }; |
| 753 | |
| 754 | static struct clk_rcg2 gcc_ufs_card_ice_core_clk_src = { |
| 755 | .cmd_rcgr = 0x7505c, |
| 756 | .mnd_width = 0, |
| 757 | .hid_width = 5, |
| 758 | .parent_map = gcc_parent_map_0, |
| 759 | .freq_tbl = ftbl_gcc_ufs_card_ice_core_clk_src, |
| 760 | .clkr.hw.init = &(struct clk_init_data){ |
| 761 | .name = "gcc_ufs_card_ice_core_clk_src", |
| 762 | .parent_names = gcc_parent_names_0, |
| 763 | .num_parents = 4, |
| 764 | .ops = &clk_rcg2_shared_ops, |
| 765 | }, |
| 766 | }; |
| 767 | |
| 768 | static struct clk_rcg2 gcc_ufs_card_phy_aux_clk_src = { |
| 769 | .cmd_rcgr = 0x75090, |
| 770 | .mnd_width = 0, |
| 771 | .hid_width = 5, |
| 772 | .parent_map = gcc_parent_map_4, |
| 773 | .freq_tbl = ftbl_gcc_cpuss_rbcpr_clk_src, |
| 774 | .clkr.hw.init = &(struct clk_init_data){ |
| 775 | .name = "gcc_ufs_card_phy_aux_clk_src", |
| 776 | .parent_names = gcc_parent_names_4, |
| 777 | .num_parents = 2, |
| 778 | .ops = &clk_rcg2_ops, |
| 779 | }, |
| 780 | }; |
| 781 | |
| 782 | static const struct freq_tbl ftbl_gcc_ufs_card_unipro_core_clk_src[] = { |
| 783 | F(37500000, P_GPLL0_OUT_EVEN, 8, 0, 0), |
| 784 | F(75000000, P_GPLL0_OUT_MAIN, 8, 0, 0), |
| 785 | F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0), |
| 786 | { } |
| 787 | }; |
| 788 | |
| 789 | static struct clk_rcg2 gcc_ufs_card_unipro_core_clk_src = { |
| 790 | .cmd_rcgr = 0x75074, |
| 791 | .mnd_width = 0, |
| 792 | .hid_width = 5, |
| 793 | .parent_map = gcc_parent_map_0, |
| 794 | .freq_tbl = ftbl_gcc_ufs_card_unipro_core_clk_src, |
| 795 | .clkr.hw.init = &(struct clk_init_data){ |
| 796 | .name = "gcc_ufs_card_unipro_core_clk_src", |
| 797 | .parent_names = gcc_parent_names_0, |
| 798 | .num_parents = 4, |
| 799 | .ops = &clk_rcg2_shared_ops, |
| 800 | }, |
| 801 | }; |
| 802 | |
| 803 | static const struct freq_tbl ftbl_gcc_ufs_phy_axi_clk_src[] = { |
| 804 | F(25000000, P_GPLL0_OUT_EVEN, 12, 0, 0), |
| 805 | F(50000000, P_GPLL0_OUT_EVEN, 6, 0, 0), |
| 806 | F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0), |
| 807 | F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0), |
| 808 | F(240000000, P_GPLL0_OUT_MAIN, 2.5, 0, 0), |
| 809 | { } |
| 810 | }; |
| 811 | |
| 812 | static struct clk_rcg2 gcc_ufs_phy_axi_clk_src = { |
| 813 | .cmd_rcgr = 0x7701c, |
| 814 | .mnd_width = 8, |
| 815 | .hid_width = 5, |
| 816 | .parent_map = gcc_parent_map_0, |
| 817 | .freq_tbl = ftbl_gcc_ufs_phy_axi_clk_src, |
| 818 | .clkr.hw.init = &(struct clk_init_data){ |
| 819 | .name = "gcc_ufs_phy_axi_clk_src", |
| 820 | .parent_names = gcc_parent_names_0, |
| 821 | .num_parents = 4, |
| 822 | .ops = &clk_rcg2_shared_ops, |
| 823 | }, |
| 824 | }; |
| 825 | |
| 826 | static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src = { |
| 827 | .cmd_rcgr = 0x7705c, |
| 828 | .mnd_width = 0, |
| 829 | .hid_width = 5, |
| 830 | .parent_map = gcc_parent_map_0, |
| 831 | .freq_tbl = ftbl_gcc_ufs_card_ice_core_clk_src, |
| 832 | .clkr.hw.init = &(struct clk_init_data){ |
| 833 | .name = "gcc_ufs_phy_ice_core_clk_src", |
| 834 | .parent_names = gcc_parent_names_0, |
| 835 | .num_parents = 4, |
| 836 | .ops = &clk_rcg2_shared_ops, |
| 837 | }, |
| 838 | }; |
| 839 | |
| 840 | static struct clk_rcg2 gcc_ufs_phy_phy_aux_clk_src = { |
| 841 | .cmd_rcgr = 0x77090, |
| 842 | .mnd_width = 0, |
| 843 | .hid_width = 5, |
| 844 | .parent_map = gcc_parent_map_4, |
| 845 | .freq_tbl = ftbl_gcc_pcie_0_aux_clk_src, |
| 846 | .clkr.hw.init = &(struct clk_init_data){ |
| 847 | .name = "gcc_ufs_phy_phy_aux_clk_src", |
| 848 | .parent_names = gcc_parent_names_4, |
| 849 | .num_parents = 2, |
| 850 | .ops = &clk_rcg2_shared_ops, |
| 851 | }, |
| 852 | }; |
| 853 | |
| 854 | static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src = { |
| 855 | .cmd_rcgr = 0x77074, |
| 856 | .mnd_width = 0, |
| 857 | .hid_width = 5, |
| 858 | .parent_map = gcc_parent_map_0, |
| 859 | .freq_tbl = ftbl_gcc_ufs_card_unipro_core_clk_src, |
| 860 | .clkr.hw.init = &(struct clk_init_data){ |
| 861 | .name = "gcc_ufs_phy_unipro_core_clk_src", |
| 862 | .parent_names = gcc_parent_names_0, |
| 863 | .num_parents = 4, |
| 864 | .ops = &clk_rcg2_shared_ops, |
| 865 | }, |
| 866 | }; |
| 867 | |
| 868 | static const struct freq_tbl ftbl_gcc_usb30_prim_master_clk_src[] = { |
| 869 | F(33333333, P_GPLL0_OUT_EVEN, 9, 0, 0), |
| 870 | F(66666667, P_GPLL0_OUT_EVEN, 4.5, 0, 0), |
| 871 | F(133333333, P_GPLL0_OUT_MAIN, 4.5, 0, 0), |
| 872 | F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0), |
| 873 | F(240000000, P_GPLL0_OUT_MAIN, 2.5, 0, 0), |
| 874 | { } |
| 875 | }; |
| 876 | |
| 877 | static struct clk_rcg2 gcc_usb30_prim_master_clk_src = { |
| 878 | .cmd_rcgr = 0xf018, |
| 879 | .mnd_width = 8, |
| 880 | .hid_width = 5, |
| 881 | .parent_map = gcc_parent_map_0, |
| 882 | .freq_tbl = ftbl_gcc_usb30_prim_master_clk_src, |
| 883 | .clkr.hw.init = &(struct clk_init_data){ |
| 884 | .name = "gcc_usb30_prim_master_clk_src", |
| 885 | .parent_names = gcc_parent_names_0, |
| 886 | .num_parents = 4, |
| 887 | .ops = &clk_rcg2_shared_ops, |
| 888 | }, |
| 889 | }; |
| 890 | |
| 891 | static const struct freq_tbl ftbl_gcc_usb30_prim_mock_utmi_clk_src[] = { |
| 892 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 893 | F(20000000, P_GPLL0_OUT_EVEN, 15, 0, 0), |
| 894 | F(40000000, P_GPLL0_OUT_EVEN, 7.5, 0, 0), |
| 895 | F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0), |
| 896 | { } |
| 897 | }; |
| 898 | |
| 899 | static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src = { |
| 900 | .cmd_rcgr = 0xf030, |
| 901 | .mnd_width = 0, |
| 902 | .hid_width = 5, |
| 903 | .parent_map = gcc_parent_map_0, |
| 904 | .freq_tbl = ftbl_gcc_usb30_prim_mock_utmi_clk_src, |
| 905 | .clkr.hw.init = &(struct clk_init_data){ |
| 906 | .name = "gcc_usb30_prim_mock_utmi_clk_src", |
| 907 | .parent_names = gcc_parent_names_0, |
| 908 | .num_parents = 4, |
| 909 | .ops = &clk_rcg2_shared_ops, |
| 910 | }, |
| 911 | }; |
| 912 | |
| 913 | static struct clk_rcg2 gcc_usb30_sec_master_clk_src = { |
| 914 | .cmd_rcgr = 0x10018, |
| 915 | .mnd_width = 8, |
| 916 | .hid_width = 5, |
| 917 | .parent_map = gcc_parent_map_0, |
| 918 | .freq_tbl = ftbl_gcc_usb30_prim_master_clk_src, |
| 919 | .clkr.hw.init = &(struct clk_init_data){ |
| 920 | .name = "gcc_usb30_sec_master_clk_src", |
| 921 | .parent_names = gcc_parent_names_0, |
| 922 | .num_parents = 4, |
| 923 | .ops = &clk_rcg2_ops, |
| 924 | }, |
| 925 | }; |
| 926 | |
| 927 | static struct clk_rcg2 gcc_usb30_sec_mock_utmi_clk_src = { |
| 928 | .cmd_rcgr = 0x10030, |
| 929 | .mnd_width = 0, |
| 930 | .hid_width = 5, |
| 931 | .parent_map = gcc_parent_map_0, |
| 932 | .freq_tbl = ftbl_gcc_usb30_prim_mock_utmi_clk_src, |
| 933 | .clkr.hw.init = &(struct clk_init_data){ |
| 934 | .name = "gcc_usb30_sec_mock_utmi_clk_src", |
| 935 | .parent_names = gcc_parent_names_0, |
| 936 | .num_parents = 4, |
| 937 | .ops = &clk_rcg2_ops, |
| 938 | }, |
| 939 | }; |
| 940 | |
| 941 | static struct clk_rcg2 gcc_usb3_prim_phy_aux_clk_src = { |
| 942 | .cmd_rcgr = 0xf05c, |
| 943 | .mnd_width = 0, |
| 944 | .hid_width = 5, |
| 945 | .parent_map = gcc_parent_map_2, |
| 946 | .freq_tbl = ftbl_gcc_cpuss_rbcpr_clk_src, |
| 947 | .clkr.hw.init = &(struct clk_init_data){ |
| 948 | .name = "gcc_usb3_prim_phy_aux_clk_src", |
| 949 | .parent_names = gcc_parent_names_2, |
| 950 | .num_parents = 3, |
| 951 | .ops = &clk_rcg2_ops, |
| 952 | }, |
| 953 | }; |
| 954 | |
| 955 | static struct clk_rcg2 gcc_usb3_sec_phy_aux_clk_src = { |
| 956 | .cmd_rcgr = 0x1005c, |
| 957 | .mnd_width = 0, |
| 958 | .hid_width = 5, |
| 959 | .parent_map = gcc_parent_map_2, |
| 960 | .freq_tbl = ftbl_gcc_cpuss_rbcpr_clk_src, |
| 961 | .clkr.hw.init = &(struct clk_init_data){ |
| 962 | .name = "gcc_usb3_sec_phy_aux_clk_src", |
| 963 | .parent_names = gcc_parent_names_2, |
| 964 | .num_parents = 3, |
| 965 | .ops = &clk_rcg2_shared_ops, |
| 966 | }, |
| 967 | }; |
| 968 | |
| 969 | static struct clk_rcg2 gcc_vs_ctrl_clk_src = { |
| 970 | .cmd_rcgr = 0x7a030, |
| 971 | .mnd_width = 0, |
| 972 | .hid_width = 5, |
| 973 | .parent_map = gcc_parent_map_3, |
| 974 | .freq_tbl = ftbl_gcc_cpuss_rbcpr_clk_src, |
| 975 | .clkr.hw.init = &(struct clk_init_data){ |
| 976 | .name = "gcc_vs_ctrl_clk_src", |
| 977 | .parent_names = gcc_parent_names_3, |
| 978 | .num_parents = 3, |
| 979 | .ops = &clk_rcg2_ops, |
| 980 | }, |
| 981 | }; |
| 982 | |
| 983 | static const struct freq_tbl ftbl_gcc_vsensor_clk_src[] = { |
| 984 | F(19200000, P_BI_TCXO, 1, 0, 0), |
| 985 | F(300000000, P_GPLL0_OUT_MAIN, 2, 0, 0), |
| 986 | F(600000000, P_GPLL0_OUT_MAIN, 1, 0, 0), |
| 987 | { } |
| 988 | }; |
| 989 | |
| 990 | static struct clk_rcg2 gcc_vsensor_clk_src = { |
| 991 | .cmd_rcgr = 0x7a018, |
| 992 | .mnd_width = 0, |
| 993 | .hid_width = 5, |
| 994 | .parent_map = gcc_parent_map_3, |
| 995 | .freq_tbl = ftbl_gcc_vsensor_clk_src, |
| 996 | .clkr.hw.init = &(struct clk_init_data){ |
| 997 | .name = "gcc_vsensor_clk_src", |
| 998 | .parent_names = gcc_parent_names_8, |
| 999 | .num_parents = 3, |
| 1000 | .ops = &clk_rcg2_ops, |
| 1001 | }, |
| 1002 | }; |
| 1003 | |
| 1004 | static struct clk_branch gcc_aggre_noc_pcie_tbu_clk = { |
| 1005 | .halt_reg = 0x90014, |
| 1006 | .halt_check = BRANCH_HALT, |
| 1007 | .clkr = { |
| 1008 | .enable_reg = 0x90014, |
| 1009 | .enable_mask = BIT(0), |
| 1010 | .hw.init = &(struct clk_init_data){ |
| 1011 | .name = "gcc_aggre_noc_pcie_tbu_clk", |
| 1012 | .ops = &clk_branch2_ops, |
| 1013 | }, |
| 1014 | }, |
| 1015 | }; |
| 1016 | |
| 1017 | static struct clk_branch gcc_aggre_ufs_card_axi_clk = { |
| 1018 | .halt_reg = 0x82028, |
| 1019 | .halt_check = BRANCH_HALT, |
| 1020 | .hwcg_reg = 0x82028, |
| 1021 | .hwcg_bit = 1, |
| 1022 | .clkr = { |
| 1023 | .enable_reg = 0x82028, |
| 1024 | .enable_mask = BIT(0), |
| 1025 | .hw.init = &(struct clk_init_data){ |
| 1026 | .name = "gcc_aggre_ufs_card_axi_clk", |
| 1027 | .parent_names = (const char *[]){ |
| 1028 | "gcc_ufs_card_axi_clk_src", |
| 1029 | }, |
| 1030 | .num_parents = 1, |
| 1031 | .flags = CLK_SET_RATE_PARENT, |
| 1032 | .ops = &clk_branch2_ops, |
| 1033 | }, |
| 1034 | }, |
| 1035 | }; |
| 1036 | |
| 1037 | static struct clk_branch gcc_aggre_ufs_phy_axi_clk = { |
| 1038 | .halt_reg = 0x82024, |
| 1039 | .halt_check = BRANCH_HALT, |
| 1040 | .hwcg_reg = 0x82024, |
| 1041 | .hwcg_bit = 1, |
| 1042 | .clkr = { |
| 1043 | .enable_reg = 0x82024, |
| 1044 | .enable_mask = BIT(0), |
| 1045 | .hw.init = &(struct clk_init_data){ |
| 1046 | .name = "gcc_aggre_ufs_phy_axi_clk", |
| 1047 | .parent_names = (const char *[]){ |
| 1048 | "gcc_ufs_phy_axi_clk_src", |
| 1049 | }, |
| 1050 | .num_parents = 1, |
| 1051 | .flags = CLK_SET_RATE_PARENT, |
| 1052 | .ops = &clk_branch2_ops, |
| 1053 | }, |
| 1054 | }, |
| 1055 | }; |
| 1056 | |
| 1057 | static struct clk_branch gcc_aggre_usb3_prim_axi_clk = { |
| 1058 | .halt_reg = 0x8201c, |
| 1059 | .halt_check = BRANCH_HALT, |
| 1060 | .clkr = { |
| 1061 | .enable_reg = 0x8201c, |
| 1062 | .enable_mask = BIT(0), |
| 1063 | .hw.init = &(struct clk_init_data){ |
| 1064 | .name = "gcc_aggre_usb3_prim_axi_clk", |
| 1065 | .parent_names = (const char *[]){ |
| 1066 | "gcc_usb30_prim_master_clk_src", |
| 1067 | }, |
| 1068 | .num_parents = 1, |
| 1069 | .flags = CLK_SET_RATE_PARENT, |
| 1070 | .ops = &clk_branch2_ops, |
| 1071 | }, |
| 1072 | }, |
| 1073 | }; |
| 1074 | |
| 1075 | static struct clk_branch gcc_aggre_usb3_sec_axi_clk = { |
| 1076 | .halt_reg = 0x82020, |
| 1077 | .halt_check = BRANCH_HALT, |
| 1078 | .clkr = { |
| 1079 | .enable_reg = 0x82020, |
| 1080 | .enable_mask = BIT(0), |
| 1081 | .hw.init = &(struct clk_init_data){ |
| 1082 | .name = "gcc_aggre_usb3_sec_axi_clk", |
| 1083 | .parent_names = (const char *[]){ |
| 1084 | "gcc_usb30_sec_master_clk_src", |
| 1085 | }, |
| 1086 | .num_parents = 1, |
| 1087 | .flags = CLK_SET_RATE_PARENT, |
| 1088 | .ops = &clk_branch2_ops, |
| 1089 | }, |
| 1090 | }, |
| 1091 | }; |
| 1092 | |
| 1093 | static struct clk_branch gcc_apc_vs_clk = { |
| 1094 | .halt_reg = 0x7a050, |
| 1095 | .halt_check = BRANCH_HALT, |
| 1096 | .clkr = { |
| 1097 | .enable_reg = 0x7a050, |
| 1098 | .enable_mask = BIT(0), |
| 1099 | .hw.init = &(struct clk_init_data){ |
| 1100 | .name = "gcc_apc_vs_clk", |
| 1101 | .parent_names = (const char *[]){ |
| 1102 | "gcc_vsensor_clk_src", |
| 1103 | }, |
| 1104 | .num_parents = 1, |
| 1105 | .flags = CLK_SET_RATE_PARENT, |
| 1106 | .ops = &clk_branch2_ops, |
| 1107 | }, |
| 1108 | }, |
| 1109 | }; |
| 1110 | |
| 1111 | static struct clk_branch gcc_boot_rom_ahb_clk = { |
| 1112 | .halt_reg = 0x38004, |
| 1113 | .halt_check = BRANCH_HALT_VOTED, |
| 1114 | .hwcg_reg = 0x38004, |
| 1115 | .hwcg_bit = 1, |
| 1116 | .clkr = { |
| 1117 | .enable_reg = 0x52004, |
| 1118 | .enable_mask = BIT(10), |
| 1119 | .hw.init = &(struct clk_init_data){ |
| 1120 | .name = "gcc_boot_rom_ahb_clk", |
| 1121 | .ops = &clk_branch2_ops, |
| 1122 | }, |
| 1123 | }, |
| 1124 | }; |
| 1125 | |
| 1126 | static struct clk_branch gcc_camera_ahb_clk = { |
| 1127 | .halt_reg = 0xb008, |
| 1128 | .halt_check = BRANCH_HALT, |
| 1129 | .hwcg_reg = 0xb008, |
| 1130 | .hwcg_bit = 1, |
| 1131 | .clkr = { |
| 1132 | .enable_reg = 0xb008, |
| 1133 | .enable_mask = BIT(0), |
| 1134 | .hw.init = &(struct clk_init_data){ |
| 1135 | .name = "gcc_camera_ahb_clk", |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 1136 | .flags = CLK_IS_CRITICAL, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 1137 | .ops = &clk_branch2_ops, |
| 1138 | }, |
| 1139 | }, |
| 1140 | }; |
| 1141 | |
| 1142 | static struct clk_branch gcc_camera_axi_clk = { |
| 1143 | .halt_reg = 0xb020, |
| 1144 | .halt_check = BRANCH_VOTED, |
| 1145 | .clkr = { |
| 1146 | .enable_reg = 0xb020, |
| 1147 | .enable_mask = BIT(0), |
| 1148 | .hw.init = &(struct clk_init_data){ |
| 1149 | .name = "gcc_camera_axi_clk", |
| 1150 | .ops = &clk_branch2_ops, |
| 1151 | }, |
| 1152 | }, |
| 1153 | }; |
| 1154 | |
| 1155 | static struct clk_branch gcc_camera_xo_clk = { |
| 1156 | .halt_reg = 0xb02c, |
| 1157 | .halt_check = BRANCH_HALT, |
| 1158 | .clkr = { |
| 1159 | .enable_reg = 0xb02c, |
| 1160 | .enable_mask = BIT(0), |
| 1161 | .hw.init = &(struct clk_init_data){ |
| 1162 | .name = "gcc_camera_xo_clk", |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 1163 | .flags = CLK_IS_CRITICAL, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 1164 | .ops = &clk_branch2_ops, |
| 1165 | }, |
| 1166 | }, |
| 1167 | }; |
| 1168 | |
| 1169 | static struct clk_branch gcc_ce1_ahb_clk = { |
| 1170 | .halt_reg = 0x4100c, |
| 1171 | .halt_check = BRANCH_HALT_VOTED, |
| 1172 | .hwcg_reg = 0x4100c, |
| 1173 | .hwcg_bit = 1, |
| 1174 | .clkr = { |
| 1175 | .enable_reg = 0x52004, |
| 1176 | .enable_mask = BIT(3), |
| 1177 | .hw.init = &(struct clk_init_data){ |
| 1178 | .name = "gcc_ce1_ahb_clk", |
| 1179 | .ops = &clk_branch2_ops, |
| 1180 | }, |
| 1181 | }, |
| 1182 | }; |
| 1183 | |
| 1184 | static struct clk_branch gcc_ce1_axi_clk = { |
| 1185 | .halt_reg = 0x41008, |
| 1186 | .halt_check = BRANCH_HALT_VOTED, |
| 1187 | .clkr = { |
| 1188 | .enable_reg = 0x52004, |
| 1189 | .enable_mask = BIT(4), |
| 1190 | .hw.init = &(struct clk_init_data){ |
| 1191 | .name = "gcc_ce1_axi_clk", |
| 1192 | .ops = &clk_branch2_ops, |
| 1193 | }, |
| 1194 | }, |
| 1195 | }; |
| 1196 | |
| 1197 | static struct clk_branch gcc_ce1_clk = { |
| 1198 | .halt_reg = 0x41004, |
| 1199 | .halt_check = BRANCH_HALT_VOTED, |
| 1200 | .clkr = { |
| 1201 | .enable_reg = 0x52004, |
| 1202 | .enable_mask = BIT(5), |
| 1203 | .hw.init = &(struct clk_init_data){ |
| 1204 | .name = "gcc_ce1_clk", |
| 1205 | .ops = &clk_branch2_ops, |
| 1206 | }, |
| 1207 | }, |
| 1208 | }; |
| 1209 | |
| 1210 | static struct clk_branch gcc_cfg_noc_usb3_prim_axi_clk = { |
| 1211 | .halt_reg = 0x502c, |
| 1212 | .halt_check = BRANCH_HALT, |
| 1213 | .clkr = { |
| 1214 | .enable_reg = 0x502c, |
| 1215 | .enable_mask = BIT(0), |
| 1216 | .hw.init = &(struct clk_init_data){ |
| 1217 | .name = "gcc_cfg_noc_usb3_prim_axi_clk", |
| 1218 | .parent_names = (const char *[]){ |
| 1219 | "gcc_usb30_prim_master_clk_src", |
| 1220 | }, |
| 1221 | .num_parents = 1, |
| 1222 | .flags = CLK_SET_RATE_PARENT, |
| 1223 | .ops = &clk_branch2_ops, |
| 1224 | }, |
| 1225 | }, |
| 1226 | }; |
| 1227 | |
| 1228 | static struct clk_branch gcc_cfg_noc_usb3_sec_axi_clk = { |
| 1229 | .halt_reg = 0x5030, |
| 1230 | .halt_check = BRANCH_HALT, |
| 1231 | .clkr = { |
| 1232 | .enable_reg = 0x5030, |
| 1233 | .enable_mask = BIT(0), |
| 1234 | .hw.init = &(struct clk_init_data){ |
| 1235 | .name = "gcc_cfg_noc_usb3_sec_axi_clk", |
| 1236 | .parent_names = (const char *[]){ |
| 1237 | "gcc_usb30_sec_master_clk_src", |
| 1238 | }, |
| 1239 | .num_parents = 1, |
| 1240 | .flags = CLK_SET_RATE_PARENT, |
| 1241 | .ops = &clk_branch2_ops, |
| 1242 | }, |
| 1243 | }, |
| 1244 | }; |
| 1245 | |
| 1246 | static struct clk_branch gcc_cpuss_ahb_clk = { |
| 1247 | .halt_reg = 0x48000, |
| 1248 | .halt_check = BRANCH_HALT_VOTED, |
| 1249 | .clkr = { |
| 1250 | .enable_reg = 0x52004, |
| 1251 | .enable_mask = BIT(21), |
| 1252 | .hw.init = &(struct clk_init_data){ |
| 1253 | .name = "gcc_cpuss_ahb_clk", |
| 1254 | .parent_names = (const char *[]){ |
| 1255 | "gcc_cpuss_ahb_clk_src", |
| 1256 | }, |
| 1257 | .num_parents = 1, |
| 1258 | .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, |
| 1259 | .ops = &clk_branch2_ops, |
| 1260 | }, |
| 1261 | }, |
| 1262 | }; |
| 1263 | |
| 1264 | static struct clk_branch gcc_cpuss_rbcpr_clk = { |
| 1265 | .halt_reg = 0x48008, |
| 1266 | .halt_check = BRANCH_HALT, |
| 1267 | .clkr = { |
| 1268 | .enable_reg = 0x48008, |
| 1269 | .enable_mask = BIT(0), |
| 1270 | .hw.init = &(struct clk_init_data){ |
| 1271 | .name = "gcc_cpuss_rbcpr_clk", |
| 1272 | .parent_names = (const char *[]){ |
| 1273 | "gcc_cpuss_rbcpr_clk_src", |
| 1274 | }, |
| 1275 | .num_parents = 1, |
| 1276 | .flags = CLK_SET_RATE_PARENT, |
| 1277 | .ops = &clk_branch2_ops, |
| 1278 | }, |
| 1279 | }, |
| 1280 | }; |
| 1281 | |
| 1282 | static struct clk_branch gcc_ddrss_gpu_axi_clk = { |
| 1283 | .halt_reg = 0x44038, |
| 1284 | .halt_check = BRANCH_VOTED, |
| 1285 | .clkr = { |
| 1286 | .enable_reg = 0x44038, |
| 1287 | .enable_mask = BIT(0), |
| 1288 | .hw.init = &(struct clk_init_data){ |
| 1289 | .name = "gcc_ddrss_gpu_axi_clk", |
| 1290 | .ops = &clk_branch2_ops, |
| 1291 | }, |
| 1292 | }, |
| 1293 | }; |
| 1294 | |
| 1295 | static struct clk_branch gcc_disp_ahb_clk = { |
| 1296 | .halt_reg = 0xb00c, |
| 1297 | .halt_check = BRANCH_HALT, |
| 1298 | .hwcg_reg = 0xb00c, |
| 1299 | .hwcg_bit = 1, |
| 1300 | .clkr = { |
| 1301 | .enable_reg = 0xb00c, |
| 1302 | .enable_mask = BIT(0), |
| 1303 | .hw.init = &(struct clk_init_data){ |
| 1304 | .name = "gcc_disp_ahb_clk", |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 1305 | .flags = CLK_IS_CRITICAL, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 1306 | .ops = &clk_branch2_ops, |
| 1307 | }, |
| 1308 | }, |
| 1309 | }; |
| 1310 | |
| 1311 | static struct clk_branch gcc_disp_axi_clk = { |
| 1312 | .halt_reg = 0xb024, |
| 1313 | .halt_check = BRANCH_VOTED, |
| 1314 | .clkr = { |
| 1315 | .enable_reg = 0xb024, |
| 1316 | .enable_mask = BIT(0), |
| 1317 | .hw.init = &(struct clk_init_data){ |
| 1318 | .name = "gcc_disp_axi_clk", |
| 1319 | .ops = &clk_branch2_ops, |
| 1320 | }, |
| 1321 | }, |
| 1322 | }; |
| 1323 | |
| 1324 | static struct clk_branch gcc_disp_gpll0_clk_src = { |
| 1325 | .halt_check = BRANCH_HALT_DELAY, |
| 1326 | .clkr = { |
| 1327 | .enable_reg = 0x52004, |
| 1328 | .enable_mask = BIT(18), |
| 1329 | .hw.init = &(struct clk_init_data){ |
| 1330 | .name = "gcc_disp_gpll0_clk_src", |
| 1331 | .parent_names = (const char *[]){ |
| 1332 | "gpll0", |
| 1333 | }, |
| 1334 | .num_parents = 1, |
| 1335 | .ops = &clk_branch2_ops, |
| 1336 | }, |
| 1337 | }, |
| 1338 | }; |
| 1339 | |
| 1340 | static struct clk_branch gcc_disp_gpll0_div_clk_src = { |
| 1341 | .halt_check = BRANCH_HALT_DELAY, |
| 1342 | .clkr = { |
| 1343 | .enable_reg = 0x52004, |
| 1344 | .enable_mask = BIT(19), |
| 1345 | .hw.init = &(struct clk_init_data){ |
| 1346 | .name = "gcc_disp_gpll0_div_clk_src", |
| 1347 | .parent_names = (const char *[]){ |
| 1348 | "gpll0_out_even", |
| 1349 | }, |
| 1350 | .num_parents = 1, |
| 1351 | .ops = &clk_branch2_ops, |
| 1352 | }, |
| 1353 | }, |
| 1354 | }; |
| 1355 | |
| 1356 | static struct clk_branch gcc_disp_xo_clk = { |
| 1357 | .halt_reg = 0xb030, |
| 1358 | .halt_check = BRANCH_HALT, |
| 1359 | .clkr = { |
| 1360 | .enable_reg = 0xb030, |
| 1361 | .enable_mask = BIT(0), |
| 1362 | .hw.init = &(struct clk_init_data){ |
| 1363 | .name = "gcc_disp_xo_clk", |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 1364 | .flags = CLK_IS_CRITICAL, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 1365 | .ops = &clk_branch2_ops, |
| 1366 | }, |
| 1367 | }, |
| 1368 | }; |
| 1369 | |
| 1370 | static struct clk_branch gcc_gp1_clk = { |
| 1371 | .halt_reg = 0x64000, |
| 1372 | .halt_check = BRANCH_HALT, |
| 1373 | .clkr = { |
| 1374 | .enable_reg = 0x64000, |
| 1375 | .enable_mask = BIT(0), |
| 1376 | .hw.init = &(struct clk_init_data){ |
| 1377 | .name = "gcc_gp1_clk", |
| 1378 | .parent_names = (const char *[]){ |
| 1379 | "gcc_gp1_clk_src", |
| 1380 | }, |
| 1381 | .num_parents = 1, |
| 1382 | .flags = CLK_SET_RATE_PARENT, |
| 1383 | .ops = &clk_branch2_ops, |
| 1384 | }, |
| 1385 | }, |
| 1386 | }; |
| 1387 | |
| 1388 | static struct clk_branch gcc_gp2_clk = { |
| 1389 | .halt_reg = 0x65000, |
| 1390 | .halt_check = BRANCH_HALT, |
| 1391 | .clkr = { |
| 1392 | .enable_reg = 0x65000, |
| 1393 | .enable_mask = BIT(0), |
| 1394 | .hw.init = &(struct clk_init_data){ |
| 1395 | .name = "gcc_gp2_clk", |
| 1396 | .parent_names = (const char *[]){ |
| 1397 | "gcc_gp2_clk_src", |
| 1398 | }, |
| 1399 | .num_parents = 1, |
| 1400 | .flags = CLK_SET_RATE_PARENT, |
| 1401 | .ops = &clk_branch2_ops, |
| 1402 | }, |
| 1403 | }, |
| 1404 | }; |
| 1405 | |
| 1406 | static struct clk_branch gcc_gp3_clk = { |
| 1407 | .halt_reg = 0x66000, |
| 1408 | .halt_check = BRANCH_HALT, |
| 1409 | .clkr = { |
| 1410 | .enable_reg = 0x66000, |
| 1411 | .enable_mask = BIT(0), |
| 1412 | .hw.init = &(struct clk_init_data){ |
| 1413 | .name = "gcc_gp3_clk", |
| 1414 | .parent_names = (const char *[]){ |
| 1415 | "gcc_gp3_clk_src", |
| 1416 | }, |
| 1417 | .num_parents = 1, |
| 1418 | .flags = CLK_SET_RATE_PARENT, |
| 1419 | .ops = &clk_branch2_ops, |
| 1420 | }, |
| 1421 | }, |
| 1422 | }; |
| 1423 | |
| 1424 | static struct clk_branch gcc_gpu_cfg_ahb_clk = { |
| 1425 | .halt_reg = 0x71004, |
| 1426 | .halt_check = BRANCH_HALT, |
| 1427 | .hwcg_reg = 0x71004, |
| 1428 | .hwcg_bit = 1, |
| 1429 | .clkr = { |
| 1430 | .enable_reg = 0x71004, |
| 1431 | .enable_mask = BIT(0), |
| 1432 | .hw.init = &(struct clk_init_data){ |
| 1433 | .name = "gcc_gpu_cfg_ahb_clk", |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 1434 | .flags = CLK_IS_CRITICAL, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 1435 | .ops = &clk_branch2_ops, |
| 1436 | }, |
| 1437 | }, |
| 1438 | }; |
| 1439 | |
| 1440 | static struct clk_branch gcc_gpu_gpll0_clk_src = { |
| 1441 | .halt_check = BRANCH_HALT_DELAY, |
| 1442 | .clkr = { |
| 1443 | .enable_reg = 0x52004, |
| 1444 | .enable_mask = BIT(15), |
| 1445 | .hw.init = &(struct clk_init_data){ |
| 1446 | .name = "gcc_gpu_gpll0_clk_src", |
| 1447 | .parent_names = (const char *[]){ |
| 1448 | "gpll0", |
| 1449 | }, |
| 1450 | .num_parents = 1, |
| 1451 | .ops = &clk_branch2_ops, |
| 1452 | }, |
| 1453 | }, |
| 1454 | }; |
| 1455 | |
| 1456 | static struct clk_branch gcc_gpu_gpll0_div_clk_src = { |
| 1457 | .halt_check = BRANCH_HALT_DELAY, |
| 1458 | .clkr = { |
| 1459 | .enable_reg = 0x52004, |
| 1460 | .enable_mask = BIT(16), |
| 1461 | .hw.init = &(struct clk_init_data){ |
| 1462 | .name = "gcc_gpu_gpll0_div_clk_src", |
| 1463 | .parent_names = (const char *[]){ |
| 1464 | "gpll0_out_even", |
| 1465 | }, |
| 1466 | .num_parents = 1, |
| 1467 | .ops = &clk_branch2_ops, |
| 1468 | }, |
| 1469 | }, |
| 1470 | }; |
| 1471 | |
| 1472 | static struct clk_branch gcc_gpu_iref_clk = { |
| 1473 | .halt_reg = 0x8c010, |
| 1474 | .halt_check = BRANCH_HALT, |
| 1475 | .clkr = { |
| 1476 | .enable_reg = 0x8c010, |
| 1477 | .enable_mask = BIT(0), |
| 1478 | .hw.init = &(struct clk_init_data){ |
| 1479 | .name = "gcc_gpu_iref_clk", |
| 1480 | .ops = &clk_branch2_ops, |
| 1481 | }, |
| 1482 | }, |
| 1483 | }; |
| 1484 | |
| 1485 | static struct clk_branch gcc_gpu_memnoc_gfx_clk = { |
| 1486 | .halt_reg = 0x7100c, |
| 1487 | .halt_check = BRANCH_VOTED, |
| 1488 | .clkr = { |
| 1489 | .enable_reg = 0x7100c, |
| 1490 | .enable_mask = BIT(0), |
| 1491 | .hw.init = &(struct clk_init_data){ |
| 1492 | .name = "gcc_gpu_memnoc_gfx_clk", |
| 1493 | .ops = &clk_branch2_ops, |
| 1494 | }, |
| 1495 | }, |
| 1496 | }; |
| 1497 | |
| 1498 | static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk = { |
| 1499 | .halt_reg = 0x71018, |
| 1500 | .halt_check = BRANCH_HALT, |
| 1501 | .clkr = { |
| 1502 | .enable_reg = 0x71018, |
| 1503 | .enable_mask = BIT(0), |
| 1504 | .hw.init = &(struct clk_init_data){ |
| 1505 | .name = "gcc_gpu_snoc_dvm_gfx_clk", |
| 1506 | .ops = &clk_branch2_ops, |
| 1507 | }, |
| 1508 | }, |
| 1509 | }; |
| 1510 | |
| 1511 | static struct clk_branch gcc_gpu_vs_clk = { |
| 1512 | .halt_reg = 0x7a04c, |
| 1513 | .halt_check = BRANCH_HALT, |
| 1514 | .clkr = { |
| 1515 | .enable_reg = 0x7a04c, |
| 1516 | .enable_mask = BIT(0), |
| 1517 | .hw.init = &(struct clk_init_data){ |
| 1518 | .name = "gcc_gpu_vs_clk", |
| 1519 | .parent_names = (const char *[]){ |
| 1520 | "gcc_vsensor_clk_src", |
| 1521 | }, |
| 1522 | .num_parents = 1, |
| 1523 | .flags = CLK_SET_RATE_PARENT, |
| 1524 | .ops = &clk_branch2_ops, |
| 1525 | }, |
| 1526 | }, |
| 1527 | }; |
| 1528 | |
| 1529 | static struct clk_branch gcc_mss_axis2_clk = { |
| 1530 | .halt_reg = 0x8a008, |
| 1531 | .halt_check = BRANCH_HALT, |
| 1532 | .clkr = { |
| 1533 | .enable_reg = 0x8a008, |
| 1534 | .enable_mask = BIT(0), |
| 1535 | .hw.init = &(struct clk_init_data){ |
| 1536 | .name = "gcc_mss_axis2_clk", |
| 1537 | .ops = &clk_branch2_ops, |
| 1538 | }, |
| 1539 | }, |
| 1540 | }; |
| 1541 | |
| 1542 | static struct clk_branch gcc_mss_cfg_ahb_clk = { |
| 1543 | .halt_reg = 0x8a000, |
| 1544 | .halt_check = BRANCH_HALT, |
| 1545 | .hwcg_reg = 0x8a000, |
| 1546 | .hwcg_bit = 1, |
| 1547 | .clkr = { |
| 1548 | .enable_reg = 0x8a000, |
| 1549 | .enable_mask = BIT(0), |
| 1550 | .hw.init = &(struct clk_init_data){ |
| 1551 | .name = "gcc_mss_cfg_ahb_clk", |
| 1552 | .ops = &clk_branch2_ops, |
| 1553 | }, |
| 1554 | }, |
| 1555 | }; |
| 1556 | |
| 1557 | static struct clk_branch gcc_mss_gpll0_div_clk_src = { |
| 1558 | .halt_check = BRANCH_HALT_DELAY, |
| 1559 | .clkr = { |
| 1560 | .enable_reg = 0x52004, |
| 1561 | .enable_mask = BIT(17), |
| 1562 | .hw.init = &(struct clk_init_data){ |
| 1563 | .name = "gcc_mss_gpll0_div_clk_src", |
| 1564 | .ops = &clk_branch2_ops, |
| 1565 | }, |
| 1566 | }, |
| 1567 | }; |
| 1568 | |
| 1569 | static struct clk_branch gcc_mss_mfab_axis_clk = { |
| 1570 | .halt_reg = 0x8a004, |
| 1571 | .halt_check = BRANCH_VOTED, |
| 1572 | .hwcg_reg = 0x8a004, |
| 1573 | .hwcg_bit = 1, |
| 1574 | .clkr = { |
| 1575 | .enable_reg = 0x8a004, |
| 1576 | .enable_mask = BIT(0), |
| 1577 | .hw.init = &(struct clk_init_data){ |
| 1578 | .name = "gcc_mss_mfab_axis_clk", |
| 1579 | .ops = &clk_branch2_ops, |
| 1580 | }, |
| 1581 | }, |
| 1582 | }; |
| 1583 | |
| 1584 | static struct clk_branch gcc_mss_q6_memnoc_axi_clk = { |
| 1585 | .halt_reg = 0x8a154, |
| 1586 | .halt_check = BRANCH_VOTED, |
| 1587 | .clkr = { |
| 1588 | .enable_reg = 0x8a154, |
| 1589 | .enable_mask = BIT(0), |
| 1590 | .hw.init = &(struct clk_init_data){ |
| 1591 | .name = "gcc_mss_q6_memnoc_axi_clk", |
| 1592 | .ops = &clk_branch2_ops, |
| 1593 | }, |
| 1594 | }, |
| 1595 | }; |
| 1596 | |
| 1597 | static struct clk_branch gcc_mss_snoc_axi_clk = { |
| 1598 | .halt_reg = 0x8a150, |
| 1599 | .halt_check = BRANCH_HALT, |
| 1600 | .clkr = { |
| 1601 | .enable_reg = 0x8a150, |
| 1602 | .enable_mask = BIT(0), |
| 1603 | .hw.init = &(struct clk_init_data){ |
| 1604 | .name = "gcc_mss_snoc_axi_clk", |
| 1605 | .ops = &clk_branch2_ops, |
| 1606 | }, |
| 1607 | }, |
| 1608 | }; |
| 1609 | |
| 1610 | static struct clk_branch gcc_mss_vs_clk = { |
| 1611 | .halt_reg = 0x7a048, |
| 1612 | .halt_check = BRANCH_HALT, |
| 1613 | .clkr = { |
| 1614 | .enable_reg = 0x7a048, |
| 1615 | .enable_mask = BIT(0), |
| 1616 | .hw.init = &(struct clk_init_data){ |
| 1617 | .name = "gcc_mss_vs_clk", |
| 1618 | .parent_names = (const char *[]){ |
| 1619 | "gcc_vsensor_clk_src", |
| 1620 | }, |
| 1621 | .num_parents = 1, |
| 1622 | .flags = CLK_SET_RATE_PARENT, |
| 1623 | .ops = &clk_branch2_ops, |
| 1624 | }, |
| 1625 | }, |
| 1626 | }; |
| 1627 | |
| 1628 | static struct clk_branch gcc_pcie_0_aux_clk = { |
| 1629 | .halt_reg = 0x6b01c, |
| 1630 | .halt_check = BRANCH_HALT_VOTED, |
| 1631 | .clkr = { |
| 1632 | .enable_reg = 0x5200c, |
| 1633 | .enable_mask = BIT(3), |
| 1634 | .hw.init = &(struct clk_init_data){ |
| 1635 | .name = "gcc_pcie_0_aux_clk", |
| 1636 | .parent_names = (const char *[]){ |
| 1637 | "gcc_pcie_0_aux_clk_src", |
| 1638 | }, |
| 1639 | .num_parents = 1, |
| 1640 | .flags = CLK_SET_RATE_PARENT, |
| 1641 | .ops = &clk_branch2_ops, |
| 1642 | }, |
| 1643 | }, |
| 1644 | }; |
| 1645 | |
| 1646 | static struct clk_branch gcc_pcie_0_cfg_ahb_clk = { |
| 1647 | .halt_reg = 0x6b018, |
| 1648 | .halt_check = BRANCH_HALT_VOTED, |
| 1649 | .hwcg_reg = 0x6b018, |
| 1650 | .hwcg_bit = 1, |
| 1651 | .clkr = { |
| 1652 | .enable_reg = 0x5200c, |
| 1653 | .enable_mask = BIT(2), |
| 1654 | .hw.init = &(struct clk_init_data){ |
| 1655 | .name = "gcc_pcie_0_cfg_ahb_clk", |
| 1656 | .ops = &clk_branch2_ops, |
| 1657 | }, |
| 1658 | }, |
| 1659 | }; |
| 1660 | |
| 1661 | static struct clk_branch gcc_pcie_0_clkref_clk = { |
| 1662 | .halt_reg = 0x8c00c, |
| 1663 | .halt_check = BRANCH_HALT, |
| 1664 | .clkr = { |
| 1665 | .enable_reg = 0x8c00c, |
| 1666 | .enable_mask = BIT(0), |
| 1667 | .hw.init = &(struct clk_init_data){ |
| 1668 | .name = "gcc_pcie_0_clkref_clk", |
| 1669 | .ops = &clk_branch2_ops, |
| 1670 | }, |
| 1671 | }, |
| 1672 | }; |
| 1673 | |
| 1674 | static struct clk_branch gcc_pcie_0_mstr_axi_clk = { |
| 1675 | .halt_reg = 0x6b014, |
| 1676 | .halt_check = BRANCH_HALT_VOTED, |
| 1677 | .clkr = { |
| 1678 | .enable_reg = 0x5200c, |
| 1679 | .enable_mask = BIT(1), |
| 1680 | .hw.init = &(struct clk_init_data){ |
| 1681 | .name = "gcc_pcie_0_mstr_axi_clk", |
| 1682 | .ops = &clk_branch2_ops, |
| 1683 | }, |
| 1684 | }, |
| 1685 | }; |
| 1686 | |
| 1687 | static struct clk_branch gcc_pcie_0_pipe_clk = { |
| 1688 | .halt_check = BRANCH_HALT_SKIP, |
| 1689 | .clkr = { |
| 1690 | .enable_reg = 0x5200c, |
| 1691 | .enable_mask = BIT(4), |
| 1692 | .hw.init = &(struct clk_init_data){ |
| 1693 | .name = "gcc_pcie_0_pipe_clk", |
| 1694 | .ops = &clk_branch2_ops, |
| 1695 | }, |
| 1696 | }, |
| 1697 | }; |
| 1698 | |
| 1699 | static struct clk_branch gcc_pcie_0_slv_axi_clk = { |
| 1700 | .halt_reg = 0x6b010, |
| 1701 | .halt_check = BRANCH_HALT_VOTED, |
| 1702 | .hwcg_reg = 0x6b010, |
| 1703 | .hwcg_bit = 1, |
| 1704 | .clkr = { |
| 1705 | .enable_reg = 0x5200c, |
| 1706 | .enable_mask = BIT(0), |
| 1707 | .hw.init = &(struct clk_init_data){ |
| 1708 | .name = "gcc_pcie_0_slv_axi_clk", |
| 1709 | .ops = &clk_branch2_ops, |
| 1710 | }, |
| 1711 | }, |
| 1712 | }; |
| 1713 | |
| 1714 | static struct clk_branch gcc_pcie_0_slv_q2a_axi_clk = { |
| 1715 | .halt_reg = 0x6b00c, |
| 1716 | .halt_check = BRANCH_HALT_VOTED, |
| 1717 | .clkr = { |
| 1718 | .enable_reg = 0x5200c, |
| 1719 | .enable_mask = BIT(5), |
| 1720 | .hw.init = &(struct clk_init_data){ |
| 1721 | .name = "gcc_pcie_0_slv_q2a_axi_clk", |
| 1722 | .ops = &clk_branch2_ops, |
| 1723 | }, |
| 1724 | }, |
| 1725 | }; |
| 1726 | |
| 1727 | static struct clk_branch gcc_pcie_1_aux_clk = { |
| 1728 | .halt_reg = 0x8d01c, |
| 1729 | .halt_check = BRANCH_HALT_VOTED, |
| 1730 | .clkr = { |
| 1731 | .enable_reg = 0x52004, |
| 1732 | .enable_mask = BIT(29), |
| 1733 | .hw.init = &(struct clk_init_data){ |
| 1734 | .name = "gcc_pcie_1_aux_clk", |
| 1735 | .parent_names = (const char *[]){ |
| 1736 | "gcc_pcie_1_aux_clk_src", |
| 1737 | }, |
| 1738 | .num_parents = 1, |
| 1739 | .flags = CLK_SET_RATE_PARENT, |
| 1740 | .ops = &clk_branch2_ops, |
| 1741 | }, |
| 1742 | }, |
| 1743 | }; |
| 1744 | |
| 1745 | static struct clk_branch gcc_pcie_1_cfg_ahb_clk = { |
| 1746 | .halt_reg = 0x8d018, |
| 1747 | .halt_check = BRANCH_HALT_VOTED, |
| 1748 | .hwcg_reg = 0x8d018, |
| 1749 | .hwcg_bit = 1, |
| 1750 | .clkr = { |
| 1751 | .enable_reg = 0x52004, |
| 1752 | .enable_mask = BIT(28), |
| 1753 | .hw.init = &(struct clk_init_data){ |
| 1754 | .name = "gcc_pcie_1_cfg_ahb_clk", |
| 1755 | .ops = &clk_branch2_ops, |
| 1756 | }, |
| 1757 | }, |
| 1758 | }; |
| 1759 | |
| 1760 | static struct clk_branch gcc_pcie_1_clkref_clk = { |
| 1761 | .halt_reg = 0x8c02c, |
| 1762 | .halt_check = BRANCH_HALT, |
| 1763 | .clkr = { |
| 1764 | .enable_reg = 0x8c02c, |
| 1765 | .enable_mask = BIT(0), |
| 1766 | .hw.init = &(struct clk_init_data){ |
| 1767 | .name = "gcc_pcie_1_clkref_clk", |
| 1768 | .ops = &clk_branch2_ops, |
| 1769 | }, |
| 1770 | }, |
| 1771 | }; |
| 1772 | |
| 1773 | static struct clk_branch gcc_pcie_1_mstr_axi_clk = { |
| 1774 | .halt_reg = 0x8d014, |
| 1775 | .halt_check = BRANCH_HALT_VOTED, |
| 1776 | .clkr = { |
| 1777 | .enable_reg = 0x52004, |
| 1778 | .enable_mask = BIT(27), |
| 1779 | .hw.init = &(struct clk_init_data){ |
| 1780 | .name = "gcc_pcie_1_mstr_axi_clk", |
| 1781 | .ops = &clk_branch2_ops, |
| 1782 | }, |
| 1783 | }, |
| 1784 | }; |
| 1785 | |
| 1786 | static struct clk_branch gcc_pcie_1_pipe_clk = { |
| 1787 | .halt_check = BRANCH_HALT_SKIP, |
| 1788 | .clkr = { |
| 1789 | .enable_reg = 0x52004, |
| 1790 | .enable_mask = BIT(30), |
| 1791 | .hw.init = &(struct clk_init_data){ |
| 1792 | .name = "gcc_pcie_1_pipe_clk", |
| 1793 | .ops = &clk_branch2_ops, |
| 1794 | }, |
| 1795 | }, |
| 1796 | }; |
| 1797 | |
| 1798 | static struct clk_branch gcc_pcie_1_slv_axi_clk = { |
| 1799 | .halt_reg = 0x8d010, |
| 1800 | .halt_check = BRANCH_HALT_VOTED, |
| 1801 | .hwcg_reg = 0x8d010, |
| 1802 | .hwcg_bit = 1, |
| 1803 | .clkr = { |
| 1804 | .enable_reg = 0x52004, |
| 1805 | .enable_mask = BIT(26), |
| 1806 | .hw.init = &(struct clk_init_data){ |
| 1807 | .name = "gcc_pcie_1_slv_axi_clk", |
| 1808 | .ops = &clk_branch2_ops, |
| 1809 | }, |
| 1810 | }, |
| 1811 | }; |
| 1812 | |
| 1813 | static struct clk_branch gcc_pcie_1_slv_q2a_axi_clk = { |
| 1814 | .halt_reg = 0x8d00c, |
| 1815 | .halt_check = BRANCH_HALT_VOTED, |
| 1816 | .clkr = { |
| 1817 | .enable_reg = 0x52004, |
| 1818 | .enable_mask = BIT(25), |
| 1819 | .hw.init = &(struct clk_init_data){ |
| 1820 | .name = "gcc_pcie_1_slv_q2a_axi_clk", |
| 1821 | .ops = &clk_branch2_ops, |
| 1822 | }, |
| 1823 | }, |
| 1824 | }; |
| 1825 | |
| 1826 | static struct clk_branch gcc_pcie_phy_aux_clk = { |
| 1827 | .halt_reg = 0x6f004, |
| 1828 | .halt_check = BRANCH_HALT, |
| 1829 | .clkr = { |
| 1830 | .enable_reg = 0x6f004, |
| 1831 | .enable_mask = BIT(0), |
| 1832 | .hw.init = &(struct clk_init_data){ |
| 1833 | .name = "gcc_pcie_phy_aux_clk", |
| 1834 | .parent_names = (const char *[]){ |
| 1835 | "gcc_pcie_0_aux_clk_src", |
| 1836 | }, |
| 1837 | .num_parents = 1, |
| 1838 | .flags = CLK_SET_RATE_PARENT, |
| 1839 | .ops = &clk_branch2_ops, |
| 1840 | }, |
| 1841 | }, |
| 1842 | }; |
| 1843 | |
| 1844 | static struct clk_branch gcc_pcie_phy_refgen_clk = { |
| 1845 | .halt_reg = 0x6f02c, |
| 1846 | .halt_check = BRANCH_HALT, |
| 1847 | .clkr = { |
| 1848 | .enable_reg = 0x6f02c, |
| 1849 | .enable_mask = BIT(0), |
| 1850 | .hw.init = &(struct clk_init_data){ |
| 1851 | .name = "gcc_pcie_phy_refgen_clk", |
| 1852 | .parent_names = (const char *[]){ |
| 1853 | "gcc_pcie_phy_refgen_clk_src", |
| 1854 | }, |
| 1855 | .num_parents = 1, |
| 1856 | .flags = CLK_SET_RATE_PARENT, |
| 1857 | .ops = &clk_branch2_ops, |
| 1858 | }, |
| 1859 | }, |
| 1860 | }; |
| 1861 | |
| 1862 | static struct clk_branch gcc_pdm2_clk = { |
| 1863 | .halt_reg = 0x3300c, |
| 1864 | .halt_check = BRANCH_HALT, |
| 1865 | .clkr = { |
| 1866 | .enable_reg = 0x3300c, |
| 1867 | .enable_mask = BIT(0), |
| 1868 | .hw.init = &(struct clk_init_data){ |
| 1869 | .name = "gcc_pdm2_clk", |
| 1870 | .parent_names = (const char *[]){ |
| 1871 | "gcc_pdm2_clk_src", |
| 1872 | }, |
| 1873 | .num_parents = 1, |
| 1874 | .flags = CLK_SET_RATE_PARENT, |
| 1875 | .ops = &clk_branch2_ops, |
| 1876 | }, |
| 1877 | }, |
| 1878 | }; |
| 1879 | |
| 1880 | static struct clk_branch gcc_pdm_ahb_clk = { |
| 1881 | .halt_reg = 0x33004, |
| 1882 | .halt_check = BRANCH_HALT, |
| 1883 | .hwcg_reg = 0x33004, |
| 1884 | .hwcg_bit = 1, |
| 1885 | .clkr = { |
| 1886 | .enable_reg = 0x33004, |
| 1887 | .enable_mask = BIT(0), |
| 1888 | .hw.init = &(struct clk_init_data){ |
| 1889 | .name = "gcc_pdm_ahb_clk", |
| 1890 | .ops = &clk_branch2_ops, |
| 1891 | }, |
| 1892 | }, |
| 1893 | }; |
| 1894 | |
| 1895 | static struct clk_branch gcc_pdm_xo4_clk = { |
| 1896 | .halt_reg = 0x33008, |
| 1897 | .halt_check = BRANCH_HALT, |
| 1898 | .clkr = { |
| 1899 | .enable_reg = 0x33008, |
| 1900 | .enable_mask = BIT(0), |
| 1901 | .hw.init = &(struct clk_init_data){ |
| 1902 | .name = "gcc_pdm_xo4_clk", |
| 1903 | .ops = &clk_branch2_ops, |
| 1904 | }, |
| 1905 | }, |
| 1906 | }; |
| 1907 | |
| 1908 | static struct clk_branch gcc_prng_ahb_clk = { |
| 1909 | .halt_reg = 0x34004, |
| 1910 | .halt_check = BRANCH_HALT_VOTED, |
| 1911 | .hwcg_reg = 0x34004, |
| 1912 | .hwcg_bit = 1, |
| 1913 | .clkr = { |
| 1914 | .enable_reg = 0x52004, |
| 1915 | .enable_mask = BIT(13), |
| 1916 | .hw.init = &(struct clk_init_data){ |
| 1917 | .name = "gcc_prng_ahb_clk", |
| 1918 | .ops = &clk_branch2_ops, |
| 1919 | }, |
| 1920 | }, |
| 1921 | }; |
| 1922 | |
| 1923 | static struct clk_branch gcc_qmip_camera_ahb_clk = { |
| 1924 | .halt_reg = 0xb014, |
| 1925 | .halt_check = BRANCH_HALT, |
| 1926 | .hwcg_reg = 0xb014, |
| 1927 | .hwcg_bit = 1, |
| 1928 | .clkr = { |
| 1929 | .enable_reg = 0xb014, |
| 1930 | .enable_mask = BIT(0), |
| 1931 | .hw.init = &(struct clk_init_data){ |
| 1932 | .name = "gcc_qmip_camera_ahb_clk", |
| 1933 | .ops = &clk_branch2_ops, |
| 1934 | }, |
| 1935 | }, |
| 1936 | }; |
| 1937 | |
| 1938 | static struct clk_branch gcc_qmip_disp_ahb_clk = { |
| 1939 | .halt_reg = 0xb018, |
| 1940 | .halt_check = BRANCH_HALT, |
| 1941 | .hwcg_reg = 0xb018, |
| 1942 | .hwcg_bit = 1, |
| 1943 | .clkr = { |
| 1944 | .enable_reg = 0xb018, |
| 1945 | .enable_mask = BIT(0), |
| 1946 | .hw.init = &(struct clk_init_data){ |
| 1947 | .name = "gcc_qmip_disp_ahb_clk", |
| 1948 | .ops = &clk_branch2_ops, |
| 1949 | }, |
| 1950 | }, |
| 1951 | }; |
| 1952 | |
| 1953 | static struct clk_branch gcc_qmip_video_ahb_clk = { |
| 1954 | .halt_reg = 0xb010, |
| 1955 | .halt_check = BRANCH_HALT, |
| 1956 | .hwcg_reg = 0xb010, |
| 1957 | .hwcg_bit = 1, |
| 1958 | .clkr = { |
| 1959 | .enable_reg = 0xb010, |
| 1960 | .enable_mask = BIT(0), |
| 1961 | .hw.init = &(struct clk_init_data){ |
| 1962 | .name = "gcc_qmip_video_ahb_clk", |
| 1963 | .ops = &clk_branch2_ops, |
| 1964 | }, |
| 1965 | }, |
| 1966 | }; |
| 1967 | |
| 1968 | static struct clk_branch gcc_qupv3_wrap0_s0_clk = { |
| 1969 | .halt_reg = 0x17030, |
| 1970 | .halt_check = BRANCH_HALT_VOTED, |
| 1971 | .clkr = { |
| 1972 | .enable_reg = 0x5200c, |
| 1973 | .enable_mask = BIT(10), |
| 1974 | .hw.init = &(struct clk_init_data){ |
| 1975 | .name = "gcc_qupv3_wrap0_s0_clk", |
| 1976 | .parent_names = (const char *[]){ |
| 1977 | "gcc_qupv3_wrap0_s0_clk_src", |
| 1978 | }, |
| 1979 | .num_parents = 1, |
| 1980 | .flags = CLK_SET_RATE_PARENT, |
| 1981 | .ops = &clk_branch2_ops, |
| 1982 | }, |
| 1983 | }, |
| 1984 | }; |
| 1985 | |
| 1986 | static struct clk_branch gcc_qupv3_wrap0_s1_clk = { |
| 1987 | .halt_reg = 0x17160, |
| 1988 | .halt_check = BRANCH_HALT_VOTED, |
| 1989 | .clkr = { |
| 1990 | .enable_reg = 0x5200c, |
| 1991 | .enable_mask = BIT(11), |
| 1992 | .hw.init = &(struct clk_init_data){ |
| 1993 | .name = "gcc_qupv3_wrap0_s1_clk", |
| 1994 | .parent_names = (const char *[]){ |
| 1995 | "gcc_qupv3_wrap0_s1_clk_src", |
| 1996 | }, |
| 1997 | .num_parents = 1, |
| 1998 | .flags = CLK_SET_RATE_PARENT, |
| 1999 | .ops = &clk_branch2_ops, |
| 2000 | }, |
| 2001 | }, |
| 2002 | }; |
| 2003 | |
| 2004 | static struct clk_branch gcc_qupv3_wrap0_s2_clk = { |
| 2005 | .halt_reg = 0x17290, |
| 2006 | .halt_check = BRANCH_HALT_VOTED, |
| 2007 | .clkr = { |
| 2008 | .enable_reg = 0x5200c, |
| 2009 | .enable_mask = BIT(12), |
| 2010 | .hw.init = &(struct clk_init_data){ |
| 2011 | .name = "gcc_qupv3_wrap0_s2_clk", |
| 2012 | .parent_names = (const char *[]){ |
| 2013 | "gcc_qupv3_wrap0_s2_clk_src", |
| 2014 | }, |
| 2015 | .num_parents = 1, |
| 2016 | .flags = CLK_SET_RATE_PARENT, |
| 2017 | .ops = &clk_branch2_ops, |
| 2018 | }, |
| 2019 | }, |
| 2020 | }; |
| 2021 | |
| 2022 | static struct clk_branch gcc_qupv3_wrap0_s3_clk = { |
| 2023 | .halt_reg = 0x173c0, |
| 2024 | .halt_check = BRANCH_HALT_VOTED, |
| 2025 | .clkr = { |
| 2026 | .enable_reg = 0x5200c, |
| 2027 | .enable_mask = BIT(13), |
| 2028 | .hw.init = &(struct clk_init_data){ |
| 2029 | .name = "gcc_qupv3_wrap0_s3_clk", |
| 2030 | .parent_names = (const char *[]){ |
| 2031 | "gcc_qupv3_wrap0_s3_clk_src", |
| 2032 | }, |
| 2033 | .num_parents = 1, |
| 2034 | .flags = CLK_SET_RATE_PARENT, |
| 2035 | .ops = &clk_branch2_ops, |
| 2036 | }, |
| 2037 | }, |
| 2038 | }; |
| 2039 | |
| 2040 | static struct clk_branch gcc_qupv3_wrap0_s4_clk = { |
| 2041 | .halt_reg = 0x174f0, |
| 2042 | .halt_check = BRANCH_HALT_VOTED, |
| 2043 | .clkr = { |
| 2044 | .enable_reg = 0x5200c, |
| 2045 | .enable_mask = BIT(14), |
| 2046 | .hw.init = &(struct clk_init_data){ |
| 2047 | .name = "gcc_qupv3_wrap0_s4_clk", |
| 2048 | .parent_names = (const char *[]){ |
| 2049 | "gcc_qupv3_wrap0_s4_clk_src", |
| 2050 | }, |
| 2051 | .num_parents = 1, |
| 2052 | .flags = CLK_SET_RATE_PARENT, |
| 2053 | .ops = &clk_branch2_ops, |
| 2054 | }, |
| 2055 | }, |
| 2056 | }; |
| 2057 | |
| 2058 | static struct clk_branch gcc_qupv3_wrap0_s5_clk = { |
| 2059 | .halt_reg = 0x17620, |
| 2060 | .halt_check = BRANCH_HALT_VOTED, |
| 2061 | .clkr = { |
| 2062 | .enable_reg = 0x5200c, |
| 2063 | .enable_mask = BIT(15), |
| 2064 | .hw.init = &(struct clk_init_data){ |
| 2065 | .name = "gcc_qupv3_wrap0_s5_clk", |
| 2066 | .parent_names = (const char *[]){ |
| 2067 | "gcc_qupv3_wrap0_s5_clk_src", |
| 2068 | }, |
| 2069 | .num_parents = 1, |
| 2070 | .flags = CLK_SET_RATE_PARENT, |
| 2071 | .ops = &clk_branch2_ops, |
| 2072 | }, |
| 2073 | }, |
| 2074 | }; |
| 2075 | |
| 2076 | static struct clk_branch gcc_qupv3_wrap0_s6_clk = { |
| 2077 | .halt_reg = 0x17750, |
| 2078 | .halt_check = BRANCH_HALT_VOTED, |
| 2079 | .clkr = { |
| 2080 | .enable_reg = 0x5200c, |
| 2081 | .enable_mask = BIT(16), |
| 2082 | .hw.init = &(struct clk_init_data){ |
| 2083 | .name = "gcc_qupv3_wrap0_s6_clk", |
| 2084 | .parent_names = (const char *[]){ |
| 2085 | "gcc_qupv3_wrap0_s6_clk_src", |
| 2086 | }, |
| 2087 | .num_parents = 1, |
| 2088 | .flags = CLK_SET_RATE_PARENT, |
| 2089 | .ops = &clk_branch2_ops, |
| 2090 | }, |
| 2091 | }, |
| 2092 | }; |
| 2093 | |
| 2094 | static struct clk_branch gcc_qupv3_wrap0_s7_clk = { |
| 2095 | .halt_reg = 0x17880, |
| 2096 | .halt_check = BRANCH_HALT_VOTED, |
| 2097 | .clkr = { |
| 2098 | .enable_reg = 0x5200c, |
| 2099 | .enable_mask = BIT(17), |
| 2100 | .hw.init = &(struct clk_init_data){ |
| 2101 | .name = "gcc_qupv3_wrap0_s7_clk", |
| 2102 | .parent_names = (const char *[]){ |
| 2103 | "gcc_qupv3_wrap0_s7_clk_src", |
| 2104 | }, |
| 2105 | .num_parents = 1, |
| 2106 | .flags = CLK_SET_RATE_PARENT, |
| 2107 | .ops = &clk_branch2_ops, |
| 2108 | }, |
| 2109 | }, |
| 2110 | }; |
| 2111 | |
| 2112 | static struct clk_branch gcc_qupv3_wrap1_s0_clk = { |
| 2113 | .halt_reg = 0x18014, |
| 2114 | .halt_check = BRANCH_HALT_VOTED, |
| 2115 | .clkr = { |
| 2116 | .enable_reg = 0x5200c, |
| 2117 | .enable_mask = BIT(22), |
| 2118 | .hw.init = &(struct clk_init_data){ |
| 2119 | .name = "gcc_qupv3_wrap1_s0_clk", |
| 2120 | .parent_names = (const char *[]){ |
| 2121 | "gcc_qupv3_wrap1_s0_clk_src", |
| 2122 | }, |
| 2123 | .num_parents = 1, |
| 2124 | .flags = CLK_SET_RATE_PARENT, |
| 2125 | .ops = &clk_branch2_ops, |
| 2126 | }, |
| 2127 | }, |
| 2128 | }; |
| 2129 | |
| 2130 | static struct clk_branch gcc_qupv3_wrap1_s1_clk = { |
| 2131 | .halt_reg = 0x18144, |
| 2132 | .halt_check = BRANCH_HALT_VOTED, |
| 2133 | .clkr = { |
| 2134 | .enable_reg = 0x5200c, |
| 2135 | .enable_mask = BIT(23), |
| 2136 | .hw.init = &(struct clk_init_data){ |
| 2137 | .name = "gcc_qupv3_wrap1_s1_clk", |
| 2138 | .parent_names = (const char *[]){ |
| 2139 | "gcc_qupv3_wrap1_s1_clk_src", |
| 2140 | }, |
| 2141 | .num_parents = 1, |
| 2142 | .flags = CLK_SET_RATE_PARENT, |
| 2143 | .ops = &clk_branch2_ops, |
| 2144 | }, |
| 2145 | }, |
| 2146 | }; |
| 2147 | |
| 2148 | static struct clk_branch gcc_qupv3_wrap1_s2_clk = { |
| 2149 | .halt_reg = 0x18274, |
| 2150 | .halt_check = BRANCH_HALT_VOTED, |
| 2151 | .clkr = { |
| 2152 | .enable_reg = 0x5200c, |
| 2153 | .enable_mask = BIT(24), |
| 2154 | .hw.init = &(struct clk_init_data){ |
| 2155 | .name = "gcc_qupv3_wrap1_s2_clk", |
| 2156 | .parent_names = (const char *[]){ |
| 2157 | "gcc_qupv3_wrap1_s2_clk_src", |
| 2158 | }, |
| 2159 | .num_parents = 1, |
| 2160 | .flags = CLK_SET_RATE_PARENT, |
| 2161 | .ops = &clk_branch2_ops, |
| 2162 | }, |
| 2163 | }, |
| 2164 | }; |
| 2165 | |
| 2166 | static struct clk_branch gcc_qupv3_wrap1_s3_clk = { |
| 2167 | .halt_reg = 0x183a4, |
| 2168 | .halt_check = BRANCH_HALT_VOTED, |
| 2169 | .clkr = { |
| 2170 | .enable_reg = 0x5200c, |
| 2171 | .enable_mask = BIT(25), |
| 2172 | .hw.init = &(struct clk_init_data){ |
| 2173 | .name = "gcc_qupv3_wrap1_s3_clk", |
| 2174 | .parent_names = (const char *[]){ |
| 2175 | "gcc_qupv3_wrap1_s3_clk_src", |
| 2176 | }, |
| 2177 | .num_parents = 1, |
| 2178 | .flags = CLK_SET_RATE_PARENT, |
| 2179 | .ops = &clk_branch2_ops, |
| 2180 | }, |
| 2181 | }, |
| 2182 | }; |
| 2183 | |
| 2184 | static struct clk_branch gcc_qupv3_wrap1_s4_clk = { |
| 2185 | .halt_reg = 0x184d4, |
| 2186 | .halt_check = BRANCH_HALT_VOTED, |
| 2187 | .clkr = { |
| 2188 | .enable_reg = 0x5200c, |
| 2189 | .enable_mask = BIT(26), |
| 2190 | .hw.init = &(struct clk_init_data){ |
| 2191 | .name = "gcc_qupv3_wrap1_s4_clk", |
| 2192 | .parent_names = (const char *[]){ |
| 2193 | "gcc_qupv3_wrap1_s4_clk_src", |
| 2194 | }, |
| 2195 | .num_parents = 1, |
| 2196 | .flags = CLK_SET_RATE_PARENT, |
| 2197 | .ops = &clk_branch2_ops, |
| 2198 | }, |
| 2199 | }, |
| 2200 | }; |
| 2201 | |
| 2202 | static struct clk_branch gcc_qupv3_wrap1_s5_clk = { |
| 2203 | .halt_reg = 0x18604, |
| 2204 | .halt_check = BRANCH_HALT_VOTED, |
| 2205 | .clkr = { |
| 2206 | .enable_reg = 0x5200c, |
| 2207 | .enable_mask = BIT(27), |
| 2208 | .hw.init = &(struct clk_init_data){ |
| 2209 | .name = "gcc_qupv3_wrap1_s5_clk", |
| 2210 | .parent_names = (const char *[]){ |
| 2211 | "gcc_qupv3_wrap1_s5_clk_src", |
| 2212 | }, |
| 2213 | .num_parents = 1, |
| 2214 | .flags = CLK_SET_RATE_PARENT, |
| 2215 | .ops = &clk_branch2_ops, |
| 2216 | }, |
| 2217 | }, |
| 2218 | }; |
| 2219 | |
| 2220 | static struct clk_branch gcc_qupv3_wrap1_s6_clk = { |
| 2221 | .halt_reg = 0x18734, |
| 2222 | .halt_check = BRANCH_HALT_VOTED, |
| 2223 | .clkr = { |
| 2224 | .enable_reg = 0x5200c, |
| 2225 | .enable_mask = BIT(28), |
| 2226 | .hw.init = &(struct clk_init_data){ |
| 2227 | .name = "gcc_qupv3_wrap1_s6_clk", |
| 2228 | .parent_names = (const char *[]){ |
| 2229 | "gcc_qupv3_wrap1_s6_clk_src", |
| 2230 | }, |
| 2231 | .num_parents = 1, |
| 2232 | .flags = CLK_SET_RATE_PARENT, |
| 2233 | .ops = &clk_branch2_ops, |
| 2234 | }, |
| 2235 | }, |
| 2236 | }; |
| 2237 | |
| 2238 | static struct clk_branch gcc_qupv3_wrap1_s7_clk = { |
| 2239 | .halt_reg = 0x18864, |
| 2240 | .halt_check = BRANCH_HALT_VOTED, |
| 2241 | .clkr = { |
| 2242 | .enable_reg = 0x5200c, |
| 2243 | .enable_mask = BIT(29), |
| 2244 | .hw.init = &(struct clk_init_data){ |
| 2245 | .name = "gcc_qupv3_wrap1_s7_clk", |
| 2246 | .parent_names = (const char *[]){ |
| 2247 | "gcc_qupv3_wrap1_s7_clk_src", |
| 2248 | }, |
| 2249 | .num_parents = 1, |
| 2250 | .flags = CLK_SET_RATE_PARENT, |
| 2251 | .ops = &clk_branch2_ops, |
| 2252 | }, |
| 2253 | }, |
| 2254 | }; |
| 2255 | |
| 2256 | static struct clk_branch gcc_qupv3_wrap_0_m_ahb_clk = { |
| 2257 | .halt_reg = 0x17004, |
| 2258 | .halt_check = BRANCH_HALT_VOTED, |
| 2259 | .clkr = { |
| 2260 | .enable_reg = 0x5200c, |
| 2261 | .enable_mask = BIT(6), |
| 2262 | .hw.init = &(struct clk_init_data){ |
| 2263 | .name = "gcc_qupv3_wrap_0_m_ahb_clk", |
| 2264 | .ops = &clk_branch2_ops, |
| 2265 | }, |
| 2266 | }, |
| 2267 | }; |
| 2268 | |
| 2269 | static struct clk_branch gcc_qupv3_wrap_0_s_ahb_clk = { |
| 2270 | .halt_reg = 0x17008, |
| 2271 | .halt_check = BRANCH_HALT_VOTED, |
| 2272 | .hwcg_reg = 0x17008, |
| 2273 | .hwcg_bit = 1, |
| 2274 | .clkr = { |
| 2275 | .enable_reg = 0x5200c, |
| 2276 | .enable_mask = BIT(7), |
| 2277 | .hw.init = &(struct clk_init_data){ |
| 2278 | .name = "gcc_qupv3_wrap_0_s_ahb_clk", |
| 2279 | .ops = &clk_branch2_ops, |
| 2280 | }, |
| 2281 | }, |
| 2282 | }; |
| 2283 | |
| 2284 | static struct clk_branch gcc_qupv3_wrap_1_m_ahb_clk = { |
| 2285 | .halt_reg = 0x1800c, |
| 2286 | .halt_check = BRANCH_HALT_VOTED, |
| 2287 | .clkr = { |
| 2288 | .enable_reg = 0x5200c, |
| 2289 | .enable_mask = BIT(20), |
| 2290 | .hw.init = &(struct clk_init_data){ |
| 2291 | .name = "gcc_qupv3_wrap_1_m_ahb_clk", |
| 2292 | .ops = &clk_branch2_ops, |
| 2293 | }, |
| 2294 | }, |
| 2295 | }; |
| 2296 | |
| 2297 | static struct clk_branch gcc_qupv3_wrap_1_s_ahb_clk = { |
| 2298 | .halt_reg = 0x18010, |
| 2299 | .halt_check = BRANCH_HALT_VOTED, |
| 2300 | .hwcg_reg = 0x18010, |
| 2301 | .hwcg_bit = 1, |
| 2302 | .clkr = { |
| 2303 | .enable_reg = 0x5200c, |
| 2304 | .enable_mask = BIT(21), |
| 2305 | .hw.init = &(struct clk_init_data){ |
| 2306 | .name = "gcc_qupv3_wrap_1_s_ahb_clk", |
| 2307 | .ops = &clk_branch2_ops, |
| 2308 | }, |
| 2309 | }, |
| 2310 | }; |
| 2311 | |
| 2312 | static struct clk_branch gcc_sdcc2_ahb_clk = { |
| 2313 | .halt_reg = 0x14008, |
| 2314 | .halt_check = BRANCH_HALT, |
| 2315 | .clkr = { |
| 2316 | .enable_reg = 0x14008, |
| 2317 | .enable_mask = BIT(0), |
| 2318 | .hw.init = &(struct clk_init_data){ |
| 2319 | .name = "gcc_sdcc2_ahb_clk", |
| 2320 | .ops = &clk_branch2_ops, |
| 2321 | }, |
| 2322 | }, |
| 2323 | }; |
| 2324 | |
| 2325 | static struct clk_branch gcc_sdcc2_apps_clk = { |
| 2326 | .halt_reg = 0x14004, |
| 2327 | .halt_check = BRANCH_HALT, |
| 2328 | .clkr = { |
| 2329 | .enable_reg = 0x14004, |
| 2330 | .enable_mask = BIT(0), |
| 2331 | .hw.init = &(struct clk_init_data){ |
| 2332 | .name = "gcc_sdcc2_apps_clk", |
| 2333 | .parent_names = (const char *[]){ |
| 2334 | "gcc_sdcc2_apps_clk_src", |
| 2335 | }, |
| 2336 | .num_parents = 1, |
| 2337 | .flags = CLK_SET_RATE_PARENT, |
| 2338 | .ops = &clk_branch2_ops, |
| 2339 | }, |
| 2340 | }, |
| 2341 | }; |
| 2342 | |
| 2343 | static struct clk_branch gcc_sdcc4_ahb_clk = { |
| 2344 | .halt_reg = 0x16008, |
| 2345 | .halt_check = BRANCH_HALT, |
| 2346 | .clkr = { |
| 2347 | .enable_reg = 0x16008, |
| 2348 | .enable_mask = BIT(0), |
| 2349 | .hw.init = &(struct clk_init_data){ |
| 2350 | .name = "gcc_sdcc4_ahb_clk", |
| 2351 | .ops = &clk_branch2_ops, |
| 2352 | }, |
| 2353 | }, |
| 2354 | }; |
| 2355 | |
| 2356 | static struct clk_branch gcc_sdcc4_apps_clk = { |
| 2357 | .halt_reg = 0x16004, |
| 2358 | .halt_check = BRANCH_HALT, |
| 2359 | .clkr = { |
| 2360 | .enable_reg = 0x16004, |
| 2361 | .enable_mask = BIT(0), |
| 2362 | .hw.init = &(struct clk_init_data){ |
| 2363 | .name = "gcc_sdcc4_apps_clk", |
| 2364 | .parent_names = (const char *[]){ |
| 2365 | "gcc_sdcc4_apps_clk_src", |
| 2366 | }, |
| 2367 | .num_parents = 1, |
| 2368 | .flags = CLK_SET_RATE_PARENT, |
| 2369 | .ops = &clk_branch2_ops, |
| 2370 | }, |
| 2371 | }, |
| 2372 | }; |
| 2373 | |
| 2374 | static struct clk_branch gcc_sys_noc_cpuss_ahb_clk = { |
| 2375 | .halt_reg = 0x414c, |
| 2376 | .halt_check = BRANCH_HALT_VOTED, |
| 2377 | .clkr = { |
| 2378 | .enable_reg = 0x52004, |
| 2379 | .enable_mask = BIT(0), |
| 2380 | .hw.init = &(struct clk_init_data){ |
| 2381 | .name = "gcc_sys_noc_cpuss_ahb_clk", |
| 2382 | .parent_names = (const char *[]){ |
| 2383 | "gcc_cpuss_ahb_clk_src", |
| 2384 | }, |
| 2385 | .num_parents = 1, |
| 2386 | .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, |
| 2387 | .ops = &clk_branch2_ops, |
| 2388 | }, |
| 2389 | }, |
| 2390 | }; |
| 2391 | |
| 2392 | static struct clk_branch gcc_tsif_ahb_clk = { |
| 2393 | .halt_reg = 0x36004, |
| 2394 | .halt_check = BRANCH_HALT, |
| 2395 | .clkr = { |
| 2396 | .enable_reg = 0x36004, |
| 2397 | .enable_mask = BIT(0), |
| 2398 | .hw.init = &(struct clk_init_data){ |
| 2399 | .name = "gcc_tsif_ahb_clk", |
| 2400 | .ops = &clk_branch2_ops, |
| 2401 | }, |
| 2402 | }, |
| 2403 | }; |
| 2404 | |
| 2405 | static struct clk_branch gcc_tsif_inactivity_timers_clk = { |
| 2406 | .halt_reg = 0x3600c, |
| 2407 | .halt_check = BRANCH_HALT, |
| 2408 | .clkr = { |
| 2409 | .enable_reg = 0x3600c, |
| 2410 | .enable_mask = BIT(0), |
| 2411 | .hw.init = &(struct clk_init_data){ |
| 2412 | .name = "gcc_tsif_inactivity_timers_clk", |
| 2413 | .ops = &clk_branch2_ops, |
| 2414 | }, |
| 2415 | }, |
| 2416 | }; |
| 2417 | |
| 2418 | static struct clk_branch gcc_tsif_ref_clk = { |
| 2419 | .halt_reg = 0x36008, |
| 2420 | .halt_check = BRANCH_HALT, |
| 2421 | .clkr = { |
| 2422 | .enable_reg = 0x36008, |
| 2423 | .enable_mask = BIT(0), |
| 2424 | .hw.init = &(struct clk_init_data){ |
| 2425 | .name = "gcc_tsif_ref_clk", |
| 2426 | .parent_names = (const char *[]){ |
| 2427 | "gcc_tsif_ref_clk_src", |
| 2428 | }, |
| 2429 | .num_parents = 1, |
| 2430 | .flags = CLK_SET_RATE_PARENT, |
| 2431 | .ops = &clk_branch2_ops, |
| 2432 | }, |
| 2433 | }, |
| 2434 | }; |
| 2435 | |
| 2436 | static struct clk_branch gcc_ufs_card_ahb_clk = { |
| 2437 | .halt_reg = 0x75010, |
| 2438 | .halt_check = BRANCH_HALT, |
| 2439 | .hwcg_reg = 0x75010, |
| 2440 | .hwcg_bit = 1, |
| 2441 | .clkr = { |
| 2442 | .enable_reg = 0x75010, |
| 2443 | .enable_mask = BIT(0), |
| 2444 | .hw.init = &(struct clk_init_data){ |
| 2445 | .name = "gcc_ufs_card_ahb_clk", |
| 2446 | .ops = &clk_branch2_ops, |
| 2447 | }, |
| 2448 | }, |
| 2449 | }; |
| 2450 | |
| 2451 | static struct clk_branch gcc_ufs_card_axi_clk = { |
| 2452 | .halt_reg = 0x7500c, |
| 2453 | .halt_check = BRANCH_HALT, |
| 2454 | .hwcg_reg = 0x7500c, |
| 2455 | .hwcg_bit = 1, |
| 2456 | .clkr = { |
| 2457 | .enable_reg = 0x7500c, |
| 2458 | .enable_mask = BIT(0), |
| 2459 | .hw.init = &(struct clk_init_data){ |
| 2460 | .name = "gcc_ufs_card_axi_clk", |
| 2461 | .parent_names = (const char *[]){ |
| 2462 | "gcc_ufs_card_axi_clk_src", |
| 2463 | }, |
| 2464 | .num_parents = 1, |
| 2465 | .flags = CLK_SET_RATE_PARENT, |
| 2466 | .ops = &clk_branch2_ops, |
| 2467 | }, |
| 2468 | }, |
| 2469 | }; |
| 2470 | |
| 2471 | static struct clk_branch gcc_ufs_card_clkref_clk = { |
| 2472 | .halt_reg = 0x8c004, |
| 2473 | .halt_check = BRANCH_HALT, |
| 2474 | .clkr = { |
| 2475 | .enable_reg = 0x8c004, |
| 2476 | .enable_mask = BIT(0), |
| 2477 | .hw.init = &(struct clk_init_data){ |
| 2478 | .name = "gcc_ufs_card_clkref_clk", |
| 2479 | .ops = &clk_branch2_ops, |
| 2480 | }, |
| 2481 | }, |
| 2482 | }; |
| 2483 | |
| 2484 | static struct clk_branch gcc_ufs_card_ice_core_clk = { |
| 2485 | .halt_reg = 0x75058, |
| 2486 | .halt_check = BRANCH_HALT, |
| 2487 | .hwcg_reg = 0x75058, |
| 2488 | .hwcg_bit = 1, |
| 2489 | .clkr = { |
| 2490 | .enable_reg = 0x75058, |
| 2491 | .enable_mask = BIT(0), |
| 2492 | .hw.init = &(struct clk_init_data){ |
| 2493 | .name = "gcc_ufs_card_ice_core_clk", |
| 2494 | .parent_names = (const char *[]){ |
| 2495 | "gcc_ufs_card_ice_core_clk_src", |
| 2496 | }, |
| 2497 | .num_parents = 1, |
| 2498 | .flags = CLK_SET_RATE_PARENT, |
| 2499 | .ops = &clk_branch2_ops, |
| 2500 | }, |
| 2501 | }, |
| 2502 | }; |
| 2503 | |
| 2504 | static struct clk_branch gcc_ufs_card_phy_aux_clk = { |
| 2505 | .halt_reg = 0x7508c, |
| 2506 | .halt_check = BRANCH_HALT, |
| 2507 | .hwcg_reg = 0x7508c, |
| 2508 | .hwcg_bit = 1, |
| 2509 | .clkr = { |
| 2510 | .enable_reg = 0x7508c, |
| 2511 | .enable_mask = BIT(0), |
| 2512 | .hw.init = &(struct clk_init_data){ |
| 2513 | .name = "gcc_ufs_card_phy_aux_clk", |
| 2514 | .parent_names = (const char *[]){ |
| 2515 | "gcc_ufs_card_phy_aux_clk_src", |
| 2516 | }, |
| 2517 | .num_parents = 1, |
| 2518 | .flags = CLK_SET_RATE_PARENT, |
| 2519 | .ops = &clk_branch2_ops, |
| 2520 | }, |
| 2521 | }, |
| 2522 | }; |
| 2523 | |
| 2524 | static struct clk_branch gcc_ufs_card_rx_symbol_0_clk = { |
| 2525 | .halt_check = BRANCH_HALT_SKIP, |
| 2526 | .clkr = { |
| 2527 | .enable_reg = 0x75018, |
| 2528 | .enable_mask = BIT(0), |
| 2529 | .hw.init = &(struct clk_init_data){ |
| 2530 | .name = "gcc_ufs_card_rx_symbol_0_clk", |
| 2531 | .ops = &clk_branch2_ops, |
| 2532 | }, |
| 2533 | }, |
| 2534 | }; |
| 2535 | |
| 2536 | static struct clk_branch gcc_ufs_card_rx_symbol_1_clk = { |
| 2537 | .halt_check = BRANCH_HALT_SKIP, |
| 2538 | .clkr = { |
| 2539 | .enable_reg = 0x750a8, |
| 2540 | .enable_mask = BIT(0), |
| 2541 | .hw.init = &(struct clk_init_data){ |
| 2542 | .name = "gcc_ufs_card_rx_symbol_1_clk", |
| 2543 | .ops = &clk_branch2_ops, |
| 2544 | }, |
| 2545 | }, |
| 2546 | }; |
| 2547 | |
| 2548 | static struct clk_branch gcc_ufs_card_tx_symbol_0_clk = { |
| 2549 | .halt_check = BRANCH_HALT_SKIP, |
| 2550 | .clkr = { |
| 2551 | .enable_reg = 0x75014, |
| 2552 | .enable_mask = BIT(0), |
| 2553 | .hw.init = &(struct clk_init_data){ |
| 2554 | .name = "gcc_ufs_card_tx_symbol_0_clk", |
| 2555 | .ops = &clk_branch2_ops, |
| 2556 | }, |
| 2557 | }, |
| 2558 | }; |
| 2559 | |
| 2560 | static struct clk_branch gcc_ufs_card_unipro_core_clk = { |
| 2561 | .halt_reg = 0x75054, |
| 2562 | .halt_check = BRANCH_HALT, |
| 2563 | .hwcg_reg = 0x75054, |
| 2564 | .hwcg_bit = 1, |
| 2565 | .clkr = { |
| 2566 | .enable_reg = 0x75054, |
| 2567 | .enable_mask = BIT(0), |
| 2568 | .hw.init = &(struct clk_init_data){ |
| 2569 | .name = "gcc_ufs_card_unipro_core_clk", |
| 2570 | .parent_names = (const char *[]){ |
| 2571 | "gcc_ufs_card_unipro_core_clk_src", |
| 2572 | }, |
| 2573 | .num_parents = 1, |
| 2574 | .flags = CLK_SET_RATE_PARENT, |
| 2575 | .ops = &clk_branch2_ops, |
| 2576 | }, |
| 2577 | }, |
| 2578 | }; |
| 2579 | |
| 2580 | static struct clk_branch gcc_ufs_mem_clkref_clk = { |
| 2581 | .halt_reg = 0x8c000, |
| 2582 | .halt_check = BRANCH_HALT, |
| 2583 | .clkr = { |
| 2584 | .enable_reg = 0x8c000, |
| 2585 | .enable_mask = BIT(0), |
| 2586 | .hw.init = &(struct clk_init_data){ |
| 2587 | .name = "gcc_ufs_mem_clkref_clk", |
| 2588 | .ops = &clk_branch2_ops, |
| 2589 | }, |
| 2590 | }, |
| 2591 | }; |
| 2592 | |
| 2593 | static struct clk_branch gcc_ufs_phy_ahb_clk = { |
| 2594 | .halt_reg = 0x77010, |
| 2595 | .halt_check = BRANCH_HALT, |
| 2596 | .hwcg_reg = 0x77010, |
| 2597 | .hwcg_bit = 1, |
| 2598 | .clkr = { |
| 2599 | .enable_reg = 0x77010, |
| 2600 | .enable_mask = BIT(0), |
| 2601 | .hw.init = &(struct clk_init_data){ |
| 2602 | .name = "gcc_ufs_phy_ahb_clk", |
| 2603 | .ops = &clk_branch2_ops, |
| 2604 | }, |
| 2605 | }, |
| 2606 | }; |
| 2607 | |
| 2608 | static struct clk_branch gcc_ufs_phy_axi_clk = { |
| 2609 | .halt_reg = 0x7700c, |
| 2610 | .halt_check = BRANCH_HALT, |
| 2611 | .hwcg_reg = 0x7700c, |
| 2612 | .hwcg_bit = 1, |
| 2613 | .clkr = { |
| 2614 | .enable_reg = 0x7700c, |
| 2615 | .enable_mask = BIT(0), |
| 2616 | .hw.init = &(struct clk_init_data){ |
| 2617 | .name = "gcc_ufs_phy_axi_clk", |
| 2618 | .parent_names = (const char *[]){ |
| 2619 | "gcc_ufs_phy_axi_clk_src", |
| 2620 | }, |
| 2621 | .num_parents = 1, |
| 2622 | .flags = CLK_SET_RATE_PARENT, |
| 2623 | .ops = &clk_branch2_ops, |
| 2624 | }, |
| 2625 | }, |
| 2626 | }; |
| 2627 | |
| 2628 | static struct clk_branch gcc_ufs_phy_ice_core_clk = { |
| 2629 | .halt_reg = 0x77058, |
| 2630 | .halt_check = BRANCH_HALT, |
| 2631 | .hwcg_reg = 0x77058, |
| 2632 | .hwcg_bit = 1, |
| 2633 | .clkr = { |
| 2634 | .enable_reg = 0x77058, |
| 2635 | .enable_mask = BIT(0), |
| 2636 | .hw.init = &(struct clk_init_data){ |
| 2637 | .name = "gcc_ufs_phy_ice_core_clk", |
| 2638 | .parent_names = (const char *[]){ |
| 2639 | "gcc_ufs_phy_ice_core_clk_src", |
| 2640 | }, |
| 2641 | .num_parents = 1, |
| 2642 | .flags = CLK_SET_RATE_PARENT, |
| 2643 | .ops = &clk_branch2_ops, |
| 2644 | }, |
| 2645 | }, |
| 2646 | }; |
| 2647 | |
| 2648 | static struct clk_branch gcc_ufs_phy_phy_aux_clk = { |
| 2649 | .halt_reg = 0x7708c, |
| 2650 | .halt_check = BRANCH_HALT, |
| 2651 | .hwcg_reg = 0x7708c, |
| 2652 | .hwcg_bit = 1, |
| 2653 | .clkr = { |
| 2654 | .enable_reg = 0x7708c, |
| 2655 | .enable_mask = BIT(0), |
| 2656 | .hw.init = &(struct clk_init_data){ |
| 2657 | .name = "gcc_ufs_phy_phy_aux_clk", |
| 2658 | .parent_names = (const char *[]){ |
| 2659 | "gcc_ufs_phy_phy_aux_clk_src", |
| 2660 | }, |
| 2661 | .num_parents = 1, |
| 2662 | .flags = CLK_SET_RATE_PARENT, |
| 2663 | .ops = &clk_branch2_ops, |
| 2664 | }, |
| 2665 | }, |
| 2666 | }; |
| 2667 | |
| 2668 | static struct clk_branch gcc_ufs_phy_rx_symbol_0_clk = { |
| 2669 | .halt_check = BRANCH_HALT_SKIP, |
| 2670 | .clkr = { |
| 2671 | .enable_reg = 0x77018, |
| 2672 | .enable_mask = BIT(0), |
| 2673 | .hw.init = &(struct clk_init_data){ |
| 2674 | .name = "gcc_ufs_phy_rx_symbol_0_clk", |
| 2675 | .ops = &clk_branch2_ops, |
| 2676 | }, |
| 2677 | }, |
| 2678 | }; |
| 2679 | |
| 2680 | static struct clk_branch gcc_ufs_phy_rx_symbol_1_clk = { |
| 2681 | .halt_check = BRANCH_HALT_SKIP, |
| 2682 | .clkr = { |
| 2683 | .enable_reg = 0x770a8, |
| 2684 | .enable_mask = BIT(0), |
| 2685 | .hw.init = &(struct clk_init_data){ |
| 2686 | .name = "gcc_ufs_phy_rx_symbol_1_clk", |
| 2687 | .ops = &clk_branch2_ops, |
| 2688 | }, |
| 2689 | }, |
| 2690 | }; |
| 2691 | |
| 2692 | static struct clk_branch gcc_ufs_phy_tx_symbol_0_clk = { |
| 2693 | .halt_check = BRANCH_HALT_SKIP, |
| 2694 | .clkr = { |
| 2695 | .enable_reg = 0x77014, |
| 2696 | .enable_mask = BIT(0), |
| 2697 | .hw.init = &(struct clk_init_data){ |
| 2698 | .name = "gcc_ufs_phy_tx_symbol_0_clk", |
| 2699 | .ops = &clk_branch2_ops, |
| 2700 | }, |
| 2701 | }, |
| 2702 | }; |
| 2703 | |
| 2704 | static struct clk_branch gcc_ufs_phy_unipro_core_clk = { |
| 2705 | .halt_reg = 0x77054, |
| 2706 | .halt_check = BRANCH_HALT, |
| 2707 | .hwcg_reg = 0x77054, |
| 2708 | .hwcg_bit = 1, |
| 2709 | .clkr = { |
| 2710 | .enable_reg = 0x77054, |
| 2711 | .enable_mask = BIT(0), |
| 2712 | .hw.init = &(struct clk_init_data){ |
| 2713 | .name = "gcc_ufs_phy_unipro_core_clk", |
| 2714 | .parent_names = (const char *[]){ |
| 2715 | "gcc_ufs_phy_unipro_core_clk_src", |
| 2716 | }, |
| 2717 | .num_parents = 1, |
| 2718 | .flags = CLK_SET_RATE_PARENT, |
| 2719 | .ops = &clk_branch2_ops, |
| 2720 | }, |
| 2721 | }, |
| 2722 | }; |
| 2723 | |
| 2724 | static struct clk_branch gcc_usb30_prim_master_clk = { |
| 2725 | .halt_reg = 0xf00c, |
| 2726 | .halt_check = BRANCH_HALT, |
| 2727 | .clkr = { |
| 2728 | .enable_reg = 0xf00c, |
| 2729 | .enable_mask = BIT(0), |
| 2730 | .hw.init = &(struct clk_init_data){ |
| 2731 | .name = "gcc_usb30_prim_master_clk", |
| 2732 | .parent_names = (const char *[]){ |
| 2733 | "gcc_usb30_prim_master_clk_src", |
| 2734 | }, |
| 2735 | .num_parents = 1, |
| 2736 | .flags = CLK_SET_RATE_PARENT, |
| 2737 | .ops = &clk_branch2_ops, |
| 2738 | }, |
| 2739 | }, |
| 2740 | }; |
| 2741 | |
| 2742 | static struct clk_branch gcc_usb30_prim_mock_utmi_clk = { |
| 2743 | .halt_reg = 0xf014, |
| 2744 | .halt_check = BRANCH_HALT, |
| 2745 | .clkr = { |
| 2746 | .enable_reg = 0xf014, |
| 2747 | .enable_mask = BIT(0), |
| 2748 | .hw.init = &(struct clk_init_data){ |
| 2749 | .name = "gcc_usb30_prim_mock_utmi_clk", |
| 2750 | .parent_names = (const char *[]){ |
| 2751 | "gcc_usb30_prim_mock_utmi_clk_src", |
| 2752 | }, |
| 2753 | .num_parents = 1, |
| 2754 | .flags = CLK_SET_RATE_PARENT, |
| 2755 | .ops = &clk_branch2_ops, |
| 2756 | }, |
| 2757 | }, |
| 2758 | }; |
| 2759 | |
| 2760 | static struct clk_branch gcc_usb30_prim_sleep_clk = { |
| 2761 | .halt_reg = 0xf010, |
| 2762 | .halt_check = BRANCH_HALT, |
| 2763 | .clkr = { |
| 2764 | .enable_reg = 0xf010, |
| 2765 | .enable_mask = BIT(0), |
| 2766 | .hw.init = &(struct clk_init_data){ |
| 2767 | .name = "gcc_usb30_prim_sleep_clk", |
| 2768 | .ops = &clk_branch2_ops, |
| 2769 | }, |
| 2770 | }, |
| 2771 | }; |
| 2772 | |
| 2773 | static struct clk_branch gcc_usb30_sec_master_clk = { |
| 2774 | .halt_reg = 0x1000c, |
| 2775 | .halt_check = BRANCH_HALT, |
| 2776 | .clkr = { |
| 2777 | .enable_reg = 0x1000c, |
| 2778 | .enable_mask = BIT(0), |
| 2779 | .hw.init = &(struct clk_init_data){ |
| 2780 | .name = "gcc_usb30_sec_master_clk", |
| 2781 | .parent_names = (const char *[]){ |
| 2782 | "gcc_usb30_sec_master_clk_src", |
| 2783 | }, |
| 2784 | .num_parents = 1, |
| 2785 | .flags = CLK_SET_RATE_PARENT, |
| 2786 | .ops = &clk_branch2_ops, |
| 2787 | }, |
| 2788 | }, |
| 2789 | }; |
| 2790 | |
| 2791 | static struct clk_branch gcc_usb30_sec_mock_utmi_clk = { |
| 2792 | .halt_reg = 0x10014, |
| 2793 | .halt_check = BRANCH_HALT, |
| 2794 | .clkr = { |
| 2795 | .enable_reg = 0x10014, |
| 2796 | .enable_mask = BIT(0), |
| 2797 | .hw.init = &(struct clk_init_data){ |
| 2798 | .name = "gcc_usb30_sec_mock_utmi_clk", |
| 2799 | .parent_names = (const char *[]){ |
| 2800 | "gcc_usb30_sec_mock_utmi_clk_src", |
| 2801 | }, |
| 2802 | .num_parents = 1, |
| 2803 | .flags = CLK_SET_RATE_PARENT, |
| 2804 | .ops = &clk_branch2_ops, |
| 2805 | }, |
| 2806 | }, |
| 2807 | }; |
| 2808 | |
| 2809 | static struct clk_branch gcc_usb30_sec_sleep_clk = { |
| 2810 | .halt_reg = 0x10010, |
| 2811 | .halt_check = BRANCH_HALT, |
| 2812 | .clkr = { |
| 2813 | .enable_reg = 0x10010, |
| 2814 | .enable_mask = BIT(0), |
| 2815 | .hw.init = &(struct clk_init_data){ |
| 2816 | .name = "gcc_usb30_sec_sleep_clk", |
| 2817 | .ops = &clk_branch2_ops, |
| 2818 | }, |
| 2819 | }, |
| 2820 | }; |
| 2821 | |
| 2822 | static struct clk_branch gcc_usb3_prim_clkref_clk = { |
| 2823 | .halt_reg = 0x8c008, |
| 2824 | .halt_check = BRANCH_HALT, |
| 2825 | .clkr = { |
| 2826 | .enable_reg = 0x8c008, |
| 2827 | .enable_mask = BIT(0), |
| 2828 | .hw.init = &(struct clk_init_data){ |
| 2829 | .name = "gcc_usb3_prim_clkref_clk", |
| 2830 | .ops = &clk_branch2_ops, |
| 2831 | }, |
| 2832 | }, |
| 2833 | }; |
| 2834 | |
| 2835 | static struct clk_branch gcc_usb3_prim_phy_aux_clk = { |
| 2836 | .halt_reg = 0xf04c, |
| 2837 | .halt_check = BRANCH_HALT, |
| 2838 | .clkr = { |
| 2839 | .enable_reg = 0xf04c, |
| 2840 | .enable_mask = BIT(0), |
| 2841 | .hw.init = &(struct clk_init_data){ |
| 2842 | .name = "gcc_usb3_prim_phy_aux_clk", |
| 2843 | .parent_names = (const char *[]){ |
| 2844 | "gcc_usb3_prim_phy_aux_clk_src", |
| 2845 | }, |
| 2846 | .num_parents = 1, |
| 2847 | .flags = CLK_SET_RATE_PARENT, |
| 2848 | .ops = &clk_branch2_ops, |
| 2849 | }, |
| 2850 | }, |
| 2851 | }; |
| 2852 | |
| 2853 | static struct clk_branch gcc_usb3_prim_phy_com_aux_clk = { |
| 2854 | .halt_reg = 0xf050, |
| 2855 | .halt_check = BRANCH_HALT, |
| 2856 | .clkr = { |
| 2857 | .enable_reg = 0xf050, |
| 2858 | .enable_mask = BIT(0), |
| 2859 | .hw.init = &(struct clk_init_data){ |
| 2860 | .name = "gcc_usb3_prim_phy_com_aux_clk", |
| 2861 | .parent_names = (const char *[]){ |
| 2862 | "gcc_usb3_prim_phy_aux_clk_src", |
| 2863 | }, |
| 2864 | .num_parents = 1, |
| 2865 | .flags = CLK_SET_RATE_PARENT, |
| 2866 | .ops = &clk_branch2_ops, |
| 2867 | }, |
| 2868 | }, |
| 2869 | }; |
| 2870 | |
| 2871 | static struct clk_branch gcc_usb3_prim_phy_pipe_clk = { |
| 2872 | .halt_check = BRANCH_HALT_SKIP, |
| 2873 | .clkr = { |
| 2874 | .enable_reg = 0xf054, |
| 2875 | .enable_mask = BIT(0), |
| 2876 | .hw.init = &(struct clk_init_data){ |
| 2877 | .name = "gcc_usb3_prim_phy_pipe_clk", |
| 2878 | .ops = &clk_branch2_ops, |
| 2879 | }, |
| 2880 | }, |
| 2881 | }; |
| 2882 | |
| 2883 | static struct clk_branch gcc_usb3_sec_clkref_clk = { |
| 2884 | .halt_reg = 0x8c028, |
| 2885 | .halt_check = BRANCH_HALT, |
| 2886 | .clkr = { |
| 2887 | .enable_reg = 0x8c028, |
| 2888 | .enable_mask = BIT(0), |
| 2889 | .hw.init = &(struct clk_init_data){ |
| 2890 | .name = "gcc_usb3_sec_clkref_clk", |
| 2891 | .ops = &clk_branch2_ops, |
| 2892 | }, |
| 2893 | }, |
| 2894 | }; |
| 2895 | |
| 2896 | static struct clk_branch gcc_usb3_sec_phy_aux_clk = { |
| 2897 | .halt_reg = 0x1004c, |
| 2898 | .halt_check = BRANCH_HALT, |
| 2899 | .clkr = { |
| 2900 | .enable_reg = 0x1004c, |
| 2901 | .enable_mask = BIT(0), |
| 2902 | .hw.init = &(struct clk_init_data){ |
| 2903 | .name = "gcc_usb3_sec_phy_aux_clk", |
| 2904 | .parent_names = (const char *[]){ |
| 2905 | "gcc_usb3_sec_phy_aux_clk_src", |
| 2906 | }, |
| 2907 | .num_parents = 1, |
| 2908 | .flags = CLK_SET_RATE_PARENT, |
| 2909 | .ops = &clk_branch2_ops, |
| 2910 | }, |
| 2911 | }, |
| 2912 | }; |
| 2913 | |
| 2914 | static struct clk_branch gcc_usb3_sec_phy_com_aux_clk = { |
| 2915 | .halt_reg = 0x10050, |
| 2916 | .halt_check = BRANCH_HALT, |
| 2917 | .clkr = { |
| 2918 | .enable_reg = 0x10050, |
| 2919 | .enable_mask = BIT(0), |
| 2920 | .hw.init = &(struct clk_init_data){ |
| 2921 | .name = "gcc_usb3_sec_phy_com_aux_clk", |
| 2922 | .parent_names = (const char *[]){ |
| 2923 | "gcc_usb3_sec_phy_aux_clk_src", |
| 2924 | }, |
| 2925 | .num_parents = 1, |
| 2926 | .flags = CLK_SET_RATE_PARENT, |
| 2927 | .ops = &clk_branch2_ops, |
| 2928 | }, |
| 2929 | }, |
| 2930 | }; |
| 2931 | |
| 2932 | static struct clk_branch gcc_usb3_sec_phy_pipe_clk = { |
| 2933 | .halt_check = BRANCH_HALT_SKIP, |
| 2934 | .clkr = { |
| 2935 | .enable_reg = 0x10054, |
| 2936 | .enable_mask = BIT(0), |
| 2937 | .hw.init = &(struct clk_init_data){ |
| 2938 | .name = "gcc_usb3_sec_phy_pipe_clk", |
| 2939 | .ops = &clk_branch2_ops, |
| 2940 | }, |
| 2941 | }, |
| 2942 | }; |
| 2943 | |
| 2944 | static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk = { |
| 2945 | .halt_reg = 0x6a004, |
| 2946 | .halt_check = BRANCH_HALT, |
| 2947 | .hwcg_reg = 0x6a004, |
| 2948 | .hwcg_bit = 1, |
| 2949 | .clkr = { |
| 2950 | .enable_reg = 0x6a004, |
| 2951 | .enable_mask = BIT(0), |
| 2952 | .hw.init = &(struct clk_init_data){ |
| 2953 | .name = "gcc_usb_phy_cfg_ahb2phy_clk", |
| 2954 | .ops = &clk_branch2_ops, |
| 2955 | }, |
| 2956 | }, |
| 2957 | }; |
| 2958 | |
| 2959 | static struct clk_branch gcc_vdda_vs_clk = { |
| 2960 | .halt_reg = 0x7a00c, |
| 2961 | .halt_check = BRANCH_HALT, |
| 2962 | .clkr = { |
| 2963 | .enable_reg = 0x7a00c, |
| 2964 | .enable_mask = BIT(0), |
| 2965 | .hw.init = &(struct clk_init_data){ |
| 2966 | .name = "gcc_vdda_vs_clk", |
| 2967 | .parent_names = (const char *[]){ |
| 2968 | "gcc_vsensor_clk_src", |
| 2969 | }, |
| 2970 | .num_parents = 1, |
| 2971 | .flags = CLK_SET_RATE_PARENT, |
| 2972 | .ops = &clk_branch2_ops, |
| 2973 | }, |
| 2974 | }, |
| 2975 | }; |
| 2976 | |
| 2977 | static struct clk_branch gcc_vddcx_vs_clk = { |
| 2978 | .halt_reg = 0x7a004, |
| 2979 | .halt_check = BRANCH_HALT, |
| 2980 | .clkr = { |
| 2981 | .enable_reg = 0x7a004, |
| 2982 | .enable_mask = BIT(0), |
| 2983 | .hw.init = &(struct clk_init_data){ |
| 2984 | .name = "gcc_vddcx_vs_clk", |
| 2985 | .parent_names = (const char *[]){ |
| 2986 | "gcc_vsensor_clk_src", |
| 2987 | }, |
| 2988 | .num_parents = 1, |
| 2989 | .flags = CLK_SET_RATE_PARENT, |
| 2990 | .ops = &clk_branch2_ops, |
| 2991 | }, |
| 2992 | }, |
| 2993 | }; |
| 2994 | |
| 2995 | static struct clk_branch gcc_vddmx_vs_clk = { |
| 2996 | .halt_reg = 0x7a008, |
| 2997 | .halt_check = BRANCH_HALT, |
| 2998 | .clkr = { |
| 2999 | .enable_reg = 0x7a008, |
| 3000 | .enable_mask = BIT(0), |
| 3001 | .hw.init = &(struct clk_init_data){ |
| 3002 | .name = "gcc_vddmx_vs_clk", |
| 3003 | .parent_names = (const char *[]){ |
| 3004 | "gcc_vsensor_clk_src", |
| 3005 | }, |
| 3006 | .num_parents = 1, |
| 3007 | .flags = CLK_SET_RATE_PARENT, |
| 3008 | .ops = &clk_branch2_ops, |
| 3009 | }, |
| 3010 | }, |
| 3011 | }; |
| 3012 | |
| 3013 | static struct clk_branch gcc_video_ahb_clk = { |
| 3014 | .halt_reg = 0xb004, |
| 3015 | .halt_check = BRANCH_HALT, |
| 3016 | .hwcg_reg = 0xb004, |
| 3017 | .hwcg_bit = 1, |
| 3018 | .clkr = { |
| 3019 | .enable_reg = 0xb004, |
| 3020 | .enable_mask = BIT(0), |
| 3021 | .hw.init = &(struct clk_init_data){ |
| 3022 | .name = "gcc_video_ahb_clk", |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 3023 | .flags = CLK_IS_CRITICAL, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 3024 | .ops = &clk_branch2_ops, |
| 3025 | }, |
| 3026 | }, |
| 3027 | }; |
| 3028 | |
| 3029 | static struct clk_branch gcc_video_axi_clk = { |
| 3030 | .halt_reg = 0xb01c, |
| 3031 | .halt_check = BRANCH_VOTED, |
| 3032 | .clkr = { |
| 3033 | .enable_reg = 0xb01c, |
| 3034 | .enable_mask = BIT(0), |
| 3035 | .hw.init = &(struct clk_init_data){ |
| 3036 | .name = "gcc_video_axi_clk", |
| 3037 | .ops = &clk_branch2_ops, |
| 3038 | }, |
| 3039 | }, |
| 3040 | }; |
| 3041 | |
| 3042 | static struct clk_branch gcc_video_xo_clk = { |
| 3043 | .halt_reg = 0xb028, |
| 3044 | .halt_check = BRANCH_HALT, |
| 3045 | .clkr = { |
| 3046 | .enable_reg = 0xb028, |
| 3047 | .enable_mask = BIT(0), |
| 3048 | .hw.init = &(struct clk_init_data){ |
| 3049 | .name = "gcc_video_xo_clk", |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 3050 | .flags = CLK_IS_CRITICAL, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 3051 | .ops = &clk_branch2_ops, |
| 3052 | }, |
| 3053 | }, |
| 3054 | }; |
| 3055 | |
| 3056 | static struct clk_branch gcc_vs_ctrl_ahb_clk = { |
| 3057 | .halt_reg = 0x7a014, |
| 3058 | .halt_check = BRANCH_HALT, |
| 3059 | .hwcg_reg = 0x7a014, |
| 3060 | .hwcg_bit = 1, |
| 3061 | .clkr = { |
| 3062 | .enable_reg = 0x7a014, |
| 3063 | .enable_mask = BIT(0), |
| 3064 | .hw.init = &(struct clk_init_data){ |
| 3065 | .name = "gcc_vs_ctrl_ahb_clk", |
| 3066 | .ops = &clk_branch2_ops, |
| 3067 | }, |
| 3068 | }, |
| 3069 | }; |
| 3070 | |
| 3071 | static struct clk_branch gcc_vs_ctrl_clk = { |
| 3072 | .halt_reg = 0x7a010, |
| 3073 | .halt_check = BRANCH_HALT, |
| 3074 | .clkr = { |
| 3075 | .enable_reg = 0x7a010, |
| 3076 | .enable_mask = BIT(0), |
| 3077 | .hw.init = &(struct clk_init_data){ |
| 3078 | .name = "gcc_vs_ctrl_clk", |
| 3079 | .parent_names = (const char *[]){ |
| 3080 | "gcc_vs_ctrl_clk_src", |
| 3081 | }, |
| 3082 | .num_parents = 1, |
| 3083 | .flags = CLK_SET_RATE_PARENT, |
| 3084 | .ops = &clk_branch2_ops, |
| 3085 | }, |
| 3086 | }, |
| 3087 | }; |
| 3088 | |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 3089 | static struct clk_branch gcc_cpuss_dvm_bus_clk = { |
| 3090 | .halt_reg = 0x48190, |
| 3091 | .halt_check = BRANCH_HALT, |
| 3092 | .clkr = { |
| 3093 | .enable_reg = 0x48190, |
| 3094 | .enable_mask = BIT(0), |
| 3095 | .hw.init = &(struct clk_init_data){ |
| 3096 | .name = "gcc_cpuss_dvm_bus_clk", |
| 3097 | .flags = CLK_IS_CRITICAL, |
| 3098 | .ops = &clk_branch2_ops, |
| 3099 | }, |
| 3100 | }, |
| 3101 | }; |
| 3102 | |
| 3103 | static struct clk_branch gcc_cpuss_gnoc_clk = { |
| 3104 | .halt_reg = 0x48004, |
| 3105 | .halt_check = BRANCH_HALT_VOTED, |
| 3106 | .hwcg_reg = 0x48004, |
| 3107 | .hwcg_bit = 1, |
| 3108 | .clkr = { |
| 3109 | .enable_reg = 0x52004, |
| 3110 | .enable_mask = BIT(22), |
| 3111 | .hw.init = &(struct clk_init_data){ |
| 3112 | .name = "gcc_cpuss_gnoc_clk", |
| 3113 | .flags = CLK_IS_CRITICAL, |
| 3114 | .ops = &clk_branch2_ops, |
| 3115 | }, |
| 3116 | }, |
| 3117 | }; |
| 3118 | |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 3119 | static struct gdsc pcie_0_gdsc = { |
| 3120 | .gdscr = 0x6b004, |
| 3121 | .pd = { |
| 3122 | .name = "pcie_0_gdsc", |
| 3123 | }, |
| 3124 | .pwrsts = PWRSTS_OFF_ON, |
| 3125 | .flags = POLL_CFG_GDSCR, |
| 3126 | }; |
| 3127 | |
| 3128 | static struct gdsc pcie_1_gdsc = { |
| 3129 | .gdscr = 0x8d004, |
| 3130 | .pd = { |
| 3131 | .name = "pcie_1_gdsc", |
| 3132 | }, |
| 3133 | .pwrsts = PWRSTS_OFF_ON, |
| 3134 | .flags = POLL_CFG_GDSCR, |
| 3135 | }; |
| 3136 | |
| 3137 | static struct gdsc ufs_card_gdsc = { |
| 3138 | .gdscr = 0x75004, |
| 3139 | .pd = { |
| 3140 | .name = "ufs_card_gdsc", |
| 3141 | }, |
| 3142 | .pwrsts = PWRSTS_OFF_ON, |
| 3143 | .flags = POLL_CFG_GDSCR, |
| 3144 | }; |
| 3145 | |
| 3146 | static struct gdsc ufs_phy_gdsc = { |
| 3147 | .gdscr = 0x77004, |
| 3148 | .pd = { |
| 3149 | .name = "ufs_phy_gdsc", |
| 3150 | }, |
| 3151 | .pwrsts = PWRSTS_OFF_ON, |
| 3152 | .flags = POLL_CFG_GDSCR, |
| 3153 | }; |
| 3154 | |
| 3155 | static struct gdsc usb30_prim_gdsc = { |
| 3156 | .gdscr = 0xf004, |
| 3157 | .pd = { |
| 3158 | .name = "usb30_prim_gdsc", |
| 3159 | }, |
| 3160 | .pwrsts = PWRSTS_OFF_ON, |
| 3161 | .flags = POLL_CFG_GDSCR, |
| 3162 | }; |
| 3163 | |
| 3164 | static struct gdsc usb30_sec_gdsc = { |
| 3165 | .gdscr = 0x10004, |
| 3166 | .pd = { |
| 3167 | .name = "usb30_sec_gdsc", |
| 3168 | }, |
| 3169 | .pwrsts = PWRSTS_OFF_ON, |
| 3170 | .flags = POLL_CFG_GDSCR, |
| 3171 | }; |
| 3172 | |
| 3173 | static struct gdsc hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc = { |
| 3174 | .gdscr = 0x7d030, |
| 3175 | .pd = { |
| 3176 | .name = "hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc", |
| 3177 | }, |
| 3178 | .pwrsts = PWRSTS_OFF_ON, |
| 3179 | }; |
| 3180 | |
| 3181 | static struct gdsc hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc = { |
| 3182 | .gdscr = 0x7d03c, |
| 3183 | .pd = { |
| 3184 | .name = "hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc", |
| 3185 | }, |
| 3186 | .pwrsts = PWRSTS_OFF_ON, |
| 3187 | }; |
| 3188 | |
| 3189 | static struct gdsc hlos1_vote_aggre_noc_mmu_tbu1_gdsc = { |
| 3190 | .gdscr = 0x7d034, |
| 3191 | .pd = { |
| 3192 | .name = "hlos1_vote_aggre_noc_mmu_tbu1_gdsc", |
| 3193 | }, |
| 3194 | .pwrsts = PWRSTS_OFF_ON, |
| 3195 | }; |
| 3196 | |
| 3197 | static struct gdsc hlos1_vote_aggre_noc_mmu_tbu2_gdsc = { |
| 3198 | .gdscr = 0x7d038, |
| 3199 | .pd = { |
| 3200 | .name = "hlos1_vote_aggre_noc_mmu_tbu2_gdsc", |
| 3201 | }, |
| 3202 | .pwrsts = PWRSTS_OFF_ON, |
| 3203 | }; |
| 3204 | |
| 3205 | static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc = { |
| 3206 | .gdscr = 0x7d040, |
| 3207 | .pd = { |
| 3208 | .name = "hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc", |
| 3209 | }, |
| 3210 | .pwrsts = PWRSTS_OFF_ON, |
| 3211 | }; |
| 3212 | |
| 3213 | static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc = { |
| 3214 | .gdscr = 0x7d048, |
| 3215 | .pd = { |
| 3216 | .name = "hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc", |
| 3217 | }, |
| 3218 | .pwrsts = PWRSTS_OFF_ON, |
| 3219 | }; |
| 3220 | |
| 3221 | static struct gdsc hlos1_vote_mmnoc_mmu_tbu_sf_gdsc = { |
| 3222 | .gdscr = 0x7d044, |
| 3223 | .pd = { |
| 3224 | .name = "hlos1_vote_mmnoc_mmu_tbu_sf_gdsc", |
| 3225 | }, |
| 3226 | .pwrsts = PWRSTS_OFF_ON, |
| 3227 | }; |
| 3228 | |
| 3229 | static struct clk_regmap *gcc_sdm845_clocks[] = { |
| 3230 | [GCC_AGGRE_NOC_PCIE_TBU_CLK] = &gcc_aggre_noc_pcie_tbu_clk.clkr, |
| 3231 | [GCC_AGGRE_UFS_CARD_AXI_CLK] = &gcc_aggre_ufs_card_axi_clk.clkr, |
| 3232 | [GCC_AGGRE_UFS_PHY_AXI_CLK] = &gcc_aggre_ufs_phy_axi_clk.clkr, |
| 3233 | [GCC_AGGRE_USB3_PRIM_AXI_CLK] = &gcc_aggre_usb3_prim_axi_clk.clkr, |
| 3234 | [GCC_AGGRE_USB3_SEC_AXI_CLK] = &gcc_aggre_usb3_sec_axi_clk.clkr, |
| 3235 | [GCC_APC_VS_CLK] = &gcc_apc_vs_clk.clkr, |
| 3236 | [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr, |
| 3237 | [GCC_CAMERA_AHB_CLK] = &gcc_camera_ahb_clk.clkr, |
| 3238 | [GCC_CAMERA_AXI_CLK] = &gcc_camera_axi_clk.clkr, |
| 3239 | [GCC_CAMERA_XO_CLK] = &gcc_camera_xo_clk.clkr, |
| 3240 | [GCC_CE1_AHB_CLK] = &gcc_ce1_ahb_clk.clkr, |
| 3241 | [GCC_CE1_AXI_CLK] = &gcc_ce1_axi_clk.clkr, |
| 3242 | [GCC_CE1_CLK] = &gcc_ce1_clk.clkr, |
| 3243 | [GCC_CFG_NOC_USB3_PRIM_AXI_CLK] = &gcc_cfg_noc_usb3_prim_axi_clk.clkr, |
| 3244 | [GCC_CFG_NOC_USB3_SEC_AXI_CLK] = &gcc_cfg_noc_usb3_sec_axi_clk.clkr, |
| 3245 | [GCC_CPUSS_AHB_CLK] = &gcc_cpuss_ahb_clk.clkr, |
| 3246 | [GCC_CPUSS_AHB_CLK_SRC] = &gcc_cpuss_ahb_clk_src.clkr, |
| 3247 | [GCC_CPUSS_RBCPR_CLK] = &gcc_cpuss_rbcpr_clk.clkr, |
| 3248 | [GCC_CPUSS_RBCPR_CLK_SRC] = &gcc_cpuss_rbcpr_clk_src.clkr, |
| 3249 | [GCC_DDRSS_GPU_AXI_CLK] = &gcc_ddrss_gpu_axi_clk.clkr, |
| 3250 | [GCC_DISP_AHB_CLK] = &gcc_disp_ahb_clk.clkr, |
| 3251 | [GCC_DISP_AXI_CLK] = &gcc_disp_axi_clk.clkr, |
| 3252 | [GCC_DISP_GPLL0_CLK_SRC] = &gcc_disp_gpll0_clk_src.clkr, |
| 3253 | [GCC_DISP_GPLL0_DIV_CLK_SRC] = &gcc_disp_gpll0_div_clk_src.clkr, |
| 3254 | [GCC_DISP_XO_CLK] = &gcc_disp_xo_clk.clkr, |
| 3255 | [GCC_GP1_CLK] = &gcc_gp1_clk.clkr, |
| 3256 | [GCC_GP1_CLK_SRC] = &gcc_gp1_clk_src.clkr, |
| 3257 | [GCC_GP2_CLK] = &gcc_gp2_clk.clkr, |
| 3258 | [GCC_GP2_CLK_SRC] = &gcc_gp2_clk_src.clkr, |
| 3259 | [GCC_GP3_CLK] = &gcc_gp3_clk.clkr, |
| 3260 | [GCC_GP3_CLK_SRC] = &gcc_gp3_clk_src.clkr, |
| 3261 | [GCC_GPU_CFG_AHB_CLK] = &gcc_gpu_cfg_ahb_clk.clkr, |
| 3262 | [GCC_GPU_GPLL0_CLK_SRC] = &gcc_gpu_gpll0_clk_src.clkr, |
| 3263 | [GCC_GPU_GPLL0_DIV_CLK_SRC] = &gcc_gpu_gpll0_div_clk_src.clkr, |
| 3264 | [GCC_GPU_IREF_CLK] = &gcc_gpu_iref_clk.clkr, |
| 3265 | [GCC_GPU_MEMNOC_GFX_CLK] = &gcc_gpu_memnoc_gfx_clk.clkr, |
| 3266 | [GCC_GPU_SNOC_DVM_GFX_CLK] = &gcc_gpu_snoc_dvm_gfx_clk.clkr, |
| 3267 | [GCC_GPU_VS_CLK] = &gcc_gpu_vs_clk.clkr, |
| 3268 | [GCC_MSS_AXIS2_CLK] = &gcc_mss_axis2_clk.clkr, |
| 3269 | [GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr, |
| 3270 | [GCC_MSS_GPLL0_DIV_CLK_SRC] = &gcc_mss_gpll0_div_clk_src.clkr, |
| 3271 | [GCC_MSS_MFAB_AXIS_CLK] = &gcc_mss_mfab_axis_clk.clkr, |
| 3272 | [GCC_MSS_Q6_MEMNOC_AXI_CLK] = &gcc_mss_q6_memnoc_axi_clk.clkr, |
| 3273 | [GCC_MSS_SNOC_AXI_CLK] = &gcc_mss_snoc_axi_clk.clkr, |
| 3274 | [GCC_MSS_VS_CLK] = &gcc_mss_vs_clk.clkr, |
| 3275 | [GCC_PCIE_0_AUX_CLK] = &gcc_pcie_0_aux_clk.clkr, |
| 3276 | [GCC_PCIE_0_AUX_CLK_SRC] = &gcc_pcie_0_aux_clk_src.clkr, |
| 3277 | [GCC_PCIE_0_CFG_AHB_CLK] = &gcc_pcie_0_cfg_ahb_clk.clkr, |
| 3278 | [GCC_PCIE_0_CLKREF_CLK] = &gcc_pcie_0_clkref_clk.clkr, |
| 3279 | [GCC_PCIE_0_MSTR_AXI_CLK] = &gcc_pcie_0_mstr_axi_clk.clkr, |
| 3280 | [GCC_PCIE_0_PIPE_CLK] = &gcc_pcie_0_pipe_clk.clkr, |
| 3281 | [GCC_PCIE_0_SLV_AXI_CLK] = &gcc_pcie_0_slv_axi_clk.clkr, |
| 3282 | [GCC_PCIE_0_SLV_Q2A_AXI_CLK] = &gcc_pcie_0_slv_q2a_axi_clk.clkr, |
| 3283 | [GCC_PCIE_1_AUX_CLK] = &gcc_pcie_1_aux_clk.clkr, |
| 3284 | [GCC_PCIE_1_AUX_CLK_SRC] = &gcc_pcie_1_aux_clk_src.clkr, |
| 3285 | [GCC_PCIE_1_CFG_AHB_CLK] = &gcc_pcie_1_cfg_ahb_clk.clkr, |
| 3286 | [GCC_PCIE_1_CLKREF_CLK] = &gcc_pcie_1_clkref_clk.clkr, |
| 3287 | [GCC_PCIE_1_MSTR_AXI_CLK] = &gcc_pcie_1_mstr_axi_clk.clkr, |
| 3288 | [GCC_PCIE_1_PIPE_CLK] = &gcc_pcie_1_pipe_clk.clkr, |
| 3289 | [GCC_PCIE_1_SLV_AXI_CLK] = &gcc_pcie_1_slv_axi_clk.clkr, |
| 3290 | [GCC_PCIE_1_SLV_Q2A_AXI_CLK] = &gcc_pcie_1_slv_q2a_axi_clk.clkr, |
| 3291 | [GCC_PCIE_PHY_AUX_CLK] = &gcc_pcie_phy_aux_clk.clkr, |
| 3292 | [GCC_PCIE_PHY_REFGEN_CLK] = &gcc_pcie_phy_refgen_clk.clkr, |
| 3293 | [GCC_PCIE_PHY_REFGEN_CLK_SRC] = &gcc_pcie_phy_refgen_clk_src.clkr, |
| 3294 | [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr, |
| 3295 | [GCC_PDM2_CLK_SRC] = &gcc_pdm2_clk_src.clkr, |
| 3296 | [GCC_PDM_AHB_CLK] = &gcc_pdm_ahb_clk.clkr, |
| 3297 | [GCC_PDM_XO4_CLK] = &gcc_pdm_xo4_clk.clkr, |
| 3298 | [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr, |
| 3299 | [GCC_QMIP_CAMERA_AHB_CLK] = &gcc_qmip_camera_ahb_clk.clkr, |
| 3300 | [GCC_QMIP_DISP_AHB_CLK] = &gcc_qmip_disp_ahb_clk.clkr, |
| 3301 | [GCC_QMIP_VIDEO_AHB_CLK] = &gcc_qmip_video_ahb_clk.clkr, |
| 3302 | [GCC_QUPV3_WRAP0_S0_CLK] = &gcc_qupv3_wrap0_s0_clk.clkr, |
| 3303 | [GCC_QUPV3_WRAP0_S0_CLK_SRC] = &gcc_qupv3_wrap0_s0_clk_src.clkr, |
| 3304 | [GCC_QUPV3_WRAP0_S1_CLK] = &gcc_qupv3_wrap0_s1_clk.clkr, |
| 3305 | [GCC_QUPV3_WRAP0_S1_CLK_SRC] = &gcc_qupv3_wrap0_s1_clk_src.clkr, |
| 3306 | [GCC_QUPV3_WRAP0_S2_CLK] = &gcc_qupv3_wrap0_s2_clk.clkr, |
| 3307 | [GCC_QUPV3_WRAP0_S2_CLK_SRC] = &gcc_qupv3_wrap0_s2_clk_src.clkr, |
| 3308 | [GCC_QUPV3_WRAP0_S3_CLK] = &gcc_qupv3_wrap0_s3_clk.clkr, |
| 3309 | [GCC_QUPV3_WRAP0_S3_CLK_SRC] = &gcc_qupv3_wrap0_s3_clk_src.clkr, |
| 3310 | [GCC_QUPV3_WRAP0_S4_CLK] = &gcc_qupv3_wrap0_s4_clk.clkr, |
| 3311 | [GCC_QUPV3_WRAP0_S4_CLK_SRC] = &gcc_qupv3_wrap0_s4_clk_src.clkr, |
| 3312 | [GCC_QUPV3_WRAP0_S5_CLK] = &gcc_qupv3_wrap0_s5_clk.clkr, |
| 3313 | [GCC_QUPV3_WRAP0_S5_CLK_SRC] = &gcc_qupv3_wrap0_s5_clk_src.clkr, |
| 3314 | [GCC_QUPV3_WRAP0_S6_CLK] = &gcc_qupv3_wrap0_s6_clk.clkr, |
| 3315 | [GCC_QUPV3_WRAP0_S6_CLK_SRC] = &gcc_qupv3_wrap0_s6_clk_src.clkr, |
| 3316 | [GCC_QUPV3_WRAP0_S7_CLK] = &gcc_qupv3_wrap0_s7_clk.clkr, |
| 3317 | [GCC_QUPV3_WRAP0_S7_CLK_SRC] = &gcc_qupv3_wrap0_s7_clk_src.clkr, |
| 3318 | [GCC_QUPV3_WRAP1_S0_CLK] = &gcc_qupv3_wrap1_s0_clk.clkr, |
| 3319 | [GCC_QUPV3_WRAP1_S0_CLK_SRC] = &gcc_qupv3_wrap1_s0_clk_src.clkr, |
| 3320 | [GCC_QUPV3_WRAP1_S1_CLK] = &gcc_qupv3_wrap1_s1_clk.clkr, |
| 3321 | [GCC_QUPV3_WRAP1_S1_CLK_SRC] = &gcc_qupv3_wrap1_s1_clk_src.clkr, |
| 3322 | [GCC_QUPV3_WRAP1_S2_CLK] = &gcc_qupv3_wrap1_s2_clk.clkr, |
| 3323 | [GCC_QUPV3_WRAP1_S2_CLK_SRC] = &gcc_qupv3_wrap1_s2_clk_src.clkr, |
| 3324 | [GCC_QUPV3_WRAP1_S3_CLK] = &gcc_qupv3_wrap1_s3_clk.clkr, |
| 3325 | [GCC_QUPV3_WRAP1_S3_CLK_SRC] = &gcc_qupv3_wrap1_s3_clk_src.clkr, |
| 3326 | [GCC_QUPV3_WRAP1_S4_CLK] = &gcc_qupv3_wrap1_s4_clk.clkr, |
| 3327 | [GCC_QUPV3_WRAP1_S4_CLK_SRC] = &gcc_qupv3_wrap1_s4_clk_src.clkr, |
| 3328 | [GCC_QUPV3_WRAP1_S5_CLK] = &gcc_qupv3_wrap1_s5_clk.clkr, |
| 3329 | [GCC_QUPV3_WRAP1_S5_CLK_SRC] = &gcc_qupv3_wrap1_s5_clk_src.clkr, |
| 3330 | [GCC_QUPV3_WRAP1_S6_CLK] = &gcc_qupv3_wrap1_s6_clk.clkr, |
| 3331 | [GCC_QUPV3_WRAP1_S6_CLK_SRC] = &gcc_qupv3_wrap1_s6_clk_src.clkr, |
| 3332 | [GCC_QUPV3_WRAP1_S7_CLK] = &gcc_qupv3_wrap1_s7_clk.clkr, |
| 3333 | [GCC_QUPV3_WRAP1_S7_CLK_SRC] = &gcc_qupv3_wrap1_s7_clk_src.clkr, |
| 3334 | [GCC_QUPV3_WRAP_0_M_AHB_CLK] = &gcc_qupv3_wrap_0_m_ahb_clk.clkr, |
| 3335 | [GCC_QUPV3_WRAP_0_S_AHB_CLK] = &gcc_qupv3_wrap_0_s_ahb_clk.clkr, |
| 3336 | [GCC_QUPV3_WRAP_1_M_AHB_CLK] = &gcc_qupv3_wrap_1_m_ahb_clk.clkr, |
| 3337 | [GCC_QUPV3_WRAP_1_S_AHB_CLK] = &gcc_qupv3_wrap_1_s_ahb_clk.clkr, |
| 3338 | [GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr, |
| 3339 | [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr, |
| 3340 | [GCC_SDCC2_APPS_CLK_SRC] = &gcc_sdcc2_apps_clk_src.clkr, |
| 3341 | [GCC_SDCC4_AHB_CLK] = &gcc_sdcc4_ahb_clk.clkr, |
| 3342 | [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr, |
| 3343 | [GCC_SDCC4_APPS_CLK_SRC] = &gcc_sdcc4_apps_clk_src.clkr, |
| 3344 | [GCC_SYS_NOC_CPUSS_AHB_CLK] = &gcc_sys_noc_cpuss_ahb_clk.clkr, |
| 3345 | [GCC_TSIF_AHB_CLK] = &gcc_tsif_ahb_clk.clkr, |
| 3346 | [GCC_TSIF_INACTIVITY_TIMERS_CLK] = |
| 3347 | &gcc_tsif_inactivity_timers_clk.clkr, |
| 3348 | [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr, |
| 3349 | [GCC_TSIF_REF_CLK_SRC] = &gcc_tsif_ref_clk_src.clkr, |
| 3350 | [GCC_UFS_CARD_AHB_CLK] = &gcc_ufs_card_ahb_clk.clkr, |
| 3351 | [GCC_UFS_CARD_AXI_CLK] = &gcc_ufs_card_axi_clk.clkr, |
| 3352 | [GCC_UFS_CARD_AXI_CLK_SRC] = &gcc_ufs_card_axi_clk_src.clkr, |
| 3353 | [GCC_UFS_CARD_CLKREF_CLK] = &gcc_ufs_card_clkref_clk.clkr, |
| 3354 | [GCC_UFS_CARD_ICE_CORE_CLK] = &gcc_ufs_card_ice_core_clk.clkr, |
| 3355 | [GCC_UFS_CARD_ICE_CORE_CLK_SRC] = &gcc_ufs_card_ice_core_clk_src.clkr, |
| 3356 | [GCC_UFS_CARD_PHY_AUX_CLK] = &gcc_ufs_card_phy_aux_clk.clkr, |
| 3357 | [GCC_UFS_CARD_PHY_AUX_CLK_SRC] = &gcc_ufs_card_phy_aux_clk_src.clkr, |
| 3358 | [GCC_UFS_CARD_RX_SYMBOL_0_CLK] = &gcc_ufs_card_rx_symbol_0_clk.clkr, |
| 3359 | [GCC_UFS_CARD_RX_SYMBOL_1_CLK] = &gcc_ufs_card_rx_symbol_1_clk.clkr, |
| 3360 | [GCC_UFS_CARD_TX_SYMBOL_0_CLK] = &gcc_ufs_card_tx_symbol_0_clk.clkr, |
| 3361 | [GCC_UFS_CARD_UNIPRO_CORE_CLK] = &gcc_ufs_card_unipro_core_clk.clkr, |
| 3362 | [GCC_UFS_CARD_UNIPRO_CORE_CLK_SRC] = |
| 3363 | &gcc_ufs_card_unipro_core_clk_src.clkr, |
| 3364 | [GCC_UFS_MEM_CLKREF_CLK] = &gcc_ufs_mem_clkref_clk.clkr, |
| 3365 | [GCC_UFS_PHY_AHB_CLK] = &gcc_ufs_phy_ahb_clk.clkr, |
| 3366 | [GCC_UFS_PHY_AXI_CLK] = &gcc_ufs_phy_axi_clk.clkr, |
| 3367 | [GCC_UFS_PHY_AXI_CLK_SRC] = &gcc_ufs_phy_axi_clk_src.clkr, |
| 3368 | [GCC_UFS_PHY_ICE_CORE_CLK] = &gcc_ufs_phy_ice_core_clk.clkr, |
| 3369 | [GCC_UFS_PHY_ICE_CORE_CLK_SRC] = &gcc_ufs_phy_ice_core_clk_src.clkr, |
| 3370 | [GCC_UFS_PHY_PHY_AUX_CLK] = &gcc_ufs_phy_phy_aux_clk.clkr, |
| 3371 | [GCC_UFS_PHY_PHY_AUX_CLK_SRC] = &gcc_ufs_phy_phy_aux_clk_src.clkr, |
| 3372 | [GCC_UFS_PHY_RX_SYMBOL_0_CLK] = &gcc_ufs_phy_rx_symbol_0_clk.clkr, |
| 3373 | [GCC_UFS_PHY_RX_SYMBOL_1_CLK] = &gcc_ufs_phy_rx_symbol_1_clk.clkr, |
| 3374 | [GCC_UFS_PHY_TX_SYMBOL_0_CLK] = &gcc_ufs_phy_tx_symbol_0_clk.clkr, |
| 3375 | [GCC_UFS_PHY_UNIPRO_CORE_CLK] = &gcc_ufs_phy_unipro_core_clk.clkr, |
| 3376 | [GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC] = |
| 3377 | &gcc_ufs_phy_unipro_core_clk_src.clkr, |
| 3378 | [GCC_USB30_PRIM_MASTER_CLK] = &gcc_usb30_prim_master_clk.clkr, |
| 3379 | [GCC_USB30_PRIM_MASTER_CLK_SRC] = &gcc_usb30_prim_master_clk_src.clkr, |
| 3380 | [GCC_USB30_PRIM_MOCK_UTMI_CLK] = &gcc_usb30_prim_mock_utmi_clk.clkr, |
| 3381 | [GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC] = |
| 3382 | &gcc_usb30_prim_mock_utmi_clk_src.clkr, |
| 3383 | [GCC_USB30_PRIM_SLEEP_CLK] = &gcc_usb30_prim_sleep_clk.clkr, |
| 3384 | [GCC_USB30_SEC_MASTER_CLK] = &gcc_usb30_sec_master_clk.clkr, |
| 3385 | [GCC_USB30_SEC_MASTER_CLK_SRC] = &gcc_usb30_sec_master_clk_src.clkr, |
| 3386 | [GCC_USB30_SEC_MOCK_UTMI_CLK] = &gcc_usb30_sec_mock_utmi_clk.clkr, |
| 3387 | [GCC_USB30_SEC_MOCK_UTMI_CLK_SRC] = |
| 3388 | &gcc_usb30_sec_mock_utmi_clk_src.clkr, |
| 3389 | [GCC_USB30_SEC_SLEEP_CLK] = &gcc_usb30_sec_sleep_clk.clkr, |
| 3390 | [GCC_USB3_PRIM_CLKREF_CLK] = &gcc_usb3_prim_clkref_clk.clkr, |
| 3391 | [GCC_USB3_PRIM_PHY_AUX_CLK] = &gcc_usb3_prim_phy_aux_clk.clkr, |
| 3392 | [GCC_USB3_PRIM_PHY_AUX_CLK_SRC] = &gcc_usb3_prim_phy_aux_clk_src.clkr, |
| 3393 | [GCC_USB3_PRIM_PHY_COM_AUX_CLK] = &gcc_usb3_prim_phy_com_aux_clk.clkr, |
| 3394 | [GCC_USB3_PRIM_PHY_PIPE_CLK] = &gcc_usb3_prim_phy_pipe_clk.clkr, |
| 3395 | [GCC_USB3_SEC_CLKREF_CLK] = &gcc_usb3_sec_clkref_clk.clkr, |
| 3396 | [GCC_USB3_SEC_PHY_AUX_CLK] = &gcc_usb3_sec_phy_aux_clk.clkr, |
| 3397 | [GCC_USB3_SEC_PHY_AUX_CLK_SRC] = &gcc_usb3_sec_phy_aux_clk_src.clkr, |
| 3398 | [GCC_USB3_SEC_PHY_COM_AUX_CLK] = &gcc_usb3_sec_phy_com_aux_clk.clkr, |
| 3399 | [GCC_USB3_SEC_PHY_PIPE_CLK] = &gcc_usb3_sec_phy_pipe_clk.clkr, |
| 3400 | [GCC_USB_PHY_CFG_AHB2PHY_CLK] = &gcc_usb_phy_cfg_ahb2phy_clk.clkr, |
| 3401 | [GCC_VDDA_VS_CLK] = &gcc_vdda_vs_clk.clkr, |
| 3402 | [GCC_VDDCX_VS_CLK] = &gcc_vddcx_vs_clk.clkr, |
| 3403 | [GCC_VDDMX_VS_CLK] = &gcc_vddmx_vs_clk.clkr, |
| 3404 | [GCC_VIDEO_AHB_CLK] = &gcc_video_ahb_clk.clkr, |
| 3405 | [GCC_VIDEO_AXI_CLK] = &gcc_video_axi_clk.clkr, |
| 3406 | [GCC_VIDEO_XO_CLK] = &gcc_video_xo_clk.clkr, |
| 3407 | [GCC_VS_CTRL_AHB_CLK] = &gcc_vs_ctrl_ahb_clk.clkr, |
| 3408 | [GCC_VS_CTRL_CLK] = &gcc_vs_ctrl_clk.clkr, |
| 3409 | [GCC_VS_CTRL_CLK_SRC] = &gcc_vs_ctrl_clk_src.clkr, |
| 3410 | [GCC_VSENSOR_CLK_SRC] = &gcc_vsensor_clk_src.clkr, |
| 3411 | [GPLL0] = &gpll0.clkr, |
| 3412 | [GPLL0_OUT_EVEN] = &gpll0_out_even.clkr, |
| 3413 | [GPLL4] = &gpll4.clkr, |
Amit Nischal | cfb8282 | 2018-06-11 12:08:15 +0530 | [diff] [blame] | 3414 | [GCC_CPUSS_DVM_BUS_CLK] = &gcc_cpuss_dvm_bus_clk.clkr, |
| 3415 | [GCC_CPUSS_GNOC_CLK] = &gcc_cpuss_gnoc_clk.clkr, |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 3416 | }; |
| 3417 | |
| 3418 | static const struct qcom_reset_map gcc_sdm845_resets[] = { |
| 3419 | [GCC_MMSS_BCR] = { 0xb000 }, |
| 3420 | [GCC_PCIE_0_BCR] = { 0x6b000 }, |
| 3421 | [GCC_PCIE_1_BCR] = { 0x8d000 }, |
| 3422 | [GCC_PCIE_PHY_BCR] = { 0x6f000 }, |
| 3423 | [GCC_PDM_BCR] = { 0x33000 }, |
| 3424 | [GCC_PRNG_BCR] = { 0x34000 }, |
| 3425 | [GCC_QUPV3_WRAPPER_0_BCR] = { 0x17000 }, |
| 3426 | [GCC_QUPV3_WRAPPER_1_BCR] = { 0x18000 }, |
| 3427 | [GCC_QUSB2PHY_PRIM_BCR] = { 0x12000 }, |
| 3428 | [GCC_QUSB2PHY_SEC_BCR] = { 0x12004 }, |
| 3429 | [GCC_SDCC2_BCR] = { 0x14000 }, |
| 3430 | [GCC_SDCC4_BCR] = { 0x16000 }, |
| 3431 | [GCC_TSIF_BCR] = { 0x36000 }, |
| 3432 | [GCC_UFS_CARD_BCR] = { 0x75000 }, |
| 3433 | [GCC_UFS_PHY_BCR] = { 0x77000 }, |
| 3434 | [GCC_USB30_PRIM_BCR] = { 0xf000 }, |
| 3435 | [GCC_USB30_SEC_BCR] = { 0x10000 }, |
| 3436 | [GCC_USB3_PHY_PRIM_BCR] = { 0x50000 }, |
| 3437 | [GCC_USB3PHY_PHY_PRIM_BCR] = { 0x50004 }, |
| 3438 | [GCC_USB3_DP_PHY_PRIM_BCR] = { 0x50008 }, |
| 3439 | [GCC_USB3_PHY_SEC_BCR] = { 0x5000c }, |
| 3440 | [GCC_USB3PHY_PHY_SEC_BCR] = { 0x50010 }, |
| 3441 | [GCC_USB3_DP_PHY_SEC_BCR] = { 0x50014 }, |
| 3442 | [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 }, |
| 3443 | [GCC_PCIE_0_PHY_BCR] = { 0x6c01c }, |
| 3444 | [GCC_PCIE_1_PHY_BCR] = { 0x8e01c }, |
| 3445 | }; |
| 3446 | |
| 3447 | static struct gdsc *gcc_sdm845_gdscs[] = { |
| 3448 | [PCIE_0_GDSC] = &pcie_0_gdsc, |
| 3449 | [PCIE_1_GDSC] = &pcie_1_gdsc, |
| 3450 | [UFS_CARD_GDSC] = &ufs_card_gdsc, |
| 3451 | [UFS_PHY_GDSC] = &ufs_phy_gdsc, |
| 3452 | [USB30_PRIM_GDSC] = &usb30_prim_gdsc, |
| 3453 | [USB30_SEC_GDSC] = &usb30_sec_gdsc, |
| 3454 | [HLOS1_VOTE_AGGRE_NOC_MMU_AUDIO_TBU_GDSC] = |
| 3455 | &hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc, |
| 3456 | [HLOS1_VOTE_AGGRE_NOC_MMU_PCIE_TBU_GDSC] = |
| 3457 | &hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc, |
| 3458 | [HLOS1_VOTE_AGGRE_NOC_MMU_TBU1_GDSC] = |
| 3459 | &hlos1_vote_aggre_noc_mmu_tbu1_gdsc, |
| 3460 | [HLOS1_VOTE_AGGRE_NOC_MMU_TBU2_GDSC] = |
| 3461 | &hlos1_vote_aggre_noc_mmu_tbu2_gdsc, |
| 3462 | [HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC] = |
| 3463 | &hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc, |
| 3464 | [HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC] = |
| 3465 | &hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc, |
| 3466 | [HLOS1_VOTE_MMNOC_MMU_TBU_SF_GDSC] = &hlos1_vote_mmnoc_mmu_tbu_sf_gdsc, |
| 3467 | }; |
| 3468 | |
| 3469 | static const struct regmap_config gcc_sdm845_regmap_config = { |
| 3470 | .reg_bits = 32, |
| 3471 | .reg_stride = 4, |
| 3472 | .val_bits = 32, |
| 3473 | .max_register = 0x182090, |
| 3474 | .fast_io = true, |
| 3475 | }; |
| 3476 | |
| 3477 | static const struct qcom_cc_desc gcc_sdm845_desc = { |
| 3478 | .config = &gcc_sdm845_regmap_config, |
| 3479 | .clks = gcc_sdm845_clocks, |
| 3480 | .num_clks = ARRAY_SIZE(gcc_sdm845_clocks), |
| 3481 | .resets = gcc_sdm845_resets, |
| 3482 | .num_resets = ARRAY_SIZE(gcc_sdm845_resets), |
| 3483 | .gdscs = gcc_sdm845_gdscs, |
| 3484 | .num_gdscs = ARRAY_SIZE(gcc_sdm845_gdscs), |
| 3485 | }; |
| 3486 | |
| 3487 | static const struct of_device_id gcc_sdm845_match_table[] = { |
| 3488 | { .compatible = "qcom,gcc-sdm845" }, |
| 3489 | { } |
| 3490 | }; |
| 3491 | MODULE_DEVICE_TABLE(of, gcc_sdm845_match_table); |
| 3492 | |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 3493 | static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { |
| 3494 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s0_clk), |
| 3495 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s1_clk), |
| 3496 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s2_clk), |
| 3497 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s3_clk), |
| 3498 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s4_clk), |
| 3499 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s5_clk), |
| 3500 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s6_clk), |
| 3501 | DEFINE_RCG_DFS(gcc_qupv3_wrap0_s7_clk), |
| 3502 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s0_clk), |
| 3503 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s1_clk), |
| 3504 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s2_clk), |
| 3505 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s3_clk), |
| 3506 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s4_clk), |
| 3507 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s5_clk), |
| 3508 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s6_clk), |
| 3509 | DEFINE_RCG_DFS(gcc_qupv3_wrap1_s7_clk), |
| 3510 | }; |
| 3511 | |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 3512 | static int gcc_sdm845_probe(struct platform_device *pdev) |
| 3513 | { |
| 3514 | struct regmap *regmap; |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 3515 | int ret; |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 3516 | |
| 3517 | regmap = qcom_cc_map(pdev, &gcc_sdm845_desc); |
| 3518 | if (IS_ERR(regmap)) |
| 3519 | return PTR_ERR(regmap); |
| 3520 | |
| 3521 | /* Disable the GPLL0 active input to MMSS and GPU via MISC registers */ |
| 3522 | regmap_update_bits(regmap, 0x09ffc, 0x3, 0x3); |
| 3523 | regmap_update_bits(regmap, 0x71028, 0x3, 0x3); |
| 3524 | |
Taniya Das | 8b69c6d | 2018-08-11 07:23:56 +0530 | [diff] [blame^] | 3525 | ret = qcom_cc_register_rcg_dfs(regmap, gcc_dfs_clocks, |
| 3526 | ARRAY_SIZE(gcc_dfs_clocks)); |
| 3527 | if (ret) |
| 3528 | return ret; |
| 3529 | |
Taniya Das | 06391ed | 2018-05-07 16:20:20 +0530 | [diff] [blame] | 3530 | return qcom_cc_really_probe(pdev, &gcc_sdm845_desc, regmap); |
| 3531 | } |
| 3532 | |
| 3533 | static struct platform_driver gcc_sdm845_driver = { |
| 3534 | .probe = gcc_sdm845_probe, |
| 3535 | .driver = { |
| 3536 | .name = "gcc-sdm845", |
| 3537 | .of_match_table = gcc_sdm845_match_table, |
| 3538 | }, |
| 3539 | }; |
| 3540 | |
| 3541 | static int __init gcc_sdm845_init(void) |
| 3542 | { |
| 3543 | return platform_driver_register(&gcc_sdm845_driver); |
| 3544 | } |
| 3545 | subsys_initcall(gcc_sdm845_init); |
| 3546 | |
| 3547 | static void __exit gcc_sdm845_exit(void) |
| 3548 | { |
| 3549 | platform_driver_unregister(&gcc_sdm845_driver); |
| 3550 | } |
| 3551 | module_exit(gcc_sdm845_exit); |
| 3552 | |
| 3553 | MODULE_DESCRIPTION("QTI GCC SDM845 Driver"); |
| 3554 | MODULE_LICENSE("GPL v2"); |
| 3555 | MODULE_ALIAS("platform:gcc-sdm845"); |