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