xref: /linux/drivers/clk/qcom/mmcc-msm8998.c (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1d14b15b5SJeffrey Hugo // SPDX-License-Identifier: GPL-2.0
2d14b15b5SJeffrey Hugo /*
3d14b15b5SJeffrey Hugo  * Copyright (c) 2019, The Linux Foundation. All rights reserved.
4d14b15b5SJeffrey Hugo  */
5d14b15b5SJeffrey Hugo 
6d14b15b5SJeffrey Hugo #include <linux/kernel.h>
7d14b15b5SJeffrey Hugo #include <linux/bitops.h>
8d14b15b5SJeffrey Hugo #include <linux/err.h>
9d14b15b5SJeffrey Hugo #include <linux/platform_device.h>
10d14b15b5SJeffrey Hugo #include <linux/module.h>
11d14b15b5SJeffrey Hugo #include <linux/of.h>
12d14b15b5SJeffrey Hugo #include <linux/clk-provider.h>
13d14b15b5SJeffrey Hugo #include <linux/regmap.h>
14d14b15b5SJeffrey Hugo #include <linux/reset-controller.h>
15d14b15b5SJeffrey Hugo 
16d14b15b5SJeffrey Hugo #include <dt-bindings/clock/qcom,mmcc-msm8998.h>
17d14b15b5SJeffrey Hugo 
18d14b15b5SJeffrey Hugo #include "common.h"
19d14b15b5SJeffrey Hugo #include "clk-regmap.h"
20d14b15b5SJeffrey Hugo #include "clk-regmap-divider.h"
21d14b15b5SJeffrey Hugo #include "clk-alpha-pll.h"
22d14b15b5SJeffrey Hugo #include "clk-rcg.h"
23d14b15b5SJeffrey Hugo #include "clk-branch.h"
24d14b15b5SJeffrey Hugo #include "reset.h"
25d14b15b5SJeffrey Hugo #include "gdsc.h"
26d14b15b5SJeffrey Hugo 
27d14b15b5SJeffrey Hugo enum {
28d14b15b5SJeffrey Hugo 	P_XO,
29d14b15b5SJeffrey Hugo 	P_GPLL0,
30d14b15b5SJeffrey Hugo 	P_GPLL0_DIV,
31d14b15b5SJeffrey Hugo 	P_MMPLL0_OUT_EVEN,
32d14b15b5SJeffrey Hugo 	P_MMPLL1_OUT_EVEN,
33d14b15b5SJeffrey Hugo 	P_MMPLL3_OUT_EVEN,
34d14b15b5SJeffrey Hugo 	P_MMPLL4_OUT_EVEN,
35d14b15b5SJeffrey Hugo 	P_MMPLL5_OUT_EVEN,
36d14b15b5SJeffrey Hugo 	P_MMPLL6_OUT_EVEN,
37d14b15b5SJeffrey Hugo 	P_MMPLL7_OUT_EVEN,
38d14b15b5SJeffrey Hugo 	P_MMPLL10_OUT_EVEN,
39d14b15b5SJeffrey Hugo 	P_DSI0PLL,
40d14b15b5SJeffrey Hugo 	P_DSI1PLL,
41d14b15b5SJeffrey Hugo 	P_DSI0PLL_BYTE,
42d14b15b5SJeffrey Hugo 	P_DSI1PLL_BYTE,
43d14b15b5SJeffrey Hugo 	P_HDMIPLL,
44d14b15b5SJeffrey Hugo 	P_DPVCO,
45d14b15b5SJeffrey Hugo 	P_DPLINK,
46d14b15b5SJeffrey Hugo };
47d14b15b5SJeffrey Hugo 
48d14b15b5SJeffrey Hugo static const struct clk_div_table post_div_table_fabia_even[] = {
49d14b15b5SJeffrey Hugo 	{ 0x0, 1 },
50d14b15b5SJeffrey Hugo 	{ 0x1, 2 },
51d14b15b5SJeffrey Hugo 	{ 0x3, 4 },
52d14b15b5SJeffrey Hugo 	{ 0x7, 8 },
53d14b15b5SJeffrey Hugo 	{ }
54d14b15b5SJeffrey Hugo };
55d14b15b5SJeffrey Hugo 
56d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll0 = {
57d14b15b5SJeffrey Hugo 	.offset = 0xc000,
58d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
59d14b15b5SJeffrey Hugo 	.clkr = {
60d14b15b5SJeffrey Hugo 		.enable_reg = 0x1e0,
61d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
62d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
63d14b15b5SJeffrey Hugo 			.name = "mmpll0",
64d14b15b5SJeffrey Hugo 			.parent_data = &(const struct clk_parent_data){
656d26bb22SMarijn Suijten 				.fw_name = "xo"
66d14b15b5SJeffrey Hugo 			},
67d14b15b5SJeffrey Hugo 			.num_parents = 1,
68d14b15b5SJeffrey Hugo 			.ops = &clk_alpha_pll_fixed_fabia_ops,
69d14b15b5SJeffrey Hugo 		},
70d14b15b5SJeffrey Hugo 	},
71d14b15b5SJeffrey Hugo };
72d14b15b5SJeffrey Hugo 
73d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll0_out_even = {
74d14b15b5SJeffrey Hugo 	.offset = 0xc000,
75d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
76d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
77d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
78d14b15b5SJeffrey Hugo 	.width = 4,
79d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
80d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
81d14b15b5SJeffrey Hugo 		.name = "mmpll0_out_even",
82d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll0.clkr.hw },
83d14b15b5SJeffrey Hugo 		.num_parents = 1,
84d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
85d14b15b5SJeffrey Hugo 	},
86d14b15b5SJeffrey Hugo };
87d14b15b5SJeffrey Hugo 
88d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll1 = {
89d14b15b5SJeffrey Hugo 	.offset = 0xc050,
90d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
91d14b15b5SJeffrey Hugo 	.clkr = {
92d14b15b5SJeffrey Hugo 		.enable_reg = 0x1e0,
93d14b15b5SJeffrey Hugo 		.enable_mask = BIT(1),
94d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
95d14b15b5SJeffrey Hugo 			.name = "mmpll1",
96d14b15b5SJeffrey Hugo 			.parent_data = &(const struct clk_parent_data){
976d26bb22SMarijn Suijten 				.fw_name = "xo"
98d14b15b5SJeffrey Hugo 			},
99d14b15b5SJeffrey Hugo 			.num_parents = 1,
100d14b15b5SJeffrey Hugo 			.ops = &clk_alpha_pll_fixed_fabia_ops,
101d14b15b5SJeffrey Hugo 		},
102d14b15b5SJeffrey Hugo 	},
103d14b15b5SJeffrey Hugo };
104d14b15b5SJeffrey Hugo 
105d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll1_out_even = {
106d14b15b5SJeffrey Hugo 	.offset = 0xc050,
107d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
108d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
109d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
110d14b15b5SJeffrey Hugo 	.width = 4,
111d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
112d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
113d14b15b5SJeffrey Hugo 		.name = "mmpll1_out_even",
114d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll1.clkr.hw },
115d14b15b5SJeffrey Hugo 		.num_parents = 1,
116d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
117d14b15b5SJeffrey Hugo 	},
118d14b15b5SJeffrey Hugo };
119d14b15b5SJeffrey Hugo 
120d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll3 = {
121d14b15b5SJeffrey Hugo 	.offset = 0x0,
122d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
123d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
124d14b15b5SJeffrey Hugo 		.name = "mmpll3",
125d14b15b5SJeffrey Hugo 		.parent_data = &(const struct clk_parent_data){
1266d26bb22SMarijn Suijten 			.fw_name = "xo"
127d14b15b5SJeffrey Hugo 		},
128d14b15b5SJeffrey Hugo 		.num_parents = 1,
129d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_fixed_fabia_ops,
130d14b15b5SJeffrey Hugo 	},
131d14b15b5SJeffrey Hugo };
132d14b15b5SJeffrey Hugo 
133d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll3_out_even = {
134d14b15b5SJeffrey Hugo 	.offset = 0x0,
135d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
136d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
137d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
138d14b15b5SJeffrey Hugo 	.width = 4,
139d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
140d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
141d14b15b5SJeffrey Hugo 		.name = "mmpll3_out_even",
142d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll3.clkr.hw },
143d14b15b5SJeffrey Hugo 		.num_parents = 1,
144d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
145d14b15b5SJeffrey Hugo 	},
146d14b15b5SJeffrey Hugo };
147d14b15b5SJeffrey Hugo 
148d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll4 = {
149d14b15b5SJeffrey Hugo 	.offset = 0x50,
150d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
151d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
152d14b15b5SJeffrey Hugo 		.name = "mmpll4",
153d14b15b5SJeffrey Hugo 		.parent_data = &(const struct clk_parent_data){
1546d26bb22SMarijn Suijten 			.fw_name = "xo"
155d14b15b5SJeffrey Hugo 		},
156d14b15b5SJeffrey Hugo 		.num_parents = 1,
157d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_fixed_fabia_ops,
158d14b15b5SJeffrey Hugo 	},
159d14b15b5SJeffrey Hugo };
160d14b15b5SJeffrey Hugo 
161d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll4_out_even = {
162d14b15b5SJeffrey Hugo 	.offset = 0x50,
163d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
164d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
165d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
166d14b15b5SJeffrey Hugo 	.width = 4,
167d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
168d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
169d14b15b5SJeffrey Hugo 		.name = "mmpll4_out_even",
170d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll4.clkr.hw },
171d14b15b5SJeffrey Hugo 		.num_parents = 1,
172d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
173d14b15b5SJeffrey Hugo 	},
174d14b15b5SJeffrey Hugo };
175d14b15b5SJeffrey Hugo 
176d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll5 = {
177d14b15b5SJeffrey Hugo 	.offset = 0xa0,
178d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
179d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
180d14b15b5SJeffrey Hugo 		.name = "mmpll5",
181d14b15b5SJeffrey Hugo 		.parent_data = &(const struct clk_parent_data){
1826d26bb22SMarijn Suijten 			.fw_name = "xo"
183d14b15b5SJeffrey Hugo 		},
184d14b15b5SJeffrey Hugo 		.num_parents = 1,
185d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_fixed_fabia_ops,
186d14b15b5SJeffrey Hugo 	},
187d14b15b5SJeffrey Hugo };
188d14b15b5SJeffrey Hugo 
189d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll5_out_even = {
190d14b15b5SJeffrey Hugo 	.offset = 0xa0,
191d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
192d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
193d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
194d14b15b5SJeffrey Hugo 	.width = 4,
195d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
196d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
197d14b15b5SJeffrey Hugo 		.name = "mmpll5_out_even",
198d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll5.clkr.hw },
199d14b15b5SJeffrey Hugo 		.num_parents = 1,
200d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
201d14b15b5SJeffrey Hugo 	},
202d14b15b5SJeffrey Hugo };
203d14b15b5SJeffrey Hugo 
204d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll6 = {
205d14b15b5SJeffrey Hugo 	.offset = 0xf0,
206d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
207d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
208d14b15b5SJeffrey Hugo 		.name = "mmpll6",
209d14b15b5SJeffrey Hugo 		.parent_data = &(const struct clk_parent_data){
2106d26bb22SMarijn Suijten 			.fw_name = "xo"
211d14b15b5SJeffrey Hugo 		},
212d14b15b5SJeffrey Hugo 		.num_parents = 1,
213d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_fixed_fabia_ops,
214d14b15b5SJeffrey Hugo 	},
215d14b15b5SJeffrey Hugo };
216d14b15b5SJeffrey Hugo 
217d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll6_out_even = {
218d14b15b5SJeffrey Hugo 	.offset = 0xf0,
219d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
220d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
221d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
222d14b15b5SJeffrey Hugo 	.width = 4,
223d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
224d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
225d14b15b5SJeffrey Hugo 		.name = "mmpll6_out_even",
226d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll6.clkr.hw },
227d14b15b5SJeffrey Hugo 		.num_parents = 1,
228d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
229d14b15b5SJeffrey Hugo 	},
230d14b15b5SJeffrey Hugo };
231d14b15b5SJeffrey Hugo 
232d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll7 = {
233d14b15b5SJeffrey Hugo 	.offset = 0x140,
234d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
235d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
236d14b15b5SJeffrey Hugo 		.name = "mmpll7",
237d14b15b5SJeffrey Hugo 		.parent_data = &(const struct clk_parent_data){
2386d26bb22SMarijn Suijten 			.fw_name = "xo"
239d14b15b5SJeffrey Hugo 		},
240d14b15b5SJeffrey Hugo 		.num_parents = 1,
241d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_fixed_fabia_ops,
242d14b15b5SJeffrey Hugo 	},
243d14b15b5SJeffrey Hugo };
244d14b15b5SJeffrey Hugo 
245d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll7_out_even = {
246d14b15b5SJeffrey Hugo 	.offset = 0x140,
247d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
248d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
249d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
250d14b15b5SJeffrey Hugo 	.width = 4,
251d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
252d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
253d14b15b5SJeffrey Hugo 		.name = "mmpll7_out_even",
254d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll7.clkr.hw },
255d14b15b5SJeffrey Hugo 		.num_parents = 1,
256d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
257d14b15b5SJeffrey Hugo 	},
258d14b15b5SJeffrey Hugo };
259d14b15b5SJeffrey Hugo 
260d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll10 = {
261d14b15b5SJeffrey Hugo 	.offset = 0x190,
262d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
263d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
264d14b15b5SJeffrey Hugo 		.name = "mmpll10",
265d14b15b5SJeffrey Hugo 		.parent_data = &(const struct clk_parent_data){
2666d26bb22SMarijn Suijten 			.fw_name = "xo"
267d14b15b5SJeffrey Hugo 		},
268d14b15b5SJeffrey Hugo 		.num_parents = 1,
269d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_fixed_fabia_ops,
270d14b15b5SJeffrey Hugo 	},
271d14b15b5SJeffrey Hugo };
272d14b15b5SJeffrey Hugo 
273d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll10_out_even = {
274d14b15b5SJeffrey Hugo 	.offset = 0x190,
275d14b15b5SJeffrey Hugo 	.post_div_shift = 8,
276d14b15b5SJeffrey Hugo 	.post_div_table = post_div_table_fabia_even,
277d14b15b5SJeffrey Hugo 	.num_post_div = ARRAY_SIZE(post_div_table_fabia_even),
278d14b15b5SJeffrey Hugo 	.width = 4,
279d14b15b5SJeffrey Hugo 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
280d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
281d14b15b5SJeffrey Hugo 		.name = "mmpll10_out_even",
282d14b15b5SJeffrey Hugo 		.parent_hws = (const struct clk_hw *[]){ &mmpll10.clkr.hw },
283d14b15b5SJeffrey Hugo 		.num_parents = 1,
284d14b15b5SJeffrey Hugo 		.ops = &clk_alpha_pll_postdiv_fabia_ops,
285d14b15b5SJeffrey Hugo 	},
286d14b15b5SJeffrey Hugo };
287d14b15b5SJeffrey Hugo 
288d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_hdmi_map[] = {
289d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
290d14b15b5SJeffrey Hugo 	{ P_HDMIPLL, 1 },
291d14b15b5SJeffrey Hugo };
292d14b15b5SJeffrey Hugo 
293d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_hdmi[] = {
2946d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
2956d26bb22SMarijn Suijten 	{ .fw_name = "hdmipll" },
296d14b15b5SJeffrey Hugo };
297d14b15b5SJeffrey Hugo 
298d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_dsi0pll_dsi1pll_map[] = {
299d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
300d14b15b5SJeffrey Hugo 	{ P_DSI0PLL, 1 },
301d14b15b5SJeffrey Hugo 	{ P_DSI1PLL, 2 },
302d14b15b5SJeffrey Hugo };
303d14b15b5SJeffrey Hugo 
304d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_dsi0pll_dsi1pll[] = {
3056d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
3066d26bb22SMarijn Suijten 	{ .fw_name = "dsi0dsi" },
3076d26bb22SMarijn Suijten 	{ .fw_name = "dsi1dsi" },
308d14b15b5SJeffrey Hugo };
309d14b15b5SJeffrey Hugo 
310d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_dsibyte_map[] = {
311d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
312d14b15b5SJeffrey Hugo 	{ P_DSI0PLL_BYTE, 1 },
313d14b15b5SJeffrey Hugo 	{ P_DSI1PLL_BYTE, 2 },
314d14b15b5SJeffrey Hugo };
315d14b15b5SJeffrey Hugo 
316d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_dsibyte[] = {
3176d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
3186d26bb22SMarijn Suijten 	{ .fw_name = "dsi0byte" },
3196d26bb22SMarijn Suijten 	{ .fw_name = "dsi1byte" },
320d14b15b5SJeffrey Hugo };
321d14b15b5SJeffrey Hugo 
322d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_dp_map[] = {
323d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
324d14b15b5SJeffrey Hugo 	{ P_DPLINK, 1 },
325d14b15b5SJeffrey Hugo 	{ P_DPVCO, 2 },
326d14b15b5SJeffrey Hugo };
327d14b15b5SJeffrey Hugo 
328d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_dp[] = {
3296d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
3306d26bb22SMarijn Suijten 	{ .fw_name = "dplink" },
3316d26bb22SMarijn Suijten 	{ .fw_name = "dpvco" },
332d14b15b5SJeffrey Hugo };
333d14b15b5SJeffrey Hugo 
334d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_gpll0_gpll0_div_map[] = {
335d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
336d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
337d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
338d14b15b5SJeffrey Hugo };
339d14b15b5SJeffrey Hugo 
340d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_gpll0_gpll0_div[] = {
3416d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
3426d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
343932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
344d14b15b5SJeffrey Hugo };
345d14b15b5SJeffrey Hugo 
346d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_gpll0_gpll0_div_map[] = {
347d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
348d14b15b5SJeffrey Hugo 	{ P_MMPLL0_OUT_EVEN, 1 },
349d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
350d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
351d14b15b5SJeffrey Hugo };
352d14b15b5SJeffrey Hugo 
353d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_gpll0_gpll0_div[] = {
3546d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
355d14b15b5SJeffrey Hugo 	{ .hw = &mmpll0_out_even.clkr.hw },
3566d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
357932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
358d14b15b5SJeffrey Hugo };
359d14b15b5SJeffrey Hugo 
360d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map[] = {
361d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
362d14b15b5SJeffrey Hugo 	{ P_MMPLL0_OUT_EVEN, 1 },
363d14b15b5SJeffrey Hugo 	{ P_MMPLL1_OUT_EVEN, 2 },
364d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
365d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
366d14b15b5SJeffrey Hugo };
367d14b15b5SJeffrey Hugo 
368d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div[] = {
3696d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
370d14b15b5SJeffrey Hugo 	{ .hw = &mmpll0_out_even.clkr.hw },
371d14b15b5SJeffrey Hugo 	{ .hw = &mmpll1_out_even.clkr.hw },
3726d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
373932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
374d14b15b5SJeffrey Hugo };
375d14b15b5SJeffrey Hugo 
376d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map[] = {
377d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
378d14b15b5SJeffrey Hugo 	{ P_MMPLL0_OUT_EVEN, 1 },
379d14b15b5SJeffrey Hugo 	{ P_MMPLL5_OUT_EVEN, 2 },
380d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
381d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
382d14b15b5SJeffrey Hugo };
383d14b15b5SJeffrey Hugo 
384d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div[] = {
3856d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
386d14b15b5SJeffrey Hugo 	{ .hw = &mmpll0_out_even.clkr.hw },
387d14b15b5SJeffrey Hugo 	{ .hw = &mmpll5_out_even.clkr.hw },
3886d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
389932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
390d14b15b5SJeffrey Hugo };
391d14b15b5SJeffrey Hugo 
392d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map[] = {
393d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
394d14b15b5SJeffrey Hugo 	{ P_MMPLL0_OUT_EVEN, 1 },
395d14b15b5SJeffrey Hugo 	{ P_MMPLL3_OUT_EVEN, 3 },
396d14b15b5SJeffrey Hugo 	{ P_MMPLL6_OUT_EVEN, 4 },
397d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
398d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
399d14b15b5SJeffrey Hugo };
400d14b15b5SJeffrey Hugo 
401d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div[] = {
4026d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
403d14b15b5SJeffrey Hugo 	{ .hw = &mmpll0_out_even.clkr.hw },
404d14b15b5SJeffrey Hugo 	{ .hw = &mmpll3_out_even.clkr.hw },
405d14b15b5SJeffrey Hugo 	{ .hw = &mmpll6_out_even.clkr.hw },
4066d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
407932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
408d14b15b5SJeffrey Hugo };
409d14b15b5SJeffrey Hugo 
410d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = {
411d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
412d14b15b5SJeffrey Hugo 	{ P_MMPLL4_OUT_EVEN, 1 },
413d14b15b5SJeffrey Hugo 	{ P_MMPLL7_OUT_EVEN, 2 },
414d14b15b5SJeffrey Hugo 	{ P_MMPLL10_OUT_EVEN, 3 },
415d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
416d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
417d14b15b5SJeffrey Hugo };
418d14b15b5SJeffrey Hugo 
419d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div[] = {
4206d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
421d14b15b5SJeffrey Hugo 	{ .hw = &mmpll4_out_even.clkr.hw },
422d14b15b5SJeffrey Hugo 	{ .hw = &mmpll7_out_even.clkr.hw },
423d14b15b5SJeffrey Hugo 	{ .hw = &mmpll10_out_even.clkr.hw },
4246d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
425932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
426d14b15b5SJeffrey Hugo };
427d14b15b5SJeffrey Hugo 
428d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map[] = {
429d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
430d14b15b5SJeffrey Hugo 	{ P_MMPLL0_OUT_EVEN, 1 },
431d14b15b5SJeffrey Hugo 	{ P_MMPLL7_OUT_EVEN, 2 },
432d14b15b5SJeffrey Hugo 	{ P_MMPLL10_OUT_EVEN, 3 },
433d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
434d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
435d14b15b5SJeffrey Hugo };
436d14b15b5SJeffrey Hugo 
437d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div[] = {
4386d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
439d14b15b5SJeffrey Hugo 	{ .hw = &mmpll0_out_even.clkr.hw },
440d14b15b5SJeffrey Hugo 	{ .hw = &mmpll7_out_even.clkr.hw },
441d14b15b5SJeffrey Hugo 	{ .hw = &mmpll10_out_even.clkr.hw },
4426d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
443932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
444d14b15b5SJeffrey Hugo };
445d14b15b5SJeffrey Hugo 
446d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = {
447d14b15b5SJeffrey Hugo 	{ P_XO, 0 },
448d14b15b5SJeffrey Hugo 	{ P_MMPLL0_OUT_EVEN, 1 },
449d14b15b5SJeffrey Hugo 	{ P_MMPLL4_OUT_EVEN, 2 },
450d14b15b5SJeffrey Hugo 	{ P_MMPLL7_OUT_EVEN, 3 },
451d14b15b5SJeffrey Hugo 	{ P_MMPLL10_OUT_EVEN, 4 },
452d14b15b5SJeffrey Hugo 	{ P_GPLL0, 5 },
453d14b15b5SJeffrey Hugo 	{ P_GPLL0_DIV, 6 },
454d14b15b5SJeffrey Hugo };
455d14b15b5SJeffrey Hugo 
456d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div[] = {
4576d26bb22SMarijn Suijten 	{ .fw_name = "xo" },
458d14b15b5SJeffrey Hugo 	{ .hw = &mmpll0_out_even.clkr.hw },
459d14b15b5SJeffrey Hugo 	{ .hw = &mmpll4_out_even.clkr.hw },
460d14b15b5SJeffrey Hugo 	{ .hw = &mmpll7_out_even.clkr.hw },
461d14b15b5SJeffrey Hugo 	{ .hw = &mmpll10_out_even.clkr.hw },
4626d26bb22SMarijn Suijten 	{ .fw_name = "gpll0" },
463932d8c56SKonrad Dybcio 	{ .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" },
464d14b15b5SJeffrey Hugo };
465d14b15b5SJeffrey Hugo 
466d14b15b5SJeffrey Hugo static struct clk_rcg2 byte0_clk_src = {
467d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2120,
468d14b15b5SJeffrey Hugo 	.hid_width = 5,
469d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dsibyte_map,
470d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
471d14b15b5SJeffrey Hugo 		.name = "byte0_clk_src",
472d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dsibyte,
4739ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dsibyte),
474d14b15b5SJeffrey Hugo 		.ops = &clk_byte2_ops,
475d14b15b5SJeffrey Hugo 		.flags = CLK_SET_RATE_PARENT,
476d14b15b5SJeffrey Hugo 	},
477d14b15b5SJeffrey Hugo };
478d14b15b5SJeffrey Hugo 
479d14b15b5SJeffrey Hugo static struct clk_rcg2 byte1_clk_src = {
480d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2140,
481d14b15b5SJeffrey Hugo 	.hid_width = 5,
482d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dsibyte_map,
483d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
484d14b15b5SJeffrey Hugo 		.name = "byte1_clk_src",
485d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dsibyte,
4869ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dsibyte),
487d14b15b5SJeffrey Hugo 		.ops = &clk_byte2_ops,
488d14b15b5SJeffrey Hugo 		.flags = CLK_SET_RATE_PARENT,
489d14b15b5SJeffrey Hugo 	},
490d14b15b5SJeffrey Hugo };
491d14b15b5SJeffrey Hugo 
492d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_cci_clk_src[] = {
493d14b15b5SJeffrey Hugo 	F(37500000, P_GPLL0, 16, 0, 0),
494d14b15b5SJeffrey Hugo 	F(50000000, P_GPLL0, 12, 0, 0),
495d14b15b5SJeffrey Hugo 	F(100000000, P_GPLL0, 6, 0, 0),
496d14b15b5SJeffrey Hugo 	{ }
497d14b15b5SJeffrey Hugo };
498d14b15b5SJeffrey Hugo 
499d14b15b5SJeffrey Hugo static struct clk_rcg2 cci_clk_src = {
500d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3300,
501d14b15b5SJeffrey Hugo 	.hid_width = 5,
502d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map,
503d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_cci_clk_src,
504d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
505d14b15b5SJeffrey Hugo 		.name = "cci_clk_src",
506d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div,
5079ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div),
508d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
509d14b15b5SJeffrey Hugo 	},
510d14b15b5SJeffrey Hugo };
511d14b15b5SJeffrey Hugo 
512d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_cpp_clk_src[] = {
513d14b15b5SJeffrey Hugo 	F(100000000, P_GPLL0, 6, 0, 0),
514d14b15b5SJeffrey Hugo 	F(200000000, P_GPLL0, 3, 0, 0),
515d14b15b5SJeffrey Hugo 	F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0),
516d14b15b5SJeffrey Hugo 	F(404000000, P_MMPLL0_OUT_EVEN, 2, 0, 0),
517d14b15b5SJeffrey Hugo 	F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0),
518d14b15b5SJeffrey Hugo 	F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0),
519d14b15b5SJeffrey Hugo 	F(600000000, P_GPLL0, 1, 0, 0),
520d14b15b5SJeffrey Hugo 	{ }
521d14b15b5SJeffrey Hugo };
522d14b15b5SJeffrey Hugo 
523d14b15b5SJeffrey Hugo static struct clk_rcg2 cpp_clk_src = {
524d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3640,
525d14b15b5SJeffrey Hugo 	.hid_width = 5,
526d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
527d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_cpp_clk_src,
528d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
529d14b15b5SJeffrey Hugo 		.name = "cpp_clk_src",
530d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
5319ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
532d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
533d14b15b5SJeffrey Hugo 	},
534d14b15b5SJeffrey Hugo };
535d14b15b5SJeffrey Hugo 
536d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_csi_clk_src[] = {
537d14b15b5SJeffrey Hugo 	F(164571429, P_MMPLL10_OUT_EVEN, 3.5, 0, 0),
538d14b15b5SJeffrey Hugo 	F(256000000, P_MMPLL4_OUT_EVEN, 3, 0, 0),
539d14b15b5SJeffrey Hugo 	F(274290000, P_MMPLL7_OUT_EVEN, 3.5, 0, 0),
540d14b15b5SJeffrey Hugo 	F(300000000, P_GPLL0, 2, 0, 0),
541d14b15b5SJeffrey Hugo 	F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0),
542d14b15b5SJeffrey Hugo 	F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0),
543d14b15b5SJeffrey Hugo 	{ }
544d14b15b5SJeffrey Hugo };
545d14b15b5SJeffrey Hugo 
546d14b15b5SJeffrey Hugo static struct clk_rcg2 csi0_clk_src = {
547d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3090,
548d14b15b5SJeffrey Hugo 	.hid_width = 5,
549d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
550d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csi_clk_src,
551d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
552d14b15b5SJeffrey Hugo 		.name = "csi0_clk_src",
553d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
5549ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
555d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
556d14b15b5SJeffrey Hugo 	},
557d14b15b5SJeffrey Hugo };
558d14b15b5SJeffrey Hugo 
559d14b15b5SJeffrey Hugo static struct clk_rcg2 csi1_clk_src = {
560d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3100,
561d14b15b5SJeffrey Hugo 	.hid_width = 5,
562d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
563d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csi_clk_src,
564d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
565d14b15b5SJeffrey Hugo 		.name = "csi1_clk_src",
566d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
5679ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
568d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
569d14b15b5SJeffrey Hugo 	},
570d14b15b5SJeffrey Hugo };
571d14b15b5SJeffrey Hugo 
572d14b15b5SJeffrey Hugo static struct clk_rcg2 csi2_clk_src = {
573d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3160,
574d14b15b5SJeffrey Hugo 	.hid_width = 5,
575d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
576d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csi_clk_src,
577d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
578d14b15b5SJeffrey Hugo 		.name = "csi2_clk_src",
579d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
5809ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
581d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
582d14b15b5SJeffrey Hugo 	},
583d14b15b5SJeffrey Hugo };
584d14b15b5SJeffrey Hugo 
585d14b15b5SJeffrey Hugo static struct clk_rcg2 csi3_clk_src = {
586d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x31c0,
587d14b15b5SJeffrey Hugo 	.hid_width = 5,
588d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
589d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csi_clk_src,
590d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
591d14b15b5SJeffrey Hugo 		.name = "csi3_clk_src",
592d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
5939ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
594d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
595d14b15b5SJeffrey Hugo 	},
596d14b15b5SJeffrey Hugo };
597d14b15b5SJeffrey Hugo 
598d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_csiphy_clk_src[] = {
599d14b15b5SJeffrey Hugo 	F(164571429, P_MMPLL10_OUT_EVEN, 3.5, 0, 0),
600d14b15b5SJeffrey Hugo 	F(256000000, P_MMPLL4_OUT_EVEN, 3, 0, 0),
601d14b15b5SJeffrey Hugo 	F(274290000, P_MMPLL7_OUT_EVEN, 3.5, 0, 0),
602d14b15b5SJeffrey Hugo 	F(300000000, P_GPLL0, 2, 0, 0),
603d14b15b5SJeffrey Hugo 	F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0),
604d14b15b5SJeffrey Hugo 	{ }
605d14b15b5SJeffrey Hugo };
606d14b15b5SJeffrey Hugo 
607d14b15b5SJeffrey Hugo static struct clk_rcg2 csiphy_clk_src = {
608d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3800,
609d14b15b5SJeffrey Hugo 	.hid_width = 5,
610d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
611d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csiphy_clk_src,
612d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
613d14b15b5SJeffrey Hugo 		.name = "csiphy_clk_src",
614d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
6159ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
616d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
617d14b15b5SJeffrey Hugo 	},
618d14b15b5SJeffrey Hugo };
619d14b15b5SJeffrey Hugo 
620d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_csiphytimer_clk_src[] = {
621d14b15b5SJeffrey Hugo 	F(200000000, P_GPLL0, 3, 0, 0),
622d14b15b5SJeffrey Hugo 	F(269333333, P_MMPLL0_OUT_EVEN, 3, 0, 0),
623d14b15b5SJeffrey Hugo 	{ }
624d14b15b5SJeffrey Hugo };
625d14b15b5SJeffrey Hugo 
626d14b15b5SJeffrey Hugo static struct clk_rcg2 csi0phytimer_clk_src = {
627d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3000,
628d14b15b5SJeffrey Hugo 	.hid_width = 5,
629d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
630d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csiphytimer_clk_src,
631d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
632d14b15b5SJeffrey Hugo 		.name = "csi0phytimer_clk_src",
633d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
6349ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
635d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
636d14b15b5SJeffrey Hugo 	},
637d14b15b5SJeffrey Hugo };
638d14b15b5SJeffrey Hugo 
639d14b15b5SJeffrey Hugo static struct clk_rcg2 csi1phytimer_clk_src = {
640d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3030,
641d14b15b5SJeffrey Hugo 	.hid_width = 5,
642d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
643d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csiphytimer_clk_src,
644d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
645d14b15b5SJeffrey Hugo 		.name = "csi1phytimer_clk_src",
646d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
6479ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
648d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
649d14b15b5SJeffrey Hugo 	},
650d14b15b5SJeffrey Hugo };
651d14b15b5SJeffrey Hugo 
652d14b15b5SJeffrey Hugo static struct clk_rcg2 csi2phytimer_clk_src = {
653d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3060,
654d14b15b5SJeffrey Hugo 	.hid_width = 5,
655d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
656d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_csiphytimer_clk_src,
657d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
658d14b15b5SJeffrey Hugo 		.name = "csi2phytimer_clk_src",
659d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
6609ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
661d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
662d14b15b5SJeffrey Hugo 	},
663d14b15b5SJeffrey Hugo };
664d14b15b5SJeffrey Hugo 
665d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_aux_clk_src[] = {
666d14b15b5SJeffrey Hugo 	F(19200000, P_XO, 1, 0, 0),
667d14b15b5SJeffrey Hugo 	{ }
668d14b15b5SJeffrey Hugo };
669d14b15b5SJeffrey Hugo 
670d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_aux_clk_src = {
671d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2260,
672d14b15b5SJeffrey Hugo 	.hid_width = 5,
673d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_gpll0_gpll0_div_map,
674d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_dp_aux_clk_src,
675d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
676d14b15b5SJeffrey Hugo 		.name = "dp_aux_clk_src",
677d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_gpll0_gpll0_div,
6789ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_gpll0_gpll0_div),
679d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
680d14b15b5SJeffrey Hugo 	},
681d14b15b5SJeffrey Hugo };
682d14b15b5SJeffrey Hugo 
683d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_crypto_clk_src[] = {
684d14b15b5SJeffrey Hugo 	F(101250, P_DPLINK, 1, 5, 16),
685d14b15b5SJeffrey Hugo 	F(168750, P_DPLINK, 1, 5, 16),
686d14b15b5SJeffrey Hugo 	F(337500, P_DPLINK, 1, 5, 16),
687d14b15b5SJeffrey Hugo 	{ }
688d14b15b5SJeffrey Hugo };
689d14b15b5SJeffrey Hugo 
690d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_crypto_clk_src = {
691d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2220,
692d14b15b5SJeffrey Hugo 	.hid_width = 5,
693d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dp_map,
694d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_dp_crypto_clk_src,
695d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
696d14b15b5SJeffrey Hugo 		.name = "dp_crypto_clk_src",
697d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dp,
6989ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dp),
699d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
700d14b15b5SJeffrey Hugo 	},
701d14b15b5SJeffrey Hugo };
702d14b15b5SJeffrey Hugo 
703d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_link_clk_src[] = {
704d14b15b5SJeffrey Hugo 	F(162000, P_DPLINK, 2, 0, 0),
705d14b15b5SJeffrey Hugo 	F(270000, P_DPLINK, 2, 0, 0),
706d14b15b5SJeffrey Hugo 	F(540000, P_DPLINK, 2, 0, 0),
707d14b15b5SJeffrey Hugo 	{ }
708d14b15b5SJeffrey Hugo };
709d14b15b5SJeffrey Hugo 
710d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_link_clk_src = {
711d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2200,
712d14b15b5SJeffrey Hugo 	.hid_width = 5,
713d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dp_map,
714d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_dp_link_clk_src,
715d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
716d14b15b5SJeffrey Hugo 		.name = "dp_link_clk_src",
717d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dp,
7189ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dp),
719d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
720d14b15b5SJeffrey Hugo 	},
721d14b15b5SJeffrey Hugo };
722d14b15b5SJeffrey Hugo 
723d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_pixel_clk_src[] = {
724d14b15b5SJeffrey Hugo 	F(154000000, P_DPVCO, 1, 0, 0),
725d14b15b5SJeffrey Hugo 	F(337500000, P_DPVCO, 2, 0, 0),
726d14b15b5SJeffrey Hugo 	F(675000000, P_DPVCO, 2, 0, 0),
727d14b15b5SJeffrey Hugo 	{ }
728d14b15b5SJeffrey Hugo };
729d14b15b5SJeffrey Hugo 
730d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_pixel_clk_src = {
731d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2240,
732d14b15b5SJeffrey Hugo 	.hid_width = 5,
733d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dp_map,
734d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_dp_pixel_clk_src,
735d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
736d14b15b5SJeffrey Hugo 		.name = "dp_pixel_clk_src",
737d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dp,
7389ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dp),
739d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
740d14b15b5SJeffrey Hugo 	},
741d14b15b5SJeffrey Hugo };
742d14b15b5SJeffrey Hugo 
743d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_esc_clk_src[] = {
744d14b15b5SJeffrey Hugo 	F(19200000, P_XO, 1, 0, 0),
745d14b15b5SJeffrey Hugo 	{ }
746d14b15b5SJeffrey Hugo };
747d14b15b5SJeffrey Hugo 
748d14b15b5SJeffrey Hugo static struct clk_rcg2 esc0_clk_src = {
749d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2160,
750d14b15b5SJeffrey Hugo 	.hid_width = 5,
751d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dsibyte_map,
752d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_esc_clk_src,
753d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
754d14b15b5SJeffrey Hugo 		.name = "esc0_clk_src",
755d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dsibyte,
7569ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dsibyte),
757d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
758d14b15b5SJeffrey Hugo 	},
759d14b15b5SJeffrey Hugo };
760d14b15b5SJeffrey Hugo 
761d14b15b5SJeffrey Hugo static struct clk_rcg2 esc1_clk_src = {
762d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2180,
763d14b15b5SJeffrey Hugo 	.hid_width = 5,
764d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dsibyte_map,
765d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_esc_clk_src,
766d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
767d14b15b5SJeffrey Hugo 		.name = "esc1_clk_src",
768d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dsibyte,
7699ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dsibyte),
770d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
771d14b15b5SJeffrey Hugo 	},
772d14b15b5SJeffrey Hugo };
773d14b15b5SJeffrey Hugo 
774d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_extpclk_clk_src[] = {
775d14b15b5SJeffrey Hugo 	{ .src = P_HDMIPLL },
776d14b15b5SJeffrey Hugo 	{ }
777d14b15b5SJeffrey Hugo };
778d14b15b5SJeffrey Hugo 
779d14b15b5SJeffrey Hugo static struct clk_rcg2 extpclk_clk_src = {
780d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2060,
781d14b15b5SJeffrey Hugo 	.hid_width = 5,
782d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_hdmi_map,
783d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_extpclk_clk_src,
784d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
785d14b15b5SJeffrey Hugo 		.name = "extpclk_clk_src",
786d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_hdmi,
7879ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_hdmi),
788d14b15b5SJeffrey Hugo 		.ops = &clk_byte_ops,
789d14b15b5SJeffrey Hugo 		.flags = CLK_SET_RATE_PARENT,
790d14b15b5SJeffrey Hugo 	},
791d14b15b5SJeffrey Hugo };
792d14b15b5SJeffrey Hugo 
793d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_fd_core_clk_src[] = {
794d14b15b5SJeffrey Hugo 	F(100000000, P_GPLL0, 6, 0, 0),
795d14b15b5SJeffrey Hugo 	F(200000000, P_GPLL0, 3, 0, 0),
796d14b15b5SJeffrey Hugo 	F(404000000, P_MMPLL0_OUT_EVEN, 2, 0, 0),
797d14b15b5SJeffrey Hugo 	F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0),
798d14b15b5SJeffrey Hugo 	F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0),
799d14b15b5SJeffrey Hugo 	{ }
800d14b15b5SJeffrey Hugo };
801d14b15b5SJeffrey Hugo 
802d14b15b5SJeffrey Hugo static struct clk_rcg2 fd_core_clk_src = {
803d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3b00,
804d14b15b5SJeffrey Hugo 	.hid_width = 5,
805d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
806d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_fd_core_clk_src,
807d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
808d14b15b5SJeffrey Hugo 		.name = "fd_core_clk_src",
809d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
8109ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
811d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
812d14b15b5SJeffrey Hugo 	},
813d14b15b5SJeffrey Hugo };
814d14b15b5SJeffrey Hugo 
815d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_hdmi_clk_src[] = {
816d14b15b5SJeffrey Hugo 	F(19200000, P_XO, 1, 0, 0),
817d14b15b5SJeffrey Hugo 	{ }
818d14b15b5SJeffrey Hugo };
819d14b15b5SJeffrey Hugo 
820d14b15b5SJeffrey Hugo static struct clk_rcg2 hdmi_clk_src = {
821d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2100,
822d14b15b5SJeffrey Hugo 	.hid_width = 5,
823d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_gpll0_gpll0_div_map,
824d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_hdmi_clk_src,
825d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
826d14b15b5SJeffrey Hugo 		.name = "hdmi_clk_src",
827d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_gpll0_gpll0_div,
8289ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_gpll0_gpll0_div),
829d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
830d14b15b5SJeffrey Hugo 	},
831d14b15b5SJeffrey Hugo };
832d14b15b5SJeffrey Hugo 
833d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_jpeg0_clk_src[] = {
834d14b15b5SJeffrey Hugo 	F(75000000, P_GPLL0, 8, 0, 0),
835d14b15b5SJeffrey Hugo 	F(150000000, P_GPLL0, 4, 0, 0),
836d14b15b5SJeffrey Hugo 	F(320000000, P_MMPLL7_OUT_EVEN, 3, 0, 0),
837d14b15b5SJeffrey Hugo 	F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0),
838d14b15b5SJeffrey Hugo 	{ }
839d14b15b5SJeffrey Hugo };
840d14b15b5SJeffrey Hugo 
841d14b15b5SJeffrey Hugo static struct clk_rcg2 jpeg0_clk_src = {
842d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3500,
843d14b15b5SJeffrey Hugo 	.hid_width = 5,
844d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
845d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_jpeg0_clk_src,
846d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
847d14b15b5SJeffrey Hugo 		.name = "jpeg0_clk_src",
848d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
8499ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
850d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
851d14b15b5SJeffrey Hugo 	},
852d14b15b5SJeffrey Hugo };
853d14b15b5SJeffrey Hugo 
854d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_maxi_clk_src[] = {
855d14b15b5SJeffrey Hugo 	F(19200000, P_XO, 1, 0, 0),
856d14b15b5SJeffrey Hugo 	F(75000000, P_GPLL0_DIV, 4, 0, 0),
857d14b15b5SJeffrey Hugo 	F(171428571, P_GPLL0, 3.5, 0, 0),
858d14b15b5SJeffrey Hugo 	F(323200000, P_MMPLL0_OUT_EVEN, 2.5, 0, 0),
859d14b15b5SJeffrey Hugo 	F(406000000, P_MMPLL1_OUT_EVEN, 2, 0, 0),
860d14b15b5SJeffrey Hugo 	{ }
861d14b15b5SJeffrey Hugo };
862d14b15b5SJeffrey Hugo 
863d14b15b5SJeffrey Hugo static struct clk_rcg2 maxi_clk_src = {
864d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0xf020,
865d14b15b5SJeffrey Hugo 	.hid_width = 5,
866d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map,
867d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_maxi_clk_src,
868d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
869d14b15b5SJeffrey Hugo 		.name = "maxi_clk_src",
870d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div,
8719ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div),
872d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
873d14b15b5SJeffrey Hugo 	},
874d14b15b5SJeffrey Hugo };
875d14b15b5SJeffrey Hugo 
876d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_mclk_clk_src[] = {
877d14b15b5SJeffrey Hugo 	F(4800000, P_XO, 4, 0, 0),
878d14b15b5SJeffrey Hugo 	F(6000000, P_GPLL0_DIV, 10, 1, 5),
879d14b15b5SJeffrey Hugo 	F(8000000, P_GPLL0_DIV, 1, 2, 75),
880d14b15b5SJeffrey Hugo 	F(9600000, P_XO, 2, 0, 0),
881d14b15b5SJeffrey Hugo 	F(16666667, P_GPLL0_DIV, 2, 1, 9),
882d14b15b5SJeffrey Hugo 	F(19200000, P_XO, 1, 0, 0),
883d14b15b5SJeffrey Hugo 	F(24000000, P_GPLL0_DIV, 1, 2, 25),
884d14b15b5SJeffrey Hugo 	F(33333333, P_GPLL0_DIV, 1, 2, 9),
885d14b15b5SJeffrey Hugo 	F(48000000, P_GPLL0, 1, 2, 25),
886d14b15b5SJeffrey Hugo 	F(66666667, P_GPLL0, 1, 2, 9),
887d14b15b5SJeffrey Hugo 	{ }
888d14b15b5SJeffrey Hugo };
889d14b15b5SJeffrey Hugo 
890d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk0_clk_src = {
891d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3360,
892d14b15b5SJeffrey Hugo 	.hid_width = 5,
893d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
894d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_mclk_clk_src,
895d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
896d14b15b5SJeffrey Hugo 		.name = "mclk0_clk_src",
897d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
8989ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
899d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
900d14b15b5SJeffrey Hugo 	},
901d14b15b5SJeffrey Hugo };
902d14b15b5SJeffrey Hugo 
903d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk1_clk_src = {
904d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3390,
905d14b15b5SJeffrey Hugo 	.hid_width = 5,
906d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
907d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_mclk_clk_src,
908d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
909d14b15b5SJeffrey Hugo 		.name = "mclk1_clk_src",
910d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
9119ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
912d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
913d14b15b5SJeffrey Hugo 	},
914d14b15b5SJeffrey Hugo };
915d14b15b5SJeffrey Hugo 
916d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk2_clk_src = {
917d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x33c0,
918d14b15b5SJeffrey Hugo 	.hid_width = 5,
919d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
920d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_mclk_clk_src,
921d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
922d14b15b5SJeffrey Hugo 		.name = "mclk2_clk_src",
923d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
9249ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
925d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
926d14b15b5SJeffrey Hugo 	},
927d14b15b5SJeffrey Hugo };
928d14b15b5SJeffrey Hugo 
929d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk3_clk_src = {
930d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x33f0,
931d14b15b5SJeffrey Hugo 	.hid_width = 5,
932d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
933d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_mclk_clk_src,
934d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
935d14b15b5SJeffrey Hugo 		.name = "mclk3_clk_src",
936d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
9379ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
938d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
939d14b15b5SJeffrey Hugo 	},
940d14b15b5SJeffrey Hugo };
941d14b15b5SJeffrey Hugo 
942d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_mdp_clk_src[] = {
943d14b15b5SJeffrey Hugo 	F(85714286, P_GPLL0, 7, 0, 0),
944d14b15b5SJeffrey Hugo 	F(100000000, P_GPLL0, 6, 0, 0),
945d14b15b5SJeffrey Hugo 	F(150000000, P_GPLL0, 4, 0, 0),
946d14b15b5SJeffrey Hugo 	F(171428571, P_GPLL0, 3.5, 0, 0),
947d14b15b5SJeffrey Hugo 	F(200000000, P_GPLL0, 3, 0, 0),
948d14b15b5SJeffrey Hugo 	F(275000000, P_MMPLL5_OUT_EVEN, 3, 0, 0),
949d14b15b5SJeffrey Hugo 	F(300000000, P_GPLL0, 2, 0, 0),
950d14b15b5SJeffrey Hugo 	F(330000000, P_MMPLL5_OUT_EVEN, 2.5, 0, 0),
951d14b15b5SJeffrey Hugo 	F(412500000, P_MMPLL5_OUT_EVEN, 2, 0, 0),
952d14b15b5SJeffrey Hugo 	{ }
953d14b15b5SJeffrey Hugo };
954d14b15b5SJeffrey Hugo 
955d14b15b5SJeffrey Hugo static struct clk_rcg2 mdp_clk_src = {
956d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2040,
957d14b15b5SJeffrey Hugo 	.hid_width = 5,
958d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map,
959d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_mdp_clk_src,
960d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
961d14b15b5SJeffrey Hugo 		.name = "mdp_clk_src",
962d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div,
9639ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div),
964d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
965d14b15b5SJeffrey Hugo 	},
966d14b15b5SJeffrey Hugo };
967d14b15b5SJeffrey Hugo 
968d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_vsync_clk_src[] = {
969d14b15b5SJeffrey Hugo 	F(19200000, P_XO, 1, 0, 0),
970d14b15b5SJeffrey Hugo 	{ }
971d14b15b5SJeffrey Hugo };
972d14b15b5SJeffrey Hugo 
973d14b15b5SJeffrey Hugo static struct clk_rcg2 vsync_clk_src = {
974d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2080,
975d14b15b5SJeffrey Hugo 	.hid_width = 5,
976d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_gpll0_gpll0_div_map,
977d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_vsync_clk_src,
978d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
979d14b15b5SJeffrey Hugo 		.name = "vsync_clk_src",
980d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_gpll0_gpll0_div,
9819ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_gpll0_gpll0_div),
982d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
983d14b15b5SJeffrey Hugo 	},
984d14b15b5SJeffrey Hugo };
985d14b15b5SJeffrey Hugo 
986d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_ahb_clk_src[] = {
987d14b15b5SJeffrey Hugo 	F(19200000, P_XO, 1, 0, 0),
988d14b15b5SJeffrey Hugo 	F(40000000, P_GPLL0, 15, 0, 0),
989d14b15b5SJeffrey Hugo 	F(80800000, P_MMPLL0_OUT_EVEN, 10, 0, 0),
990d14b15b5SJeffrey Hugo 	{ }
991d14b15b5SJeffrey Hugo };
992d14b15b5SJeffrey Hugo 
993d14b15b5SJeffrey Hugo static struct clk_rcg2 ahb_clk_src = {
994d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x5000,
995d14b15b5SJeffrey Hugo 	.hid_width = 5,
996d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_gpll0_gpll0_div_map,
997d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_ahb_clk_src,
998d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
999d14b15b5SJeffrey Hugo 		.name = "ahb_clk_src",
1000d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_gpll0_gpll0_div,
10019ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_gpll0_gpll0_div),
1002d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1003d14b15b5SJeffrey Hugo 	},
1004d14b15b5SJeffrey Hugo };
1005d14b15b5SJeffrey Hugo 
1006d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_axi_clk_src[] = {
1007d14b15b5SJeffrey Hugo 	F(75000000, P_GPLL0, 8, 0, 0),
1008d14b15b5SJeffrey Hugo 	F(171428571, P_GPLL0, 3.5, 0, 0),
1009d14b15b5SJeffrey Hugo 	F(240000000, P_GPLL0, 2.5, 0, 0),
1010d14b15b5SJeffrey Hugo 	F(323200000, P_MMPLL0_OUT_EVEN, 2.5, 0, 0),
1011d14b15b5SJeffrey Hugo 	F(406000000, P_MMPLL0_OUT_EVEN, 2, 0, 0),
1012d14b15b5SJeffrey Hugo 	{ }
1013d14b15b5SJeffrey Hugo };
1014d14b15b5SJeffrey Hugo 
1015d14b15b5SJeffrey Hugo /* RO to linux */
1016d14b15b5SJeffrey Hugo static struct clk_rcg2 axi_clk_src = {
1017d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0xd000,
1018d14b15b5SJeffrey Hugo 	.hid_width = 5,
1019d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map,
1020d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_axi_clk_src,
1021d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1022d14b15b5SJeffrey Hugo 		.name = "axi_clk_src",
1023d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div,
10249ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div),
1025d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1026d14b15b5SJeffrey Hugo 	},
1027d14b15b5SJeffrey Hugo };
1028d14b15b5SJeffrey Hugo 
1029d14b15b5SJeffrey Hugo static struct clk_rcg2 pclk0_clk_src = {
1030d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2000,
1031d14b15b5SJeffrey Hugo 	.mnd_width = 8,
1032d14b15b5SJeffrey Hugo 	.hid_width = 5,
1033d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dsi0pll_dsi1pll_map,
1034d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1035d14b15b5SJeffrey Hugo 		.name = "pclk0_clk_src",
1036d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dsi0pll_dsi1pll,
10379ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dsi0pll_dsi1pll),
1038d14b15b5SJeffrey Hugo 		.ops = &clk_pixel_ops,
1039d14b15b5SJeffrey Hugo 		.flags = CLK_SET_RATE_PARENT,
1040d14b15b5SJeffrey Hugo 	},
1041d14b15b5SJeffrey Hugo };
1042d14b15b5SJeffrey Hugo 
1043d14b15b5SJeffrey Hugo static struct clk_rcg2 pclk1_clk_src = {
1044d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x2020,
1045d14b15b5SJeffrey Hugo 	.mnd_width = 8,
1046d14b15b5SJeffrey Hugo 	.hid_width = 5,
1047d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_dsi0pll_dsi1pll_map,
1048d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1049d14b15b5SJeffrey Hugo 		.name = "pclk1_clk_src",
1050d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_dsi0pll_dsi1pll,
10519ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_dsi0pll_dsi1pll),
1052d14b15b5SJeffrey Hugo 		.ops = &clk_pixel_ops,
1053d14b15b5SJeffrey Hugo 		.flags = CLK_SET_RATE_PARENT,
1054d14b15b5SJeffrey Hugo 	},
1055d14b15b5SJeffrey Hugo };
1056d14b15b5SJeffrey Hugo 
1057d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_rot_clk_src[] = {
1058d14b15b5SJeffrey Hugo 	F(171428571, P_GPLL0, 3.5, 0, 0),
1059d14b15b5SJeffrey Hugo 	F(275000000, P_MMPLL5_OUT_EVEN, 3, 0, 0),
1060d14b15b5SJeffrey Hugo 	F(330000000, P_MMPLL5_OUT_EVEN, 2.5, 0, 0),
1061d14b15b5SJeffrey Hugo 	F(412500000, P_MMPLL5_OUT_EVEN, 2, 0, 0),
1062d14b15b5SJeffrey Hugo 	{ }
1063d14b15b5SJeffrey Hugo };
1064d14b15b5SJeffrey Hugo 
1065d14b15b5SJeffrey Hugo static struct clk_rcg2 rot_clk_src = {
1066d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x21a0,
1067d14b15b5SJeffrey Hugo 	.hid_width = 5,
1068d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map,
1069d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_rot_clk_src,
1070d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1071d14b15b5SJeffrey Hugo 		.name = "rot_clk_src",
1072d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div,
10739ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div),
1074d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1075d14b15b5SJeffrey Hugo 	},
1076d14b15b5SJeffrey Hugo };
1077d14b15b5SJeffrey Hugo 
1078d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_video_core_clk_src[] = {
1079d14b15b5SJeffrey Hugo 	F(200000000, P_GPLL0, 3, 0, 0),
1080d14b15b5SJeffrey Hugo 	F(269330000, P_MMPLL0_OUT_EVEN, 3, 0, 0),
1081d14b15b5SJeffrey Hugo 	F(355200000, P_MMPLL6_OUT_EVEN, 2.5, 0, 0),
1082d14b15b5SJeffrey Hugo 	F(444000000, P_MMPLL6_OUT_EVEN, 2, 0, 0),
1083d14b15b5SJeffrey Hugo 	F(533000000, P_MMPLL3_OUT_EVEN, 2, 0, 0),
1084d14b15b5SJeffrey Hugo 	{ }
1085d14b15b5SJeffrey Hugo };
1086d14b15b5SJeffrey Hugo 
1087d14b15b5SJeffrey Hugo static struct clk_rcg2 video_core_clk_src = {
1088d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x1000,
1089d14b15b5SJeffrey Hugo 	.hid_width = 5,
1090d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map,
1091d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_video_core_clk_src,
1092d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1093d14b15b5SJeffrey Hugo 		.name = "video_core_clk_src",
1094d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div,
10959ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div),
1096d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1097d14b15b5SJeffrey Hugo 	},
1098d14b15b5SJeffrey Hugo };
1099d14b15b5SJeffrey Hugo 
1100d14b15b5SJeffrey Hugo static struct clk_rcg2 video_subcore0_clk_src = {
1101d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x1060,
1102d14b15b5SJeffrey Hugo 	.hid_width = 5,
1103d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map,
1104d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_video_core_clk_src,
1105d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1106d14b15b5SJeffrey Hugo 		.name = "video_subcore0_clk_src",
1107d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div,
11089ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div),
1109d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1110d14b15b5SJeffrey Hugo 	},
1111d14b15b5SJeffrey Hugo };
1112d14b15b5SJeffrey Hugo 
1113d14b15b5SJeffrey Hugo static struct clk_rcg2 video_subcore1_clk_src = {
1114d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x1080,
1115d14b15b5SJeffrey Hugo 	.hid_width = 5,
1116d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map,
1117d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_video_core_clk_src,
1118d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1119d14b15b5SJeffrey Hugo 		.name = "video_subcore1_clk_src",
1120d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div,
11219ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div),
1122d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1123d14b15b5SJeffrey Hugo 	},
1124d14b15b5SJeffrey Hugo };
1125d14b15b5SJeffrey Hugo 
1126d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_vfe_clk_src[] = {
1127d14b15b5SJeffrey Hugo 	F(200000000, P_GPLL0, 3, 0, 0),
1128d14b15b5SJeffrey Hugo 	F(300000000, P_GPLL0, 2, 0, 0),
1129d14b15b5SJeffrey Hugo 	F(320000000, P_MMPLL7_OUT_EVEN, 3, 0, 0),
1130d14b15b5SJeffrey Hugo 	F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0),
1131d14b15b5SJeffrey Hugo 	F(404000000, P_MMPLL0_OUT_EVEN, 2, 0, 0),
1132d14b15b5SJeffrey Hugo 	F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0),
1133d14b15b5SJeffrey Hugo 	F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0),
1134d14b15b5SJeffrey Hugo 	F(600000000, P_GPLL0, 1, 0, 0),
1135d14b15b5SJeffrey Hugo 	{ }
1136d14b15b5SJeffrey Hugo };
1137d14b15b5SJeffrey Hugo 
1138d14b15b5SJeffrey Hugo static struct clk_rcg2 vfe0_clk_src = {
1139d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3600,
1140d14b15b5SJeffrey Hugo 	.hid_width = 5,
1141d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
1142d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_vfe_clk_src,
1143d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1144d14b15b5SJeffrey Hugo 		.name = "vfe0_clk_src",
1145d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
11469ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
1147d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1148d14b15b5SJeffrey Hugo 	},
1149d14b15b5SJeffrey Hugo };
1150d14b15b5SJeffrey Hugo 
1151d14b15b5SJeffrey Hugo static struct clk_rcg2 vfe1_clk_src = {
1152d14b15b5SJeffrey Hugo 	.cmd_rcgr = 0x3620,
1153d14b15b5SJeffrey Hugo 	.hid_width = 5,
1154d14b15b5SJeffrey Hugo 	.parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map,
1155d14b15b5SJeffrey Hugo 	.freq_tbl = ftbl_vfe_clk_src,
1156d14b15b5SJeffrey Hugo 	.clkr.hw.init = &(struct clk_init_data){
1157d14b15b5SJeffrey Hugo 		.name = "vfe1_clk_src",
1158d14b15b5SJeffrey Hugo 		.parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div,
11599ee049ebSMarijn Suijten 		.num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div),
1160d14b15b5SJeffrey Hugo 		.ops = &clk_rcg2_ops,
1161d14b15b5SJeffrey Hugo 	},
1162d14b15b5SJeffrey Hugo };
1163d14b15b5SJeffrey Hugo 
1164d14b15b5SJeffrey Hugo static struct clk_branch misc_ahb_clk = {
1165d14b15b5SJeffrey Hugo 	.halt_reg = 0x328,
1166fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_reg = 0x328,
1167fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_bit = 1,
1168d14b15b5SJeffrey Hugo 	.clkr = {
1169d14b15b5SJeffrey Hugo 		.enable_reg = 0x328,
1170d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1171d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1172d14b15b5SJeffrey Hugo 			.name = "misc_ahb_clk",
1173d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1174d14b15b5SJeffrey Hugo 			.num_parents = 1,
1175d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1176d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1177d14b15b5SJeffrey Hugo 		},
1178d14b15b5SJeffrey Hugo 	},
1179d14b15b5SJeffrey Hugo };
1180d14b15b5SJeffrey Hugo 
1181d14b15b5SJeffrey Hugo static struct clk_branch video_core_clk = {
1182d14b15b5SJeffrey Hugo 	.halt_reg = 0x1028,
1183d14b15b5SJeffrey Hugo 	.clkr = {
1184d14b15b5SJeffrey Hugo 		.enable_reg = 0x1028,
1185d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1186d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1187d14b15b5SJeffrey Hugo 			.name = "video_core_clk",
1188d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &video_core_clk_src.clkr.hw },
1189d14b15b5SJeffrey Hugo 			.num_parents = 1,
1190d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1191d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1192d14b15b5SJeffrey Hugo 		},
1193d14b15b5SJeffrey Hugo 	},
1194d14b15b5SJeffrey Hugo };
1195d14b15b5SJeffrey Hugo 
1196d14b15b5SJeffrey Hugo static struct clk_branch video_ahb_clk = {
1197d14b15b5SJeffrey Hugo 	.halt_reg = 0x1030,
1198fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_reg = 0x1030,
1199fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_bit = 1,
1200d14b15b5SJeffrey Hugo 	.clkr = {
1201d14b15b5SJeffrey Hugo 		.enable_reg = 0x1030,
1202d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1203d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1204d14b15b5SJeffrey Hugo 			.name = "video_ahb_clk",
1205d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1206d14b15b5SJeffrey Hugo 			.num_parents = 1,
1207d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1208d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1209d14b15b5SJeffrey Hugo 		},
1210d14b15b5SJeffrey Hugo 	},
1211d14b15b5SJeffrey Hugo };
1212d14b15b5SJeffrey Hugo 
1213d14b15b5SJeffrey Hugo static struct clk_branch video_axi_clk = {
1214d14b15b5SJeffrey Hugo 	.halt_reg = 0x1034,
1215d14b15b5SJeffrey Hugo 	.clkr = {
1216d14b15b5SJeffrey Hugo 		.enable_reg = 0x1034,
1217d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1218d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1219d14b15b5SJeffrey Hugo 			.name = "video_axi_clk",
1220d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw },
1221d14b15b5SJeffrey Hugo 			.num_parents = 1,
1222d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1223d14b15b5SJeffrey Hugo 		},
1224d14b15b5SJeffrey Hugo 	},
1225d14b15b5SJeffrey Hugo };
1226d14b15b5SJeffrey Hugo 
1227d14b15b5SJeffrey Hugo static struct clk_branch video_maxi_clk = {
1228d14b15b5SJeffrey Hugo 	.halt_reg = 0x1038,
1229d14b15b5SJeffrey Hugo 	.clkr = {
1230d14b15b5SJeffrey Hugo 		.enable_reg = 0x1038,
1231d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1232d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1233d14b15b5SJeffrey Hugo 			.name = "video_maxi_clk",
1234d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &maxi_clk_src.clkr.hw },
1235d14b15b5SJeffrey Hugo 			.num_parents = 1,
1236d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1237d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1238d14b15b5SJeffrey Hugo 		},
1239d14b15b5SJeffrey Hugo 	},
1240d14b15b5SJeffrey Hugo };
1241d14b15b5SJeffrey Hugo 
1242d14b15b5SJeffrey Hugo static struct clk_branch video_subcore0_clk = {
1243d14b15b5SJeffrey Hugo 	.halt_reg = 0x1048,
1244d14b15b5SJeffrey Hugo 	.clkr = {
1245d14b15b5SJeffrey Hugo 		.enable_reg = 0x1048,
1246d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1247d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1248d14b15b5SJeffrey Hugo 			.name = "video_subcore0_clk",
1249d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &video_subcore0_clk_src.clkr.hw },
1250d14b15b5SJeffrey Hugo 			.num_parents = 1,
1251d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1252d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1253d14b15b5SJeffrey Hugo 		},
1254d14b15b5SJeffrey Hugo 	},
1255d14b15b5SJeffrey Hugo };
1256d14b15b5SJeffrey Hugo 
1257d14b15b5SJeffrey Hugo static struct clk_branch video_subcore1_clk = {
1258d14b15b5SJeffrey Hugo 	.halt_reg = 0x104c,
1259d14b15b5SJeffrey Hugo 	.clkr = {
1260d14b15b5SJeffrey Hugo 		.enable_reg = 0x104c,
1261d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1262d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1263d14b15b5SJeffrey Hugo 			.name = "video_subcore1_clk",
1264d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &video_subcore1_clk_src.clkr.hw },
1265d14b15b5SJeffrey Hugo 			.num_parents = 1,
1266d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1267d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1268d14b15b5SJeffrey Hugo 		},
1269d14b15b5SJeffrey Hugo 	},
1270d14b15b5SJeffrey Hugo };
1271d14b15b5SJeffrey Hugo 
1272d14b15b5SJeffrey Hugo static struct clk_branch mdss_ahb_clk = {
1273d14b15b5SJeffrey Hugo 	.halt_reg = 0x2308,
1274fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_reg = 0x2308,
1275fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_bit = 1,
1276d14b15b5SJeffrey Hugo 	.clkr = {
1277d14b15b5SJeffrey Hugo 		.enable_reg = 0x2308,
1278d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1279d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1280d14b15b5SJeffrey Hugo 			.name = "mdss_ahb_clk",
1281d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1282d14b15b5SJeffrey Hugo 			.num_parents = 1,
1283d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1284d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1285d14b15b5SJeffrey Hugo 		},
1286d14b15b5SJeffrey Hugo 	},
1287d14b15b5SJeffrey Hugo };
1288d14b15b5SJeffrey Hugo 
1289d14b15b5SJeffrey Hugo static struct clk_branch mdss_hdmi_dp_ahb_clk = {
1290d14b15b5SJeffrey Hugo 	.halt_reg = 0x230c,
1291d14b15b5SJeffrey Hugo 	.clkr = {
1292d14b15b5SJeffrey Hugo 		.enable_reg = 0x230c,
1293d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1294d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1295d14b15b5SJeffrey Hugo 			.name = "mdss_hdmi_dp_ahb_clk",
1296d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1297d14b15b5SJeffrey Hugo 			.num_parents = 1,
1298d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1299d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1300d14b15b5SJeffrey Hugo 		},
1301d14b15b5SJeffrey Hugo 	},
1302d14b15b5SJeffrey Hugo };
1303d14b15b5SJeffrey Hugo 
1304d14b15b5SJeffrey Hugo static struct clk_branch mdss_axi_clk = {
1305d14b15b5SJeffrey Hugo 	.halt_reg = 0x2310,
1306d14b15b5SJeffrey Hugo 	.clkr = {
1307d14b15b5SJeffrey Hugo 		.enable_reg = 0x2310,
1308d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1309d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1310d14b15b5SJeffrey Hugo 			.name = "mdss_axi_clk",
1311d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw },
1312d14b15b5SJeffrey Hugo 			.num_parents = 1,
1313d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1314d14b15b5SJeffrey Hugo 		},
1315d14b15b5SJeffrey Hugo 	},
1316d14b15b5SJeffrey Hugo };
1317d14b15b5SJeffrey Hugo 
1318d14b15b5SJeffrey Hugo static struct clk_branch mdss_pclk0_clk = {
1319d14b15b5SJeffrey Hugo 	.halt_reg = 0x2314,
1320d14b15b5SJeffrey Hugo 	.clkr = {
1321d14b15b5SJeffrey Hugo 		.enable_reg = 0x2314,
1322d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1323d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1324d14b15b5SJeffrey Hugo 			.name = "mdss_pclk0_clk",
1325d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &pclk0_clk_src.clkr.hw },
1326d14b15b5SJeffrey Hugo 			.num_parents = 1,
1327d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1328d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1329d14b15b5SJeffrey Hugo 		},
1330d14b15b5SJeffrey Hugo 	},
1331d14b15b5SJeffrey Hugo };
1332d14b15b5SJeffrey Hugo 
1333d14b15b5SJeffrey Hugo static struct clk_branch mdss_pclk1_clk = {
1334d14b15b5SJeffrey Hugo 	.halt_reg = 0x2318,
1335d14b15b5SJeffrey Hugo 	.clkr = {
1336d14b15b5SJeffrey Hugo 		.enable_reg = 0x2318,
1337d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1338d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1339d14b15b5SJeffrey Hugo 			.name = "mdss_pclk1_clk",
1340d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &pclk1_clk_src.clkr.hw },
1341d14b15b5SJeffrey Hugo 			.num_parents = 1,
1342d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1343d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1344d14b15b5SJeffrey Hugo 		},
1345d14b15b5SJeffrey Hugo 	},
1346d14b15b5SJeffrey Hugo };
1347d14b15b5SJeffrey Hugo 
1348d14b15b5SJeffrey Hugo static struct clk_branch mdss_mdp_clk = {
1349d14b15b5SJeffrey Hugo 	.halt_reg = 0x231c,
1350d14b15b5SJeffrey Hugo 	.clkr = {
1351d14b15b5SJeffrey Hugo 		.enable_reg = 0x231c,
1352d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1353d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1354d14b15b5SJeffrey Hugo 			.name = "mdss_mdp_clk",
1355d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &mdp_clk_src.clkr.hw },
1356d14b15b5SJeffrey Hugo 			.num_parents = 1,
1357d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1358d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1359d14b15b5SJeffrey Hugo 		},
1360d14b15b5SJeffrey Hugo 	},
1361d14b15b5SJeffrey Hugo };
1362d14b15b5SJeffrey Hugo 
1363d14b15b5SJeffrey Hugo static struct clk_branch mdss_mdp_lut_clk = {
1364d14b15b5SJeffrey Hugo 	.halt_reg = 0x2320,
1365d14b15b5SJeffrey Hugo 	.clkr = {
1366d14b15b5SJeffrey Hugo 		.enable_reg = 0x2320,
1367d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1368d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1369d14b15b5SJeffrey Hugo 			.name = "mdss_mdp_lut_clk",
1370d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &mdp_clk_src.clkr.hw },
1371d14b15b5SJeffrey Hugo 			.num_parents = 1,
1372d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1373d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1374d14b15b5SJeffrey Hugo 		},
1375d14b15b5SJeffrey Hugo 	},
1376d14b15b5SJeffrey Hugo };
1377d14b15b5SJeffrey Hugo 
1378d14b15b5SJeffrey Hugo static struct clk_branch mdss_extpclk_clk = {
1379d14b15b5SJeffrey Hugo 	.halt_reg = 0x2324,
1380d14b15b5SJeffrey Hugo 	.clkr = {
1381d14b15b5SJeffrey Hugo 		.enable_reg = 0x2324,
1382d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1383d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1384d14b15b5SJeffrey Hugo 			.name = "mdss_extpclk_clk",
1385d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &extpclk_clk_src.clkr.hw },
1386d14b15b5SJeffrey Hugo 			.num_parents = 1,
1387d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1388d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1389d14b15b5SJeffrey Hugo 		},
1390d14b15b5SJeffrey Hugo 	},
1391d14b15b5SJeffrey Hugo };
1392d14b15b5SJeffrey Hugo 
1393d14b15b5SJeffrey Hugo static struct clk_branch mdss_vsync_clk = {
1394d14b15b5SJeffrey Hugo 	.halt_reg = 0x2328,
1395d14b15b5SJeffrey Hugo 	.clkr = {
1396d14b15b5SJeffrey Hugo 		.enable_reg = 0x2328,
1397d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1398d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1399d14b15b5SJeffrey Hugo 			.name = "mdss_vsync_clk",
1400d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &vsync_clk_src.clkr.hw },
1401d14b15b5SJeffrey Hugo 			.num_parents = 1,
1402d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1403d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1404d14b15b5SJeffrey Hugo 		},
1405d14b15b5SJeffrey Hugo 	},
1406d14b15b5SJeffrey Hugo };
1407d14b15b5SJeffrey Hugo 
1408d14b15b5SJeffrey Hugo static struct clk_branch mdss_hdmi_clk = {
1409d14b15b5SJeffrey Hugo 	.halt_reg = 0x2338,
1410d14b15b5SJeffrey Hugo 	.clkr = {
1411d14b15b5SJeffrey Hugo 		.enable_reg = 0x2338,
1412d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1413d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1414d14b15b5SJeffrey Hugo 			.name = "mdss_hdmi_clk",
1415d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &hdmi_clk_src.clkr.hw },
1416d14b15b5SJeffrey Hugo 			.num_parents = 1,
1417d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1418d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1419d14b15b5SJeffrey Hugo 		},
1420d14b15b5SJeffrey Hugo 	},
1421d14b15b5SJeffrey Hugo };
1422d14b15b5SJeffrey Hugo 
1423d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte0_clk = {
1424d14b15b5SJeffrey Hugo 	.halt_reg = 0x233c,
1425d14b15b5SJeffrey Hugo 	.clkr = {
1426d14b15b5SJeffrey Hugo 		.enable_reg = 0x233c,
1427d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1428d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1429d14b15b5SJeffrey Hugo 			.name = "mdss_byte0_clk",
1430d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &byte0_clk_src.clkr.hw },
1431d14b15b5SJeffrey Hugo 			.num_parents = 1,
1432d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1433d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1434d14b15b5SJeffrey Hugo 		},
1435d14b15b5SJeffrey Hugo 	},
1436d14b15b5SJeffrey Hugo };
1437d14b15b5SJeffrey Hugo 
1438d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte1_clk = {
1439d14b15b5SJeffrey Hugo 	.halt_reg = 0x2340,
1440d14b15b5SJeffrey Hugo 	.clkr = {
1441d14b15b5SJeffrey Hugo 		.enable_reg = 0x2340,
1442d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1443d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1444d14b15b5SJeffrey Hugo 			.name = "mdss_byte1_clk",
1445d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &byte1_clk_src.clkr.hw },
1446d14b15b5SJeffrey Hugo 			.num_parents = 1,
1447d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1448d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1449d14b15b5SJeffrey Hugo 		},
1450d14b15b5SJeffrey Hugo 	},
1451d14b15b5SJeffrey Hugo };
1452d14b15b5SJeffrey Hugo 
1453d14b15b5SJeffrey Hugo static struct clk_branch mdss_esc0_clk = {
1454d14b15b5SJeffrey Hugo 	.halt_reg = 0x2344,
1455d14b15b5SJeffrey Hugo 	.clkr = {
1456d14b15b5SJeffrey Hugo 		.enable_reg = 0x2344,
1457d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1458d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1459d14b15b5SJeffrey Hugo 			.name = "mdss_esc0_clk",
1460d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &esc0_clk_src.clkr.hw },
1461d14b15b5SJeffrey Hugo 			.num_parents = 1,
1462d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1463d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1464d14b15b5SJeffrey Hugo 		},
1465d14b15b5SJeffrey Hugo 	},
1466d14b15b5SJeffrey Hugo };
1467d14b15b5SJeffrey Hugo 
1468d14b15b5SJeffrey Hugo static struct clk_branch mdss_esc1_clk = {
1469d14b15b5SJeffrey Hugo 	.halt_reg = 0x2348,
1470d14b15b5SJeffrey Hugo 	.clkr = {
1471d14b15b5SJeffrey Hugo 		.enable_reg = 0x2348,
1472d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1473d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1474d14b15b5SJeffrey Hugo 			.name = "mdss_esc1_clk",
1475d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &esc1_clk_src.clkr.hw },
1476d14b15b5SJeffrey Hugo 			.num_parents = 1,
1477d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1478d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1479d14b15b5SJeffrey Hugo 		},
1480d14b15b5SJeffrey Hugo 	},
1481d14b15b5SJeffrey Hugo };
1482d14b15b5SJeffrey Hugo 
1483d14b15b5SJeffrey Hugo static struct clk_branch mdss_rot_clk = {
1484d14b15b5SJeffrey Hugo 	.halt_reg = 0x2350,
1485d14b15b5SJeffrey Hugo 	.clkr = {
1486d14b15b5SJeffrey Hugo 		.enable_reg = 0x2350,
1487d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1488d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1489d14b15b5SJeffrey Hugo 			.name = "mdss_rot_clk",
1490d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &rot_clk_src.clkr.hw },
1491d14b15b5SJeffrey Hugo 			.num_parents = 1,
1492d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1493d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1494d14b15b5SJeffrey Hugo 		},
1495d14b15b5SJeffrey Hugo 	},
1496d14b15b5SJeffrey Hugo };
1497d14b15b5SJeffrey Hugo 
1498d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_link_clk = {
1499d14b15b5SJeffrey Hugo 	.halt_reg = 0x2354,
1500d14b15b5SJeffrey Hugo 	.clkr = {
1501d14b15b5SJeffrey Hugo 		.enable_reg = 0x2354,
1502d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1503d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1504d14b15b5SJeffrey Hugo 			.name = "mdss_dp_link_clk",
1505d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &dp_link_clk_src.clkr.hw },
1506d14b15b5SJeffrey Hugo 			.num_parents = 1,
1507d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1508d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1509d14b15b5SJeffrey Hugo 		},
1510d14b15b5SJeffrey Hugo 	},
1511d14b15b5SJeffrey Hugo };
1512d14b15b5SJeffrey Hugo 
1513d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_link_intf_clk = {
1514d14b15b5SJeffrey Hugo 	.halt_reg = 0x2358,
1515d14b15b5SJeffrey Hugo 	.clkr = {
1516d14b15b5SJeffrey Hugo 		.enable_reg = 0x2358,
1517d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1518d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1519d14b15b5SJeffrey Hugo 			.name = "mdss_dp_link_intf_clk",
1520d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &dp_link_clk_src.clkr.hw },
1521d14b15b5SJeffrey Hugo 			.num_parents = 1,
1522d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1523d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1524d14b15b5SJeffrey Hugo 		},
1525d14b15b5SJeffrey Hugo 	},
1526d14b15b5SJeffrey Hugo };
1527d14b15b5SJeffrey Hugo 
1528d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_crypto_clk = {
1529d14b15b5SJeffrey Hugo 	.halt_reg = 0x235c,
1530d14b15b5SJeffrey Hugo 	.clkr = {
1531d14b15b5SJeffrey Hugo 		.enable_reg = 0x235c,
1532d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1533d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1534d14b15b5SJeffrey Hugo 			.name = "mdss_dp_crypto_clk",
1535d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &dp_crypto_clk_src.clkr.hw },
1536d14b15b5SJeffrey Hugo 			.num_parents = 1,
1537d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1538d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1539d14b15b5SJeffrey Hugo 		},
1540d14b15b5SJeffrey Hugo 	},
1541d14b15b5SJeffrey Hugo };
1542d14b15b5SJeffrey Hugo 
1543d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_pixel_clk = {
1544d14b15b5SJeffrey Hugo 	.halt_reg = 0x2360,
1545d14b15b5SJeffrey Hugo 	.clkr = {
1546d14b15b5SJeffrey Hugo 		.enable_reg = 0x2360,
1547d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1548d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1549d14b15b5SJeffrey Hugo 			.name = "mdss_dp_pixel_clk",
1550d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &dp_pixel_clk_src.clkr.hw },
1551d14b15b5SJeffrey Hugo 			.num_parents = 1,
1552d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1553d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1554d14b15b5SJeffrey Hugo 		},
1555d14b15b5SJeffrey Hugo 	},
1556d14b15b5SJeffrey Hugo };
1557d14b15b5SJeffrey Hugo 
1558d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_aux_clk = {
1559d14b15b5SJeffrey Hugo 	.halt_reg = 0x2364,
1560d14b15b5SJeffrey Hugo 	.clkr = {
1561d14b15b5SJeffrey Hugo 		.enable_reg = 0x2364,
1562d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1563d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1564d14b15b5SJeffrey Hugo 			.name = "mdss_dp_aux_clk",
1565d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &dp_aux_clk_src.clkr.hw },
1566d14b15b5SJeffrey Hugo 			.num_parents = 1,
1567d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1568d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1569d14b15b5SJeffrey Hugo 		},
1570d14b15b5SJeffrey Hugo 	},
1571d14b15b5SJeffrey Hugo };
1572d14b15b5SJeffrey Hugo 
1573d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte0_intf_clk = {
1574d14b15b5SJeffrey Hugo 	.halt_reg = 0x2374,
1575d14b15b5SJeffrey Hugo 	.clkr = {
1576d14b15b5SJeffrey Hugo 		.enable_reg = 0x2374,
1577d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1578d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1579d14b15b5SJeffrey Hugo 			.name = "mdss_byte0_intf_clk",
1580d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &byte0_clk_src.clkr.hw },
1581d14b15b5SJeffrey Hugo 			.num_parents = 1,
1582d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1583d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1584d14b15b5SJeffrey Hugo 		},
1585d14b15b5SJeffrey Hugo 	},
1586d14b15b5SJeffrey Hugo };
1587d14b15b5SJeffrey Hugo 
1588d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte1_intf_clk = {
1589d14b15b5SJeffrey Hugo 	.halt_reg = 0x2378,
1590d14b15b5SJeffrey Hugo 	.clkr = {
1591d14b15b5SJeffrey Hugo 		.enable_reg = 0x2378,
1592d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1593d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1594d14b15b5SJeffrey Hugo 			.name = "mdss_byte1_intf_clk",
1595d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &byte1_clk_src.clkr.hw },
1596d14b15b5SJeffrey Hugo 			.num_parents = 1,
1597d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1598d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1599d14b15b5SJeffrey Hugo 		},
1600d14b15b5SJeffrey Hugo 	},
1601d14b15b5SJeffrey Hugo };
1602d14b15b5SJeffrey Hugo 
1603d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0phytimer_clk = {
1604d14b15b5SJeffrey Hugo 	.halt_reg = 0x3024,
1605d14b15b5SJeffrey Hugo 	.clkr = {
1606d14b15b5SJeffrey Hugo 		.enable_reg = 0x3024,
1607d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1608d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1609d14b15b5SJeffrey Hugo 			.name = "camss_csi0phytimer_clk",
1610d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi0phytimer_clk_src.clkr.hw },
1611d14b15b5SJeffrey Hugo 			.num_parents = 1,
1612d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1613d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1614d14b15b5SJeffrey Hugo 		},
1615d14b15b5SJeffrey Hugo 	},
1616d14b15b5SJeffrey Hugo };
1617d14b15b5SJeffrey Hugo 
1618d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1phytimer_clk = {
1619d14b15b5SJeffrey Hugo 	.halt_reg = 0x3054,
1620d14b15b5SJeffrey Hugo 	.clkr = {
1621d14b15b5SJeffrey Hugo 		.enable_reg = 0x3054,
1622d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1623d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1624d14b15b5SJeffrey Hugo 			.name = "camss_csi1phytimer_clk",
1625d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi1phytimer_clk_src.clkr.hw },
1626d14b15b5SJeffrey Hugo 			.num_parents = 1,
1627d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1628d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1629d14b15b5SJeffrey Hugo 		},
1630d14b15b5SJeffrey Hugo 	},
1631d14b15b5SJeffrey Hugo };
1632d14b15b5SJeffrey Hugo 
1633d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2phytimer_clk = {
1634d14b15b5SJeffrey Hugo 	.halt_reg = 0x3084,
1635d14b15b5SJeffrey Hugo 	.clkr = {
1636d14b15b5SJeffrey Hugo 		.enable_reg = 0x3084,
1637d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1638d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1639d14b15b5SJeffrey Hugo 			.name = "camss_csi2phytimer_clk",
1640d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi2phytimer_clk_src.clkr.hw },
1641d14b15b5SJeffrey Hugo 			.num_parents = 1,
1642d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1643d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1644d14b15b5SJeffrey Hugo 		},
1645d14b15b5SJeffrey Hugo 	},
1646d14b15b5SJeffrey Hugo };
1647d14b15b5SJeffrey Hugo 
1648d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0_clk = {
1649d14b15b5SJeffrey Hugo 	.halt_reg = 0x30b4,
1650d14b15b5SJeffrey Hugo 	.clkr = {
1651d14b15b5SJeffrey Hugo 		.enable_reg = 0x30b4,
1652d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1653d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1654d14b15b5SJeffrey Hugo 			.name = "camss_csi0_clk",
1655d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi0_clk_src.clkr.hw },
1656d14b15b5SJeffrey Hugo 			.num_parents = 1,
1657d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1658d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1659d14b15b5SJeffrey Hugo 		},
1660d14b15b5SJeffrey Hugo 	},
1661d14b15b5SJeffrey Hugo };
1662d14b15b5SJeffrey Hugo 
1663d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0_ahb_clk = {
1664d14b15b5SJeffrey Hugo 	.halt_reg = 0x30bc,
1665d14b15b5SJeffrey Hugo 	.clkr = {
1666d14b15b5SJeffrey Hugo 		.enable_reg = 0x30bc,
1667d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1668d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1669d14b15b5SJeffrey Hugo 			.name = "camss_csi0_ahb_clk",
1670d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1671d14b15b5SJeffrey Hugo 			.num_parents = 1,
1672d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1673d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1674d14b15b5SJeffrey Hugo 		},
1675d14b15b5SJeffrey Hugo 	},
1676d14b15b5SJeffrey Hugo };
1677d14b15b5SJeffrey Hugo 
1678d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0rdi_clk = {
1679d14b15b5SJeffrey Hugo 	.halt_reg = 0x30d4,
1680d14b15b5SJeffrey Hugo 	.clkr = {
1681d14b15b5SJeffrey Hugo 		.enable_reg = 0x30d4,
1682d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1683d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1684d14b15b5SJeffrey Hugo 			.name = "camss_csi0rdi_clk",
1685d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi0_clk_src.clkr.hw },
1686d14b15b5SJeffrey Hugo 			.num_parents = 1,
1687d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1688d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1689d14b15b5SJeffrey Hugo 		},
1690d14b15b5SJeffrey Hugo 	},
1691d14b15b5SJeffrey Hugo };
1692d14b15b5SJeffrey Hugo 
1693d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0pix_clk = {
1694d14b15b5SJeffrey Hugo 	.halt_reg = 0x30e4,
1695d14b15b5SJeffrey Hugo 	.clkr = {
1696d14b15b5SJeffrey Hugo 		.enable_reg = 0x30e4,
1697d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1698d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1699d14b15b5SJeffrey Hugo 			.name = "camss_csi0pix_clk",
1700d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi0_clk_src.clkr.hw },
1701d14b15b5SJeffrey Hugo 			.num_parents = 1,
1702d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1703d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1704d14b15b5SJeffrey Hugo 		},
1705d14b15b5SJeffrey Hugo 	},
1706d14b15b5SJeffrey Hugo };
1707d14b15b5SJeffrey Hugo 
1708d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1_clk = {
1709d14b15b5SJeffrey Hugo 	.halt_reg = 0x3124,
1710d14b15b5SJeffrey Hugo 	.clkr = {
1711d14b15b5SJeffrey Hugo 		.enable_reg = 0x3124,
1712d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1713d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1714d14b15b5SJeffrey Hugo 			.name = "camss_csi1_clk",
1715d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi1_clk_src.clkr.hw },
1716d14b15b5SJeffrey Hugo 			.num_parents = 1,
1717d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1718d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1719d14b15b5SJeffrey Hugo 		},
1720d14b15b5SJeffrey Hugo 	},
1721d14b15b5SJeffrey Hugo };
1722d14b15b5SJeffrey Hugo 
1723d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1_ahb_clk = {
1724d14b15b5SJeffrey Hugo 	.halt_reg = 0x3128,
1725d14b15b5SJeffrey Hugo 	.clkr = {
1726d14b15b5SJeffrey Hugo 		.enable_reg = 0x3128,
1727d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1728d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1729d14b15b5SJeffrey Hugo 			.name = "camss_csi1_ahb_clk",
1730d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1731d14b15b5SJeffrey Hugo 			.num_parents = 1,
1732d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1733d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1734d14b15b5SJeffrey Hugo 		},
1735d14b15b5SJeffrey Hugo 	},
1736d14b15b5SJeffrey Hugo };
1737d14b15b5SJeffrey Hugo 
1738d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1rdi_clk = {
1739d14b15b5SJeffrey Hugo 	.halt_reg = 0x3144,
1740d14b15b5SJeffrey Hugo 	.clkr = {
1741d14b15b5SJeffrey Hugo 		.enable_reg = 0x3144,
1742d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1743d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1744d14b15b5SJeffrey Hugo 			.name = "camss_csi1rdi_clk",
1745d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi1_clk_src.clkr.hw },
1746d14b15b5SJeffrey Hugo 			.num_parents = 1,
1747d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1748d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1749d14b15b5SJeffrey Hugo 		},
1750d14b15b5SJeffrey Hugo 	},
1751d14b15b5SJeffrey Hugo };
1752d14b15b5SJeffrey Hugo 
1753d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1pix_clk = {
1754d14b15b5SJeffrey Hugo 	.halt_reg = 0x3154,
1755d14b15b5SJeffrey Hugo 	.clkr = {
1756d14b15b5SJeffrey Hugo 		.enable_reg = 0x3154,
1757d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1758d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1759d14b15b5SJeffrey Hugo 			.name = "camss_csi1pix_clk",
1760d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi1_clk_src.clkr.hw },
1761d14b15b5SJeffrey Hugo 			.num_parents = 1,
1762d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1763d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1764d14b15b5SJeffrey Hugo 		},
1765d14b15b5SJeffrey Hugo 	},
1766d14b15b5SJeffrey Hugo };
1767d14b15b5SJeffrey Hugo 
1768d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2_clk = {
1769d14b15b5SJeffrey Hugo 	.halt_reg = 0x3184,
1770d14b15b5SJeffrey Hugo 	.clkr = {
1771d14b15b5SJeffrey Hugo 		.enable_reg = 0x3184,
1772d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1773d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1774d14b15b5SJeffrey Hugo 			.name = "camss_csi2_clk",
1775d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi2_clk_src.clkr.hw },
1776d14b15b5SJeffrey Hugo 			.num_parents = 1,
1777d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1778d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1779d14b15b5SJeffrey Hugo 		},
1780d14b15b5SJeffrey Hugo 	},
1781d14b15b5SJeffrey Hugo };
1782d14b15b5SJeffrey Hugo 
1783d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2_ahb_clk = {
1784d14b15b5SJeffrey Hugo 	.halt_reg = 0x3188,
1785d14b15b5SJeffrey Hugo 	.clkr = {
1786d14b15b5SJeffrey Hugo 		.enable_reg = 0x3188,
1787d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1788d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1789d14b15b5SJeffrey Hugo 			.name = "camss_csi2_ahb_clk",
1790d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1791d14b15b5SJeffrey Hugo 			.num_parents = 1,
1792d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1793d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1794d14b15b5SJeffrey Hugo 		},
1795d14b15b5SJeffrey Hugo 	},
1796d14b15b5SJeffrey Hugo };
1797d14b15b5SJeffrey Hugo 
1798d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2rdi_clk = {
1799d14b15b5SJeffrey Hugo 	.halt_reg = 0x31a4,
1800d14b15b5SJeffrey Hugo 	.clkr = {
1801d14b15b5SJeffrey Hugo 		.enable_reg = 0x31a4,
1802d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1803d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1804d14b15b5SJeffrey Hugo 			.name = "camss_csi2rdi_clk",
1805d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi2_clk_src.clkr.hw },
1806d14b15b5SJeffrey Hugo 			.num_parents = 1,
1807d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1808d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1809d14b15b5SJeffrey Hugo 		},
1810d14b15b5SJeffrey Hugo 	},
1811d14b15b5SJeffrey Hugo };
1812d14b15b5SJeffrey Hugo 
1813d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2pix_clk = {
1814d14b15b5SJeffrey Hugo 	.halt_reg = 0x31b4,
1815d14b15b5SJeffrey Hugo 	.clkr = {
1816d14b15b5SJeffrey Hugo 		.enable_reg = 0x31b4,
1817d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1818d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1819d14b15b5SJeffrey Hugo 			.name = "camss_csi2pix_clk",
1820d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi2_clk_src.clkr.hw },
1821d14b15b5SJeffrey Hugo 			.num_parents = 1,
1822d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1823d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1824d14b15b5SJeffrey Hugo 		},
1825d14b15b5SJeffrey Hugo 	},
1826d14b15b5SJeffrey Hugo };
1827d14b15b5SJeffrey Hugo 
1828d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3_clk = {
1829d14b15b5SJeffrey Hugo 	.halt_reg = 0x31e4,
1830d14b15b5SJeffrey Hugo 	.clkr = {
1831d14b15b5SJeffrey Hugo 		.enable_reg = 0x31e4,
1832d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1833d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1834d14b15b5SJeffrey Hugo 			.name = "camss_csi3_clk",
1835d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi3_clk_src.clkr.hw },
1836d14b15b5SJeffrey Hugo 			.num_parents = 1,
1837d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1838d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1839d14b15b5SJeffrey Hugo 		},
1840d14b15b5SJeffrey Hugo 	},
1841d14b15b5SJeffrey Hugo };
1842d14b15b5SJeffrey Hugo 
1843d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3_ahb_clk = {
1844d14b15b5SJeffrey Hugo 	.halt_reg = 0x31e8,
1845d14b15b5SJeffrey Hugo 	.clkr = {
1846d14b15b5SJeffrey Hugo 		.enable_reg = 0x31e8,
1847d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1848d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1849d14b15b5SJeffrey Hugo 			.name = "camss_csi3_ahb_clk",
1850d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1851d14b15b5SJeffrey Hugo 			.num_parents = 1,
1852d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1853d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1854d14b15b5SJeffrey Hugo 		},
1855d14b15b5SJeffrey Hugo 	},
1856d14b15b5SJeffrey Hugo };
1857d14b15b5SJeffrey Hugo 
1858d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3rdi_clk = {
1859d14b15b5SJeffrey Hugo 	.halt_reg = 0x3204,
1860d14b15b5SJeffrey Hugo 	.clkr = {
1861d14b15b5SJeffrey Hugo 		.enable_reg = 0x3204,
1862d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1863d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1864d14b15b5SJeffrey Hugo 			.name = "camss_csi3rdi_clk",
1865d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi3_clk_src.clkr.hw },
1866d14b15b5SJeffrey Hugo 			.num_parents = 1,
1867d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1868d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1869d14b15b5SJeffrey Hugo 		},
1870d14b15b5SJeffrey Hugo 	},
1871d14b15b5SJeffrey Hugo };
1872d14b15b5SJeffrey Hugo 
1873d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3pix_clk = {
1874d14b15b5SJeffrey Hugo 	.halt_reg = 0x3214,
1875d14b15b5SJeffrey Hugo 	.clkr = {
1876d14b15b5SJeffrey Hugo 		.enable_reg = 0x3214,
1877d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1878d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1879d14b15b5SJeffrey Hugo 			.name = "camss_csi3pix_clk",
1880d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csi3_clk_src.clkr.hw },
1881d14b15b5SJeffrey Hugo 			.num_parents = 1,
1882d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1883d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1884d14b15b5SJeffrey Hugo 		},
1885d14b15b5SJeffrey Hugo 	},
1886d14b15b5SJeffrey Hugo };
1887d14b15b5SJeffrey Hugo 
1888d14b15b5SJeffrey Hugo static struct clk_branch camss_ispif_ahb_clk = {
1889d14b15b5SJeffrey Hugo 	.halt_reg = 0x3224,
1890d14b15b5SJeffrey Hugo 	.clkr = {
1891d14b15b5SJeffrey Hugo 		.enable_reg = 0x3224,
1892d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1893d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1894d14b15b5SJeffrey Hugo 			.name = "camss_ispif_ahb_clk",
1895d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1896d14b15b5SJeffrey Hugo 			.num_parents = 1,
1897d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1898d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1899d14b15b5SJeffrey Hugo 		},
1900d14b15b5SJeffrey Hugo 	},
1901d14b15b5SJeffrey Hugo };
1902d14b15b5SJeffrey Hugo 
1903d14b15b5SJeffrey Hugo static struct clk_branch camss_cci_clk = {
1904d14b15b5SJeffrey Hugo 	.halt_reg = 0x3344,
1905d14b15b5SJeffrey Hugo 	.clkr = {
1906d14b15b5SJeffrey Hugo 		.enable_reg = 0x3344,
1907d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1908d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1909d14b15b5SJeffrey Hugo 			.name = "camss_cci_clk",
1910d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &cci_clk_src.clkr.hw },
1911d14b15b5SJeffrey Hugo 			.num_parents = 1,
1912d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1913d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1914d14b15b5SJeffrey Hugo 		},
1915d14b15b5SJeffrey Hugo 	},
1916d14b15b5SJeffrey Hugo };
1917d14b15b5SJeffrey Hugo 
1918d14b15b5SJeffrey Hugo static struct clk_branch camss_cci_ahb_clk = {
1919d14b15b5SJeffrey Hugo 	.halt_reg = 0x3348,
1920d14b15b5SJeffrey Hugo 	.clkr = {
1921d14b15b5SJeffrey Hugo 		.enable_reg = 0x3348,
1922d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1923d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1924d14b15b5SJeffrey Hugo 			.name = "camss_cci_ahb_clk",
1925d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
1926d14b15b5SJeffrey Hugo 			.num_parents = 1,
1927d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1928d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1929d14b15b5SJeffrey Hugo 		},
1930d14b15b5SJeffrey Hugo 	},
1931d14b15b5SJeffrey Hugo };
1932d14b15b5SJeffrey Hugo 
1933d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk0_clk = {
1934d14b15b5SJeffrey Hugo 	.halt_reg = 0x3384,
1935d14b15b5SJeffrey Hugo 	.clkr = {
1936d14b15b5SJeffrey Hugo 		.enable_reg = 0x3384,
1937d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1938d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1939d14b15b5SJeffrey Hugo 			.name = "camss_mclk0_clk",
1940d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &mclk0_clk_src.clkr.hw },
1941d14b15b5SJeffrey Hugo 			.num_parents = 1,
1942d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1943d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1944d14b15b5SJeffrey Hugo 		},
1945d14b15b5SJeffrey Hugo 	},
1946d14b15b5SJeffrey Hugo };
1947d14b15b5SJeffrey Hugo 
1948d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk1_clk = {
1949d14b15b5SJeffrey Hugo 	.halt_reg = 0x33b4,
1950d14b15b5SJeffrey Hugo 	.clkr = {
1951d14b15b5SJeffrey Hugo 		.enable_reg = 0x33b4,
1952d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1953d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1954d14b15b5SJeffrey Hugo 			.name = "camss_mclk1_clk",
1955d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &mclk1_clk_src.clkr.hw },
1956d14b15b5SJeffrey Hugo 			.num_parents = 1,
1957d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1958d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1959d14b15b5SJeffrey Hugo 		},
1960d14b15b5SJeffrey Hugo 	},
1961d14b15b5SJeffrey Hugo };
1962d14b15b5SJeffrey Hugo 
1963d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk2_clk = {
1964d14b15b5SJeffrey Hugo 	.halt_reg = 0x33e4,
1965d14b15b5SJeffrey Hugo 	.clkr = {
1966d14b15b5SJeffrey Hugo 		.enable_reg = 0x33e4,
1967d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1968d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1969d14b15b5SJeffrey Hugo 			.name = "camss_mclk2_clk",
1970d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &mclk2_clk_src.clkr.hw },
1971d14b15b5SJeffrey Hugo 			.num_parents = 1,
1972d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1973d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1974d14b15b5SJeffrey Hugo 		},
1975d14b15b5SJeffrey Hugo 	},
1976d14b15b5SJeffrey Hugo };
1977d14b15b5SJeffrey Hugo 
1978d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk3_clk = {
1979d14b15b5SJeffrey Hugo 	.halt_reg = 0x3414,
1980d14b15b5SJeffrey Hugo 	.clkr = {
1981d14b15b5SJeffrey Hugo 		.enable_reg = 0x3414,
1982d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1983d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1984d14b15b5SJeffrey Hugo 			.name = "camss_mclk3_clk",
1985d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &mclk3_clk_src.clkr.hw },
1986d14b15b5SJeffrey Hugo 			.num_parents = 1,
1987d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
1988d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
1989d14b15b5SJeffrey Hugo 		},
1990d14b15b5SJeffrey Hugo 	},
1991d14b15b5SJeffrey Hugo };
1992d14b15b5SJeffrey Hugo 
1993d14b15b5SJeffrey Hugo static struct clk_branch camss_top_ahb_clk = {
1994d14b15b5SJeffrey Hugo 	.halt_reg = 0x3484,
1995d14b15b5SJeffrey Hugo 	.clkr = {
1996d14b15b5SJeffrey Hugo 		.enable_reg = 0x3484,
1997d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
1998d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
1999d14b15b5SJeffrey Hugo 			.name = "camss_top_ahb_clk",
2000d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2001d14b15b5SJeffrey Hugo 			.num_parents = 1,
2002d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2003d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2004d14b15b5SJeffrey Hugo 		},
2005d14b15b5SJeffrey Hugo 	},
2006d14b15b5SJeffrey Hugo };
2007d14b15b5SJeffrey Hugo 
2008d14b15b5SJeffrey Hugo static struct clk_branch camss_ahb_clk = {
2009d14b15b5SJeffrey Hugo 	.halt_reg = 0x348c,
2010d14b15b5SJeffrey Hugo 	.clkr = {
2011d14b15b5SJeffrey Hugo 		.enable_reg = 0x348c,
2012d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2013d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2014d14b15b5SJeffrey Hugo 			.name = "camss_ahb_clk",
2015d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2016d14b15b5SJeffrey Hugo 			.num_parents = 1,
2017d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2018d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2019d14b15b5SJeffrey Hugo 		},
2020d14b15b5SJeffrey Hugo 	},
2021d14b15b5SJeffrey Hugo };
2022d14b15b5SJeffrey Hugo 
2023d14b15b5SJeffrey Hugo static struct clk_branch camss_micro_ahb_clk = {
2024d14b15b5SJeffrey Hugo 	.halt_reg = 0x3494,
2025d14b15b5SJeffrey Hugo 	.clkr = {
2026d14b15b5SJeffrey Hugo 		.enable_reg = 0x3494,
2027d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2028d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2029d14b15b5SJeffrey Hugo 			.name = "camss_micro_ahb_clk",
2030d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2031d14b15b5SJeffrey Hugo 			.num_parents = 1,
2032d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2033d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2034d14b15b5SJeffrey Hugo 		},
2035d14b15b5SJeffrey Hugo 	},
2036d14b15b5SJeffrey Hugo };
2037d14b15b5SJeffrey Hugo 
2038d14b15b5SJeffrey Hugo static struct clk_branch camss_jpeg0_clk = {
2039d14b15b5SJeffrey Hugo 	.halt_reg = 0x35a8,
2040d14b15b5SJeffrey Hugo 	.clkr = {
2041d14b15b5SJeffrey Hugo 		.enable_reg = 0x35a8,
2042d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2043d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2044d14b15b5SJeffrey Hugo 			.name = "camss_jpeg0_clk",
2045d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &jpeg0_clk_src.clkr.hw },
2046d14b15b5SJeffrey Hugo 			.num_parents = 1,
2047d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2048d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2049d14b15b5SJeffrey Hugo 		},
2050d14b15b5SJeffrey Hugo 	},
2051d14b15b5SJeffrey Hugo };
2052d14b15b5SJeffrey Hugo 
2053d14b15b5SJeffrey Hugo static struct clk_branch camss_jpeg_ahb_clk = {
2054d14b15b5SJeffrey Hugo 	.halt_reg = 0x35b4,
2055d14b15b5SJeffrey Hugo 	.clkr = {
2056d14b15b5SJeffrey Hugo 		.enable_reg = 0x35b4,
2057d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2058d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2059d14b15b5SJeffrey Hugo 			.name = "camss_jpeg_ahb_clk",
2060d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2061d14b15b5SJeffrey Hugo 			.num_parents = 1,
2062d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2063d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2064d14b15b5SJeffrey Hugo 		},
2065d14b15b5SJeffrey Hugo 	},
2066d14b15b5SJeffrey Hugo };
2067d14b15b5SJeffrey Hugo 
2068d14b15b5SJeffrey Hugo static struct clk_branch camss_jpeg_axi_clk = {
2069d14b15b5SJeffrey Hugo 	.halt_reg = 0x35b8,
2070d14b15b5SJeffrey Hugo 	.clkr = {
2071d14b15b5SJeffrey Hugo 		.enable_reg = 0x35b8,
2072d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2073d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2074d14b15b5SJeffrey Hugo 			.name = "camss_jpeg_axi_clk",
2075d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw },
2076d14b15b5SJeffrey Hugo 			.num_parents = 1,
2077d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2078d14b15b5SJeffrey Hugo 		},
2079d14b15b5SJeffrey Hugo 	},
2080d14b15b5SJeffrey Hugo };
2081d14b15b5SJeffrey Hugo 
2082d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe0_ahb_clk = {
2083d14b15b5SJeffrey Hugo 	.halt_reg = 0x3668,
2084d14b15b5SJeffrey Hugo 	.clkr = {
2085d14b15b5SJeffrey Hugo 		.enable_reg = 0x3668,
2086d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2087d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2088d14b15b5SJeffrey Hugo 			.name = "camss_vfe0_ahb_clk",
2089d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2090d14b15b5SJeffrey Hugo 			.num_parents = 1,
2091d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2092d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2093d14b15b5SJeffrey Hugo 		},
2094d14b15b5SJeffrey Hugo 	},
2095d14b15b5SJeffrey Hugo };
2096d14b15b5SJeffrey Hugo 
2097d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe1_ahb_clk = {
2098d14b15b5SJeffrey Hugo 	.halt_reg = 0x3678,
2099d14b15b5SJeffrey Hugo 	.clkr = {
2100d14b15b5SJeffrey Hugo 		.enable_reg = 0x3678,
2101d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2102d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2103d14b15b5SJeffrey Hugo 			.name = "camss_vfe1_ahb_clk",
2104d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2105d14b15b5SJeffrey Hugo 			.num_parents = 1,
2106d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2107d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2108d14b15b5SJeffrey Hugo 		},
2109d14b15b5SJeffrey Hugo 	},
2110d14b15b5SJeffrey Hugo };
2111d14b15b5SJeffrey Hugo 
2112d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe0_clk = {
2113d14b15b5SJeffrey Hugo 	.halt_reg = 0x36a8,
2114d14b15b5SJeffrey Hugo 	.clkr = {
2115d14b15b5SJeffrey Hugo 		.enable_reg = 0x36a8,
2116d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2117d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2118d14b15b5SJeffrey Hugo 			.name = "camss_vfe0_clk",
2119d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &vfe0_clk_src.clkr.hw },
2120d14b15b5SJeffrey Hugo 			.num_parents = 1,
2121d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2122d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2123d14b15b5SJeffrey Hugo 		},
2124d14b15b5SJeffrey Hugo 	},
2125d14b15b5SJeffrey Hugo };
2126d14b15b5SJeffrey Hugo 
2127d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe1_clk = {
2128d14b15b5SJeffrey Hugo 	.halt_reg = 0x36ac,
2129d14b15b5SJeffrey Hugo 	.clkr = {
2130d14b15b5SJeffrey Hugo 		.enable_reg = 0x36ac,
2131d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2132d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2133d14b15b5SJeffrey Hugo 			.name = "camss_vfe1_clk",
2134d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &vfe1_clk_src.clkr.hw },
2135d14b15b5SJeffrey Hugo 			.num_parents = 1,
2136d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2137d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2138d14b15b5SJeffrey Hugo 		},
2139d14b15b5SJeffrey Hugo 	},
2140d14b15b5SJeffrey Hugo };
2141d14b15b5SJeffrey Hugo 
2142d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_clk = {
2143d14b15b5SJeffrey Hugo 	.halt_reg = 0x36b0,
2144d14b15b5SJeffrey Hugo 	.clkr = {
2145d14b15b5SJeffrey Hugo 		.enable_reg = 0x36b0,
2146d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2147d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2148d14b15b5SJeffrey Hugo 			.name = "camss_cpp_clk",
2149d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &cpp_clk_src.clkr.hw },
2150d14b15b5SJeffrey Hugo 			.num_parents = 1,
2151d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2152d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2153d14b15b5SJeffrey Hugo 		},
2154d14b15b5SJeffrey Hugo 	},
2155d14b15b5SJeffrey Hugo };
2156d14b15b5SJeffrey Hugo 
2157d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_ahb_clk = {
2158d14b15b5SJeffrey Hugo 	.halt_reg = 0x36b4,
2159d14b15b5SJeffrey Hugo 	.clkr = {
2160d14b15b5SJeffrey Hugo 		.enable_reg = 0x36b4,
2161d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2162d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2163d14b15b5SJeffrey Hugo 			.name = "camss_cpp_ahb_clk",
2164d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2165d14b15b5SJeffrey Hugo 			.num_parents = 1,
2166d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2167d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2168d14b15b5SJeffrey Hugo 		},
2169d14b15b5SJeffrey Hugo 	},
2170d14b15b5SJeffrey Hugo };
2171d14b15b5SJeffrey Hugo 
2172d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe_vbif_ahb_clk = {
2173d14b15b5SJeffrey Hugo 	.halt_reg = 0x36b8,
2174d14b15b5SJeffrey Hugo 	.clkr = {
2175d14b15b5SJeffrey Hugo 		.enable_reg = 0x36b8,
2176d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2177d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2178d14b15b5SJeffrey Hugo 			.name = "camss_vfe_vbif_ahb_clk",
2179d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2180d14b15b5SJeffrey Hugo 			.num_parents = 1,
2181d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2182d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2183d14b15b5SJeffrey Hugo 		},
2184d14b15b5SJeffrey Hugo 	},
2185d14b15b5SJeffrey Hugo };
2186d14b15b5SJeffrey Hugo 
2187d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe_vbif_axi_clk = {
2188d14b15b5SJeffrey Hugo 	.halt_reg = 0x36bc,
2189d14b15b5SJeffrey Hugo 	.clkr = {
2190d14b15b5SJeffrey Hugo 		.enable_reg = 0x36bc,
2191d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2192d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2193d14b15b5SJeffrey Hugo 			.name = "camss_vfe_vbif_axi_clk",
2194d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw },
2195d14b15b5SJeffrey Hugo 			.num_parents = 1,
2196d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2197d14b15b5SJeffrey Hugo 		},
2198d14b15b5SJeffrey Hugo 	},
2199d14b15b5SJeffrey Hugo };
2200d14b15b5SJeffrey Hugo 
2201d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_axi_clk = {
2202d14b15b5SJeffrey Hugo 	.halt_reg = 0x36c4,
2203d14b15b5SJeffrey Hugo 	.clkr = {
2204d14b15b5SJeffrey Hugo 		.enable_reg = 0x36c4,
2205d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2206d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2207d14b15b5SJeffrey Hugo 			.name = "camss_cpp_axi_clk",
2208d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw },
2209d14b15b5SJeffrey Hugo 			.num_parents = 1,
2210d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2211d14b15b5SJeffrey Hugo 		},
2212d14b15b5SJeffrey Hugo 	},
2213d14b15b5SJeffrey Hugo };
2214d14b15b5SJeffrey Hugo 
2215d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_vbif_ahb_clk = {
2216d14b15b5SJeffrey Hugo 	.halt_reg = 0x36c8,
2217d14b15b5SJeffrey Hugo 	.clkr = {
2218d14b15b5SJeffrey Hugo 		.enable_reg = 0x36c8,
2219d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2220d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2221d14b15b5SJeffrey Hugo 			.name = "camss_cpp_vbif_ahb_clk",
2222d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2223d14b15b5SJeffrey Hugo 			.num_parents = 1,
2224d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2225d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2226d14b15b5SJeffrey Hugo 		},
2227d14b15b5SJeffrey Hugo 	},
2228d14b15b5SJeffrey Hugo };
2229d14b15b5SJeffrey Hugo 
2230d14b15b5SJeffrey Hugo static struct clk_branch camss_csi_vfe0_clk = {
2231d14b15b5SJeffrey Hugo 	.halt_reg = 0x3704,
2232d14b15b5SJeffrey Hugo 	.clkr = {
2233d14b15b5SJeffrey Hugo 		.enable_reg = 0x3704,
2234d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2235d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2236d14b15b5SJeffrey Hugo 			.name = "camss_csi_vfe0_clk",
2237d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &vfe0_clk_src.clkr.hw },
2238d14b15b5SJeffrey Hugo 			.num_parents = 1,
2239d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2240d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2241d14b15b5SJeffrey Hugo 		},
2242d14b15b5SJeffrey Hugo 	},
2243d14b15b5SJeffrey Hugo };
2244d14b15b5SJeffrey Hugo 
2245d14b15b5SJeffrey Hugo static struct clk_branch camss_csi_vfe1_clk = {
2246d14b15b5SJeffrey Hugo 	.halt_reg = 0x3714,
2247d14b15b5SJeffrey Hugo 	.clkr = {
2248d14b15b5SJeffrey Hugo 		.enable_reg = 0x3714,
2249d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2250d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2251d14b15b5SJeffrey Hugo 			.name = "camss_csi_vfe1_clk",
2252d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &vfe1_clk_src.clkr.hw },
2253d14b15b5SJeffrey Hugo 			.num_parents = 1,
2254d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2255d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2256d14b15b5SJeffrey Hugo 		},
2257d14b15b5SJeffrey Hugo 	},
2258d14b15b5SJeffrey Hugo };
2259d14b15b5SJeffrey Hugo 
2260d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe0_stream_clk = {
2261d14b15b5SJeffrey Hugo 	.halt_reg = 0x3720,
2262d14b15b5SJeffrey Hugo 	.clkr = {
2263d14b15b5SJeffrey Hugo 		.enable_reg = 0x3720,
2264d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2265d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2266d14b15b5SJeffrey Hugo 			.name = "camss_vfe0_stream_clk",
2267d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &vfe0_clk_src.clkr.hw },
2268d14b15b5SJeffrey Hugo 			.num_parents = 1,
2269d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2270d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2271d14b15b5SJeffrey Hugo 		},
2272d14b15b5SJeffrey Hugo 	},
2273d14b15b5SJeffrey Hugo };
2274d14b15b5SJeffrey Hugo 
2275d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe1_stream_clk = {
2276d14b15b5SJeffrey Hugo 	.halt_reg = 0x3724,
2277d14b15b5SJeffrey Hugo 	.clkr = {
2278d14b15b5SJeffrey Hugo 		.enable_reg = 0x3724,
2279d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2280d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2281d14b15b5SJeffrey Hugo 			.name = "camss_vfe1_stream_clk",
2282d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &vfe1_clk_src.clkr.hw },
2283d14b15b5SJeffrey Hugo 			.num_parents = 1,
2284d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2285d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2286d14b15b5SJeffrey Hugo 		},
2287d14b15b5SJeffrey Hugo 	},
2288d14b15b5SJeffrey Hugo };
2289d14b15b5SJeffrey Hugo 
2290d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid0_clk = {
2291d14b15b5SJeffrey Hugo 	.halt_reg = 0x3730,
2292d14b15b5SJeffrey Hugo 	.clkr = {
2293d14b15b5SJeffrey Hugo 		.enable_reg = 0x3730,
2294d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2295d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2296d14b15b5SJeffrey Hugo 			.name = "camss_cphy_csid0_clk",
2297d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw },
2298d14b15b5SJeffrey Hugo 			.num_parents = 1,
2299d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2300d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2301d14b15b5SJeffrey Hugo 		},
2302d14b15b5SJeffrey Hugo 	},
2303d14b15b5SJeffrey Hugo };
2304d14b15b5SJeffrey Hugo 
2305d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid1_clk = {
2306d14b15b5SJeffrey Hugo 	.halt_reg = 0x3734,
2307d14b15b5SJeffrey Hugo 	.clkr = {
2308d14b15b5SJeffrey Hugo 		.enable_reg = 0x3734,
2309d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2310d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2311d14b15b5SJeffrey Hugo 			.name = "camss_cphy_csid1_clk",
2312d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw },
2313d14b15b5SJeffrey Hugo 			.num_parents = 1,
2314d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2315d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2316d14b15b5SJeffrey Hugo 		},
2317d14b15b5SJeffrey Hugo 	},
2318d14b15b5SJeffrey Hugo };
2319d14b15b5SJeffrey Hugo 
2320d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid2_clk = {
2321d14b15b5SJeffrey Hugo 	.halt_reg = 0x3738,
2322d14b15b5SJeffrey Hugo 	.clkr = {
2323d14b15b5SJeffrey Hugo 		.enable_reg = 0x3738,
2324d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2325d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2326d14b15b5SJeffrey Hugo 			.name = "camss_cphy_csid2_clk",
2327d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw },
2328d14b15b5SJeffrey Hugo 			.num_parents = 1,
2329d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2330d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2331d14b15b5SJeffrey Hugo 		},
2332d14b15b5SJeffrey Hugo 	},
2333d14b15b5SJeffrey Hugo };
2334d14b15b5SJeffrey Hugo 
2335d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid3_clk = {
2336d14b15b5SJeffrey Hugo 	.halt_reg = 0x373c,
2337d14b15b5SJeffrey Hugo 	.clkr = {
2338d14b15b5SJeffrey Hugo 		.enable_reg = 0x373c,
2339d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2340d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2341d14b15b5SJeffrey Hugo 			.name = "camss_cphy_csid3_clk",
2342d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw },
2343d14b15b5SJeffrey Hugo 			.num_parents = 1,
2344d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2345d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2346d14b15b5SJeffrey Hugo 		},
2347d14b15b5SJeffrey Hugo 	},
2348d14b15b5SJeffrey Hugo };
2349d14b15b5SJeffrey Hugo 
2350d14b15b5SJeffrey Hugo static struct clk_branch camss_csiphy0_clk = {
2351d14b15b5SJeffrey Hugo 	.halt_reg = 0x3740,
2352d14b15b5SJeffrey Hugo 	.clkr = {
2353d14b15b5SJeffrey Hugo 		.enable_reg = 0x3740,
2354d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2355d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2356d14b15b5SJeffrey Hugo 			.name = "camss_csiphy0_clk",
2357d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw },
2358d14b15b5SJeffrey Hugo 			.num_parents = 1,
2359d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2360d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2361d14b15b5SJeffrey Hugo 		},
2362d14b15b5SJeffrey Hugo 	},
2363d14b15b5SJeffrey Hugo };
2364d14b15b5SJeffrey Hugo 
2365d14b15b5SJeffrey Hugo static struct clk_branch camss_csiphy1_clk = {
2366d14b15b5SJeffrey Hugo 	.halt_reg = 0x3744,
2367d14b15b5SJeffrey Hugo 	.clkr = {
2368d14b15b5SJeffrey Hugo 		.enable_reg = 0x3744,
2369d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2370d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2371d14b15b5SJeffrey Hugo 			.name = "camss_csiphy1_clk",
2372d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw },
2373d14b15b5SJeffrey Hugo 			.num_parents = 1,
2374d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2375d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2376d14b15b5SJeffrey Hugo 		},
2377d14b15b5SJeffrey Hugo 	},
2378d14b15b5SJeffrey Hugo };
2379d14b15b5SJeffrey Hugo 
2380d14b15b5SJeffrey Hugo static struct clk_branch camss_csiphy2_clk = {
2381d14b15b5SJeffrey Hugo 	.halt_reg = 0x3748,
2382d14b15b5SJeffrey Hugo 	.clkr = {
2383d14b15b5SJeffrey Hugo 		.enable_reg = 0x3748,
2384d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2385d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2386d14b15b5SJeffrey Hugo 			.name = "camss_csiphy2_clk",
2387d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw },
2388d14b15b5SJeffrey Hugo 			.num_parents = 1,
2389d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2390d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2391d14b15b5SJeffrey Hugo 		},
2392d14b15b5SJeffrey Hugo 	},
2393d14b15b5SJeffrey Hugo };
2394d14b15b5SJeffrey Hugo 
2395d14b15b5SJeffrey Hugo static struct clk_branch fd_core_clk = {
2396d14b15b5SJeffrey Hugo 	.halt_reg = 0x3b68,
2397d14b15b5SJeffrey Hugo 	.clkr = {
2398d14b15b5SJeffrey Hugo 		.enable_reg = 0x3b68,
2399d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2400d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2401d14b15b5SJeffrey Hugo 			.name = "fd_core_clk",
2402d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &fd_core_clk_src.clkr.hw },
2403d14b15b5SJeffrey Hugo 			.num_parents = 1,
2404d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2405d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2406d14b15b5SJeffrey Hugo 		},
2407d14b15b5SJeffrey Hugo 	},
2408d14b15b5SJeffrey Hugo };
2409d14b15b5SJeffrey Hugo 
2410d14b15b5SJeffrey Hugo static struct clk_branch fd_core_uar_clk = {
2411d14b15b5SJeffrey Hugo 	.halt_reg = 0x3b6c,
2412d14b15b5SJeffrey Hugo 	.clkr = {
2413d14b15b5SJeffrey Hugo 		.enable_reg = 0x3b6c,
2414d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2415d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2416d14b15b5SJeffrey Hugo 			.name = "fd_core_uar_clk",
2417d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &fd_core_clk_src.clkr.hw },
2418d14b15b5SJeffrey Hugo 			.num_parents = 1,
2419d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2420d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2421d14b15b5SJeffrey Hugo 		},
2422d14b15b5SJeffrey Hugo 	},
2423d14b15b5SJeffrey Hugo };
2424d14b15b5SJeffrey Hugo 
2425d14b15b5SJeffrey Hugo static struct clk_branch fd_ahb_clk = {
2426d14b15b5SJeffrey Hugo 	.halt_reg = 0x3b74,
2427d14b15b5SJeffrey Hugo 	.clkr = {
2428d14b15b5SJeffrey Hugo 		.enable_reg = 0x3b74,
2429d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2430d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2431d14b15b5SJeffrey Hugo 			.name = "fd_ahb_clk",
2432d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2433d14b15b5SJeffrey Hugo 			.num_parents = 1,
2434d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2435d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2436d14b15b5SJeffrey Hugo 		},
2437d14b15b5SJeffrey Hugo 	},
2438d14b15b5SJeffrey Hugo };
2439d14b15b5SJeffrey Hugo 
2440d14b15b5SJeffrey Hugo static struct clk_branch mnoc_ahb_clk = {
2441d14b15b5SJeffrey Hugo 	.halt_reg = 0x5024,
24429906c414SKonrad Dybcio 	.halt_check = BRANCH_HALT_SKIP,
2443d14b15b5SJeffrey Hugo 	.clkr = {
2444d14b15b5SJeffrey Hugo 		.enable_reg = 0x5024,
2445d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2446d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2447d14b15b5SJeffrey Hugo 			.name = "mnoc_ahb_clk",
2448d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2449d14b15b5SJeffrey Hugo 			.num_parents = 1,
2450d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2451d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2452d14b15b5SJeffrey Hugo 		},
2453d14b15b5SJeffrey Hugo 	},
2454d14b15b5SJeffrey Hugo };
2455d14b15b5SJeffrey Hugo 
2456d14b15b5SJeffrey Hugo static struct clk_branch bimc_smmu_ahb_clk = {
2457d14b15b5SJeffrey Hugo 	.halt_reg = 0xe004,
24589906c414SKonrad Dybcio 	.halt_check = BRANCH_HALT_SKIP,
2459fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_reg = 0xe004,
2460fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_bit = 1,
2461d14b15b5SJeffrey Hugo 	.clkr = {
2462d14b15b5SJeffrey Hugo 		.enable_reg = 0xe004,
2463d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2464d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2465d14b15b5SJeffrey Hugo 			.name = "bimc_smmu_ahb_clk",
2466d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2467d14b15b5SJeffrey Hugo 			.num_parents = 1,
2468d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2469d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2470d14b15b5SJeffrey Hugo 		},
2471d14b15b5SJeffrey Hugo 	},
2472d14b15b5SJeffrey Hugo };
2473d14b15b5SJeffrey Hugo 
2474d14b15b5SJeffrey Hugo static struct clk_branch bimc_smmu_axi_clk = {
2475d14b15b5SJeffrey Hugo 	.halt_reg = 0xe008,
24769906c414SKonrad Dybcio 	.halt_check = BRANCH_HALT_SKIP,
2477fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_reg = 0xe008,
2478fa92f3b0SAngeloGioacchino Del Regno 	.hwcg_bit = 1,
2479d14b15b5SJeffrey Hugo 	.clkr = {
2480d14b15b5SJeffrey Hugo 		.enable_reg = 0xe008,
2481d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2482d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2483d14b15b5SJeffrey Hugo 			.name = "bimc_smmu_axi_clk",
2484d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw },
2485d14b15b5SJeffrey Hugo 			.num_parents = 1,
2486d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2487d14b15b5SJeffrey Hugo 		},
2488d14b15b5SJeffrey Hugo 	},
2489d14b15b5SJeffrey Hugo };
2490d14b15b5SJeffrey Hugo 
2491d14b15b5SJeffrey Hugo static struct clk_branch mnoc_maxi_clk = {
2492d14b15b5SJeffrey Hugo 	.halt_reg = 0xf004,
2493d14b15b5SJeffrey Hugo 	.clkr = {
2494d14b15b5SJeffrey Hugo 		.enable_reg = 0xf004,
2495d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2496d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2497d14b15b5SJeffrey Hugo 			.name = "mnoc_maxi_clk",
2498d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &maxi_clk_src.clkr.hw },
2499d14b15b5SJeffrey Hugo 			.num_parents = 1,
2500d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2501d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2502d14b15b5SJeffrey Hugo 		},
2503d14b15b5SJeffrey Hugo 	},
2504d14b15b5SJeffrey Hugo };
2505d14b15b5SJeffrey Hugo 
2506d14b15b5SJeffrey Hugo static struct clk_branch vmem_maxi_clk = {
2507d14b15b5SJeffrey Hugo 	.halt_reg = 0xf064,
2508d14b15b5SJeffrey Hugo 	.clkr = {
2509d14b15b5SJeffrey Hugo 		.enable_reg = 0xf064,
2510d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2511d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2512d14b15b5SJeffrey Hugo 			.name = "vmem_maxi_clk",
2513d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &maxi_clk_src.clkr.hw },
2514d14b15b5SJeffrey Hugo 			.num_parents = 1,
2515d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2516d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2517d14b15b5SJeffrey Hugo 		},
2518d14b15b5SJeffrey Hugo 	},
2519d14b15b5SJeffrey Hugo };
2520d14b15b5SJeffrey Hugo 
2521d14b15b5SJeffrey Hugo static struct clk_branch vmem_ahb_clk = {
2522d14b15b5SJeffrey Hugo 	.halt_reg = 0xf068,
2523d14b15b5SJeffrey Hugo 	.clkr = {
2524d14b15b5SJeffrey Hugo 		.enable_reg = 0xf068,
2525d14b15b5SJeffrey Hugo 		.enable_mask = BIT(0),
2526d14b15b5SJeffrey Hugo 		.hw.init = &(struct clk_init_data){
2527d14b15b5SJeffrey Hugo 			.name = "vmem_ahb_clk",
2528d14b15b5SJeffrey Hugo 			.parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw },
2529d14b15b5SJeffrey Hugo 			.num_parents = 1,
2530d14b15b5SJeffrey Hugo 			.ops = &clk_branch2_ops,
2531d14b15b5SJeffrey Hugo 			.flags = CLK_SET_RATE_PARENT,
2532d14b15b5SJeffrey Hugo 		},
2533d14b15b5SJeffrey Hugo 	},
2534d14b15b5SJeffrey Hugo };
2535d14b15b5SJeffrey Hugo 
2536d14b15b5SJeffrey Hugo static struct gdsc video_top_gdsc = {
2537d14b15b5SJeffrey Hugo 	.gdscr = 0x1024,
2538e20ae5aeSMarc Gonzalez 	.cxcs = (unsigned int []){ 0x1028, 0x1034, 0x1038 },
2539e20ae5aeSMarc Gonzalez 	.cxc_count = 3,
2540d14b15b5SJeffrey Hugo 	.pd = {
2541d14b15b5SJeffrey Hugo 		.name = "video_top",
2542d14b15b5SJeffrey Hugo 	},
2543d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2544d14b15b5SJeffrey Hugo };
2545d14b15b5SJeffrey Hugo 
2546d14b15b5SJeffrey Hugo static struct gdsc video_subcore0_gdsc = {
2547d14b15b5SJeffrey Hugo 	.gdscr = 0x1040,
2548e20ae5aeSMarc Gonzalez 	.cxcs = (unsigned int []){ 0x1048 },
2549e20ae5aeSMarc Gonzalez 	.cxc_count = 1,
2550d14b15b5SJeffrey Hugo 	.pd = {
2551d14b15b5SJeffrey Hugo 		.name = "video_subcore0",
2552d14b15b5SJeffrey Hugo 	},
2553d14b15b5SJeffrey Hugo 	.parent = &video_top_gdsc.pd,
2554d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2555e20ae5aeSMarc Gonzalez 	.flags = HW_CTRL,
2556d14b15b5SJeffrey Hugo };
2557d14b15b5SJeffrey Hugo 
2558d14b15b5SJeffrey Hugo static struct gdsc video_subcore1_gdsc = {
2559d14b15b5SJeffrey Hugo 	.gdscr = 0x1044,
2560e20ae5aeSMarc Gonzalez 	.cxcs = (unsigned int []){ 0x104c },
2561e20ae5aeSMarc Gonzalez 	.cxc_count = 1,
2562d14b15b5SJeffrey Hugo 	.pd = {
2563d14b15b5SJeffrey Hugo 		.name = "video_subcore1",
2564d14b15b5SJeffrey Hugo 	},
2565d14b15b5SJeffrey Hugo 	.parent = &video_top_gdsc.pd,
2566d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2567e20ae5aeSMarc Gonzalez 	.flags = HW_CTRL,
2568d14b15b5SJeffrey Hugo };
2569d14b15b5SJeffrey Hugo 
2570d14b15b5SJeffrey Hugo static struct gdsc mdss_gdsc = {
2571d14b15b5SJeffrey Hugo 	.gdscr = 0x2304,
2572d14b15b5SJeffrey Hugo 	.cxcs = (unsigned int []){ 0x2310, 0x2350, 0x231c, 0x2320 },
2573d14b15b5SJeffrey Hugo 	.cxc_count = 4,
2574d14b15b5SJeffrey Hugo 	.pd = {
2575d14b15b5SJeffrey Hugo 		.name = "mdss",
2576d14b15b5SJeffrey Hugo 	},
2577d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2578d14b15b5SJeffrey Hugo };
2579d14b15b5SJeffrey Hugo 
2580d14b15b5SJeffrey Hugo static struct gdsc camss_top_gdsc = {
2581d14b15b5SJeffrey Hugo 	.gdscr = 0x34a0,
2582d14b15b5SJeffrey Hugo 	.cxcs = (unsigned int []){ 0x35b8, 0x36c4, 0x3704, 0x3714, 0x3494,
2583d14b15b5SJeffrey Hugo 				   0x35a8, 0x3868 },
2584d14b15b5SJeffrey Hugo 	.cxc_count = 7,
2585d14b15b5SJeffrey Hugo 	.pd = {
2586d14b15b5SJeffrey Hugo 		.name = "camss_top",
2587d14b15b5SJeffrey Hugo 	},
2588d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2589d14b15b5SJeffrey Hugo };
2590d14b15b5SJeffrey Hugo 
2591d14b15b5SJeffrey Hugo static struct gdsc camss_vfe0_gdsc = {
2592d14b15b5SJeffrey Hugo 	.gdscr = 0x3664,
2593d14b15b5SJeffrey Hugo 	.pd = {
2594d14b15b5SJeffrey Hugo 		.name = "camss_vfe0",
2595d14b15b5SJeffrey Hugo 	},
2596d14b15b5SJeffrey Hugo 	.parent = &camss_top_gdsc.pd,
2597d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2598d14b15b5SJeffrey Hugo };
2599d14b15b5SJeffrey Hugo 
2600d14b15b5SJeffrey Hugo static struct gdsc camss_vfe1_gdsc = {
2601d14b15b5SJeffrey Hugo 	.gdscr = 0x3674,
2602d14b15b5SJeffrey Hugo 	.pd = {
2603d14b15b5SJeffrey Hugo 		.name = "camss_vfe1_gdsc",
2604d14b15b5SJeffrey Hugo 	},
2605d14b15b5SJeffrey Hugo 	.parent = &camss_top_gdsc.pd,
2606d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2607d14b15b5SJeffrey Hugo };
2608d14b15b5SJeffrey Hugo 
2609d14b15b5SJeffrey Hugo static struct gdsc camss_cpp_gdsc = {
2610d14b15b5SJeffrey Hugo 	.gdscr = 0x36d4,
2611d14b15b5SJeffrey Hugo 	.pd = {
2612d14b15b5SJeffrey Hugo 		.name = "camss_cpp",
2613d14b15b5SJeffrey Hugo 	},
2614d14b15b5SJeffrey Hugo 	.parent = &camss_top_gdsc.pd,
2615d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
2616d14b15b5SJeffrey Hugo };
2617d14b15b5SJeffrey Hugo 
2618d14b15b5SJeffrey Hugo static struct gdsc bimc_smmu_gdsc = {
2619d14b15b5SJeffrey Hugo 	.gdscr = 0xe020,
2620d14b15b5SJeffrey Hugo 	.gds_hw_ctrl = 0xe024,
26211fc62c83SKonrad Dybcio 	.cxcs = (unsigned int []){ 0xe008 },
26221fc62c83SKonrad Dybcio 	.cxc_count = 1,
2623d14b15b5SJeffrey Hugo 	.pd = {
2624d14b15b5SJeffrey Hugo 		.name = "bimc_smmu",
2625d14b15b5SJeffrey Hugo 	},
2626d14b15b5SJeffrey Hugo 	.pwrsts = PWRSTS_OFF_ON,
26271fc62c83SKonrad Dybcio 	.flags = VOTABLE,
2628d14b15b5SJeffrey Hugo };
2629d14b15b5SJeffrey Hugo 
2630d14b15b5SJeffrey Hugo static struct clk_regmap *mmcc_msm8998_clocks[] = {
2631d14b15b5SJeffrey Hugo 	[MMPLL0] = &mmpll0.clkr,
2632d14b15b5SJeffrey Hugo 	[MMPLL0_OUT_EVEN] = &mmpll0_out_even.clkr,
2633d14b15b5SJeffrey Hugo 	[MMPLL1] = &mmpll1.clkr,
2634d14b15b5SJeffrey Hugo 	[MMPLL1_OUT_EVEN] = &mmpll1_out_even.clkr,
2635d14b15b5SJeffrey Hugo 	[MMPLL3] = &mmpll3.clkr,
2636d14b15b5SJeffrey Hugo 	[MMPLL3_OUT_EVEN] = &mmpll3_out_even.clkr,
2637d14b15b5SJeffrey Hugo 	[MMPLL4] = &mmpll4.clkr,
2638d14b15b5SJeffrey Hugo 	[MMPLL4_OUT_EVEN] = &mmpll4_out_even.clkr,
2639d14b15b5SJeffrey Hugo 	[MMPLL5] = &mmpll5.clkr,
2640d14b15b5SJeffrey Hugo 	[MMPLL5_OUT_EVEN] = &mmpll5_out_even.clkr,
2641d14b15b5SJeffrey Hugo 	[MMPLL6] = &mmpll6.clkr,
2642d14b15b5SJeffrey Hugo 	[MMPLL6_OUT_EVEN] = &mmpll6_out_even.clkr,
2643d14b15b5SJeffrey Hugo 	[MMPLL7] = &mmpll7.clkr,
2644d14b15b5SJeffrey Hugo 	[MMPLL7_OUT_EVEN] = &mmpll7_out_even.clkr,
2645d14b15b5SJeffrey Hugo 	[MMPLL10] = &mmpll10.clkr,
2646d14b15b5SJeffrey Hugo 	[MMPLL10_OUT_EVEN] = &mmpll10_out_even.clkr,
2647d14b15b5SJeffrey Hugo 	[BYTE0_CLK_SRC] = &byte0_clk_src.clkr,
2648d14b15b5SJeffrey Hugo 	[BYTE1_CLK_SRC] = &byte1_clk_src.clkr,
2649d14b15b5SJeffrey Hugo 	[CCI_CLK_SRC] = &cci_clk_src.clkr,
2650d14b15b5SJeffrey Hugo 	[CPP_CLK_SRC] = &cpp_clk_src.clkr,
2651d14b15b5SJeffrey Hugo 	[CSI0_CLK_SRC] = &csi0_clk_src.clkr,
2652d14b15b5SJeffrey Hugo 	[CSI1_CLK_SRC] = &csi1_clk_src.clkr,
2653d14b15b5SJeffrey Hugo 	[CSI2_CLK_SRC] = &csi2_clk_src.clkr,
2654d14b15b5SJeffrey Hugo 	[CSI3_CLK_SRC] = &csi3_clk_src.clkr,
2655d14b15b5SJeffrey Hugo 	[CSIPHY_CLK_SRC] = &csiphy_clk_src.clkr,
2656d14b15b5SJeffrey Hugo 	[CSI0PHYTIMER_CLK_SRC] = &csi0phytimer_clk_src.clkr,
2657d14b15b5SJeffrey Hugo 	[CSI1PHYTIMER_CLK_SRC] = &csi1phytimer_clk_src.clkr,
2658d14b15b5SJeffrey Hugo 	[CSI2PHYTIMER_CLK_SRC] = &csi2phytimer_clk_src.clkr,
2659d14b15b5SJeffrey Hugo 	[DP_AUX_CLK_SRC] = &dp_aux_clk_src.clkr,
2660d14b15b5SJeffrey Hugo 	[DP_CRYPTO_CLK_SRC] = &dp_crypto_clk_src.clkr,
2661d14b15b5SJeffrey Hugo 	[DP_LINK_CLK_SRC] = &dp_link_clk_src.clkr,
2662d14b15b5SJeffrey Hugo 	[DP_PIXEL_CLK_SRC] = &dp_pixel_clk_src.clkr,
2663d14b15b5SJeffrey Hugo 	[ESC0_CLK_SRC] = &esc0_clk_src.clkr,
2664d14b15b5SJeffrey Hugo 	[ESC1_CLK_SRC] = &esc1_clk_src.clkr,
2665d14b15b5SJeffrey Hugo 	[EXTPCLK_CLK_SRC] = &extpclk_clk_src.clkr,
2666d14b15b5SJeffrey Hugo 	[FD_CORE_CLK_SRC] = &fd_core_clk_src.clkr,
2667d14b15b5SJeffrey Hugo 	[HDMI_CLK_SRC] = &hdmi_clk_src.clkr,
2668d14b15b5SJeffrey Hugo 	[JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr,
2669d14b15b5SJeffrey Hugo 	[MAXI_CLK_SRC] = &maxi_clk_src.clkr,
2670d14b15b5SJeffrey Hugo 	[MCLK0_CLK_SRC] = &mclk0_clk_src.clkr,
2671d14b15b5SJeffrey Hugo 	[MCLK1_CLK_SRC] = &mclk1_clk_src.clkr,
2672d14b15b5SJeffrey Hugo 	[MCLK2_CLK_SRC] = &mclk2_clk_src.clkr,
2673d14b15b5SJeffrey Hugo 	[MCLK3_CLK_SRC] = &mclk3_clk_src.clkr,
2674d14b15b5SJeffrey Hugo 	[MDP_CLK_SRC] = &mdp_clk_src.clkr,
2675d14b15b5SJeffrey Hugo 	[VSYNC_CLK_SRC] = &vsync_clk_src.clkr,
2676d14b15b5SJeffrey Hugo 	[AHB_CLK_SRC] = &ahb_clk_src.clkr,
2677d14b15b5SJeffrey Hugo 	[AXI_CLK_SRC] = &axi_clk_src.clkr,
2678d14b15b5SJeffrey Hugo 	[PCLK0_CLK_SRC] = &pclk0_clk_src.clkr,
2679d14b15b5SJeffrey Hugo 	[PCLK1_CLK_SRC] = &pclk1_clk_src.clkr,
2680d14b15b5SJeffrey Hugo 	[ROT_CLK_SRC] = &rot_clk_src.clkr,
2681d14b15b5SJeffrey Hugo 	[VIDEO_CORE_CLK_SRC] = &video_core_clk_src.clkr,
2682d14b15b5SJeffrey Hugo 	[VIDEO_SUBCORE0_CLK_SRC] = &video_subcore0_clk_src.clkr,
2683d14b15b5SJeffrey Hugo 	[VIDEO_SUBCORE1_CLK_SRC] = &video_subcore1_clk_src.clkr,
2684d14b15b5SJeffrey Hugo 	[VFE0_CLK_SRC] = &vfe0_clk_src.clkr,
2685d14b15b5SJeffrey Hugo 	[VFE1_CLK_SRC] = &vfe1_clk_src.clkr,
2686d14b15b5SJeffrey Hugo 	[MISC_AHB_CLK] = &misc_ahb_clk.clkr,
2687d14b15b5SJeffrey Hugo 	[VIDEO_CORE_CLK] = &video_core_clk.clkr,
2688d14b15b5SJeffrey Hugo 	[VIDEO_AHB_CLK] = &video_ahb_clk.clkr,
2689d14b15b5SJeffrey Hugo 	[VIDEO_AXI_CLK] = &video_axi_clk.clkr,
2690d14b15b5SJeffrey Hugo 	[VIDEO_MAXI_CLK] = &video_maxi_clk.clkr,
2691d14b15b5SJeffrey Hugo 	[VIDEO_SUBCORE0_CLK] = &video_subcore0_clk.clkr,
2692d14b15b5SJeffrey Hugo 	[VIDEO_SUBCORE1_CLK] = &video_subcore1_clk.clkr,
2693d14b15b5SJeffrey Hugo 	[MDSS_AHB_CLK] = &mdss_ahb_clk.clkr,
2694d14b15b5SJeffrey Hugo 	[MDSS_HDMI_DP_AHB_CLK] = &mdss_hdmi_dp_ahb_clk.clkr,
2695d14b15b5SJeffrey Hugo 	[MDSS_AXI_CLK] = &mdss_axi_clk.clkr,
2696d14b15b5SJeffrey Hugo 	[MDSS_PCLK0_CLK] = &mdss_pclk0_clk.clkr,
2697d14b15b5SJeffrey Hugo 	[MDSS_PCLK1_CLK] = &mdss_pclk1_clk.clkr,
2698d14b15b5SJeffrey Hugo 	[MDSS_MDP_CLK] = &mdss_mdp_clk.clkr,
2699d14b15b5SJeffrey Hugo 	[MDSS_MDP_LUT_CLK] = &mdss_mdp_lut_clk.clkr,
2700d14b15b5SJeffrey Hugo 	[MDSS_EXTPCLK_CLK] = &mdss_extpclk_clk.clkr,
2701d14b15b5SJeffrey Hugo 	[MDSS_VSYNC_CLK] = &mdss_vsync_clk.clkr,
2702d14b15b5SJeffrey Hugo 	[MDSS_HDMI_CLK] = &mdss_hdmi_clk.clkr,
2703d14b15b5SJeffrey Hugo 	[MDSS_BYTE0_CLK] = &mdss_byte0_clk.clkr,
2704d14b15b5SJeffrey Hugo 	[MDSS_BYTE1_CLK] = &mdss_byte1_clk.clkr,
2705d14b15b5SJeffrey Hugo 	[MDSS_ESC0_CLK] = &mdss_esc0_clk.clkr,
2706d14b15b5SJeffrey Hugo 	[MDSS_ESC1_CLK] = &mdss_esc1_clk.clkr,
2707d14b15b5SJeffrey Hugo 	[MDSS_ROT_CLK] = &mdss_rot_clk.clkr,
2708d14b15b5SJeffrey Hugo 	[MDSS_DP_LINK_CLK] = &mdss_dp_link_clk.clkr,
2709d14b15b5SJeffrey Hugo 	[MDSS_DP_LINK_INTF_CLK] = &mdss_dp_link_intf_clk.clkr,
2710d14b15b5SJeffrey Hugo 	[MDSS_DP_CRYPTO_CLK] = &mdss_dp_crypto_clk.clkr,
2711d14b15b5SJeffrey Hugo 	[MDSS_DP_PIXEL_CLK] = &mdss_dp_pixel_clk.clkr,
2712d14b15b5SJeffrey Hugo 	[MDSS_DP_AUX_CLK] = &mdss_dp_aux_clk.clkr,
2713d14b15b5SJeffrey Hugo 	[MDSS_BYTE0_INTF_CLK] = &mdss_byte0_intf_clk.clkr,
2714d14b15b5SJeffrey Hugo 	[MDSS_BYTE1_INTF_CLK] = &mdss_byte1_intf_clk.clkr,
2715d14b15b5SJeffrey Hugo 	[CAMSS_CSI0PHYTIMER_CLK] = &camss_csi0phytimer_clk.clkr,
2716d14b15b5SJeffrey Hugo 	[CAMSS_CSI1PHYTIMER_CLK] = &camss_csi1phytimer_clk.clkr,
2717d14b15b5SJeffrey Hugo 	[CAMSS_CSI2PHYTIMER_CLK] = &camss_csi2phytimer_clk.clkr,
2718d14b15b5SJeffrey Hugo 	[CAMSS_CSI0_CLK] = &camss_csi0_clk.clkr,
2719d14b15b5SJeffrey Hugo 	[CAMSS_CSI0_AHB_CLK] = &camss_csi0_ahb_clk.clkr,
2720d14b15b5SJeffrey Hugo 	[CAMSS_CSI0RDI_CLK] = &camss_csi0rdi_clk.clkr,
2721d14b15b5SJeffrey Hugo 	[CAMSS_CSI0PIX_CLK] = &camss_csi0pix_clk.clkr,
2722d14b15b5SJeffrey Hugo 	[CAMSS_CSI1_CLK] = &camss_csi1_clk.clkr,
2723d14b15b5SJeffrey Hugo 	[CAMSS_CSI1_AHB_CLK] = &camss_csi1_ahb_clk.clkr,
2724d14b15b5SJeffrey Hugo 	[CAMSS_CSI1RDI_CLK] = &camss_csi1rdi_clk.clkr,
2725d14b15b5SJeffrey Hugo 	[CAMSS_CSI1PIX_CLK] = &camss_csi1pix_clk.clkr,
2726d14b15b5SJeffrey Hugo 	[CAMSS_CSI2_CLK] = &camss_csi2_clk.clkr,
2727d14b15b5SJeffrey Hugo 	[CAMSS_CSI2_AHB_CLK] = &camss_csi2_ahb_clk.clkr,
2728d14b15b5SJeffrey Hugo 	[CAMSS_CSI2RDI_CLK] = &camss_csi2rdi_clk.clkr,
2729d14b15b5SJeffrey Hugo 	[CAMSS_CSI2PIX_CLK] = &camss_csi2pix_clk.clkr,
2730d14b15b5SJeffrey Hugo 	[CAMSS_CSI3_CLK] = &camss_csi3_clk.clkr,
2731d14b15b5SJeffrey Hugo 	[CAMSS_CSI3_AHB_CLK] = &camss_csi3_ahb_clk.clkr,
2732d14b15b5SJeffrey Hugo 	[CAMSS_CSI3RDI_CLK] = &camss_csi3rdi_clk.clkr,
2733d14b15b5SJeffrey Hugo 	[CAMSS_CSI3PIX_CLK] = &camss_csi3pix_clk.clkr,
2734d14b15b5SJeffrey Hugo 	[CAMSS_ISPIF_AHB_CLK] = &camss_ispif_ahb_clk.clkr,
2735d14b15b5SJeffrey Hugo 	[CAMSS_CCI_CLK] = &camss_cci_clk.clkr,
2736d14b15b5SJeffrey Hugo 	[CAMSS_CCI_AHB_CLK] = &camss_cci_ahb_clk.clkr,
2737d14b15b5SJeffrey Hugo 	[CAMSS_MCLK0_CLK] = &camss_mclk0_clk.clkr,
2738d14b15b5SJeffrey Hugo 	[CAMSS_MCLK1_CLK] = &camss_mclk1_clk.clkr,
2739d14b15b5SJeffrey Hugo 	[CAMSS_MCLK2_CLK] = &camss_mclk2_clk.clkr,
2740d14b15b5SJeffrey Hugo 	[CAMSS_MCLK3_CLK] = &camss_mclk3_clk.clkr,
2741d14b15b5SJeffrey Hugo 	[CAMSS_TOP_AHB_CLK] = &camss_top_ahb_clk.clkr,
2742d14b15b5SJeffrey Hugo 	[CAMSS_AHB_CLK] = &camss_ahb_clk.clkr,
2743d14b15b5SJeffrey Hugo 	[CAMSS_MICRO_AHB_CLK] = &camss_micro_ahb_clk.clkr,
2744d14b15b5SJeffrey Hugo 	[CAMSS_JPEG0_CLK] = &camss_jpeg0_clk.clkr,
2745d14b15b5SJeffrey Hugo 	[CAMSS_JPEG_AHB_CLK] = &camss_jpeg_ahb_clk.clkr,
2746d14b15b5SJeffrey Hugo 	[CAMSS_JPEG_AXI_CLK] = &camss_jpeg_axi_clk.clkr,
2747d14b15b5SJeffrey Hugo 	[CAMSS_VFE0_AHB_CLK] = &camss_vfe0_ahb_clk.clkr,
2748d14b15b5SJeffrey Hugo 	[CAMSS_VFE1_AHB_CLK] = &camss_vfe1_ahb_clk.clkr,
2749d14b15b5SJeffrey Hugo 	[CAMSS_VFE0_CLK] = &camss_vfe0_clk.clkr,
2750d14b15b5SJeffrey Hugo 	[CAMSS_VFE1_CLK] = &camss_vfe1_clk.clkr,
2751d14b15b5SJeffrey Hugo 	[CAMSS_CPP_CLK] = &camss_cpp_clk.clkr,
2752d14b15b5SJeffrey Hugo 	[CAMSS_CPP_AHB_CLK] = &camss_cpp_ahb_clk.clkr,
2753d14b15b5SJeffrey Hugo 	[CAMSS_VFE_VBIF_AHB_CLK] = &camss_vfe_vbif_ahb_clk.clkr,
2754d14b15b5SJeffrey Hugo 	[CAMSS_VFE_VBIF_AXI_CLK] = &camss_vfe_vbif_axi_clk.clkr,
2755d14b15b5SJeffrey Hugo 	[CAMSS_CPP_AXI_CLK] = &camss_cpp_axi_clk.clkr,
2756d14b15b5SJeffrey Hugo 	[CAMSS_CPP_VBIF_AHB_CLK] = &camss_cpp_vbif_ahb_clk.clkr,
2757d14b15b5SJeffrey Hugo 	[CAMSS_CSI_VFE0_CLK] = &camss_csi_vfe0_clk.clkr,
2758d14b15b5SJeffrey Hugo 	[CAMSS_CSI_VFE1_CLK] = &camss_csi_vfe1_clk.clkr,
2759d14b15b5SJeffrey Hugo 	[CAMSS_VFE0_STREAM_CLK] = &camss_vfe0_stream_clk.clkr,
2760d14b15b5SJeffrey Hugo 	[CAMSS_VFE1_STREAM_CLK] = &camss_vfe1_stream_clk.clkr,
2761d14b15b5SJeffrey Hugo 	[CAMSS_CPHY_CSID0_CLK] = &camss_cphy_csid0_clk.clkr,
2762d14b15b5SJeffrey Hugo 	[CAMSS_CPHY_CSID1_CLK] = &camss_cphy_csid1_clk.clkr,
2763d14b15b5SJeffrey Hugo 	[CAMSS_CPHY_CSID2_CLK] = &camss_cphy_csid2_clk.clkr,
2764d14b15b5SJeffrey Hugo 	[CAMSS_CPHY_CSID3_CLK] = &camss_cphy_csid3_clk.clkr,
2765d14b15b5SJeffrey Hugo 	[CAMSS_CSIPHY0_CLK] = &camss_csiphy0_clk.clkr,
2766d14b15b5SJeffrey Hugo 	[CAMSS_CSIPHY1_CLK] = &camss_csiphy1_clk.clkr,
2767d14b15b5SJeffrey Hugo 	[CAMSS_CSIPHY2_CLK] = &camss_csiphy2_clk.clkr,
2768d14b15b5SJeffrey Hugo 	[FD_CORE_CLK] = &fd_core_clk.clkr,
2769d14b15b5SJeffrey Hugo 	[FD_CORE_UAR_CLK] = &fd_core_uar_clk.clkr,
2770d14b15b5SJeffrey Hugo 	[FD_AHB_CLK] = &fd_ahb_clk.clkr,
2771d14b15b5SJeffrey Hugo 	[MNOC_AHB_CLK] = &mnoc_ahb_clk.clkr,
2772d14b15b5SJeffrey Hugo 	[BIMC_SMMU_AHB_CLK] = &bimc_smmu_ahb_clk.clkr,
2773d14b15b5SJeffrey Hugo 	[BIMC_SMMU_AXI_CLK] = &bimc_smmu_axi_clk.clkr,
2774d14b15b5SJeffrey Hugo 	[MNOC_MAXI_CLK] = &mnoc_maxi_clk.clkr,
2775d14b15b5SJeffrey Hugo 	[VMEM_MAXI_CLK] = &vmem_maxi_clk.clkr,
2776d14b15b5SJeffrey Hugo 	[VMEM_AHB_CLK] = &vmem_ahb_clk.clkr,
2777d14b15b5SJeffrey Hugo };
2778d14b15b5SJeffrey Hugo 
2779d14b15b5SJeffrey Hugo static struct gdsc *mmcc_msm8998_gdscs[] = {
2780d14b15b5SJeffrey Hugo 	[VIDEO_TOP_GDSC] = &video_top_gdsc,
2781d14b15b5SJeffrey Hugo 	[VIDEO_SUBCORE0_GDSC] = &video_subcore0_gdsc,
2782d14b15b5SJeffrey Hugo 	[VIDEO_SUBCORE1_GDSC] = &video_subcore1_gdsc,
2783d14b15b5SJeffrey Hugo 	[MDSS_GDSC] = &mdss_gdsc,
2784d14b15b5SJeffrey Hugo 	[CAMSS_TOP_GDSC] = &camss_top_gdsc,
2785d14b15b5SJeffrey Hugo 	[CAMSS_VFE0_GDSC] = &camss_vfe0_gdsc,
2786d14b15b5SJeffrey Hugo 	[CAMSS_VFE1_GDSC] = &camss_vfe1_gdsc,
2787d14b15b5SJeffrey Hugo 	[CAMSS_CPP_GDSC] = &camss_cpp_gdsc,
2788d14b15b5SJeffrey Hugo 	[BIMC_SMMU_GDSC] = &bimc_smmu_gdsc,
2789d14b15b5SJeffrey Hugo };
2790d14b15b5SJeffrey Hugo 
2791d14b15b5SJeffrey Hugo static const struct qcom_reset_map mmcc_msm8998_resets[] = {
2792d14b15b5SJeffrey Hugo 	[SPDM_BCR] = { 0x200 },
2793d14b15b5SJeffrey Hugo 	[SPDM_RM_BCR] = { 0x300 },
2794d14b15b5SJeffrey Hugo 	[MISC_BCR] = { 0x320 },
2795d14b15b5SJeffrey Hugo 	[VIDEO_TOP_BCR] = { 0x1020 },
2796d14b15b5SJeffrey Hugo 	[THROTTLE_VIDEO_BCR] = { 0x1180 },
2797d14b15b5SJeffrey Hugo 	[MDSS_BCR] = { 0x2300 },
2798d14b15b5SJeffrey Hugo 	[THROTTLE_MDSS_BCR] = { 0x2460 },
2799d14b15b5SJeffrey Hugo 	[CAMSS_PHY0_BCR] = { 0x3020 },
2800d14b15b5SJeffrey Hugo 	[CAMSS_PHY1_BCR] = { 0x3050 },
2801d14b15b5SJeffrey Hugo 	[CAMSS_PHY2_BCR] = { 0x3080 },
2802d14b15b5SJeffrey Hugo 	[CAMSS_CSI0_BCR] = { 0x30b0 },
2803d14b15b5SJeffrey Hugo 	[CAMSS_CSI0RDI_BCR] = { 0x30d0 },
2804d14b15b5SJeffrey Hugo 	[CAMSS_CSI0PIX_BCR] = { 0x30e0 },
2805d14b15b5SJeffrey Hugo 	[CAMSS_CSI1_BCR] = { 0x3120 },
2806d14b15b5SJeffrey Hugo 	[CAMSS_CSI1RDI_BCR] = { 0x3140 },
2807d14b15b5SJeffrey Hugo 	[CAMSS_CSI1PIX_BCR] = { 0x3150 },
2808d14b15b5SJeffrey Hugo 	[CAMSS_CSI2_BCR] = { 0x3180 },
2809d14b15b5SJeffrey Hugo 	[CAMSS_CSI2RDI_BCR] = { 0x31a0 },
2810d14b15b5SJeffrey Hugo 	[CAMSS_CSI2PIX_BCR] = { 0x31b0 },
2811d14b15b5SJeffrey Hugo 	[CAMSS_CSI3_BCR] = { 0x31e0 },
2812d14b15b5SJeffrey Hugo 	[CAMSS_CSI3RDI_BCR] = { 0x3200 },
2813d14b15b5SJeffrey Hugo 	[CAMSS_CSI3PIX_BCR] = { 0x3210 },
2814d14b15b5SJeffrey Hugo 	[CAMSS_ISPIF_BCR] = { 0x3220 },
2815d14b15b5SJeffrey Hugo 	[CAMSS_CCI_BCR] = { 0x3340 },
2816d14b15b5SJeffrey Hugo 	[CAMSS_TOP_BCR] = { 0x3480 },
2817d14b15b5SJeffrey Hugo 	[CAMSS_AHB_BCR] = { 0x3488 },
2818d14b15b5SJeffrey Hugo 	[CAMSS_MICRO_BCR] = { 0x3490 },
2819d14b15b5SJeffrey Hugo 	[CAMSS_JPEG_BCR] = { 0x35a0 },
2820d14b15b5SJeffrey Hugo 	[CAMSS_VFE0_BCR] = { 0x3660 },
2821d14b15b5SJeffrey Hugo 	[CAMSS_VFE1_BCR] = { 0x3670 },
2822d14b15b5SJeffrey Hugo 	[CAMSS_VFE_VBIF_BCR] = { 0x36a0 },
2823d14b15b5SJeffrey Hugo 	[CAMSS_CPP_TOP_BCR] = { 0x36c0 },
2824d14b15b5SJeffrey Hugo 	[CAMSS_CPP_BCR] = { 0x36d0 },
2825d14b15b5SJeffrey Hugo 	[CAMSS_CSI_VFE0_BCR] = { 0x3700 },
2826d14b15b5SJeffrey Hugo 	[CAMSS_CSI_VFE1_BCR] = { 0x3710 },
2827d14b15b5SJeffrey Hugo 	[CAMSS_FD_BCR] = { 0x3b60 },
2828d14b15b5SJeffrey Hugo 	[THROTTLE_CAMSS_BCR] = { 0x3c30 },
2829d14b15b5SJeffrey Hugo 	[MNOCAHB_BCR] = { 0x5020 },
2830d14b15b5SJeffrey Hugo 	[MNOCAXI_BCR] = { 0xd020 },
2831d14b15b5SJeffrey Hugo 	[BMIC_SMMU_BCR] = { 0xe000 },
2832d14b15b5SJeffrey Hugo 	[MNOC_MAXI_BCR] = { 0xf000 },
2833d14b15b5SJeffrey Hugo 	[VMEM_BCR] = { 0xf060 },
2834d14b15b5SJeffrey Hugo 	[BTO_BCR] = { 0x10004 },
2835d14b15b5SJeffrey Hugo };
2836d14b15b5SJeffrey Hugo 
2837d14b15b5SJeffrey Hugo static const struct regmap_config mmcc_msm8998_regmap_config = {
2838d14b15b5SJeffrey Hugo 	.reg_bits	= 32,
2839d14b15b5SJeffrey Hugo 	.reg_stride	= 4,
2840d14b15b5SJeffrey Hugo 	.val_bits	= 32,
2841d14b15b5SJeffrey Hugo 	.max_register	= 0x10004,
2842d14b15b5SJeffrey Hugo 	.fast_io	= true,
2843d14b15b5SJeffrey Hugo };
2844d14b15b5SJeffrey Hugo 
2845d14b15b5SJeffrey Hugo static const struct qcom_cc_desc mmcc_msm8998_desc = {
2846d14b15b5SJeffrey Hugo 	.config = &mmcc_msm8998_regmap_config,
2847d14b15b5SJeffrey Hugo 	.clks = mmcc_msm8998_clocks,
2848d14b15b5SJeffrey Hugo 	.num_clks = ARRAY_SIZE(mmcc_msm8998_clocks),
2849d14b15b5SJeffrey Hugo 	.resets = mmcc_msm8998_resets,
2850d14b15b5SJeffrey Hugo 	.num_resets = ARRAY_SIZE(mmcc_msm8998_resets),
2851d14b15b5SJeffrey Hugo 	.gdscs = mmcc_msm8998_gdscs,
2852d14b15b5SJeffrey Hugo 	.num_gdscs = ARRAY_SIZE(mmcc_msm8998_gdscs),
2853d14b15b5SJeffrey Hugo };
2854d14b15b5SJeffrey Hugo 
2855d14b15b5SJeffrey Hugo static const struct of_device_id mmcc_msm8998_match_table[] = {
2856d14b15b5SJeffrey Hugo 	{ .compatible = "qcom,mmcc-msm8998" },
2857d14b15b5SJeffrey Hugo 	{ }
2858d14b15b5SJeffrey Hugo };
2859d14b15b5SJeffrey Hugo MODULE_DEVICE_TABLE(of, mmcc_msm8998_match_table);
2860d14b15b5SJeffrey Hugo 
mmcc_msm8998_probe(struct platform_device * pdev)2861d14b15b5SJeffrey Hugo static int mmcc_msm8998_probe(struct platform_device *pdev)
2862d14b15b5SJeffrey Hugo {
2863d14b15b5SJeffrey Hugo 	struct regmap *regmap;
2864d14b15b5SJeffrey Hugo 
2865d14b15b5SJeffrey Hugo 	regmap = qcom_cc_map(pdev, &mmcc_msm8998_desc);
2866d14b15b5SJeffrey Hugo 	if (IS_ERR(regmap))
2867d14b15b5SJeffrey Hugo 		return PTR_ERR(regmap);
2868d14b15b5SJeffrey Hugo 
2869*9f93a0a4SLuo Jie 	return qcom_cc_really_probe(&pdev->dev, &mmcc_msm8998_desc, regmap);
2870d14b15b5SJeffrey Hugo }
2871d14b15b5SJeffrey Hugo 
2872d14b15b5SJeffrey Hugo static struct platform_driver mmcc_msm8998_driver = {
2873d14b15b5SJeffrey Hugo 	.probe		= mmcc_msm8998_probe,
2874d14b15b5SJeffrey Hugo 	.driver		= {
2875d14b15b5SJeffrey Hugo 		.name	= "mmcc-msm8998",
2876d14b15b5SJeffrey Hugo 		.of_match_table = mmcc_msm8998_match_table,
2877d14b15b5SJeffrey Hugo 	},
2878d14b15b5SJeffrey Hugo };
2879d14b15b5SJeffrey Hugo module_platform_driver(mmcc_msm8998_driver);
2880d14b15b5SJeffrey Hugo 
2881d14b15b5SJeffrey Hugo MODULE_DESCRIPTION("QCOM MMCC MSM8998 Driver");
2882d14b15b5SJeffrey Hugo MODULE_LICENSE("GPL v2");
2883