1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. 4 */ 5 6 #include <linux/clk-provider.h> 7 #include <linux/module.h> 8 #include <linux/platform_device.h> 9 #include <linux/regmap.h> 10 11 #include <dt-bindings/clock/qcom,hawi-camcc.h> 12 13 #include "clk-alpha-pll.h" 14 #include "clk-branch.h" 15 #include "clk-pll.h" 16 #include "clk-rcg.h" 17 #include "clk-regmap.h" 18 #include "clk-regmap-divider.h" 19 #include "clk-regmap-mux.h" 20 #include "common.h" 21 #include "gdsc.h" 22 #include "reset.h" 23 24 enum { 25 DT_AHB_CLK, 26 DT_BI_TCXO, 27 DT_BI_TCXO_AO, 28 DT_SLEEP_CLK, 29 }; 30 31 /* Need to match the order of interconnects in DT binding */ 32 enum { 33 DT_ICC_TOP_GDSC, 34 }; 35 36 enum { 37 P_BI_TCXO, 38 P_CAM_CC_PLL0_OUT_EVEN, 39 P_CAM_CC_PLL0_OUT_MAIN, 40 P_CAM_CC_PLL0_OUT_ODD, 41 P_CAM_CC_PLL1_OUT_EVEN, 42 P_CAM_CC_PLL2_OUT_EVEN, 43 P_CAM_CC_PLL3_OUT_EVEN, 44 P_CAM_CC_PLL4_OUT_EVEN, 45 P_CAM_CC_PLL5_OUT_EVEN, 46 P_CAM_CC_PLL6_OUT_EVEN, 47 P_CAM_CC_PLL6_OUT_MAIN, 48 P_CAM_CC_PLL6_OUT_ODD, 49 P_CAM_CC_PLL7_OUT_EVEN, 50 P_CAM_CC_PLL7_OUT_MAIN, 51 P_CAM_CC_PLL8_OUT_EVEN, 52 }; 53 54 static const struct pll_vco taycan_eha_t_vco[] = { 55 { 249600000, 2500000000, 0 }, 56 }; 57 58 /* 1200.0 MHz Configuration */ 59 static const struct alpha_pll_config cam_cc_pll0_config = { 60 .l = 0x3e, 61 .alpha = 0x8000, 62 .config_ctl_val = 0xa5c400e7, 63 .config_ctl_hi_val = 0x0a8060e0, 64 .config_ctl_hi1_val = 0xf51dea20, 65 .user_ctl_val = 0x00008400, 66 .user_ctl_hi_val = 0x00000002, 67 }; 68 69 /* 1200.0 MHz Configuration */ 70 static const struct alpha_pll_config cam_cc_pll0_config_maili = { 71 .l = 0x3e, 72 .cal_l = 0x42, 73 .alpha = 0x8000, 74 .config_ctl_val = 0xa5c400e7, 75 .config_ctl_hi_val = 0x0a806160, 76 .config_ctl_hi1_val = 0xf51dea20, 77 .user_ctl_val = 0x00008400, 78 .user_ctl_hi_val = 0x00000002, 79 }; 80 81 static struct clk_alpha_pll cam_cc_pll0 = { 82 .offset = 0x0, 83 .config = &cam_cc_pll0_config, 84 .vco_table = taycan_eha_t_vco, 85 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 86 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 87 .clkr = { 88 .hw.init = &(const struct clk_init_data) { 89 .name = "cam_cc_pll0", 90 .parent_data = &(const struct clk_parent_data) { 91 .index = DT_BI_TCXO, 92 }, 93 .num_parents = 1, 94 .ops = &clk_alpha_pll_taycan_eha_t_ops, 95 }, 96 }, 97 }; 98 99 static const struct clk_div_table post_div_table_cam_cc_pll0_out_even[] = { 100 { 0x1, 2 }, 101 { } 102 }; 103 104 static struct clk_alpha_pll_postdiv cam_cc_pll0_out_even = { 105 .offset = 0x0, 106 .post_div_shift = 10, 107 .post_div_table = post_div_table_cam_cc_pll0_out_even, 108 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_even), 109 .width = 4, 110 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 111 .clkr.hw.init = &(const struct clk_init_data) { 112 .name = "cam_cc_pll0_out_even", 113 .parent_hws = (const struct clk_hw*[]) { 114 &cam_cc_pll0.clkr.hw, 115 }, 116 .num_parents = 1, 117 .flags = CLK_SET_RATE_PARENT, 118 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 119 }, 120 }; 121 122 static const struct clk_div_table post_div_table_cam_cc_pll0_out_odd[] = { 123 { 0x2, 3 }, 124 { } 125 }; 126 127 static struct clk_alpha_pll_postdiv cam_cc_pll0_out_odd = { 128 .offset = 0x0, 129 .post_div_shift = 14, 130 .post_div_table = post_div_table_cam_cc_pll0_out_odd, 131 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_odd), 132 .width = 4, 133 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 134 .clkr.hw.init = &(const struct clk_init_data) { 135 .name = "cam_cc_pll0_out_odd", 136 .parent_hws = (const struct clk_hw*[]) { 137 &cam_cc_pll0.clkr.hw, 138 }, 139 .num_parents = 1, 140 .flags = CLK_SET_RATE_PARENT, 141 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 142 }, 143 }; 144 145 /* 493.2 MHz Configuration */ 146 static const struct alpha_pll_config cam_cc_pll1_config = { 147 .l = 0x19, 148 .alpha = 0xb000, 149 .config_ctl_val = 0xa5c400e7, 150 .config_ctl_hi_val = 0x0a8060e0, 151 .config_ctl_hi1_val = 0xf51dea20, 152 .user_ctl_val = 0x00000400, 153 .user_ctl_hi_val = 0x00000002, 154 }; 155 156 /* 493.2 MHz Configuration */ 157 static const struct alpha_pll_config cam_cc_pll1_config_maili = { 158 .l = 0x19, 159 .cal_l = 0x42, 160 .alpha = 0xb000, 161 .config_ctl_val = 0xa5c400e7, 162 .config_ctl_hi_val = 0x0a806160, 163 .config_ctl_hi1_val = 0xf51dea20, 164 .user_ctl_val = 0x00000400, 165 .user_ctl_hi_val = 0x00000002, 166 }; 167 168 static struct clk_alpha_pll cam_cc_pll1 = { 169 .offset = 0x1000, 170 .config = &cam_cc_pll1_config, 171 .vco_table = taycan_eha_t_vco, 172 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 173 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 174 .clkr = { 175 .hw.init = &(const struct clk_init_data) { 176 .name = "cam_cc_pll1", 177 .parent_data = &(const struct clk_parent_data) { 178 .index = DT_BI_TCXO, 179 }, 180 .num_parents = 1, 181 .ops = &clk_alpha_pll_taycan_eha_t_ops, 182 }, 183 }, 184 }; 185 186 static const struct clk_div_table post_div_table_cam_cc_pll1_out_even[] = { 187 { 0x1, 2 }, 188 { } 189 }; 190 191 static struct clk_alpha_pll_postdiv cam_cc_pll1_out_even = { 192 .offset = 0x1000, 193 .post_div_shift = 10, 194 .post_div_table = post_div_table_cam_cc_pll1_out_even, 195 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll1_out_even), 196 .width = 4, 197 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 198 .clkr.hw.init = &(const struct clk_init_data) { 199 .name = "cam_cc_pll1_out_even", 200 .parent_hws = (const struct clk_hw*[]) { 201 &cam_cc_pll1.clkr.hw, 202 }, 203 .num_parents = 1, 204 .flags = CLK_SET_RATE_PARENT, 205 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 206 }, 207 }; 208 209 /* 451.2 MHz Configuration */ 210 static const struct alpha_pll_config cam_cc_pll2_config = { 211 .l = 0x17, 212 .alpha = 0x8000, 213 .config_ctl_val = 0xa5c400e7, 214 .config_ctl_hi_val = 0x0a8060e0, 215 .config_ctl_hi1_val = 0xf51dea20, 216 .user_ctl_val = 0x00000400, 217 .user_ctl_hi_val = 0x00000002, 218 }; 219 220 /* 600.0 MHz Configuration */ 221 static const struct alpha_pll_config cam_cc_pll2_config_maili = { 222 .l = 0x1f, 223 .cal_l = 0x42, 224 .alpha = 0x4000, 225 .config_ctl_val = 0xa5c400e7, 226 .config_ctl_hi_val = 0x0a806160, 227 .config_ctl_hi1_val = 0xf51dea20, 228 .user_ctl_val = 0x00000400, 229 .user_ctl_hi_val = 0x00000002, 230 }; 231 232 static struct clk_alpha_pll cam_cc_pll2 = { 233 .offset = 0x2000, 234 .config = &cam_cc_pll2_config, 235 .vco_table = taycan_eha_t_vco, 236 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 237 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 238 .clkr = { 239 .hw.init = &(const struct clk_init_data) { 240 .name = "cam_cc_pll2", 241 .parent_data = &(const struct clk_parent_data) { 242 .index = DT_BI_TCXO, 243 }, 244 .num_parents = 1, 245 .ops = &clk_alpha_pll_taycan_eha_t_ops, 246 }, 247 }, 248 }; 249 250 static const struct clk_div_table post_div_table_cam_cc_pll2_out_even[] = { 251 { 0x1, 2 }, 252 { } 253 }; 254 255 static struct clk_alpha_pll_postdiv cam_cc_pll2_out_even = { 256 .offset = 0x2000, 257 .post_div_shift = 10, 258 .post_div_table = post_div_table_cam_cc_pll2_out_even, 259 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll2_out_even), 260 .width = 4, 261 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 262 .clkr.hw.init = &(const struct clk_init_data) { 263 .name = "cam_cc_pll2_out_even", 264 .parent_hws = (const struct clk_hw*[]) { 265 &cam_cc_pll2.clkr.hw, 266 }, 267 .num_parents = 1, 268 .flags = CLK_SET_RATE_PARENT, 269 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 270 }, 271 }; 272 273 /* 476.4 MHz Configuration */ 274 static const struct alpha_pll_config cam_cc_pll3_config = { 275 .l = 0x18, 276 .alpha = 0xd000, 277 .config_ctl_val = 0xa5c400e7, 278 .config_ctl_hi_val = 0x0a8060e0, 279 .config_ctl_hi1_val = 0xf51dea20, 280 .user_ctl_val = 0x00000400, 281 .user_ctl_hi_val = 0x00000002, 282 }; 283 284 /* 476.4 MHz Configuration */ 285 static const struct alpha_pll_config cam_cc_pll3_config_maili = { 286 .l = 0x18, 287 .cal_l = 0x42, 288 .alpha = 0xd000, 289 .config_ctl_val = 0xa5c400e7, 290 .config_ctl_hi_val = 0x0a806160, 291 .config_ctl_hi1_val = 0xf51dea20, 292 .user_ctl_val = 0x00000400, 293 .user_ctl_hi_val = 0x00000002, 294 }; 295 296 static struct clk_alpha_pll cam_cc_pll3 = { 297 .offset = 0x3000, 298 .config = &cam_cc_pll3_config, 299 .vco_table = taycan_eha_t_vco, 300 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 301 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 302 .clkr = { 303 .hw.init = &(const struct clk_init_data) { 304 .name = "cam_cc_pll3", 305 .parent_data = &(const struct clk_parent_data) { 306 .index = DT_BI_TCXO, 307 }, 308 .num_parents = 1, 309 .ops = &clk_alpha_pll_taycan_eha_t_ops, 310 }, 311 }, 312 }; 313 314 static const struct clk_div_table post_div_table_cam_cc_pll3_out_even[] = { 315 { 0x1, 2 }, 316 { } 317 }; 318 319 static struct clk_alpha_pll_postdiv cam_cc_pll3_out_even = { 320 .offset = 0x3000, 321 .post_div_shift = 10, 322 .post_div_table = post_div_table_cam_cc_pll3_out_even, 323 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll3_out_even), 324 .width = 4, 325 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 326 .clkr.hw.init = &(const struct clk_init_data) { 327 .name = "cam_cc_pll3_out_even", 328 .parent_hws = (const struct clk_hw*[]) { 329 &cam_cc_pll3.clkr.hw, 330 }, 331 .num_parents = 1, 332 .flags = CLK_SET_RATE_PARENT, 333 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 334 }, 335 }; 336 337 /* 476.4 MHz Configuration */ 338 static const struct alpha_pll_config cam_cc_pll4_config = { 339 .l = 0x18, 340 .alpha = 0xd000, 341 .config_ctl_val = 0xa5c400e7, 342 .config_ctl_hi_val = 0x0a8060e0, 343 .config_ctl_hi1_val = 0xf51dea20, 344 .user_ctl_val = 0x00000400, 345 .user_ctl_hi_val = 0x00000002, 346 }; 347 348 /* 476.4 MHz Configuration */ 349 static const struct alpha_pll_config cam_cc_pll4_config_maili = { 350 .l = 0x18, 351 .cal_l = 0x42, 352 .alpha = 0xd000, 353 .config_ctl_val = 0xa5c400e7, 354 .config_ctl_hi_val = 0x0a806160, 355 .config_ctl_hi1_val = 0xf51dea20, 356 .user_ctl_val = 0x00000400, 357 .user_ctl_hi_val = 0x00000002, 358 }; 359 360 static struct clk_alpha_pll cam_cc_pll4 = { 361 .offset = 0x4000, 362 .config = &cam_cc_pll4_config, 363 .vco_table = taycan_eha_t_vco, 364 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 365 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 366 .clkr = { 367 .hw.init = &(const struct clk_init_data) { 368 .name = "cam_cc_pll4", 369 .parent_data = &(const struct clk_parent_data) { 370 .index = DT_BI_TCXO, 371 }, 372 .num_parents = 1, 373 .ops = &clk_alpha_pll_taycan_eha_t_ops, 374 }, 375 }, 376 }; 377 378 static const struct clk_div_table post_div_table_cam_cc_pll4_out_even[] = { 379 { 0x1, 2 }, 380 { } 381 }; 382 383 static struct clk_alpha_pll_postdiv cam_cc_pll4_out_even = { 384 .offset = 0x4000, 385 .post_div_shift = 10, 386 .post_div_table = post_div_table_cam_cc_pll4_out_even, 387 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll4_out_even), 388 .width = 4, 389 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 390 .clkr.hw.init = &(const struct clk_init_data) { 391 .name = "cam_cc_pll4_out_even", 392 .parent_hws = (const struct clk_hw*[]) { 393 &cam_cc_pll4.clkr.hw, 394 }, 395 .num_parents = 1, 396 .flags = CLK_SET_RATE_PARENT, 397 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 398 }, 399 }; 400 401 /* 476.4 MHz Configuration */ 402 static const struct alpha_pll_config cam_cc_pll5_config = { 403 .l = 0x18, 404 .alpha = 0xd000, 405 .config_ctl_val = 0xa5c400e7, 406 .config_ctl_hi_val = 0x0a8060e0, 407 .config_ctl_hi1_val = 0xf51dea20, 408 .user_ctl_val = 0x00000400, 409 .user_ctl_hi_val = 0x00000002, 410 }; 411 412 /* 476.4 MHz Configuration */ 413 static const struct alpha_pll_config cam_cc_pll5_config_maili = { 414 .l = 0x18, 415 .cal_l = 0x42, 416 .alpha = 0xd000, 417 .config_ctl_val = 0xa5c400e7, 418 .config_ctl_hi_val = 0x0a806160, 419 .config_ctl_hi1_val = 0xf51dea20, 420 .user_ctl_val = 0x00000400, 421 .user_ctl_hi_val = 0x00000002, 422 }; 423 424 static struct clk_alpha_pll cam_cc_pll5 = { 425 .offset = 0x5000, 426 .config = &cam_cc_pll5_config, 427 .vco_table = taycan_eha_t_vco, 428 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 429 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 430 .clkr = { 431 .hw.init = &(const struct clk_init_data) { 432 .name = "cam_cc_pll5", 433 .parent_data = &(const struct clk_parent_data) { 434 .index = DT_BI_TCXO, 435 }, 436 .num_parents = 1, 437 .ops = &clk_alpha_pll_taycan_eha_t_ops, 438 }, 439 }, 440 }; 441 442 static const struct clk_div_table post_div_table_cam_cc_pll5_out_even[] = { 443 { 0x1, 2 }, 444 { } 445 }; 446 447 static struct clk_alpha_pll_postdiv cam_cc_pll5_out_even = { 448 .offset = 0x5000, 449 .post_div_shift = 10, 450 .post_div_table = post_div_table_cam_cc_pll5_out_even, 451 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll5_out_even), 452 .width = 4, 453 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 454 .clkr.hw.init = &(const struct clk_init_data) { 455 .name = "cam_cc_pll5_out_even", 456 .parent_hws = (const struct clk_hw*[]) { 457 &cam_cc_pll5.clkr.hw, 458 }, 459 .num_parents = 1, 460 .flags = CLK_SET_RATE_PARENT, 461 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 462 }, 463 }; 464 465 /* 960.0 MHz Configuration */ 466 static const struct alpha_pll_config cam_cc_pll6_config = { 467 .l = 0x32, 468 .alpha = 0x0, 469 .config_ctl_val = 0xa5c400e7, 470 .config_ctl_hi_val = 0x0a8060e0, 471 .config_ctl_hi1_val = 0xf51dea20, 472 .user_ctl_val = 0x00008400, 473 .user_ctl_hi_val = 0x00000002, 474 }; 475 476 /* 960.0 MHz Configuration */ 477 static const struct alpha_pll_config cam_cc_pll6_config_maili = { 478 .l = 0x32, 479 .cal_l = 0x42, 480 .alpha = 0x0, 481 .config_ctl_val = 0xa5c400e7, 482 .config_ctl_hi_val = 0x0a806160, 483 .config_ctl_hi1_val = 0xf51dea20, 484 .user_ctl_val = 0x00008400, 485 .user_ctl_hi_val = 0x00000002, 486 }; 487 488 static struct clk_alpha_pll cam_cc_pll6 = { 489 .offset = 0x6000, 490 .config = &cam_cc_pll6_config, 491 .vco_table = taycan_eha_t_vco, 492 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 493 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 494 .clkr = { 495 .hw.init = &(const struct clk_init_data) { 496 .name = "cam_cc_pll6", 497 .parent_data = &(const struct clk_parent_data) { 498 .index = DT_BI_TCXO, 499 }, 500 .num_parents = 1, 501 .ops = &clk_alpha_pll_taycan_eha_t_ops, 502 }, 503 }, 504 }; 505 506 static const struct clk_div_table post_div_table_cam_cc_pll6_out_even[] = { 507 { 0x1, 2 }, 508 { } 509 }; 510 511 static struct clk_alpha_pll_postdiv cam_cc_pll6_out_even = { 512 .offset = 0x6000, 513 .post_div_shift = 10, 514 .post_div_table = post_div_table_cam_cc_pll6_out_even, 515 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_even), 516 .width = 4, 517 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 518 .clkr.hw.init = &(const struct clk_init_data) { 519 .name = "cam_cc_pll6_out_even", 520 .parent_hws = (const struct clk_hw*[]) { 521 &cam_cc_pll6.clkr.hw, 522 }, 523 .num_parents = 1, 524 .flags = CLK_SET_RATE_PARENT, 525 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 526 }, 527 }; 528 529 static const struct clk_div_table post_div_table_cam_cc_pll6_out_odd[] = { 530 { 0x2, 3 }, 531 { } 532 }; 533 534 static struct clk_alpha_pll_postdiv cam_cc_pll6_out_odd = { 535 .offset = 0x6000, 536 .post_div_shift = 14, 537 .post_div_table = post_div_table_cam_cc_pll6_out_odd, 538 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_odd), 539 .width = 4, 540 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 541 .clkr.hw.init = &(const struct clk_init_data) { 542 .name = "cam_cc_pll6_out_odd", 543 .parent_hws = (const struct clk_hw*[]) { 544 &cam_cc_pll6.clkr.hw, 545 }, 546 .num_parents = 1, 547 .flags = CLK_SET_RATE_PARENT, 548 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 549 }, 550 }; 551 552 /* 345.0 MHz Configuration */ 553 static const struct alpha_pll_config cam_cc_pll7_config = { 554 .l = 0x11, 555 .alpha = 0xf800, 556 .config_ctl_val = 0xa5c400e7, 557 .config_ctl_hi_val = 0x0a8060e0, 558 .config_ctl_hi1_val = 0xf51dea20, 559 .user_ctl_val = 0x00000000, 560 .user_ctl_hi_val = 0x00000002, 561 }; 562 563 /* 345.0 MHz Configuration */ 564 static const struct alpha_pll_config cam_cc_pll7_config_maili = { 565 .l = 0x11, 566 .cal_l = 0x42, 567 .alpha = 0xf800, 568 .config_ctl_val = 0xa5c400e7, 569 .config_ctl_hi_val = 0x0a806160, 570 .config_ctl_hi1_val = 0xf51dea20, 571 .user_ctl_val = 0x00000000, 572 .user_ctl_hi_val = 0x00000002, 573 }; 574 575 static struct clk_alpha_pll cam_cc_pll7 = { 576 .offset = 0x7000, 577 .config = &cam_cc_pll7_config, 578 .vco_table = taycan_eha_t_vco, 579 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 580 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 581 .clkr = { 582 .hw.init = &(const struct clk_init_data) { 583 .name = "cam_cc_pll7", 584 .parent_data = &(const struct clk_parent_data) { 585 .index = DT_BI_TCXO, 586 }, 587 .num_parents = 1, 588 .ops = &clk_alpha_pll_taycan_eha_t_ops, 589 }, 590 }, 591 }; 592 593 /* 493.2 MHz Configuration */ 594 static const struct alpha_pll_config cam_cc_pll8_config = { 595 .l = 0x19, 596 .alpha = 0xb000, 597 .config_ctl_val = 0xa5c400e7, 598 .config_ctl_hi_val = 0x0a8060e0, 599 .config_ctl_hi1_val = 0xf51dea20, 600 .user_ctl_val = 0x00000400, 601 .user_ctl_hi_val = 0x00000002, 602 }; 603 604 /* 493.2 MHz Configuration */ 605 static const struct alpha_pll_config cam_cc_pll8_config_maili = { 606 .l = 0x19, 607 .cal_l = 0x42, 608 .alpha = 0xb000, 609 .config_ctl_val = 0xa5c400e7, 610 .config_ctl_hi_val = 0x0a806160, 611 .config_ctl_hi1_val = 0xf51dea20, 612 .user_ctl_val = 0x00000400, 613 .user_ctl_hi_val = 0x00000002, 614 }; 615 616 static struct clk_alpha_pll cam_cc_pll8 = { 617 .offset = 0x8000, 618 .config = &cam_cc_pll8_config, 619 .vco_table = taycan_eha_t_vco, 620 .num_vco = ARRAY_SIZE(taycan_eha_t_vco), 621 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 622 .clkr = { 623 .hw.init = &(const struct clk_init_data) { 624 .name = "cam_cc_pll8", 625 .parent_data = &(const struct clk_parent_data) { 626 .index = DT_BI_TCXO, 627 }, 628 .num_parents = 1, 629 .ops = &clk_alpha_pll_taycan_eha_t_ops, 630 }, 631 }, 632 }; 633 634 static const struct clk_div_table post_div_table_cam_cc_pll8_out_even[] = { 635 { 0x1, 2 }, 636 { } 637 }; 638 639 static struct clk_alpha_pll_postdiv cam_cc_pll8_out_even = { 640 .offset = 0x8000, 641 .post_div_shift = 10, 642 .post_div_table = post_div_table_cam_cc_pll8_out_even, 643 .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll8_out_even), 644 .width = 4, 645 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_TAYCAN_EHA_T], 646 .clkr.hw.init = &(const struct clk_init_data) { 647 .name = "cam_cc_pll8_out_even", 648 .parent_hws = (const struct clk_hw*[]) { 649 &cam_cc_pll8.clkr.hw, 650 }, 651 .num_parents = 1, 652 .flags = CLK_SET_RATE_PARENT, 653 .ops = &clk_alpha_pll_postdiv_taycan_eha_t_ops, 654 }, 655 }; 656 657 static const struct parent_map cam_cc_parent_map_0[] = { 658 { P_BI_TCXO, 0 }, 659 { P_CAM_CC_PLL0_OUT_MAIN, 1 }, 660 { P_CAM_CC_PLL0_OUT_EVEN, 2 }, 661 { P_CAM_CC_PLL0_OUT_ODD, 3 }, 662 { P_CAM_CC_PLL6_OUT_ODD, 4 }, 663 { P_CAM_CC_PLL6_OUT_EVEN, 5 }, 664 { P_CAM_CC_PLL6_OUT_MAIN, 6 }, 665 }; 666 667 static const struct clk_parent_data cam_cc_parent_data_0[] = { 668 { .index = DT_BI_TCXO }, 669 { .hw = &cam_cc_pll0.clkr.hw }, 670 { .hw = &cam_cc_pll0_out_even.clkr.hw }, 671 { .hw = &cam_cc_pll0_out_odd.clkr.hw }, 672 { .hw = &cam_cc_pll6_out_odd.clkr.hw }, 673 { .hw = &cam_cc_pll6_out_even.clkr.hw }, 674 { .hw = &cam_cc_pll6.clkr.hw }, 675 }; 676 677 static const struct parent_map cam_cc_parent_map_1[] = { 678 { P_BI_TCXO, 0 }, 679 { P_CAM_CC_PLL0_OUT_MAIN, 1 }, 680 { P_CAM_CC_PLL0_OUT_EVEN, 2 }, 681 { P_CAM_CC_PLL0_OUT_ODD, 3 }, 682 { P_CAM_CC_PLL6_OUT_ODD, 4 }, 683 { P_CAM_CC_PLL6_OUT_EVEN, 5 }, 684 { P_CAM_CC_PLL6_OUT_MAIN, 6 }, 685 }; 686 687 static const struct clk_parent_data cam_cc_parent_data_1[] = { 688 { .index = DT_BI_TCXO }, 689 { .hw = &cam_cc_pll0.clkr.hw }, 690 { .hw = &cam_cc_pll0_out_even.clkr.hw }, 691 { .hw = &cam_cc_pll0_out_odd.clkr.hw }, 692 { .hw = &cam_cc_pll6_out_odd.clkr.hw }, 693 { .hw = &cam_cc_pll6_out_even.clkr.hw }, 694 { .hw = &cam_cc_pll6.clkr.hw }, 695 }; 696 697 static const struct parent_map cam_cc_parent_map_2[] = { 698 { P_BI_TCXO, 0 }, 699 { P_CAM_CC_PLL0_OUT_MAIN, 1 }, 700 { P_CAM_CC_PLL0_OUT_EVEN, 2 }, 701 { P_CAM_CC_PLL0_OUT_ODD, 3 }, 702 { P_CAM_CC_PLL7_OUT_EVEN, 5 }, 703 { P_CAM_CC_PLL7_OUT_MAIN, 6 }, 704 }; 705 706 static const struct clk_parent_data cam_cc_parent_data_2[] = { 707 { .index = DT_BI_TCXO }, 708 { .hw = &cam_cc_pll0.clkr.hw }, 709 { .hw = &cam_cc_pll0_out_even.clkr.hw }, 710 { .hw = &cam_cc_pll0_out_odd.clkr.hw }, 711 { .hw = &cam_cc_pll7.clkr.hw }, 712 { .hw = &cam_cc_pll7.clkr.hw }, 713 }; 714 715 static const struct parent_map cam_cc_parent_map_3[] = { 716 { P_BI_TCXO, 0 }, 717 { P_CAM_CC_PLL1_OUT_EVEN, 4 }, 718 }; 719 720 static const struct clk_parent_data cam_cc_parent_data_3[] = { 721 { .index = DT_BI_TCXO }, 722 { .hw = &cam_cc_pll1_out_even.clkr.hw }, 723 }; 724 725 static const struct parent_map cam_cc_parent_map_4[] = { 726 { P_BI_TCXO, 0 }, 727 { P_CAM_CC_PLL2_OUT_EVEN, 5 }, 728 }; 729 730 static const struct clk_parent_data cam_cc_parent_data_4[] = { 731 { .index = DT_BI_TCXO }, 732 { .hw = &cam_cc_pll2_out_even.clkr.hw }, 733 }; 734 735 static const struct parent_map cam_cc_parent_map_5[] = { 736 { P_BI_TCXO, 0 }, 737 { P_CAM_CC_PLL8_OUT_EVEN, 4 }, 738 }; 739 740 static const struct clk_parent_data cam_cc_parent_data_5[] = { 741 { .index = DT_BI_TCXO }, 742 { .hw = &cam_cc_pll8_out_even.clkr.hw }, 743 }; 744 745 static const struct parent_map cam_cc_parent_map_6[] = { 746 { P_BI_TCXO, 0 }, 747 { P_CAM_CC_PLL3_OUT_EVEN, 6 }, 748 }; 749 750 static const struct clk_parent_data cam_cc_parent_data_6[] = { 751 { .index = DT_BI_TCXO }, 752 { .hw = &cam_cc_pll3_out_even.clkr.hw }, 753 }; 754 755 static const struct parent_map cam_cc_parent_map_7[] = { 756 { P_BI_TCXO, 0 }, 757 { P_CAM_CC_PLL4_OUT_EVEN, 6 }, 758 }; 759 760 static const struct clk_parent_data cam_cc_parent_data_7[] = { 761 { .index = DT_BI_TCXO }, 762 { .hw = &cam_cc_pll4_out_even.clkr.hw }, 763 }; 764 765 static const struct parent_map cam_cc_parent_map_8[] = { 766 { P_BI_TCXO, 0 }, 767 { P_CAM_CC_PLL5_OUT_EVEN, 6 }, 768 }; 769 770 static const struct clk_parent_data cam_cc_parent_data_8[] = { 771 { .index = DT_BI_TCXO }, 772 { .hw = &cam_cc_pll5_out_even.clkr.hw }, 773 }; 774 775 static const struct parent_map cam_cc_parent_map_9[] = { 776 { P_BI_TCXO, 0 }, 777 }; 778 779 static const struct clk_parent_data cam_cc_parent_data_9[] = { 780 { .index = DT_BI_TCXO }, 781 }; 782 783 static const struct freq_tbl ftbl_cam_cc_camnoc_rt_axi_clk_src[] = { 784 F(19200000, P_BI_TCXO, 1, 0, 0), 785 F(120000000, P_CAM_CC_PLL6_OUT_EVEN, 4, 0, 0), 786 F(160000000, P_CAM_CC_PLL6_OUT_EVEN, 3, 0, 0), 787 F(240000000, P_CAM_CC_PLL6_OUT_EVEN, 2, 0, 0), 788 F(320000000, P_CAM_CC_PLL6_OUT_EVEN, 1.5, 0, 0), 789 F(480000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), 790 { } 791 }; 792 793 static const struct freq_tbl ftbl_cam_cc_camnoc_rt_axi_clk_src_maili[] = { 794 F(19200000, P_BI_TCXO, 1, 0, 0), 795 F(200000000, P_CAM_CC_PLL0_OUT_MAIN, 6, 0, 0), 796 F(240000000, P_CAM_CC_PLL0_OUT_MAIN, 5, 0, 0), 797 F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), 798 F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), 799 F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), 800 F(600000000, P_CAM_CC_PLL0_OUT_MAIN, 2, 0, 0), 801 { } 802 }; 803 804 static struct clk_rcg2 cam_cc_camnoc_rt_axi_clk_src = { 805 .cmd_rcgr = 0x212cc, 806 .mnd_width = 0, 807 .hid_width = 5, 808 .parent_map = cam_cc_parent_map_1, 809 .freq_tbl = ftbl_cam_cc_camnoc_rt_axi_clk_src, 810 .hw_clk_ctrl = true, 811 .clkr.hw.init = &(const struct clk_init_data) { 812 .name = "cam_cc_camnoc_rt_axi_clk_src", 813 .parent_data = cam_cc_parent_data_1, 814 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 815 .flags = CLK_SET_RATE_PARENT, 816 .ops = &clk_rcg2_shared_ops, 817 }, 818 }; 819 820 static const struct freq_tbl ftbl_cam_cc_cci_0_clk_src[] = { 821 F(37500000, P_CAM_CC_PLL0_OUT_ODD, 1, 3, 32), 822 { } 823 }; 824 825 static const struct freq_tbl ftbl_cam_cc_cci_0_clk_src_maili[] = { 826 F(37500000, P_CAM_CC_PLL0_OUT_EVEN, 16, 0, 0), 827 { } 828 }; 829 830 static struct clk_rcg2 cam_cc_cci_0_clk_src = { 831 .cmd_rcgr = 0x21250, 832 .mnd_width = 8, 833 .hid_width = 5, 834 .parent_map = cam_cc_parent_map_1, 835 .freq_tbl = ftbl_cam_cc_cci_0_clk_src, 836 .hw_clk_ctrl = true, 837 .clkr.hw.init = &(const struct clk_init_data) { 838 .name = "cam_cc_cci_0_clk_src", 839 .parent_data = cam_cc_parent_data_1, 840 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 841 .flags = CLK_SET_RATE_PARENT, 842 .ops = &clk_rcg2_shared_ops, 843 }, 844 }; 845 846 static struct clk_rcg2 cam_cc_cci_1_clk_src = { 847 .cmd_rcgr = 0x2126c, 848 .mnd_width = 8, 849 .hid_width = 5, 850 .parent_map = cam_cc_parent_map_1, 851 .freq_tbl = ftbl_cam_cc_cci_0_clk_src, 852 .hw_clk_ctrl = true, 853 .clkr.hw.init = &(const struct clk_init_data) { 854 .name = "cam_cc_cci_1_clk_src", 855 .parent_data = cam_cc_parent_data_1, 856 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 857 .flags = CLK_SET_RATE_PARENT, 858 .ops = &clk_rcg2_shared_ops, 859 }, 860 }; 861 862 static struct clk_rcg2 cam_cc_cci_2_clk_src = { 863 .cmd_rcgr = 0x21288, 864 .mnd_width = 8, 865 .hid_width = 5, 866 .parent_map = cam_cc_parent_map_1, 867 .freq_tbl = ftbl_cam_cc_cci_0_clk_src, 868 .hw_clk_ctrl = true, 869 .clkr.hw.init = &(const struct clk_init_data) { 870 .name = "cam_cc_cci_2_clk_src", 871 .parent_data = cam_cc_parent_data_1, 872 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 873 .flags = CLK_SET_RATE_PARENT, 874 .ops = &clk_rcg2_shared_ops, 875 }, 876 }; 877 878 static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = { 879 F(200000000, P_CAM_CC_PLL0_OUT_MAIN, 6, 0, 0), 880 F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), 881 F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), 882 { } 883 }; 884 885 static struct clk_rcg2 cam_cc_cphy_rx_clk_src = { 886 .cmd_rcgr = 0x21064, 887 .mnd_width = 0, 888 .hid_width = 5, 889 .parent_map = cam_cc_parent_map_0, 890 .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src, 891 .hw_clk_ctrl = true, 892 .clkr.hw.init = &(const struct clk_init_data) { 893 .name = "cam_cc_cphy_rx_clk_src", 894 .parent_data = cam_cc_parent_data_0, 895 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 896 .flags = CLK_SET_RATE_PARENT, 897 .ops = &clk_rcg2_shared_ops, 898 }, 899 }; 900 901 static const struct freq_tbl ftbl_cam_cc_cre_clk_src[] = { 902 F(80000000, P_CAM_CC_PLL6_OUT_EVEN, 6, 0, 0), 903 F(137142857, P_CAM_CC_PLL6_OUT_EVEN, 3.5, 0, 0), 904 F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0), 905 F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), 906 F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), 907 F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), 908 { } 909 }; 910 911 static struct clk_rcg2 cam_cc_cre_clk_src = { 912 .cmd_rcgr = 0x211a0, 913 .mnd_width = 0, 914 .hid_width = 5, 915 .parent_map = cam_cc_parent_map_1, 916 .freq_tbl = ftbl_cam_cc_cre_clk_src, 917 .hw_clk_ctrl = true, 918 .clkr.hw.init = &(const struct clk_init_data) { 919 .name = "cam_cc_cre_clk_src", 920 .parent_data = cam_cc_parent_data_1, 921 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 922 .flags = CLK_SET_RATE_PARENT, 923 .ops = &clk_rcg2_shared_ops, 924 }, 925 }; 926 927 static const struct freq_tbl ftbl_cam_cc_csi0phytimer_clk_src[] = { 928 F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), 929 { } 930 }; 931 932 static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = { 933 .cmd_rcgr = 0x20000, 934 .mnd_width = 0, 935 .hid_width = 5, 936 .parent_map = cam_cc_parent_map_0, 937 .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 938 .hw_clk_ctrl = true, 939 .clkr.hw.init = &(const struct clk_init_data) { 940 .name = "cam_cc_csi0phytimer_clk_src", 941 .parent_data = cam_cc_parent_data_0, 942 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 943 .flags = CLK_SET_RATE_PARENT, 944 .ops = &clk_rcg2_shared_ops, 945 }, 946 }; 947 948 static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = { 949 .cmd_rcgr = 0x20024, 950 .mnd_width = 0, 951 .hid_width = 5, 952 .parent_map = cam_cc_parent_map_0, 953 .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 954 .hw_clk_ctrl = true, 955 .clkr.hw.init = &(const struct clk_init_data) { 956 .name = "cam_cc_csi1phytimer_clk_src", 957 .parent_data = cam_cc_parent_data_0, 958 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 959 .flags = CLK_SET_RATE_PARENT, 960 .ops = &clk_rcg2_shared_ops, 961 }, 962 }; 963 964 static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = { 965 .cmd_rcgr = 0x20044, 966 .mnd_width = 0, 967 .hid_width = 5, 968 .parent_map = cam_cc_parent_map_0, 969 .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 970 .hw_clk_ctrl = true, 971 .clkr.hw.init = &(const struct clk_init_data) { 972 .name = "cam_cc_csi2phytimer_clk_src", 973 .parent_data = cam_cc_parent_data_0, 974 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 975 .flags = CLK_SET_RATE_PARENT, 976 .ops = &clk_rcg2_shared_ops, 977 }, 978 }; 979 980 static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = { 981 .cmd_rcgr = 0x20064, 982 .mnd_width = 0, 983 .hid_width = 5, 984 .parent_map = cam_cc_parent_map_0, 985 .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 986 .hw_clk_ctrl = true, 987 .clkr.hw.init = &(const struct clk_init_data) { 988 .name = "cam_cc_csi3phytimer_clk_src", 989 .parent_data = cam_cc_parent_data_0, 990 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 991 .flags = CLK_SET_RATE_PARENT, 992 .ops = &clk_rcg2_shared_ops, 993 }, 994 }; 995 996 static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = { 997 .cmd_rcgr = 0x20084, 998 .mnd_width = 0, 999 .hid_width = 5, 1000 .parent_map = cam_cc_parent_map_0, 1001 .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1002 .hw_clk_ctrl = true, 1003 .clkr.hw.init = &(const struct clk_init_data) { 1004 .name = "cam_cc_csi4phytimer_clk_src", 1005 .parent_data = cam_cc_parent_data_0, 1006 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1007 .flags = CLK_SET_RATE_PARENT, 1008 .ops = &clk_rcg2_shared_ops, 1009 }, 1010 }; 1011 1012 static struct clk_rcg2 cam_cc_csi5phytimer_clk_src = { 1013 .cmd_rcgr = 0x200a4, 1014 .mnd_width = 0, 1015 .hid_width = 5, 1016 .parent_map = cam_cc_parent_map_0, 1017 .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1018 .hw_clk_ctrl = true, 1019 .clkr.hw.init = &(const struct clk_init_data) { 1020 .name = "cam_cc_csi5phytimer_clk_src", 1021 .parent_data = cam_cc_parent_data_0, 1022 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1023 .flags = CLK_SET_RATE_PARENT, 1024 .ops = &clk_rcg2_shared_ops, 1025 }, 1026 }; 1027 1028 static struct clk_rcg2 cam_cc_csid_clk_src = { 1029 .cmd_rcgr = 0x212a4, 1030 .mnd_width = 0, 1031 .hid_width = 5, 1032 .parent_map = cam_cc_parent_map_0, 1033 .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src, 1034 .hw_clk_ctrl = true, 1035 .clkr.hw.init = &(const struct clk_init_data) { 1036 .name = "cam_cc_csid_clk_src", 1037 .parent_data = cam_cc_parent_data_0, 1038 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1039 .flags = CLK_SET_RATE_PARENT, 1040 .ops = &clk_rcg2_shared_ops, 1041 }, 1042 }; 1043 1044 static const struct freq_tbl ftbl_cam_cc_fast_ahb_clk_src[] = { 1045 F(128000000, P_CAM_CC_PLL6_OUT_ODD, 2.5, 0, 0), 1046 F(213333333, P_CAM_CC_PLL6_OUT_ODD, 1.5, 0, 0), 1047 F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0), 1048 F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), 1049 { } 1050 }; 1051 1052 static struct clk_rcg2 cam_cc_fast_ahb_clk_src = { 1053 .cmd_rcgr = 0x200dc, 1054 .mnd_width = 0, 1055 .hid_width = 5, 1056 .parent_map = cam_cc_parent_map_1, 1057 .freq_tbl = ftbl_cam_cc_fast_ahb_clk_src, 1058 .hw_clk_ctrl = true, 1059 .clkr.hw.init = &(const struct clk_init_data) { 1060 .name = "cam_cc_fast_ahb_clk_src", 1061 .parent_data = cam_cc_parent_data_1, 1062 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1063 .flags = CLK_SET_RATE_PARENT, 1064 .ops = &clk_rcg2_shared_ops, 1065 }, 1066 }; 1067 1068 static const struct freq_tbl ftbl_cam_cc_icp_0_clk_src[] = { 1069 F(345000000, P_CAM_CC_PLL7_OUT_MAIN, 1, 0, 0), 1070 F(500000000, P_CAM_CC_PLL7_OUT_MAIN, 1, 0, 0), 1071 F(600000000, P_CAM_CC_PLL7_OUT_MAIN, 1, 0, 0), 1072 F(770000000, P_CAM_CC_PLL7_OUT_MAIN, 1, 0, 0), 1073 F(900000000, P_CAM_CC_PLL7_OUT_MAIN, 1, 0, 0), 1074 F(1150000000, P_CAM_CC_PLL7_OUT_MAIN, 1, 0, 0), 1075 { } 1076 }; 1077 1078 static struct clk_rcg2 cam_cc_icp_0_clk_src = { 1079 .cmd_rcgr = 0x211f8, 1080 .mnd_width = 0, 1081 .hid_width = 5, 1082 .parent_map = cam_cc_parent_map_2, 1083 .freq_tbl = ftbl_cam_cc_icp_0_clk_src, 1084 .hw_clk_ctrl = true, 1085 .clkr.hw.init = &(const struct clk_init_data) { 1086 .name = "cam_cc_icp_0_clk_src", 1087 .parent_data = cam_cc_parent_data_2, 1088 .num_parents = ARRAY_SIZE(cam_cc_parent_data_2), 1089 .flags = CLK_SET_RATE_PARENT, 1090 .ops = &clk_rcg2_shared_ops, 1091 }, 1092 }; 1093 1094 static struct clk_rcg2 cam_cc_icp_1_clk_src = { 1095 .cmd_rcgr = 0x21220, 1096 .mnd_width = 0, 1097 .hid_width = 5, 1098 .parent_map = cam_cc_parent_map_2, 1099 .freq_tbl = ftbl_cam_cc_icp_0_clk_src, 1100 .hw_clk_ctrl = true, 1101 .clkr.hw.init = &(const struct clk_init_data) { 1102 .name = "cam_cc_icp_1_clk_src", 1103 .parent_data = cam_cc_parent_data_2, 1104 .num_parents = ARRAY_SIZE(cam_cc_parent_data_2), 1105 .flags = CLK_SET_RATE_PARENT, 1106 .ops = &clk_rcg2_shared_ops, 1107 }, 1108 }; 1109 1110 static const struct freq_tbl ftbl_cam_cc_ife_lite_clk_src[] = { 1111 F(200000000, P_CAM_CC_PLL0_OUT_MAIN, 6, 0, 0), 1112 F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), 1113 F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), 1114 { } 1115 }; 1116 1117 static struct clk_rcg2 cam_cc_ife_lite_clk_src = { 1118 .cmd_rcgr = 0x21144, 1119 .mnd_width = 0, 1120 .hid_width = 5, 1121 .parent_map = cam_cc_parent_map_0, 1122 .freq_tbl = ftbl_cam_cc_ife_lite_clk_src, 1123 .hw_clk_ctrl = true, 1124 .clkr.hw.init = &(const struct clk_init_data) { 1125 .name = "cam_cc_ife_lite_clk_src", 1126 .parent_data = cam_cc_parent_data_0, 1127 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1128 .flags = CLK_SET_RATE_PARENT, 1129 .ops = &clk_rcg2_shared_ops, 1130 }, 1131 }; 1132 1133 static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = { 1134 .cmd_rcgr = 0x21170, 1135 .mnd_width = 0, 1136 .hid_width = 5, 1137 .parent_map = cam_cc_parent_map_0, 1138 .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src, 1139 .hw_clk_ctrl = true, 1140 .clkr.hw.init = &(const struct clk_init_data) { 1141 .name = "cam_cc_ife_lite_csid_clk_src", 1142 .parent_data = cam_cc_parent_data_0, 1143 .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1144 .flags = CLK_SET_RATE_PARENT, 1145 .ops = &clk_rcg2_shared_ops, 1146 }, 1147 }; 1148 1149 static const struct freq_tbl ftbl_cam_cc_ipe_nps_clk_src[] = { 1150 F(246600000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1151 F(411000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1152 F(475000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1153 F(575000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1154 F(675000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1155 F(825000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1156 { } 1157 }; 1158 1159 static struct clk_rcg2 cam_cc_ipe_nps_clk_src = { 1160 .cmd_rcgr = 0x2019c, 1161 .mnd_width = 0, 1162 .hid_width = 5, 1163 .parent_map = cam_cc_parent_map_3, 1164 .freq_tbl = ftbl_cam_cc_ipe_nps_clk_src, 1165 .hw_clk_ctrl = true, 1166 .clkr.hw.init = &(const struct clk_init_data) { 1167 .name = "cam_cc_ipe_nps_clk_src", 1168 .parent_data = cam_cc_parent_data_3, 1169 .num_parents = ARRAY_SIZE(cam_cc_parent_data_3), 1170 .flags = CLK_SET_RATE_PARENT, 1171 .ops = &clk_rcg2_shared_ops, 1172 }, 1173 }; 1174 1175 static struct clk_rcg2 cam_cc_jpeg_clk_src = { 1176 .cmd_rcgr = 0x211c4, 1177 .mnd_width = 0, 1178 .hid_width = 5, 1179 .parent_map = cam_cc_parent_map_1, 1180 .freq_tbl = ftbl_cam_cc_cre_clk_src, 1181 .hw_clk_ctrl = true, 1182 .clkr.hw.init = &(const struct clk_init_data) { 1183 .name = "cam_cc_jpeg_clk_src", 1184 .parent_data = cam_cc_parent_data_1, 1185 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1186 .flags = CLK_SET_RATE_PARENT, 1187 .ops = &clk_rcg2_shared_ops, 1188 }, 1189 }; 1190 1191 static const struct freq_tbl ftbl_cam_cc_ofe_clk_src[] = { 1192 F(225600000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1193 F(300000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1194 F(376000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1195 F(445000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1196 F(500000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1197 F(609000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1198 F(688000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1199 F(841000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1200 { } 1201 }; 1202 1203 static const struct freq_tbl ftbl_cam_cc_ofe_clk_src_maili[] = { 1204 F(300000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1205 F(376000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1206 F(445000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1207 F(500000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1208 F(609000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1209 F(688000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1210 F(841000000, P_CAM_CC_PLL2_OUT_EVEN, 1, 0, 0), 1211 { } 1212 }; 1213 1214 static struct clk_rcg2 cam_cc_ofe_clk_src = { 1215 .cmd_rcgr = 0x20120, 1216 .mnd_width = 0, 1217 .hid_width = 5, 1218 .parent_map = cam_cc_parent_map_4, 1219 .freq_tbl = ftbl_cam_cc_ofe_clk_src, 1220 .hw_clk_ctrl = true, 1221 .clkr.hw.init = &(const struct clk_init_data) { 1222 .name = "cam_cc_ofe_clk_src", 1223 .parent_data = cam_cc_parent_data_4, 1224 .num_parents = ARRAY_SIZE(cam_cc_parent_data_4), 1225 .flags = CLK_SET_RATE_PARENT, 1226 .ops = &clk_rcg2_shared_ops, 1227 }, 1228 }; 1229 1230 static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = { 1231 F(40000000, P_CAM_CC_PLL6_OUT_ODD, 8, 0, 0), 1232 F(60000000, P_CAM_CC_PLL0_OUT_EVEN, 10, 0, 0), 1233 F(120000000, P_CAM_CC_PLL0_OUT_EVEN, 5, 0, 0), 1234 F(240000000, P_CAM_CC_PLL0_OUT_MAIN, 5, 0, 0), 1235 { } 1236 }; 1237 1238 static struct clk_rcg2 cam_cc_qdss_debug_clk_src = { 1239 .cmd_rcgr = 0x21310, 1240 .mnd_width = 0, 1241 .hid_width = 5, 1242 .parent_map = cam_cc_parent_map_1, 1243 .freq_tbl = ftbl_cam_cc_qdss_debug_clk_src, 1244 .hw_clk_ctrl = true, 1245 .clkr.hw.init = &(const struct clk_init_data) { 1246 .name = "cam_cc_qdss_debug_clk_src", 1247 .parent_data = cam_cc_parent_data_1, 1248 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1249 .flags = CLK_SET_RATE_PARENT, 1250 .ops = &clk_rcg2_shared_ops, 1251 }, 1252 }; 1253 1254 static const struct freq_tbl ftbl_cam_cc_slow_ahb_clk_src[] = { 1255 F(56470588, P_CAM_CC_PLL6_OUT_EVEN, 8.5, 0, 0), 1256 F(80000000, P_CAM_CC_PLL0_OUT_EVEN, 7.5, 0, 0), 1257 { } 1258 }; 1259 1260 static struct clk_rcg2 cam_cc_slow_ahb_clk_src = { 1261 .cmd_rcgr = 0x20104, 1262 .mnd_width = 0, 1263 .hid_width = 5, 1264 .parent_map = cam_cc_parent_map_1, 1265 .freq_tbl = ftbl_cam_cc_slow_ahb_clk_src, 1266 .hw_clk_ctrl = true, 1267 .clkr.hw.init = &(const struct clk_init_data) { 1268 .name = "cam_cc_slow_ahb_clk_src", 1269 .parent_data = cam_cc_parent_data_1, 1270 .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1271 .flags = CLK_SET_RATE_PARENT, 1272 .ops = &clk_rcg2_shared_ops, 1273 }, 1274 }; 1275 1276 static const struct freq_tbl ftbl_cam_cc_sqpf_clk_src[] = { 1277 F(246600000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 1278 F(411000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 1279 F(475000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 1280 F(575000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 1281 F(675000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 1282 F(825000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 1283 { } 1284 }; 1285 1286 static struct clk_rcg2 cam_cc_sqpf_clk_src = { 1287 .cmd_rcgr = 0x2021c, 1288 .mnd_width = 0, 1289 .hid_width = 5, 1290 .parent_map = cam_cc_parent_map_5, 1291 .freq_tbl = ftbl_cam_cc_sqpf_clk_src, 1292 .hw_clk_ctrl = true, 1293 .clkr.hw.init = &(const struct clk_init_data) { 1294 .name = "cam_cc_sqpf_clk_src", 1295 .parent_data = cam_cc_parent_data_5, 1296 .num_parents = ARRAY_SIZE(cam_cc_parent_data_5), 1297 .flags = CLK_SET_RATE_PARENT, 1298 .ops = &clk_rcg2_shared_ops, 1299 }, 1300 }; 1301 1302 static const struct freq_tbl ftbl_cam_cc_tfe_0_clk_src[] = { 1303 F(238200000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1304 F(397000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1305 F(440000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1306 F(480000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1307 F(630000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1308 F(750000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1309 F(833000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1310 { } 1311 }; 1312 1313 static struct clk_rcg2 cam_cc_tfe_0_clk_src = { 1314 .cmd_rcgr = 0x21018, 1315 .mnd_width = 0, 1316 .hid_width = 5, 1317 .parent_map = cam_cc_parent_map_6, 1318 .freq_tbl = ftbl_cam_cc_tfe_0_clk_src, 1319 .hw_clk_ctrl = true, 1320 .clkr.hw.init = &(const struct clk_init_data) { 1321 .name = "cam_cc_tfe_0_clk_src", 1322 .parent_data = cam_cc_parent_data_6, 1323 .num_parents = ARRAY_SIZE(cam_cc_parent_data_6), 1324 .flags = CLK_SET_RATE_PARENT, 1325 .ops = &clk_rcg2_shared_ops, 1326 }, 1327 }; 1328 1329 static const struct freq_tbl ftbl_cam_cc_tfe_1_clk_src[] = { 1330 F(238200000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1331 F(397000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1332 F(440000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1333 F(480000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1334 F(630000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1335 F(750000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1336 F(833000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1337 { } 1338 }; 1339 1340 static struct clk_rcg2 cam_cc_tfe_1_clk_src = { 1341 .cmd_rcgr = 0x21094, 1342 .mnd_width = 0, 1343 .hid_width = 5, 1344 .parent_map = cam_cc_parent_map_7, 1345 .freq_tbl = ftbl_cam_cc_tfe_1_clk_src, 1346 .hw_clk_ctrl = true, 1347 .clkr.hw.init = &(const struct clk_init_data) { 1348 .name = "cam_cc_tfe_1_clk_src", 1349 .parent_data = cam_cc_parent_data_7, 1350 .num_parents = ARRAY_SIZE(cam_cc_parent_data_7), 1351 .flags = CLK_SET_RATE_PARENT, 1352 .ops = &clk_rcg2_shared_ops, 1353 }, 1354 }; 1355 1356 static const struct freq_tbl ftbl_cam_cc_tfe_2_clk_src[] = { 1357 F(238200000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1358 F(397000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1359 F(440000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1360 F(480000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1361 F(630000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1362 F(750000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1363 F(833000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1364 { } 1365 }; 1366 1367 static struct clk_rcg2 cam_cc_tfe_2_clk_src = { 1368 .cmd_rcgr = 0x210f8, 1369 .mnd_width = 0, 1370 .hid_width = 5, 1371 .parent_map = cam_cc_parent_map_8, 1372 .freq_tbl = ftbl_cam_cc_tfe_2_clk_src, 1373 .hw_clk_ctrl = true, 1374 .clkr.hw.init = &(const struct clk_init_data) { 1375 .name = "cam_cc_tfe_2_clk_src", 1376 .parent_data = cam_cc_parent_data_8, 1377 .num_parents = ARRAY_SIZE(cam_cc_parent_data_8), 1378 .flags = CLK_SET_RATE_PARENT, 1379 .ops = &clk_rcg2_shared_ops, 1380 }, 1381 }; 1382 1383 static const struct freq_tbl ftbl_cam_cc_xo_clk_src[] = { 1384 F(19200000, P_BI_TCXO, 1, 0, 0), 1385 { } 1386 }; 1387 1388 static struct clk_rcg2 cam_cc_xo_clk_src = { 1389 .cmd_rcgr = 0x21348, 1390 .mnd_width = 0, 1391 .hid_width = 5, 1392 .parent_map = cam_cc_parent_map_9, 1393 .freq_tbl = ftbl_cam_cc_xo_clk_src, 1394 .hw_clk_ctrl = true, 1395 .clkr.hw.init = &(const struct clk_init_data) { 1396 .name = "cam_cc_xo_clk_src", 1397 .parent_data = cam_cc_parent_data_9, 1398 .num_parents = ARRAY_SIZE(cam_cc_parent_data_9), 1399 .flags = CLK_SET_RATE_PARENT, 1400 .ops = &clk_rcg2_shared_ops, 1401 }, 1402 }; 1403 1404 static struct clk_branch cam_cc_cam_top_ahb_clk = { 1405 .halt_reg = 0x21378, 1406 .halt_check = BRANCH_HALT, 1407 .clkr = { 1408 .enable_reg = 0x21378, 1409 .enable_mask = BIT(0), 1410 .hw.init = &(const struct clk_init_data) { 1411 .name = "cam_cc_cam_top_ahb_clk", 1412 .parent_hws = (const struct clk_hw*[]) { 1413 &cam_cc_slow_ahb_clk_src.clkr.hw, 1414 }, 1415 .num_parents = 1, 1416 .flags = CLK_SET_RATE_PARENT, 1417 .ops = &clk_branch2_ops, 1418 }, 1419 }, 1420 }; 1421 1422 static struct clk_branch cam_cc_cam_top_fast_ahb_clk = { 1423 .halt_reg = 0x21368, 1424 .halt_check = BRANCH_HALT, 1425 .clkr = { 1426 .enable_reg = 0x21368, 1427 .enable_mask = BIT(0), 1428 .hw.init = &(const struct clk_init_data) { 1429 .name = "cam_cc_cam_top_fast_ahb_clk", 1430 .parent_hws = (const struct clk_hw*[]) { 1431 &cam_cc_fast_ahb_clk_src.clkr.hw, 1432 }, 1433 .num_parents = 1, 1434 .flags = CLK_SET_RATE_PARENT, 1435 .ops = &clk_branch2_ops, 1436 }, 1437 }, 1438 }; 1439 1440 static struct clk_branch cam_cc_camnoc_nrt_axi_clk = { 1441 .halt_reg = 0x212f8, 1442 .halt_check = BRANCH_HALT, 1443 .clkr = { 1444 .enable_reg = 0x212f8, 1445 .enable_mask = BIT(0), 1446 .hw.init = &(const struct clk_init_data) { 1447 .name = "cam_cc_camnoc_nrt_axi_clk", 1448 .parent_hws = (const struct clk_hw*[]) { 1449 &cam_cc_camnoc_rt_axi_clk_src.clkr.hw, 1450 }, 1451 .num_parents = 1, 1452 .flags = CLK_SET_RATE_PARENT, 1453 .ops = &clk_branch2_ops, 1454 }, 1455 }, 1456 }; 1457 1458 static struct clk_branch cam_cc_camnoc_nrt_cre_clk = { 1459 .halt_reg = 0x211bc, 1460 .halt_check = BRANCH_HALT, 1461 .clkr = { 1462 .enable_reg = 0x211bc, 1463 .enable_mask = BIT(0), 1464 .hw.init = &(const struct clk_init_data) { 1465 .name = "cam_cc_camnoc_nrt_cre_clk", 1466 .parent_hws = (const struct clk_hw*[]) { 1467 &cam_cc_cre_clk_src.clkr.hw, 1468 }, 1469 .num_parents = 1, 1470 .flags = CLK_SET_RATE_PARENT, 1471 .ops = &clk_branch2_ops, 1472 }, 1473 }, 1474 }; 1475 1476 static struct clk_branch cam_cc_camnoc_nrt_ipe_nps_clk = { 1477 .halt_reg = 0x201c4, 1478 .halt_check = BRANCH_HALT, 1479 .clkr = { 1480 .enable_reg = 0x201c4, 1481 .enable_mask = BIT(0), 1482 .hw.init = &(const struct clk_init_data) { 1483 .name = "cam_cc_camnoc_nrt_ipe_nps_clk", 1484 .parent_hws = (const struct clk_hw*[]) { 1485 &cam_cc_ipe_nps_clk_src.clkr.hw, 1486 }, 1487 .num_parents = 1, 1488 .flags = CLK_SET_RATE_PARENT, 1489 .ops = &clk_branch2_ops, 1490 }, 1491 }, 1492 }; 1493 1494 static struct clk_branch cam_cc_camnoc_nrt_ipe_scalers_clk = { 1495 .halt_reg = 0x201e8, 1496 .halt_check = BRANCH_HALT, 1497 .clkr = { 1498 .enable_reg = 0x201e8, 1499 .enable_mask = BIT(0), 1500 .hw.init = &(const struct clk_init_data) { 1501 .name = "cam_cc_camnoc_nrt_ipe_scalers_clk", 1502 .parent_hws = (const struct clk_hw*[]) { 1503 &cam_cc_ipe_nps_clk_src.clkr.hw, 1504 }, 1505 .num_parents = 1, 1506 .flags = CLK_SET_RATE_PARENT, 1507 .ops = &clk_branch2_ops, 1508 }, 1509 }, 1510 }; 1511 1512 static struct clk_branch cam_cc_camnoc_nrt_ofe_main_clk = { 1513 .halt_reg = 0x20148, 1514 .halt_check = BRANCH_HALT, 1515 .clkr = { 1516 .enable_reg = 0x20148, 1517 .enable_mask = BIT(0), 1518 .hw.init = &(const struct clk_init_data) { 1519 .name = "cam_cc_camnoc_nrt_ofe_main_clk", 1520 .parent_hws = (const struct clk_hw*[]) { 1521 &cam_cc_ofe_clk_src.clkr.hw, 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 cam_cc_camnoc_nrt_sqpf_clk = { 1531 .halt_reg = 0x20244, 1532 .halt_check = BRANCH_HALT, 1533 .clkr = { 1534 .enable_reg = 0x20244, 1535 .enable_mask = BIT(0), 1536 .hw.init = &(const struct clk_init_data) { 1537 .name = "cam_cc_camnoc_nrt_sqpf_clk", 1538 .parent_hws = (const struct clk_hw*[]) { 1539 &cam_cc_sqpf_clk_src.clkr.hw, 1540 }, 1541 .num_parents = 1, 1542 .flags = CLK_SET_RATE_PARENT, 1543 .ops = &clk_branch2_ops, 1544 }, 1545 }, 1546 }; 1547 1548 static struct clk_branch cam_cc_camnoc_rt_axi_clk = { 1549 .halt_reg = 0x212e4, 1550 .halt_check = BRANCH_HALT, 1551 .clkr = { 1552 .enable_reg = 0x212e4, 1553 .enable_mask = BIT(0), 1554 .hw.init = &(const struct clk_init_data) { 1555 .name = "cam_cc_camnoc_rt_axi_clk", 1556 .parent_hws = (const struct clk_hw*[]) { 1557 &cam_cc_camnoc_rt_axi_clk_src.clkr.hw, 1558 }, 1559 .num_parents = 1, 1560 .flags = CLK_SET_RATE_PARENT, 1561 .ops = &clk_branch2_ops, 1562 }, 1563 }, 1564 }; 1565 1566 static struct clk_branch cam_cc_camnoc_rt_ife_lite_clk = { 1567 .halt_reg = 0x2116c, 1568 .halt_check = BRANCH_HALT, 1569 .clkr = { 1570 .enable_reg = 0x2116c, 1571 .enable_mask = BIT(0), 1572 .hw.init = &(const struct clk_init_data) { 1573 .name = "cam_cc_camnoc_rt_ife_lite_clk", 1574 .parent_hws = (const struct clk_hw*[]) { 1575 &cam_cc_ife_lite_clk_src.clkr.hw, 1576 }, 1577 .num_parents = 1, 1578 .flags = CLK_SET_RATE_PARENT, 1579 .ops = &clk_branch2_ops, 1580 }, 1581 }, 1582 }; 1583 1584 static struct clk_branch cam_cc_camnoc_rt_tfe_0_main_clk = { 1585 .halt_reg = 0x21040, 1586 .halt_check = BRANCH_HALT, 1587 .clkr = { 1588 .enable_reg = 0x21040, 1589 .enable_mask = BIT(0), 1590 .hw.init = &(const struct clk_init_data) { 1591 .name = "cam_cc_camnoc_rt_tfe_0_main_clk", 1592 .parent_hws = (const struct clk_hw*[]) { 1593 &cam_cc_tfe_0_clk_src.clkr.hw, 1594 }, 1595 .num_parents = 1, 1596 .flags = CLK_SET_RATE_PARENT, 1597 .ops = &clk_branch2_ops, 1598 }, 1599 }, 1600 }; 1601 1602 static struct clk_branch cam_cc_camnoc_rt_tfe_1_main_clk = { 1603 .halt_reg = 0x210bc, 1604 .halt_check = BRANCH_HALT, 1605 .clkr = { 1606 .enable_reg = 0x210bc, 1607 .enable_mask = BIT(0), 1608 .hw.init = &(const struct clk_init_data) { 1609 .name = "cam_cc_camnoc_rt_tfe_1_main_clk", 1610 .parent_hws = (const struct clk_hw*[]) { 1611 &cam_cc_tfe_1_clk_src.clkr.hw, 1612 }, 1613 .num_parents = 1, 1614 .flags = CLK_SET_RATE_PARENT, 1615 .ops = &clk_branch2_ops, 1616 }, 1617 }, 1618 }; 1619 1620 static struct clk_branch cam_cc_camnoc_rt_tfe_2_main_clk = { 1621 .halt_reg = 0x21120, 1622 .halt_check = BRANCH_HALT, 1623 .clkr = { 1624 .enable_reg = 0x21120, 1625 .enable_mask = BIT(0), 1626 .hw.init = &(const struct clk_init_data) { 1627 .name = "cam_cc_camnoc_rt_tfe_2_main_clk", 1628 .parent_hws = (const struct clk_hw*[]) { 1629 &cam_cc_tfe_2_clk_src.clkr.hw, 1630 }, 1631 .num_parents = 1, 1632 .flags = CLK_SET_RATE_PARENT, 1633 .ops = &clk_branch2_ops, 1634 }, 1635 }, 1636 }; 1637 1638 static struct clk_branch cam_cc_cci_0_clk = { 1639 .halt_reg = 0x21268, 1640 .halt_check = BRANCH_HALT, 1641 .clkr = { 1642 .enable_reg = 0x21268, 1643 .enable_mask = BIT(0), 1644 .hw.init = &(const struct clk_init_data) { 1645 .name = "cam_cc_cci_0_clk", 1646 .parent_hws = (const struct clk_hw*[]) { 1647 &cam_cc_cci_0_clk_src.clkr.hw, 1648 }, 1649 .num_parents = 1, 1650 .flags = CLK_SET_RATE_PARENT, 1651 .ops = &clk_branch2_ops, 1652 }, 1653 }, 1654 }; 1655 1656 static struct clk_branch cam_cc_cci_1_clk = { 1657 .halt_reg = 0x21284, 1658 .halt_check = BRANCH_HALT, 1659 .clkr = { 1660 .enable_reg = 0x21284, 1661 .enable_mask = BIT(0), 1662 .hw.init = &(const struct clk_init_data) { 1663 .name = "cam_cc_cci_1_clk", 1664 .parent_hws = (const struct clk_hw*[]) { 1665 &cam_cc_cci_1_clk_src.clkr.hw, 1666 }, 1667 .num_parents = 1, 1668 .flags = CLK_SET_RATE_PARENT, 1669 .ops = &clk_branch2_ops, 1670 }, 1671 }, 1672 }; 1673 1674 static struct clk_branch cam_cc_cci_2_clk = { 1675 .halt_reg = 0x212a0, 1676 .halt_check = BRANCH_HALT, 1677 .clkr = { 1678 .enable_reg = 0x212a0, 1679 .enable_mask = BIT(0), 1680 .hw.init = &(const struct clk_init_data) { 1681 .name = "cam_cc_cci_2_clk", 1682 .parent_hws = (const struct clk_hw*[]) { 1683 &cam_cc_cci_2_clk_src.clkr.hw, 1684 }, 1685 .num_parents = 1, 1686 .flags = CLK_SET_RATE_PARENT, 1687 .ops = &clk_branch2_ops, 1688 }, 1689 }, 1690 }; 1691 1692 static struct clk_branch cam_cc_core_ahb_clk = { 1693 .halt_reg = 0x21344, 1694 .halt_check = BRANCH_HALT_DELAY, 1695 .clkr = { 1696 .enable_reg = 0x21344, 1697 .enable_mask = BIT(0), 1698 .hw.init = &(const struct clk_init_data) { 1699 .name = "cam_cc_core_ahb_clk", 1700 .parent_hws = (const struct clk_hw*[]) { 1701 &cam_cc_slow_ahb_clk_src.clkr.hw, 1702 }, 1703 .num_parents = 1, 1704 .flags = CLK_SET_RATE_PARENT, 1705 .ops = &clk_branch2_ops, 1706 }, 1707 }, 1708 }; 1709 1710 static struct clk_branch cam_cc_cre_ahb_clk = { 1711 .halt_reg = 0x211c0, 1712 .halt_check = BRANCH_HALT, 1713 .clkr = { 1714 .enable_reg = 0x211c0, 1715 .enable_mask = BIT(0), 1716 .hw.init = &(const struct clk_init_data) { 1717 .name = "cam_cc_cre_ahb_clk", 1718 .parent_hws = (const struct clk_hw*[]) { 1719 &cam_cc_slow_ahb_clk_src.clkr.hw, 1720 }, 1721 .num_parents = 1, 1722 .flags = CLK_SET_RATE_PARENT, 1723 .ops = &clk_branch2_ops, 1724 }, 1725 }, 1726 }; 1727 1728 static struct clk_branch cam_cc_cre_clk = { 1729 .halt_reg = 0x211b8, 1730 .halt_check = BRANCH_HALT, 1731 .clkr = { 1732 .enable_reg = 0x211b8, 1733 .enable_mask = BIT(0), 1734 .hw.init = &(const struct clk_init_data) { 1735 .name = "cam_cc_cre_clk", 1736 .parent_hws = (const struct clk_hw*[]) { 1737 &cam_cc_cre_clk_src.clkr.hw, 1738 }, 1739 .num_parents = 1, 1740 .flags = CLK_SET_RATE_PARENT, 1741 .ops = &clk_branch2_ops, 1742 }, 1743 }, 1744 }; 1745 1746 static struct clk_branch cam_cc_csi0phytimer_clk = { 1747 .halt_reg = 0x20018, 1748 .halt_check = BRANCH_HALT, 1749 .clkr = { 1750 .enable_reg = 0x20018, 1751 .enable_mask = BIT(0), 1752 .hw.init = &(const struct clk_init_data) { 1753 .name = "cam_cc_csi0phytimer_clk", 1754 .parent_hws = (const struct clk_hw*[]) { 1755 &cam_cc_csi0phytimer_clk_src.clkr.hw, 1756 }, 1757 .num_parents = 1, 1758 .flags = CLK_SET_RATE_PARENT, 1759 .ops = &clk_branch2_ops, 1760 }, 1761 }, 1762 }; 1763 1764 static struct clk_branch cam_cc_csi1phytimer_clk = { 1765 .halt_reg = 0x2003c, 1766 .halt_check = BRANCH_HALT, 1767 .clkr = { 1768 .enable_reg = 0x2003c, 1769 .enable_mask = BIT(0), 1770 .hw.init = &(const struct clk_init_data) { 1771 .name = "cam_cc_csi1phytimer_clk", 1772 .parent_hws = (const struct clk_hw*[]) { 1773 &cam_cc_csi1phytimer_clk_src.clkr.hw, 1774 }, 1775 .num_parents = 1, 1776 .flags = CLK_SET_RATE_PARENT, 1777 .ops = &clk_branch2_ops, 1778 }, 1779 }, 1780 }; 1781 1782 static struct clk_branch cam_cc_csi2phytimer_clk = { 1783 .halt_reg = 0x2005c, 1784 .halt_check = BRANCH_HALT, 1785 .clkr = { 1786 .enable_reg = 0x2005c, 1787 .enable_mask = BIT(0), 1788 .hw.init = &(const struct clk_init_data) { 1789 .name = "cam_cc_csi2phytimer_clk", 1790 .parent_hws = (const struct clk_hw*[]) { 1791 &cam_cc_csi2phytimer_clk_src.clkr.hw, 1792 }, 1793 .num_parents = 1, 1794 .flags = CLK_SET_RATE_PARENT, 1795 .ops = &clk_branch2_ops, 1796 }, 1797 }, 1798 }; 1799 1800 static struct clk_branch cam_cc_csi3phytimer_clk = { 1801 .halt_reg = 0x2007c, 1802 .halt_check = BRANCH_HALT, 1803 .clkr = { 1804 .enable_reg = 0x2007c, 1805 .enable_mask = BIT(0), 1806 .hw.init = &(const struct clk_init_data) { 1807 .name = "cam_cc_csi3phytimer_clk", 1808 .parent_hws = (const struct clk_hw*[]) { 1809 &cam_cc_csi3phytimer_clk_src.clkr.hw, 1810 }, 1811 .num_parents = 1, 1812 .flags = CLK_SET_RATE_PARENT, 1813 .ops = &clk_branch2_ops, 1814 }, 1815 }, 1816 }; 1817 1818 static struct clk_branch cam_cc_csi4phytimer_clk = { 1819 .halt_reg = 0x2009c, 1820 .halt_check = BRANCH_HALT, 1821 .clkr = { 1822 .enable_reg = 0x2009c, 1823 .enable_mask = BIT(0), 1824 .hw.init = &(const struct clk_init_data) { 1825 .name = "cam_cc_csi4phytimer_clk", 1826 .parent_hws = (const struct clk_hw*[]) { 1827 &cam_cc_csi4phytimer_clk_src.clkr.hw, 1828 }, 1829 .num_parents = 1, 1830 .flags = CLK_SET_RATE_PARENT, 1831 .ops = &clk_branch2_ops, 1832 }, 1833 }, 1834 }; 1835 1836 static struct clk_branch cam_cc_csi5phytimer_clk = { 1837 .halt_reg = 0x200bc, 1838 .halt_check = BRANCH_HALT, 1839 .clkr = { 1840 .enable_reg = 0x200bc, 1841 .enable_mask = BIT(0), 1842 .hw.init = &(const struct clk_init_data) { 1843 .name = "cam_cc_csi5phytimer_clk", 1844 .parent_hws = (const struct clk_hw*[]) { 1845 &cam_cc_csi5phytimer_clk_src.clkr.hw, 1846 }, 1847 .num_parents = 1, 1848 .flags = CLK_SET_RATE_PARENT, 1849 .ops = &clk_branch2_ops, 1850 }, 1851 }, 1852 }; 1853 1854 static struct clk_branch cam_cc_csid_clk = { 1855 .halt_reg = 0x212bc, 1856 .halt_check = BRANCH_HALT, 1857 .clkr = { 1858 .enable_reg = 0x212bc, 1859 .enable_mask = BIT(0), 1860 .hw.init = &(const struct clk_init_data) { 1861 .name = "cam_cc_csid_clk", 1862 .parent_hws = (const struct clk_hw*[]) { 1863 &cam_cc_csid_clk_src.clkr.hw, 1864 }, 1865 .num_parents = 1, 1866 .flags = CLK_SET_RATE_PARENT, 1867 .ops = &clk_branch2_ops, 1868 }, 1869 }, 1870 }; 1871 1872 static struct clk_branch cam_cc_csid_csiphy_rx_clk = { 1873 .halt_reg = 0x20020, 1874 .halt_check = BRANCH_HALT, 1875 .clkr = { 1876 .enable_reg = 0x20020, 1877 .enable_mask = BIT(0), 1878 .hw.init = &(const struct clk_init_data) { 1879 .name = "cam_cc_csid_csiphy_rx_clk", 1880 .parent_hws = (const struct clk_hw*[]) { 1881 &cam_cc_cphy_rx_clk_src.clkr.hw, 1882 }, 1883 .num_parents = 1, 1884 .flags = CLK_SET_RATE_PARENT, 1885 .ops = &clk_branch2_ops, 1886 }, 1887 }, 1888 }; 1889 1890 static struct clk_branch cam_cc_csiphy0_clk = { 1891 .halt_reg = 0x2001c, 1892 .halt_check = BRANCH_HALT, 1893 .clkr = { 1894 .enable_reg = 0x2001c, 1895 .enable_mask = BIT(0), 1896 .hw.init = &(const struct clk_init_data) { 1897 .name = "cam_cc_csiphy0_clk", 1898 .parent_hws = (const struct clk_hw*[]) { 1899 &cam_cc_cphy_rx_clk_src.clkr.hw, 1900 }, 1901 .num_parents = 1, 1902 .flags = CLK_SET_RATE_PARENT, 1903 .ops = &clk_branch2_ops, 1904 }, 1905 }, 1906 }; 1907 1908 static struct clk_branch cam_cc_csiphy1_clk = { 1909 .halt_reg = 0x20040, 1910 .halt_check = BRANCH_HALT, 1911 .clkr = { 1912 .enable_reg = 0x20040, 1913 .enable_mask = BIT(0), 1914 .hw.init = &(const struct clk_init_data) { 1915 .name = "cam_cc_csiphy1_clk", 1916 .parent_hws = (const struct clk_hw*[]) { 1917 &cam_cc_cphy_rx_clk_src.clkr.hw, 1918 }, 1919 .num_parents = 1, 1920 .flags = CLK_SET_RATE_PARENT, 1921 .ops = &clk_branch2_ops, 1922 }, 1923 }, 1924 }; 1925 1926 static struct clk_branch cam_cc_csiphy2_clk = { 1927 .halt_reg = 0x20060, 1928 .halt_check = BRANCH_HALT, 1929 .clkr = { 1930 .enable_reg = 0x20060, 1931 .enable_mask = BIT(0), 1932 .hw.init = &(const struct clk_init_data) { 1933 .name = "cam_cc_csiphy2_clk", 1934 .parent_hws = (const struct clk_hw*[]) { 1935 &cam_cc_cphy_rx_clk_src.clkr.hw, 1936 }, 1937 .num_parents = 1, 1938 .flags = CLK_SET_RATE_PARENT, 1939 .ops = &clk_branch2_ops, 1940 }, 1941 }, 1942 }; 1943 1944 static struct clk_branch cam_cc_csiphy3_clk = { 1945 .halt_reg = 0x20080, 1946 .halt_check = BRANCH_HALT, 1947 .clkr = { 1948 .enable_reg = 0x20080, 1949 .enable_mask = BIT(0), 1950 .hw.init = &(const struct clk_init_data) { 1951 .name = "cam_cc_csiphy3_clk", 1952 .parent_hws = (const struct clk_hw*[]) { 1953 &cam_cc_cphy_rx_clk_src.clkr.hw, 1954 }, 1955 .num_parents = 1, 1956 .flags = CLK_SET_RATE_PARENT, 1957 .ops = &clk_branch2_ops, 1958 }, 1959 }, 1960 }; 1961 1962 static struct clk_branch cam_cc_csiphy4_clk = { 1963 .halt_reg = 0x200a0, 1964 .halt_check = BRANCH_HALT, 1965 .clkr = { 1966 .enable_reg = 0x200a0, 1967 .enable_mask = BIT(0), 1968 .hw.init = &(const struct clk_init_data) { 1969 .name = "cam_cc_csiphy4_clk", 1970 .parent_hws = (const struct clk_hw*[]) { 1971 &cam_cc_cphy_rx_clk_src.clkr.hw, 1972 }, 1973 .num_parents = 1, 1974 .flags = CLK_SET_RATE_PARENT, 1975 .ops = &clk_branch2_ops, 1976 }, 1977 }, 1978 }; 1979 1980 static struct clk_branch cam_cc_csiphy5_clk = { 1981 .halt_reg = 0x200c0, 1982 .halt_check = BRANCH_HALT, 1983 .clkr = { 1984 .enable_reg = 0x200c0, 1985 .enable_mask = BIT(0), 1986 .hw.init = &(const struct clk_init_data) { 1987 .name = "cam_cc_csiphy5_clk", 1988 .parent_hws = (const struct clk_hw*[]) { 1989 &cam_cc_cphy_rx_clk_src.clkr.hw, 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 cam_cc_icp_0_ahb_clk = { 1999 .halt_reg = 0x21248, 2000 .halt_check = BRANCH_HALT, 2001 .clkr = { 2002 .enable_reg = 0x21248, 2003 .enable_mask = BIT(0), 2004 .hw.init = &(const struct clk_init_data) { 2005 .name = "cam_cc_icp_0_ahb_clk", 2006 .parent_hws = (const struct clk_hw*[]) { 2007 &cam_cc_slow_ahb_clk_src.clkr.hw, 2008 }, 2009 .num_parents = 1, 2010 .flags = CLK_SET_RATE_PARENT, 2011 .ops = &clk_branch2_ops, 2012 }, 2013 }, 2014 }; 2015 2016 static struct clk_branch cam_cc_icp_0_clk = { 2017 .halt_reg = 0x21210, 2018 .halt_check = BRANCH_HALT, 2019 .clkr = { 2020 .enable_reg = 0x21210, 2021 .enable_mask = BIT(0), 2022 .hw.init = &(const struct clk_init_data) { 2023 .name = "cam_cc_icp_0_clk", 2024 .parent_hws = (const struct clk_hw*[]) { 2025 &cam_cc_icp_0_clk_src.clkr.hw, 2026 }, 2027 .num_parents = 1, 2028 .flags = CLK_SET_RATE_PARENT, 2029 .ops = &clk_branch2_ops, 2030 }, 2031 }, 2032 }; 2033 2034 static struct clk_branch cam_cc_icp_1_ahb_clk = { 2035 .halt_reg = 0x2124c, 2036 .halt_check = BRANCH_HALT, 2037 .clkr = { 2038 .enable_reg = 0x2124c, 2039 .enable_mask = BIT(0), 2040 .hw.init = &(const struct clk_init_data) { 2041 .name = "cam_cc_icp_1_ahb_clk", 2042 .parent_hws = (const struct clk_hw*[]) { 2043 &cam_cc_slow_ahb_clk_src.clkr.hw, 2044 }, 2045 .num_parents = 1, 2046 .flags = CLK_SET_RATE_PARENT, 2047 .ops = &clk_branch2_ops, 2048 }, 2049 }, 2050 }; 2051 2052 static struct clk_branch cam_cc_icp_1_clk = { 2053 .halt_reg = 0x21238, 2054 .halt_check = BRANCH_HALT, 2055 .clkr = { 2056 .enable_reg = 0x21238, 2057 .enable_mask = BIT(0), 2058 .hw.init = &(const struct clk_init_data) { 2059 .name = "cam_cc_icp_1_clk", 2060 .parent_hws = (const struct clk_hw*[]) { 2061 &cam_cc_icp_1_clk_src.clkr.hw, 2062 }, 2063 .num_parents = 1, 2064 .flags = CLK_SET_RATE_PARENT, 2065 .ops = &clk_branch2_ops, 2066 }, 2067 }, 2068 }; 2069 2070 static struct clk_branch cam_cc_ife_lite_ahb_clk = { 2071 .halt_reg = 0x2119c, 2072 .halt_check = BRANCH_HALT, 2073 .clkr = { 2074 .enable_reg = 0x2119c, 2075 .enable_mask = BIT(0), 2076 .hw.init = &(const struct clk_init_data) { 2077 .name = "cam_cc_ife_lite_ahb_clk", 2078 .parent_hws = (const struct clk_hw*[]) { 2079 &cam_cc_slow_ahb_clk_src.clkr.hw, 2080 }, 2081 .num_parents = 1, 2082 .flags = CLK_SET_RATE_PARENT, 2083 .ops = &clk_branch2_ops, 2084 }, 2085 }, 2086 }; 2087 2088 static struct clk_branch cam_cc_ife_lite_clk = { 2089 .halt_reg = 0x2115c, 2090 .halt_check = BRANCH_HALT, 2091 .clkr = { 2092 .enable_reg = 0x2115c, 2093 .enable_mask = BIT(0), 2094 .hw.init = &(const struct clk_init_data) { 2095 .name = "cam_cc_ife_lite_clk", 2096 .parent_hws = (const struct clk_hw*[]) { 2097 &cam_cc_ife_lite_clk_src.clkr.hw, 2098 }, 2099 .num_parents = 1, 2100 .flags = CLK_SET_RATE_PARENT, 2101 .ops = &clk_branch2_ops, 2102 }, 2103 }, 2104 }; 2105 2106 static struct clk_branch cam_cc_ife_lite_cphy_rx_clk = { 2107 .halt_reg = 0x21198, 2108 .halt_check = BRANCH_HALT, 2109 .clkr = { 2110 .enable_reg = 0x21198, 2111 .enable_mask = BIT(0), 2112 .hw.init = &(const struct clk_init_data) { 2113 .name = "cam_cc_ife_lite_cphy_rx_clk", 2114 .parent_hws = (const struct clk_hw*[]) { 2115 &cam_cc_cphy_rx_clk_src.clkr.hw, 2116 }, 2117 .num_parents = 1, 2118 .flags = CLK_SET_RATE_PARENT, 2119 .ops = &clk_branch2_ops, 2120 }, 2121 }, 2122 }; 2123 2124 static struct clk_branch cam_cc_ife_lite_csid_clk = { 2125 .halt_reg = 0x21188, 2126 .halt_check = BRANCH_HALT, 2127 .clkr = { 2128 .enable_reg = 0x21188, 2129 .enable_mask = BIT(0), 2130 .hw.init = &(const struct clk_init_data) { 2131 .name = "cam_cc_ife_lite_csid_clk", 2132 .parent_hws = (const struct clk_hw*[]) { 2133 &cam_cc_ife_lite_csid_clk_src.clkr.hw, 2134 }, 2135 .num_parents = 1, 2136 .flags = CLK_SET_RATE_PARENT, 2137 .ops = &clk_branch2_ops, 2138 }, 2139 }, 2140 }; 2141 2142 static struct clk_branch cam_cc_ipe_nps_ahb_clk = { 2143 .halt_reg = 0x201f4, 2144 .halt_check = BRANCH_HALT, 2145 .clkr = { 2146 .enable_reg = 0x201f4, 2147 .enable_mask = BIT(0), 2148 .hw.init = &(const struct clk_init_data) { 2149 .name = "cam_cc_ipe_nps_ahb_clk", 2150 .parent_hws = (const struct clk_hw*[]) { 2151 &cam_cc_slow_ahb_clk_src.clkr.hw, 2152 }, 2153 .num_parents = 1, 2154 .flags = CLK_SET_RATE_PARENT, 2155 .ops = &clk_branch2_ops, 2156 }, 2157 }, 2158 }; 2159 2160 static struct clk_branch cam_cc_ipe_nps_clk = { 2161 .halt_reg = 0x201b4, 2162 .halt_check = BRANCH_HALT, 2163 .clkr = { 2164 .enable_reg = 0x201b4, 2165 .enable_mask = BIT(0), 2166 .hw.init = &(const struct clk_init_data) { 2167 .name = "cam_cc_ipe_nps_clk", 2168 .parent_hws = (const struct clk_hw*[]) { 2169 &cam_cc_ipe_nps_clk_src.clkr.hw, 2170 }, 2171 .num_parents = 1, 2172 .flags = CLK_SET_RATE_PARENT, 2173 .ops = &clk_branch2_ops, 2174 }, 2175 }, 2176 }; 2177 2178 static struct clk_branch cam_cc_ipe_nps_fast_ahb_clk = { 2179 .halt_reg = 0x201f8, 2180 .halt_check = BRANCH_HALT, 2181 .clkr = { 2182 .enable_reg = 0x201f8, 2183 .enable_mask = BIT(0), 2184 .hw.init = &(const struct clk_init_data) { 2185 .name = "cam_cc_ipe_nps_fast_ahb_clk", 2186 .parent_hws = (const struct clk_hw*[]) { 2187 &cam_cc_fast_ahb_clk_src.clkr.hw, 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 cam_cc_ipe_pps_clk = { 2197 .halt_reg = 0x201c8, 2198 .halt_check = BRANCH_HALT, 2199 .clkr = { 2200 .enable_reg = 0x201c8, 2201 .enable_mask = BIT(0), 2202 .hw.init = &(const struct clk_init_data) { 2203 .name = "cam_cc_ipe_pps_clk", 2204 .parent_hws = (const struct clk_hw*[]) { 2205 &cam_cc_ipe_nps_clk_src.clkr.hw, 2206 }, 2207 .num_parents = 1, 2208 .flags = CLK_SET_RATE_PARENT, 2209 .ops = &clk_branch2_ops, 2210 }, 2211 }, 2212 }; 2213 2214 static struct clk_branch cam_cc_ipe_pps_fast_ahb_clk = { 2215 .halt_reg = 0x201fc, 2216 .halt_check = BRANCH_HALT, 2217 .clkr = { 2218 .enable_reg = 0x201fc, 2219 .enable_mask = BIT(0), 2220 .hw.init = &(const struct clk_init_data) { 2221 .name = "cam_cc_ipe_pps_fast_ahb_clk", 2222 .parent_hws = (const struct clk_hw*[]) { 2223 &cam_cc_fast_ahb_clk_src.clkr.hw, 2224 }, 2225 .num_parents = 1, 2226 .flags = CLK_SET_RATE_PARENT, 2227 .ops = &clk_branch2_ops, 2228 }, 2229 }, 2230 }; 2231 2232 static struct clk_branch cam_cc_ipe_scalers_clk = { 2233 .halt_reg = 0x201d8, 2234 .halt_check = BRANCH_HALT, 2235 .clkr = { 2236 .enable_reg = 0x201d8, 2237 .enable_mask = BIT(0), 2238 .hw.init = &(const struct clk_init_data) { 2239 .name = "cam_cc_ipe_scalers_clk", 2240 .parent_hws = (const struct clk_hw*[]) { 2241 &cam_cc_ipe_nps_clk_src.clkr.hw, 2242 }, 2243 .num_parents = 1, 2244 .flags = CLK_SET_RATE_PARENT, 2245 .ops = &clk_branch2_ops, 2246 }, 2247 }, 2248 }; 2249 2250 static struct clk_branch cam_cc_ipe_scalers_fast_ahb_clk = { 2251 .halt_reg = 0x20200, 2252 .halt_check = BRANCH_HALT, 2253 .clkr = { 2254 .enable_reg = 0x20200, 2255 .enable_mask = BIT(0), 2256 .hw.init = &(const struct clk_init_data) { 2257 .name = "cam_cc_ipe_scalers_fast_ahb_clk", 2258 .parent_hws = (const struct clk_hw*[]) { 2259 &cam_cc_fast_ahb_clk_src.clkr.hw, 2260 }, 2261 .num_parents = 1, 2262 .flags = CLK_SET_RATE_PARENT, 2263 .ops = &clk_branch2_ops, 2264 }, 2265 }, 2266 }; 2267 2268 static struct clk_branch cam_cc_jpeg_clk = { 2269 .halt_reg = 0x211dc, 2270 .halt_check = BRANCH_HALT, 2271 .clkr = { 2272 .enable_reg = 0x211dc, 2273 .enable_mask = BIT(0), 2274 .hw.init = &(const struct clk_init_data) { 2275 .name = "cam_cc_jpeg_clk", 2276 .parent_hws = (const struct clk_hw*[]) { 2277 &cam_cc_jpeg_clk_src.clkr.hw, 2278 }, 2279 .num_parents = 1, 2280 .flags = CLK_SET_RATE_PARENT, 2281 .ops = &clk_branch2_ops, 2282 }, 2283 }, 2284 }; 2285 2286 static struct clk_branch cam_cc_ofe_ahb_clk = { 2287 .halt_reg = 0x2011c, 2288 .halt_check = BRANCH_HALT, 2289 .clkr = { 2290 .enable_reg = 0x2011c, 2291 .enable_mask = BIT(0), 2292 .hw.init = &(const struct clk_init_data) { 2293 .name = "cam_cc_ofe_ahb_clk", 2294 .parent_hws = (const struct clk_hw*[]) { 2295 &cam_cc_slow_ahb_clk_src.clkr.hw, 2296 }, 2297 .num_parents = 1, 2298 .flags = CLK_SET_RATE_PARENT, 2299 .ops = &clk_branch2_ops, 2300 }, 2301 }, 2302 }; 2303 2304 static struct clk_branch cam_cc_ofe_anchor_clk = { 2305 .halt_reg = 0x2014c, 2306 .halt_check = BRANCH_HALT, 2307 .clkr = { 2308 .enable_reg = 0x2014c, 2309 .enable_mask = BIT(0), 2310 .hw.init = &(const struct clk_init_data) { 2311 .name = "cam_cc_ofe_anchor_clk", 2312 .parent_hws = (const struct clk_hw*[]) { 2313 &cam_cc_ofe_clk_src.clkr.hw, 2314 }, 2315 .num_parents = 1, 2316 .flags = CLK_SET_RATE_PARENT, 2317 .ops = &clk_branch2_ops, 2318 }, 2319 }, 2320 }; 2321 2322 static struct clk_branch cam_cc_ofe_anchor_fast_ahb_clk = { 2323 .halt_reg = 0x200f8, 2324 .halt_check = BRANCH_HALT, 2325 .clkr = { 2326 .enable_reg = 0x200f8, 2327 .enable_mask = BIT(0), 2328 .hw.init = &(const struct clk_init_data) { 2329 .name = "cam_cc_ofe_anchor_fast_ahb_clk", 2330 .parent_hws = (const struct clk_hw*[]) { 2331 &cam_cc_fast_ahb_clk_src.clkr.hw, 2332 }, 2333 .num_parents = 1, 2334 .flags = CLK_SET_RATE_PARENT, 2335 .ops = &clk_branch2_ops, 2336 }, 2337 }, 2338 }; 2339 2340 static struct clk_branch cam_cc_ofe_hdr_clk = { 2341 .halt_reg = 0x2015c, 2342 .halt_check = BRANCH_HALT, 2343 .clkr = { 2344 .enable_reg = 0x2015c, 2345 .enable_mask = BIT(0), 2346 .hw.init = &(const struct clk_init_data) { 2347 .name = "cam_cc_ofe_hdr_clk", 2348 .parent_hws = (const struct clk_hw*[]) { 2349 &cam_cc_ofe_clk_src.clkr.hw, 2350 }, 2351 .num_parents = 1, 2352 .flags = CLK_SET_RATE_PARENT, 2353 .ops = &clk_branch2_ops, 2354 }, 2355 }, 2356 }; 2357 2358 static struct clk_branch cam_cc_ofe_hdr_fast_ahb_clk = { 2359 .halt_reg = 0x200fc, 2360 .halt_check = BRANCH_HALT, 2361 .clkr = { 2362 .enable_reg = 0x200fc, 2363 .enable_mask = BIT(0), 2364 .hw.init = &(const struct clk_init_data) { 2365 .name = "cam_cc_ofe_hdr_fast_ahb_clk", 2366 .parent_hws = (const struct clk_hw*[]) { 2367 &cam_cc_fast_ahb_clk_src.clkr.hw, 2368 }, 2369 .num_parents = 1, 2370 .flags = CLK_SET_RATE_PARENT, 2371 .ops = &clk_branch2_ops, 2372 }, 2373 }, 2374 }; 2375 2376 static struct clk_branch cam_cc_ofe_main_clk = { 2377 .halt_reg = 0x20138, 2378 .halt_check = BRANCH_HALT, 2379 .clkr = { 2380 .enable_reg = 0x20138, 2381 .enable_mask = BIT(0), 2382 .hw.init = &(const struct clk_init_data) { 2383 .name = "cam_cc_ofe_main_clk", 2384 .parent_hws = (const struct clk_hw*[]) { 2385 &cam_cc_ofe_clk_src.clkr.hw, 2386 }, 2387 .num_parents = 1, 2388 .flags = CLK_SET_RATE_PARENT, 2389 .ops = &clk_branch2_ops, 2390 }, 2391 }, 2392 }; 2393 2394 static struct clk_branch cam_cc_ofe_main_fast_ahb_clk = { 2395 .halt_reg = 0x200f4, 2396 .halt_check = BRANCH_HALT, 2397 .clkr = { 2398 .enable_reg = 0x200f4, 2399 .enable_mask = BIT(0), 2400 .hw.init = &(const struct clk_init_data) { 2401 .name = "cam_cc_ofe_main_fast_ahb_clk", 2402 .parent_hws = (const struct clk_hw*[]) { 2403 &cam_cc_fast_ahb_clk_src.clkr.hw, 2404 }, 2405 .num_parents = 1, 2406 .flags = CLK_SET_RATE_PARENT, 2407 .ops = &clk_branch2_ops, 2408 }, 2409 }, 2410 }; 2411 2412 static struct clk_branch cam_cc_ofe_mp_clk = { 2413 .halt_reg = 0x2016c, 2414 .halt_check = BRANCH_HALT, 2415 .clkr = { 2416 .enable_reg = 0x2016c, 2417 .enable_mask = BIT(0), 2418 .hw.init = &(const struct clk_init_data) { 2419 .name = "cam_cc_ofe_mp_clk", 2420 .parent_hws = (const struct clk_hw*[]) { 2421 &cam_cc_ofe_clk_src.clkr.hw, 2422 }, 2423 .num_parents = 1, 2424 .flags = CLK_SET_RATE_PARENT, 2425 .ops = &clk_branch2_ops, 2426 }, 2427 }, 2428 }; 2429 2430 static struct clk_branch cam_cc_ofe_mp_fast_ahb_clk = { 2431 .halt_reg = 0x20100, 2432 .halt_check = BRANCH_HALT, 2433 .clkr = { 2434 .enable_reg = 0x20100, 2435 .enable_mask = BIT(0), 2436 .hw.init = &(const struct clk_init_data) { 2437 .name = "cam_cc_ofe_mp_fast_ahb_clk", 2438 .parent_hws = (const struct clk_hw*[]) { 2439 &cam_cc_fast_ahb_clk_src.clkr.hw, 2440 }, 2441 .num_parents = 1, 2442 .flags = CLK_SET_RATE_PARENT, 2443 .ops = &clk_branch2_ops, 2444 }, 2445 }, 2446 }; 2447 2448 static struct clk_branch cam_cc_qdss_debug_clk = { 2449 .halt_reg = 0x21328, 2450 .halt_check = BRANCH_HALT, 2451 .clkr = { 2452 .enable_reg = 0x21328, 2453 .enable_mask = BIT(0), 2454 .hw.init = &(const struct clk_init_data) { 2455 .name = "cam_cc_qdss_debug_clk", 2456 .parent_hws = (const struct clk_hw*[]) { 2457 &cam_cc_qdss_debug_clk_src.clkr.hw, 2458 }, 2459 .num_parents = 1, 2460 .flags = CLK_SET_RATE_PARENT, 2461 .ops = &clk_branch2_ops, 2462 }, 2463 }, 2464 }; 2465 2466 static struct clk_branch cam_cc_qdss_debug_xo_clk = { 2467 .halt_reg = 0x2132c, 2468 .halt_check = BRANCH_HALT, 2469 .clkr = { 2470 .enable_reg = 0x2132c, 2471 .enable_mask = BIT(0), 2472 .hw.init = &(const struct clk_init_data) { 2473 .name = "cam_cc_qdss_debug_xo_clk", 2474 .parent_hws = (const struct clk_hw*[]) { 2475 &cam_cc_xo_clk_src.clkr.hw, 2476 }, 2477 .num_parents = 1, 2478 .flags = CLK_SET_RATE_PARENT, 2479 .ops = &clk_branch2_ops, 2480 }, 2481 }, 2482 }; 2483 2484 static struct clk_branch cam_cc_sqpf_ahb_clk = { 2485 .halt_reg = 0x20250, 2486 .halt_check = BRANCH_HALT, 2487 .clkr = { 2488 .enable_reg = 0x20250, 2489 .enable_mask = BIT(0), 2490 .hw.init = &(const struct clk_init_data) { 2491 .name = "cam_cc_sqpf_ahb_clk", 2492 .parent_hws = (const struct clk_hw*[]) { 2493 &cam_cc_slow_ahb_clk_src.clkr.hw, 2494 }, 2495 .num_parents = 1, 2496 .flags = CLK_SET_RATE_PARENT, 2497 .ops = &clk_branch2_ops, 2498 }, 2499 }, 2500 }; 2501 2502 static struct clk_branch cam_cc_sqpf_clk = { 2503 .halt_reg = 0x20234, 2504 .halt_check = BRANCH_HALT, 2505 .clkr = { 2506 .enable_reg = 0x20234, 2507 .enable_mask = BIT(0), 2508 .hw.init = &(const struct clk_init_data) { 2509 .name = "cam_cc_sqpf_clk", 2510 .parent_hws = (const struct clk_hw*[]) { 2511 &cam_cc_sqpf_clk_src.clkr.hw, 2512 }, 2513 .num_parents = 1, 2514 .flags = CLK_SET_RATE_PARENT, 2515 .ops = &clk_branch2_ops, 2516 }, 2517 }, 2518 }; 2519 2520 static struct clk_branch cam_cc_sqpf_fast_ahb_clk = { 2521 .halt_reg = 0x20254, 2522 .halt_check = BRANCH_HALT, 2523 .clkr = { 2524 .enable_reg = 0x20254, 2525 .enable_mask = BIT(0), 2526 .hw.init = &(const struct clk_init_data) { 2527 .name = "cam_cc_sqpf_fast_ahb_clk", 2528 .parent_hws = (const struct clk_hw*[]) { 2529 &cam_cc_fast_ahb_clk_src.clkr.hw, 2530 }, 2531 .num_parents = 1, 2532 .flags = CLK_SET_RATE_PARENT, 2533 .ops = &clk_branch2_ops, 2534 }, 2535 }, 2536 }; 2537 2538 static struct clk_branch cam_cc_tfe_0_bayer_clk = { 2539 .halt_reg = 0x21044, 2540 .halt_check = BRANCH_HALT, 2541 .clkr = { 2542 .enable_reg = 0x21044, 2543 .enable_mask = BIT(0), 2544 .hw.init = &(const struct clk_init_data) { 2545 .name = "cam_cc_tfe_0_bayer_clk", 2546 .parent_hws = (const struct clk_hw*[]) { 2547 &cam_cc_tfe_0_clk_src.clkr.hw, 2548 }, 2549 .num_parents = 1, 2550 .flags = CLK_SET_RATE_PARENT, 2551 .ops = &clk_branch2_ops, 2552 }, 2553 }, 2554 }; 2555 2556 static struct clk_branch cam_cc_tfe_0_bayer_fast_ahb_clk = { 2557 .halt_reg = 0x21060, 2558 .halt_check = BRANCH_HALT, 2559 .clkr = { 2560 .enable_reg = 0x21060, 2561 .enable_mask = BIT(0), 2562 .hw.init = &(const struct clk_init_data) { 2563 .name = "cam_cc_tfe_0_bayer_fast_ahb_clk", 2564 .parent_hws = (const struct clk_hw*[]) { 2565 &cam_cc_fast_ahb_clk_src.clkr.hw, 2566 }, 2567 .num_parents = 1, 2568 .flags = CLK_SET_RATE_PARENT, 2569 .ops = &clk_branch2_ops, 2570 }, 2571 }, 2572 }; 2573 2574 static struct clk_branch cam_cc_tfe_0_main_clk = { 2575 .halt_reg = 0x21030, 2576 .halt_check = BRANCH_HALT, 2577 .clkr = { 2578 .enable_reg = 0x21030, 2579 .enable_mask = BIT(0), 2580 .hw.init = &(const struct clk_init_data) { 2581 .name = "cam_cc_tfe_0_main_clk", 2582 .parent_hws = (const struct clk_hw*[]) { 2583 &cam_cc_tfe_0_clk_src.clkr.hw, 2584 }, 2585 .num_parents = 1, 2586 .flags = CLK_SET_RATE_PARENT, 2587 .ops = &clk_branch2_ops, 2588 }, 2589 }, 2590 }; 2591 2592 static struct clk_branch cam_cc_tfe_0_main_fast_ahb_clk = { 2593 .halt_reg = 0x2105c, 2594 .halt_check = BRANCH_HALT, 2595 .clkr = { 2596 .enable_reg = 0x2105c, 2597 .enable_mask = BIT(0), 2598 .hw.init = &(const struct clk_init_data) { 2599 .name = "cam_cc_tfe_0_main_fast_ahb_clk", 2600 .parent_hws = (const struct clk_hw*[]) { 2601 &cam_cc_fast_ahb_clk_src.clkr.hw, 2602 }, 2603 .num_parents = 1, 2604 .flags = CLK_SET_RATE_PARENT, 2605 .ops = &clk_branch2_ops, 2606 }, 2607 }, 2608 }; 2609 2610 static struct clk_branch cam_cc_tfe_1_bayer_clk = { 2611 .halt_reg = 0x210c0, 2612 .halt_check = BRANCH_HALT, 2613 .clkr = { 2614 .enable_reg = 0x210c0, 2615 .enable_mask = BIT(0), 2616 .hw.init = &(const struct clk_init_data) { 2617 .name = "cam_cc_tfe_1_bayer_clk", 2618 .parent_hws = (const struct clk_hw*[]) { 2619 &cam_cc_tfe_1_clk_src.clkr.hw, 2620 }, 2621 .num_parents = 1, 2622 .flags = CLK_SET_RATE_PARENT, 2623 .ops = &clk_branch2_ops, 2624 }, 2625 }, 2626 }; 2627 2628 static struct clk_branch cam_cc_tfe_1_bayer_fast_ahb_clk = { 2629 .halt_reg = 0x210dc, 2630 .halt_check = BRANCH_HALT, 2631 .clkr = { 2632 .enable_reg = 0x210dc, 2633 .enable_mask = BIT(0), 2634 .hw.init = &(const struct clk_init_data) { 2635 .name = "cam_cc_tfe_1_bayer_fast_ahb_clk", 2636 .parent_hws = (const struct clk_hw*[]) { 2637 &cam_cc_fast_ahb_clk_src.clkr.hw, 2638 }, 2639 .num_parents = 1, 2640 .flags = CLK_SET_RATE_PARENT, 2641 .ops = &clk_branch2_ops, 2642 }, 2643 }, 2644 }; 2645 2646 static struct clk_branch cam_cc_tfe_1_main_clk = { 2647 .halt_reg = 0x210ac, 2648 .halt_check = BRANCH_HALT, 2649 .clkr = { 2650 .enable_reg = 0x210ac, 2651 .enable_mask = BIT(0), 2652 .hw.init = &(const struct clk_init_data) { 2653 .name = "cam_cc_tfe_1_main_clk", 2654 .parent_hws = (const struct clk_hw*[]) { 2655 &cam_cc_tfe_1_clk_src.clkr.hw, 2656 }, 2657 .num_parents = 1, 2658 .flags = CLK_SET_RATE_PARENT, 2659 .ops = &clk_branch2_ops, 2660 }, 2661 }, 2662 }; 2663 2664 static struct clk_branch cam_cc_tfe_1_main_fast_ahb_clk = { 2665 .halt_reg = 0x210d8, 2666 .halt_check = BRANCH_HALT, 2667 .clkr = { 2668 .enable_reg = 0x210d8, 2669 .enable_mask = BIT(0), 2670 .hw.init = &(const struct clk_init_data) { 2671 .name = "cam_cc_tfe_1_main_fast_ahb_clk", 2672 .parent_hws = (const struct clk_hw*[]) { 2673 &cam_cc_fast_ahb_clk_src.clkr.hw, 2674 }, 2675 .num_parents = 1, 2676 .flags = CLK_SET_RATE_PARENT, 2677 .ops = &clk_branch2_ops, 2678 }, 2679 }, 2680 }; 2681 2682 static struct clk_branch cam_cc_tfe_2_bayer_clk = { 2683 .halt_reg = 0x21124, 2684 .halt_check = BRANCH_HALT, 2685 .clkr = { 2686 .enable_reg = 0x21124, 2687 .enable_mask = BIT(0), 2688 .hw.init = &(const struct clk_init_data) { 2689 .name = "cam_cc_tfe_2_bayer_clk", 2690 .parent_hws = (const struct clk_hw*[]) { 2691 &cam_cc_tfe_2_clk_src.clkr.hw, 2692 }, 2693 .num_parents = 1, 2694 .flags = CLK_SET_RATE_PARENT, 2695 .ops = &clk_branch2_ops, 2696 }, 2697 }, 2698 }; 2699 2700 static struct clk_branch cam_cc_tfe_2_bayer_fast_ahb_clk = { 2701 .halt_reg = 0x21140, 2702 .halt_check = BRANCH_HALT, 2703 .clkr = { 2704 .enable_reg = 0x21140, 2705 .enable_mask = BIT(0), 2706 .hw.init = &(const struct clk_init_data) { 2707 .name = "cam_cc_tfe_2_bayer_fast_ahb_clk", 2708 .parent_hws = (const struct clk_hw*[]) { 2709 &cam_cc_fast_ahb_clk_src.clkr.hw, 2710 }, 2711 .num_parents = 1, 2712 .flags = CLK_SET_RATE_PARENT, 2713 .ops = &clk_branch2_ops, 2714 }, 2715 }, 2716 }; 2717 2718 static struct clk_branch cam_cc_tfe_2_main_clk = { 2719 .halt_reg = 0x21110, 2720 .halt_check = BRANCH_HALT, 2721 .clkr = { 2722 .enable_reg = 0x21110, 2723 .enable_mask = BIT(0), 2724 .hw.init = &(const struct clk_init_data) { 2725 .name = "cam_cc_tfe_2_main_clk", 2726 .parent_hws = (const struct clk_hw*[]) { 2727 &cam_cc_tfe_2_clk_src.clkr.hw, 2728 }, 2729 .num_parents = 1, 2730 .flags = CLK_SET_RATE_PARENT, 2731 .ops = &clk_branch2_ops, 2732 }, 2733 }, 2734 }; 2735 2736 static struct clk_branch cam_cc_tfe_2_main_fast_ahb_clk = { 2737 .halt_reg = 0x2113c, 2738 .halt_check = BRANCH_HALT, 2739 .clkr = { 2740 .enable_reg = 0x2113c, 2741 .enable_mask = BIT(0), 2742 .hw.init = &(const struct clk_init_data) { 2743 .name = "cam_cc_tfe_2_main_fast_ahb_clk", 2744 .parent_hws = (const struct clk_hw*[]) { 2745 &cam_cc_fast_ahb_clk_src.clkr.hw, 2746 }, 2747 .num_parents = 1, 2748 .flags = CLK_SET_RATE_PARENT, 2749 .ops = &clk_branch2_ops, 2750 }, 2751 }, 2752 }; 2753 2754 static struct clk_branch cam_cc_titan_mnoc_hf_clk = { 2755 .halt_reg = 0x213a4, 2756 .halt_check = BRANCH_HALT, 2757 .clkr = { 2758 .enable_reg = 0x213a4, 2759 .enable_mask = BIT(0), 2760 .hw.init = &(const struct clk_init_data) { 2761 .name = "cam_cc_titan_mnoc_hf_clk", 2762 .ops = &clk_branch2_ops, 2763 }, 2764 }, 2765 }; 2766 2767 static struct clk_branch cam_cc_titan_mnoc_sf_clk = { 2768 .halt_reg = 0x213b4, 2769 .halt_check = BRANCH_HALT, 2770 .clkr = { 2771 .enable_reg = 0x213b4, 2772 .enable_mask = BIT(0), 2773 .hw.init = &(const struct clk_init_data) { 2774 .name = "cam_cc_titan_mnoc_sf_clk", 2775 .ops = &clk_branch2_ops, 2776 }, 2777 }, 2778 }; 2779 2780 static struct clk_branch cam_cc_tracenoc_tpdm_1_cmb_clk = { 2781 .halt_reg = 0x213dc, 2782 .halt_check = BRANCH_HALT, 2783 .clkr = { 2784 .enable_reg = 0x213dc, 2785 .enable_mask = BIT(0), 2786 .hw.init = &(const struct clk_init_data) { 2787 .name = "cam_cc_tracenoc_tpdm_1_cmb_clk", 2788 .parent_hws = (const struct clk_hw*[]) { 2789 &cam_cc_xo_clk_src.clkr.hw, 2790 }, 2791 .num_parents = 1, 2792 .flags = CLK_SET_RATE_PARENT, 2793 .ops = &clk_branch2_ops, 2794 }, 2795 }, 2796 }; 2797 2798 static struct gdsc cam_cc_titan_top_cx_gdsc = { 2799 .gdscr = 0x21388, 2800 .en_rest_wait_val = 0x2, 2801 .en_few_wait_val = 0x2, 2802 .clk_dis_wait_val = 0xf, 2803 .pd = { 2804 .name = "cam_cc_titan_top_cx_gdsc", 2805 }, 2806 .pwrsts = PWRSTS_OFF_ON, 2807 .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2808 .needs_icc = true, 2809 .icc_path_index = DT_ICC_TOP_GDSC, 2810 }; 2811 2812 static struct gdsc cam_cc_titan_top_gdsc = { 2813 .gdscr = 0x21330, 2814 .en_rest_wait_val = 0x2, 2815 .en_few_wait_val = 0x2, 2816 .clk_dis_wait_val = 0xf, 2817 .pd = { 2818 .name = "cam_cc_titan_top_gdsc", 2819 }, 2820 .pwrsts = PWRSTS_OFF_ON, 2821 .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2822 .needs_icc = true, 2823 .icc_path_index = DT_ICC_TOP_GDSC, 2824 .parent = &cam_cc_titan_top_cx_gdsc.pd, 2825 }; 2826 2827 static struct gdsc cam_cc_ipe_0_gdsc = { 2828 .gdscr = 0x20188, 2829 .en_rest_wait_val = 0x2, 2830 .en_few_wait_val = 0x2, 2831 .clk_dis_wait_val = 0xf, 2832 .pd = { 2833 .name = "cam_cc_ipe_0_gdsc", 2834 }, 2835 .pwrsts = PWRSTS_OFF_ON, 2836 .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2837 .parent = &cam_cc_titan_top_gdsc.pd, 2838 }; 2839 2840 static struct gdsc cam_cc_ofe_gdsc = { 2841 .gdscr = 0x200c8, 2842 .en_rest_wait_val = 0x2, 2843 .en_few_wait_val = 0x2, 2844 .clk_dis_wait_val = 0xf, 2845 .pd = { 2846 .name = "cam_cc_ofe_gdsc", 2847 }, 2848 .pwrsts = PWRSTS_OFF_ON, 2849 .flags = HW_CTRL_TRIGGER | POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2850 .parent = &cam_cc_titan_top_gdsc.pd, 2851 }; 2852 2853 static struct gdsc cam_cc_sqpf_gdsc = { 2854 .gdscr = 0x20208, 2855 .en_rest_wait_val = 0x2, 2856 .en_few_wait_val = 0x2, 2857 .clk_dis_wait_val = 0xf, 2858 .pd = { 2859 .name = "cam_cc_sqpf_gdsc", 2860 }, 2861 .pwrsts = PWRSTS_OFF_ON, 2862 .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2863 .parent = &cam_cc_titan_top_gdsc.pd, 2864 }; 2865 2866 static struct gdsc cam_cc_tfe_0_gdsc = { 2867 .gdscr = 0x21004, 2868 .en_rest_wait_val = 0x2, 2869 .en_few_wait_val = 0x2, 2870 .clk_dis_wait_val = 0xf, 2871 .pd = { 2872 .name = "cam_cc_tfe_0_gdsc", 2873 }, 2874 .pwrsts = PWRSTS_OFF_ON, 2875 .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2876 .parent = &cam_cc_titan_top_gdsc.pd, 2877 }; 2878 2879 static struct gdsc cam_cc_tfe_1_gdsc = { 2880 .gdscr = 0x21080, 2881 .en_rest_wait_val = 0x2, 2882 .en_few_wait_val = 0x2, 2883 .clk_dis_wait_val = 0xf, 2884 .pd = { 2885 .name = "cam_cc_tfe_1_gdsc", 2886 }, 2887 .pwrsts = PWRSTS_OFF_ON, 2888 .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2889 .parent = &cam_cc_titan_top_gdsc.pd, 2890 }; 2891 2892 static struct gdsc cam_cc_tfe_2_gdsc = { 2893 .gdscr = 0x210e4, 2894 .en_rest_wait_val = 0x2, 2895 .en_few_wait_val = 0x2, 2896 .clk_dis_wait_val = 0xf, 2897 .pd = { 2898 .name = "cam_cc_tfe_2_gdsc", 2899 }, 2900 .pwrsts = PWRSTS_OFF_ON, 2901 .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 2902 .parent = &cam_cc_titan_top_gdsc.pd, 2903 }; 2904 2905 static struct clk_regmap *cam_cc_hawi_clocks[] = { 2906 [CAM_CC_CAM_TOP_AHB_CLK] = &cam_cc_cam_top_ahb_clk.clkr, 2907 [CAM_CC_CAM_TOP_FAST_AHB_CLK] = &cam_cc_cam_top_fast_ahb_clk.clkr, 2908 [CAM_CC_CAMNOC_NRT_AXI_CLK] = &cam_cc_camnoc_nrt_axi_clk.clkr, 2909 [CAM_CC_CAMNOC_NRT_CRE_CLK] = &cam_cc_camnoc_nrt_cre_clk.clkr, 2910 [CAM_CC_CAMNOC_NRT_IPE_NPS_CLK] = &cam_cc_camnoc_nrt_ipe_nps_clk.clkr, 2911 [CAM_CC_CAMNOC_NRT_IPE_SCALERS_CLK] = &cam_cc_camnoc_nrt_ipe_scalers_clk.clkr, 2912 [CAM_CC_CAMNOC_NRT_OFE_MAIN_CLK] = &cam_cc_camnoc_nrt_ofe_main_clk.clkr, 2913 [CAM_CC_CAMNOC_NRT_SQPF_CLK] = &cam_cc_camnoc_nrt_sqpf_clk.clkr, 2914 [CAM_CC_CAMNOC_RT_AXI_CLK] = &cam_cc_camnoc_rt_axi_clk.clkr, 2915 [CAM_CC_CAMNOC_RT_AXI_CLK_SRC] = &cam_cc_camnoc_rt_axi_clk_src.clkr, 2916 [CAM_CC_CAMNOC_RT_IFE_LITE_CLK] = &cam_cc_camnoc_rt_ife_lite_clk.clkr, 2917 [CAM_CC_CAMNOC_RT_TFE_0_MAIN_CLK] = &cam_cc_camnoc_rt_tfe_0_main_clk.clkr, 2918 [CAM_CC_CAMNOC_RT_TFE_1_MAIN_CLK] = &cam_cc_camnoc_rt_tfe_1_main_clk.clkr, 2919 [CAM_CC_CAMNOC_RT_TFE_2_MAIN_CLK] = &cam_cc_camnoc_rt_tfe_2_main_clk.clkr, 2920 [CAM_CC_CCI_0_CLK] = &cam_cc_cci_0_clk.clkr, 2921 [CAM_CC_CCI_0_CLK_SRC] = &cam_cc_cci_0_clk_src.clkr, 2922 [CAM_CC_CCI_1_CLK] = &cam_cc_cci_1_clk.clkr, 2923 [CAM_CC_CCI_1_CLK_SRC] = &cam_cc_cci_1_clk_src.clkr, 2924 [CAM_CC_CCI_2_CLK] = &cam_cc_cci_2_clk.clkr, 2925 [CAM_CC_CCI_2_CLK_SRC] = &cam_cc_cci_2_clk_src.clkr, 2926 [CAM_CC_CORE_AHB_CLK] = &cam_cc_core_ahb_clk.clkr, 2927 [CAM_CC_CPHY_RX_CLK_SRC] = &cam_cc_cphy_rx_clk_src.clkr, 2928 [CAM_CC_CRE_AHB_CLK] = &cam_cc_cre_ahb_clk.clkr, 2929 [CAM_CC_CRE_CLK] = &cam_cc_cre_clk.clkr, 2930 [CAM_CC_CRE_CLK_SRC] = &cam_cc_cre_clk_src.clkr, 2931 [CAM_CC_CSI0PHYTIMER_CLK] = &cam_cc_csi0phytimer_clk.clkr, 2932 [CAM_CC_CSI0PHYTIMER_CLK_SRC] = &cam_cc_csi0phytimer_clk_src.clkr, 2933 [CAM_CC_CSI1PHYTIMER_CLK] = &cam_cc_csi1phytimer_clk.clkr, 2934 [CAM_CC_CSI1PHYTIMER_CLK_SRC] = &cam_cc_csi1phytimer_clk_src.clkr, 2935 [CAM_CC_CSI2PHYTIMER_CLK] = &cam_cc_csi2phytimer_clk.clkr, 2936 [CAM_CC_CSI2PHYTIMER_CLK_SRC] = &cam_cc_csi2phytimer_clk_src.clkr, 2937 [CAM_CC_CSI3PHYTIMER_CLK] = &cam_cc_csi3phytimer_clk.clkr, 2938 [CAM_CC_CSI3PHYTIMER_CLK_SRC] = &cam_cc_csi3phytimer_clk_src.clkr, 2939 [CAM_CC_CSI4PHYTIMER_CLK] = &cam_cc_csi4phytimer_clk.clkr, 2940 [CAM_CC_CSI4PHYTIMER_CLK_SRC] = &cam_cc_csi4phytimer_clk_src.clkr, 2941 [CAM_CC_CSI5PHYTIMER_CLK] = &cam_cc_csi5phytimer_clk.clkr, 2942 [CAM_CC_CSI5PHYTIMER_CLK_SRC] = &cam_cc_csi5phytimer_clk_src.clkr, 2943 [CAM_CC_CSID_CLK] = &cam_cc_csid_clk.clkr, 2944 [CAM_CC_CSID_CLK_SRC] = &cam_cc_csid_clk_src.clkr, 2945 [CAM_CC_CSID_CSIPHY_RX_CLK] = &cam_cc_csid_csiphy_rx_clk.clkr, 2946 [CAM_CC_CSIPHY0_CLK] = &cam_cc_csiphy0_clk.clkr, 2947 [CAM_CC_CSIPHY1_CLK] = &cam_cc_csiphy1_clk.clkr, 2948 [CAM_CC_CSIPHY2_CLK] = &cam_cc_csiphy2_clk.clkr, 2949 [CAM_CC_CSIPHY3_CLK] = &cam_cc_csiphy3_clk.clkr, 2950 [CAM_CC_CSIPHY4_CLK] = &cam_cc_csiphy4_clk.clkr, 2951 [CAM_CC_CSIPHY5_CLK] = &cam_cc_csiphy5_clk.clkr, 2952 [CAM_CC_FAST_AHB_CLK_SRC] = &cam_cc_fast_ahb_clk_src.clkr, 2953 [CAM_CC_ICP_0_AHB_CLK] = &cam_cc_icp_0_ahb_clk.clkr, 2954 [CAM_CC_ICP_0_CLK] = &cam_cc_icp_0_clk.clkr, 2955 [CAM_CC_ICP_0_CLK_SRC] = &cam_cc_icp_0_clk_src.clkr, 2956 [CAM_CC_ICP_1_AHB_CLK] = &cam_cc_icp_1_ahb_clk.clkr, 2957 [CAM_CC_ICP_1_CLK] = &cam_cc_icp_1_clk.clkr, 2958 [CAM_CC_ICP_1_CLK_SRC] = &cam_cc_icp_1_clk_src.clkr, 2959 [CAM_CC_IFE_LITE_AHB_CLK] = &cam_cc_ife_lite_ahb_clk.clkr, 2960 [CAM_CC_IFE_LITE_CLK] = &cam_cc_ife_lite_clk.clkr, 2961 [CAM_CC_IFE_LITE_CLK_SRC] = &cam_cc_ife_lite_clk_src.clkr, 2962 [CAM_CC_IFE_LITE_CPHY_RX_CLK] = &cam_cc_ife_lite_cphy_rx_clk.clkr, 2963 [CAM_CC_IFE_LITE_CSID_CLK] = &cam_cc_ife_lite_csid_clk.clkr, 2964 [CAM_CC_IFE_LITE_CSID_CLK_SRC] = &cam_cc_ife_lite_csid_clk_src.clkr, 2965 [CAM_CC_IPE_NPS_AHB_CLK] = &cam_cc_ipe_nps_ahb_clk.clkr, 2966 [CAM_CC_IPE_NPS_CLK] = &cam_cc_ipe_nps_clk.clkr, 2967 [CAM_CC_IPE_NPS_CLK_SRC] = &cam_cc_ipe_nps_clk_src.clkr, 2968 [CAM_CC_IPE_NPS_FAST_AHB_CLK] = &cam_cc_ipe_nps_fast_ahb_clk.clkr, 2969 [CAM_CC_IPE_PPS_CLK] = &cam_cc_ipe_pps_clk.clkr, 2970 [CAM_CC_IPE_PPS_FAST_AHB_CLK] = &cam_cc_ipe_pps_fast_ahb_clk.clkr, 2971 [CAM_CC_IPE_SCALERS_CLK] = &cam_cc_ipe_scalers_clk.clkr, 2972 [CAM_CC_IPE_SCALERS_FAST_AHB_CLK] = &cam_cc_ipe_scalers_fast_ahb_clk.clkr, 2973 [CAM_CC_JPEG_CLK] = &cam_cc_jpeg_clk.clkr, 2974 [CAM_CC_JPEG_CLK_SRC] = &cam_cc_jpeg_clk_src.clkr, 2975 [CAM_CC_OFE_AHB_CLK] = &cam_cc_ofe_ahb_clk.clkr, 2976 [CAM_CC_OFE_ANCHOR_CLK] = &cam_cc_ofe_anchor_clk.clkr, 2977 [CAM_CC_OFE_ANCHOR_FAST_AHB_CLK] = &cam_cc_ofe_anchor_fast_ahb_clk.clkr, 2978 [CAM_CC_OFE_CLK_SRC] = &cam_cc_ofe_clk_src.clkr, 2979 [CAM_CC_OFE_HDR_CLK] = &cam_cc_ofe_hdr_clk.clkr, 2980 [CAM_CC_OFE_HDR_FAST_AHB_CLK] = &cam_cc_ofe_hdr_fast_ahb_clk.clkr, 2981 [CAM_CC_OFE_MAIN_CLK] = &cam_cc_ofe_main_clk.clkr, 2982 [CAM_CC_OFE_MAIN_FAST_AHB_CLK] = &cam_cc_ofe_main_fast_ahb_clk.clkr, 2983 [CAM_CC_OFE_MP_CLK] = &cam_cc_ofe_mp_clk.clkr, 2984 [CAM_CC_OFE_MP_FAST_AHB_CLK] = &cam_cc_ofe_mp_fast_ahb_clk.clkr, 2985 [CAM_CC_PLL0] = &cam_cc_pll0.clkr, 2986 [CAM_CC_PLL0_OUT_EVEN] = &cam_cc_pll0_out_even.clkr, 2987 [CAM_CC_PLL0_OUT_ODD] = &cam_cc_pll0_out_odd.clkr, 2988 [CAM_CC_PLL1] = &cam_cc_pll1.clkr, 2989 [CAM_CC_PLL1_OUT_EVEN] = &cam_cc_pll1_out_even.clkr, 2990 [CAM_CC_PLL2] = &cam_cc_pll2.clkr, 2991 [CAM_CC_PLL2_OUT_EVEN] = &cam_cc_pll2_out_even.clkr, 2992 [CAM_CC_PLL3] = &cam_cc_pll3.clkr, 2993 [CAM_CC_PLL3_OUT_EVEN] = &cam_cc_pll3_out_even.clkr, 2994 [CAM_CC_PLL4] = &cam_cc_pll4.clkr, 2995 [CAM_CC_PLL4_OUT_EVEN] = &cam_cc_pll4_out_even.clkr, 2996 [CAM_CC_PLL5] = &cam_cc_pll5.clkr, 2997 [CAM_CC_PLL5_OUT_EVEN] = &cam_cc_pll5_out_even.clkr, 2998 [CAM_CC_PLL6] = &cam_cc_pll6.clkr, 2999 [CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr, 3000 [CAM_CC_PLL6_OUT_ODD] = &cam_cc_pll6_out_odd.clkr, 3001 [CAM_CC_PLL7] = &cam_cc_pll7.clkr, 3002 [CAM_CC_PLL8] = &cam_cc_pll8.clkr, 3003 [CAM_CC_PLL8_OUT_EVEN] = &cam_cc_pll8_out_even.clkr, 3004 [CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr, 3005 [CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr, 3006 [CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr, 3007 [CAM_CC_SLOW_AHB_CLK_SRC] = &cam_cc_slow_ahb_clk_src.clkr, 3008 [CAM_CC_SQPF_AHB_CLK] = &cam_cc_sqpf_ahb_clk.clkr, 3009 [CAM_CC_SQPF_CLK] = &cam_cc_sqpf_clk.clkr, 3010 [CAM_CC_SQPF_CLK_SRC] = &cam_cc_sqpf_clk_src.clkr, 3011 [CAM_CC_SQPF_FAST_AHB_CLK] = &cam_cc_sqpf_fast_ahb_clk.clkr, 3012 [CAM_CC_TFE_0_BAYER_CLK] = &cam_cc_tfe_0_bayer_clk.clkr, 3013 [CAM_CC_TFE_0_BAYER_FAST_AHB_CLK] = &cam_cc_tfe_0_bayer_fast_ahb_clk.clkr, 3014 [CAM_CC_TFE_0_CLK_SRC] = &cam_cc_tfe_0_clk_src.clkr, 3015 [CAM_CC_TFE_0_MAIN_CLK] = &cam_cc_tfe_0_main_clk.clkr, 3016 [CAM_CC_TFE_0_MAIN_FAST_AHB_CLK] = &cam_cc_tfe_0_main_fast_ahb_clk.clkr, 3017 [CAM_CC_TFE_1_BAYER_CLK] = &cam_cc_tfe_1_bayer_clk.clkr, 3018 [CAM_CC_TFE_1_BAYER_FAST_AHB_CLK] = &cam_cc_tfe_1_bayer_fast_ahb_clk.clkr, 3019 [CAM_CC_TFE_1_CLK_SRC] = &cam_cc_tfe_1_clk_src.clkr, 3020 [CAM_CC_TFE_1_MAIN_CLK] = &cam_cc_tfe_1_main_clk.clkr, 3021 [CAM_CC_TFE_1_MAIN_FAST_AHB_CLK] = &cam_cc_tfe_1_main_fast_ahb_clk.clkr, 3022 [CAM_CC_TFE_2_BAYER_CLK] = &cam_cc_tfe_2_bayer_clk.clkr, 3023 [CAM_CC_TFE_2_BAYER_FAST_AHB_CLK] = &cam_cc_tfe_2_bayer_fast_ahb_clk.clkr, 3024 [CAM_CC_TFE_2_CLK_SRC] = &cam_cc_tfe_2_clk_src.clkr, 3025 [CAM_CC_TFE_2_MAIN_CLK] = &cam_cc_tfe_2_main_clk.clkr, 3026 [CAM_CC_TFE_2_MAIN_FAST_AHB_CLK] = &cam_cc_tfe_2_main_fast_ahb_clk.clkr, 3027 [CAM_CC_TITAN_MNOC_HF_CLK] = &cam_cc_titan_mnoc_hf_clk.clkr, 3028 [CAM_CC_TITAN_MNOC_SF_CLK] = &cam_cc_titan_mnoc_sf_clk.clkr, 3029 [CAM_CC_TRACENOC_TPDM_1_CMB_CLK] = &cam_cc_tracenoc_tpdm_1_cmb_clk.clkr, 3030 [CAM_CC_XO_CLK_SRC] = &cam_cc_xo_clk_src.clkr, 3031 }; 3032 3033 static struct gdsc *cam_cc_hawi_gdscs[] = { 3034 [CAM_CC_IPE_0_GDSC] = &cam_cc_ipe_0_gdsc, 3035 [CAM_CC_OFE_GDSC] = &cam_cc_ofe_gdsc, 3036 [CAM_CC_SQPF_GDSC] = &cam_cc_sqpf_gdsc, 3037 [CAM_CC_TFE_0_GDSC] = &cam_cc_tfe_0_gdsc, 3038 [CAM_CC_TFE_1_GDSC] = &cam_cc_tfe_1_gdsc, 3039 [CAM_CC_TFE_2_GDSC] = &cam_cc_tfe_2_gdsc, 3040 [CAM_CC_TITAN_TOP_CX_GDSC] = &cam_cc_titan_top_cx_gdsc, 3041 [CAM_CC_TITAN_TOP_GDSC] = &cam_cc_titan_top_gdsc, 3042 }; 3043 3044 static const struct qcom_reset_map cam_cc_hawi_resets[] = { 3045 [CAM_CC_DRV_BCR] = { 0x213d4 }, 3046 [CAM_CC_ICP_BCR] = { 0x211f4 }, 3047 [CAM_CC_IPE_0_BCR] = { 0x20184 }, 3048 [CAM_CC_OFE_BCR] = { 0x200c4 }, 3049 [CAM_CC_QDSS_DEBUG_BCR] = { 0x2130c }, 3050 [CAM_CC_SQPF_BCR] = { 0x20204 }, 3051 [CAM_CC_TFE_0_BCR] = { 0x21000 }, 3052 [CAM_CC_TFE_1_BCR] = { 0x2107c }, 3053 [CAM_CC_TFE_2_BCR] = { 0x210e0 }, 3054 }; 3055 3056 static struct clk_alpha_pll *cam_cc_hawi_plls[] = { 3057 &cam_cc_pll0, 3058 &cam_cc_pll1, 3059 &cam_cc_pll2, 3060 &cam_cc_pll3, 3061 &cam_cc_pll4, 3062 &cam_cc_pll5, 3063 &cam_cc_pll6, 3064 &cam_cc_pll7, 3065 &cam_cc_pll8, 3066 }; 3067 3068 static const u32 cam_cc_hawi_critical_cbcrs[] = { 3069 0x21308, /* CAM_CC_CAMNOC_DCD_XO_CLK */ 3070 0x2139c, /* CAM_CC_CX_GDSC_CLK */ 3071 0x213e0, /* CAM_CC_DRV_AHB_CLK */ 3072 0x213d8, /* CAM_CC_DRV_XO_CLK */ 3073 0x21360, /* CAM_CC_GDSC_CLK */ 3074 0x213d0, /* CAM_CC_MMSS_AHB_CLK */ 3075 0x21364, /* CAM_CC_SLEEP_CLK */ 3076 0x213a0, /* CAM_CC_TITAN_CAMNOC_XO_CLK */ 3077 }; 3078 3079 static const struct regmap_config cam_cc_hawi_regmap_config = { 3080 .reg_bits = 32, 3081 .reg_stride = 4, 3082 .val_bits = 32, 3083 .max_register = 0x26024, 3084 .fast_io = true, 3085 }; 3086 3087 static const struct qcom_cc_driver_data cam_cc_hawi_driver_data = { 3088 .alpha_plls = cam_cc_hawi_plls, 3089 .num_alpha_plls = ARRAY_SIZE(cam_cc_hawi_plls), 3090 .clk_cbcrs = cam_cc_hawi_critical_cbcrs, 3091 .num_clk_cbcrs = ARRAY_SIZE(cam_cc_hawi_critical_cbcrs), 3092 }; 3093 3094 static const struct qcom_cc_desc cam_cc_hawi_desc = { 3095 .config = &cam_cc_hawi_regmap_config, 3096 .clks = cam_cc_hawi_clocks, 3097 .num_clks = ARRAY_SIZE(cam_cc_hawi_clocks), 3098 .resets = cam_cc_hawi_resets, 3099 .num_resets = ARRAY_SIZE(cam_cc_hawi_resets), 3100 .gdscs = cam_cc_hawi_gdscs, 3101 .num_gdscs = ARRAY_SIZE(cam_cc_hawi_gdscs), 3102 .use_rpm = true, 3103 .driver_data = &cam_cc_hawi_driver_data, 3104 }; 3105 3106 static const struct of_device_id cam_cc_hawi_match_table[] = { 3107 { .compatible = "qcom,hawi-camcc" }, 3108 { .compatible = "qcom,maili-camcc" }, 3109 { } 3110 }; 3111 MODULE_DEVICE_TABLE(of, cam_cc_hawi_match_table); 3112 3113 static int cam_cc_hawi_probe(struct platform_device *pdev) 3114 { 3115 if (device_is_compatible(&pdev->dev, "qcom,maili-camcc")) { 3116 cam_cc_pll0.config = &cam_cc_pll0_config_maili; 3117 cam_cc_pll1.config = &cam_cc_pll1_config_maili; 3118 cam_cc_pll2.config = &cam_cc_pll2_config_maili; 3119 cam_cc_pll3.config = &cam_cc_pll3_config_maili; 3120 cam_cc_pll4.config = &cam_cc_pll4_config_maili; 3121 cam_cc_pll5.config = &cam_cc_pll5_config_maili; 3122 cam_cc_pll6.config = &cam_cc_pll6_config_maili; 3123 cam_cc_pll7.config = &cam_cc_pll7_config_maili; 3124 cam_cc_pll8.config = &cam_cc_pll8_config_maili; 3125 3126 cam_cc_camnoc_rt_axi_clk_src.freq_tbl = ftbl_cam_cc_camnoc_rt_axi_clk_src_maili; 3127 cam_cc_cci_0_clk_src.freq_tbl = ftbl_cam_cc_cci_0_clk_src_maili; 3128 cam_cc_cci_1_clk_src.freq_tbl = ftbl_cam_cc_cci_0_clk_src_maili; 3129 cam_cc_ofe_clk_src.freq_tbl = ftbl_cam_cc_ofe_clk_src_maili; 3130 3131 cam_cc_hawi_clocks[CAM_CC_CCI_2_CLK_SRC] = NULL; 3132 cam_cc_hawi_clocks[CAM_CC_CCI_2_CLK] = NULL; 3133 cam_cc_hawi_clocks[CAM_CC_CSI5PHYTIMER_CLK_SRC] = NULL; 3134 cam_cc_hawi_clocks[CAM_CC_CSI5PHYTIMER_CLK] = NULL; 3135 cam_cc_hawi_clocks[CAM_CC_CSIPHY5_CLK] = NULL; 3136 } 3137 3138 return qcom_cc_probe(pdev, &cam_cc_hawi_desc); 3139 } 3140 3141 static struct platform_driver cam_cc_hawi_driver = { 3142 .probe = cam_cc_hawi_probe, 3143 .driver = { 3144 .name = "camcc-hawi", 3145 .of_match_table = cam_cc_hawi_match_table, 3146 }, 3147 }; 3148 3149 module_platform_driver(cam_cc_hawi_driver); 3150 3151 MODULE_DESCRIPTION("QTI CAMCC Hawi Driver"); 3152 MODULE_LICENSE("GPL"); 3153