180f5451dSKonrad Dybcio // SPDX-License-Identifier: GPL-2.0-only
280f5451dSKonrad Dybcio /*
380f5451dSKonrad Dybcio * Copyright (c) 2022, The Linux Foundation. All rights reserved.
480f5451dSKonrad Dybcio * Copyright (c) 2022, Linaro Limited
580f5451dSKonrad Dybcio */
680f5451dSKonrad Dybcio
780f5451dSKonrad Dybcio #include <linux/clk-provider.h>
880f5451dSKonrad Dybcio #include <linux/module.h>
980f5451dSKonrad Dybcio #include <linux/platform_device.h>
1080f5451dSKonrad Dybcio #include <linux/regmap.h>
1180f5451dSKonrad Dybcio
1280f5451dSKonrad Dybcio #include <dt-bindings/clock/qcom,sm6350-camcc.h>
1380f5451dSKonrad Dybcio
1480f5451dSKonrad Dybcio #include "clk-alpha-pll.h"
1580f5451dSKonrad Dybcio #include "clk-branch.h"
1680f5451dSKonrad Dybcio #include "clk-rcg.h"
1780f5451dSKonrad Dybcio #include "common.h"
1880f5451dSKonrad Dybcio #include "gdsc.h"
1980f5451dSKonrad Dybcio
2080f5451dSKonrad Dybcio enum {
2180f5451dSKonrad Dybcio DT_BI_TCXO,
2280f5451dSKonrad Dybcio };
2380f5451dSKonrad Dybcio
2480f5451dSKonrad Dybcio enum {
2580f5451dSKonrad Dybcio P_BI_TCXO,
2680f5451dSKonrad Dybcio P_CAMCC_PLL0_OUT_EVEN,
2780f5451dSKonrad Dybcio P_CAMCC_PLL0_OUT_MAIN,
2880f5451dSKonrad Dybcio P_CAMCC_PLL1_OUT_EVEN,
2980f5451dSKonrad Dybcio P_CAMCC_PLL1_OUT_MAIN,
3080f5451dSKonrad Dybcio P_CAMCC_PLL2_OUT_EARLY,
3180f5451dSKonrad Dybcio P_CAMCC_PLL2_OUT_MAIN,
3280f5451dSKonrad Dybcio P_CAMCC_PLL3_OUT_MAIN,
3380f5451dSKonrad Dybcio };
3480f5451dSKonrad Dybcio
3580f5451dSKonrad Dybcio static struct pll_vco fabia_vco[] = {
3680f5451dSKonrad Dybcio { 249600000, 2000000000, 0 },
3780f5451dSKonrad Dybcio };
3880f5451dSKonrad Dybcio
3980f5451dSKonrad Dybcio /* 600MHz configuration */
4080f5451dSKonrad Dybcio static const struct alpha_pll_config camcc_pll0_config = {
4180f5451dSKonrad Dybcio .l = 0x1f,
4280f5451dSKonrad Dybcio .alpha = 0x4000,
4380f5451dSKonrad Dybcio .config_ctl_val = 0x20485699,
4480f5451dSKonrad Dybcio .config_ctl_hi_val = 0x00002067,
4580f5451dSKonrad Dybcio .test_ctl_val = 0x40000000,
4680f5451dSKonrad Dybcio .test_ctl_hi_val = 0x00000002,
4780f5451dSKonrad Dybcio .user_ctl_val = 0x00000101,
4880f5451dSKonrad Dybcio .user_ctl_hi_val = 0x00004805,
4980f5451dSKonrad Dybcio };
5080f5451dSKonrad Dybcio
5180f5451dSKonrad Dybcio static struct clk_alpha_pll camcc_pll0 = {
5280f5451dSKonrad Dybcio .offset = 0x0,
5380f5451dSKonrad Dybcio .vco_table = fabia_vco,
5480f5451dSKonrad Dybcio .num_vco = ARRAY_SIZE(fabia_vco),
5580f5451dSKonrad Dybcio .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
5680f5451dSKonrad Dybcio .clkr = {
5780f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
5880f5451dSKonrad Dybcio .name = "camcc_pll0",
5980f5451dSKonrad Dybcio .parent_data = &(const struct clk_parent_data){
6080f5451dSKonrad Dybcio .index = DT_BI_TCXO,
6180f5451dSKonrad Dybcio },
6280f5451dSKonrad Dybcio .num_parents = 1,
6380f5451dSKonrad Dybcio .ops = &clk_alpha_pll_fabia_ops,
6480f5451dSKonrad Dybcio },
6580f5451dSKonrad Dybcio },
6680f5451dSKonrad Dybcio };
6780f5451dSKonrad Dybcio
6880f5451dSKonrad Dybcio static const struct clk_div_table post_div_table_camcc_pll0_out_even[] = {
6980f5451dSKonrad Dybcio { 0x1, 2 },
7080f5451dSKonrad Dybcio { }
7180f5451dSKonrad Dybcio };
7280f5451dSKonrad Dybcio
7380f5451dSKonrad Dybcio static struct clk_alpha_pll_postdiv camcc_pll0_out_even = {
7480f5451dSKonrad Dybcio .offset = 0x0,
7580f5451dSKonrad Dybcio .post_div_shift = 8,
7680f5451dSKonrad Dybcio .post_div_table = post_div_table_camcc_pll0_out_even,
7780f5451dSKonrad Dybcio .num_post_div = ARRAY_SIZE(post_div_table_camcc_pll0_out_even),
7880f5451dSKonrad Dybcio .width = 4,
7980f5451dSKonrad Dybcio .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
8080f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
8180f5451dSKonrad Dybcio .name = "camcc_pll0_out_even",
8280f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
8380f5451dSKonrad Dybcio &camcc_pll0.clkr.hw,
8480f5451dSKonrad Dybcio },
8580f5451dSKonrad Dybcio .num_parents = 1,
8680f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
8780f5451dSKonrad Dybcio .ops = &clk_alpha_pll_postdiv_fabia_ops,
8880f5451dSKonrad Dybcio },
8980f5451dSKonrad Dybcio };
9080f5451dSKonrad Dybcio
9180f5451dSKonrad Dybcio /* 808MHz configuration */
9280f5451dSKonrad Dybcio static const struct alpha_pll_config camcc_pll1_config = {
9380f5451dSKonrad Dybcio .l = 0x2a,
9480f5451dSKonrad Dybcio .alpha = 0x1555,
9580f5451dSKonrad Dybcio .config_ctl_val = 0x20485699,
9680f5451dSKonrad Dybcio .config_ctl_hi_val = 0x00002067,
9780f5451dSKonrad Dybcio .test_ctl_val = 0x40000000,
9880f5451dSKonrad Dybcio .test_ctl_hi_val = 0x00000000,
9980f5451dSKonrad Dybcio .user_ctl_val = 0x00000101,
10080f5451dSKonrad Dybcio .user_ctl_hi_val = 0x00004805,
10180f5451dSKonrad Dybcio };
10280f5451dSKonrad Dybcio
10380f5451dSKonrad Dybcio static struct clk_alpha_pll camcc_pll1 = {
10480f5451dSKonrad Dybcio .offset = 0x1000,
10580f5451dSKonrad Dybcio .vco_table = fabia_vco,
10680f5451dSKonrad Dybcio .num_vco = ARRAY_SIZE(fabia_vco),
10780f5451dSKonrad Dybcio .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
10880f5451dSKonrad Dybcio .clkr = {
10980f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
11080f5451dSKonrad Dybcio .name = "camcc_pll1",
11180f5451dSKonrad Dybcio .parent_data = &(const struct clk_parent_data){
11280f5451dSKonrad Dybcio .index = DT_BI_TCXO,
11380f5451dSKonrad Dybcio },
11480f5451dSKonrad Dybcio .num_parents = 1,
11580f5451dSKonrad Dybcio .ops = &clk_alpha_pll_fabia_ops,
11680f5451dSKonrad Dybcio },
11780f5451dSKonrad Dybcio },
11880f5451dSKonrad Dybcio };
11980f5451dSKonrad Dybcio
12080f5451dSKonrad Dybcio static const struct clk_div_table post_div_table_camcc_pll1_out_even[] = {
12180f5451dSKonrad Dybcio { 0x1, 2 },
12280f5451dSKonrad Dybcio { }
12380f5451dSKonrad Dybcio };
12480f5451dSKonrad Dybcio
12580f5451dSKonrad Dybcio static struct clk_alpha_pll_postdiv camcc_pll1_out_even = {
12680f5451dSKonrad Dybcio .offset = 0x1000,
12780f5451dSKonrad Dybcio .post_div_shift = 8,
12880f5451dSKonrad Dybcio .post_div_table = post_div_table_camcc_pll1_out_even,
12980f5451dSKonrad Dybcio .num_post_div = ARRAY_SIZE(post_div_table_camcc_pll1_out_even),
13080f5451dSKonrad Dybcio .width = 4,
13180f5451dSKonrad Dybcio .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
13280f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
13380f5451dSKonrad Dybcio .name = "camcc_pll1_out_even",
13480f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
13580f5451dSKonrad Dybcio &camcc_pll1.clkr.hw,
13680f5451dSKonrad Dybcio },
13780f5451dSKonrad Dybcio .num_parents = 1,
13880f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
13980f5451dSKonrad Dybcio .ops = &clk_alpha_pll_postdiv_fabia_ops,
14080f5451dSKonrad Dybcio },
14180f5451dSKonrad Dybcio };
14280f5451dSKonrad Dybcio
14380f5451dSKonrad Dybcio /* 1920MHz configuration */
14480f5451dSKonrad Dybcio static const struct alpha_pll_config camcc_pll2_config = {
14580f5451dSKonrad Dybcio .l = 0x64,
14680f5451dSKonrad Dybcio .alpha = 0x0,
14780f5451dSKonrad Dybcio .post_div_val = 0x3 << 8,
14880f5451dSKonrad Dybcio .post_div_mask = 0x3 << 8,
14980f5451dSKonrad Dybcio .aux_output_mask = BIT(1),
15080f5451dSKonrad Dybcio .main_output_mask = BIT(0),
15180f5451dSKonrad Dybcio .early_output_mask = BIT(3),
15280f5451dSKonrad Dybcio .config_ctl_val = 0x20000800,
15380f5451dSKonrad Dybcio .config_ctl_hi_val = 0x400003d2,
15480f5451dSKonrad Dybcio .test_ctl_val = 0x04000400,
15580f5451dSKonrad Dybcio .test_ctl_hi_val = 0x00004000,
15680f5451dSKonrad Dybcio };
15780f5451dSKonrad Dybcio
15880f5451dSKonrad Dybcio static struct clk_alpha_pll camcc_pll2 = {
15980f5451dSKonrad Dybcio .offset = 0x2000,
16080f5451dSKonrad Dybcio .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_AGERA],
16180f5451dSKonrad Dybcio .clkr = {
16280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
16380f5451dSKonrad Dybcio .name = "camcc_pll2",
16480f5451dSKonrad Dybcio .parent_data = &(const struct clk_parent_data){
16580f5451dSKonrad Dybcio .index = DT_BI_TCXO,
16680f5451dSKonrad Dybcio },
16780f5451dSKonrad Dybcio .num_parents = 1,
16880f5451dSKonrad Dybcio .ops = &clk_alpha_pll_agera_ops,
16980f5451dSKonrad Dybcio },
17080f5451dSKonrad Dybcio },
17180f5451dSKonrad Dybcio };
17280f5451dSKonrad Dybcio
17380f5451dSKonrad Dybcio static struct clk_fixed_factor camcc_pll2_out_early = {
17480f5451dSKonrad Dybcio .mult = 1,
17580f5451dSKonrad Dybcio .div = 2,
17680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
17780f5451dSKonrad Dybcio .name = "camcc_pll2_out_early",
17880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
17980f5451dSKonrad Dybcio &camcc_pll2.clkr.hw,
18080f5451dSKonrad Dybcio },
18180f5451dSKonrad Dybcio .num_parents = 1,
18280f5451dSKonrad Dybcio .ops = &clk_fixed_factor_ops,
18380f5451dSKonrad Dybcio },
18480f5451dSKonrad Dybcio };
18580f5451dSKonrad Dybcio
18680f5451dSKonrad Dybcio static const struct clk_div_table post_div_table_camcc_pll2_out_main[] = {
18780f5451dSKonrad Dybcio { 0x1, 2 },
18880f5451dSKonrad Dybcio { }
18980f5451dSKonrad Dybcio };
19080f5451dSKonrad Dybcio
19180f5451dSKonrad Dybcio static struct clk_alpha_pll_postdiv camcc_pll2_out_main = {
19280f5451dSKonrad Dybcio .offset = 0x2000,
19380f5451dSKonrad Dybcio .post_div_shift = 8,
19480f5451dSKonrad Dybcio .post_div_table = post_div_table_camcc_pll2_out_main,
19580f5451dSKonrad Dybcio .num_post_div = ARRAY_SIZE(post_div_table_camcc_pll2_out_main),
19680f5451dSKonrad Dybcio .width = 2,
19780f5451dSKonrad Dybcio .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_AGERA],
19880f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
19980f5451dSKonrad Dybcio .name = "camcc_pll2_out_main",
20080f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
20180f5451dSKonrad Dybcio &camcc_pll2.clkr.hw,
20280f5451dSKonrad Dybcio },
20380f5451dSKonrad Dybcio .num_parents = 1,
20480f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
20580f5451dSKonrad Dybcio .ops = &clk_alpha_pll_postdiv_ops,
20680f5451dSKonrad Dybcio },
20780f5451dSKonrad Dybcio };
20880f5451dSKonrad Dybcio
20980f5451dSKonrad Dybcio /* 384MHz configuration */
21080f5451dSKonrad Dybcio static const struct alpha_pll_config camcc_pll3_config = {
21180f5451dSKonrad Dybcio .l = 0x14,
21280f5451dSKonrad Dybcio .alpha = 0x0,
21380f5451dSKonrad Dybcio .config_ctl_val = 0x20485699,
21480f5451dSKonrad Dybcio .config_ctl_hi_val = 0x00002067,
21580f5451dSKonrad Dybcio .test_ctl_val = 0x40000000,
21680f5451dSKonrad Dybcio .test_ctl_hi_val = 0x00000002,
21780f5451dSKonrad Dybcio .user_ctl_val = 0x00000001,
21880f5451dSKonrad Dybcio .user_ctl_hi_val = 0x00014805,
21980f5451dSKonrad Dybcio };
22080f5451dSKonrad Dybcio
22180f5451dSKonrad Dybcio static struct clk_alpha_pll camcc_pll3 = {
22280f5451dSKonrad Dybcio .offset = 0x3000,
22380f5451dSKonrad Dybcio .vco_table = fabia_vco,
22480f5451dSKonrad Dybcio .num_vco = ARRAY_SIZE(fabia_vco),
22580f5451dSKonrad Dybcio .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
22680f5451dSKonrad Dybcio .clkr = {
22780f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
22880f5451dSKonrad Dybcio .name = "camcc_pll3",
22980f5451dSKonrad Dybcio .parent_data = &(const struct clk_parent_data){
23080f5451dSKonrad Dybcio .index = DT_BI_TCXO,
23180f5451dSKonrad Dybcio },
23280f5451dSKonrad Dybcio .num_parents = 1,
23380f5451dSKonrad Dybcio .ops = &clk_alpha_pll_fabia_ops,
23480f5451dSKonrad Dybcio },
23580f5451dSKonrad Dybcio },
23680f5451dSKonrad Dybcio };
23780f5451dSKonrad Dybcio
23880f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_0[] = {
23980f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
24080f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_EVEN, 6 },
24180f5451dSKonrad Dybcio };
24280f5451dSKonrad Dybcio
24380f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_0[] = {
24480f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
24580f5451dSKonrad Dybcio { .hw = &camcc_pll0_out_even.clkr.hw },
24680f5451dSKonrad Dybcio };
24780f5451dSKonrad Dybcio
24880f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_1[] = {
24980f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
25080f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_MAIN, 1 },
25180f5451dSKonrad Dybcio { P_CAMCC_PLL1_OUT_EVEN, 3 },
25280f5451dSKonrad Dybcio { P_CAMCC_PLL2_OUT_MAIN, 4 },
25380f5451dSKonrad Dybcio };
25480f5451dSKonrad Dybcio
25580f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_1[] = {
25680f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
25780f5451dSKonrad Dybcio { .hw = &camcc_pll0.clkr.hw },
25880f5451dSKonrad Dybcio { .hw = &camcc_pll1_out_even.clkr.hw },
25980f5451dSKonrad Dybcio { .hw = &camcc_pll2_out_main.clkr.hw },
26080f5451dSKonrad Dybcio };
26180f5451dSKonrad Dybcio
26280f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_2[] = {
26380f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
26480f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_MAIN, 1 },
26580f5451dSKonrad Dybcio { P_CAMCC_PLL3_OUT_MAIN, 5 },
26680f5451dSKonrad Dybcio };
26780f5451dSKonrad Dybcio
26880f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_2[] = {
26980f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
27080f5451dSKonrad Dybcio { .hw = &camcc_pll0.clkr.hw },
27180f5451dSKonrad Dybcio { .hw = &camcc_pll3.clkr.hw },
27280f5451dSKonrad Dybcio };
27380f5451dSKonrad Dybcio
27480f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_3[] = {
27580f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
27680f5451dSKonrad Dybcio { P_CAMCC_PLL2_OUT_EARLY, 3 },
27780f5451dSKonrad Dybcio };
27880f5451dSKonrad Dybcio
27980f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_3[] = {
28080f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
28180f5451dSKonrad Dybcio { .hw = &camcc_pll2_out_early.hw },
28280f5451dSKonrad Dybcio };
28380f5451dSKonrad Dybcio
28480f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_4[] = {
28580f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
28680f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_MAIN, 1 },
28780f5451dSKonrad Dybcio { P_CAMCC_PLL1_OUT_EVEN, 3 },
28880f5451dSKonrad Dybcio };
28980f5451dSKonrad Dybcio
29080f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_4[] = {
29180f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
29280f5451dSKonrad Dybcio { .hw = &camcc_pll0.clkr.hw },
29380f5451dSKonrad Dybcio { .hw = &camcc_pll1_out_even.clkr.hw },
29480f5451dSKonrad Dybcio };
29580f5451dSKonrad Dybcio
29680f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_5[] = {
29780f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
29880f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_MAIN, 1 },
29980f5451dSKonrad Dybcio { P_CAMCC_PLL1_OUT_EVEN, 3 },
30080f5451dSKonrad Dybcio { P_CAMCC_PLL3_OUT_MAIN, 5 },
30180f5451dSKonrad Dybcio };
30280f5451dSKonrad Dybcio
30380f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_5[] = {
30480f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
30580f5451dSKonrad Dybcio { .hw = &camcc_pll0.clkr.hw },
30680f5451dSKonrad Dybcio { .hw = &camcc_pll1_out_even.clkr.hw },
30780f5451dSKonrad Dybcio { .hw = &camcc_pll3.clkr.hw },
30880f5451dSKonrad Dybcio };
30980f5451dSKonrad Dybcio
31080f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_6[] = {
31180f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
31280f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_MAIN, 1 },
31380f5451dSKonrad Dybcio { P_CAMCC_PLL2_OUT_MAIN, 4 },
31480f5451dSKonrad Dybcio };
31580f5451dSKonrad Dybcio
31680f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_6[] = {
31780f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
31880f5451dSKonrad Dybcio { .hw = &camcc_pll0.clkr.hw },
31980f5451dSKonrad Dybcio { .hw = &camcc_pll2_out_main.clkr.hw },
32080f5451dSKonrad Dybcio };
32180f5451dSKonrad Dybcio
32280f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_7[] = {
32380f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
32480f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_MAIN, 1 },
32580f5451dSKonrad Dybcio { P_CAMCC_PLL1_OUT_MAIN, 2 },
32680f5451dSKonrad Dybcio { P_CAMCC_PLL2_OUT_MAIN, 4 },
32780f5451dSKonrad Dybcio };
32880f5451dSKonrad Dybcio
32980f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_7[] = {
33080f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
33180f5451dSKonrad Dybcio { .hw = &camcc_pll0.clkr.hw },
33280f5451dSKonrad Dybcio { .hw = &camcc_pll1.clkr.hw },
33380f5451dSKonrad Dybcio { .hw = &camcc_pll2_out_main.clkr.hw },
33480f5451dSKonrad Dybcio };
33580f5451dSKonrad Dybcio
33680f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_8[] = {
33780f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
33880f5451dSKonrad Dybcio { P_CAMCC_PLL0_OUT_MAIN, 1 },
33980f5451dSKonrad Dybcio { P_CAMCC_PLL1_OUT_MAIN, 2 },
34080f5451dSKonrad Dybcio };
34180f5451dSKonrad Dybcio
34280f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_8[] = {
34380f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
34480f5451dSKonrad Dybcio { .hw = &camcc_pll0.clkr.hw },
34580f5451dSKonrad Dybcio { .hw = &camcc_pll1.clkr.hw },
34680f5451dSKonrad Dybcio };
34780f5451dSKonrad Dybcio
34880f5451dSKonrad Dybcio static const struct parent_map camcc_parent_map_9[] = {
34980f5451dSKonrad Dybcio { P_BI_TCXO, 0 },
35080f5451dSKonrad Dybcio { P_CAMCC_PLL2_OUT_MAIN, 4 },
35180f5451dSKonrad Dybcio };
35280f5451dSKonrad Dybcio
35380f5451dSKonrad Dybcio static const struct clk_parent_data camcc_parent_data_9[] = {
35480f5451dSKonrad Dybcio { .fw_name = "bi_tcxo" },
35580f5451dSKonrad Dybcio { .hw = &camcc_pll2_out_main.clkr.hw },
35680f5451dSKonrad Dybcio };
35780f5451dSKonrad Dybcio
35880f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_bps_clk_src[] = {
35980f5451dSKonrad Dybcio F(200000000, P_CAMCC_PLL0_OUT_MAIN, 3, 0, 0),
36080f5451dSKonrad Dybcio F(320000000, P_CAMCC_PLL2_OUT_MAIN, 1.5, 0, 0),
36180f5451dSKonrad Dybcio F(404000000, P_CAMCC_PLL1_OUT_EVEN, 1, 0, 0),
36280f5451dSKonrad Dybcio F(480000000, P_CAMCC_PLL2_OUT_MAIN, 1, 0, 0),
36380f5451dSKonrad Dybcio F(600000000, P_CAMCC_PLL0_OUT_MAIN, 1, 0, 0),
36480f5451dSKonrad Dybcio { }
36580f5451dSKonrad Dybcio };
36680f5451dSKonrad Dybcio
36780f5451dSKonrad Dybcio static struct clk_rcg2 camcc_bps_clk_src = {
36880f5451dSKonrad Dybcio .cmd_rcgr = 0x6010,
36980f5451dSKonrad Dybcio .mnd_width = 0,
37080f5451dSKonrad Dybcio .hid_width = 5,
37180f5451dSKonrad Dybcio .parent_map = camcc_parent_map_1,
37280f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_bps_clk_src,
37380f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
37480f5451dSKonrad Dybcio .name = "camcc_bps_clk_src",
37580f5451dSKonrad Dybcio .parent_data = camcc_parent_data_1,
37680f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_1),
37780f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
37880f5451dSKonrad Dybcio },
37980f5451dSKonrad Dybcio };
38080f5451dSKonrad Dybcio
38180f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_cci_0_clk_src[] = {
38280f5451dSKonrad Dybcio F(37500000, P_CAMCC_PLL0_OUT_EVEN, 8, 0, 0),
38380f5451dSKonrad Dybcio F(50000000, P_CAMCC_PLL0_OUT_EVEN, 6, 0, 0),
38480f5451dSKonrad Dybcio F(100000000, P_CAMCC_PLL0_OUT_EVEN, 3, 0, 0),
38580f5451dSKonrad Dybcio { }
38680f5451dSKonrad Dybcio };
38780f5451dSKonrad Dybcio
38880f5451dSKonrad Dybcio static struct clk_rcg2 camcc_cci_0_clk_src = {
38980f5451dSKonrad Dybcio .cmd_rcgr = 0xf004,
39080f5451dSKonrad Dybcio .mnd_width = 8,
39180f5451dSKonrad Dybcio .hid_width = 5,
39280f5451dSKonrad Dybcio .parent_map = camcc_parent_map_0,
39380f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_cci_0_clk_src,
39480f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
39580f5451dSKonrad Dybcio .name = "camcc_cci_0_clk_src",
39680f5451dSKonrad Dybcio .parent_data = camcc_parent_data_0,
39780f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_0),
39880f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
39980f5451dSKonrad Dybcio },
40080f5451dSKonrad Dybcio };
40180f5451dSKonrad Dybcio
40280f5451dSKonrad Dybcio static struct clk_rcg2 camcc_cci_1_clk_src = {
40380f5451dSKonrad Dybcio .cmd_rcgr = 0x10004,
40480f5451dSKonrad Dybcio .mnd_width = 8,
40580f5451dSKonrad Dybcio .hid_width = 5,
40680f5451dSKonrad Dybcio .parent_map = camcc_parent_map_0,
40780f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_cci_0_clk_src,
40880f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
40980f5451dSKonrad Dybcio .name = "camcc_cci_1_clk_src",
41080f5451dSKonrad Dybcio .parent_data = camcc_parent_data_0,
41180f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_0),
41280f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
41380f5451dSKonrad Dybcio },
41480f5451dSKonrad Dybcio };
41580f5451dSKonrad Dybcio
41680f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_cphy_rx_clk_src[] = {
41780f5451dSKonrad Dybcio F(150000000, P_CAMCC_PLL0_OUT_MAIN, 4, 0, 0),
41880f5451dSKonrad Dybcio F(300000000, P_CAMCC_PLL0_OUT_MAIN, 2, 0, 0),
41980f5451dSKonrad Dybcio F(384000000, P_CAMCC_PLL3_OUT_MAIN, 1, 0, 0),
42080f5451dSKonrad Dybcio F(400000000, P_CAMCC_PLL0_OUT_MAIN, 1.5, 0, 0),
42180f5451dSKonrad Dybcio { }
42280f5451dSKonrad Dybcio };
42380f5451dSKonrad Dybcio
42480f5451dSKonrad Dybcio static struct clk_rcg2 camcc_cphy_rx_clk_src = {
42580f5451dSKonrad Dybcio .cmd_rcgr = 0x9064,
42680f5451dSKonrad Dybcio .mnd_width = 0,
42780f5451dSKonrad Dybcio .hid_width = 5,
42880f5451dSKonrad Dybcio .parent_map = camcc_parent_map_2,
42980f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_cphy_rx_clk_src,
43080f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
43180f5451dSKonrad Dybcio .name = "camcc_cphy_rx_clk_src",
43280f5451dSKonrad Dybcio .parent_data = camcc_parent_data_2,
43380f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_2),
43480f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
43580f5451dSKonrad Dybcio },
43680f5451dSKonrad Dybcio };
43780f5451dSKonrad Dybcio
43880f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_csi0phytimer_clk_src[] = {
43980f5451dSKonrad Dybcio F(300000000, P_CAMCC_PLL0_OUT_EVEN, 1, 0, 0),
44080f5451dSKonrad Dybcio { }
44180f5451dSKonrad Dybcio };
44280f5451dSKonrad Dybcio
44380f5451dSKonrad Dybcio static struct clk_rcg2 camcc_csi0phytimer_clk_src = {
44480f5451dSKonrad Dybcio .cmd_rcgr = 0x5004,
44580f5451dSKonrad Dybcio .mnd_width = 0,
44680f5451dSKonrad Dybcio .hid_width = 5,
44780f5451dSKonrad Dybcio .parent_map = camcc_parent_map_0,
44880f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_csi0phytimer_clk_src,
44980f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
45080f5451dSKonrad Dybcio .name = "camcc_csi0phytimer_clk_src",
45180f5451dSKonrad Dybcio .parent_data = camcc_parent_data_0,
45280f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_0),
45380f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
45480f5451dSKonrad Dybcio },
45580f5451dSKonrad Dybcio };
45680f5451dSKonrad Dybcio
45780f5451dSKonrad Dybcio static struct clk_rcg2 camcc_csi1phytimer_clk_src = {
45880f5451dSKonrad Dybcio .cmd_rcgr = 0x5028,
45980f5451dSKonrad Dybcio .mnd_width = 0,
46080f5451dSKonrad Dybcio .hid_width = 5,
46180f5451dSKonrad Dybcio .parent_map = camcc_parent_map_0,
46280f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_csi0phytimer_clk_src,
46380f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
46480f5451dSKonrad Dybcio .name = "camcc_csi1phytimer_clk_src",
46580f5451dSKonrad Dybcio .parent_data = camcc_parent_data_0,
46680f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_0),
46780f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
46880f5451dSKonrad Dybcio },
46980f5451dSKonrad Dybcio };
47080f5451dSKonrad Dybcio
47180f5451dSKonrad Dybcio static struct clk_rcg2 camcc_csi2phytimer_clk_src = {
47280f5451dSKonrad Dybcio .cmd_rcgr = 0x504c,
47380f5451dSKonrad Dybcio .mnd_width = 0,
47480f5451dSKonrad Dybcio .hid_width = 5,
47580f5451dSKonrad Dybcio .parent_map = camcc_parent_map_0,
47680f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_csi0phytimer_clk_src,
47780f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
47880f5451dSKonrad Dybcio .name = "camcc_csi2phytimer_clk_src",
47980f5451dSKonrad Dybcio .parent_data = camcc_parent_data_0,
48080f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_0),
48180f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
48280f5451dSKonrad Dybcio },
48380f5451dSKonrad Dybcio };
48480f5451dSKonrad Dybcio
48580f5451dSKonrad Dybcio static struct clk_rcg2 camcc_csi3phytimer_clk_src = {
48680f5451dSKonrad Dybcio .cmd_rcgr = 0x5070,
48780f5451dSKonrad Dybcio .mnd_width = 0,
48880f5451dSKonrad Dybcio .hid_width = 5,
48980f5451dSKonrad Dybcio .parent_map = camcc_parent_map_0,
49080f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_csi0phytimer_clk_src,
49180f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
49280f5451dSKonrad Dybcio .name = "camcc_csi3phytimer_clk_src",
49380f5451dSKonrad Dybcio .parent_data = camcc_parent_data_0,
49480f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_0),
49580f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
49680f5451dSKonrad Dybcio },
49780f5451dSKonrad Dybcio };
49880f5451dSKonrad Dybcio
49980f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_fast_ahb_clk_src[] = {
50080f5451dSKonrad Dybcio F(100000000, P_CAMCC_PLL0_OUT_MAIN, 6, 0, 0),
50180f5451dSKonrad Dybcio F(200000000, P_CAMCC_PLL0_OUT_MAIN, 3, 0, 0),
50280f5451dSKonrad Dybcio F(300000000, P_CAMCC_PLL0_OUT_MAIN, 2, 0, 0),
50380f5451dSKonrad Dybcio F(404000000, P_CAMCC_PLL1_OUT_EVEN, 1, 0, 0),
50480f5451dSKonrad Dybcio { }
50580f5451dSKonrad Dybcio };
50680f5451dSKonrad Dybcio
50780f5451dSKonrad Dybcio static struct clk_rcg2 camcc_fast_ahb_clk_src = {
50880f5451dSKonrad Dybcio .cmd_rcgr = 0x603c,
50980f5451dSKonrad Dybcio .mnd_width = 0,
51080f5451dSKonrad Dybcio .hid_width = 5,
51180f5451dSKonrad Dybcio .parent_map = camcc_parent_map_4,
51280f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_fast_ahb_clk_src,
51380f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
51480f5451dSKonrad Dybcio .name = "camcc_fast_ahb_clk_src",
51580f5451dSKonrad Dybcio .parent_data = camcc_parent_data_4,
51680f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_4),
51780f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
51880f5451dSKonrad Dybcio },
51980f5451dSKonrad Dybcio };
52080f5451dSKonrad Dybcio
52180f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_icp_clk_src[] = {
52280f5451dSKonrad Dybcio F(240000000, P_CAMCC_PLL0_OUT_MAIN, 2.5, 0, 0),
52380f5451dSKonrad Dybcio F(384000000, P_CAMCC_PLL3_OUT_MAIN, 1, 0, 0),
52480f5451dSKonrad Dybcio F(404000000, P_CAMCC_PLL1_OUT_EVEN, 1, 0, 0),
52580f5451dSKonrad Dybcio F(600000000, P_CAMCC_PLL0_OUT_MAIN, 1, 0, 0),
52680f5451dSKonrad Dybcio { }
52780f5451dSKonrad Dybcio };
52880f5451dSKonrad Dybcio
52980f5451dSKonrad Dybcio static struct clk_rcg2 camcc_icp_clk_src = {
53080f5451dSKonrad Dybcio .cmd_rcgr = 0xe014,
53180f5451dSKonrad Dybcio .mnd_width = 0,
53280f5451dSKonrad Dybcio .hid_width = 5,
53380f5451dSKonrad Dybcio .parent_map = camcc_parent_map_5,
53480f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_icp_clk_src,
53580f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
53680f5451dSKonrad Dybcio .name = "camcc_icp_clk_src",
53780f5451dSKonrad Dybcio .parent_data = camcc_parent_data_5,
53880f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_5),
53980f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
54080f5451dSKonrad Dybcio },
54180f5451dSKonrad Dybcio };
54280f5451dSKonrad Dybcio
54380f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_ife_0_clk_src[] = {
54480f5451dSKonrad Dybcio F(240000000, P_CAMCC_PLL0_OUT_MAIN, 2.5, 0, 0),
54580f5451dSKonrad Dybcio F(320000000, P_CAMCC_PLL2_OUT_MAIN, 1.5, 0, 0),
54680f5451dSKonrad Dybcio F(404000000, P_CAMCC_PLL1_OUT_EVEN, 1, 0, 0),
54780f5451dSKonrad Dybcio F(480000000, P_CAMCC_PLL2_OUT_MAIN, 1, 0, 0),
54880f5451dSKonrad Dybcio F(600000000, P_CAMCC_PLL0_OUT_MAIN, 1, 0, 0),
54980f5451dSKonrad Dybcio { }
55080f5451dSKonrad Dybcio };
55180f5451dSKonrad Dybcio
55280f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_0_clk_src = {
55380f5451dSKonrad Dybcio .cmd_rcgr = 0x9010,
55480f5451dSKonrad Dybcio .mnd_width = 0,
55580f5451dSKonrad Dybcio .hid_width = 5,
55680f5451dSKonrad Dybcio .parent_map = camcc_parent_map_1,
55780f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_ife_0_clk_src,
55880f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
55980f5451dSKonrad Dybcio .name = "camcc_ife_0_clk_src",
56080f5451dSKonrad Dybcio .parent_data = camcc_parent_data_1,
56180f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_1),
56280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
56380f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
56480f5451dSKonrad Dybcio },
56580f5451dSKonrad Dybcio };
56680f5451dSKonrad Dybcio
56780f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_0_csid_clk_src = {
56880f5451dSKonrad Dybcio .cmd_rcgr = 0x903c,
56980f5451dSKonrad Dybcio .mnd_width = 0,
57080f5451dSKonrad Dybcio .hid_width = 5,
57180f5451dSKonrad Dybcio .parent_map = camcc_parent_map_2,
57280f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_cphy_rx_clk_src,
57380f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
57480f5451dSKonrad Dybcio .name = "camcc_ife_0_csid_clk_src",
57580f5451dSKonrad Dybcio .parent_data = camcc_parent_data_2,
57680f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_2),
57780f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
57880f5451dSKonrad Dybcio },
57980f5451dSKonrad Dybcio };
58080f5451dSKonrad Dybcio
58180f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_1_clk_src = {
58280f5451dSKonrad Dybcio .cmd_rcgr = 0xa010,
58380f5451dSKonrad Dybcio .mnd_width = 0,
58480f5451dSKonrad Dybcio .hid_width = 5,
58580f5451dSKonrad Dybcio .parent_map = camcc_parent_map_1,
58680f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_ife_0_clk_src,
58780f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
58880f5451dSKonrad Dybcio .name = "camcc_ife_1_clk_src",
58980f5451dSKonrad Dybcio .parent_data = camcc_parent_data_1,
59080f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_1),
59180f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
59280f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
59380f5451dSKonrad Dybcio },
59480f5451dSKonrad Dybcio };
59580f5451dSKonrad Dybcio
59680f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_1_csid_clk_src = {
59780f5451dSKonrad Dybcio .cmd_rcgr = 0xa034,
59880f5451dSKonrad Dybcio .mnd_width = 0,
59980f5451dSKonrad Dybcio .hid_width = 5,
60080f5451dSKonrad Dybcio .parent_map = camcc_parent_map_2,
60180f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_cphy_rx_clk_src,
60280f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
60380f5451dSKonrad Dybcio .name = "camcc_ife_1_csid_clk_src",
60480f5451dSKonrad Dybcio .parent_data = camcc_parent_data_2,
60580f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_2),
60680f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
60780f5451dSKonrad Dybcio },
60880f5451dSKonrad Dybcio };
60980f5451dSKonrad Dybcio
61080f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_2_clk_src = {
61180f5451dSKonrad Dybcio .cmd_rcgr = 0xb00c,
61280f5451dSKonrad Dybcio .mnd_width = 0,
61380f5451dSKonrad Dybcio .hid_width = 5,
61480f5451dSKonrad Dybcio .parent_map = camcc_parent_map_1,
61580f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_ife_0_clk_src,
61680f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
61780f5451dSKonrad Dybcio .name = "camcc_ife_2_clk_src",
61880f5451dSKonrad Dybcio .parent_data = camcc_parent_data_1,
61980f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_1),
62080f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
62180f5451dSKonrad Dybcio },
62280f5451dSKonrad Dybcio };
62380f5451dSKonrad Dybcio
62480f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_2_csid_clk_src = {
62580f5451dSKonrad Dybcio .cmd_rcgr = 0xb030,
62680f5451dSKonrad Dybcio .mnd_width = 0,
62780f5451dSKonrad Dybcio .hid_width = 5,
62880f5451dSKonrad Dybcio .parent_map = camcc_parent_map_2,
62980f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_cphy_rx_clk_src,
63080f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
63180f5451dSKonrad Dybcio .name = "camcc_ife_2_csid_clk_src",
63280f5451dSKonrad Dybcio .parent_data = camcc_parent_data_2,
63380f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_2),
63480f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
63580f5451dSKonrad Dybcio },
63680f5451dSKonrad Dybcio };
63780f5451dSKonrad Dybcio
63880f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_ife_lite_clk_src[] = {
63980f5451dSKonrad Dybcio F(320000000, P_CAMCC_PLL2_OUT_MAIN, 1.5, 0, 0),
64080f5451dSKonrad Dybcio F(400000000, P_CAMCC_PLL0_OUT_MAIN, 1.5, 0, 0),
64180f5451dSKonrad Dybcio F(480000000, P_CAMCC_PLL2_OUT_MAIN, 1, 0, 0),
64280f5451dSKonrad Dybcio F(600000000, P_CAMCC_PLL0_OUT_MAIN, 1, 0, 0),
64380f5451dSKonrad Dybcio { }
64480f5451dSKonrad Dybcio };
64580f5451dSKonrad Dybcio
64680f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_lite_clk_src = {
64780f5451dSKonrad Dybcio .cmd_rcgr = 0xc004,
64880f5451dSKonrad Dybcio .mnd_width = 0,
64980f5451dSKonrad Dybcio .hid_width = 5,
65080f5451dSKonrad Dybcio .parent_map = camcc_parent_map_6,
65180f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_ife_lite_clk_src,
65280f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
65380f5451dSKonrad Dybcio .name = "camcc_ife_lite_clk_src",
65480f5451dSKonrad Dybcio .parent_data = camcc_parent_data_6,
65580f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_6),
65680f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
65780f5451dSKonrad Dybcio },
65880f5451dSKonrad Dybcio };
65980f5451dSKonrad Dybcio
66080f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ife_lite_csid_clk_src = {
66180f5451dSKonrad Dybcio .cmd_rcgr = 0xc024,
66280f5451dSKonrad Dybcio .mnd_width = 0,
66380f5451dSKonrad Dybcio .hid_width = 5,
66480f5451dSKonrad Dybcio .parent_map = camcc_parent_map_2,
66580f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_cphy_rx_clk_src,
66680f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
66780f5451dSKonrad Dybcio .name = "camcc_ife_lite_csid_clk_src",
66880f5451dSKonrad Dybcio .parent_data = camcc_parent_data_2,
66980f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_2),
67080f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
67180f5451dSKonrad Dybcio },
67280f5451dSKonrad Dybcio };
67380f5451dSKonrad Dybcio
67480f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_ipe_0_clk_src[] = {
67580f5451dSKonrad Dybcio F(240000000, P_CAMCC_PLL2_OUT_MAIN, 2, 0, 0),
67680f5451dSKonrad Dybcio F(320000000, P_CAMCC_PLL2_OUT_MAIN, 1.5, 0, 0),
67780f5451dSKonrad Dybcio F(404000000, P_CAMCC_PLL1_OUT_MAIN, 2, 0, 0),
67880f5451dSKonrad Dybcio F(538666667, P_CAMCC_PLL1_OUT_MAIN, 1.5, 0, 0),
67980f5451dSKonrad Dybcio F(600000000, P_CAMCC_PLL0_OUT_MAIN, 1, 0, 0),
68080f5451dSKonrad Dybcio { }
68180f5451dSKonrad Dybcio };
68280f5451dSKonrad Dybcio
68380f5451dSKonrad Dybcio static struct clk_rcg2 camcc_ipe_0_clk_src = {
68480f5451dSKonrad Dybcio .cmd_rcgr = 0x7010,
68580f5451dSKonrad Dybcio .mnd_width = 0,
68680f5451dSKonrad Dybcio .hid_width = 5,
68780f5451dSKonrad Dybcio .parent_map = camcc_parent_map_7,
68880f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_ipe_0_clk_src,
68980f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
69080f5451dSKonrad Dybcio .name = "camcc_ipe_0_clk_src",
69180f5451dSKonrad Dybcio .parent_data = camcc_parent_data_7,
69280f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_7),
69380f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
69480f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
69580f5451dSKonrad Dybcio },
69680f5451dSKonrad Dybcio };
69780f5451dSKonrad Dybcio
69880f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_jpeg_clk_src[] = {
69980f5451dSKonrad Dybcio F(66666667, P_CAMCC_PLL0_OUT_MAIN, 9, 0, 0),
70080f5451dSKonrad Dybcio F(133333333, P_CAMCC_PLL0_OUT_MAIN, 4.5, 0, 0),
70180f5451dSKonrad Dybcio F(200000000, P_CAMCC_PLL0_OUT_MAIN, 3, 0, 0),
70280f5451dSKonrad Dybcio F(404000000, P_CAMCC_PLL1_OUT_EVEN, 1, 0, 0),
70380f5451dSKonrad Dybcio F(480000000, P_CAMCC_PLL2_OUT_MAIN, 1, 0, 0),
70480f5451dSKonrad Dybcio F(600000000, P_CAMCC_PLL0_OUT_MAIN, 1, 0, 0),
70580f5451dSKonrad Dybcio { }
70680f5451dSKonrad Dybcio };
70780f5451dSKonrad Dybcio
70880f5451dSKonrad Dybcio static struct clk_rcg2 camcc_jpeg_clk_src = {
70980f5451dSKonrad Dybcio .cmd_rcgr = 0xd004,
71080f5451dSKonrad Dybcio .mnd_width = 0,
71180f5451dSKonrad Dybcio .hid_width = 5,
71280f5451dSKonrad Dybcio .parent_map = camcc_parent_map_1,
71380f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_jpeg_clk_src,
71480f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
71580f5451dSKonrad Dybcio .name = "camcc_jpeg_clk_src",
71680f5451dSKonrad Dybcio .parent_data = camcc_parent_data_1,
71780f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_1),
71880f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
71980f5451dSKonrad Dybcio },
72080f5451dSKonrad Dybcio };
72180f5451dSKonrad Dybcio
72280f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_lrme_clk_src[] = {
72380f5451dSKonrad Dybcio F(200000000, P_CAMCC_PLL0_OUT_MAIN, 3, 0, 0),
72480f5451dSKonrad Dybcio F(269333333, P_CAMCC_PLL1_OUT_MAIN, 3, 0, 0),
72580f5451dSKonrad Dybcio F(323200000, P_CAMCC_PLL1_OUT_MAIN, 2.5, 0, 0),
72680f5451dSKonrad Dybcio F(404000000, P_CAMCC_PLL1_OUT_MAIN, 2, 0, 0),
72780f5451dSKonrad Dybcio { }
72880f5451dSKonrad Dybcio };
72980f5451dSKonrad Dybcio
73080f5451dSKonrad Dybcio static struct clk_rcg2 camcc_lrme_clk_src = {
73180f5451dSKonrad Dybcio .cmd_rcgr = 0x11004,
73280f5451dSKonrad Dybcio .mnd_width = 0,
73380f5451dSKonrad Dybcio .hid_width = 5,
73480f5451dSKonrad Dybcio .parent_map = camcc_parent_map_8,
73580f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_lrme_clk_src,
73680f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
73780f5451dSKonrad Dybcio .name = "camcc_lrme_clk_src",
73880f5451dSKonrad Dybcio .parent_data = camcc_parent_data_8,
73980f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_8),
74080f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
74180f5451dSKonrad Dybcio },
74280f5451dSKonrad Dybcio };
74380f5451dSKonrad Dybcio
74480f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_mclk0_clk_src[] = {
74580f5451dSKonrad Dybcio F(19200000, P_CAMCC_PLL2_OUT_EARLY, 1, 1, 50),
74680f5451dSKonrad Dybcio F(24000000, P_CAMCC_PLL2_OUT_EARLY, 10, 1, 4),
74780f5451dSKonrad Dybcio F(64000000, P_CAMCC_PLL2_OUT_EARLY, 15, 0, 0),
74880f5451dSKonrad Dybcio { }
74980f5451dSKonrad Dybcio };
75080f5451dSKonrad Dybcio
75180f5451dSKonrad Dybcio static struct clk_rcg2 camcc_mclk0_clk_src = {
75280f5451dSKonrad Dybcio .cmd_rcgr = 0x4004,
75380f5451dSKonrad Dybcio .mnd_width = 8,
75480f5451dSKonrad Dybcio .hid_width = 5,
75580f5451dSKonrad Dybcio .parent_map = camcc_parent_map_3,
75680f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_mclk0_clk_src,
75780f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
75880f5451dSKonrad Dybcio .name = "camcc_mclk0_clk_src",
75980f5451dSKonrad Dybcio .parent_data = camcc_parent_data_3,
76080f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_3),
76180f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
76280f5451dSKonrad Dybcio },
76380f5451dSKonrad Dybcio };
76480f5451dSKonrad Dybcio
76580f5451dSKonrad Dybcio static struct clk_rcg2 camcc_mclk1_clk_src = {
76680f5451dSKonrad Dybcio .cmd_rcgr = 0x4024,
76780f5451dSKonrad Dybcio .mnd_width = 8,
76880f5451dSKonrad Dybcio .hid_width = 5,
76980f5451dSKonrad Dybcio .parent_map = camcc_parent_map_3,
77080f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_mclk0_clk_src,
77180f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
77280f5451dSKonrad Dybcio .name = "camcc_mclk1_clk_src",
77380f5451dSKonrad Dybcio .parent_data = camcc_parent_data_3,
77480f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_3),
77580f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
77680f5451dSKonrad Dybcio },
77780f5451dSKonrad Dybcio };
77880f5451dSKonrad Dybcio
77980f5451dSKonrad Dybcio static struct clk_rcg2 camcc_mclk2_clk_src = {
78080f5451dSKonrad Dybcio .cmd_rcgr = 0x4044,
78180f5451dSKonrad Dybcio .mnd_width = 8,
78280f5451dSKonrad Dybcio .hid_width = 5,
78380f5451dSKonrad Dybcio .parent_map = camcc_parent_map_3,
78480f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_mclk0_clk_src,
78580f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
78680f5451dSKonrad Dybcio .name = "camcc_mclk2_clk_src",
78780f5451dSKonrad Dybcio .parent_data = camcc_parent_data_3,
78880f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_3),
78980f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
79080f5451dSKonrad Dybcio },
79180f5451dSKonrad Dybcio };
79280f5451dSKonrad Dybcio
79380f5451dSKonrad Dybcio static struct clk_rcg2 camcc_mclk3_clk_src = {
79480f5451dSKonrad Dybcio .cmd_rcgr = 0x4064,
79580f5451dSKonrad Dybcio .mnd_width = 8,
79680f5451dSKonrad Dybcio .hid_width = 5,
79780f5451dSKonrad Dybcio .parent_map = camcc_parent_map_3,
79880f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_mclk0_clk_src,
79980f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
80080f5451dSKonrad Dybcio .name = "camcc_mclk3_clk_src",
80180f5451dSKonrad Dybcio .parent_data = camcc_parent_data_3,
80280f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_3),
80380f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
80480f5451dSKonrad Dybcio },
80580f5451dSKonrad Dybcio };
80680f5451dSKonrad Dybcio
80780f5451dSKonrad Dybcio static struct clk_rcg2 camcc_mclk4_clk_src = {
80880f5451dSKonrad Dybcio .cmd_rcgr = 0x4084,
80980f5451dSKonrad Dybcio .mnd_width = 8,
81080f5451dSKonrad Dybcio .hid_width = 5,
81180f5451dSKonrad Dybcio .parent_map = camcc_parent_map_3,
81280f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_mclk0_clk_src,
81380f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
81480f5451dSKonrad Dybcio .name = "camcc_mclk4_clk_src",
81580f5451dSKonrad Dybcio .parent_data = camcc_parent_data_3,
81680f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_3),
81780f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
81880f5451dSKonrad Dybcio },
81980f5451dSKonrad Dybcio };
82080f5451dSKonrad Dybcio
82180f5451dSKonrad Dybcio static const struct freq_tbl ftbl_camcc_slow_ahb_clk_src[] = {
82280f5451dSKonrad Dybcio F(80000000, P_CAMCC_PLL2_OUT_MAIN, 6, 0, 0),
82380f5451dSKonrad Dybcio { }
82480f5451dSKonrad Dybcio };
82580f5451dSKonrad Dybcio
82680f5451dSKonrad Dybcio static struct clk_rcg2 camcc_slow_ahb_clk_src = {
82780f5451dSKonrad Dybcio .cmd_rcgr = 0x6058,
82880f5451dSKonrad Dybcio .mnd_width = 0,
82980f5451dSKonrad Dybcio .hid_width = 5,
83080f5451dSKonrad Dybcio .parent_map = camcc_parent_map_9,
83180f5451dSKonrad Dybcio .freq_tbl = ftbl_camcc_slow_ahb_clk_src,
83280f5451dSKonrad Dybcio .clkr.hw.init = &(struct clk_init_data){
83380f5451dSKonrad Dybcio .name = "camcc_slow_ahb_clk_src",
83480f5451dSKonrad Dybcio .parent_data = camcc_parent_data_9,
83580f5451dSKonrad Dybcio .num_parents = ARRAY_SIZE(camcc_parent_data_9),
83680f5451dSKonrad Dybcio .ops = &clk_rcg2_ops,
83780f5451dSKonrad Dybcio },
83880f5451dSKonrad Dybcio };
83980f5451dSKonrad Dybcio
84080f5451dSKonrad Dybcio static struct clk_branch camcc_bps_ahb_clk = {
84180f5451dSKonrad Dybcio .halt_reg = 0x6070,
84280f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
84380f5451dSKonrad Dybcio .clkr = {
84480f5451dSKonrad Dybcio .enable_reg = 0x6070,
84580f5451dSKonrad Dybcio .enable_mask = BIT(0),
84680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
84780f5451dSKonrad Dybcio .name = "camcc_bps_ahb_clk",
84880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
84980f5451dSKonrad Dybcio &camcc_slow_ahb_clk_src.clkr.hw
85080f5451dSKonrad Dybcio },
85180f5451dSKonrad Dybcio .num_parents = 1,
85280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
85380f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
85480f5451dSKonrad Dybcio },
85580f5451dSKonrad Dybcio },
85680f5451dSKonrad Dybcio };
85780f5451dSKonrad Dybcio
85880f5451dSKonrad Dybcio static struct clk_branch camcc_bps_areg_clk = {
85980f5451dSKonrad Dybcio .halt_reg = 0x6054,
86080f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
86180f5451dSKonrad Dybcio .clkr = {
86280f5451dSKonrad Dybcio .enable_reg = 0x6054,
86380f5451dSKonrad Dybcio .enable_mask = BIT(0),
86480f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
86580f5451dSKonrad Dybcio .name = "camcc_bps_areg_clk",
86680f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
86780f5451dSKonrad Dybcio &camcc_fast_ahb_clk_src.clkr.hw
86880f5451dSKonrad Dybcio },
86980f5451dSKonrad Dybcio .num_parents = 1,
87080f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
87180f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
87280f5451dSKonrad Dybcio },
87380f5451dSKonrad Dybcio },
87480f5451dSKonrad Dybcio };
87580f5451dSKonrad Dybcio
87680f5451dSKonrad Dybcio static struct clk_branch camcc_bps_axi_clk = {
87780f5451dSKonrad Dybcio .halt_reg = 0x6038,
87880f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
87980f5451dSKonrad Dybcio .clkr = {
88080f5451dSKonrad Dybcio .enable_reg = 0x6038,
88180f5451dSKonrad Dybcio .enable_mask = BIT(0),
88280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
88380f5451dSKonrad Dybcio .name = "camcc_bps_axi_clk",
88480f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
88580f5451dSKonrad Dybcio },
88680f5451dSKonrad Dybcio },
88780f5451dSKonrad Dybcio };
88880f5451dSKonrad Dybcio
88980f5451dSKonrad Dybcio static struct clk_branch camcc_bps_clk = {
89080f5451dSKonrad Dybcio .halt_reg = 0x6028,
89180f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
89280f5451dSKonrad Dybcio .clkr = {
89380f5451dSKonrad Dybcio .enable_reg = 0x6028,
89480f5451dSKonrad Dybcio .enable_mask = BIT(0),
89580f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
89680f5451dSKonrad Dybcio .name = "camcc_bps_clk",
89780f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
89880f5451dSKonrad Dybcio &camcc_bps_clk_src.clkr.hw
89980f5451dSKonrad Dybcio },
90080f5451dSKonrad Dybcio .num_parents = 1,
90180f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
90280f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
90380f5451dSKonrad Dybcio },
90480f5451dSKonrad Dybcio },
90580f5451dSKonrad Dybcio };
90680f5451dSKonrad Dybcio
90780f5451dSKonrad Dybcio static struct clk_branch camcc_camnoc_axi_clk = {
90880f5451dSKonrad Dybcio .halt_reg = 0x13004,
90980f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
91080f5451dSKonrad Dybcio .clkr = {
91180f5451dSKonrad Dybcio .enable_reg = 0x13004,
91280f5451dSKonrad Dybcio .enable_mask = BIT(0),
91380f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
91480f5451dSKonrad Dybcio .name = "camcc_camnoc_axi_clk",
91580f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
91680f5451dSKonrad Dybcio },
91780f5451dSKonrad Dybcio },
91880f5451dSKonrad Dybcio };
91980f5451dSKonrad Dybcio
92080f5451dSKonrad Dybcio static struct clk_branch camcc_cci_0_clk = {
92180f5451dSKonrad Dybcio .halt_reg = 0xf01c,
92280f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
92380f5451dSKonrad Dybcio .clkr = {
92480f5451dSKonrad Dybcio .enable_reg = 0xf01c,
92580f5451dSKonrad Dybcio .enable_mask = BIT(0),
92680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
92780f5451dSKonrad Dybcio .name = "camcc_cci_0_clk",
92880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
92980f5451dSKonrad Dybcio &camcc_cci_0_clk_src.clkr.hw
93080f5451dSKonrad Dybcio },
93180f5451dSKonrad Dybcio .num_parents = 1,
93280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
93380f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
93480f5451dSKonrad Dybcio },
93580f5451dSKonrad Dybcio },
93680f5451dSKonrad Dybcio };
93780f5451dSKonrad Dybcio
93880f5451dSKonrad Dybcio static struct clk_branch camcc_cci_1_clk = {
93980f5451dSKonrad Dybcio .halt_reg = 0x1001c,
94080f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
94180f5451dSKonrad Dybcio .clkr = {
94280f5451dSKonrad Dybcio .enable_reg = 0x1001c,
94380f5451dSKonrad Dybcio .enable_mask = BIT(0),
94480f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
94580f5451dSKonrad Dybcio .name = "camcc_cci_1_clk",
94680f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
94780f5451dSKonrad Dybcio &camcc_cci_1_clk_src.clkr.hw
94880f5451dSKonrad Dybcio },
94980f5451dSKonrad Dybcio .num_parents = 1,
95080f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
95180f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
95280f5451dSKonrad Dybcio },
95380f5451dSKonrad Dybcio },
95480f5451dSKonrad Dybcio };
95580f5451dSKonrad Dybcio
95680f5451dSKonrad Dybcio static struct clk_branch camcc_core_ahb_clk = {
95780f5451dSKonrad Dybcio .halt_reg = 0x14010,
95880f5451dSKonrad Dybcio .halt_check = BRANCH_HALT_VOTED,
95980f5451dSKonrad Dybcio .clkr = {
96080f5451dSKonrad Dybcio .enable_reg = 0x14010,
96180f5451dSKonrad Dybcio .enable_mask = BIT(0),
96280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
96380f5451dSKonrad Dybcio .name = "camcc_core_ahb_clk",
96480f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
96580f5451dSKonrad Dybcio &camcc_slow_ahb_clk_src.clkr.hw
96680f5451dSKonrad Dybcio },
96780f5451dSKonrad Dybcio .num_parents = 1,
96880f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
96980f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
97080f5451dSKonrad Dybcio },
97180f5451dSKonrad Dybcio },
97280f5451dSKonrad Dybcio };
97380f5451dSKonrad Dybcio
97480f5451dSKonrad Dybcio static struct clk_branch camcc_cpas_ahb_clk = {
97580f5451dSKonrad Dybcio .halt_reg = 0x12004,
97680f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
97780f5451dSKonrad Dybcio .clkr = {
97880f5451dSKonrad Dybcio .enable_reg = 0x12004,
97980f5451dSKonrad Dybcio .enable_mask = BIT(0),
98080f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
98180f5451dSKonrad Dybcio .name = "camcc_cpas_ahb_clk",
98280f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
98380f5451dSKonrad Dybcio &camcc_slow_ahb_clk_src.clkr.hw
98480f5451dSKonrad Dybcio },
98580f5451dSKonrad Dybcio .num_parents = 1,
98680f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
98780f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
98880f5451dSKonrad Dybcio },
98980f5451dSKonrad Dybcio },
99080f5451dSKonrad Dybcio };
99180f5451dSKonrad Dybcio
99280f5451dSKonrad Dybcio static struct clk_branch camcc_csi0phytimer_clk = {
99380f5451dSKonrad Dybcio .halt_reg = 0x501c,
99480f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
99580f5451dSKonrad Dybcio .clkr = {
99680f5451dSKonrad Dybcio .enable_reg = 0x501c,
99780f5451dSKonrad Dybcio .enable_mask = BIT(0),
99880f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
99980f5451dSKonrad Dybcio .name = "camcc_csi0phytimer_clk",
100080f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
100180f5451dSKonrad Dybcio &camcc_csi0phytimer_clk_src.clkr.hw
100280f5451dSKonrad Dybcio },
100380f5451dSKonrad Dybcio .num_parents = 1,
100480f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
100580f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
100680f5451dSKonrad Dybcio },
100780f5451dSKonrad Dybcio },
100880f5451dSKonrad Dybcio };
100980f5451dSKonrad Dybcio
101080f5451dSKonrad Dybcio static struct clk_branch camcc_csi1phytimer_clk = {
101180f5451dSKonrad Dybcio .halt_reg = 0x5040,
101280f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
101380f5451dSKonrad Dybcio .clkr = {
101480f5451dSKonrad Dybcio .enable_reg = 0x5040,
101580f5451dSKonrad Dybcio .enable_mask = BIT(0),
101680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
101780f5451dSKonrad Dybcio .name = "camcc_csi1phytimer_clk",
101880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
101980f5451dSKonrad Dybcio &camcc_csi1phytimer_clk_src.clkr.hw
102080f5451dSKonrad Dybcio },
102180f5451dSKonrad Dybcio .num_parents = 1,
102280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
102380f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
102480f5451dSKonrad Dybcio },
102580f5451dSKonrad Dybcio },
102680f5451dSKonrad Dybcio };
102780f5451dSKonrad Dybcio
102880f5451dSKonrad Dybcio static struct clk_branch camcc_csi2phytimer_clk = {
102980f5451dSKonrad Dybcio .halt_reg = 0x5064,
103080f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
103180f5451dSKonrad Dybcio .clkr = {
103280f5451dSKonrad Dybcio .enable_reg = 0x5064,
103380f5451dSKonrad Dybcio .enable_mask = BIT(0),
103480f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
103580f5451dSKonrad Dybcio .name = "camcc_csi2phytimer_clk",
103680f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
103780f5451dSKonrad Dybcio &camcc_csi2phytimer_clk_src.clkr.hw
103880f5451dSKonrad Dybcio },
103980f5451dSKonrad Dybcio .num_parents = 1,
104080f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
104180f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
104280f5451dSKonrad Dybcio },
104380f5451dSKonrad Dybcio },
104480f5451dSKonrad Dybcio };
104580f5451dSKonrad Dybcio
104680f5451dSKonrad Dybcio static struct clk_branch camcc_csi3phytimer_clk = {
104780f5451dSKonrad Dybcio .halt_reg = 0x5088,
104880f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
104980f5451dSKonrad Dybcio .clkr = {
105080f5451dSKonrad Dybcio .enable_reg = 0x5088,
105180f5451dSKonrad Dybcio .enable_mask = BIT(0),
105280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
105380f5451dSKonrad Dybcio .name = "camcc_csi3phytimer_clk",
105480f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
105580f5451dSKonrad Dybcio &camcc_csi3phytimer_clk_src.clkr.hw
105680f5451dSKonrad Dybcio },
105780f5451dSKonrad Dybcio .num_parents = 1,
105880f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
105980f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
106080f5451dSKonrad Dybcio },
106180f5451dSKonrad Dybcio },
106280f5451dSKonrad Dybcio };
106380f5451dSKonrad Dybcio
106480f5451dSKonrad Dybcio static struct clk_branch camcc_csiphy0_clk = {
106580f5451dSKonrad Dybcio .halt_reg = 0x5020,
106680f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
106780f5451dSKonrad Dybcio .clkr = {
106880f5451dSKonrad Dybcio .enable_reg = 0x5020,
106980f5451dSKonrad Dybcio .enable_mask = BIT(0),
107080f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
107180f5451dSKonrad Dybcio .name = "camcc_csiphy0_clk",
107280f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
107380f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
107480f5451dSKonrad Dybcio },
107580f5451dSKonrad Dybcio .num_parents = 1,
107680f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
107780f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
107880f5451dSKonrad Dybcio },
107980f5451dSKonrad Dybcio },
108080f5451dSKonrad Dybcio };
108180f5451dSKonrad Dybcio
108280f5451dSKonrad Dybcio static struct clk_branch camcc_csiphy1_clk = {
108380f5451dSKonrad Dybcio .halt_reg = 0x5044,
108480f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
108580f5451dSKonrad Dybcio .clkr = {
108680f5451dSKonrad Dybcio .enable_reg = 0x5044,
108780f5451dSKonrad Dybcio .enable_mask = BIT(0),
108880f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
108980f5451dSKonrad Dybcio .name = "camcc_csiphy1_clk",
109080f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
109180f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
109280f5451dSKonrad Dybcio },
109380f5451dSKonrad Dybcio .num_parents = 1,
109480f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
109580f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
109680f5451dSKonrad Dybcio },
109780f5451dSKonrad Dybcio },
109880f5451dSKonrad Dybcio };
109980f5451dSKonrad Dybcio
110080f5451dSKonrad Dybcio static struct clk_branch camcc_csiphy2_clk = {
110180f5451dSKonrad Dybcio .halt_reg = 0x5068,
110280f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
110380f5451dSKonrad Dybcio .clkr = {
110480f5451dSKonrad Dybcio .enable_reg = 0x5068,
110580f5451dSKonrad Dybcio .enable_mask = BIT(0),
110680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
110780f5451dSKonrad Dybcio .name = "camcc_csiphy2_clk",
110880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
110980f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
111080f5451dSKonrad Dybcio },
111180f5451dSKonrad Dybcio .num_parents = 1,
111280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
111380f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
111480f5451dSKonrad Dybcio },
111580f5451dSKonrad Dybcio },
111680f5451dSKonrad Dybcio };
111780f5451dSKonrad Dybcio
111880f5451dSKonrad Dybcio static struct clk_branch camcc_csiphy3_clk = {
111980f5451dSKonrad Dybcio .halt_reg = 0x508c,
112080f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
112180f5451dSKonrad Dybcio .clkr = {
112280f5451dSKonrad Dybcio .enable_reg = 0x508c,
112380f5451dSKonrad Dybcio .enable_mask = BIT(0),
112480f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
112580f5451dSKonrad Dybcio .name = "camcc_csiphy3_clk",
112680f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
112780f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
112880f5451dSKonrad Dybcio },
112980f5451dSKonrad Dybcio .num_parents = 1,
113080f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
113180f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
113280f5451dSKonrad Dybcio },
113380f5451dSKonrad Dybcio },
113480f5451dSKonrad Dybcio };
113580f5451dSKonrad Dybcio
113680f5451dSKonrad Dybcio static struct clk_branch camcc_icp_clk = {
113780f5451dSKonrad Dybcio .halt_reg = 0xe02c,
113880f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
113980f5451dSKonrad Dybcio .clkr = {
114080f5451dSKonrad Dybcio .enable_reg = 0xe02c,
114180f5451dSKonrad Dybcio .enable_mask = BIT(0),
114280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
114380f5451dSKonrad Dybcio .name = "camcc_icp_clk",
114480f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
114580f5451dSKonrad Dybcio &camcc_icp_clk_src.clkr.hw
114680f5451dSKonrad Dybcio },
114780f5451dSKonrad Dybcio .num_parents = 1,
114880f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
114980f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
115080f5451dSKonrad Dybcio },
115180f5451dSKonrad Dybcio },
115280f5451dSKonrad Dybcio };
115380f5451dSKonrad Dybcio
115480f5451dSKonrad Dybcio static struct clk_branch camcc_icp_ts_clk = {
115580f5451dSKonrad Dybcio .halt_reg = 0xe00c,
115680f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
115780f5451dSKonrad Dybcio .clkr = {
115880f5451dSKonrad Dybcio .enable_reg = 0xe00c,
115980f5451dSKonrad Dybcio .enable_mask = BIT(0),
116080f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
116180f5451dSKonrad Dybcio .name = "camcc_icp_ts_clk",
116280f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
116380f5451dSKonrad Dybcio },
116480f5451dSKonrad Dybcio },
116580f5451dSKonrad Dybcio };
116680f5451dSKonrad Dybcio
116780f5451dSKonrad Dybcio static struct clk_branch camcc_ife_0_axi_clk = {
116880f5451dSKonrad Dybcio .halt_reg = 0x9080,
116980f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
117080f5451dSKonrad Dybcio .clkr = {
117180f5451dSKonrad Dybcio .enable_reg = 0x9080,
117280f5451dSKonrad Dybcio .enable_mask = BIT(0),
117380f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
117480f5451dSKonrad Dybcio .name = "camcc_ife_0_axi_clk",
117580f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
117680f5451dSKonrad Dybcio },
117780f5451dSKonrad Dybcio },
117880f5451dSKonrad Dybcio };
117980f5451dSKonrad Dybcio
118080f5451dSKonrad Dybcio static struct clk_branch camcc_ife_0_clk = {
118180f5451dSKonrad Dybcio .halt_reg = 0x9028,
118280f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
118380f5451dSKonrad Dybcio .clkr = {
118480f5451dSKonrad Dybcio .enable_reg = 0x9028,
118580f5451dSKonrad Dybcio .enable_mask = BIT(0),
118680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
118780f5451dSKonrad Dybcio .name = "camcc_ife_0_clk",
118880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
118980f5451dSKonrad Dybcio &camcc_ife_0_clk_src.clkr.hw
119080f5451dSKonrad Dybcio },
119180f5451dSKonrad Dybcio .num_parents = 1,
119280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
119380f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
119480f5451dSKonrad Dybcio },
119580f5451dSKonrad Dybcio },
119680f5451dSKonrad Dybcio };
119780f5451dSKonrad Dybcio
119880f5451dSKonrad Dybcio static struct clk_branch camcc_ife_0_cphy_rx_clk = {
119980f5451dSKonrad Dybcio .halt_reg = 0x907c,
120080f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
120180f5451dSKonrad Dybcio .clkr = {
120280f5451dSKonrad Dybcio .enable_reg = 0x907c,
120380f5451dSKonrad Dybcio .enable_mask = BIT(0),
120480f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
120580f5451dSKonrad Dybcio .name = "camcc_ife_0_cphy_rx_clk",
120680f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
120780f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
120880f5451dSKonrad Dybcio },
120980f5451dSKonrad Dybcio .num_parents = 1,
121080f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
121180f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
121280f5451dSKonrad Dybcio },
121380f5451dSKonrad Dybcio },
121480f5451dSKonrad Dybcio };
121580f5451dSKonrad Dybcio
121680f5451dSKonrad Dybcio static struct clk_branch camcc_ife_0_csid_clk = {
121780f5451dSKonrad Dybcio .halt_reg = 0x9054,
121880f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
121980f5451dSKonrad Dybcio .clkr = {
122080f5451dSKonrad Dybcio .enable_reg = 0x9054,
122180f5451dSKonrad Dybcio .enable_mask = BIT(0),
122280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
122380f5451dSKonrad Dybcio .name = "camcc_ife_0_csid_clk",
122480f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
122580f5451dSKonrad Dybcio &camcc_ife_0_csid_clk_src.clkr.hw
122680f5451dSKonrad Dybcio },
122780f5451dSKonrad Dybcio .num_parents = 1,
122880f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
122980f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
123080f5451dSKonrad Dybcio },
123180f5451dSKonrad Dybcio },
123280f5451dSKonrad Dybcio };
123380f5451dSKonrad Dybcio
123480f5451dSKonrad Dybcio static struct clk_branch camcc_ife_0_dsp_clk = {
123580f5451dSKonrad Dybcio .halt_reg = 0x9038,
123680f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
123780f5451dSKonrad Dybcio .clkr = {
123880f5451dSKonrad Dybcio .enable_reg = 0x9038,
123980f5451dSKonrad Dybcio .enable_mask = BIT(0),
124080f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
124180f5451dSKonrad Dybcio .name = "camcc_ife_0_dsp_clk",
124280f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
124380f5451dSKonrad Dybcio &camcc_ife_0_clk_src.clkr.hw
124480f5451dSKonrad Dybcio },
124580f5451dSKonrad Dybcio .num_parents = 1,
124680f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
124780f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
124880f5451dSKonrad Dybcio },
124980f5451dSKonrad Dybcio },
125080f5451dSKonrad Dybcio };
125180f5451dSKonrad Dybcio
125280f5451dSKonrad Dybcio static struct clk_branch camcc_ife_1_axi_clk = {
125380f5451dSKonrad Dybcio .halt_reg = 0xa058,
125480f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
125580f5451dSKonrad Dybcio .clkr = {
125680f5451dSKonrad Dybcio .enable_reg = 0xa058,
125780f5451dSKonrad Dybcio .enable_mask = BIT(0),
125880f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
125980f5451dSKonrad Dybcio .name = "camcc_ife_1_axi_clk",
126080f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
126180f5451dSKonrad Dybcio },
126280f5451dSKonrad Dybcio },
126380f5451dSKonrad Dybcio };
126480f5451dSKonrad Dybcio
126580f5451dSKonrad Dybcio static struct clk_branch camcc_ife_1_clk = {
126680f5451dSKonrad Dybcio .halt_reg = 0xa028,
126780f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
126880f5451dSKonrad Dybcio .clkr = {
126980f5451dSKonrad Dybcio .enable_reg = 0xa028,
127080f5451dSKonrad Dybcio .enable_mask = BIT(0),
127180f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
127280f5451dSKonrad Dybcio .name = "camcc_ife_1_clk",
127380f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
127480f5451dSKonrad Dybcio &camcc_ife_1_clk_src.clkr.hw
127580f5451dSKonrad Dybcio },
127680f5451dSKonrad Dybcio .num_parents = 1,
127780f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
127880f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
127980f5451dSKonrad Dybcio },
128080f5451dSKonrad Dybcio },
128180f5451dSKonrad Dybcio };
128280f5451dSKonrad Dybcio
128380f5451dSKonrad Dybcio static struct clk_branch camcc_ife_1_cphy_rx_clk = {
128480f5451dSKonrad Dybcio .halt_reg = 0xa054,
128580f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
128680f5451dSKonrad Dybcio .clkr = {
128780f5451dSKonrad Dybcio .enable_reg = 0xa054,
128880f5451dSKonrad Dybcio .enable_mask = BIT(0),
128980f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
129080f5451dSKonrad Dybcio .name = "camcc_ife_1_cphy_rx_clk",
129180f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
129280f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
129380f5451dSKonrad Dybcio },
129480f5451dSKonrad Dybcio .num_parents = 1,
129580f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
129680f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
129780f5451dSKonrad Dybcio },
129880f5451dSKonrad Dybcio },
129980f5451dSKonrad Dybcio };
130080f5451dSKonrad Dybcio
130180f5451dSKonrad Dybcio static struct clk_branch camcc_ife_1_csid_clk = {
130280f5451dSKonrad Dybcio .halt_reg = 0xa04c,
130380f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
130480f5451dSKonrad Dybcio .clkr = {
130580f5451dSKonrad Dybcio .enable_reg = 0xa04c,
130680f5451dSKonrad Dybcio .enable_mask = BIT(0),
130780f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
130880f5451dSKonrad Dybcio .name = "camcc_ife_1_csid_clk",
130980f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
131080f5451dSKonrad Dybcio &camcc_ife_1_csid_clk_src.clkr.hw
131180f5451dSKonrad Dybcio },
131280f5451dSKonrad Dybcio .num_parents = 1,
131380f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
131480f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
131580f5451dSKonrad Dybcio },
131680f5451dSKonrad Dybcio },
131780f5451dSKonrad Dybcio };
131880f5451dSKonrad Dybcio
131980f5451dSKonrad Dybcio static struct clk_branch camcc_ife_1_dsp_clk = {
132080f5451dSKonrad Dybcio .halt_reg = 0xa030,
132180f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
132280f5451dSKonrad Dybcio .clkr = {
132380f5451dSKonrad Dybcio .enable_reg = 0xa030,
132480f5451dSKonrad Dybcio .enable_mask = BIT(0),
132580f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
132680f5451dSKonrad Dybcio .name = "camcc_ife_1_dsp_clk",
132780f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
132880f5451dSKonrad Dybcio &camcc_ife_1_clk_src.clkr.hw
132980f5451dSKonrad Dybcio },
133080f5451dSKonrad Dybcio .num_parents = 1,
133180f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
133280f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
133380f5451dSKonrad Dybcio },
133480f5451dSKonrad Dybcio },
133580f5451dSKonrad Dybcio };
133680f5451dSKonrad Dybcio
133780f5451dSKonrad Dybcio static struct clk_branch camcc_ife_2_axi_clk = {
133880f5451dSKonrad Dybcio .halt_reg = 0xb054,
133980f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
134080f5451dSKonrad Dybcio .clkr = {
134180f5451dSKonrad Dybcio .enable_reg = 0xb054,
134280f5451dSKonrad Dybcio .enable_mask = BIT(0),
134380f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
134480f5451dSKonrad Dybcio .name = "camcc_ife_2_axi_clk",
134580f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
134680f5451dSKonrad Dybcio },
134780f5451dSKonrad Dybcio },
134880f5451dSKonrad Dybcio };
134980f5451dSKonrad Dybcio
135080f5451dSKonrad Dybcio static struct clk_branch camcc_ife_2_clk = {
135180f5451dSKonrad Dybcio .halt_reg = 0xb024,
135280f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
135380f5451dSKonrad Dybcio .clkr = {
135480f5451dSKonrad Dybcio .enable_reg = 0xb024,
135580f5451dSKonrad Dybcio .enable_mask = BIT(0),
135680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
135780f5451dSKonrad Dybcio .name = "camcc_ife_2_clk",
135880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
135980f5451dSKonrad Dybcio &camcc_ife_2_clk_src.clkr.hw
136080f5451dSKonrad Dybcio },
136180f5451dSKonrad Dybcio .num_parents = 1,
136280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
136380f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
136480f5451dSKonrad Dybcio },
136580f5451dSKonrad Dybcio },
136680f5451dSKonrad Dybcio };
136780f5451dSKonrad Dybcio
136880f5451dSKonrad Dybcio static struct clk_branch camcc_ife_2_cphy_rx_clk = {
136980f5451dSKonrad Dybcio .halt_reg = 0xb050,
137080f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
137180f5451dSKonrad Dybcio .clkr = {
137280f5451dSKonrad Dybcio .enable_reg = 0xb050,
137380f5451dSKonrad Dybcio .enable_mask = BIT(0),
137480f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
137580f5451dSKonrad Dybcio .name = "camcc_ife_2_cphy_rx_clk",
137680f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
137780f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
137880f5451dSKonrad Dybcio },
137980f5451dSKonrad Dybcio .num_parents = 1,
138080f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
138180f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
138280f5451dSKonrad Dybcio },
138380f5451dSKonrad Dybcio },
138480f5451dSKonrad Dybcio };
138580f5451dSKonrad Dybcio
138680f5451dSKonrad Dybcio static struct clk_branch camcc_ife_2_csid_clk = {
138780f5451dSKonrad Dybcio .halt_reg = 0xb048,
138880f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
138980f5451dSKonrad Dybcio .clkr = {
139080f5451dSKonrad Dybcio .enable_reg = 0xb048,
139180f5451dSKonrad Dybcio .enable_mask = BIT(0),
139280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
139380f5451dSKonrad Dybcio .name = "camcc_ife_2_csid_clk",
139480f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
139580f5451dSKonrad Dybcio &camcc_ife_2_csid_clk_src.clkr.hw
139680f5451dSKonrad Dybcio },
139780f5451dSKonrad Dybcio .num_parents = 1,
139880f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
139980f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
140080f5451dSKonrad Dybcio },
140180f5451dSKonrad Dybcio },
140280f5451dSKonrad Dybcio };
140380f5451dSKonrad Dybcio
140480f5451dSKonrad Dybcio static struct clk_branch camcc_ife_2_dsp_clk = {
140580f5451dSKonrad Dybcio .halt_reg = 0xb02c,
140680f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
140780f5451dSKonrad Dybcio .clkr = {
140880f5451dSKonrad Dybcio .enable_reg = 0xb02c,
140980f5451dSKonrad Dybcio .enable_mask = BIT(0),
141080f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
141180f5451dSKonrad Dybcio .name = "camcc_ife_2_dsp_clk",
141280f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
141380f5451dSKonrad Dybcio &camcc_ife_2_clk_src.clkr.hw
141480f5451dSKonrad Dybcio },
141580f5451dSKonrad Dybcio .num_parents = 1,
141680f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
141780f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
141880f5451dSKonrad Dybcio },
141980f5451dSKonrad Dybcio },
142080f5451dSKonrad Dybcio };
142180f5451dSKonrad Dybcio
142280f5451dSKonrad Dybcio static struct clk_branch camcc_ife_lite_clk = {
142380f5451dSKonrad Dybcio .halt_reg = 0xc01c,
142480f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
142580f5451dSKonrad Dybcio .clkr = {
142680f5451dSKonrad Dybcio .enable_reg = 0xc01c,
142780f5451dSKonrad Dybcio .enable_mask = BIT(0),
142880f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
142980f5451dSKonrad Dybcio .name = "camcc_ife_lite_clk",
143080f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
143180f5451dSKonrad Dybcio &camcc_ife_lite_clk_src.clkr.hw
143280f5451dSKonrad Dybcio },
143380f5451dSKonrad Dybcio .num_parents = 1,
143480f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
143580f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
143680f5451dSKonrad Dybcio },
143780f5451dSKonrad Dybcio },
143880f5451dSKonrad Dybcio };
143980f5451dSKonrad Dybcio
144080f5451dSKonrad Dybcio static struct clk_branch camcc_ife_lite_cphy_rx_clk = {
144180f5451dSKonrad Dybcio .halt_reg = 0xc044,
144280f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
144380f5451dSKonrad Dybcio .clkr = {
144480f5451dSKonrad Dybcio .enable_reg = 0xc044,
144580f5451dSKonrad Dybcio .enable_mask = BIT(0),
144680f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
144780f5451dSKonrad Dybcio .name = "camcc_ife_lite_cphy_rx_clk",
144880f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
144980f5451dSKonrad Dybcio &camcc_cphy_rx_clk_src.clkr.hw
145080f5451dSKonrad Dybcio },
145180f5451dSKonrad Dybcio .num_parents = 1,
145280f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
145380f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
145480f5451dSKonrad Dybcio },
145580f5451dSKonrad Dybcio },
145680f5451dSKonrad Dybcio };
145780f5451dSKonrad Dybcio
145880f5451dSKonrad Dybcio static struct clk_branch camcc_ife_lite_csid_clk = {
145980f5451dSKonrad Dybcio .halt_reg = 0xc03c,
146080f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
146180f5451dSKonrad Dybcio .clkr = {
146280f5451dSKonrad Dybcio .enable_reg = 0xc03c,
146380f5451dSKonrad Dybcio .enable_mask = BIT(0),
146480f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
146580f5451dSKonrad Dybcio .name = "camcc_ife_lite_csid_clk",
146680f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
146780f5451dSKonrad Dybcio &camcc_ife_lite_csid_clk_src.clkr.hw
146880f5451dSKonrad Dybcio },
146980f5451dSKonrad Dybcio .num_parents = 1,
147080f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
147180f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
147280f5451dSKonrad Dybcio },
147380f5451dSKonrad Dybcio },
147480f5451dSKonrad Dybcio };
147580f5451dSKonrad Dybcio
147680f5451dSKonrad Dybcio static struct clk_branch camcc_ipe_0_ahb_clk = {
147780f5451dSKonrad Dybcio .halt_reg = 0x7040,
147880f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
147980f5451dSKonrad Dybcio .clkr = {
148080f5451dSKonrad Dybcio .enable_reg = 0x7040,
148180f5451dSKonrad Dybcio .enable_mask = BIT(0),
148280f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
148380f5451dSKonrad Dybcio .name = "camcc_ipe_0_ahb_clk",
148480f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
148580f5451dSKonrad Dybcio &camcc_slow_ahb_clk_src.clkr.hw
148680f5451dSKonrad Dybcio },
148780f5451dSKonrad Dybcio .num_parents = 1,
148880f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
148980f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
149080f5451dSKonrad Dybcio },
149180f5451dSKonrad Dybcio },
149280f5451dSKonrad Dybcio };
149380f5451dSKonrad Dybcio
149480f5451dSKonrad Dybcio static struct clk_branch camcc_ipe_0_areg_clk = {
149580f5451dSKonrad Dybcio .halt_reg = 0x703c,
149680f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
149780f5451dSKonrad Dybcio .clkr = {
149880f5451dSKonrad Dybcio .enable_reg = 0x703c,
149980f5451dSKonrad Dybcio .enable_mask = BIT(0),
150080f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
150180f5451dSKonrad Dybcio .name = "camcc_ipe_0_areg_clk",
150280f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
150380f5451dSKonrad Dybcio &camcc_fast_ahb_clk_src.clkr.hw
150480f5451dSKonrad Dybcio },
150580f5451dSKonrad Dybcio .num_parents = 1,
150680f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
150780f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
150880f5451dSKonrad Dybcio },
150980f5451dSKonrad Dybcio },
151080f5451dSKonrad Dybcio };
151180f5451dSKonrad Dybcio
151280f5451dSKonrad Dybcio static struct clk_branch camcc_ipe_0_axi_clk = {
151380f5451dSKonrad Dybcio .halt_reg = 0x7038,
151480f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
151580f5451dSKonrad Dybcio .clkr = {
151680f5451dSKonrad Dybcio .enable_reg = 0x7038,
151780f5451dSKonrad Dybcio .enable_mask = BIT(0),
151880f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
151980f5451dSKonrad Dybcio .name = "camcc_ipe_0_axi_clk",
152080f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
152180f5451dSKonrad Dybcio },
152280f5451dSKonrad Dybcio },
152380f5451dSKonrad Dybcio };
152480f5451dSKonrad Dybcio
152580f5451dSKonrad Dybcio static struct clk_branch camcc_ipe_0_clk = {
152680f5451dSKonrad Dybcio .halt_reg = 0x7028,
152780f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
152880f5451dSKonrad Dybcio .clkr = {
152980f5451dSKonrad Dybcio .enable_reg = 0x7028,
153080f5451dSKonrad Dybcio .enable_mask = BIT(0),
153180f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
153280f5451dSKonrad Dybcio .name = "camcc_ipe_0_clk",
153380f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
153480f5451dSKonrad Dybcio &camcc_ipe_0_clk_src.clkr.hw
153580f5451dSKonrad Dybcio },
153680f5451dSKonrad Dybcio .num_parents = 1,
153780f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
153880f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
153980f5451dSKonrad Dybcio },
154080f5451dSKonrad Dybcio },
154180f5451dSKonrad Dybcio };
154280f5451dSKonrad Dybcio
154380f5451dSKonrad Dybcio static struct clk_branch camcc_jpeg_clk = {
154480f5451dSKonrad Dybcio .halt_reg = 0xd01c,
154580f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
154680f5451dSKonrad Dybcio .clkr = {
154780f5451dSKonrad Dybcio .enable_reg = 0xd01c,
154880f5451dSKonrad Dybcio .enable_mask = BIT(0),
154980f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
155080f5451dSKonrad Dybcio .name = "camcc_jpeg_clk",
155180f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
155280f5451dSKonrad Dybcio &camcc_jpeg_clk_src.clkr.hw
155380f5451dSKonrad Dybcio },
155480f5451dSKonrad Dybcio .num_parents = 1,
155580f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
155680f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
155780f5451dSKonrad Dybcio },
155880f5451dSKonrad Dybcio },
155980f5451dSKonrad Dybcio };
156080f5451dSKonrad Dybcio
156180f5451dSKonrad Dybcio static struct clk_branch camcc_lrme_clk = {
156280f5451dSKonrad Dybcio .halt_reg = 0x1101c,
156380f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
156480f5451dSKonrad Dybcio .clkr = {
156580f5451dSKonrad Dybcio .enable_reg = 0x1101c,
156680f5451dSKonrad Dybcio .enable_mask = BIT(0),
156780f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
156880f5451dSKonrad Dybcio .name = "camcc_lrme_clk",
156980f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
157080f5451dSKonrad Dybcio &camcc_lrme_clk_src.clkr.hw
157180f5451dSKonrad Dybcio },
157280f5451dSKonrad Dybcio .num_parents = 1,
157380f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
157480f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
157580f5451dSKonrad Dybcio },
157680f5451dSKonrad Dybcio },
157780f5451dSKonrad Dybcio };
157880f5451dSKonrad Dybcio
157980f5451dSKonrad Dybcio static struct clk_branch camcc_mclk0_clk = {
158080f5451dSKonrad Dybcio .halt_reg = 0x401c,
158180f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
158280f5451dSKonrad Dybcio .clkr = {
158380f5451dSKonrad Dybcio .enable_reg = 0x401c,
158480f5451dSKonrad Dybcio .enable_mask = BIT(0),
158580f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
158680f5451dSKonrad Dybcio .name = "camcc_mclk0_clk",
158780f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
158880f5451dSKonrad Dybcio &camcc_mclk0_clk_src.clkr.hw
158980f5451dSKonrad Dybcio },
159080f5451dSKonrad Dybcio .num_parents = 1,
159180f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
159280f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
159380f5451dSKonrad Dybcio },
159480f5451dSKonrad Dybcio },
159580f5451dSKonrad Dybcio };
159680f5451dSKonrad Dybcio
159780f5451dSKonrad Dybcio static struct clk_branch camcc_mclk1_clk = {
159880f5451dSKonrad Dybcio .halt_reg = 0x403c,
159980f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
160080f5451dSKonrad Dybcio .clkr = {
160180f5451dSKonrad Dybcio .enable_reg = 0x403c,
160280f5451dSKonrad Dybcio .enable_mask = BIT(0),
160380f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
160480f5451dSKonrad Dybcio .name = "camcc_mclk1_clk",
160580f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
160680f5451dSKonrad Dybcio &camcc_mclk1_clk_src.clkr.hw
160780f5451dSKonrad Dybcio },
160880f5451dSKonrad Dybcio .num_parents = 1,
160980f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
161080f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
161180f5451dSKonrad Dybcio },
161280f5451dSKonrad Dybcio },
161380f5451dSKonrad Dybcio };
161480f5451dSKonrad Dybcio
161580f5451dSKonrad Dybcio static struct clk_branch camcc_mclk2_clk = {
161680f5451dSKonrad Dybcio .halt_reg = 0x405c,
161780f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
161880f5451dSKonrad Dybcio .clkr = {
161980f5451dSKonrad Dybcio .enable_reg = 0x405c,
162080f5451dSKonrad Dybcio .enable_mask = BIT(0),
162180f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
162280f5451dSKonrad Dybcio .name = "camcc_mclk2_clk",
162380f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
162480f5451dSKonrad Dybcio &camcc_mclk2_clk_src.clkr.hw
162580f5451dSKonrad Dybcio },
162680f5451dSKonrad Dybcio .num_parents = 1,
162780f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
162880f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
162980f5451dSKonrad Dybcio },
163080f5451dSKonrad Dybcio },
163180f5451dSKonrad Dybcio };
163280f5451dSKonrad Dybcio
163380f5451dSKonrad Dybcio static struct clk_branch camcc_mclk3_clk = {
163480f5451dSKonrad Dybcio .halt_reg = 0x407c,
163580f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
163680f5451dSKonrad Dybcio .clkr = {
163780f5451dSKonrad Dybcio .enable_reg = 0x407c,
163880f5451dSKonrad Dybcio .enable_mask = BIT(0),
163980f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
164080f5451dSKonrad Dybcio .name = "camcc_mclk3_clk",
164180f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
164280f5451dSKonrad Dybcio &camcc_mclk3_clk_src.clkr.hw
164380f5451dSKonrad Dybcio },
164480f5451dSKonrad Dybcio .num_parents = 1,
164580f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
164680f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
164780f5451dSKonrad Dybcio },
164880f5451dSKonrad Dybcio },
164980f5451dSKonrad Dybcio };
165080f5451dSKonrad Dybcio
165180f5451dSKonrad Dybcio static struct clk_branch camcc_mclk4_clk = {
165280f5451dSKonrad Dybcio .halt_reg = 0x409c,
165380f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
165480f5451dSKonrad Dybcio .clkr = {
165580f5451dSKonrad Dybcio .enable_reg = 0x409c,
165680f5451dSKonrad Dybcio .enable_mask = BIT(0),
165780f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
165880f5451dSKonrad Dybcio .name = "camcc_mclk4_clk",
165980f5451dSKonrad Dybcio .parent_hws = (const struct clk_hw*[]){
166080f5451dSKonrad Dybcio &camcc_mclk4_clk_src.clkr.hw
166180f5451dSKonrad Dybcio },
166280f5451dSKonrad Dybcio .num_parents = 1,
166380f5451dSKonrad Dybcio .flags = CLK_SET_RATE_PARENT,
166480f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
166580f5451dSKonrad Dybcio },
166680f5451dSKonrad Dybcio },
166780f5451dSKonrad Dybcio };
166880f5451dSKonrad Dybcio
166980f5451dSKonrad Dybcio static struct clk_branch camcc_soc_ahb_clk = {
167080f5451dSKonrad Dybcio .halt_reg = 0x1400c,
167180f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
167280f5451dSKonrad Dybcio .clkr = {
167380f5451dSKonrad Dybcio .enable_reg = 0x1400c,
167480f5451dSKonrad Dybcio .enable_mask = BIT(0),
167580f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
167680f5451dSKonrad Dybcio .name = "camcc_soc_ahb_clk",
167780f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
167880f5451dSKonrad Dybcio },
167980f5451dSKonrad Dybcio },
168080f5451dSKonrad Dybcio };
168180f5451dSKonrad Dybcio
168280f5451dSKonrad Dybcio static struct clk_branch camcc_sys_tmr_clk = {
168380f5451dSKonrad Dybcio .halt_reg = 0xe034,
168480f5451dSKonrad Dybcio .halt_check = BRANCH_HALT,
168580f5451dSKonrad Dybcio .clkr = {
168680f5451dSKonrad Dybcio .enable_reg = 0xe034,
168780f5451dSKonrad Dybcio .enable_mask = BIT(0),
168880f5451dSKonrad Dybcio .hw.init = &(struct clk_init_data){
168980f5451dSKonrad Dybcio .name = "camcc_sys_tmr_clk",
169080f5451dSKonrad Dybcio .ops = &clk_branch2_ops,
169180f5451dSKonrad Dybcio },
169280f5451dSKonrad Dybcio },
169380f5451dSKonrad Dybcio };
169480f5451dSKonrad Dybcio
169580f5451dSKonrad Dybcio static struct gdsc bps_gdsc = {
169680f5451dSKonrad Dybcio .gdscr = 0x6004,
169780f5451dSKonrad Dybcio .pd = {
169880f5451dSKonrad Dybcio .name = "bps_gdsc",
169980f5451dSKonrad Dybcio },
170080f5451dSKonrad Dybcio .pwrsts = PWRSTS_OFF_ON,
170180f5451dSKonrad Dybcio .flags = VOTABLE,
170280f5451dSKonrad Dybcio };
170380f5451dSKonrad Dybcio
170480f5451dSKonrad Dybcio static struct gdsc ipe_0_gdsc = {
170580f5451dSKonrad Dybcio .gdscr = 0x7004,
170680f5451dSKonrad Dybcio .pd = {
170780f5451dSKonrad Dybcio .name = "ipe_0_gdsc",
170880f5451dSKonrad Dybcio },
170980f5451dSKonrad Dybcio .pwrsts = PWRSTS_OFF_ON,
171080f5451dSKonrad Dybcio .flags = VOTABLE,
171180f5451dSKonrad Dybcio };
171280f5451dSKonrad Dybcio
171380f5451dSKonrad Dybcio static struct gdsc ife_0_gdsc = {
171480f5451dSKonrad Dybcio .gdscr = 0x9004,
171580f5451dSKonrad Dybcio .pd = {
171680f5451dSKonrad Dybcio .name = "ife_0_gdsc",
171780f5451dSKonrad Dybcio },
171880f5451dSKonrad Dybcio .pwrsts = PWRSTS_OFF_ON,
171980f5451dSKonrad Dybcio };
172080f5451dSKonrad Dybcio
172180f5451dSKonrad Dybcio static struct gdsc ife_1_gdsc = {
172280f5451dSKonrad Dybcio .gdscr = 0xa004,
172380f5451dSKonrad Dybcio .pd = {
172480f5451dSKonrad Dybcio .name = "ife_1_gdsc",
172580f5451dSKonrad Dybcio },
172680f5451dSKonrad Dybcio .pwrsts = PWRSTS_OFF_ON,
172780f5451dSKonrad Dybcio };
172880f5451dSKonrad Dybcio
172980f5451dSKonrad Dybcio static struct gdsc ife_2_gdsc = {
173080f5451dSKonrad Dybcio .gdscr = 0xb004,
173180f5451dSKonrad Dybcio .pd = {
173280f5451dSKonrad Dybcio .name = "ife_2_gdsc",
173380f5451dSKonrad Dybcio },
173480f5451dSKonrad Dybcio .pwrsts = PWRSTS_OFF_ON,
173580f5451dSKonrad Dybcio };
173680f5451dSKonrad Dybcio
173780f5451dSKonrad Dybcio static struct gdsc titan_top_gdsc = {
173880f5451dSKonrad Dybcio .gdscr = 0x14004,
173980f5451dSKonrad Dybcio .pd = {
174080f5451dSKonrad Dybcio .name = "titan_top_gdsc",
174180f5451dSKonrad Dybcio },
174280f5451dSKonrad Dybcio .pwrsts = PWRSTS_OFF_ON,
174380f5451dSKonrad Dybcio };
174480f5451dSKonrad Dybcio
1745*bfc74869SKonrad Dybcio static struct clk_hw *camcc_sm6350_hws[] = {
174680f5451dSKonrad Dybcio [CAMCC_PLL2_OUT_EARLY] = &camcc_pll2_out_early.hw,
174780f5451dSKonrad Dybcio };
174880f5451dSKonrad Dybcio
174980f5451dSKonrad Dybcio static struct clk_regmap *camcc_sm6350_clocks[] = {
175080f5451dSKonrad Dybcio [CAMCC_BPS_AHB_CLK] = &camcc_bps_ahb_clk.clkr,
175180f5451dSKonrad Dybcio [CAMCC_BPS_AREG_CLK] = &camcc_bps_areg_clk.clkr,
175280f5451dSKonrad Dybcio [CAMCC_BPS_AXI_CLK] = &camcc_bps_axi_clk.clkr,
175380f5451dSKonrad Dybcio [CAMCC_BPS_CLK] = &camcc_bps_clk.clkr,
175480f5451dSKonrad Dybcio [CAMCC_BPS_CLK_SRC] = &camcc_bps_clk_src.clkr,
175580f5451dSKonrad Dybcio [CAMCC_CAMNOC_AXI_CLK] = &camcc_camnoc_axi_clk.clkr,
175680f5451dSKonrad Dybcio [CAMCC_CCI_0_CLK] = &camcc_cci_0_clk.clkr,
175780f5451dSKonrad Dybcio [CAMCC_CCI_0_CLK_SRC] = &camcc_cci_0_clk_src.clkr,
175880f5451dSKonrad Dybcio [CAMCC_CCI_1_CLK] = &camcc_cci_1_clk.clkr,
175980f5451dSKonrad Dybcio [CAMCC_CCI_1_CLK_SRC] = &camcc_cci_1_clk_src.clkr,
176080f5451dSKonrad Dybcio [CAMCC_CORE_AHB_CLK] = &camcc_core_ahb_clk.clkr,
176180f5451dSKonrad Dybcio [CAMCC_CPAS_AHB_CLK] = &camcc_cpas_ahb_clk.clkr,
176280f5451dSKonrad Dybcio [CAMCC_CPHY_RX_CLK_SRC] = &camcc_cphy_rx_clk_src.clkr,
176380f5451dSKonrad Dybcio [CAMCC_CSI0PHYTIMER_CLK] = &camcc_csi0phytimer_clk.clkr,
176480f5451dSKonrad Dybcio [CAMCC_CSI0PHYTIMER_CLK_SRC] = &camcc_csi0phytimer_clk_src.clkr,
176580f5451dSKonrad Dybcio [CAMCC_CSI1PHYTIMER_CLK] = &camcc_csi1phytimer_clk.clkr,
176680f5451dSKonrad Dybcio [CAMCC_CSI1PHYTIMER_CLK_SRC] = &camcc_csi1phytimer_clk_src.clkr,
176780f5451dSKonrad Dybcio [CAMCC_CSI2PHYTIMER_CLK] = &camcc_csi2phytimer_clk.clkr,
176880f5451dSKonrad Dybcio [CAMCC_CSI2PHYTIMER_CLK_SRC] = &camcc_csi2phytimer_clk_src.clkr,
176980f5451dSKonrad Dybcio [CAMCC_CSI3PHYTIMER_CLK] = &camcc_csi3phytimer_clk.clkr,
177080f5451dSKonrad Dybcio [CAMCC_CSI3PHYTIMER_CLK_SRC] = &camcc_csi3phytimer_clk_src.clkr,
177180f5451dSKonrad Dybcio [CAMCC_CSIPHY0_CLK] = &camcc_csiphy0_clk.clkr,
177280f5451dSKonrad Dybcio [CAMCC_CSIPHY1_CLK] = &camcc_csiphy1_clk.clkr,
177380f5451dSKonrad Dybcio [CAMCC_CSIPHY2_CLK] = &camcc_csiphy2_clk.clkr,
177480f5451dSKonrad Dybcio [CAMCC_CSIPHY3_CLK] = &camcc_csiphy3_clk.clkr,
177580f5451dSKonrad Dybcio [CAMCC_FAST_AHB_CLK_SRC] = &camcc_fast_ahb_clk_src.clkr,
177680f5451dSKonrad Dybcio [CAMCC_ICP_CLK] = &camcc_icp_clk.clkr,
177780f5451dSKonrad Dybcio [CAMCC_ICP_CLK_SRC] = &camcc_icp_clk_src.clkr,
177880f5451dSKonrad Dybcio [CAMCC_ICP_TS_CLK] = &camcc_icp_ts_clk.clkr,
177980f5451dSKonrad Dybcio [CAMCC_IFE_0_AXI_CLK] = &camcc_ife_0_axi_clk.clkr,
178080f5451dSKonrad Dybcio [CAMCC_IFE_0_CLK] = &camcc_ife_0_clk.clkr,
178180f5451dSKonrad Dybcio [CAMCC_IFE_0_CLK_SRC] = &camcc_ife_0_clk_src.clkr,
178280f5451dSKonrad Dybcio [CAMCC_IFE_0_CPHY_RX_CLK] = &camcc_ife_0_cphy_rx_clk.clkr,
178380f5451dSKonrad Dybcio [CAMCC_IFE_0_CSID_CLK] = &camcc_ife_0_csid_clk.clkr,
178480f5451dSKonrad Dybcio [CAMCC_IFE_0_CSID_CLK_SRC] = &camcc_ife_0_csid_clk_src.clkr,
178580f5451dSKonrad Dybcio [CAMCC_IFE_0_DSP_CLK] = &camcc_ife_0_dsp_clk.clkr,
178680f5451dSKonrad Dybcio [CAMCC_IFE_1_AXI_CLK] = &camcc_ife_1_axi_clk.clkr,
178780f5451dSKonrad Dybcio [CAMCC_IFE_1_CLK] = &camcc_ife_1_clk.clkr,
178880f5451dSKonrad Dybcio [CAMCC_IFE_1_CLK_SRC] = &camcc_ife_1_clk_src.clkr,
178980f5451dSKonrad Dybcio [CAMCC_IFE_1_CPHY_RX_CLK] = &camcc_ife_1_cphy_rx_clk.clkr,
179080f5451dSKonrad Dybcio [CAMCC_IFE_1_CSID_CLK] = &camcc_ife_1_csid_clk.clkr,
179180f5451dSKonrad Dybcio [CAMCC_IFE_1_CSID_CLK_SRC] = &camcc_ife_1_csid_clk_src.clkr,
179280f5451dSKonrad Dybcio [CAMCC_IFE_1_DSP_CLK] = &camcc_ife_1_dsp_clk.clkr,
179380f5451dSKonrad Dybcio [CAMCC_IFE_2_AXI_CLK] = &camcc_ife_2_axi_clk.clkr,
179480f5451dSKonrad Dybcio [CAMCC_IFE_2_CLK] = &camcc_ife_2_clk.clkr,
179580f5451dSKonrad Dybcio [CAMCC_IFE_2_CLK_SRC] = &camcc_ife_2_clk_src.clkr,
179680f5451dSKonrad Dybcio [CAMCC_IFE_2_CPHY_RX_CLK] = &camcc_ife_2_cphy_rx_clk.clkr,
179780f5451dSKonrad Dybcio [CAMCC_IFE_2_CSID_CLK] = &camcc_ife_2_csid_clk.clkr,
179880f5451dSKonrad Dybcio [CAMCC_IFE_2_CSID_CLK_SRC] = &camcc_ife_2_csid_clk_src.clkr,
179980f5451dSKonrad Dybcio [CAMCC_IFE_2_DSP_CLK] = &camcc_ife_2_dsp_clk.clkr,
180080f5451dSKonrad Dybcio [CAMCC_IFE_LITE_CLK] = &camcc_ife_lite_clk.clkr,
180180f5451dSKonrad Dybcio [CAMCC_IFE_LITE_CLK_SRC] = &camcc_ife_lite_clk_src.clkr,
180280f5451dSKonrad Dybcio [CAMCC_IFE_LITE_CPHY_RX_CLK] = &camcc_ife_lite_cphy_rx_clk.clkr,
180380f5451dSKonrad Dybcio [CAMCC_IFE_LITE_CSID_CLK] = &camcc_ife_lite_csid_clk.clkr,
180480f5451dSKonrad Dybcio [CAMCC_IFE_LITE_CSID_CLK_SRC] = &camcc_ife_lite_csid_clk_src.clkr,
180580f5451dSKonrad Dybcio [CAMCC_IPE_0_AHB_CLK] = &camcc_ipe_0_ahb_clk.clkr,
180680f5451dSKonrad Dybcio [CAMCC_IPE_0_AREG_CLK] = &camcc_ipe_0_areg_clk.clkr,
180780f5451dSKonrad Dybcio [CAMCC_IPE_0_AXI_CLK] = &camcc_ipe_0_axi_clk.clkr,
180880f5451dSKonrad Dybcio [CAMCC_IPE_0_CLK] = &camcc_ipe_0_clk.clkr,
180980f5451dSKonrad Dybcio [CAMCC_IPE_0_CLK_SRC] = &camcc_ipe_0_clk_src.clkr,
181080f5451dSKonrad Dybcio [CAMCC_JPEG_CLK] = &camcc_jpeg_clk.clkr,
181180f5451dSKonrad Dybcio [CAMCC_JPEG_CLK_SRC] = &camcc_jpeg_clk_src.clkr,
181280f5451dSKonrad Dybcio [CAMCC_LRME_CLK] = &camcc_lrme_clk.clkr,
181380f5451dSKonrad Dybcio [CAMCC_LRME_CLK_SRC] = &camcc_lrme_clk_src.clkr,
181480f5451dSKonrad Dybcio [CAMCC_MCLK0_CLK] = &camcc_mclk0_clk.clkr,
181580f5451dSKonrad Dybcio [CAMCC_MCLK0_CLK_SRC] = &camcc_mclk0_clk_src.clkr,
181680f5451dSKonrad Dybcio [CAMCC_MCLK1_CLK] = &camcc_mclk1_clk.clkr,
181780f5451dSKonrad Dybcio [CAMCC_MCLK1_CLK_SRC] = &camcc_mclk1_clk_src.clkr,
181880f5451dSKonrad Dybcio [CAMCC_MCLK2_CLK] = &camcc_mclk2_clk.clkr,
181980f5451dSKonrad Dybcio [CAMCC_MCLK2_CLK_SRC] = &camcc_mclk2_clk_src.clkr,
182080f5451dSKonrad Dybcio [CAMCC_MCLK3_CLK] = &camcc_mclk3_clk.clkr,
182180f5451dSKonrad Dybcio [CAMCC_MCLK3_CLK_SRC] = &camcc_mclk3_clk_src.clkr,
182280f5451dSKonrad Dybcio [CAMCC_MCLK4_CLK] = &camcc_mclk4_clk.clkr,
182380f5451dSKonrad Dybcio [CAMCC_MCLK4_CLK_SRC] = &camcc_mclk4_clk_src.clkr,
182480f5451dSKonrad Dybcio [CAMCC_PLL0] = &camcc_pll0.clkr,
182580f5451dSKonrad Dybcio [CAMCC_PLL0_OUT_EVEN] = &camcc_pll0_out_even.clkr,
182680f5451dSKonrad Dybcio [CAMCC_PLL1] = &camcc_pll1.clkr,
182780f5451dSKonrad Dybcio [CAMCC_PLL1_OUT_EVEN] = &camcc_pll1_out_even.clkr,
182880f5451dSKonrad Dybcio [CAMCC_PLL2] = &camcc_pll2.clkr,
182980f5451dSKonrad Dybcio [CAMCC_PLL2_OUT_MAIN] = &camcc_pll2_out_main.clkr,
183080f5451dSKonrad Dybcio [CAMCC_PLL3] = &camcc_pll3.clkr,
183180f5451dSKonrad Dybcio [CAMCC_SLOW_AHB_CLK_SRC] = &camcc_slow_ahb_clk_src.clkr,
183280f5451dSKonrad Dybcio [CAMCC_SOC_AHB_CLK] = &camcc_soc_ahb_clk.clkr,
183380f5451dSKonrad Dybcio [CAMCC_SYS_TMR_CLK] = &camcc_sys_tmr_clk.clkr,
183480f5451dSKonrad Dybcio };
183580f5451dSKonrad Dybcio
183680f5451dSKonrad Dybcio static struct gdsc *camcc_sm6350_gdscs[] = {
183780f5451dSKonrad Dybcio [BPS_GDSC] = &bps_gdsc,
183880f5451dSKonrad Dybcio [IPE_0_GDSC] = &ipe_0_gdsc,
183980f5451dSKonrad Dybcio [IFE_0_GDSC] = &ife_0_gdsc,
184080f5451dSKonrad Dybcio [IFE_1_GDSC] = &ife_1_gdsc,
184180f5451dSKonrad Dybcio [IFE_2_GDSC] = &ife_2_gdsc,
184280f5451dSKonrad Dybcio [TITAN_TOP_GDSC] = &titan_top_gdsc,
184380f5451dSKonrad Dybcio };
184480f5451dSKonrad Dybcio
184580f5451dSKonrad Dybcio static const struct regmap_config camcc_sm6350_regmap_config = {
184680f5451dSKonrad Dybcio .reg_bits = 32,
184780f5451dSKonrad Dybcio .reg_stride = 4,
184880f5451dSKonrad Dybcio .val_bits = 32,
184980f5451dSKonrad Dybcio .max_register = 0x16000,
185080f5451dSKonrad Dybcio .fast_io = true,
185180f5451dSKonrad Dybcio };
185280f5451dSKonrad Dybcio
185380f5451dSKonrad Dybcio static const struct qcom_cc_desc camcc_sm6350_desc = {
185480f5451dSKonrad Dybcio .config = &camcc_sm6350_regmap_config,
185580f5451dSKonrad Dybcio .clk_hws = camcc_sm6350_hws,
185680f5451dSKonrad Dybcio .num_clk_hws = ARRAY_SIZE(camcc_sm6350_hws),
185780f5451dSKonrad Dybcio .clks = camcc_sm6350_clocks,
185880f5451dSKonrad Dybcio .num_clks = ARRAY_SIZE(camcc_sm6350_clocks),
185980f5451dSKonrad Dybcio .gdscs = camcc_sm6350_gdscs,
186080f5451dSKonrad Dybcio .num_gdscs = ARRAY_SIZE(camcc_sm6350_gdscs),
186180f5451dSKonrad Dybcio };
186280f5451dSKonrad Dybcio
186380f5451dSKonrad Dybcio static const struct of_device_id camcc_sm6350_match_table[] = {
186480f5451dSKonrad Dybcio { .compatible = "qcom,sm6350-camcc" },
186580f5451dSKonrad Dybcio { }
186680f5451dSKonrad Dybcio };
186780f5451dSKonrad Dybcio MODULE_DEVICE_TABLE(of, camcc_sm6350_match_table);
186880f5451dSKonrad Dybcio
camcc_sm6350_probe(struct platform_device * pdev)186980f5451dSKonrad Dybcio static int camcc_sm6350_probe(struct platform_device *pdev)
187080f5451dSKonrad Dybcio {
187180f5451dSKonrad Dybcio struct regmap *regmap;
187280f5451dSKonrad Dybcio
187380f5451dSKonrad Dybcio regmap = qcom_cc_map(pdev, &camcc_sm6350_desc);
187480f5451dSKonrad Dybcio if (IS_ERR(regmap))
187580f5451dSKonrad Dybcio return PTR_ERR(regmap);
187680f5451dSKonrad Dybcio
187780f5451dSKonrad Dybcio clk_fabia_pll_configure(&camcc_pll0, regmap, &camcc_pll0_config);
187880f5451dSKonrad Dybcio clk_fabia_pll_configure(&camcc_pll1, regmap, &camcc_pll1_config);
187980f5451dSKonrad Dybcio clk_agera_pll_configure(&camcc_pll2, regmap, &camcc_pll2_config);
188080f5451dSKonrad Dybcio clk_fabia_pll_configure(&camcc_pll3, regmap, &camcc_pll3_config);
188180f5451dSKonrad Dybcio
188280f5451dSKonrad Dybcio return qcom_cc_really_probe(pdev, &camcc_sm6350_desc, regmap);
188380f5451dSKonrad Dybcio }
188480f5451dSKonrad Dybcio
188580f5451dSKonrad Dybcio static struct platform_driver camcc_sm6350_driver = {
188680f5451dSKonrad Dybcio .probe = camcc_sm6350_probe,
188780f5451dSKonrad Dybcio .driver = {
188880f5451dSKonrad Dybcio .name = "sm6350-camcc",
188980f5451dSKonrad Dybcio .of_match_table = camcc_sm6350_match_table,
189080f5451dSKonrad Dybcio },
189180f5451dSKonrad Dybcio };
189280f5451dSKonrad Dybcio
camcc_sm6350_init(void)189380f5451dSKonrad Dybcio static int __init camcc_sm6350_init(void)
189480f5451dSKonrad Dybcio {
189580f5451dSKonrad Dybcio return platform_driver_register(&camcc_sm6350_driver);
189680f5451dSKonrad Dybcio }
189780f5451dSKonrad Dybcio subsys_initcall(camcc_sm6350_init);
189880f5451dSKonrad Dybcio
camcc_sm6350_exit(void)189980f5451dSKonrad Dybcio static void __exit camcc_sm6350_exit(void)
190080f5451dSKonrad Dybcio {
190180f5451dSKonrad Dybcio platform_driver_unregister(&camcc_sm6350_driver);
190280f5451dSKonrad Dybcio }
190380f5451dSKonrad Dybcio module_exit(camcc_sm6350_exit);
190480f5451dSKonrad Dybcio
190580f5451dSKonrad Dybcio MODULE_DESCRIPTION("QTI CAMCC SM6350 Driver");
190680f5451dSKonrad Dybcio MODULE_LICENSE("GPL");
1907