0001
0002
0003
0004
0005
0006 #include <linux/kernel.h>
0007 #include <linux/bitops.h>
0008 #include <linux/err.h>
0009 #include <linux/platform_device.h>
0010 #include <linux/module.h>
0011 #include <linux/of.h>
0012 #include <linux/of_device.h>
0013 #include <linux/clk-provider.h>
0014 #include <linux/regmap.h>
0015 #include <linux/reset-controller.h>
0016
0017 #include <dt-bindings/clock/qcom,gcc-msm8998.h>
0018
0019 #include "common.h"
0020 #include "clk-regmap.h"
0021 #include "clk-alpha-pll.h"
0022 #include "clk-pll.h"
0023 #include "clk-rcg.h"
0024 #include "clk-branch.h"
0025 #include "reset.h"
0026 #include "gdsc.h"
0027
0028 static struct pll_vco fabia_vco[] = {
0029 { 250000000, 2000000000, 0 },
0030 { 125000000, 1000000000, 1 },
0031 };
0032
0033 static struct clk_alpha_pll gpll0 = {
0034 .offset = 0x0,
0035 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0036 .vco_table = fabia_vco,
0037 .num_vco = ARRAY_SIZE(fabia_vco),
0038 .clkr = {
0039 .enable_reg = 0x52000,
0040 .enable_mask = BIT(0),
0041 .hw.init = &(struct clk_init_data){
0042 .name = "gpll0",
0043 .parent_data = (const struct clk_parent_data []) {
0044 { .fw_name = "xo" },
0045 },
0046 .num_parents = 1,
0047 .ops = &clk_alpha_pll_fixed_fabia_ops,
0048 }
0049 },
0050 };
0051
0052 static struct clk_alpha_pll_postdiv gpll0_out_even = {
0053 .offset = 0x0,
0054 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0055 .clkr.hw.init = &(struct clk_init_data){
0056 .name = "gpll0_out_even",
0057 .parent_hws = (const struct clk_hw*[]) {
0058 &gpll0.clkr.hw,
0059 },
0060 .num_parents = 1,
0061 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0062 },
0063 };
0064
0065 static struct clk_alpha_pll_postdiv gpll0_out_main = {
0066 .offset = 0x0,
0067 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0068 .clkr.hw.init = &(struct clk_init_data){
0069 .name = "gpll0_out_main",
0070 .parent_hws = (const struct clk_hw*[]) {
0071 &gpll0.clkr.hw,
0072 },
0073 .num_parents = 1,
0074 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0075 },
0076 };
0077
0078 static struct clk_alpha_pll_postdiv gpll0_out_odd = {
0079 .offset = 0x0,
0080 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0081 .clkr.hw.init = &(struct clk_init_data){
0082 .name = "gpll0_out_odd",
0083 .parent_hws = (const struct clk_hw*[]) {
0084 &gpll0.clkr.hw,
0085 },
0086 .num_parents = 1,
0087 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0088 },
0089 };
0090
0091 static struct clk_alpha_pll_postdiv gpll0_out_test = {
0092 .offset = 0x0,
0093 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0094 .clkr.hw.init = &(struct clk_init_data){
0095 .name = "gpll0_out_test",
0096 .parent_hws = (const struct clk_hw*[]) {
0097 &gpll0.clkr.hw,
0098 },
0099 .num_parents = 1,
0100 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0101 },
0102 };
0103
0104 static struct clk_alpha_pll gpll1 = {
0105 .offset = 0x1000,
0106 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0107 .vco_table = fabia_vco,
0108 .num_vco = ARRAY_SIZE(fabia_vco),
0109 .clkr = {
0110 .enable_reg = 0x52000,
0111 .enable_mask = BIT(1),
0112 .hw.init = &(struct clk_init_data){
0113 .name = "gpll1",
0114 .parent_data = (const struct clk_parent_data []) {
0115 { .fw_name = "xo" },
0116 },
0117 .num_parents = 1,
0118 .ops = &clk_alpha_pll_fixed_fabia_ops,
0119 }
0120 },
0121 };
0122
0123 static struct clk_alpha_pll_postdiv gpll1_out_even = {
0124 .offset = 0x1000,
0125 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0126 .clkr.hw.init = &(struct clk_init_data){
0127 .name = "gpll1_out_even",
0128 .parent_hws = (const struct clk_hw*[]) {
0129 &gpll1.clkr.hw,
0130 },
0131 .num_parents = 1,
0132 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0133 },
0134 };
0135
0136 static struct clk_alpha_pll_postdiv gpll1_out_main = {
0137 .offset = 0x1000,
0138 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0139 .clkr.hw.init = &(struct clk_init_data){
0140 .name = "gpll1_out_main",
0141 .parent_hws = (const struct clk_hw*[]) {
0142 &gpll1.clkr.hw,
0143 },
0144 .num_parents = 1,
0145 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0146 },
0147 };
0148
0149 static struct clk_alpha_pll_postdiv gpll1_out_odd = {
0150 .offset = 0x1000,
0151 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0152 .clkr.hw.init = &(struct clk_init_data){
0153 .name = "gpll1_out_odd",
0154 .parent_hws = (const struct clk_hw*[]) {
0155 &gpll1.clkr.hw,
0156 },
0157 .num_parents = 1,
0158 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0159 },
0160 };
0161
0162 static struct clk_alpha_pll_postdiv gpll1_out_test = {
0163 .offset = 0x1000,
0164 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0165 .clkr.hw.init = &(struct clk_init_data){
0166 .name = "gpll1_out_test",
0167 .parent_hws = (const struct clk_hw*[]) {
0168 &gpll1.clkr.hw,
0169 },
0170 .num_parents = 1,
0171 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0172 },
0173 };
0174
0175 static struct clk_alpha_pll gpll2 = {
0176 .offset = 0x2000,
0177 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0178 .vco_table = fabia_vco,
0179 .num_vco = ARRAY_SIZE(fabia_vco),
0180 .clkr = {
0181 .enable_reg = 0x52000,
0182 .enable_mask = BIT(2),
0183 .hw.init = &(struct clk_init_data){
0184 .name = "gpll2",
0185 .parent_data = (const struct clk_parent_data []) {
0186 { .fw_name = "xo" },
0187 },
0188 .num_parents = 1,
0189 .ops = &clk_alpha_pll_fixed_fabia_ops,
0190 }
0191 },
0192 };
0193
0194 static struct clk_alpha_pll_postdiv gpll2_out_even = {
0195 .offset = 0x2000,
0196 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0197 .clkr.hw.init = &(struct clk_init_data){
0198 .name = "gpll2_out_even",
0199 .parent_hws = (const struct clk_hw*[]) {
0200 &gpll2.clkr.hw,
0201 },
0202 .num_parents = 1,
0203 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0204 },
0205 };
0206
0207 static struct clk_alpha_pll_postdiv gpll2_out_main = {
0208 .offset = 0x2000,
0209 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0210 .clkr.hw.init = &(struct clk_init_data){
0211 .name = "gpll2_out_main",
0212 .parent_hws = (const struct clk_hw*[]) {
0213 &gpll2.clkr.hw,
0214 },
0215 .num_parents = 1,
0216 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0217 },
0218 };
0219
0220 static struct clk_alpha_pll_postdiv gpll2_out_odd = {
0221 .offset = 0x2000,
0222 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0223 .clkr.hw.init = &(struct clk_init_data){
0224 .name = "gpll2_out_odd",
0225 .parent_hws = (const struct clk_hw*[]) {
0226 &gpll2.clkr.hw,
0227 },
0228 .num_parents = 1,
0229 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0230 },
0231 };
0232
0233 static struct clk_alpha_pll_postdiv gpll2_out_test = {
0234 .offset = 0x2000,
0235 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0236 .clkr.hw.init = &(struct clk_init_data){
0237 .name = "gpll2_out_test",
0238 .parent_hws = (const struct clk_hw*[]) {
0239 &gpll2.clkr.hw,
0240 },
0241 .num_parents = 1,
0242 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0243 },
0244 };
0245
0246 static struct clk_alpha_pll gpll3 = {
0247 .offset = 0x3000,
0248 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0249 .vco_table = fabia_vco,
0250 .num_vco = ARRAY_SIZE(fabia_vco),
0251 .clkr = {
0252 .enable_reg = 0x52000,
0253 .enable_mask = BIT(3),
0254 .hw.init = &(struct clk_init_data){
0255 .name = "gpll3",
0256 .parent_data = (const struct clk_parent_data []) {
0257 { .fw_name = "xo" },
0258 },
0259 .num_parents = 1,
0260 .ops = &clk_alpha_pll_fixed_fabia_ops,
0261 }
0262 },
0263 };
0264
0265 static struct clk_alpha_pll_postdiv gpll3_out_even = {
0266 .offset = 0x3000,
0267 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0268 .clkr.hw.init = &(struct clk_init_data){
0269 .name = "gpll3_out_even",
0270 .parent_hws = (const struct clk_hw*[]) {
0271 &gpll3.clkr.hw,
0272 },
0273 .num_parents = 1,
0274 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0275 },
0276 };
0277
0278 static struct clk_alpha_pll_postdiv gpll3_out_main = {
0279 .offset = 0x3000,
0280 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0281 .clkr.hw.init = &(struct clk_init_data){
0282 .name = "gpll3_out_main",
0283 .parent_hws = (const struct clk_hw*[]) {
0284 &gpll3.clkr.hw,
0285 },
0286 .num_parents = 1,
0287 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0288 },
0289 };
0290
0291 static struct clk_alpha_pll_postdiv gpll3_out_odd = {
0292 .offset = 0x3000,
0293 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0294 .clkr.hw.init = &(struct clk_init_data){
0295 .name = "gpll3_out_odd",
0296 .parent_hws = (const struct clk_hw*[]) {
0297 &gpll3.clkr.hw,
0298 },
0299 .num_parents = 1,
0300 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0301 },
0302 };
0303
0304 static struct clk_alpha_pll_postdiv gpll3_out_test = {
0305 .offset = 0x3000,
0306 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0307 .clkr.hw.init = &(struct clk_init_data){
0308 .name = "gpll3_out_test",
0309 .parent_hws = (const struct clk_hw*[]) {
0310 &gpll3.clkr.hw,
0311 },
0312 .num_parents = 1,
0313 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0314 },
0315 };
0316
0317 static struct clk_alpha_pll gpll4 = {
0318 .offset = 0x77000,
0319 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0320 .vco_table = fabia_vco,
0321 .num_vco = ARRAY_SIZE(fabia_vco),
0322 .clkr = {
0323 .enable_reg = 0x52000,
0324 .enable_mask = BIT(4),
0325 .hw.init = &(struct clk_init_data){
0326 .name = "gpll4",
0327 .parent_data = (const struct clk_parent_data []) {
0328 { .fw_name = "xo" },
0329 },
0330 .num_parents = 1,
0331 .ops = &clk_alpha_pll_fixed_fabia_ops,
0332 }
0333 },
0334 };
0335
0336 static struct clk_alpha_pll_postdiv gpll4_out_even = {
0337 .offset = 0x77000,
0338 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0339 .clkr.hw.init = &(struct clk_init_data){
0340 .name = "gpll4_out_even",
0341 .parent_hws = (const struct clk_hw*[]) {
0342 &gpll4.clkr.hw,
0343 },
0344 .num_parents = 1,
0345 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0346 },
0347 };
0348
0349 static struct clk_alpha_pll_postdiv gpll4_out_main = {
0350 .offset = 0x77000,
0351 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0352 .clkr.hw.init = &(struct clk_init_data){
0353 .name = "gpll4_out_main",
0354 .parent_hws = (const struct clk_hw*[]) {
0355 &gpll4.clkr.hw,
0356 },
0357 .num_parents = 1,
0358 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0359 },
0360 };
0361
0362 static struct clk_alpha_pll_postdiv gpll4_out_odd = {
0363 .offset = 0x77000,
0364 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0365 .clkr.hw.init = &(struct clk_init_data){
0366 .name = "gpll4_out_odd",
0367 .parent_hws = (const struct clk_hw*[]) {
0368 &gpll4.clkr.hw,
0369 },
0370 .num_parents = 1,
0371 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0372 },
0373 };
0374
0375 static struct clk_alpha_pll_postdiv gpll4_out_test = {
0376 .offset = 0x77000,
0377 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
0378 .clkr.hw.init = &(struct clk_init_data){
0379 .name = "gpll4_out_test",
0380 .parent_hws = (const struct clk_hw*[]) {
0381 &gpll4.clkr.hw,
0382 },
0383 .num_parents = 1,
0384 .ops = &clk_alpha_pll_postdiv_fabia_ops,
0385 },
0386 };
0387
0388 enum {
0389 P_AUD_REF_CLK,
0390 P_CORE_BI_PLL_TEST_SE,
0391 P_GPLL0_OUT_MAIN,
0392 P_GPLL4_OUT_MAIN,
0393 P_PLL0_EARLY_DIV_CLK_SRC,
0394 P_SLEEP_CLK,
0395 P_XO,
0396 };
0397
0398 static const struct parent_map gcc_parent_map_0[] = {
0399 { P_XO, 0 },
0400 { P_GPLL0_OUT_MAIN, 1 },
0401 { P_PLL0_EARLY_DIV_CLK_SRC, 6 },
0402 { P_CORE_BI_PLL_TEST_SE, 7 },
0403 };
0404
0405 static const struct clk_parent_data gcc_parent_data_0[] = {
0406 { .fw_name = "xo" },
0407 { .hw = &gpll0_out_main.clkr.hw },
0408 { .hw = &gpll0_out_main.clkr.hw },
0409 { .fw_name = "core_bi_pll_test_se" },
0410 };
0411
0412 static const struct parent_map gcc_parent_map_1[] = {
0413 { P_XO, 0 },
0414 { P_GPLL0_OUT_MAIN, 1 },
0415 { P_CORE_BI_PLL_TEST_SE, 7 },
0416 };
0417
0418 static const struct clk_parent_data gcc_parent_data_1[] = {
0419 { .fw_name = "xo" },
0420 { .hw = &gpll0_out_main.clkr.hw },
0421 { .fw_name = "core_bi_pll_test_se" },
0422 };
0423
0424 static const struct parent_map gcc_parent_map_2[] = {
0425 { P_XO, 0 },
0426 { P_GPLL0_OUT_MAIN, 1 },
0427 { P_SLEEP_CLK, 5 },
0428 { P_PLL0_EARLY_DIV_CLK_SRC, 6 },
0429 { P_CORE_BI_PLL_TEST_SE, 7 },
0430 };
0431
0432 static const struct clk_parent_data gcc_parent_data_2[] = {
0433 { .fw_name = "xo" },
0434 { .hw = &gpll0_out_main.clkr.hw },
0435 { .fw_name = "sleep_clk" },
0436 { .hw = &gpll0_out_main.clkr.hw },
0437 { .fw_name = "core_bi_pll_test_se" },
0438 };
0439
0440 static const struct parent_map gcc_parent_map_3[] = {
0441 { P_XO, 0 },
0442 { P_SLEEP_CLK, 5 },
0443 { P_CORE_BI_PLL_TEST_SE, 7 },
0444 };
0445
0446 static const struct clk_parent_data gcc_parent_data_3[] = {
0447 { .fw_name = "xo" },
0448 { .fw_name = "sleep_clk" },
0449 { .fw_name = "core_bi_pll_test_se" },
0450 };
0451
0452 static const struct parent_map gcc_parent_map_4[] = {
0453 { P_XO, 0 },
0454 { P_GPLL0_OUT_MAIN, 1 },
0455 { P_GPLL4_OUT_MAIN, 5 },
0456 { P_CORE_BI_PLL_TEST_SE, 7 },
0457 };
0458
0459 static const struct clk_parent_data gcc_parent_data_4[] = {
0460 { .fw_name = "xo" },
0461 { .hw = &gpll0_out_main.clkr.hw },
0462 { .hw = &gpll4_out_main.clkr.hw },
0463 { .fw_name = "core_bi_pll_test_se" },
0464 };
0465
0466 static const struct parent_map gcc_parent_map_5[] = {
0467 { P_XO, 0 },
0468 { P_GPLL0_OUT_MAIN, 1 },
0469 { P_AUD_REF_CLK, 2 },
0470 { P_CORE_BI_PLL_TEST_SE, 7 },
0471 };
0472
0473 static const struct clk_parent_data gcc_parent_data_5[] = {
0474 { .fw_name = "xo" },
0475 { .hw = &gpll0_out_main.clkr.hw },
0476 { .fw_name = "aud_ref_clk" },
0477 { .fw_name = "core_bi_pll_test_se" },
0478 };
0479
0480 static const struct freq_tbl ftbl_blsp1_qup1_i2c_apps_clk_src[] = {
0481 F(19200000, P_XO, 1, 0, 0),
0482 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
0483 { }
0484 };
0485
0486 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
0487 .cmd_rcgr = 0x19020,
0488 .mnd_width = 0,
0489 .hid_width = 5,
0490 .parent_map = gcc_parent_map_1,
0491 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0492 .clkr.hw.init = &(struct clk_init_data){
0493 .name = "blsp1_qup1_i2c_apps_clk_src",
0494 .parent_data = gcc_parent_data_1,
0495 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0496 .ops = &clk_rcg2_ops,
0497 },
0498 };
0499
0500 static const struct freq_tbl ftbl_blsp1_qup1_spi_apps_clk_src[] = {
0501 F(960000, P_XO, 10, 1, 2),
0502 F(4800000, P_XO, 4, 0, 0),
0503 F(9600000, P_XO, 2, 0, 0),
0504 F(15000000, P_GPLL0_OUT_MAIN, 10, 1, 4),
0505 F(19200000, P_XO, 1, 0, 0),
0506 F(25000000, P_GPLL0_OUT_MAIN, 12, 1, 2),
0507 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
0508 { }
0509 };
0510
0511 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = {
0512 .cmd_rcgr = 0x1900c,
0513 .mnd_width = 8,
0514 .hid_width = 5,
0515 .parent_map = gcc_parent_map_0,
0516 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0517 .clkr.hw.init = &(struct clk_init_data){
0518 .name = "blsp1_qup1_spi_apps_clk_src",
0519 .parent_data = gcc_parent_data_0,
0520 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0521 .ops = &clk_rcg2_ops,
0522 },
0523 };
0524
0525 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = {
0526 .cmd_rcgr = 0x1b020,
0527 .mnd_width = 0,
0528 .hid_width = 5,
0529 .parent_map = gcc_parent_map_1,
0530 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0531 .clkr.hw.init = &(struct clk_init_data){
0532 .name = "blsp1_qup2_i2c_apps_clk_src",
0533 .parent_data = gcc_parent_data_1,
0534 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0535 .ops = &clk_rcg2_ops,
0536 },
0537 };
0538
0539 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = {
0540 .cmd_rcgr = 0x1b00c,
0541 .mnd_width = 8,
0542 .hid_width = 5,
0543 .parent_map = gcc_parent_map_0,
0544 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0545 .clkr.hw.init = &(struct clk_init_data){
0546 .name = "blsp1_qup2_spi_apps_clk_src",
0547 .parent_data = gcc_parent_data_0,
0548 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0549 .ops = &clk_rcg2_ops,
0550 },
0551 };
0552
0553 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = {
0554 .cmd_rcgr = 0x1d020,
0555 .mnd_width = 0,
0556 .hid_width = 5,
0557 .parent_map = gcc_parent_map_1,
0558 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0559 .clkr.hw.init = &(struct clk_init_data){
0560 .name = "blsp1_qup3_i2c_apps_clk_src",
0561 .parent_data = gcc_parent_data_1,
0562 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0563 .ops = &clk_rcg2_ops,
0564 },
0565 };
0566
0567 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = {
0568 .cmd_rcgr = 0x1d00c,
0569 .mnd_width = 8,
0570 .hid_width = 5,
0571 .parent_map = gcc_parent_map_0,
0572 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0573 .clkr.hw.init = &(struct clk_init_data){
0574 .name = "blsp1_qup3_spi_apps_clk_src",
0575 .parent_data = gcc_parent_data_0,
0576 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0577 .ops = &clk_rcg2_ops,
0578 },
0579 };
0580
0581 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = {
0582 .cmd_rcgr = 0x1f020,
0583 .mnd_width = 0,
0584 .hid_width = 5,
0585 .parent_map = gcc_parent_map_1,
0586 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0587 .clkr.hw.init = &(struct clk_init_data){
0588 .name = "blsp1_qup4_i2c_apps_clk_src",
0589 .parent_data = gcc_parent_data_1,
0590 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0591 .ops = &clk_rcg2_ops,
0592 },
0593 };
0594
0595 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = {
0596 .cmd_rcgr = 0x1f00c,
0597 .mnd_width = 8,
0598 .hid_width = 5,
0599 .parent_map = gcc_parent_map_0,
0600 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0601 .clkr.hw.init = &(struct clk_init_data){
0602 .name = "blsp1_qup4_spi_apps_clk_src",
0603 .parent_data = gcc_parent_data_0,
0604 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0605 .ops = &clk_rcg2_ops,
0606 },
0607 };
0608
0609 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = {
0610 .cmd_rcgr = 0x21020,
0611 .mnd_width = 0,
0612 .hid_width = 5,
0613 .parent_map = gcc_parent_map_1,
0614 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0615 .clkr.hw.init = &(struct clk_init_data){
0616 .name = "blsp1_qup5_i2c_apps_clk_src",
0617 .parent_data = gcc_parent_data_1,
0618 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0619 .ops = &clk_rcg2_ops,
0620 },
0621 };
0622
0623 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = {
0624 .cmd_rcgr = 0x2100c,
0625 .mnd_width = 8,
0626 .hid_width = 5,
0627 .parent_map = gcc_parent_map_0,
0628 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0629 .clkr.hw.init = &(struct clk_init_data){
0630 .name = "blsp1_qup5_spi_apps_clk_src",
0631 .parent_data = gcc_parent_data_0,
0632 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0633 .ops = &clk_rcg2_ops,
0634 },
0635 };
0636
0637 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = {
0638 .cmd_rcgr = 0x23020,
0639 .mnd_width = 0,
0640 .hid_width = 5,
0641 .parent_map = gcc_parent_map_1,
0642 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0643 .clkr.hw.init = &(struct clk_init_data){
0644 .name = "blsp1_qup6_i2c_apps_clk_src",
0645 .parent_data = gcc_parent_data_1,
0646 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0647 .ops = &clk_rcg2_ops,
0648 },
0649 };
0650
0651 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = {
0652 .cmd_rcgr = 0x2300c,
0653 .mnd_width = 8,
0654 .hid_width = 5,
0655 .parent_map = gcc_parent_map_0,
0656 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0657 .clkr.hw.init = &(struct clk_init_data){
0658 .name = "blsp1_qup6_spi_apps_clk_src",
0659 .parent_data = gcc_parent_data_0,
0660 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0661 .ops = &clk_rcg2_ops,
0662 },
0663 };
0664
0665 static const struct freq_tbl ftbl_blsp1_uart1_apps_clk_src[] = {
0666 F(3686400, P_GPLL0_OUT_MAIN, 1, 96, 15625),
0667 F(7372800, P_GPLL0_OUT_MAIN, 1, 192, 15625),
0668 F(14745600, P_GPLL0_OUT_MAIN, 1, 384, 15625),
0669 F(16000000, P_GPLL0_OUT_MAIN, 5, 2, 15),
0670 F(19200000, P_XO, 1, 0, 0),
0671 F(24000000, P_GPLL0_OUT_MAIN, 5, 1, 5),
0672 F(32000000, P_GPLL0_OUT_MAIN, 1, 4, 75),
0673 F(40000000, P_GPLL0_OUT_MAIN, 15, 0, 0),
0674 F(46400000, P_GPLL0_OUT_MAIN, 1, 29, 375),
0675 F(48000000, P_GPLL0_OUT_MAIN, 12.5, 0, 0),
0676 F(51200000, P_GPLL0_OUT_MAIN, 1, 32, 375),
0677 F(56000000, P_GPLL0_OUT_MAIN, 1, 7, 75),
0678 F(58982400, P_GPLL0_OUT_MAIN, 1, 1536, 15625),
0679 F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0),
0680 F(63157895, P_GPLL0_OUT_MAIN, 9.5, 0, 0),
0681 { }
0682 };
0683
0684 static struct clk_rcg2 blsp1_uart1_apps_clk_src = {
0685 .cmd_rcgr = 0x1a00c,
0686 .mnd_width = 16,
0687 .hid_width = 5,
0688 .parent_map = gcc_parent_map_0,
0689 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
0690 .clkr.hw.init = &(struct clk_init_data){
0691 .name = "blsp1_uart1_apps_clk_src",
0692 .parent_data = gcc_parent_data_0,
0693 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0694 .ops = &clk_rcg2_ops,
0695 },
0696 };
0697
0698 static struct clk_rcg2 blsp1_uart2_apps_clk_src = {
0699 .cmd_rcgr = 0x1c00c,
0700 .mnd_width = 16,
0701 .hid_width = 5,
0702 .parent_map = gcc_parent_map_0,
0703 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
0704 .clkr.hw.init = &(struct clk_init_data){
0705 .name = "blsp1_uart2_apps_clk_src",
0706 .parent_data = gcc_parent_data_0,
0707 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0708 .ops = &clk_rcg2_ops,
0709 },
0710 };
0711
0712 static struct clk_rcg2 blsp1_uart3_apps_clk_src = {
0713 .cmd_rcgr = 0x1e00c,
0714 .mnd_width = 16,
0715 .hid_width = 5,
0716 .parent_map = gcc_parent_map_0,
0717 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
0718 .clkr.hw.init = &(struct clk_init_data){
0719 .name = "blsp1_uart3_apps_clk_src",
0720 .parent_data = gcc_parent_data_0,
0721 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0722 .ops = &clk_rcg2_ops,
0723 },
0724 };
0725
0726 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src = {
0727 .cmd_rcgr = 0x26020,
0728 .mnd_width = 0,
0729 .hid_width = 5,
0730 .parent_map = gcc_parent_map_1,
0731 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0732 .clkr.hw.init = &(struct clk_init_data){
0733 .name = "blsp2_qup1_i2c_apps_clk_src",
0734 .parent_data = gcc_parent_data_1,
0735 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0736 .ops = &clk_rcg2_ops,
0737 },
0738 };
0739
0740 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src = {
0741 .cmd_rcgr = 0x2600c,
0742 .mnd_width = 8,
0743 .hid_width = 5,
0744 .parent_map = gcc_parent_map_0,
0745 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0746 .clkr.hw.init = &(struct clk_init_data){
0747 .name = "blsp2_qup1_spi_apps_clk_src",
0748 .parent_data = gcc_parent_data_0,
0749 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0750 .ops = &clk_rcg2_ops,
0751 },
0752 };
0753
0754 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src = {
0755 .cmd_rcgr = 0x28020,
0756 .mnd_width = 0,
0757 .hid_width = 5,
0758 .parent_map = gcc_parent_map_1,
0759 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0760 .clkr.hw.init = &(struct clk_init_data){
0761 .name = "blsp2_qup2_i2c_apps_clk_src",
0762 .parent_data = gcc_parent_data_1,
0763 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0764 .ops = &clk_rcg2_ops,
0765 },
0766 };
0767
0768 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src = {
0769 .cmd_rcgr = 0x2800c,
0770 .mnd_width = 8,
0771 .hid_width = 5,
0772 .parent_map = gcc_parent_map_0,
0773 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0774 .clkr.hw.init = &(struct clk_init_data){
0775 .name = "blsp2_qup2_spi_apps_clk_src",
0776 .parent_data = gcc_parent_data_0,
0777 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0778 .ops = &clk_rcg2_ops,
0779 },
0780 };
0781
0782 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src = {
0783 .cmd_rcgr = 0x2a020,
0784 .mnd_width = 0,
0785 .hid_width = 5,
0786 .parent_map = gcc_parent_map_1,
0787 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0788 .clkr.hw.init = &(struct clk_init_data){
0789 .name = "blsp2_qup3_i2c_apps_clk_src",
0790 .parent_data = gcc_parent_data_1,
0791 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0792 .ops = &clk_rcg2_ops,
0793 },
0794 };
0795
0796 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src = {
0797 .cmd_rcgr = 0x2a00c,
0798 .mnd_width = 8,
0799 .hid_width = 5,
0800 .parent_map = gcc_parent_map_0,
0801 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0802 .clkr.hw.init = &(struct clk_init_data){
0803 .name = "blsp2_qup3_spi_apps_clk_src",
0804 .parent_data = gcc_parent_data_0,
0805 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0806 .ops = &clk_rcg2_ops,
0807 },
0808 };
0809
0810 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src = {
0811 .cmd_rcgr = 0x2c020,
0812 .mnd_width = 0,
0813 .hid_width = 5,
0814 .parent_map = gcc_parent_map_1,
0815 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0816 .clkr.hw.init = &(struct clk_init_data){
0817 .name = "blsp2_qup4_i2c_apps_clk_src",
0818 .parent_data = gcc_parent_data_1,
0819 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0820 .ops = &clk_rcg2_ops,
0821 },
0822 };
0823
0824 static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src = {
0825 .cmd_rcgr = 0x2c00c,
0826 .mnd_width = 8,
0827 .hid_width = 5,
0828 .parent_map = gcc_parent_map_0,
0829 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0830 .clkr.hw.init = &(struct clk_init_data){
0831 .name = "blsp2_qup4_spi_apps_clk_src",
0832 .parent_data = gcc_parent_data_0,
0833 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0834 .ops = &clk_rcg2_ops,
0835 },
0836 };
0837
0838 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src = {
0839 .cmd_rcgr = 0x2e020,
0840 .mnd_width = 0,
0841 .hid_width = 5,
0842 .parent_map = gcc_parent_map_1,
0843 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0844 .clkr.hw.init = &(struct clk_init_data){
0845 .name = "blsp2_qup5_i2c_apps_clk_src",
0846 .parent_data = gcc_parent_data_1,
0847 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0848 .ops = &clk_rcg2_ops,
0849 },
0850 };
0851
0852 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src = {
0853 .cmd_rcgr = 0x2e00c,
0854 .mnd_width = 8,
0855 .hid_width = 5,
0856 .parent_map = gcc_parent_map_0,
0857 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0858 .clkr.hw.init = &(struct clk_init_data){
0859 .name = "blsp2_qup5_spi_apps_clk_src",
0860 .parent_data = gcc_parent_data_0,
0861 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0862 .ops = &clk_rcg2_ops,
0863 },
0864 };
0865
0866 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src = {
0867 .cmd_rcgr = 0x30020,
0868 .mnd_width = 0,
0869 .hid_width = 5,
0870 .parent_map = gcc_parent_map_1,
0871 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
0872 .clkr.hw.init = &(struct clk_init_data){
0873 .name = "blsp2_qup6_i2c_apps_clk_src",
0874 .parent_data = gcc_parent_data_1,
0875 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
0876 .ops = &clk_rcg2_ops,
0877 },
0878 };
0879
0880 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src = {
0881 .cmd_rcgr = 0x3000c,
0882 .mnd_width = 8,
0883 .hid_width = 5,
0884 .parent_map = gcc_parent_map_0,
0885 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
0886 .clkr.hw.init = &(struct clk_init_data){
0887 .name = "blsp2_qup6_spi_apps_clk_src",
0888 .parent_data = gcc_parent_data_0,
0889 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0890 .ops = &clk_rcg2_ops,
0891 },
0892 };
0893
0894 static struct clk_rcg2 blsp2_uart1_apps_clk_src = {
0895 .cmd_rcgr = 0x2700c,
0896 .mnd_width = 16,
0897 .hid_width = 5,
0898 .parent_map = gcc_parent_map_0,
0899 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
0900 .clkr.hw.init = &(struct clk_init_data){
0901 .name = "blsp2_uart1_apps_clk_src",
0902 .parent_data = gcc_parent_data_0,
0903 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0904 .ops = &clk_rcg2_ops,
0905 },
0906 };
0907
0908 static struct clk_rcg2 blsp2_uart2_apps_clk_src = {
0909 .cmd_rcgr = 0x2900c,
0910 .mnd_width = 16,
0911 .hid_width = 5,
0912 .parent_map = gcc_parent_map_0,
0913 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
0914 .clkr.hw.init = &(struct clk_init_data){
0915 .name = "blsp2_uart2_apps_clk_src",
0916 .parent_data = gcc_parent_data_0,
0917 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0918 .ops = &clk_rcg2_ops,
0919 },
0920 };
0921
0922 static struct clk_rcg2 blsp2_uart3_apps_clk_src = {
0923 .cmd_rcgr = 0x2b00c,
0924 .mnd_width = 16,
0925 .hid_width = 5,
0926 .parent_map = gcc_parent_map_0,
0927 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
0928 .clkr.hw.init = &(struct clk_init_data){
0929 .name = "blsp2_uart3_apps_clk_src",
0930 .parent_data = gcc_parent_data_0,
0931 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
0932 .ops = &clk_rcg2_ops,
0933 },
0934 };
0935
0936 static const struct freq_tbl ftbl_gp1_clk_src[] = {
0937 F(19200000, P_XO, 1, 0, 0),
0938 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
0939 F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
0940 { }
0941 };
0942
0943 static struct clk_rcg2 gp1_clk_src = {
0944 .cmd_rcgr = 0x64004,
0945 .mnd_width = 8,
0946 .hid_width = 5,
0947 .parent_map = gcc_parent_map_2,
0948 .freq_tbl = ftbl_gp1_clk_src,
0949 .clkr.hw.init = &(struct clk_init_data){
0950 .name = "gp1_clk_src",
0951 .parent_data = gcc_parent_data_2,
0952 .num_parents = ARRAY_SIZE(gcc_parent_data_2),
0953 .ops = &clk_rcg2_ops,
0954 },
0955 };
0956
0957 static struct clk_rcg2 gp2_clk_src = {
0958 .cmd_rcgr = 0x65004,
0959 .mnd_width = 8,
0960 .hid_width = 5,
0961 .parent_map = gcc_parent_map_2,
0962 .freq_tbl = ftbl_gp1_clk_src,
0963 .clkr.hw.init = &(struct clk_init_data){
0964 .name = "gp2_clk_src",
0965 .parent_data = gcc_parent_data_2,
0966 .num_parents = ARRAY_SIZE(gcc_parent_data_2),
0967 .ops = &clk_rcg2_ops,
0968 },
0969 };
0970
0971 static struct clk_rcg2 gp3_clk_src = {
0972 .cmd_rcgr = 0x66004,
0973 .mnd_width = 8,
0974 .hid_width = 5,
0975 .parent_map = gcc_parent_map_2,
0976 .freq_tbl = ftbl_gp1_clk_src,
0977 .clkr.hw.init = &(struct clk_init_data){
0978 .name = "gp3_clk_src",
0979 .parent_data = gcc_parent_data_2,
0980 .num_parents = ARRAY_SIZE(gcc_parent_data_2),
0981 .ops = &clk_rcg2_ops,
0982 },
0983 };
0984
0985 static const struct freq_tbl ftbl_hmss_ahb_clk_src[] = {
0986 F(19200000, P_XO, 1, 0, 0),
0987 F(37500000, P_GPLL0_OUT_MAIN, 16, 0, 0),
0988 F(75000000, P_GPLL0_OUT_MAIN, 8, 0, 0),
0989 { }
0990 };
0991
0992 static struct clk_rcg2 hmss_ahb_clk_src = {
0993 .cmd_rcgr = 0x48014,
0994 .mnd_width = 0,
0995 .hid_width = 5,
0996 .parent_map = gcc_parent_map_1,
0997 .freq_tbl = ftbl_hmss_ahb_clk_src,
0998 .clkr.hw.init = &(struct clk_init_data){
0999 .name = "hmss_ahb_clk_src",
1000 .parent_data = gcc_parent_data_1,
1001 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1002 .ops = &clk_rcg2_ops,
1003 },
1004 };
1005
1006 static const struct freq_tbl ftbl_hmss_rbcpr_clk_src[] = {
1007 F(19200000, P_XO, 1, 0, 0),
1008 { }
1009 };
1010
1011 static struct clk_rcg2 hmss_rbcpr_clk_src = {
1012 .cmd_rcgr = 0x48044,
1013 .mnd_width = 0,
1014 .hid_width = 5,
1015 .parent_map = gcc_parent_map_1,
1016 .freq_tbl = ftbl_hmss_rbcpr_clk_src,
1017 .clkr.hw.init = &(struct clk_init_data){
1018 .name = "hmss_rbcpr_clk_src",
1019 .parent_data = gcc_parent_data_1,
1020 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1021 .ops = &clk_rcg2_ops,
1022 },
1023 };
1024
1025 static const struct freq_tbl ftbl_pcie_aux_clk_src[] = {
1026 F(1010526, P_XO, 1, 1, 19),
1027 { }
1028 };
1029
1030 static struct clk_rcg2 pcie_aux_clk_src = {
1031 .cmd_rcgr = 0x6c000,
1032 .mnd_width = 16,
1033 .hid_width = 5,
1034 .parent_map = gcc_parent_map_3,
1035 .freq_tbl = ftbl_pcie_aux_clk_src,
1036 .clkr.hw.init = &(struct clk_init_data){
1037 .name = "pcie_aux_clk_src",
1038 .parent_data = gcc_parent_data_3,
1039 .num_parents = ARRAY_SIZE(gcc_parent_data_3),
1040 .ops = &clk_rcg2_ops,
1041 },
1042 };
1043
1044 static const struct freq_tbl ftbl_pdm2_clk_src[] = {
1045 F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0),
1046 { }
1047 };
1048
1049 static struct clk_rcg2 pdm2_clk_src = {
1050 .cmd_rcgr = 0x33010,
1051 .mnd_width = 0,
1052 .hid_width = 5,
1053 .parent_map = gcc_parent_map_1,
1054 .freq_tbl = ftbl_pdm2_clk_src,
1055 .clkr.hw.init = &(struct clk_init_data){
1056 .name = "pdm2_clk_src",
1057 .parent_data = gcc_parent_data_1,
1058 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1059 .ops = &clk_rcg2_ops,
1060 },
1061 };
1062
1063 static const struct freq_tbl ftbl_sdcc2_apps_clk_src[] = {
1064 F(144000, P_XO, 16, 3, 25),
1065 F(400000, P_XO, 12, 1, 4),
1066 F(20000000, P_GPLL0_OUT_MAIN, 15, 1, 2),
1067 F(25000000, P_GPLL0_OUT_MAIN, 12, 1, 2),
1068 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
1069 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
1070 F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
1071 { }
1072 };
1073
1074 static struct clk_rcg2 sdcc2_apps_clk_src = {
1075 .cmd_rcgr = 0x14010,
1076 .mnd_width = 8,
1077 .hid_width = 5,
1078 .parent_map = gcc_parent_map_4,
1079 .freq_tbl = ftbl_sdcc2_apps_clk_src,
1080 .clkr.hw.init = &(struct clk_init_data){
1081 .name = "sdcc2_apps_clk_src",
1082 .parent_data = gcc_parent_data_4,
1083 .num_parents = ARRAY_SIZE(gcc_parent_data_4),
1084 .ops = &clk_rcg2_floor_ops,
1085 },
1086 };
1087
1088 static const struct freq_tbl ftbl_sdcc4_apps_clk_src[] = {
1089 F(144000, P_XO, 16, 3, 25),
1090 F(400000, P_XO, 12, 1, 4),
1091 F(20000000, P_GPLL0_OUT_MAIN, 15, 1, 2),
1092 F(25000000, P_GPLL0_OUT_MAIN, 12, 1, 2),
1093 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
1094 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
1095 { }
1096 };
1097
1098 static struct clk_rcg2 sdcc4_apps_clk_src = {
1099 .cmd_rcgr = 0x16010,
1100 .mnd_width = 8,
1101 .hid_width = 5,
1102 .parent_map = gcc_parent_map_1,
1103 .freq_tbl = ftbl_sdcc4_apps_clk_src,
1104 .clkr.hw.init = &(struct clk_init_data){
1105 .name = "sdcc4_apps_clk_src",
1106 .parent_data = gcc_parent_data_1,
1107 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1108 .ops = &clk_rcg2_floor_ops,
1109 },
1110 };
1111
1112 static const struct freq_tbl ftbl_tsif_ref_clk_src[] = {
1113 F(105495, P_XO, 1, 1, 182),
1114 { }
1115 };
1116
1117 static struct clk_rcg2 tsif_ref_clk_src = {
1118 .cmd_rcgr = 0x36010,
1119 .mnd_width = 8,
1120 .hid_width = 5,
1121 .parent_map = gcc_parent_map_5,
1122 .freq_tbl = ftbl_tsif_ref_clk_src,
1123 .clkr.hw.init = &(struct clk_init_data){
1124 .name = "tsif_ref_clk_src",
1125 .parent_data = gcc_parent_data_5,
1126 .num_parents = ARRAY_SIZE(gcc_parent_data_5),
1127 .ops = &clk_rcg2_ops,
1128 },
1129 };
1130
1131 static const struct freq_tbl ftbl_ufs_axi_clk_src[] = {
1132 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
1133 F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
1134 F(240000000, P_GPLL0_OUT_MAIN, 2.5, 0, 0),
1135 { }
1136 };
1137
1138 static struct clk_rcg2 ufs_axi_clk_src = {
1139 .cmd_rcgr = 0x75018,
1140 .mnd_width = 8,
1141 .hid_width = 5,
1142 .parent_map = gcc_parent_map_0,
1143 .freq_tbl = ftbl_ufs_axi_clk_src,
1144 .clkr.hw.init = &(struct clk_init_data){
1145 .name = "ufs_axi_clk_src",
1146 .parent_data = gcc_parent_data_0,
1147 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1148 .ops = &clk_rcg2_ops,
1149 },
1150 };
1151
1152 static const struct freq_tbl ftbl_ufs_unipro_core_clk_src[] = {
1153 F(37500000, P_GPLL0_OUT_MAIN, 16, 0, 0),
1154 F(75000000, P_GPLL0_OUT_MAIN, 8, 0, 0),
1155 F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
1156 { }
1157 };
1158
1159 static struct clk_rcg2 ufs_unipro_core_clk_src = {
1160 .cmd_rcgr = 0x76028,
1161 .mnd_width = 8,
1162 .hid_width = 5,
1163 .parent_map = gcc_parent_map_0,
1164 .freq_tbl = ftbl_ufs_unipro_core_clk_src,
1165 .clkr.hw.init = &(struct clk_init_data){
1166 .name = "ufs_unipro_core_clk_src",
1167 .parent_data = gcc_parent_data_0,
1168 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1169 .ops = &clk_rcg2_ops,
1170 },
1171 };
1172
1173 static const struct freq_tbl ftbl_usb30_master_clk_src[] = {
1174 F(19200000, P_XO, 1, 0, 0),
1175 F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0),
1176 F(120000000, P_GPLL0_OUT_MAIN, 5, 0, 0),
1177 F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
1178 { }
1179 };
1180
1181 static struct clk_rcg2 usb30_master_clk_src = {
1182 .cmd_rcgr = 0xf014,
1183 .mnd_width = 8,
1184 .hid_width = 5,
1185 .parent_map = gcc_parent_map_0,
1186 .freq_tbl = ftbl_usb30_master_clk_src,
1187 .clkr.hw.init = &(struct clk_init_data){
1188 .name = "usb30_master_clk_src",
1189 .parent_data = gcc_parent_data_0,
1190 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1191 .ops = &clk_rcg2_ops,
1192 },
1193 };
1194
1195 static struct clk_rcg2 usb30_mock_utmi_clk_src = {
1196 .cmd_rcgr = 0xf028,
1197 .mnd_width = 0,
1198 .hid_width = 5,
1199 .parent_map = gcc_parent_map_0,
1200 .freq_tbl = ftbl_hmss_rbcpr_clk_src,
1201 .clkr.hw.init = &(struct clk_init_data){
1202 .name = "usb30_mock_utmi_clk_src",
1203 .parent_data = gcc_parent_data_0,
1204 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1205 .ops = &clk_rcg2_ops,
1206 },
1207 };
1208
1209 static const struct freq_tbl ftbl_usb3_phy_aux_clk_src[] = {
1210 F(1200000, P_XO, 16, 0, 0),
1211 { }
1212 };
1213
1214 static struct clk_rcg2 usb3_phy_aux_clk_src = {
1215 .cmd_rcgr = 0x5000c,
1216 .mnd_width = 0,
1217 .hid_width = 5,
1218 .parent_map = gcc_parent_map_3,
1219 .freq_tbl = ftbl_usb3_phy_aux_clk_src,
1220 .clkr.hw.init = &(struct clk_init_data){
1221 .name = "usb3_phy_aux_clk_src",
1222 .parent_data = gcc_parent_data_3,
1223 .num_parents = ARRAY_SIZE(gcc_parent_data_3),
1224 .ops = &clk_rcg2_ops,
1225 },
1226 };
1227
1228 static struct clk_branch gcc_aggre1_noc_xo_clk = {
1229 .halt_reg = 0x8202c,
1230 .halt_check = BRANCH_HALT,
1231 .clkr = {
1232 .enable_reg = 0x8202c,
1233 .enable_mask = BIT(0),
1234 .hw.init = &(struct clk_init_data){
1235 .name = "gcc_aggre1_noc_xo_clk",
1236 .ops = &clk_branch2_ops,
1237 },
1238 },
1239 };
1240
1241 static struct clk_branch gcc_aggre1_ufs_axi_clk = {
1242 .halt_reg = 0x82028,
1243 .halt_check = BRANCH_HALT,
1244 .clkr = {
1245 .enable_reg = 0x82028,
1246 .enable_mask = BIT(0),
1247 .hw.init = &(struct clk_init_data){
1248 .name = "gcc_aggre1_ufs_axi_clk",
1249 .parent_hws = (const struct clk_hw *[]) {
1250 &ufs_axi_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_aggre1_usb3_axi_clk = {
1260 .halt_reg = 0x82024,
1261 .halt_check = BRANCH_HALT,
1262 .clkr = {
1263 .enable_reg = 0x82024,
1264 .enable_mask = BIT(0),
1265 .hw.init = &(struct clk_init_data){
1266 .name = "gcc_aggre1_usb3_axi_clk",
1267 .parent_hws = (const struct clk_hw *[]) {
1268 &usb30_master_clk_src.clkr.hw,
1269 },
1270 .num_parents = 1,
1271 .flags = CLK_SET_RATE_PARENT,
1272 .ops = &clk_branch2_ops,
1273 },
1274 },
1275 };
1276
1277 static struct clk_branch gcc_apss_qdss_tsctr_div2_clk = {
1278 .halt_reg = 0x48090,
1279 .halt_check = BRANCH_HALT,
1280 .clkr = {
1281 .enable_reg = 0x48090,
1282 .enable_mask = BIT(0),
1283 .hw.init = &(struct clk_init_data){
1284 .name = "gcc_apss_qdss_tsctr_div2_clk",
1285 .ops = &clk_branch2_ops,
1286 },
1287 },
1288 };
1289
1290 static struct clk_branch gcc_apss_qdss_tsctr_div8_clk = {
1291 .halt_reg = 0x48094,
1292 .halt_check = BRANCH_HALT,
1293 .clkr = {
1294 .enable_reg = 0x48094,
1295 .enable_mask = BIT(0),
1296 .hw.init = &(struct clk_init_data){
1297 .name = "gcc_apss_qdss_tsctr_div8_clk",
1298 .ops = &clk_branch2_ops,
1299 },
1300 },
1301 };
1302
1303 static struct clk_branch gcc_bimc_hmss_axi_clk = {
1304 .halt_reg = 0x48004,
1305 .halt_check = BRANCH_HALT_VOTED,
1306 .clkr = {
1307 .enable_reg = 0x52004,
1308 .enable_mask = BIT(22),
1309 .hw.init = &(struct clk_init_data){
1310 .name = "gcc_bimc_hmss_axi_clk",
1311 .ops = &clk_branch2_ops,
1312 },
1313 },
1314 };
1315
1316 static struct clk_branch gcc_bimc_mss_q6_axi_clk = {
1317 .halt_reg = 0x4401c,
1318 .halt_check = BRANCH_HALT,
1319 .clkr = {
1320 .enable_reg = 0x4401c,
1321 .enable_mask = BIT(0),
1322 .hw.init = &(struct clk_init_data){
1323 .name = "gcc_bimc_mss_q6_axi_clk",
1324 .ops = &clk_branch2_ops,
1325 },
1326 },
1327 };
1328
1329 static struct clk_branch gcc_mss_cfg_ahb_clk = {
1330 .halt_reg = 0x8a000,
1331 .halt_check = BRANCH_HALT,
1332 .clkr = {
1333 .enable_reg = 0x8a000,
1334 .enable_mask = BIT(0),
1335 .hw.init = &(struct clk_init_data){
1336 .name = "gcc_mss_cfg_ahb_clk",
1337 .ops = &clk_branch2_ops,
1338 },
1339 },
1340 };
1341
1342 static struct clk_branch gcc_mss_snoc_axi_clk = {
1343 .halt_reg = 0x8a03c,
1344 .halt_check = BRANCH_HALT,
1345 .clkr = {
1346 .enable_reg = 0x8a03c,
1347 .enable_mask = BIT(0),
1348 .hw.init = &(struct clk_init_data){
1349 .name = "gcc_mss_snoc_axi_clk",
1350 .ops = &clk_branch2_ops,
1351 },
1352 },
1353 };
1354
1355 static struct clk_branch gcc_mss_mnoc_bimc_axi_clk = {
1356 .halt_reg = 0x8a004,
1357 .halt_check = BRANCH_HALT,
1358 .clkr = {
1359 .enable_reg = 0x8a004,
1360 .enable_mask = BIT(0),
1361 .hw.init = &(struct clk_init_data){
1362 .name = "gcc_mss_mnoc_bimc_axi_clk",
1363 .ops = &clk_branch2_ops,
1364 },
1365 },
1366 };
1367
1368 static struct clk_branch gcc_boot_rom_ahb_clk = {
1369 .halt_reg = 0x38004,
1370 .halt_check = BRANCH_HALT_VOTED,
1371 .hwcg_reg = 0x38004,
1372 .hwcg_bit = 1,
1373 .clkr = {
1374 .enable_reg = 0x52004,
1375 .enable_mask = BIT(10),
1376 .hw.init = &(struct clk_init_data){
1377 .name = "gcc_boot_rom_ahb_clk",
1378 .ops = &clk_branch2_ops,
1379 },
1380 },
1381 };
1382
1383 static struct clk_branch gcc_mmss_gpll0_clk = {
1384 .halt_check = BRANCH_HALT_DELAY,
1385 .clkr = {
1386 .enable_reg = 0x5200c,
1387 .enable_mask = BIT(1),
1388 .hw.init = &(struct clk_init_data){
1389 .name = "gcc_mmss_gpll0_clk",
1390 .parent_hws = (const struct clk_hw *[]) {
1391 &gpll0_out_main.clkr.hw,
1392 },
1393 .num_parents = 1,
1394 .ops = &clk_branch2_ops,
1395 },
1396 },
1397 };
1398
1399 static struct clk_branch gcc_mss_gpll0_div_clk_src = {
1400 .halt_check = BRANCH_HALT_DELAY,
1401 .clkr = {
1402 .enable_reg = 0x5200c,
1403 .enable_mask = BIT(2),
1404 .hw.init = &(struct clk_init_data){
1405 .name = "gcc_mss_gpll0_div_clk_src",
1406 .ops = &clk_branch2_ops,
1407 },
1408 },
1409 };
1410
1411 static struct clk_branch gcc_blsp1_ahb_clk = {
1412 .halt_reg = 0x17004,
1413 .halt_check = BRANCH_HALT_VOTED,
1414 .clkr = {
1415 .enable_reg = 0x52004,
1416 .enable_mask = BIT(17),
1417 .hw.init = &(struct clk_init_data){
1418 .name = "gcc_blsp1_ahb_clk",
1419 .ops = &clk_branch2_ops,
1420 },
1421 },
1422 };
1423
1424 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = {
1425 .halt_reg = 0x19008,
1426 .halt_check = BRANCH_HALT,
1427 .clkr = {
1428 .enable_reg = 0x19008,
1429 .enable_mask = BIT(0),
1430 .hw.init = &(struct clk_init_data){
1431 .name = "gcc_blsp1_qup1_i2c_apps_clk",
1432 .parent_hws = (const struct clk_hw *[]) {
1433 &blsp1_qup1_i2c_apps_clk_src.clkr.hw,
1434 },
1435 .num_parents = 1,
1436 .flags = CLK_SET_RATE_PARENT,
1437 .ops = &clk_branch2_ops,
1438 },
1439 },
1440 };
1441
1442 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = {
1443 .halt_reg = 0x19004,
1444 .halt_check = BRANCH_HALT,
1445 .clkr = {
1446 .enable_reg = 0x19004,
1447 .enable_mask = BIT(0),
1448 .hw.init = &(struct clk_init_data){
1449 .name = "gcc_blsp1_qup1_spi_apps_clk",
1450 .parent_hws = (const struct clk_hw *[]) {
1451 &blsp1_qup1_spi_apps_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_blsp1_qup2_i2c_apps_clk = {
1461 .halt_reg = 0x1b008,
1462 .halt_check = BRANCH_HALT,
1463 .clkr = {
1464 .enable_reg = 0x1b008,
1465 .enable_mask = BIT(0),
1466 .hw.init = &(struct clk_init_data){
1467 .name = "gcc_blsp1_qup2_i2c_apps_clk",
1468 .parent_hws = (const struct clk_hw *[]) {
1469 &blsp1_qup2_i2c_apps_clk_src.clkr.hw,
1470 },
1471 .num_parents = 1,
1472 .flags = CLK_SET_RATE_PARENT,
1473 .ops = &clk_branch2_ops,
1474 },
1475 },
1476 };
1477
1478 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
1479 .halt_reg = 0x1b004,
1480 .halt_check = BRANCH_HALT,
1481 .clkr = {
1482 .enable_reg = 0x1b004,
1483 .enable_mask = BIT(0),
1484 .hw.init = &(struct clk_init_data){
1485 .name = "gcc_blsp1_qup2_spi_apps_clk",
1486 .parent_hws = (const struct clk_hw *[]) {
1487 &blsp1_qup2_spi_apps_clk_src.clkr.hw,
1488 },
1489 .num_parents = 1,
1490 .flags = CLK_SET_RATE_PARENT,
1491 .ops = &clk_branch2_ops,
1492 },
1493 },
1494 };
1495
1496 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = {
1497 .halt_reg = 0x1d008,
1498 .halt_check = BRANCH_HALT,
1499 .clkr = {
1500 .enable_reg = 0x1d008,
1501 .enable_mask = BIT(0),
1502 .hw.init = &(struct clk_init_data){
1503 .name = "gcc_blsp1_qup3_i2c_apps_clk",
1504 .parent_hws = (const struct clk_hw *[]) {
1505 &blsp1_qup3_i2c_apps_clk_src.clkr.hw,
1506 },
1507 .num_parents = 1,
1508 .flags = CLK_SET_RATE_PARENT,
1509 .ops = &clk_branch2_ops,
1510 },
1511 },
1512 };
1513
1514 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = {
1515 .halt_reg = 0x1d004,
1516 .halt_check = BRANCH_HALT,
1517 .clkr = {
1518 .enable_reg = 0x1d004,
1519 .enable_mask = BIT(0),
1520 .hw.init = &(struct clk_init_data){
1521 .name = "gcc_blsp1_qup3_spi_apps_clk",
1522 .parent_hws = (const struct clk_hw *[]) {
1523 &blsp1_qup3_spi_apps_clk_src.clkr.hw,
1524 },
1525 .num_parents = 1,
1526 .flags = CLK_SET_RATE_PARENT,
1527 .ops = &clk_branch2_ops,
1528 },
1529 },
1530 };
1531
1532 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = {
1533 .halt_reg = 0x1f008,
1534 .halt_check = BRANCH_HALT,
1535 .clkr = {
1536 .enable_reg = 0x1f008,
1537 .enable_mask = BIT(0),
1538 .hw.init = &(struct clk_init_data){
1539 .name = "gcc_blsp1_qup4_i2c_apps_clk",
1540 .parent_hws = (const struct clk_hw *[]) {
1541 &blsp1_qup4_i2c_apps_clk_src.clkr.hw,
1542 },
1543 .num_parents = 1,
1544 .flags = CLK_SET_RATE_PARENT,
1545 .ops = &clk_branch2_ops,
1546 },
1547 },
1548 };
1549
1550 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = {
1551 .halt_reg = 0x1f004,
1552 .halt_check = BRANCH_HALT,
1553 .clkr = {
1554 .enable_reg = 0x1f004,
1555 .enable_mask = BIT(0),
1556 .hw.init = &(struct clk_init_data){
1557 .name = "gcc_blsp1_qup4_spi_apps_clk",
1558 .parent_hws = (const struct clk_hw *[]) {
1559 &blsp1_qup4_spi_apps_clk_src.clkr.hw,
1560 },
1561 .num_parents = 1,
1562 .flags = CLK_SET_RATE_PARENT,
1563 .ops = &clk_branch2_ops,
1564 },
1565 },
1566 };
1567
1568 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = {
1569 .halt_reg = 0x21008,
1570 .halt_check = BRANCH_HALT,
1571 .clkr = {
1572 .enable_reg = 0x21008,
1573 .enable_mask = BIT(0),
1574 .hw.init = &(struct clk_init_data){
1575 .name = "gcc_blsp1_qup5_i2c_apps_clk",
1576 .parent_hws = (const struct clk_hw *[]) {
1577 &blsp1_qup5_i2c_apps_clk_src.clkr.hw,
1578 },
1579 .num_parents = 1,
1580 .flags = CLK_SET_RATE_PARENT,
1581 .ops = &clk_branch2_ops,
1582 },
1583 },
1584 };
1585
1586 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
1587 .halt_reg = 0x21004,
1588 .halt_check = BRANCH_HALT,
1589 .clkr = {
1590 .enable_reg = 0x21004,
1591 .enable_mask = BIT(0),
1592 .hw.init = &(struct clk_init_data){
1593 .name = "gcc_blsp1_qup5_spi_apps_clk",
1594 .parent_hws = (const struct clk_hw *[]) {
1595 &blsp1_qup5_spi_apps_clk_src.clkr.hw,
1596 },
1597 .num_parents = 1,
1598 .flags = CLK_SET_RATE_PARENT,
1599 .ops = &clk_branch2_ops,
1600 },
1601 },
1602 };
1603
1604 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = {
1605 .halt_reg = 0x23008,
1606 .halt_check = BRANCH_HALT,
1607 .clkr = {
1608 .enable_reg = 0x23008,
1609 .enable_mask = BIT(0),
1610 .hw.init = &(struct clk_init_data){
1611 .name = "gcc_blsp1_qup6_i2c_apps_clk",
1612 .parent_hws = (const struct clk_hw *[]) {
1613 &blsp1_qup6_i2c_apps_clk_src.clkr.hw,
1614 },
1615 .num_parents = 1,
1616 .flags = CLK_SET_RATE_PARENT,
1617 .ops = &clk_branch2_ops,
1618 },
1619 },
1620 };
1621
1622 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
1623 .halt_reg = 0x23004,
1624 .halt_check = BRANCH_HALT,
1625 .clkr = {
1626 .enable_reg = 0x23004,
1627 .enable_mask = BIT(0),
1628 .hw.init = &(struct clk_init_data){
1629 .name = "gcc_blsp1_qup6_spi_apps_clk",
1630 .parent_hws = (const struct clk_hw *[]) {
1631 &blsp1_qup6_spi_apps_clk_src.clkr.hw,
1632 },
1633 .num_parents = 1,
1634 .flags = CLK_SET_RATE_PARENT,
1635 .ops = &clk_branch2_ops,
1636 },
1637 },
1638 };
1639
1640 static struct clk_branch gcc_blsp1_sleep_clk = {
1641 .halt_reg = 0x17008,
1642 .halt_check = BRANCH_HALT_VOTED,
1643 .clkr = {
1644 .enable_reg = 0x52004,
1645 .enable_mask = BIT(16),
1646 .hw.init = &(struct clk_init_data){
1647 .name = "gcc_blsp1_sleep_clk",
1648 .ops = &clk_branch2_ops,
1649 },
1650 },
1651 };
1652
1653 static struct clk_branch gcc_blsp1_uart1_apps_clk = {
1654 .halt_reg = 0x1a004,
1655 .halt_check = BRANCH_HALT,
1656 .clkr = {
1657 .enable_reg = 0x1a004,
1658 .enable_mask = BIT(0),
1659 .hw.init = &(struct clk_init_data){
1660 .name = "gcc_blsp1_uart1_apps_clk",
1661 .parent_hws = (const struct clk_hw *[]) {
1662 &blsp1_uart1_apps_clk_src.clkr.hw,
1663 },
1664 .num_parents = 1,
1665 .flags = CLK_SET_RATE_PARENT,
1666 .ops = &clk_branch2_ops,
1667 },
1668 },
1669 };
1670
1671 static struct clk_branch gcc_blsp1_uart2_apps_clk = {
1672 .halt_reg = 0x1c004,
1673 .halt_check = BRANCH_HALT,
1674 .clkr = {
1675 .enable_reg = 0x1c004,
1676 .enable_mask = BIT(0),
1677 .hw.init = &(struct clk_init_data){
1678 .name = "gcc_blsp1_uart2_apps_clk",
1679 .parent_hws = (const struct clk_hw *[]) {
1680 &blsp1_uart2_apps_clk_src.clkr.hw,
1681 },
1682 .num_parents = 1,
1683 .flags = CLK_SET_RATE_PARENT,
1684 .ops = &clk_branch2_ops,
1685 },
1686 },
1687 };
1688
1689 static struct clk_branch gcc_blsp1_uart3_apps_clk = {
1690 .halt_reg = 0x1e004,
1691 .halt_check = BRANCH_HALT,
1692 .clkr = {
1693 .enable_reg = 0x1e004,
1694 .enable_mask = BIT(0),
1695 .hw.init = &(struct clk_init_data){
1696 .name = "gcc_blsp1_uart3_apps_clk",
1697 .parent_hws = (const struct clk_hw *[]) {
1698 &blsp1_uart3_apps_clk_src.clkr.hw,
1699 },
1700 .num_parents = 1,
1701 .flags = CLK_SET_RATE_PARENT,
1702 .ops = &clk_branch2_ops,
1703 },
1704 },
1705 };
1706
1707 static struct clk_branch gcc_blsp2_ahb_clk = {
1708 .halt_reg = 0x25004,
1709 .halt_check = BRANCH_HALT_VOTED,
1710 .clkr = {
1711 .enable_reg = 0x52004,
1712 .enable_mask = BIT(15),
1713 .hw.init = &(struct clk_init_data){
1714 .name = "gcc_blsp2_ahb_clk",
1715 .ops = &clk_branch2_ops,
1716 },
1717 },
1718 };
1719
1720 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk = {
1721 .halt_reg = 0x26008,
1722 .halt_check = BRANCH_HALT,
1723 .clkr = {
1724 .enable_reg = 0x26008,
1725 .enable_mask = BIT(0),
1726 .hw.init = &(struct clk_init_data){
1727 .name = "gcc_blsp2_qup1_i2c_apps_clk",
1728 .parent_hws = (const struct clk_hw *[]) {
1729 &blsp2_qup1_i2c_apps_clk_src.clkr.hw,
1730 },
1731 .num_parents = 1,
1732 .flags = CLK_SET_RATE_PARENT,
1733 .ops = &clk_branch2_ops,
1734 },
1735 },
1736 };
1737
1738 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk = {
1739 .halt_reg = 0x26004,
1740 .halt_check = BRANCH_HALT,
1741 .clkr = {
1742 .enable_reg = 0x26004,
1743 .enable_mask = BIT(0),
1744 .hw.init = &(struct clk_init_data){
1745 .name = "gcc_blsp2_qup1_spi_apps_clk",
1746 .parent_hws = (const struct clk_hw *[]) {
1747 &blsp2_qup1_spi_apps_clk_src.clkr.hw,
1748 },
1749 .num_parents = 1,
1750 .flags = CLK_SET_RATE_PARENT,
1751 .ops = &clk_branch2_ops,
1752 },
1753 },
1754 };
1755
1756 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk = {
1757 .halt_reg = 0x28008,
1758 .halt_check = BRANCH_HALT,
1759 .clkr = {
1760 .enable_reg = 0x28008,
1761 .enable_mask = BIT(0),
1762 .hw.init = &(struct clk_init_data){
1763 .name = "gcc_blsp2_qup2_i2c_apps_clk",
1764 .parent_hws = (const struct clk_hw *[]) {
1765 &blsp2_qup2_i2c_apps_clk_src.clkr.hw,
1766 },
1767 .num_parents = 1,
1768 .flags = CLK_SET_RATE_PARENT,
1769 .ops = &clk_branch2_ops,
1770 },
1771 },
1772 };
1773
1774 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk = {
1775 .halt_reg = 0x28004,
1776 .halt_check = BRANCH_HALT,
1777 .clkr = {
1778 .enable_reg = 0x28004,
1779 .enable_mask = BIT(0),
1780 .hw.init = &(struct clk_init_data){
1781 .name = "gcc_blsp2_qup2_spi_apps_clk",
1782 .parent_hws = (const struct clk_hw *[]) {
1783 &blsp2_qup2_spi_apps_clk_src.clkr.hw,
1784 },
1785 .num_parents = 1,
1786 .flags = CLK_SET_RATE_PARENT,
1787 .ops = &clk_branch2_ops,
1788 },
1789 },
1790 };
1791
1792 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk = {
1793 .halt_reg = 0x2a008,
1794 .halt_check = BRANCH_HALT,
1795 .clkr = {
1796 .enable_reg = 0x2a008,
1797 .enable_mask = BIT(0),
1798 .hw.init = &(struct clk_init_data){
1799 .name = "gcc_blsp2_qup3_i2c_apps_clk",
1800 .parent_hws = (const struct clk_hw *[]) {
1801 &blsp2_qup3_i2c_apps_clk_src.clkr.hw,
1802 },
1803 .num_parents = 1,
1804 .flags = CLK_SET_RATE_PARENT,
1805 .ops = &clk_branch2_ops,
1806 },
1807 },
1808 };
1809
1810 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk = {
1811 .halt_reg = 0x2a004,
1812 .halt_check = BRANCH_HALT,
1813 .clkr = {
1814 .enable_reg = 0x2a004,
1815 .enable_mask = BIT(0),
1816 .hw.init = &(struct clk_init_data){
1817 .name = "gcc_blsp2_qup3_spi_apps_clk",
1818 .parent_hws = (const struct clk_hw *[]) {
1819 &blsp2_qup3_spi_apps_clk_src.clkr.hw,
1820 },
1821 .num_parents = 1,
1822 .flags = CLK_SET_RATE_PARENT,
1823 .ops = &clk_branch2_ops,
1824 },
1825 },
1826 };
1827
1828 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk = {
1829 .halt_reg = 0x2c008,
1830 .halt_check = BRANCH_HALT,
1831 .clkr = {
1832 .enable_reg = 0x2c008,
1833 .enable_mask = BIT(0),
1834 .hw.init = &(struct clk_init_data){
1835 .name = "gcc_blsp2_qup4_i2c_apps_clk",
1836 .parent_hws = (const struct clk_hw *[]) {
1837 &blsp2_qup4_i2c_apps_clk_src.clkr.hw,
1838 },
1839 .num_parents = 1,
1840 .flags = CLK_SET_RATE_PARENT,
1841 .ops = &clk_branch2_ops,
1842 },
1843 },
1844 };
1845
1846 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk = {
1847 .halt_reg = 0x2c004,
1848 .halt_check = BRANCH_HALT,
1849 .clkr = {
1850 .enable_reg = 0x2c004,
1851 .enable_mask = BIT(0),
1852 .hw.init = &(struct clk_init_data){
1853 .name = "gcc_blsp2_qup4_spi_apps_clk",
1854 .parent_hws = (const struct clk_hw *[]) {
1855 &blsp2_qup4_spi_apps_clk_src.clkr.hw,
1856 },
1857 .num_parents = 1,
1858 .flags = CLK_SET_RATE_PARENT,
1859 .ops = &clk_branch2_ops,
1860 },
1861 },
1862 };
1863
1864 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk = {
1865 .halt_reg = 0x2e008,
1866 .halt_check = BRANCH_HALT,
1867 .clkr = {
1868 .enable_reg = 0x2e008,
1869 .enable_mask = BIT(0),
1870 .hw.init = &(struct clk_init_data){
1871 .name = "gcc_blsp2_qup5_i2c_apps_clk",
1872 .parent_hws = (const struct clk_hw *[]) {
1873 &blsp2_qup5_i2c_apps_clk_src.clkr.hw,
1874 },
1875 .num_parents = 1,
1876 .flags = CLK_SET_RATE_PARENT,
1877 .ops = &clk_branch2_ops,
1878 },
1879 },
1880 };
1881
1882 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk = {
1883 .halt_reg = 0x2e004,
1884 .halt_check = BRANCH_HALT,
1885 .clkr = {
1886 .enable_reg = 0x2e004,
1887 .enable_mask = BIT(0),
1888 .hw.init = &(struct clk_init_data){
1889 .name = "gcc_blsp2_qup5_spi_apps_clk",
1890 .parent_hws = (const struct clk_hw *[]) {
1891 &blsp2_qup5_spi_apps_clk_src.clkr.hw,
1892 },
1893 .num_parents = 1,
1894 .flags = CLK_SET_RATE_PARENT,
1895 .ops = &clk_branch2_ops,
1896 },
1897 },
1898 };
1899
1900 static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk = {
1901 .halt_reg = 0x30008,
1902 .halt_check = BRANCH_HALT,
1903 .clkr = {
1904 .enable_reg = 0x30008,
1905 .enable_mask = BIT(0),
1906 .hw.init = &(struct clk_init_data){
1907 .name = "gcc_blsp2_qup6_i2c_apps_clk",
1908 .parent_hws = (const struct clk_hw *[]) {
1909 &blsp2_qup6_i2c_apps_clk_src.clkr.hw,
1910 },
1911 .num_parents = 1,
1912 .flags = CLK_SET_RATE_PARENT,
1913 .ops = &clk_branch2_ops,
1914 },
1915 },
1916 };
1917
1918 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk = {
1919 .halt_reg = 0x30004,
1920 .halt_check = BRANCH_HALT,
1921 .clkr = {
1922 .enable_reg = 0x30004,
1923 .enable_mask = BIT(0),
1924 .hw.init = &(struct clk_init_data){
1925 .name = "gcc_blsp2_qup6_spi_apps_clk",
1926 .parent_hws = (const struct clk_hw *[]) {
1927 &blsp2_qup6_spi_apps_clk_src.clkr.hw,
1928 },
1929 .num_parents = 1,
1930 .flags = CLK_SET_RATE_PARENT,
1931 .ops = &clk_branch2_ops,
1932 },
1933 },
1934 };
1935
1936 static struct clk_branch gcc_blsp2_sleep_clk = {
1937 .halt_reg = 0x25008,
1938 .halt_check = BRANCH_HALT_VOTED,
1939 .clkr = {
1940 .enable_reg = 0x52004,
1941 .enable_mask = BIT(14),
1942 .hw.init = &(struct clk_init_data){
1943 .name = "gcc_blsp2_sleep_clk",
1944 .ops = &clk_branch2_ops,
1945 },
1946 },
1947 };
1948
1949 static struct clk_branch gcc_blsp2_uart1_apps_clk = {
1950 .halt_reg = 0x27004,
1951 .halt_check = BRANCH_HALT,
1952 .clkr = {
1953 .enable_reg = 0x27004,
1954 .enable_mask = BIT(0),
1955 .hw.init = &(struct clk_init_data){
1956 .name = "gcc_blsp2_uart1_apps_clk",
1957 .parent_hws = (const struct clk_hw *[]) {
1958 &blsp2_uart1_apps_clk_src.clkr.hw,
1959 },
1960 .num_parents = 1,
1961 .flags = CLK_SET_RATE_PARENT,
1962 .ops = &clk_branch2_ops,
1963 },
1964 },
1965 };
1966
1967 static struct clk_branch gcc_blsp2_uart2_apps_clk = {
1968 .halt_reg = 0x29004,
1969 .halt_check = BRANCH_HALT,
1970 .clkr = {
1971 .enable_reg = 0x29004,
1972 .enable_mask = BIT(0),
1973 .hw.init = &(struct clk_init_data){
1974 .name = "gcc_blsp2_uart2_apps_clk",
1975 .parent_hws = (const struct clk_hw *[]) {
1976 &blsp2_uart2_apps_clk_src.clkr.hw,
1977 },
1978 .num_parents = 1,
1979 .flags = CLK_SET_RATE_PARENT,
1980 .ops = &clk_branch2_ops,
1981 },
1982 },
1983 };
1984
1985 static struct clk_branch gcc_blsp2_uart3_apps_clk = {
1986 .halt_reg = 0x2b004,
1987 .halt_check = BRANCH_HALT,
1988 .clkr = {
1989 .enable_reg = 0x2b004,
1990 .enable_mask = BIT(0),
1991 .hw.init = &(struct clk_init_data){
1992 .name = "gcc_blsp2_uart3_apps_clk",
1993 .parent_hws = (const struct clk_hw *[]) {
1994 &blsp2_uart3_apps_clk_src.clkr.hw,
1995 },
1996 .num_parents = 1,
1997 .flags = CLK_SET_RATE_PARENT,
1998 .ops = &clk_branch2_ops,
1999 },
2000 },
2001 };
2002
2003 static struct clk_branch gcc_cfg_noc_usb3_axi_clk = {
2004 .halt_reg = 0x5018,
2005 .halt_check = BRANCH_HALT,
2006 .clkr = {
2007 .enable_reg = 0x5018,
2008 .enable_mask = BIT(0),
2009 .hw.init = &(struct clk_init_data){
2010 .name = "gcc_cfg_noc_usb3_axi_clk",
2011 .parent_hws = (const struct clk_hw *[]) {
2012 &usb30_master_clk_src.clkr.hw,
2013 },
2014 .num_parents = 1,
2015 .flags = CLK_SET_RATE_PARENT,
2016 .ops = &clk_branch2_ops,
2017 },
2018 },
2019 };
2020
2021 static struct clk_branch gcc_gp1_clk = {
2022 .halt_reg = 0x64000,
2023 .halt_check = BRANCH_HALT,
2024 .clkr = {
2025 .enable_reg = 0x64000,
2026 .enable_mask = BIT(0),
2027 .hw.init = &(struct clk_init_data){
2028 .name = "gcc_gp1_clk",
2029 .parent_hws = (const struct clk_hw *[]) {
2030 &gp1_clk_src.clkr.hw,
2031 },
2032 .num_parents = 1,
2033 .flags = CLK_SET_RATE_PARENT,
2034 .ops = &clk_branch2_ops,
2035 },
2036 },
2037 };
2038
2039 static struct clk_branch gcc_gp2_clk = {
2040 .halt_reg = 0x65000,
2041 .halt_check = BRANCH_HALT,
2042 .clkr = {
2043 .enable_reg = 0x65000,
2044 .enable_mask = BIT(0),
2045 .hw.init = &(struct clk_init_data){
2046 .name = "gcc_gp2_clk",
2047 .parent_hws = (const struct clk_hw *[]) {
2048 &gp2_clk_src.clkr.hw,
2049 },
2050 .num_parents = 1,
2051 .flags = CLK_SET_RATE_PARENT,
2052 .ops = &clk_branch2_ops,
2053 },
2054 },
2055 };
2056
2057 static struct clk_branch gcc_gp3_clk = {
2058 .halt_reg = 0x66000,
2059 .halt_check = BRANCH_HALT,
2060 .clkr = {
2061 .enable_reg = 0x66000,
2062 .enable_mask = BIT(0),
2063 .hw.init = &(struct clk_init_data){
2064 .name = "gcc_gp3_clk",
2065 .parent_hws = (const struct clk_hw *[]) {
2066 &gp3_clk_src.clkr.hw,
2067 },
2068 .num_parents = 1,
2069 .flags = CLK_SET_RATE_PARENT,
2070 .ops = &clk_branch2_ops,
2071 },
2072 },
2073 };
2074
2075 static struct clk_branch gcc_bimc_gfx_clk = {
2076 .halt_reg = 0x46040,
2077 .halt_check = BRANCH_HALT,
2078 .clkr = {
2079 .enable_reg = 0x46040,
2080 .enable_mask = BIT(0),
2081 .hw.init = &(struct clk_init_data){
2082 .name = "gcc_bimc_gfx_clk",
2083 .ops = &clk_branch2_ops,
2084 },
2085 },
2086 };
2087
2088 static struct clk_branch gcc_gpu_bimc_gfx_clk = {
2089 .halt_reg = 0x71010,
2090 .halt_check = BRANCH_HALT,
2091 .clkr = {
2092 .enable_reg = 0x71010,
2093 .enable_mask = BIT(0),
2094 .hw.init = &(struct clk_init_data){
2095 .name = "gcc_gpu_bimc_gfx_clk",
2096 .ops = &clk_branch2_ops,
2097 },
2098 },
2099 };
2100
2101 static struct clk_branch gcc_gpu_bimc_gfx_src_clk = {
2102 .halt_reg = 0x7100c,
2103 .halt_check = BRANCH_HALT,
2104 .clkr = {
2105 .enable_reg = 0x7100c,
2106 .enable_mask = BIT(0),
2107 .hw.init = &(struct clk_init_data){
2108 .name = "gcc_gpu_bimc_gfx_src_clk",
2109 .ops = &clk_branch2_ops,
2110 },
2111 },
2112 };
2113
2114 static struct clk_branch gcc_gpu_cfg_ahb_clk = {
2115 .halt_reg = 0x71004,
2116 .halt_check = BRANCH_HALT,
2117 .clkr = {
2118 .enable_reg = 0x71004,
2119 .enable_mask = BIT(0),
2120 .hw.init = &(struct clk_init_data){
2121 .name = "gcc_gpu_cfg_ahb_clk",
2122 .ops = &clk_branch2_ops,
2123
2124
2125
2126
2127
2128 .flags = CLK_IS_CRITICAL,
2129 },
2130 },
2131 };
2132
2133 static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk = {
2134 .halt_reg = 0x71018,
2135 .halt_check = BRANCH_HALT,
2136 .clkr = {
2137 .enable_reg = 0x71018,
2138 .enable_mask = BIT(0),
2139 .hw.init = &(struct clk_init_data){
2140 .name = "gcc_gpu_snoc_dvm_gfx_clk",
2141 .ops = &clk_branch2_ops,
2142 },
2143 },
2144 };
2145
2146 static struct clk_branch gcc_hmss_ahb_clk = {
2147 .halt_reg = 0x48000,
2148 .halt_check = BRANCH_HALT_VOTED,
2149 .clkr = {
2150 .enable_reg = 0x52004,
2151 .enable_mask = BIT(21),
2152 .hw.init = &(struct clk_init_data){
2153 .name = "gcc_hmss_ahb_clk",
2154 .parent_hws = (const struct clk_hw *[]) {
2155 &hmss_ahb_clk_src.clkr.hw,
2156 },
2157 .num_parents = 1,
2158 .flags = CLK_SET_RATE_PARENT,
2159 .ops = &clk_branch2_ops,
2160 },
2161 },
2162 };
2163
2164 static struct clk_branch gcc_hmss_at_clk = {
2165 .halt_reg = 0x48010,
2166 .halt_check = BRANCH_HALT,
2167 .clkr = {
2168 .enable_reg = 0x48010,
2169 .enable_mask = BIT(0),
2170 .hw.init = &(struct clk_init_data){
2171 .name = "gcc_hmss_at_clk",
2172 .ops = &clk_branch2_ops,
2173 },
2174 },
2175 };
2176
2177 static struct clk_branch gcc_hmss_rbcpr_clk = {
2178 .halt_reg = 0x48008,
2179 .halt_check = BRANCH_HALT,
2180 .clkr = {
2181 .enable_reg = 0x48008,
2182 .enable_mask = BIT(0),
2183 .hw.init = &(struct clk_init_data){
2184 .name = "gcc_hmss_rbcpr_clk",
2185 .parent_hws = (const struct clk_hw *[]) {
2186 &hmss_rbcpr_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_hmss_trig_clk = {
2196 .halt_reg = 0x4800c,
2197 .halt_check = BRANCH_HALT,
2198 .clkr = {
2199 .enable_reg = 0x4800c,
2200 .enable_mask = BIT(0),
2201 .hw.init = &(struct clk_init_data){
2202 .name = "gcc_hmss_trig_clk",
2203 .ops = &clk_branch2_ops,
2204 },
2205 },
2206 };
2207
2208 static struct freq_tbl ftbl_hmss_gpll0_clk_src[] = {
2209 F( 300000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
2210 F( 600000000, P_GPLL0_OUT_MAIN, 1, 0, 0),
2211 { }
2212 };
2213
2214 static struct clk_rcg2 hmss_gpll0_clk_src = {
2215 .cmd_rcgr = 0x4805c,
2216 .hid_width = 5,
2217 .parent_map = gcc_parent_map_1,
2218 .freq_tbl = ftbl_hmss_gpll0_clk_src,
2219 .clkr.hw.init = &(struct clk_init_data) {
2220 .name = "hmss_gpll0_clk_src",
2221 .parent_data = gcc_parent_data_1,
2222 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
2223 .ops = &clk_rcg2_ops,
2224 },
2225 };
2226
2227 static struct clk_branch gcc_mmss_noc_cfg_ahb_clk = {
2228 .halt_reg = 0x9004,
2229 .halt_check = BRANCH_HALT,
2230 .clkr = {
2231 .enable_reg = 0x9004,
2232 .enable_mask = BIT(0),
2233 .hw.init = &(struct clk_init_data){
2234 .name = "gcc_mmss_noc_cfg_ahb_clk",
2235 .ops = &clk_branch2_ops,
2236
2237
2238
2239
2240
2241 .flags = CLK_IS_CRITICAL,
2242 },
2243 },
2244 };
2245
2246 static struct clk_branch gcc_mmss_qm_ahb_clk = {
2247 .halt_reg = 0x9030,
2248 .halt_check = BRANCH_HALT,
2249 .clkr = {
2250 .enable_reg = 0x9030,
2251 .enable_mask = BIT(0),
2252 .hw.init = &(struct clk_init_data){
2253 .name = "gcc_mmss_qm_ahb_clk",
2254 .ops = &clk_branch2_ops,
2255 },
2256 },
2257 };
2258
2259 static struct clk_branch gcc_mmss_qm_core_clk = {
2260 .halt_reg = 0x900c,
2261 .halt_check = BRANCH_HALT,
2262 .clkr = {
2263 .enable_reg = 0x900c,
2264 .enable_mask = BIT(0),
2265 .hw.init = &(struct clk_init_data){
2266 .name = "gcc_mmss_qm_core_clk",
2267 .ops = &clk_branch2_ops,
2268 },
2269 },
2270 };
2271
2272 static struct clk_branch gcc_mmss_sys_noc_axi_clk = {
2273 .halt_reg = 0x9000,
2274 .halt_check = BRANCH_HALT,
2275 .clkr = {
2276 .enable_reg = 0x9000,
2277 .enable_mask = BIT(0),
2278 .hw.init = &(struct clk_init_data){
2279 .name = "gcc_mmss_sys_noc_axi_clk",
2280 .ops = &clk_branch2_ops,
2281 },
2282 },
2283 };
2284
2285 static struct clk_branch gcc_mss_at_clk = {
2286 .halt_reg = 0x8a00c,
2287 .halt_check = BRANCH_HALT,
2288 .clkr = {
2289 .enable_reg = 0x8a00c,
2290 .enable_mask = BIT(0),
2291 .hw.init = &(struct clk_init_data){
2292 .name = "gcc_mss_at_clk",
2293 .ops = &clk_branch2_ops,
2294 },
2295 },
2296 };
2297
2298 static struct clk_branch gcc_pcie_0_aux_clk = {
2299 .halt_reg = 0x6b014,
2300 .halt_check = BRANCH_HALT,
2301 .clkr = {
2302 .enable_reg = 0x6b014,
2303 .enable_mask = BIT(0),
2304 .hw.init = &(struct clk_init_data){
2305 .name = "gcc_pcie_0_aux_clk",
2306 .parent_hws = (const struct clk_hw *[]) {
2307 &pcie_aux_clk_src.clkr.hw,
2308 },
2309 .num_parents = 1,
2310 .flags = CLK_SET_RATE_PARENT,
2311 .ops = &clk_branch2_ops,
2312 },
2313 },
2314 };
2315
2316 static struct clk_branch gcc_pcie_0_cfg_ahb_clk = {
2317 .halt_reg = 0x6b010,
2318 .halt_check = BRANCH_HALT,
2319 .clkr = {
2320 .enable_reg = 0x6b010,
2321 .enable_mask = BIT(0),
2322 .hw.init = &(struct clk_init_data){
2323 .name = "gcc_pcie_0_cfg_ahb_clk",
2324 .ops = &clk_branch2_ops,
2325 },
2326 },
2327 };
2328
2329 static struct clk_branch gcc_pcie_0_mstr_axi_clk = {
2330 .halt_reg = 0x6b00c,
2331 .halt_check = BRANCH_HALT,
2332 .clkr = {
2333 .enable_reg = 0x6b00c,
2334 .enable_mask = BIT(0),
2335 .hw.init = &(struct clk_init_data){
2336 .name = "gcc_pcie_0_mstr_axi_clk",
2337 .ops = &clk_branch2_ops,
2338 },
2339 },
2340 };
2341
2342 static struct clk_branch gcc_pcie_0_pipe_clk = {
2343 .halt_reg = 0x6b018,
2344 .halt_check = BRANCH_HALT_SKIP,
2345 .clkr = {
2346 .enable_reg = 0x6b018,
2347 .enable_mask = BIT(0),
2348 .hw.init = &(struct clk_init_data){
2349 .name = "gcc_pcie_0_pipe_clk",
2350 .ops = &clk_branch2_ops,
2351 },
2352 },
2353 };
2354
2355 static struct clk_branch gcc_pcie_0_slv_axi_clk = {
2356 .halt_reg = 0x6b008,
2357 .halt_check = BRANCH_HALT,
2358 .clkr = {
2359 .enable_reg = 0x6b008,
2360 .enable_mask = BIT(0),
2361 .hw.init = &(struct clk_init_data){
2362 .name = "gcc_pcie_0_slv_axi_clk",
2363 .ops = &clk_branch2_ops,
2364 },
2365 },
2366 };
2367
2368 static struct clk_branch gcc_pcie_phy_aux_clk = {
2369 .halt_reg = 0x6f004,
2370 .halt_check = BRANCH_HALT,
2371 .clkr = {
2372 .enable_reg = 0x6f004,
2373 .enable_mask = BIT(0),
2374 .hw.init = &(struct clk_init_data){
2375 .name = "gcc_pcie_phy_aux_clk",
2376 .parent_hws = (const struct clk_hw *[]) {
2377 &pcie_aux_clk_src.clkr.hw,
2378 },
2379 .num_parents = 1,
2380 .flags = CLK_SET_RATE_PARENT,
2381 .ops = &clk_branch2_ops,
2382 },
2383 },
2384 };
2385
2386 static struct clk_branch gcc_pdm2_clk = {
2387 .halt_reg = 0x3300c,
2388 .halt_check = BRANCH_HALT,
2389 .clkr = {
2390 .enable_reg = 0x3300c,
2391 .enable_mask = BIT(0),
2392 .hw.init = &(struct clk_init_data){
2393 .name = "gcc_pdm2_clk",
2394 .parent_hws = (const struct clk_hw *[]) {
2395 &pdm2_clk_src.clkr.hw,
2396 },
2397 .num_parents = 1,
2398 .flags = CLK_SET_RATE_PARENT,
2399 .ops = &clk_branch2_ops,
2400 },
2401 },
2402 };
2403
2404 static struct clk_branch gcc_pdm_ahb_clk = {
2405 .halt_reg = 0x33004,
2406 .halt_check = BRANCH_HALT,
2407 .clkr = {
2408 .enable_reg = 0x33004,
2409 .enable_mask = BIT(0),
2410 .hw.init = &(struct clk_init_data){
2411 .name = "gcc_pdm_ahb_clk",
2412 .ops = &clk_branch2_ops,
2413 },
2414 },
2415 };
2416
2417 static struct clk_branch gcc_pdm_xo4_clk = {
2418 .halt_reg = 0x33008,
2419 .halt_check = BRANCH_HALT,
2420 .clkr = {
2421 .enable_reg = 0x33008,
2422 .enable_mask = BIT(0),
2423 .hw.init = &(struct clk_init_data){
2424 .name = "gcc_pdm_xo4_clk",
2425 .ops = &clk_branch2_ops,
2426 },
2427 },
2428 };
2429
2430 static struct clk_branch gcc_prng_ahb_clk = {
2431 .halt_reg = 0x34004,
2432 .halt_check = BRANCH_HALT_VOTED,
2433 .clkr = {
2434 .enable_reg = 0x52004,
2435 .enable_mask = BIT(13),
2436 .hw.init = &(struct clk_init_data){
2437 .name = "gcc_prng_ahb_clk",
2438 .ops = &clk_branch2_ops,
2439 },
2440 },
2441 };
2442
2443 static struct clk_branch gcc_sdcc2_ahb_clk = {
2444 .halt_reg = 0x14008,
2445 .halt_check = BRANCH_HALT,
2446 .clkr = {
2447 .enable_reg = 0x14008,
2448 .enable_mask = BIT(0),
2449 .hw.init = &(struct clk_init_data){
2450 .name = "gcc_sdcc2_ahb_clk",
2451 .ops = &clk_branch2_ops,
2452 },
2453 },
2454 };
2455
2456 static struct clk_branch gcc_sdcc2_apps_clk = {
2457 .halt_reg = 0x14004,
2458 .halt_check = BRANCH_HALT,
2459 .clkr = {
2460 .enable_reg = 0x14004,
2461 .enable_mask = BIT(0),
2462 .hw.init = &(struct clk_init_data){
2463 .name = "gcc_sdcc2_apps_clk",
2464 .parent_hws = (const struct clk_hw *[]) {
2465 &sdcc2_apps_clk_src.clkr.hw,
2466 },
2467 .num_parents = 1,
2468 .flags = CLK_SET_RATE_PARENT,
2469 .ops = &clk_branch2_ops,
2470 },
2471 },
2472 };
2473
2474 static struct clk_branch gcc_sdcc4_ahb_clk = {
2475 .halt_reg = 0x16008,
2476 .halt_check = BRANCH_HALT,
2477 .clkr = {
2478 .enable_reg = 0x16008,
2479 .enable_mask = BIT(0),
2480 .hw.init = &(struct clk_init_data){
2481 .name = "gcc_sdcc4_ahb_clk",
2482 .ops = &clk_branch2_ops,
2483 },
2484 },
2485 };
2486
2487 static struct clk_branch gcc_sdcc4_apps_clk = {
2488 .halt_reg = 0x16004,
2489 .halt_check = BRANCH_HALT,
2490 .clkr = {
2491 .enable_reg = 0x16004,
2492 .enable_mask = BIT(0),
2493 .hw.init = &(struct clk_init_data){
2494 .name = "gcc_sdcc4_apps_clk",
2495 .parent_hws = (const struct clk_hw *[]) {
2496 &sdcc4_apps_clk_src.clkr.hw,
2497 },
2498 .num_parents = 1,
2499 .flags = CLK_SET_RATE_PARENT,
2500 .ops = &clk_branch2_ops,
2501 },
2502 },
2503 };
2504
2505 static struct clk_branch gcc_tsif_ahb_clk = {
2506 .halt_reg = 0x36004,
2507 .halt_check = BRANCH_HALT,
2508 .clkr = {
2509 .enable_reg = 0x36004,
2510 .enable_mask = BIT(0),
2511 .hw.init = &(struct clk_init_data){
2512 .name = "gcc_tsif_ahb_clk",
2513 .ops = &clk_branch2_ops,
2514 },
2515 },
2516 };
2517
2518 static struct clk_branch gcc_tsif_inactivity_timers_clk = {
2519 .halt_reg = 0x3600c,
2520 .halt_check = BRANCH_HALT,
2521 .clkr = {
2522 .enable_reg = 0x3600c,
2523 .enable_mask = BIT(0),
2524 .hw.init = &(struct clk_init_data){
2525 .name = "gcc_tsif_inactivity_timers_clk",
2526 .ops = &clk_branch2_ops,
2527 },
2528 },
2529 };
2530
2531 static struct clk_branch gcc_tsif_ref_clk = {
2532 .halt_reg = 0x36008,
2533 .halt_check = BRANCH_HALT,
2534 .clkr = {
2535 .enable_reg = 0x36008,
2536 .enable_mask = BIT(0),
2537 .hw.init = &(struct clk_init_data){
2538 .name = "gcc_tsif_ref_clk",
2539 .parent_hws = (const struct clk_hw *[]) {
2540 &tsif_ref_clk_src.clkr.hw,
2541 },
2542 .num_parents = 1,
2543 .flags = CLK_SET_RATE_PARENT,
2544 .ops = &clk_branch2_ops,
2545 },
2546 },
2547 };
2548
2549 static struct clk_branch gcc_ufs_ahb_clk = {
2550 .halt_reg = 0x7500c,
2551 .halt_check = BRANCH_HALT,
2552 .clkr = {
2553 .enable_reg = 0x7500c,
2554 .enable_mask = BIT(0),
2555 .hw.init = &(struct clk_init_data){
2556 .name = "gcc_ufs_ahb_clk",
2557 .ops = &clk_branch2_ops,
2558 },
2559 },
2560 };
2561
2562 static struct clk_branch gcc_ufs_axi_clk = {
2563 .halt_reg = 0x75008,
2564 .halt_check = BRANCH_HALT,
2565 .clkr = {
2566 .enable_reg = 0x75008,
2567 .enable_mask = BIT(0),
2568 .hw.init = &(struct clk_init_data){
2569 .name = "gcc_ufs_axi_clk",
2570 .parent_hws = (const struct clk_hw *[]) {
2571 &ufs_axi_clk_src.clkr.hw,
2572 },
2573 .num_parents = 1,
2574 .flags = CLK_SET_RATE_PARENT,
2575 .ops = &clk_branch2_ops,
2576 },
2577 },
2578 };
2579
2580 static struct clk_branch gcc_ufs_ice_core_clk = {
2581 .halt_reg = 0x7600c,
2582 .halt_check = BRANCH_HALT,
2583 .clkr = {
2584 .enable_reg = 0x7600c,
2585 .enable_mask = BIT(0),
2586 .hw.init = &(struct clk_init_data){
2587 .name = "gcc_ufs_ice_core_clk",
2588 .ops = &clk_branch2_ops,
2589 },
2590 },
2591 };
2592
2593 static struct clk_branch gcc_ufs_phy_aux_clk = {
2594 .halt_reg = 0x76040,
2595 .halt_check = BRANCH_HALT,
2596 .clkr = {
2597 .enable_reg = 0x76040,
2598 .enable_mask = BIT(0),
2599 .hw.init = &(struct clk_init_data){
2600 .name = "gcc_ufs_phy_aux_clk",
2601 .ops = &clk_branch2_ops,
2602 },
2603 },
2604 };
2605
2606 static struct clk_branch gcc_ufs_rx_symbol_0_clk = {
2607 .halt_reg = 0x75014,
2608 .halt_check = BRANCH_HALT_SKIP,
2609 .clkr = {
2610 .enable_reg = 0x75014,
2611 .enable_mask = BIT(0),
2612 .hw.init = &(struct clk_init_data){
2613 .name = "gcc_ufs_rx_symbol_0_clk",
2614 .ops = &clk_branch2_ops,
2615 },
2616 },
2617 };
2618
2619 static struct clk_branch gcc_ufs_rx_symbol_1_clk = {
2620 .halt_reg = 0x7605c,
2621 .halt_check = BRANCH_HALT_SKIP,
2622 .clkr = {
2623 .enable_reg = 0x7605c,
2624 .enable_mask = BIT(0),
2625 .hw.init = &(struct clk_init_data){
2626 .name = "gcc_ufs_rx_symbol_1_clk",
2627 .ops = &clk_branch2_ops,
2628 },
2629 },
2630 };
2631
2632 static struct clk_branch gcc_ufs_tx_symbol_0_clk = {
2633 .halt_reg = 0x75010,
2634 .halt_check = BRANCH_HALT_SKIP,
2635 .clkr = {
2636 .enable_reg = 0x75010,
2637 .enable_mask = BIT(0),
2638 .hw.init = &(struct clk_init_data){
2639 .name = "gcc_ufs_tx_symbol_0_clk",
2640 .ops = &clk_branch2_ops,
2641 },
2642 },
2643 };
2644
2645 static struct clk_branch gcc_ufs_unipro_core_clk = {
2646 .halt_reg = 0x76008,
2647 .halt_check = BRANCH_HALT,
2648 .clkr = {
2649 .enable_reg = 0x76008,
2650 .enable_mask = BIT(0),
2651 .hw.init = &(struct clk_init_data){
2652 .name = "gcc_ufs_unipro_core_clk",
2653 .parent_hws = (const struct clk_hw *[]) {
2654 &ufs_unipro_core_clk_src.clkr.hw,
2655 },
2656 .num_parents = 1,
2657 .flags = CLK_SET_RATE_PARENT,
2658 .ops = &clk_branch2_ops,
2659 },
2660 },
2661 };
2662
2663 static struct clk_branch gcc_usb30_master_clk = {
2664 .halt_reg = 0xf008,
2665 .halt_check = BRANCH_HALT,
2666 .clkr = {
2667 .enable_reg = 0xf008,
2668 .enable_mask = BIT(0),
2669 .hw.init = &(struct clk_init_data){
2670 .name = "gcc_usb30_master_clk",
2671 .parent_hws = (const struct clk_hw *[]) {
2672 &usb30_master_clk_src.clkr.hw,
2673 },
2674 .num_parents = 1,
2675 .flags = CLK_SET_RATE_PARENT,
2676 .ops = &clk_branch2_ops,
2677 },
2678 },
2679 };
2680
2681 static struct clk_branch gcc_usb30_mock_utmi_clk = {
2682 .halt_reg = 0xf010,
2683 .halt_check = BRANCH_HALT,
2684 .clkr = {
2685 .enable_reg = 0xf010,
2686 .enable_mask = BIT(0),
2687 .hw.init = &(struct clk_init_data){
2688 .name = "gcc_usb30_mock_utmi_clk",
2689 .parent_hws = (const struct clk_hw *[]) {
2690 &usb30_mock_utmi_clk_src.clkr.hw,
2691 },
2692 .num_parents = 1,
2693 .flags = CLK_SET_RATE_PARENT,
2694 .ops = &clk_branch2_ops,
2695 },
2696 },
2697 };
2698
2699 static struct clk_branch gcc_usb30_sleep_clk = {
2700 .halt_reg = 0xf00c,
2701 .halt_check = BRANCH_HALT,
2702 .clkr = {
2703 .enable_reg = 0xf00c,
2704 .enable_mask = BIT(0),
2705 .hw.init = &(struct clk_init_data){
2706 .name = "gcc_usb30_sleep_clk",
2707 .ops = &clk_branch2_ops,
2708 },
2709 },
2710 };
2711
2712 static struct clk_branch gcc_usb3_phy_aux_clk = {
2713 .halt_reg = 0x50000,
2714 .halt_check = BRANCH_HALT,
2715 .clkr = {
2716 .enable_reg = 0x50000,
2717 .enable_mask = BIT(0),
2718 .hw.init = &(struct clk_init_data){
2719 .name = "gcc_usb3_phy_aux_clk",
2720 .parent_hws = (const struct clk_hw *[]) {
2721 &usb3_phy_aux_clk_src.clkr.hw,
2722 },
2723 .num_parents = 1,
2724 .flags = CLK_SET_RATE_PARENT,
2725 .ops = &clk_branch2_ops,
2726 },
2727 },
2728 };
2729
2730 static struct clk_branch gcc_usb3_phy_pipe_clk = {
2731 .halt_reg = 0x50004,
2732 .halt_check = BRANCH_HALT_SKIP,
2733 .clkr = {
2734 .enable_reg = 0x50004,
2735 .enable_mask = BIT(0),
2736 .hw.init = &(struct clk_init_data){
2737 .name = "gcc_usb3_phy_pipe_clk",
2738 .ops = &clk_branch2_ops,
2739 },
2740 },
2741 };
2742
2743 static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk = {
2744 .halt_reg = 0x6a004,
2745 .halt_check = BRANCH_HALT,
2746 .clkr = {
2747 .enable_reg = 0x6a004,
2748 .enable_mask = BIT(0),
2749 .hw.init = &(struct clk_init_data){
2750 .name = "gcc_usb_phy_cfg_ahb2phy_clk",
2751 .ops = &clk_branch2_ops,
2752 },
2753 },
2754 };
2755
2756 static struct clk_branch gcc_hdmi_clkref_clk = {
2757 .halt_reg = 0x88000,
2758 .clkr = {
2759 .enable_reg = 0x88000,
2760 .enable_mask = BIT(0),
2761 .hw.init = &(struct clk_init_data){
2762 .name = "gcc_hdmi_clkref_clk",
2763 .parent_data = (const struct clk_parent_data []) {
2764 { .fw_name = "xo" },
2765 },
2766 .num_parents = 1,
2767 .ops = &clk_branch2_ops,
2768 },
2769 },
2770 };
2771
2772 static struct clk_branch gcc_ufs_clkref_clk = {
2773 .halt_reg = 0x88004,
2774 .clkr = {
2775 .enable_reg = 0x88004,
2776 .enable_mask = BIT(0),
2777 .hw.init = &(struct clk_init_data){
2778 .name = "gcc_ufs_clkref_clk",
2779 .parent_data = (const struct clk_parent_data []) {
2780 { .fw_name = "xo" },
2781 },
2782 .num_parents = 1,
2783 .ops = &clk_branch2_ops,
2784 },
2785 },
2786 };
2787
2788 static struct clk_branch gcc_usb3_clkref_clk = {
2789 .halt_reg = 0x88008,
2790 .clkr = {
2791 .enable_reg = 0x88008,
2792 .enable_mask = BIT(0),
2793 .hw.init = &(struct clk_init_data){
2794 .name = "gcc_usb3_clkref_clk",
2795 .parent_data = (const struct clk_parent_data []) {
2796 { .fw_name = "xo" },
2797 },
2798 .num_parents = 1,
2799 .ops = &clk_branch2_ops,
2800 },
2801 },
2802 };
2803
2804 static struct clk_branch gcc_pcie_clkref_clk = {
2805 .halt_reg = 0x8800c,
2806 .clkr = {
2807 .enable_reg = 0x8800c,
2808 .enable_mask = BIT(0),
2809 .hw.init = &(struct clk_init_data){
2810 .name = "gcc_pcie_clkref_clk",
2811 .parent_data = (const struct clk_parent_data []) {
2812 { .fw_name = "xo" },
2813 },
2814 .num_parents = 1,
2815 .ops = &clk_branch2_ops,
2816 },
2817 },
2818 };
2819
2820 static struct clk_branch gcc_rx1_usb2_clkref_clk = {
2821 .halt_reg = 0x88014,
2822 .clkr = {
2823 .enable_reg = 0x88014,
2824 .enable_mask = BIT(0),
2825 .hw.init = &(struct clk_init_data){
2826 .name = "gcc_rx1_usb2_clkref_clk",
2827 .parent_data = (const struct clk_parent_data []) {
2828 { .fw_name = "xo" },
2829 },
2830 .num_parents = 1,
2831 .ops = &clk_branch2_ops,
2832 },
2833 },
2834 };
2835
2836 static struct clk_branch gcc_im_sleep_clk = {
2837 .halt_reg = 0x4300c,
2838 .halt_check = BRANCH_HALT,
2839 .clkr = {
2840 .enable_reg = 0x4300c,
2841 .enable_mask = BIT(0),
2842 .hw.init = &(const struct clk_init_data){
2843 .name = "gcc_im_sleep_clk",
2844 .ops = &clk_branch2_ops,
2845 },
2846 },
2847 };
2848
2849 static struct clk_branch aggre2_snoc_north_axi_clk = {
2850 .halt_reg = 0x83010,
2851 .halt_check = BRANCH_HALT,
2852 .clkr = {
2853 .enable_reg = 0x83010,
2854 .enable_mask = BIT(0),
2855 .hw.init = &(const struct clk_init_data){
2856 .name = "aggre2_snoc_north_axi_clk",
2857 .ops = &clk_branch2_ops,
2858 },
2859 },
2860 };
2861
2862 static struct clk_branch ssc_xo_clk = {
2863 .halt_reg = 0x63018,
2864 .halt_check = BRANCH_HALT,
2865 .clkr = {
2866 .enable_reg = 0x63018,
2867 .enable_mask = BIT(0),
2868 .hw.init = &(const struct clk_init_data){
2869 .name = "ssc_xo_clk",
2870 .ops = &clk_branch2_ops,
2871 },
2872 },
2873 };
2874
2875 static struct clk_branch ssc_cnoc_ahbs_clk = {
2876 .halt_reg = 0x6300c,
2877 .halt_check = BRANCH_HALT,
2878 .clkr = {
2879 .enable_reg = 0x6300c,
2880 .enable_mask = BIT(0),
2881 .hw.init = &(const struct clk_init_data){
2882 .name = "ssc_cnoc_ahbs_clk",
2883 .ops = &clk_branch2_ops,
2884 },
2885 },
2886 };
2887
2888 static struct gdsc pcie_0_gdsc = {
2889 .gdscr = 0x6b004,
2890 .gds_hw_ctrl = 0x0,
2891 .pd = {
2892 .name = "pcie_0_gdsc",
2893 },
2894 .pwrsts = PWRSTS_OFF_ON,
2895 .flags = VOTABLE,
2896 };
2897
2898 static struct gdsc ufs_gdsc = {
2899 .gdscr = 0x75004,
2900 .gds_hw_ctrl = 0x0,
2901 .pd = {
2902 .name = "ufs_gdsc",
2903 },
2904 .pwrsts = PWRSTS_OFF_ON,
2905 .flags = VOTABLE,
2906 };
2907
2908 static struct gdsc usb_30_gdsc = {
2909 .gdscr = 0xf004,
2910 .gds_hw_ctrl = 0x0,
2911 .pd = {
2912 .name = "usb_30_gdsc",
2913 },
2914 .pwrsts = PWRSTS_OFF_ON,
2915 .flags = VOTABLE,
2916 };
2917
2918 static struct clk_regmap *gcc_msm8998_clocks[] = {
2919 [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
2920 [BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
2921 [BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr,
2922 [BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr,
2923 [BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr,
2924 [BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr,
2925 [BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr,
2926 [BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr,
2927 [BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr,
2928 [BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr,
2929 [BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr,
2930 [BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr,
2931 [BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr,
2932 [BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr,
2933 [BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr,
2934 [BLSP2_QUP1_I2C_APPS_CLK_SRC] = &blsp2_qup1_i2c_apps_clk_src.clkr,
2935 [BLSP2_QUP1_SPI_APPS_CLK_SRC] = &blsp2_qup1_spi_apps_clk_src.clkr,
2936 [BLSP2_QUP2_I2C_APPS_CLK_SRC] = &blsp2_qup2_i2c_apps_clk_src.clkr,
2937 [BLSP2_QUP2_SPI_APPS_CLK_SRC] = &blsp2_qup2_spi_apps_clk_src.clkr,
2938 [BLSP2_QUP3_I2C_APPS_CLK_SRC] = &blsp2_qup3_i2c_apps_clk_src.clkr,
2939 [BLSP2_QUP3_SPI_APPS_CLK_SRC] = &blsp2_qup3_spi_apps_clk_src.clkr,
2940 [BLSP2_QUP4_I2C_APPS_CLK_SRC] = &blsp2_qup4_i2c_apps_clk_src.clkr,
2941 [BLSP2_QUP4_SPI_APPS_CLK_SRC] = &blsp2_qup4_spi_apps_clk_src.clkr,
2942 [BLSP2_QUP5_I2C_APPS_CLK_SRC] = &blsp2_qup5_i2c_apps_clk_src.clkr,
2943 [BLSP2_QUP5_SPI_APPS_CLK_SRC] = &blsp2_qup5_spi_apps_clk_src.clkr,
2944 [BLSP2_QUP6_I2C_APPS_CLK_SRC] = &blsp2_qup6_i2c_apps_clk_src.clkr,
2945 [BLSP2_QUP6_SPI_APPS_CLK_SRC] = &blsp2_qup6_spi_apps_clk_src.clkr,
2946 [BLSP2_UART1_APPS_CLK_SRC] = &blsp2_uart1_apps_clk_src.clkr,
2947 [BLSP2_UART2_APPS_CLK_SRC] = &blsp2_uart2_apps_clk_src.clkr,
2948 [BLSP2_UART3_APPS_CLK_SRC] = &blsp2_uart3_apps_clk_src.clkr,
2949 [GCC_AGGRE1_NOC_XO_CLK] = &gcc_aggre1_noc_xo_clk.clkr,
2950 [GCC_AGGRE1_UFS_AXI_CLK] = &gcc_aggre1_ufs_axi_clk.clkr,
2951 [GCC_AGGRE1_USB3_AXI_CLK] = &gcc_aggre1_usb3_axi_clk.clkr,
2952 [GCC_APSS_QDSS_TSCTR_DIV2_CLK] = &gcc_apss_qdss_tsctr_div2_clk.clkr,
2953 [GCC_APSS_QDSS_TSCTR_DIV8_CLK] = &gcc_apss_qdss_tsctr_div8_clk.clkr,
2954 [GCC_BIMC_HMSS_AXI_CLK] = &gcc_bimc_hmss_axi_clk.clkr,
2955 [GCC_BIMC_MSS_Q6_AXI_CLK] = &gcc_bimc_mss_q6_axi_clk.clkr,
2956 [GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
2957 [GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
2958 [GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
2959 [GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr,
2960 [GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr,
2961 [GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr,
2962 [GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr,
2963 [GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr,
2964 [GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
2965 [GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
2966 [GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
2967 [GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr,
2968 [GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
2969 [GCC_BLSP1_SLEEP_CLK] = &gcc_blsp1_sleep_clk.clkr,
2970 [GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
2971 [GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
2972 [GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr,
2973 [GCC_BLSP2_AHB_CLK] = &gcc_blsp2_ahb_clk.clkr,
2974 [GCC_BLSP2_QUP1_I2C_APPS_CLK] = &gcc_blsp2_qup1_i2c_apps_clk.clkr,
2975 [GCC_BLSP2_QUP1_SPI_APPS_CLK] = &gcc_blsp2_qup1_spi_apps_clk.clkr,
2976 [GCC_BLSP2_QUP2_I2C_APPS_CLK] = &gcc_blsp2_qup2_i2c_apps_clk.clkr,
2977 [GCC_BLSP2_QUP2_SPI_APPS_CLK] = &gcc_blsp2_qup2_spi_apps_clk.clkr,
2978 [GCC_BLSP2_QUP3_I2C_APPS_CLK] = &gcc_blsp2_qup3_i2c_apps_clk.clkr,
2979 [GCC_BLSP2_QUP3_SPI_APPS_CLK] = &gcc_blsp2_qup3_spi_apps_clk.clkr,
2980 [GCC_BLSP2_QUP4_I2C_APPS_CLK] = &gcc_blsp2_qup4_i2c_apps_clk.clkr,
2981 [GCC_BLSP2_QUP4_SPI_APPS_CLK] = &gcc_blsp2_qup4_spi_apps_clk.clkr,
2982 [GCC_BLSP2_QUP5_I2C_APPS_CLK] = &gcc_blsp2_qup5_i2c_apps_clk.clkr,
2983 [GCC_BLSP2_QUP5_SPI_APPS_CLK] = &gcc_blsp2_qup5_spi_apps_clk.clkr,
2984 [GCC_BLSP2_QUP6_I2C_APPS_CLK] = &gcc_blsp2_qup6_i2c_apps_clk.clkr,
2985 [GCC_BLSP2_QUP6_SPI_APPS_CLK] = &gcc_blsp2_qup6_spi_apps_clk.clkr,
2986 [GCC_BLSP2_SLEEP_CLK] = &gcc_blsp2_sleep_clk.clkr,
2987 [GCC_BLSP2_UART1_APPS_CLK] = &gcc_blsp2_uart1_apps_clk.clkr,
2988 [GCC_BLSP2_UART2_APPS_CLK] = &gcc_blsp2_uart2_apps_clk.clkr,
2989 [GCC_BLSP2_UART3_APPS_CLK] = &gcc_blsp2_uart3_apps_clk.clkr,
2990 [GCC_CFG_NOC_USB3_AXI_CLK] = &gcc_cfg_noc_usb3_axi_clk.clkr,
2991 [GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
2992 [GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
2993 [GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
2994 [GCC_BIMC_GFX_CLK] = &gcc_bimc_gfx_clk.clkr,
2995 [GCC_GPU_BIMC_GFX_CLK] = &gcc_gpu_bimc_gfx_clk.clkr,
2996 [GCC_GPU_BIMC_GFX_SRC_CLK] = &gcc_gpu_bimc_gfx_src_clk.clkr,
2997 [GCC_GPU_CFG_AHB_CLK] = &gcc_gpu_cfg_ahb_clk.clkr,
2998 [GCC_GPU_SNOC_DVM_GFX_CLK] = &gcc_gpu_snoc_dvm_gfx_clk.clkr,
2999 [GCC_HMSS_AHB_CLK] = &gcc_hmss_ahb_clk.clkr,
3000 [GCC_HMSS_AT_CLK] = &gcc_hmss_at_clk.clkr,
3001 [GCC_HMSS_RBCPR_CLK] = &gcc_hmss_rbcpr_clk.clkr,
3002 [GCC_HMSS_TRIG_CLK] = &gcc_hmss_trig_clk.clkr,
3003 [GCC_MMSS_NOC_CFG_AHB_CLK] = &gcc_mmss_noc_cfg_ahb_clk.clkr,
3004 [GCC_MMSS_QM_AHB_CLK] = &gcc_mmss_qm_ahb_clk.clkr,
3005 [GCC_MMSS_QM_CORE_CLK] = &gcc_mmss_qm_core_clk.clkr,
3006 [GCC_MMSS_SYS_NOC_AXI_CLK] = &gcc_mmss_sys_noc_axi_clk.clkr,
3007 [GCC_MSS_AT_CLK] = &gcc_mss_at_clk.clkr,
3008 [GCC_PCIE_0_AUX_CLK] = &gcc_pcie_0_aux_clk.clkr,
3009 [GCC_PCIE_0_CFG_AHB_CLK] = &gcc_pcie_0_cfg_ahb_clk.clkr,
3010 [GCC_PCIE_0_MSTR_AXI_CLK] = &gcc_pcie_0_mstr_axi_clk.clkr,
3011 [GCC_PCIE_0_PIPE_CLK] = &gcc_pcie_0_pipe_clk.clkr,
3012 [GCC_PCIE_0_SLV_AXI_CLK] = &gcc_pcie_0_slv_axi_clk.clkr,
3013 [GCC_PCIE_PHY_AUX_CLK] = &gcc_pcie_phy_aux_clk.clkr,
3014 [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr,
3015 [GCC_PDM_AHB_CLK] = &gcc_pdm_ahb_clk.clkr,
3016 [GCC_PDM_XO4_CLK] = &gcc_pdm_xo4_clk.clkr,
3017 [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
3018 [GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr,
3019 [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr,
3020 [GCC_SDCC4_AHB_CLK] = &gcc_sdcc4_ahb_clk.clkr,
3021 [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr,
3022 [GCC_TSIF_AHB_CLK] = &gcc_tsif_ahb_clk.clkr,
3023 [GCC_TSIF_INACTIVITY_TIMERS_CLK] = &gcc_tsif_inactivity_timers_clk.clkr,
3024 [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr,
3025 [GCC_UFS_AHB_CLK] = &gcc_ufs_ahb_clk.clkr,
3026 [GCC_UFS_AXI_CLK] = &gcc_ufs_axi_clk.clkr,
3027 [GCC_UFS_ICE_CORE_CLK] = &gcc_ufs_ice_core_clk.clkr,
3028 [GCC_UFS_PHY_AUX_CLK] = &gcc_ufs_phy_aux_clk.clkr,
3029 [GCC_UFS_RX_SYMBOL_0_CLK] = &gcc_ufs_rx_symbol_0_clk.clkr,
3030 [GCC_UFS_RX_SYMBOL_1_CLK] = &gcc_ufs_rx_symbol_1_clk.clkr,
3031 [GCC_UFS_TX_SYMBOL_0_CLK] = &gcc_ufs_tx_symbol_0_clk.clkr,
3032 [GCC_UFS_UNIPRO_CORE_CLK] = &gcc_ufs_unipro_core_clk.clkr,
3033 [GCC_USB30_MASTER_CLK] = &gcc_usb30_master_clk.clkr,
3034 [GCC_USB30_MOCK_UTMI_CLK] = &gcc_usb30_mock_utmi_clk.clkr,
3035 [GCC_USB30_SLEEP_CLK] = &gcc_usb30_sleep_clk.clkr,
3036 [GCC_USB3_PHY_AUX_CLK] = &gcc_usb3_phy_aux_clk.clkr,
3037 [GCC_USB3_PHY_PIPE_CLK] = &gcc_usb3_phy_pipe_clk.clkr,
3038 [GCC_USB_PHY_CFG_AHB2PHY_CLK] = &gcc_usb_phy_cfg_ahb2phy_clk.clkr,
3039 [GP1_CLK_SRC] = &gp1_clk_src.clkr,
3040 [GP2_CLK_SRC] = &gp2_clk_src.clkr,
3041 [GP3_CLK_SRC] = &gp3_clk_src.clkr,
3042 [GPLL0] = &gpll0.clkr,
3043 [GPLL0_OUT_EVEN] = &gpll0_out_even.clkr,
3044 [GPLL0_OUT_MAIN] = &gpll0_out_main.clkr,
3045 [GPLL0_OUT_ODD] = &gpll0_out_odd.clkr,
3046 [GPLL0_OUT_TEST] = &gpll0_out_test.clkr,
3047 [GPLL1] = &gpll1.clkr,
3048 [GPLL1_OUT_EVEN] = &gpll1_out_even.clkr,
3049 [GPLL1_OUT_MAIN] = &gpll1_out_main.clkr,
3050 [GPLL1_OUT_ODD] = &gpll1_out_odd.clkr,
3051 [GPLL1_OUT_TEST] = &gpll1_out_test.clkr,
3052 [GPLL2] = &gpll2.clkr,
3053 [GPLL2_OUT_EVEN] = &gpll2_out_even.clkr,
3054 [GPLL2_OUT_MAIN] = &gpll2_out_main.clkr,
3055 [GPLL2_OUT_ODD] = &gpll2_out_odd.clkr,
3056 [GPLL2_OUT_TEST] = &gpll2_out_test.clkr,
3057 [GPLL3] = &gpll3.clkr,
3058 [GPLL3_OUT_EVEN] = &gpll3_out_even.clkr,
3059 [GPLL3_OUT_MAIN] = &gpll3_out_main.clkr,
3060 [GPLL3_OUT_ODD] = &gpll3_out_odd.clkr,
3061 [GPLL3_OUT_TEST] = &gpll3_out_test.clkr,
3062 [GPLL4] = &gpll4.clkr,
3063 [GPLL4_OUT_EVEN] = &gpll4_out_even.clkr,
3064 [GPLL4_OUT_MAIN] = &gpll4_out_main.clkr,
3065 [GPLL4_OUT_ODD] = &gpll4_out_odd.clkr,
3066 [GPLL4_OUT_TEST] = &gpll4_out_test.clkr,
3067 [HMSS_AHB_CLK_SRC] = &hmss_ahb_clk_src.clkr,
3068 [HMSS_RBCPR_CLK_SRC] = &hmss_rbcpr_clk_src.clkr,
3069 [PCIE_AUX_CLK_SRC] = &pcie_aux_clk_src.clkr,
3070 [PDM2_CLK_SRC] = &pdm2_clk_src.clkr,
3071 [SDCC2_APPS_CLK_SRC] = &sdcc2_apps_clk_src.clkr,
3072 [SDCC4_APPS_CLK_SRC] = &sdcc4_apps_clk_src.clkr,
3073 [TSIF_REF_CLK_SRC] = &tsif_ref_clk_src.clkr,
3074 [UFS_AXI_CLK_SRC] = &ufs_axi_clk_src.clkr,
3075 [UFS_UNIPRO_CORE_CLK_SRC] = &ufs_unipro_core_clk_src.clkr,
3076 [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr,
3077 [USB30_MOCK_UTMI_CLK_SRC] = &usb30_mock_utmi_clk_src.clkr,
3078 [USB3_PHY_AUX_CLK_SRC] = &usb3_phy_aux_clk_src.clkr,
3079 [GCC_HDMI_CLKREF_CLK] = &gcc_hdmi_clkref_clk.clkr,
3080 [GCC_UFS_CLKREF_CLK] = &gcc_ufs_clkref_clk.clkr,
3081 [GCC_USB3_CLKREF_CLK] = &gcc_usb3_clkref_clk.clkr,
3082 [GCC_PCIE_CLKREF_CLK] = &gcc_pcie_clkref_clk.clkr,
3083 [GCC_RX1_USB2_CLKREF_CLK] = &gcc_rx1_usb2_clkref_clk.clkr,
3084 [GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr,
3085 [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr,
3086 [GCC_MSS_GPLL0_DIV_CLK_SRC] = &gcc_mss_gpll0_div_clk_src.clkr,
3087 [GCC_MSS_SNOC_AXI_CLK] = &gcc_mss_snoc_axi_clk.clkr,
3088 [GCC_MSS_MNOC_BIMC_AXI_CLK] = &gcc_mss_mnoc_bimc_axi_clk.clkr,
3089 [GCC_MMSS_GPLL0_CLK] = &gcc_mmss_gpll0_clk.clkr,
3090 [HMSS_GPLL0_CLK_SRC] = &hmss_gpll0_clk_src.clkr,
3091 [GCC_IM_SLEEP] = &gcc_im_sleep_clk.clkr,
3092 [AGGRE2_SNOC_NORTH_AXI] = &aggre2_snoc_north_axi_clk.clkr,
3093 [SSC_XO] = &ssc_xo_clk.clkr,
3094 [SSC_CNOC_AHBS_CLK] = &ssc_cnoc_ahbs_clk.clkr,
3095 };
3096
3097 static struct gdsc *gcc_msm8998_gdscs[] = {
3098 [PCIE_0_GDSC] = &pcie_0_gdsc,
3099 [UFS_GDSC] = &ufs_gdsc,
3100 [USB_30_GDSC] = &usb_30_gdsc,
3101 };
3102
3103 static const struct qcom_reset_map gcc_msm8998_resets[] = {
3104 [GCC_BLSP1_QUP1_BCR] = { 0x19000 },
3105 [GCC_BLSP1_QUP2_BCR] = { 0x1b000 },
3106 [GCC_BLSP1_QUP3_BCR] = { 0x1d000 },
3107 [GCC_BLSP1_QUP4_BCR] = { 0x1f000 },
3108 [GCC_BLSP1_QUP5_BCR] = { 0x21000 },
3109 [GCC_BLSP1_QUP6_BCR] = { 0x23000 },
3110 [GCC_BLSP2_QUP1_BCR] = { 0x26000 },
3111 [GCC_BLSP2_QUP2_BCR] = { 0x28000 },
3112 [GCC_BLSP2_QUP3_BCR] = { 0x2a000 },
3113 [GCC_BLSP2_QUP4_BCR] = { 0x2c000 },
3114 [GCC_BLSP2_QUP5_BCR] = { 0x2e000 },
3115 [GCC_BLSP2_QUP6_BCR] = { 0x30000 },
3116 [GCC_PCIE_0_BCR] = { 0x6b000 },
3117 [GCC_PDM_BCR] = { 0x33000 },
3118 [GCC_SDCC2_BCR] = { 0x14000 },
3119 [GCC_SDCC4_BCR] = { 0x16000 },
3120 [GCC_TSIF_BCR] = { 0x36000 },
3121 [GCC_UFS_BCR] = { 0x75000 },
3122 [GCC_USB_30_BCR] = { 0xf000 },
3123 [GCC_SYSTEM_NOC_BCR] = { 0x4000 },
3124 [GCC_CONFIG_NOC_BCR] = { 0x5000 },
3125 [GCC_AHB2PHY_EAST_BCR] = { 0x7000 },
3126 [GCC_IMEM_BCR] = { 0x8000 },
3127 [GCC_PIMEM_BCR] = { 0xa000 },
3128 [GCC_MMSS_BCR] = { 0xb000 },
3129 [GCC_QDSS_BCR] = { 0xc000 },
3130 [GCC_WCSS_BCR] = { 0x11000 },
3131 [GCC_QUSB2PHY_PRIM_BCR] = { 0x12000 },
3132 [GCC_QUSB2PHY_SEC_BCR] = { 0x12004 },
3133 [GCC_BLSP1_BCR] = { 0x17000 },
3134 [GCC_BLSP1_UART1_BCR] = { 0x1a000 },
3135 [GCC_BLSP1_UART2_BCR] = { 0x1c000 },
3136 [GCC_BLSP1_UART3_BCR] = { 0x1e000 },
3137 [GCC_CM_PHY_REFGEN1_BCR] = { 0x22000 },
3138 [GCC_CM_PHY_REFGEN2_BCR] = { 0x24000 },
3139 [GCC_BLSP2_BCR] = { 0x25000 },
3140 [GCC_BLSP2_UART1_BCR] = { 0x27000 },
3141 [GCC_BLSP2_UART2_BCR] = { 0x29000 },
3142 [GCC_BLSP2_UART3_BCR] = { 0x2b000 },
3143 [GCC_SRAM_SENSOR_BCR] = { 0x2d000 },
3144 [GCC_PRNG_BCR] = { 0x34000 },
3145 [GCC_TSIF_0_RESET] = { 0x36024 },
3146 [GCC_TSIF_1_RESET] = { 0x36028 },
3147 [GCC_TCSR_BCR] = { 0x37000 },
3148 [GCC_BOOT_ROM_BCR] = { 0x38000 },
3149 [GCC_MSG_RAM_BCR] = { 0x39000 },
3150 [GCC_TLMM_BCR] = { 0x3a000 },
3151 [GCC_MPM_BCR] = { 0x3b000 },
3152 [GCC_SEC_CTRL_BCR] = { 0x3d000 },
3153 [GCC_SPMI_BCR] = { 0x3f000 },
3154 [GCC_SPDM_BCR] = { 0x40000 },
3155 [GCC_CE1_BCR] = { 0x41000 },
3156 [GCC_BIMC_BCR] = { 0x44000 },
3157 [GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x49000 },
3158 [GCC_SNOC_BUS_TIMEOUT1_BCR] = { 0x49008 },
3159 [GCC_SNOC_BUS_TIMEOUT3_BCR] = { 0x49010 },
3160 [GCC_SNOC_BUS_TIMEOUT_EXTREF_BCR] = { 0x49018 },
3161 [GCC_PNOC_BUS_TIMEOUT0_BCR] = { 0x4a000 },
3162 [GCC_CNOC_PERIPH_BUS_TIMEOUT1_BCR] = { 0x4a004 },
3163 [GCC_CNOC_PERIPH_BUS_TIMEOUT2_BCR] = { 0x4a00c },
3164 [GCC_CNOC_BUS_TIMEOUT0_BCR] = { 0x4b000 },
3165 [GCC_CNOC_BUS_TIMEOUT1_BCR] = { 0x4b008 },
3166 [GCC_CNOC_BUS_TIMEOUT2_BCR] = { 0x4b010 },
3167 [GCC_CNOC_BUS_TIMEOUT3_BCR] = { 0x4b018 },
3168 [GCC_CNOC_BUS_TIMEOUT4_BCR] = { 0x4b020 },
3169 [GCC_CNOC_BUS_TIMEOUT5_BCR] = { 0x4b028 },
3170 [GCC_CNOC_BUS_TIMEOUT6_BCR] = { 0x4b030 },
3171 [GCC_CNOC_BUS_TIMEOUT7_BCR] = { 0x4b038 },
3172 [GCC_APB2JTAG_BCR] = { 0x4c000 },
3173 [GCC_RBCPR_CX_BCR] = { 0x4e000 },
3174 [GCC_RBCPR_MX_BCR] = { 0x4f000 },
3175 [GCC_USB3_PHY_BCR] = { 0x50020 },
3176 [GCC_USB3PHY_PHY_BCR] = { 0x50024 },
3177 [GCC_USB3_DP_PHY_BCR] = { 0x50028 },
3178 [GCC_SSC_BCR] = { 0x63000 },
3179 [GCC_SSC_RESET] = { 0x63020 },
3180 [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 },
3181 [GCC_PCIE_0_LINK_DOWN_BCR] = { 0x6c014 },
3182 [GCC_PCIE_0_PHY_BCR] = { 0x6c01c },
3183 [GCC_PCIE_0_NOCSR_COM_PHY_BCR] = { 0x6c020 },
3184 [GCC_PCIE_PHY_BCR] = { 0x6f000 },
3185 [GCC_PCIE_PHY_NOCSR_COM_PHY_BCR] = { 0x6f00c },
3186 [GCC_PCIE_PHY_CFG_AHB_BCR] = { 0x6f010 },
3187 [GCC_PCIE_PHY_COM_BCR] = { 0x6f014 },
3188 [GCC_GPU_BCR] = { 0x71000 },
3189 [GCC_SPSS_BCR] = { 0x72000 },
3190 [GCC_OBT_ODT_BCR] = { 0x73000 },
3191 [GCC_MSS_RESTART] = { 0x79000 },
3192 [GCC_VS_BCR] = { 0x7a000 },
3193 [GCC_MSS_VS_RESET] = { 0x7a100 },
3194 [GCC_GPU_VS_RESET] = { 0x7a104 },
3195 [GCC_APC0_VS_RESET] = { 0x7a108 },
3196 [GCC_APC1_VS_RESET] = { 0x7a10c },
3197 [GCC_CNOC_BUS_TIMEOUT8_BCR] = { 0x80000 },
3198 [GCC_CNOC_BUS_TIMEOUT9_BCR] = { 0x80008 },
3199 [GCC_CNOC_BUS_TIMEOUT10_BCR] = { 0x80010 },
3200 [GCC_CNOC_BUS_TIMEOUT11_BCR] = { 0x80018 },
3201 [GCC_CNOC_BUS_TIMEOUT12_BCR] = { 0x80020 },
3202 [GCC_CNOC_BUS_TIMEOUT13_BCR] = { 0x80028 },
3203 [GCC_CNOC_BUS_TIMEOUT14_BCR] = { 0x80030 },
3204 [GCC_CNOC_BUS_TIMEOUT_EXTREF_BCR] = { 0x80038 },
3205 [GCC_AGGRE1_NOC_BCR] = { 0x82000 },
3206 [GCC_AGGRE2_NOC_BCR] = { 0x83000 },
3207 [GCC_DCC_BCR] = { 0x84000 },
3208 [GCC_QREFS_VBG_CAL_BCR] = { 0x88028 },
3209 [GCC_IPA_BCR] = { 0x89000 },
3210 [GCC_GLM_BCR] = { 0x8b000 },
3211 [GCC_SKL_BCR] = { 0x8c000 },
3212 [GCC_MSMPU_BCR] = { 0x8d000 },
3213 };
3214
3215 static const struct regmap_config gcc_msm8998_regmap_config = {
3216 .reg_bits = 32,
3217 .reg_stride = 4,
3218 .val_bits = 32,
3219 .max_register = 0x8f000,
3220 .fast_io = true,
3221 };
3222
3223 static const struct qcom_cc_desc gcc_msm8998_desc = {
3224 .config = &gcc_msm8998_regmap_config,
3225 .clks = gcc_msm8998_clocks,
3226 .num_clks = ARRAY_SIZE(gcc_msm8998_clocks),
3227 .resets = gcc_msm8998_resets,
3228 .num_resets = ARRAY_SIZE(gcc_msm8998_resets),
3229 .gdscs = gcc_msm8998_gdscs,
3230 .num_gdscs = ARRAY_SIZE(gcc_msm8998_gdscs),
3231 };
3232
3233 static int gcc_msm8998_probe(struct platform_device *pdev)
3234 {
3235 struct regmap *regmap;
3236 int ret;
3237
3238 regmap = qcom_cc_map(pdev, &gcc_msm8998_desc);
3239 if (IS_ERR(regmap))
3240 return PTR_ERR(regmap);
3241
3242
3243
3244
3245
3246 ret = regmap_update_bits(regmap, 0x52008, BIT(21), BIT(21));
3247 if (ret)
3248 return ret;
3249
3250 return qcom_cc_really_probe(pdev, &gcc_msm8998_desc, regmap);
3251 }
3252
3253 static const struct of_device_id gcc_msm8998_match_table[] = {
3254 { .compatible = "qcom,gcc-msm8998" },
3255 { }
3256 };
3257 MODULE_DEVICE_TABLE(of, gcc_msm8998_match_table);
3258
3259 static struct platform_driver gcc_msm8998_driver = {
3260 .probe = gcc_msm8998_probe,
3261 .driver = {
3262 .name = "gcc-msm8998",
3263 .of_match_table = gcc_msm8998_match_table,
3264 },
3265 };
3266
3267 static int __init gcc_msm8998_init(void)
3268 {
3269 return platform_driver_register(&gcc_msm8998_driver);
3270 }
3271 core_initcall(gcc_msm8998_init);
3272
3273 static void __exit gcc_msm8998_exit(void)
3274 {
3275 platform_driver_unregister(&gcc_msm8998_driver);
3276 }
3277 module_exit(gcc_msm8998_exit);
3278
3279 MODULE_DESCRIPTION("QCOM GCC msm8998 Driver");
3280 MODULE_LICENSE("GPL v2");
3281 MODULE_ALIAS("platform:gcc-msm8998");