Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This software is licensed under the terms of the GNU General Public |
| 5 | * License version 2, as published by the Free Software Foundation, and |
| 6 | * may be copied, distributed, and modified under those terms. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/kernel.h> |
| 15 | #include <linux/bitops.h> |
| 16 | #include <linux/err.h> |
| 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/module.h> |
| 19 | #include <linux/of.h> |
| 20 | #include <linux/of_device.h> |
| 21 | #include <linux/clk-provider.h> |
| 22 | #include <linux/regmap.h> |
| 23 | #include <linux/reset-controller.h> |
| 24 | |
| 25 | #include <dt-bindings/clock/qcom,gcc-msm8974.h> |
| 26 | #include <dt-bindings/reset/qcom,gcc-msm8974.h> |
| 27 | |
Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 28 | #include "common.h" |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 29 | #include "clk-regmap.h" |
| 30 | #include "clk-pll.h" |
| 31 | #include "clk-rcg.h" |
| 32 | #include "clk-branch.h" |
| 33 | #include "reset.h" |
| 34 | |
| 35 | #define P_XO 0 |
| 36 | #define P_GPLL0 1 |
| 37 | #define P_GPLL1 1 |
| 38 | |
| 39 | static const u8 gcc_xo_gpll0_map[] = { |
| 40 | [P_XO] = 0, |
| 41 | [P_GPLL0] = 1, |
| 42 | }; |
| 43 | |
| 44 | static const char *gcc_xo_gpll0[] = { |
| 45 | "xo", |
| 46 | "gpll0_vote", |
| 47 | }; |
| 48 | |
| 49 | #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) } |
| 50 | |
| 51 | static struct clk_pll gpll0 = { |
| 52 | .l_reg = 0x0004, |
| 53 | .m_reg = 0x0008, |
| 54 | .n_reg = 0x000c, |
| 55 | .config_reg = 0x0014, |
| 56 | .mode_reg = 0x0000, |
| 57 | .status_reg = 0x001c, |
| 58 | .status_bit = 17, |
| 59 | .clkr.hw.init = &(struct clk_init_data){ |
| 60 | .name = "gpll0", |
| 61 | .parent_names = (const char *[]){ "xo" }, |
| 62 | .num_parents = 1, |
| 63 | .ops = &clk_pll_ops, |
| 64 | }, |
| 65 | }; |
| 66 | |
| 67 | static struct clk_regmap gpll0_vote = { |
| 68 | .enable_reg = 0x1480, |
| 69 | .enable_mask = BIT(0), |
| 70 | .hw.init = &(struct clk_init_data){ |
| 71 | .name = "gpll0_vote", |
| 72 | .parent_names = (const char *[]){ "gpll0" }, |
| 73 | .num_parents = 1, |
| 74 | .ops = &clk_pll_vote_ops, |
| 75 | }, |
| 76 | }; |
| 77 | |
| 78 | static struct clk_rcg2 config_noc_clk_src = { |
| 79 | .cmd_rcgr = 0x0150, |
| 80 | .hid_width = 5, |
| 81 | .parent_map = gcc_xo_gpll0_map, |
| 82 | .clkr.hw.init = &(struct clk_init_data){ |
| 83 | .name = "config_noc_clk_src", |
| 84 | .parent_names = gcc_xo_gpll0, |
| 85 | .num_parents = 2, |
| 86 | .ops = &clk_rcg2_ops, |
| 87 | }, |
| 88 | }; |
| 89 | |
| 90 | static struct clk_rcg2 periph_noc_clk_src = { |
| 91 | .cmd_rcgr = 0x0190, |
| 92 | .hid_width = 5, |
| 93 | .parent_map = gcc_xo_gpll0_map, |
| 94 | .clkr.hw.init = &(struct clk_init_data){ |
| 95 | .name = "periph_noc_clk_src", |
| 96 | .parent_names = gcc_xo_gpll0, |
| 97 | .num_parents = 2, |
| 98 | .ops = &clk_rcg2_ops, |
| 99 | }, |
| 100 | }; |
| 101 | |
| 102 | static struct clk_rcg2 system_noc_clk_src = { |
| 103 | .cmd_rcgr = 0x0120, |
| 104 | .hid_width = 5, |
| 105 | .parent_map = gcc_xo_gpll0_map, |
| 106 | .clkr.hw.init = &(struct clk_init_data){ |
| 107 | .name = "system_noc_clk_src", |
| 108 | .parent_names = gcc_xo_gpll0, |
| 109 | .num_parents = 2, |
| 110 | .ops = &clk_rcg2_ops, |
| 111 | }, |
| 112 | }; |
| 113 | |
| 114 | static struct clk_pll gpll1 = { |
| 115 | .l_reg = 0x0044, |
| 116 | .m_reg = 0x0048, |
| 117 | .n_reg = 0x004c, |
| 118 | .config_reg = 0x0054, |
| 119 | .mode_reg = 0x0040, |
| 120 | .status_reg = 0x005c, |
| 121 | .status_bit = 17, |
| 122 | .clkr.hw.init = &(struct clk_init_data){ |
| 123 | .name = "gpll1", |
| 124 | .parent_names = (const char *[]){ "xo" }, |
| 125 | .num_parents = 1, |
| 126 | .ops = &clk_pll_ops, |
| 127 | }, |
| 128 | }; |
| 129 | |
| 130 | static struct clk_regmap gpll1_vote = { |
| 131 | .enable_reg = 0x1480, |
| 132 | .enable_mask = BIT(1), |
| 133 | .hw.init = &(struct clk_init_data){ |
| 134 | .name = "gpll1_vote", |
| 135 | .parent_names = (const char *[]){ "gpll1" }, |
| 136 | .num_parents = 1, |
| 137 | .ops = &clk_pll_vote_ops, |
| 138 | }, |
| 139 | }; |
| 140 | |
| 141 | static const struct freq_tbl ftbl_gcc_usb30_master_clk[] = { |
| 142 | F(125000000, P_GPLL0, 1, 5, 24), |
| 143 | { } |
| 144 | }; |
| 145 | |
| 146 | static struct clk_rcg2 usb30_master_clk_src = { |
| 147 | .cmd_rcgr = 0x03d4, |
| 148 | .mnd_width = 8, |
| 149 | .hid_width = 5, |
| 150 | .parent_map = gcc_xo_gpll0_map, |
| 151 | .freq_tbl = ftbl_gcc_usb30_master_clk, |
| 152 | .clkr.hw.init = &(struct clk_init_data){ |
| 153 | .name = "usb30_master_clk_src", |
| 154 | .parent_names = gcc_xo_gpll0, |
| 155 | .num_parents = 2, |
| 156 | .ops = &clk_rcg2_ops, |
| 157 | }, |
| 158 | }; |
| 159 | |
| 160 | static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk[] = { |
| 161 | F(19200000, P_XO, 1, 0, 0), |
| 162 | F(37500000, P_GPLL0, 16, 0, 0), |
| 163 | F(50000000, P_GPLL0, 12, 0, 0), |
| 164 | { } |
| 165 | }; |
| 166 | |
| 167 | static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = { |
| 168 | .cmd_rcgr = 0x0660, |
| 169 | .hid_width = 5, |
| 170 | .parent_map = gcc_xo_gpll0_map, |
| 171 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 172 | .clkr.hw.init = &(struct clk_init_data){ |
| 173 | .name = "blsp1_qup1_i2c_apps_clk_src", |
| 174 | .parent_names = gcc_xo_gpll0, |
| 175 | .num_parents = 2, |
| 176 | .ops = &clk_rcg2_ops, |
| 177 | }, |
| 178 | }; |
| 179 | |
| 180 | static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk[] = { |
| 181 | F(960000, P_XO, 10, 1, 2), |
| 182 | F(4800000, P_XO, 4, 0, 0), |
| 183 | F(9600000, P_XO, 2, 0, 0), |
| 184 | F(15000000, P_GPLL0, 10, 1, 4), |
| 185 | F(19200000, P_XO, 1, 0, 0), |
| 186 | F(25000000, P_GPLL0, 12, 1, 2), |
| 187 | F(50000000, P_GPLL0, 12, 0, 0), |
| 188 | { } |
| 189 | }; |
| 190 | |
| 191 | static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = { |
| 192 | .cmd_rcgr = 0x064c, |
| 193 | .mnd_width = 8, |
| 194 | .hid_width = 5, |
| 195 | .parent_map = gcc_xo_gpll0_map, |
| 196 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 197 | .clkr.hw.init = &(struct clk_init_data){ |
| 198 | .name = "blsp1_qup1_spi_apps_clk_src", |
| 199 | .parent_names = gcc_xo_gpll0, |
| 200 | .num_parents = 2, |
| 201 | .ops = &clk_rcg2_ops, |
| 202 | }, |
| 203 | }; |
| 204 | |
| 205 | static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = { |
| 206 | .cmd_rcgr = 0x06e0, |
| 207 | .hid_width = 5, |
| 208 | .parent_map = gcc_xo_gpll0_map, |
| 209 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 210 | .clkr.hw.init = &(struct clk_init_data){ |
| 211 | .name = "blsp1_qup2_i2c_apps_clk_src", |
| 212 | .parent_names = gcc_xo_gpll0, |
| 213 | .num_parents = 2, |
| 214 | .ops = &clk_rcg2_ops, |
| 215 | }, |
| 216 | }; |
| 217 | |
| 218 | static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = { |
| 219 | .cmd_rcgr = 0x06cc, |
| 220 | .mnd_width = 8, |
| 221 | .hid_width = 5, |
| 222 | .parent_map = gcc_xo_gpll0_map, |
| 223 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 224 | .clkr.hw.init = &(struct clk_init_data){ |
| 225 | .name = "blsp1_qup2_spi_apps_clk_src", |
| 226 | .parent_names = gcc_xo_gpll0, |
| 227 | .num_parents = 2, |
| 228 | .ops = &clk_rcg2_ops, |
| 229 | }, |
| 230 | }; |
| 231 | |
| 232 | static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = { |
| 233 | .cmd_rcgr = 0x0760, |
| 234 | .hid_width = 5, |
| 235 | .parent_map = gcc_xo_gpll0_map, |
| 236 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 237 | .clkr.hw.init = &(struct clk_init_data){ |
| 238 | .name = "blsp1_qup3_i2c_apps_clk_src", |
| 239 | .parent_names = gcc_xo_gpll0, |
| 240 | .num_parents = 2, |
| 241 | .ops = &clk_rcg2_ops, |
| 242 | }, |
| 243 | }; |
| 244 | |
| 245 | static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = { |
| 246 | .cmd_rcgr = 0x074c, |
| 247 | .mnd_width = 8, |
| 248 | .hid_width = 5, |
| 249 | .parent_map = gcc_xo_gpll0_map, |
| 250 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 251 | .clkr.hw.init = &(struct clk_init_data){ |
| 252 | .name = "blsp1_qup3_spi_apps_clk_src", |
| 253 | .parent_names = gcc_xo_gpll0, |
| 254 | .num_parents = 2, |
| 255 | .ops = &clk_rcg2_ops, |
| 256 | }, |
| 257 | }; |
| 258 | |
| 259 | static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = { |
| 260 | .cmd_rcgr = 0x07e0, |
| 261 | .hid_width = 5, |
| 262 | .parent_map = gcc_xo_gpll0_map, |
| 263 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 264 | .clkr.hw.init = &(struct clk_init_data){ |
| 265 | .name = "blsp1_qup4_i2c_apps_clk_src", |
| 266 | .parent_names = gcc_xo_gpll0, |
| 267 | .num_parents = 2, |
| 268 | .ops = &clk_rcg2_ops, |
| 269 | }, |
| 270 | }; |
| 271 | |
| 272 | static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = { |
| 273 | .cmd_rcgr = 0x07cc, |
| 274 | .mnd_width = 8, |
| 275 | .hid_width = 5, |
| 276 | .parent_map = gcc_xo_gpll0_map, |
| 277 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 278 | .clkr.hw.init = &(struct clk_init_data){ |
| 279 | .name = "blsp1_qup4_spi_apps_clk_src", |
| 280 | .parent_names = gcc_xo_gpll0, |
| 281 | .num_parents = 2, |
| 282 | .ops = &clk_rcg2_ops, |
| 283 | }, |
| 284 | }; |
| 285 | |
| 286 | static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = { |
| 287 | .cmd_rcgr = 0x0860, |
| 288 | .hid_width = 5, |
| 289 | .parent_map = gcc_xo_gpll0_map, |
| 290 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 291 | .clkr.hw.init = &(struct clk_init_data){ |
| 292 | .name = "blsp1_qup5_i2c_apps_clk_src", |
| 293 | .parent_names = gcc_xo_gpll0, |
| 294 | .num_parents = 2, |
| 295 | .ops = &clk_rcg2_ops, |
| 296 | }, |
| 297 | }; |
| 298 | |
| 299 | static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = { |
| 300 | .cmd_rcgr = 0x084c, |
| 301 | .mnd_width = 8, |
| 302 | .hid_width = 5, |
| 303 | .parent_map = gcc_xo_gpll0_map, |
| 304 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 305 | .clkr.hw.init = &(struct clk_init_data){ |
| 306 | .name = "blsp1_qup5_spi_apps_clk_src", |
| 307 | .parent_names = gcc_xo_gpll0, |
| 308 | .num_parents = 2, |
| 309 | .ops = &clk_rcg2_ops, |
| 310 | }, |
| 311 | }; |
| 312 | |
| 313 | static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = { |
| 314 | .cmd_rcgr = 0x08e0, |
| 315 | .hid_width = 5, |
| 316 | .parent_map = gcc_xo_gpll0_map, |
| 317 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 318 | .clkr.hw.init = &(struct clk_init_data){ |
| 319 | .name = "blsp1_qup6_i2c_apps_clk_src", |
| 320 | .parent_names = gcc_xo_gpll0, |
| 321 | .num_parents = 2, |
| 322 | .ops = &clk_rcg2_ops, |
| 323 | }, |
| 324 | }; |
| 325 | |
| 326 | static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = { |
| 327 | .cmd_rcgr = 0x08cc, |
| 328 | .mnd_width = 8, |
| 329 | .hid_width = 5, |
| 330 | .parent_map = gcc_xo_gpll0_map, |
| 331 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 332 | .clkr.hw.init = &(struct clk_init_data){ |
| 333 | .name = "blsp1_qup6_spi_apps_clk_src", |
| 334 | .parent_names = gcc_xo_gpll0, |
| 335 | .num_parents = 2, |
| 336 | .ops = &clk_rcg2_ops, |
| 337 | }, |
| 338 | }; |
| 339 | |
| 340 | static const struct freq_tbl ftbl_gcc_blsp1_2_uart1_6_apps_clk[] = { |
| 341 | F(3686400, P_GPLL0, 1, 96, 15625), |
| 342 | F(7372800, P_GPLL0, 1, 192, 15625), |
| 343 | F(14745600, P_GPLL0, 1, 384, 15625), |
| 344 | F(16000000, P_GPLL0, 5, 2, 15), |
| 345 | F(19200000, P_XO, 1, 0, 0), |
| 346 | F(24000000, P_GPLL0, 5, 1, 5), |
| 347 | F(32000000, P_GPLL0, 1, 4, 75), |
| 348 | F(40000000, P_GPLL0, 15, 0, 0), |
| 349 | F(46400000, P_GPLL0, 1, 29, 375), |
| 350 | F(48000000, P_GPLL0, 12.5, 0, 0), |
| 351 | F(51200000, P_GPLL0, 1, 32, 375), |
| 352 | F(56000000, P_GPLL0, 1, 7, 75), |
| 353 | F(58982400, P_GPLL0, 1, 1536, 15625), |
| 354 | F(60000000, P_GPLL0, 10, 0, 0), |
| 355 | F(63160000, P_GPLL0, 9.5, 0, 0), |
| 356 | { } |
| 357 | }; |
| 358 | |
| 359 | static struct clk_rcg2 blsp1_uart1_apps_clk_src = { |
| 360 | .cmd_rcgr = 0x068c, |
| 361 | .mnd_width = 16, |
| 362 | .hid_width = 5, |
| 363 | .parent_map = gcc_xo_gpll0_map, |
| 364 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 365 | .clkr.hw.init = &(struct clk_init_data){ |
| 366 | .name = "blsp1_uart1_apps_clk_src", |
| 367 | .parent_names = gcc_xo_gpll0, |
| 368 | .num_parents = 2, |
| 369 | .ops = &clk_rcg2_ops, |
| 370 | }, |
| 371 | }; |
| 372 | |
| 373 | static struct clk_rcg2 blsp1_uart2_apps_clk_src = { |
| 374 | .cmd_rcgr = 0x070c, |
| 375 | .mnd_width = 16, |
| 376 | .hid_width = 5, |
| 377 | .parent_map = gcc_xo_gpll0_map, |
| 378 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 379 | .clkr.hw.init = &(struct clk_init_data){ |
| 380 | .name = "blsp1_uart2_apps_clk_src", |
| 381 | .parent_names = gcc_xo_gpll0, |
| 382 | .num_parents = 2, |
| 383 | .ops = &clk_rcg2_ops, |
| 384 | }, |
| 385 | }; |
| 386 | |
| 387 | static struct clk_rcg2 blsp1_uart3_apps_clk_src = { |
| 388 | .cmd_rcgr = 0x078c, |
| 389 | .mnd_width = 16, |
| 390 | .hid_width = 5, |
| 391 | .parent_map = gcc_xo_gpll0_map, |
| 392 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 393 | .clkr.hw.init = &(struct clk_init_data){ |
| 394 | .name = "blsp1_uart3_apps_clk_src", |
| 395 | .parent_names = gcc_xo_gpll0, |
| 396 | .num_parents = 2, |
| 397 | .ops = &clk_rcg2_ops, |
| 398 | }, |
| 399 | }; |
| 400 | |
| 401 | static struct clk_rcg2 blsp1_uart4_apps_clk_src = { |
| 402 | .cmd_rcgr = 0x080c, |
| 403 | .mnd_width = 16, |
| 404 | .hid_width = 5, |
| 405 | .parent_map = gcc_xo_gpll0_map, |
| 406 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 407 | .clkr.hw.init = &(struct clk_init_data){ |
| 408 | .name = "blsp1_uart4_apps_clk_src", |
| 409 | .parent_names = gcc_xo_gpll0, |
| 410 | .num_parents = 2, |
| 411 | .ops = &clk_rcg2_ops, |
| 412 | }, |
| 413 | }; |
| 414 | |
| 415 | static struct clk_rcg2 blsp1_uart5_apps_clk_src = { |
| 416 | .cmd_rcgr = 0x088c, |
| 417 | .mnd_width = 16, |
| 418 | .hid_width = 5, |
| 419 | .parent_map = gcc_xo_gpll0_map, |
| 420 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 421 | .clkr.hw.init = &(struct clk_init_data){ |
| 422 | .name = "blsp1_uart5_apps_clk_src", |
| 423 | .parent_names = gcc_xo_gpll0, |
| 424 | .num_parents = 2, |
| 425 | .ops = &clk_rcg2_ops, |
| 426 | }, |
| 427 | }; |
| 428 | |
| 429 | static struct clk_rcg2 blsp1_uart6_apps_clk_src = { |
| 430 | .cmd_rcgr = 0x090c, |
| 431 | .mnd_width = 16, |
| 432 | .hid_width = 5, |
| 433 | .parent_map = gcc_xo_gpll0_map, |
| 434 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 435 | .clkr.hw.init = &(struct clk_init_data){ |
| 436 | .name = "blsp1_uart6_apps_clk_src", |
| 437 | .parent_names = gcc_xo_gpll0, |
| 438 | .num_parents = 2, |
| 439 | .ops = &clk_rcg2_ops, |
| 440 | }, |
| 441 | }; |
| 442 | |
| 443 | static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src = { |
| 444 | .cmd_rcgr = 0x09a0, |
| 445 | .hid_width = 5, |
| 446 | .parent_map = gcc_xo_gpll0_map, |
| 447 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 448 | .clkr.hw.init = &(struct clk_init_data){ |
| 449 | .name = "blsp2_qup1_i2c_apps_clk_src", |
| 450 | .parent_names = gcc_xo_gpll0, |
| 451 | .num_parents = 2, |
| 452 | .ops = &clk_rcg2_ops, |
| 453 | }, |
| 454 | }; |
| 455 | |
| 456 | static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src = { |
| 457 | .cmd_rcgr = 0x098c, |
| 458 | .mnd_width = 8, |
| 459 | .hid_width = 5, |
| 460 | .parent_map = gcc_xo_gpll0_map, |
| 461 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 462 | .clkr.hw.init = &(struct clk_init_data){ |
| 463 | .name = "blsp2_qup1_spi_apps_clk_src", |
| 464 | .parent_names = gcc_xo_gpll0, |
| 465 | .num_parents = 2, |
| 466 | .ops = &clk_rcg2_ops, |
| 467 | }, |
| 468 | }; |
| 469 | |
| 470 | static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src = { |
| 471 | .cmd_rcgr = 0x0a20, |
| 472 | .hid_width = 5, |
| 473 | .parent_map = gcc_xo_gpll0_map, |
| 474 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 475 | .clkr.hw.init = &(struct clk_init_data){ |
| 476 | .name = "blsp2_qup2_i2c_apps_clk_src", |
| 477 | .parent_names = gcc_xo_gpll0, |
| 478 | .num_parents = 2, |
| 479 | .ops = &clk_rcg2_ops, |
| 480 | }, |
| 481 | }; |
| 482 | |
| 483 | static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src = { |
| 484 | .cmd_rcgr = 0x0a0c, |
| 485 | .mnd_width = 8, |
| 486 | .hid_width = 5, |
| 487 | .parent_map = gcc_xo_gpll0_map, |
| 488 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 489 | .clkr.hw.init = &(struct clk_init_data){ |
| 490 | .name = "blsp2_qup2_spi_apps_clk_src", |
| 491 | .parent_names = gcc_xo_gpll0, |
| 492 | .num_parents = 2, |
| 493 | .ops = &clk_rcg2_ops, |
| 494 | }, |
| 495 | }; |
| 496 | |
| 497 | static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src = { |
| 498 | .cmd_rcgr = 0x0aa0, |
| 499 | .hid_width = 5, |
| 500 | .parent_map = gcc_xo_gpll0_map, |
| 501 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 502 | .clkr.hw.init = &(struct clk_init_data){ |
| 503 | .name = "blsp2_qup3_i2c_apps_clk_src", |
| 504 | .parent_names = gcc_xo_gpll0, |
| 505 | .num_parents = 2, |
| 506 | .ops = &clk_rcg2_ops, |
| 507 | }, |
| 508 | }; |
| 509 | |
| 510 | static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src = { |
| 511 | .cmd_rcgr = 0x0a8c, |
| 512 | .mnd_width = 8, |
| 513 | .hid_width = 5, |
| 514 | .parent_map = gcc_xo_gpll0_map, |
| 515 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 516 | .clkr.hw.init = &(struct clk_init_data){ |
| 517 | .name = "blsp2_qup3_spi_apps_clk_src", |
| 518 | .parent_names = gcc_xo_gpll0, |
| 519 | .num_parents = 2, |
| 520 | .ops = &clk_rcg2_ops, |
| 521 | }, |
| 522 | }; |
| 523 | |
| 524 | static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src = { |
| 525 | .cmd_rcgr = 0x0b20, |
| 526 | .hid_width = 5, |
| 527 | .parent_map = gcc_xo_gpll0_map, |
| 528 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 529 | .clkr.hw.init = &(struct clk_init_data){ |
| 530 | .name = "blsp2_qup4_i2c_apps_clk_src", |
| 531 | .parent_names = gcc_xo_gpll0, |
| 532 | .num_parents = 2, |
| 533 | .ops = &clk_rcg2_ops, |
| 534 | }, |
| 535 | }; |
| 536 | |
| 537 | static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src = { |
| 538 | .cmd_rcgr = 0x0b0c, |
| 539 | .mnd_width = 8, |
| 540 | .hid_width = 5, |
| 541 | .parent_map = gcc_xo_gpll0_map, |
| 542 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 543 | .clkr.hw.init = &(struct clk_init_data){ |
| 544 | .name = "blsp2_qup4_spi_apps_clk_src", |
| 545 | .parent_names = gcc_xo_gpll0, |
| 546 | .num_parents = 2, |
| 547 | .ops = &clk_rcg2_ops, |
| 548 | }, |
| 549 | }; |
| 550 | |
| 551 | static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src = { |
| 552 | .cmd_rcgr = 0x0ba0, |
| 553 | .hid_width = 5, |
| 554 | .parent_map = gcc_xo_gpll0_map, |
| 555 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 556 | .clkr.hw.init = &(struct clk_init_data){ |
| 557 | .name = "blsp2_qup5_i2c_apps_clk_src", |
| 558 | .parent_names = gcc_xo_gpll0, |
| 559 | .num_parents = 2, |
| 560 | .ops = &clk_rcg2_ops, |
| 561 | }, |
| 562 | }; |
| 563 | |
| 564 | static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src = { |
| 565 | .cmd_rcgr = 0x0b8c, |
| 566 | .mnd_width = 8, |
| 567 | .hid_width = 5, |
| 568 | .parent_map = gcc_xo_gpll0_map, |
| 569 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 570 | .clkr.hw.init = &(struct clk_init_data){ |
| 571 | .name = "blsp2_qup5_spi_apps_clk_src", |
| 572 | .parent_names = gcc_xo_gpll0, |
| 573 | .num_parents = 2, |
| 574 | .ops = &clk_rcg2_ops, |
| 575 | }, |
| 576 | }; |
| 577 | |
| 578 | static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src = { |
| 579 | .cmd_rcgr = 0x0c20, |
| 580 | .hid_width = 5, |
| 581 | .parent_map = gcc_xo_gpll0_map, |
| 582 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk, |
| 583 | .clkr.hw.init = &(struct clk_init_data){ |
| 584 | .name = "blsp2_qup6_i2c_apps_clk_src", |
| 585 | .parent_names = gcc_xo_gpll0, |
| 586 | .num_parents = 2, |
| 587 | .ops = &clk_rcg2_ops, |
| 588 | }, |
| 589 | }; |
| 590 | |
| 591 | static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src = { |
| 592 | .cmd_rcgr = 0x0c0c, |
| 593 | .mnd_width = 8, |
| 594 | .hid_width = 5, |
| 595 | .parent_map = gcc_xo_gpll0_map, |
| 596 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 597 | .clkr.hw.init = &(struct clk_init_data){ |
| 598 | .name = "blsp2_qup6_spi_apps_clk_src", |
| 599 | .parent_names = gcc_xo_gpll0, |
| 600 | .num_parents = 2, |
| 601 | .ops = &clk_rcg2_ops, |
| 602 | }, |
| 603 | }; |
| 604 | |
| 605 | static struct clk_rcg2 blsp2_uart1_apps_clk_src = { |
| 606 | .cmd_rcgr = 0x09cc, |
| 607 | .mnd_width = 16, |
| 608 | .hid_width = 5, |
| 609 | .parent_map = gcc_xo_gpll0_map, |
| 610 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 611 | .clkr.hw.init = &(struct clk_init_data){ |
| 612 | .name = "blsp2_uart1_apps_clk_src", |
| 613 | .parent_names = gcc_xo_gpll0, |
| 614 | .num_parents = 2, |
| 615 | .ops = &clk_rcg2_ops, |
| 616 | }, |
| 617 | }; |
| 618 | |
| 619 | static struct clk_rcg2 blsp2_uart2_apps_clk_src = { |
| 620 | .cmd_rcgr = 0x0a4c, |
| 621 | .mnd_width = 16, |
| 622 | .hid_width = 5, |
| 623 | .parent_map = gcc_xo_gpll0_map, |
| 624 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 625 | .clkr.hw.init = &(struct clk_init_data){ |
| 626 | .name = "blsp2_uart2_apps_clk_src", |
| 627 | .parent_names = gcc_xo_gpll0, |
| 628 | .num_parents = 2, |
| 629 | .ops = &clk_rcg2_ops, |
| 630 | }, |
| 631 | }; |
| 632 | |
| 633 | static struct clk_rcg2 blsp2_uart3_apps_clk_src = { |
| 634 | .cmd_rcgr = 0x0acc, |
| 635 | .mnd_width = 16, |
| 636 | .hid_width = 5, |
| 637 | .parent_map = gcc_xo_gpll0_map, |
| 638 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 639 | .clkr.hw.init = &(struct clk_init_data){ |
| 640 | .name = "blsp2_uart3_apps_clk_src", |
| 641 | .parent_names = gcc_xo_gpll0, |
| 642 | .num_parents = 2, |
| 643 | .ops = &clk_rcg2_ops, |
| 644 | }, |
| 645 | }; |
| 646 | |
| 647 | static struct clk_rcg2 blsp2_uart4_apps_clk_src = { |
| 648 | .cmd_rcgr = 0x0b4c, |
| 649 | .mnd_width = 16, |
| 650 | .hid_width = 5, |
| 651 | .parent_map = gcc_xo_gpll0_map, |
| 652 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 653 | .clkr.hw.init = &(struct clk_init_data){ |
| 654 | .name = "blsp2_uart4_apps_clk_src", |
| 655 | .parent_names = gcc_xo_gpll0, |
| 656 | .num_parents = 2, |
| 657 | .ops = &clk_rcg2_ops, |
| 658 | }, |
| 659 | }; |
| 660 | |
| 661 | static struct clk_rcg2 blsp2_uart5_apps_clk_src = { |
| 662 | .cmd_rcgr = 0x0bcc, |
| 663 | .mnd_width = 16, |
| 664 | .hid_width = 5, |
| 665 | .parent_map = gcc_xo_gpll0_map, |
| 666 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 667 | .clkr.hw.init = &(struct clk_init_data){ |
| 668 | .name = "blsp2_uart5_apps_clk_src", |
| 669 | .parent_names = gcc_xo_gpll0, |
| 670 | .num_parents = 2, |
| 671 | .ops = &clk_rcg2_ops, |
| 672 | }, |
| 673 | }; |
| 674 | |
| 675 | static struct clk_rcg2 blsp2_uart6_apps_clk_src = { |
| 676 | .cmd_rcgr = 0x0c4c, |
| 677 | .mnd_width = 16, |
| 678 | .hid_width = 5, |
| 679 | .parent_map = gcc_xo_gpll0_map, |
| 680 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 681 | .clkr.hw.init = &(struct clk_init_data){ |
| 682 | .name = "blsp2_uart6_apps_clk_src", |
| 683 | .parent_names = gcc_xo_gpll0, |
| 684 | .num_parents = 2, |
| 685 | .ops = &clk_rcg2_ops, |
| 686 | }, |
| 687 | }; |
| 688 | |
| 689 | static const struct freq_tbl ftbl_gcc_ce1_clk[] = { |
| 690 | F(50000000, P_GPLL0, 12, 0, 0), |
| 691 | F(75000000, P_GPLL0, 8, 0, 0), |
| 692 | F(100000000, P_GPLL0, 6, 0, 0), |
| 693 | F(150000000, P_GPLL0, 4, 0, 0), |
| 694 | { } |
| 695 | }; |
| 696 | |
| 697 | static struct clk_rcg2 ce1_clk_src = { |
| 698 | .cmd_rcgr = 0x1050, |
| 699 | .hid_width = 5, |
| 700 | .parent_map = gcc_xo_gpll0_map, |
| 701 | .freq_tbl = ftbl_gcc_ce1_clk, |
| 702 | .clkr.hw.init = &(struct clk_init_data){ |
| 703 | .name = "ce1_clk_src", |
| 704 | .parent_names = gcc_xo_gpll0, |
| 705 | .num_parents = 2, |
| 706 | .ops = &clk_rcg2_ops, |
| 707 | }, |
| 708 | }; |
| 709 | |
| 710 | static const struct freq_tbl ftbl_gcc_ce2_clk[] = { |
| 711 | F(50000000, P_GPLL0, 12, 0, 0), |
| 712 | F(75000000, P_GPLL0, 8, 0, 0), |
| 713 | F(100000000, P_GPLL0, 6, 0, 0), |
| 714 | F(150000000, P_GPLL0, 4, 0, 0), |
| 715 | { } |
| 716 | }; |
| 717 | |
| 718 | static struct clk_rcg2 ce2_clk_src = { |
| 719 | .cmd_rcgr = 0x1090, |
| 720 | .hid_width = 5, |
| 721 | .parent_map = gcc_xo_gpll0_map, |
| 722 | .freq_tbl = ftbl_gcc_ce2_clk, |
| 723 | .clkr.hw.init = &(struct clk_init_data){ |
| 724 | .name = "ce2_clk_src", |
| 725 | .parent_names = gcc_xo_gpll0, |
| 726 | .num_parents = 2, |
| 727 | .ops = &clk_rcg2_ops, |
| 728 | }, |
| 729 | }; |
| 730 | |
| 731 | static const struct freq_tbl ftbl_gcc_gp_clk[] = { |
| 732 | F(4800000, P_XO, 4, 0, 0), |
| 733 | F(6000000, P_GPLL0, 10, 1, 10), |
| 734 | F(6750000, P_GPLL0, 1, 1, 89), |
| 735 | F(8000000, P_GPLL0, 15, 1, 5), |
| 736 | F(9600000, P_XO, 2, 0, 0), |
| 737 | F(16000000, P_GPLL0, 1, 2, 75), |
| 738 | F(19200000, P_XO, 1, 0, 0), |
| 739 | F(24000000, P_GPLL0, 5, 1, 5), |
| 740 | { } |
| 741 | }; |
| 742 | |
| 743 | |
| 744 | static struct clk_rcg2 gp1_clk_src = { |
| 745 | .cmd_rcgr = 0x1904, |
| 746 | .mnd_width = 8, |
| 747 | .hid_width = 5, |
| 748 | .parent_map = gcc_xo_gpll0_map, |
| 749 | .freq_tbl = ftbl_gcc_gp_clk, |
| 750 | .clkr.hw.init = &(struct clk_init_data){ |
| 751 | .name = "gp1_clk_src", |
| 752 | .parent_names = gcc_xo_gpll0, |
| 753 | .num_parents = 2, |
| 754 | .ops = &clk_rcg2_ops, |
| 755 | }, |
| 756 | }; |
| 757 | |
| 758 | static struct clk_rcg2 gp2_clk_src = { |
| 759 | .cmd_rcgr = 0x1944, |
| 760 | .mnd_width = 8, |
| 761 | .hid_width = 5, |
| 762 | .parent_map = gcc_xo_gpll0_map, |
| 763 | .freq_tbl = ftbl_gcc_gp_clk, |
| 764 | .clkr.hw.init = &(struct clk_init_data){ |
| 765 | .name = "gp2_clk_src", |
| 766 | .parent_names = gcc_xo_gpll0, |
| 767 | .num_parents = 2, |
| 768 | .ops = &clk_rcg2_ops, |
| 769 | }, |
| 770 | }; |
| 771 | |
| 772 | static struct clk_rcg2 gp3_clk_src = { |
| 773 | .cmd_rcgr = 0x1984, |
| 774 | .mnd_width = 8, |
| 775 | .hid_width = 5, |
| 776 | .parent_map = gcc_xo_gpll0_map, |
| 777 | .freq_tbl = ftbl_gcc_gp_clk, |
| 778 | .clkr.hw.init = &(struct clk_init_data){ |
| 779 | .name = "gp3_clk_src", |
| 780 | .parent_names = gcc_xo_gpll0, |
| 781 | .num_parents = 2, |
| 782 | .ops = &clk_rcg2_ops, |
| 783 | }, |
| 784 | }; |
| 785 | |
| 786 | static const struct freq_tbl ftbl_gcc_pdm2_clk[] = { |
| 787 | F(60000000, P_GPLL0, 10, 0, 0), |
| 788 | { } |
| 789 | }; |
| 790 | |
| 791 | static struct clk_rcg2 pdm2_clk_src = { |
| 792 | .cmd_rcgr = 0x0cd0, |
| 793 | .hid_width = 5, |
| 794 | .parent_map = gcc_xo_gpll0_map, |
| 795 | .freq_tbl = ftbl_gcc_pdm2_clk, |
| 796 | .clkr.hw.init = &(struct clk_init_data){ |
| 797 | .name = "pdm2_clk_src", |
| 798 | .parent_names = gcc_xo_gpll0, |
| 799 | .num_parents = 2, |
| 800 | .ops = &clk_rcg2_ops, |
| 801 | }, |
| 802 | }; |
| 803 | |
| 804 | static const struct freq_tbl ftbl_gcc_sdcc1_4_apps_clk[] = { |
| 805 | F(144000, P_XO, 16, 3, 25), |
| 806 | F(400000, P_XO, 12, 1, 4), |
| 807 | F(20000000, P_GPLL0, 15, 1, 2), |
| 808 | F(25000000, P_GPLL0, 12, 1, 2), |
| 809 | F(50000000, P_GPLL0, 12, 0, 0), |
| 810 | F(100000000, P_GPLL0, 6, 0, 0), |
| 811 | F(200000000, P_GPLL0, 3, 0, 0), |
| 812 | { } |
| 813 | }; |
| 814 | |
| 815 | static struct clk_rcg2 sdcc1_apps_clk_src = { |
| 816 | .cmd_rcgr = 0x04d0, |
| 817 | .mnd_width = 8, |
| 818 | .hid_width = 5, |
| 819 | .parent_map = gcc_xo_gpll0_map, |
| 820 | .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk, |
| 821 | .clkr.hw.init = &(struct clk_init_data){ |
| 822 | .name = "sdcc1_apps_clk_src", |
| 823 | .parent_names = gcc_xo_gpll0, |
| 824 | .num_parents = 2, |
| 825 | .ops = &clk_rcg2_ops, |
| 826 | }, |
| 827 | }; |
| 828 | |
| 829 | static struct clk_rcg2 sdcc2_apps_clk_src = { |
| 830 | .cmd_rcgr = 0x0510, |
| 831 | .mnd_width = 8, |
| 832 | .hid_width = 5, |
| 833 | .parent_map = gcc_xo_gpll0_map, |
| 834 | .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk, |
| 835 | .clkr.hw.init = &(struct clk_init_data){ |
| 836 | .name = "sdcc2_apps_clk_src", |
| 837 | .parent_names = gcc_xo_gpll0, |
| 838 | .num_parents = 2, |
| 839 | .ops = &clk_rcg2_ops, |
| 840 | }, |
| 841 | }; |
| 842 | |
| 843 | static struct clk_rcg2 sdcc3_apps_clk_src = { |
| 844 | .cmd_rcgr = 0x0550, |
| 845 | .mnd_width = 8, |
| 846 | .hid_width = 5, |
| 847 | .parent_map = gcc_xo_gpll0_map, |
| 848 | .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk, |
| 849 | .clkr.hw.init = &(struct clk_init_data){ |
| 850 | .name = "sdcc3_apps_clk_src", |
| 851 | .parent_names = gcc_xo_gpll0, |
| 852 | .num_parents = 2, |
| 853 | .ops = &clk_rcg2_ops, |
| 854 | }, |
| 855 | }; |
| 856 | |
| 857 | static struct clk_rcg2 sdcc4_apps_clk_src = { |
| 858 | .cmd_rcgr = 0x0590, |
| 859 | .mnd_width = 8, |
| 860 | .hid_width = 5, |
| 861 | .parent_map = gcc_xo_gpll0_map, |
| 862 | .freq_tbl = ftbl_gcc_sdcc1_4_apps_clk, |
| 863 | .clkr.hw.init = &(struct clk_init_data){ |
| 864 | .name = "sdcc4_apps_clk_src", |
| 865 | .parent_names = gcc_xo_gpll0, |
| 866 | .num_parents = 2, |
| 867 | .ops = &clk_rcg2_ops, |
| 868 | }, |
| 869 | }; |
| 870 | |
| 871 | static const struct freq_tbl ftbl_gcc_tsif_ref_clk[] = { |
| 872 | F(105000, P_XO, 2, 1, 91), |
| 873 | { } |
| 874 | }; |
| 875 | |
| 876 | static struct clk_rcg2 tsif_ref_clk_src = { |
| 877 | .cmd_rcgr = 0x0d90, |
| 878 | .mnd_width = 8, |
| 879 | .hid_width = 5, |
| 880 | .parent_map = gcc_xo_gpll0_map, |
| 881 | .freq_tbl = ftbl_gcc_tsif_ref_clk, |
| 882 | .clkr.hw.init = &(struct clk_init_data){ |
| 883 | .name = "tsif_ref_clk_src", |
| 884 | .parent_names = gcc_xo_gpll0, |
| 885 | .num_parents = 2, |
| 886 | .ops = &clk_rcg2_ops, |
| 887 | }, |
| 888 | }; |
| 889 | |
| 890 | static const struct freq_tbl ftbl_gcc_usb30_mock_utmi_clk[] = { |
| 891 | F(60000000, P_GPLL0, 10, 0, 0), |
| 892 | { } |
| 893 | }; |
| 894 | |
| 895 | static struct clk_rcg2 usb30_mock_utmi_clk_src = { |
| 896 | .cmd_rcgr = 0x03e8, |
| 897 | .hid_width = 5, |
| 898 | .parent_map = gcc_xo_gpll0_map, |
| 899 | .freq_tbl = ftbl_gcc_usb30_mock_utmi_clk, |
| 900 | .clkr.hw.init = &(struct clk_init_data){ |
| 901 | .name = "usb30_mock_utmi_clk_src", |
| 902 | .parent_names = gcc_xo_gpll0, |
| 903 | .num_parents = 2, |
| 904 | .ops = &clk_rcg2_ops, |
| 905 | }, |
| 906 | }; |
| 907 | |
| 908 | static const struct freq_tbl ftbl_gcc_usb_hs_system_clk[] = { |
| 909 | F(60000000, P_GPLL0, 10, 0, 0), |
| 910 | F(75000000, P_GPLL0, 8, 0, 0), |
| 911 | { } |
| 912 | }; |
| 913 | |
| 914 | static struct clk_rcg2 usb_hs_system_clk_src = { |
| 915 | .cmd_rcgr = 0x0490, |
| 916 | .hid_width = 5, |
| 917 | .parent_map = gcc_xo_gpll0_map, |
| 918 | .freq_tbl = ftbl_gcc_usb_hs_system_clk, |
| 919 | .clkr.hw.init = &(struct clk_init_data){ |
| 920 | .name = "usb_hs_system_clk_src", |
| 921 | .parent_names = gcc_xo_gpll0, |
| 922 | .num_parents = 2, |
| 923 | .ops = &clk_rcg2_ops, |
| 924 | }, |
| 925 | }; |
| 926 | |
| 927 | static const struct freq_tbl ftbl_gcc_usb_hsic_clk[] = { |
| 928 | F(480000000, P_GPLL1, 1, 0, 0), |
| 929 | { } |
| 930 | }; |
| 931 | |
| 932 | static u8 usb_hsic_clk_src_map[] = { |
| 933 | [P_XO] = 0, |
| 934 | [P_GPLL1] = 4, |
| 935 | }; |
| 936 | |
| 937 | static struct clk_rcg2 usb_hsic_clk_src = { |
| 938 | .cmd_rcgr = 0x0440, |
| 939 | .hid_width = 5, |
| 940 | .parent_map = usb_hsic_clk_src_map, |
| 941 | .freq_tbl = ftbl_gcc_usb_hsic_clk, |
| 942 | .clkr.hw.init = &(struct clk_init_data){ |
| 943 | .name = "usb_hsic_clk_src", |
| 944 | .parent_names = (const char *[]){ |
| 945 | "xo", |
| 946 | "gpll1_vote", |
| 947 | }, |
| 948 | .num_parents = 2, |
| 949 | .ops = &clk_rcg2_ops, |
| 950 | }, |
| 951 | }; |
| 952 | |
| 953 | static const struct freq_tbl ftbl_gcc_usb_hsic_io_cal_clk[] = { |
| 954 | F(9600000, P_XO, 2, 0, 0), |
| 955 | { } |
| 956 | }; |
| 957 | |
| 958 | static struct clk_rcg2 usb_hsic_io_cal_clk_src = { |
| 959 | .cmd_rcgr = 0x0458, |
| 960 | .hid_width = 5, |
| 961 | .parent_map = gcc_xo_gpll0_map, |
| 962 | .freq_tbl = ftbl_gcc_usb_hsic_io_cal_clk, |
| 963 | .clkr.hw.init = &(struct clk_init_data){ |
| 964 | .name = "usb_hsic_io_cal_clk_src", |
| 965 | .parent_names = gcc_xo_gpll0, |
| 966 | .num_parents = 1, |
| 967 | .ops = &clk_rcg2_ops, |
| 968 | }, |
| 969 | }; |
| 970 | |
| 971 | static const struct freq_tbl ftbl_gcc_usb_hsic_system_clk[] = { |
| 972 | F(60000000, P_GPLL0, 10, 0, 0), |
| 973 | F(75000000, P_GPLL0, 8, 0, 0), |
| 974 | { } |
| 975 | }; |
| 976 | |
| 977 | static struct clk_rcg2 usb_hsic_system_clk_src = { |
| 978 | .cmd_rcgr = 0x041c, |
| 979 | .hid_width = 5, |
| 980 | .parent_map = gcc_xo_gpll0_map, |
| 981 | .freq_tbl = ftbl_gcc_usb_hsic_system_clk, |
| 982 | .clkr.hw.init = &(struct clk_init_data){ |
| 983 | .name = "usb_hsic_system_clk_src", |
| 984 | .parent_names = gcc_xo_gpll0, |
| 985 | .num_parents = 2, |
| 986 | .ops = &clk_rcg2_ops, |
| 987 | }, |
| 988 | }; |
| 989 | |
| 990 | static struct clk_regmap gcc_mmss_gpll0_clk_src = { |
| 991 | .enable_reg = 0x1484, |
| 992 | .enable_mask = BIT(26), |
| 993 | .hw.init = &(struct clk_init_data){ |
| 994 | .name = "mmss_gpll0_vote", |
| 995 | .parent_names = (const char *[]){ |
| 996 | "gpll0_vote", |
| 997 | }, |
| 998 | .num_parents = 1, |
| 999 | .ops = &clk_branch_simple_ops, |
| 1000 | }, |
| 1001 | }; |
| 1002 | |
| 1003 | static struct clk_branch gcc_bam_dma_ahb_clk = { |
| 1004 | .halt_reg = 0x0d44, |
| 1005 | .halt_check = BRANCH_HALT_VOTED, |
| 1006 | .clkr = { |
| 1007 | .enable_reg = 0x1484, |
| 1008 | .enable_mask = BIT(12), |
| 1009 | .hw.init = &(struct clk_init_data){ |
| 1010 | .name = "gcc_bam_dma_ahb_clk", |
| 1011 | .parent_names = (const char *[]){ |
| 1012 | "periph_noc_clk_src", |
| 1013 | }, |
| 1014 | .num_parents = 1, |
| 1015 | .ops = &clk_branch2_ops, |
| 1016 | }, |
| 1017 | }, |
| 1018 | }; |
| 1019 | |
| 1020 | static struct clk_branch gcc_blsp1_ahb_clk = { |
| 1021 | .halt_reg = 0x05c4, |
| 1022 | .halt_check = BRANCH_HALT_VOTED, |
| 1023 | .clkr = { |
| 1024 | .enable_reg = 0x1484, |
| 1025 | .enable_mask = BIT(17), |
| 1026 | .hw.init = &(struct clk_init_data){ |
| 1027 | .name = "gcc_blsp1_ahb_clk", |
| 1028 | .parent_names = (const char *[]){ |
| 1029 | "periph_noc_clk_src", |
| 1030 | }, |
| 1031 | .num_parents = 1, |
| 1032 | .ops = &clk_branch2_ops, |
| 1033 | }, |
| 1034 | }, |
| 1035 | }; |
| 1036 | |
| 1037 | static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = { |
| 1038 | .halt_reg = 0x0648, |
| 1039 | .clkr = { |
| 1040 | .enable_reg = 0x0648, |
| 1041 | .enable_mask = BIT(0), |
| 1042 | .hw.init = &(struct clk_init_data){ |
| 1043 | .name = "gcc_blsp1_qup1_i2c_apps_clk", |
| 1044 | .parent_names = (const char *[]){ |
| 1045 | "blsp1_qup1_i2c_apps_clk_src", |
| 1046 | }, |
| 1047 | .num_parents = 1, |
| 1048 | .flags = CLK_SET_RATE_PARENT, |
| 1049 | .ops = &clk_branch2_ops, |
| 1050 | }, |
| 1051 | }, |
| 1052 | }; |
| 1053 | |
| 1054 | static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = { |
| 1055 | .halt_reg = 0x0644, |
| 1056 | .clkr = { |
| 1057 | .enable_reg = 0x0644, |
| 1058 | .enable_mask = BIT(0), |
| 1059 | .hw.init = &(struct clk_init_data){ |
| 1060 | .name = "gcc_blsp1_qup1_spi_apps_clk", |
| 1061 | .parent_names = (const char *[]){ |
| 1062 | "blsp1_qup1_spi_apps_clk_src", |
| 1063 | }, |
| 1064 | .num_parents = 1, |
| 1065 | .flags = CLK_SET_RATE_PARENT, |
| 1066 | .ops = &clk_branch2_ops, |
| 1067 | }, |
| 1068 | }, |
| 1069 | }; |
| 1070 | |
| 1071 | static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = { |
| 1072 | .halt_reg = 0x06c8, |
| 1073 | .clkr = { |
| 1074 | .enable_reg = 0x06c8, |
| 1075 | .enable_mask = BIT(0), |
| 1076 | .hw.init = &(struct clk_init_data){ |
| 1077 | .name = "gcc_blsp1_qup2_i2c_apps_clk", |
| 1078 | .parent_names = (const char *[]){ |
| 1079 | "blsp1_qup2_i2c_apps_clk_src", |
| 1080 | }, |
| 1081 | .num_parents = 1, |
| 1082 | .flags = CLK_SET_RATE_PARENT, |
| 1083 | .ops = &clk_branch2_ops, |
| 1084 | }, |
| 1085 | }, |
| 1086 | }; |
| 1087 | |
| 1088 | static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = { |
| 1089 | .halt_reg = 0x06c4, |
| 1090 | .clkr = { |
| 1091 | .enable_reg = 0x06c4, |
| 1092 | .enable_mask = BIT(0), |
| 1093 | .hw.init = &(struct clk_init_data){ |
| 1094 | .name = "gcc_blsp1_qup2_spi_apps_clk", |
| 1095 | .parent_names = (const char *[]){ |
| 1096 | "blsp1_qup2_spi_apps_clk_src", |
| 1097 | }, |
| 1098 | .num_parents = 1, |
| 1099 | .flags = CLK_SET_RATE_PARENT, |
| 1100 | .ops = &clk_branch2_ops, |
| 1101 | }, |
| 1102 | }, |
| 1103 | }; |
| 1104 | |
| 1105 | static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = { |
| 1106 | .halt_reg = 0x0748, |
| 1107 | .clkr = { |
| 1108 | .enable_reg = 0x0748, |
| 1109 | .enable_mask = BIT(0), |
| 1110 | .hw.init = &(struct clk_init_data){ |
| 1111 | .name = "gcc_blsp1_qup3_i2c_apps_clk", |
| 1112 | .parent_names = (const char *[]){ |
| 1113 | "blsp1_qup3_i2c_apps_clk_src", |
| 1114 | }, |
| 1115 | .num_parents = 1, |
| 1116 | .flags = CLK_SET_RATE_PARENT, |
| 1117 | .ops = &clk_branch2_ops, |
| 1118 | }, |
| 1119 | }, |
| 1120 | }; |
| 1121 | |
| 1122 | static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = { |
| 1123 | .halt_reg = 0x0744, |
| 1124 | .clkr = { |
| 1125 | .enable_reg = 0x0744, |
| 1126 | .enable_mask = BIT(0), |
| 1127 | .hw.init = &(struct clk_init_data){ |
| 1128 | .name = "gcc_blsp1_qup3_spi_apps_clk", |
| 1129 | .parent_names = (const char *[]){ |
| 1130 | "blsp1_qup3_spi_apps_clk_src", |
| 1131 | }, |
| 1132 | .num_parents = 1, |
| 1133 | .flags = CLK_SET_RATE_PARENT, |
| 1134 | .ops = &clk_branch2_ops, |
| 1135 | }, |
| 1136 | }, |
| 1137 | }; |
| 1138 | |
| 1139 | static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = { |
| 1140 | .halt_reg = 0x07c8, |
| 1141 | .clkr = { |
| 1142 | .enable_reg = 0x07c8, |
| 1143 | .enable_mask = BIT(0), |
| 1144 | .hw.init = &(struct clk_init_data){ |
| 1145 | .name = "gcc_blsp1_qup4_i2c_apps_clk", |
| 1146 | .parent_names = (const char *[]){ |
| 1147 | "blsp1_qup4_i2c_apps_clk_src", |
| 1148 | }, |
| 1149 | .num_parents = 1, |
| 1150 | .flags = CLK_SET_RATE_PARENT, |
| 1151 | .ops = &clk_branch2_ops, |
| 1152 | }, |
| 1153 | }, |
| 1154 | }; |
| 1155 | |
| 1156 | static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = { |
| 1157 | .halt_reg = 0x07c4, |
| 1158 | .clkr = { |
| 1159 | .enable_reg = 0x07c4, |
| 1160 | .enable_mask = BIT(0), |
| 1161 | .hw.init = &(struct clk_init_data){ |
| 1162 | .name = "gcc_blsp1_qup4_spi_apps_clk", |
| 1163 | .parent_names = (const char *[]){ |
| 1164 | "blsp1_qup4_spi_apps_clk_src", |
| 1165 | }, |
| 1166 | .num_parents = 1, |
| 1167 | .flags = CLK_SET_RATE_PARENT, |
| 1168 | .ops = &clk_branch2_ops, |
| 1169 | }, |
| 1170 | }, |
| 1171 | }; |
| 1172 | |
| 1173 | static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = { |
| 1174 | .halt_reg = 0x0848, |
| 1175 | .clkr = { |
| 1176 | .enable_reg = 0x0848, |
| 1177 | .enable_mask = BIT(0), |
| 1178 | .hw.init = &(struct clk_init_data){ |
| 1179 | .name = "gcc_blsp1_qup5_i2c_apps_clk", |
| 1180 | .parent_names = (const char *[]){ |
| 1181 | "blsp1_qup5_i2c_apps_clk_src", |
| 1182 | }, |
| 1183 | .num_parents = 1, |
| 1184 | .flags = CLK_SET_RATE_PARENT, |
| 1185 | .ops = &clk_branch2_ops, |
| 1186 | }, |
| 1187 | }, |
| 1188 | }; |
| 1189 | |
| 1190 | static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = { |
| 1191 | .halt_reg = 0x0844, |
| 1192 | .clkr = { |
| 1193 | .enable_reg = 0x0844, |
| 1194 | .enable_mask = BIT(0), |
| 1195 | .hw.init = &(struct clk_init_data){ |
| 1196 | .name = "gcc_blsp1_qup5_spi_apps_clk", |
| 1197 | .parent_names = (const char *[]){ |
| 1198 | "blsp1_qup5_spi_apps_clk_src", |
| 1199 | }, |
| 1200 | .num_parents = 1, |
| 1201 | .flags = CLK_SET_RATE_PARENT, |
| 1202 | .ops = &clk_branch2_ops, |
| 1203 | }, |
| 1204 | }, |
| 1205 | }; |
| 1206 | |
| 1207 | static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = { |
| 1208 | .halt_reg = 0x08c8, |
| 1209 | .clkr = { |
| 1210 | .enable_reg = 0x08c8, |
| 1211 | .enable_mask = BIT(0), |
| 1212 | .hw.init = &(struct clk_init_data){ |
| 1213 | .name = "gcc_blsp1_qup6_i2c_apps_clk", |
| 1214 | .parent_names = (const char *[]){ |
| 1215 | "blsp1_qup6_i2c_apps_clk_src", |
| 1216 | }, |
| 1217 | .num_parents = 1, |
| 1218 | .flags = CLK_SET_RATE_PARENT, |
| 1219 | .ops = &clk_branch2_ops, |
| 1220 | }, |
| 1221 | }, |
| 1222 | }; |
| 1223 | |
| 1224 | static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = { |
| 1225 | .halt_reg = 0x08c4, |
| 1226 | .clkr = { |
| 1227 | .enable_reg = 0x08c4, |
| 1228 | .enable_mask = BIT(0), |
| 1229 | .hw.init = &(struct clk_init_data){ |
| 1230 | .name = "gcc_blsp1_qup6_spi_apps_clk", |
| 1231 | .parent_names = (const char *[]){ |
| 1232 | "blsp1_qup6_spi_apps_clk_src", |
| 1233 | }, |
| 1234 | .num_parents = 1, |
| 1235 | .flags = CLK_SET_RATE_PARENT, |
| 1236 | .ops = &clk_branch2_ops, |
| 1237 | }, |
| 1238 | }, |
| 1239 | }; |
| 1240 | |
| 1241 | static struct clk_branch gcc_blsp1_uart1_apps_clk = { |
| 1242 | .halt_reg = 0x0684, |
| 1243 | .clkr = { |
| 1244 | .enable_reg = 0x0684, |
| 1245 | .enable_mask = BIT(0), |
| 1246 | .hw.init = &(struct clk_init_data){ |
| 1247 | .name = "gcc_blsp1_uart1_apps_clk", |
| 1248 | .parent_names = (const char *[]){ |
| 1249 | "blsp1_uart1_apps_clk_src", |
| 1250 | }, |
| 1251 | .num_parents = 1, |
| 1252 | .flags = CLK_SET_RATE_PARENT, |
| 1253 | .ops = &clk_branch2_ops, |
| 1254 | }, |
| 1255 | }, |
| 1256 | }; |
| 1257 | |
| 1258 | static struct clk_branch gcc_blsp1_uart2_apps_clk = { |
| 1259 | .halt_reg = 0x0704, |
| 1260 | .clkr = { |
| 1261 | .enable_reg = 0x0704, |
| 1262 | .enable_mask = BIT(0), |
| 1263 | .hw.init = &(struct clk_init_data){ |
| 1264 | .name = "gcc_blsp1_uart2_apps_clk", |
| 1265 | .parent_names = (const char *[]){ |
| 1266 | "blsp1_uart2_apps_clk_src", |
| 1267 | }, |
| 1268 | .num_parents = 1, |
| 1269 | .flags = CLK_SET_RATE_PARENT, |
| 1270 | .ops = &clk_branch2_ops, |
| 1271 | }, |
| 1272 | }, |
| 1273 | }; |
| 1274 | |
| 1275 | static struct clk_branch gcc_blsp1_uart3_apps_clk = { |
| 1276 | .halt_reg = 0x0784, |
| 1277 | .clkr = { |
| 1278 | .enable_reg = 0x0784, |
| 1279 | .enable_mask = BIT(0), |
| 1280 | .hw.init = &(struct clk_init_data){ |
| 1281 | .name = "gcc_blsp1_uart3_apps_clk", |
| 1282 | .parent_names = (const char *[]){ |
| 1283 | "blsp1_uart3_apps_clk_src", |
| 1284 | }, |
| 1285 | .num_parents = 1, |
| 1286 | .flags = CLK_SET_RATE_PARENT, |
| 1287 | .ops = &clk_branch2_ops, |
| 1288 | }, |
| 1289 | }, |
| 1290 | }; |
| 1291 | |
| 1292 | static struct clk_branch gcc_blsp1_uart4_apps_clk = { |
| 1293 | .halt_reg = 0x0804, |
| 1294 | .clkr = { |
| 1295 | .enable_reg = 0x0804, |
| 1296 | .enable_mask = BIT(0), |
| 1297 | .hw.init = &(struct clk_init_data){ |
| 1298 | .name = "gcc_blsp1_uart4_apps_clk", |
| 1299 | .parent_names = (const char *[]){ |
| 1300 | "blsp1_uart4_apps_clk_src", |
| 1301 | }, |
| 1302 | .num_parents = 1, |
| 1303 | .flags = CLK_SET_RATE_PARENT, |
| 1304 | .ops = &clk_branch2_ops, |
| 1305 | }, |
| 1306 | }, |
| 1307 | }; |
| 1308 | |
| 1309 | static struct clk_branch gcc_blsp1_uart5_apps_clk = { |
| 1310 | .halt_reg = 0x0884, |
| 1311 | .clkr = { |
| 1312 | .enable_reg = 0x0884, |
| 1313 | .enable_mask = BIT(0), |
| 1314 | .hw.init = &(struct clk_init_data){ |
| 1315 | .name = "gcc_blsp1_uart5_apps_clk", |
| 1316 | .parent_names = (const char *[]){ |
| 1317 | "blsp1_uart5_apps_clk_src", |
| 1318 | }, |
| 1319 | .num_parents = 1, |
| 1320 | .flags = CLK_SET_RATE_PARENT, |
| 1321 | .ops = &clk_branch2_ops, |
| 1322 | }, |
| 1323 | }, |
| 1324 | }; |
| 1325 | |
| 1326 | static struct clk_branch gcc_blsp1_uart6_apps_clk = { |
| 1327 | .halt_reg = 0x0904, |
| 1328 | .clkr = { |
| 1329 | .enable_reg = 0x0904, |
| 1330 | .enable_mask = BIT(0), |
| 1331 | .hw.init = &(struct clk_init_data){ |
| 1332 | .name = "gcc_blsp1_uart6_apps_clk", |
| 1333 | .parent_names = (const char *[]){ |
| 1334 | "blsp1_uart6_apps_clk_src", |
| 1335 | }, |
| 1336 | .num_parents = 1, |
| 1337 | .flags = CLK_SET_RATE_PARENT, |
| 1338 | .ops = &clk_branch2_ops, |
| 1339 | }, |
| 1340 | }, |
| 1341 | }; |
| 1342 | |
| 1343 | static struct clk_branch gcc_blsp2_ahb_clk = { |
Georgi Djakov | 63a0026 | 2014-05-20 19:50:54 +0300 | [diff] [blame^] | 1344 | .halt_reg = 0x0944, |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 1345 | .halt_check = BRANCH_HALT_VOTED, |
| 1346 | .clkr = { |
| 1347 | .enable_reg = 0x1484, |
| 1348 | .enable_mask = BIT(15), |
| 1349 | .hw.init = &(struct clk_init_data){ |
| 1350 | .name = "gcc_blsp2_ahb_clk", |
| 1351 | .parent_names = (const char *[]){ |
| 1352 | "periph_noc_clk_src", |
| 1353 | }, |
| 1354 | .num_parents = 1, |
| 1355 | .ops = &clk_branch2_ops, |
| 1356 | }, |
| 1357 | }, |
| 1358 | }; |
| 1359 | |
| 1360 | static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk = { |
| 1361 | .halt_reg = 0x0988, |
| 1362 | .clkr = { |
| 1363 | .enable_reg = 0x0988, |
| 1364 | .enable_mask = BIT(0), |
| 1365 | .hw.init = &(struct clk_init_data){ |
| 1366 | .name = "gcc_blsp2_qup1_i2c_apps_clk", |
| 1367 | .parent_names = (const char *[]){ |
| 1368 | "blsp2_qup1_i2c_apps_clk_src", |
| 1369 | }, |
| 1370 | .num_parents = 1, |
| 1371 | .flags = CLK_SET_RATE_PARENT, |
| 1372 | .ops = &clk_branch2_ops, |
| 1373 | }, |
| 1374 | }, |
| 1375 | }; |
| 1376 | |
| 1377 | static struct clk_branch gcc_blsp2_qup1_spi_apps_clk = { |
| 1378 | .halt_reg = 0x0984, |
| 1379 | .clkr = { |
| 1380 | .enable_reg = 0x0984, |
| 1381 | .enable_mask = BIT(0), |
| 1382 | .hw.init = &(struct clk_init_data){ |
| 1383 | .name = "gcc_blsp2_qup1_spi_apps_clk", |
| 1384 | .parent_names = (const char *[]){ |
| 1385 | "blsp2_qup1_spi_apps_clk_src", |
| 1386 | }, |
| 1387 | .num_parents = 1, |
| 1388 | .flags = CLK_SET_RATE_PARENT, |
| 1389 | .ops = &clk_branch2_ops, |
| 1390 | }, |
| 1391 | }, |
| 1392 | }; |
| 1393 | |
| 1394 | static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk = { |
| 1395 | .halt_reg = 0x0a08, |
| 1396 | .clkr = { |
| 1397 | .enable_reg = 0x0a08, |
| 1398 | .enable_mask = BIT(0), |
| 1399 | .hw.init = &(struct clk_init_data){ |
| 1400 | .name = "gcc_blsp2_qup2_i2c_apps_clk", |
| 1401 | .parent_names = (const char *[]){ |
| 1402 | "blsp2_qup2_i2c_apps_clk_src", |
| 1403 | }, |
| 1404 | .num_parents = 1, |
| 1405 | .flags = CLK_SET_RATE_PARENT, |
| 1406 | .ops = &clk_branch2_ops, |
| 1407 | }, |
| 1408 | }, |
| 1409 | }; |
| 1410 | |
| 1411 | static struct clk_branch gcc_blsp2_qup2_spi_apps_clk = { |
| 1412 | .halt_reg = 0x0a04, |
| 1413 | .clkr = { |
| 1414 | .enable_reg = 0x0a04, |
| 1415 | .enable_mask = BIT(0), |
| 1416 | .hw.init = &(struct clk_init_data){ |
| 1417 | .name = "gcc_blsp2_qup2_spi_apps_clk", |
| 1418 | .parent_names = (const char *[]){ |
| 1419 | "blsp2_qup2_spi_apps_clk_src", |
| 1420 | }, |
| 1421 | .num_parents = 1, |
| 1422 | .flags = CLK_SET_RATE_PARENT, |
| 1423 | .ops = &clk_branch2_ops, |
| 1424 | }, |
| 1425 | }, |
| 1426 | }; |
| 1427 | |
| 1428 | static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk = { |
| 1429 | .halt_reg = 0x0a88, |
| 1430 | .clkr = { |
| 1431 | .enable_reg = 0x0a88, |
| 1432 | .enable_mask = BIT(0), |
| 1433 | .hw.init = &(struct clk_init_data){ |
| 1434 | .name = "gcc_blsp2_qup3_i2c_apps_clk", |
| 1435 | .parent_names = (const char *[]){ |
| 1436 | "blsp2_qup3_i2c_apps_clk_src", |
| 1437 | }, |
| 1438 | .num_parents = 1, |
| 1439 | .flags = CLK_SET_RATE_PARENT, |
| 1440 | .ops = &clk_branch2_ops, |
| 1441 | }, |
| 1442 | }, |
| 1443 | }; |
| 1444 | |
| 1445 | static struct clk_branch gcc_blsp2_qup3_spi_apps_clk = { |
| 1446 | .halt_reg = 0x0a84, |
| 1447 | .clkr = { |
| 1448 | .enable_reg = 0x0a84, |
| 1449 | .enable_mask = BIT(0), |
| 1450 | .hw.init = &(struct clk_init_data){ |
| 1451 | .name = "gcc_blsp2_qup3_spi_apps_clk", |
| 1452 | .parent_names = (const char *[]){ |
| 1453 | "blsp2_qup3_spi_apps_clk_src", |
| 1454 | }, |
| 1455 | .num_parents = 1, |
| 1456 | .flags = CLK_SET_RATE_PARENT, |
| 1457 | .ops = &clk_branch2_ops, |
| 1458 | }, |
| 1459 | }, |
| 1460 | }; |
| 1461 | |
| 1462 | static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk = { |
| 1463 | .halt_reg = 0x0b08, |
| 1464 | .clkr = { |
| 1465 | .enable_reg = 0x0b08, |
| 1466 | .enable_mask = BIT(0), |
| 1467 | .hw.init = &(struct clk_init_data){ |
| 1468 | .name = "gcc_blsp2_qup4_i2c_apps_clk", |
| 1469 | .parent_names = (const char *[]){ |
| 1470 | "blsp2_qup4_i2c_apps_clk_src", |
| 1471 | }, |
| 1472 | .num_parents = 1, |
| 1473 | .flags = CLK_SET_RATE_PARENT, |
| 1474 | .ops = &clk_branch2_ops, |
| 1475 | }, |
| 1476 | }, |
| 1477 | }; |
| 1478 | |
| 1479 | static struct clk_branch gcc_blsp2_qup4_spi_apps_clk = { |
| 1480 | .halt_reg = 0x0b04, |
| 1481 | .clkr = { |
| 1482 | .enable_reg = 0x0b04, |
| 1483 | .enable_mask = BIT(0), |
| 1484 | .hw.init = &(struct clk_init_data){ |
| 1485 | .name = "gcc_blsp2_qup4_spi_apps_clk", |
| 1486 | .parent_names = (const char *[]){ |
| 1487 | "blsp2_qup4_spi_apps_clk_src", |
| 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_blsp2_qup5_i2c_apps_clk = { |
| 1497 | .halt_reg = 0x0b88, |
| 1498 | .clkr = { |
| 1499 | .enable_reg = 0x0b88, |
| 1500 | .enable_mask = BIT(0), |
| 1501 | .hw.init = &(struct clk_init_data){ |
| 1502 | .name = "gcc_blsp2_qup5_i2c_apps_clk", |
| 1503 | .parent_names = (const char *[]){ |
| 1504 | "blsp2_qup5_i2c_apps_clk_src", |
| 1505 | }, |
| 1506 | .num_parents = 1, |
| 1507 | .flags = CLK_SET_RATE_PARENT, |
| 1508 | .ops = &clk_branch2_ops, |
| 1509 | }, |
| 1510 | }, |
| 1511 | }; |
| 1512 | |
| 1513 | static struct clk_branch gcc_blsp2_qup5_spi_apps_clk = { |
| 1514 | .halt_reg = 0x0b84, |
| 1515 | .clkr = { |
| 1516 | .enable_reg = 0x0b84, |
| 1517 | .enable_mask = BIT(0), |
| 1518 | .hw.init = &(struct clk_init_data){ |
| 1519 | .name = "gcc_blsp2_qup5_spi_apps_clk", |
| 1520 | .parent_names = (const char *[]){ |
| 1521 | "blsp2_qup5_spi_apps_clk_src", |
| 1522 | }, |
| 1523 | .num_parents = 1, |
| 1524 | .flags = CLK_SET_RATE_PARENT, |
| 1525 | .ops = &clk_branch2_ops, |
| 1526 | }, |
| 1527 | }, |
| 1528 | }; |
| 1529 | |
| 1530 | static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk = { |
| 1531 | .halt_reg = 0x0c08, |
| 1532 | .clkr = { |
| 1533 | .enable_reg = 0x0c08, |
| 1534 | .enable_mask = BIT(0), |
| 1535 | .hw.init = &(struct clk_init_data){ |
| 1536 | .name = "gcc_blsp2_qup6_i2c_apps_clk", |
| 1537 | .parent_names = (const char *[]){ |
| 1538 | "blsp2_qup6_i2c_apps_clk_src", |
| 1539 | }, |
| 1540 | .num_parents = 1, |
| 1541 | .flags = CLK_SET_RATE_PARENT, |
| 1542 | .ops = &clk_branch2_ops, |
| 1543 | }, |
| 1544 | }, |
| 1545 | }; |
| 1546 | |
| 1547 | static struct clk_branch gcc_blsp2_qup6_spi_apps_clk = { |
| 1548 | .halt_reg = 0x0c04, |
| 1549 | .clkr = { |
| 1550 | .enable_reg = 0x0c04, |
| 1551 | .enable_mask = BIT(0), |
| 1552 | .hw.init = &(struct clk_init_data){ |
| 1553 | .name = "gcc_blsp2_qup6_spi_apps_clk", |
| 1554 | .parent_names = (const char *[]){ |
| 1555 | "blsp2_qup6_spi_apps_clk_src", |
| 1556 | }, |
| 1557 | .num_parents = 1, |
| 1558 | .flags = CLK_SET_RATE_PARENT, |
| 1559 | .ops = &clk_branch2_ops, |
| 1560 | }, |
| 1561 | }, |
| 1562 | }; |
| 1563 | |
| 1564 | static struct clk_branch gcc_blsp2_uart1_apps_clk = { |
| 1565 | .halt_reg = 0x09c4, |
| 1566 | .clkr = { |
| 1567 | .enable_reg = 0x09c4, |
| 1568 | .enable_mask = BIT(0), |
| 1569 | .hw.init = &(struct clk_init_data){ |
| 1570 | .name = "gcc_blsp2_uart1_apps_clk", |
| 1571 | .parent_names = (const char *[]){ |
| 1572 | "blsp2_uart1_apps_clk_src", |
| 1573 | }, |
| 1574 | .num_parents = 1, |
| 1575 | .flags = CLK_SET_RATE_PARENT, |
| 1576 | .ops = &clk_branch2_ops, |
| 1577 | }, |
| 1578 | }, |
| 1579 | }; |
| 1580 | |
| 1581 | static struct clk_branch gcc_blsp2_uart2_apps_clk = { |
| 1582 | .halt_reg = 0x0a44, |
| 1583 | .clkr = { |
| 1584 | .enable_reg = 0x0a44, |
| 1585 | .enable_mask = BIT(0), |
| 1586 | .hw.init = &(struct clk_init_data){ |
| 1587 | .name = "gcc_blsp2_uart2_apps_clk", |
| 1588 | .parent_names = (const char *[]){ |
| 1589 | "blsp2_uart2_apps_clk_src", |
| 1590 | }, |
| 1591 | .num_parents = 1, |
| 1592 | .flags = CLK_SET_RATE_PARENT, |
| 1593 | .ops = &clk_branch2_ops, |
| 1594 | }, |
| 1595 | }, |
| 1596 | }; |
| 1597 | |
| 1598 | static struct clk_branch gcc_blsp2_uart3_apps_clk = { |
| 1599 | .halt_reg = 0x0ac4, |
| 1600 | .clkr = { |
| 1601 | .enable_reg = 0x0ac4, |
| 1602 | .enable_mask = BIT(0), |
| 1603 | .hw.init = &(struct clk_init_data){ |
| 1604 | .name = "gcc_blsp2_uart3_apps_clk", |
| 1605 | .parent_names = (const char *[]){ |
| 1606 | "blsp2_uart3_apps_clk_src", |
| 1607 | }, |
| 1608 | .num_parents = 1, |
| 1609 | .flags = CLK_SET_RATE_PARENT, |
| 1610 | .ops = &clk_branch2_ops, |
| 1611 | }, |
| 1612 | }, |
| 1613 | }; |
| 1614 | |
| 1615 | static struct clk_branch gcc_blsp2_uart4_apps_clk = { |
| 1616 | .halt_reg = 0x0b44, |
| 1617 | .clkr = { |
| 1618 | .enable_reg = 0x0b44, |
| 1619 | .enable_mask = BIT(0), |
| 1620 | .hw.init = &(struct clk_init_data){ |
| 1621 | .name = "gcc_blsp2_uart4_apps_clk", |
| 1622 | .parent_names = (const char *[]){ |
| 1623 | "blsp2_uart4_apps_clk_src", |
| 1624 | }, |
| 1625 | .num_parents = 1, |
| 1626 | .flags = CLK_SET_RATE_PARENT, |
| 1627 | .ops = &clk_branch2_ops, |
| 1628 | }, |
| 1629 | }, |
| 1630 | }; |
| 1631 | |
| 1632 | static struct clk_branch gcc_blsp2_uart5_apps_clk = { |
| 1633 | .halt_reg = 0x0bc4, |
| 1634 | .clkr = { |
| 1635 | .enable_reg = 0x0bc4, |
| 1636 | .enable_mask = BIT(0), |
| 1637 | .hw.init = &(struct clk_init_data){ |
| 1638 | .name = "gcc_blsp2_uart5_apps_clk", |
| 1639 | .parent_names = (const char *[]){ |
| 1640 | "blsp2_uart5_apps_clk_src", |
| 1641 | }, |
| 1642 | .num_parents = 1, |
| 1643 | .flags = CLK_SET_RATE_PARENT, |
| 1644 | .ops = &clk_branch2_ops, |
| 1645 | }, |
| 1646 | }, |
| 1647 | }; |
| 1648 | |
| 1649 | static struct clk_branch gcc_blsp2_uart6_apps_clk = { |
| 1650 | .halt_reg = 0x0c44, |
| 1651 | .clkr = { |
| 1652 | .enable_reg = 0x0c44, |
| 1653 | .enable_mask = BIT(0), |
| 1654 | .hw.init = &(struct clk_init_data){ |
| 1655 | .name = "gcc_blsp2_uart6_apps_clk", |
| 1656 | .parent_names = (const char *[]){ |
| 1657 | "blsp2_uart6_apps_clk_src", |
| 1658 | }, |
| 1659 | .num_parents = 1, |
| 1660 | .flags = CLK_SET_RATE_PARENT, |
| 1661 | .ops = &clk_branch2_ops, |
| 1662 | }, |
| 1663 | }, |
| 1664 | }; |
| 1665 | |
| 1666 | static struct clk_branch gcc_boot_rom_ahb_clk = { |
| 1667 | .halt_reg = 0x0e04, |
| 1668 | .halt_check = BRANCH_HALT_VOTED, |
| 1669 | .clkr = { |
| 1670 | .enable_reg = 0x1484, |
| 1671 | .enable_mask = BIT(10), |
| 1672 | .hw.init = &(struct clk_init_data){ |
| 1673 | .name = "gcc_boot_rom_ahb_clk", |
| 1674 | .parent_names = (const char *[]){ |
| 1675 | "config_noc_clk_src", |
| 1676 | }, |
| 1677 | .num_parents = 1, |
| 1678 | .ops = &clk_branch2_ops, |
| 1679 | }, |
| 1680 | }, |
| 1681 | }; |
| 1682 | |
| 1683 | static struct clk_branch gcc_ce1_ahb_clk = { |
| 1684 | .halt_reg = 0x104c, |
| 1685 | .halt_check = BRANCH_HALT_VOTED, |
| 1686 | .clkr = { |
| 1687 | .enable_reg = 0x1484, |
| 1688 | .enable_mask = BIT(3), |
| 1689 | .hw.init = &(struct clk_init_data){ |
| 1690 | .name = "gcc_ce1_ahb_clk", |
| 1691 | .parent_names = (const char *[]){ |
| 1692 | "config_noc_clk_src", |
| 1693 | }, |
| 1694 | .num_parents = 1, |
| 1695 | .ops = &clk_branch2_ops, |
| 1696 | }, |
| 1697 | }, |
| 1698 | }; |
| 1699 | |
| 1700 | static struct clk_branch gcc_ce1_axi_clk = { |
| 1701 | .halt_reg = 0x1048, |
| 1702 | .halt_check = BRANCH_HALT_VOTED, |
| 1703 | .clkr = { |
| 1704 | .enable_reg = 0x1484, |
| 1705 | .enable_mask = BIT(4), |
| 1706 | .hw.init = &(struct clk_init_data){ |
| 1707 | .name = "gcc_ce1_axi_clk", |
| 1708 | .parent_names = (const char *[]){ |
| 1709 | "system_noc_clk_src", |
| 1710 | }, |
| 1711 | .num_parents = 1, |
| 1712 | .ops = &clk_branch2_ops, |
| 1713 | }, |
| 1714 | }, |
| 1715 | }; |
| 1716 | |
| 1717 | static struct clk_branch gcc_ce1_clk = { |
| 1718 | .halt_reg = 0x1050, |
| 1719 | .halt_check = BRANCH_HALT_VOTED, |
| 1720 | .clkr = { |
| 1721 | .enable_reg = 0x1484, |
| 1722 | .enable_mask = BIT(5), |
| 1723 | .hw.init = &(struct clk_init_data){ |
| 1724 | .name = "gcc_ce1_clk", |
| 1725 | .parent_names = (const char *[]){ |
| 1726 | "ce1_clk_src", |
| 1727 | }, |
| 1728 | .num_parents = 1, |
| 1729 | .ops = &clk_branch2_ops, |
| 1730 | }, |
| 1731 | }, |
| 1732 | }; |
| 1733 | |
| 1734 | static struct clk_branch gcc_ce2_ahb_clk = { |
| 1735 | .halt_reg = 0x108c, |
| 1736 | .halt_check = BRANCH_HALT_VOTED, |
| 1737 | .clkr = { |
| 1738 | .enable_reg = 0x1484, |
| 1739 | .enable_mask = BIT(0), |
| 1740 | .hw.init = &(struct clk_init_data){ |
| 1741 | .name = "gcc_ce2_ahb_clk", |
| 1742 | .parent_names = (const char *[]){ |
| 1743 | "config_noc_clk_src", |
| 1744 | }, |
| 1745 | .num_parents = 1, |
| 1746 | .ops = &clk_branch2_ops, |
| 1747 | }, |
| 1748 | }, |
| 1749 | }; |
| 1750 | |
| 1751 | static struct clk_branch gcc_ce2_axi_clk = { |
| 1752 | .halt_reg = 0x1088, |
| 1753 | .halt_check = BRANCH_HALT_VOTED, |
| 1754 | .clkr = { |
| 1755 | .enable_reg = 0x1484, |
| 1756 | .enable_mask = BIT(1), |
| 1757 | .hw.init = &(struct clk_init_data){ |
| 1758 | .name = "gcc_ce2_axi_clk", |
| 1759 | .parent_names = (const char *[]){ |
| 1760 | "system_noc_clk_src", |
| 1761 | }, |
| 1762 | .num_parents = 1, |
| 1763 | .ops = &clk_branch2_ops, |
| 1764 | }, |
| 1765 | }, |
| 1766 | }; |
| 1767 | |
| 1768 | static struct clk_branch gcc_ce2_clk = { |
| 1769 | .halt_reg = 0x1090, |
| 1770 | .halt_check = BRANCH_HALT_VOTED, |
| 1771 | .clkr = { |
| 1772 | .enable_reg = 0x1484, |
| 1773 | .enable_mask = BIT(2), |
| 1774 | .hw.init = &(struct clk_init_data){ |
| 1775 | .name = "gcc_ce2_clk", |
| 1776 | .parent_names = (const char *[]){ |
| 1777 | "ce2_clk_src", |
| 1778 | }, |
| 1779 | .num_parents = 1, |
| 1780 | .flags = CLK_SET_RATE_PARENT, |
| 1781 | .ops = &clk_branch2_ops, |
| 1782 | }, |
| 1783 | }, |
| 1784 | }; |
| 1785 | |
| 1786 | static struct clk_branch gcc_gp1_clk = { |
| 1787 | .halt_reg = 0x1900, |
| 1788 | .clkr = { |
| 1789 | .enable_reg = 0x1900, |
| 1790 | .enable_mask = BIT(0), |
| 1791 | .hw.init = &(struct clk_init_data){ |
| 1792 | .name = "gcc_gp1_clk", |
| 1793 | .parent_names = (const char *[]){ |
| 1794 | "gp1_clk_src", |
| 1795 | }, |
| 1796 | .num_parents = 1, |
| 1797 | .flags = CLK_SET_RATE_PARENT, |
| 1798 | .ops = &clk_branch2_ops, |
| 1799 | }, |
| 1800 | }, |
| 1801 | }; |
| 1802 | |
| 1803 | static struct clk_branch gcc_gp2_clk = { |
| 1804 | .halt_reg = 0x1940, |
| 1805 | .clkr = { |
| 1806 | .enable_reg = 0x1940, |
| 1807 | .enable_mask = BIT(0), |
| 1808 | .hw.init = &(struct clk_init_data){ |
| 1809 | .name = "gcc_gp2_clk", |
| 1810 | .parent_names = (const char *[]){ |
| 1811 | "gp2_clk_src", |
| 1812 | }, |
| 1813 | .num_parents = 1, |
| 1814 | .flags = CLK_SET_RATE_PARENT, |
| 1815 | .ops = &clk_branch2_ops, |
| 1816 | }, |
| 1817 | }, |
| 1818 | }; |
| 1819 | |
| 1820 | static struct clk_branch gcc_gp3_clk = { |
| 1821 | .halt_reg = 0x1980, |
| 1822 | .clkr = { |
| 1823 | .enable_reg = 0x1980, |
| 1824 | .enable_mask = BIT(0), |
| 1825 | .hw.init = &(struct clk_init_data){ |
| 1826 | .name = "gcc_gp3_clk", |
| 1827 | .parent_names = (const char *[]){ |
| 1828 | "gp3_clk_src", |
| 1829 | }, |
| 1830 | .num_parents = 1, |
| 1831 | .flags = CLK_SET_RATE_PARENT, |
| 1832 | .ops = &clk_branch2_ops, |
| 1833 | }, |
| 1834 | }, |
| 1835 | }; |
| 1836 | |
| 1837 | static struct clk_branch gcc_lpass_q6_axi_clk = { |
| 1838 | .halt_reg = 0x11c0, |
| 1839 | .clkr = { |
| 1840 | .enable_reg = 0x11c0, |
| 1841 | .enable_mask = BIT(0), |
| 1842 | .hw.init = &(struct clk_init_data){ |
| 1843 | .name = "gcc_lpass_q6_axi_clk", |
| 1844 | .parent_names = (const char *[]){ |
| 1845 | "system_noc_clk_src", |
| 1846 | }, |
| 1847 | .num_parents = 1, |
| 1848 | .ops = &clk_branch2_ops, |
| 1849 | }, |
| 1850 | }, |
| 1851 | }; |
| 1852 | |
| 1853 | static struct clk_branch gcc_mmss_noc_cfg_ahb_clk = { |
| 1854 | .halt_reg = 0x024c, |
| 1855 | .clkr = { |
| 1856 | .enable_reg = 0x024c, |
| 1857 | .enable_mask = BIT(0), |
| 1858 | .hw.init = &(struct clk_init_data){ |
| 1859 | .name = "gcc_mmss_noc_cfg_ahb_clk", |
| 1860 | .parent_names = (const char *[]){ |
| 1861 | "config_noc_clk_src", |
| 1862 | }, |
| 1863 | .num_parents = 1, |
| 1864 | .ops = &clk_branch2_ops, |
| 1865 | .flags = CLK_IGNORE_UNUSED, |
| 1866 | }, |
| 1867 | }, |
| 1868 | }; |
| 1869 | |
| 1870 | static struct clk_branch gcc_ocmem_noc_cfg_ahb_clk = { |
| 1871 | .halt_reg = 0x0248, |
| 1872 | .clkr = { |
| 1873 | .enable_reg = 0x0248, |
| 1874 | .enable_mask = BIT(0), |
| 1875 | .hw.init = &(struct clk_init_data){ |
| 1876 | .name = "gcc_ocmem_noc_cfg_ahb_clk", |
| 1877 | .parent_names = (const char *[]){ |
| 1878 | "config_noc_clk_src", |
| 1879 | }, |
| 1880 | .num_parents = 1, |
| 1881 | .ops = &clk_branch2_ops, |
| 1882 | }, |
| 1883 | }, |
| 1884 | }; |
| 1885 | |
| 1886 | static struct clk_branch gcc_mss_cfg_ahb_clk = { |
| 1887 | .halt_reg = 0x0280, |
| 1888 | .clkr = { |
| 1889 | .enable_reg = 0x0280, |
| 1890 | .enable_mask = BIT(0), |
| 1891 | .hw.init = &(struct clk_init_data){ |
| 1892 | .name = "gcc_mss_cfg_ahb_clk", |
| 1893 | .parent_names = (const char *[]){ |
| 1894 | "config_noc_clk_src", |
| 1895 | }, |
| 1896 | .num_parents = 1, |
| 1897 | .ops = &clk_branch2_ops, |
| 1898 | }, |
| 1899 | }, |
| 1900 | }; |
| 1901 | |
| 1902 | static struct clk_branch gcc_mss_q6_bimc_axi_clk = { |
| 1903 | .halt_reg = 0x0284, |
| 1904 | .clkr = { |
| 1905 | .enable_reg = 0x0284, |
| 1906 | .enable_mask = BIT(0), |
| 1907 | .hw.init = &(struct clk_init_data){ |
| 1908 | .name = "gcc_mss_q6_bimc_axi_clk", |
| 1909 | .flags = CLK_IS_ROOT, |
| 1910 | .ops = &clk_branch2_ops, |
| 1911 | }, |
| 1912 | }, |
| 1913 | }; |
| 1914 | |
| 1915 | static struct clk_branch gcc_pdm2_clk = { |
| 1916 | .halt_reg = 0x0ccc, |
| 1917 | .clkr = { |
| 1918 | .enable_reg = 0x0ccc, |
| 1919 | .enable_mask = BIT(0), |
| 1920 | .hw.init = &(struct clk_init_data){ |
| 1921 | .name = "gcc_pdm2_clk", |
| 1922 | .parent_names = (const char *[]){ |
| 1923 | "pdm2_clk_src", |
| 1924 | }, |
| 1925 | .num_parents = 1, |
| 1926 | .flags = CLK_SET_RATE_PARENT, |
| 1927 | .ops = &clk_branch2_ops, |
| 1928 | }, |
| 1929 | }, |
| 1930 | }; |
| 1931 | |
| 1932 | static struct clk_branch gcc_pdm_ahb_clk = { |
| 1933 | .halt_reg = 0x0cc4, |
| 1934 | .clkr = { |
| 1935 | .enable_reg = 0x0cc4, |
| 1936 | .enable_mask = BIT(0), |
| 1937 | .hw.init = &(struct clk_init_data){ |
| 1938 | .name = "gcc_pdm_ahb_clk", |
| 1939 | .parent_names = (const char *[]){ |
| 1940 | "periph_noc_clk_src", |
| 1941 | }, |
| 1942 | .num_parents = 1, |
| 1943 | .ops = &clk_branch2_ops, |
| 1944 | }, |
| 1945 | }, |
| 1946 | }; |
| 1947 | |
| 1948 | static struct clk_branch gcc_prng_ahb_clk = { |
| 1949 | .halt_reg = 0x0d04, |
| 1950 | .halt_check = BRANCH_HALT_VOTED, |
| 1951 | .clkr = { |
| 1952 | .enable_reg = 0x1484, |
| 1953 | .enable_mask = BIT(13), |
| 1954 | .hw.init = &(struct clk_init_data){ |
| 1955 | .name = "gcc_prng_ahb_clk", |
| 1956 | .parent_names = (const char *[]){ |
| 1957 | "periph_noc_clk_src", |
| 1958 | }, |
| 1959 | .num_parents = 1, |
| 1960 | .ops = &clk_branch2_ops, |
| 1961 | }, |
| 1962 | }, |
| 1963 | }; |
| 1964 | |
| 1965 | static struct clk_branch gcc_sdcc1_ahb_clk = { |
| 1966 | .halt_reg = 0x04c8, |
| 1967 | .clkr = { |
| 1968 | .enable_reg = 0x04c8, |
| 1969 | .enable_mask = BIT(0), |
| 1970 | .hw.init = &(struct clk_init_data){ |
| 1971 | .name = "gcc_sdcc1_ahb_clk", |
| 1972 | .parent_names = (const char *[]){ |
| 1973 | "periph_noc_clk_src", |
| 1974 | }, |
| 1975 | .num_parents = 1, |
| 1976 | .ops = &clk_branch2_ops, |
| 1977 | }, |
| 1978 | }, |
| 1979 | }; |
| 1980 | |
| 1981 | static struct clk_branch gcc_sdcc1_apps_clk = { |
| 1982 | .halt_reg = 0x04c4, |
| 1983 | .clkr = { |
| 1984 | .enable_reg = 0x04c4, |
| 1985 | .enable_mask = BIT(0), |
| 1986 | .hw.init = &(struct clk_init_data){ |
| 1987 | .name = "gcc_sdcc1_apps_clk", |
| 1988 | .parent_names = (const char *[]){ |
| 1989 | "sdcc1_apps_clk_src", |
| 1990 | }, |
| 1991 | .num_parents = 1, |
| 1992 | .flags = CLK_SET_RATE_PARENT, |
| 1993 | .ops = &clk_branch2_ops, |
| 1994 | }, |
| 1995 | }, |
| 1996 | }; |
| 1997 | |
| 1998 | static struct clk_branch gcc_sdcc2_ahb_clk = { |
| 1999 | .halt_reg = 0x0508, |
| 2000 | .clkr = { |
| 2001 | .enable_reg = 0x0508, |
| 2002 | .enable_mask = BIT(0), |
| 2003 | .hw.init = &(struct clk_init_data){ |
| 2004 | .name = "gcc_sdcc2_ahb_clk", |
| 2005 | .parent_names = (const char *[]){ |
| 2006 | "periph_noc_clk_src", |
| 2007 | }, |
| 2008 | .num_parents = 1, |
| 2009 | .ops = &clk_branch2_ops, |
| 2010 | }, |
| 2011 | }, |
| 2012 | }; |
| 2013 | |
| 2014 | static struct clk_branch gcc_sdcc2_apps_clk = { |
| 2015 | .halt_reg = 0x0504, |
| 2016 | .clkr = { |
| 2017 | .enable_reg = 0x0504, |
| 2018 | .enable_mask = BIT(0), |
| 2019 | .hw.init = &(struct clk_init_data){ |
| 2020 | .name = "gcc_sdcc2_apps_clk", |
| 2021 | .parent_names = (const char *[]){ |
| 2022 | "sdcc2_apps_clk_src", |
| 2023 | }, |
| 2024 | .num_parents = 1, |
| 2025 | .flags = CLK_SET_RATE_PARENT, |
| 2026 | .ops = &clk_branch2_ops, |
| 2027 | }, |
| 2028 | }, |
| 2029 | }; |
| 2030 | |
| 2031 | static struct clk_branch gcc_sdcc3_ahb_clk = { |
| 2032 | .halt_reg = 0x0548, |
| 2033 | .clkr = { |
| 2034 | .enable_reg = 0x0548, |
| 2035 | .enable_mask = BIT(0), |
| 2036 | .hw.init = &(struct clk_init_data){ |
| 2037 | .name = "gcc_sdcc3_ahb_clk", |
| 2038 | .parent_names = (const char *[]){ |
| 2039 | "periph_noc_clk_src", |
| 2040 | }, |
| 2041 | .num_parents = 1, |
| 2042 | .ops = &clk_branch2_ops, |
| 2043 | }, |
| 2044 | }, |
| 2045 | }; |
| 2046 | |
| 2047 | static struct clk_branch gcc_sdcc3_apps_clk = { |
| 2048 | .halt_reg = 0x0544, |
| 2049 | .clkr = { |
| 2050 | .enable_reg = 0x0544, |
| 2051 | .enable_mask = BIT(0), |
| 2052 | .hw.init = &(struct clk_init_data){ |
| 2053 | .name = "gcc_sdcc3_apps_clk", |
| 2054 | .parent_names = (const char *[]){ |
| 2055 | "sdcc3_apps_clk_src", |
| 2056 | }, |
| 2057 | .num_parents = 1, |
| 2058 | .flags = CLK_SET_RATE_PARENT, |
| 2059 | .ops = &clk_branch2_ops, |
| 2060 | }, |
| 2061 | }, |
| 2062 | }; |
| 2063 | |
| 2064 | static struct clk_branch gcc_sdcc4_ahb_clk = { |
| 2065 | .halt_reg = 0x0588, |
| 2066 | .clkr = { |
| 2067 | .enable_reg = 0x0588, |
| 2068 | .enable_mask = BIT(0), |
| 2069 | .hw.init = &(struct clk_init_data){ |
| 2070 | .name = "gcc_sdcc4_ahb_clk", |
| 2071 | .parent_names = (const char *[]){ |
| 2072 | "periph_noc_clk_src", |
| 2073 | }, |
| 2074 | .num_parents = 1, |
| 2075 | .ops = &clk_branch2_ops, |
| 2076 | }, |
| 2077 | }, |
| 2078 | }; |
| 2079 | |
| 2080 | static struct clk_branch gcc_sdcc4_apps_clk = { |
| 2081 | .halt_reg = 0x0584, |
| 2082 | .clkr = { |
| 2083 | .enable_reg = 0x0584, |
| 2084 | .enable_mask = BIT(0), |
| 2085 | .hw.init = &(struct clk_init_data){ |
| 2086 | .name = "gcc_sdcc4_apps_clk", |
| 2087 | .parent_names = (const char *[]){ |
| 2088 | "sdcc4_apps_clk_src", |
| 2089 | }, |
| 2090 | .num_parents = 1, |
| 2091 | .flags = CLK_SET_RATE_PARENT, |
| 2092 | .ops = &clk_branch2_ops, |
| 2093 | }, |
| 2094 | }, |
| 2095 | }; |
| 2096 | |
| 2097 | static struct clk_branch gcc_sys_noc_usb3_axi_clk = { |
| 2098 | .halt_reg = 0x0108, |
| 2099 | .clkr = { |
| 2100 | .enable_reg = 0x0108, |
| 2101 | .enable_mask = BIT(0), |
| 2102 | .hw.init = &(struct clk_init_data){ |
| 2103 | .name = "gcc_sys_noc_usb3_axi_clk", |
| 2104 | .parent_names = (const char *[]){ |
| 2105 | "usb30_master_clk_src", |
| 2106 | }, |
| 2107 | .num_parents = 1, |
| 2108 | .flags = CLK_SET_RATE_PARENT, |
| 2109 | .ops = &clk_branch2_ops, |
| 2110 | }, |
| 2111 | }, |
| 2112 | }; |
| 2113 | |
| 2114 | static struct clk_branch gcc_tsif_ahb_clk = { |
| 2115 | .halt_reg = 0x0d84, |
| 2116 | .clkr = { |
| 2117 | .enable_reg = 0x0d84, |
| 2118 | .enable_mask = BIT(0), |
| 2119 | .hw.init = &(struct clk_init_data){ |
| 2120 | .name = "gcc_tsif_ahb_clk", |
| 2121 | .parent_names = (const char *[]){ |
| 2122 | "periph_noc_clk_src", |
| 2123 | }, |
| 2124 | .num_parents = 1, |
| 2125 | .ops = &clk_branch2_ops, |
| 2126 | }, |
| 2127 | }, |
| 2128 | }; |
| 2129 | |
| 2130 | static struct clk_branch gcc_tsif_ref_clk = { |
| 2131 | .halt_reg = 0x0d88, |
| 2132 | .clkr = { |
| 2133 | .enable_reg = 0x0d88, |
| 2134 | .enable_mask = BIT(0), |
| 2135 | .hw.init = &(struct clk_init_data){ |
| 2136 | .name = "gcc_tsif_ref_clk", |
| 2137 | .parent_names = (const char *[]){ |
| 2138 | "tsif_ref_clk_src", |
| 2139 | }, |
| 2140 | .num_parents = 1, |
| 2141 | .flags = CLK_SET_RATE_PARENT, |
| 2142 | .ops = &clk_branch2_ops, |
| 2143 | }, |
| 2144 | }, |
| 2145 | }; |
| 2146 | |
| 2147 | static struct clk_branch gcc_usb2a_phy_sleep_clk = { |
| 2148 | .halt_reg = 0x04ac, |
| 2149 | .clkr = { |
| 2150 | .enable_reg = 0x04ac, |
| 2151 | .enable_mask = BIT(0), |
| 2152 | .hw.init = &(struct clk_init_data){ |
| 2153 | .name = "gcc_usb2a_phy_sleep_clk", |
| 2154 | .parent_names = (const char *[]){ |
| 2155 | "sleep_clk_src", |
| 2156 | }, |
| 2157 | .num_parents = 1, |
| 2158 | .ops = &clk_branch2_ops, |
| 2159 | }, |
| 2160 | }, |
| 2161 | }; |
| 2162 | |
| 2163 | static struct clk_branch gcc_usb2b_phy_sleep_clk = { |
| 2164 | .halt_reg = 0x04b4, |
| 2165 | .clkr = { |
| 2166 | .enable_reg = 0x04b4, |
| 2167 | .enable_mask = BIT(0), |
| 2168 | .hw.init = &(struct clk_init_data){ |
| 2169 | .name = "gcc_usb2b_phy_sleep_clk", |
| 2170 | .parent_names = (const char *[]){ |
| 2171 | "sleep_clk_src", |
| 2172 | }, |
| 2173 | .num_parents = 1, |
| 2174 | .ops = &clk_branch2_ops, |
| 2175 | }, |
| 2176 | }, |
| 2177 | }; |
| 2178 | |
| 2179 | static struct clk_branch gcc_usb30_master_clk = { |
| 2180 | .halt_reg = 0x03c8, |
| 2181 | .clkr = { |
| 2182 | .enable_reg = 0x03c8, |
| 2183 | .enable_mask = BIT(0), |
| 2184 | .hw.init = &(struct clk_init_data){ |
| 2185 | .name = "gcc_usb30_master_clk", |
| 2186 | .parent_names = (const char *[]){ |
| 2187 | "usb30_master_clk_src", |
| 2188 | }, |
| 2189 | .num_parents = 1, |
| 2190 | .flags = CLK_SET_RATE_PARENT, |
| 2191 | .ops = &clk_branch2_ops, |
| 2192 | }, |
| 2193 | }, |
| 2194 | }; |
| 2195 | |
| 2196 | static struct clk_branch gcc_usb30_mock_utmi_clk = { |
| 2197 | .halt_reg = 0x03d0, |
| 2198 | .clkr = { |
| 2199 | .enable_reg = 0x03d0, |
| 2200 | .enable_mask = BIT(0), |
| 2201 | .hw.init = &(struct clk_init_data){ |
| 2202 | .name = "gcc_usb30_mock_utmi_clk", |
| 2203 | .parent_names = (const char *[]){ |
| 2204 | "usb30_mock_utmi_clk_src", |
| 2205 | }, |
| 2206 | .num_parents = 1, |
| 2207 | .flags = CLK_SET_RATE_PARENT, |
| 2208 | .ops = &clk_branch2_ops, |
| 2209 | }, |
| 2210 | }, |
| 2211 | }; |
| 2212 | |
| 2213 | static struct clk_branch gcc_usb30_sleep_clk = { |
| 2214 | .halt_reg = 0x03cc, |
| 2215 | .clkr = { |
| 2216 | .enable_reg = 0x03cc, |
| 2217 | .enable_mask = BIT(0), |
| 2218 | .hw.init = &(struct clk_init_data){ |
| 2219 | .name = "gcc_usb30_sleep_clk", |
| 2220 | .parent_names = (const char *[]){ |
| 2221 | "sleep_clk_src", |
| 2222 | }, |
| 2223 | .num_parents = 1, |
| 2224 | .ops = &clk_branch2_ops, |
| 2225 | }, |
| 2226 | }, |
| 2227 | }; |
| 2228 | |
| 2229 | static struct clk_branch gcc_usb_hs_ahb_clk = { |
| 2230 | .halt_reg = 0x0488, |
| 2231 | .clkr = { |
| 2232 | .enable_reg = 0x0488, |
| 2233 | .enable_mask = BIT(0), |
| 2234 | .hw.init = &(struct clk_init_data){ |
| 2235 | .name = "gcc_usb_hs_ahb_clk", |
| 2236 | .parent_names = (const char *[]){ |
| 2237 | "periph_noc_clk_src", |
| 2238 | }, |
| 2239 | .num_parents = 1, |
| 2240 | .ops = &clk_branch2_ops, |
| 2241 | }, |
| 2242 | }, |
| 2243 | }; |
| 2244 | |
| 2245 | static struct clk_branch gcc_usb_hs_system_clk = { |
| 2246 | .halt_reg = 0x0484, |
| 2247 | .clkr = { |
| 2248 | .enable_reg = 0x0484, |
| 2249 | .enable_mask = BIT(0), |
| 2250 | .hw.init = &(struct clk_init_data){ |
| 2251 | .name = "gcc_usb_hs_system_clk", |
| 2252 | .parent_names = (const char *[]){ |
| 2253 | "usb_hs_system_clk_src", |
| 2254 | }, |
| 2255 | .num_parents = 1, |
| 2256 | .flags = CLK_SET_RATE_PARENT, |
| 2257 | .ops = &clk_branch2_ops, |
| 2258 | }, |
| 2259 | }, |
| 2260 | }; |
| 2261 | |
| 2262 | static struct clk_branch gcc_usb_hsic_ahb_clk = { |
| 2263 | .halt_reg = 0x0408, |
| 2264 | .clkr = { |
| 2265 | .enable_reg = 0x0408, |
| 2266 | .enable_mask = BIT(0), |
| 2267 | .hw.init = &(struct clk_init_data){ |
| 2268 | .name = "gcc_usb_hsic_ahb_clk", |
| 2269 | .parent_names = (const char *[]){ |
| 2270 | "periph_noc_clk_src", |
| 2271 | }, |
| 2272 | .num_parents = 1, |
| 2273 | .ops = &clk_branch2_ops, |
| 2274 | }, |
| 2275 | }, |
| 2276 | }; |
| 2277 | |
| 2278 | static struct clk_branch gcc_usb_hsic_clk = { |
| 2279 | .halt_reg = 0x0410, |
| 2280 | .clkr = { |
| 2281 | .enable_reg = 0x0410, |
| 2282 | .enable_mask = BIT(0), |
| 2283 | .hw.init = &(struct clk_init_data){ |
| 2284 | .name = "gcc_usb_hsic_clk", |
| 2285 | .parent_names = (const char *[]){ |
| 2286 | "usb_hsic_clk_src", |
| 2287 | }, |
| 2288 | .num_parents = 1, |
| 2289 | .flags = CLK_SET_RATE_PARENT, |
| 2290 | .ops = &clk_branch2_ops, |
| 2291 | }, |
| 2292 | }, |
| 2293 | }; |
| 2294 | |
| 2295 | static struct clk_branch gcc_usb_hsic_io_cal_clk = { |
| 2296 | .halt_reg = 0x0414, |
| 2297 | .clkr = { |
| 2298 | .enable_reg = 0x0414, |
| 2299 | .enable_mask = BIT(0), |
| 2300 | .hw.init = &(struct clk_init_data){ |
| 2301 | .name = "gcc_usb_hsic_io_cal_clk", |
| 2302 | .parent_names = (const char *[]){ |
| 2303 | "usb_hsic_io_cal_clk_src", |
| 2304 | }, |
| 2305 | .num_parents = 1, |
| 2306 | .flags = CLK_SET_RATE_PARENT, |
| 2307 | .ops = &clk_branch2_ops, |
| 2308 | }, |
| 2309 | }, |
| 2310 | }; |
| 2311 | |
| 2312 | static struct clk_branch gcc_usb_hsic_io_cal_sleep_clk = { |
| 2313 | .halt_reg = 0x0418, |
| 2314 | .clkr = { |
| 2315 | .enable_reg = 0x0418, |
| 2316 | .enable_mask = BIT(0), |
| 2317 | .hw.init = &(struct clk_init_data){ |
| 2318 | .name = "gcc_usb_hsic_io_cal_sleep_clk", |
| 2319 | .parent_names = (const char *[]){ |
| 2320 | "sleep_clk_src", |
| 2321 | }, |
| 2322 | .num_parents = 1, |
| 2323 | .ops = &clk_branch2_ops, |
| 2324 | }, |
| 2325 | }, |
| 2326 | }; |
| 2327 | |
| 2328 | static struct clk_branch gcc_usb_hsic_system_clk = { |
| 2329 | .halt_reg = 0x040c, |
| 2330 | .clkr = { |
| 2331 | .enable_reg = 0x040c, |
| 2332 | .enable_mask = BIT(0), |
| 2333 | .hw.init = &(struct clk_init_data){ |
| 2334 | .name = "gcc_usb_hsic_system_clk", |
| 2335 | .parent_names = (const char *[]){ |
| 2336 | "usb_hsic_system_clk_src", |
| 2337 | }, |
| 2338 | .num_parents = 1, |
| 2339 | .flags = CLK_SET_RATE_PARENT, |
| 2340 | .ops = &clk_branch2_ops, |
| 2341 | }, |
| 2342 | }, |
| 2343 | }; |
| 2344 | |
| 2345 | static struct clk_regmap *gcc_msm8974_clocks[] = { |
| 2346 | [GPLL0] = &gpll0.clkr, |
| 2347 | [GPLL0_VOTE] = &gpll0_vote, |
| 2348 | [CONFIG_NOC_CLK_SRC] = &config_noc_clk_src.clkr, |
| 2349 | [PERIPH_NOC_CLK_SRC] = &periph_noc_clk_src.clkr, |
| 2350 | [SYSTEM_NOC_CLK_SRC] = &system_noc_clk_src.clkr, |
| 2351 | [GPLL1] = &gpll1.clkr, |
| 2352 | [GPLL1_VOTE] = &gpll1_vote, |
| 2353 | [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr, |
| 2354 | [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr, |
| 2355 | [BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr, |
| 2356 | [BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr, |
| 2357 | [BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr, |
| 2358 | [BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr, |
| 2359 | [BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr, |
| 2360 | [BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr, |
| 2361 | [BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr, |
| 2362 | [BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr, |
| 2363 | [BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr, |
| 2364 | [BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr, |
| 2365 | [BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr, |
| 2366 | [BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr, |
| 2367 | [BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr, |
| 2368 | [BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr, |
| 2369 | [BLSP1_UART4_APPS_CLK_SRC] = &blsp1_uart4_apps_clk_src.clkr, |
| 2370 | [BLSP1_UART5_APPS_CLK_SRC] = &blsp1_uart5_apps_clk_src.clkr, |
| 2371 | [BLSP1_UART6_APPS_CLK_SRC] = &blsp1_uart6_apps_clk_src.clkr, |
| 2372 | [BLSP2_QUP1_I2C_APPS_CLK_SRC] = &blsp2_qup1_i2c_apps_clk_src.clkr, |
| 2373 | [BLSP2_QUP1_SPI_APPS_CLK_SRC] = &blsp2_qup1_spi_apps_clk_src.clkr, |
| 2374 | [BLSP2_QUP2_I2C_APPS_CLK_SRC] = &blsp2_qup2_i2c_apps_clk_src.clkr, |
| 2375 | [BLSP2_QUP2_SPI_APPS_CLK_SRC] = &blsp2_qup2_spi_apps_clk_src.clkr, |
| 2376 | [BLSP2_QUP3_I2C_APPS_CLK_SRC] = &blsp2_qup3_i2c_apps_clk_src.clkr, |
| 2377 | [BLSP2_QUP3_SPI_APPS_CLK_SRC] = &blsp2_qup3_spi_apps_clk_src.clkr, |
| 2378 | [BLSP2_QUP4_I2C_APPS_CLK_SRC] = &blsp2_qup4_i2c_apps_clk_src.clkr, |
| 2379 | [BLSP2_QUP4_SPI_APPS_CLK_SRC] = &blsp2_qup4_spi_apps_clk_src.clkr, |
| 2380 | [BLSP2_QUP5_I2C_APPS_CLK_SRC] = &blsp2_qup5_i2c_apps_clk_src.clkr, |
| 2381 | [BLSP2_QUP5_SPI_APPS_CLK_SRC] = &blsp2_qup5_spi_apps_clk_src.clkr, |
| 2382 | [BLSP2_QUP6_I2C_APPS_CLK_SRC] = &blsp2_qup6_i2c_apps_clk_src.clkr, |
| 2383 | [BLSP2_QUP6_SPI_APPS_CLK_SRC] = &blsp2_qup6_spi_apps_clk_src.clkr, |
| 2384 | [BLSP2_UART1_APPS_CLK_SRC] = &blsp2_uart1_apps_clk_src.clkr, |
| 2385 | [BLSP2_UART2_APPS_CLK_SRC] = &blsp2_uart2_apps_clk_src.clkr, |
| 2386 | [BLSP2_UART3_APPS_CLK_SRC] = &blsp2_uart3_apps_clk_src.clkr, |
| 2387 | [BLSP2_UART4_APPS_CLK_SRC] = &blsp2_uart4_apps_clk_src.clkr, |
| 2388 | [BLSP2_UART5_APPS_CLK_SRC] = &blsp2_uart5_apps_clk_src.clkr, |
| 2389 | [BLSP2_UART6_APPS_CLK_SRC] = &blsp2_uart6_apps_clk_src.clkr, |
| 2390 | [CE1_CLK_SRC] = &ce1_clk_src.clkr, |
| 2391 | [CE2_CLK_SRC] = &ce2_clk_src.clkr, |
| 2392 | [GP1_CLK_SRC] = &gp1_clk_src.clkr, |
| 2393 | [GP2_CLK_SRC] = &gp2_clk_src.clkr, |
| 2394 | [GP3_CLK_SRC] = &gp3_clk_src.clkr, |
| 2395 | [PDM2_CLK_SRC] = &pdm2_clk_src.clkr, |
| 2396 | [SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr, |
| 2397 | [SDCC2_APPS_CLK_SRC] = &sdcc2_apps_clk_src.clkr, |
| 2398 | [SDCC3_APPS_CLK_SRC] = &sdcc3_apps_clk_src.clkr, |
| 2399 | [SDCC4_APPS_CLK_SRC] = &sdcc4_apps_clk_src.clkr, |
| 2400 | [TSIF_REF_CLK_SRC] = &tsif_ref_clk_src.clkr, |
| 2401 | [USB30_MOCK_UTMI_CLK_SRC] = &usb30_mock_utmi_clk_src.clkr, |
| 2402 | [USB_HS_SYSTEM_CLK_SRC] = &usb_hs_system_clk_src.clkr, |
| 2403 | [USB_HSIC_CLK_SRC] = &usb_hsic_clk_src.clkr, |
| 2404 | [USB_HSIC_IO_CAL_CLK_SRC] = &usb_hsic_io_cal_clk_src.clkr, |
| 2405 | [USB_HSIC_SYSTEM_CLK_SRC] = &usb_hsic_system_clk_src.clkr, |
| 2406 | [GCC_BAM_DMA_AHB_CLK] = &gcc_bam_dma_ahb_clk.clkr, |
| 2407 | [GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr, |
| 2408 | [GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr, |
| 2409 | [GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr, |
| 2410 | [GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr, |
| 2411 | [GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr, |
| 2412 | [GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr, |
| 2413 | [GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr, |
| 2414 | [GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr, |
| 2415 | [GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr, |
| 2416 | [GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr, |
| 2417 | [GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr, |
| 2418 | [GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr, |
| 2419 | [GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr, |
| 2420 | [GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr, |
| 2421 | [GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr, |
| 2422 | [GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr, |
| 2423 | [GCC_BLSP1_UART4_APPS_CLK] = &gcc_blsp1_uart4_apps_clk.clkr, |
| 2424 | [GCC_BLSP1_UART5_APPS_CLK] = &gcc_blsp1_uart5_apps_clk.clkr, |
| 2425 | [GCC_BLSP1_UART6_APPS_CLK] = &gcc_blsp1_uart6_apps_clk.clkr, |
| 2426 | [GCC_BLSP2_AHB_CLK] = &gcc_blsp2_ahb_clk.clkr, |
| 2427 | [GCC_BLSP2_QUP1_I2C_APPS_CLK] = &gcc_blsp2_qup1_i2c_apps_clk.clkr, |
| 2428 | [GCC_BLSP2_QUP1_SPI_APPS_CLK] = &gcc_blsp2_qup1_spi_apps_clk.clkr, |
| 2429 | [GCC_BLSP2_QUP2_I2C_APPS_CLK] = &gcc_blsp2_qup2_i2c_apps_clk.clkr, |
| 2430 | [GCC_BLSP2_QUP2_SPI_APPS_CLK] = &gcc_blsp2_qup2_spi_apps_clk.clkr, |
| 2431 | [GCC_BLSP2_QUP3_I2C_APPS_CLK] = &gcc_blsp2_qup3_i2c_apps_clk.clkr, |
| 2432 | [GCC_BLSP2_QUP3_SPI_APPS_CLK] = &gcc_blsp2_qup3_spi_apps_clk.clkr, |
| 2433 | [GCC_BLSP2_QUP4_I2C_APPS_CLK] = &gcc_blsp2_qup4_i2c_apps_clk.clkr, |
| 2434 | [GCC_BLSP2_QUP4_SPI_APPS_CLK] = &gcc_blsp2_qup4_spi_apps_clk.clkr, |
| 2435 | [GCC_BLSP2_QUP5_I2C_APPS_CLK] = &gcc_blsp2_qup5_i2c_apps_clk.clkr, |
| 2436 | [GCC_BLSP2_QUP5_SPI_APPS_CLK] = &gcc_blsp2_qup5_spi_apps_clk.clkr, |
| 2437 | [GCC_BLSP2_QUP6_I2C_APPS_CLK] = &gcc_blsp2_qup6_i2c_apps_clk.clkr, |
| 2438 | [GCC_BLSP2_QUP6_SPI_APPS_CLK] = &gcc_blsp2_qup6_spi_apps_clk.clkr, |
| 2439 | [GCC_BLSP2_UART1_APPS_CLK] = &gcc_blsp2_uart1_apps_clk.clkr, |
| 2440 | [GCC_BLSP2_UART2_APPS_CLK] = &gcc_blsp2_uart2_apps_clk.clkr, |
| 2441 | [GCC_BLSP2_UART3_APPS_CLK] = &gcc_blsp2_uart3_apps_clk.clkr, |
| 2442 | [GCC_BLSP2_UART4_APPS_CLK] = &gcc_blsp2_uart4_apps_clk.clkr, |
| 2443 | [GCC_BLSP2_UART5_APPS_CLK] = &gcc_blsp2_uart5_apps_clk.clkr, |
| 2444 | [GCC_BLSP2_UART6_APPS_CLK] = &gcc_blsp2_uart6_apps_clk.clkr, |
| 2445 | [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr, |
| 2446 | [GCC_CE1_AHB_CLK] = &gcc_ce1_ahb_clk.clkr, |
| 2447 | [GCC_CE1_AXI_CLK] = &gcc_ce1_axi_clk.clkr, |
| 2448 | [GCC_CE1_CLK] = &gcc_ce1_clk.clkr, |
| 2449 | [GCC_CE2_AHB_CLK] = &gcc_ce2_ahb_clk.clkr, |
| 2450 | [GCC_CE2_AXI_CLK] = &gcc_ce2_axi_clk.clkr, |
| 2451 | [GCC_CE2_CLK] = &gcc_ce2_clk.clkr, |
| 2452 | [GCC_GP1_CLK] = &gcc_gp1_clk.clkr, |
| 2453 | [GCC_GP2_CLK] = &gcc_gp2_clk.clkr, |
| 2454 | [GCC_GP3_CLK] = &gcc_gp3_clk.clkr, |
| 2455 | [GCC_LPASS_Q6_AXI_CLK] = &gcc_lpass_q6_axi_clk.clkr, |
| 2456 | [GCC_MMSS_NOC_CFG_AHB_CLK] = &gcc_mmss_noc_cfg_ahb_clk.clkr, |
| 2457 | [GCC_OCMEM_NOC_CFG_AHB_CLK] = &gcc_ocmem_noc_cfg_ahb_clk.clkr, |
| 2458 | [GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr, |
| 2459 | [GCC_MSS_Q6_BIMC_AXI_CLK] = &gcc_mss_q6_bimc_axi_clk.clkr, |
| 2460 | [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr, |
| 2461 | [GCC_PDM_AHB_CLK] = &gcc_pdm_ahb_clk.clkr, |
| 2462 | [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr, |
| 2463 | [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr, |
| 2464 | [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr, |
| 2465 | [GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr, |
| 2466 | [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr, |
| 2467 | [GCC_SDCC3_AHB_CLK] = &gcc_sdcc3_ahb_clk.clkr, |
| 2468 | [GCC_SDCC3_APPS_CLK] = &gcc_sdcc3_apps_clk.clkr, |
| 2469 | [GCC_SDCC4_AHB_CLK] = &gcc_sdcc4_ahb_clk.clkr, |
| 2470 | [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr, |
| 2471 | [GCC_SYS_NOC_USB3_AXI_CLK] = &gcc_sys_noc_usb3_axi_clk.clkr, |
| 2472 | [GCC_TSIF_AHB_CLK] = &gcc_tsif_ahb_clk.clkr, |
| 2473 | [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr, |
| 2474 | [GCC_USB2A_PHY_SLEEP_CLK] = &gcc_usb2a_phy_sleep_clk.clkr, |
| 2475 | [GCC_USB2B_PHY_SLEEP_CLK] = &gcc_usb2b_phy_sleep_clk.clkr, |
| 2476 | [GCC_USB30_MASTER_CLK] = &gcc_usb30_master_clk.clkr, |
| 2477 | [GCC_USB30_MOCK_UTMI_CLK] = &gcc_usb30_mock_utmi_clk.clkr, |
| 2478 | [GCC_USB30_SLEEP_CLK] = &gcc_usb30_sleep_clk.clkr, |
| 2479 | [GCC_USB_HS_AHB_CLK] = &gcc_usb_hs_ahb_clk.clkr, |
| 2480 | [GCC_USB_HS_SYSTEM_CLK] = &gcc_usb_hs_system_clk.clkr, |
| 2481 | [GCC_USB_HSIC_AHB_CLK] = &gcc_usb_hsic_ahb_clk.clkr, |
| 2482 | [GCC_USB_HSIC_CLK] = &gcc_usb_hsic_clk.clkr, |
| 2483 | [GCC_USB_HSIC_IO_CAL_CLK] = &gcc_usb_hsic_io_cal_clk.clkr, |
| 2484 | [GCC_USB_HSIC_IO_CAL_SLEEP_CLK] = &gcc_usb_hsic_io_cal_sleep_clk.clkr, |
| 2485 | [GCC_USB_HSIC_SYSTEM_CLK] = &gcc_usb_hsic_system_clk.clkr, |
| 2486 | [GCC_MMSS_GPLL0_CLK_SRC] = &gcc_mmss_gpll0_clk_src, |
| 2487 | }; |
| 2488 | |
| 2489 | static const struct qcom_reset_map gcc_msm8974_resets[] = { |
| 2490 | [GCC_SYSTEM_NOC_BCR] = { 0x0100 }, |
| 2491 | [GCC_CONFIG_NOC_BCR] = { 0x0140 }, |
| 2492 | [GCC_PERIPH_NOC_BCR] = { 0x0180 }, |
| 2493 | [GCC_IMEM_BCR] = { 0x0200 }, |
| 2494 | [GCC_MMSS_BCR] = { 0x0240 }, |
| 2495 | [GCC_QDSS_BCR] = { 0x0300 }, |
| 2496 | [GCC_USB_30_BCR] = { 0x03c0 }, |
| 2497 | [GCC_USB3_PHY_BCR] = { 0x03fc }, |
| 2498 | [GCC_USB_HS_HSIC_BCR] = { 0x0400 }, |
| 2499 | [GCC_USB_HS_BCR] = { 0x0480 }, |
| 2500 | [GCC_USB2A_PHY_BCR] = { 0x04a8 }, |
| 2501 | [GCC_USB2B_PHY_BCR] = { 0x04b0 }, |
| 2502 | [GCC_SDCC1_BCR] = { 0x04c0 }, |
| 2503 | [GCC_SDCC2_BCR] = { 0x0500 }, |
| 2504 | [GCC_SDCC3_BCR] = { 0x0540 }, |
| 2505 | [GCC_SDCC4_BCR] = { 0x0580 }, |
| 2506 | [GCC_BLSP1_BCR] = { 0x05c0 }, |
| 2507 | [GCC_BLSP1_QUP1_BCR] = { 0x0640 }, |
| 2508 | [GCC_BLSP1_UART1_BCR] = { 0x0680 }, |
| 2509 | [GCC_BLSP1_QUP2_BCR] = { 0x06c0 }, |
| 2510 | [GCC_BLSP1_UART2_BCR] = { 0x0700 }, |
| 2511 | [GCC_BLSP1_QUP3_BCR] = { 0x0740 }, |
| 2512 | [GCC_BLSP1_UART3_BCR] = { 0x0780 }, |
| 2513 | [GCC_BLSP1_QUP4_BCR] = { 0x07c0 }, |
| 2514 | [GCC_BLSP1_UART4_BCR] = { 0x0800 }, |
| 2515 | [GCC_BLSP1_QUP5_BCR] = { 0x0840 }, |
| 2516 | [GCC_BLSP1_UART5_BCR] = { 0x0880 }, |
| 2517 | [GCC_BLSP1_QUP6_BCR] = { 0x08c0 }, |
| 2518 | [GCC_BLSP1_UART6_BCR] = { 0x0900 }, |
| 2519 | [GCC_BLSP2_BCR] = { 0x0940 }, |
| 2520 | [GCC_BLSP2_QUP1_BCR] = { 0x0980 }, |
| 2521 | [GCC_BLSP2_UART1_BCR] = { 0x09c0 }, |
| 2522 | [GCC_BLSP2_QUP2_BCR] = { 0x0a00 }, |
| 2523 | [GCC_BLSP2_UART2_BCR] = { 0x0a40 }, |
| 2524 | [GCC_BLSP2_QUP3_BCR] = { 0x0a80 }, |
| 2525 | [GCC_BLSP2_UART3_BCR] = { 0x0ac0 }, |
| 2526 | [GCC_BLSP2_QUP4_BCR] = { 0x0b00 }, |
| 2527 | [GCC_BLSP2_UART4_BCR] = { 0x0b40 }, |
| 2528 | [GCC_BLSP2_QUP5_BCR] = { 0x0b80 }, |
| 2529 | [GCC_BLSP2_UART5_BCR] = { 0x0bc0 }, |
| 2530 | [GCC_BLSP2_QUP6_BCR] = { 0x0c00 }, |
| 2531 | [GCC_BLSP2_UART6_BCR] = { 0x0c40 }, |
| 2532 | [GCC_PDM_BCR] = { 0x0cc0 }, |
| 2533 | [GCC_BAM_DMA_BCR] = { 0x0d40 }, |
| 2534 | [GCC_TSIF_BCR] = { 0x0d80 }, |
| 2535 | [GCC_TCSR_BCR] = { 0x0dc0 }, |
| 2536 | [GCC_BOOT_ROM_BCR] = { 0x0e00 }, |
| 2537 | [GCC_MSG_RAM_BCR] = { 0x0e40 }, |
| 2538 | [GCC_TLMM_BCR] = { 0x0e80 }, |
| 2539 | [GCC_MPM_BCR] = { 0x0ec0 }, |
| 2540 | [GCC_SEC_CTRL_BCR] = { 0x0f40 }, |
| 2541 | [GCC_SPMI_BCR] = { 0x0fc0 }, |
| 2542 | [GCC_SPDM_BCR] = { 0x1000 }, |
| 2543 | [GCC_CE1_BCR] = { 0x1040 }, |
| 2544 | [GCC_CE2_BCR] = { 0x1080 }, |
| 2545 | [GCC_BIMC_BCR] = { 0x1100 }, |
| 2546 | [GCC_MPM_NON_AHB_RESET] = { 0x0ec4, 2 }, |
| 2547 | [GCC_MPM_AHB_RESET] = { 0x0ec4, 1 }, |
| 2548 | [GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x1240 }, |
| 2549 | [GCC_SNOC_BUS_TIMEOUT2_BCR] = { 0x1248 }, |
| 2550 | [GCC_PNOC_BUS_TIMEOUT0_BCR] = { 0x1280 }, |
| 2551 | [GCC_PNOC_BUS_TIMEOUT1_BCR] = { 0x1288 }, |
| 2552 | [GCC_PNOC_BUS_TIMEOUT2_BCR] = { 0x1290 }, |
| 2553 | [GCC_PNOC_BUS_TIMEOUT3_BCR] = { 0x1298 }, |
| 2554 | [GCC_PNOC_BUS_TIMEOUT4_BCR] = { 0x12a0 }, |
| 2555 | [GCC_CNOC_BUS_TIMEOUT0_BCR] = { 0x12c0 }, |
| 2556 | [GCC_CNOC_BUS_TIMEOUT1_BCR] = { 0x12c8 }, |
| 2557 | [GCC_CNOC_BUS_TIMEOUT2_BCR] = { 0x12d0 }, |
| 2558 | [GCC_CNOC_BUS_TIMEOUT3_BCR] = { 0x12d8 }, |
| 2559 | [GCC_CNOC_BUS_TIMEOUT4_BCR] = { 0x12e0 }, |
| 2560 | [GCC_CNOC_BUS_TIMEOUT5_BCR] = { 0x12e8 }, |
| 2561 | [GCC_CNOC_BUS_TIMEOUT6_BCR] = { 0x12f0 }, |
| 2562 | [GCC_DEHR_BCR] = { 0x1300 }, |
| 2563 | [GCC_RBCPR_BCR] = { 0x1380 }, |
| 2564 | [GCC_MSS_RESTART] = { 0x1680 }, |
| 2565 | [GCC_LPASS_RESTART] = { 0x16c0 }, |
| 2566 | [GCC_WCSS_RESTART] = { 0x1700 }, |
| 2567 | [GCC_VENUS_RESTART] = { 0x1740 }, |
| 2568 | }; |
| 2569 | |
| 2570 | static const struct regmap_config gcc_msm8974_regmap_config = { |
| 2571 | .reg_bits = 32, |
| 2572 | .reg_stride = 4, |
| 2573 | .val_bits = 32, |
| 2574 | .max_register = 0x1fc0, |
| 2575 | .fast_io = true, |
| 2576 | }; |
| 2577 | |
Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 2578 | static const struct qcom_cc_desc gcc_msm8974_desc = { |
| 2579 | .config = &gcc_msm8974_regmap_config, |
| 2580 | .clks = gcc_msm8974_clocks, |
| 2581 | .num_clks = ARRAY_SIZE(gcc_msm8974_clocks), |
| 2582 | .resets = gcc_msm8974_resets, |
| 2583 | .num_resets = ARRAY_SIZE(gcc_msm8974_resets), |
| 2584 | }; |
| 2585 | |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 2586 | static const struct of_device_id gcc_msm8974_match_table[] = { |
| 2587 | { .compatible = "qcom,gcc-msm8974" }, |
| 2588 | { } |
| 2589 | }; |
| 2590 | MODULE_DEVICE_TABLE(of, gcc_msm8974_match_table); |
| 2591 | |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 2592 | static int gcc_msm8974_probe(struct platform_device *pdev) |
| 2593 | { |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 2594 | struct clk *clk; |
Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 2595 | struct device *dev = &pdev->dev; |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 2596 | |
| 2597 | /* Temporary until RPM clocks supported */ |
| 2598 | clk = clk_register_fixed_rate(dev, "xo", NULL, CLK_IS_ROOT, 19200000); |
| 2599 | if (IS_ERR(clk)) |
| 2600 | return PTR_ERR(clk); |
| 2601 | |
| 2602 | /* Should move to DT node? */ |
| 2603 | clk = clk_register_fixed_rate(dev, "sleep_clk_src", NULL, |
| 2604 | CLK_IS_ROOT, 32768); |
| 2605 | if (IS_ERR(clk)) |
| 2606 | return PTR_ERR(clk); |
| 2607 | |
Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 2608 | return qcom_cc_probe(pdev, &gcc_msm8974_desc); |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 2609 | } |
| 2610 | |
| 2611 | static int gcc_msm8974_remove(struct platform_device *pdev) |
| 2612 | { |
Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 2613 | qcom_cc_remove(pdev); |
Stephen Boyd | d33faa9 | 2014-01-15 10:47:30 -0800 | [diff] [blame] | 2614 | return 0; |
| 2615 | } |
| 2616 | |
| 2617 | static struct platform_driver gcc_msm8974_driver = { |
| 2618 | .probe = gcc_msm8974_probe, |
| 2619 | .remove = gcc_msm8974_remove, |
| 2620 | .driver = { |
| 2621 | .name = "gcc-msm8974", |
| 2622 | .owner = THIS_MODULE, |
| 2623 | .of_match_table = gcc_msm8974_match_table, |
| 2624 | }, |
| 2625 | }; |
| 2626 | |
| 2627 | static int __init gcc_msm8974_init(void) |
| 2628 | { |
| 2629 | return platform_driver_register(&gcc_msm8974_driver); |
| 2630 | } |
| 2631 | core_initcall(gcc_msm8974_init); |
| 2632 | |
| 2633 | static void __exit gcc_msm8974_exit(void) |
| 2634 | { |
| 2635 | platform_driver_unregister(&gcc_msm8974_driver); |
| 2636 | } |
| 2637 | module_exit(gcc_msm8974_exit); |
| 2638 | |
| 2639 | MODULE_DESCRIPTION("QCOM GCC MSM8974 Driver"); |
| 2640 | MODULE_LICENSE("GPL v2"); |
| 2641 | MODULE_ALIAS("platform:gcc-msm8974"); |