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