Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
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-mdm9607.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 enum {
0029     P_XO,
0030     P_BIMC,
0031     P_GPLL0,
0032     P_GPLL1,
0033     P_GPLL2,
0034     P_SLEEP_CLK,
0035 };
0036 
0037 static struct clk_alpha_pll gpll0_early = {
0038     .offset = 0x21000,
0039     .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
0040     .clkr = {
0041         .enable_reg = 0x45000,
0042         .enable_mask = BIT(0),
0043         .hw.init = &(struct clk_init_data)
0044         {
0045             .name = "gpll0_early",
0046             .parent_data = &(const struct clk_parent_data){
0047                 .fw_name = "xo",
0048             },
0049             .num_parents = 1,
0050             .ops = &clk_alpha_pll_ops,
0051         },
0052     },
0053 };
0054 
0055 static struct clk_alpha_pll_postdiv gpll0 = {
0056     .offset = 0x21000,
0057     .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
0058     .clkr.hw.init = &(struct clk_init_data)
0059     {
0060         .name = "gpll0",
0061         .parent_hws = (const struct clk_hw *[]){ &gpll0_early.clkr.hw },
0062         .num_parents = 1,
0063         .ops = &clk_alpha_pll_postdiv_ops,
0064     },
0065 };
0066 
0067 static const struct parent_map gcc_xo_gpll0_map[] = {
0068     { P_XO, 0 },
0069     { P_GPLL0, 1 },
0070 };
0071 
0072 static const struct clk_parent_data gcc_xo_gpll0[] = {
0073     { .fw_name = "xo" },
0074     { .hw = &gpll0.clkr.hw },
0075 };
0076 
0077 static struct clk_pll gpll1 = {
0078     .l_reg = 0x20004,
0079     .m_reg = 0x20008,
0080     .n_reg = 0x2000c,
0081     .config_reg = 0x20010,
0082     .mode_reg = 0x20000,
0083     .status_reg = 0x2001c,
0084     .status_bit = 17,
0085     .clkr.hw.init = &(struct clk_init_data){
0086         .name = "gpll1",
0087         .parent_data = &(const struct clk_parent_data){
0088             .fw_name = "xo",
0089         },
0090         .num_parents = 1,
0091         .ops = &clk_pll_ops,
0092     },
0093 };
0094 
0095 static struct clk_regmap gpll1_vote = {
0096     .enable_reg = 0x45000,
0097     .enable_mask = BIT(1),
0098     .hw.init = &(struct clk_init_data){
0099         .name = "gpll1_vote",
0100         .parent_hws = (const struct clk_hw *[]){ &gpll1.clkr.hw },
0101         .num_parents = 1,
0102         .ops = &clk_pll_vote_ops,
0103     },
0104 };
0105 
0106 static const struct parent_map gcc_xo_gpll0_gpll1_sleep_map[] = {
0107     { P_XO, 0 },
0108     { P_GPLL0, 1 },
0109     { P_GPLL1, 2 },
0110     { P_SLEEP_CLK, 6 },
0111 };
0112 
0113 static const struct clk_parent_data gcc_xo_gpll0_gpll1_sleep[] = {
0114     { .fw_name = "xo" },
0115     { .hw = &gpll0.clkr.hw },
0116     { .hw = &gpll1_vote.hw },
0117     { .fw_name = "sleep_clk" },
0118 };
0119 
0120 static struct clk_alpha_pll gpll2_early = {
0121     .offset = 0x25000,
0122     .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
0123     .clkr = {
0124         .enable_reg = 0x45000,
0125         .enable_mask = BIT(3), /* Yeah, apparently it's not 2 */
0126         .hw.init = &(struct clk_init_data)
0127         {
0128             .name = "gpll2_early",
0129             .parent_data = &(const struct clk_parent_data){
0130                 .fw_name = "xo",
0131             },
0132             .num_parents = 1,
0133             .ops = &clk_alpha_pll_ops,
0134         },
0135     },
0136 };
0137 
0138 static struct clk_alpha_pll_postdiv gpll2 = {
0139     .offset = 0x25000,
0140     .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
0141     .clkr.hw.init = &(struct clk_init_data)
0142     {
0143         .name = "gpll2",
0144         .parent_hws = (const struct clk_hw *[]){ &gpll2_early.clkr.hw },
0145         .num_parents = 1,
0146         .ops = &clk_alpha_pll_postdiv_ops,
0147     },
0148 };
0149 
0150 static const struct parent_map gcc_xo_gpll0_gpll2_map[] = {
0151     { P_XO, 0 },
0152     { P_GPLL0, 1 },
0153     { P_GPLL2, 2 },
0154 };
0155 
0156 static const struct clk_parent_data gcc_xo_gpll0_gpll2[] = {
0157     { .fw_name = "xo" },
0158     { .hw = &gpll0.clkr.hw },
0159     { .hw = &gpll2.clkr.hw },
0160 };
0161 
0162 static const struct parent_map gcc_xo_gpll0_gpll1_gpll2_map[] = {
0163     { P_XO, 0 },
0164     { P_GPLL0, 1 },
0165     { P_GPLL1, 2 },
0166     { P_GPLL2, 3 },
0167 };
0168 
0169 static const struct clk_parent_data gcc_xo_gpll0_gpll1_gpll2[] = {
0170     { .fw_name = "xo" },
0171     { .hw = &gpll0.clkr.hw },
0172     { .hw = &gpll1_vote.hw },
0173     { .hw = &gpll2.clkr.hw },
0174 };
0175 
0176 static const struct freq_tbl ftbl_apss_ahb_clk[] = {
0177     F(19200000, P_XO, 1, 0, 0),
0178     F(50000000, P_GPLL0, 16, 0, 0),
0179     F(100000000, P_GPLL0, 8, 0, 0),
0180     { }
0181 };
0182 
0183 static struct clk_rcg2 apss_ahb_clk_src = {
0184     .cmd_rcgr = 0x46000,
0185     .hid_width = 5,
0186     .parent_map = gcc_xo_gpll0_map,
0187     .freq_tbl = ftbl_apss_ahb_clk,
0188     .clkr.hw.init = &(struct clk_init_data){
0189         .name = "apss_ahb_clk_src",
0190         .parent_data = gcc_xo_gpll0,
0191         .num_parents = 2,
0192         .ops = &clk_rcg2_ops,
0193     },
0194 };
0195 
0196 static struct clk_pll bimc_pll = {
0197     .l_reg = 0x23004,
0198     .m_reg = 0x23008,
0199     .n_reg = 0x2300c,
0200     .config_reg = 0x23010,
0201     .mode_reg = 0x23000,
0202     .status_reg = 0x2301c,
0203     .status_bit = 17,
0204     .clkr.hw.init = &(struct clk_init_data){
0205         .name = "bimc_pll",
0206         .parent_data = &(const struct clk_parent_data){
0207             .fw_name = "xo",
0208         },
0209         .num_parents = 1,
0210         .ops = &clk_pll_ops,
0211     },
0212 };
0213 
0214 static struct clk_regmap bimc_pll_vote = {
0215     .enable_reg = 0x45000,
0216     .enable_mask = BIT(3),
0217     .hw.init = &(struct clk_init_data){
0218         .name = "bimc_pll_vote",
0219         .parent_hws = (const struct clk_hw *[]){ &bimc_pll.clkr.hw },
0220         .num_parents = 1,
0221         .ops = &clk_pll_vote_ops,
0222     },
0223 };
0224 
0225 static const struct parent_map gcc_xo_gpll0_bimc_map[] = {
0226     { P_XO, 0 },
0227     { P_GPLL0, 1 },
0228     { P_BIMC, 2 },
0229 };
0230 
0231 static const struct clk_parent_data gcc_xo_gpll0_bimc[] = {
0232     { .fw_name = "xo" },
0233     { .hw = &gpll0.clkr.hw },
0234     { .hw = &bimc_pll_vote.hw },
0235 };
0236 
0237 static const struct freq_tbl ftbl_pcnoc_bfdcd_clk_src[] = {
0238     F(19200000, P_XO, 1, 0, 0),
0239     F(50000000, P_GPLL0, 16, 0, 0),
0240     F(100000000, P_GPLL0, 8, 0, 0),
0241     { }
0242 };
0243 
0244 static struct clk_rcg2 pcnoc_bfdcd_clk_src = {
0245     .cmd_rcgr = 0x27000,
0246     .freq_tbl = ftbl_pcnoc_bfdcd_clk_src,
0247     .hid_width = 5,
0248     .parent_map = gcc_xo_gpll0_bimc_map,
0249     .clkr.hw.init = &(struct clk_init_data){
0250         .name = "pcnoc_bfdcd_clk_src",
0251         .parent_data = gcc_xo_gpll0_bimc,
0252         .num_parents = ARRAY_SIZE(gcc_xo_gpll0_bimc),
0253         .ops = &clk_rcg2_ops,
0254         .flags = CLK_IS_CRITICAL,
0255     },
0256 };
0257 
0258 static struct clk_rcg2 system_noc_bfdcd_clk_src = {
0259     .cmd_rcgr = 0x26004,
0260     .hid_width = 5,
0261     .parent_map = gcc_xo_gpll0_bimc_map,
0262     .clkr.hw.init = &(struct clk_init_data){
0263         .name = "system_noc_bfdcd_clk_src",
0264         .parent_data = gcc_xo_gpll0_bimc,
0265         .num_parents = ARRAY_SIZE(gcc_xo_gpll0_bimc),
0266         .ops = &clk_rcg2_ops,
0267     },
0268 };
0269 
0270 static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_i2c_apps_clk[] = {
0271     F(19200000, P_XO, 1, 0, 0),
0272     F(50000000, P_GPLL0, 16, 0, 0),
0273     { }
0274 };
0275 
0276 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
0277     .cmd_rcgr = 0x200c,
0278     .hid_width = 5,
0279     .parent_map = gcc_xo_gpll0_map,
0280     .freq_tbl = ftbl_gcc_blsp1_qup1_6_i2c_apps_clk,
0281     .clkr.hw.init = &(struct clk_init_data){
0282         .name = "blsp1_qup1_i2c_apps_clk_src",
0283         .parent_data = gcc_xo_gpll0,
0284         .num_parents = 2,
0285         .ops = &clk_rcg2_ops,
0286     },
0287 };
0288 
0289 static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_spi_apps_clk[] = {
0290     F(960000, P_XO, 10, 1, 2),
0291     F(4800000, P_XO, 4, 0, 0),
0292     F(9600000, P_XO, 2, 0, 0),
0293     F(16000000, P_GPLL0, 10, 1, 5),
0294     F(19200000, P_XO, 1, 0, 0),
0295     F(25000000, P_GPLL0, 16, 1, 2),
0296     F(50000000, P_GPLL0, 16, 0, 0),
0297     { }
0298 };
0299 
0300 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = {
0301     .cmd_rcgr = 0x2024,
0302     .mnd_width = 8,
0303     .hid_width = 5,
0304     .parent_map = gcc_xo_gpll0_map,
0305     .freq_tbl = ftbl_gcc_blsp1_qup1_6_spi_apps_clk,
0306     .clkr.hw.init = &(struct clk_init_data){
0307         .name = "blsp1_qup1_spi_apps_clk_src",
0308         .parent_data = gcc_xo_gpll0,
0309         .num_parents = 2,
0310         .ops = &clk_rcg2_ops,
0311     },
0312 };
0313 
0314 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = {
0315     .cmd_rcgr = 0x3000,
0316     .hid_width = 5,
0317     .parent_map = gcc_xo_gpll0_map,
0318     .freq_tbl = ftbl_gcc_blsp1_qup1_6_i2c_apps_clk,
0319     .clkr.hw.init = &(struct clk_init_data){
0320         .name = "blsp1_qup2_i2c_apps_clk_src",
0321         .parent_data = gcc_xo_gpll0,
0322         .num_parents = 2,
0323         .ops = &clk_rcg2_ops,
0324     },
0325 };
0326 
0327 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = {
0328     .cmd_rcgr = 0x3014,
0329     .mnd_width = 8,
0330     .hid_width = 5,
0331     .parent_map = gcc_xo_gpll0_map,
0332     .freq_tbl = ftbl_gcc_blsp1_qup1_6_spi_apps_clk,
0333     .clkr.hw.init = &(struct clk_init_data){
0334         .name = "blsp1_qup2_spi_apps_clk_src",
0335         .parent_data = gcc_xo_gpll0,
0336         .num_parents = 2,
0337         .ops = &clk_rcg2_ops,
0338     },
0339 };
0340 
0341 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = {
0342     .cmd_rcgr = 0x4000,
0343     .hid_width = 5,
0344     .parent_map = gcc_xo_gpll0_map,
0345     .freq_tbl = ftbl_gcc_blsp1_qup1_6_i2c_apps_clk,
0346     .clkr.hw.init = &(struct clk_init_data){
0347         .name = "blsp1_qup3_i2c_apps_clk_src",
0348         .parent_data = gcc_xo_gpll0,
0349         .num_parents = 2,
0350         .ops = &clk_rcg2_ops,
0351     },
0352 };
0353 
0354 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = {
0355     .cmd_rcgr = 0x4024,
0356     .mnd_width = 8,
0357     .hid_width = 5,
0358     .parent_map = gcc_xo_gpll0_map,
0359     .freq_tbl = ftbl_gcc_blsp1_qup1_6_spi_apps_clk,
0360     .clkr.hw.init = &(struct clk_init_data){
0361         .name = "blsp1_qup3_spi_apps_clk_src",
0362         .parent_data = gcc_xo_gpll0,
0363         .num_parents = 2,
0364         .ops = &clk_rcg2_ops,
0365     },
0366 };
0367 
0368 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = {
0369     .cmd_rcgr = 0x5000,
0370     .hid_width = 5,
0371     .parent_map = gcc_xo_gpll0_map,
0372     .freq_tbl = ftbl_gcc_blsp1_qup1_6_i2c_apps_clk,
0373     .clkr.hw.init = &(struct clk_init_data){
0374         .name = "blsp1_qup4_i2c_apps_clk_src",
0375         .parent_data = gcc_xo_gpll0,
0376         .num_parents = 2,
0377         .ops = &clk_rcg2_ops,
0378     },
0379 };
0380 
0381 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = {
0382     .cmd_rcgr = 0x5024,
0383     .mnd_width = 8,
0384     .hid_width = 5,
0385     .parent_map = gcc_xo_gpll0_map,
0386     .freq_tbl = ftbl_gcc_blsp1_qup1_6_spi_apps_clk,
0387     .clkr.hw.init = &(struct clk_init_data){
0388         .name = "blsp1_qup4_spi_apps_clk_src",
0389         .parent_data = gcc_xo_gpll0,
0390         .num_parents = 2,
0391         .ops = &clk_rcg2_ops,
0392     },
0393 };
0394 
0395 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = {
0396     .cmd_rcgr = 0x6000,
0397     .hid_width = 5,
0398     .parent_map = gcc_xo_gpll0_map,
0399     .freq_tbl = ftbl_gcc_blsp1_qup1_6_i2c_apps_clk,
0400     .clkr.hw.init = &(struct clk_init_data){
0401         .name = "blsp1_qup5_i2c_apps_clk_src",
0402         .parent_data = gcc_xo_gpll0,
0403         .num_parents = 2,
0404         .ops = &clk_rcg2_ops,
0405     },
0406 };
0407 
0408 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = {
0409     .cmd_rcgr = 0x6024,
0410     .mnd_width = 8,
0411     .hid_width = 5,
0412     .parent_map = gcc_xo_gpll0_map,
0413     .freq_tbl = ftbl_gcc_blsp1_qup1_6_spi_apps_clk,
0414     .clkr.hw.init = &(struct clk_init_data){
0415         .name = "blsp1_qup5_spi_apps_clk_src",
0416         .parent_data = gcc_xo_gpll0,
0417         .num_parents = 2,
0418         .ops = &clk_rcg2_ops,
0419     },
0420 };
0421 
0422 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = {
0423     .cmd_rcgr = 0x7000,
0424     .hid_width = 5,
0425     .parent_map = gcc_xo_gpll0_map,
0426     .freq_tbl = ftbl_gcc_blsp1_qup1_6_i2c_apps_clk,
0427     .clkr.hw.init = &(struct clk_init_data){
0428         .name = "blsp1_qup6_i2c_apps_clk_src",
0429         .parent_data = gcc_xo_gpll0,
0430         .num_parents = 2,
0431         .ops = &clk_rcg2_ops,
0432     },
0433 };
0434 
0435 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = {
0436     .cmd_rcgr = 0x7024,
0437     .mnd_width = 8,
0438     .hid_width = 5,
0439     .parent_map = gcc_xo_gpll0_map,
0440     .freq_tbl = ftbl_gcc_blsp1_qup1_6_spi_apps_clk,
0441     .clkr.hw.init = &(struct clk_init_data){
0442         .name = "blsp1_qup6_spi_apps_clk_src",
0443         .parent_data = gcc_xo_gpll0,
0444         .num_parents = 2,
0445         .ops = &clk_rcg2_ops,
0446     },
0447 };
0448 
0449 static const struct freq_tbl ftbl_gcc_blsp1_uart1_6_apps_clk[] = {
0450     F(3686400, P_GPLL0, 1, 72, 15625),
0451     F(7372800, P_GPLL0, 1, 144, 15625),
0452     F(14745600, P_GPLL0, 1, 288, 15625),
0453     F(16000000, P_GPLL0, 10, 1, 5),
0454     F(19200000, P_XO, 1, 0, 0),
0455     F(24000000, P_GPLL0, 1, 3, 100),
0456     F(25000000, P_GPLL0, 16, 1, 2),
0457     F(32000000, P_GPLL0, 1, 1, 25),
0458     F(40000000, P_GPLL0, 1, 1, 20),
0459     F(46400000, P_GPLL0, 1, 29, 500),
0460     F(48000000, P_GPLL0, 1, 3, 50),
0461     F(51200000, P_GPLL0, 1, 8, 125),
0462     F(56000000, P_GPLL0, 1, 7, 100),
0463     F(58982400, P_GPLL0, 1, 1152, 15625),
0464     F(60000000, P_GPLL0, 1, 3, 40),
0465     { }
0466 };
0467 
0468 static struct clk_rcg2 blsp1_uart1_apps_clk_src = {
0469     .cmd_rcgr = 0x2044,
0470     .mnd_width = 16,
0471     .hid_width = 5,
0472     .parent_map = gcc_xo_gpll0_map,
0473     .freq_tbl = ftbl_gcc_blsp1_uart1_6_apps_clk,
0474     .clkr.hw.init = &(struct clk_init_data){
0475         .name = "blsp1_uart1_apps_clk_src",
0476         .parent_data = gcc_xo_gpll0,
0477         .num_parents = 2,
0478         .ops = &clk_rcg2_ops,
0479     },
0480 };
0481 
0482 static struct clk_rcg2 blsp1_uart2_apps_clk_src = {
0483     .cmd_rcgr = 0x3034,
0484     .mnd_width = 16,
0485     .hid_width = 5,
0486     .parent_map = gcc_xo_gpll0_map,
0487     .freq_tbl = ftbl_gcc_blsp1_uart1_6_apps_clk,
0488     .clkr.hw.init = &(struct clk_init_data){
0489         .name = "blsp1_uart2_apps_clk_src",
0490         .parent_data = gcc_xo_gpll0,
0491         .num_parents = 2,
0492         .ops = &clk_rcg2_ops,
0493     },
0494 };
0495 
0496 static struct clk_rcg2 blsp1_uart3_apps_clk_src = {
0497     .cmd_rcgr = 0x4044,
0498     .mnd_width = 16,
0499     .hid_width = 5,
0500     .parent_map = gcc_xo_gpll0_map,
0501     .freq_tbl = ftbl_gcc_blsp1_uart1_6_apps_clk,
0502     .clkr.hw.init = &(struct clk_init_data){
0503         .name = "blsp1_uart3_apps_clk_src",
0504         .parent_data = gcc_xo_gpll0,
0505         .num_parents = 2,
0506         .ops = &clk_rcg2_ops,
0507     },
0508 };
0509 
0510 static struct clk_rcg2 blsp1_uart4_apps_clk_src = {
0511     .cmd_rcgr = 0x5044,
0512     .mnd_width = 16,
0513     .hid_width = 5,
0514     .parent_map = gcc_xo_gpll0_map,
0515     .freq_tbl = ftbl_gcc_blsp1_uart1_6_apps_clk,
0516     .clkr.hw.init = &(struct clk_init_data){
0517         .name = "blsp1_uart4_apps_clk_src",
0518         .parent_data = gcc_xo_gpll0,
0519         .num_parents = 2,
0520         .ops = &clk_rcg2_ops,
0521     },
0522 };
0523 
0524 static struct clk_rcg2 blsp1_uart5_apps_clk_src = {
0525     .cmd_rcgr = 0x6044,
0526     .mnd_width = 16,
0527     .hid_width = 5,
0528     .parent_map = gcc_xo_gpll0_map,
0529     .freq_tbl = ftbl_gcc_blsp1_uart1_6_apps_clk,
0530     .clkr.hw.init = &(struct clk_init_data){
0531         .name = "blsp1_uart5_apps_clk_src",
0532         .parent_data = gcc_xo_gpll0,
0533         .num_parents = 2,
0534         .ops = &clk_rcg2_ops,
0535     },
0536 };
0537 
0538 static struct clk_rcg2 blsp1_uart6_apps_clk_src = {
0539     .cmd_rcgr = 0x6044,
0540     .mnd_width = 16,
0541     .hid_width = 5,
0542     .parent_map = gcc_xo_gpll0_map,
0543     .freq_tbl = ftbl_gcc_blsp1_uart1_6_apps_clk,
0544     .clkr.hw.init = &(struct clk_init_data){
0545         .name = "blsp1_uart6_apps_clk_src",
0546         .parent_data = gcc_xo_gpll0,
0547         .num_parents = 2,
0548         .ops = &clk_rcg2_ops,
0549     },
0550 };
0551 
0552 static const struct freq_tbl ftbl_gcc_crypto_clk[] = {
0553     F(50000000, P_GPLL0, 16, 0, 0),
0554     F(80000000, P_GPLL0, 10, 0, 0),
0555     F(100000000, P_GPLL0, 8, 0, 0),
0556     F(160000000, P_GPLL0, 5, 0, 0),
0557     { }
0558 };
0559 
0560 static struct clk_rcg2 crypto_clk_src = {
0561     .cmd_rcgr = 0x16004,
0562     .hid_width = 5,
0563     .parent_map = gcc_xo_gpll0_map,
0564     .freq_tbl = ftbl_gcc_crypto_clk,
0565     .clkr.hw.init = &(struct clk_init_data){
0566         .name = "crypto_clk_src",
0567         .parent_data = gcc_xo_gpll0,
0568         .num_parents = 2,
0569         .ops = &clk_rcg2_ops,
0570     },
0571 };
0572 
0573 static const struct freq_tbl ftbl_gcc_gp1_3_clk[] = {
0574     F(19200000, P_XO, 1, 0, 0),
0575     { }
0576 };
0577 
0578 static struct clk_rcg2 gp1_clk_src = {
0579     .cmd_rcgr = 0x8004,
0580     .mnd_width = 8,
0581     .hid_width = 5,
0582     .parent_map = gcc_xo_gpll0_gpll1_sleep_map,
0583     .freq_tbl = ftbl_gcc_gp1_3_clk,
0584     .clkr.hw.init = &(struct clk_init_data){
0585         .name = "gp1_clk_src",
0586         .parent_data = gcc_xo_gpll0_gpll1_sleep,
0587         .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll1_sleep),
0588         .ops = &clk_rcg2_ops,
0589     },
0590 };
0591 
0592 static struct clk_rcg2 gp2_clk_src = {
0593     .cmd_rcgr = 0x09004,
0594     .mnd_width = 8,
0595     .hid_width = 5,
0596     .parent_map = gcc_xo_gpll0_gpll1_sleep_map,
0597     .freq_tbl = ftbl_gcc_gp1_3_clk,
0598     .clkr.hw.init = &(struct clk_init_data){
0599         .name = "gp2_clk_src",
0600         .parent_data = gcc_xo_gpll0_gpll1_sleep,
0601         .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll1_sleep),
0602         .ops = &clk_rcg2_ops,
0603     },
0604 };
0605 
0606 static struct clk_rcg2 gp3_clk_src = {
0607     .cmd_rcgr = 0x0a004,
0608     .mnd_width = 8,
0609     .hid_width = 5,
0610     .parent_map = gcc_xo_gpll0_gpll1_sleep_map,
0611     .freq_tbl = ftbl_gcc_gp1_3_clk,
0612     .clkr.hw.init = &(struct clk_init_data){
0613         .name = "gp3_clk_src",
0614         .parent_data = gcc_xo_gpll0_gpll1_sleep,
0615         .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll1_sleep),
0616         .ops = &clk_rcg2_ops,
0617     },
0618 };
0619 
0620 static const struct freq_tbl ftbl_gcc_pdm2_clk[] = {
0621     F(64000000, P_GPLL0, 12.5, 0, 0),
0622     { }
0623 };
0624 
0625 static struct clk_rcg2 pdm2_clk_src = {
0626     .cmd_rcgr = 0x44010,
0627     .hid_width = 5,
0628     .parent_map = gcc_xo_gpll0_map,
0629     .freq_tbl = ftbl_gcc_pdm2_clk,
0630     .clkr.hw.init = &(struct clk_init_data){
0631         .name = "pdm2_clk_src",
0632         .parent_data = gcc_xo_gpll0,
0633         .num_parents = 2,
0634         .ops = &clk_rcg2_ops,
0635     },
0636 };
0637 
0638 static const struct freq_tbl ftbl_gcc_sdcc_apps_clk[] = {
0639     F(144000, P_XO, 16, 3, 25),
0640     F(400000, P_XO, 12, 1, 4),
0641     F(20000000, P_GPLL0, 10, 1, 4),
0642     F(25000000, P_GPLL0, 16, 1, 2),
0643     F(50000000, P_GPLL0, 16, 0, 0),
0644     F(100000000, P_GPLL0, 8, 0, 0),
0645     F(177770000, P_GPLL0, 4.5, 0, 0),
0646     F(200000000, P_GPLL0, 4, 0, 0),
0647     { }
0648 };
0649 
0650 static struct clk_rcg2 sdcc1_apps_clk_src = {
0651     .cmd_rcgr = 0x42004,
0652     .mnd_width = 8,
0653     .hid_width = 5,
0654     .parent_map = gcc_xo_gpll0_map,
0655     .freq_tbl = ftbl_gcc_sdcc_apps_clk,
0656     .clkr.hw.init = &(struct clk_init_data){
0657         .name = "sdcc1_apps_clk_src",
0658         .parent_data = gcc_xo_gpll0,
0659         .num_parents = 2,
0660         .ops = &clk_rcg2_floor_ops,
0661     },
0662 };
0663 
0664 static struct clk_rcg2 sdcc2_apps_clk_src = {
0665     .cmd_rcgr = 0x43004,
0666     .mnd_width = 8,
0667     .hid_width = 5,
0668     .parent_map = gcc_xo_gpll0_map,
0669     .freq_tbl = ftbl_gcc_sdcc_apps_clk,
0670     .clkr.hw.init = &(struct clk_init_data){
0671         .name = "sdcc2_apps_clk_src",
0672         .parent_data = gcc_xo_gpll0,
0673         .num_parents = 2,
0674         .ops = &clk_rcg2_floor_ops,
0675     },
0676 };
0677 
0678 static const struct freq_tbl ftbl_gcc_apss_tcu_clk[] = {
0679     F(155000000, P_GPLL2, 6, 0, 0),
0680     F(310000000, P_GPLL2, 3, 0, 0),
0681     F(400000000, P_GPLL0, 2, 0, 0),
0682     { }
0683 };
0684 
0685 static struct clk_rcg2 apss_tcu_clk_src = {
0686     .cmd_rcgr = 0x1207c,
0687     .hid_width = 5,
0688     .parent_map = gcc_xo_gpll0_gpll1_gpll2_map,
0689     .freq_tbl = ftbl_gcc_apss_tcu_clk,
0690     .clkr.hw.init = &(struct clk_init_data){
0691         .name = "apss_tcu_clk_src",
0692         .parent_data = gcc_xo_gpll0_gpll1_gpll2,
0693         .num_parents = 4,
0694         .ops = &clk_rcg2_ops,
0695     },
0696 };
0697 
0698 static const struct freq_tbl ftbl_gcc_usb_hs_system_clk[] = {
0699     F(19200000, P_XO, 1, 0, 0),
0700     F(57140000, P_GPLL0, 14, 0, 0),
0701     F(69565000, P_GPLL0, 11.5, 0, 0),
0702     F(133330000, P_GPLL0, 6, 0, 0),
0703     F(177778000, P_GPLL0, 4.5, 0, 0),
0704     { }
0705 };
0706 
0707 static struct clk_rcg2 usb_hs_system_clk_src = {
0708     .cmd_rcgr = 0x41010,
0709     .hid_width = 5,
0710     .parent_map = gcc_xo_gpll0_map,
0711     .freq_tbl = ftbl_gcc_usb_hs_system_clk,
0712     .clkr.hw.init = &(struct clk_init_data){
0713         .name = "usb_hs_system_clk_src",
0714         .parent_data = gcc_xo_gpll0,
0715         .num_parents = 2,
0716         .ops = &clk_rcg2_ops,
0717     },
0718 };
0719 
0720 static const struct freq_tbl ftbl_usb_hsic_clk_src[] = {
0721     F(480000000, P_GPLL2, 1, 0, 0),
0722     { }
0723 };
0724 
0725 static struct clk_rcg2 usb_hsic_clk_src = {
0726     .cmd_rcgr = 0x3d018,
0727     .hid_width = 5,
0728     .parent_map = gcc_xo_gpll0_gpll2_map,
0729     .freq_tbl = ftbl_usb_hsic_clk_src,
0730     .clkr.hw.init = &(struct clk_init_data){
0731         .name = "usb_hsic_clk_src",
0732         .parent_data = gcc_xo_gpll0_gpll2,
0733         .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll2),
0734         .ops = &clk_rcg2_ops,
0735     },
0736 };
0737 
0738 static const struct freq_tbl ftbl_usb_hsic_io_cal_clk_src[] = {
0739     F(9600000, P_XO, 2, 0, 0),
0740     { }
0741 };
0742 
0743 static struct clk_rcg2 usb_hsic_io_cal_clk_src = {
0744     .cmd_rcgr = 0x3d030,
0745     .hid_width = 5,
0746     .parent_map = gcc_xo_gpll0_map,
0747     .freq_tbl = ftbl_usb_hsic_io_cal_clk_src,
0748     .clkr.hw.init = &(struct clk_init_data){
0749         .name = "usb_hsic_io_cal_clk_src",
0750         .parent_data = gcc_xo_gpll0,
0751         .num_parents = ARRAY_SIZE(gcc_xo_gpll0),
0752         .ops = &clk_rcg2_ops,
0753     },
0754 };
0755 
0756 static const struct freq_tbl ftbl_usb_hsic_system_clk_src[] = {
0757     F(19200000, P_XO, 1, 0, 0),
0758     F(57140000, P_GPLL0, 14, 0, 0),
0759     F(133330000, P_GPLL0, 6, 0, 0),
0760     F(177778000, P_GPLL0, 4.5, 0, 0),
0761     { }
0762 };
0763 
0764 static struct clk_rcg2 usb_hsic_system_clk_src = {
0765     .cmd_rcgr = 0x3d000,
0766     .hid_width = 5,
0767     .parent_map = gcc_xo_gpll0_map,
0768     .freq_tbl = ftbl_usb_hsic_system_clk_src,
0769     .clkr.hw.init = &(struct clk_init_data){
0770         .name = "usb_hsic_system_clk_src",
0771         .parent_data = gcc_xo_gpll0,
0772         .num_parents = ARRAY_SIZE(gcc_xo_gpll0),
0773         .ops = &clk_rcg2_ops,
0774     },
0775 };
0776 
0777 static struct clk_branch gcc_blsp1_ahb_clk = {
0778     .halt_reg = 0x1008,
0779     .halt_check = BRANCH_HALT_VOTED,
0780     .clkr = {
0781         .enable_reg = 0x45004,
0782         .enable_mask = BIT(10),
0783         .hw.init = &(struct clk_init_data){
0784             .name = "gcc_blsp1_ahb_clk",
0785             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
0786             .num_parents = 1,
0787             .ops = &clk_branch2_ops,
0788         },
0789     },
0790 };
0791 
0792 static struct clk_branch gcc_blsp1_sleep_clk = {
0793     .halt_reg = 0x1004,
0794     .clkr = {
0795         .enable_reg = 0x1004,
0796         .enable_mask = BIT(0),
0797         .hw.init = &(struct clk_init_data){
0798             .name = "gcc_blsp1_sleep_clk",
0799             .parent_data = &(const struct clk_parent_data){
0800                 .fw_name = "sleep_clk",
0801             },
0802             .num_parents = 1,
0803             .flags = CLK_SET_RATE_PARENT,
0804             .ops = &clk_branch2_ops,
0805         },
0806     },
0807 };
0808 
0809 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = {
0810     .halt_reg = 0x2008,
0811     .clkr = {
0812         .enable_reg = 0x2008,
0813         .enable_mask = BIT(0),
0814         .hw.init = &(struct clk_init_data){
0815             .name = "gcc_blsp1_qup1_i2c_apps_clk",
0816             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup1_i2c_apps_clk_src.clkr.hw },
0817             .num_parents = 1,
0818             .flags = CLK_SET_RATE_PARENT,
0819             .ops = &clk_branch2_ops,
0820         },
0821     },
0822 };
0823 
0824 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = {
0825     .halt_reg = 0x2004,
0826     .clkr = {
0827         .enable_reg = 0x2004,
0828         .enable_mask = BIT(0),
0829         .hw.init = &(struct clk_init_data){
0830             .name = "gcc_blsp1_qup1_spi_apps_clk",
0831             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup1_spi_apps_clk_src.clkr.hw },
0832             .num_parents = 1,
0833             .flags = CLK_SET_RATE_PARENT,
0834             .ops = &clk_branch2_ops,
0835         },
0836     },
0837 };
0838 
0839 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = {
0840     .halt_reg = 0x3010,
0841     .clkr = {
0842         .enable_reg = 0x3010,
0843         .enable_mask = BIT(0),
0844         .hw.init = &(struct clk_init_data){
0845             .name = "gcc_blsp1_qup2_i2c_apps_clk",
0846             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup2_i2c_apps_clk_src.clkr.hw },
0847             .num_parents = 1,
0848             .flags = CLK_SET_RATE_PARENT,
0849             .ops = &clk_branch2_ops,
0850         },
0851     },
0852 };
0853 
0854 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
0855     .halt_reg = 0x300c,
0856     .clkr = {
0857         .enable_reg = 0x300c,
0858         .enable_mask = BIT(0),
0859         .hw.init = &(struct clk_init_data){
0860             .name = "gcc_blsp1_qup2_spi_apps_clk",
0861             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup2_spi_apps_clk_src.clkr.hw },
0862             .num_parents = 1,
0863             .flags = CLK_SET_RATE_PARENT,
0864             .ops = &clk_branch2_ops,
0865         },
0866     },
0867 };
0868 
0869 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = {
0870     .halt_reg = 0x4020,
0871     .clkr = {
0872         .enable_reg = 0x4020,
0873         .enable_mask = BIT(0),
0874         .hw.init = &(struct clk_init_data){
0875             .name = "gcc_blsp1_qup3_i2c_apps_clk",
0876             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup3_i2c_apps_clk_src.clkr.hw },
0877             .num_parents = 1,
0878             .flags = CLK_SET_RATE_PARENT,
0879             .ops = &clk_branch2_ops,
0880         },
0881     },
0882 };
0883 
0884 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = {
0885     .halt_reg = 0x401c,
0886     .clkr = {
0887         .enable_reg = 0x401c,
0888         .enable_mask = BIT(0),
0889         .hw.init = &(struct clk_init_data){
0890             .name = "gcc_blsp1_qup3_spi_apps_clk",
0891             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup3_spi_apps_clk_src.clkr.hw },
0892             .num_parents = 1,
0893             .flags = CLK_SET_RATE_PARENT,
0894             .ops = &clk_branch2_ops,
0895         },
0896     },
0897 };
0898 
0899 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = {
0900     .halt_reg = 0x5020,
0901     .clkr = {
0902         .enable_reg = 0x5020,
0903         .enable_mask = BIT(0),
0904         .hw.init = &(struct clk_init_data){
0905             .name = "gcc_blsp1_qup4_i2c_apps_clk",
0906             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup4_i2c_apps_clk_src.clkr.hw },
0907             .num_parents = 1,
0908             .flags = CLK_SET_RATE_PARENT,
0909             .ops = &clk_branch2_ops,
0910         },
0911     },
0912 };
0913 
0914 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = {
0915     .halt_reg = 0x501c,
0916     .clkr = {
0917         .enable_reg = 0x501c,
0918         .enable_mask = BIT(0),
0919         .hw.init = &(struct clk_init_data){
0920             .name = "gcc_blsp1_qup4_spi_apps_clk",
0921             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup4_spi_apps_clk_src.clkr.hw },
0922             .num_parents = 1,
0923             .flags = CLK_SET_RATE_PARENT,
0924             .ops = &clk_branch2_ops,
0925         },
0926     },
0927 };
0928 
0929 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = {
0930     .halt_reg = 0x6020,
0931     .clkr = {
0932         .enable_reg = 0x6020,
0933         .enable_mask = BIT(0),
0934         .hw.init = &(struct clk_init_data){
0935             .name = "gcc_blsp1_qup5_i2c_apps_clk",
0936             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup5_i2c_apps_clk_src.clkr.hw },
0937             .num_parents = 1,
0938             .flags = CLK_SET_RATE_PARENT,
0939             .ops = &clk_branch2_ops,
0940         },
0941     },
0942 };
0943 
0944 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
0945     .halt_reg = 0x601c,
0946     .clkr = {
0947         .enable_reg = 0x601c,
0948         .enable_mask = BIT(0),
0949         .hw.init = &(struct clk_init_data){
0950             .name = "gcc_blsp1_qup5_spi_apps_clk",
0951             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup5_spi_apps_clk_src.clkr.hw },
0952             .num_parents = 1,
0953             .flags = CLK_SET_RATE_PARENT,
0954             .ops = &clk_branch2_ops,
0955         },
0956     },
0957 };
0958 
0959 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = {
0960     .halt_reg = 0x7020,
0961     .clkr = {
0962         .enable_reg = 0x7020,
0963         .enable_mask = BIT(0),
0964         .hw.init = &(struct clk_init_data){
0965             .name = "gcc_blsp1_qup6_i2c_apps_clk",
0966             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup6_i2c_apps_clk_src.clkr.hw },
0967             .num_parents = 1,
0968             .flags = CLK_SET_RATE_PARENT,
0969             .ops = &clk_branch2_ops,
0970         },
0971     },
0972 };
0973 
0974 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
0975     .halt_reg = 0x701c,
0976     .clkr = {
0977         .enable_reg = 0x701c,
0978         .enable_mask = BIT(0),
0979         .hw.init = &(struct clk_init_data){
0980             .name = "gcc_blsp1_qup6_spi_apps_clk",
0981             .parent_hws = (const struct clk_hw *[]){ &blsp1_qup6_spi_apps_clk_src.clkr.hw },
0982             .num_parents = 1,
0983             .flags = CLK_SET_RATE_PARENT,
0984             .ops = &clk_branch2_ops,
0985         },
0986     },
0987 };
0988 
0989 static struct clk_branch gcc_blsp1_uart1_apps_clk = {
0990     .halt_reg = 0x203c,
0991     .clkr = {
0992         .enable_reg = 0x203c,
0993         .enable_mask = BIT(0),
0994         .hw.init = &(struct clk_init_data){
0995             .name = "gcc_blsp1_uart1_apps_clk",
0996             .parent_hws = (const struct clk_hw *[]){ &blsp1_uart1_apps_clk_src.clkr.hw },
0997             .num_parents = 1,
0998             .flags = CLK_SET_RATE_PARENT,
0999             .ops = &clk_branch2_ops,
1000         },
1001     },
1002 };
1003 
1004 static struct clk_branch gcc_blsp1_uart2_apps_clk = {
1005     .halt_reg = 0x302c,
1006     .clkr = {
1007         .enable_reg = 0x302c,
1008         .enable_mask = BIT(0),
1009         .hw.init = &(struct clk_init_data){
1010             .name = "gcc_blsp1_uart2_apps_clk",
1011             .parent_hws = (const struct clk_hw *[]){ &blsp1_uart2_apps_clk_src.clkr.hw },
1012             .num_parents = 1,
1013             .flags = CLK_SET_RATE_PARENT,
1014             .ops = &clk_branch2_ops,
1015         },
1016     },
1017 };
1018 
1019 static struct clk_branch gcc_blsp1_uart3_apps_clk = {
1020     .halt_reg = 0x403c,
1021     .clkr = {
1022         .enable_reg = 0x403c,
1023         .enable_mask = BIT(0),
1024         .hw.init = &(struct clk_init_data){
1025             .name = "gcc_blsp1_uart3_apps_clk",
1026             .parent_hws = (const struct clk_hw *[]){ &blsp1_uart3_apps_clk_src.clkr.hw },
1027             .num_parents = 1,
1028             .flags = CLK_SET_RATE_PARENT,
1029             .ops = &clk_branch2_ops,
1030         },
1031     },
1032 };
1033 
1034 static struct clk_branch gcc_blsp1_uart4_apps_clk = {
1035     .halt_reg = 0x503c,
1036     .clkr = {
1037         .enable_reg = 0x503c,
1038         .enable_mask = BIT(0),
1039         .hw.init = &(struct clk_init_data){
1040             .name = "gcc_blsp1_uart4_apps_clk",
1041             .parent_hws = (const struct clk_hw *[]){ &blsp1_uart4_apps_clk_src.clkr.hw },
1042             .num_parents = 1,
1043             .flags = CLK_SET_RATE_PARENT,
1044             .ops = &clk_branch2_ops,
1045         },
1046     },
1047 };
1048 
1049 static struct clk_branch gcc_blsp1_uart5_apps_clk = {
1050     .halt_reg = 0x603c,
1051     .clkr = {
1052         .enable_reg = 0x603c,
1053         .enable_mask = BIT(0),
1054         .hw.init = &(struct clk_init_data){
1055             .name = "gcc_blsp1_uart5_apps_clk",
1056             .parent_hws = (const struct clk_hw *[]){ &blsp1_uart5_apps_clk_src.clkr.hw },
1057             .num_parents = 1,
1058             .flags = CLK_SET_RATE_PARENT,
1059             .ops = &clk_branch2_ops,
1060         },
1061     },
1062 };
1063 
1064 static struct clk_branch gcc_blsp1_uart6_apps_clk = {
1065     .halt_reg = 0x703c,
1066     .clkr = {
1067         .enable_reg = 0x703c,
1068         .enable_mask = BIT(0),
1069         .hw.init = &(struct clk_init_data){
1070             .name = "gcc_blsp1_uart6_apps_clk",
1071             .parent_hws = (const struct clk_hw *[]){ &blsp1_uart6_apps_clk_src.clkr.hw },
1072             .num_parents = 1,
1073             .flags = CLK_SET_RATE_PARENT,
1074             .ops = &clk_branch2_ops,
1075         },
1076     },
1077 };
1078 
1079 static struct clk_branch gcc_boot_rom_ahb_clk = {
1080     .halt_reg = 0x1300c,
1081     .halt_check = BRANCH_HALT_VOTED,
1082     .clkr = {
1083         .enable_reg = 0x45004,
1084         .enable_mask = BIT(7),
1085         .hw.init = &(struct clk_init_data){
1086             .name = "gcc_boot_rom_ahb_clk",
1087             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1088             .num_parents = 1,
1089             .ops = &clk_branch2_ops,
1090         },
1091     },
1092 };
1093 
1094 static struct clk_branch gcc_crypto_ahb_clk = {
1095     .halt_reg = 0x16024,
1096     .halt_check = BRANCH_HALT_VOTED,
1097     .clkr = {
1098         .enable_reg = 0x45004,
1099         .enable_mask = BIT(0),
1100         .hw.init = &(struct clk_init_data){
1101             .name = "gcc_crypto_ahb_clk",
1102             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1103             .num_parents = 1,
1104             .flags = CLK_SET_RATE_PARENT,
1105             .ops = &clk_branch2_ops,
1106         },
1107     },
1108 };
1109 
1110 static struct clk_branch gcc_crypto_axi_clk = {
1111     .halt_reg = 0x16020,
1112     .halt_check = BRANCH_HALT_VOTED,
1113     .clkr = {
1114         .enable_reg = 0x45004,
1115         .enable_mask = BIT(1),
1116         .hw.init = &(struct clk_init_data){
1117             .name = "gcc_crypto_axi_clk",
1118             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1119             .num_parents = 1,
1120             .flags = CLK_SET_RATE_PARENT,
1121             .ops = &clk_branch2_ops,
1122         },
1123     },
1124 };
1125 
1126 static struct clk_branch gcc_crypto_clk = {
1127     .halt_reg = 0x1601c,
1128     .halt_check = BRANCH_HALT_VOTED,
1129     .clkr = {
1130         .enable_reg = 0x45004,
1131         .enable_mask = BIT(2),
1132         .hw.init = &(struct clk_init_data){
1133             .name = "gcc_crypto_clk",
1134             .parent_hws = (const struct clk_hw *[]){ &crypto_clk_src.clkr.hw },
1135             .num_parents = 1,
1136             .flags = CLK_SET_RATE_PARENT,
1137             .ops = &clk_branch2_ops,
1138         },
1139     },
1140 };
1141 
1142 static struct clk_branch gcc_gp1_clk = {
1143     .halt_reg = 0x08000,
1144     .clkr = {
1145         .enable_reg = 0x08000,
1146         .enable_mask = BIT(0),
1147         .hw.init = &(struct clk_init_data){
1148             .name = "gcc_gp1_clk",
1149             .parent_hws = (const struct clk_hw *[]){ &gp1_clk_src.clkr.hw },
1150             .num_parents = 1,
1151             .flags = CLK_SET_RATE_PARENT,
1152             .ops = &clk_branch2_ops,
1153         },
1154     },
1155 };
1156 
1157 static struct clk_branch gcc_gp2_clk = {
1158     .halt_reg = 0x09000,
1159     .clkr = {
1160         .enable_reg = 0x09000,
1161         .enable_mask = BIT(0),
1162         .hw.init = &(struct clk_init_data){
1163             .name = "gcc_gp2_clk",
1164             .parent_hws = (const struct clk_hw *[]){ &gp2_clk_src.clkr.hw },
1165             .num_parents = 1,
1166             .flags = CLK_SET_RATE_PARENT,
1167             .ops = &clk_branch2_ops,
1168         },
1169     },
1170 };
1171 
1172 static struct clk_branch gcc_gp3_clk = {
1173     .halt_reg = 0x0a000,
1174     .clkr = {
1175         .enable_reg = 0x0a000,
1176         .enable_mask = BIT(0),
1177         .hw.init = &(struct clk_init_data){
1178             .name = "gcc_gp3_clk",
1179             .parent_hws = (const struct clk_hw *[]){ &gp3_clk_src.clkr.hw },
1180             .num_parents = 1,
1181             .flags = CLK_SET_RATE_PARENT,
1182             .ops = &clk_branch2_ops,
1183         },
1184     },
1185 };
1186 
1187 static struct clk_branch gcc_mss_cfg_ahb_clk = {
1188     .halt_reg = 0x49000,
1189     .clkr = {
1190         .enable_reg = 0x49000,
1191         .enable_mask = BIT(0),
1192         .hw.init = &(struct clk_init_data){
1193             .name = "gcc_mss_cfg_ahb_clk",
1194             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1195             .num_parents = 1,
1196             .flags = CLK_SET_RATE_PARENT,
1197             .ops = &clk_branch2_ops,
1198         },
1199     },
1200 };
1201 
1202 static struct clk_branch gcc_pdm2_clk = {
1203     .halt_reg = 0x4400c,
1204     .clkr = {
1205         .enable_reg = 0x4400c,
1206         .enable_mask = BIT(0),
1207         .hw.init = &(struct clk_init_data){
1208             .name = "gcc_pdm2_clk",
1209             .parent_hws = (const struct clk_hw *[]){ &pdm2_clk_src.clkr.hw },
1210             .num_parents = 1,
1211             .flags = CLK_SET_RATE_PARENT,
1212             .ops = &clk_branch2_ops,
1213         },
1214     },
1215 };
1216 
1217 static struct clk_branch gcc_pdm_ahb_clk = {
1218     .halt_reg = 0x44004,
1219     .clkr = {
1220         .enable_reg = 0x44004,
1221         .enable_mask = BIT(0),
1222         .hw.init = &(struct clk_init_data){
1223             .name = "gcc_pdm_ahb_clk",
1224             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1225             .num_parents = 1,
1226             .flags = CLK_SET_RATE_PARENT,
1227             .ops = &clk_branch2_ops,
1228         },
1229     },
1230 };
1231 
1232 static struct clk_branch gcc_prng_ahb_clk = {
1233     .halt_reg = 0x13004,
1234     .halt_check = BRANCH_HALT_VOTED,
1235     .clkr = {
1236         .enable_reg = 0x45004,
1237         .enable_mask = BIT(8),
1238         .hw.init = &(struct clk_init_data){
1239             .name = "gcc_prng_ahb_clk",
1240             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1241             .num_parents = 1,
1242             .flags = CLK_SET_RATE_PARENT,
1243             .ops = &clk_branch2_ops,
1244         },
1245     },
1246 };
1247 
1248 static struct clk_branch gcc_sdcc1_ahb_clk = {
1249     .halt_reg = 0x4201c,
1250     .clkr = {
1251         .enable_reg = 0x4201c,
1252         .enable_mask = BIT(0),
1253         .hw.init = &(struct clk_init_data){
1254             .name = "gcc_sdcc1_ahb_clk",
1255             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1256             .num_parents = 1,
1257             .flags = CLK_SET_RATE_PARENT,
1258             .ops = &clk_branch2_ops,
1259         },
1260     },
1261 };
1262 
1263 static struct clk_branch gcc_sdcc1_apps_clk = {
1264     .halt_reg = 0x42018,
1265     .clkr = {
1266         .enable_reg = 0x42018,
1267         .enable_mask = BIT(0),
1268         .hw.init = &(struct clk_init_data){
1269             .name = "gcc_sdcc1_apps_clk",
1270             .parent_hws = (const struct clk_hw *[]){ &sdcc1_apps_clk_src.clkr.hw },
1271             .num_parents = 1,
1272             .flags = CLK_SET_RATE_PARENT,
1273             .ops = &clk_branch2_ops,
1274         },
1275     },
1276 };
1277 
1278 static struct clk_branch gcc_sdcc2_ahb_clk = {
1279     .halt_reg = 0x4301c,
1280     .clkr = {
1281         .enable_reg = 0x4301c,
1282         .enable_mask = BIT(0),
1283         .hw.init = &(struct clk_init_data){
1284             .name = "gcc_sdcc2_ahb_clk",
1285             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1286             .num_parents = 1,
1287             .flags = CLK_SET_RATE_PARENT,
1288             .ops = &clk_branch2_ops,
1289         },
1290     },
1291 };
1292 
1293 static struct clk_branch gcc_sdcc2_apps_clk = {
1294     .halt_reg = 0x43018,
1295     .clkr = {
1296         .enable_reg = 0x43018,
1297         .enable_mask = BIT(0),
1298         .hw.init = &(struct clk_init_data){
1299             .name = "gcc_sdcc2_apps_clk",
1300             .parent_hws = (const struct clk_hw *[]){ &sdcc2_apps_clk_src.clkr.hw },
1301             .num_parents = 1,
1302             .flags = CLK_SET_RATE_PARENT,
1303             .ops = &clk_branch2_ops,
1304         },
1305     },
1306 };
1307 
1308 static struct clk_rcg2 bimc_ddr_clk_src = {
1309     .cmd_rcgr = 0x32004,
1310     .hid_width = 5,
1311     .parent_map = gcc_xo_gpll0_bimc_map,
1312     .clkr.hw.init = &(struct clk_init_data){
1313         .name = "bimc_ddr_clk_src",
1314         .parent_data = gcc_xo_gpll0_bimc,
1315         .num_parents = 3,
1316         .ops = &clk_rcg2_ops,
1317         .flags = CLK_GET_RATE_NOCACHE,
1318     },
1319 };
1320 
1321 static struct clk_branch gcc_mss_q6_bimc_axi_clk = {
1322     .halt_reg = 0x49004,
1323     .clkr = {
1324         .enable_reg = 0x49004,
1325         .enable_mask = BIT(0),
1326         .hw.init = &(struct clk_init_data){
1327             .name = "gcc_mss_q6_bimc_axi_clk",
1328             .parent_hws = (const struct clk_hw *[]){ &bimc_ddr_clk_src.clkr.hw },
1329             .num_parents = 1,
1330             .flags = CLK_SET_RATE_PARENT,
1331             .ops = &clk_branch2_ops,
1332         },
1333     },
1334 };
1335 
1336 static struct clk_branch gcc_apss_tcu_clk = {
1337     .halt_reg = 0x12018,
1338     .halt_check = BRANCH_HALT_VOTED,
1339     .clkr = {
1340         .enable_reg = 0x4500c,
1341         .enable_mask = BIT(1),
1342         .hw.init = &(struct clk_init_data){
1343             .name = "gcc_apss_tcu_clk",
1344             .parent_hws = (const struct clk_hw *[]){ &bimc_ddr_clk_src.clkr.hw },
1345             .num_parents = 1,
1346             .ops = &clk_branch2_ops,
1347         },
1348     },
1349 };
1350 
1351 static struct clk_branch gcc_smmu_cfg_clk = {
1352     .halt_reg = 0x12038,
1353     .halt_check = BRANCH_HALT_VOTED,
1354     .clkr = {
1355         .enable_reg = 0x4500c,
1356         .enable_mask = BIT(12),
1357         .hw.init = &(struct clk_init_data){
1358             .name = "gcc_smmu_cfg_clk",
1359             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1360             .num_parents = 1,
1361             .flags = CLK_SET_RATE_PARENT,
1362             .ops = &clk_branch2_ops,
1363         },
1364     },
1365 };
1366 
1367 static struct clk_branch gcc_qdss_dap_clk = {
1368     .halt_reg = 0x29084,
1369     .halt_check = BRANCH_HALT_VOTED,
1370     .clkr = {
1371         .enable_reg = 0x45004,
1372         .enable_mask = BIT(19),
1373         .hw.init = &(struct clk_init_data){
1374             .name = "gcc_qdss_dap_clk",
1375             .parent_data = &(const struct clk_parent_data){
1376                 .fw_name = "xo",
1377             },
1378             .num_parents = 1,
1379             .ops = &clk_branch2_ops,
1380         },
1381     },
1382 };
1383 
1384 static struct clk_branch gcc_usb2a_phy_sleep_clk = {
1385     .halt_reg = 0x4102c,
1386     .clkr = {
1387         .enable_reg = 0x4102c,
1388         .enable_mask = BIT(0),
1389         .hw.init = &(struct clk_init_data){
1390             .name = "gcc_usb2a_phy_sleep_clk",
1391             .parent_data = &(const struct clk_parent_data){
1392                 .fw_name = "sleep_clk",
1393             },
1394             .num_parents = 1,
1395             .flags = CLK_SET_RATE_PARENT,
1396             .ops = &clk_branch2_ops,
1397         },
1398     },
1399 };
1400 
1401 static struct clk_branch gcc_usb_hs_phy_cfg_ahb_clk = {
1402     .halt_reg = 0x41030,
1403     .halt_check = BRANCH_HALT,
1404     .clkr = {
1405         .enable_reg = 0x41030,
1406         .enable_mask = BIT(0),
1407         .hw.init = &(struct clk_init_data){
1408             .name = "gcc_usb_hs_phy_cfg_ahb_clk",
1409             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1410             .num_parents = 1,
1411             .flags = CLK_SET_RATE_PARENT,
1412             .ops = &clk_branch2_ops,
1413         },
1414     },
1415 };
1416 
1417 static struct clk_branch gcc_usb_hs_ahb_clk = {
1418     .halt_reg = 0x41008,
1419     .clkr = {
1420         .enable_reg = 0x41008,
1421         .enable_mask = BIT(0),
1422         .hw.init = &(struct clk_init_data){
1423             .name = "gcc_usb_hs_ahb_clk",
1424             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1425             .num_parents = 1,
1426             .flags = CLK_SET_RATE_PARENT,
1427             .ops = &clk_branch2_ops,
1428         },
1429     },
1430 };
1431 
1432 static struct clk_branch gcc_usb_hs_system_clk = {
1433     .halt_reg = 0x41004,
1434     .clkr = {
1435         .enable_reg = 0x41004,
1436         .enable_mask = BIT(0),
1437         .hw.init = &(struct clk_init_data){
1438             .name = "gcc_usb_hs_system_clk",
1439             .parent_hws = (const struct clk_hw *[]){ &usb_hs_system_clk_src.clkr.hw },
1440             .num_parents = 1,
1441             .flags = CLK_SET_RATE_PARENT,
1442             .ops = &clk_branch2_ops,
1443         },
1444     },
1445 };
1446 
1447 static struct clk_branch gcc_apss_ahb_clk = {
1448     .halt_reg = 0x4601c,
1449     .halt_check = BRANCH_HALT_VOTED,
1450     .clkr = {
1451         .enable_reg = 0x45004,
1452         .enable_mask = BIT(14),
1453         .hw.init = &(struct clk_init_data){
1454             .name = "gcc_apss_ahb_clk",
1455             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1456             .num_parents = 1,
1457             .ops = &clk_branch2_ops,
1458         },
1459     },
1460 };
1461 
1462 static struct clk_branch gcc_apss_axi_clk = {
1463     .halt_reg = 0x4601c,
1464     .halt_check = BRANCH_HALT_VOTED,
1465     .clkr = {
1466         .enable_reg = 0x45004,
1467         .enable_mask = BIT(13),
1468         .hw.init = &(struct clk_init_data){
1469             .name = "gcc_apss_axi_clk",
1470             .parent_hws = (const struct clk_hw *[]){ &pcnoc_bfdcd_clk_src.clkr.hw },
1471             .num_parents = 1,
1472             .ops = &clk_branch2_ops,
1473         },
1474     },
1475 };
1476 
1477 static struct clk_regmap *gcc_mdm9607_clocks[] = {
1478     [GPLL0] = &gpll0.clkr,
1479     [GPLL0_EARLY] = &gpll0_early.clkr,
1480     [GPLL1] = &gpll1.clkr,
1481     [GPLL1_VOTE] = &gpll1_vote,
1482     [GPLL2] = &gpll2.clkr,
1483     [GPLL2_EARLY] = &gpll2_early.clkr,
1484     [BIMC_PLL] = &bimc_pll.clkr,
1485     [BIMC_PLL_VOTE] = &bimc_pll_vote,
1486     [BIMC_DDR_CLK_SRC] = &bimc_ddr_clk_src.clkr,
1487     [PCNOC_BFDCD_CLK_SRC] = &pcnoc_bfdcd_clk_src.clkr,
1488     [SYSTEM_NOC_BFDCD_CLK_SRC] = &system_noc_bfdcd_clk_src.clkr,
1489     [APSS_AHB_CLK_SRC] = &apss_ahb_clk_src.clkr,
1490     [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
1491     [BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
1492     [BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr,
1493     [BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr,
1494     [BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr,
1495     [BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr,
1496     [BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr,
1497     [BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr,
1498     [BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr,
1499     [BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr,
1500     [BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr,
1501     [BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr,
1502     [BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr,
1503     [BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr,
1504     [BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr,
1505     [BLSP1_UART4_APPS_CLK_SRC] = &blsp1_uart4_apps_clk_src.clkr,
1506     [BLSP1_UART5_APPS_CLK_SRC] = &blsp1_uart5_apps_clk_src.clkr,
1507     [BLSP1_UART6_APPS_CLK_SRC] = &blsp1_uart6_apps_clk_src.clkr,
1508     [CRYPTO_CLK_SRC] = &crypto_clk_src.clkr,
1509     [GP1_CLK_SRC] = &gp1_clk_src.clkr,
1510     [GP2_CLK_SRC] = &gp2_clk_src.clkr,
1511     [GP3_CLK_SRC] = &gp3_clk_src.clkr,
1512     [PDM2_CLK_SRC] = &pdm2_clk_src.clkr,
1513     [SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr,
1514     [SDCC2_APPS_CLK_SRC] = &sdcc2_apps_clk_src.clkr,
1515     [APSS_TCU_CLK_SRC] = &apss_tcu_clk_src.clkr,
1516     [USB_HS_SYSTEM_CLK_SRC] = &usb_hs_system_clk_src.clkr,
1517     [GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
1518     [GCC_BLSP1_SLEEP_CLK] = &gcc_blsp1_sleep_clk.clkr,
1519     [GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
1520     [GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
1521     [GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr,
1522     [GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr,
1523     [GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr,
1524     [GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr,
1525     [GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr,
1526     [GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
1527     [GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
1528     [GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
1529     [GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr,
1530     [GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
1531     [GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
1532     [GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
1533     [GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr,
1534     [GCC_BLSP1_UART4_APPS_CLK] = &gcc_blsp1_uart4_apps_clk.clkr,
1535     [GCC_BLSP1_UART5_APPS_CLK] = &gcc_blsp1_uart5_apps_clk.clkr,
1536     [GCC_BLSP1_UART6_APPS_CLK] = &gcc_blsp1_uart6_apps_clk.clkr,
1537     [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr,
1538     [GCC_CRYPTO_AHB_CLK] = &gcc_crypto_ahb_clk.clkr,
1539     [GCC_CRYPTO_AXI_CLK] = &gcc_crypto_axi_clk.clkr,
1540     [GCC_CRYPTO_CLK] = &gcc_crypto_clk.clkr,
1541     [GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
1542     [GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
1543     [GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
1544     [GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr,
1545     [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr,
1546     [GCC_PDM_AHB_CLK] = &gcc_pdm_ahb_clk.clkr,
1547     [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
1548     [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
1549     [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
1550     [GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr,
1551     [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr,
1552     [GCC_SMMU_CFG_CLK] = &gcc_smmu_cfg_clk.clkr,
1553     [GCC_USB2A_PHY_SLEEP_CLK] = &gcc_usb2a_phy_sleep_clk.clkr,
1554     [GCC_USB_HS_PHY_CFG_AHB_CLK] = &gcc_usb_hs_phy_cfg_ahb_clk.clkr,
1555     [GCC_USB_HS_AHB_CLK] = &gcc_usb_hs_ahb_clk.clkr,
1556     [GCC_USB_HS_SYSTEM_CLK] = &gcc_usb_hs_system_clk.clkr,
1557     [GCC_APSS_TCU_CLK] = &gcc_apss_tcu_clk.clkr,
1558     [GCC_MSS_Q6_BIMC_AXI_CLK] = &gcc_mss_q6_bimc_axi_clk.clkr,
1559     [GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
1560     [GCC_APSS_AHB_CLK] = &gcc_apss_ahb_clk.clkr,
1561     [GCC_APSS_AXI_CLK] = &gcc_apss_axi_clk.clkr,
1562     [GCC_USB_HSIC_CLK_SRC] = &usb_hsic_clk_src.clkr,
1563     [GCC_USB_HSIC_IO_CAL_CLK_SRC] = &usb_hsic_io_cal_clk_src.clkr,
1564     [GCC_USB_HSIC_SYSTEM_CLK_SRC] = &usb_hsic_system_clk_src.clkr,
1565 };
1566 
1567 static const struct qcom_reset_map gcc_mdm9607_resets[] = {
1568     [USB_HS_HSIC_BCR] = { 0x3d05c },
1569     [GCC_MSS_RESTART] = { 0x3e000 },
1570     [USB_HS_BCR] = { 0x41000 },
1571     [USB2_HS_PHY_ONLY_BCR] = { 0x41034 },
1572     [QUSB2_PHY_BCR] = { 0x4103c },
1573 };
1574 
1575 static const struct regmap_config gcc_mdm9607_regmap_config = {
1576     .reg_bits   = 32,
1577     .reg_stride = 4,
1578     .val_bits   = 32,
1579     .max_register   = 0x80000,
1580     .fast_io    = true,
1581 };
1582 
1583 static const struct qcom_cc_desc gcc_mdm9607_desc = {
1584     .config = &gcc_mdm9607_regmap_config,
1585     .clks = gcc_mdm9607_clocks,
1586     .num_clks = ARRAY_SIZE(gcc_mdm9607_clocks),
1587     .resets = gcc_mdm9607_resets,
1588     .num_resets = ARRAY_SIZE(gcc_mdm9607_resets),
1589 };
1590 
1591 static const struct of_device_id gcc_mdm9607_match_table[] = {
1592     { .compatible = "qcom,gcc-mdm9607" },
1593     { }
1594 };
1595 MODULE_DEVICE_TABLE(of, gcc_mdm9607_match_table);
1596 
1597 static int gcc_mdm9607_probe(struct platform_device *pdev)
1598 {
1599     struct regmap *regmap;
1600 
1601     regmap = qcom_cc_map(pdev, &gcc_mdm9607_desc);
1602     if (IS_ERR(regmap))
1603         return PTR_ERR(regmap);
1604 
1605     /* Vote for GPLL0 to turn on. Needed by acpuclock. */
1606     regmap_update_bits(regmap, 0x45000, BIT(0), BIT(0));
1607 
1608     return qcom_cc_really_probe(pdev, &gcc_mdm9607_desc, regmap);
1609 }
1610 
1611 static struct platform_driver gcc_mdm9607_driver = {
1612     .probe      = gcc_mdm9607_probe,
1613     .driver     = {
1614         .name   = "gcc-mdm9607",
1615         .of_match_table = gcc_mdm9607_match_table,
1616     },
1617 };
1618 
1619 static int __init gcc_mdm9607_init(void)
1620 {
1621     return platform_driver_register(&gcc_mdm9607_driver);
1622 }
1623 core_initcall(gcc_mdm9607_init);
1624 
1625 static void __exit gcc_mdm9607_exit(void)
1626 {
1627     platform_driver_unregister(&gcc_mdm9607_driver);
1628 }
1629 module_exit(gcc_mdm9607_exit);
1630 
1631 MODULE_DESCRIPTION("Qualcomm GCC mdm9607 Driver");
1632 MODULE_LICENSE("GPL v2");