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