Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch '20230707035744.22245-2-quic_jkona@quicinc.com' into clk-for-6.7

Merge the SM8550 camera clock controller patches through a topic branch,
to make them available for the DeviceTree source as well.

+3796 -2
+6 -2
Documentation/devicetree/bindings/clock/qcom,sm8450-camcc.yaml
··· 13 13 Qualcomm camera clock control module provides the clocks, resets and power 14 14 domains on SM8450. 15 15 16 - See also:: include/dt-bindings/clock/qcom,sm8450-camcc.h 16 + See also:: 17 + include/dt-bindings/clock/qcom,sm8450-camcc.h 18 + include/dt-bindings/clock/qcom,sm8550-camcc.h 17 19 18 20 properties: 19 21 compatible: 20 - const: qcom,sm8450-camcc 22 + enum: 23 + - qcom,sm8450-camcc 24 + - qcom,sm8550-camcc 21 25 22 26 clocks: 23 27 items:
+7
drivers/clk/qcom/Kconfig
··· 764 764 Support for the camera clock controller on SM8450 devices. 765 765 Say Y if you want to support camera devices and camera functionality. 766 766 767 + config SM_CAMCC_8550 768 + tristate "SM8550 Camera Clock Controller" 769 + select SM_GCC_8550 770 + help 771 + Support for the camera clock controller on SM8550 devices. 772 + Say Y if you want to support camera devices and camera functionality. 773 + 767 774 config SM_DISPCC_6115 768 775 tristate "SM6115 Display Clock Controller" 769 776 depends on ARM64 || COMPILE_TEST
+1
drivers/clk/qcom/Makefile
··· 102 102 obj-$(CONFIG_SM_CAMCC_6350) += camcc-sm6350.o 103 103 obj-$(CONFIG_SM_CAMCC_8250) += camcc-sm8250.o 104 104 obj-$(CONFIG_SM_CAMCC_8450) += camcc-sm8450.o 105 + obj-$(CONFIG_SM_CAMCC_8550) += camcc-sm8550.o 105 106 obj-$(CONFIG_SM_DISPCC_6115) += dispcc-sm6115.o 106 107 obj-$(CONFIG_SM_DISPCC_6125) += dispcc-sm6125.o 107 108 obj-$(CONFIG_SM_DISPCC_6350) += dispcc-sm6350.o
+3564
drivers/clk/qcom/camcc-sm8550.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. 4 + */ 5 + 6 + #include <linux/clk-provider.h> 7 + #include <linux/module.h> 8 + #include <linux/of_device.h> 9 + #include <linux/pm_runtime.h> 10 + #include <linux/regmap.h> 11 + 12 + #include <dt-bindings/clock/qcom,sm8550-camcc.h> 13 + 14 + #include "clk-alpha-pll.h" 15 + #include "clk-branch.h" 16 + #include "clk-rcg.h" 17 + #include "clk-regmap.h" 18 + #include "common.h" 19 + #include "gdsc.h" 20 + #include "reset.h" 21 + 22 + enum { 23 + DT_IFACE, 24 + DT_BI_TCXO, 25 + DT_BI_TCXO_AO, 26 + DT_SLEEP_CLK, 27 + }; 28 + 29 + enum { 30 + P_BI_TCXO, 31 + P_BI_TCXO_AO, 32 + P_CAM_CC_PLL0_OUT_EVEN, 33 + P_CAM_CC_PLL0_OUT_MAIN, 34 + P_CAM_CC_PLL0_OUT_ODD, 35 + P_CAM_CC_PLL1_OUT_EVEN, 36 + P_CAM_CC_PLL2_OUT_EVEN, 37 + P_CAM_CC_PLL2_OUT_MAIN, 38 + P_CAM_CC_PLL3_OUT_EVEN, 39 + P_CAM_CC_PLL4_OUT_EVEN, 40 + P_CAM_CC_PLL5_OUT_EVEN, 41 + P_CAM_CC_PLL6_OUT_EVEN, 42 + P_CAM_CC_PLL7_OUT_EVEN, 43 + P_CAM_CC_PLL8_OUT_EVEN, 44 + P_CAM_CC_PLL9_OUT_EVEN, 45 + P_CAM_CC_PLL9_OUT_ODD, 46 + P_CAM_CC_PLL10_OUT_EVEN, 47 + P_CAM_CC_PLL11_OUT_EVEN, 48 + P_CAM_CC_PLL12_OUT_EVEN, 49 + P_SLEEP_CLK, 50 + }; 51 + 52 + static const struct pll_vco lucid_ole_vco[] = { 53 + { 249600000, 2300000000, 0 }, 54 + }; 55 + 56 + static const struct pll_vco rivian_ole_vco[] = { 57 + { 777000000, 1285000000, 0 }, 58 + }; 59 + 60 + static const struct alpha_pll_config cam_cc_pll0_config = { 61 + .l = 0x3e, 62 + .alpha = 0x8000, 63 + .config_ctl_val = 0x20485699, 64 + .config_ctl_hi_val = 0x00182261, 65 + .config_ctl_hi1_val = 0x82aa299c, 66 + .test_ctl_val = 0x00000000, 67 + .test_ctl_hi_val = 0x00000003, 68 + .test_ctl_hi1_val = 0x00009000, 69 + .test_ctl_hi2_val = 0x00000034, 70 + .user_ctl_val = 0x00008400, 71 + .user_ctl_hi_val = 0x00000005, 72 + }; 73 + 74 + static struct clk_alpha_pll cam_cc_pll0 = { 75 + .offset = 0x0, 76 + .vco_table = lucid_ole_vco, 77 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 78 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 79 + .clkr = { 80 + .hw.init = &(const struct clk_init_data) { 81 + .name = "cam_cc_pll0", 82 + .parent_data = &(const struct clk_parent_data) { 83 + .index = DT_BI_TCXO, 84 + }, 85 + .num_parents = 1, 86 + .ops = &clk_alpha_pll_lucid_evo_ops, 87 + }, 88 + }, 89 + }; 90 + 91 + static const struct clk_div_table post_div_table_cam_cc_pll0_out_even[] = { 92 + { 0x1, 2 }, 93 + { } 94 + }; 95 + 96 + static struct clk_alpha_pll_postdiv cam_cc_pll0_out_even = { 97 + .offset = 0x0, 98 + .post_div_shift = 10, 99 + .post_div_table = post_div_table_cam_cc_pll0_out_even, 100 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_even), 101 + .width = 4, 102 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 103 + .clkr.hw.init = &(const struct clk_init_data) { 104 + .name = "cam_cc_pll0_out_even", 105 + .parent_hws = (const struct clk_hw*[]) { 106 + &cam_cc_pll0.clkr.hw, 107 + }, 108 + .num_parents = 1, 109 + .flags = CLK_SET_RATE_PARENT, 110 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 111 + }, 112 + }; 113 + 114 + static const struct clk_div_table post_div_table_cam_cc_pll0_out_odd[] = { 115 + { 0x2, 3 }, 116 + { } 117 + }; 118 + 119 + static struct clk_alpha_pll_postdiv cam_cc_pll0_out_odd = { 120 + .offset = 0x0, 121 + .post_div_shift = 14, 122 + .post_div_table = post_div_table_cam_cc_pll0_out_odd, 123 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_odd), 124 + .width = 4, 125 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 126 + .clkr.hw.init = &(const struct clk_init_data) { 127 + .name = "cam_cc_pll0_out_odd", 128 + .parent_hws = (const struct clk_hw*[]) { 129 + &cam_cc_pll0.clkr.hw, 130 + }, 131 + .num_parents = 1, 132 + .flags = CLK_SET_RATE_PARENT, 133 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 134 + }, 135 + }; 136 + 137 + static const struct alpha_pll_config cam_cc_pll1_config = { 138 + .l = 0x2f, 139 + .alpha = 0x6555, 140 + .config_ctl_val = 0x20485699, 141 + .config_ctl_hi_val = 0x00182261, 142 + .config_ctl_hi1_val = 0x82aa299c, 143 + .test_ctl_val = 0x00000000, 144 + .test_ctl_hi_val = 0x00000003, 145 + .test_ctl_hi1_val = 0x00009000, 146 + .test_ctl_hi2_val = 0x00000034, 147 + .user_ctl_val = 0x00000400, 148 + .user_ctl_hi_val = 0x00000005, 149 + }; 150 + 151 + static struct clk_alpha_pll cam_cc_pll1 = { 152 + .offset = 0x1000, 153 + .vco_table = lucid_ole_vco, 154 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 155 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 156 + .clkr = { 157 + .hw.init = &(const struct clk_init_data) { 158 + .name = "cam_cc_pll1", 159 + .parent_data = &(const struct clk_parent_data) { 160 + .index = DT_BI_TCXO, 161 + }, 162 + .num_parents = 1, 163 + .ops = &clk_alpha_pll_lucid_evo_ops, 164 + }, 165 + }, 166 + }; 167 + 168 + static const struct clk_div_table post_div_table_cam_cc_pll1_out_even[] = { 169 + { 0x1, 2 }, 170 + { } 171 + }; 172 + 173 + static struct clk_alpha_pll_postdiv cam_cc_pll1_out_even = { 174 + .offset = 0x1000, 175 + .post_div_shift = 10, 176 + .post_div_table = post_div_table_cam_cc_pll1_out_even, 177 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll1_out_even), 178 + .width = 4, 179 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 180 + .clkr.hw.init = &(const struct clk_init_data) { 181 + .name = "cam_cc_pll1_out_even", 182 + .parent_hws = (const struct clk_hw*[]) { 183 + &cam_cc_pll1.clkr.hw, 184 + }, 185 + .num_parents = 1, 186 + .flags = CLK_SET_RATE_PARENT, 187 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 188 + }, 189 + }; 190 + 191 + static const struct alpha_pll_config cam_cc_pll2_config = { 192 + .l = 0x32, 193 + .alpha = 0x0, 194 + .config_ctl_val = 0x10000030, 195 + .config_ctl_hi_val = 0x80890263, 196 + .config_ctl_hi1_val = 0x00000217, 197 + .user_ctl_val = 0x00000000, 198 + .user_ctl_hi_val = 0x00100000, 199 + }; 200 + 201 + static struct clk_alpha_pll cam_cc_pll2 = { 202 + .offset = 0x2000, 203 + .vco_table = rivian_ole_vco, 204 + .num_vco = ARRAY_SIZE(rivian_ole_vco), 205 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO], 206 + .clkr = { 207 + .hw.init = &(const struct clk_init_data) { 208 + .name = "cam_cc_pll2", 209 + .parent_data = &(const struct clk_parent_data) { 210 + .index = DT_BI_TCXO, 211 + }, 212 + .num_parents = 1, 213 + .ops = &clk_alpha_pll_rivian_evo_ops, 214 + }, 215 + }, 216 + }; 217 + 218 + static const struct alpha_pll_config cam_cc_pll3_config = { 219 + .l = 0x30, 220 + .alpha = 0x8aaa, 221 + .config_ctl_val = 0x20485699, 222 + .config_ctl_hi_val = 0x00182261, 223 + .config_ctl_hi1_val = 0x82aa299c, 224 + .test_ctl_val = 0x00000000, 225 + .test_ctl_hi_val = 0x00000003, 226 + .test_ctl_hi1_val = 0x00009000, 227 + .test_ctl_hi2_val = 0x00000034, 228 + .user_ctl_val = 0x00000400, 229 + .user_ctl_hi_val = 0x00000005, 230 + }; 231 + 232 + static struct clk_alpha_pll cam_cc_pll3 = { 233 + .offset = 0x3000, 234 + .vco_table = lucid_ole_vco, 235 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 236 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 237 + .clkr = { 238 + .hw.init = &(const struct clk_init_data) { 239 + .name = "cam_cc_pll3", 240 + .parent_data = &(const struct clk_parent_data) { 241 + .index = DT_BI_TCXO, 242 + }, 243 + .num_parents = 1, 244 + .ops = &clk_alpha_pll_lucid_evo_ops, 245 + }, 246 + }, 247 + }; 248 + 249 + static const struct clk_div_table post_div_table_cam_cc_pll3_out_even[] = { 250 + { 0x1, 2 }, 251 + { } 252 + }; 253 + 254 + static struct clk_alpha_pll_postdiv cam_cc_pll3_out_even = { 255 + .offset = 0x3000, 256 + .post_div_shift = 10, 257 + .post_div_table = post_div_table_cam_cc_pll3_out_even, 258 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll3_out_even), 259 + .width = 4, 260 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 261 + .clkr.hw.init = &(const struct clk_init_data) { 262 + .name = "cam_cc_pll3_out_even", 263 + .parent_hws = (const struct clk_hw*[]) { 264 + &cam_cc_pll3.clkr.hw, 265 + }, 266 + .num_parents = 1, 267 + .flags = CLK_SET_RATE_PARENT, 268 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 269 + }, 270 + }; 271 + 272 + static const struct alpha_pll_config cam_cc_pll4_config = { 273 + .l = 0x30, 274 + .alpha = 0x8aaa, 275 + .config_ctl_val = 0x20485699, 276 + .config_ctl_hi_val = 0x00182261, 277 + .config_ctl_hi1_val = 0x82aa299c, 278 + .test_ctl_val = 0x00000000, 279 + .test_ctl_hi_val = 0x00000003, 280 + .test_ctl_hi1_val = 0x00009000, 281 + .test_ctl_hi2_val = 0x00000034, 282 + .user_ctl_val = 0x00000400, 283 + .user_ctl_hi_val = 0x00000005, 284 + }; 285 + 286 + static struct clk_alpha_pll cam_cc_pll4 = { 287 + .offset = 0x4000, 288 + .vco_table = lucid_ole_vco, 289 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 290 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 291 + .clkr = { 292 + .hw.init = &(const struct clk_init_data) { 293 + .name = "cam_cc_pll4", 294 + .parent_data = &(const struct clk_parent_data) { 295 + .index = DT_BI_TCXO, 296 + }, 297 + .num_parents = 1, 298 + .ops = &clk_alpha_pll_lucid_evo_ops, 299 + }, 300 + }, 301 + }; 302 + 303 + static const struct clk_div_table post_div_table_cam_cc_pll4_out_even[] = { 304 + { 0x1, 2 }, 305 + { } 306 + }; 307 + 308 + static struct clk_alpha_pll_postdiv cam_cc_pll4_out_even = { 309 + .offset = 0x4000, 310 + .post_div_shift = 10, 311 + .post_div_table = post_div_table_cam_cc_pll4_out_even, 312 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll4_out_even), 313 + .width = 4, 314 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 315 + .clkr.hw.init = &(const struct clk_init_data) { 316 + .name = "cam_cc_pll4_out_even", 317 + .parent_hws = (const struct clk_hw*[]) { 318 + &cam_cc_pll4.clkr.hw, 319 + }, 320 + .num_parents = 1, 321 + .flags = CLK_SET_RATE_PARENT, 322 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 323 + }, 324 + }; 325 + 326 + static const struct alpha_pll_config cam_cc_pll5_config = { 327 + .l = 0x30, 328 + .alpha = 0x8aaa, 329 + .config_ctl_val = 0x20485699, 330 + .config_ctl_hi_val = 0x00182261, 331 + .config_ctl_hi1_val = 0x82aa299c, 332 + .test_ctl_val = 0x00000000, 333 + .test_ctl_hi_val = 0x00000003, 334 + .test_ctl_hi1_val = 0x00009000, 335 + .test_ctl_hi2_val = 0x00000034, 336 + .user_ctl_val = 0x00000400, 337 + .user_ctl_hi_val = 0x00000005, 338 + }; 339 + 340 + static struct clk_alpha_pll cam_cc_pll5 = { 341 + .offset = 0x5000, 342 + .vco_table = lucid_ole_vco, 343 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 344 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 345 + .clkr = { 346 + .hw.init = &(const struct clk_init_data) { 347 + .name = "cam_cc_pll5", 348 + .parent_data = &(const struct clk_parent_data) { 349 + .index = DT_BI_TCXO, 350 + }, 351 + .num_parents = 1, 352 + .ops = &clk_alpha_pll_lucid_evo_ops, 353 + }, 354 + }, 355 + }; 356 + 357 + static const struct clk_div_table post_div_table_cam_cc_pll5_out_even[] = { 358 + { 0x1, 2 }, 359 + { } 360 + }; 361 + 362 + static struct clk_alpha_pll_postdiv cam_cc_pll5_out_even = { 363 + .offset = 0x5000, 364 + .post_div_shift = 10, 365 + .post_div_table = post_div_table_cam_cc_pll5_out_even, 366 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll5_out_even), 367 + .width = 4, 368 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 369 + .clkr.hw.init = &(const struct clk_init_data) { 370 + .name = "cam_cc_pll5_out_even", 371 + .parent_hws = (const struct clk_hw*[]) { 372 + &cam_cc_pll5.clkr.hw, 373 + }, 374 + .num_parents = 1, 375 + .flags = CLK_SET_RATE_PARENT, 376 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 377 + }, 378 + }; 379 + 380 + static const struct alpha_pll_config cam_cc_pll6_config = { 381 + .l = 0x30, 382 + .alpha = 0x8aaa, 383 + .config_ctl_val = 0x20485699, 384 + .config_ctl_hi_val = 0x00182261, 385 + .config_ctl_hi1_val = 0x82aa299c, 386 + .test_ctl_val = 0x00000000, 387 + .test_ctl_hi_val = 0x00000003, 388 + .test_ctl_hi1_val = 0x00009000, 389 + .test_ctl_hi2_val = 0x00000034, 390 + .user_ctl_val = 0x00000400, 391 + .user_ctl_hi_val = 0x00000005, 392 + }; 393 + 394 + static struct clk_alpha_pll cam_cc_pll6 = { 395 + .offset = 0x6000, 396 + .vco_table = lucid_ole_vco, 397 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 398 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 399 + .clkr = { 400 + .hw.init = &(const struct clk_init_data) { 401 + .name = "cam_cc_pll6", 402 + .parent_data = &(const struct clk_parent_data) { 403 + .index = DT_BI_TCXO, 404 + }, 405 + .num_parents = 1, 406 + .ops = &clk_alpha_pll_lucid_evo_ops, 407 + }, 408 + }, 409 + }; 410 + 411 + static const struct clk_div_table post_div_table_cam_cc_pll6_out_even[] = { 412 + { 0x1, 2 }, 413 + { } 414 + }; 415 + 416 + static struct clk_alpha_pll_postdiv cam_cc_pll6_out_even = { 417 + .offset = 0x6000, 418 + .post_div_shift = 10, 419 + .post_div_table = post_div_table_cam_cc_pll6_out_even, 420 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_even), 421 + .width = 4, 422 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 423 + .clkr.hw.init = &(const struct clk_init_data) { 424 + .name = "cam_cc_pll6_out_even", 425 + .parent_hws = (const struct clk_hw*[]) { 426 + &cam_cc_pll6.clkr.hw, 427 + }, 428 + .num_parents = 1, 429 + .flags = CLK_SET_RATE_PARENT, 430 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 431 + }, 432 + }; 433 + 434 + static const struct alpha_pll_config cam_cc_pll7_config = { 435 + .l = 0x30, 436 + .alpha = 0x8aaa, 437 + .config_ctl_val = 0x20485699, 438 + .config_ctl_hi_val = 0x00182261, 439 + .config_ctl_hi1_val = 0x82aa299c, 440 + .test_ctl_val = 0x00000000, 441 + .test_ctl_hi_val = 0x00000003, 442 + .test_ctl_hi1_val = 0x00009000, 443 + .test_ctl_hi2_val = 0x00000034, 444 + .user_ctl_val = 0x00000400, 445 + .user_ctl_hi_val = 0x00000005, 446 + }; 447 + 448 + static struct clk_alpha_pll cam_cc_pll7 = { 449 + .offset = 0x7000, 450 + .vco_table = lucid_ole_vco, 451 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 452 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 453 + .clkr = { 454 + .hw.init = &(const struct clk_init_data) { 455 + .name = "cam_cc_pll7", 456 + .parent_data = &(const struct clk_parent_data) { 457 + .index = DT_BI_TCXO, 458 + }, 459 + .num_parents = 1, 460 + .ops = &clk_alpha_pll_lucid_evo_ops, 461 + }, 462 + }, 463 + }; 464 + 465 + static const struct clk_div_table post_div_table_cam_cc_pll7_out_even[] = { 466 + { 0x1, 2 }, 467 + { } 468 + }; 469 + 470 + static struct clk_alpha_pll_postdiv cam_cc_pll7_out_even = { 471 + .offset = 0x7000, 472 + .post_div_shift = 10, 473 + .post_div_table = post_div_table_cam_cc_pll7_out_even, 474 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll7_out_even), 475 + .width = 4, 476 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 477 + .clkr.hw.init = &(const struct clk_init_data) { 478 + .name = "cam_cc_pll7_out_even", 479 + .parent_hws = (const struct clk_hw*[]) { 480 + &cam_cc_pll7.clkr.hw, 481 + }, 482 + .num_parents = 1, 483 + .flags = CLK_SET_RATE_PARENT, 484 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 485 + }, 486 + }; 487 + 488 + static const struct alpha_pll_config cam_cc_pll8_config = { 489 + .l = 0x14, 490 + .alpha = 0xd555, 491 + .config_ctl_val = 0x20485699, 492 + .config_ctl_hi_val = 0x00182261, 493 + .config_ctl_hi1_val = 0x82aa299c, 494 + .test_ctl_val = 0x00000000, 495 + .test_ctl_hi_val = 0x00000003, 496 + .test_ctl_hi1_val = 0x00009000, 497 + .test_ctl_hi2_val = 0x00000034, 498 + .user_ctl_val = 0x00000400, 499 + .user_ctl_hi_val = 0x00000005, 500 + }; 501 + 502 + static struct clk_alpha_pll cam_cc_pll8 = { 503 + .offset = 0x8000, 504 + .vco_table = lucid_ole_vco, 505 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 506 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 507 + .clkr = { 508 + .hw.init = &(const struct clk_init_data) { 509 + .name = "cam_cc_pll8", 510 + .parent_data = &(const struct clk_parent_data) { 511 + .index = DT_BI_TCXO, 512 + }, 513 + .num_parents = 1, 514 + .ops = &clk_alpha_pll_lucid_evo_ops, 515 + }, 516 + }, 517 + }; 518 + 519 + static const struct clk_div_table post_div_table_cam_cc_pll8_out_even[] = { 520 + { 0x1, 2 }, 521 + { } 522 + }; 523 + 524 + static struct clk_alpha_pll_postdiv cam_cc_pll8_out_even = { 525 + .offset = 0x8000, 526 + .post_div_shift = 10, 527 + .post_div_table = post_div_table_cam_cc_pll8_out_even, 528 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll8_out_even), 529 + .width = 4, 530 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 531 + .clkr.hw.init = &(const struct clk_init_data) { 532 + .name = "cam_cc_pll8_out_even", 533 + .parent_hws = (const struct clk_hw*[]) { 534 + &cam_cc_pll8.clkr.hw, 535 + }, 536 + .num_parents = 1, 537 + .flags = CLK_SET_RATE_PARENT, 538 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 539 + }, 540 + }; 541 + 542 + static const struct alpha_pll_config cam_cc_pll9_config = { 543 + .l = 0x32, 544 + .alpha = 0x0, 545 + .config_ctl_val = 0x20485699, 546 + .config_ctl_hi_val = 0x00182261, 547 + .config_ctl_hi1_val = 0x82aa299c, 548 + .test_ctl_val = 0x00000000, 549 + .test_ctl_hi_val = 0x00000003, 550 + .test_ctl_hi1_val = 0x00009000, 551 + .test_ctl_hi2_val = 0x00000034, 552 + .user_ctl_val = 0x00000400, 553 + .user_ctl_hi_val = 0x00000005, 554 + }; 555 + 556 + static struct clk_alpha_pll cam_cc_pll9 = { 557 + .offset = 0x9000, 558 + .vco_table = lucid_ole_vco, 559 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 560 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 561 + .clkr = { 562 + .hw.init = &(const struct clk_init_data) { 563 + .name = "cam_cc_pll9", 564 + .parent_data = &(const struct clk_parent_data) { 565 + .index = DT_BI_TCXO, 566 + }, 567 + .num_parents = 1, 568 + .ops = &clk_alpha_pll_lucid_evo_ops, 569 + }, 570 + }, 571 + }; 572 + 573 + static const struct clk_div_table post_div_table_cam_cc_pll9_out_even[] = { 574 + { 0x1, 2 }, 575 + { } 576 + }; 577 + 578 + static struct clk_alpha_pll_postdiv cam_cc_pll9_out_even = { 579 + .offset = 0x9000, 580 + .post_div_shift = 10, 581 + .post_div_table = post_div_table_cam_cc_pll9_out_even, 582 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll9_out_even), 583 + .width = 4, 584 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 585 + .clkr.hw.init = &(const struct clk_init_data) { 586 + .name = "cam_cc_pll9_out_even", 587 + .parent_hws = (const struct clk_hw*[]) { 588 + &cam_cc_pll9.clkr.hw, 589 + }, 590 + .num_parents = 1, 591 + .flags = CLK_SET_RATE_PARENT, 592 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 593 + }, 594 + }; 595 + 596 + static const struct alpha_pll_config cam_cc_pll10_config = { 597 + .l = 0x30, 598 + .alpha = 0x8aaa, 599 + .config_ctl_val = 0x20485699, 600 + .config_ctl_hi_val = 0x00182261, 601 + .config_ctl_hi1_val = 0x82aa299c, 602 + .test_ctl_val = 0x00000000, 603 + .test_ctl_hi_val = 0x00000003, 604 + .test_ctl_hi1_val = 0x00009000, 605 + .test_ctl_hi2_val = 0x00000034, 606 + .user_ctl_val = 0x00000400, 607 + .user_ctl_hi_val = 0x00000005, 608 + }; 609 + 610 + static struct clk_alpha_pll cam_cc_pll10 = { 611 + .offset = 0xa000, 612 + .vco_table = lucid_ole_vco, 613 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 614 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 615 + .clkr = { 616 + .hw.init = &(const struct clk_init_data) { 617 + .name = "cam_cc_pll10", 618 + .parent_data = &(const struct clk_parent_data) { 619 + .index = DT_BI_TCXO, 620 + }, 621 + .num_parents = 1, 622 + .ops = &clk_alpha_pll_lucid_evo_ops, 623 + }, 624 + }, 625 + }; 626 + 627 + static const struct clk_div_table post_div_table_cam_cc_pll10_out_even[] = { 628 + { 0x1, 2 }, 629 + { } 630 + }; 631 + 632 + static struct clk_alpha_pll_postdiv cam_cc_pll10_out_even = { 633 + .offset = 0xa000, 634 + .post_div_shift = 10, 635 + .post_div_table = post_div_table_cam_cc_pll10_out_even, 636 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll10_out_even), 637 + .width = 4, 638 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 639 + .clkr.hw.init = &(const struct clk_init_data) { 640 + .name = "cam_cc_pll10_out_even", 641 + .parent_hws = (const struct clk_hw*[]) { 642 + &cam_cc_pll10.clkr.hw, 643 + }, 644 + .num_parents = 1, 645 + .flags = CLK_SET_RATE_PARENT, 646 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 647 + }, 648 + }; 649 + 650 + static const struct alpha_pll_config cam_cc_pll11_config = { 651 + .l = 0x30, 652 + .alpha = 0x8aaa, 653 + .config_ctl_val = 0x20485699, 654 + .config_ctl_hi_val = 0x00182261, 655 + .config_ctl_hi1_val = 0x82aa299c, 656 + .test_ctl_val = 0x00000000, 657 + .test_ctl_hi_val = 0x00000003, 658 + .test_ctl_hi1_val = 0x00009000, 659 + .test_ctl_hi2_val = 0x00000034, 660 + .user_ctl_val = 0x00000400, 661 + .user_ctl_hi_val = 0x00000005, 662 + }; 663 + 664 + static struct clk_alpha_pll cam_cc_pll11 = { 665 + .offset = 0xb000, 666 + .vco_table = lucid_ole_vco, 667 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 668 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 669 + .clkr = { 670 + .hw.init = &(const struct clk_init_data) { 671 + .name = "cam_cc_pll11", 672 + .parent_data = &(const struct clk_parent_data) { 673 + .index = DT_BI_TCXO, 674 + }, 675 + .num_parents = 1, 676 + .ops = &clk_alpha_pll_lucid_evo_ops, 677 + }, 678 + }, 679 + }; 680 + 681 + static const struct clk_div_table post_div_table_cam_cc_pll11_out_even[] = { 682 + { 0x1, 2 }, 683 + { } 684 + }; 685 + 686 + static struct clk_alpha_pll_postdiv cam_cc_pll11_out_even = { 687 + .offset = 0xb000, 688 + .post_div_shift = 10, 689 + .post_div_table = post_div_table_cam_cc_pll11_out_even, 690 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll11_out_even), 691 + .width = 4, 692 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 693 + .clkr.hw.init = &(const struct clk_init_data) { 694 + .name = "cam_cc_pll11_out_even", 695 + .parent_hws = (const struct clk_hw*[]) { 696 + &cam_cc_pll11.clkr.hw, 697 + }, 698 + .num_parents = 1, 699 + .flags = CLK_SET_RATE_PARENT, 700 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 701 + }, 702 + }; 703 + 704 + static const struct alpha_pll_config cam_cc_pll12_config = { 705 + .l = 0x30, 706 + .alpha = 0x8aaa, 707 + .config_ctl_val = 0x20485699, 708 + .config_ctl_hi_val = 0x00182261, 709 + .config_ctl_hi1_val = 0x82aa299c, 710 + .test_ctl_val = 0x00000000, 711 + .test_ctl_hi_val = 0x00000003, 712 + .test_ctl_hi1_val = 0x00009000, 713 + .test_ctl_hi2_val = 0x00000034, 714 + .user_ctl_val = 0x00000400, 715 + .user_ctl_hi_val = 0x00000005, 716 + }; 717 + 718 + static struct clk_alpha_pll cam_cc_pll12 = { 719 + .offset = 0xc000, 720 + .vco_table = lucid_ole_vco, 721 + .num_vco = ARRAY_SIZE(lucid_ole_vco), 722 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 723 + .clkr = { 724 + .hw.init = &(const struct clk_init_data) { 725 + .name = "cam_cc_pll12", 726 + .parent_data = &(const struct clk_parent_data) { 727 + .index = DT_BI_TCXO, 728 + }, 729 + .num_parents = 1, 730 + .ops = &clk_alpha_pll_lucid_evo_ops, 731 + }, 732 + }, 733 + }; 734 + 735 + static const struct clk_div_table post_div_table_cam_cc_pll12_out_even[] = { 736 + { 0x1, 2 }, 737 + { } 738 + }; 739 + 740 + static struct clk_alpha_pll_postdiv cam_cc_pll12_out_even = { 741 + .offset = 0xc000, 742 + .post_div_shift = 10, 743 + .post_div_table = post_div_table_cam_cc_pll12_out_even, 744 + .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll12_out_even), 745 + .width = 4, 746 + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE], 747 + .clkr.hw.init = &(const struct clk_init_data) { 748 + .name = "cam_cc_pll12_out_even", 749 + .parent_hws = (const struct clk_hw*[]) { 750 + &cam_cc_pll12.clkr.hw, 751 + }, 752 + .num_parents = 1, 753 + .flags = CLK_SET_RATE_PARENT, 754 + .ops = &clk_alpha_pll_postdiv_lucid_ole_ops, 755 + }, 756 + }; 757 + 758 + static const struct parent_map cam_cc_parent_map_0[] = { 759 + { P_BI_TCXO, 0 }, 760 + { P_CAM_CC_PLL0_OUT_MAIN, 1 }, 761 + { P_CAM_CC_PLL0_OUT_EVEN, 2 }, 762 + { P_CAM_CC_PLL0_OUT_ODD, 3 }, 763 + { P_CAM_CC_PLL9_OUT_ODD, 4 }, 764 + { P_CAM_CC_PLL9_OUT_EVEN, 5 }, 765 + }; 766 + 767 + static const struct clk_parent_data cam_cc_parent_data_0[] = { 768 + { .index = DT_BI_TCXO }, 769 + { .hw = &cam_cc_pll0.clkr.hw }, 770 + { .hw = &cam_cc_pll0_out_even.clkr.hw }, 771 + { .hw = &cam_cc_pll0_out_odd.clkr.hw }, 772 + { .hw = &cam_cc_pll9.clkr.hw }, 773 + { .hw = &cam_cc_pll9_out_even.clkr.hw }, 774 + }; 775 + 776 + static const struct parent_map cam_cc_parent_map_1[] = { 777 + { P_BI_TCXO, 0 }, 778 + { P_CAM_CC_PLL2_OUT_EVEN, 3 }, 779 + { P_CAM_CC_PLL2_OUT_MAIN, 5 }, 780 + }; 781 + 782 + static const struct clk_parent_data cam_cc_parent_data_1[] = { 783 + { .index = DT_BI_TCXO }, 784 + { .hw = &cam_cc_pll2.clkr.hw }, 785 + { .hw = &cam_cc_pll2.clkr.hw }, 786 + }; 787 + 788 + static const struct parent_map cam_cc_parent_map_2[] = { 789 + { P_BI_TCXO, 0 }, 790 + { P_CAM_CC_PLL8_OUT_EVEN, 6 }, 791 + }; 792 + 793 + static const struct clk_parent_data cam_cc_parent_data_2[] = { 794 + { .index = DT_BI_TCXO }, 795 + { .hw = &cam_cc_pll8_out_even.clkr.hw }, 796 + }; 797 + 798 + static const struct parent_map cam_cc_parent_map_3[] = { 799 + { P_BI_TCXO, 0 }, 800 + { P_CAM_CC_PLL3_OUT_EVEN, 6 }, 801 + }; 802 + 803 + static const struct clk_parent_data cam_cc_parent_data_3[] = { 804 + { .index = DT_BI_TCXO }, 805 + { .hw = &cam_cc_pll3_out_even.clkr.hw }, 806 + }; 807 + 808 + static const struct parent_map cam_cc_parent_map_4[] = { 809 + { P_BI_TCXO, 0 }, 810 + { P_CAM_CC_PLL10_OUT_EVEN, 6 }, 811 + }; 812 + 813 + static const struct clk_parent_data cam_cc_parent_data_4[] = { 814 + { .index = DT_BI_TCXO }, 815 + { .hw = &cam_cc_pll10_out_even.clkr.hw }, 816 + }; 817 + 818 + static const struct parent_map cam_cc_parent_map_5[] = { 819 + { P_BI_TCXO, 0 }, 820 + { P_CAM_CC_PLL4_OUT_EVEN, 6 }, 821 + }; 822 + 823 + static const struct clk_parent_data cam_cc_parent_data_5[] = { 824 + { .index = DT_BI_TCXO }, 825 + { .hw = &cam_cc_pll4_out_even.clkr.hw }, 826 + }; 827 + 828 + static const struct parent_map cam_cc_parent_map_6[] = { 829 + { P_BI_TCXO, 0 }, 830 + { P_CAM_CC_PLL11_OUT_EVEN, 6 }, 831 + }; 832 + 833 + static const struct clk_parent_data cam_cc_parent_data_6[] = { 834 + { .index = DT_BI_TCXO }, 835 + { .hw = &cam_cc_pll11_out_even.clkr.hw }, 836 + }; 837 + 838 + static const struct parent_map cam_cc_parent_map_7[] = { 839 + { P_BI_TCXO, 0 }, 840 + { P_CAM_CC_PLL5_OUT_EVEN, 6 }, 841 + }; 842 + 843 + static const struct clk_parent_data cam_cc_parent_data_7[] = { 844 + { .index = DT_BI_TCXO }, 845 + { .hw = &cam_cc_pll5_out_even.clkr.hw }, 846 + }; 847 + 848 + static const struct parent_map cam_cc_parent_map_8[] = { 849 + { P_BI_TCXO, 0 }, 850 + { P_CAM_CC_PLL12_OUT_EVEN, 6 }, 851 + }; 852 + 853 + static const struct clk_parent_data cam_cc_parent_data_8[] = { 854 + { .index = DT_BI_TCXO }, 855 + { .hw = &cam_cc_pll12_out_even.clkr.hw }, 856 + }; 857 + 858 + static const struct parent_map cam_cc_parent_map_9[] = { 859 + { P_BI_TCXO, 0 }, 860 + { P_CAM_CC_PLL1_OUT_EVEN, 4 }, 861 + }; 862 + 863 + static const struct clk_parent_data cam_cc_parent_data_9[] = { 864 + { .index = DT_BI_TCXO }, 865 + { .hw = &cam_cc_pll1_out_even.clkr.hw }, 866 + }; 867 + 868 + static const struct parent_map cam_cc_parent_map_10[] = { 869 + { P_BI_TCXO, 0 }, 870 + { P_CAM_CC_PLL6_OUT_EVEN, 6 }, 871 + }; 872 + 873 + static const struct clk_parent_data cam_cc_parent_data_10[] = { 874 + { .index = DT_BI_TCXO }, 875 + { .hw = &cam_cc_pll6_out_even.clkr.hw }, 876 + }; 877 + 878 + static const struct parent_map cam_cc_parent_map_11[] = { 879 + { P_BI_TCXO, 0 }, 880 + { P_CAM_CC_PLL7_OUT_EVEN, 6 }, 881 + }; 882 + 883 + static const struct clk_parent_data cam_cc_parent_data_11[] = { 884 + { .index = DT_BI_TCXO }, 885 + { .hw = &cam_cc_pll7_out_even.clkr.hw }, 886 + }; 887 + 888 + static const struct parent_map cam_cc_parent_map_12[] = { 889 + { P_SLEEP_CLK, 0 }, 890 + }; 891 + 892 + static const struct clk_parent_data cam_cc_parent_data_12[] = { 893 + { .index = DT_SLEEP_CLK }, 894 + }; 895 + 896 + static const struct parent_map cam_cc_parent_map_13_ao[] = { 897 + { P_BI_TCXO_AO, 0 }, 898 + }; 899 + 900 + static const struct clk_parent_data cam_cc_parent_data_13_ao[] = { 901 + { .index = DT_BI_TCXO_AO }, 902 + }; 903 + 904 + static const struct freq_tbl ftbl_cam_cc_bps_clk_src[] = { 905 + F(19200000, P_BI_TCXO, 1, 0, 0), 906 + F(200000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 907 + F(400000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 908 + F(480000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 909 + F(785000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0), 910 + { } 911 + }; 912 + 913 + static struct clk_rcg2 cam_cc_bps_clk_src = { 914 + .cmd_rcgr = 0x10278, 915 + .mnd_width = 0, 916 + .hid_width = 5, 917 + .parent_map = cam_cc_parent_map_2, 918 + .freq_tbl = ftbl_cam_cc_bps_clk_src, 919 + .clkr.hw.init = &(const struct clk_init_data) { 920 + .name = "cam_cc_bps_clk_src", 921 + .parent_data = cam_cc_parent_data_2, 922 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_2), 923 + .flags = CLK_SET_RATE_PARENT, 924 + .ops = &clk_rcg2_shared_ops, 925 + }, 926 + }; 927 + 928 + static const struct freq_tbl ftbl_cam_cc_camnoc_axi_clk_src[] = { 929 + F(19200000, P_BI_TCXO, 1, 0, 0), 930 + F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0), 931 + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), 932 + { } 933 + }; 934 + 935 + static struct clk_rcg2 cam_cc_camnoc_axi_clk_src = { 936 + .cmd_rcgr = 0x13de0, 937 + .mnd_width = 0, 938 + .hid_width = 5, 939 + .parent_map = cam_cc_parent_map_0, 940 + .freq_tbl = ftbl_cam_cc_camnoc_axi_clk_src, 941 + .clkr.hw.init = &(const struct clk_init_data) { 942 + .name = "cam_cc_camnoc_axi_clk_src", 943 + .parent_data = cam_cc_parent_data_0, 944 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 945 + .flags = CLK_SET_RATE_PARENT, 946 + .ops = &clk_rcg2_shared_ops, 947 + }, 948 + }; 949 + 950 + static const struct freq_tbl ftbl_cam_cc_cci_0_clk_src[] = { 951 + F(19200000, P_BI_TCXO, 1, 0, 0), 952 + F(37500000, P_CAM_CC_PLL0_OUT_EVEN, 16, 0, 0), 953 + { } 954 + }; 955 + 956 + static struct clk_rcg2 cam_cc_cci_0_clk_src = { 957 + .cmd_rcgr = 0x13900, 958 + .mnd_width = 8, 959 + .hid_width = 5, 960 + .parent_map = cam_cc_parent_map_0, 961 + .freq_tbl = ftbl_cam_cc_cci_0_clk_src, 962 + .clkr.hw.init = &(const struct clk_init_data) { 963 + .name = "cam_cc_cci_0_clk_src", 964 + .parent_data = cam_cc_parent_data_0, 965 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 966 + .flags = CLK_SET_RATE_PARENT, 967 + .ops = &clk_rcg2_shared_ops, 968 + }, 969 + }; 970 + 971 + static struct clk_rcg2 cam_cc_cci_1_clk_src = { 972 + .cmd_rcgr = 0x13a30, 973 + .mnd_width = 8, 974 + .hid_width = 5, 975 + .parent_map = cam_cc_parent_map_0, 976 + .freq_tbl = ftbl_cam_cc_cci_0_clk_src, 977 + .clkr.hw.init = &(const struct clk_init_data) { 978 + .name = "cam_cc_cci_1_clk_src", 979 + .parent_data = cam_cc_parent_data_0, 980 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 981 + .flags = CLK_SET_RATE_PARENT, 982 + .ops = &clk_rcg2_shared_ops, 983 + }, 984 + }; 985 + 986 + static struct clk_rcg2 cam_cc_cci_2_clk_src = { 987 + .cmd_rcgr = 0x13b60, 988 + .mnd_width = 8, 989 + .hid_width = 5, 990 + .parent_map = cam_cc_parent_map_0, 991 + .freq_tbl = ftbl_cam_cc_cci_0_clk_src, 992 + .clkr.hw.init = &(const struct clk_init_data) { 993 + .name = "cam_cc_cci_2_clk_src", 994 + .parent_data = cam_cc_parent_data_0, 995 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 996 + .flags = CLK_SET_RATE_PARENT, 997 + .ops = &clk_rcg2_shared_ops, 998 + }, 999 + }; 1000 + 1001 + static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = { 1002 + F(19200000, P_BI_TCXO, 1, 0, 0), 1003 + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), 1004 + F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), 1005 + { } 1006 + }; 1007 + 1008 + static struct clk_rcg2 cam_cc_cphy_rx_clk_src = { 1009 + .cmd_rcgr = 0x11290, 1010 + .mnd_width = 0, 1011 + .hid_width = 5, 1012 + .parent_map = cam_cc_parent_map_0, 1013 + .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src, 1014 + .clkr.hw.init = &(const struct clk_init_data) { 1015 + .name = "cam_cc_cphy_rx_clk_src", 1016 + .parent_data = cam_cc_parent_data_0, 1017 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1018 + .flags = CLK_SET_RATE_PARENT, 1019 + .ops = &clk_rcg2_shared_ops, 1020 + }, 1021 + }; 1022 + 1023 + static const struct freq_tbl ftbl_cam_cc_cre_clk_src[] = { 1024 + F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0), 1025 + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), 1026 + F(480000000, P_CAM_CC_PLL9_OUT_EVEN, 1, 0, 0), 1027 + F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), 1028 + { } 1029 + }; 1030 + 1031 + static struct clk_rcg2 cam_cc_cre_clk_src = { 1032 + .cmd_rcgr = 0x1353c, 1033 + .mnd_width = 0, 1034 + .hid_width = 5, 1035 + .parent_map = cam_cc_parent_map_0, 1036 + .freq_tbl = ftbl_cam_cc_cre_clk_src, 1037 + .clkr.hw.init = &(const struct clk_init_data) { 1038 + .name = "cam_cc_cre_clk_src", 1039 + .parent_data = cam_cc_parent_data_0, 1040 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1041 + .flags = CLK_SET_RATE_PARENT, 1042 + .ops = &clk_rcg2_shared_ops, 1043 + }, 1044 + }; 1045 + 1046 + static const struct freq_tbl ftbl_cam_cc_csi0phytimer_clk_src[] = { 1047 + F(19200000, P_BI_TCXO, 1, 0, 0), 1048 + F(400000000, P_CAM_CC_PLL0_OUT_EVEN, 1.5, 0, 0), 1049 + { } 1050 + }; 1051 + 1052 + static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = { 1053 + .cmd_rcgr = 0x15980, 1054 + .mnd_width = 0, 1055 + .hid_width = 5, 1056 + .parent_map = cam_cc_parent_map_0, 1057 + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1058 + .clkr.hw.init = &(const struct clk_init_data) { 1059 + .name = "cam_cc_csi0phytimer_clk_src", 1060 + .parent_data = cam_cc_parent_data_0, 1061 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1062 + .flags = CLK_SET_RATE_PARENT, 1063 + .ops = &clk_rcg2_shared_ops, 1064 + }, 1065 + }; 1066 + 1067 + static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = { 1068 + .cmd_rcgr = 0x15ab8, 1069 + .mnd_width = 0, 1070 + .hid_width = 5, 1071 + .parent_map = cam_cc_parent_map_0, 1072 + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1073 + .clkr.hw.init = &(const struct clk_init_data) { 1074 + .name = "cam_cc_csi1phytimer_clk_src", 1075 + .parent_data = cam_cc_parent_data_0, 1076 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1077 + .flags = CLK_SET_RATE_PARENT, 1078 + .ops = &clk_rcg2_shared_ops, 1079 + }, 1080 + }; 1081 + 1082 + static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = { 1083 + .cmd_rcgr = 0x15bec, 1084 + .mnd_width = 0, 1085 + .hid_width = 5, 1086 + .parent_map = cam_cc_parent_map_0, 1087 + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1088 + .clkr.hw.init = &(const struct clk_init_data) { 1089 + .name = "cam_cc_csi2phytimer_clk_src", 1090 + .parent_data = cam_cc_parent_data_0, 1091 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1092 + .flags = CLK_SET_RATE_PARENT, 1093 + .ops = &clk_rcg2_shared_ops, 1094 + }, 1095 + }; 1096 + 1097 + static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = { 1098 + .cmd_rcgr = 0x15d20, 1099 + .mnd_width = 0, 1100 + .hid_width = 5, 1101 + .parent_map = cam_cc_parent_map_0, 1102 + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1103 + .clkr.hw.init = &(const struct clk_init_data) { 1104 + .name = "cam_cc_csi3phytimer_clk_src", 1105 + .parent_data = cam_cc_parent_data_0, 1106 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1107 + .flags = CLK_SET_RATE_PARENT, 1108 + .ops = &clk_rcg2_shared_ops, 1109 + }, 1110 + }; 1111 + 1112 + static const struct freq_tbl ftbl_cam_cc_csi4phytimer_clk_src[] = { 1113 + F(19200000, P_BI_TCXO, 1, 0, 0), 1114 + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), 1115 + { } 1116 + }; 1117 + 1118 + static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = { 1119 + .cmd_rcgr = 0x15e54, 1120 + .mnd_width = 0, 1121 + .hid_width = 5, 1122 + .parent_map = cam_cc_parent_map_0, 1123 + .freq_tbl = ftbl_cam_cc_csi4phytimer_clk_src, 1124 + .clkr.hw.init = &(const struct clk_init_data) { 1125 + .name = "cam_cc_csi4phytimer_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_csi5phytimer_clk_src = { 1134 + .cmd_rcgr = 0x15f88, 1135 + .mnd_width = 0, 1136 + .hid_width = 5, 1137 + .parent_map = cam_cc_parent_map_0, 1138 + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1139 + .clkr.hw.init = &(const struct clk_init_data) { 1140 + .name = "cam_cc_csi5phytimer_clk_src", 1141 + .parent_data = cam_cc_parent_data_0, 1142 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1143 + .flags = CLK_SET_RATE_PARENT, 1144 + .ops = &clk_rcg2_shared_ops, 1145 + }, 1146 + }; 1147 + 1148 + static struct clk_rcg2 cam_cc_csi6phytimer_clk_src = { 1149 + .cmd_rcgr = 0x160bc, 1150 + .mnd_width = 0, 1151 + .hid_width = 5, 1152 + .parent_map = cam_cc_parent_map_0, 1153 + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1154 + .clkr.hw.init = &(const struct clk_init_data) { 1155 + .name = "cam_cc_csi6phytimer_clk_src", 1156 + .parent_data = cam_cc_parent_data_0, 1157 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1158 + .flags = CLK_SET_RATE_PARENT, 1159 + .ops = &clk_rcg2_shared_ops, 1160 + }, 1161 + }; 1162 + 1163 + static struct clk_rcg2 cam_cc_csi7phytimer_clk_src = { 1164 + .cmd_rcgr = 0x161f0, 1165 + .mnd_width = 0, 1166 + .hid_width = 5, 1167 + .parent_map = cam_cc_parent_map_0, 1168 + .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src, 1169 + .clkr.hw.init = &(const struct clk_init_data) { 1170 + .name = "cam_cc_csi7phytimer_clk_src", 1171 + .parent_data = cam_cc_parent_data_0, 1172 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1173 + .flags = CLK_SET_RATE_PARENT, 1174 + .ops = &clk_rcg2_shared_ops, 1175 + }, 1176 + }; 1177 + 1178 + static const struct freq_tbl ftbl_cam_cc_csid_clk_src[] = { 1179 + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), 1180 + F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0), 1181 + { } 1182 + }; 1183 + 1184 + static struct clk_rcg2 cam_cc_csid_clk_src = { 1185 + .cmd_rcgr = 0x13ca8, 1186 + .mnd_width = 0, 1187 + .hid_width = 5, 1188 + .parent_map = cam_cc_parent_map_0, 1189 + .freq_tbl = ftbl_cam_cc_csid_clk_src, 1190 + .clkr.hw.init = &(const struct clk_init_data) { 1191 + .name = "cam_cc_csid_clk_src", 1192 + .parent_data = cam_cc_parent_data_0, 1193 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1194 + .flags = CLK_SET_RATE_PARENT, 1195 + .ops = &clk_rcg2_shared_ops, 1196 + }, 1197 + }; 1198 + 1199 + static const struct freq_tbl ftbl_cam_cc_fast_ahb_clk_src[] = { 1200 + F(19200000, P_BI_TCXO, 1, 0, 0), 1201 + F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0), 1202 + F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0), 1203 + { } 1204 + }; 1205 + 1206 + static struct clk_rcg2 cam_cc_fast_ahb_clk_src = { 1207 + .cmd_rcgr = 0x10018, 1208 + .mnd_width = 0, 1209 + .hid_width = 5, 1210 + .parent_map = cam_cc_parent_map_0, 1211 + .freq_tbl = ftbl_cam_cc_fast_ahb_clk_src, 1212 + .clkr.hw.init = &(const struct clk_init_data) { 1213 + .name = "cam_cc_fast_ahb_clk_src", 1214 + .parent_data = cam_cc_parent_data_0, 1215 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1216 + .flags = CLK_SET_RATE_PARENT, 1217 + .ops = &clk_rcg2_shared_ops, 1218 + }, 1219 + }; 1220 + 1221 + static const struct freq_tbl ftbl_cam_cc_icp_clk_src[] = { 1222 + F(19200000, P_BI_TCXO, 1, 0, 0), 1223 + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), 1224 + F(480000000, P_CAM_CC_PLL9_OUT_EVEN, 1, 0, 0), 1225 + F(600000000, P_CAM_CC_PLL0_OUT_MAIN, 2, 0, 0), 1226 + { } 1227 + }; 1228 + 1229 + static struct clk_rcg2 cam_cc_icp_clk_src = { 1230 + .cmd_rcgr = 0x137c4, 1231 + .mnd_width = 0, 1232 + .hid_width = 5, 1233 + .parent_map = cam_cc_parent_map_0, 1234 + .freq_tbl = ftbl_cam_cc_icp_clk_src, 1235 + .clkr.hw.init = &(const struct clk_init_data) { 1236 + .name = "cam_cc_icp_clk_src", 1237 + .parent_data = cam_cc_parent_data_0, 1238 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1239 + .flags = CLK_SET_RATE_PARENT, 1240 + .ops = &clk_rcg2_shared_ops, 1241 + }, 1242 + }; 1243 + 1244 + static const struct freq_tbl ftbl_cam_cc_ife_0_clk_src[] = { 1245 + F(19200000, P_BI_TCXO, 1, 0, 0), 1246 + F(466000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1247 + F(594000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1248 + F(675000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1249 + F(785000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0), 1250 + { } 1251 + }; 1252 + 1253 + static struct clk_rcg2 cam_cc_ife_0_clk_src = { 1254 + .cmd_rcgr = 0x11018, 1255 + .mnd_width = 0, 1256 + .hid_width = 5, 1257 + .parent_map = cam_cc_parent_map_3, 1258 + .freq_tbl = ftbl_cam_cc_ife_0_clk_src, 1259 + .clkr.hw.init = &(const struct clk_init_data) { 1260 + .name = "cam_cc_ife_0_clk_src", 1261 + .parent_data = cam_cc_parent_data_3, 1262 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_3), 1263 + .flags = CLK_SET_RATE_PARENT, 1264 + .ops = &clk_rcg2_shared_ops, 1265 + }, 1266 + }; 1267 + 1268 + static const struct freq_tbl ftbl_cam_cc_ife_0_dsp_clk_src[] = { 1269 + F(466000000, P_CAM_CC_PLL10_OUT_EVEN, 1, 0, 0), 1270 + F(594000000, P_CAM_CC_PLL10_OUT_EVEN, 1, 0, 0), 1271 + F(675000000, P_CAM_CC_PLL10_OUT_EVEN, 1, 0, 0), 1272 + F(785000000, P_CAM_CC_PLL10_OUT_EVEN, 1, 0, 0), 1273 + { } 1274 + }; 1275 + 1276 + static struct clk_rcg2 cam_cc_ife_0_dsp_clk_src = { 1277 + .cmd_rcgr = 0x11154, 1278 + .mnd_width = 0, 1279 + .hid_width = 5, 1280 + .parent_map = cam_cc_parent_map_4, 1281 + .freq_tbl = ftbl_cam_cc_ife_0_dsp_clk_src, 1282 + .clkr.hw.init = &(const struct clk_init_data) { 1283 + .name = "cam_cc_ife_0_dsp_clk_src", 1284 + .parent_data = cam_cc_parent_data_4, 1285 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_4), 1286 + .flags = CLK_SET_RATE_PARENT, 1287 + .ops = &clk_rcg2_shared_ops, 1288 + }, 1289 + }; 1290 + 1291 + static const struct freq_tbl ftbl_cam_cc_ife_1_clk_src[] = { 1292 + F(19200000, P_BI_TCXO, 1, 0, 0), 1293 + F(466000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1294 + F(594000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1295 + F(675000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1296 + F(785000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0), 1297 + { } 1298 + }; 1299 + 1300 + static struct clk_rcg2 cam_cc_ife_1_clk_src = { 1301 + .cmd_rcgr = 0x12018, 1302 + .mnd_width = 0, 1303 + .hid_width = 5, 1304 + .parent_map = cam_cc_parent_map_5, 1305 + .freq_tbl = ftbl_cam_cc_ife_1_clk_src, 1306 + .clkr.hw.init = &(const struct clk_init_data) { 1307 + .name = "cam_cc_ife_1_clk_src", 1308 + .parent_data = cam_cc_parent_data_5, 1309 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_5), 1310 + .flags = CLK_SET_RATE_PARENT, 1311 + .ops = &clk_rcg2_shared_ops, 1312 + }, 1313 + }; 1314 + 1315 + static const struct freq_tbl ftbl_cam_cc_ife_1_dsp_clk_src[] = { 1316 + F(466000000, P_CAM_CC_PLL11_OUT_EVEN, 1, 0, 0), 1317 + F(594000000, P_CAM_CC_PLL11_OUT_EVEN, 1, 0, 0), 1318 + F(675000000, P_CAM_CC_PLL11_OUT_EVEN, 1, 0, 0), 1319 + F(785000000, P_CAM_CC_PLL11_OUT_EVEN, 1, 0, 0), 1320 + { } 1321 + }; 1322 + 1323 + static struct clk_rcg2 cam_cc_ife_1_dsp_clk_src = { 1324 + .cmd_rcgr = 0x12154, 1325 + .mnd_width = 0, 1326 + .hid_width = 5, 1327 + .parent_map = cam_cc_parent_map_6, 1328 + .freq_tbl = ftbl_cam_cc_ife_1_dsp_clk_src, 1329 + .clkr.hw.init = &(const struct clk_init_data) { 1330 + .name = "cam_cc_ife_1_dsp_clk_src", 1331 + .parent_data = cam_cc_parent_data_6, 1332 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_6), 1333 + .flags = CLK_SET_RATE_PARENT, 1334 + .ops = &clk_rcg2_shared_ops, 1335 + }, 1336 + }; 1337 + 1338 + static const struct freq_tbl ftbl_cam_cc_ife_2_clk_src[] = { 1339 + F(466000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1340 + F(594000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1341 + F(675000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1342 + F(785000000, P_CAM_CC_PLL5_OUT_EVEN, 1, 0, 0), 1343 + { } 1344 + }; 1345 + 1346 + static struct clk_rcg2 cam_cc_ife_2_clk_src = { 1347 + .cmd_rcgr = 0x122a8, 1348 + .mnd_width = 0, 1349 + .hid_width = 5, 1350 + .parent_map = cam_cc_parent_map_7, 1351 + .freq_tbl = ftbl_cam_cc_ife_2_clk_src, 1352 + .clkr.hw.init = &(const struct clk_init_data) { 1353 + .name = "cam_cc_ife_2_clk_src", 1354 + .parent_data = cam_cc_parent_data_7, 1355 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_7), 1356 + .flags = CLK_SET_RATE_PARENT, 1357 + .ops = &clk_rcg2_shared_ops, 1358 + }, 1359 + }; 1360 + 1361 + static const struct freq_tbl ftbl_cam_cc_ife_2_dsp_clk_src[] = { 1362 + F(466000000, P_CAM_CC_PLL12_OUT_EVEN, 1, 0, 0), 1363 + F(594000000, P_CAM_CC_PLL12_OUT_EVEN, 1, 0, 0), 1364 + F(675000000, P_CAM_CC_PLL12_OUT_EVEN, 1, 0, 0), 1365 + F(785000000, P_CAM_CC_PLL12_OUT_EVEN, 1, 0, 0), 1366 + { } 1367 + }; 1368 + 1369 + static struct clk_rcg2 cam_cc_ife_2_dsp_clk_src = { 1370 + .cmd_rcgr = 0x123e4, 1371 + .mnd_width = 0, 1372 + .hid_width = 5, 1373 + .parent_map = cam_cc_parent_map_8, 1374 + .freq_tbl = ftbl_cam_cc_ife_2_dsp_clk_src, 1375 + .clkr.hw.init = &(const struct clk_init_data) { 1376 + .name = "cam_cc_ife_2_dsp_clk_src", 1377 + .parent_data = cam_cc_parent_data_8, 1378 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_8), 1379 + .flags = CLK_SET_RATE_PARENT, 1380 + .ops = &clk_rcg2_shared_ops, 1381 + }, 1382 + }; 1383 + 1384 + static struct clk_rcg2 cam_cc_ife_lite_clk_src = { 1385 + .cmd_rcgr = 0x13000, 1386 + .mnd_width = 0, 1387 + .hid_width = 5, 1388 + .parent_map = cam_cc_parent_map_0, 1389 + .freq_tbl = ftbl_cam_cc_csid_clk_src, 1390 + .clkr.hw.init = &(const struct clk_init_data) { 1391 + .name = "cam_cc_ife_lite_clk_src", 1392 + .parent_data = cam_cc_parent_data_0, 1393 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1394 + .flags = CLK_SET_RATE_PARENT, 1395 + .ops = &clk_rcg2_shared_ops, 1396 + }, 1397 + }; 1398 + 1399 + static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = { 1400 + .cmd_rcgr = 0x1313c, 1401 + .mnd_width = 0, 1402 + .hid_width = 5, 1403 + .parent_map = cam_cc_parent_map_0, 1404 + .freq_tbl = ftbl_cam_cc_csid_clk_src, 1405 + .clkr.hw.init = &(const struct clk_init_data) { 1406 + .name = "cam_cc_ife_lite_csid_clk_src", 1407 + .parent_data = cam_cc_parent_data_0, 1408 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1409 + .flags = CLK_SET_RATE_PARENT, 1410 + .ops = &clk_rcg2_shared_ops, 1411 + }, 1412 + }; 1413 + 1414 + static const struct freq_tbl ftbl_cam_cc_ipe_nps_clk_src[] = { 1415 + F(455000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1416 + F(575000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1417 + F(675000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1418 + F(825000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0), 1419 + { } 1420 + }; 1421 + 1422 + static struct clk_rcg2 cam_cc_ipe_nps_clk_src = { 1423 + .cmd_rcgr = 0x103cc, 1424 + .mnd_width = 0, 1425 + .hid_width = 5, 1426 + .parent_map = cam_cc_parent_map_9, 1427 + .freq_tbl = ftbl_cam_cc_ipe_nps_clk_src, 1428 + .clkr.hw.init = &(const struct clk_init_data) { 1429 + .name = "cam_cc_ipe_nps_clk_src", 1430 + .parent_data = cam_cc_parent_data_9, 1431 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_9), 1432 + .flags = CLK_SET_RATE_PARENT, 1433 + .ops = &clk_rcg2_shared_ops, 1434 + }, 1435 + }; 1436 + 1437 + static const struct freq_tbl ftbl_cam_cc_jpeg_clk_src[] = { 1438 + F(19200000, P_BI_TCXO, 1, 0, 0), 1439 + F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0), 1440 + F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0), 1441 + F(480000000, P_CAM_CC_PLL9_OUT_EVEN, 1, 0, 0), 1442 + F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0), 1443 + { } 1444 + }; 1445 + 1446 + static struct clk_rcg2 cam_cc_jpeg_clk_src = { 1447 + .cmd_rcgr = 0x13674, 1448 + .mnd_width = 0, 1449 + .hid_width = 5, 1450 + .parent_map = cam_cc_parent_map_0, 1451 + .freq_tbl = ftbl_cam_cc_jpeg_clk_src, 1452 + .clkr.hw.init = &(const struct clk_init_data) { 1453 + .name = "cam_cc_jpeg_clk_src", 1454 + .parent_data = cam_cc_parent_data_0, 1455 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1456 + .flags = CLK_SET_RATE_PARENT, 1457 + .ops = &clk_rcg2_shared_ops, 1458 + }, 1459 + }; 1460 + 1461 + static const struct freq_tbl ftbl_cam_cc_mclk0_clk_src[] = { 1462 + F(19200000, P_BI_TCXO, 1, 0, 0), 1463 + F(24000000, P_CAM_CC_PLL2_OUT_MAIN, 10, 1, 4), 1464 + F(68571429, P_CAM_CC_PLL2_OUT_MAIN, 14, 0, 0), 1465 + { } 1466 + }; 1467 + 1468 + static struct clk_rcg2 cam_cc_mclk0_clk_src = { 1469 + .cmd_rcgr = 0x15000, 1470 + .mnd_width = 8, 1471 + .hid_width = 5, 1472 + .parent_map = cam_cc_parent_map_1, 1473 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1474 + .clkr.hw.init = &(const struct clk_init_data) { 1475 + .name = "cam_cc_mclk0_clk_src", 1476 + .parent_data = cam_cc_parent_data_1, 1477 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1478 + .flags = CLK_SET_RATE_PARENT, 1479 + .ops = &clk_rcg2_shared_ops, 1480 + }, 1481 + }; 1482 + 1483 + static struct clk_rcg2 cam_cc_mclk1_clk_src = { 1484 + .cmd_rcgr = 0x15130, 1485 + .mnd_width = 8, 1486 + .hid_width = 5, 1487 + .parent_map = cam_cc_parent_map_1, 1488 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1489 + .clkr.hw.init = &(const struct clk_init_data) { 1490 + .name = "cam_cc_mclk1_clk_src", 1491 + .parent_data = cam_cc_parent_data_1, 1492 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1493 + .flags = CLK_SET_RATE_PARENT, 1494 + .ops = &clk_rcg2_shared_ops, 1495 + }, 1496 + }; 1497 + 1498 + static struct clk_rcg2 cam_cc_mclk2_clk_src = { 1499 + .cmd_rcgr = 0x15260, 1500 + .mnd_width = 8, 1501 + .hid_width = 5, 1502 + .parent_map = cam_cc_parent_map_1, 1503 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1504 + .clkr.hw.init = &(const struct clk_init_data) { 1505 + .name = "cam_cc_mclk2_clk_src", 1506 + .parent_data = cam_cc_parent_data_1, 1507 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1508 + .flags = CLK_SET_RATE_PARENT, 1509 + .ops = &clk_rcg2_shared_ops, 1510 + }, 1511 + }; 1512 + 1513 + static struct clk_rcg2 cam_cc_mclk3_clk_src = { 1514 + .cmd_rcgr = 0x15390, 1515 + .mnd_width = 8, 1516 + .hid_width = 5, 1517 + .parent_map = cam_cc_parent_map_1, 1518 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1519 + .clkr.hw.init = &(const struct clk_init_data) { 1520 + .name = "cam_cc_mclk3_clk_src", 1521 + .parent_data = cam_cc_parent_data_1, 1522 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1523 + .flags = CLK_SET_RATE_PARENT, 1524 + .ops = &clk_rcg2_shared_ops, 1525 + }, 1526 + }; 1527 + 1528 + static struct clk_rcg2 cam_cc_mclk4_clk_src = { 1529 + .cmd_rcgr = 0x154c0, 1530 + .mnd_width = 8, 1531 + .hid_width = 5, 1532 + .parent_map = cam_cc_parent_map_1, 1533 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1534 + .clkr.hw.init = &(const struct clk_init_data) { 1535 + .name = "cam_cc_mclk4_clk_src", 1536 + .parent_data = cam_cc_parent_data_1, 1537 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1538 + .flags = CLK_SET_RATE_PARENT, 1539 + .ops = &clk_rcg2_shared_ops, 1540 + }, 1541 + }; 1542 + 1543 + static struct clk_rcg2 cam_cc_mclk5_clk_src = { 1544 + .cmd_rcgr = 0x155f0, 1545 + .mnd_width = 8, 1546 + .hid_width = 5, 1547 + .parent_map = cam_cc_parent_map_1, 1548 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1549 + .clkr.hw.init = &(const struct clk_init_data) { 1550 + .name = "cam_cc_mclk5_clk_src", 1551 + .parent_data = cam_cc_parent_data_1, 1552 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1553 + .flags = CLK_SET_RATE_PARENT, 1554 + .ops = &clk_rcg2_shared_ops, 1555 + }, 1556 + }; 1557 + 1558 + static struct clk_rcg2 cam_cc_mclk6_clk_src = { 1559 + .cmd_rcgr = 0x15720, 1560 + .mnd_width = 8, 1561 + .hid_width = 5, 1562 + .parent_map = cam_cc_parent_map_1, 1563 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1564 + .clkr.hw.init = &(const struct clk_init_data) { 1565 + .name = "cam_cc_mclk6_clk_src", 1566 + .parent_data = cam_cc_parent_data_1, 1567 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1568 + .flags = CLK_SET_RATE_PARENT, 1569 + .ops = &clk_rcg2_shared_ops, 1570 + }, 1571 + }; 1572 + 1573 + static struct clk_rcg2 cam_cc_mclk7_clk_src = { 1574 + .cmd_rcgr = 0x15850, 1575 + .mnd_width = 8, 1576 + .hid_width = 5, 1577 + .parent_map = cam_cc_parent_map_1, 1578 + .freq_tbl = ftbl_cam_cc_mclk0_clk_src, 1579 + .clkr.hw.init = &(const struct clk_init_data) { 1580 + .name = "cam_cc_mclk7_clk_src", 1581 + .parent_data = cam_cc_parent_data_1, 1582 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_1), 1583 + .flags = CLK_SET_RATE_PARENT, 1584 + .ops = &clk_rcg2_shared_ops, 1585 + }, 1586 + }; 1587 + 1588 + static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = { 1589 + F(19200000, P_BI_TCXO, 1, 0, 0), 1590 + F(75000000, P_CAM_CC_PLL0_OUT_EVEN, 8, 0, 0), 1591 + F(150000000, P_CAM_CC_PLL0_OUT_EVEN, 4, 0, 0), 1592 + F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0), 1593 + { } 1594 + }; 1595 + 1596 + static struct clk_rcg2 cam_cc_qdss_debug_clk_src = { 1597 + .cmd_rcgr = 0x13f24, 1598 + .mnd_width = 0, 1599 + .hid_width = 5, 1600 + .parent_map = cam_cc_parent_map_0, 1601 + .freq_tbl = ftbl_cam_cc_qdss_debug_clk_src, 1602 + .clkr.hw.init = &(const struct clk_init_data) { 1603 + .name = "cam_cc_qdss_debug_clk_src", 1604 + .parent_data = cam_cc_parent_data_0, 1605 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1606 + .flags = CLK_SET_RATE_PARENT, 1607 + .ops = &clk_rcg2_shared_ops, 1608 + }, 1609 + }; 1610 + 1611 + static const struct freq_tbl ftbl_cam_cc_sfe_0_clk_src[] = { 1612 + F(466000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), 1613 + F(594000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), 1614 + F(675000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), 1615 + F(785000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0), 1616 + { } 1617 + }; 1618 + 1619 + static struct clk_rcg2 cam_cc_sfe_0_clk_src = { 1620 + .cmd_rcgr = 0x13294, 1621 + .mnd_width = 0, 1622 + .hid_width = 5, 1623 + .parent_map = cam_cc_parent_map_10, 1624 + .freq_tbl = ftbl_cam_cc_sfe_0_clk_src, 1625 + .clkr.hw.init = &(const struct clk_init_data) { 1626 + .name = "cam_cc_sfe_0_clk_src", 1627 + .parent_data = cam_cc_parent_data_10, 1628 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_10), 1629 + .flags = CLK_SET_RATE_PARENT, 1630 + .ops = &clk_rcg2_shared_ops, 1631 + }, 1632 + }; 1633 + 1634 + static const struct freq_tbl ftbl_cam_cc_sfe_1_clk_src[] = { 1635 + F(466000000, P_CAM_CC_PLL7_OUT_EVEN, 1, 0, 0), 1636 + F(594000000, P_CAM_CC_PLL7_OUT_EVEN, 1, 0, 0), 1637 + F(675000000, P_CAM_CC_PLL7_OUT_EVEN, 1, 0, 0), 1638 + F(785000000, P_CAM_CC_PLL7_OUT_EVEN, 1, 0, 0), 1639 + { } 1640 + }; 1641 + 1642 + static struct clk_rcg2 cam_cc_sfe_1_clk_src = { 1643 + .cmd_rcgr = 0x133f4, 1644 + .mnd_width = 0, 1645 + .hid_width = 5, 1646 + .parent_map = cam_cc_parent_map_11, 1647 + .freq_tbl = ftbl_cam_cc_sfe_1_clk_src, 1648 + .clkr.hw.init = &(const struct clk_init_data) { 1649 + .name = "cam_cc_sfe_1_clk_src", 1650 + .parent_data = cam_cc_parent_data_11, 1651 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_11), 1652 + .flags = CLK_SET_RATE_PARENT, 1653 + .ops = &clk_rcg2_shared_ops, 1654 + }, 1655 + }; 1656 + 1657 + static const struct freq_tbl ftbl_cam_cc_sleep_clk_src[] = { 1658 + F(32000, P_SLEEP_CLK, 1, 0, 0), 1659 + { } 1660 + }; 1661 + 1662 + static struct clk_rcg2 cam_cc_sleep_clk_src = { 1663 + .cmd_rcgr = 0x141a0, 1664 + .mnd_width = 0, 1665 + .hid_width = 5, 1666 + .parent_map = cam_cc_parent_map_12, 1667 + .freq_tbl = ftbl_cam_cc_sleep_clk_src, 1668 + .clkr.hw.init = &(const struct clk_init_data) { 1669 + .name = "cam_cc_sleep_clk_src", 1670 + .parent_data = cam_cc_parent_data_12, 1671 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_12), 1672 + .flags = CLK_SET_RATE_PARENT, 1673 + .ops = &clk_rcg2_shared_ops, 1674 + }, 1675 + }; 1676 + 1677 + static const struct freq_tbl ftbl_cam_cc_slow_ahb_clk_src[] = { 1678 + F(19200000, P_BI_TCXO, 1, 0, 0), 1679 + F(80000000, P_CAM_CC_PLL0_OUT_EVEN, 7.5, 0, 0), 1680 + { } 1681 + }; 1682 + 1683 + static struct clk_rcg2 cam_cc_slow_ahb_clk_src = { 1684 + .cmd_rcgr = 0x10148, 1685 + .mnd_width = 8, 1686 + .hid_width = 5, 1687 + .parent_map = cam_cc_parent_map_0, 1688 + .freq_tbl = ftbl_cam_cc_slow_ahb_clk_src, 1689 + .clkr.hw.init = &(const struct clk_init_data) { 1690 + .name = "cam_cc_slow_ahb_clk_src", 1691 + .parent_data = cam_cc_parent_data_0, 1692 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_0), 1693 + .flags = CLK_SET_RATE_PARENT, 1694 + .ops = &clk_rcg2_shared_ops, 1695 + }, 1696 + }; 1697 + 1698 + static const struct freq_tbl ftbl_cam_cc_xo_clk_src[] = { 1699 + F(19200000, P_BI_TCXO_AO, 1, 0, 0), 1700 + { } 1701 + }; 1702 + 1703 + static struct clk_rcg2 cam_cc_xo_clk_src = { 1704 + .cmd_rcgr = 0x14070, 1705 + .mnd_width = 0, 1706 + .hid_width = 5, 1707 + .parent_map = cam_cc_parent_map_13_ao, 1708 + .freq_tbl = ftbl_cam_cc_xo_clk_src, 1709 + .clkr.hw.init = &(const struct clk_init_data) { 1710 + .name = "cam_cc_xo_clk_src", 1711 + .parent_data = cam_cc_parent_data_13_ao, 1712 + .num_parents = ARRAY_SIZE(cam_cc_parent_data_13_ao), 1713 + .flags = CLK_SET_RATE_PARENT, 1714 + .ops = &clk_rcg2_shared_ops, 1715 + }, 1716 + }; 1717 + 1718 + static struct clk_branch cam_cc_bps_ahb_clk = { 1719 + .halt_reg = 0x10274, 1720 + .halt_check = BRANCH_HALT, 1721 + .clkr = { 1722 + .enable_reg = 0x10274, 1723 + .enable_mask = BIT(0), 1724 + .hw.init = &(const struct clk_init_data) { 1725 + .name = "cam_cc_bps_ahb_clk", 1726 + .parent_hws = (const struct clk_hw*[]) { 1727 + &cam_cc_slow_ahb_clk_src.clkr.hw, 1728 + }, 1729 + .num_parents = 1, 1730 + .flags = CLK_SET_RATE_PARENT, 1731 + .ops = &clk_branch2_ops, 1732 + }, 1733 + }, 1734 + }; 1735 + 1736 + static struct clk_branch cam_cc_bps_clk = { 1737 + .halt_reg = 0x103a4, 1738 + .halt_check = BRANCH_HALT, 1739 + .clkr = { 1740 + .enable_reg = 0x103a4, 1741 + .enable_mask = BIT(0), 1742 + .hw.init = &(const struct clk_init_data) { 1743 + .name = "cam_cc_bps_clk", 1744 + .parent_hws = (const struct clk_hw*[]) { 1745 + &cam_cc_bps_clk_src.clkr.hw, 1746 + }, 1747 + .num_parents = 1, 1748 + .flags = CLK_SET_RATE_PARENT, 1749 + .ops = &clk_branch2_ops, 1750 + }, 1751 + }, 1752 + }; 1753 + 1754 + static struct clk_branch cam_cc_bps_fast_ahb_clk = { 1755 + .halt_reg = 0x10144, 1756 + .halt_check = BRANCH_HALT, 1757 + .clkr = { 1758 + .enable_reg = 0x10144, 1759 + .enable_mask = BIT(0), 1760 + .hw.init = &(const struct clk_init_data) { 1761 + .name = "cam_cc_bps_fast_ahb_clk", 1762 + .parent_hws = (const struct clk_hw*[]) { 1763 + &cam_cc_fast_ahb_clk_src.clkr.hw, 1764 + }, 1765 + .num_parents = 1, 1766 + .flags = CLK_SET_RATE_PARENT, 1767 + .ops = &clk_branch2_ops, 1768 + }, 1769 + }, 1770 + }; 1771 + 1772 + static struct clk_branch cam_cc_camnoc_axi_clk = { 1773 + .halt_reg = 0x13f0c, 1774 + .halt_check = BRANCH_HALT, 1775 + .clkr = { 1776 + .enable_reg = 0x13f0c, 1777 + .enable_mask = BIT(0), 1778 + .hw.init = &(const struct clk_init_data) { 1779 + .name = "cam_cc_camnoc_axi_clk", 1780 + .parent_hws = (const struct clk_hw*[]) { 1781 + &cam_cc_camnoc_axi_clk_src.clkr.hw, 1782 + }, 1783 + .num_parents = 1, 1784 + .flags = CLK_SET_RATE_PARENT, 1785 + .ops = &clk_branch2_ops, 1786 + }, 1787 + }, 1788 + }; 1789 + 1790 + static struct clk_branch cam_cc_camnoc_dcd_xo_clk = { 1791 + .halt_reg = 0x13f18, 1792 + .halt_check = BRANCH_HALT, 1793 + .clkr = { 1794 + .enable_reg = 0x13f18, 1795 + .enable_mask = BIT(0), 1796 + .hw.init = &(const struct clk_init_data) { 1797 + .name = "cam_cc_camnoc_dcd_xo_clk", 1798 + .parent_hws = (const struct clk_hw*[]) { 1799 + &cam_cc_xo_clk_src.clkr.hw, 1800 + }, 1801 + .num_parents = 1, 1802 + .flags = CLK_SET_RATE_PARENT, 1803 + .ops = &clk_branch2_ops, 1804 + }, 1805 + }, 1806 + }; 1807 + 1808 + static struct clk_branch cam_cc_camnoc_xo_clk = { 1809 + .halt_reg = 0x13f1c, 1810 + .halt_check = BRANCH_HALT, 1811 + .clkr = { 1812 + .enable_reg = 0x13f1c, 1813 + .enable_mask = BIT(0), 1814 + .hw.init = &(const struct clk_init_data) { 1815 + .name = "cam_cc_camnoc_xo_clk", 1816 + .parent_hws = (const struct clk_hw*[]) { 1817 + &cam_cc_xo_clk_src.clkr.hw, 1818 + }, 1819 + .num_parents = 1, 1820 + .flags = CLK_SET_RATE_PARENT, 1821 + .ops = &clk_branch2_ops, 1822 + }, 1823 + }, 1824 + }; 1825 + 1826 + static struct clk_branch cam_cc_cci_0_clk = { 1827 + .halt_reg = 0x13a2c, 1828 + .halt_check = BRANCH_HALT, 1829 + .clkr = { 1830 + .enable_reg = 0x13a2c, 1831 + .enable_mask = BIT(0), 1832 + .hw.init = &(const struct clk_init_data) { 1833 + .name = "cam_cc_cci_0_clk", 1834 + .parent_hws = (const struct clk_hw*[]) { 1835 + &cam_cc_cci_0_clk_src.clkr.hw, 1836 + }, 1837 + .num_parents = 1, 1838 + .flags = CLK_SET_RATE_PARENT, 1839 + .ops = &clk_branch2_ops, 1840 + }, 1841 + }, 1842 + }; 1843 + 1844 + static struct clk_branch cam_cc_cci_1_clk = { 1845 + .halt_reg = 0x13b5c, 1846 + .halt_check = BRANCH_HALT, 1847 + .clkr = { 1848 + .enable_reg = 0x13b5c, 1849 + .enable_mask = BIT(0), 1850 + .hw.init = &(const struct clk_init_data) { 1851 + .name = "cam_cc_cci_1_clk", 1852 + .parent_hws = (const struct clk_hw*[]) { 1853 + &cam_cc_cci_1_clk_src.clkr.hw, 1854 + }, 1855 + .num_parents = 1, 1856 + .flags = CLK_SET_RATE_PARENT, 1857 + .ops = &clk_branch2_ops, 1858 + }, 1859 + }, 1860 + }; 1861 + 1862 + static struct clk_branch cam_cc_cci_2_clk = { 1863 + .halt_reg = 0x13c8c, 1864 + .halt_check = BRANCH_HALT, 1865 + .clkr = { 1866 + .enable_reg = 0x13c8c, 1867 + .enable_mask = BIT(0), 1868 + .hw.init = &(const struct clk_init_data) { 1869 + .name = "cam_cc_cci_2_clk", 1870 + .parent_hws = (const struct clk_hw*[]) { 1871 + &cam_cc_cci_2_clk_src.clkr.hw, 1872 + }, 1873 + .num_parents = 1, 1874 + .flags = CLK_SET_RATE_PARENT, 1875 + .ops = &clk_branch2_ops, 1876 + }, 1877 + }, 1878 + }; 1879 + 1880 + static struct clk_branch cam_cc_core_ahb_clk = { 1881 + .halt_reg = 0x1406c, 1882 + .halt_check = BRANCH_HALT_DELAY, 1883 + .clkr = { 1884 + .enable_reg = 0x1406c, 1885 + .enable_mask = BIT(0), 1886 + .hw.init = &(const struct clk_init_data) { 1887 + .name = "cam_cc_core_ahb_clk", 1888 + .parent_hws = (const struct clk_hw*[]) { 1889 + &cam_cc_slow_ahb_clk_src.clkr.hw, 1890 + }, 1891 + .num_parents = 1, 1892 + .flags = CLK_SET_RATE_PARENT, 1893 + .ops = &clk_branch2_ops, 1894 + }, 1895 + }, 1896 + }; 1897 + 1898 + static struct clk_branch cam_cc_cpas_ahb_clk = { 1899 + .halt_reg = 0x13c90, 1900 + .halt_check = BRANCH_HALT, 1901 + .clkr = { 1902 + .enable_reg = 0x13c90, 1903 + .enable_mask = BIT(0), 1904 + .hw.init = &(const struct clk_init_data) { 1905 + .name = "cam_cc_cpas_ahb_clk", 1906 + .parent_hws = (const struct clk_hw*[]) { 1907 + &cam_cc_slow_ahb_clk_src.clkr.hw, 1908 + }, 1909 + .num_parents = 1, 1910 + .flags = CLK_SET_RATE_PARENT, 1911 + .ops = &clk_branch2_ops, 1912 + }, 1913 + }, 1914 + }; 1915 + 1916 + static struct clk_branch cam_cc_cpas_bps_clk = { 1917 + .halt_reg = 0x103b0, 1918 + .halt_check = BRANCH_HALT, 1919 + .clkr = { 1920 + .enable_reg = 0x103b0, 1921 + .enable_mask = BIT(0), 1922 + .hw.init = &(const struct clk_init_data) { 1923 + .name = "cam_cc_cpas_bps_clk", 1924 + .parent_hws = (const struct clk_hw*[]) { 1925 + &cam_cc_bps_clk_src.clkr.hw, 1926 + }, 1927 + .num_parents = 1, 1928 + .flags = CLK_SET_RATE_PARENT, 1929 + .ops = &clk_branch2_ops, 1930 + }, 1931 + }, 1932 + }; 1933 + 1934 + static struct clk_branch cam_cc_cpas_cre_clk = { 1935 + .halt_reg = 0x1366c, 1936 + .halt_check = BRANCH_HALT, 1937 + .clkr = { 1938 + .enable_reg = 0x1366c, 1939 + .enable_mask = BIT(0), 1940 + .hw.init = &(const struct clk_init_data) { 1941 + .name = "cam_cc_cpas_cre_clk", 1942 + .parent_hws = (const struct clk_hw*[]) { 1943 + &cam_cc_cre_clk_src.clkr.hw, 1944 + }, 1945 + .num_parents = 1, 1946 + .flags = CLK_SET_RATE_PARENT, 1947 + .ops = &clk_branch2_ops, 1948 + }, 1949 + }, 1950 + }; 1951 + 1952 + static struct clk_branch cam_cc_cpas_fast_ahb_clk = { 1953 + .halt_reg = 0x13c9c, 1954 + .halt_check = BRANCH_HALT, 1955 + .clkr = { 1956 + .enable_reg = 0x13c9c, 1957 + .enable_mask = BIT(0), 1958 + .hw.init = &(const struct clk_init_data) { 1959 + .name = "cam_cc_cpas_fast_ahb_clk", 1960 + .parent_hws = (const struct clk_hw*[]) { 1961 + &cam_cc_fast_ahb_clk_src.clkr.hw, 1962 + }, 1963 + .num_parents = 1, 1964 + .flags = CLK_SET_RATE_PARENT, 1965 + .ops = &clk_branch2_ops, 1966 + }, 1967 + }, 1968 + }; 1969 + 1970 + static struct clk_branch cam_cc_cpas_ife_0_clk = { 1971 + .halt_reg = 0x11150, 1972 + .halt_check = BRANCH_HALT, 1973 + .clkr = { 1974 + .enable_reg = 0x11150, 1975 + .enable_mask = BIT(0), 1976 + .hw.init = &(const struct clk_init_data) { 1977 + .name = "cam_cc_cpas_ife_0_clk", 1978 + .parent_hws = (const struct clk_hw*[]) { 1979 + &cam_cc_ife_0_clk_src.clkr.hw, 1980 + }, 1981 + .num_parents = 1, 1982 + .flags = CLK_SET_RATE_PARENT, 1983 + .ops = &clk_branch2_ops, 1984 + }, 1985 + }, 1986 + }; 1987 + 1988 + static struct clk_branch cam_cc_cpas_ife_1_clk = { 1989 + .halt_reg = 0x12150, 1990 + .halt_check = BRANCH_HALT, 1991 + .clkr = { 1992 + .enable_reg = 0x12150, 1993 + .enable_mask = BIT(0), 1994 + .hw.init = &(const struct clk_init_data) { 1995 + .name = "cam_cc_cpas_ife_1_clk", 1996 + .parent_hws = (const struct clk_hw*[]) { 1997 + &cam_cc_ife_1_clk_src.clkr.hw, 1998 + }, 1999 + .num_parents = 1, 2000 + .flags = CLK_SET_RATE_PARENT, 2001 + .ops = &clk_branch2_ops, 2002 + }, 2003 + }, 2004 + }; 2005 + 2006 + static struct clk_branch cam_cc_cpas_ife_2_clk = { 2007 + .halt_reg = 0x123e0, 2008 + .halt_check = BRANCH_HALT, 2009 + .clkr = { 2010 + .enable_reg = 0x123e0, 2011 + .enable_mask = BIT(0), 2012 + .hw.init = &(const struct clk_init_data) { 2013 + .name = "cam_cc_cpas_ife_2_clk", 2014 + .parent_hws = (const struct clk_hw*[]) { 2015 + &cam_cc_ife_2_clk_src.clkr.hw, 2016 + }, 2017 + .num_parents = 1, 2018 + .flags = CLK_SET_RATE_PARENT, 2019 + .ops = &clk_branch2_ops, 2020 + }, 2021 + }, 2022 + }; 2023 + 2024 + static struct clk_branch cam_cc_cpas_ife_lite_clk = { 2025 + .halt_reg = 0x13138, 2026 + .halt_check = BRANCH_HALT, 2027 + .clkr = { 2028 + .enable_reg = 0x13138, 2029 + .enable_mask = BIT(0), 2030 + .hw.init = &(const struct clk_init_data) { 2031 + .name = "cam_cc_cpas_ife_lite_clk", 2032 + .parent_hws = (const struct clk_hw*[]) { 2033 + &cam_cc_ife_lite_clk_src.clkr.hw, 2034 + }, 2035 + .num_parents = 1, 2036 + .flags = CLK_SET_RATE_PARENT, 2037 + .ops = &clk_branch2_ops, 2038 + }, 2039 + }, 2040 + }; 2041 + 2042 + static struct clk_branch cam_cc_cpas_ipe_nps_clk = { 2043 + .halt_reg = 0x10504, 2044 + .halt_check = BRANCH_HALT, 2045 + .clkr = { 2046 + .enable_reg = 0x10504, 2047 + .enable_mask = BIT(0), 2048 + .hw.init = &(const struct clk_init_data) { 2049 + .name = "cam_cc_cpas_ipe_nps_clk", 2050 + .parent_hws = (const struct clk_hw*[]) { 2051 + &cam_cc_ipe_nps_clk_src.clkr.hw, 2052 + }, 2053 + .num_parents = 1, 2054 + .flags = CLK_SET_RATE_PARENT, 2055 + .ops = &clk_branch2_ops, 2056 + }, 2057 + }, 2058 + }; 2059 + 2060 + static struct clk_branch cam_cc_cpas_sbi_clk = { 2061 + .halt_reg = 0x1054c, 2062 + .halt_check = BRANCH_HALT, 2063 + .clkr = { 2064 + .enable_reg = 0x1054c, 2065 + .enable_mask = BIT(0), 2066 + .hw.init = &(const struct clk_init_data) { 2067 + .name = "cam_cc_cpas_sbi_clk", 2068 + .parent_hws = (const struct clk_hw*[]) { 2069 + &cam_cc_ife_0_clk_src.clkr.hw, 2070 + }, 2071 + .num_parents = 1, 2072 + .flags = CLK_SET_RATE_PARENT, 2073 + .ops = &clk_branch2_ops, 2074 + }, 2075 + }, 2076 + }; 2077 + 2078 + static struct clk_branch cam_cc_cpas_sfe_0_clk = { 2079 + .halt_reg = 0x133cc, 2080 + .halt_check = BRANCH_HALT, 2081 + .clkr = { 2082 + .enable_reg = 0x133cc, 2083 + .enable_mask = BIT(0), 2084 + .hw.init = &(const struct clk_init_data) { 2085 + .name = "cam_cc_cpas_sfe_0_clk", 2086 + .parent_hws = (const struct clk_hw*[]) { 2087 + &cam_cc_sfe_0_clk_src.clkr.hw, 2088 + }, 2089 + .num_parents = 1, 2090 + .flags = CLK_SET_RATE_PARENT, 2091 + .ops = &clk_branch2_ops, 2092 + }, 2093 + }, 2094 + }; 2095 + 2096 + static struct clk_branch cam_cc_cpas_sfe_1_clk = { 2097 + .halt_reg = 0x1352c, 2098 + .halt_check = BRANCH_HALT, 2099 + .clkr = { 2100 + .enable_reg = 0x1352c, 2101 + .enable_mask = BIT(0), 2102 + .hw.init = &(const struct clk_init_data) { 2103 + .name = "cam_cc_cpas_sfe_1_clk", 2104 + .parent_hws = (const struct clk_hw*[]) { 2105 + &cam_cc_sfe_1_clk_src.clkr.hw, 2106 + }, 2107 + .num_parents = 1, 2108 + .flags = CLK_SET_RATE_PARENT, 2109 + .ops = &clk_branch2_ops, 2110 + }, 2111 + }, 2112 + }; 2113 + 2114 + static struct clk_branch cam_cc_cre_ahb_clk = { 2115 + .halt_reg = 0x13670, 2116 + .halt_check = BRANCH_HALT, 2117 + .clkr = { 2118 + .enable_reg = 0x13670, 2119 + .enable_mask = BIT(0), 2120 + .hw.init = &(const struct clk_init_data) { 2121 + .name = "cam_cc_cre_ahb_clk", 2122 + .parent_hws = (const struct clk_hw*[]) { 2123 + &cam_cc_slow_ahb_clk_src.clkr.hw, 2124 + }, 2125 + .num_parents = 1, 2126 + .flags = CLK_SET_RATE_PARENT, 2127 + .ops = &clk_branch2_ops, 2128 + }, 2129 + }, 2130 + }; 2131 + 2132 + static struct clk_branch cam_cc_cre_clk = { 2133 + .halt_reg = 0x13668, 2134 + .halt_check = BRANCH_HALT, 2135 + .clkr = { 2136 + .enable_reg = 0x13668, 2137 + .enable_mask = BIT(0), 2138 + .hw.init = &(const struct clk_init_data) { 2139 + .name = "cam_cc_cre_clk", 2140 + .parent_hws = (const struct clk_hw*[]) { 2141 + &cam_cc_cre_clk_src.clkr.hw, 2142 + }, 2143 + .num_parents = 1, 2144 + .flags = CLK_SET_RATE_PARENT, 2145 + .ops = &clk_branch2_ops, 2146 + }, 2147 + }, 2148 + }; 2149 + 2150 + static struct clk_branch cam_cc_csi0phytimer_clk = { 2151 + .halt_reg = 0x15aac, 2152 + .halt_check = BRANCH_HALT, 2153 + .clkr = { 2154 + .enable_reg = 0x15aac, 2155 + .enable_mask = BIT(0), 2156 + .hw.init = &(const struct clk_init_data) { 2157 + .name = "cam_cc_csi0phytimer_clk", 2158 + .parent_hws = (const struct clk_hw*[]) { 2159 + &cam_cc_csi0phytimer_clk_src.clkr.hw, 2160 + }, 2161 + .num_parents = 1, 2162 + .flags = CLK_SET_RATE_PARENT, 2163 + .ops = &clk_branch2_ops, 2164 + }, 2165 + }, 2166 + }; 2167 + 2168 + static struct clk_branch cam_cc_csi1phytimer_clk = { 2169 + .halt_reg = 0x15be4, 2170 + .halt_check = BRANCH_HALT, 2171 + .clkr = { 2172 + .enable_reg = 0x15be4, 2173 + .enable_mask = BIT(0), 2174 + .hw.init = &(const struct clk_init_data) { 2175 + .name = "cam_cc_csi1phytimer_clk", 2176 + .parent_hws = (const struct clk_hw*[]) { 2177 + &cam_cc_csi1phytimer_clk_src.clkr.hw, 2178 + }, 2179 + .num_parents = 1, 2180 + .flags = CLK_SET_RATE_PARENT, 2181 + .ops = &clk_branch2_ops, 2182 + }, 2183 + }, 2184 + }; 2185 + 2186 + static struct clk_branch cam_cc_csi2phytimer_clk = { 2187 + .halt_reg = 0x15d18, 2188 + .halt_check = BRANCH_HALT, 2189 + .clkr = { 2190 + .enable_reg = 0x15d18, 2191 + .enable_mask = BIT(0), 2192 + .hw.init = &(const struct clk_init_data) { 2193 + .name = "cam_cc_csi2phytimer_clk", 2194 + .parent_hws = (const struct clk_hw*[]) { 2195 + &cam_cc_csi2phytimer_clk_src.clkr.hw, 2196 + }, 2197 + .num_parents = 1, 2198 + .flags = CLK_SET_RATE_PARENT, 2199 + .ops = &clk_branch2_ops, 2200 + }, 2201 + }, 2202 + }; 2203 + 2204 + static struct clk_branch cam_cc_csi3phytimer_clk = { 2205 + .halt_reg = 0x15e4c, 2206 + .halt_check = BRANCH_HALT, 2207 + .clkr = { 2208 + .enable_reg = 0x15e4c, 2209 + .enable_mask = BIT(0), 2210 + .hw.init = &(const struct clk_init_data) { 2211 + .name = "cam_cc_csi3phytimer_clk", 2212 + .parent_hws = (const struct clk_hw*[]) { 2213 + &cam_cc_csi3phytimer_clk_src.clkr.hw, 2214 + }, 2215 + .num_parents = 1, 2216 + .flags = CLK_SET_RATE_PARENT, 2217 + .ops = &clk_branch2_ops, 2218 + }, 2219 + }, 2220 + }; 2221 + 2222 + static struct clk_branch cam_cc_csi4phytimer_clk = { 2223 + .halt_reg = 0x15f80, 2224 + .halt_check = BRANCH_HALT, 2225 + .clkr = { 2226 + .enable_reg = 0x15f80, 2227 + .enable_mask = BIT(0), 2228 + .hw.init = &(const struct clk_init_data) { 2229 + .name = "cam_cc_csi4phytimer_clk", 2230 + .parent_hws = (const struct clk_hw*[]) { 2231 + &cam_cc_csi4phytimer_clk_src.clkr.hw, 2232 + }, 2233 + .num_parents = 1, 2234 + .flags = CLK_SET_RATE_PARENT, 2235 + .ops = &clk_branch2_ops, 2236 + }, 2237 + }, 2238 + }; 2239 + 2240 + static struct clk_branch cam_cc_csi5phytimer_clk = { 2241 + .halt_reg = 0x160b4, 2242 + .halt_check = BRANCH_HALT, 2243 + .clkr = { 2244 + .enable_reg = 0x160b4, 2245 + .enable_mask = BIT(0), 2246 + .hw.init = &(const struct clk_init_data) { 2247 + .name = "cam_cc_csi5phytimer_clk", 2248 + .parent_hws = (const struct clk_hw*[]) { 2249 + &cam_cc_csi5phytimer_clk_src.clkr.hw, 2250 + }, 2251 + .num_parents = 1, 2252 + .flags = CLK_SET_RATE_PARENT, 2253 + .ops = &clk_branch2_ops, 2254 + }, 2255 + }, 2256 + }; 2257 + 2258 + static struct clk_branch cam_cc_csi6phytimer_clk = { 2259 + .halt_reg = 0x161e8, 2260 + .halt_check = BRANCH_HALT, 2261 + .clkr = { 2262 + .enable_reg = 0x161e8, 2263 + .enable_mask = BIT(0), 2264 + .hw.init = &(const struct clk_init_data) { 2265 + .name = "cam_cc_csi6phytimer_clk", 2266 + .parent_hws = (const struct clk_hw*[]) { 2267 + &cam_cc_csi6phytimer_clk_src.clkr.hw, 2268 + }, 2269 + .num_parents = 1, 2270 + .flags = CLK_SET_RATE_PARENT, 2271 + .ops = &clk_branch2_ops, 2272 + }, 2273 + }, 2274 + }; 2275 + 2276 + static struct clk_branch cam_cc_csi7phytimer_clk = { 2277 + .halt_reg = 0x1631c, 2278 + .halt_check = BRANCH_HALT, 2279 + .clkr = { 2280 + .enable_reg = 0x1631c, 2281 + .enable_mask = BIT(0), 2282 + .hw.init = &(const struct clk_init_data) { 2283 + .name = "cam_cc_csi7phytimer_clk", 2284 + .parent_hws = (const struct clk_hw*[]) { 2285 + &cam_cc_csi7phytimer_clk_src.clkr.hw, 2286 + }, 2287 + .num_parents = 1, 2288 + .flags = CLK_SET_RATE_PARENT, 2289 + .ops = &clk_branch2_ops, 2290 + }, 2291 + }, 2292 + }; 2293 + 2294 + static struct clk_branch cam_cc_csid_clk = { 2295 + .halt_reg = 0x13dd4, 2296 + .halt_check = BRANCH_HALT, 2297 + .clkr = { 2298 + .enable_reg = 0x13dd4, 2299 + .enable_mask = BIT(0), 2300 + .hw.init = &(const struct clk_init_data) { 2301 + .name = "cam_cc_csid_clk", 2302 + .parent_hws = (const struct clk_hw*[]) { 2303 + &cam_cc_csid_clk_src.clkr.hw, 2304 + }, 2305 + .num_parents = 1, 2306 + .flags = CLK_SET_RATE_PARENT, 2307 + .ops = &clk_branch2_ops, 2308 + }, 2309 + }, 2310 + }; 2311 + 2312 + static struct clk_branch cam_cc_csid_csiphy_rx_clk = { 2313 + .halt_reg = 0x15ab4, 2314 + .halt_check = BRANCH_HALT, 2315 + .clkr = { 2316 + .enable_reg = 0x15ab4, 2317 + .enable_mask = BIT(0), 2318 + .hw.init = &(const struct clk_init_data) { 2319 + .name = "cam_cc_csid_csiphy_rx_clk", 2320 + .parent_hws = (const struct clk_hw*[]) { 2321 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2322 + }, 2323 + .num_parents = 1, 2324 + .flags = CLK_SET_RATE_PARENT, 2325 + .ops = &clk_branch2_ops, 2326 + }, 2327 + }, 2328 + }; 2329 + 2330 + static struct clk_branch cam_cc_csiphy0_clk = { 2331 + .halt_reg = 0x15ab0, 2332 + .halt_check = BRANCH_HALT, 2333 + .clkr = { 2334 + .enable_reg = 0x15ab0, 2335 + .enable_mask = BIT(0), 2336 + .hw.init = &(const struct clk_init_data) { 2337 + .name = "cam_cc_csiphy0_clk", 2338 + .parent_hws = (const struct clk_hw*[]) { 2339 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2340 + }, 2341 + .num_parents = 1, 2342 + .flags = CLK_SET_RATE_PARENT, 2343 + .ops = &clk_branch2_ops, 2344 + }, 2345 + }, 2346 + }; 2347 + 2348 + static struct clk_branch cam_cc_csiphy1_clk = { 2349 + .halt_reg = 0x15be8, 2350 + .halt_check = BRANCH_HALT, 2351 + .clkr = { 2352 + .enable_reg = 0x15be8, 2353 + .enable_mask = BIT(0), 2354 + .hw.init = &(const struct clk_init_data) { 2355 + .name = "cam_cc_csiphy1_clk", 2356 + .parent_hws = (const struct clk_hw*[]) { 2357 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2358 + }, 2359 + .num_parents = 1, 2360 + .flags = CLK_SET_RATE_PARENT, 2361 + .ops = &clk_branch2_ops, 2362 + }, 2363 + }, 2364 + }; 2365 + 2366 + static struct clk_branch cam_cc_csiphy2_clk = { 2367 + .halt_reg = 0x15d1c, 2368 + .halt_check = BRANCH_HALT, 2369 + .clkr = { 2370 + .enable_reg = 0x15d1c, 2371 + .enable_mask = BIT(0), 2372 + .hw.init = &(const struct clk_init_data) { 2373 + .name = "cam_cc_csiphy2_clk", 2374 + .parent_hws = (const struct clk_hw*[]) { 2375 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2376 + }, 2377 + .num_parents = 1, 2378 + .flags = CLK_SET_RATE_PARENT, 2379 + .ops = &clk_branch2_ops, 2380 + }, 2381 + }, 2382 + }; 2383 + 2384 + static struct clk_branch cam_cc_csiphy3_clk = { 2385 + .halt_reg = 0x15e50, 2386 + .halt_check = BRANCH_HALT, 2387 + .clkr = { 2388 + .enable_reg = 0x15e50, 2389 + .enable_mask = BIT(0), 2390 + .hw.init = &(const struct clk_init_data) { 2391 + .name = "cam_cc_csiphy3_clk", 2392 + .parent_hws = (const struct clk_hw*[]) { 2393 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2394 + }, 2395 + .num_parents = 1, 2396 + .flags = CLK_SET_RATE_PARENT, 2397 + .ops = &clk_branch2_ops, 2398 + }, 2399 + }, 2400 + }; 2401 + 2402 + static struct clk_branch cam_cc_csiphy4_clk = { 2403 + .halt_reg = 0x15f84, 2404 + .halt_check = BRANCH_HALT, 2405 + .clkr = { 2406 + .enable_reg = 0x15f84, 2407 + .enable_mask = BIT(0), 2408 + .hw.init = &(const struct clk_init_data) { 2409 + .name = "cam_cc_csiphy4_clk", 2410 + .parent_hws = (const struct clk_hw*[]) { 2411 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2412 + }, 2413 + .num_parents = 1, 2414 + .flags = CLK_SET_RATE_PARENT, 2415 + .ops = &clk_branch2_ops, 2416 + }, 2417 + }, 2418 + }; 2419 + 2420 + static struct clk_branch cam_cc_csiphy5_clk = { 2421 + .halt_reg = 0x160b8, 2422 + .halt_check = BRANCH_HALT, 2423 + .clkr = { 2424 + .enable_reg = 0x160b8, 2425 + .enable_mask = BIT(0), 2426 + .hw.init = &(const struct clk_init_data) { 2427 + .name = "cam_cc_csiphy5_clk", 2428 + .parent_hws = (const struct clk_hw*[]) { 2429 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2430 + }, 2431 + .num_parents = 1, 2432 + .flags = CLK_SET_RATE_PARENT, 2433 + .ops = &clk_branch2_ops, 2434 + }, 2435 + }, 2436 + }; 2437 + 2438 + static struct clk_branch cam_cc_csiphy6_clk = { 2439 + .halt_reg = 0x161ec, 2440 + .halt_check = BRANCH_HALT, 2441 + .clkr = { 2442 + .enable_reg = 0x161ec, 2443 + .enable_mask = BIT(0), 2444 + .hw.init = &(const struct clk_init_data) { 2445 + .name = "cam_cc_csiphy6_clk", 2446 + .parent_hws = (const struct clk_hw*[]) { 2447 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2448 + }, 2449 + .num_parents = 1, 2450 + .flags = CLK_SET_RATE_PARENT, 2451 + .ops = &clk_branch2_ops, 2452 + }, 2453 + }, 2454 + }; 2455 + 2456 + static struct clk_branch cam_cc_csiphy7_clk = { 2457 + .halt_reg = 0x16320, 2458 + .halt_check = BRANCH_HALT, 2459 + .clkr = { 2460 + .enable_reg = 0x16320, 2461 + .enable_mask = BIT(0), 2462 + .hw.init = &(const struct clk_init_data) { 2463 + .name = "cam_cc_csiphy7_clk", 2464 + .parent_hws = (const struct clk_hw*[]) { 2465 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2466 + }, 2467 + .num_parents = 1, 2468 + .flags = CLK_SET_RATE_PARENT, 2469 + .ops = &clk_branch2_ops, 2470 + }, 2471 + }, 2472 + }; 2473 + 2474 + static struct clk_branch cam_cc_drv_ahb_clk = { 2475 + .halt_reg = 0x142d8, 2476 + .halt_check = BRANCH_HALT, 2477 + .clkr = { 2478 + .enable_reg = 0x142d8, 2479 + .enable_mask = BIT(0), 2480 + .hw.init = &(const struct clk_init_data) { 2481 + .name = "cam_cc_drv_ahb_clk", 2482 + .parent_hws = (const struct clk_hw*[]) { 2483 + &cam_cc_slow_ahb_clk_src.clkr.hw, 2484 + }, 2485 + .num_parents = 1, 2486 + .flags = CLK_SET_RATE_PARENT, 2487 + .ops = &clk_branch2_ops, 2488 + }, 2489 + }, 2490 + }; 2491 + 2492 + static struct clk_branch cam_cc_drv_xo_clk = { 2493 + .halt_reg = 0x142d4, 2494 + .halt_check = BRANCH_HALT, 2495 + .clkr = { 2496 + .enable_reg = 0x142d4, 2497 + .enable_mask = BIT(0), 2498 + .hw.init = &(const struct clk_init_data) { 2499 + .name = "cam_cc_drv_xo_clk", 2500 + .parent_hws = (const struct clk_hw*[]) { 2501 + &cam_cc_xo_clk_src.clkr.hw, 2502 + }, 2503 + .num_parents = 1, 2504 + .flags = CLK_SET_RATE_PARENT, 2505 + .ops = &clk_branch2_ops, 2506 + }, 2507 + }, 2508 + }; 2509 + 2510 + static struct clk_branch cam_cc_icp_ahb_clk = { 2511 + .halt_reg = 0x138fc, 2512 + .halt_check = BRANCH_HALT, 2513 + .clkr = { 2514 + .enable_reg = 0x138fc, 2515 + .enable_mask = BIT(0), 2516 + .hw.init = &(const struct clk_init_data) { 2517 + .name = "cam_cc_icp_ahb_clk", 2518 + .parent_hws = (const struct clk_hw*[]) { 2519 + &cam_cc_slow_ahb_clk_src.clkr.hw, 2520 + }, 2521 + .num_parents = 1, 2522 + .flags = CLK_SET_RATE_PARENT, 2523 + .ops = &clk_branch2_ops, 2524 + }, 2525 + }, 2526 + }; 2527 + 2528 + static struct clk_branch cam_cc_icp_clk = { 2529 + .halt_reg = 0x138f0, 2530 + .halt_check = BRANCH_HALT, 2531 + .clkr = { 2532 + .enable_reg = 0x138f0, 2533 + .enable_mask = BIT(0), 2534 + .hw.init = &(const struct clk_init_data) { 2535 + .name = "cam_cc_icp_clk", 2536 + .parent_hws = (const struct clk_hw*[]) { 2537 + &cam_cc_icp_clk_src.clkr.hw, 2538 + }, 2539 + .num_parents = 1, 2540 + .flags = CLK_SET_RATE_PARENT, 2541 + .ops = &clk_branch2_ops, 2542 + }, 2543 + }, 2544 + }; 2545 + 2546 + static struct clk_branch cam_cc_ife_0_clk = { 2547 + .halt_reg = 0x11144, 2548 + .halt_check = BRANCH_HALT, 2549 + .clkr = { 2550 + .enable_reg = 0x11144, 2551 + .enable_mask = BIT(0), 2552 + .hw.init = &(const struct clk_init_data) { 2553 + .name = "cam_cc_ife_0_clk", 2554 + .parent_hws = (const struct clk_hw*[]) { 2555 + &cam_cc_ife_0_clk_src.clkr.hw, 2556 + }, 2557 + .num_parents = 1, 2558 + .flags = CLK_SET_RATE_PARENT, 2559 + .ops = &clk_branch2_ops, 2560 + }, 2561 + }, 2562 + }; 2563 + 2564 + static struct clk_branch cam_cc_ife_0_dsp_clk = { 2565 + .halt_reg = 0x11280, 2566 + .halt_check = BRANCH_HALT, 2567 + .clkr = { 2568 + .enable_reg = 0x11280, 2569 + .enable_mask = BIT(0), 2570 + .hw.init = &(const struct clk_init_data) { 2571 + .name = "cam_cc_ife_0_dsp_clk", 2572 + .parent_hws = (const struct clk_hw*[]) { 2573 + &cam_cc_ife_0_dsp_clk_src.clkr.hw, 2574 + }, 2575 + .num_parents = 1, 2576 + .flags = CLK_SET_RATE_PARENT, 2577 + .ops = &clk_branch2_ops, 2578 + }, 2579 + }, 2580 + }; 2581 + 2582 + static struct clk_branch cam_cc_ife_0_fast_ahb_clk = { 2583 + .halt_reg = 0x1128c, 2584 + .halt_check = BRANCH_HALT, 2585 + .clkr = { 2586 + .enable_reg = 0x1128c, 2587 + .enable_mask = BIT(0), 2588 + .hw.init = &(const struct clk_init_data) { 2589 + .name = "cam_cc_ife_0_fast_ahb_clk", 2590 + .parent_hws = (const struct clk_hw*[]) { 2591 + &cam_cc_fast_ahb_clk_src.clkr.hw, 2592 + }, 2593 + .num_parents = 1, 2594 + .flags = CLK_SET_RATE_PARENT, 2595 + .ops = &clk_branch2_ops, 2596 + }, 2597 + }, 2598 + }; 2599 + 2600 + static struct clk_branch cam_cc_ife_1_clk = { 2601 + .halt_reg = 0x12144, 2602 + .halt_check = BRANCH_HALT, 2603 + .clkr = { 2604 + .enable_reg = 0x12144, 2605 + .enable_mask = BIT(0), 2606 + .hw.init = &(const struct clk_init_data) { 2607 + .name = "cam_cc_ife_1_clk", 2608 + .parent_hws = (const struct clk_hw*[]) { 2609 + &cam_cc_ife_1_clk_src.clkr.hw, 2610 + }, 2611 + .num_parents = 1, 2612 + .flags = CLK_SET_RATE_PARENT, 2613 + .ops = &clk_branch2_ops, 2614 + }, 2615 + }, 2616 + }; 2617 + 2618 + static struct clk_branch cam_cc_ife_1_dsp_clk = { 2619 + .halt_reg = 0x12280, 2620 + .halt_check = BRANCH_HALT, 2621 + .clkr = { 2622 + .enable_reg = 0x12280, 2623 + .enable_mask = BIT(0), 2624 + .hw.init = &(const struct clk_init_data) { 2625 + .name = "cam_cc_ife_1_dsp_clk", 2626 + .parent_hws = (const struct clk_hw*[]) { 2627 + &cam_cc_ife_1_dsp_clk_src.clkr.hw, 2628 + }, 2629 + .num_parents = 1, 2630 + .flags = CLK_SET_RATE_PARENT, 2631 + .ops = &clk_branch2_ops, 2632 + }, 2633 + }, 2634 + }; 2635 + 2636 + static struct clk_branch cam_cc_ife_1_fast_ahb_clk = { 2637 + .halt_reg = 0x1228c, 2638 + .halt_check = BRANCH_HALT, 2639 + .clkr = { 2640 + .enable_reg = 0x1228c, 2641 + .enable_mask = BIT(0), 2642 + .hw.init = &(const struct clk_init_data) { 2643 + .name = "cam_cc_ife_1_fast_ahb_clk", 2644 + .parent_hws = (const struct clk_hw*[]) { 2645 + &cam_cc_fast_ahb_clk_src.clkr.hw, 2646 + }, 2647 + .num_parents = 1, 2648 + .flags = CLK_SET_RATE_PARENT, 2649 + .ops = &clk_branch2_ops, 2650 + }, 2651 + }, 2652 + }; 2653 + 2654 + static struct clk_branch cam_cc_ife_2_clk = { 2655 + .halt_reg = 0x123d4, 2656 + .halt_check = BRANCH_HALT, 2657 + .clkr = { 2658 + .enable_reg = 0x123d4, 2659 + .enable_mask = BIT(0), 2660 + .hw.init = &(const struct clk_init_data) { 2661 + .name = "cam_cc_ife_2_clk", 2662 + .parent_hws = (const struct clk_hw*[]) { 2663 + &cam_cc_ife_2_clk_src.clkr.hw, 2664 + }, 2665 + .num_parents = 1, 2666 + .flags = CLK_SET_RATE_PARENT, 2667 + .ops = &clk_branch2_ops, 2668 + }, 2669 + }, 2670 + }; 2671 + 2672 + static struct clk_branch cam_cc_ife_2_dsp_clk = { 2673 + .halt_reg = 0x12510, 2674 + .halt_check = BRANCH_HALT, 2675 + .clkr = { 2676 + .enable_reg = 0x12510, 2677 + .enable_mask = BIT(0), 2678 + .hw.init = &(const struct clk_init_data) { 2679 + .name = "cam_cc_ife_2_dsp_clk", 2680 + .parent_hws = (const struct clk_hw*[]) { 2681 + &cam_cc_ife_2_dsp_clk_src.clkr.hw, 2682 + }, 2683 + .num_parents = 1, 2684 + .flags = CLK_SET_RATE_PARENT, 2685 + .ops = &clk_branch2_ops, 2686 + }, 2687 + }, 2688 + }; 2689 + 2690 + static struct clk_branch cam_cc_ife_2_fast_ahb_clk = { 2691 + .halt_reg = 0x1251c, 2692 + .halt_check = BRANCH_HALT, 2693 + .clkr = { 2694 + .enable_reg = 0x1251c, 2695 + .enable_mask = BIT(0), 2696 + .hw.init = &(const struct clk_init_data) { 2697 + .name = "cam_cc_ife_2_fast_ahb_clk", 2698 + .parent_hws = (const struct clk_hw*[]) { 2699 + &cam_cc_fast_ahb_clk_src.clkr.hw, 2700 + }, 2701 + .num_parents = 1, 2702 + .flags = CLK_SET_RATE_PARENT, 2703 + .ops = &clk_branch2_ops, 2704 + }, 2705 + }, 2706 + }; 2707 + 2708 + static struct clk_branch cam_cc_ife_lite_ahb_clk = { 2709 + .halt_reg = 0x13278, 2710 + .halt_check = BRANCH_HALT, 2711 + .clkr = { 2712 + .enable_reg = 0x13278, 2713 + .enable_mask = BIT(0), 2714 + .hw.init = &(const struct clk_init_data) { 2715 + .name = "cam_cc_ife_lite_ahb_clk", 2716 + .parent_hws = (const struct clk_hw*[]) { 2717 + &cam_cc_slow_ahb_clk_src.clkr.hw, 2718 + }, 2719 + .num_parents = 1, 2720 + .flags = CLK_SET_RATE_PARENT, 2721 + .ops = &clk_branch2_ops, 2722 + }, 2723 + }, 2724 + }; 2725 + 2726 + static struct clk_branch cam_cc_ife_lite_clk = { 2727 + .halt_reg = 0x1312c, 2728 + .halt_check = BRANCH_HALT, 2729 + .clkr = { 2730 + .enable_reg = 0x1312c, 2731 + .enable_mask = BIT(0), 2732 + .hw.init = &(const struct clk_init_data) { 2733 + .name = "cam_cc_ife_lite_clk", 2734 + .parent_hws = (const struct clk_hw*[]) { 2735 + &cam_cc_ife_lite_clk_src.clkr.hw, 2736 + }, 2737 + .num_parents = 1, 2738 + .flags = CLK_SET_RATE_PARENT, 2739 + .ops = &clk_branch2_ops, 2740 + }, 2741 + }, 2742 + }; 2743 + 2744 + static struct clk_branch cam_cc_ife_lite_cphy_rx_clk = { 2745 + .halt_reg = 0x13274, 2746 + .halt_check = BRANCH_HALT, 2747 + .clkr = { 2748 + .enable_reg = 0x13274, 2749 + .enable_mask = BIT(0), 2750 + .hw.init = &(const struct clk_init_data) { 2751 + .name = "cam_cc_ife_lite_cphy_rx_clk", 2752 + .parent_hws = (const struct clk_hw*[]) { 2753 + &cam_cc_cphy_rx_clk_src.clkr.hw, 2754 + }, 2755 + .num_parents = 1, 2756 + .flags = CLK_SET_RATE_PARENT, 2757 + .ops = &clk_branch2_ops, 2758 + }, 2759 + }, 2760 + }; 2761 + 2762 + static struct clk_branch cam_cc_ife_lite_csid_clk = { 2763 + .halt_reg = 0x13268, 2764 + .halt_check = BRANCH_HALT, 2765 + .clkr = { 2766 + .enable_reg = 0x13268, 2767 + .enable_mask = BIT(0), 2768 + .hw.init = &(const struct clk_init_data) { 2769 + .name = "cam_cc_ife_lite_csid_clk", 2770 + .parent_hws = (const struct clk_hw*[]) { 2771 + &cam_cc_ife_lite_csid_clk_src.clkr.hw, 2772 + }, 2773 + .num_parents = 1, 2774 + .flags = CLK_SET_RATE_PARENT, 2775 + .ops = &clk_branch2_ops, 2776 + }, 2777 + }, 2778 + }; 2779 + 2780 + static struct clk_branch cam_cc_ipe_nps_ahb_clk = { 2781 + .halt_reg = 0x1051c, 2782 + .halt_check = BRANCH_HALT, 2783 + .clkr = { 2784 + .enable_reg = 0x1051c, 2785 + .enable_mask = BIT(0), 2786 + .hw.init = &(const struct clk_init_data) { 2787 + .name = "cam_cc_ipe_nps_ahb_clk", 2788 + .parent_hws = (const struct clk_hw*[]) { 2789 + &cam_cc_slow_ahb_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 clk_branch cam_cc_ipe_nps_clk = { 2799 + .halt_reg = 0x104f8, 2800 + .halt_check = BRANCH_HALT, 2801 + .clkr = { 2802 + .enable_reg = 0x104f8, 2803 + .enable_mask = BIT(0), 2804 + .hw.init = &(const struct clk_init_data) { 2805 + .name = "cam_cc_ipe_nps_clk", 2806 + .parent_hws = (const struct clk_hw*[]) { 2807 + &cam_cc_ipe_nps_clk_src.clkr.hw, 2808 + }, 2809 + .num_parents = 1, 2810 + .flags = CLK_SET_RATE_PARENT, 2811 + .ops = &clk_branch2_ops, 2812 + }, 2813 + }, 2814 + }; 2815 + 2816 + static struct clk_branch cam_cc_ipe_nps_fast_ahb_clk = { 2817 + .halt_reg = 0x10520, 2818 + .halt_check = BRANCH_HALT, 2819 + .clkr = { 2820 + .enable_reg = 0x10520, 2821 + .enable_mask = BIT(0), 2822 + .hw.init = &(const struct clk_init_data) { 2823 + .name = "cam_cc_ipe_nps_fast_ahb_clk", 2824 + .parent_hws = (const struct clk_hw*[]) { 2825 + &cam_cc_fast_ahb_clk_src.clkr.hw, 2826 + }, 2827 + .num_parents = 1, 2828 + .flags = CLK_SET_RATE_PARENT, 2829 + .ops = &clk_branch2_ops, 2830 + }, 2831 + }, 2832 + }; 2833 + 2834 + static struct clk_branch cam_cc_ipe_pps_clk = { 2835 + .halt_reg = 0x10508, 2836 + .halt_check = BRANCH_HALT, 2837 + .clkr = { 2838 + .enable_reg = 0x10508, 2839 + .enable_mask = BIT(0), 2840 + .hw.init = &(const struct clk_init_data) { 2841 + .name = "cam_cc_ipe_pps_clk", 2842 + .parent_hws = (const struct clk_hw*[]) { 2843 + &cam_cc_ipe_nps_clk_src.clkr.hw, 2844 + }, 2845 + .num_parents = 1, 2846 + .flags = CLK_SET_RATE_PARENT, 2847 + .ops = &clk_branch2_ops, 2848 + }, 2849 + }, 2850 + }; 2851 + 2852 + static struct clk_branch cam_cc_ipe_pps_fast_ahb_clk = { 2853 + .halt_reg = 0x10524, 2854 + .halt_check = BRANCH_HALT, 2855 + .clkr = { 2856 + .enable_reg = 0x10524, 2857 + .enable_mask = BIT(0), 2858 + .hw.init = &(const struct clk_init_data) { 2859 + .name = "cam_cc_ipe_pps_fast_ahb_clk", 2860 + .parent_hws = (const struct clk_hw*[]) { 2861 + &cam_cc_fast_ahb_clk_src.clkr.hw, 2862 + }, 2863 + .num_parents = 1, 2864 + .flags = CLK_SET_RATE_PARENT, 2865 + .ops = &clk_branch2_ops, 2866 + }, 2867 + }, 2868 + }; 2869 + 2870 + static struct clk_branch cam_cc_jpeg_1_clk = { 2871 + .halt_reg = 0x137ac, 2872 + .halt_check = BRANCH_HALT, 2873 + .clkr = { 2874 + .enable_reg = 0x137ac, 2875 + .enable_mask = BIT(0), 2876 + .hw.init = &(const struct clk_init_data) { 2877 + .name = "cam_cc_jpeg_1_clk", 2878 + .parent_hws = (const struct clk_hw*[]) { 2879 + &cam_cc_jpeg_clk_src.clkr.hw, 2880 + }, 2881 + .num_parents = 1, 2882 + .flags = CLK_SET_RATE_PARENT, 2883 + .ops = &clk_branch2_ops, 2884 + }, 2885 + }, 2886 + }; 2887 + 2888 + static struct clk_branch cam_cc_jpeg_clk = { 2889 + .halt_reg = 0x137a0, 2890 + .halt_check = BRANCH_HALT, 2891 + .clkr = { 2892 + .enable_reg = 0x137a0, 2893 + .enable_mask = BIT(0), 2894 + .hw.init = &(const struct clk_init_data) { 2895 + .name = "cam_cc_jpeg_clk", 2896 + .parent_hws = (const struct clk_hw*[]) { 2897 + &cam_cc_jpeg_clk_src.clkr.hw, 2898 + }, 2899 + .num_parents = 1, 2900 + .flags = CLK_SET_RATE_PARENT, 2901 + .ops = &clk_branch2_ops, 2902 + }, 2903 + }, 2904 + }; 2905 + 2906 + static struct clk_branch cam_cc_mclk0_clk = { 2907 + .halt_reg = 0x1512c, 2908 + .halt_check = BRANCH_HALT, 2909 + .clkr = { 2910 + .enable_reg = 0x1512c, 2911 + .enable_mask = BIT(0), 2912 + .hw.init = &(const struct clk_init_data) { 2913 + .name = "cam_cc_mclk0_clk", 2914 + .parent_hws = (const struct clk_hw*[]) { 2915 + &cam_cc_mclk0_clk_src.clkr.hw, 2916 + }, 2917 + .num_parents = 1, 2918 + .flags = CLK_SET_RATE_PARENT, 2919 + .ops = &clk_branch2_ops, 2920 + }, 2921 + }, 2922 + }; 2923 + 2924 + static struct clk_branch cam_cc_mclk1_clk = { 2925 + .halt_reg = 0x1525c, 2926 + .halt_check = BRANCH_HALT, 2927 + .clkr = { 2928 + .enable_reg = 0x1525c, 2929 + .enable_mask = BIT(0), 2930 + .hw.init = &(const struct clk_init_data) { 2931 + .name = "cam_cc_mclk1_clk", 2932 + .parent_hws = (const struct clk_hw*[]) { 2933 + &cam_cc_mclk1_clk_src.clkr.hw, 2934 + }, 2935 + .num_parents = 1, 2936 + .flags = CLK_SET_RATE_PARENT, 2937 + .ops = &clk_branch2_ops, 2938 + }, 2939 + }, 2940 + }; 2941 + 2942 + static struct clk_branch cam_cc_mclk2_clk = { 2943 + .halt_reg = 0x1538c, 2944 + .halt_check = BRANCH_HALT, 2945 + .clkr = { 2946 + .enable_reg = 0x1538c, 2947 + .enable_mask = BIT(0), 2948 + .hw.init = &(const struct clk_init_data) { 2949 + .name = "cam_cc_mclk2_clk", 2950 + .parent_hws = (const struct clk_hw*[]) { 2951 + &cam_cc_mclk2_clk_src.clkr.hw, 2952 + }, 2953 + .num_parents = 1, 2954 + .flags = CLK_SET_RATE_PARENT, 2955 + .ops = &clk_branch2_ops, 2956 + }, 2957 + }, 2958 + }; 2959 + 2960 + static struct clk_branch cam_cc_mclk3_clk = { 2961 + .halt_reg = 0x154bc, 2962 + .halt_check = BRANCH_HALT, 2963 + .clkr = { 2964 + .enable_reg = 0x154bc, 2965 + .enable_mask = BIT(0), 2966 + .hw.init = &(const struct clk_init_data) { 2967 + .name = "cam_cc_mclk3_clk", 2968 + .parent_hws = (const struct clk_hw*[]) { 2969 + &cam_cc_mclk3_clk_src.clkr.hw, 2970 + }, 2971 + .num_parents = 1, 2972 + .flags = CLK_SET_RATE_PARENT, 2973 + .ops = &clk_branch2_ops, 2974 + }, 2975 + }, 2976 + }; 2977 + 2978 + static struct clk_branch cam_cc_mclk4_clk = { 2979 + .halt_reg = 0x155ec, 2980 + .halt_check = BRANCH_HALT, 2981 + .clkr = { 2982 + .enable_reg = 0x155ec, 2983 + .enable_mask = BIT(0), 2984 + .hw.init = &(const struct clk_init_data) { 2985 + .name = "cam_cc_mclk4_clk", 2986 + .parent_hws = (const struct clk_hw*[]) { 2987 + &cam_cc_mclk4_clk_src.clkr.hw, 2988 + }, 2989 + .num_parents = 1, 2990 + .flags = CLK_SET_RATE_PARENT, 2991 + .ops = &clk_branch2_ops, 2992 + }, 2993 + }, 2994 + }; 2995 + 2996 + static struct clk_branch cam_cc_mclk5_clk = { 2997 + .halt_reg = 0x1571c, 2998 + .halt_check = BRANCH_HALT, 2999 + .clkr = { 3000 + .enable_reg = 0x1571c, 3001 + .enable_mask = BIT(0), 3002 + .hw.init = &(const struct clk_init_data) { 3003 + .name = "cam_cc_mclk5_clk", 3004 + .parent_hws = (const struct clk_hw*[]) { 3005 + &cam_cc_mclk5_clk_src.clkr.hw, 3006 + }, 3007 + .num_parents = 1, 3008 + .flags = CLK_SET_RATE_PARENT, 3009 + .ops = &clk_branch2_ops, 3010 + }, 3011 + }, 3012 + }; 3013 + 3014 + static struct clk_branch cam_cc_mclk6_clk = { 3015 + .halt_reg = 0x1584c, 3016 + .halt_check = BRANCH_HALT, 3017 + .clkr = { 3018 + .enable_reg = 0x1584c, 3019 + .enable_mask = BIT(0), 3020 + .hw.init = &(const struct clk_init_data) { 3021 + .name = "cam_cc_mclk6_clk", 3022 + .parent_hws = (const struct clk_hw*[]) { 3023 + &cam_cc_mclk6_clk_src.clkr.hw, 3024 + }, 3025 + .num_parents = 1, 3026 + .flags = CLK_SET_RATE_PARENT, 3027 + .ops = &clk_branch2_ops, 3028 + }, 3029 + }, 3030 + }; 3031 + 3032 + static struct clk_branch cam_cc_mclk7_clk = { 3033 + .halt_reg = 0x1597c, 3034 + .halt_check = BRANCH_HALT, 3035 + .clkr = { 3036 + .enable_reg = 0x1597c, 3037 + .enable_mask = BIT(0), 3038 + .hw.init = &(const struct clk_init_data) { 3039 + .name = "cam_cc_mclk7_clk", 3040 + .parent_hws = (const struct clk_hw*[]) { 3041 + &cam_cc_mclk7_clk_src.clkr.hw, 3042 + }, 3043 + .num_parents = 1, 3044 + .flags = CLK_SET_RATE_PARENT, 3045 + .ops = &clk_branch2_ops, 3046 + }, 3047 + }, 3048 + }; 3049 + 3050 + static struct clk_branch cam_cc_qdss_debug_clk = { 3051 + .halt_reg = 0x14050, 3052 + .halt_check = BRANCH_HALT, 3053 + .clkr = { 3054 + .enable_reg = 0x14050, 3055 + .enable_mask = BIT(0), 3056 + .hw.init = &(const struct clk_init_data) { 3057 + .name = "cam_cc_qdss_debug_clk", 3058 + .parent_hws = (const struct clk_hw*[]) { 3059 + &cam_cc_qdss_debug_clk_src.clkr.hw, 3060 + }, 3061 + .num_parents = 1, 3062 + .flags = CLK_SET_RATE_PARENT, 3063 + .ops = &clk_branch2_ops, 3064 + }, 3065 + }, 3066 + }; 3067 + 3068 + static struct clk_branch cam_cc_qdss_debug_xo_clk = { 3069 + .halt_reg = 0x14054, 3070 + .halt_check = BRANCH_HALT, 3071 + .clkr = { 3072 + .enable_reg = 0x14054, 3073 + .enable_mask = BIT(0), 3074 + .hw.init = &(const struct clk_init_data) { 3075 + .name = "cam_cc_qdss_debug_xo_clk", 3076 + .parent_hws = (const struct clk_hw*[]) { 3077 + &cam_cc_xo_clk_src.clkr.hw, 3078 + }, 3079 + .num_parents = 1, 3080 + .flags = CLK_SET_RATE_PARENT, 3081 + .ops = &clk_branch2_ops, 3082 + }, 3083 + }, 3084 + }; 3085 + 3086 + static struct clk_branch cam_cc_sbi_clk = { 3087 + .halt_reg = 0x10540, 3088 + .halt_check = BRANCH_HALT, 3089 + .clkr = { 3090 + .enable_reg = 0x10540, 3091 + .enable_mask = BIT(0), 3092 + .hw.init = &(const struct clk_init_data) { 3093 + .name = "cam_cc_sbi_clk", 3094 + .parent_hws = (const struct clk_hw*[]) { 3095 + &cam_cc_ife_0_clk_src.clkr.hw, 3096 + }, 3097 + .num_parents = 1, 3098 + .flags = CLK_SET_RATE_PARENT, 3099 + .ops = &clk_branch2_ops, 3100 + }, 3101 + }, 3102 + }; 3103 + 3104 + static struct clk_branch cam_cc_sbi_fast_ahb_clk = { 3105 + .halt_reg = 0x10550, 3106 + .halt_check = BRANCH_HALT, 3107 + .clkr = { 3108 + .enable_reg = 0x10550, 3109 + .enable_mask = BIT(0), 3110 + .hw.init = &(const struct clk_init_data) { 3111 + .name = "cam_cc_sbi_fast_ahb_clk", 3112 + .parent_hws = (const struct clk_hw*[]) { 3113 + &cam_cc_fast_ahb_clk_src.clkr.hw, 3114 + }, 3115 + .num_parents = 1, 3116 + .flags = CLK_SET_RATE_PARENT, 3117 + .ops = &clk_branch2_ops, 3118 + }, 3119 + }, 3120 + }; 3121 + 3122 + static struct clk_branch cam_cc_sfe_0_clk = { 3123 + .halt_reg = 0x133c0, 3124 + .halt_check = BRANCH_HALT, 3125 + .clkr = { 3126 + .enable_reg = 0x133c0, 3127 + .enable_mask = BIT(0), 3128 + .hw.init = &(const struct clk_init_data) { 3129 + .name = "cam_cc_sfe_0_clk", 3130 + .parent_hws = (const struct clk_hw*[]) { 3131 + &cam_cc_sfe_0_clk_src.clkr.hw, 3132 + }, 3133 + .num_parents = 1, 3134 + .flags = CLK_SET_RATE_PARENT, 3135 + .ops = &clk_branch2_ops, 3136 + }, 3137 + }, 3138 + }; 3139 + 3140 + static struct clk_branch cam_cc_sfe_0_fast_ahb_clk = { 3141 + .halt_reg = 0x133d8, 3142 + .halt_check = BRANCH_HALT, 3143 + .clkr = { 3144 + .enable_reg = 0x133d8, 3145 + .enable_mask = BIT(0), 3146 + .hw.init = &(const struct clk_init_data) { 3147 + .name = "cam_cc_sfe_0_fast_ahb_clk", 3148 + .parent_hws = (const struct clk_hw*[]) { 3149 + &cam_cc_fast_ahb_clk_src.clkr.hw, 3150 + }, 3151 + .num_parents = 1, 3152 + .flags = CLK_SET_RATE_PARENT, 3153 + .ops = &clk_branch2_ops, 3154 + }, 3155 + }, 3156 + }; 3157 + 3158 + static struct clk_branch cam_cc_sfe_1_clk = { 3159 + .halt_reg = 0x13520, 3160 + .halt_check = BRANCH_HALT, 3161 + .clkr = { 3162 + .enable_reg = 0x13520, 3163 + .enable_mask = BIT(0), 3164 + .hw.init = &(const struct clk_init_data) { 3165 + .name = "cam_cc_sfe_1_clk", 3166 + .parent_hws = (const struct clk_hw*[]) { 3167 + &cam_cc_sfe_1_clk_src.clkr.hw, 3168 + }, 3169 + .num_parents = 1, 3170 + .flags = CLK_SET_RATE_PARENT, 3171 + .ops = &clk_branch2_ops, 3172 + }, 3173 + }, 3174 + }; 3175 + 3176 + static struct clk_branch cam_cc_sfe_1_fast_ahb_clk = { 3177 + .halt_reg = 0x13538, 3178 + .halt_check = BRANCH_HALT, 3179 + .clkr = { 3180 + .enable_reg = 0x13538, 3181 + .enable_mask = BIT(0), 3182 + .hw.init = &(const struct clk_init_data) { 3183 + .name = "cam_cc_sfe_1_fast_ahb_clk", 3184 + .parent_hws = (const struct clk_hw*[]) { 3185 + &cam_cc_fast_ahb_clk_src.clkr.hw, 3186 + }, 3187 + .num_parents = 1, 3188 + .flags = CLK_SET_RATE_PARENT, 3189 + .ops = &clk_branch2_ops, 3190 + }, 3191 + }, 3192 + }; 3193 + 3194 + static struct gdsc cam_cc_bps_gdsc = { 3195 + .gdscr = 0x10004, 3196 + .en_rest_wait_val = 0x2, 3197 + .en_few_wait_val = 0x2, 3198 + .clk_dis_wait_val = 0xf, 3199 + .pd = { 3200 + .name = "cam_cc_bps_gdsc", 3201 + }, 3202 + .pwrsts = PWRSTS_OFF_ON, 3203 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3204 + }; 3205 + 3206 + static struct gdsc cam_cc_ife_0_gdsc = { 3207 + .gdscr = 0x11004, 3208 + .en_rest_wait_val = 0x2, 3209 + .en_few_wait_val = 0x2, 3210 + .clk_dis_wait_val = 0xf, 3211 + .pd = { 3212 + .name = "cam_cc_ife_0_gdsc", 3213 + }, 3214 + .pwrsts = PWRSTS_OFF_ON, 3215 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3216 + }; 3217 + 3218 + static struct gdsc cam_cc_ife_1_gdsc = { 3219 + .gdscr = 0x12004, 3220 + .en_rest_wait_val = 0x2, 3221 + .en_few_wait_val = 0x2, 3222 + .clk_dis_wait_val = 0xf, 3223 + .pd = { 3224 + .name = "cam_cc_ife_1_gdsc", 3225 + }, 3226 + .pwrsts = PWRSTS_OFF_ON, 3227 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3228 + }; 3229 + 3230 + static struct gdsc cam_cc_ife_2_gdsc = { 3231 + .gdscr = 0x12294, 3232 + .en_rest_wait_val = 0x2, 3233 + .en_few_wait_val = 0x2, 3234 + .clk_dis_wait_val = 0xf, 3235 + .pd = { 3236 + .name = "cam_cc_ife_2_gdsc", 3237 + }, 3238 + .pwrsts = PWRSTS_OFF_ON, 3239 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3240 + }; 3241 + 3242 + static struct gdsc cam_cc_ipe_0_gdsc = { 3243 + .gdscr = 0x103b8, 3244 + .en_rest_wait_val = 0x2, 3245 + .en_few_wait_val = 0x2, 3246 + .clk_dis_wait_val = 0xf, 3247 + .pd = { 3248 + .name = "cam_cc_ipe_0_gdsc", 3249 + }, 3250 + .pwrsts = PWRSTS_OFF_ON, 3251 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3252 + }; 3253 + 3254 + static struct gdsc cam_cc_sbi_gdsc = { 3255 + .gdscr = 0x1052c, 3256 + .en_rest_wait_val = 0x2, 3257 + .en_few_wait_val = 0x2, 3258 + .clk_dis_wait_val = 0xf, 3259 + .pd = { 3260 + .name = "cam_cc_sbi_gdsc", 3261 + }, 3262 + .pwrsts = PWRSTS_OFF_ON, 3263 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3264 + }; 3265 + 3266 + static struct gdsc cam_cc_sfe_0_gdsc = { 3267 + .gdscr = 0x13280, 3268 + .en_rest_wait_val = 0x2, 3269 + .en_few_wait_val = 0x2, 3270 + .clk_dis_wait_val = 0xf, 3271 + .pd = { 3272 + .name = "cam_cc_sfe_0_gdsc", 3273 + }, 3274 + .pwrsts = PWRSTS_OFF_ON, 3275 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3276 + }; 3277 + 3278 + static struct gdsc cam_cc_sfe_1_gdsc = { 3279 + .gdscr = 0x133e0, 3280 + .en_rest_wait_val = 0x2, 3281 + .en_few_wait_val = 0x2, 3282 + .clk_dis_wait_val = 0xf, 3283 + .pd = { 3284 + .name = "cam_cc_sfe_1_gdsc", 3285 + }, 3286 + .pwrsts = PWRSTS_OFF_ON, 3287 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3288 + }; 3289 + 3290 + static struct gdsc cam_cc_titan_top_gdsc = { 3291 + .gdscr = 0x14058, 3292 + .en_rest_wait_val = 0x2, 3293 + .en_few_wait_val = 0x2, 3294 + .clk_dis_wait_val = 0xf, 3295 + .pd = { 3296 + .name = "cam_cc_titan_top_gdsc", 3297 + }, 3298 + .pwrsts = PWRSTS_OFF_ON, 3299 + .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, 3300 + }; 3301 + 3302 + static struct clk_regmap *cam_cc_sm8550_clocks[] = { 3303 + [CAM_CC_BPS_AHB_CLK] = &cam_cc_bps_ahb_clk.clkr, 3304 + [CAM_CC_BPS_CLK] = &cam_cc_bps_clk.clkr, 3305 + [CAM_CC_BPS_CLK_SRC] = &cam_cc_bps_clk_src.clkr, 3306 + [CAM_CC_BPS_FAST_AHB_CLK] = &cam_cc_bps_fast_ahb_clk.clkr, 3307 + [CAM_CC_CAMNOC_AXI_CLK] = &cam_cc_camnoc_axi_clk.clkr, 3308 + [CAM_CC_CAMNOC_AXI_CLK_SRC] = &cam_cc_camnoc_axi_clk_src.clkr, 3309 + [CAM_CC_CAMNOC_DCD_XO_CLK] = &cam_cc_camnoc_dcd_xo_clk.clkr, 3310 + [CAM_CC_CAMNOC_XO_CLK] = &cam_cc_camnoc_xo_clk.clkr, 3311 + [CAM_CC_CCI_0_CLK] = &cam_cc_cci_0_clk.clkr, 3312 + [CAM_CC_CCI_0_CLK_SRC] = &cam_cc_cci_0_clk_src.clkr, 3313 + [CAM_CC_CCI_1_CLK] = &cam_cc_cci_1_clk.clkr, 3314 + [CAM_CC_CCI_1_CLK_SRC] = &cam_cc_cci_1_clk_src.clkr, 3315 + [CAM_CC_CCI_2_CLK] = &cam_cc_cci_2_clk.clkr, 3316 + [CAM_CC_CCI_2_CLK_SRC] = &cam_cc_cci_2_clk_src.clkr, 3317 + [CAM_CC_CORE_AHB_CLK] = &cam_cc_core_ahb_clk.clkr, 3318 + [CAM_CC_CPAS_AHB_CLK] = &cam_cc_cpas_ahb_clk.clkr, 3319 + [CAM_CC_CPAS_BPS_CLK] = &cam_cc_cpas_bps_clk.clkr, 3320 + [CAM_CC_CPAS_CRE_CLK] = &cam_cc_cpas_cre_clk.clkr, 3321 + [CAM_CC_CPAS_FAST_AHB_CLK] = &cam_cc_cpas_fast_ahb_clk.clkr, 3322 + [CAM_CC_CPAS_IFE_0_CLK] = &cam_cc_cpas_ife_0_clk.clkr, 3323 + [CAM_CC_CPAS_IFE_1_CLK] = &cam_cc_cpas_ife_1_clk.clkr, 3324 + [CAM_CC_CPAS_IFE_2_CLK] = &cam_cc_cpas_ife_2_clk.clkr, 3325 + [CAM_CC_CPAS_IFE_LITE_CLK] = &cam_cc_cpas_ife_lite_clk.clkr, 3326 + [CAM_CC_CPAS_IPE_NPS_CLK] = &cam_cc_cpas_ipe_nps_clk.clkr, 3327 + [CAM_CC_CPAS_SBI_CLK] = &cam_cc_cpas_sbi_clk.clkr, 3328 + [CAM_CC_CPAS_SFE_0_CLK] = &cam_cc_cpas_sfe_0_clk.clkr, 3329 + [CAM_CC_CPAS_SFE_1_CLK] = &cam_cc_cpas_sfe_1_clk.clkr, 3330 + [CAM_CC_CPHY_RX_CLK_SRC] = &cam_cc_cphy_rx_clk_src.clkr, 3331 + [CAM_CC_CRE_AHB_CLK] = &cam_cc_cre_ahb_clk.clkr, 3332 + [CAM_CC_CRE_CLK] = &cam_cc_cre_clk.clkr, 3333 + [CAM_CC_CRE_CLK_SRC] = &cam_cc_cre_clk_src.clkr, 3334 + [CAM_CC_CSI0PHYTIMER_CLK] = &cam_cc_csi0phytimer_clk.clkr, 3335 + [CAM_CC_CSI0PHYTIMER_CLK_SRC] = &cam_cc_csi0phytimer_clk_src.clkr, 3336 + [CAM_CC_CSI1PHYTIMER_CLK] = &cam_cc_csi1phytimer_clk.clkr, 3337 + [CAM_CC_CSI1PHYTIMER_CLK_SRC] = &cam_cc_csi1phytimer_clk_src.clkr, 3338 + [CAM_CC_CSI2PHYTIMER_CLK] = &cam_cc_csi2phytimer_clk.clkr, 3339 + [CAM_CC_CSI2PHYTIMER_CLK_SRC] = &cam_cc_csi2phytimer_clk_src.clkr, 3340 + [CAM_CC_CSI3PHYTIMER_CLK] = &cam_cc_csi3phytimer_clk.clkr, 3341 + [CAM_CC_CSI3PHYTIMER_CLK_SRC] = &cam_cc_csi3phytimer_clk_src.clkr, 3342 + [CAM_CC_CSI4PHYTIMER_CLK] = &cam_cc_csi4phytimer_clk.clkr, 3343 + [CAM_CC_CSI4PHYTIMER_CLK_SRC] = &cam_cc_csi4phytimer_clk_src.clkr, 3344 + [CAM_CC_CSI5PHYTIMER_CLK] = &cam_cc_csi5phytimer_clk.clkr, 3345 + [CAM_CC_CSI5PHYTIMER_CLK_SRC] = &cam_cc_csi5phytimer_clk_src.clkr, 3346 + [CAM_CC_CSI6PHYTIMER_CLK] = &cam_cc_csi6phytimer_clk.clkr, 3347 + [CAM_CC_CSI6PHYTIMER_CLK_SRC] = &cam_cc_csi6phytimer_clk_src.clkr, 3348 + [CAM_CC_CSI7PHYTIMER_CLK] = &cam_cc_csi7phytimer_clk.clkr, 3349 + [CAM_CC_CSI7PHYTIMER_CLK_SRC] = &cam_cc_csi7phytimer_clk_src.clkr, 3350 + [CAM_CC_CSID_CLK] = &cam_cc_csid_clk.clkr, 3351 + [CAM_CC_CSID_CLK_SRC] = &cam_cc_csid_clk_src.clkr, 3352 + [CAM_CC_CSID_CSIPHY_RX_CLK] = &cam_cc_csid_csiphy_rx_clk.clkr, 3353 + [CAM_CC_CSIPHY0_CLK] = &cam_cc_csiphy0_clk.clkr, 3354 + [CAM_CC_CSIPHY1_CLK] = &cam_cc_csiphy1_clk.clkr, 3355 + [CAM_CC_CSIPHY2_CLK] = &cam_cc_csiphy2_clk.clkr, 3356 + [CAM_CC_CSIPHY3_CLK] = &cam_cc_csiphy3_clk.clkr, 3357 + [CAM_CC_CSIPHY4_CLK] = &cam_cc_csiphy4_clk.clkr, 3358 + [CAM_CC_CSIPHY5_CLK] = &cam_cc_csiphy5_clk.clkr, 3359 + [CAM_CC_CSIPHY6_CLK] = &cam_cc_csiphy6_clk.clkr, 3360 + [CAM_CC_CSIPHY7_CLK] = &cam_cc_csiphy7_clk.clkr, 3361 + [CAM_CC_DRV_AHB_CLK] = &cam_cc_drv_ahb_clk.clkr, 3362 + [CAM_CC_DRV_XO_CLK] = &cam_cc_drv_xo_clk.clkr, 3363 + [CAM_CC_FAST_AHB_CLK_SRC] = &cam_cc_fast_ahb_clk_src.clkr, 3364 + [CAM_CC_ICP_AHB_CLK] = &cam_cc_icp_ahb_clk.clkr, 3365 + [CAM_CC_ICP_CLK] = &cam_cc_icp_clk.clkr, 3366 + [CAM_CC_ICP_CLK_SRC] = &cam_cc_icp_clk_src.clkr, 3367 + [CAM_CC_IFE_0_CLK] = &cam_cc_ife_0_clk.clkr, 3368 + [CAM_CC_IFE_0_CLK_SRC] = &cam_cc_ife_0_clk_src.clkr, 3369 + [CAM_CC_IFE_0_DSP_CLK] = &cam_cc_ife_0_dsp_clk.clkr, 3370 + [CAM_CC_IFE_0_DSP_CLK_SRC] = &cam_cc_ife_0_dsp_clk_src.clkr, 3371 + [CAM_CC_IFE_0_FAST_AHB_CLK] = &cam_cc_ife_0_fast_ahb_clk.clkr, 3372 + [CAM_CC_IFE_1_CLK] = &cam_cc_ife_1_clk.clkr, 3373 + [CAM_CC_IFE_1_CLK_SRC] = &cam_cc_ife_1_clk_src.clkr, 3374 + [CAM_CC_IFE_1_DSP_CLK] = &cam_cc_ife_1_dsp_clk.clkr, 3375 + [CAM_CC_IFE_1_DSP_CLK_SRC] = &cam_cc_ife_1_dsp_clk_src.clkr, 3376 + [CAM_CC_IFE_1_FAST_AHB_CLK] = &cam_cc_ife_1_fast_ahb_clk.clkr, 3377 + [CAM_CC_IFE_2_CLK] = &cam_cc_ife_2_clk.clkr, 3378 + [CAM_CC_IFE_2_CLK_SRC] = &cam_cc_ife_2_clk_src.clkr, 3379 + [CAM_CC_IFE_2_DSP_CLK] = &cam_cc_ife_2_dsp_clk.clkr, 3380 + [CAM_CC_IFE_2_DSP_CLK_SRC] = &cam_cc_ife_2_dsp_clk_src.clkr, 3381 + [CAM_CC_IFE_2_FAST_AHB_CLK] = &cam_cc_ife_2_fast_ahb_clk.clkr, 3382 + [CAM_CC_IFE_LITE_AHB_CLK] = &cam_cc_ife_lite_ahb_clk.clkr, 3383 + [CAM_CC_IFE_LITE_CLK] = &cam_cc_ife_lite_clk.clkr, 3384 + [CAM_CC_IFE_LITE_CLK_SRC] = &cam_cc_ife_lite_clk_src.clkr, 3385 + [CAM_CC_IFE_LITE_CPHY_RX_CLK] = &cam_cc_ife_lite_cphy_rx_clk.clkr, 3386 + [CAM_CC_IFE_LITE_CSID_CLK] = &cam_cc_ife_lite_csid_clk.clkr, 3387 + [CAM_CC_IFE_LITE_CSID_CLK_SRC] = &cam_cc_ife_lite_csid_clk_src.clkr, 3388 + [CAM_CC_IPE_NPS_AHB_CLK] = &cam_cc_ipe_nps_ahb_clk.clkr, 3389 + [CAM_CC_IPE_NPS_CLK] = &cam_cc_ipe_nps_clk.clkr, 3390 + [CAM_CC_IPE_NPS_CLK_SRC] = &cam_cc_ipe_nps_clk_src.clkr, 3391 + [CAM_CC_IPE_NPS_FAST_AHB_CLK] = &cam_cc_ipe_nps_fast_ahb_clk.clkr, 3392 + [CAM_CC_IPE_PPS_CLK] = &cam_cc_ipe_pps_clk.clkr, 3393 + [CAM_CC_IPE_PPS_FAST_AHB_CLK] = &cam_cc_ipe_pps_fast_ahb_clk.clkr, 3394 + [CAM_CC_JPEG_1_CLK] = &cam_cc_jpeg_1_clk.clkr, 3395 + [CAM_CC_JPEG_CLK] = &cam_cc_jpeg_clk.clkr, 3396 + [CAM_CC_JPEG_CLK_SRC] = &cam_cc_jpeg_clk_src.clkr, 3397 + [CAM_CC_MCLK0_CLK] = &cam_cc_mclk0_clk.clkr, 3398 + [CAM_CC_MCLK0_CLK_SRC] = &cam_cc_mclk0_clk_src.clkr, 3399 + [CAM_CC_MCLK1_CLK] = &cam_cc_mclk1_clk.clkr, 3400 + [CAM_CC_MCLK1_CLK_SRC] = &cam_cc_mclk1_clk_src.clkr, 3401 + [CAM_CC_MCLK2_CLK] = &cam_cc_mclk2_clk.clkr, 3402 + [CAM_CC_MCLK2_CLK_SRC] = &cam_cc_mclk2_clk_src.clkr, 3403 + [CAM_CC_MCLK3_CLK] = &cam_cc_mclk3_clk.clkr, 3404 + [CAM_CC_MCLK3_CLK_SRC] = &cam_cc_mclk3_clk_src.clkr, 3405 + [CAM_CC_MCLK4_CLK] = &cam_cc_mclk4_clk.clkr, 3406 + [CAM_CC_MCLK4_CLK_SRC] = &cam_cc_mclk4_clk_src.clkr, 3407 + [CAM_CC_MCLK5_CLK] = &cam_cc_mclk5_clk.clkr, 3408 + [CAM_CC_MCLK5_CLK_SRC] = &cam_cc_mclk5_clk_src.clkr, 3409 + [CAM_CC_MCLK6_CLK] = &cam_cc_mclk6_clk.clkr, 3410 + [CAM_CC_MCLK6_CLK_SRC] = &cam_cc_mclk6_clk_src.clkr, 3411 + [CAM_CC_MCLK7_CLK] = &cam_cc_mclk7_clk.clkr, 3412 + [CAM_CC_MCLK7_CLK_SRC] = &cam_cc_mclk7_clk_src.clkr, 3413 + [CAM_CC_PLL0] = &cam_cc_pll0.clkr, 3414 + [CAM_CC_PLL0_OUT_EVEN] = &cam_cc_pll0_out_even.clkr, 3415 + [CAM_CC_PLL0_OUT_ODD] = &cam_cc_pll0_out_odd.clkr, 3416 + [CAM_CC_PLL1] = &cam_cc_pll1.clkr, 3417 + [CAM_CC_PLL1_OUT_EVEN] = &cam_cc_pll1_out_even.clkr, 3418 + [CAM_CC_PLL2] = &cam_cc_pll2.clkr, 3419 + [CAM_CC_PLL3] = &cam_cc_pll3.clkr, 3420 + [CAM_CC_PLL3_OUT_EVEN] = &cam_cc_pll3_out_even.clkr, 3421 + [CAM_CC_PLL4] = &cam_cc_pll4.clkr, 3422 + [CAM_CC_PLL4_OUT_EVEN] = &cam_cc_pll4_out_even.clkr, 3423 + [CAM_CC_PLL5] = &cam_cc_pll5.clkr, 3424 + [CAM_CC_PLL5_OUT_EVEN] = &cam_cc_pll5_out_even.clkr, 3425 + [CAM_CC_PLL6] = &cam_cc_pll6.clkr, 3426 + [CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr, 3427 + [CAM_CC_PLL7] = &cam_cc_pll7.clkr, 3428 + [CAM_CC_PLL7_OUT_EVEN] = &cam_cc_pll7_out_even.clkr, 3429 + [CAM_CC_PLL8] = &cam_cc_pll8.clkr, 3430 + [CAM_CC_PLL8_OUT_EVEN] = &cam_cc_pll8_out_even.clkr, 3431 + [CAM_CC_PLL9] = &cam_cc_pll9.clkr, 3432 + [CAM_CC_PLL9_OUT_EVEN] = &cam_cc_pll9_out_even.clkr, 3433 + [CAM_CC_PLL10] = &cam_cc_pll10.clkr, 3434 + [CAM_CC_PLL10_OUT_EVEN] = &cam_cc_pll10_out_even.clkr, 3435 + [CAM_CC_PLL11] = &cam_cc_pll11.clkr, 3436 + [CAM_CC_PLL11_OUT_EVEN] = &cam_cc_pll11_out_even.clkr, 3437 + [CAM_CC_PLL12] = &cam_cc_pll12.clkr, 3438 + [CAM_CC_PLL12_OUT_EVEN] = &cam_cc_pll12_out_even.clkr, 3439 + [CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr, 3440 + [CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr, 3441 + [CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr, 3442 + [CAM_CC_SBI_CLK] = &cam_cc_sbi_clk.clkr, 3443 + [CAM_CC_SBI_FAST_AHB_CLK] = &cam_cc_sbi_fast_ahb_clk.clkr, 3444 + [CAM_CC_SFE_0_CLK] = &cam_cc_sfe_0_clk.clkr, 3445 + [CAM_CC_SFE_0_CLK_SRC] = &cam_cc_sfe_0_clk_src.clkr, 3446 + [CAM_CC_SFE_0_FAST_AHB_CLK] = &cam_cc_sfe_0_fast_ahb_clk.clkr, 3447 + [CAM_CC_SFE_1_CLK] = &cam_cc_sfe_1_clk.clkr, 3448 + [CAM_CC_SFE_1_CLK_SRC] = &cam_cc_sfe_1_clk_src.clkr, 3449 + [CAM_CC_SFE_1_FAST_AHB_CLK] = &cam_cc_sfe_1_fast_ahb_clk.clkr, 3450 + [CAM_CC_SLEEP_CLK_SRC] = &cam_cc_sleep_clk_src.clkr, 3451 + [CAM_CC_SLOW_AHB_CLK_SRC] = &cam_cc_slow_ahb_clk_src.clkr, 3452 + [CAM_CC_XO_CLK_SRC] = &cam_cc_xo_clk_src.clkr, 3453 + }; 3454 + 3455 + static struct gdsc *cam_cc_sm8550_gdscs[] = { 3456 + [CAM_CC_BPS_GDSC] = &cam_cc_bps_gdsc, 3457 + [CAM_CC_IFE_0_GDSC] = &cam_cc_ife_0_gdsc, 3458 + [CAM_CC_IFE_1_GDSC] = &cam_cc_ife_1_gdsc, 3459 + [CAM_CC_IFE_2_GDSC] = &cam_cc_ife_2_gdsc, 3460 + [CAM_CC_IPE_0_GDSC] = &cam_cc_ipe_0_gdsc, 3461 + [CAM_CC_SBI_GDSC] = &cam_cc_sbi_gdsc, 3462 + [CAM_CC_SFE_0_GDSC] = &cam_cc_sfe_0_gdsc, 3463 + [CAM_CC_SFE_1_GDSC] = &cam_cc_sfe_1_gdsc, 3464 + [CAM_CC_TITAN_TOP_GDSC] = &cam_cc_titan_top_gdsc, 3465 + }; 3466 + 3467 + static const struct qcom_reset_map cam_cc_sm8550_resets[] = { 3468 + [CAM_CC_BPS_BCR] = { 0x10000 }, 3469 + [CAM_CC_DRV_BCR] = { 0x142d0 }, 3470 + [CAM_CC_ICP_BCR] = { 0x137c0 }, 3471 + [CAM_CC_IFE_0_BCR] = { 0x11000 }, 3472 + [CAM_CC_IFE_1_BCR] = { 0x12000 }, 3473 + [CAM_CC_IFE_2_BCR] = { 0x12290 }, 3474 + [CAM_CC_IPE_0_BCR] = { 0x103b4 }, 3475 + [CAM_CC_QDSS_DEBUG_BCR] = { 0x13f20 }, 3476 + [CAM_CC_SBI_BCR] = { 0x10528 }, 3477 + [CAM_CC_SFE_0_BCR] = { 0x1327c }, 3478 + [CAM_CC_SFE_1_BCR] = { 0x133dc }, 3479 + }; 3480 + 3481 + static const struct regmap_config cam_cc_sm8550_regmap_config = { 3482 + .reg_bits = 32, 3483 + .reg_stride = 4, 3484 + .val_bits = 32, 3485 + .max_register = 0x16320, 3486 + .fast_io = true, 3487 + }; 3488 + 3489 + static struct qcom_cc_desc cam_cc_sm8550_desc = { 3490 + .config = &cam_cc_sm8550_regmap_config, 3491 + .clks = cam_cc_sm8550_clocks, 3492 + .num_clks = ARRAY_SIZE(cam_cc_sm8550_clocks), 3493 + .resets = cam_cc_sm8550_resets, 3494 + .num_resets = ARRAY_SIZE(cam_cc_sm8550_resets), 3495 + .gdscs = cam_cc_sm8550_gdscs, 3496 + .num_gdscs = ARRAY_SIZE(cam_cc_sm8550_gdscs), 3497 + }; 3498 + 3499 + static const struct of_device_id cam_cc_sm8550_match_table[] = { 3500 + { .compatible = "qcom,sm8550-camcc" }, 3501 + { } 3502 + }; 3503 + MODULE_DEVICE_TABLE(of, cam_cc_sm8550_match_table); 3504 + 3505 + static int cam_cc_sm8550_probe(struct platform_device *pdev) 3506 + { 3507 + struct regmap *regmap; 3508 + int ret; 3509 + 3510 + ret = devm_pm_runtime_enable(&pdev->dev); 3511 + if (ret) 3512 + return ret; 3513 + 3514 + ret = pm_runtime_resume_and_get(&pdev->dev); 3515 + if (ret) 3516 + return ret; 3517 + 3518 + regmap = qcom_cc_map(pdev, &cam_cc_sm8550_desc); 3519 + if (IS_ERR(regmap)) { 3520 + pm_runtime_put(&pdev->dev); 3521 + return PTR_ERR(regmap); 3522 + } 3523 + 3524 + clk_lucid_ole_pll_configure(&cam_cc_pll0, regmap, &cam_cc_pll0_config); 3525 + clk_lucid_ole_pll_configure(&cam_cc_pll1, regmap, &cam_cc_pll1_config); 3526 + clk_rivian_evo_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config); 3527 + clk_lucid_ole_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config); 3528 + clk_lucid_ole_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config); 3529 + clk_lucid_ole_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config); 3530 + clk_lucid_ole_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config); 3531 + clk_lucid_ole_pll_configure(&cam_cc_pll7, regmap, &cam_cc_pll7_config); 3532 + clk_lucid_ole_pll_configure(&cam_cc_pll8, regmap, &cam_cc_pll8_config); 3533 + clk_lucid_ole_pll_configure(&cam_cc_pll9, regmap, &cam_cc_pll9_config); 3534 + clk_lucid_ole_pll_configure(&cam_cc_pll10, regmap, &cam_cc_pll10_config); 3535 + clk_lucid_ole_pll_configure(&cam_cc_pll11, regmap, &cam_cc_pll11_config); 3536 + clk_lucid_ole_pll_configure(&cam_cc_pll12, regmap, &cam_cc_pll12_config); 3537 + 3538 + /* 3539 + * Keep clocks always enabled: 3540 + * cam_cc_gdsc_clk 3541 + * cam_cc_sleep_clk 3542 + */ 3543 + regmap_update_bits(regmap, 0x1419c, BIT(0), BIT(0)); 3544 + regmap_update_bits(regmap, 0x142cc, BIT(0), BIT(0)); 3545 + 3546 + ret = qcom_cc_really_probe(pdev, &cam_cc_sm8550_desc, regmap); 3547 + 3548 + pm_runtime_put(&pdev->dev); 3549 + 3550 + return ret; 3551 + } 3552 + 3553 + static struct platform_driver cam_cc_sm8550_driver = { 3554 + .probe = cam_cc_sm8550_probe, 3555 + .driver = { 3556 + .name = "cam_cc-sm8550", 3557 + .of_match_table = cam_cc_sm8550_match_table, 3558 + }, 3559 + }; 3560 + 3561 + module_platform_driver(cam_cc_sm8550_driver); 3562 + 3563 + MODULE_DESCRIPTION("QTI CAMCC SM8550 Driver"); 3564 + MODULE_LICENSE("GPL");
+29
drivers/clk/qcom/clk-alpha-pll.c
··· 271 271 #define LUCID_EVO_ENABLE_VOTE_RUN BIT(25) 272 272 #define LUCID_EVO_PLL_L_VAL_MASK GENMASK(15, 0) 273 273 #define LUCID_EVO_PLL_CAL_L_VAL_SHIFT 16 274 + #define LUCID_OLE_PLL_RINGOSC_CAL_L_VAL_SHIFT 24 274 275 275 276 /* ZONDA PLL specific */ 276 277 #define ZONDA_PLL_OUT_MASK 0xf ··· 2119 2118 regmap_update_bits(regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N); 2120 2119 } 2121 2120 EXPORT_SYMBOL_GPL(clk_lucid_evo_pll_configure); 2121 + 2122 + void clk_lucid_ole_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, 2123 + const struct alpha_pll_config *config) 2124 + { 2125 + u32 lval = config->l; 2126 + 2127 + lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT; 2128 + lval |= TRION_PLL_CAL_VAL << LUCID_OLE_PLL_RINGOSC_CAL_L_VAL_SHIFT; 2129 + clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval); 2130 + clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); 2131 + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val); 2132 + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val); 2133 + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U1(pll), config->config_ctl_hi1_val); 2134 + clk_alpha_pll_write_config(regmap, PLL_USER_CTL(pll), config->user_ctl_val); 2135 + clk_alpha_pll_write_config(regmap, PLL_USER_CTL_U(pll), config->user_ctl_hi_val); 2136 + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL(pll), config->test_ctl_val); 2137 + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U(pll), config->test_ctl_hi_val); 2138 + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U1(pll), config->test_ctl_hi1_val); 2139 + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U2(pll), config->test_ctl_hi2_val); 2140 + 2141 + /* Disable PLL output */ 2142 + regmap_update_bits(regmap, PLL_MODE(pll), PLL_OUTCTRL, 0); 2143 + 2144 + /* Set operation mode to STANDBY and de-assert the reset */ 2145 + regmap_write(regmap, PLL_OPMODE(pll), PLL_STANDBY); 2146 + regmap_update_bits(regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N); 2147 + } 2148 + EXPORT_SYMBOL_GPL(clk_lucid_ole_pll_configure); 2122 2149 2123 2150 static int alpha_pll_lucid_evo_enable(struct clk_hw *hw) 2124 2151 {
+2
drivers/clk/qcom/clk-alpha-pll.h
··· 199 199 const struct alpha_pll_config *config); 200 200 void clk_lucid_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, 201 201 const struct alpha_pll_config *config); 202 + void clk_lucid_ole_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, 203 + const struct alpha_pll_config *config); 202 204 void clk_rivian_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, 203 205 const struct alpha_pll_config *config); 204 206 void clk_stromer_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
+187
include/dt-bindings/clock/qcom,sm8550-camcc.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ 2 + /* 3 + * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. 4 + */ 5 + 6 + #ifndef _DT_BINDINGS_CLK_QCOM_CAM_CC_SM8550_H 7 + #define _DT_BINDINGS_CLK_QCOM_CAM_CC_SM8550_H 8 + 9 + /* CAM_CC clocks */ 10 + #define CAM_CC_BPS_AHB_CLK 0 11 + #define CAM_CC_BPS_CLK 1 12 + #define CAM_CC_BPS_CLK_SRC 2 13 + #define CAM_CC_BPS_FAST_AHB_CLK 3 14 + #define CAM_CC_CAMNOC_AXI_CLK 4 15 + #define CAM_CC_CAMNOC_AXI_CLK_SRC 5 16 + #define CAM_CC_CAMNOC_DCD_XO_CLK 6 17 + #define CAM_CC_CAMNOC_XO_CLK 7 18 + #define CAM_CC_CCI_0_CLK 8 19 + #define CAM_CC_CCI_0_CLK_SRC 9 20 + #define CAM_CC_CCI_1_CLK 10 21 + #define CAM_CC_CCI_1_CLK_SRC 11 22 + #define CAM_CC_CCI_2_CLK 12 23 + #define CAM_CC_CCI_2_CLK_SRC 13 24 + #define CAM_CC_CORE_AHB_CLK 14 25 + #define CAM_CC_CPAS_AHB_CLK 15 26 + #define CAM_CC_CPAS_BPS_CLK 16 27 + #define CAM_CC_CPAS_CRE_CLK 17 28 + #define CAM_CC_CPAS_FAST_AHB_CLK 18 29 + #define CAM_CC_CPAS_IFE_0_CLK 19 30 + #define CAM_CC_CPAS_IFE_1_CLK 20 31 + #define CAM_CC_CPAS_IFE_2_CLK 21 32 + #define CAM_CC_CPAS_IFE_LITE_CLK 22 33 + #define CAM_CC_CPAS_IPE_NPS_CLK 23 34 + #define CAM_CC_CPAS_SBI_CLK 24 35 + #define CAM_CC_CPAS_SFE_0_CLK 25 36 + #define CAM_CC_CPAS_SFE_1_CLK 26 37 + #define CAM_CC_CPHY_RX_CLK_SRC 27 38 + #define CAM_CC_CRE_AHB_CLK 28 39 + #define CAM_CC_CRE_CLK 29 40 + #define CAM_CC_CRE_CLK_SRC 30 41 + #define CAM_CC_CSI0PHYTIMER_CLK 31 42 + #define CAM_CC_CSI0PHYTIMER_CLK_SRC 32 43 + #define CAM_CC_CSI1PHYTIMER_CLK 33 44 + #define CAM_CC_CSI1PHYTIMER_CLK_SRC 34 45 + #define CAM_CC_CSI2PHYTIMER_CLK 35 46 + #define CAM_CC_CSI2PHYTIMER_CLK_SRC 36 47 + #define CAM_CC_CSI3PHYTIMER_CLK 37 48 + #define CAM_CC_CSI3PHYTIMER_CLK_SRC 38 49 + #define CAM_CC_CSI4PHYTIMER_CLK 39 50 + #define CAM_CC_CSI4PHYTIMER_CLK_SRC 40 51 + #define CAM_CC_CSI5PHYTIMER_CLK 41 52 + #define CAM_CC_CSI5PHYTIMER_CLK_SRC 42 53 + #define CAM_CC_CSI6PHYTIMER_CLK 43 54 + #define CAM_CC_CSI6PHYTIMER_CLK_SRC 44 55 + #define CAM_CC_CSI7PHYTIMER_CLK 45 56 + #define CAM_CC_CSI7PHYTIMER_CLK_SRC 46 57 + #define CAM_CC_CSID_CLK 47 58 + #define CAM_CC_CSID_CLK_SRC 48 59 + #define CAM_CC_CSID_CSIPHY_RX_CLK 49 60 + #define CAM_CC_CSIPHY0_CLK 50 61 + #define CAM_CC_CSIPHY1_CLK 51 62 + #define CAM_CC_CSIPHY2_CLK 52 63 + #define CAM_CC_CSIPHY3_CLK 53 64 + #define CAM_CC_CSIPHY4_CLK 54 65 + #define CAM_CC_CSIPHY5_CLK 55 66 + #define CAM_CC_CSIPHY6_CLK 56 67 + #define CAM_CC_CSIPHY7_CLK 57 68 + #define CAM_CC_DRV_AHB_CLK 58 69 + #define CAM_CC_DRV_XO_CLK 59 70 + #define CAM_CC_FAST_AHB_CLK_SRC 60 71 + #define CAM_CC_GDSC_CLK 61 72 + #define CAM_CC_ICP_AHB_CLK 62 73 + #define CAM_CC_ICP_CLK 63 74 + #define CAM_CC_ICP_CLK_SRC 64 75 + #define CAM_CC_IFE_0_CLK 65 76 + #define CAM_CC_IFE_0_CLK_SRC 66 77 + #define CAM_CC_IFE_0_DSP_CLK 67 78 + #define CAM_CC_IFE_0_DSP_CLK_SRC 68 79 + #define CAM_CC_IFE_0_FAST_AHB_CLK 69 80 + #define CAM_CC_IFE_1_CLK 70 81 + #define CAM_CC_IFE_1_CLK_SRC 71 82 + #define CAM_CC_IFE_1_DSP_CLK 72 83 + #define CAM_CC_IFE_1_DSP_CLK_SRC 73 84 + #define CAM_CC_IFE_1_FAST_AHB_CLK 74 85 + #define CAM_CC_IFE_2_CLK 75 86 + #define CAM_CC_IFE_2_CLK_SRC 76 87 + #define CAM_CC_IFE_2_DSP_CLK 77 88 + #define CAM_CC_IFE_2_DSP_CLK_SRC 78 89 + #define CAM_CC_IFE_2_FAST_AHB_CLK 79 90 + #define CAM_CC_IFE_LITE_AHB_CLK 80 91 + #define CAM_CC_IFE_LITE_CLK 81 92 + #define CAM_CC_IFE_LITE_CLK_SRC 82 93 + #define CAM_CC_IFE_LITE_CPHY_RX_CLK 83 94 + #define CAM_CC_IFE_LITE_CSID_CLK 84 95 + #define CAM_CC_IFE_LITE_CSID_CLK_SRC 85 96 + #define CAM_CC_IPE_NPS_AHB_CLK 86 97 + #define CAM_CC_IPE_NPS_CLK 87 98 + #define CAM_CC_IPE_NPS_CLK_SRC 88 99 + #define CAM_CC_IPE_NPS_FAST_AHB_CLK 89 100 + #define CAM_CC_IPE_PPS_CLK 90 101 + #define CAM_CC_IPE_PPS_FAST_AHB_CLK 91 102 + #define CAM_CC_JPEG_1_CLK 92 103 + #define CAM_CC_JPEG_CLK 93 104 + #define CAM_CC_JPEG_CLK_SRC 94 105 + #define CAM_CC_MCLK0_CLK 95 106 + #define CAM_CC_MCLK0_CLK_SRC 96 107 + #define CAM_CC_MCLK1_CLK 97 108 + #define CAM_CC_MCLK1_CLK_SRC 98 109 + #define CAM_CC_MCLK2_CLK 99 110 + #define CAM_CC_MCLK2_CLK_SRC 100 111 + #define CAM_CC_MCLK3_CLK 101 112 + #define CAM_CC_MCLK3_CLK_SRC 102 113 + #define CAM_CC_MCLK4_CLK 103 114 + #define CAM_CC_MCLK4_CLK_SRC 104 115 + #define CAM_CC_MCLK5_CLK 105 116 + #define CAM_CC_MCLK5_CLK_SRC 106 117 + #define CAM_CC_MCLK6_CLK 107 118 + #define CAM_CC_MCLK6_CLK_SRC 108 119 + #define CAM_CC_MCLK7_CLK 109 120 + #define CAM_CC_MCLK7_CLK_SRC 110 121 + #define CAM_CC_PLL0 111 122 + #define CAM_CC_PLL0_OUT_EVEN 112 123 + #define CAM_CC_PLL0_OUT_ODD 113 124 + #define CAM_CC_PLL1 114 125 + #define CAM_CC_PLL1_OUT_EVEN 115 126 + #define CAM_CC_PLL2 116 127 + #define CAM_CC_PLL3 117 128 + #define CAM_CC_PLL3_OUT_EVEN 118 129 + #define CAM_CC_PLL4 119 130 + #define CAM_CC_PLL4_OUT_EVEN 120 131 + #define CAM_CC_PLL5 121 132 + #define CAM_CC_PLL5_OUT_EVEN 122 133 + #define CAM_CC_PLL6 123 134 + #define CAM_CC_PLL6_OUT_EVEN 124 135 + #define CAM_CC_PLL7 125 136 + #define CAM_CC_PLL7_OUT_EVEN 126 137 + #define CAM_CC_PLL8 127 138 + #define CAM_CC_PLL8_OUT_EVEN 128 139 + #define CAM_CC_PLL9 129 140 + #define CAM_CC_PLL9_OUT_EVEN 130 141 + #define CAM_CC_PLL10 131 142 + #define CAM_CC_PLL10_OUT_EVEN 132 143 + #define CAM_CC_PLL11 133 144 + #define CAM_CC_PLL11_OUT_EVEN 134 145 + #define CAM_CC_PLL12 135 146 + #define CAM_CC_PLL12_OUT_EVEN 136 147 + #define CAM_CC_QDSS_DEBUG_CLK 137 148 + #define CAM_CC_QDSS_DEBUG_CLK_SRC 138 149 + #define CAM_CC_QDSS_DEBUG_XO_CLK 139 150 + #define CAM_CC_SBI_CLK 140 151 + #define CAM_CC_SBI_FAST_AHB_CLK 141 152 + #define CAM_CC_SFE_0_CLK 142 153 + #define CAM_CC_SFE_0_CLK_SRC 143 154 + #define CAM_CC_SFE_0_FAST_AHB_CLK 144 155 + #define CAM_CC_SFE_1_CLK 145 156 + #define CAM_CC_SFE_1_CLK_SRC 146 157 + #define CAM_CC_SFE_1_FAST_AHB_CLK 147 158 + #define CAM_CC_SLEEP_CLK 148 159 + #define CAM_CC_SLEEP_CLK_SRC 149 160 + #define CAM_CC_SLOW_AHB_CLK_SRC 150 161 + #define CAM_CC_XO_CLK_SRC 151 162 + 163 + /* CAM_CC power domains */ 164 + #define CAM_CC_BPS_GDSC 0 165 + #define CAM_CC_IFE_0_GDSC 1 166 + #define CAM_CC_IFE_1_GDSC 2 167 + #define CAM_CC_IFE_2_GDSC 3 168 + #define CAM_CC_IPE_0_GDSC 4 169 + #define CAM_CC_SBI_GDSC 5 170 + #define CAM_CC_SFE_0_GDSC 6 171 + #define CAM_CC_SFE_1_GDSC 7 172 + #define CAM_CC_TITAN_TOP_GDSC 8 173 + 174 + /* CAM_CC resets */ 175 + #define CAM_CC_BPS_BCR 0 176 + #define CAM_CC_DRV_BCR 1 177 + #define CAM_CC_ICP_BCR 2 178 + #define CAM_CC_IFE_0_BCR 3 179 + #define CAM_CC_IFE_1_BCR 4 180 + #define CAM_CC_IFE_2_BCR 5 181 + #define CAM_CC_IPE_0_BCR 6 182 + #define CAM_CC_QDSS_DEBUG_BCR 7 183 + #define CAM_CC_SBI_BCR 8 184 + #define CAM_CC_SFE_0_BCR 9 185 + #define CAM_CC_SFE_1_BCR 10 186 + 187 + #endif