1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 * Copyright (c) 2015, The Linux Foundation. All rights reserved. 4 */ 5 6 #include <linux/kernel.h> 7 #include <linux/bitops.h> 8 #include <linux/err.h> 9 #include <linux/platform_device.h> 10 #include <linux/module.h> 11 #include <linux/of.h> 12 #include <linux/clk-provider.h> 13 #include <linux/regmap.h> 14 #include <linux/reset-controller.h> 15 16 #include <dt-bindings/clock/qcom,gcc-msm8996.h> 17 18 #include "common.h" 19 #include "clk-regmap.h" 20 #include "clk-alpha-pll.h" 21 #include "clk-rcg.h" 22 #include "clk-branch.h" 23 #include "reset.h" 24 #include "gdsc.h" 25 26 enum { 27 P_XO, 28 P_GPLL0, 29 P_GPLL0_EARLY_DIV, 30 P_SLEEP_CLK, 31 P_GPLL4, 32 P_AUD_REF_CLK, 33 }; 34 35 static struct clk_fixed_factor xo = { 36 .mult = 1, 37 .div = 1, 38 .hw.init = &(struct clk_init_data){ 39 .name = "xo", 40 .parent_data = &(const struct clk_parent_data){ 41 .fw_name = "cxo", .name = "xo_board", 42 }, 43 .num_parents = 1, 44 .ops = &clk_fixed_factor_ops, 45 }, 46 }; 47 48 static struct clk_alpha_pll gpll0_early = { 49 .offset = 0x00000, 50 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], 51 .clkr = { 52 .enable_reg = 0x52000, 53 .enable_mask = BIT(0), 54 .hw.init = &(struct clk_init_data){ 55 .name = "gpll0_early", 56 .parent_data = &(const struct clk_parent_data){ 57 .fw_name = "cxo", .name = "xo_board", 58 }, 59 .num_parents = 1, 60 .ops = &clk_alpha_pll_ops, 61 }, 62 }, 63 }; 64 65 static struct clk_fixed_factor gpll0_early_div = { 66 .mult = 1, 67 .div = 2, 68 .hw.init = &(struct clk_init_data){ 69 .name = "gpll0_early_div", 70 .parent_hws = (const struct clk_hw*[]){ 71 &gpll0_early.clkr.hw, 72 }, 73 .num_parents = 1, 74 .ops = &clk_fixed_factor_ops, 75 }, 76 }; 77 78 static struct clk_alpha_pll_postdiv gpll0 = { 79 .offset = 0x00000, 80 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], 81 .clkr.hw.init = &(struct clk_init_data){ 82 .name = "gpll0", 83 .parent_hws = (const struct clk_hw*[]){ 84 &gpll0_early.clkr.hw, 85 }, 86 .num_parents = 1, 87 .ops = &clk_alpha_pll_postdiv_ops, 88 }, 89 }; 90 91 static struct clk_branch gcc_mmss_gpll0_div_clk = { 92 .halt_check = BRANCH_HALT_DELAY, 93 .clkr = { 94 .enable_reg = 0x5200c, 95 .enable_mask = BIT(0), 96 .hw.init = &(struct clk_init_data){ 97 .name = "gcc_mmss_gpll0_div_clk", 98 .parent_hws = (const struct clk_hw*[]){ 99 &gpll0.clkr.hw, 100 }, 101 .num_parents = 1, 102 .flags = CLK_SET_RATE_PARENT, 103 .ops = &clk_branch2_ops, 104 }, 105 }, 106 }; 107 108 static struct clk_branch gcc_mss_gpll0_div_clk = { 109 .halt_check = BRANCH_HALT_DELAY, 110 .clkr = { 111 .enable_reg = 0x5200c, 112 .enable_mask = BIT(2), 113 .hw.init = &(struct clk_init_data){ 114 .name = "gcc_mss_gpll0_div_clk", 115 .parent_hws = (const struct clk_hw*[]){ 116 &gpll0.clkr.hw, 117 }, 118 .num_parents = 1, 119 .flags = CLK_SET_RATE_PARENT, 120 .ops = &clk_branch2_ops 121 }, 122 }, 123 }; 124 125 static struct clk_alpha_pll gpll4_early = { 126 .offset = 0x77000, 127 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], 128 .clkr = { 129 .enable_reg = 0x52000, 130 .enable_mask = BIT(4), 131 .hw.init = &(struct clk_init_data){ 132 .name = "gpll4_early", 133 .parent_data = &(const struct clk_parent_data){ 134 .fw_name = "cxo", .name = "xo_board", 135 }, 136 .num_parents = 1, 137 .ops = &clk_alpha_pll_ops, 138 }, 139 }, 140 }; 141 142 static struct clk_alpha_pll_postdiv gpll4 = { 143 .offset = 0x77000, 144 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], 145 .clkr.hw.init = &(struct clk_init_data){ 146 .name = "gpll4", 147 .parent_hws = (const struct clk_hw*[]){ 148 &gpll4_early.clkr.hw, 149 }, 150 .num_parents = 1, 151 .ops = &clk_alpha_pll_postdiv_ops, 152 }, 153 }; 154 155 static const struct parent_map gcc_sleep_clk_map[] = { 156 { P_SLEEP_CLK, 5 } 157 }; 158 159 static const struct clk_parent_data gcc_sleep_clk[] = { 160 { .fw_name = "sleep_clk", .name = "sleep_clk" } 161 }; 162 163 static const struct parent_map gcc_xo_gpll0_map[] = { 164 { P_XO, 0 }, 165 { P_GPLL0, 1 } 166 }; 167 168 static const struct clk_parent_data gcc_xo_gpll0[] = { 169 { .fw_name = "cxo", .name = "xo_board" }, 170 { .hw = &gpll0.clkr.hw } 171 }; 172 173 static const struct parent_map gcc_xo_sleep_clk_map[] = { 174 { P_XO, 0 }, 175 { P_SLEEP_CLK, 5 } 176 }; 177 178 static const struct clk_parent_data gcc_xo_sleep_clk[] = { 179 { .fw_name = "cxo", .name = "xo_board" }, 180 { .fw_name = "sleep_clk", .name = "sleep_clk" } 181 }; 182 183 static const struct parent_map gcc_xo_gpll0_gpll0_early_div_map[] = { 184 { P_XO, 0 }, 185 { P_GPLL0, 1 }, 186 { P_GPLL0_EARLY_DIV, 6 } 187 }; 188 189 static const struct clk_parent_data gcc_xo_gpll0_gpll0_early_div[] = { 190 { .fw_name = "cxo", .name = "xo_board" }, 191 { .hw = &gpll0.clkr.hw }, 192 { .hw = &gpll0_early_div.hw } 193 }; 194 195 static const struct parent_map gcc_xo_gpll0_gpll4_map[] = { 196 { P_XO, 0 }, 197 { P_GPLL0, 1 }, 198 { P_GPLL4, 5 } 199 }; 200 201 static const struct clk_parent_data gcc_xo_gpll0_gpll4[] = { 202 { .fw_name = "cxo", .name = "xo_board" }, 203 { .hw = &gpll0.clkr.hw }, 204 { .hw = &gpll4.clkr.hw } 205 }; 206 207 static const struct parent_map gcc_xo_gpll0_aud_ref_clk_map[] = { 208 { P_XO, 0 }, 209 { P_GPLL0, 1 }, 210 { P_AUD_REF_CLK, 2 } 211 }; 212 213 static const struct clk_parent_data gcc_xo_gpll0_aud_ref_clk[] = { 214 { .fw_name = "cxo", .name = "xo_board" }, 215 { .hw = &gpll0.clkr.hw }, 216 { .fw_name = "aud_ref_clk", .name = "aud_ref_clk" } 217 }; 218 219 static const struct parent_map gcc_xo_gpll0_sleep_clk_gpll0_early_div_map[] = { 220 { P_XO, 0 }, 221 { P_GPLL0, 1 }, 222 { P_SLEEP_CLK, 5 }, 223 { P_GPLL0_EARLY_DIV, 6 } 224 }; 225 226 static const struct clk_parent_data gcc_xo_gpll0_sleep_clk_gpll0_early_div[] = { 227 { .fw_name = "cxo", .name = "xo_board" }, 228 { .hw = &gpll0.clkr.hw }, 229 { .fw_name = "sleep_clk", .name = "sleep_clk" }, 230 { .hw = &gpll0_early_div.hw } 231 }; 232 233 static const struct parent_map gcc_xo_gpll0_gpll4_gpll0_early_div_map[] = { 234 { P_XO, 0 }, 235 { P_GPLL0, 1 }, 236 { P_GPLL4, 5 }, 237 { P_GPLL0_EARLY_DIV, 6 } 238 }; 239 240 static const struct clk_parent_data gcc_xo_gpll0_gpll4_gpll0_early_div[] = { 241 { .fw_name = "cxo", .name = "xo_board" }, 242 { .hw = &gpll0.clkr.hw }, 243 { .hw = &gpll4.clkr.hw }, 244 { .hw = &gpll0_early_div.hw } 245 }; 246 247 static const struct freq_tbl ftbl_system_noc_clk_src[] = { 248 F(19200000, P_XO, 1, 0, 0), 249 F(50000000, P_GPLL0_EARLY_DIV, 6, 0, 0), 250 F(100000000, P_GPLL0, 6, 0, 0), 251 F(150000000, P_GPLL0, 4, 0, 0), 252 F(200000000, P_GPLL0, 3, 0, 0), 253 F(240000000, P_GPLL0, 2.5, 0, 0), 254 { } 255 }; 256 257 static struct clk_rcg2 system_noc_clk_src = { 258 .cmd_rcgr = 0x0401c, 259 .hid_width = 5, 260 .parent_map = gcc_xo_gpll0_gpll0_early_div_map, 261 .freq_tbl = ftbl_system_noc_clk_src, 262 .clkr.hw.init = &(struct clk_init_data){ 263 .name = "system_noc_clk_src", 264 .parent_data = gcc_xo_gpll0_gpll0_early_div, 265 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_early_div), 266 .ops = &clk_rcg2_ops, 267 }, 268 }; 269 270 static const struct freq_tbl ftbl_config_noc_clk_src[] = { 271 F(19200000, P_XO, 1, 0, 0), 272 F(37500000, P_GPLL0, 16, 0, 0), 273 F(75000000, P_GPLL0, 8, 0, 0), 274 { } 275 }; 276 277 static struct clk_rcg2 config_noc_clk_src = { 278 .cmd_rcgr = 0x0500c, 279 .hid_width = 5, 280 .parent_map = gcc_xo_gpll0_map, 281 .freq_tbl = ftbl_config_noc_clk_src, 282 .clkr.hw.init = &(struct clk_init_data){ 283 .name = "config_noc_clk_src", 284 .parent_data = gcc_xo_gpll0, 285 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 286 .ops = &clk_rcg2_ops, 287 }, 288 }; 289 290 static const struct freq_tbl ftbl_periph_noc_clk_src[] = { 291 F(19200000, P_XO, 1, 0, 0), 292 F(37500000, P_GPLL0, 16, 0, 0), 293 F(50000000, P_GPLL0, 12, 0, 0), 294 F(75000000, P_GPLL0, 8, 0, 0), 295 F(100000000, P_GPLL0, 6, 0, 0), 296 { } 297 }; 298 299 static struct clk_rcg2 periph_noc_clk_src = { 300 .cmd_rcgr = 0x06014, 301 .hid_width = 5, 302 .parent_map = gcc_xo_gpll0_map, 303 .freq_tbl = ftbl_periph_noc_clk_src, 304 .clkr.hw.init = &(struct clk_init_data){ 305 .name = "periph_noc_clk_src", 306 .parent_data = gcc_xo_gpll0, 307 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 308 .ops = &clk_rcg2_ops, 309 }, 310 }; 311 312 static const struct freq_tbl ftbl_usb30_master_clk_src[] = { 313 F(19200000, P_XO, 1, 0, 0), 314 F(120000000, P_GPLL0, 5, 0, 0), 315 F(150000000, P_GPLL0, 4, 0, 0), 316 { } 317 }; 318 319 static struct clk_rcg2 usb30_master_clk_src = { 320 .cmd_rcgr = 0x0f014, 321 .mnd_width = 8, 322 .hid_width = 5, 323 .parent_map = gcc_xo_gpll0_gpll0_early_div_map, 324 .freq_tbl = ftbl_usb30_master_clk_src, 325 .clkr.hw.init = &(struct clk_init_data){ 326 .name = "usb30_master_clk_src", 327 .parent_data = gcc_xo_gpll0_gpll0_early_div, 328 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_early_div), 329 .ops = &clk_rcg2_ops, 330 }, 331 }; 332 333 static const struct freq_tbl ftbl_usb30_mock_utmi_clk_src[] = { 334 F(19200000, P_XO, 1, 0, 0), 335 { } 336 }; 337 338 static struct clk_rcg2 usb30_mock_utmi_clk_src = { 339 .cmd_rcgr = 0x0f028, 340 .hid_width = 5, 341 .parent_map = gcc_xo_gpll0_gpll0_early_div_map, 342 .freq_tbl = ftbl_usb30_mock_utmi_clk_src, 343 .clkr.hw.init = &(struct clk_init_data){ 344 .name = "usb30_mock_utmi_clk_src", 345 .parent_data = gcc_xo_gpll0_gpll0_early_div, 346 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_early_div), 347 .ops = &clk_rcg2_ops, 348 }, 349 }; 350 351 static const struct freq_tbl ftbl_usb3_phy_aux_clk_src[] = { 352 F(1200000, P_XO, 16, 0, 0), 353 { } 354 }; 355 356 static struct clk_rcg2 usb3_phy_aux_clk_src = { 357 .cmd_rcgr = 0x5000c, 358 .hid_width = 5, 359 .parent_map = gcc_xo_sleep_clk_map, 360 .freq_tbl = ftbl_usb3_phy_aux_clk_src, 361 .clkr.hw.init = &(struct clk_init_data){ 362 .name = "usb3_phy_aux_clk_src", 363 .parent_data = gcc_xo_sleep_clk, 364 .num_parents = ARRAY_SIZE(gcc_xo_sleep_clk), 365 .ops = &clk_rcg2_ops, 366 }, 367 }; 368 369 static const struct freq_tbl ftbl_usb20_master_clk_src[] = { 370 F(120000000, P_GPLL0, 5, 0, 0), 371 { } 372 }; 373 374 static struct clk_rcg2 usb20_master_clk_src = { 375 .cmd_rcgr = 0x12010, 376 .mnd_width = 8, 377 .hid_width = 5, 378 .parent_map = gcc_xo_gpll0_gpll0_early_div_map, 379 .freq_tbl = ftbl_usb20_master_clk_src, 380 .clkr.hw.init = &(struct clk_init_data){ 381 .name = "usb20_master_clk_src", 382 .parent_data = gcc_xo_gpll0_gpll0_early_div, 383 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_early_div), 384 .ops = &clk_rcg2_ops, 385 }, 386 }; 387 388 static struct clk_rcg2 usb20_mock_utmi_clk_src = { 389 .cmd_rcgr = 0x12024, 390 .hid_width = 5, 391 .parent_map = gcc_xo_gpll0_gpll0_early_div_map, 392 .freq_tbl = ftbl_usb30_mock_utmi_clk_src, 393 .clkr.hw.init = &(struct clk_init_data){ 394 .name = "usb20_mock_utmi_clk_src", 395 .parent_data = gcc_xo_gpll0_gpll0_early_div, 396 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_early_div), 397 .ops = &clk_rcg2_ops, 398 }, 399 }; 400 401 static const struct freq_tbl ftbl_sdcc1_apps_clk_src[] = { 402 F(144000, P_XO, 16, 3, 25), 403 F(400000, P_XO, 12, 1, 4), 404 F(20000000, P_GPLL0, 15, 1, 2), 405 F(25000000, P_GPLL0, 12, 1, 2), 406 F(50000000, P_GPLL0, 12, 0, 0), 407 F(96000000, P_GPLL4, 4, 0, 0), 408 F(192000000, P_GPLL4, 2, 0, 0), 409 F(384000000, P_GPLL4, 1, 0, 0), 410 { } 411 }; 412 413 static struct clk_rcg2 sdcc1_apps_clk_src = { 414 .cmd_rcgr = 0x13010, 415 .mnd_width = 8, 416 .hid_width = 5, 417 .parent_map = gcc_xo_gpll0_gpll4_gpll0_early_div_map, 418 .freq_tbl = ftbl_sdcc1_apps_clk_src, 419 .clkr.hw.init = &(struct clk_init_data){ 420 .name = "sdcc1_apps_clk_src", 421 .parent_data = gcc_xo_gpll0_gpll4_gpll0_early_div, 422 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll4_gpll0_early_div), 423 .ops = &clk_rcg2_floor_ops, 424 }, 425 }; 426 427 static struct freq_tbl ftbl_sdcc1_ice_core_clk_src[] = { 428 F(19200000, P_XO, 1, 0, 0), 429 F(150000000, P_GPLL0, 4, 0, 0), 430 F(300000000, P_GPLL0, 2, 0, 0), 431 { } 432 }; 433 434 static struct clk_rcg2 sdcc1_ice_core_clk_src = { 435 .cmd_rcgr = 0x13024, 436 .hid_width = 5, 437 .parent_map = gcc_xo_gpll0_gpll4_gpll0_early_div_map, 438 .freq_tbl = ftbl_sdcc1_ice_core_clk_src, 439 .clkr.hw.init = &(struct clk_init_data){ 440 .name = "sdcc1_ice_core_clk_src", 441 .parent_data = gcc_xo_gpll0_gpll4_gpll0_early_div, 442 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll4_gpll0_early_div), 443 .ops = &clk_rcg2_ops, 444 }, 445 }; 446 447 static const struct freq_tbl ftbl_sdcc2_apps_clk_src[] = { 448 F(144000, P_XO, 16, 3, 25), 449 F(400000, P_XO, 12, 1, 4), 450 F(20000000, P_GPLL0, 15, 1, 2), 451 F(25000000, P_GPLL0, 12, 1, 2), 452 F(50000000, P_GPLL0, 12, 0, 0), 453 F(100000000, P_GPLL0, 6, 0, 0), 454 F(200000000, P_GPLL0, 3, 0, 0), 455 { } 456 }; 457 458 static struct clk_rcg2 sdcc2_apps_clk_src = { 459 .cmd_rcgr = 0x14010, 460 .mnd_width = 8, 461 .hid_width = 5, 462 .parent_map = gcc_xo_gpll0_gpll4_map, 463 .freq_tbl = ftbl_sdcc2_apps_clk_src, 464 .clkr.hw.init = &(struct clk_init_data){ 465 .name = "sdcc2_apps_clk_src", 466 .parent_data = gcc_xo_gpll0_gpll4, 467 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll4), 468 .ops = &clk_rcg2_floor_ops, 469 }, 470 }; 471 472 static struct clk_rcg2 sdcc3_apps_clk_src = { 473 .cmd_rcgr = 0x15010, 474 .mnd_width = 8, 475 .hid_width = 5, 476 .parent_map = gcc_xo_gpll0_gpll4_map, 477 .freq_tbl = ftbl_sdcc2_apps_clk_src, 478 .clkr.hw.init = &(struct clk_init_data){ 479 .name = "sdcc3_apps_clk_src", 480 .parent_data = gcc_xo_gpll0_gpll4, 481 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll4), 482 .ops = &clk_rcg2_floor_ops, 483 }, 484 }; 485 486 static const struct freq_tbl ftbl_sdcc4_apps_clk_src[] = { 487 F(144000, P_XO, 16, 3, 25), 488 F(400000, P_XO, 12, 1, 4), 489 F(20000000, P_GPLL0, 15, 1, 2), 490 F(25000000, P_GPLL0, 12, 1, 2), 491 F(50000000, P_GPLL0, 12, 0, 0), 492 F(100000000, P_GPLL0, 6, 0, 0), 493 { } 494 }; 495 496 static struct clk_rcg2 sdcc4_apps_clk_src = { 497 .cmd_rcgr = 0x16010, 498 .mnd_width = 8, 499 .hid_width = 5, 500 .parent_map = gcc_xo_gpll0_map, 501 .freq_tbl = ftbl_sdcc4_apps_clk_src, 502 .clkr.hw.init = &(struct clk_init_data){ 503 .name = "sdcc4_apps_clk_src", 504 .parent_data = gcc_xo_gpll0, 505 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 506 .ops = &clk_rcg2_floor_ops, 507 }, 508 }; 509 510 static const struct freq_tbl ftbl_blsp1_qup1_spi_apps_clk_src[] = { 511 F(960000, P_XO, 10, 1, 2), 512 F(4800000, P_XO, 4, 0, 0), 513 F(9600000, P_XO, 2, 0, 0), 514 F(15000000, P_GPLL0, 10, 1, 4), 515 F(19200000, P_XO, 1, 0, 0), 516 F(25000000, P_GPLL0, 12, 1, 2), 517 F(50000000, P_GPLL0, 12, 0, 0), 518 { } 519 }; 520 521 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = { 522 .cmd_rcgr = 0x1900c, 523 .mnd_width = 8, 524 .hid_width = 5, 525 .parent_map = gcc_xo_gpll0_map, 526 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 527 .clkr.hw.init = &(struct clk_init_data){ 528 .name = "blsp1_qup1_spi_apps_clk_src", 529 .parent_data = gcc_xo_gpll0, 530 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 531 .ops = &clk_rcg2_ops, 532 }, 533 }; 534 535 static const struct freq_tbl ftbl_blsp1_qup1_i2c_apps_clk_src[] = { 536 F(19200000, P_XO, 1, 0, 0), 537 F(50000000, P_GPLL0, 12, 0, 0), 538 { } 539 }; 540 541 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = { 542 .cmd_rcgr = 0x19020, 543 .hid_width = 5, 544 .parent_map = gcc_xo_gpll0_map, 545 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 546 .clkr.hw.init = &(struct clk_init_data){ 547 .name = "blsp1_qup1_i2c_apps_clk_src", 548 .parent_data = gcc_xo_gpll0, 549 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 550 .ops = &clk_rcg2_ops, 551 }, 552 }; 553 554 static const struct freq_tbl ftbl_blsp1_uart1_apps_clk_src[] = { 555 F(3686400, P_GPLL0, 1, 96, 15625), 556 F(7372800, P_GPLL0, 1, 192, 15625), 557 F(14745600, P_GPLL0, 1, 384, 15625), 558 F(16000000, P_GPLL0, 5, 2, 15), 559 F(19200000, P_XO, 1, 0, 0), 560 F(24000000, P_GPLL0, 5, 1, 5), 561 F(32000000, P_GPLL0, 1, 4, 75), 562 F(40000000, P_GPLL0, 15, 0, 0), 563 F(46400000, P_GPLL0, 1, 29, 375), 564 F(48000000, P_GPLL0, 12.5, 0, 0), 565 F(51200000, P_GPLL0, 1, 32, 375), 566 F(56000000, P_GPLL0, 1, 7, 75), 567 F(58982400, P_GPLL0, 1, 1536, 15625), 568 F(60000000, P_GPLL0, 10, 0, 0), 569 F(63157895, P_GPLL0, 9.5, 0, 0), 570 { } 571 }; 572 573 static struct clk_rcg2 blsp1_uart1_apps_clk_src = { 574 .cmd_rcgr = 0x1a00c, 575 .mnd_width = 16, 576 .hid_width = 5, 577 .parent_map = gcc_xo_gpll0_map, 578 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 579 .clkr.hw.init = &(struct clk_init_data){ 580 .name = "blsp1_uart1_apps_clk_src", 581 .parent_data = gcc_xo_gpll0, 582 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 583 .ops = &clk_rcg2_ops, 584 }, 585 }; 586 587 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = { 588 .cmd_rcgr = 0x1b00c, 589 .mnd_width = 8, 590 .hid_width = 5, 591 .parent_map = gcc_xo_gpll0_map, 592 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 593 .clkr.hw.init = &(struct clk_init_data){ 594 .name = "blsp1_qup2_spi_apps_clk_src", 595 .parent_data = gcc_xo_gpll0, 596 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 597 .ops = &clk_rcg2_ops, 598 }, 599 }; 600 601 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = { 602 .cmd_rcgr = 0x1b020, 603 .hid_width = 5, 604 .parent_map = gcc_xo_gpll0_map, 605 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 606 .clkr.hw.init = &(struct clk_init_data){ 607 .name = "blsp1_qup2_i2c_apps_clk_src", 608 .parent_data = gcc_xo_gpll0, 609 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 610 .ops = &clk_rcg2_ops, 611 }, 612 }; 613 614 static struct clk_rcg2 blsp1_uart2_apps_clk_src = { 615 .cmd_rcgr = 0x1c00c, 616 .mnd_width = 16, 617 .hid_width = 5, 618 .parent_map = gcc_xo_gpll0_map, 619 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 620 .clkr.hw.init = &(struct clk_init_data){ 621 .name = "blsp1_uart2_apps_clk_src", 622 .parent_data = gcc_xo_gpll0, 623 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 624 .ops = &clk_rcg2_ops, 625 }, 626 }; 627 628 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = { 629 .cmd_rcgr = 0x1d00c, 630 .mnd_width = 8, 631 .hid_width = 5, 632 .parent_map = gcc_xo_gpll0_map, 633 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 634 .clkr.hw.init = &(struct clk_init_data){ 635 .name = "blsp1_qup3_spi_apps_clk_src", 636 .parent_data = gcc_xo_gpll0, 637 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 638 .ops = &clk_rcg2_ops, 639 }, 640 }; 641 642 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = { 643 .cmd_rcgr = 0x1d020, 644 .hid_width = 5, 645 .parent_map = gcc_xo_gpll0_map, 646 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 647 .clkr.hw.init = &(struct clk_init_data){ 648 .name = "blsp1_qup3_i2c_apps_clk_src", 649 .parent_data = gcc_xo_gpll0, 650 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 651 .ops = &clk_rcg2_ops, 652 }, 653 }; 654 655 static struct clk_rcg2 blsp1_uart3_apps_clk_src = { 656 .cmd_rcgr = 0x1e00c, 657 .mnd_width = 16, 658 .hid_width = 5, 659 .parent_map = gcc_xo_gpll0_map, 660 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 661 .clkr.hw.init = &(struct clk_init_data){ 662 .name = "blsp1_uart3_apps_clk_src", 663 .parent_data = gcc_xo_gpll0, 664 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 665 .ops = &clk_rcg2_ops, 666 }, 667 }; 668 669 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = { 670 .cmd_rcgr = 0x1f00c, 671 .mnd_width = 8, 672 .hid_width = 5, 673 .parent_map = gcc_xo_gpll0_map, 674 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 675 .clkr.hw.init = &(struct clk_init_data){ 676 .name = "blsp1_qup4_spi_apps_clk_src", 677 .parent_data = gcc_xo_gpll0, 678 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 679 .ops = &clk_rcg2_ops, 680 }, 681 }; 682 683 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = { 684 .cmd_rcgr = 0x1f020, 685 .hid_width = 5, 686 .parent_map = gcc_xo_gpll0_map, 687 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 688 .clkr.hw.init = &(struct clk_init_data){ 689 .name = "blsp1_qup4_i2c_apps_clk_src", 690 .parent_data = gcc_xo_gpll0, 691 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 692 .ops = &clk_rcg2_ops, 693 }, 694 }; 695 696 static struct clk_rcg2 blsp1_uart4_apps_clk_src = { 697 .cmd_rcgr = 0x2000c, 698 .mnd_width = 16, 699 .hid_width = 5, 700 .parent_map = gcc_xo_gpll0_map, 701 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 702 .clkr.hw.init = &(struct clk_init_data){ 703 .name = "blsp1_uart4_apps_clk_src", 704 .parent_data = gcc_xo_gpll0, 705 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 706 .ops = &clk_rcg2_ops, 707 }, 708 }; 709 710 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = { 711 .cmd_rcgr = 0x2100c, 712 .mnd_width = 8, 713 .hid_width = 5, 714 .parent_map = gcc_xo_gpll0_map, 715 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 716 .clkr.hw.init = &(struct clk_init_data){ 717 .name = "blsp1_qup5_spi_apps_clk_src", 718 .parent_data = gcc_xo_gpll0, 719 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 720 .ops = &clk_rcg2_ops, 721 }, 722 }; 723 724 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = { 725 .cmd_rcgr = 0x21020, 726 .hid_width = 5, 727 .parent_map = gcc_xo_gpll0_map, 728 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 729 .clkr.hw.init = &(struct clk_init_data){ 730 .name = "blsp1_qup5_i2c_apps_clk_src", 731 .parent_data = gcc_xo_gpll0, 732 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 733 .ops = &clk_rcg2_ops, 734 }, 735 }; 736 737 static struct clk_rcg2 blsp1_uart5_apps_clk_src = { 738 .cmd_rcgr = 0x2200c, 739 .mnd_width = 16, 740 .hid_width = 5, 741 .parent_map = gcc_xo_gpll0_map, 742 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 743 .clkr.hw.init = &(struct clk_init_data){ 744 .name = "blsp1_uart5_apps_clk_src", 745 .parent_data = gcc_xo_gpll0, 746 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 747 .ops = &clk_rcg2_ops, 748 }, 749 }; 750 751 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = { 752 .cmd_rcgr = 0x2300c, 753 .mnd_width = 8, 754 .hid_width = 5, 755 .parent_map = gcc_xo_gpll0_map, 756 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 757 .clkr.hw.init = &(struct clk_init_data){ 758 .name = "blsp1_qup6_spi_apps_clk_src", 759 .parent_data = gcc_xo_gpll0, 760 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 761 .ops = &clk_rcg2_ops, 762 }, 763 }; 764 765 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = { 766 .cmd_rcgr = 0x23020, 767 .hid_width = 5, 768 .parent_map = gcc_xo_gpll0_map, 769 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 770 .clkr.hw.init = &(struct clk_init_data){ 771 .name = "blsp1_qup6_i2c_apps_clk_src", 772 .parent_data = gcc_xo_gpll0, 773 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 774 .ops = &clk_rcg2_ops, 775 }, 776 }; 777 778 static struct clk_rcg2 blsp1_uart6_apps_clk_src = { 779 .cmd_rcgr = 0x2400c, 780 .mnd_width = 16, 781 .hid_width = 5, 782 .parent_map = gcc_xo_gpll0_map, 783 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 784 .clkr.hw.init = &(struct clk_init_data){ 785 .name = "blsp1_uart6_apps_clk_src", 786 .parent_data = gcc_xo_gpll0, 787 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 788 .ops = &clk_rcg2_ops, 789 }, 790 }; 791 792 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src = { 793 .cmd_rcgr = 0x2600c, 794 .mnd_width = 8, 795 .hid_width = 5, 796 .parent_map = gcc_xo_gpll0_map, 797 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 798 .clkr.hw.init = &(struct clk_init_data){ 799 .name = "blsp2_qup1_spi_apps_clk_src", 800 .parent_data = gcc_xo_gpll0, 801 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 802 .ops = &clk_rcg2_ops, 803 }, 804 }; 805 806 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src = { 807 .cmd_rcgr = 0x26020, 808 .hid_width = 5, 809 .parent_map = gcc_xo_gpll0_map, 810 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 811 .clkr.hw.init = &(struct clk_init_data){ 812 .name = "blsp2_qup1_i2c_apps_clk_src", 813 .parent_data = gcc_xo_gpll0, 814 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 815 .ops = &clk_rcg2_ops, 816 }, 817 }; 818 819 static struct clk_rcg2 blsp2_uart1_apps_clk_src = { 820 .cmd_rcgr = 0x2700c, 821 .mnd_width = 16, 822 .hid_width = 5, 823 .parent_map = gcc_xo_gpll0_map, 824 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 825 .clkr.hw.init = &(struct clk_init_data){ 826 .name = "blsp2_uart1_apps_clk_src", 827 .parent_data = gcc_xo_gpll0, 828 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 829 .ops = &clk_rcg2_ops, 830 }, 831 }; 832 833 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src = { 834 .cmd_rcgr = 0x2800c, 835 .mnd_width = 8, 836 .hid_width = 5, 837 .parent_map = gcc_xo_gpll0_map, 838 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 839 .clkr.hw.init = &(struct clk_init_data){ 840 .name = "blsp2_qup2_spi_apps_clk_src", 841 .parent_data = gcc_xo_gpll0, 842 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 843 .ops = &clk_rcg2_ops, 844 }, 845 }; 846 847 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src = { 848 .cmd_rcgr = 0x28020, 849 .hid_width = 5, 850 .parent_map = gcc_xo_gpll0_map, 851 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 852 .clkr.hw.init = &(struct clk_init_data){ 853 .name = "blsp2_qup2_i2c_apps_clk_src", 854 .parent_data = gcc_xo_gpll0, 855 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 856 .ops = &clk_rcg2_ops, 857 }, 858 }; 859 860 static struct clk_rcg2 blsp2_uart2_apps_clk_src = { 861 .cmd_rcgr = 0x2900c, 862 .mnd_width = 16, 863 .hid_width = 5, 864 .parent_map = gcc_xo_gpll0_map, 865 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 866 .clkr.hw.init = &(struct clk_init_data){ 867 .name = "blsp2_uart2_apps_clk_src", 868 .parent_data = gcc_xo_gpll0, 869 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 870 .ops = &clk_rcg2_ops, 871 }, 872 }; 873 874 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src = { 875 .cmd_rcgr = 0x2a00c, 876 .mnd_width = 8, 877 .hid_width = 5, 878 .parent_map = gcc_xo_gpll0_map, 879 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 880 .clkr.hw.init = &(struct clk_init_data){ 881 .name = "blsp2_qup3_spi_apps_clk_src", 882 .parent_data = gcc_xo_gpll0, 883 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 884 .ops = &clk_rcg2_ops, 885 }, 886 }; 887 888 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src = { 889 .cmd_rcgr = 0x2a020, 890 .hid_width = 5, 891 .parent_map = gcc_xo_gpll0_map, 892 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 893 .clkr.hw.init = &(struct clk_init_data){ 894 .name = "blsp2_qup3_i2c_apps_clk_src", 895 .parent_data = gcc_xo_gpll0, 896 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 897 .ops = &clk_rcg2_ops, 898 }, 899 }; 900 901 static struct clk_rcg2 blsp2_uart3_apps_clk_src = { 902 .cmd_rcgr = 0x2b00c, 903 .mnd_width = 16, 904 .hid_width = 5, 905 .parent_map = gcc_xo_gpll0_map, 906 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 907 .clkr.hw.init = &(struct clk_init_data){ 908 .name = "blsp2_uart3_apps_clk_src", 909 .parent_data = gcc_xo_gpll0, 910 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 911 .ops = &clk_rcg2_ops, 912 }, 913 }; 914 915 static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src = { 916 .cmd_rcgr = 0x2c00c, 917 .mnd_width = 8, 918 .hid_width = 5, 919 .parent_map = gcc_xo_gpll0_map, 920 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 921 .clkr.hw.init = &(struct clk_init_data){ 922 .name = "blsp2_qup4_spi_apps_clk_src", 923 .parent_data = gcc_xo_gpll0, 924 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 925 .ops = &clk_rcg2_ops, 926 }, 927 }; 928 929 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src = { 930 .cmd_rcgr = 0x2c020, 931 .hid_width = 5, 932 .parent_map = gcc_xo_gpll0_map, 933 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 934 .clkr.hw.init = &(struct clk_init_data){ 935 .name = "blsp2_qup4_i2c_apps_clk_src", 936 .parent_data = gcc_xo_gpll0, 937 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 938 .ops = &clk_rcg2_ops, 939 }, 940 }; 941 942 static struct clk_rcg2 blsp2_uart4_apps_clk_src = { 943 .cmd_rcgr = 0x2d00c, 944 .mnd_width = 16, 945 .hid_width = 5, 946 .parent_map = gcc_xo_gpll0_map, 947 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 948 .clkr.hw.init = &(struct clk_init_data){ 949 .name = "blsp2_uart4_apps_clk_src", 950 .parent_data = gcc_xo_gpll0, 951 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 952 .ops = &clk_rcg2_ops, 953 }, 954 }; 955 956 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src = { 957 .cmd_rcgr = 0x2e00c, 958 .mnd_width = 8, 959 .hid_width = 5, 960 .parent_map = gcc_xo_gpll0_map, 961 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 962 .clkr.hw.init = &(struct clk_init_data){ 963 .name = "blsp2_qup5_spi_apps_clk_src", 964 .parent_data = gcc_xo_gpll0, 965 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 966 .ops = &clk_rcg2_ops, 967 }, 968 }; 969 970 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src = { 971 .cmd_rcgr = 0x2e020, 972 .hid_width = 5, 973 .parent_map = gcc_xo_gpll0_map, 974 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 975 .clkr.hw.init = &(struct clk_init_data){ 976 .name = "blsp2_qup5_i2c_apps_clk_src", 977 .parent_data = gcc_xo_gpll0, 978 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 979 .ops = &clk_rcg2_ops, 980 }, 981 }; 982 983 static struct clk_rcg2 blsp2_uart5_apps_clk_src = { 984 .cmd_rcgr = 0x2f00c, 985 .mnd_width = 16, 986 .hid_width = 5, 987 .parent_map = gcc_xo_gpll0_map, 988 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 989 .clkr.hw.init = &(struct clk_init_data){ 990 .name = "blsp2_uart5_apps_clk_src", 991 .parent_data = gcc_xo_gpll0, 992 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 993 .ops = &clk_rcg2_ops, 994 }, 995 }; 996 997 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src = { 998 .cmd_rcgr = 0x3000c, 999 .mnd_width = 8, 1000 .hid_width = 5, 1001 .parent_map = gcc_xo_gpll0_map, 1002 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, 1003 .clkr.hw.init = &(struct clk_init_data){ 1004 .name = "blsp2_qup6_spi_apps_clk_src", 1005 .parent_data = gcc_xo_gpll0, 1006 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1007 .ops = &clk_rcg2_ops, 1008 }, 1009 }; 1010 1011 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src = { 1012 .cmd_rcgr = 0x30020, 1013 .hid_width = 5, 1014 .parent_map = gcc_xo_gpll0_map, 1015 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, 1016 .clkr.hw.init = &(struct clk_init_data){ 1017 .name = "blsp2_qup6_i2c_apps_clk_src", 1018 .parent_data = gcc_xo_gpll0, 1019 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1020 .ops = &clk_rcg2_ops, 1021 }, 1022 }; 1023 1024 static struct clk_rcg2 blsp2_uart6_apps_clk_src = { 1025 .cmd_rcgr = 0x3100c, 1026 .mnd_width = 16, 1027 .hid_width = 5, 1028 .parent_map = gcc_xo_gpll0_map, 1029 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, 1030 .clkr.hw.init = &(struct clk_init_data){ 1031 .name = "blsp2_uart6_apps_clk_src", 1032 .parent_data = gcc_xo_gpll0, 1033 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1034 .ops = &clk_rcg2_ops, 1035 }, 1036 }; 1037 1038 static const struct freq_tbl ftbl_pdm2_clk_src[] = { 1039 F(60000000, P_GPLL0, 10, 0, 0), 1040 { } 1041 }; 1042 1043 static struct clk_rcg2 pdm2_clk_src = { 1044 .cmd_rcgr = 0x33010, 1045 .hid_width = 5, 1046 .parent_map = gcc_xo_gpll0_map, 1047 .freq_tbl = ftbl_pdm2_clk_src, 1048 .clkr.hw.init = &(struct clk_init_data){ 1049 .name = "pdm2_clk_src", 1050 .parent_data = gcc_xo_gpll0, 1051 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1052 .ops = &clk_rcg2_ops, 1053 }, 1054 }; 1055 1056 static const struct freq_tbl ftbl_tsif_ref_clk_src[] = { 1057 F(105495, P_XO, 1, 1, 182), 1058 { } 1059 }; 1060 1061 static struct clk_rcg2 tsif_ref_clk_src = { 1062 .cmd_rcgr = 0x36010, 1063 .mnd_width = 8, 1064 .hid_width = 5, 1065 .parent_map = gcc_xo_gpll0_aud_ref_clk_map, 1066 .freq_tbl = ftbl_tsif_ref_clk_src, 1067 .clkr.hw.init = &(struct clk_init_data){ 1068 .name = "tsif_ref_clk_src", 1069 .parent_data = gcc_xo_gpll0_aud_ref_clk, 1070 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_aud_ref_clk), 1071 .ops = &clk_rcg2_ops, 1072 }, 1073 }; 1074 1075 static struct clk_rcg2 gcc_sleep_clk_src = { 1076 .cmd_rcgr = 0x43014, 1077 .hid_width = 5, 1078 .parent_map = gcc_sleep_clk_map, 1079 .clkr.hw.init = &(struct clk_init_data){ 1080 .name = "gcc_sleep_clk_src", 1081 .parent_data = gcc_sleep_clk, 1082 .num_parents = ARRAY_SIZE(gcc_sleep_clk), 1083 .ops = &clk_rcg2_ops, 1084 }, 1085 }; 1086 1087 static struct clk_rcg2 hmss_rbcpr_clk_src = { 1088 .cmd_rcgr = 0x48040, 1089 .hid_width = 5, 1090 .parent_map = gcc_xo_gpll0_map, 1091 .freq_tbl = ftbl_usb30_mock_utmi_clk_src, 1092 .clkr.hw.init = &(struct clk_init_data){ 1093 .name = "hmss_rbcpr_clk_src", 1094 .parent_data = gcc_xo_gpll0, 1095 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1096 .ops = &clk_rcg2_ops, 1097 }, 1098 }; 1099 1100 static struct clk_rcg2 hmss_gpll0_clk_src = { 1101 .cmd_rcgr = 0x48058, 1102 .hid_width = 5, 1103 .parent_map = gcc_xo_gpll0_map, 1104 .clkr.hw.init = &(struct clk_init_data){ 1105 .name = "hmss_gpll0_clk_src", 1106 .parent_data = gcc_xo_gpll0, 1107 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1108 .ops = &clk_rcg2_ops, 1109 }, 1110 }; 1111 1112 static const struct freq_tbl ftbl_gp1_clk_src[] = { 1113 F(19200000, P_XO, 1, 0, 0), 1114 F(100000000, P_GPLL0, 6, 0, 0), 1115 F(200000000, P_GPLL0, 3, 0, 0), 1116 { } 1117 }; 1118 1119 static struct clk_rcg2 gp1_clk_src = { 1120 .cmd_rcgr = 0x64004, 1121 .mnd_width = 8, 1122 .hid_width = 5, 1123 .parent_map = gcc_xo_gpll0_sleep_clk_gpll0_early_div_map, 1124 .freq_tbl = ftbl_gp1_clk_src, 1125 .clkr.hw.init = &(struct clk_init_data){ 1126 .name = "gp1_clk_src", 1127 .parent_data = gcc_xo_gpll0_sleep_clk_gpll0_early_div, 1128 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_sleep_clk_gpll0_early_div), 1129 .ops = &clk_rcg2_ops, 1130 }, 1131 }; 1132 1133 static struct clk_rcg2 gp2_clk_src = { 1134 .cmd_rcgr = 0x65004, 1135 .mnd_width = 8, 1136 .hid_width = 5, 1137 .parent_map = gcc_xo_gpll0_sleep_clk_gpll0_early_div_map, 1138 .freq_tbl = ftbl_gp1_clk_src, 1139 .clkr.hw.init = &(struct clk_init_data){ 1140 .name = "gp2_clk_src", 1141 .parent_data = gcc_xo_gpll0_sleep_clk_gpll0_early_div, 1142 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_sleep_clk_gpll0_early_div), 1143 .ops = &clk_rcg2_ops, 1144 }, 1145 }; 1146 1147 static struct clk_rcg2 gp3_clk_src = { 1148 .cmd_rcgr = 0x66004, 1149 .mnd_width = 8, 1150 .hid_width = 5, 1151 .parent_map = gcc_xo_gpll0_sleep_clk_gpll0_early_div_map, 1152 .freq_tbl = ftbl_gp1_clk_src, 1153 .clkr.hw.init = &(struct clk_init_data){ 1154 .name = "gp3_clk_src", 1155 .parent_data = gcc_xo_gpll0_sleep_clk_gpll0_early_div, 1156 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_sleep_clk_gpll0_early_div), 1157 .ops = &clk_rcg2_ops, 1158 }, 1159 }; 1160 1161 static const struct freq_tbl ftbl_pcie_aux_clk_src[] = { 1162 F(1010526, P_XO, 1, 1, 19), 1163 { } 1164 }; 1165 1166 static struct clk_rcg2 pcie_aux_clk_src = { 1167 .cmd_rcgr = 0x6c000, 1168 .mnd_width = 16, 1169 .hid_width = 5, 1170 .parent_map = gcc_xo_sleep_clk_map, 1171 .freq_tbl = ftbl_pcie_aux_clk_src, 1172 .clkr.hw.init = &(struct clk_init_data){ 1173 .name = "pcie_aux_clk_src", 1174 .parent_data = gcc_xo_sleep_clk, 1175 .num_parents = ARRAY_SIZE(gcc_xo_sleep_clk), 1176 .ops = &clk_rcg2_ops, 1177 }, 1178 }; 1179 1180 static const struct freq_tbl ftbl_ufs_axi_clk_src[] = { 1181 F(100000000, P_GPLL0, 6, 0, 0), 1182 F(200000000, P_GPLL0, 3, 0, 0), 1183 F(240000000, P_GPLL0, 2.5, 0, 0), 1184 { } 1185 }; 1186 1187 static struct clk_rcg2 ufs_axi_clk_src = { 1188 .cmd_rcgr = 0x75024, 1189 .mnd_width = 8, 1190 .hid_width = 5, 1191 .parent_map = gcc_xo_gpll0_map, 1192 .freq_tbl = ftbl_ufs_axi_clk_src, 1193 .clkr.hw.init = &(struct clk_init_data){ 1194 .name = "ufs_axi_clk_src", 1195 .parent_data = gcc_xo_gpll0, 1196 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1197 .ops = &clk_rcg2_ops, 1198 }, 1199 }; 1200 1201 static const struct freq_tbl ftbl_ufs_ice_core_clk_src[] = { 1202 F(19200000, P_XO, 1, 0, 0), 1203 F(150000000, P_GPLL0, 4, 0, 0), 1204 F(300000000, P_GPLL0, 2, 0, 0), 1205 { } 1206 }; 1207 1208 static struct clk_rcg2 ufs_ice_core_clk_src = { 1209 .cmd_rcgr = 0x76014, 1210 .hid_width = 5, 1211 .parent_map = gcc_xo_gpll0_map, 1212 .freq_tbl = ftbl_ufs_ice_core_clk_src, 1213 .clkr.hw.init = &(struct clk_init_data){ 1214 .name = "ufs_ice_core_clk_src", 1215 .parent_data = gcc_xo_gpll0, 1216 .num_parents = ARRAY_SIZE(gcc_xo_gpll0), 1217 .ops = &clk_rcg2_ops, 1218 }, 1219 }; 1220 1221 static const struct freq_tbl ftbl_qspi_ser_clk_src[] = { 1222 F(75000000, P_GPLL0, 8, 0, 0), 1223 F(150000000, P_GPLL0, 4, 0, 0), 1224 F(256000000, P_GPLL4, 1.5, 0, 0), 1225 F(300000000, P_GPLL0, 2, 0, 0), 1226 { } 1227 }; 1228 1229 static struct clk_rcg2 qspi_ser_clk_src = { 1230 .cmd_rcgr = 0x8b00c, 1231 .hid_width = 5, 1232 .parent_map = gcc_xo_gpll0_gpll4_gpll0_early_div_map, 1233 .freq_tbl = ftbl_qspi_ser_clk_src, 1234 .clkr.hw.init = &(struct clk_init_data){ 1235 .name = "qspi_ser_clk_src", 1236 .parent_data = gcc_xo_gpll0_gpll4_gpll0_early_div, 1237 .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll4_gpll0_early_div), 1238 .ops = &clk_rcg2_ops, 1239 }, 1240 }; 1241 1242 static struct clk_branch gcc_sys_noc_usb3_axi_clk = { 1243 .halt_reg = 0x0f03c, 1244 .clkr = { 1245 .enable_reg = 0x0f03c, 1246 .enable_mask = BIT(0), 1247 .hw.init = &(struct clk_init_data){ 1248 .name = "gcc_sys_noc_usb3_axi_clk", 1249 .parent_hws = (const struct clk_hw*[]){ 1250 &usb30_master_clk_src.clkr.hw, 1251 }, 1252 .num_parents = 1, 1253 .flags = CLK_SET_RATE_PARENT, 1254 .ops = &clk_branch2_ops, 1255 }, 1256 }, 1257 }; 1258 1259 static struct clk_branch gcc_sys_noc_ufs_axi_clk = { 1260 .halt_reg = 0x75038, 1261 .clkr = { 1262 .enable_reg = 0x75038, 1263 .enable_mask = BIT(0), 1264 .hw.init = &(struct clk_init_data){ 1265 .name = "gcc_sys_noc_ufs_axi_clk", 1266 .parent_hws = (const struct clk_hw*[]){ 1267 &ufs_axi_clk_src.clkr.hw, 1268 }, 1269 .num_parents = 1, 1270 .flags = CLK_SET_RATE_PARENT, 1271 .ops = &clk_branch2_ops, 1272 }, 1273 }, 1274 }; 1275 1276 static struct clk_branch gcc_periph_noc_usb20_ahb_clk = { 1277 .halt_reg = 0x6010, 1278 .clkr = { 1279 .enable_reg = 0x6010, 1280 .enable_mask = BIT(0), 1281 .hw.init = &(struct clk_init_data){ 1282 .name = "gcc_periph_noc_usb20_ahb_clk", 1283 .parent_hws = (const struct clk_hw*[]){ 1284 &usb20_master_clk_src.clkr.hw, 1285 }, 1286 .num_parents = 1, 1287 .flags = CLK_SET_RATE_PARENT, 1288 .ops = &clk_branch2_ops, 1289 }, 1290 }, 1291 }; 1292 1293 static struct clk_branch gcc_mmss_noc_cfg_ahb_clk = { 1294 .halt_reg = 0x9008, 1295 .clkr = { 1296 .enable_reg = 0x9008, 1297 .enable_mask = BIT(0), 1298 .hw.init = &(struct clk_init_data){ 1299 .name = "gcc_mmss_noc_cfg_ahb_clk", 1300 .parent_hws = (const struct clk_hw*[]){ 1301 &config_noc_clk_src.clkr.hw, 1302 }, 1303 .num_parents = 1, 1304 .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 1305 .ops = &clk_branch2_ops, 1306 }, 1307 }, 1308 }; 1309 1310 static struct clk_branch gcc_mmss_bimc_gfx_clk = { 1311 .halt_reg = 0x9010, 1312 .clkr = { 1313 .enable_reg = 0x9010, 1314 .enable_mask = BIT(0), 1315 .hw.init = &(struct clk_init_data){ 1316 .name = "gcc_mmss_bimc_gfx_clk", 1317 .flags = CLK_SET_RATE_PARENT, 1318 .ops = &clk_branch2_ops, 1319 }, 1320 }, 1321 }; 1322 1323 static struct clk_branch gcc_usb30_master_clk = { 1324 .halt_reg = 0x0f008, 1325 .clkr = { 1326 .enable_reg = 0x0f008, 1327 .enable_mask = BIT(0), 1328 .hw.init = &(struct clk_init_data){ 1329 .name = "gcc_usb30_master_clk", 1330 .parent_hws = (const struct clk_hw*[]){ 1331 &usb30_master_clk_src.clkr.hw, 1332 }, 1333 .num_parents = 1, 1334 .flags = CLK_SET_RATE_PARENT, 1335 .ops = &clk_branch2_ops, 1336 }, 1337 }, 1338 }; 1339 1340 static struct clk_branch gcc_usb30_sleep_clk = { 1341 .halt_reg = 0x0f00c, 1342 .clkr = { 1343 .enable_reg = 0x0f00c, 1344 .enable_mask = BIT(0), 1345 .hw.init = &(struct clk_init_data){ 1346 .name = "gcc_usb30_sleep_clk", 1347 .parent_hws = (const struct clk_hw*[]){ 1348 &gcc_sleep_clk_src.clkr.hw, 1349 }, 1350 .num_parents = 1, 1351 .flags = CLK_SET_RATE_PARENT, 1352 .ops = &clk_branch2_ops, 1353 }, 1354 }, 1355 }; 1356 1357 static struct clk_branch gcc_usb30_mock_utmi_clk = { 1358 .halt_reg = 0x0f010, 1359 .clkr = { 1360 .enable_reg = 0x0f010, 1361 .enable_mask = BIT(0), 1362 .hw.init = &(struct clk_init_data){ 1363 .name = "gcc_usb30_mock_utmi_clk", 1364 .parent_hws = (const struct clk_hw*[]){ 1365 &usb30_mock_utmi_clk_src.clkr.hw, 1366 }, 1367 .num_parents = 1, 1368 .flags = CLK_SET_RATE_PARENT, 1369 .ops = &clk_branch2_ops, 1370 }, 1371 }, 1372 }; 1373 1374 static struct clk_branch gcc_usb3_phy_aux_clk = { 1375 .halt_reg = 0x50000, 1376 .clkr = { 1377 .enable_reg = 0x50000, 1378 .enable_mask = BIT(0), 1379 .hw.init = &(struct clk_init_data){ 1380 .name = "gcc_usb3_phy_aux_clk", 1381 .parent_hws = (const struct clk_hw*[]){ 1382 &usb3_phy_aux_clk_src.clkr.hw, 1383 }, 1384 .num_parents = 1, 1385 .flags = CLK_SET_RATE_PARENT, 1386 .ops = &clk_branch2_ops, 1387 }, 1388 }, 1389 }; 1390 1391 static struct clk_branch gcc_usb3_phy_pipe_clk = { 1392 .halt_reg = 0x50004, 1393 .halt_check = BRANCH_HALT_SKIP, 1394 .clkr = { 1395 .enable_reg = 0x50004, 1396 .enable_mask = BIT(0), 1397 .hw.init = &(struct clk_init_data){ 1398 .name = "gcc_usb3_phy_pipe_clk", 1399 .parent_data = &(const struct clk_parent_data){ 1400 .fw_name = "usb3_phy_pipe_clk_src", .name = "usb3_phy_pipe_clk_src", 1401 }, 1402 .num_parents = 1, 1403 .flags = CLK_SET_RATE_PARENT, 1404 .ops = &clk_branch2_ops, 1405 }, 1406 }, 1407 }; 1408 1409 static struct clk_branch gcc_usb20_master_clk = { 1410 .halt_reg = 0x12004, 1411 .clkr = { 1412 .enable_reg = 0x12004, 1413 .enable_mask = BIT(0), 1414 .hw.init = &(struct clk_init_data){ 1415 .name = "gcc_usb20_master_clk", 1416 .parent_hws = (const struct clk_hw*[]){ 1417 &usb20_master_clk_src.clkr.hw, 1418 }, 1419 .num_parents = 1, 1420 .flags = CLK_SET_RATE_PARENT, 1421 .ops = &clk_branch2_ops, 1422 }, 1423 }, 1424 }; 1425 1426 static struct clk_branch gcc_usb20_sleep_clk = { 1427 .halt_reg = 0x12008, 1428 .clkr = { 1429 .enable_reg = 0x12008, 1430 .enable_mask = BIT(0), 1431 .hw.init = &(struct clk_init_data){ 1432 .name = "gcc_usb20_sleep_clk", 1433 .parent_hws = (const struct clk_hw*[]){ 1434 &gcc_sleep_clk_src.clkr.hw, 1435 }, 1436 .num_parents = 1, 1437 .flags = CLK_SET_RATE_PARENT, 1438 .ops = &clk_branch2_ops, 1439 }, 1440 }, 1441 }; 1442 1443 static struct clk_branch gcc_usb20_mock_utmi_clk = { 1444 .halt_reg = 0x1200c, 1445 .clkr = { 1446 .enable_reg = 0x1200c, 1447 .enable_mask = BIT(0), 1448 .hw.init = &(struct clk_init_data){ 1449 .name = "gcc_usb20_mock_utmi_clk", 1450 .parent_hws = (const struct clk_hw*[]){ 1451 &usb20_mock_utmi_clk_src.clkr.hw, 1452 }, 1453 .num_parents = 1, 1454 .flags = CLK_SET_RATE_PARENT, 1455 .ops = &clk_branch2_ops, 1456 }, 1457 }, 1458 }; 1459 1460 static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk = { 1461 .halt_reg = 0x6a004, 1462 .clkr = { 1463 .enable_reg = 0x6a004, 1464 .enable_mask = BIT(0), 1465 .hw.init = &(struct clk_init_data){ 1466 .name = "gcc_usb_phy_cfg_ahb2phy_clk", 1467 .parent_hws = (const struct clk_hw*[]){ 1468 &periph_noc_clk_src.clkr.hw, 1469 }, 1470 .num_parents = 1, 1471 .flags = CLK_SET_RATE_PARENT, 1472 .ops = &clk_branch2_ops, 1473 }, 1474 }, 1475 }; 1476 1477 static struct clk_branch gcc_sdcc1_apps_clk = { 1478 .halt_reg = 0x13004, 1479 .clkr = { 1480 .enable_reg = 0x13004, 1481 .enable_mask = BIT(0), 1482 .hw.init = &(struct clk_init_data){ 1483 .name = "gcc_sdcc1_apps_clk", 1484 .parent_hws = (const struct clk_hw*[]){ 1485 &sdcc1_apps_clk_src.clkr.hw, 1486 }, 1487 .num_parents = 1, 1488 .flags = CLK_SET_RATE_PARENT, 1489 .ops = &clk_branch2_ops, 1490 }, 1491 }, 1492 }; 1493 1494 static struct clk_branch gcc_sdcc1_ahb_clk = { 1495 .halt_reg = 0x13008, 1496 .clkr = { 1497 .enable_reg = 0x13008, 1498 .enable_mask = BIT(0), 1499 .hw.init = &(struct clk_init_data){ 1500 .name = "gcc_sdcc1_ahb_clk", 1501 .parent_hws = (const struct clk_hw*[]){ 1502 &periph_noc_clk_src.clkr.hw, 1503 }, 1504 .num_parents = 1, 1505 .flags = CLK_SET_RATE_PARENT, 1506 .ops = &clk_branch2_ops, 1507 }, 1508 }, 1509 }; 1510 1511 static struct clk_branch gcc_sdcc1_ice_core_clk = { 1512 .halt_reg = 0x13038, 1513 .clkr = { 1514 .enable_reg = 0x13038, 1515 .enable_mask = BIT(0), 1516 .hw.init = &(struct clk_init_data){ 1517 .name = "gcc_sdcc1_ice_core_clk", 1518 .parent_hws = (const struct clk_hw*[]){ 1519 &sdcc1_ice_core_clk_src.clkr.hw, 1520 }, 1521 .num_parents = 1, 1522 .flags = CLK_SET_RATE_PARENT, 1523 .ops = &clk_branch2_ops, 1524 }, 1525 }, 1526 }; 1527 1528 static struct clk_branch gcc_sdcc2_apps_clk = { 1529 .halt_reg = 0x14004, 1530 .clkr = { 1531 .enable_reg = 0x14004, 1532 .enable_mask = BIT(0), 1533 .hw.init = &(struct clk_init_data){ 1534 .name = "gcc_sdcc2_apps_clk", 1535 .parent_hws = (const struct clk_hw*[]){ 1536 &sdcc2_apps_clk_src.clkr.hw, 1537 }, 1538 .num_parents = 1, 1539 .flags = CLK_SET_RATE_PARENT, 1540 .ops = &clk_branch2_ops, 1541 }, 1542 }, 1543 }; 1544 1545 static struct clk_branch gcc_sdcc2_ahb_clk = { 1546 .halt_reg = 0x14008, 1547 .clkr = { 1548 .enable_reg = 0x14008, 1549 .enable_mask = BIT(0), 1550 .hw.init = &(struct clk_init_data){ 1551 .name = "gcc_sdcc2_ahb_clk", 1552 .parent_hws = (const struct clk_hw*[]){ 1553 &periph_noc_clk_src.clkr.hw, 1554 }, 1555 .num_parents = 1, 1556 .flags = CLK_SET_RATE_PARENT, 1557 .ops = &clk_branch2_ops, 1558 }, 1559 }, 1560 }; 1561 1562 static struct clk_branch gcc_sdcc3_apps_clk = { 1563 .halt_reg = 0x15004, 1564 .clkr = { 1565 .enable_reg = 0x15004, 1566 .enable_mask = BIT(0), 1567 .hw.init = &(struct clk_init_data){ 1568 .name = "gcc_sdcc3_apps_clk", 1569 .parent_hws = (const struct clk_hw*[]){ 1570 &sdcc3_apps_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_sdcc3_ahb_clk = { 1580 .halt_reg = 0x15008, 1581 .clkr = { 1582 .enable_reg = 0x15008, 1583 .enable_mask = BIT(0), 1584 .hw.init = &(struct clk_init_data){ 1585 .name = "gcc_sdcc3_ahb_clk", 1586 .parent_hws = (const struct clk_hw*[]){ 1587 &periph_noc_clk_src.clkr.hw, 1588 }, 1589 .num_parents = 1, 1590 .flags = CLK_SET_RATE_PARENT, 1591 .ops = &clk_branch2_ops, 1592 }, 1593 }, 1594 }; 1595 1596 static struct clk_branch gcc_sdcc4_apps_clk = { 1597 .halt_reg = 0x16004, 1598 .clkr = { 1599 .enable_reg = 0x16004, 1600 .enable_mask = BIT(0), 1601 .hw.init = &(struct clk_init_data){ 1602 .name = "gcc_sdcc4_apps_clk", 1603 .parent_hws = (const struct clk_hw*[]){ 1604 &sdcc4_apps_clk_src.clkr.hw, 1605 }, 1606 .num_parents = 1, 1607 .flags = CLK_SET_RATE_PARENT, 1608 .ops = &clk_branch2_ops, 1609 }, 1610 }, 1611 }; 1612 1613 static struct clk_branch gcc_sdcc4_ahb_clk = { 1614 .halt_reg = 0x16008, 1615 .clkr = { 1616 .enable_reg = 0x16008, 1617 .enable_mask = BIT(0), 1618 .hw.init = &(struct clk_init_data){ 1619 .name = "gcc_sdcc4_ahb_clk", 1620 .parent_hws = (const struct clk_hw*[]){ 1621 &periph_noc_clk_src.clkr.hw, 1622 }, 1623 .num_parents = 1, 1624 .flags = CLK_SET_RATE_PARENT, 1625 .ops = &clk_branch2_ops, 1626 }, 1627 }, 1628 }; 1629 1630 static struct clk_branch gcc_blsp1_ahb_clk = { 1631 .halt_reg = 0x17004, 1632 .halt_check = BRANCH_HALT_VOTED, 1633 .clkr = { 1634 .enable_reg = 0x52004, 1635 .enable_mask = BIT(17), 1636 .hw.init = &(struct clk_init_data){ 1637 .name = "gcc_blsp1_ahb_clk", 1638 .parent_hws = (const struct clk_hw*[]){ 1639 &periph_noc_clk_src.clkr.hw, 1640 }, 1641 .num_parents = 1, 1642 .flags = CLK_SET_RATE_PARENT, 1643 .ops = &clk_branch2_ops, 1644 }, 1645 }, 1646 }; 1647 1648 static struct clk_branch gcc_blsp1_sleep_clk = { 1649 .halt_reg = 0x17008, 1650 .halt_check = BRANCH_HALT_VOTED, 1651 .clkr = { 1652 .enable_reg = 0x52004, 1653 .enable_mask = BIT(16), 1654 .hw.init = &(struct clk_init_data){ 1655 .name = "gcc_blsp1_sleep_clk", 1656 .parent_hws = (const struct clk_hw*[]){ 1657 &gcc_sleep_clk_src.clkr.hw, 1658 }, 1659 .num_parents = 1, 1660 .flags = CLK_SET_RATE_PARENT, 1661 .ops = &clk_branch2_ops, 1662 }, 1663 }, 1664 }; 1665 1666 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = { 1667 .halt_reg = 0x19004, 1668 .clkr = { 1669 .enable_reg = 0x19004, 1670 .enable_mask = BIT(0), 1671 .hw.init = &(struct clk_init_data){ 1672 .name = "gcc_blsp1_qup1_spi_apps_clk", 1673 .parent_hws = (const struct clk_hw*[]){ 1674 &blsp1_qup1_spi_apps_clk_src.clkr.hw, 1675 }, 1676 .num_parents = 1, 1677 .flags = CLK_SET_RATE_PARENT, 1678 .ops = &clk_branch2_ops, 1679 }, 1680 }, 1681 }; 1682 1683 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = { 1684 .halt_reg = 0x19008, 1685 .clkr = { 1686 .enable_reg = 0x19008, 1687 .enable_mask = BIT(0), 1688 .hw.init = &(struct clk_init_data){ 1689 .name = "gcc_blsp1_qup1_i2c_apps_clk", 1690 .parent_hws = (const struct clk_hw*[]){ 1691 &blsp1_qup1_i2c_apps_clk_src.clkr.hw, 1692 }, 1693 .num_parents = 1, 1694 .flags = CLK_SET_RATE_PARENT, 1695 .ops = &clk_branch2_ops, 1696 }, 1697 }, 1698 }; 1699 1700 static struct clk_branch gcc_blsp1_uart1_apps_clk = { 1701 .halt_reg = 0x1a004, 1702 .clkr = { 1703 .enable_reg = 0x1a004, 1704 .enable_mask = BIT(0), 1705 .hw.init = &(struct clk_init_data){ 1706 .name = "gcc_blsp1_uart1_apps_clk", 1707 .parent_hws = (const struct clk_hw*[]){ 1708 &blsp1_uart1_apps_clk_src.clkr.hw, 1709 }, 1710 .num_parents = 1, 1711 .flags = CLK_SET_RATE_PARENT, 1712 .ops = &clk_branch2_ops, 1713 }, 1714 }, 1715 }; 1716 1717 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = { 1718 .halt_reg = 0x1b004, 1719 .clkr = { 1720 .enable_reg = 0x1b004, 1721 .enable_mask = BIT(0), 1722 .hw.init = &(struct clk_init_data){ 1723 .name = "gcc_blsp1_qup2_spi_apps_clk", 1724 .parent_hws = (const struct clk_hw*[]){ 1725 &blsp1_qup2_spi_apps_clk_src.clkr.hw, 1726 }, 1727 .num_parents = 1, 1728 .flags = CLK_SET_RATE_PARENT, 1729 .ops = &clk_branch2_ops, 1730 }, 1731 }, 1732 }; 1733 1734 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = { 1735 .halt_reg = 0x1b008, 1736 .clkr = { 1737 .enable_reg = 0x1b008, 1738 .enable_mask = BIT(0), 1739 .hw.init = &(struct clk_init_data){ 1740 .name = "gcc_blsp1_qup2_i2c_apps_clk", 1741 .parent_hws = (const struct clk_hw*[]){ 1742 &blsp1_qup2_i2c_apps_clk_src.clkr.hw, 1743 }, 1744 .num_parents = 1, 1745 .flags = CLK_SET_RATE_PARENT, 1746 .ops = &clk_branch2_ops, 1747 }, 1748 }, 1749 }; 1750 1751 static struct clk_branch gcc_blsp1_uart2_apps_clk = { 1752 .halt_reg = 0x1c004, 1753 .clkr = { 1754 .enable_reg = 0x1c004, 1755 .enable_mask = BIT(0), 1756 .hw.init = &(struct clk_init_data){ 1757 .name = "gcc_blsp1_uart2_apps_clk", 1758 .parent_hws = (const struct clk_hw*[]){ 1759 &blsp1_uart2_apps_clk_src.clkr.hw, 1760 }, 1761 .num_parents = 1, 1762 .flags = CLK_SET_RATE_PARENT, 1763 .ops = &clk_branch2_ops, 1764 }, 1765 }, 1766 }; 1767 1768 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = { 1769 .halt_reg = 0x1d004, 1770 .clkr = { 1771 .enable_reg = 0x1d004, 1772 .enable_mask = BIT(0), 1773 .hw.init = &(struct clk_init_data){ 1774 .name = "gcc_blsp1_qup3_spi_apps_clk", 1775 .parent_hws = (const struct clk_hw*[]){ 1776 &blsp1_qup3_spi_apps_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_blsp1_qup3_i2c_apps_clk = { 1786 .halt_reg = 0x1d008, 1787 .clkr = { 1788 .enable_reg = 0x1d008, 1789 .enable_mask = BIT(0), 1790 .hw.init = &(struct clk_init_data){ 1791 .name = "gcc_blsp1_qup3_i2c_apps_clk", 1792 .parent_hws = (const struct clk_hw*[]){ 1793 &blsp1_qup3_i2c_apps_clk_src.clkr.hw, 1794 }, 1795 .num_parents = 1, 1796 .flags = CLK_SET_RATE_PARENT, 1797 .ops = &clk_branch2_ops, 1798 }, 1799 }, 1800 }; 1801 1802 static struct clk_branch gcc_blsp1_uart3_apps_clk = { 1803 .halt_reg = 0x1e004, 1804 .clkr = { 1805 .enable_reg = 0x1e004, 1806 .enable_mask = BIT(0), 1807 .hw.init = &(struct clk_init_data){ 1808 .name = "gcc_blsp1_uart3_apps_clk", 1809 .parent_hws = (const struct clk_hw*[]){ 1810 &blsp1_uart3_apps_clk_src.clkr.hw, 1811 }, 1812 .num_parents = 1, 1813 .flags = CLK_SET_RATE_PARENT, 1814 .ops = &clk_branch2_ops, 1815 }, 1816 }, 1817 }; 1818 1819 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = { 1820 .halt_reg = 0x1f004, 1821 .clkr = { 1822 .enable_reg = 0x1f004, 1823 .enable_mask = BIT(0), 1824 .hw.init = &(struct clk_init_data){ 1825 .name = "gcc_blsp1_qup4_spi_apps_clk", 1826 .parent_hws = (const struct clk_hw*[]){ 1827 &blsp1_qup4_spi_apps_clk_src.clkr.hw, 1828 }, 1829 .num_parents = 1, 1830 .flags = CLK_SET_RATE_PARENT, 1831 .ops = &clk_branch2_ops, 1832 }, 1833 }, 1834 }; 1835 1836 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = { 1837 .halt_reg = 0x1f008, 1838 .clkr = { 1839 .enable_reg = 0x1f008, 1840 .enable_mask = BIT(0), 1841 .hw.init = &(struct clk_init_data){ 1842 .name = "gcc_blsp1_qup4_i2c_apps_clk", 1843 .parent_hws = (const struct clk_hw*[]){ 1844 &blsp1_qup4_i2c_apps_clk_src.clkr.hw, 1845 }, 1846 .num_parents = 1, 1847 .flags = CLK_SET_RATE_PARENT, 1848 .ops = &clk_branch2_ops, 1849 }, 1850 }, 1851 }; 1852 1853 static struct clk_branch gcc_blsp1_uart4_apps_clk = { 1854 .halt_reg = 0x20004, 1855 .clkr = { 1856 .enable_reg = 0x20004, 1857 .enable_mask = BIT(0), 1858 .hw.init = &(struct clk_init_data){ 1859 .name = "gcc_blsp1_uart4_apps_clk", 1860 .parent_hws = (const struct clk_hw*[]){ 1861 &blsp1_uart4_apps_clk_src.clkr.hw, 1862 }, 1863 .num_parents = 1, 1864 .flags = CLK_SET_RATE_PARENT, 1865 .ops = &clk_branch2_ops, 1866 }, 1867 }, 1868 }; 1869 1870 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = { 1871 .halt_reg = 0x21004, 1872 .clkr = { 1873 .enable_reg = 0x21004, 1874 .enable_mask = BIT(0), 1875 .hw.init = &(struct clk_init_data){ 1876 .name = "gcc_blsp1_qup5_spi_apps_clk", 1877 .parent_hws = (const struct clk_hw*[]){ 1878 &blsp1_qup5_spi_apps_clk_src.clkr.hw, 1879 }, 1880 .num_parents = 1, 1881 .flags = CLK_SET_RATE_PARENT, 1882 .ops = &clk_branch2_ops, 1883 }, 1884 }, 1885 }; 1886 1887 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = { 1888 .halt_reg = 0x21008, 1889 .clkr = { 1890 .enable_reg = 0x21008, 1891 .enable_mask = BIT(0), 1892 .hw.init = &(struct clk_init_data){ 1893 .name = "gcc_blsp1_qup5_i2c_apps_clk", 1894 .parent_hws = (const struct clk_hw*[]){ 1895 &blsp1_qup5_i2c_apps_clk_src.clkr.hw, 1896 }, 1897 .num_parents = 1, 1898 .flags = CLK_SET_RATE_PARENT, 1899 .ops = &clk_branch2_ops, 1900 }, 1901 }, 1902 }; 1903 1904 static struct clk_branch gcc_blsp1_uart5_apps_clk = { 1905 .halt_reg = 0x22004, 1906 .clkr = { 1907 .enable_reg = 0x22004, 1908 .enable_mask = BIT(0), 1909 .hw.init = &(struct clk_init_data){ 1910 .name = "gcc_blsp1_uart5_apps_clk", 1911 .parent_hws = (const struct clk_hw*[]){ 1912 &blsp1_uart5_apps_clk_src.clkr.hw, 1913 }, 1914 .num_parents = 1, 1915 .flags = CLK_SET_RATE_PARENT, 1916 .ops = &clk_branch2_ops, 1917 }, 1918 }, 1919 }; 1920 1921 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = { 1922 .halt_reg = 0x23004, 1923 .clkr = { 1924 .enable_reg = 0x23004, 1925 .enable_mask = BIT(0), 1926 .hw.init = &(struct clk_init_data){ 1927 .name = "gcc_blsp1_qup6_spi_apps_clk", 1928 .parent_hws = (const struct clk_hw*[]){ 1929 &blsp1_qup6_spi_apps_clk_src.clkr.hw, 1930 }, 1931 .num_parents = 1, 1932 .flags = CLK_SET_RATE_PARENT, 1933 .ops = &clk_branch2_ops, 1934 }, 1935 }, 1936 }; 1937 1938 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = { 1939 .halt_reg = 0x23008, 1940 .clkr = { 1941 .enable_reg = 0x23008, 1942 .enable_mask = BIT(0), 1943 .hw.init = &(struct clk_init_data){ 1944 .name = "gcc_blsp1_qup6_i2c_apps_clk", 1945 .parent_hws = (const struct clk_hw*[]){ 1946 &blsp1_qup6_i2c_apps_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_blsp1_uart6_apps_clk = { 1956 .halt_reg = 0x24004, 1957 .clkr = { 1958 .enable_reg = 0x24004, 1959 .enable_mask = BIT(0), 1960 .hw.init = &(struct clk_init_data){ 1961 .name = "gcc_blsp1_uart6_apps_clk", 1962 .parent_hws = (const struct clk_hw*[]){ 1963 &blsp1_uart6_apps_clk_src.clkr.hw, 1964 }, 1965 .num_parents = 1, 1966 .flags = CLK_SET_RATE_PARENT, 1967 .ops = &clk_branch2_ops, 1968 }, 1969 }, 1970 }; 1971 1972 static struct clk_branch gcc_blsp2_ahb_clk = { 1973 .halt_reg = 0x25004, 1974 .halt_check = BRANCH_HALT_VOTED, 1975 .clkr = { 1976 .enable_reg = 0x52004, 1977 .enable_mask = BIT(15), 1978 .hw.init = &(struct clk_init_data){ 1979 .name = "gcc_blsp2_ahb_clk", 1980 .parent_hws = (const struct clk_hw*[]){ 1981 &periph_noc_clk_src.clkr.hw, 1982 }, 1983 .num_parents = 1, 1984 .flags = CLK_SET_RATE_PARENT, 1985 .ops = &clk_branch2_ops, 1986 }, 1987 }, 1988 }; 1989 1990 static struct clk_branch gcc_blsp2_sleep_clk = { 1991 .halt_reg = 0x25008, 1992 .halt_check = BRANCH_HALT_VOTED, 1993 .clkr = { 1994 .enable_reg = 0x52004, 1995 .enable_mask = BIT(14), 1996 .hw.init = &(struct clk_init_data){ 1997 .name = "gcc_blsp2_sleep_clk", 1998 .parent_hws = (const struct clk_hw*[]){ 1999 &gcc_sleep_clk_src.clkr.hw, 2000 }, 2001 .num_parents = 1, 2002 .flags = CLK_SET_RATE_PARENT, 2003 .ops = &clk_branch2_ops, 2004 }, 2005 }, 2006 }; 2007 2008 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk = { 2009 .halt_reg = 0x26004, 2010 .clkr = { 2011 .enable_reg = 0x26004, 2012 .enable_mask = BIT(0), 2013 .hw.init = &(struct clk_init_data){ 2014 .name = "gcc_blsp2_qup1_spi_apps_clk", 2015 .parent_hws = (const struct clk_hw*[]){ 2016 &blsp2_qup1_spi_apps_clk_src.clkr.hw, 2017 }, 2018 .num_parents = 1, 2019 .flags = CLK_SET_RATE_PARENT, 2020 .ops = &clk_branch2_ops, 2021 }, 2022 }, 2023 }; 2024 2025 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk = { 2026 .halt_reg = 0x26008, 2027 .clkr = { 2028 .enable_reg = 0x26008, 2029 .enable_mask = BIT(0), 2030 .hw.init = &(struct clk_init_data){ 2031 .name = "gcc_blsp2_qup1_i2c_apps_clk", 2032 .parent_hws = (const struct clk_hw*[]){ 2033 &blsp2_qup1_i2c_apps_clk_src.clkr.hw, 2034 }, 2035 .num_parents = 1, 2036 .flags = CLK_SET_RATE_PARENT, 2037 .ops = &clk_branch2_ops, 2038 }, 2039 }, 2040 }; 2041 2042 static struct clk_branch gcc_blsp2_uart1_apps_clk = { 2043 .halt_reg = 0x27004, 2044 .clkr = { 2045 .enable_reg = 0x27004, 2046 .enable_mask = BIT(0), 2047 .hw.init = &(struct clk_init_data){ 2048 .name = "gcc_blsp2_uart1_apps_clk", 2049 .parent_hws = (const struct clk_hw*[]){ 2050 &blsp2_uart1_apps_clk_src.clkr.hw, 2051 }, 2052 .num_parents = 1, 2053 .flags = CLK_SET_RATE_PARENT, 2054 .ops = &clk_branch2_ops, 2055 }, 2056 }, 2057 }; 2058 2059 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk = { 2060 .halt_reg = 0x28004, 2061 .clkr = { 2062 .enable_reg = 0x28004, 2063 .enable_mask = BIT(0), 2064 .hw.init = &(struct clk_init_data){ 2065 .name = "gcc_blsp2_qup2_spi_apps_clk", 2066 .parent_hws = (const struct clk_hw*[]){ 2067 &blsp2_qup2_spi_apps_clk_src.clkr.hw, 2068 }, 2069 .num_parents = 1, 2070 .flags = CLK_SET_RATE_PARENT, 2071 .ops = &clk_branch2_ops, 2072 }, 2073 }, 2074 }; 2075 2076 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk = { 2077 .halt_reg = 0x28008, 2078 .clkr = { 2079 .enable_reg = 0x28008, 2080 .enable_mask = BIT(0), 2081 .hw.init = &(struct clk_init_data){ 2082 .name = "gcc_blsp2_qup2_i2c_apps_clk", 2083 .parent_hws = (const struct clk_hw*[]){ 2084 &blsp2_qup2_i2c_apps_clk_src.clkr.hw, 2085 }, 2086 .num_parents = 1, 2087 .flags = CLK_SET_RATE_PARENT, 2088 .ops = &clk_branch2_ops, 2089 }, 2090 }, 2091 }; 2092 2093 static struct clk_branch gcc_blsp2_uart2_apps_clk = { 2094 .halt_reg = 0x29004, 2095 .clkr = { 2096 .enable_reg = 0x29004, 2097 .enable_mask = BIT(0), 2098 .hw.init = &(struct clk_init_data){ 2099 .name = "gcc_blsp2_uart2_apps_clk", 2100 .parent_hws = (const struct clk_hw*[]){ 2101 &blsp2_uart2_apps_clk_src.clkr.hw, 2102 }, 2103 .num_parents = 1, 2104 .flags = CLK_SET_RATE_PARENT, 2105 .ops = &clk_branch2_ops, 2106 }, 2107 }, 2108 }; 2109 2110 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk = { 2111 .halt_reg = 0x2a004, 2112 .clkr = { 2113 .enable_reg = 0x2a004, 2114 .enable_mask = BIT(0), 2115 .hw.init = &(struct clk_init_data){ 2116 .name = "gcc_blsp2_qup3_spi_apps_clk", 2117 .parent_hws = (const struct clk_hw*[]){ 2118 &blsp2_qup3_spi_apps_clk_src.clkr.hw, 2119 }, 2120 .num_parents = 1, 2121 .flags = CLK_SET_RATE_PARENT, 2122 .ops = &clk_branch2_ops, 2123 }, 2124 }, 2125 }; 2126 2127 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk = { 2128 .halt_reg = 0x2a008, 2129 .clkr = { 2130 .enable_reg = 0x2a008, 2131 .enable_mask = BIT(0), 2132 .hw.init = &(struct clk_init_data){ 2133 .name = "gcc_blsp2_qup3_i2c_apps_clk", 2134 .parent_hws = (const struct clk_hw*[]){ 2135 &blsp2_qup3_i2c_apps_clk_src.clkr.hw, 2136 }, 2137 .num_parents = 1, 2138 .flags = CLK_SET_RATE_PARENT, 2139 .ops = &clk_branch2_ops, 2140 }, 2141 }, 2142 }; 2143 2144 static struct clk_branch gcc_blsp2_uart3_apps_clk = { 2145 .halt_reg = 0x2b004, 2146 .clkr = { 2147 .enable_reg = 0x2b004, 2148 .enable_mask = BIT(0), 2149 .hw.init = &(struct clk_init_data){ 2150 .name = "gcc_blsp2_uart3_apps_clk", 2151 .parent_hws = (const struct clk_hw*[]){ 2152 &blsp2_uart3_apps_clk_src.clkr.hw, 2153 }, 2154 .num_parents = 1, 2155 .flags = CLK_SET_RATE_PARENT, 2156 .ops = &clk_branch2_ops, 2157 }, 2158 }, 2159 }; 2160 2161 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk = { 2162 .halt_reg = 0x2c004, 2163 .clkr = { 2164 .enable_reg = 0x2c004, 2165 .enable_mask = BIT(0), 2166 .hw.init = &(struct clk_init_data){ 2167 .name = "gcc_blsp2_qup4_spi_apps_clk", 2168 .parent_hws = (const struct clk_hw*[]){ 2169 &blsp2_qup4_spi_apps_clk_src.clkr.hw, 2170 }, 2171 .num_parents = 1, 2172 .flags = CLK_SET_RATE_PARENT, 2173 .ops = &clk_branch2_ops, 2174 }, 2175 }, 2176 }; 2177 2178 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk = { 2179 .halt_reg = 0x2c008, 2180 .clkr = { 2181 .enable_reg = 0x2c008, 2182 .enable_mask = BIT(0), 2183 .hw.init = &(struct clk_init_data){ 2184 .name = "gcc_blsp2_qup4_i2c_apps_clk", 2185 .parent_hws = (const struct clk_hw*[]){ 2186 &blsp2_qup4_i2c_apps_clk_src.clkr.hw, 2187 }, 2188 .num_parents = 1, 2189 .flags = CLK_SET_RATE_PARENT, 2190 .ops = &clk_branch2_ops, 2191 }, 2192 }, 2193 }; 2194 2195 static struct clk_branch gcc_blsp2_uart4_apps_clk = { 2196 .halt_reg = 0x2d004, 2197 .clkr = { 2198 .enable_reg = 0x2d004, 2199 .enable_mask = BIT(0), 2200 .hw.init = &(struct clk_init_data){ 2201 .name = "gcc_blsp2_uart4_apps_clk", 2202 .parent_hws = (const struct clk_hw*[]){ 2203 &blsp2_uart4_apps_clk_src.clkr.hw, 2204 }, 2205 .num_parents = 1, 2206 .flags = CLK_SET_RATE_PARENT, 2207 .ops = &clk_branch2_ops, 2208 }, 2209 }, 2210 }; 2211 2212 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk = { 2213 .halt_reg = 0x2e004, 2214 .clkr = { 2215 .enable_reg = 0x2e004, 2216 .enable_mask = BIT(0), 2217 .hw.init = &(struct clk_init_data){ 2218 .name = "gcc_blsp2_qup5_spi_apps_clk", 2219 .parent_hws = (const struct clk_hw*[]){ 2220 &blsp2_qup5_spi_apps_clk_src.clkr.hw, 2221 }, 2222 .num_parents = 1, 2223 .flags = CLK_SET_RATE_PARENT, 2224 .ops = &clk_branch2_ops, 2225 }, 2226 }, 2227 }; 2228 2229 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk = { 2230 .halt_reg = 0x2e008, 2231 .clkr = { 2232 .enable_reg = 0x2e008, 2233 .enable_mask = BIT(0), 2234 .hw.init = &(struct clk_init_data){ 2235 .name = "gcc_blsp2_qup5_i2c_apps_clk", 2236 .parent_hws = (const struct clk_hw*[]){ 2237 &blsp2_qup5_i2c_apps_clk_src.clkr.hw, 2238 }, 2239 .num_parents = 1, 2240 .flags = CLK_SET_RATE_PARENT, 2241 .ops = &clk_branch2_ops, 2242 }, 2243 }, 2244 }; 2245 2246 static struct clk_branch gcc_blsp2_uart5_apps_clk = { 2247 .halt_reg = 0x2f004, 2248 .clkr = { 2249 .enable_reg = 0x2f004, 2250 .enable_mask = BIT(0), 2251 .hw.init = &(struct clk_init_data){ 2252 .name = "gcc_blsp2_uart5_apps_clk", 2253 .parent_hws = (const struct clk_hw*[]){ 2254 &blsp2_uart5_apps_clk_src.clkr.hw, 2255 }, 2256 .num_parents = 1, 2257 .flags = CLK_SET_RATE_PARENT, 2258 .ops = &clk_branch2_ops, 2259 }, 2260 }, 2261 }; 2262 2263 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk = { 2264 .halt_reg = 0x30004, 2265 .clkr = { 2266 .enable_reg = 0x30004, 2267 .enable_mask = BIT(0), 2268 .hw.init = &(struct clk_init_data){ 2269 .name = "gcc_blsp2_qup6_spi_apps_clk", 2270 .parent_hws = (const struct clk_hw*[]){ 2271 &blsp2_qup6_spi_apps_clk_src.clkr.hw, 2272 }, 2273 .num_parents = 1, 2274 .flags = CLK_SET_RATE_PARENT, 2275 .ops = &clk_branch2_ops, 2276 }, 2277 }, 2278 }; 2279 2280 static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk = { 2281 .halt_reg = 0x30008, 2282 .clkr = { 2283 .enable_reg = 0x30008, 2284 .enable_mask = BIT(0), 2285 .hw.init = &(struct clk_init_data){ 2286 .name = "gcc_blsp2_qup6_i2c_apps_clk", 2287 .parent_hws = (const struct clk_hw*[]){ 2288 &blsp2_qup6_i2c_apps_clk_src.clkr.hw, 2289 }, 2290 .num_parents = 1, 2291 .flags = CLK_SET_RATE_PARENT, 2292 .ops = &clk_branch2_ops, 2293 }, 2294 }, 2295 }; 2296 2297 static struct clk_branch gcc_blsp2_uart6_apps_clk = { 2298 .halt_reg = 0x31004, 2299 .clkr = { 2300 .enable_reg = 0x31004, 2301 .enable_mask = BIT(0), 2302 .hw.init = &(struct clk_init_data){ 2303 .name = "gcc_blsp2_uart6_apps_clk", 2304 .parent_hws = (const struct clk_hw*[]){ 2305 &blsp2_uart6_apps_clk_src.clkr.hw, 2306 }, 2307 .num_parents = 1, 2308 .flags = CLK_SET_RATE_PARENT, 2309 .ops = &clk_branch2_ops, 2310 }, 2311 }, 2312 }; 2313 2314 static struct clk_branch gcc_pdm_ahb_clk = { 2315 .halt_reg = 0x33004, 2316 .clkr = { 2317 .enable_reg = 0x33004, 2318 .enable_mask = BIT(0), 2319 .hw.init = &(struct clk_init_data){ 2320 .name = "gcc_pdm_ahb_clk", 2321 .parent_hws = (const struct clk_hw*[]){ 2322 &periph_noc_clk_src.clkr.hw, 2323 }, 2324 .num_parents = 1, 2325 .flags = CLK_SET_RATE_PARENT, 2326 .ops = &clk_branch2_ops, 2327 }, 2328 }, 2329 }; 2330 2331 static struct clk_branch gcc_pdm2_clk = { 2332 .halt_reg = 0x3300c, 2333 .clkr = { 2334 .enable_reg = 0x3300c, 2335 .enable_mask = BIT(0), 2336 .hw.init = &(struct clk_init_data){ 2337 .name = "gcc_pdm2_clk", 2338 .parent_hws = (const struct clk_hw*[]){ 2339 &pdm2_clk_src.clkr.hw, 2340 }, 2341 .num_parents = 1, 2342 .flags = CLK_SET_RATE_PARENT, 2343 .ops = &clk_branch2_ops, 2344 }, 2345 }, 2346 }; 2347 2348 static struct clk_branch gcc_prng_ahb_clk = { 2349 .halt_reg = 0x34004, 2350 .halt_check = BRANCH_HALT_VOTED, 2351 .clkr = { 2352 .enable_reg = 0x52004, 2353 .enable_mask = BIT(13), 2354 .hw.init = &(struct clk_init_data){ 2355 .name = "gcc_prng_ahb_clk", 2356 .parent_hws = (const struct clk_hw*[]){ 2357 &config_noc_clk_src.clkr.hw, 2358 }, 2359 .num_parents = 1, 2360 .flags = CLK_SET_RATE_PARENT, 2361 .ops = &clk_branch2_ops, 2362 }, 2363 }, 2364 }; 2365 2366 static struct clk_branch gcc_tsif_ahb_clk = { 2367 .halt_reg = 0x36004, 2368 .clkr = { 2369 .enable_reg = 0x36004, 2370 .enable_mask = BIT(0), 2371 .hw.init = &(struct clk_init_data){ 2372 .name = "gcc_tsif_ahb_clk", 2373 .parent_hws = (const struct clk_hw*[]){ 2374 &periph_noc_clk_src.clkr.hw, 2375 }, 2376 .num_parents = 1, 2377 .flags = CLK_SET_RATE_PARENT, 2378 .ops = &clk_branch2_ops, 2379 }, 2380 }, 2381 }; 2382 2383 static struct clk_branch gcc_tsif_ref_clk = { 2384 .halt_reg = 0x36008, 2385 .clkr = { 2386 .enable_reg = 0x36008, 2387 .enable_mask = BIT(0), 2388 .hw.init = &(struct clk_init_data){ 2389 .name = "gcc_tsif_ref_clk", 2390 .parent_hws = (const struct clk_hw*[]){ 2391 &tsif_ref_clk_src.clkr.hw, 2392 }, 2393 .num_parents = 1, 2394 .flags = CLK_SET_RATE_PARENT, 2395 .ops = &clk_branch2_ops, 2396 }, 2397 }, 2398 }; 2399 2400 static struct clk_branch gcc_tsif_inactivity_timers_clk = { 2401 .halt_reg = 0x3600c, 2402 .clkr = { 2403 .enable_reg = 0x3600c, 2404 .enable_mask = BIT(0), 2405 .hw.init = &(struct clk_init_data){ 2406 .name = "gcc_tsif_inactivity_timers_clk", 2407 .parent_hws = (const struct clk_hw*[]){ 2408 &gcc_sleep_clk_src.clkr.hw, 2409 }, 2410 .num_parents = 1, 2411 .flags = CLK_SET_RATE_PARENT, 2412 .ops = &clk_branch2_ops, 2413 }, 2414 }, 2415 }; 2416 2417 static struct clk_branch gcc_boot_rom_ahb_clk = { 2418 .halt_reg = 0x38004, 2419 .halt_check = BRANCH_HALT_VOTED, 2420 .clkr = { 2421 .enable_reg = 0x52004, 2422 .enable_mask = BIT(10), 2423 .hw.init = &(struct clk_init_data){ 2424 .name = "gcc_boot_rom_ahb_clk", 2425 .parent_hws = (const struct clk_hw*[]){ 2426 &config_noc_clk_src.clkr.hw, 2427 }, 2428 .num_parents = 1, 2429 .flags = CLK_SET_RATE_PARENT, 2430 .ops = &clk_branch2_ops, 2431 }, 2432 }, 2433 }; 2434 2435 static struct clk_branch gcc_bimc_gfx_clk = { 2436 .halt_reg = 0x46018, 2437 .clkr = { 2438 .enable_reg = 0x46018, 2439 .enable_mask = BIT(0), 2440 .hw.init = &(struct clk_init_data){ 2441 .name = "gcc_bimc_gfx_clk", 2442 .flags = CLK_SET_RATE_PARENT, 2443 .ops = &clk_branch2_ops, 2444 }, 2445 }, 2446 }; 2447 2448 static struct clk_branch gcc_hmss_rbcpr_clk = { 2449 .halt_reg = 0x4800c, 2450 .clkr = { 2451 .enable_reg = 0x4800c, 2452 .enable_mask = BIT(0), 2453 .hw.init = &(struct clk_init_data){ 2454 .name = "gcc_hmss_rbcpr_clk", 2455 .parent_hws = (const struct clk_hw*[]){ 2456 &hmss_rbcpr_clk_src.clkr.hw, 2457 }, 2458 .num_parents = 1, 2459 .flags = CLK_SET_RATE_PARENT, 2460 .ops = &clk_branch2_ops, 2461 }, 2462 }, 2463 }; 2464 2465 static struct clk_branch gcc_gp1_clk = { 2466 .halt_reg = 0x64000, 2467 .clkr = { 2468 .enable_reg = 0x64000, 2469 .enable_mask = BIT(0), 2470 .hw.init = &(struct clk_init_data){ 2471 .name = "gcc_gp1_clk", 2472 .parent_hws = (const struct clk_hw*[]){ 2473 &gp1_clk_src.clkr.hw, 2474 }, 2475 .num_parents = 1, 2476 .flags = CLK_SET_RATE_PARENT, 2477 .ops = &clk_branch2_ops, 2478 }, 2479 }, 2480 }; 2481 2482 static struct clk_branch gcc_gp2_clk = { 2483 .halt_reg = 0x65000, 2484 .clkr = { 2485 .enable_reg = 0x65000, 2486 .enable_mask = BIT(0), 2487 .hw.init = &(struct clk_init_data){ 2488 .name = "gcc_gp2_clk", 2489 .parent_hws = (const struct clk_hw*[]){ 2490 &gp2_clk_src.clkr.hw, 2491 }, 2492 .num_parents = 1, 2493 .flags = CLK_SET_RATE_PARENT, 2494 .ops = &clk_branch2_ops, 2495 }, 2496 }, 2497 }; 2498 2499 static struct clk_branch gcc_gp3_clk = { 2500 .halt_reg = 0x66000, 2501 .clkr = { 2502 .enable_reg = 0x66000, 2503 .enable_mask = BIT(0), 2504 .hw.init = &(struct clk_init_data){ 2505 .name = "gcc_gp3_clk", 2506 .parent_hws = (const struct clk_hw*[]){ 2507 &gp3_clk_src.clkr.hw, 2508 }, 2509 .num_parents = 1, 2510 .flags = CLK_SET_RATE_PARENT, 2511 .ops = &clk_branch2_ops, 2512 }, 2513 }, 2514 }; 2515 2516 static struct clk_branch gcc_pcie_0_slv_axi_clk = { 2517 .halt_reg = 0x6b008, 2518 .clkr = { 2519 .enable_reg = 0x6b008, 2520 .enable_mask = BIT(0), 2521 .hw.init = &(struct clk_init_data){ 2522 .name = "gcc_pcie_0_slv_axi_clk", 2523 .parent_hws = (const struct clk_hw*[]){ 2524 &system_noc_clk_src.clkr.hw, 2525 }, 2526 .num_parents = 1, 2527 .flags = CLK_SET_RATE_PARENT, 2528 .ops = &clk_branch2_ops, 2529 }, 2530 }, 2531 }; 2532 2533 static struct clk_branch gcc_pcie_0_mstr_axi_clk = { 2534 .halt_reg = 0x6b00c, 2535 .clkr = { 2536 .enable_reg = 0x6b00c, 2537 .enable_mask = BIT(0), 2538 .hw.init = &(struct clk_init_data){ 2539 .name = "gcc_pcie_0_mstr_axi_clk", 2540 .parent_hws = (const struct clk_hw*[]){ 2541 &system_noc_clk_src.clkr.hw, 2542 }, 2543 .num_parents = 1, 2544 .flags = CLK_SET_RATE_PARENT, 2545 .ops = &clk_branch2_ops, 2546 }, 2547 }, 2548 }; 2549 2550 static struct clk_branch gcc_pcie_0_cfg_ahb_clk = { 2551 .halt_reg = 0x6b010, 2552 .clkr = { 2553 .enable_reg = 0x6b010, 2554 .enable_mask = BIT(0), 2555 .hw.init = &(struct clk_init_data){ 2556 .name = "gcc_pcie_0_cfg_ahb_clk", 2557 .parent_hws = (const struct clk_hw*[]){ 2558 &config_noc_clk_src.clkr.hw, 2559 }, 2560 .num_parents = 1, 2561 .flags = CLK_SET_RATE_PARENT, 2562 .ops = &clk_branch2_ops, 2563 }, 2564 }, 2565 }; 2566 2567 static struct clk_branch gcc_pcie_0_aux_clk = { 2568 .halt_reg = 0x6b014, 2569 .clkr = { 2570 .enable_reg = 0x6b014, 2571 .enable_mask = BIT(0), 2572 .hw.init = &(struct clk_init_data){ 2573 .name = "gcc_pcie_0_aux_clk", 2574 .parent_hws = (const struct clk_hw*[]){ 2575 &pcie_aux_clk_src.clkr.hw, 2576 }, 2577 .num_parents = 1, 2578 .flags = CLK_SET_RATE_PARENT, 2579 .ops = &clk_branch2_ops, 2580 }, 2581 }, 2582 }; 2583 2584 static struct clk_branch gcc_pcie_0_pipe_clk = { 2585 .halt_reg = 0x6b018, 2586 .halt_check = BRANCH_HALT_SKIP, 2587 .clkr = { 2588 .enable_reg = 0x6b018, 2589 .enable_mask = BIT(0), 2590 .hw.init = &(struct clk_init_data){ 2591 .name = "gcc_pcie_0_pipe_clk", 2592 .parent_data = &(const struct clk_parent_data){ 2593 .fw_name = "pcie_0_pipe_clk_src", .name = "pcie_0_pipe_clk_src", 2594 }, 2595 .num_parents = 1, 2596 .flags = CLK_SET_RATE_PARENT, 2597 .ops = &clk_branch2_ops, 2598 }, 2599 }, 2600 }; 2601 2602 static struct clk_branch gcc_pcie_1_slv_axi_clk = { 2603 .halt_reg = 0x6d008, 2604 .clkr = { 2605 .enable_reg = 0x6d008, 2606 .enable_mask = BIT(0), 2607 .hw.init = &(struct clk_init_data){ 2608 .name = "gcc_pcie_1_slv_axi_clk", 2609 .parent_hws = (const struct clk_hw*[]){ 2610 &system_noc_clk_src.clkr.hw, 2611 }, 2612 .num_parents = 1, 2613 .flags = CLK_SET_RATE_PARENT, 2614 .ops = &clk_branch2_ops, 2615 }, 2616 }, 2617 }; 2618 2619 static struct clk_branch gcc_pcie_1_mstr_axi_clk = { 2620 .halt_reg = 0x6d00c, 2621 .clkr = { 2622 .enable_reg = 0x6d00c, 2623 .enable_mask = BIT(0), 2624 .hw.init = &(struct clk_init_data){ 2625 .name = "gcc_pcie_1_mstr_axi_clk", 2626 .parent_hws = (const struct clk_hw*[]){ 2627 &system_noc_clk_src.clkr.hw, 2628 }, 2629 .num_parents = 1, 2630 .flags = CLK_SET_RATE_PARENT, 2631 .ops = &clk_branch2_ops, 2632 }, 2633 }, 2634 }; 2635 2636 static struct clk_branch gcc_pcie_1_cfg_ahb_clk = { 2637 .halt_reg = 0x6d010, 2638 .clkr = { 2639 .enable_reg = 0x6d010, 2640 .enable_mask = BIT(0), 2641 .hw.init = &(struct clk_init_data){ 2642 .name = "gcc_pcie_1_cfg_ahb_clk", 2643 .parent_hws = (const struct clk_hw*[]){ 2644 &config_noc_clk_src.clkr.hw, 2645 }, 2646 .num_parents = 1, 2647 .flags = CLK_SET_RATE_PARENT, 2648 .ops = &clk_branch2_ops, 2649 }, 2650 }, 2651 }; 2652 2653 static struct clk_branch gcc_pcie_1_aux_clk = { 2654 .halt_reg = 0x6d014, 2655 .clkr = { 2656 .enable_reg = 0x6d014, 2657 .enable_mask = BIT(0), 2658 .hw.init = &(struct clk_init_data){ 2659 .name = "gcc_pcie_1_aux_clk", 2660 .parent_hws = (const struct clk_hw*[]){ 2661 &pcie_aux_clk_src.clkr.hw, 2662 }, 2663 .num_parents = 1, 2664 .flags = CLK_SET_RATE_PARENT, 2665 .ops = &clk_branch2_ops, 2666 }, 2667 }, 2668 }; 2669 2670 static struct clk_branch gcc_pcie_1_pipe_clk = { 2671 .halt_reg = 0x6d018, 2672 .halt_check = BRANCH_HALT_SKIP, 2673 .clkr = { 2674 .enable_reg = 0x6d018, 2675 .enable_mask = BIT(0), 2676 .hw.init = &(struct clk_init_data){ 2677 .name = "gcc_pcie_1_pipe_clk", 2678 .parent_data = &(const struct clk_parent_data){ 2679 .fw_name = "pcie_1_pipe_clk_src", .name = "pcie_1_pipe_clk_src", 2680 }, 2681 .num_parents = 1, 2682 .flags = CLK_SET_RATE_PARENT, 2683 .ops = &clk_branch2_ops, 2684 }, 2685 }, 2686 }; 2687 2688 static struct clk_branch gcc_pcie_2_slv_axi_clk = { 2689 .halt_reg = 0x6e008, 2690 .clkr = { 2691 .enable_reg = 0x6e008, 2692 .enable_mask = BIT(0), 2693 .hw.init = &(struct clk_init_data){ 2694 .name = "gcc_pcie_2_slv_axi_clk", 2695 .parent_hws = (const struct clk_hw*[]){ 2696 &system_noc_clk_src.clkr.hw, 2697 }, 2698 .num_parents = 1, 2699 .flags = CLK_SET_RATE_PARENT, 2700 .ops = &clk_branch2_ops, 2701 }, 2702 }, 2703 }; 2704 2705 static struct clk_branch gcc_pcie_2_mstr_axi_clk = { 2706 .halt_reg = 0x6e00c, 2707 .clkr = { 2708 .enable_reg = 0x6e00c, 2709 .enable_mask = BIT(0), 2710 .hw.init = &(struct clk_init_data){ 2711 .name = "gcc_pcie_2_mstr_axi_clk", 2712 .parent_hws = (const struct clk_hw*[]){ 2713 &system_noc_clk_src.clkr.hw, 2714 }, 2715 .num_parents = 1, 2716 .flags = CLK_SET_RATE_PARENT, 2717 .ops = &clk_branch2_ops, 2718 }, 2719 }, 2720 }; 2721 2722 static struct clk_branch gcc_pcie_2_cfg_ahb_clk = { 2723 .halt_reg = 0x6e010, 2724 .clkr = { 2725 .enable_reg = 0x6e010, 2726 .enable_mask = BIT(0), 2727 .hw.init = &(struct clk_init_data){ 2728 .name = "gcc_pcie_2_cfg_ahb_clk", 2729 .parent_hws = (const struct clk_hw*[]){ 2730 &config_noc_clk_src.clkr.hw, 2731 }, 2732 .num_parents = 1, 2733 .flags = CLK_SET_RATE_PARENT, 2734 .ops = &clk_branch2_ops, 2735 }, 2736 }, 2737 }; 2738 2739 static struct clk_branch gcc_pcie_2_aux_clk = { 2740 .halt_reg = 0x6e014, 2741 .clkr = { 2742 .enable_reg = 0x6e014, 2743 .enable_mask = BIT(0), 2744 .hw.init = &(struct clk_init_data){ 2745 .name = "gcc_pcie_2_aux_clk", 2746 .parent_hws = (const struct clk_hw*[]){ 2747 &pcie_aux_clk_src.clkr.hw, 2748 }, 2749 .num_parents = 1, 2750 .flags = CLK_SET_RATE_PARENT, 2751 .ops = &clk_branch2_ops, 2752 }, 2753 }, 2754 }; 2755 2756 static struct clk_branch gcc_pcie_2_pipe_clk = { 2757 .halt_reg = 0x6e018, 2758 .halt_check = BRANCH_HALT_SKIP, 2759 .clkr = { 2760 .enable_reg = 0x6e018, 2761 .enable_mask = BIT(0), 2762 .hw.init = &(struct clk_init_data){ 2763 .name = "gcc_pcie_2_pipe_clk", 2764 .parent_data = &(const struct clk_parent_data){ 2765 .fw_name = "pcie_2_pipe_clk_src", .name = "pcie_2_pipe_clk_src", 2766 }, 2767 .num_parents = 1, 2768 .flags = CLK_SET_RATE_PARENT, 2769 .ops = &clk_branch2_ops, 2770 }, 2771 }, 2772 }; 2773 2774 static struct clk_branch gcc_pcie_phy_cfg_ahb_clk = { 2775 .halt_reg = 0x6f004, 2776 .clkr = { 2777 .enable_reg = 0x6f004, 2778 .enable_mask = BIT(0), 2779 .hw.init = &(struct clk_init_data){ 2780 .name = "gcc_pcie_phy_cfg_ahb_clk", 2781 .parent_hws = (const struct clk_hw*[]){ 2782 &config_noc_clk_src.clkr.hw, 2783 }, 2784 .num_parents = 1, 2785 .flags = CLK_SET_RATE_PARENT, 2786 .ops = &clk_branch2_ops, 2787 }, 2788 }, 2789 }; 2790 2791 static struct clk_branch gcc_pcie_phy_aux_clk = { 2792 .halt_reg = 0x6f008, 2793 .clkr = { 2794 .enable_reg = 0x6f008, 2795 .enable_mask = BIT(0), 2796 .hw.init = &(struct clk_init_data){ 2797 .name = "gcc_pcie_phy_aux_clk", 2798 .parent_hws = (const struct clk_hw*[]){ 2799 &pcie_aux_clk_src.clkr.hw, 2800 }, 2801 .num_parents = 1, 2802 .flags = CLK_SET_RATE_PARENT, 2803 .ops = &clk_branch2_ops, 2804 }, 2805 }, 2806 }; 2807 2808 static struct clk_branch gcc_ufs_axi_clk = { 2809 .halt_reg = 0x75008, 2810 .clkr = { 2811 .enable_reg = 0x75008, 2812 .enable_mask = BIT(0), 2813 .hw.init = &(struct clk_init_data){ 2814 .name = "gcc_ufs_axi_clk", 2815 .parent_hws = (const struct clk_hw*[]){ 2816 &ufs_axi_clk_src.clkr.hw, 2817 }, 2818 .num_parents = 1, 2819 .flags = CLK_SET_RATE_PARENT, 2820 .ops = &clk_branch2_ops, 2821 }, 2822 }, 2823 }; 2824 2825 static struct clk_branch gcc_ufs_ahb_clk = { 2826 .halt_reg = 0x7500c, 2827 .clkr = { 2828 .enable_reg = 0x7500c, 2829 .enable_mask = BIT(0), 2830 .hw.init = &(struct clk_init_data){ 2831 .name = "gcc_ufs_ahb_clk", 2832 .parent_hws = (const struct clk_hw*[]){ 2833 &config_noc_clk_src.clkr.hw, 2834 }, 2835 .num_parents = 1, 2836 .flags = CLK_SET_RATE_PARENT, 2837 .ops = &clk_branch2_ops, 2838 }, 2839 }, 2840 }; 2841 2842 static struct clk_fixed_factor ufs_tx_cfg_clk_src = { 2843 .mult = 1, 2844 .div = 16, 2845 .hw.init = &(struct clk_init_data){ 2846 .name = "ufs_tx_cfg_clk_src", 2847 .parent_hws = (const struct clk_hw*[]){ 2848 &ufs_axi_clk_src.clkr.hw, 2849 }, 2850 .num_parents = 1, 2851 .flags = CLK_SET_RATE_PARENT, 2852 .ops = &clk_fixed_factor_ops, 2853 }, 2854 }; 2855 2856 static struct clk_branch gcc_ufs_tx_cfg_clk = { 2857 .halt_reg = 0x75010, 2858 .clkr = { 2859 .enable_reg = 0x75010, 2860 .enable_mask = BIT(0), 2861 .hw.init = &(struct clk_init_data){ 2862 .name = "gcc_ufs_tx_cfg_clk", 2863 .parent_hws = (const struct clk_hw*[]){ 2864 &ufs_tx_cfg_clk_src.hw, 2865 }, 2866 .num_parents = 1, 2867 .flags = CLK_SET_RATE_PARENT, 2868 .ops = &clk_branch2_ops, 2869 }, 2870 }, 2871 }; 2872 2873 static struct clk_fixed_factor ufs_rx_cfg_clk_src = { 2874 .mult = 1, 2875 .div = 16, 2876 .hw.init = &(struct clk_init_data){ 2877 .name = "ufs_rx_cfg_clk_src", 2878 .parent_hws = (const struct clk_hw*[]){ 2879 &ufs_axi_clk_src.clkr.hw, 2880 }, 2881 .num_parents = 1, 2882 .flags = CLK_SET_RATE_PARENT, 2883 .ops = &clk_fixed_factor_ops, 2884 }, 2885 }; 2886 2887 static struct clk_branch gcc_hlos1_vote_lpass_core_smmu_clk = { 2888 .halt_reg = 0x7d010, 2889 .halt_check = BRANCH_HALT_VOTED, 2890 .clkr = { 2891 .enable_reg = 0x7d010, 2892 .enable_mask = BIT(0), 2893 .hw.init = &(struct clk_init_data){ 2894 .name = "hlos1_vote_lpass_core_smmu_clk", 2895 .ops = &clk_branch2_ops, 2896 }, 2897 }, 2898 }; 2899 2900 static struct clk_branch gcc_hlos1_vote_lpass_adsp_smmu_clk = { 2901 .halt_reg = 0x7d014, 2902 .halt_check = BRANCH_HALT_VOTED, 2903 .clkr = { 2904 .enable_reg = 0x7d014, 2905 .enable_mask = BIT(0), 2906 .hw.init = &(struct clk_init_data){ 2907 .name = "hlos1_vote_lpass_adsp_smmu_clk", 2908 .ops = &clk_branch2_ops, 2909 }, 2910 }, 2911 }; 2912 2913 static struct clk_branch gcc_ufs_rx_cfg_clk = { 2914 .halt_reg = 0x75014, 2915 .clkr = { 2916 .enable_reg = 0x75014, 2917 .enable_mask = BIT(0), 2918 .hw.init = &(struct clk_init_data){ 2919 .name = "gcc_ufs_rx_cfg_clk", 2920 .parent_hws = (const struct clk_hw*[]){ 2921 &ufs_rx_cfg_clk_src.hw, 2922 }, 2923 .num_parents = 1, 2924 .flags = CLK_SET_RATE_PARENT, 2925 .ops = &clk_branch2_ops, 2926 }, 2927 }, 2928 }; 2929 2930 static struct clk_branch gcc_ufs_tx_symbol_0_clk = { 2931 .halt_reg = 0x75018, 2932 .halt_check = BRANCH_HALT_SKIP, 2933 .clkr = { 2934 .enable_reg = 0x75018, 2935 .enable_mask = BIT(0), 2936 .hw.init = &(struct clk_init_data){ 2937 .name = "gcc_ufs_tx_symbol_0_clk", 2938 .parent_data = &(const struct clk_parent_data){ 2939 .fw_name = "ufs_tx_symbol_0_clk_src", .name = "ufs_tx_symbol_0_clk_src", 2940 }, 2941 .num_parents = 1, 2942 .flags = CLK_SET_RATE_PARENT, 2943 .ops = &clk_branch2_ops, 2944 }, 2945 }, 2946 }; 2947 2948 static struct clk_branch gcc_ufs_rx_symbol_0_clk = { 2949 .halt_reg = 0x7501c, 2950 .halt_check = BRANCH_HALT_SKIP, 2951 .clkr = { 2952 .enable_reg = 0x7501c, 2953 .enable_mask = BIT(0), 2954 .hw.init = &(struct clk_init_data){ 2955 .name = "gcc_ufs_rx_symbol_0_clk", 2956 .parent_data = &(const struct clk_parent_data){ 2957 .fw_name = "ufs_rx_symbol_0_clk_src", .name = "ufs_rx_symbol_0_clk_src", 2958 }, 2959 .num_parents = 1, 2960 .flags = CLK_SET_RATE_PARENT, 2961 .ops = &clk_branch2_ops, 2962 }, 2963 }, 2964 }; 2965 2966 static struct clk_branch gcc_ufs_rx_symbol_1_clk = { 2967 .halt_reg = 0x75020, 2968 .halt_check = BRANCH_HALT_SKIP, 2969 .clkr = { 2970 .enable_reg = 0x75020, 2971 .enable_mask = BIT(0), 2972 .hw.init = &(struct clk_init_data){ 2973 .name = "gcc_ufs_rx_symbol_1_clk", 2974 .parent_data = &(const struct clk_parent_data){ 2975 .fw_name = "ufs_rx_symbol_1_clk_src", .name = "ufs_rx_symbol_1_clk_src", 2976 }, 2977 .num_parents = 1, 2978 .flags = CLK_SET_RATE_PARENT, 2979 .ops = &clk_branch2_ops, 2980 }, 2981 }, 2982 }; 2983 2984 static struct clk_fixed_factor ufs_ice_core_postdiv_clk_src = { 2985 .mult = 1, 2986 .div = 2, 2987 .hw.init = &(struct clk_init_data){ 2988 .name = "ufs_ice_core_postdiv_clk_src", 2989 .parent_hws = (const struct clk_hw*[]){ 2990 &ufs_ice_core_clk_src.clkr.hw, 2991 }, 2992 .num_parents = 1, 2993 .flags = CLK_SET_RATE_PARENT, 2994 .ops = &clk_fixed_factor_ops, 2995 }, 2996 }; 2997 2998 static struct clk_branch gcc_ufs_unipro_core_clk = { 2999 .halt_reg = 0x7600c, 3000 .clkr = { 3001 .enable_reg = 0x7600c, 3002 .enable_mask = BIT(0), 3003 .hw.init = &(struct clk_init_data){ 3004 .name = "gcc_ufs_unipro_core_clk", 3005 .parent_hws = (const struct clk_hw*[]){ 3006 &ufs_ice_core_postdiv_clk_src.hw, 3007 }, 3008 .num_parents = 1, 3009 .flags = CLK_SET_RATE_PARENT, 3010 .ops = &clk_branch2_ops, 3011 }, 3012 }, 3013 }; 3014 3015 static struct clk_branch gcc_ufs_ice_core_clk = { 3016 .halt_reg = 0x76010, 3017 .clkr = { 3018 .enable_reg = 0x76010, 3019 .enable_mask = BIT(0), 3020 .hw.init = &(struct clk_init_data){ 3021 .name = "gcc_ufs_ice_core_clk", 3022 .parent_hws = (const struct clk_hw*[]){ 3023 &ufs_ice_core_clk_src.clkr.hw, 3024 }, 3025 .num_parents = 1, 3026 .flags = CLK_SET_RATE_PARENT, 3027 .ops = &clk_branch2_ops, 3028 }, 3029 }, 3030 }; 3031 3032 static struct clk_branch gcc_ufs_sys_clk_core_clk = { 3033 .halt_check = BRANCH_HALT_DELAY, 3034 .clkr = { 3035 .enable_reg = 0x76030, 3036 .enable_mask = BIT(0), 3037 .hw.init = &(struct clk_init_data){ 3038 .name = "gcc_ufs_sys_clk_core_clk", 3039 .ops = &clk_branch2_ops, 3040 }, 3041 }, 3042 }; 3043 3044 static struct clk_branch gcc_ufs_tx_symbol_clk_core_clk = { 3045 .halt_check = BRANCH_HALT_DELAY, 3046 .clkr = { 3047 .enable_reg = 0x76034, 3048 .enable_mask = BIT(0), 3049 .hw.init = &(struct clk_init_data){ 3050 .name = "gcc_ufs_tx_symbol_clk_core_clk", 3051 .ops = &clk_branch2_ops, 3052 }, 3053 }, 3054 }; 3055 3056 static struct clk_branch gcc_aggre0_snoc_axi_clk = { 3057 .halt_reg = 0x81008, 3058 .clkr = { 3059 .enable_reg = 0x81008, 3060 .enable_mask = BIT(0), 3061 .hw.init = &(struct clk_init_data){ 3062 .name = "gcc_aggre0_snoc_axi_clk", 3063 .parent_hws = (const struct clk_hw*[]){ 3064 &system_noc_clk_src.clkr.hw, 3065 }, 3066 .num_parents = 1, 3067 .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 3068 .ops = &clk_branch2_ops, 3069 }, 3070 }, 3071 }; 3072 3073 static struct clk_branch gcc_aggre0_cnoc_ahb_clk = { 3074 .halt_reg = 0x8100c, 3075 .clkr = { 3076 .enable_reg = 0x8100c, 3077 .enable_mask = BIT(0), 3078 .hw.init = &(struct clk_init_data){ 3079 .name = "gcc_aggre0_cnoc_ahb_clk", 3080 .parent_hws = (const struct clk_hw*[]){ 3081 &config_noc_clk_src.clkr.hw, 3082 }, 3083 .num_parents = 1, 3084 .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 3085 .ops = &clk_branch2_ops, 3086 }, 3087 }, 3088 }; 3089 3090 static struct clk_branch gcc_smmu_aggre0_axi_clk = { 3091 .halt_reg = 0x81014, 3092 .clkr = { 3093 .enable_reg = 0x81014, 3094 .enable_mask = BIT(0), 3095 .hw.init = &(struct clk_init_data){ 3096 .name = "gcc_smmu_aggre0_axi_clk", 3097 .parent_hws = (const struct clk_hw*[]){ 3098 &system_noc_clk_src.clkr.hw, 3099 }, 3100 .num_parents = 1, 3101 .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 3102 .ops = &clk_branch2_ops, 3103 }, 3104 }, 3105 }; 3106 3107 static struct clk_branch gcc_smmu_aggre0_ahb_clk = { 3108 .halt_reg = 0x81018, 3109 .clkr = { 3110 .enable_reg = 0x81018, 3111 .enable_mask = BIT(0), 3112 .hw.init = &(struct clk_init_data){ 3113 .name = "gcc_smmu_aggre0_ahb_clk", 3114 .parent_hws = (const struct clk_hw*[]){ 3115 &config_noc_clk_src.clkr.hw, 3116 }, 3117 .num_parents = 1, 3118 .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 3119 .ops = &clk_branch2_ops, 3120 }, 3121 }, 3122 }; 3123 3124 static struct clk_branch gcc_aggre2_ufs_axi_clk = { 3125 .halt_reg = 0x83014, 3126 .clkr = { 3127 .enable_reg = 0x83014, 3128 .enable_mask = BIT(0), 3129 .hw.init = &(struct clk_init_data){ 3130 .name = "gcc_aggre2_ufs_axi_clk", 3131 .parent_hws = (const struct clk_hw*[]){ 3132 &ufs_axi_clk_src.clkr.hw, 3133 }, 3134 .num_parents = 1, 3135 .flags = CLK_SET_RATE_PARENT, 3136 .ops = &clk_branch2_ops, 3137 }, 3138 }, 3139 }; 3140 3141 static struct clk_branch gcc_aggre2_usb3_axi_clk = { 3142 .halt_reg = 0x83018, 3143 .clkr = { 3144 .enable_reg = 0x83018, 3145 .enable_mask = BIT(0), 3146 .hw.init = &(struct clk_init_data){ 3147 .name = "gcc_aggre2_usb3_axi_clk", 3148 .parent_hws = (const struct clk_hw*[]){ 3149 &usb30_master_clk_src.clkr.hw, 3150 }, 3151 .num_parents = 1, 3152 .flags = CLK_SET_RATE_PARENT, 3153 .ops = &clk_branch2_ops, 3154 }, 3155 }, 3156 }; 3157 3158 static struct clk_branch gcc_dcc_ahb_clk = { 3159 .halt_reg = 0x84004, 3160 .clkr = { 3161 .enable_reg = 0x84004, 3162 .enable_mask = BIT(0), 3163 .hw.init = &(struct clk_init_data){ 3164 .name = "gcc_dcc_ahb_clk", 3165 .parent_hws = (const struct clk_hw*[]){ 3166 &config_noc_clk_src.clkr.hw, 3167 }, 3168 .num_parents = 1, 3169 .ops = &clk_branch2_ops, 3170 }, 3171 }, 3172 }; 3173 3174 static struct clk_branch gcc_aggre0_noc_mpu_cfg_ahb_clk = { 3175 .halt_reg = 0x85000, 3176 .clkr = { 3177 .enable_reg = 0x85000, 3178 .enable_mask = BIT(0), 3179 .hw.init = &(struct clk_init_data){ 3180 .name = "gcc_aggre0_noc_mpu_cfg_ahb_clk", 3181 .parent_hws = (const struct clk_hw*[]){ 3182 &config_noc_clk_src.clkr.hw, 3183 }, 3184 .num_parents = 1, 3185 .ops = &clk_branch2_ops, 3186 }, 3187 }, 3188 }; 3189 3190 static struct clk_branch gcc_qspi_ahb_clk = { 3191 .halt_reg = 0x8b004, 3192 .clkr = { 3193 .enable_reg = 0x8b004, 3194 .enable_mask = BIT(0), 3195 .hw.init = &(struct clk_init_data){ 3196 .name = "gcc_qspi_ahb_clk", 3197 .parent_hws = (const struct clk_hw*[]){ 3198 &periph_noc_clk_src.clkr.hw, 3199 }, 3200 .num_parents = 1, 3201 .flags = CLK_SET_RATE_PARENT, 3202 .ops = &clk_branch2_ops, 3203 }, 3204 }, 3205 }; 3206 3207 static struct clk_branch gcc_qspi_ser_clk = { 3208 .halt_reg = 0x8b008, 3209 .clkr = { 3210 .enable_reg = 0x8b008, 3211 .enable_mask = BIT(0), 3212 .hw.init = &(struct clk_init_data){ 3213 .name = "gcc_qspi_ser_clk", 3214 .parent_hws = (const struct clk_hw*[]){ 3215 &qspi_ser_clk_src.clkr.hw, 3216 }, 3217 .num_parents = 1, 3218 .flags = CLK_SET_RATE_PARENT, 3219 .ops = &clk_branch2_ops, 3220 }, 3221 }, 3222 }; 3223 3224 static struct clk_branch gcc_usb3_clkref_clk = { 3225 .halt_reg = 0x8800C, 3226 .clkr = { 3227 .enable_reg = 0x8800C, 3228 .enable_mask = BIT(0), 3229 .hw.init = &(struct clk_init_data){ 3230 .name = "gcc_usb3_clkref_clk", 3231 .parent_data = &(const struct clk_parent_data){ 3232 .fw_name = "cxo2", 3233 .name = "xo", 3234 }, 3235 .num_parents = 1, 3236 .ops = &clk_branch2_ops, 3237 }, 3238 }, 3239 }; 3240 3241 static struct clk_branch gcc_hdmi_clkref_clk = { 3242 .halt_reg = 0x88000, 3243 .clkr = { 3244 .enable_reg = 0x88000, 3245 .enable_mask = BIT(0), 3246 .hw.init = &(struct clk_init_data){ 3247 .name = "gcc_hdmi_clkref_clk", 3248 .parent_data = &(const struct clk_parent_data){ 3249 .fw_name = "cxo2", 3250 .name = "xo", 3251 }, 3252 .num_parents = 1, 3253 .ops = &clk_branch2_ops, 3254 }, 3255 }, 3256 }; 3257 3258 static struct clk_branch gcc_edp_clkref_clk = { 3259 .halt_reg = 0x88004, 3260 .clkr = { 3261 .enable_reg = 0x88004, 3262 .enable_mask = BIT(0), 3263 .hw.init = &(struct clk_init_data){ 3264 .name = "gcc_edp_clkref_clk", 3265 .parent_data = &(const struct clk_parent_data){ 3266 .fw_name = "cxo2", 3267 .name = "xo", 3268 }, 3269 .num_parents = 1, 3270 .ops = &clk_branch2_ops, 3271 }, 3272 }, 3273 }; 3274 3275 static struct clk_branch gcc_ufs_clkref_clk = { 3276 .halt_reg = 0x88008, 3277 .clkr = { 3278 .enable_reg = 0x88008, 3279 .enable_mask = BIT(0), 3280 .hw.init = &(struct clk_init_data){ 3281 .name = "gcc_ufs_clkref_clk", 3282 .parent_data = &(const struct clk_parent_data){ 3283 .fw_name = "cxo2", 3284 .name = "xo", 3285 }, 3286 .num_parents = 1, 3287 .ops = &clk_branch2_ops, 3288 }, 3289 }, 3290 }; 3291 3292 static struct clk_branch gcc_pcie_clkref_clk = { 3293 .halt_reg = 0x88010, 3294 .clkr = { 3295 .enable_reg = 0x88010, 3296 .enable_mask = BIT(0), 3297 .hw.init = &(struct clk_init_data){ 3298 .name = "gcc_pcie_clkref_clk", 3299 .parent_data = &(const struct clk_parent_data){ 3300 .fw_name = "cxo2", 3301 .name = "xo", 3302 }, 3303 .num_parents = 1, 3304 .ops = &clk_branch2_ops, 3305 }, 3306 }, 3307 }; 3308 3309 static struct clk_branch gcc_rx2_usb2_clkref_clk = { 3310 .halt_reg = 0x88014, 3311 .clkr = { 3312 .enable_reg = 0x88014, 3313 .enable_mask = BIT(0), 3314 .hw.init = &(struct clk_init_data){ 3315 .name = "gcc_rx2_usb2_clkref_clk", 3316 .parent_data = &(const struct clk_parent_data){ 3317 .fw_name = "cxo2", 3318 .name = "xo", 3319 }, 3320 .num_parents = 1, 3321 .ops = &clk_branch2_ops, 3322 }, 3323 }, 3324 }; 3325 3326 static struct clk_branch gcc_rx1_usb2_clkref_clk = { 3327 .halt_reg = 0x88018, 3328 .clkr = { 3329 .enable_reg = 0x88018, 3330 .enable_mask = BIT(0), 3331 .hw.init = &(struct clk_init_data){ 3332 .name = "gcc_rx1_usb2_clkref_clk", 3333 .parent_data = &(const struct clk_parent_data){ 3334 .fw_name = "cxo2", 3335 .name = "xo", 3336 }, 3337 .num_parents = 1, 3338 .ops = &clk_branch2_ops, 3339 }, 3340 }, 3341 }; 3342 3343 static struct clk_branch gcc_mss_cfg_ahb_clk = { 3344 .halt_reg = 0x8a000, 3345 .clkr = { 3346 .enable_reg = 0x8a000, 3347 .enable_mask = BIT(0), 3348 .hw.init = &(struct clk_init_data){ 3349 .name = "gcc_mss_cfg_ahb_clk", 3350 .parent_hws = (const struct clk_hw*[]){ 3351 &config_noc_clk_src.clkr.hw, 3352 }, 3353 .num_parents = 1, 3354 .ops = &clk_branch2_ops, 3355 }, 3356 }, 3357 }; 3358 3359 static struct clk_branch gcc_mss_mnoc_bimc_axi_clk = { 3360 .halt_reg = 0x8a004, 3361 .clkr = { 3362 .enable_reg = 0x8a004, 3363 .enable_mask = BIT(0), 3364 .hw.init = &(struct clk_init_data){ 3365 .name = "gcc_mss_mnoc_bimc_axi_clk", 3366 .parent_hws = (const struct clk_hw*[]){ 3367 &system_noc_clk_src.clkr.hw, 3368 }, 3369 .num_parents = 1, 3370 .ops = &clk_branch2_ops, 3371 }, 3372 }, 3373 }; 3374 3375 static struct clk_branch gcc_mss_snoc_axi_clk = { 3376 .halt_reg = 0x8a024, 3377 .clkr = { 3378 .enable_reg = 0x8a024, 3379 .enable_mask = BIT(0), 3380 .hw.init = &(struct clk_init_data){ 3381 .name = "gcc_mss_snoc_axi_clk", 3382 .parent_hws = (const struct clk_hw*[]){ 3383 &system_noc_clk_src.clkr.hw, 3384 }, 3385 .num_parents = 1, 3386 .ops = &clk_branch2_ops, 3387 }, 3388 }, 3389 }; 3390 3391 static struct clk_branch gcc_mss_q6_bimc_axi_clk = { 3392 .halt_reg = 0x8a028, 3393 .clkr = { 3394 .enable_reg = 0x8a028, 3395 .enable_mask = BIT(0), 3396 .hw.init = &(struct clk_init_data){ 3397 .name = "gcc_mss_q6_bimc_axi_clk", 3398 .parent_hws = (const struct clk_hw*[]){ 3399 &system_noc_clk_src.clkr.hw, 3400 }, 3401 .num_parents = 1, 3402 .ops = &clk_branch2_ops, 3403 }, 3404 }, 3405 }; 3406 3407 static struct clk_hw *gcc_msm8996_hws[] = { 3408 &xo.hw, 3409 &gpll0_early_div.hw, 3410 &ufs_tx_cfg_clk_src.hw, 3411 &ufs_rx_cfg_clk_src.hw, 3412 &ufs_ice_core_postdiv_clk_src.hw, 3413 }; 3414 3415 static struct gdsc aggre0_noc_gdsc = { 3416 .gdscr = 0x81004, 3417 .gds_hw_ctrl = 0x81028, 3418 .pd = { 3419 .name = "aggre0_noc", 3420 }, 3421 .pwrsts = PWRSTS_OFF_ON, 3422 .flags = VOTABLE | ALWAYS_ON, 3423 }; 3424 3425 static struct gdsc hlos1_vote_aggre0_noc_gdsc = { 3426 .gdscr = 0x7d024, 3427 .pd = { 3428 .name = "hlos1_vote_aggre0_noc", 3429 }, 3430 .pwrsts = PWRSTS_OFF_ON, 3431 .flags = VOTABLE, 3432 }; 3433 3434 static struct gdsc hlos1_vote_lpass_adsp_gdsc = { 3435 .gdscr = 0x7d034, 3436 .pd = { 3437 .name = "hlos1_vote_lpass_adsp", 3438 }, 3439 .pwrsts = PWRSTS_OFF_ON, 3440 .flags = VOTABLE, 3441 }; 3442 3443 static struct gdsc hlos1_vote_lpass_core_gdsc = { 3444 .gdscr = 0x7d038, 3445 .pd = { 3446 .name = "hlos1_vote_lpass_core", 3447 }, 3448 .pwrsts = PWRSTS_OFF_ON, 3449 .flags = VOTABLE, 3450 }; 3451 3452 static struct gdsc usb30_gdsc = { 3453 .gdscr = 0xf004, 3454 .pd = { 3455 .name = "usb30", 3456 }, 3457 /* TODO: Change to OFF_ON when USB drivers get proper suspend support */ 3458 .pwrsts = PWRSTS_RET_ON, 3459 }; 3460 3461 static struct gdsc pcie0_gdsc = { 3462 .gdscr = 0x6b004, 3463 .pd = { 3464 .name = "pcie0", 3465 }, 3466 .pwrsts = PWRSTS_OFF_ON, 3467 }; 3468 3469 static struct gdsc pcie1_gdsc = { 3470 .gdscr = 0x6d004, 3471 .pd = { 3472 .name = "pcie1", 3473 }, 3474 .pwrsts = PWRSTS_OFF_ON, 3475 }; 3476 3477 static struct gdsc pcie2_gdsc = { 3478 .gdscr = 0x6e004, 3479 .pd = { 3480 .name = "pcie2", 3481 }, 3482 .pwrsts = PWRSTS_OFF_ON, 3483 }; 3484 3485 static struct gdsc ufs_gdsc = { 3486 .gdscr = 0x75004, 3487 .pd = { 3488 .name = "ufs", 3489 }, 3490 .pwrsts = PWRSTS_OFF_ON, 3491 }; 3492 3493 static struct clk_regmap *gcc_msm8996_clocks[] = { 3494 [GPLL0_EARLY] = &gpll0_early.clkr, 3495 [GPLL0] = &gpll0.clkr, 3496 [GPLL4_EARLY] = &gpll4_early.clkr, 3497 [GPLL4] = &gpll4.clkr, 3498 [SYSTEM_NOC_CLK_SRC] = &system_noc_clk_src.clkr, 3499 [CONFIG_NOC_CLK_SRC] = &config_noc_clk_src.clkr, 3500 [PERIPH_NOC_CLK_SRC] = &periph_noc_clk_src.clkr, 3501 [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr, 3502 [USB30_MOCK_UTMI_CLK_SRC] = &usb30_mock_utmi_clk_src.clkr, 3503 [USB3_PHY_AUX_CLK_SRC] = &usb3_phy_aux_clk_src.clkr, 3504 [USB20_MASTER_CLK_SRC] = &usb20_master_clk_src.clkr, 3505 [USB20_MOCK_UTMI_CLK_SRC] = &usb20_mock_utmi_clk_src.clkr, 3506 [SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr, 3507 [SDCC1_ICE_CORE_CLK_SRC] = &sdcc1_ice_core_clk_src.clkr, 3508 [SDCC2_APPS_CLK_SRC] = &sdcc2_apps_clk_src.clkr, 3509 [SDCC3_APPS_CLK_SRC] = &sdcc3_apps_clk_src.clkr, 3510 [SDCC4_APPS_CLK_SRC] = &sdcc4_apps_clk_src.clkr, 3511 [BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr, 3512 [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr, 3513 [BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr, 3514 [BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr, 3515 [BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr, 3516 [BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr, 3517 [BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr, 3518 [BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr, 3519 [BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr, 3520 [BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr, 3521 [BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr, 3522 [BLSP1_UART4_APPS_CLK_SRC] = &blsp1_uart4_apps_clk_src.clkr, 3523 [BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr, 3524 [BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr, 3525 [BLSP1_UART5_APPS_CLK_SRC] = &blsp1_uart5_apps_clk_src.clkr, 3526 [BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr, 3527 [BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr, 3528 [BLSP1_UART6_APPS_CLK_SRC] = &blsp1_uart6_apps_clk_src.clkr, 3529 [BLSP2_QUP1_SPI_APPS_CLK_SRC] = &blsp2_qup1_spi_apps_clk_src.clkr, 3530 [BLSP2_QUP1_I2C_APPS_CLK_SRC] = &blsp2_qup1_i2c_apps_clk_src.clkr, 3531 [BLSP2_UART1_APPS_CLK_SRC] = &blsp2_uart1_apps_clk_src.clkr, 3532 [BLSP2_QUP2_SPI_APPS_CLK_SRC] = &blsp2_qup2_spi_apps_clk_src.clkr, 3533 [BLSP2_QUP2_I2C_APPS_CLK_SRC] = &blsp2_qup2_i2c_apps_clk_src.clkr, 3534 [BLSP2_UART2_APPS_CLK_SRC] = &blsp2_uart2_apps_clk_src.clkr, 3535 [BLSP2_QUP3_SPI_APPS_CLK_SRC] = &blsp2_qup3_spi_apps_clk_src.clkr, 3536 [BLSP2_QUP3_I2C_APPS_CLK_SRC] = &blsp2_qup3_i2c_apps_clk_src.clkr, 3537 [BLSP2_UART3_APPS_CLK_SRC] = &blsp2_uart3_apps_clk_src.clkr, 3538 [BLSP2_QUP4_SPI_APPS_CLK_SRC] = &blsp2_qup4_spi_apps_clk_src.clkr, 3539 [BLSP2_QUP4_I2C_APPS_CLK_SRC] = &blsp2_qup4_i2c_apps_clk_src.clkr, 3540 [BLSP2_UART4_APPS_CLK_SRC] = &blsp2_uart4_apps_clk_src.clkr, 3541 [BLSP2_QUP5_SPI_APPS_CLK_SRC] = &blsp2_qup5_spi_apps_clk_src.clkr, 3542 [BLSP2_QUP5_I2C_APPS_CLK_SRC] = &blsp2_qup5_i2c_apps_clk_src.clkr, 3543 [BLSP2_UART5_APPS_CLK_SRC] = &blsp2_uart5_apps_clk_src.clkr, 3544 [BLSP2_QUP6_SPI_APPS_CLK_SRC] = &blsp2_qup6_spi_apps_clk_src.clkr, 3545 [BLSP2_QUP6_I2C_APPS_CLK_SRC] = &blsp2_qup6_i2c_apps_clk_src.clkr, 3546 [BLSP2_UART6_APPS_CLK_SRC] = &blsp2_uart6_apps_clk_src.clkr, 3547 [PDM2_CLK_SRC] = &pdm2_clk_src.clkr, 3548 [TSIF_REF_CLK_SRC] = &tsif_ref_clk_src.clkr, 3549 [GCC_SLEEP_CLK_SRC] = &gcc_sleep_clk_src.clkr, 3550 [HMSS_RBCPR_CLK_SRC] = &hmss_rbcpr_clk_src.clkr, 3551 [HMSS_GPLL0_CLK_SRC] = &hmss_gpll0_clk_src.clkr, 3552 [GP1_CLK_SRC] = &gp1_clk_src.clkr, 3553 [GP2_CLK_SRC] = &gp2_clk_src.clkr, 3554 [GP3_CLK_SRC] = &gp3_clk_src.clkr, 3555 [PCIE_AUX_CLK_SRC] = &pcie_aux_clk_src.clkr, 3556 [UFS_AXI_CLK_SRC] = &ufs_axi_clk_src.clkr, 3557 [UFS_ICE_CORE_CLK_SRC] = &ufs_ice_core_clk_src.clkr, 3558 [QSPI_SER_CLK_SRC] = &qspi_ser_clk_src.clkr, 3559 [GCC_SYS_NOC_USB3_AXI_CLK] = &gcc_sys_noc_usb3_axi_clk.clkr, 3560 [GCC_SYS_NOC_UFS_AXI_CLK] = &gcc_sys_noc_ufs_axi_clk.clkr, 3561 [GCC_PERIPH_NOC_USB20_AHB_CLK] = &gcc_periph_noc_usb20_ahb_clk.clkr, 3562 [GCC_MMSS_NOC_CFG_AHB_CLK] = &gcc_mmss_noc_cfg_ahb_clk.clkr, 3563 [GCC_MMSS_BIMC_GFX_CLK] = &gcc_mmss_bimc_gfx_clk.clkr, 3564 [GCC_USB30_MASTER_CLK] = &gcc_usb30_master_clk.clkr, 3565 [GCC_USB30_SLEEP_CLK] = &gcc_usb30_sleep_clk.clkr, 3566 [GCC_USB30_MOCK_UTMI_CLK] = &gcc_usb30_mock_utmi_clk.clkr, 3567 [GCC_USB3_PHY_AUX_CLK] = &gcc_usb3_phy_aux_clk.clkr, 3568 [GCC_USB3_PHY_PIPE_CLK] = &gcc_usb3_phy_pipe_clk.clkr, 3569 [GCC_USB20_MASTER_CLK] = &gcc_usb20_master_clk.clkr, 3570 [GCC_USB20_SLEEP_CLK] = &gcc_usb20_sleep_clk.clkr, 3571 [GCC_USB20_MOCK_UTMI_CLK] = &gcc_usb20_mock_utmi_clk.clkr, 3572 [GCC_USB_PHY_CFG_AHB2PHY_CLK] = &gcc_usb_phy_cfg_ahb2phy_clk.clkr, 3573 [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr, 3574 [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr, 3575 [GCC_SDCC1_ICE_CORE_CLK] = &gcc_sdcc1_ice_core_clk.clkr, 3576 [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr, 3577 [GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr, 3578 [GCC_SDCC3_APPS_CLK] = &gcc_sdcc3_apps_clk.clkr, 3579 [GCC_SDCC3_AHB_CLK] = &gcc_sdcc3_ahb_clk.clkr, 3580 [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr, 3581 [GCC_SDCC4_AHB_CLK] = &gcc_sdcc4_ahb_clk.clkr, 3582 [GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr, 3583 [GCC_BLSP1_SLEEP_CLK] = &gcc_blsp1_sleep_clk.clkr, 3584 [GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr, 3585 [GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr, 3586 [GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr, 3587 [GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr, 3588 [GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr, 3589 [GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr, 3590 [GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr, 3591 [GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr, 3592 [GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr, 3593 [GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr, 3594 [GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr, 3595 [GCC_BLSP1_UART4_APPS_CLK] = &gcc_blsp1_uart4_apps_clk.clkr, 3596 [GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr, 3597 [GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr, 3598 [GCC_BLSP1_UART5_APPS_CLK] = &gcc_blsp1_uart5_apps_clk.clkr, 3599 [GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr, 3600 [GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr, 3601 [GCC_BLSP1_UART6_APPS_CLK] = &gcc_blsp1_uart6_apps_clk.clkr, 3602 [GCC_BLSP2_AHB_CLK] = &gcc_blsp2_ahb_clk.clkr, 3603 [GCC_BLSP2_SLEEP_CLK] = &gcc_blsp2_sleep_clk.clkr, 3604 [GCC_BLSP2_QUP1_SPI_APPS_CLK] = &gcc_blsp2_qup1_spi_apps_clk.clkr, 3605 [GCC_BLSP2_QUP1_I2C_APPS_CLK] = &gcc_blsp2_qup1_i2c_apps_clk.clkr, 3606 [GCC_BLSP2_UART1_APPS_CLK] = &gcc_blsp2_uart1_apps_clk.clkr, 3607 [GCC_BLSP2_QUP2_SPI_APPS_CLK] = &gcc_blsp2_qup2_spi_apps_clk.clkr, 3608 [GCC_BLSP2_QUP2_I2C_APPS_CLK] = &gcc_blsp2_qup2_i2c_apps_clk.clkr, 3609 [GCC_BLSP2_UART2_APPS_CLK] = &gcc_blsp2_uart2_apps_clk.clkr, 3610 [GCC_BLSP2_QUP3_SPI_APPS_CLK] = &gcc_blsp2_qup3_spi_apps_clk.clkr, 3611 [GCC_BLSP2_QUP3_I2C_APPS_CLK] = &gcc_blsp2_qup3_i2c_apps_clk.clkr, 3612 [GCC_BLSP2_UART3_APPS_CLK] = &gcc_blsp2_uart3_apps_clk.clkr, 3613 [GCC_BLSP2_QUP4_SPI_APPS_CLK] = &gcc_blsp2_qup4_spi_apps_clk.clkr, 3614 [GCC_BLSP2_QUP4_I2C_APPS_CLK] = &gcc_blsp2_qup4_i2c_apps_clk.clkr, 3615 [GCC_BLSP2_UART4_APPS_CLK] = &gcc_blsp2_uart4_apps_clk.clkr, 3616 [GCC_BLSP2_QUP5_SPI_APPS_CLK] = &gcc_blsp2_qup5_spi_apps_clk.clkr, 3617 [GCC_BLSP2_QUP5_I2C_APPS_CLK] = &gcc_blsp2_qup5_i2c_apps_clk.clkr, 3618 [GCC_BLSP2_UART5_APPS_CLK] = &gcc_blsp2_uart5_apps_clk.clkr, 3619 [GCC_BLSP2_QUP6_SPI_APPS_CLK] = &gcc_blsp2_qup6_spi_apps_clk.clkr, 3620 [GCC_BLSP2_QUP6_I2C_APPS_CLK] = &gcc_blsp2_qup6_i2c_apps_clk.clkr, 3621 [GCC_BLSP2_UART6_APPS_CLK] = &gcc_blsp2_uart6_apps_clk.clkr, 3622 [GCC_PDM_AHB_CLK] = &gcc_pdm_ahb_clk.clkr, 3623 [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr, 3624 [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr, 3625 [GCC_TSIF_AHB_CLK] = &gcc_tsif_ahb_clk.clkr, 3626 [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr, 3627 [GCC_TSIF_INACTIVITY_TIMERS_CLK] = &gcc_tsif_inactivity_timers_clk.clkr, 3628 [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr, 3629 [GCC_BIMC_GFX_CLK] = &gcc_bimc_gfx_clk.clkr, 3630 [GCC_HMSS_RBCPR_CLK] = &gcc_hmss_rbcpr_clk.clkr, 3631 [GCC_GP1_CLK] = &gcc_gp1_clk.clkr, 3632 [GCC_GP2_CLK] = &gcc_gp2_clk.clkr, 3633 [GCC_GP3_CLK] = &gcc_gp3_clk.clkr, 3634 [GCC_PCIE_0_SLV_AXI_CLK] = &gcc_pcie_0_slv_axi_clk.clkr, 3635 [GCC_PCIE_0_MSTR_AXI_CLK] = &gcc_pcie_0_mstr_axi_clk.clkr, 3636 [GCC_PCIE_0_CFG_AHB_CLK] = &gcc_pcie_0_cfg_ahb_clk.clkr, 3637 [GCC_PCIE_0_AUX_CLK] = &gcc_pcie_0_aux_clk.clkr, 3638 [GCC_PCIE_0_PIPE_CLK] = &gcc_pcie_0_pipe_clk.clkr, 3639 [GCC_PCIE_1_SLV_AXI_CLK] = &gcc_pcie_1_slv_axi_clk.clkr, 3640 [GCC_PCIE_1_MSTR_AXI_CLK] = &gcc_pcie_1_mstr_axi_clk.clkr, 3641 [GCC_PCIE_1_CFG_AHB_CLK] = &gcc_pcie_1_cfg_ahb_clk.clkr, 3642 [GCC_PCIE_1_AUX_CLK] = &gcc_pcie_1_aux_clk.clkr, 3643 [GCC_PCIE_1_PIPE_CLK] = &gcc_pcie_1_pipe_clk.clkr, 3644 [GCC_PCIE_2_SLV_AXI_CLK] = &gcc_pcie_2_slv_axi_clk.clkr, 3645 [GCC_PCIE_2_MSTR_AXI_CLK] = &gcc_pcie_2_mstr_axi_clk.clkr, 3646 [GCC_PCIE_2_CFG_AHB_CLK] = &gcc_pcie_2_cfg_ahb_clk.clkr, 3647 [GCC_PCIE_2_AUX_CLK] = &gcc_pcie_2_aux_clk.clkr, 3648 [GCC_PCIE_2_PIPE_CLK] = &gcc_pcie_2_pipe_clk.clkr, 3649 [GCC_PCIE_PHY_CFG_AHB_CLK] = &gcc_pcie_phy_cfg_ahb_clk.clkr, 3650 [GCC_PCIE_PHY_AUX_CLK] = &gcc_pcie_phy_aux_clk.clkr, 3651 [GCC_UFS_AXI_CLK] = &gcc_ufs_axi_clk.clkr, 3652 [GCC_UFS_AHB_CLK] = &gcc_ufs_ahb_clk.clkr, 3653 [GCC_UFS_TX_CFG_CLK] = &gcc_ufs_tx_cfg_clk.clkr, 3654 [GCC_UFS_RX_CFG_CLK] = &gcc_ufs_rx_cfg_clk.clkr, 3655 [GCC_HLOS1_VOTE_LPASS_CORE_SMMU_CLK] = &gcc_hlos1_vote_lpass_core_smmu_clk.clkr, 3656 [GCC_HLOS1_VOTE_LPASS_ADSP_SMMU_CLK] = &gcc_hlos1_vote_lpass_adsp_smmu_clk.clkr, 3657 [GCC_UFS_TX_SYMBOL_0_CLK] = &gcc_ufs_tx_symbol_0_clk.clkr, 3658 [GCC_UFS_RX_SYMBOL_0_CLK] = &gcc_ufs_rx_symbol_0_clk.clkr, 3659 [GCC_UFS_RX_SYMBOL_1_CLK] = &gcc_ufs_rx_symbol_1_clk.clkr, 3660 [GCC_UFS_UNIPRO_CORE_CLK] = &gcc_ufs_unipro_core_clk.clkr, 3661 [GCC_UFS_ICE_CORE_CLK] = &gcc_ufs_ice_core_clk.clkr, 3662 [GCC_UFS_SYS_CLK_CORE_CLK] = &gcc_ufs_sys_clk_core_clk.clkr, 3663 [GCC_UFS_TX_SYMBOL_CLK_CORE_CLK] = &gcc_ufs_tx_symbol_clk_core_clk.clkr, 3664 [GCC_AGGRE0_SNOC_AXI_CLK] = &gcc_aggre0_snoc_axi_clk.clkr, 3665 [GCC_AGGRE0_CNOC_AHB_CLK] = &gcc_aggre0_cnoc_ahb_clk.clkr, 3666 [GCC_SMMU_AGGRE0_AXI_CLK] = &gcc_smmu_aggre0_axi_clk.clkr, 3667 [GCC_SMMU_AGGRE0_AHB_CLK] = &gcc_smmu_aggre0_ahb_clk.clkr, 3668 [GCC_AGGRE2_UFS_AXI_CLK] = &gcc_aggre2_ufs_axi_clk.clkr, 3669 [GCC_AGGRE2_USB3_AXI_CLK] = &gcc_aggre2_usb3_axi_clk.clkr, 3670 [GCC_QSPI_AHB_CLK] = &gcc_qspi_ahb_clk.clkr, 3671 [GCC_QSPI_SER_CLK] = &gcc_qspi_ser_clk.clkr, 3672 [GCC_USB3_CLKREF_CLK] = &gcc_usb3_clkref_clk.clkr, 3673 [GCC_HDMI_CLKREF_CLK] = &gcc_hdmi_clkref_clk.clkr, 3674 [GCC_UFS_CLKREF_CLK] = &gcc_ufs_clkref_clk.clkr, 3675 [GCC_PCIE_CLKREF_CLK] = &gcc_pcie_clkref_clk.clkr, 3676 [GCC_RX2_USB2_CLKREF_CLK] = &gcc_rx2_usb2_clkref_clk.clkr, 3677 [GCC_RX1_USB2_CLKREF_CLK] = &gcc_rx1_usb2_clkref_clk.clkr, 3678 [GCC_EDP_CLKREF_CLK] = &gcc_edp_clkref_clk.clkr, 3679 [GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr, 3680 [GCC_MSS_Q6_BIMC_AXI_CLK] = &gcc_mss_q6_bimc_axi_clk.clkr, 3681 [GCC_MSS_SNOC_AXI_CLK] = &gcc_mss_snoc_axi_clk.clkr, 3682 [GCC_MSS_MNOC_BIMC_AXI_CLK] = &gcc_mss_mnoc_bimc_axi_clk.clkr, 3683 [GCC_DCC_AHB_CLK] = &gcc_dcc_ahb_clk.clkr, 3684 [GCC_AGGRE0_NOC_MPU_CFG_AHB_CLK] = &gcc_aggre0_noc_mpu_cfg_ahb_clk.clkr, 3685 [GCC_MMSS_GPLL0_DIV_CLK] = &gcc_mmss_gpll0_div_clk.clkr, 3686 [GCC_MSS_GPLL0_DIV_CLK] = &gcc_mss_gpll0_div_clk.clkr, 3687 }; 3688 3689 static struct gdsc *gcc_msm8996_gdscs[] = { 3690 [AGGRE0_NOC_GDSC] = &aggre0_noc_gdsc, 3691 [HLOS1_VOTE_AGGRE0_NOC_GDSC] = &hlos1_vote_aggre0_noc_gdsc, 3692 [HLOS1_VOTE_LPASS_ADSP_GDSC] = &hlos1_vote_lpass_adsp_gdsc, 3693 [HLOS1_VOTE_LPASS_CORE_GDSC] = &hlos1_vote_lpass_core_gdsc, 3694 [USB30_GDSC] = &usb30_gdsc, 3695 [PCIE0_GDSC] = &pcie0_gdsc, 3696 [PCIE1_GDSC] = &pcie1_gdsc, 3697 [PCIE2_GDSC] = &pcie2_gdsc, 3698 [UFS_GDSC] = &ufs_gdsc, 3699 }; 3700 3701 static const struct qcom_reset_map gcc_msm8996_resets[] = { 3702 [GCC_SYSTEM_NOC_BCR] = { 0x4000 }, 3703 [GCC_CONFIG_NOC_BCR] = { 0x5000 }, 3704 [GCC_PERIPH_NOC_BCR] = { 0x6000 }, 3705 [GCC_IMEM_BCR] = { 0x8000 }, 3706 [GCC_MMSS_BCR] = { 0x9000 }, 3707 [GCC_PIMEM_BCR] = { 0x0a000 }, 3708 [GCC_QDSS_BCR] = { 0x0c000 }, 3709 [GCC_USB_30_BCR] = { 0x0f000 }, 3710 [GCC_USB_20_BCR] = { 0x12000 }, 3711 [GCC_QUSB2PHY_PRIM_BCR] = { 0x12038 }, 3712 [GCC_QUSB2PHY_SEC_BCR] = { 0x1203c }, 3713 [GCC_USB3_PHY_BCR] = { 0x50020 }, 3714 [GCC_USB3PHY_PHY_BCR] = { 0x50024 }, 3715 [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 }, 3716 [GCC_SDCC1_BCR] = { 0x13000 }, 3717 [GCC_SDCC2_BCR] = { 0x14000 }, 3718 [GCC_SDCC3_BCR] = { 0x15000 }, 3719 [GCC_SDCC4_BCR] = { 0x16000 }, 3720 [GCC_BLSP1_BCR] = { 0x17000 }, 3721 [GCC_BLSP1_QUP1_BCR] = { 0x19000 }, 3722 [GCC_BLSP1_UART1_BCR] = { 0x1a000 }, 3723 [GCC_BLSP1_QUP2_BCR] = { 0x1b000 }, 3724 [GCC_BLSP1_UART2_BCR] = { 0x1c000 }, 3725 [GCC_BLSP1_QUP3_BCR] = { 0x1d000 }, 3726 [GCC_BLSP1_UART3_BCR] = { 0x1e000 }, 3727 [GCC_BLSP1_QUP4_BCR] = { 0x1f000 }, 3728 [GCC_BLSP1_UART4_BCR] = { 0x20000 }, 3729 [GCC_BLSP1_QUP5_BCR] = { 0x21000 }, 3730 [GCC_BLSP1_UART5_BCR] = { 0x22000 }, 3731 [GCC_BLSP1_QUP6_BCR] = { 0x23000 }, 3732 [GCC_BLSP1_UART6_BCR] = { 0x24000 }, 3733 [GCC_BLSP2_BCR] = { 0x25000 }, 3734 [GCC_BLSP2_QUP1_BCR] = { 0x26000 }, 3735 [GCC_BLSP2_UART1_BCR] = { 0x27000 }, 3736 [GCC_BLSP2_QUP2_BCR] = { 0x28000 }, 3737 [GCC_BLSP2_UART2_BCR] = { 0x29000 }, 3738 [GCC_BLSP2_QUP3_BCR] = { 0x2a000 }, 3739 [GCC_BLSP2_UART3_BCR] = { 0x2b000 }, 3740 [GCC_BLSP2_QUP4_BCR] = { 0x2c000 }, 3741 [GCC_BLSP2_UART4_BCR] = { 0x2d000 }, 3742 [GCC_BLSP2_QUP5_BCR] = { 0x2e000 }, 3743 [GCC_BLSP2_UART5_BCR] = { 0x2f000 }, 3744 [GCC_BLSP2_QUP6_BCR] = { 0x30000 }, 3745 [GCC_BLSP2_UART6_BCR] = { 0x31000 }, 3746 [GCC_PDM_BCR] = { 0x33000 }, 3747 [GCC_PRNG_BCR] = { 0x34000 }, 3748 [GCC_TSIF_BCR] = { 0x36000 }, 3749 [GCC_TCSR_BCR] = { 0x37000 }, 3750 [GCC_BOOT_ROM_BCR] = { 0x38000 }, 3751 [GCC_MSG_RAM_BCR] = { 0x39000 }, 3752 [GCC_TLMM_BCR] = { 0x3a000 }, 3753 [GCC_MPM_BCR] = { 0x3b000 }, 3754 [GCC_SEC_CTRL_BCR] = { 0x3d000 }, 3755 [GCC_SPMI_BCR] = { 0x3f000 }, 3756 [GCC_SPDM_BCR] = { 0x40000 }, 3757 [GCC_CE1_BCR] = { 0x41000 }, 3758 [GCC_BIMC_BCR] = { 0x44000 }, 3759 [GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x49000 }, 3760 [GCC_SNOC_BUS_TIMEOUT2_BCR] = { 0x49008 }, 3761 [GCC_SNOC_BUS_TIMEOUT1_BCR] = { 0x49010 }, 3762 [GCC_SNOC_BUS_TIMEOUT3_BCR] = { 0x49018 }, 3763 [GCC_SNOC_BUS_TIMEOUT_EXTREF_BCR] = { 0x49020 }, 3764 [GCC_PNOC_BUS_TIMEOUT0_BCR] = { 0x4a000 }, 3765 [GCC_PNOC_BUS_TIMEOUT1_BCR] = { 0x4a008 }, 3766 [GCC_PNOC_BUS_TIMEOUT2_BCR] = { 0x4a010 }, 3767 [GCC_PNOC_BUS_TIMEOUT3_BCR] = { 0x4a018 }, 3768 [GCC_PNOC_BUS_TIMEOUT4_BCR] = { 0x4a020 }, 3769 [GCC_CNOC_BUS_TIMEOUT0_BCR] = { 0x4b000 }, 3770 [GCC_CNOC_BUS_TIMEOUT1_BCR] = { 0x4b008 }, 3771 [GCC_CNOC_BUS_TIMEOUT2_BCR] = { 0x4b010 }, 3772 [GCC_CNOC_BUS_TIMEOUT3_BCR] = { 0x4b018 }, 3773 [GCC_CNOC_BUS_TIMEOUT4_BCR] = { 0x4b020 }, 3774 [GCC_CNOC_BUS_TIMEOUT5_BCR] = { 0x4b028 }, 3775 [GCC_CNOC_BUS_TIMEOUT6_BCR] = { 0x4b030 }, 3776 [GCC_CNOC_BUS_TIMEOUT7_BCR] = { 0x4b038 }, 3777 [GCC_CNOC_BUS_TIMEOUT8_BCR] = { 0x80000 }, 3778 [GCC_CNOC_BUS_TIMEOUT9_BCR] = { 0x80008 }, 3779 [GCC_CNOC_BUS_TIMEOUT_EXTREF_BCR] = { 0x80010 }, 3780 [GCC_APB2JTAG_BCR] = { 0x4c000 }, 3781 [GCC_RBCPR_CX_BCR] = { 0x4e000 }, 3782 [GCC_RBCPR_MX_BCR] = { 0x4f000 }, 3783 [GCC_PCIE_0_BCR] = { 0x6b000 }, 3784 [GCC_PCIE_0_PHY_BCR] = { 0x6c01c }, 3785 [GCC_PCIE_1_BCR] = { 0x6d000 }, 3786 [GCC_PCIE_1_PHY_BCR] = { 0x6d038 }, 3787 [GCC_PCIE_2_BCR] = { 0x6e000 }, 3788 [GCC_PCIE_2_PHY_BCR] = { 0x6e038 }, 3789 [GCC_PCIE_PHY_BCR] = { 0x6f000 }, 3790 [GCC_PCIE_PHY_COM_BCR] = { 0x6f014 }, 3791 [GCC_PCIE_PHY_COM_NOCSR_BCR] = { 0x6f00c }, 3792 [GCC_DCD_BCR] = { 0x70000 }, 3793 [GCC_OBT_ODT_BCR] = { 0x73000 }, 3794 [GCC_UFS_BCR] = { 0x75000 }, 3795 [GCC_SSC_BCR] = { 0x63000 }, 3796 [GCC_VS_BCR] = { 0x7a000 }, 3797 [GCC_AGGRE0_NOC_BCR] = { 0x81000 }, 3798 [GCC_AGGRE1_NOC_BCR] = { 0x82000 }, 3799 [GCC_AGGRE2_NOC_BCR] = { 0x83000 }, 3800 [GCC_DCC_BCR] = { 0x84000 }, 3801 [GCC_IPA_BCR] = { 0x89000 }, 3802 [GCC_QSPI_BCR] = { 0x8b000 }, 3803 [GCC_SKL_BCR] = { 0x8c000 }, 3804 [GCC_MSMPU_BCR] = { 0x8d000 }, 3805 [GCC_MSS_Q6_BCR] = { 0x8e000 }, 3806 [GCC_QREFS_VBG_CAL_BCR] = { 0x88020 }, 3807 [GCC_MSS_RESTART] = { 0x8f008 }, 3808 }; 3809 3810 static const struct regmap_config gcc_msm8996_regmap_config = { 3811 .reg_bits = 32, 3812 .reg_stride = 4, 3813 .val_bits = 32, 3814 .max_register = 0x8f010, 3815 .fast_io = true, 3816 }; 3817 3818 static const struct qcom_cc_desc gcc_msm8996_desc = { 3819 .config = &gcc_msm8996_regmap_config, 3820 .clks = gcc_msm8996_clocks, 3821 .num_clks = ARRAY_SIZE(gcc_msm8996_clocks), 3822 .resets = gcc_msm8996_resets, 3823 .num_resets = ARRAY_SIZE(gcc_msm8996_resets), 3824 .gdscs = gcc_msm8996_gdscs, 3825 .num_gdscs = ARRAY_SIZE(gcc_msm8996_gdscs), 3826 .clk_hws = gcc_msm8996_hws, 3827 .num_clk_hws = ARRAY_SIZE(gcc_msm8996_hws), 3828 }; 3829 3830 static const struct of_device_id gcc_msm8996_match_table[] = { 3831 { .compatible = "qcom,gcc-msm8996" }, 3832 { } 3833 }; 3834 MODULE_DEVICE_TABLE(of, gcc_msm8996_match_table); 3835 3836 static int gcc_msm8996_probe(struct platform_device *pdev) 3837 { 3838 struct regmap *regmap; 3839 3840 regmap = qcom_cc_map(pdev, &gcc_msm8996_desc); 3841 if (IS_ERR(regmap)) 3842 return PTR_ERR(regmap); 3843 3844 /* 3845 * Set the HMSS_AHB_CLK_SLEEP_ENA bit to allow the hmss_ahb_clk to be 3846 * turned off by hardware during certain apps low power modes. 3847 */ 3848 regmap_update_bits(regmap, 0x52008, BIT(21), BIT(21)); 3849 3850 return qcom_cc_really_probe(pdev, &gcc_msm8996_desc, regmap); 3851 } 3852 3853 static struct platform_driver gcc_msm8996_driver = { 3854 .probe = gcc_msm8996_probe, 3855 .driver = { 3856 .name = "gcc-msm8996", 3857 .of_match_table = gcc_msm8996_match_table, 3858 }, 3859 }; 3860 3861 static int __init gcc_msm8996_init(void) 3862 { 3863 return platform_driver_register(&gcc_msm8996_driver); 3864 } 3865 core_initcall(gcc_msm8996_init); 3866 3867 static void __exit gcc_msm8996_exit(void) 3868 { 3869 platform_driver_unregister(&gcc_msm8996_driver); 3870 } 3871 module_exit(gcc_msm8996_exit); 3872 3873 MODULE_DESCRIPTION("QCOM GCC MSM8996 Driver"); 3874 MODULE_LICENSE("GPL v2"); 3875 MODULE_ALIAS("platform:gcc-msm8996"); 3876