1d9db07f0SSricharan R // SPDX-License-Identifier: GPL-2.0
2d9db07f0SSricharan R /*
3d9db07f0SSricharan R * Copyright (c) 2018, The Linux Foundation. All rights reserved.
4d9db07f0SSricharan R */
5d9db07f0SSricharan R
6d9db07f0SSricharan R #include <linux/kernel.h>
7d9db07f0SSricharan R #include <linux/err.h>
8d9db07f0SSricharan R #include <linux/platform_device.h>
9d9db07f0SSricharan R #include <linux/module.h>
10d9db07f0SSricharan R #include <linux/of.h>
11d9db07f0SSricharan R #include <linux/clk-provider.h>
12d9db07f0SSricharan R #include <linux/regmap.h>
13d9db07f0SSricharan R
14d9db07f0SSricharan R #include <linux/reset-controller.h>
15d9db07f0SSricharan R #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
16d9db07f0SSricharan R #include <dt-bindings/reset/qcom,gcc-ipq6018.h>
17d9db07f0SSricharan R
18d9db07f0SSricharan R #include "common.h"
19d9db07f0SSricharan R #include "clk-regmap.h"
20d9db07f0SSricharan R #include "clk-pll.h"
21d9db07f0SSricharan R #include "clk-rcg.h"
22d9db07f0SSricharan R #include "clk-branch.h"
23d9db07f0SSricharan R #include "clk-alpha-pll.h"
24d9db07f0SSricharan R #include "clk-regmap-divider.h"
25d9db07f0SSricharan R #include "clk-regmap-mux.h"
26d9db07f0SSricharan R #include "reset.h"
27d9db07f0SSricharan R
28d9db07f0SSricharan R enum {
29d9db07f0SSricharan R P_XO,
30d9db07f0SSricharan R P_BIAS_PLL,
31d9db07f0SSricharan R P_UNIPHY0_RX,
32d9db07f0SSricharan R P_UNIPHY0_TX,
33d9db07f0SSricharan R P_UNIPHY1_RX,
34d9db07f0SSricharan R P_BIAS_PLL_NSS_NOC,
35d9db07f0SSricharan R P_UNIPHY1_TX,
36d9db07f0SSricharan R P_PCIE20_PHY0_PIPE,
37d9db07f0SSricharan R P_USB3PHY_0_PIPE,
38d9db07f0SSricharan R P_GPLL0,
39d9db07f0SSricharan R P_GPLL0_DIV2,
40d9db07f0SSricharan R P_GPLL2,
41d9db07f0SSricharan R P_GPLL4,
42d9db07f0SSricharan R P_GPLL6,
43d9db07f0SSricharan R P_SLEEP_CLK,
44d9db07f0SSricharan R P_UBI32_PLL,
45d9db07f0SSricharan R P_NSS_CRYPTO_PLL,
46d9db07f0SSricharan R P_PI_SLEEP,
47d9db07f0SSricharan R };
48d9db07f0SSricharan R
49d9db07f0SSricharan R static struct clk_alpha_pll gpll0_main = {
50d9db07f0SSricharan R .offset = 0x21000,
51d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
52d9db07f0SSricharan R .clkr = {
53d9db07f0SSricharan R .enable_reg = 0x0b000,
54d9db07f0SSricharan R .enable_mask = BIT(0),
55d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
56d9db07f0SSricharan R .name = "gpll0_main",
57d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
58d9db07f0SSricharan R .fw_name = "xo",
59d9db07f0SSricharan R },
60d9db07f0SSricharan R .num_parents = 1,
61d9db07f0SSricharan R .ops = &clk_alpha_pll_ops,
62d9db07f0SSricharan R },
63d9db07f0SSricharan R },
64d9db07f0SSricharan R };
65d9db07f0SSricharan R
66d9db07f0SSricharan R static struct clk_fixed_factor gpll0_out_main_div2 = {
67d9db07f0SSricharan R .mult = 1,
68d9db07f0SSricharan R .div = 2,
69d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
70d9db07f0SSricharan R .name = "gpll0_out_main_div2",
71d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
72d9db07f0SSricharan R &gpll0_main.clkr.hw },
73d9db07f0SSricharan R .num_parents = 1,
74d9db07f0SSricharan R .ops = &clk_fixed_factor_ops,
75d9db07f0SSricharan R },
76d9db07f0SSricharan R };
77d9db07f0SSricharan R
78d9db07f0SSricharan R static struct clk_alpha_pll_postdiv gpll0 = {
79d9db07f0SSricharan R .offset = 0x21000,
80d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
81d9db07f0SSricharan R .width = 4,
82d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
83d9db07f0SSricharan R .name = "gpll0",
84d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
85d9db07f0SSricharan R &gpll0_main.clkr.hw },
86d9db07f0SSricharan R .num_parents = 1,
87d9db07f0SSricharan R .ops = &clk_alpha_pll_postdiv_ro_ops,
88d9db07f0SSricharan R },
89d9db07f0SSricharan R };
90d9db07f0SSricharan R
91d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2[] = {
92d9db07f0SSricharan R { .fw_name = "xo" },
93d9db07f0SSricharan R { .hw = &gpll0.clkr.hw},
94d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw},
95d9db07f0SSricharan R };
96d9db07f0SSricharan R
97d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll0_out_main_div2_map[] = {
98d9db07f0SSricharan R { P_XO, 0 },
99d9db07f0SSricharan R { P_GPLL0, 1 },
100d9db07f0SSricharan R { P_GPLL0_DIV2, 4 },
101d9db07f0SSricharan R };
102d9db07f0SSricharan R
103d9db07f0SSricharan R static struct clk_alpha_pll ubi32_pll_main = {
104d9db07f0SSricharan R .offset = 0x25000,
105d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA],
106d9db07f0SSricharan R .flags = SUPPORTS_DYNAMIC_UPDATE,
107d9db07f0SSricharan R .clkr = {
108d9db07f0SSricharan R .enable_reg = 0x0b000,
109d9db07f0SSricharan R .enable_mask = BIT(6),
110d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
111d9db07f0SSricharan R .name = "ubi32_pll_main",
112d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
113d9db07f0SSricharan R .fw_name = "xo",
114d9db07f0SSricharan R },
115d9db07f0SSricharan R .num_parents = 1,
116d9db07f0SSricharan R .ops = &clk_alpha_pll_huayra_ops,
117d9db07f0SSricharan R },
118d9db07f0SSricharan R },
119d9db07f0SSricharan R };
120d9db07f0SSricharan R
121d9db07f0SSricharan R static struct clk_alpha_pll_postdiv ubi32_pll = {
122d9db07f0SSricharan R .offset = 0x25000,
123d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA],
124d9db07f0SSricharan R .width = 2,
125d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
126d9db07f0SSricharan R .name = "ubi32_pll",
127d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
128d9db07f0SSricharan R &ubi32_pll_main.clkr.hw },
129d9db07f0SSricharan R .num_parents = 1,
130d9db07f0SSricharan R .ops = &clk_alpha_pll_postdiv_ro_ops,
131d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
132d9db07f0SSricharan R },
133d9db07f0SSricharan R };
134d9db07f0SSricharan R
135d9db07f0SSricharan R static struct clk_alpha_pll gpll6_main = {
136d9db07f0SSricharan R .offset = 0x37000,
137d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_BRAMMO],
138d9db07f0SSricharan R .clkr = {
139d9db07f0SSricharan R .enable_reg = 0x0b000,
140d9db07f0SSricharan R .enable_mask = BIT(7),
141d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
142d9db07f0SSricharan R .name = "gpll6_main",
143d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
144d9db07f0SSricharan R .fw_name = "xo",
145d9db07f0SSricharan R },
146d9db07f0SSricharan R .num_parents = 1,
147d9db07f0SSricharan R .ops = &clk_alpha_pll_ops,
148d9db07f0SSricharan R },
149d9db07f0SSricharan R },
150d9db07f0SSricharan R };
151d9db07f0SSricharan R
152d9db07f0SSricharan R static struct clk_alpha_pll_postdiv gpll6 = {
153d9db07f0SSricharan R .offset = 0x37000,
154d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_BRAMMO],
155d9db07f0SSricharan R .width = 2,
156d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
157d9db07f0SSricharan R .name = "gpll6",
158d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
159d9db07f0SSricharan R &gpll6_main.clkr.hw },
160d9db07f0SSricharan R .num_parents = 1,
161d9db07f0SSricharan R .ops = &clk_alpha_pll_postdiv_ro_ops,
162d9db07f0SSricharan R },
163d9db07f0SSricharan R };
164d9db07f0SSricharan R
165d9db07f0SSricharan R static struct clk_alpha_pll gpll4_main = {
166d9db07f0SSricharan R .offset = 0x24000,
167d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
168d9db07f0SSricharan R .clkr = {
169d9db07f0SSricharan R .enable_reg = 0x0b000,
170d9db07f0SSricharan R .enable_mask = BIT(5),
171d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
172d9db07f0SSricharan R .name = "gpll4_main",
173d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
174d9db07f0SSricharan R .fw_name = "xo",
175d9db07f0SSricharan R },
176d9db07f0SSricharan R .num_parents = 1,
177d9db07f0SSricharan R .ops = &clk_alpha_pll_ops,
178d9db07f0SSricharan R },
179d9db07f0SSricharan R },
180d9db07f0SSricharan R };
181d9db07f0SSricharan R
182d9db07f0SSricharan R static struct clk_alpha_pll_postdiv gpll4 = {
183d9db07f0SSricharan R .offset = 0x24000,
184d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
185d9db07f0SSricharan R .width = 4,
186d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
187d9db07f0SSricharan R .name = "gpll4",
188d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
189d9db07f0SSricharan R &gpll4_main.clkr.hw },
190d9db07f0SSricharan R .num_parents = 1,
191d9db07f0SSricharan R .ops = &clk_alpha_pll_postdiv_ro_ops,
192d9db07f0SSricharan R },
193d9db07f0SSricharan R };
194d9db07f0SSricharan R
195d9db07f0SSricharan R static const struct freq_tbl ftbl_pcnoc_bfdcd_clk_src[] = {
196d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
197d9db07f0SSricharan R F(50000000, P_GPLL0, 16, 0, 0),
198d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
199d9db07f0SSricharan R { }
200d9db07f0SSricharan R };
201d9db07f0SSricharan R
202d9db07f0SSricharan R static struct clk_rcg2 pcnoc_bfdcd_clk_src = {
203d9db07f0SSricharan R .cmd_rcgr = 0x27000,
204d9db07f0SSricharan R .freq_tbl = ftbl_pcnoc_bfdcd_clk_src,
205d9db07f0SSricharan R .hid_width = 5,
206d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
207d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
208d9db07f0SSricharan R .name = "pcnoc_bfdcd_clk_src",
209d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
210d9db07f0SSricharan R .num_parents = 3,
211d9db07f0SSricharan R .ops = &clk_rcg2_ops,
212d9db07f0SSricharan R },
213d9db07f0SSricharan R };
214d9db07f0SSricharan R
215d9db07f0SSricharan R static struct clk_alpha_pll gpll2_main = {
216d9db07f0SSricharan R .offset = 0x4a000,
217d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
218d9db07f0SSricharan R .clkr = {
219d9db07f0SSricharan R .enable_reg = 0x0b000,
220d9db07f0SSricharan R .enable_mask = BIT(2),
221d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
222d9db07f0SSricharan R .name = "gpll2_main",
223d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
224d9db07f0SSricharan R .fw_name = "xo",
225d9db07f0SSricharan R },
226d9db07f0SSricharan R .num_parents = 1,
227d9db07f0SSricharan R .ops = &clk_alpha_pll_ops,
228d9db07f0SSricharan R },
229d9db07f0SSricharan R },
230d9db07f0SSricharan R };
231d9db07f0SSricharan R
232d9db07f0SSricharan R static struct clk_alpha_pll_postdiv gpll2 = {
233d9db07f0SSricharan R .offset = 0x4a000,
234d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
235d9db07f0SSricharan R .width = 4,
236d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
237d9db07f0SSricharan R .name = "gpll2",
238d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
239d9db07f0SSricharan R &gpll2_main.clkr.hw },
240d9db07f0SSricharan R .num_parents = 1,
241d9db07f0SSricharan R .ops = &clk_alpha_pll_postdiv_ro_ops,
242d9db07f0SSricharan R },
243d9db07f0SSricharan R };
244d9db07f0SSricharan R
245d9db07f0SSricharan R static struct clk_alpha_pll nss_crypto_pll_main = {
246d9db07f0SSricharan R .offset = 0x22000,
247d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
248d9db07f0SSricharan R .clkr = {
249d9db07f0SSricharan R .enable_reg = 0x0b000,
250d9db07f0SSricharan R .enable_mask = BIT(4),
251d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
252d9db07f0SSricharan R .name = "nss_crypto_pll_main",
253d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
254d9db07f0SSricharan R .fw_name = "xo",
255d9db07f0SSricharan R },
256d9db07f0SSricharan R .num_parents = 1,
257d9db07f0SSricharan R .ops = &clk_alpha_pll_ops,
258d9db07f0SSricharan R },
259d9db07f0SSricharan R },
260d9db07f0SSricharan R };
261d9db07f0SSricharan R
262d9db07f0SSricharan R static struct clk_alpha_pll_postdiv nss_crypto_pll = {
263d9db07f0SSricharan R .offset = 0x22000,
264d9db07f0SSricharan R .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
265d9db07f0SSricharan R .width = 4,
266d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
267d9db07f0SSricharan R .name = "nss_crypto_pll",
268d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
269d9db07f0SSricharan R &nss_crypto_pll_main.clkr.hw },
270d9db07f0SSricharan R .num_parents = 1,
271d9db07f0SSricharan R .ops = &clk_alpha_pll_postdiv_ro_ops,
272d9db07f0SSricharan R },
273d9db07f0SSricharan R };
274d9db07f0SSricharan R
275d9db07f0SSricharan R static const struct freq_tbl ftbl_qdss_tsctr_clk_src[] = {
276d9db07f0SSricharan R F(160000000, P_GPLL0_DIV2, 2.5, 0, 0),
277d9db07f0SSricharan R F(320000000, P_GPLL0, 2.5, 0, 0),
278d9db07f0SSricharan R F(600000000, P_GPLL4, 2, 0, 0),
279d9db07f0SSricharan R { }
280d9db07f0SSricharan R };
281d9db07f0SSricharan R
282d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll4_gpll0_gpll6_gpll0_div2[] = {
283d9db07f0SSricharan R { .fw_name = "xo" },
284d9db07f0SSricharan R { .hw = &gpll4.clkr.hw },
285d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
286d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
287d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
288d9db07f0SSricharan R };
289d9db07f0SSricharan R
290d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll4_gpll0_gpll6_gpll0_div2_map[] = {
291d9db07f0SSricharan R { P_XO, 0 },
292d9db07f0SSricharan R { P_GPLL4, 1 },
293d9db07f0SSricharan R { P_GPLL0, 2 },
294d9db07f0SSricharan R { P_GPLL6, 3 },
295d9db07f0SSricharan R { P_GPLL0_DIV2, 4 },
296d9db07f0SSricharan R };
297d9db07f0SSricharan R
298d9db07f0SSricharan R static struct clk_rcg2 qdss_tsctr_clk_src = {
299d9db07f0SSricharan R .cmd_rcgr = 0x29064,
300d9db07f0SSricharan R .freq_tbl = ftbl_qdss_tsctr_clk_src,
301d9db07f0SSricharan R .hid_width = 5,
302d9db07f0SSricharan R .parent_map = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2_map,
303d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
304d9db07f0SSricharan R .name = "qdss_tsctr_clk_src",
305d9db07f0SSricharan R .parent_data = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2,
306d9db07f0SSricharan R .num_parents = 5,
307d9db07f0SSricharan R .ops = &clk_rcg2_ops,
308d9db07f0SSricharan R },
309d9db07f0SSricharan R };
310d9db07f0SSricharan R
311d9db07f0SSricharan R static struct clk_fixed_factor qdss_dap_sync_clk_src = {
312d9db07f0SSricharan R .mult = 1,
313d9db07f0SSricharan R .div = 4,
314d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
315d9db07f0SSricharan R .name = "qdss_dap_sync_clk_src",
316d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
317d9db07f0SSricharan R &qdss_tsctr_clk_src.clkr.hw },
318d9db07f0SSricharan R .num_parents = 1,
319d9db07f0SSricharan R .ops = &clk_fixed_factor_ops,
320d9db07f0SSricharan R },
321d9db07f0SSricharan R };
322d9db07f0SSricharan R
323d9db07f0SSricharan R static const struct freq_tbl ftbl_qdss_at_clk_src[] = {
324d9db07f0SSricharan R F(66670000, P_GPLL0_DIV2, 6, 0, 0),
325d9db07f0SSricharan R F(240000000, P_GPLL4, 5, 0, 0),
326d9db07f0SSricharan R { }
327d9db07f0SSricharan R };
328d9db07f0SSricharan R
329d9db07f0SSricharan R static struct clk_rcg2 qdss_at_clk_src = {
330d9db07f0SSricharan R .cmd_rcgr = 0x2900c,
331d9db07f0SSricharan R .freq_tbl = ftbl_qdss_at_clk_src,
332d9db07f0SSricharan R .hid_width = 5,
333d9db07f0SSricharan R .parent_map = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2_map,
334d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
335d9db07f0SSricharan R .name = "qdss_at_clk_src",
336d9db07f0SSricharan R .parent_data = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2,
337d9db07f0SSricharan R .num_parents = 5,
338d9db07f0SSricharan R .ops = &clk_rcg2_ops,
339d9db07f0SSricharan R },
340d9db07f0SSricharan R };
341d9db07f0SSricharan R
342d9db07f0SSricharan R static struct clk_fixed_factor qdss_tsctr_div2_clk_src = {
343d9db07f0SSricharan R .mult = 1,
344d9db07f0SSricharan R .div = 2,
345d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
346d9db07f0SSricharan R .name = "qdss_tsctr_div2_clk_src",
347d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
348d9db07f0SSricharan R &qdss_tsctr_clk_src.clkr.hw },
349d9db07f0SSricharan R .num_parents = 1,
350d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
351d9db07f0SSricharan R .ops = &clk_fixed_factor_ops,
352d9db07f0SSricharan R },
353d9db07f0SSricharan R };
354d9db07f0SSricharan R
355d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_ppe_clk_src[] = {
356d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
357d9db07f0SSricharan R F(300000000, P_BIAS_PLL, 1, 0, 0),
358d9db07f0SSricharan R { }
359d9db07f0SSricharan R };
360d9db07f0SSricharan R
361d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_bias_gpll0_gpll4_nss_ubi32[] = {
362d9db07f0SSricharan R { .fw_name = "xo" },
363d9db07f0SSricharan R { .fw_name = "bias_pll_cc_clk" },
364d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
365d9db07f0SSricharan R { .hw = &gpll4.clkr.hw },
366d9db07f0SSricharan R { .hw = &nss_crypto_pll.clkr.hw },
367d9db07f0SSricharan R { .hw = &ubi32_pll.clkr.hw },
368d9db07f0SSricharan R };
369d9db07f0SSricharan R
370d9db07f0SSricharan R static const struct parent_map gcc_xo_bias_gpll0_gpll4_nss_ubi32_map[] = {
371d9db07f0SSricharan R { P_XO, 0 },
372d9db07f0SSricharan R { P_BIAS_PLL, 1 },
373d9db07f0SSricharan R { P_GPLL0, 2 },
374d9db07f0SSricharan R { P_GPLL4, 3 },
375d9db07f0SSricharan R { P_NSS_CRYPTO_PLL, 4 },
376d9db07f0SSricharan R { P_UBI32_PLL, 5 },
377d9db07f0SSricharan R };
378d9db07f0SSricharan R
379d9db07f0SSricharan R static struct clk_rcg2 nss_ppe_clk_src = {
380d9db07f0SSricharan R .cmd_rcgr = 0x68080,
381d9db07f0SSricharan R .freq_tbl = ftbl_nss_ppe_clk_src,
382d9db07f0SSricharan R .hid_width = 5,
383d9db07f0SSricharan R .parent_map = gcc_xo_bias_gpll0_gpll4_nss_ubi32_map,
384d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
385d9db07f0SSricharan R .name = "nss_ppe_clk_src",
386d9db07f0SSricharan R .parent_data = gcc_xo_bias_gpll0_gpll4_nss_ubi32,
387d9db07f0SSricharan R .num_parents = 6,
388d9db07f0SSricharan R .ops = &clk_rcg2_ops,
389d9db07f0SSricharan R },
390d9db07f0SSricharan R };
391d9db07f0SSricharan R
392d9db07f0SSricharan R static struct clk_branch gcc_xo_clk_src = {
393d9db07f0SSricharan R .halt_reg = 0x30018,
394d9db07f0SSricharan R .clkr = {
395d9db07f0SSricharan R .enable_reg = 0x30018,
396d9db07f0SSricharan R .enable_mask = BIT(1),
397d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
398d9db07f0SSricharan R .name = "gcc_xo_clk_src",
399d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
400d9db07f0SSricharan R .fw_name = "xo",
401d9db07f0SSricharan R },
402d9db07f0SSricharan R .num_parents = 1,
403d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
404d9db07f0SSricharan R .ops = &clk_branch2_ops,
405d9db07f0SSricharan R },
406d9db07f0SSricharan R },
407d9db07f0SSricharan R };
408d9db07f0SSricharan R
409d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_ce_clk_src[] = {
410d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
411d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
412d9db07f0SSricharan R { }
413d9db07f0SSricharan R };
414d9db07f0SSricharan R
415d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0[] = {
416d9db07f0SSricharan R { .fw_name = "xo" },
417d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
418d9db07f0SSricharan R };
419d9db07f0SSricharan R
420d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_map[] = {
421d9db07f0SSricharan R { P_XO, 0 },
422d9db07f0SSricharan R { P_GPLL0, 1 },
423d9db07f0SSricharan R };
424d9db07f0SSricharan R
425d9db07f0SSricharan R static struct clk_rcg2 nss_ce_clk_src = {
426d9db07f0SSricharan R .cmd_rcgr = 0x68098,
427d9db07f0SSricharan R .freq_tbl = ftbl_nss_ce_clk_src,
428d9db07f0SSricharan R .hid_width = 5,
429d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_map,
430d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
431d9db07f0SSricharan R .name = "nss_ce_clk_src",
432d9db07f0SSricharan R .parent_data = gcc_xo_gpll0,
433d9db07f0SSricharan R .num_parents = 2,
434d9db07f0SSricharan R .ops = &clk_rcg2_ops,
435d9db07f0SSricharan R },
436d9db07f0SSricharan R };
437d9db07f0SSricharan R
438d9db07f0SSricharan R static struct clk_branch gcc_sleep_clk_src = {
439d9db07f0SSricharan R .halt_reg = 0x30000,
440d9db07f0SSricharan R .clkr = {
441d9db07f0SSricharan R .enable_reg = 0x30000,
442d9db07f0SSricharan R .enable_mask = BIT(1),
443d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
444d9db07f0SSricharan R .name = "gcc_sleep_clk_src",
445d9db07f0SSricharan R .parent_data = &(const struct clk_parent_data){
446d9db07f0SSricharan R .fw_name = "sleep_clk",
447d9db07f0SSricharan R },
448d9db07f0SSricharan R .num_parents = 1,
449d9db07f0SSricharan R .ops = &clk_branch2_ops,
450d9db07f0SSricharan R },
451d9db07f0SSricharan R },
452d9db07f0SSricharan R };
453d9db07f0SSricharan R
454d9db07f0SSricharan R static const struct freq_tbl ftbl_snoc_nssnoc_bfdcd_clk_src[] = {
455d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
456d9db07f0SSricharan R F(50000000, P_GPLL0_DIV2, 8, 0, 0),
457d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
458d9db07f0SSricharan R F(133333333, P_GPLL0, 6, 0, 0),
459d9db07f0SSricharan R F(160000000, P_GPLL0, 5, 0, 0),
460d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
461d9db07f0SSricharan R F(266666667, P_GPLL0, 3, 0, 0),
462d9db07f0SSricharan R { }
463d9db07f0SSricharan R };
464d9db07f0SSricharan R
465d9db07f0SSricharan R static const struct clk_parent_data
466d9db07f0SSricharan R gcc_xo_gpll0_gpll6_gpll0_out_main_div2[] = {
467d9db07f0SSricharan R { .fw_name = "xo" },
468d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
469d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
470d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
471d9db07f0SSricharan R };
472d9db07f0SSricharan R
473d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map[] = {
474d9db07f0SSricharan R { P_XO, 0 },
475d9db07f0SSricharan R { P_GPLL0, 1 },
476d9db07f0SSricharan R { P_GPLL6, 2 },
477d9db07f0SSricharan R { P_GPLL0_DIV2, 3 },
478d9db07f0SSricharan R };
479d9db07f0SSricharan R
480d9db07f0SSricharan R static struct clk_rcg2 snoc_nssnoc_bfdcd_clk_src = {
481d9db07f0SSricharan R .cmd_rcgr = 0x76054,
482d9db07f0SSricharan R .freq_tbl = ftbl_snoc_nssnoc_bfdcd_clk_src,
483d9db07f0SSricharan R .hid_width = 5,
484d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map,
485d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
486d9db07f0SSricharan R .name = "snoc_nssnoc_bfdcd_clk_src",
487d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll6_gpll0_out_main_div2,
488d9db07f0SSricharan R .num_parents = 4,
489d9db07f0SSricharan R .ops = &clk_rcg2_ops,
490d9db07f0SSricharan R },
491d9db07f0SSricharan R };
492d9db07f0SSricharan R
493d9db07f0SSricharan R static const struct freq_tbl ftbl_apss_ahb_clk_src[] = {
494d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
495d9db07f0SSricharan R F(25000000, P_GPLL0_DIV2, 16, 0, 0),
496d9db07f0SSricharan R F(50000000, P_GPLL0, 16, 0, 0),
497d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
498d9db07f0SSricharan R { }
499d9db07f0SSricharan R };
500d9db07f0SSricharan R
501d9db07f0SSricharan R static struct clk_rcg2 apss_ahb_clk_src = {
502d9db07f0SSricharan R .cmd_rcgr = 0x46000,
503d9db07f0SSricharan R .freq_tbl = ftbl_apss_ahb_clk_src,
504d9db07f0SSricharan R .hid_width = 5,
505d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
506d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
507d9db07f0SSricharan R .name = "apss_ahb_clk_src",
508d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
509d9db07f0SSricharan R .num_parents = 3,
510d9db07f0SSricharan R .ops = &clk_rcg2_ops,
511d9db07f0SSricharan R },
512d9db07f0SSricharan R };
513d9db07f0SSricharan R
514d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_port5_rx_clk_src[] = {
515d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
516d9db07f0SSricharan R F(25000000, P_UNIPHY1_RX, 12.5, 0, 0),
517d9db07f0SSricharan R F(25000000, P_UNIPHY0_RX, 5, 0, 0),
518d9db07f0SSricharan R F(78125000, P_UNIPHY1_RX, 4, 0, 0),
519d9db07f0SSricharan R F(125000000, P_UNIPHY1_RX, 2.5, 0, 0),
520d9db07f0SSricharan R F(125000000, P_UNIPHY0_RX, 1, 0, 0),
521d9db07f0SSricharan R F(156250000, P_UNIPHY1_RX, 2, 0, 0),
522d9db07f0SSricharan R F(312500000, P_UNIPHY1_RX, 1, 0, 0),
523d9db07f0SSricharan R { }
524d9db07f0SSricharan R };
525d9db07f0SSricharan R
526d9db07f0SSricharan R static const struct clk_parent_data
527d9db07f0SSricharan R gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
528d9db07f0SSricharan R { .fw_name = "xo" },
529d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_rx_clk" },
530d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_tx_clk" },
531d9db07f0SSricharan R { .fw_name = "uniphy1_gcc_rx_clk" },
532d9db07f0SSricharan R { .fw_name = "uniphy1_gcc_tx_clk" },
533d9db07f0SSricharan R { .hw = &ubi32_pll.clkr.hw },
534d9db07f0SSricharan R { .fw_name = "bias_pll_cc_clk" },
535d9db07f0SSricharan R };
536d9db07f0SSricharan R
537d9db07f0SSricharan R static const struct parent_map
538d9db07f0SSricharan R gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map[] = {
539d9db07f0SSricharan R { P_XO, 0 },
540d9db07f0SSricharan R { P_UNIPHY0_RX, 1 },
541d9db07f0SSricharan R { P_UNIPHY0_TX, 2 },
542d9db07f0SSricharan R { P_UNIPHY1_RX, 3 },
543d9db07f0SSricharan R { P_UNIPHY1_TX, 4 },
544d9db07f0SSricharan R { P_UBI32_PLL, 5 },
545d9db07f0SSricharan R { P_BIAS_PLL, 6 },
546d9db07f0SSricharan R };
547d9db07f0SSricharan R
548d9db07f0SSricharan R static struct clk_rcg2 nss_port5_rx_clk_src = {
549d9db07f0SSricharan R .cmd_rcgr = 0x68060,
550d9db07f0SSricharan R .freq_tbl = ftbl_nss_port5_rx_clk_src,
551d9db07f0SSricharan R .hid_width = 5,
552d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map,
553d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
554d9db07f0SSricharan R .name = "nss_port5_rx_clk_src",
555d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias,
556d9db07f0SSricharan R .num_parents = 7,
557d9db07f0SSricharan R .ops = &clk_rcg2_ops,
558d9db07f0SSricharan R },
559d9db07f0SSricharan R };
560d9db07f0SSricharan R
561d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_port5_tx_clk_src[] = {
562d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
563d9db07f0SSricharan R F(25000000, P_UNIPHY1_TX, 12.5, 0, 0),
564d9db07f0SSricharan R F(25000000, P_UNIPHY0_TX, 5, 0, 0),
565d9db07f0SSricharan R F(78125000, P_UNIPHY1_TX, 4, 0, 0),
566d9db07f0SSricharan R F(125000000, P_UNIPHY1_TX, 2.5, 0, 0),
567d9db07f0SSricharan R F(125000000, P_UNIPHY0_TX, 1, 0, 0),
568d9db07f0SSricharan R F(156250000, P_UNIPHY1_TX, 2, 0, 0),
569d9db07f0SSricharan R F(312500000, P_UNIPHY1_TX, 1, 0, 0),
570d9db07f0SSricharan R { }
571d9db07f0SSricharan R };
572d9db07f0SSricharan R
573d9db07f0SSricharan R static const struct clk_parent_data
574d9db07f0SSricharan R gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
575d9db07f0SSricharan R { .fw_name = "xo" },
576d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_tx_clk" },
577d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_rx_clk" },
578d9db07f0SSricharan R { .fw_name = "uniphy1_gcc_tx_clk" },
579d9db07f0SSricharan R { .fw_name = "uniphy1_gcc_rx_clk" },
580d9db07f0SSricharan R { .hw = &ubi32_pll.clkr.hw },
581d9db07f0SSricharan R { .fw_name = "bias_pll_cc_clk" },
582d9db07f0SSricharan R };
583d9db07f0SSricharan R
584d9db07f0SSricharan R static const struct parent_map
585d9db07f0SSricharan R gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias_map[] = {
586d9db07f0SSricharan R { P_XO, 0 },
587d9db07f0SSricharan R { P_UNIPHY0_TX, 1 },
588d9db07f0SSricharan R { P_UNIPHY0_RX, 2 },
589d9db07f0SSricharan R { P_UNIPHY1_TX, 3 },
590d9db07f0SSricharan R { P_UNIPHY1_RX, 4 },
591d9db07f0SSricharan R { P_UBI32_PLL, 5 },
592d9db07f0SSricharan R { P_BIAS_PLL, 6 },
593d9db07f0SSricharan R };
594d9db07f0SSricharan R
595d9db07f0SSricharan R static struct clk_rcg2 nss_port5_tx_clk_src = {
596d9db07f0SSricharan R .cmd_rcgr = 0x68068,
597d9db07f0SSricharan R .freq_tbl = ftbl_nss_port5_tx_clk_src,
598d9db07f0SSricharan R .hid_width = 5,
599d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias_map,
600d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
601d9db07f0SSricharan R .name = "nss_port5_tx_clk_src",
602d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias,
603d9db07f0SSricharan R .num_parents = 7,
604d9db07f0SSricharan R .ops = &clk_rcg2_ops,
605d9db07f0SSricharan R },
606d9db07f0SSricharan R };
607d9db07f0SSricharan R
608d9db07f0SSricharan R static const struct freq_tbl ftbl_pcie_axi_clk_src[] = {
609d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
610d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
611d9db07f0SSricharan R F(240000000, P_GPLL4, 5, 0, 0),
612d9db07f0SSricharan R { }
613d9db07f0SSricharan R };
614d9db07f0SSricharan R
615d9db07f0SSricharan R static const struct freq_tbl ftbl_pcie_rchng_clk_src[] = {
616d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
617d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
618d9db07f0SSricharan R { }
619d9db07f0SSricharan R };
620d9db07f0SSricharan R
621d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_gpll4[] = {
622d9db07f0SSricharan R { .fw_name = "xo" },
623d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
624d9db07f0SSricharan R { .hw = &gpll4.clkr.hw },
625d9db07f0SSricharan R };
626d9db07f0SSricharan R
627d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll4_map[] = {
628d9db07f0SSricharan R { P_XO, 0 },
629d9db07f0SSricharan R { P_GPLL0, 1 },
630d9db07f0SSricharan R { P_GPLL4, 2 },
631d9db07f0SSricharan R };
632d9db07f0SSricharan R
633d9db07f0SSricharan R static struct clk_rcg2 pcie0_axi_clk_src = {
634d9db07f0SSricharan R .cmd_rcgr = 0x75054,
635d9db07f0SSricharan R .freq_tbl = ftbl_pcie_axi_clk_src,
636d9db07f0SSricharan R .hid_width = 5,
637d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll4_map,
638d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
639d9db07f0SSricharan R .name = "pcie0_axi_clk_src",
640d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll4,
641d9db07f0SSricharan R .num_parents = 3,
642d9db07f0SSricharan R .ops = &clk_rcg2_ops,
643d9db07f0SSricharan R },
644d9db07f0SSricharan R };
645d9db07f0SSricharan R
646d9db07f0SSricharan R static const struct freq_tbl ftbl_usb0_master_clk_src[] = {
647d9db07f0SSricharan R F(80000000, P_GPLL0_DIV2, 5, 0, 0),
648d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
649d9db07f0SSricharan R F(133330000, P_GPLL0, 6, 0, 0),
650d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
651d9db07f0SSricharan R { }
652d9db07f0SSricharan R };
653d9db07f0SSricharan R
654d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_out_main_div2_gpll0[] = {
655d9db07f0SSricharan R { .fw_name = "xo" },
656d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
657d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
658d9db07f0SSricharan R };
659d9db07f0SSricharan R
660d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_out_main_div2_gpll0_map[] = {
661d9db07f0SSricharan R { P_XO, 0 },
662d9db07f0SSricharan R { P_GPLL0_DIV2, 2 },
663d9db07f0SSricharan R { P_GPLL0, 1 },
664d9db07f0SSricharan R };
665d9db07f0SSricharan R
666d9db07f0SSricharan R static struct clk_rcg2 usb0_master_clk_src = {
667d9db07f0SSricharan R .cmd_rcgr = 0x3e00c,
668d9db07f0SSricharan R .freq_tbl = ftbl_usb0_master_clk_src,
669d9db07f0SSricharan R .mnd_width = 8,
670d9db07f0SSricharan R .hid_width = 5,
671d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_out_main_div2_gpll0_map,
672d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
673d9db07f0SSricharan R .name = "usb0_master_clk_src",
674d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_out_main_div2_gpll0,
675d9db07f0SSricharan R .num_parents = 3,
676d9db07f0SSricharan R .ops = &clk_rcg2_ops,
677d9db07f0SSricharan R },
678d9db07f0SSricharan R };
679d9db07f0SSricharan R
680d9db07f0SSricharan R static struct clk_regmap_div apss_ahb_postdiv_clk_src = {
681d9db07f0SSricharan R .reg = 0x46018,
682d9db07f0SSricharan R .shift = 4,
683d9db07f0SSricharan R .width = 4,
684d9db07f0SSricharan R .clkr = {
685d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
686d9db07f0SSricharan R .name = "apss_ahb_postdiv_clk_src",
687d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
688d9db07f0SSricharan R &apss_ahb_clk_src.clkr.hw },
689d9db07f0SSricharan R .num_parents = 1,
690d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
691d9db07f0SSricharan R },
692d9db07f0SSricharan R },
693d9db07f0SSricharan R };
694d9db07f0SSricharan R
695d9db07f0SSricharan R static struct clk_fixed_factor gcc_xo_div4_clk_src = {
696d9db07f0SSricharan R .mult = 1,
697d9db07f0SSricharan R .div = 4,
698d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
699d9db07f0SSricharan R .name = "gcc_xo_div4_clk_src",
700d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
701d9db07f0SSricharan R &gcc_xo_clk_src.clkr.hw },
702d9db07f0SSricharan R .num_parents = 1,
703d9db07f0SSricharan R .ops = &clk_fixed_factor_ops,
704d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
705d9db07f0SSricharan R },
706d9db07f0SSricharan R };
707d9db07f0SSricharan R
708d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_port1_rx_clk_src[] = {
709d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
710d9db07f0SSricharan R F(25000000, P_UNIPHY0_RX, 5, 0, 0),
711d9db07f0SSricharan R F(125000000, P_UNIPHY0_RX, 1, 0, 0),
712d9db07f0SSricharan R { }
713d9db07f0SSricharan R };
714d9db07f0SSricharan R
715d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
716d9db07f0SSricharan R { .fw_name = "xo" },
717d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_rx_clk" },
718d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_tx_clk" },
719d9db07f0SSricharan R { .hw = &ubi32_pll.clkr.hw },
720d9db07f0SSricharan R { .fw_name = "bias_pll_cc_clk" },
721d9db07f0SSricharan R };
722d9db07f0SSricharan R
723d9db07f0SSricharan R static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
724d9db07f0SSricharan R { P_XO, 0 },
725d9db07f0SSricharan R { P_UNIPHY0_RX, 1 },
726d9db07f0SSricharan R { P_UNIPHY0_TX, 2 },
727d9db07f0SSricharan R { P_UBI32_PLL, 5 },
728d9db07f0SSricharan R { P_BIAS_PLL, 6 },
729d9db07f0SSricharan R };
730d9db07f0SSricharan R
731d9db07f0SSricharan R static struct clk_rcg2 nss_port1_rx_clk_src = {
732d9db07f0SSricharan R .cmd_rcgr = 0x68020,
733d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_rx_clk_src,
734d9db07f0SSricharan R .hid_width = 5,
735d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
736d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
737d9db07f0SSricharan R .name = "nss_port1_rx_clk_src",
738d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
739d9db07f0SSricharan R .num_parents = 5,
740d9db07f0SSricharan R .ops = &clk_rcg2_ops,
741d9db07f0SSricharan R },
742d9db07f0SSricharan R };
743d9db07f0SSricharan R
744d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_port1_tx_clk_src[] = {
745d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
746d9db07f0SSricharan R F(25000000, P_UNIPHY0_TX, 5, 0, 0),
747d9db07f0SSricharan R F(125000000, P_UNIPHY0_TX, 1, 0, 0),
748d9db07f0SSricharan R { }
749d9db07f0SSricharan R };
750d9db07f0SSricharan R
751d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
752d9db07f0SSricharan R { .fw_name = "xo" },
753d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_tx_clk" },
754d9db07f0SSricharan R { .fw_name = "uniphy0_gcc_rx_clk" },
755d9db07f0SSricharan R { .hw = &ubi32_pll.clkr.hw },
756d9db07f0SSricharan R { .fw_name = "bias_pll_cc_clk" },
757d9db07f0SSricharan R };
758d9db07f0SSricharan R
759d9db07f0SSricharan R static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
760d9db07f0SSricharan R { P_XO, 0 },
761d9db07f0SSricharan R { P_UNIPHY0_TX, 1 },
762d9db07f0SSricharan R { P_UNIPHY0_RX, 2 },
763d9db07f0SSricharan R { P_UBI32_PLL, 5 },
764d9db07f0SSricharan R { P_BIAS_PLL, 6 },
765d9db07f0SSricharan R };
766d9db07f0SSricharan R
767d9db07f0SSricharan R static struct clk_rcg2 nss_port1_tx_clk_src = {
768d9db07f0SSricharan R .cmd_rcgr = 0x68028,
769d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_tx_clk_src,
770d9db07f0SSricharan R .hid_width = 5,
771d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
772d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
773d9db07f0SSricharan R .name = "nss_port1_tx_clk_src",
774d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
775d9db07f0SSricharan R .num_parents = 5,
776d9db07f0SSricharan R .ops = &clk_rcg2_ops,
777d9db07f0SSricharan R },
778d9db07f0SSricharan R };
779d9db07f0SSricharan R
780d9db07f0SSricharan R static struct clk_rcg2 nss_port2_rx_clk_src = {
781d9db07f0SSricharan R .cmd_rcgr = 0x68030,
782d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_rx_clk_src,
783d9db07f0SSricharan R .hid_width = 5,
784d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
785d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
786d9db07f0SSricharan R .name = "nss_port2_rx_clk_src",
787d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
788d9db07f0SSricharan R .num_parents = 5,
789d9db07f0SSricharan R .ops = &clk_rcg2_ops,
790d9db07f0SSricharan R },
791d9db07f0SSricharan R };
792d9db07f0SSricharan R
793d9db07f0SSricharan R static struct clk_rcg2 nss_port2_tx_clk_src = {
794d9db07f0SSricharan R .cmd_rcgr = 0x68038,
795d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_tx_clk_src,
796d9db07f0SSricharan R .hid_width = 5,
797d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
798d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
799d9db07f0SSricharan R .name = "nss_port2_tx_clk_src",
800d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
801d9db07f0SSricharan R .num_parents = 5,
802d9db07f0SSricharan R .ops = &clk_rcg2_ops,
803d9db07f0SSricharan R },
804d9db07f0SSricharan R };
805d9db07f0SSricharan R
806d9db07f0SSricharan R static struct clk_rcg2 nss_port3_rx_clk_src = {
807d9db07f0SSricharan R .cmd_rcgr = 0x68040,
808d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_rx_clk_src,
809d9db07f0SSricharan R .hid_width = 5,
810d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
811d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
812d9db07f0SSricharan R .name = "nss_port3_rx_clk_src",
813d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
814d9db07f0SSricharan R .num_parents = 5,
815d9db07f0SSricharan R .ops = &clk_rcg2_ops,
816d9db07f0SSricharan R },
817d9db07f0SSricharan R };
818d9db07f0SSricharan R
819d9db07f0SSricharan R static struct clk_rcg2 nss_port3_tx_clk_src = {
820d9db07f0SSricharan R .cmd_rcgr = 0x68048,
821d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_tx_clk_src,
822d9db07f0SSricharan R .hid_width = 5,
823d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
824d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
825d9db07f0SSricharan R .name = "nss_port3_tx_clk_src",
826d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
827d9db07f0SSricharan R .num_parents = 5,
828d9db07f0SSricharan R .ops = &clk_rcg2_ops,
829d9db07f0SSricharan R },
830d9db07f0SSricharan R };
831d9db07f0SSricharan R
832d9db07f0SSricharan R static struct clk_rcg2 nss_port4_rx_clk_src = {
833d9db07f0SSricharan R .cmd_rcgr = 0x68050,
834d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_rx_clk_src,
835d9db07f0SSricharan R .hid_width = 5,
836d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
837d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
838d9db07f0SSricharan R .name = "nss_port4_rx_clk_src",
839d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
840d9db07f0SSricharan R .num_parents = 5,
841d9db07f0SSricharan R .ops = &clk_rcg2_ops,
842d9db07f0SSricharan R },
843d9db07f0SSricharan R };
844d9db07f0SSricharan R
845d9db07f0SSricharan R static struct clk_rcg2 nss_port4_tx_clk_src = {
846d9db07f0SSricharan R .cmd_rcgr = 0x68058,
847d9db07f0SSricharan R .freq_tbl = ftbl_nss_port1_tx_clk_src,
848d9db07f0SSricharan R .hid_width = 5,
849d9db07f0SSricharan R .parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
850d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
851d9db07f0SSricharan R .name = "nss_port4_tx_clk_src",
852d9db07f0SSricharan R .parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
853d9db07f0SSricharan R .num_parents = 5,
854d9db07f0SSricharan R .ops = &clk_rcg2_ops,
855d9db07f0SSricharan R },
856d9db07f0SSricharan R };
857d9db07f0SSricharan R
858d9db07f0SSricharan R static struct clk_regmap_div nss_port5_rx_div_clk_src = {
859d9db07f0SSricharan R .reg = 0x68440,
860d9db07f0SSricharan R .shift = 0,
861d9db07f0SSricharan R .width = 4,
862d9db07f0SSricharan R .clkr = {
863d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
864d9db07f0SSricharan R .name = "nss_port5_rx_div_clk_src",
865d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
866d9db07f0SSricharan R &nss_port5_rx_clk_src.clkr.hw },
867d9db07f0SSricharan R .num_parents = 1,
868d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
869d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
870d9db07f0SSricharan R },
871d9db07f0SSricharan R },
872d9db07f0SSricharan R };
873d9db07f0SSricharan R
874d9db07f0SSricharan R static struct clk_regmap_div nss_port5_tx_div_clk_src = {
875d9db07f0SSricharan R .reg = 0x68444,
876d9db07f0SSricharan R .shift = 0,
877d9db07f0SSricharan R .width = 4,
878d9db07f0SSricharan R .clkr = {
879d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
880d9db07f0SSricharan R .name = "nss_port5_tx_div_clk_src",
881d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
882d9db07f0SSricharan R &nss_port5_tx_clk_src.clkr.hw },
883d9db07f0SSricharan R .num_parents = 1,
884d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
885d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
886d9db07f0SSricharan R },
887d9db07f0SSricharan R },
888d9db07f0SSricharan R };
889d9db07f0SSricharan R
890d9db07f0SSricharan R static const struct freq_tbl ftbl_apss_axi_clk_src[] = {
891d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
892d9db07f0SSricharan R F(100000000, P_GPLL0_DIV2, 4, 0, 0),
893d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
894d9db07f0SSricharan R F(308570000, P_GPLL6, 3.5, 0, 0),
895d9db07f0SSricharan R F(400000000, P_GPLL0, 2, 0, 0),
896d9db07f0SSricharan R F(533000000, P_GPLL0, 1.5, 0, 0),
897d9db07f0SSricharan R { }
898d9db07f0SSricharan R };
899d9db07f0SSricharan R
900d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_gpll6_ubi32_gpll0_div2[] = {
901d9db07f0SSricharan R { .fw_name = "xo" },
902d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
903d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
904d9db07f0SSricharan R { .hw = &ubi32_pll.clkr.hw },
905d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
906d9db07f0SSricharan R };
907d9db07f0SSricharan R
908d9db07f0SSricharan R static const struct parent_map
909d9db07f0SSricharan R gcc_xo_gpll0_gpll6_ubi32_gpll0_div2_map[] = {
910d9db07f0SSricharan R { P_XO, 0 },
911d9db07f0SSricharan R { P_GPLL0, 1 },
912d9db07f0SSricharan R { P_GPLL6, 2 },
913d9db07f0SSricharan R { P_UBI32_PLL, 3 },
914d9db07f0SSricharan R { P_GPLL0_DIV2, 6 },
915d9db07f0SSricharan R };
916d9db07f0SSricharan R
917d9db07f0SSricharan R static struct clk_rcg2 apss_axi_clk_src = {
918d9db07f0SSricharan R .cmd_rcgr = 0x38048,
919d9db07f0SSricharan R .freq_tbl = ftbl_apss_axi_clk_src,
920d9db07f0SSricharan R .hid_width = 5,
921d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll6_ubi32_gpll0_div2_map,
922d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
923d9db07f0SSricharan R .name = "apss_axi_clk_src",
924d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll6_ubi32_gpll0_div2,
925d9db07f0SSricharan R .num_parents = 5,
926d9db07f0SSricharan R .ops = &clk_rcg2_ops,
927d9db07f0SSricharan R },
928d9db07f0SSricharan R };
929d9db07f0SSricharan R
930d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_crypto_clk_src[] = {
931d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
932d9db07f0SSricharan R F(300000000, P_NSS_CRYPTO_PLL, 2, 0, 0),
933d9db07f0SSricharan R { }
934d9db07f0SSricharan R };
935d9db07f0SSricharan R
936d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_nss_crypto_pll_gpll0[] = {
937d9db07f0SSricharan R { .fw_name = "xo" },
938d9db07f0SSricharan R { .hw = &nss_crypto_pll.clkr.hw },
939d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
940d9db07f0SSricharan R };
941d9db07f0SSricharan R
942d9db07f0SSricharan R static const struct parent_map gcc_xo_nss_crypto_pll_gpll0_map[] = {
943d9db07f0SSricharan R { P_XO, 0 },
944d9db07f0SSricharan R { P_NSS_CRYPTO_PLL, 1 },
945d9db07f0SSricharan R { P_GPLL0, 2 },
946d9db07f0SSricharan R };
947d9db07f0SSricharan R
948d9db07f0SSricharan R static struct clk_rcg2 nss_crypto_clk_src = {
949d9db07f0SSricharan R .cmd_rcgr = 0x68144,
950d9db07f0SSricharan R .freq_tbl = ftbl_nss_crypto_clk_src,
951d9db07f0SSricharan R .mnd_width = 16,
952d9db07f0SSricharan R .hid_width = 5,
953d9db07f0SSricharan R .parent_map = gcc_xo_nss_crypto_pll_gpll0_map,
954d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
955d9db07f0SSricharan R .name = "nss_crypto_clk_src",
956d9db07f0SSricharan R .parent_data = gcc_xo_nss_crypto_pll_gpll0,
957d9db07f0SSricharan R .num_parents = 3,
958d9db07f0SSricharan R .ops = &clk_rcg2_ops,
959d9db07f0SSricharan R },
960d9db07f0SSricharan R };
961d9db07f0SSricharan R
962d9db07f0SSricharan R static struct clk_regmap_div nss_port1_rx_div_clk_src = {
963d9db07f0SSricharan R .reg = 0x68400,
964d9db07f0SSricharan R .shift = 0,
965d9db07f0SSricharan R .width = 4,
966d9db07f0SSricharan R .clkr = {
967d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
968d9db07f0SSricharan R .name = "nss_port1_rx_div_clk_src",
969d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
970d9db07f0SSricharan R &nss_port1_rx_clk_src.clkr.hw },
971d9db07f0SSricharan R .num_parents = 1,
972d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
973d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
974d9db07f0SSricharan R },
975d9db07f0SSricharan R },
976d9db07f0SSricharan R };
977d9db07f0SSricharan R
978d9db07f0SSricharan R static struct clk_regmap_div nss_port1_tx_div_clk_src = {
979d9db07f0SSricharan R .reg = 0x68404,
980d9db07f0SSricharan R .shift = 0,
981d9db07f0SSricharan R .width = 4,
982d9db07f0SSricharan R .clkr = {
983d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
984d9db07f0SSricharan R .name = "nss_port1_tx_div_clk_src",
985d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
986d9db07f0SSricharan R &nss_port1_tx_clk_src.clkr.hw },
987d9db07f0SSricharan R .num_parents = 1,
988d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
989d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
990d9db07f0SSricharan R },
991d9db07f0SSricharan R },
992d9db07f0SSricharan R };
993d9db07f0SSricharan R
994d9db07f0SSricharan R static struct clk_regmap_div nss_port2_rx_div_clk_src = {
995d9db07f0SSricharan R .reg = 0x68410,
996d9db07f0SSricharan R .shift = 0,
997d9db07f0SSricharan R .width = 4,
998d9db07f0SSricharan R .clkr = {
999d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1000d9db07f0SSricharan R .name = "nss_port2_rx_div_clk_src",
1001d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1002d9db07f0SSricharan R &nss_port2_rx_clk_src.clkr.hw },
1003d9db07f0SSricharan R .num_parents = 1,
1004d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
1005d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1006d9db07f0SSricharan R },
1007d9db07f0SSricharan R },
1008d9db07f0SSricharan R };
1009d9db07f0SSricharan R
1010d9db07f0SSricharan R static struct clk_regmap_div nss_port2_tx_div_clk_src = {
1011d9db07f0SSricharan R .reg = 0x68414,
1012d9db07f0SSricharan R .shift = 0,
1013d9db07f0SSricharan R .width = 4,
1014d9db07f0SSricharan R .clkr = {
1015d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1016d9db07f0SSricharan R .name = "nss_port2_tx_div_clk_src",
1017d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1018d9db07f0SSricharan R &nss_port2_tx_clk_src.clkr.hw },
1019d9db07f0SSricharan R .num_parents = 1,
1020d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
1021d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1022d9db07f0SSricharan R },
1023d9db07f0SSricharan R },
1024d9db07f0SSricharan R };
1025d9db07f0SSricharan R
1026d9db07f0SSricharan R static struct clk_regmap_div nss_port3_rx_div_clk_src = {
1027d9db07f0SSricharan R .reg = 0x68420,
1028d9db07f0SSricharan R .shift = 0,
1029d9db07f0SSricharan R .width = 4,
1030d9db07f0SSricharan R .clkr = {
1031d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1032d9db07f0SSricharan R .name = "nss_port3_rx_div_clk_src",
1033d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1034d9db07f0SSricharan R &nss_port3_rx_clk_src.clkr.hw },
1035d9db07f0SSricharan R .num_parents = 1,
1036d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
1037d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1038d9db07f0SSricharan R },
1039d9db07f0SSricharan R },
1040d9db07f0SSricharan R };
1041d9db07f0SSricharan R
1042d9db07f0SSricharan R static struct clk_regmap_div nss_port3_tx_div_clk_src = {
1043d9db07f0SSricharan R .reg = 0x68424,
1044d9db07f0SSricharan R .shift = 0,
1045d9db07f0SSricharan R .width = 4,
1046d9db07f0SSricharan R .clkr = {
1047d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1048d9db07f0SSricharan R .name = "nss_port3_tx_div_clk_src",
1049d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1050d9db07f0SSricharan R &nss_port3_tx_clk_src.clkr.hw },
1051d9db07f0SSricharan R .num_parents = 1,
1052d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
1053d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1054d9db07f0SSricharan R },
1055d9db07f0SSricharan R },
1056d9db07f0SSricharan R };
1057d9db07f0SSricharan R
1058d9db07f0SSricharan R static struct clk_regmap_div nss_port4_rx_div_clk_src = {
1059d9db07f0SSricharan R .reg = 0x68430,
1060d9db07f0SSricharan R .shift = 0,
1061d9db07f0SSricharan R .width = 4,
1062d9db07f0SSricharan R .clkr = {
1063d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1064d9db07f0SSricharan R .name = "nss_port4_rx_div_clk_src",
1065d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1066d9db07f0SSricharan R &nss_port4_rx_clk_src.clkr.hw },
1067d9db07f0SSricharan R .num_parents = 1,
1068d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
1069d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1070d9db07f0SSricharan R },
1071d9db07f0SSricharan R },
1072d9db07f0SSricharan R };
1073d9db07f0SSricharan R
1074d9db07f0SSricharan R static struct clk_regmap_div nss_port4_tx_div_clk_src = {
1075d9db07f0SSricharan R .reg = 0x68434,
1076d9db07f0SSricharan R .shift = 0,
1077d9db07f0SSricharan R .width = 4,
1078d9db07f0SSricharan R .clkr = {
1079d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1080d9db07f0SSricharan R .name = "nss_port4_tx_div_clk_src",
1081d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1082d9db07f0SSricharan R &nss_port4_tx_clk_src.clkr.hw },
1083d9db07f0SSricharan R .num_parents = 1,
1084d9db07f0SSricharan R .ops = &clk_regmap_div_ops,
1085d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1086d9db07f0SSricharan R },
1087d9db07f0SSricharan R },
1088d9db07f0SSricharan R };
1089d9db07f0SSricharan R
1090d9db07f0SSricharan R static const struct freq_tbl ftbl_nss_ubi_clk_src[] = {
1091d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1092d9db07f0SSricharan R F(149760000, P_UBI32_PLL, 10, 0, 0),
1093d9db07f0SSricharan R F(187200000, P_UBI32_PLL, 8, 0, 0),
1094d9db07f0SSricharan R F(249600000, P_UBI32_PLL, 6, 0, 0),
1095d9db07f0SSricharan R F(374400000, P_UBI32_PLL, 4, 0, 0),
1096d9db07f0SSricharan R F(748800000, P_UBI32_PLL, 2, 0, 0),
1097d9db07f0SSricharan R F(1497600000, P_UBI32_PLL, 1, 0, 0),
1098d9db07f0SSricharan R { }
1099d9db07f0SSricharan R };
1100d9db07f0SSricharan R
1101d9db07f0SSricharan R static const struct clk_parent_data
1102d9db07f0SSricharan R gcc_xo_ubi32_pll_gpll0_gpll2_gpll4_gpll6[] = {
1103d9db07f0SSricharan R { .fw_name = "xo" },
1104d9db07f0SSricharan R { .hw = &ubi32_pll.clkr.hw },
1105d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1106d9db07f0SSricharan R { .hw = &gpll2.clkr.hw },
1107d9db07f0SSricharan R { .hw = &gpll4.clkr.hw },
1108d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
1109d9db07f0SSricharan R };
1110d9db07f0SSricharan R
1111d9db07f0SSricharan R static const struct parent_map gcc_xo_ubi32_gpll0_gpll2_gpll4_gpll6_map[] = {
1112d9db07f0SSricharan R { P_XO, 0 },
1113d9db07f0SSricharan R { P_UBI32_PLL, 1 },
1114d9db07f0SSricharan R { P_GPLL0, 2 },
1115d9db07f0SSricharan R { P_GPLL2, 3 },
1116d9db07f0SSricharan R { P_GPLL4, 4 },
1117d9db07f0SSricharan R { P_GPLL6, 5 },
1118d9db07f0SSricharan R };
1119d9db07f0SSricharan R
1120d9db07f0SSricharan R static struct clk_rcg2 nss_ubi0_clk_src = {
1121d9db07f0SSricharan R .cmd_rcgr = 0x68104,
1122d9db07f0SSricharan R .freq_tbl = ftbl_nss_ubi_clk_src,
1123d9db07f0SSricharan R .hid_width = 5,
1124d9db07f0SSricharan R .parent_map = gcc_xo_ubi32_gpll0_gpll2_gpll4_gpll6_map,
1125d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1126d9db07f0SSricharan R .name = "nss_ubi0_clk_src",
1127d9db07f0SSricharan R .parent_data = gcc_xo_ubi32_pll_gpll0_gpll2_gpll4_gpll6,
1128d9db07f0SSricharan R .num_parents = 6,
1129d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1130d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1131d9db07f0SSricharan R },
1132d9db07f0SSricharan R };
1133d9db07f0SSricharan R
1134d9db07f0SSricharan R static const struct freq_tbl ftbl_adss_pwm_clk_src[] = {
1135d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1136d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
1137d9db07f0SSricharan R { }
1138d9db07f0SSricharan R };
1139d9db07f0SSricharan R
1140d9db07f0SSricharan R static struct clk_rcg2 adss_pwm_clk_src = {
1141d9db07f0SSricharan R .cmd_rcgr = 0x1c008,
1142d9db07f0SSricharan R .freq_tbl = ftbl_adss_pwm_clk_src,
1143d9db07f0SSricharan R .hid_width = 5,
1144d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_map,
1145d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1146d9db07f0SSricharan R .name = "adss_pwm_clk_src",
1147d9db07f0SSricharan R .parent_data = gcc_xo_gpll0,
1148d9db07f0SSricharan R .num_parents = 2,
1149d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1150d9db07f0SSricharan R },
1151d9db07f0SSricharan R };
1152d9db07f0SSricharan R
1153d9db07f0SSricharan R static const struct freq_tbl ftbl_blsp1_qup_i2c_apps_clk_src[] = {
1154d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1155d9db07f0SSricharan R F(25000000, P_GPLL0_DIV2, 16, 0, 0),
1156d9db07f0SSricharan R F(50000000, P_GPLL0, 16, 0, 0),
1157d9db07f0SSricharan R { }
1158d9db07f0SSricharan R };
1159d9db07f0SSricharan R
1160d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
1161d9db07f0SSricharan R .cmd_rcgr = 0x0200c,
1162d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1163d9db07f0SSricharan R .hid_width = 5,
1164d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1165d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1166d9db07f0SSricharan R .name = "blsp1_qup1_i2c_apps_clk_src",
1167d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1168d9db07f0SSricharan R .num_parents = 3,
1169d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1170d9db07f0SSricharan R },
1171d9db07f0SSricharan R };
1172d9db07f0SSricharan R
1173d9db07f0SSricharan R static const struct freq_tbl ftbl_blsp1_qup_spi_apps_clk_src[] = {
1174d9db07f0SSricharan R F(960000, P_XO, 10, 2, 5),
1175d9db07f0SSricharan R F(4800000, P_XO, 5, 0, 0),
1176d9db07f0SSricharan R F(9600000, P_XO, 2, 4, 5),
1177d9db07f0SSricharan R F(12500000, P_GPLL0_DIV2, 16, 1, 2),
1178d9db07f0SSricharan R F(16000000, P_GPLL0, 10, 1, 5),
1179d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1180d9db07f0SSricharan R F(25000000, P_GPLL0, 16, 1, 2),
1181d9db07f0SSricharan R F(50000000, P_GPLL0, 16, 0, 0),
1182d9db07f0SSricharan R { }
1183d9db07f0SSricharan R };
1184d9db07f0SSricharan R
1185d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = {
1186d9db07f0SSricharan R .cmd_rcgr = 0x02024,
1187d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1188d9db07f0SSricharan R .mnd_width = 8,
1189d9db07f0SSricharan R .hid_width = 5,
1190d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1191d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1192d9db07f0SSricharan R .name = "blsp1_qup1_spi_apps_clk_src",
1193d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1194d9db07f0SSricharan R .num_parents = 3,
1195d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1196d9db07f0SSricharan R },
1197d9db07f0SSricharan R };
1198d9db07f0SSricharan R
1199d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = {
1200d9db07f0SSricharan R .cmd_rcgr = 0x03000,
1201d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1202d9db07f0SSricharan R .hid_width = 5,
1203d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1204d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1205d9db07f0SSricharan R .name = "blsp1_qup2_i2c_apps_clk_src",
1206d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1207d9db07f0SSricharan R .num_parents = 3,
1208d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1209d9db07f0SSricharan R },
1210d9db07f0SSricharan R };
1211d9db07f0SSricharan R
1212d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = {
1213d9db07f0SSricharan R .cmd_rcgr = 0x03014,
1214d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1215d9db07f0SSricharan R .mnd_width = 8,
1216d9db07f0SSricharan R .hid_width = 5,
1217d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1218d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1219d9db07f0SSricharan R .name = "blsp1_qup2_spi_apps_clk_src",
1220d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1221d9db07f0SSricharan R .num_parents = 3,
1222d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1223d9db07f0SSricharan R },
1224d9db07f0SSricharan R };
1225d9db07f0SSricharan R
1226d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = {
1227d9db07f0SSricharan R .cmd_rcgr = 0x04000,
1228d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1229d9db07f0SSricharan R .hid_width = 5,
1230d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1231d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1232d9db07f0SSricharan R .name = "blsp1_qup3_i2c_apps_clk_src",
1233d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1234d9db07f0SSricharan R .num_parents = 3,
1235d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1236d9db07f0SSricharan R },
1237d9db07f0SSricharan R };
1238d9db07f0SSricharan R
1239d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = {
1240d9db07f0SSricharan R .cmd_rcgr = 0x04014,
1241d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1242d9db07f0SSricharan R .mnd_width = 8,
1243d9db07f0SSricharan R .hid_width = 5,
1244d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1245d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1246d9db07f0SSricharan R .name = "blsp1_qup3_spi_apps_clk_src",
1247d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1248d9db07f0SSricharan R .num_parents = 3,
1249d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1250d9db07f0SSricharan R },
1251d9db07f0SSricharan R };
1252d9db07f0SSricharan R
1253d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = {
1254d9db07f0SSricharan R .cmd_rcgr = 0x05000,
1255d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1256d9db07f0SSricharan R .hid_width = 5,
1257d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1258d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1259d9db07f0SSricharan R .name = "blsp1_qup4_i2c_apps_clk_src",
1260d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1261d9db07f0SSricharan R .num_parents = 3,
1262d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1263d9db07f0SSricharan R },
1264d9db07f0SSricharan R };
1265d9db07f0SSricharan R
1266d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = {
1267d9db07f0SSricharan R .cmd_rcgr = 0x05014,
1268d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1269d9db07f0SSricharan R .mnd_width = 8,
1270d9db07f0SSricharan R .hid_width = 5,
1271d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1272d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1273d9db07f0SSricharan R .name = "blsp1_qup4_spi_apps_clk_src",
1274d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1275d9db07f0SSricharan R .num_parents = 3,
1276d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1277d9db07f0SSricharan R },
1278d9db07f0SSricharan R };
1279d9db07f0SSricharan R
1280d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = {
1281d9db07f0SSricharan R .cmd_rcgr = 0x06000,
1282d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1283d9db07f0SSricharan R .hid_width = 5,
1284d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1285d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1286d9db07f0SSricharan R .name = "blsp1_qup5_i2c_apps_clk_src",
1287d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1288d9db07f0SSricharan R .num_parents = 3,
1289d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1290d9db07f0SSricharan R },
1291d9db07f0SSricharan R };
1292d9db07f0SSricharan R
1293d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = {
1294d9db07f0SSricharan R .cmd_rcgr = 0x06014,
1295d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1296d9db07f0SSricharan R .mnd_width = 8,
1297d9db07f0SSricharan R .hid_width = 5,
1298d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1299d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1300d9db07f0SSricharan R .name = "blsp1_qup5_spi_apps_clk_src",
1301d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1302d9db07f0SSricharan R .num_parents = 3,
1303d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1304d9db07f0SSricharan R },
1305d9db07f0SSricharan R };
1306d9db07f0SSricharan R
1307d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = {
1308d9db07f0SSricharan R .cmd_rcgr = 0x07000,
1309d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1310d9db07f0SSricharan R .hid_width = 5,
1311d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1312d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1313d9db07f0SSricharan R .name = "blsp1_qup6_i2c_apps_clk_src",
1314d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1315d9db07f0SSricharan R .num_parents = 3,
1316d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1317d9db07f0SSricharan R },
1318d9db07f0SSricharan R };
1319d9db07f0SSricharan R
1320d9db07f0SSricharan R static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = {
1321d9db07f0SSricharan R .cmd_rcgr = 0x07014,
1322d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1323d9db07f0SSricharan R .mnd_width = 8,
1324d9db07f0SSricharan R .hid_width = 5,
1325d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1326d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1327d9db07f0SSricharan R .name = "blsp1_qup6_spi_apps_clk_src",
1328d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1329d9db07f0SSricharan R .num_parents = 3,
1330d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1331d9db07f0SSricharan R },
1332d9db07f0SSricharan R };
1333d9db07f0SSricharan R
1334d9db07f0SSricharan R static const struct freq_tbl ftbl_blsp1_uart_apps_clk_src[] = {
1335d9db07f0SSricharan R F(3686400, P_GPLL0_DIV2, 1, 144, 15625),
1336d9db07f0SSricharan R F(7372800, P_GPLL0_DIV2, 1, 288, 15625),
1337d9db07f0SSricharan R F(14745600, P_GPLL0_DIV2, 1, 576, 15625),
1338d9db07f0SSricharan R F(16000000, P_GPLL0_DIV2, 5, 1, 5),
1339d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1340d9db07f0SSricharan R F(24000000, P_GPLL0, 1, 3, 100),
1341d9db07f0SSricharan R F(25000000, P_GPLL0, 16, 1, 2),
1342d9db07f0SSricharan R F(32000000, P_GPLL0, 1, 1, 25),
1343d9db07f0SSricharan R F(40000000, P_GPLL0, 1, 1, 20),
1344d9db07f0SSricharan R F(46400000, P_GPLL0, 1, 29, 500),
1345d9db07f0SSricharan R F(48000000, P_GPLL0, 1, 3, 50),
1346d9db07f0SSricharan R F(51200000, P_GPLL0, 1, 8, 125),
1347d9db07f0SSricharan R F(56000000, P_GPLL0, 1, 7, 100),
1348d9db07f0SSricharan R F(58982400, P_GPLL0, 1, 1152, 15625),
1349d9db07f0SSricharan R F(60000000, P_GPLL0, 1, 3, 40),
1350d9db07f0SSricharan R F(64000000, P_GPLL0, 12.5, 1, 1),
1351d9db07f0SSricharan R { }
1352d9db07f0SSricharan R };
1353d9db07f0SSricharan R
1354d9db07f0SSricharan R static struct clk_rcg2 blsp1_uart1_apps_clk_src = {
1355d9db07f0SSricharan R .cmd_rcgr = 0x02044,
1356d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1357d9db07f0SSricharan R .mnd_width = 16,
1358d9db07f0SSricharan R .hid_width = 5,
1359d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1360d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1361d9db07f0SSricharan R .name = "blsp1_uart1_apps_clk_src",
1362d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1363d9db07f0SSricharan R .num_parents = 3,
1364d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1365d9db07f0SSricharan R },
1366d9db07f0SSricharan R };
1367d9db07f0SSricharan R
1368d9db07f0SSricharan R static struct clk_rcg2 blsp1_uart2_apps_clk_src = {
1369d9db07f0SSricharan R .cmd_rcgr = 0x03034,
1370d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1371d9db07f0SSricharan R .mnd_width = 16,
1372d9db07f0SSricharan R .hid_width = 5,
1373d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1374d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1375d9db07f0SSricharan R .name = "blsp1_uart2_apps_clk_src",
1376d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1377d9db07f0SSricharan R .num_parents = 3,
1378d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1379d9db07f0SSricharan R },
1380d9db07f0SSricharan R };
1381d9db07f0SSricharan R
1382d9db07f0SSricharan R static struct clk_rcg2 blsp1_uart3_apps_clk_src = {
1383d9db07f0SSricharan R .cmd_rcgr = 0x04034,
1384d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1385d9db07f0SSricharan R .mnd_width = 16,
1386d9db07f0SSricharan R .hid_width = 5,
1387d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1388d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1389d9db07f0SSricharan R .name = "blsp1_uart3_apps_clk_src",
1390d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1391d9db07f0SSricharan R .num_parents = 3,
1392d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1393d9db07f0SSricharan R },
1394d9db07f0SSricharan R };
1395d9db07f0SSricharan R
1396d9db07f0SSricharan R static struct clk_rcg2 blsp1_uart4_apps_clk_src = {
1397d9db07f0SSricharan R .cmd_rcgr = 0x05034,
1398d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1399d9db07f0SSricharan R .mnd_width = 16,
1400d9db07f0SSricharan R .hid_width = 5,
1401d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1402d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1403d9db07f0SSricharan R .name = "blsp1_uart4_apps_clk_src",
1404d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1405d9db07f0SSricharan R .num_parents = 3,
1406d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1407d9db07f0SSricharan R },
1408d9db07f0SSricharan R };
1409d9db07f0SSricharan R
1410d9db07f0SSricharan R static struct clk_rcg2 blsp1_uart5_apps_clk_src = {
1411d9db07f0SSricharan R .cmd_rcgr = 0x06034,
1412d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1413d9db07f0SSricharan R .mnd_width = 16,
1414d9db07f0SSricharan R .hid_width = 5,
1415d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1416d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1417d9db07f0SSricharan R .name = "blsp1_uart5_apps_clk_src",
1418d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1419d9db07f0SSricharan R .num_parents = 3,
1420d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1421d9db07f0SSricharan R },
1422d9db07f0SSricharan R };
1423d9db07f0SSricharan R
1424d9db07f0SSricharan R static struct clk_rcg2 blsp1_uart6_apps_clk_src = {
1425d9db07f0SSricharan R .cmd_rcgr = 0x07034,
1426d9db07f0SSricharan R .freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1427d9db07f0SSricharan R .mnd_width = 16,
1428d9db07f0SSricharan R .hid_width = 5,
1429d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1430d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1431d9db07f0SSricharan R .name = "blsp1_uart6_apps_clk_src",
1432d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1433d9db07f0SSricharan R .num_parents = 3,
1434d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1435d9db07f0SSricharan R },
1436d9db07f0SSricharan R };
1437d9db07f0SSricharan R
1438d9db07f0SSricharan R static const struct freq_tbl ftbl_crypto_clk_src[] = {
1439d9db07f0SSricharan R F(40000000, P_GPLL0_DIV2, 10, 0, 0),
1440d9db07f0SSricharan R F(80000000, P_GPLL0, 10, 0, 0),
1441d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
1442d9db07f0SSricharan R F(160000000, P_GPLL0, 5, 0, 0),
1443d9db07f0SSricharan R { }
1444d9db07f0SSricharan R };
1445d9db07f0SSricharan R
1446d9db07f0SSricharan R static struct clk_rcg2 crypto_clk_src = {
1447d9db07f0SSricharan R .cmd_rcgr = 0x16004,
1448d9db07f0SSricharan R .freq_tbl = ftbl_crypto_clk_src,
1449d9db07f0SSricharan R .hid_width = 5,
1450d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1451d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1452d9db07f0SSricharan R .name = "crypto_clk_src",
1453d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1454d9db07f0SSricharan R .num_parents = 3,
1455d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1456d9db07f0SSricharan R },
1457d9db07f0SSricharan R };
1458d9db07f0SSricharan R
1459d9db07f0SSricharan R static const struct freq_tbl ftbl_gp_clk_src[] = {
1460d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1461d9db07f0SSricharan R F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1462d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
1463d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
1464d9db07f0SSricharan R F(266666666, P_GPLL0, 3, 0, 0),
1465d9db07f0SSricharan R { }
1466d9db07f0SSricharan R };
1467d9db07f0SSricharan R
1468d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll0_sleep_clk[] = {
1469d9db07f0SSricharan R { .fw_name = "xo" },
1470d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1471d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
1472d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
1473d9db07f0SSricharan R { .fw_name = "sleep_clk" },
1474d9db07f0SSricharan R };
1475d9db07f0SSricharan R
1476d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map[] = {
1477d9db07f0SSricharan R { P_XO, 0 },
1478d9db07f0SSricharan R { P_GPLL0, 1 },
1479d9db07f0SSricharan R { P_GPLL6, 2 },
1480d9db07f0SSricharan R { P_GPLL0_DIV2, 4 },
1481d9db07f0SSricharan R { P_SLEEP_CLK, 6 },
1482d9db07f0SSricharan R };
1483d9db07f0SSricharan R
1484d9db07f0SSricharan R static struct clk_rcg2 gp1_clk_src = {
1485d9db07f0SSricharan R .cmd_rcgr = 0x08004,
1486d9db07f0SSricharan R .freq_tbl = ftbl_gp_clk_src,
1487d9db07f0SSricharan R .mnd_width = 8,
1488d9db07f0SSricharan R .hid_width = 5,
1489d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
1490d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1491d9db07f0SSricharan R .name = "gp1_clk_src",
1492d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll6_gpll0_sleep_clk,
1493d9db07f0SSricharan R .num_parents = 5,
1494d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1495d9db07f0SSricharan R },
1496d9db07f0SSricharan R };
1497d9db07f0SSricharan R
1498d9db07f0SSricharan R static struct clk_rcg2 gp2_clk_src = {
1499d9db07f0SSricharan R .cmd_rcgr = 0x09004,
1500d9db07f0SSricharan R .freq_tbl = ftbl_gp_clk_src,
1501d9db07f0SSricharan R .mnd_width = 8,
1502d9db07f0SSricharan R .hid_width = 5,
1503d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
1504d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1505d9db07f0SSricharan R .name = "gp2_clk_src",
1506d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll6_gpll0_sleep_clk,
1507d9db07f0SSricharan R .num_parents = 5,
1508d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1509d9db07f0SSricharan R },
1510d9db07f0SSricharan R };
1511d9db07f0SSricharan R
1512d9db07f0SSricharan R static struct clk_rcg2 gp3_clk_src = {
1513d9db07f0SSricharan R .cmd_rcgr = 0x0a004,
1514d9db07f0SSricharan R .freq_tbl = ftbl_gp_clk_src,
1515d9db07f0SSricharan R .mnd_width = 8,
1516d9db07f0SSricharan R .hid_width = 5,
1517d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
1518d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1519d9db07f0SSricharan R .name = "gp3_clk_src",
1520d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll6_gpll0_sleep_clk,
1521d9db07f0SSricharan R .num_parents = 5,
1522d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1523d9db07f0SSricharan R },
1524d9db07f0SSricharan R };
1525d9db07f0SSricharan R
1526d9db07f0SSricharan R static struct clk_fixed_factor nss_ppe_cdiv_clk_src = {
1527d9db07f0SSricharan R .mult = 1,
1528d9db07f0SSricharan R .div = 4,
1529d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1530d9db07f0SSricharan R .name = "nss_ppe_cdiv_clk_src",
1531d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1532d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
1533d9db07f0SSricharan R .num_parents = 1,
1534d9db07f0SSricharan R .ops = &clk_fixed_factor_ops,
1535d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1536d9db07f0SSricharan R },
1537d9db07f0SSricharan R };
1538d9db07f0SSricharan R
1539d9db07f0SSricharan R static struct clk_regmap_div nss_ubi0_div_clk_src = {
1540d9db07f0SSricharan R .reg = 0x68118,
1541d9db07f0SSricharan R .shift = 0,
1542d9db07f0SSricharan R .width = 4,
1543d9db07f0SSricharan R .clkr = {
1544d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1545d9db07f0SSricharan R .name = "nss_ubi0_div_clk_src",
1546d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1547d9db07f0SSricharan R &nss_ubi0_clk_src.clkr.hw },
1548d9db07f0SSricharan R .num_parents = 1,
1549d9db07f0SSricharan R .ops = &clk_regmap_div_ro_ops,
1550d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1551d9db07f0SSricharan R },
1552d9db07f0SSricharan R },
1553d9db07f0SSricharan R };
1554d9db07f0SSricharan R
1555d9db07f0SSricharan R static const struct freq_tbl ftbl_pcie_aux_clk_src[] = {
1556d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1557*421b135aSGabor Juhos { }
1558d9db07f0SSricharan R };
1559d9db07f0SSricharan R
1560d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_core_pi_sleep_clk[] = {
1561d9db07f0SSricharan R { .fw_name = "xo" },
1562d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1563d9db07f0SSricharan R { .fw_name = "sleep_clk" },
1564d9db07f0SSricharan R };
1565d9db07f0SSricharan R
1566d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_core_pi_sleep_clk_map[] = {
1567d9db07f0SSricharan R { P_XO, 0 },
1568d9db07f0SSricharan R { P_GPLL0, 2 },
1569d9db07f0SSricharan R { P_PI_SLEEP, 6 },
1570d9db07f0SSricharan R };
1571d9db07f0SSricharan R
1572d9db07f0SSricharan R static struct clk_rcg2 pcie0_aux_clk_src = {
1573d9db07f0SSricharan R .cmd_rcgr = 0x75024,
1574d9db07f0SSricharan R .freq_tbl = ftbl_pcie_aux_clk_src,
1575d9db07f0SSricharan R .mnd_width = 16,
1576d9db07f0SSricharan R .hid_width = 5,
1577d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_core_pi_sleep_clk_map,
1578d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1579d9db07f0SSricharan R .name = "pcie0_aux_clk_src",
1580d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_core_pi_sleep_clk,
1581d9db07f0SSricharan R .num_parents = 3,
1582d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1583d9db07f0SSricharan R },
1584d9db07f0SSricharan R };
1585d9db07f0SSricharan R
1586d9db07f0SSricharan R static const struct clk_parent_data gcc_pcie20_phy0_pipe_clk_xo[] = {
1587d9db07f0SSricharan R { .fw_name = "pcie20_phy0_pipe_clk" },
1588d9db07f0SSricharan R { .fw_name = "xo" },
1589d9db07f0SSricharan R };
1590d9db07f0SSricharan R
1591d9db07f0SSricharan R static const struct parent_map gcc_pcie20_phy0_pipe_clk_xo_map[] = {
1592d9db07f0SSricharan R { P_PCIE20_PHY0_PIPE, 0 },
1593d9db07f0SSricharan R { P_XO, 2 },
1594d9db07f0SSricharan R };
1595d9db07f0SSricharan R
1596d9db07f0SSricharan R static struct clk_regmap_mux pcie0_pipe_clk_src = {
1597d9db07f0SSricharan R .reg = 0x7501c,
1598d9db07f0SSricharan R .shift = 8,
1599d9db07f0SSricharan R .width = 2,
1600d9db07f0SSricharan R .parent_map = gcc_pcie20_phy0_pipe_clk_xo_map,
1601d9db07f0SSricharan R .clkr = {
1602d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1603d9db07f0SSricharan R .name = "pcie0_pipe_clk_src",
1604d9db07f0SSricharan R .parent_data = gcc_pcie20_phy0_pipe_clk_xo,
1605d9db07f0SSricharan R .num_parents = 2,
1606d9db07f0SSricharan R .ops = &clk_regmap_mux_closest_ops,
1607d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1608d9db07f0SSricharan R },
1609d9db07f0SSricharan R },
1610d9db07f0SSricharan R };
1611d9db07f0SSricharan R
1612d9db07f0SSricharan R static const struct freq_tbl ftbl_sdcc_apps_clk_src[] = {
1613d9db07f0SSricharan R F(144000, P_XO, 16, 12, 125),
1614d9db07f0SSricharan R F(400000, P_XO, 12, 1, 5),
1615d9db07f0SSricharan R F(24000000, P_GPLL2, 12, 1, 4),
1616d9db07f0SSricharan R F(48000000, P_GPLL2, 12, 1, 2),
1617d9db07f0SSricharan R F(96000000, P_GPLL2, 12, 0, 0),
1618d9db07f0SSricharan R F(177777778, P_GPLL0, 4.5, 0, 0),
1619d9db07f0SSricharan R F(192000000, P_GPLL2, 6, 0, 0),
1620d9db07f0SSricharan R F(384000000, P_GPLL2, 3, 0, 0),
1621d9db07f0SSricharan R { }
1622d9db07f0SSricharan R };
1623d9db07f0SSricharan R
1624d9db07f0SSricharan R static const struct clk_parent_data
1625d9db07f0SSricharan R gcc_xo_gpll0_gpll2_gpll0_out_main_div2[] = {
1626d9db07f0SSricharan R { .fw_name = "xo" },
1627d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1628d9db07f0SSricharan R { .hw = &gpll2.clkr.hw },
1629d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
1630d9db07f0SSricharan R };
1631d9db07f0SSricharan R
1632d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map[] = {
1633d9db07f0SSricharan R { P_XO, 0 },
1634d9db07f0SSricharan R { P_GPLL0, 1 },
1635d9db07f0SSricharan R { P_GPLL2, 2 },
1636d9db07f0SSricharan R { P_GPLL0_DIV2, 4 },
1637d9db07f0SSricharan R };
1638d9db07f0SSricharan R
1639d9db07f0SSricharan R static struct clk_rcg2 sdcc1_apps_clk_src = {
1640d9db07f0SSricharan R .cmd_rcgr = 0x42004,
1641d9db07f0SSricharan R .freq_tbl = ftbl_sdcc_apps_clk_src,
1642d9db07f0SSricharan R .mnd_width = 8,
1643d9db07f0SSricharan R .hid_width = 5,
1644d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map,
1645d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1646d9db07f0SSricharan R .name = "sdcc1_apps_clk_src",
1647d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll2_gpll0_out_main_div2,
1648d9db07f0SSricharan R .num_parents = 4,
164956e5ae01SMantas Pucka .ops = &clk_rcg2_floor_ops,
1650d9db07f0SSricharan R },
1651d9db07f0SSricharan R };
1652d9db07f0SSricharan R
1653d9db07f0SSricharan R static const struct freq_tbl ftbl_usb_aux_clk_src[] = {
1654d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1655d9db07f0SSricharan R { }
1656d9db07f0SSricharan R };
1657d9db07f0SSricharan R
1658d9db07f0SSricharan R static struct clk_rcg2 usb0_aux_clk_src = {
1659d9db07f0SSricharan R .cmd_rcgr = 0x3e05c,
1660d9db07f0SSricharan R .freq_tbl = ftbl_usb_aux_clk_src,
1661d9db07f0SSricharan R .mnd_width = 16,
1662d9db07f0SSricharan R .hid_width = 5,
1663d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_core_pi_sleep_clk_map,
1664d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1665d9db07f0SSricharan R .name = "usb0_aux_clk_src",
1666d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_core_pi_sleep_clk,
1667d9db07f0SSricharan R .num_parents = 3,
1668d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1669d9db07f0SSricharan R },
1670d9db07f0SSricharan R };
1671d9db07f0SSricharan R
1672d9db07f0SSricharan R static const struct freq_tbl ftbl_usb_mock_utmi_clk_src[] = {
1673d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1674d9db07f0SSricharan R F(60000000, P_GPLL6, 6, 1, 3),
1675d9db07f0SSricharan R { }
1676d9db07f0SSricharan R };
1677d9db07f0SSricharan R
1678d9db07f0SSricharan R static const struct clk_parent_data
1679d9db07f0SSricharan R gcc_xo_gpll6_gpll0_gpll0_out_main_div2[] = {
1680d9db07f0SSricharan R { .fw_name = "xo" },
1681d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
1682d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1683d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
1684d9db07f0SSricharan R };
1685d9db07f0SSricharan R
1686d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map[] = {
1687d9db07f0SSricharan R { P_XO, 0 },
1688d9db07f0SSricharan R { P_GPLL6, 1 },
1689d9db07f0SSricharan R { P_GPLL0, 3 },
1690d9db07f0SSricharan R { P_GPLL0_DIV2, 4 },
1691d9db07f0SSricharan R };
1692d9db07f0SSricharan R
1693d9db07f0SSricharan R static struct clk_rcg2 usb0_mock_utmi_clk_src = {
1694d9db07f0SSricharan R .cmd_rcgr = 0x3e020,
1695d9db07f0SSricharan R .freq_tbl = ftbl_usb_mock_utmi_clk_src,
1696d9db07f0SSricharan R .mnd_width = 8,
1697d9db07f0SSricharan R .hid_width = 5,
1698d9db07f0SSricharan R .parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
1699d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1700d9db07f0SSricharan R .name = "usb0_mock_utmi_clk_src",
1701d9db07f0SSricharan R .parent_data = gcc_xo_gpll6_gpll0_gpll0_out_main_div2,
1702d9db07f0SSricharan R .num_parents = 4,
1703d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1704d9db07f0SSricharan R },
1705d9db07f0SSricharan R };
1706d9db07f0SSricharan R
1707d9db07f0SSricharan R static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] = {
1708d9db07f0SSricharan R { .fw_name = "usb3phy_0_cc_pipe_clk" },
1709d9db07f0SSricharan R { .fw_name = "xo" },
1710d9db07f0SSricharan R };
1711d9db07f0SSricharan R
1712d9db07f0SSricharan R static const struct parent_map gcc_usb3phy_0_cc_pipe_clk_xo_map[] = {
1713d9db07f0SSricharan R { P_USB3PHY_0_PIPE, 0 },
1714d9db07f0SSricharan R { P_XO, 2 },
1715d9db07f0SSricharan R };
1716d9db07f0SSricharan R
1717d9db07f0SSricharan R static struct clk_regmap_mux usb0_pipe_clk_src = {
1718d9db07f0SSricharan R .reg = 0x3e048,
1719d9db07f0SSricharan R .shift = 8,
1720d9db07f0SSricharan R .width = 2,
1721d9db07f0SSricharan R .parent_map = gcc_usb3phy_0_cc_pipe_clk_xo_map,
1722d9db07f0SSricharan R .clkr = {
1723d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1724d9db07f0SSricharan R .name = "usb0_pipe_clk_src",
1725d9db07f0SSricharan R .parent_data = gcc_usb3phy_0_cc_pipe_clk_xo,
1726d9db07f0SSricharan R .num_parents = 2,
1727d9db07f0SSricharan R .ops = &clk_regmap_mux_closest_ops,
1728d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1729d9db07f0SSricharan R },
1730d9db07f0SSricharan R },
1731d9db07f0SSricharan R };
1732d9db07f0SSricharan R
1733d9db07f0SSricharan R static const struct freq_tbl ftbl_sdcc_ice_core_clk_src[] = {
1734d9db07f0SSricharan R F(80000000, P_GPLL0_DIV2, 5, 0, 0),
1735d9db07f0SSricharan R F(160000000, P_GPLL0, 5, 0, 0),
1736d9db07f0SSricharan R F(216000000, P_GPLL6, 5, 0, 0),
1737d9db07f0SSricharan R F(308570000, P_GPLL6, 3.5, 0, 0),
1738*421b135aSGabor Juhos { }
1739d9db07f0SSricharan R };
1740d9db07f0SSricharan R
1741d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll0_div2[] = {
1742d9db07f0SSricharan R { .fw_name = "xo"},
1743d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1744d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
1745d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
1746d9db07f0SSricharan R };
1747d9db07f0SSricharan R
1748d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll6_gpll0_div2_map[] = {
1749d9db07f0SSricharan R { P_XO, 0 },
1750d9db07f0SSricharan R { P_GPLL0, 1 },
1751d9db07f0SSricharan R { P_GPLL6, 2 },
1752d9db07f0SSricharan R { P_GPLL0_DIV2, 4 },
1753d9db07f0SSricharan R };
1754d9db07f0SSricharan R
1755d9db07f0SSricharan R static struct clk_rcg2 sdcc1_ice_core_clk_src = {
1756d9db07f0SSricharan R .cmd_rcgr = 0x5d000,
1757d9db07f0SSricharan R .freq_tbl = ftbl_sdcc_ice_core_clk_src,
1758d9db07f0SSricharan R .mnd_width = 8,
1759d9db07f0SSricharan R .hid_width = 5,
1760d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll6_gpll0_div2_map,
1761d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1762d9db07f0SSricharan R .name = "sdcc1_ice_core_clk_src",
1763d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll6_gpll0_div2,
1764d9db07f0SSricharan R .num_parents = 4,
1765d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1766d9db07f0SSricharan R },
1767d9db07f0SSricharan R };
1768d9db07f0SSricharan R
1769d9db07f0SSricharan R static const struct freq_tbl ftbl_qdss_stm_clk_src[] = {
1770d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1771d9db07f0SSricharan R F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1772d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
1773d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
1774d9db07f0SSricharan R { }
1775d9db07f0SSricharan R };
1776d9db07f0SSricharan R
1777d9db07f0SSricharan R static struct clk_rcg2 qdss_stm_clk_src = {
1778d9db07f0SSricharan R .cmd_rcgr = 0x2902C,
1779d9db07f0SSricharan R .freq_tbl = ftbl_qdss_stm_clk_src,
1780d9db07f0SSricharan R .hid_width = 5,
1781d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1782d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1783d9db07f0SSricharan R .name = "qdss_stm_clk_src",
1784d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1785d9db07f0SSricharan R .num_parents = 3,
1786d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1787d9db07f0SSricharan R },
1788d9db07f0SSricharan R };
1789d9db07f0SSricharan R
1790d9db07f0SSricharan R static const struct freq_tbl ftbl_qdss_traceclkin_clk_src[] = {
1791d9db07f0SSricharan R F(80000000, P_GPLL0_DIV2, 5, 0, 0),
1792d9db07f0SSricharan R F(160000000, P_GPLL0, 5, 0, 0),
1793d9db07f0SSricharan R F(300000000, P_GPLL4, 4, 0, 0),
1794d9db07f0SSricharan R { }
1795d9db07f0SSricharan R };
1796d9db07f0SSricharan R
1797d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll4_gpll0_gpll0_div2[] = {
1798d9db07f0SSricharan R { .fw_name = "xo" },
1799d9db07f0SSricharan R { .hw = &gpll4.clkr.hw },
1800d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1801d9db07f0SSricharan R { .hw = &gpll0_out_main_div2.hw },
1802d9db07f0SSricharan R };
1803d9db07f0SSricharan R
1804d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll4_gpll0_gpll0_div2_map[] = {
1805d9db07f0SSricharan R { P_XO, 0 },
1806d9db07f0SSricharan R { P_GPLL4, 1 },
1807d9db07f0SSricharan R { P_GPLL0, 2 },
1808d9db07f0SSricharan R { P_GPLL0_DIV2, 4 },
1809d9db07f0SSricharan R };
1810d9db07f0SSricharan R
1811d9db07f0SSricharan R static struct clk_rcg2 qdss_traceclkin_clk_src = {
1812d9db07f0SSricharan R .cmd_rcgr = 0x29048,
1813d9db07f0SSricharan R .freq_tbl = ftbl_qdss_traceclkin_clk_src,
1814d9db07f0SSricharan R .hid_width = 5,
1815d9db07f0SSricharan R .parent_map = gcc_xo_gpll4_gpll0_gpll0_div2_map,
1816d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1817d9db07f0SSricharan R .name = "qdss_traceclkin_clk_src",
1818d9db07f0SSricharan R .parent_data = gcc_xo_gpll4_gpll0_gpll0_div2,
1819d9db07f0SSricharan R .num_parents = 4,
1820d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1821d9db07f0SSricharan R },
1822d9db07f0SSricharan R };
1823d9db07f0SSricharan R
1824d9db07f0SSricharan R static struct clk_rcg2 usb1_mock_utmi_clk_src = {
1825d9db07f0SSricharan R .cmd_rcgr = 0x3f020,
1826d9db07f0SSricharan R .freq_tbl = ftbl_usb_mock_utmi_clk_src,
1827d9db07f0SSricharan R .mnd_width = 8,
1828d9db07f0SSricharan R .hid_width = 5,
1829d9db07f0SSricharan R .parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
1830d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1831d9db07f0SSricharan R .name = "usb1_mock_utmi_clk_src",
1832d9db07f0SSricharan R .parent_data = gcc_xo_gpll6_gpll0_gpll0_out_main_div2,
1833d9db07f0SSricharan R .num_parents = 4,
1834d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1835d9db07f0SSricharan R },
1836d9db07f0SSricharan R };
1837d9db07f0SSricharan R
1838d9db07f0SSricharan R static struct clk_branch gcc_adss_pwm_clk = {
1839d9db07f0SSricharan R .halt_reg = 0x1c020,
1840d9db07f0SSricharan R .clkr = {
1841d9db07f0SSricharan R .enable_reg = 0x1c020,
1842d9db07f0SSricharan R .enable_mask = BIT(0),
1843d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1844d9db07f0SSricharan R .name = "gcc_adss_pwm_clk",
1845d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1846d9db07f0SSricharan R &adss_pwm_clk_src.clkr.hw },
1847d9db07f0SSricharan R .num_parents = 1,
1848d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1849d9db07f0SSricharan R .ops = &clk_branch2_ops,
1850d9db07f0SSricharan R },
1851d9db07f0SSricharan R },
1852d9db07f0SSricharan R };
1853d9db07f0SSricharan R
1854d9db07f0SSricharan R static struct clk_branch gcc_apss_ahb_clk = {
1855d9db07f0SSricharan R .halt_reg = 0x4601c,
1856d9db07f0SSricharan R .halt_check = BRANCH_HALT_VOTED,
1857d9db07f0SSricharan R .clkr = {
1858d9db07f0SSricharan R .enable_reg = 0x0b004,
1859d9db07f0SSricharan R .enable_mask = BIT(14),
1860d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1861d9db07f0SSricharan R .name = "gcc_apss_ahb_clk",
1862d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1863d9db07f0SSricharan R &apss_ahb_postdiv_clk_src.clkr.hw },
1864d9db07f0SSricharan R .num_parents = 1,
1865d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1866d9db07f0SSricharan R .ops = &clk_branch2_ops,
1867d9db07f0SSricharan R },
1868d9db07f0SSricharan R },
1869d9db07f0SSricharan R };
1870d9db07f0SSricharan R
1871d9db07f0SSricharan R static const struct freq_tbl ftbl_system_noc_bfdcd_clk_src[] = {
1872d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1873d9db07f0SSricharan R F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1874d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
1875d9db07f0SSricharan R F(133333333, P_GPLL0, 6, 0, 0),
1876d9db07f0SSricharan R F(160000000, P_GPLL0, 5, 0, 0),
1877d9db07f0SSricharan R F(200000000, P_GPLL0, 4, 0, 0),
1878d9db07f0SSricharan R F(266666667, P_GPLL0, 3, 0, 0),
1879d9db07f0SSricharan R { }
1880d9db07f0SSricharan R };
1881d9db07f0SSricharan R
1882d9db07f0SSricharan R static struct clk_rcg2 system_noc_bfdcd_clk_src = {
1883d9db07f0SSricharan R .cmd_rcgr = 0x26004,
1884d9db07f0SSricharan R .freq_tbl = ftbl_system_noc_bfdcd_clk_src,
1885d9db07f0SSricharan R .hid_width = 5,
1886d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map,
1887d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1888d9db07f0SSricharan R .name = "system_noc_bfdcd_clk_src",
1889d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll6_gpll0_out_main_div2,
1890d9db07f0SSricharan R .num_parents = 4,
1891d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1892d9db07f0SSricharan R },
1893d9db07f0SSricharan R };
1894d9db07f0SSricharan R
1895d9db07f0SSricharan R static const struct freq_tbl ftbl_ubi32_mem_noc_bfdcd_clk_src[] = {
1896d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
1897d9db07f0SSricharan R F(307670000, P_BIAS_PLL_NSS_NOC, 1.5, 0, 0),
1898d9db07f0SSricharan R F(533333333, P_GPLL0, 1.5, 0, 0),
1899d9db07f0SSricharan R { }
1900d9db07f0SSricharan R };
1901d9db07f0SSricharan R
1902d9db07f0SSricharan R static const struct clk_parent_data
1903d9db07f0SSricharan R gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk[] = {
1904d9db07f0SSricharan R { .fw_name = "xo" },
1905d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
1906d9db07f0SSricharan R { .hw = &gpll2.clkr.hw },
1907d9db07f0SSricharan R { .fw_name = "bias_pll_nss_noc_clk" },
1908d9db07f0SSricharan R };
1909d9db07f0SSricharan R
1910d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk_map[] = {
1911d9db07f0SSricharan R { P_XO, 0 },
1912d9db07f0SSricharan R { P_GPLL0, 1 },
1913d9db07f0SSricharan R { P_GPLL2, 3 },
1914d9db07f0SSricharan R { P_BIAS_PLL_NSS_NOC, 4 },
1915d9db07f0SSricharan R };
1916d9db07f0SSricharan R
1917d9db07f0SSricharan R static struct clk_rcg2 ubi32_mem_noc_bfdcd_clk_src = {
1918d9db07f0SSricharan R .cmd_rcgr = 0x68088,
1919d9db07f0SSricharan R .freq_tbl = ftbl_ubi32_mem_noc_bfdcd_clk_src,
1920d9db07f0SSricharan R .hid_width = 5,
1921d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk_map,
1922d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
1923d9db07f0SSricharan R .name = "ubi32_mem_noc_bfdcd_clk_src",
1924d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk,
1925d9db07f0SSricharan R .num_parents = 4,
1926d9db07f0SSricharan R .ops = &clk_rcg2_ops,
1927d9db07f0SSricharan R },
1928d9db07f0SSricharan R };
1929d9db07f0SSricharan R
1930d9db07f0SSricharan R static struct clk_branch gcc_apss_axi_clk = {
1931d9db07f0SSricharan R .halt_reg = 0x46020,
1932d9db07f0SSricharan R .halt_check = BRANCH_HALT_VOTED,
1933d9db07f0SSricharan R .clkr = {
1934d9db07f0SSricharan R .enable_reg = 0x0b004,
1935d9db07f0SSricharan R .enable_mask = BIT(13),
1936d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1937d9db07f0SSricharan R .name = "gcc_apss_axi_clk",
1938d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1939d9db07f0SSricharan R &apss_axi_clk_src.clkr.hw },
1940d9db07f0SSricharan R .num_parents = 1,
1941d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1942d9db07f0SSricharan R .ops = &clk_branch2_ops,
1943d9db07f0SSricharan R },
1944d9db07f0SSricharan R },
1945d9db07f0SSricharan R };
1946d9db07f0SSricharan R
1947d9db07f0SSricharan R static struct clk_branch gcc_blsp1_ahb_clk = {
1948d9db07f0SSricharan R .halt_reg = 0x01008,
1949d9db07f0SSricharan R .halt_check = BRANCH_HALT_VOTED,
1950d9db07f0SSricharan R .clkr = {
1951d9db07f0SSricharan R .enable_reg = 0x0b004,
1952d9db07f0SSricharan R .enable_mask = BIT(10),
1953d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1954d9db07f0SSricharan R .name = "gcc_blsp1_ahb_clk",
1955d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1956d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
1957d9db07f0SSricharan R .num_parents = 1,
1958d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1959d9db07f0SSricharan R .ops = &clk_branch2_ops,
1960d9db07f0SSricharan R },
1961d9db07f0SSricharan R },
1962d9db07f0SSricharan R };
1963d9db07f0SSricharan R
1964d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = {
1965d9db07f0SSricharan R .halt_reg = 0x02008,
1966d9db07f0SSricharan R .clkr = {
1967d9db07f0SSricharan R .enable_reg = 0x02008,
1968d9db07f0SSricharan R .enable_mask = BIT(0),
1969d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1970d9db07f0SSricharan R .name = "gcc_blsp1_qup1_i2c_apps_clk",
1971d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1972d9db07f0SSricharan R &blsp1_qup1_i2c_apps_clk_src.clkr.hw },
1973d9db07f0SSricharan R .num_parents = 1,
1974d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1975d9db07f0SSricharan R .ops = &clk_branch2_ops,
1976d9db07f0SSricharan R },
1977d9db07f0SSricharan R },
1978d9db07f0SSricharan R };
1979d9db07f0SSricharan R
1980d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = {
1981d9db07f0SSricharan R .halt_reg = 0x02004,
1982d9db07f0SSricharan R .clkr = {
1983d9db07f0SSricharan R .enable_reg = 0x02004,
1984d9db07f0SSricharan R .enable_mask = BIT(0),
1985d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
1986d9db07f0SSricharan R .name = "gcc_blsp1_qup1_spi_apps_clk",
1987d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
1988d9db07f0SSricharan R &blsp1_qup1_spi_apps_clk_src.clkr.hw },
1989d9db07f0SSricharan R .num_parents = 1,
1990d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
1991d9db07f0SSricharan R .ops = &clk_branch2_ops,
1992d9db07f0SSricharan R },
1993d9db07f0SSricharan R },
1994d9db07f0SSricharan R };
1995d9db07f0SSricharan R
1996d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = {
1997d9db07f0SSricharan R .halt_reg = 0x03010,
1998d9db07f0SSricharan R .clkr = {
1999d9db07f0SSricharan R .enable_reg = 0x03010,
2000d9db07f0SSricharan R .enable_mask = BIT(0),
2001d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2002d9db07f0SSricharan R .name = "gcc_blsp1_qup2_i2c_apps_clk",
2003d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2004d9db07f0SSricharan R &blsp1_qup2_i2c_apps_clk_src.clkr.hw },
2005d9db07f0SSricharan R .num_parents = 1,
2006d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2007d9db07f0SSricharan R .ops = &clk_branch2_ops,
2008d9db07f0SSricharan R },
2009d9db07f0SSricharan R },
2010d9db07f0SSricharan R };
2011d9db07f0SSricharan R
2012d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
2013d9db07f0SSricharan R .halt_reg = 0x0300c,
2014d9db07f0SSricharan R .clkr = {
2015d9db07f0SSricharan R .enable_reg = 0x0300c,
2016d9db07f0SSricharan R .enable_mask = BIT(0),
2017d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2018d9db07f0SSricharan R .name = "gcc_blsp1_qup2_spi_apps_clk",
2019d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2020d9db07f0SSricharan R &blsp1_qup2_spi_apps_clk_src.clkr.hw },
2021d9db07f0SSricharan R .num_parents = 1,
2022d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2023d9db07f0SSricharan R .ops = &clk_branch2_ops,
2024d9db07f0SSricharan R },
2025d9db07f0SSricharan R },
2026d9db07f0SSricharan R };
2027d9db07f0SSricharan R
2028d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = {
2029d9db07f0SSricharan R .halt_reg = 0x04010,
2030d9db07f0SSricharan R .clkr = {
2031d9db07f0SSricharan R .enable_reg = 0x04010,
2032d9db07f0SSricharan R .enable_mask = BIT(0),
2033d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2034d9db07f0SSricharan R .name = "gcc_blsp1_qup3_i2c_apps_clk",
2035d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2036d9db07f0SSricharan R &blsp1_qup3_i2c_apps_clk_src.clkr.hw },
2037d9db07f0SSricharan R .num_parents = 1,
2038d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2039d9db07f0SSricharan R .ops = &clk_branch2_ops,
2040d9db07f0SSricharan R },
2041d9db07f0SSricharan R },
2042d9db07f0SSricharan R };
2043d9db07f0SSricharan R
2044d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = {
2045d9db07f0SSricharan R .halt_reg = 0x0400c,
2046d9db07f0SSricharan R .clkr = {
2047d9db07f0SSricharan R .enable_reg = 0x0400c,
2048d9db07f0SSricharan R .enable_mask = BIT(0),
2049d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2050d9db07f0SSricharan R .name = "gcc_blsp1_qup3_spi_apps_clk",
2051d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2052d9db07f0SSricharan R &blsp1_qup3_spi_apps_clk_src.clkr.hw },
2053d9db07f0SSricharan R .num_parents = 1,
2054d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2055d9db07f0SSricharan R .ops = &clk_branch2_ops,
2056d9db07f0SSricharan R },
2057d9db07f0SSricharan R },
2058d9db07f0SSricharan R };
2059d9db07f0SSricharan R
2060d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = {
2061d9db07f0SSricharan R .halt_reg = 0x05010,
2062d9db07f0SSricharan R .clkr = {
2063d9db07f0SSricharan R .enable_reg = 0x05010,
2064d9db07f0SSricharan R .enable_mask = BIT(0),
2065d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2066d9db07f0SSricharan R .name = "gcc_blsp1_qup4_i2c_apps_clk",
2067d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2068d9db07f0SSricharan R &blsp1_qup4_i2c_apps_clk_src.clkr.hw },
2069d9db07f0SSricharan R .num_parents = 1,
2070d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2071d9db07f0SSricharan R .ops = &clk_branch2_ops,
2072d9db07f0SSricharan R },
2073d9db07f0SSricharan R },
2074d9db07f0SSricharan R };
2075d9db07f0SSricharan R
2076d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = {
2077d9db07f0SSricharan R .halt_reg = 0x0500c,
2078d9db07f0SSricharan R .clkr = {
2079d9db07f0SSricharan R .enable_reg = 0x0500c,
2080d9db07f0SSricharan R .enable_mask = BIT(0),
2081d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2082d9db07f0SSricharan R .name = "gcc_blsp1_qup4_spi_apps_clk",
2083d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2084d9db07f0SSricharan R &blsp1_qup4_spi_apps_clk_src.clkr.hw },
2085d9db07f0SSricharan R .num_parents = 1,
2086d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2087d9db07f0SSricharan R .ops = &clk_branch2_ops,
2088d9db07f0SSricharan R },
2089d9db07f0SSricharan R },
2090d9db07f0SSricharan R };
2091d9db07f0SSricharan R
2092d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = {
2093d9db07f0SSricharan R .halt_reg = 0x06010,
2094d9db07f0SSricharan R .clkr = {
2095d9db07f0SSricharan R .enable_reg = 0x06010,
2096d9db07f0SSricharan R .enable_mask = BIT(0),
2097d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2098d9db07f0SSricharan R .name = "gcc_blsp1_qup5_i2c_apps_clk",
2099d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2100d9db07f0SSricharan R &blsp1_qup5_i2c_apps_clk_src.clkr.hw },
2101d9db07f0SSricharan R .num_parents = 1,
2102d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2103d9db07f0SSricharan R .ops = &clk_branch2_ops,
2104d9db07f0SSricharan R },
2105d9db07f0SSricharan R },
2106d9db07f0SSricharan R };
2107d9db07f0SSricharan R
2108d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
2109d9db07f0SSricharan R .halt_reg = 0x0600c,
2110d9db07f0SSricharan R .clkr = {
2111d9db07f0SSricharan R .enable_reg = 0x0600c,
2112d9db07f0SSricharan R .enable_mask = BIT(0),
2113d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2114d9db07f0SSricharan R .name = "gcc_blsp1_qup5_spi_apps_clk",
2115d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2116d9db07f0SSricharan R &blsp1_qup5_spi_apps_clk_src.clkr.hw },
2117d9db07f0SSricharan R .num_parents = 1,
2118d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2119d9db07f0SSricharan R .ops = &clk_branch2_ops,
2120d9db07f0SSricharan R },
2121d9db07f0SSricharan R },
2122d9db07f0SSricharan R };
2123d9db07f0SSricharan R
2124d9db07f0SSricharan R static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
2125d9db07f0SSricharan R .halt_reg = 0x0700c,
2126d9db07f0SSricharan R .clkr = {
2127d9db07f0SSricharan R .enable_reg = 0x0700c,
2128d9db07f0SSricharan R .enable_mask = BIT(0),
2129d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2130d9db07f0SSricharan R .name = "gcc_blsp1_qup6_spi_apps_clk",
2131d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2132d9db07f0SSricharan R &blsp1_qup6_spi_apps_clk_src.clkr.hw },
2133d9db07f0SSricharan R .num_parents = 1,
2134d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2135d9db07f0SSricharan R .ops = &clk_branch2_ops,
2136d9db07f0SSricharan R },
2137d9db07f0SSricharan R },
2138d9db07f0SSricharan R };
2139d9db07f0SSricharan R
2140d9db07f0SSricharan R static struct clk_branch gcc_blsp1_uart1_apps_clk = {
2141d9db07f0SSricharan R .halt_reg = 0x0203c,
2142d9db07f0SSricharan R .clkr = {
2143d9db07f0SSricharan R .enable_reg = 0x0203c,
2144d9db07f0SSricharan R .enable_mask = BIT(0),
2145d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2146d9db07f0SSricharan R .name = "gcc_blsp1_uart1_apps_clk",
2147d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2148d9db07f0SSricharan R &blsp1_uart1_apps_clk_src.clkr.hw },
2149d9db07f0SSricharan R .num_parents = 1,
2150d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2151d9db07f0SSricharan R .ops = &clk_branch2_ops,
2152d9db07f0SSricharan R },
2153d9db07f0SSricharan R },
2154d9db07f0SSricharan R };
2155d9db07f0SSricharan R
2156d9db07f0SSricharan R static struct clk_branch gcc_blsp1_uart2_apps_clk = {
2157d9db07f0SSricharan R .halt_reg = 0x0302c,
2158d9db07f0SSricharan R .clkr = {
2159d9db07f0SSricharan R .enable_reg = 0x0302c,
2160d9db07f0SSricharan R .enable_mask = BIT(0),
2161d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2162d9db07f0SSricharan R .name = "gcc_blsp1_uart2_apps_clk",
2163d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2164d9db07f0SSricharan R &blsp1_uart2_apps_clk_src.clkr.hw },
2165d9db07f0SSricharan R .num_parents = 1,
2166d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2167d9db07f0SSricharan R .ops = &clk_branch2_ops,
2168d9db07f0SSricharan R },
2169d9db07f0SSricharan R },
2170d9db07f0SSricharan R };
2171d9db07f0SSricharan R
2172d9db07f0SSricharan R static struct clk_branch gcc_blsp1_uart3_apps_clk = {
2173d9db07f0SSricharan R .halt_reg = 0x0402c,
2174d9db07f0SSricharan R .clkr = {
2175d9db07f0SSricharan R .enable_reg = 0x0402c,
2176d9db07f0SSricharan R .enable_mask = BIT(0),
2177d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2178d9db07f0SSricharan R .name = "gcc_blsp1_uart3_apps_clk",
2179d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2180d9db07f0SSricharan R &blsp1_uart3_apps_clk_src.clkr.hw },
2181d9db07f0SSricharan R .num_parents = 1,
2182d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2183d9db07f0SSricharan R .ops = &clk_branch2_ops,
2184d9db07f0SSricharan R },
2185d9db07f0SSricharan R },
2186d9db07f0SSricharan R };
2187d9db07f0SSricharan R
2188d9db07f0SSricharan R static struct clk_branch gcc_blsp1_uart4_apps_clk = {
2189d9db07f0SSricharan R .halt_reg = 0x0502c,
2190d9db07f0SSricharan R .clkr = {
2191d9db07f0SSricharan R .enable_reg = 0x0502c,
2192d9db07f0SSricharan R .enable_mask = BIT(0),
2193d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2194d9db07f0SSricharan R .name = "gcc_blsp1_uart4_apps_clk",
2195d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2196d9db07f0SSricharan R &blsp1_uart4_apps_clk_src.clkr.hw },
2197d9db07f0SSricharan R .num_parents = 1,
2198d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2199d9db07f0SSricharan R .ops = &clk_branch2_ops,
2200d9db07f0SSricharan R },
2201d9db07f0SSricharan R },
2202d9db07f0SSricharan R };
2203d9db07f0SSricharan R
2204d9db07f0SSricharan R static struct clk_branch gcc_blsp1_uart5_apps_clk = {
2205d9db07f0SSricharan R .halt_reg = 0x0602c,
2206d9db07f0SSricharan R .clkr = {
2207d9db07f0SSricharan R .enable_reg = 0x0602c,
2208d9db07f0SSricharan R .enable_mask = BIT(0),
2209d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2210d9db07f0SSricharan R .name = "gcc_blsp1_uart5_apps_clk",
2211d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2212d9db07f0SSricharan R &blsp1_uart5_apps_clk_src.clkr.hw },
2213d9db07f0SSricharan R .num_parents = 1,
2214d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2215d9db07f0SSricharan R .ops = &clk_branch2_ops,
2216d9db07f0SSricharan R },
2217d9db07f0SSricharan R },
2218d9db07f0SSricharan R };
2219d9db07f0SSricharan R
2220d9db07f0SSricharan R static struct clk_branch gcc_blsp1_uart6_apps_clk = {
2221d9db07f0SSricharan R .halt_reg = 0x0702c,
2222d9db07f0SSricharan R .clkr = {
2223d9db07f0SSricharan R .enable_reg = 0x0702c,
2224d9db07f0SSricharan R .enable_mask = BIT(0),
2225d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2226d9db07f0SSricharan R .name = "gcc_blsp1_uart6_apps_clk",
2227d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2228d9db07f0SSricharan R &blsp1_uart6_apps_clk_src.clkr.hw },
2229d9db07f0SSricharan R .num_parents = 1,
2230d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2231d9db07f0SSricharan R .ops = &clk_branch2_ops,
2232d9db07f0SSricharan R },
2233d9db07f0SSricharan R },
2234d9db07f0SSricharan R };
2235d9db07f0SSricharan R
2236d9db07f0SSricharan R static struct clk_branch gcc_crypto_ahb_clk = {
2237d9db07f0SSricharan R .halt_reg = 0x16024,
2238d9db07f0SSricharan R .halt_check = BRANCH_HALT_VOTED,
2239d9db07f0SSricharan R .clkr = {
2240d9db07f0SSricharan R .enable_reg = 0x0b004,
2241d9db07f0SSricharan R .enable_mask = BIT(0),
2242d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2243d9db07f0SSricharan R .name = "gcc_crypto_ahb_clk",
2244d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2245d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
2246d9db07f0SSricharan R .num_parents = 1,
2247d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2248d9db07f0SSricharan R .ops = &clk_branch2_ops,
2249d9db07f0SSricharan R },
2250d9db07f0SSricharan R },
2251d9db07f0SSricharan R };
2252d9db07f0SSricharan R
2253d9db07f0SSricharan R static struct clk_branch gcc_crypto_axi_clk = {
2254d9db07f0SSricharan R .halt_reg = 0x16020,
2255d9db07f0SSricharan R .halt_check = BRANCH_HALT_VOTED,
2256d9db07f0SSricharan R .clkr = {
2257d9db07f0SSricharan R .enable_reg = 0x0b004,
2258d9db07f0SSricharan R .enable_mask = BIT(1),
2259d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2260d9db07f0SSricharan R .name = "gcc_crypto_axi_clk",
2261d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2262d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
2263d9db07f0SSricharan R .num_parents = 1,
2264d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2265d9db07f0SSricharan R .ops = &clk_branch2_ops,
2266d9db07f0SSricharan R },
2267d9db07f0SSricharan R },
2268d9db07f0SSricharan R };
2269d9db07f0SSricharan R
2270d9db07f0SSricharan R static struct clk_branch gcc_crypto_clk = {
2271d9db07f0SSricharan R .halt_reg = 0x1601c,
2272d9db07f0SSricharan R .halt_check = BRANCH_HALT_VOTED,
2273d9db07f0SSricharan R .clkr = {
2274d9db07f0SSricharan R .enable_reg = 0x0b004,
2275d9db07f0SSricharan R .enable_mask = BIT(2),
2276d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2277d9db07f0SSricharan R .name = "gcc_crypto_clk",
2278d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2279d9db07f0SSricharan R &crypto_clk_src.clkr.hw },
2280d9db07f0SSricharan R .num_parents = 1,
2281d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2282d9db07f0SSricharan R .ops = &clk_branch2_ops,
2283d9db07f0SSricharan R },
2284d9db07f0SSricharan R },
2285d9db07f0SSricharan R };
2286d9db07f0SSricharan R
2287d9db07f0SSricharan R static struct clk_fixed_factor gpll6_out_main_div2 = {
2288d9db07f0SSricharan R .mult = 1,
2289d9db07f0SSricharan R .div = 2,
2290d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2291d9db07f0SSricharan R .name = "gpll6_out_main_div2",
2292d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2293d9db07f0SSricharan R &gpll6_main.clkr.hw },
2294d9db07f0SSricharan R .num_parents = 1,
2295d9db07f0SSricharan R .ops = &clk_fixed_factor_ops,
2296d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2297d9db07f0SSricharan R },
2298d9db07f0SSricharan R };
2299d9db07f0SSricharan R
2300d9db07f0SSricharan R static struct clk_branch gcc_xo_clk = {
2301d9db07f0SSricharan R .halt_reg = 0x30030,
2302d9db07f0SSricharan R .clkr = {
2303d9db07f0SSricharan R .enable_reg = 0x30030,
2304d9db07f0SSricharan R .enable_mask = BIT(0),
2305d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2306d9db07f0SSricharan R .name = "gcc_xo_clk",
2307d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2308d9db07f0SSricharan R &gcc_xo_clk_src.clkr.hw },
2309d9db07f0SSricharan R .num_parents = 1,
2310d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2311d9db07f0SSricharan R .ops = &clk_branch2_ops,
2312d9db07f0SSricharan R },
2313d9db07f0SSricharan R },
2314d9db07f0SSricharan R };
2315d9db07f0SSricharan R
2316d9db07f0SSricharan R static struct clk_branch gcc_gp1_clk = {
2317d9db07f0SSricharan R .halt_reg = 0x08000,
2318d9db07f0SSricharan R .clkr = {
2319d9db07f0SSricharan R .enable_reg = 0x08000,
2320d9db07f0SSricharan R .enable_mask = BIT(0),
2321d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2322d9db07f0SSricharan R .name = "gcc_gp1_clk",
2323d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2324d9db07f0SSricharan R &gp1_clk_src.clkr.hw },
2325d9db07f0SSricharan R .num_parents = 1,
2326d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2327d9db07f0SSricharan R .ops = &clk_branch2_ops,
2328d9db07f0SSricharan R },
2329d9db07f0SSricharan R },
2330d9db07f0SSricharan R };
2331d9db07f0SSricharan R
2332d9db07f0SSricharan R static struct clk_branch gcc_gp2_clk = {
2333d9db07f0SSricharan R .halt_reg = 0x09000,
2334d9db07f0SSricharan R .clkr = {
2335d9db07f0SSricharan R .enable_reg = 0x09000,
2336d9db07f0SSricharan R .enable_mask = BIT(0),
2337d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2338d9db07f0SSricharan R .name = "gcc_gp2_clk",
2339d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2340d9db07f0SSricharan R &gp2_clk_src.clkr.hw },
2341d9db07f0SSricharan R .num_parents = 1,
2342d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2343d9db07f0SSricharan R .ops = &clk_branch2_ops,
2344d9db07f0SSricharan R },
2345d9db07f0SSricharan R },
2346d9db07f0SSricharan R };
2347d9db07f0SSricharan R
2348d9db07f0SSricharan R static struct clk_branch gcc_gp3_clk = {
2349d9db07f0SSricharan R .halt_reg = 0x0a000,
2350d9db07f0SSricharan R .clkr = {
2351d9db07f0SSricharan R .enable_reg = 0x0a000,
2352d9db07f0SSricharan R .enable_mask = BIT(0),
2353d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2354d9db07f0SSricharan R .name = "gcc_gp3_clk",
2355d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2356d9db07f0SSricharan R &gp3_clk_src.clkr.hw },
2357d9db07f0SSricharan R .num_parents = 1,
2358d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2359d9db07f0SSricharan R .ops = &clk_branch2_ops,
2360d9db07f0SSricharan R },
2361d9db07f0SSricharan R },
2362d9db07f0SSricharan R };
2363d9db07f0SSricharan R
2364d9db07f0SSricharan R static struct clk_branch gcc_mdio_ahb_clk = {
2365d9db07f0SSricharan R .halt_reg = 0x58004,
2366d9db07f0SSricharan R .clkr = {
2367d9db07f0SSricharan R .enable_reg = 0x58004,
2368d9db07f0SSricharan R .enable_mask = BIT(0),
2369d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2370d9db07f0SSricharan R .name = "gcc_mdio_ahb_clk",
2371d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2372d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
2373d9db07f0SSricharan R .num_parents = 1,
2374d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2375d9db07f0SSricharan R .ops = &clk_branch2_ops,
2376d9db07f0SSricharan R },
2377d9db07f0SSricharan R },
2378d9db07f0SSricharan R };
2379d9db07f0SSricharan R
2380d9db07f0SSricharan R static struct clk_branch gcc_crypto_ppe_clk = {
2381d9db07f0SSricharan R .halt_reg = 0x68310,
2382d9db07f0SSricharan R .clkr = {
2383d9db07f0SSricharan R .enable_reg = 0x68310,
2384d9db07f0SSricharan R .enable_mask = BIT(0),
2385d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2386d9db07f0SSricharan R .name = "gcc_crypto_ppe_clk",
2387d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2388d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
2389d9db07f0SSricharan R .num_parents = 1,
2390d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2391d9db07f0SSricharan R .ops = &clk_branch2_ops,
2392d9db07f0SSricharan R },
2393d9db07f0SSricharan R },
2394d9db07f0SSricharan R };
2395d9db07f0SSricharan R
2396d9db07f0SSricharan R static struct clk_branch gcc_nss_ce_apb_clk = {
2397d9db07f0SSricharan R .halt_reg = 0x68174,
2398d9db07f0SSricharan R .clkr = {
2399d9db07f0SSricharan R .enable_reg = 0x68174,
2400d9db07f0SSricharan R .enable_mask = BIT(0),
2401d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2402d9db07f0SSricharan R .name = "gcc_nss_ce_apb_clk",
2403d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2404d9db07f0SSricharan R &nss_ce_clk_src.clkr.hw },
2405d9db07f0SSricharan R .num_parents = 1,
2406d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2407d9db07f0SSricharan R .ops = &clk_branch2_ops,
2408d9db07f0SSricharan R },
2409d9db07f0SSricharan R },
2410d9db07f0SSricharan R };
2411d9db07f0SSricharan R
2412d9db07f0SSricharan R static struct clk_branch gcc_nss_ce_axi_clk = {
2413d9db07f0SSricharan R .halt_reg = 0x68170,
2414d9db07f0SSricharan R .clkr = {
2415d9db07f0SSricharan R .enable_reg = 0x68170,
2416d9db07f0SSricharan R .enable_mask = BIT(0),
2417d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2418d9db07f0SSricharan R .name = "gcc_nss_ce_axi_clk",
2419d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2420d9db07f0SSricharan R &nss_ce_clk_src.clkr.hw },
2421d9db07f0SSricharan R .num_parents = 1,
2422d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2423d9db07f0SSricharan R .ops = &clk_branch2_ops,
2424d9db07f0SSricharan R },
2425d9db07f0SSricharan R },
2426d9db07f0SSricharan R };
2427d9db07f0SSricharan R
2428d9db07f0SSricharan R static struct clk_branch gcc_nss_cfg_clk = {
2429d9db07f0SSricharan R .halt_reg = 0x68160,
2430d9db07f0SSricharan R .clkr = {
2431d9db07f0SSricharan R .enable_reg = 0x68160,
2432d9db07f0SSricharan R .enable_mask = BIT(0),
2433d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2434d9db07f0SSricharan R .name = "gcc_nss_cfg_clk",
2435d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2436d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
2437d9db07f0SSricharan R .num_parents = 1,
2438d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2439d9db07f0SSricharan R .ops = &clk_branch2_ops,
2440d9db07f0SSricharan R },
2441d9db07f0SSricharan R },
2442d9db07f0SSricharan R };
2443d9db07f0SSricharan R
2444d9db07f0SSricharan R static struct clk_branch gcc_nss_crypto_clk = {
2445d9db07f0SSricharan R .halt_reg = 0x68164,
2446d9db07f0SSricharan R .clkr = {
2447d9db07f0SSricharan R .enable_reg = 0x68164,
2448d9db07f0SSricharan R .enable_mask = BIT(0),
2449d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2450d9db07f0SSricharan R .name = "gcc_nss_crypto_clk",
2451d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2452d9db07f0SSricharan R &nss_crypto_clk_src.clkr.hw },
2453d9db07f0SSricharan R .num_parents = 1,
2454d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2455d9db07f0SSricharan R .ops = &clk_branch2_ops,
2456d9db07f0SSricharan R },
2457d9db07f0SSricharan R },
2458d9db07f0SSricharan R };
2459d9db07f0SSricharan R
2460d9db07f0SSricharan R static struct clk_branch gcc_nss_csr_clk = {
2461d9db07f0SSricharan R .halt_reg = 0x68318,
2462d9db07f0SSricharan R .clkr = {
2463d9db07f0SSricharan R .enable_reg = 0x68318,
2464d9db07f0SSricharan R .enable_mask = BIT(0),
2465d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2466d9db07f0SSricharan R .name = "gcc_nss_csr_clk",
2467d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2468d9db07f0SSricharan R &nss_ce_clk_src.clkr.hw },
2469d9db07f0SSricharan R .num_parents = 1,
2470d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2471d9db07f0SSricharan R .ops = &clk_branch2_ops,
2472d9db07f0SSricharan R },
2473d9db07f0SSricharan R },
2474d9db07f0SSricharan R };
2475d9db07f0SSricharan R
2476d9db07f0SSricharan R static struct clk_branch gcc_nss_edma_cfg_clk = {
2477d9db07f0SSricharan R .halt_reg = 0x6819C,
2478d9db07f0SSricharan R .clkr = {
2479d9db07f0SSricharan R .enable_reg = 0x6819C,
2480d9db07f0SSricharan R .enable_mask = BIT(0),
2481d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2482d9db07f0SSricharan R .name = "gcc_nss_edma_cfg_clk",
2483d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2484d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
2485d9db07f0SSricharan R .num_parents = 1,
2486d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2487d9db07f0SSricharan R .ops = &clk_branch2_ops,
2488d9db07f0SSricharan R },
2489d9db07f0SSricharan R },
2490d9db07f0SSricharan R };
2491d9db07f0SSricharan R
2492d9db07f0SSricharan R static struct clk_branch gcc_nss_edma_clk = {
2493d9db07f0SSricharan R .halt_reg = 0x68198,
2494d9db07f0SSricharan R .clkr = {
2495d9db07f0SSricharan R .enable_reg = 0x68198,
2496d9db07f0SSricharan R .enable_mask = BIT(0),
2497d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2498d9db07f0SSricharan R .name = "gcc_nss_edma_clk",
2499d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2500d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
2501d9db07f0SSricharan R .num_parents = 1,
2502d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2503d9db07f0SSricharan R .ops = &clk_branch2_ops,
2504d9db07f0SSricharan R },
2505d9db07f0SSricharan R },
2506d9db07f0SSricharan R };
2507d9db07f0SSricharan R
2508d9db07f0SSricharan R static struct clk_branch gcc_nss_noc_clk = {
2509d9db07f0SSricharan R .halt_reg = 0x68168,
2510d9db07f0SSricharan R .clkr = {
2511d9db07f0SSricharan R .enable_reg = 0x68168,
2512d9db07f0SSricharan R .enable_mask = BIT(0),
2513d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2514d9db07f0SSricharan R .name = "gcc_nss_noc_clk",
2515d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2516d9db07f0SSricharan R &snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2517d9db07f0SSricharan R .num_parents = 1,
2518d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2519d9db07f0SSricharan R .ops = &clk_branch2_ops,
2520d9db07f0SSricharan R },
2521d9db07f0SSricharan R },
2522d9db07f0SSricharan R };
2523d9db07f0SSricharan R
2524d9db07f0SSricharan R static struct clk_branch gcc_ubi0_utcm_clk = {
2525d9db07f0SSricharan R .halt_reg = 0x2606c,
2526d9db07f0SSricharan R .clkr = {
2527d9db07f0SSricharan R .enable_reg = 0x2606c,
2528d9db07f0SSricharan R .enable_mask = BIT(0),
2529d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2530d9db07f0SSricharan R .name = "gcc_ubi0_utcm_clk",
2531d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2532d9db07f0SSricharan R &snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2533d9db07f0SSricharan R .num_parents = 1,
2534d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2535d9db07f0SSricharan R .ops = &clk_branch2_ops,
2536d9db07f0SSricharan R },
2537d9db07f0SSricharan R },
2538d9db07f0SSricharan R };
2539d9db07f0SSricharan R
2540d9db07f0SSricharan R static struct clk_branch gcc_snoc_nssnoc_clk = {
2541d9db07f0SSricharan R .halt_reg = 0x26070,
2542d9db07f0SSricharan R .clkr = {
2543d9db07f0SSricharan R .enable_reg = 0x26070,
2544d9db07f0SSricharan R .enable_mask = BIT(0),
2545d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2546d9db07f0SSricharan R .name = "gcc_snoc_nssnoc_clk",
2547d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2548d9db07f0SSricharan R &snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2549d9db07f0SSricharan R .num_parents = 1,
2550d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2551d9db07f0SSricharan R .ops = &clk_branch2_ops,
2552d9db07f0SSricharan R },
2553d9db07f0SSricharan R },
2554d9db07f0SSricharan R };
2555d9db07f0SSricharan R
2556d9db07f0SSricharan R static const struct freq_tbl ftbl_wcss_ahb_clk_src[] = {
2557d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
2558d9db07f0SSricharan R F(133333333, P_GPLL0, 6, 0, 0),
2559d9db07f0SSricharan R { }
2560d9db07f0SSricharan R };
2561d9db07f0SSricharan R
2562d9db07f0SSricharan R static const struct freq_tbl ftbl_q6_axi_clk_src[] = {
2563d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
2564d9db07f0SSricharan R F(400000000, P_GPLL0, 2, 0, 0),
2565d9db07f0SSricharan R { }
2566d9db07f0SSricharan R };
2567d9db07f0SSricharan R
2568d9db07f0SSricharan R static struct clk_rcg2 wcss_ahb_clk_src = {
2569d9db07f0SSricharan R .cmd_rcgr = 0x59020,
2570d9db07f0SSricharan R .freq_tbl = ftbl_wcss_ahb_clk_src,
2571d9db07f0SSricharan R .hid_width = 5,
2572d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_map,
2573d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
2574d9db07f0SSricharan R .name = "wcss_ahb_clk_src",
2575d9db07f0SSricharan R .parent_data = gcc_xo_gpll0,
2576d9db07f0SSricharan R .num_parents = 2,
2577d9db07f0SSricharan R .ops = &clk_rcg2_ops,
2578d9db07f0SSricharan R },
2579d9db07f0SSricharan R };
2580d9db07f0SSricharan R
2581d9db07f0SSricharan R static const struct clk_parent_data gcc_xo_gpll0_gpll2_gpll4_gpll6[] = {
2582d9db07f0SSricharan R { .fw_name = "xo" },
2583d9db07f0SSricharan R { .hw = &gpll0.clkr.hw },
2584d9db07f0SSricharan R { .hw = &gpll2.clkr.hw },
2585d9db07f0SSricharan R { .hw = &gpll4.clkr.hw },
2586d9db07f0SSricharan R { .hw = &gpll6.clkr.hw },
2587d9db07f0SSricharan R };
2588d9db07f0SSricharan R
2589d9db07f0SSricharan R static const struct parent_map gcc_xo_gpll0_gpll2_gpll4_gpll6_map[] = {
2590d9db07f0SSricharan R { P_XO, 0 },
2591d9db07f0SSricharan R { P_GPLL0, 1 },
2592d9db07f0SSricharan R { P_GPLL2, 2 },
2593d9db07f0SSricharan R { P_GPLL4, 3 },
2594d9db07f0SSricharan R { P_GPLL6, 4 },
2595d9db07f0SSricharan R };
2596d9db07f0SSricharan R
2597d9db07f0SSricharan R static struct clk_rcg2 q6_axi_clk_src = {
2598d9db07f0SSricharan R .cmd_rcgr = 0x59120,
2599d9db07f0SSricharan R .freq_tbl = ftbl_q6_axi_clk_src,
2600d9db07f0SSricharan R .hid_width = 5,
2601d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_gpll2_gpll4_gpll6_map,
2602d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
2603d9db07f0SSricharan R .name = "q6_axi_clk_src",
2604d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_gpll2_gpll4_gpll6,
2605d9db07f0SSricharan R .num_parents = 5,
2606d9db07f0SSricharan R .ops = &clk_rcg2_ops,
2607d9db07f0SSricharan R },
2608d9db07f0SSricharan R };
2609d9db07f0SSricharan R
2610d9db07f0SSricharan R static const struct freq_tbl ftbl_lpass_core_axim_clk_src[] = {
2611d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
2612d9db07f0SSricharan R F(100000000, P_GPLL0, 8, 0, 0),
2613d9db07f0SSricharan R { }
2614d9db07f0SSricharan R };
2615d9db07f0SSricharan R
2616d9db07f0SSricharan R static struct clk_rcg2 lpass_core_axim_clk_src = {
2617d9db07f0SSricharan R .cmd_rcgr = 0x1F020,
2618d9db07f0SSricharan R .freq_tbl = ftbl_lpass_core_axim_clk_src,
2619d9db07f0SSricharan R .hid_width = 5,
2620d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_map,
2621d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
2622d9db07f0SSricharan R .name = "lpass_core_axim_clk_src",
2623d9db07f0SSricharan R .parent_data = gcc_xo_gpll0,
2624d9db07f0SSricharan R .num_parents = 2,
2625d9db07f0SSricharan R .ops = &clk_rcg2_ops,
2626d9db07f0SSricharan R },
2627d9db07f0SSricharan R };
2628d9db07f0SSricharan R
2629d9db07f0SSricharan R static const struct freq_tbl ftbl_lpass_snoc_cfg_clk_src[] = {
2630d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
2631d9db07f0SSricharan R F(266666667, P_GPLL0, 3, 0, 0),
2632d9db07f0SSricharan R { }
2633d9db07f0SSricharan R };
2634d9db07f0SSricharan R
2635d9db07f0SSricharan R static struct clk_rcg2 lpass_snoc_cfg_clk_src = {
2636d9db07f0SSricharan R .cmd_rcgr = 0x1F040,
2637d9db07f0SSricharan R .freq_tbl = ftbl_lpass_snoc_cfg_clk_src,
2638d9db07f0SSricharan R .hid_width = 5,
2639d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_map,
2640d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
2641d9db07f0SSricharan R .name = "lpass_snoc_cfg_clk_src",
2642d9db07f0SSricharan R .parent_data = gcc_xo_gpll0,
2643d9db07f0SSricharan R .num_parents = 2,
2644d9db07f0SSricharan R .ops = &clk_rcg2_ops,
2645d9db07f0SSricharan R },
2646d9db07f0SSricharan R };
2647d9db07f0SSricharan R
2648d9db07f0SSricharan R static const struct freq_tbl ftbl_lpass_q6_axim_clk_src[] = {
2649d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
2650d9db07f0SSricharan R F(400000000, P_GPLL0, 2, 0, 0),
2651d9db07f0SSricharan R { }
2652d9db07f0SSricharan R };
2653d9db07f0SSricharan R
2654d9db07f0SSricharan R static struct clk_rcg2 lpass_q6_axim_clk_src = {
2655d9db07f0SSricharan R .cmd_rcgr = 0x1F008,
2656d9db07f0SSricharan R .freq_tbl = ftbl_lpass_q6_axim_clk_src,
2657d9db07f0SSricharan R .hid_width = 5,
2658d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_map,
2659d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
2660d9db07f0SSricharan R .name = "lpass_q6_axim_clk_src",
2661d9db07f0SSricharan R .parent_data = gcc_xo_gpll0,
2662d9db07f0SSricharan R .num_parents = 2,
2663d9db07f0SSricharan R .ops = &clk_rcg2_ops,
2664d9db07f0SSricharan R },
2665d9db07f0SSricharan R };
2666d9db07f0SSricharan R
2667d9db07f0SSricharan R static struct freq_tbl ftbl_rbcpr_wcss_clk_src[] = {
2668d9db07f0SSricharan R F(24000000, P_XO, 1, 0, 0),
2669d9db07f0SSricharan R F(50000000, P_GPLL0, 16, 0, 0),
2670d9db07f0SSricharan R { }
2671d9db07f0SSricharan R };
2672d9db07f0SSricharan R
2673d9db07f0SSricharan R static struct clk_rcg2 rbcpr_wcss_clk_src = {
2674d9db07f0SSricharan R .cmd_rcgr = 0x3a00c,
2675d9db07f0SSricharan R .freq_tbl = ftbl_rbcpr_wcss_clk_src,
2676d9db07f0SSricharan R .hid_width = 5,
2677d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_out_main_div2_gpll0_map,
2678d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
2679d9db07f0SSricharan R .name = "rbcpr_wcss_clk_src",
2680d9db07f0SSricharan R .parent_data = gcc_xo_gpll0_out_main_div2_gpll0,
2681d9db07f0SSricharan R .num_parents = 3,
2682d9db07f0SSricharan R .ops = &clk_rcg2_ops,
2683d9db07f0SSricharan R },
2684d9db07f0SSricharan R };
2685d9db07f0SSricharan R
2686d9db07f0SSricharan R static struct clk_branch gcc_lpass_core_axim_clk = {
2687d9db07f0SSricharan R .halt_reg = 0x1F028,
2688d9db07f0SSricharan R .clkr = {
2689d9db07f0SSricharan R .enable_reg = 0x1F028,
2690d9db07f0SSricharan R .enable_mask = BIT(0),
2691d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2692d9db07f0SSricharan R .name = "gcc_lpass_core_axim_clk",
2693d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2694d9db07f0SSricharan R &lpass_core_axim_clk_src.clkr.hw },
2695d9db07f0SSricharan R .num_parents = 1,
2696d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2697d9db07f0SSricharan R .ops = &clk_branch2_ops,
2698d9db07f0SSricharan R },
2699d9db07f0SSricharan R },
2700d9db07f0SSricharan R };
2701d9db07f0SSricharan R
2702d9db07f0SSricharan R static struct clk_branch gcc_lpass_snoc_cfg_clk = {
2703d9db07f0SSricharan R .halt_reg = 0x1F048,
2704d9db07f0SSricharan R .clkr = {
2705d9db07f0SSricharan R .enable_reg = 0x1F048,
2706d9db07f0SSricharan R .enable_mask = BIT(0),
2707d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2708d9db07f0SSricharan R .name = "gcc_lpass_snoc_cfg_clk",
2709d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2710d9db07f0SSricharan R &lpass_snoc_cfg_clk_src.clkr.hw },
2711d9db07f0SSricharan R .num_parents = 1,
2712d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2713d9db07f0SSricharan R .ops = &clk_branch2_ops,
2714d9db07f0SSricharan R },
2715d9db07f0SSricharan R },
2716d9db07f0SSricharan R };
2717d9db07f0SSricharan R
2718d9db07f0SSricharan R static struct clk_branch gcc_lpass_q6_axim_clk = {
2719d9db07f0SSricharan R .halt_reg = 0x1F010,
2720d9db07f0SSricharan R .clkr = {
2721d9db07f0SSricharan R .enable_reg = 0x1F010,
2722d9db07f0SSricharan R .enable_mask = BIT(0),
2723d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2724d9db07f0SSricharan R .name = "gcc_lpass_q6_axim_clk",
2725d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2726d9db07f0SSricharan R &lpass_q6_axim_clk_src.clkr.hw },
2727d9db07f0SSricharan R .num_parents = 1,
2728d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2729d9db07f0SSricharan R .ops = &clk_branch2_ops,
2730d9db07f0SSricharan R },
2731d9db07f0SSricharan R },
2732d9db07f0SSricharan R };
2733d9db07f0SSricharan R
2734d9db07f0SSricharan R static struct clk_branch gcc_lpass_q6_atbm_at_clk = {
2735d9db07f0SSricharan R .halt_reg = 0x1F018,
2736d9db07f0SSricharan R .clkr = {
2737d9db07f0SSricharan R .enable_reg = 0x1F018,
2738d9db07f0SSricharan R .enable_mask = BIT(0),
2739d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2740d9db07f0SSricharan R .name = "gcc_lpass_q6_atbm_at_clk",
2741d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2742d9db07f0SSricharan R &qdss_at_clk_src.clkr.hw },
2743d9db07f0SSricharan R .num_parents = 1,
2744d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2745d9db07f0SSricharan R .ops = &clk_branch2_ops,
2746d9db07f0SSricharan R },
2747d9db07f0SSricharan R },
2748d9db07f0SSricharan R };
2749d9db07f0SSricharan R
2750d9db07f0SSricharan R static struct clk_branch gcc_lpass_q6_pclkdbg_clk = {
2751d9db07f0SSricharan R .halt_reg = 0x1F01C,
2752d9db07f0SSricharan R .clkr = {
2753d9db07f0SSricharan R .enable_reg = 0x1F01C,
2754d9db07f0SSricharan R .enable_mask = BIT(0),
2755d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2756d9db07f0SSricharan R .name = "gcc_lpass_q6_pclkdbg_clk",
2757d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2758d9db07f0SSricharan R &qdss_dap_sync_clk_src.hw },
2759d9db07f0SSricharan R .num_parents = 1,
2760d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2761d9db07f0SSricharan R .ops = &clk_branch2_ops,
2762d9db07f0SSricharan R },
2763d9db07f0SSricharan R },
2764d9db07f0SSricharan R };
2765d9db07f0SSricharan R
2766d9db07f0SSricharan R static struct clk_branch gcc_lpass_q6ss_tsctr_1to2_clk = {
2767d9db07f0SSricharan R .halt_reg = 0x1F014,
2768d9db07f0SSricharan R .clkr = {
2769d9db07f0SSricharan R .enable_reg = 0x1F014,
2770d9db07f0SSricharan R .enable_mask = BIT(0),
2771d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2772d9db07f0SSricharan R .name = "gcc_lpass_q6ss_tsctr_1to2_clk",
2773d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2774d9db07f0SSricharan R &qdss_tsctr_div2_clk_src.hw },
2775d9db07f0SSricharan R .num_parents = 1,
2776d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2777d9db07f0SSricharan R .ops = &clk_branch2_ops,
2778d9db07f0SSricharan R },
2779d9db07f0SSricharan R },
2780d9db07f0SSricharan R };
2781d9db07f0SSricharan R
2782d9db07f0SSricharan R static struct clk_branch gcc_lpass_q6ss_trig_clk = {
2783d9db07f0SSricharan R .halt_reg = 0x1F038,
2784d9db07f0SSricharan R .clkr = {
2785d9db07f0SSricharan R .enable_reg = 0x1F038,
2786d9db07f0SSricharan R .enable_mask = BIT(0),
2787d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2788d9db07f0SSricharan R .name = "gcc_lpass_q6ss_trig_clk",
2789d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2790d9db07f0SSricharan R &qdss_dap_sync_clk_src.hw },
2791d9db07f0SSricharan R .num_parents = 1,
2792d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2793d9db07f0SSricharan R .ops = &clk_branch2_ops,
2794d9db07f0SSricharan R },
2795d9db07f0SSricharan R },
2796d9db07f0SSricharan R };
2797d9db07f0SSricharan R
2798d9db07f0SSricharan R static struct clk_branch gcc_lpass_tbu_clk = {
2799d9db07f0SSricharan R .halt_reg = 0x12094,
2800d9db07f0SSricharan R .clkr = {
2801d9db07f0SSricharan R .enable_reg = 0xb00c,
2802d9db07f0SSricharan R .enable_mask = BIT(10),
2803d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2804d9db07f0SSricharan R .name = "gcc_lpass_tbu_clk",
2805d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2806d9db07f0SSricharan R &lpass_q6_axim_clk_src.clkr.hw },
2807d9db07f0SSricharan R .num_parents = 1,
2808d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2809d9db07f0SSricharan R .ops = &clk_branch2_ops,
2810d9db07f0SSricharan R },
2811d9db07f0SSricharan R },
2812d9db07f0SSricharan R };
2813d9db07f0SSricharan R
2814d9db07f0SSricharan R static struct clk_branch gcc_pcnoc_lpass_clk = {
2815d9db07f0SSricharan R .halt_reg = 0x27020,
2816d9db07f0SSricharan R .clkr = {
2817d9db07f0SSricharan R .enable_reg = 0x27020,
2818d9db07f0SSricharan R .enable_mask = BIT(0),
2819d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2820d9db07f0SSricharan R .name = "gcc_pcnoc_lpass_clk",
2821d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2822d9db07f0SSricharan R &lpass_core_axim_clk_src.clkr.hw },
2823d9db07f0SSricharan R .num_parents = 1,
2824d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2825d9db07f0SSricharan R .ops = &clk_branch2_ops,
2826d9db07f0SSricharan R },
2827d9db07f0SSricharan R },
2828d9db07f0SSricharan R };
2829d9db07f0SSricharan R
2830d9db07f0SSricharan R static struct clk_branch gcc_mem_noc_lpass_clk = {
2831d9db07f0SSricharan R .halt_reg = 0x1D044,
2832d9db07f0SSricharan R .clkr = {
2833d9db07f0SSricharan R .enable_reg = 0x1D044,
2834d9db07f0SSricharan R .enable_mask = BIT(0),
2835d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2836d9db07f0SSricharan R .name = "gcc_mem_noc_lpass_clk",
2837d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2838d9db07f0SSricharan R &lpass_q6_axim_clk_src.clkr.hw },
2839d9db07f0SSricharan R .num_parents = 1,
2840d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2841d9db07f0SSricharan R .ops = &clk_branch2_ops,
2842d9db07f0SSricharan R },
2843d9db07f0SSricharan R },
2844d9db07f0SSricharan R };
2845d9db07f0SSricharan R
2846d9db07f0SSricharan R static struct clk_branch gcc_snoc_lpass_cfg_clk = {
2847d9db07f0SSricharan R .halt_reg = 0x26074,
2848d9db07f0SSricharan R .clkr = {
2849d9db07f0SSricharan R .enable_reg = 0x26074,
2850d9db07f0SSricharan R .enable_mask = BIT(0),
2851d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2852d9db07f0SSricharan R .name = "gcc_snoc_lpass_cfg_clk",
2853d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2854d9db07f0SSricharan R &lpass_snoc_cfg_clk_src.clkr.hw },
2855d9db07f0SSricharan R .num_parents = 1,
2856d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2857d9db07f0SSricharan R .ops = &clk_branch2_ops,
2858d9db07f0SSricharan R },
2859d9db07f0SSricharan R },
2860d9db07f0SSricharan R };
2861d9db07f0SSricharan R
2862d9db07f0SSricharan R static struct clk_branch gcc_mem_noc_ubi32_clk = {
2863d9db07f0SSricharan R .halt_reg = 0x1D03C,
2864d9db07f0SSricharan R .clkr = {
2865d9db07f0SSricharan R .enable_reg = 0x1D03C,
2866d9db07f0SSricharan R .enable_mask = BIT(0),
2867d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2868d9db07f0SSricharan R .name = "gcc_mem_noc_ubi32_clk",
2869d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2870d9db07f0SSricharan R &ubi32_mem_noc_bfdcd_clk_src.clkr.hw },
2871d9db07f0SSricharan R .num_parents = 1,
2872d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2873d9db07f0SSricharan R .ops = &clk_branch2_ops,
2874d9db07f0SSricharan R },
2875d9db07f0SSricharan R },
2876d9db07f0SSricharan R };
2877d9db07f0SSricharan R
2878d9db07f0SSricharan R static struct clk_branch gcc_nss_port1_rx_clk = {
2879d9db07f0SSricharan R .halt_reg = 0x68240,
2880d9db07f0SSricharan R .clkr = {
2881d9db07f0SSricharan R .enable_reg = 0x68240,
2882d9db07f0SSricharan R .enable_mask = BIT(0),
2883d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2884d9db07f0SSricharan R .name = "gcc_nss_port1_rx_clk",
2885d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2886d9db07f0SSricharan R &nss_port1_rx_div_clk_src.clkr.hw },
2887d9db07f0SSricharan R .num_parents = 1,
2888d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2889d9db07f0SSricharan R .ops = &clk_branch2_ops,
2890d9db07f0SSricharan R },
2891d9db07f0SSricharan R },
2892d9db07f0SSricharan R };
2893d9db07f0SSricharan R
2894d9db07f0SSricharan R static struct clk_branch gcc_nss_port1_tx_clk = {
2895d9db07f0SSricharan R .halt_reg = 0x68244,
2896d9db07f0SSricharan R .clkr = {
2897d9db07f0SSricharan R .enable_reg = 0x68244,
2898d9db07f0SSricharan R .enable_mask = BIT(0),
2899d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2900d9db07f0SSricharan R .name = "gcc_nss_port1_tx_clk",
2901d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2902d9db07f0SSricharan R &nss_port1_tx_div_clk_src.clkr.hw },
2903d9db07f0SSricharan R .num_parents = 1,
2904d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2905d9db07f0SSricharan R .ops = &clk_branch2_ops,
2906d9db07f0SSricharan R },
2907d9db07f0SSricharan R },
2908d9db07f0SSricharan R };
2909d9db07f0SSricharan R
2910d9db07f0SSricharan R static struct clk_branch gcc_nss_port2_rx_clk = {
2911d9db07f0SSricharan R .halt_reg = 0x68248,
2912d9db07f0SSricharan R .clkr = {
2913d9db07f0SSricharan R .enable_reg = 0x68248,
2914d9db07f0SSricharan R .enable_mask = BIT(0),
2915d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2916d9db07f0SSricharan R .name = "gcc_nss_port2_rx_clk",
2917d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2918d9db07f0SSricharan R &nss_port2_rx_div_clk_src.clkr.hw },
2919d9db07f0SSricharan R .num_parents = 1,
2920d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2921d9db07f0SSricharan R .ops = &clk_branch2_ops,
2922d9db07f0SSricharan R },
2923d9db07f0SSricharan R },
2924d9db07f0SSricharan R };
2925d9db07f0SSricharan R
2926d9db07f0SSricharan R static struct clk_branch gcc_nss_port2_tx_clk = {
2927d9db07f0SSricharan R .halt_reg = 0x6824c,
2928d9db07f0SSricharan R .clkr = {
2929d9db07f0SSricharan R .enable_reg = 0x6824c,
2930d9db07f0SSricharan R .enable_mask = BIT(0),
2931d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2932d9db07f0SSricharan R .name = "gcc_nss_port2_tx_clk",
2933d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2934d9db07f0SSricharan R &nss_port2_tx_div_clk_src.clkr.hw },
2935d9db07f0SSricharan R .num_parents = 1,
2936d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2937d9db07f0SSricharan R .ops = &clk_branch2_ops,
2938d9db07f0SSricharan R },
2939d9db07f0SSricharan R },
2940d9db07f0SSricharan R };
2941d9db07f0SSricharan R
2942d9db07f0SSricharan R static struct clk_branch gcc_nss_port3_rx_clk = {
2943d9db07f0SSricharan R .halt_reg = 0x68250,
2944d9db07f0SSricharan R .clkr = {
2945d9db07f0SSricharan R .enable_reg = 0x68250,
2946d9db07f0SSricharan R .enable_mask = BIT(0),
2947d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2948d9db07f0SSricharan R .name = "gcc_nss_port3_rx_clk",
2949d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2950d9db07f0SSricharan R &nss_port3_rx_div_clk_src.clkr.hw },
2951d9db07f0SSricharan R .num_parents = 1,
2952d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2953d9db07f0SSricharan R .ops = &clk_branch2_ops,
2954d9db07f0SSricharan R },
2955d9db07f0SSricharan R },
2956d9db07f0SSricharan R };
2957d9db07f0SSricharan R
2958d9db07f0SSricharan R static struct clk_branch gcc_nss_port3_tx_clk = {
2959d9db07f0SSricharan R .halt_reg = 0x68254,
2960d9db07f0SSricharan R .clkr = {
2961d9db07f0SSricharan R .enable_reg = 0x68254,
2962d9db07f0SSricharan R .enable_mask = BIT(0),
2963d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2964d9db07f0SSricharan R .name = "gcc_nss_port3_tx_clk",
2965d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2966d9db07f0SSricharan R &nss_port3_tx_div_clk_src.clkr.hw },
2967d9db07f0SSricharan R .num_parents = 1,
2968d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2969d9db07f0SSricharan R .ops = &clk_branch2_ops,
2970d9db07f0SSricharan R },
2971d9db07f0SSricharan R },
2972d9db07f0SSricharan R };
2973d9db07f0SSricharan R
2974d9db07f0SSricharan R static struct clk_branch gcc_nss_port4_rx_clk = {
2975d9db07f0SSricharan R .halt_reg = 0x68258,
2976d9db07f0SSricharan R .clkr = {
2977d9db07f0SSricharan R .enable_reg = 0x68258,
2978d9db07f0SSricharan R .enable_mask = BIT(0),
2979d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2980d9db07f0SSricharan R .name = "gcc_nss_port4_rx_clk",
2981d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2982d9db07f0SSricharan R &nss_port4_rx_div_clk_src.clkr.hw },
2983d9db07f0SSricharan R .num_parents = 1,
2984d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
2985d9db07f0SSricharan R .ops = &clk_branch2_ops,
2986d9db07f0SSricharan R },
2987d9db07f0SSricharan R },
2988d9db07f0SSricharan R };
2989d9db07f0SSricharan R
2990d9db07f0SSricharan R static struct clk_branch gcc_nss_port4_tx_clk = {
2991d9db07f0SSricharan R .halt_reg = 0x6825c,
2992d9db07f0SSricharan R .clkr = {
2993d9db07f0SSricharan R .enable_reg = 0x6825c,
2994d9db07f0SSricharan R .enable_mask = BIT(0),
2995d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
2996d9db07f0SSricharan R .name = "gcc_nss_port4_tx_clk",
2997d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
2998d9db07f0SSricharan R &nss_port4_tx_div_clk_src.clkr.hw },
2999d9db07f0SSricharan R .num_parents = 1,
3000d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3001d9db07f0SSricharan R .ops = &clk_branch2_ops,
3002d9db07f0SSricharan R },
3003d9db07f0SSricharan R },
3004d9db07f0SSricharan R };
3005d9db07f0SSricharan R
3006d9db07f0SSricharan R static struct clk_branch gcc_nss_port5_rx_clk = {
3007d9db07f0SSricharan R .halt_reg = 0x68260,
3008d9db07f0SSricharan R .clkr = {
3009d9db07f0SSricharan R .enable_reg = 0x68260,
3010d9db07f0SSricharan R .enable_mask = BIT(0),
3011d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3012d9db07f0SSricharan R .name = "gcc_nss_port5_rx_clk",
3013d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3014d9db07f0SSricharan R &nss_port5_rx_div_clk_src.clkr.hw },
3015d9db07f0SSricharan R .num_parents = 1,
3016d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3017d9db07f0SSricharan R .ops = &clk_branch2_ops,
3018d9db07f0SSricharan R },
3019d9db07f0SSricharan R },
3020d9db07f0SSricharan R };
3021d9db07f0SSricharan R
3022d9db07f0SSricharan R static struct clk_branch gcc_nss_port5_tx_clk = {
3023d9db07f0SSricharan R .halt_reg = 0x68264,
3024d9db07f0SSricharan R .clkr = {
3025d9db07f0SSricharan R .enable_reg = 0x68264,
3026d9db07f0SSricharan R .enable_mask = BIT(0),
3027d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3028d9db07f0SSricharan R .name = "gcc_nss_port5_tx_clk",
3029d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3030d9db07f0SSricharan R &nss_port5_tx_div_clk_src.clkr.hw },
3031d9db07f0SSricharan R .num_parents = 1,
3032d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3033d9db07f0SSricharan R .ops = &clk_branch2_ops,
3034d9db07f0SSricharan R },
3035d9db07f0SSricharan R },
3036d9db07f0SSricharan R };
3037d9db07f0SSricharan R
3038d9db07f0SSricharan R static struct clk_branch gcc_nss_ppe_cfg_clk = {
3039d9db07f0SSricharan R .halt_reg = 0x68194,
3040d9db07f0SSricharan R .clkr = {
3041d9db07f0SSricharan R .enable_reg = 0x68194,
3042d9db07f0SSricharan R .enable_mask = BIT(0),
3043d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3044d9db07f0SSricharan R .name = "gcc_nss_ppe_cfg_clk",
3045d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3046d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3047d9db07f0SSricharan R .num_parents = 1,
3048d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3049d9db07f0SSricharan R .ops = &clk_branch2_ops,
3050d9db07f0SSricharan R },
3051d9db07f0SSricharan R },
3052d9db07f0SSricharan R };
3053d9db07f0SSricharan R
3054d9db07f0SSricharan R static struct clk_branch gcc_nss_ppe_clk = {
3055d9db07f0SSricharan R .halt_reg = 0x68190,
3056d9db07f0SSricharan R .clkr = {
3057d9db07f0SSricharan R .enable_reg = 0x68190,
3058d9db07f0SSricharan R .enable_mask = BIT(0),
3059d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3060d9db07f0SSricharan R .name = "gcc_nss_ppe_clk",
3061d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3062d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3063d9db07f0SSricharan R .num_parents = 1,
3064d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3065d9db07f0SSricharan R .ops = &clk_branch2_ops,
3066d9db07f0SSricharan R },
3067d9db07f0SSricharan R },
3068d9db07f0SSricharan R };
3069d9db07f0SSricharan R
3070d9db07f0SSricharan R static struct clk_branch gcc_nss_ppe_ipe_clk = {
3071d9db07f0SSricharan R .halt_reg = 0x68338,
3072d9db07f0SSricharan R .clkr = {
3073d9db07f0SSricharan R .enable_reg = 0x68338,
3074d9db07f0SSricharan R .enable_mask = BIT(0),
3075d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3076d9db07f0SSricharan R .name = "gcc_nss_ppe_ipe_clk",
3077d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3078d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3079d9db07f0SSricharan R .num_parents = 1,
3080d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3081d9db07f0SSricharan R .ops = &clk_branch2_ops,
3082d9db07f0SSricharan R },
3083d9db07f0SSricharan R },
3084d9db07f0SSricharan R };
3085d9db07f0SSricharan R
3086d9db07f0SSricharan R static struct clk_branch gcc_nss_ptp_ref_clk = {
3087d9db07f0SSricharan R .halt_reg = 0x6816C,
3088d9db07f0SSricharan R .clkr = {
3089d9db07f0SSricharan R .enable_reg = 0x6816C,
3090d9db07f0SSricharan R .enable_mask = BIT(0),
3091d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3092d9db07f0SSricharan R .name = "gcc_nss_ptp_ref_clk",
3093d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3094d9db07f0SSricharan R &nss_ppe_cdiv_clk_src.hw },
3095d9db07f0SSricharan R .num_parents = 1,
3096d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3097d9db07f0SSricharan R .ops = &clk_branch2_ops,
3098d9db07f0SSricharan R },
3099d9db07f0SSricharan R },
3100d9db07f0SSricharan R };
3101d9db07f0SSricharan R
3102d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_ce_apb_clk = {
3103d9db07f0SSricharan R .halt_reg = 0x6830C,
3104d9db07f0SSricharan R .clkr = {
3105d9db07f0SSricharan R .enable_reg = 0x6830C,
3106d9db07f0SSricharan R .enable_mask = BIT(0),
3107d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3108d9db07f0SSricharan R .name = "gcc_nssnoc_ce_apb_clk",
3109d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3110d9db07f0SSricharan R &nss_ce_clk_src.clkr.hw },
3111d9db07f0SSricharan R .num_parents = 1,
3112d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3113d9db07f0SSricharan R .ops = &clk_branch2_ops,
3114d9db07f0SSricharan R },
3115d9db07f0SSricharan R },
3116d9db07f0SSricharan R };
3117d9db07f0SSricharan R
3118d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_ce_axi_clk = {
3119d9db07f0SSricharan R .halt_reg = 0x68308,
3120d9db07f0SSricharan R .clkr = {
3121d9db07f0SSricharan R .enable_reg = 0x68308,
3122d9db07f0SSricharan R .enable_mask = BIT(0),
3123d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3124d9db07f0SSricharan R .name = "gcc_nssnoc_ce_axi_clk",
3125d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3126d9db07f0SSricharan R &nss_ce_clk_src.clkr.hw },
3127d9db07f0SSricharan R .num_parents = 1,
3128d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3129d9db07f0SSricharan R .ops = &clk_branch2_ops,
3130d9db07f0SSricharan R },
3131d9db07f0SSricharan R },
3132d9db07f0SSricharan R };
3133d9db07f0SSricharan R
3134d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_crypto_clk = {
3135d9db07f0SSricharan R .halt_reg = 0x68314,
3136d9db07f0SSricharan R .clkr = {
3137d9db07f0SSricharan R .enable_reg = 0x68314,
3138d9db07f0SSricharan R .enable_mask = BIT(0),
3139d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3140d9db07f0SSricharan R .name = "gcc_nssnoc_crypto_clk",
3141d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3142d9db07f0SSricharan R &nss_crypto_clk_src.clkr.hw },
3143d9db07f0SSricharan R .num_parents = 1,
3144d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3145d9db07f0SSricharan R .ops = &clk_branch2_ops,
3146d9db07f0SSricharan R },
3147d9db07f0SSricharan R },
3148d9db07f0SSricharan R };
3149d9db07f0SSricharan R
3150d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_ppe_cfg_clk = {
3151d9db07f0SSricharan R .halt_reg = 0x68304,
3152d9db07f0SSricharan R .clkr = {
3153d9db07f0SSricharan R .enable_reg = 0x68304,
3154d9db07f0SSricharan R .enable_mask = BIT(0),
3155d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3156d9db07f0SSricharan R .name = "gcc_nssnoc_ppe_cfg_clk",
3157d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3158d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3159d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3160d9db07f0SSricharan R .ops = &clk_branch2_ops,
3161d9db07f0SSricharan R },
3162d9db07f0SSricharan R },
3163d9db07f0SSricharan R };
3164d9db07f0SSricharan R
3165d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_ppe_clk = {
3166d9db07f0SSricharan R .halt_reg = 0x68300,
3167d9db07f0SSricharan R .clkr = {
3168d9db07f0SSricharan R .enable_reg = 0x68300,
3169d9db07f0SSricharan R .enable_mask = BIT(0),
3170d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3171d9db07f0SSricharan R .name = "gcc_nssnoc_ppe_clk",
3172d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3173d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3174d9db07f0SSricharan R .num_parents = 1,
3175d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3176d9db07f0SSricharan R .ops = &clk_branch2_ops,
3177d9db07f0SSricharan R },
3178d9db07f0SSricharan R },
3179d9db07f0SSricharan R };
3180d9db07f0SSricharan R
3181d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_qosgen_ref_clk = {
3182d9db07f0SSricharan R .halt_reg = 0x68180,
3183d9db07f0SSricharan R .clkr = {
3184d9db07f0SSricharan R .enable_reg = 0x68180,
3185d9db07f0SSricharan R .enable_mask = BIT(0),
3186d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3187d9db07f0SSricharan R .name = "gcc_nssnoc_qosgen_ref_clk",
3188d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3189d9db07f0SSricharan R &gcc_xo_clk_src.clkr.hw },
3190d9db07f0SSricharan R .num_parents = 1,
3191d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3192d9db07f0SSricharan R .ops = &clk_branch2_ops,
3193d9db07f0SSricharan R },
3194d9db07f0SSricharan R },
3195d9db07f0SSricharan R };
3196d9db07f0SSricharan R
3197d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_snoc_clk = {
3198d9db07f0SSricharan R .halt_reg = 0x68188,
3199d9db07f0SSricharan R .clkr = {
3200d9db07f0SSricharan R .enable_reg = 0x68188,
3201d9db07f0SSricharan R .enable_mask = BIT(0),
3202d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3203d9db07f0SSricharan R .name = "gcc_nssnoc_snoc_clk",
3204d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3205d9db07f0SSricharan R &system_noc_bfdcd_clk_src.clkr.hw },
3206d9db07f0SSricharan R .num_parents = 1,
3207d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3208d9db07f0SSricharan R .ops = &clk_branch2_ops,
3209d9db07f0SSricharan R },
3210d9db07f0SSricharan R },
3211d9db07f0SSricharan R };
3212d9db07f0SSricharan R
3213d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_timeout_ref_clk = {
3214d9db07f0SSricharan R .halt_reg = 0x68184,
3215d9db07f0SSricharan R .clkr = {
3216d9db07f0SSricharan R .enable_reg = 0x68184,
3217d9db07f0SSricharan R .enable_mask = BIT(0),
3218d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3219d9db07f0SSricharan R .name = "gcc_nssnoc_timeout_ref_clk",
3220d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3221d9db07f0SSricharan R &gcc_xo_div4_clk_src.hw },
3222d9db07f0SSricharan R .num_parents = 1,
3223d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3224d9db07f0SSricharan R .ops = &clk_branch2_ops,
3225d9db07f0SSricharan R },
3226d9db07f0SSricharan R },
3227d9db07f0SSricharan R };
3228d9db07f0SSricharan R
3229d9db07f0SSricharan R static struct clk_branch gcc_nssnoc_ubi0_ahb_clk = {
3230d9db07f0SSricharan R .halt_reg = 0x68270,
3231d9db07f0SSricharan R .clkr = {
3232d9db07f0SSricharan R .enable_reg = 0x68270,
3233d9db07f0SSricharan R .enable_mask = BIT(0),
3234d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3235d9db07f0SSricharan R .name = "gcc_nssnoc_ubi0_ahb_clk",
3236d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3237d9db07f0SSricharan R &nss_ce_clk_src.clkr.hw },
3238d9db07f0SSricharan R .num_parents = 1,
3239d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3240d9db07f0SSricharan R .ops = &clk_branch2_ops,
3241d9db07f0SSricharan R },
3242d9db07f0SSricharan R },
3243d9db07f0SSricharan R };
3244d9db07f0SSricharan R
3245d9db07f0SSricharan R static struct clk_branch gcc_port1_mac_clk = {
3246d9db07f0SSricharan R .halt_reg = 0x68320,
3247d9db07f0SSricharan R .clkr = {
3248d9db07f0SSricharan R .enable_reg = 0x68320,
3249d9db07f0SSricharan R .enable_mask = BIT(0),
3250d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3251d9db07f0SSricharan R .name = "gcc_port1_mac_clk",
3252d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3253d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3254d9db07f0SSricharan R .num_parents = 1,
3255d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3256d9db07f0SSricharan R .ops = &clk_branch2_ops,
3257d9db07f0SSricharan R },
3258d9db07f0SSricharan R },
3259d9db07f0SSricharan R };
3260d9db07f0SSricharan R
3261d9db07f0SSricharan R static struct clk_branch gcc_port2_mac_clk = {
3262d9db07f0SSricharan R .halt_reg = 0x68324,
3263d9db07f0SSricharan R .clkr = {
3264d9db07f0SSricharan R .enable_reg = 0x68324,
3265d9db07f0SSricharan R .enable_mask = BIT(0),
3266d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3267d9db07f0SSricharan R .name = "gcc_port2_mac_clk",
3268d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3269d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3270d9db07f0SSricharan R .num_parents = 1,
3271d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3272d9db07f0SSricharan R .ops = &clk_branch2_ops,
3273d9db07f0SSricharan R },
3274d9db07f0SSricharan R },
3275d9db07f0SSricharan R };
3276d9db07f0SSricharan R
3277d9db07f0SSricharan R static struct clk_branch gcc_port3_mac_clk = {
3278d9db07f0SSricharan R .halt_reg = 0x68328,
3279d9db07f0SSricharan R .clkr = {
3280d9db07f0SSricharan R .enable_reg = 0x68328,
3281d9db07f0SSricharan R .enable_mask = BIT(0),
3282d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3283d9db07f0SSricharan R .name = "gcc_port3_mac_clk",
3284d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3285d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3286d9db07f0SSricharan R .num_parents = 1,
3287d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3288d9db07f0SSricharan R .ops = &clk_branch2_ops,
3289d9db07f0SSricharan R },
3290d9db07f0SSricharan R },
3291d9db07f0SSricharan R };
3292d9db07f0SSricharan R
3293d9db07f0SSricharan R static struct clk_branch gcc_port4_mac_clk = {
3294d9db07f0SSricharan R .halt_reg = 0x6832c,
3295d9db07f0SSricharan R .clkr = {
3296d9db07f0SSricharan R .enable_reg = 0x6832c,
3297d9db07f0SSricharan R .enable_mask = BIT(0),
3298d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3299d9db07f0SSricharan R .name = "gcc_port4_mac_clk",
3300d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3301d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3302d9db07f0SSricharan R .num_parents = 1,
3303d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3304d9db07f0SSricharan R .ops = &clk_branch2_ops,
3305d9db07f0SSricharan R },
3306d9db07f0SSricharan R },
3307d9db07f0SSricharan R };
3308d9db07f0SSricharan R
3309d9db07f0SSricharan R static struct clk_branch gcc_port5_mac_clk = {
3310d9db07f0SSricharan R .halt_reg = 0x68330,
3311d9db07f0SSricharan R .clkr = {
3312d9db07f0SSricharan R .enable_reg = 0x68330,
3313d9db07f0SSricharan R .enable_mask = BIT(0),
3314d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3315d9db07f0SSricharan R .name = "gcc_port5_mac_clk",
3316d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3317d9db07f0SSricharan R &nss_ppe_clk_src.clkr.hw },
3318d9db07f0SSricharan R .num_parents = 1,
3319d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3320d9db07f0SSricharan R .ops = &clk_branch2_ops,
3321d9db07f0SSricharan R },
3322d9db07f0SSricharan R },
3323d9db07f0SSricharan R };
3324d9db07f0SSricharan R
3325d9db07f0SSricharan R static struct clk_branch gcc_ubi0_ahb_clk = {
3326d9db07f0SSricharan R .halt_reg = 0x6820C,
3327d9db07f0SSricharan R .halt_check = BRANCH_HALT_DELAY,
3328d9db07f0SSricharan R .clkr = {
3329d9db07f0SSricharan R .enable_reg = 0x6820C,
3330d9db07f0SSricharan R .enable_mask = BIT(0),
3331d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3332d9db07f0SSricharan R .name = "gcc_ubi0_ahb_clk",
3333d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3334d9db07f0SSricharan R &nss_ce_clk_src.clkr.hw },
3335d9db07f0SSricharan R .num_parents = 1,
3336d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3337d9db07f0SSricharan R .ops = &clk_branch2_ops,
3338d9db07f0SSricharan R },
3339d9db07f0SSricharan R },
3340d9db07f0SSricharan R };
3341d9db07f0SSricharan R
3342d9db07f0SSricharan R static struct clk_branch gcc_ubi0_axi_clk = {
3343d9db07f0SSricharan R .halt_reg = 0x68200,
3344d9db07f0SSricharan R .halt_check = BRANCH_HALT_DELAY,
3345d9db07f0SSricharan R .clkr = {
3346d9db07f0SSricharan R .enable_reg = 0x68200,
3347d9db07f0SSricharan R .enable_mask = BIT(0),
3348d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3349d9db07f0SSricharan R .name = "gcc_ubi0_axi_clk",
3350d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3351d9db07f0SSricharan R &ubi32_mem_noc_bfdcd_clk_src.clkr.hw },
3352d9db07f0SSricharan R .num_parents = 1,
3353d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3354d9db07f0SSricharan R .ops = &clk_branch2_ops,
3355d9db07f0SSricharan R },
3356d9db07f0SSricharan R },
3357d9db07f0SSricharan R };
3358d9db07f0SSricharan R
3359d9db07f0SSricharan R static struct clk_branch gcc_ubi0_nc_axi_clk = {
3360d9db07f0SSricharan R .halt_reg = 0x68204,
3361d9db07f0SSricharan R .halt_check = BRANCH_HALT_DELAY,
3362d9db07f0SSricharan R .clkr = {
3363d9db07f0SSricharan R .enable_reg = 0x68204,
3364d9db07f0SSricharan R .enable_mask = BIT(0),
3365d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3366d9db07f0SSricharan R .name = "gcc_ubi0_nc_axi_clk",
3367d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3368d9db07f0SSricharan R &snoc_nssnoc_bfdcd_clk_src.clkr.hw },
3369d9db07f0SSricharan R .num_parents = 1,
3370d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3371d9db07f0SSricharan R .ops = &clk_branch2_ops,
3372d9db07f0SSricharan R },
3373d9db07f0SSricharan R },
3374d9db07f0SSricharan R };
3375d9db07f0SSricharan R
3376d9db07f0SSricharan R static struct clk_branch gcc_ubi0_core_clk = {
3377d9db07f0SSricharan R .halt_reg = 0x68210,
3378d9db07f0SSricharan R .halt_check = BRANCH_HALT_DELAY,
3379d9db07f0SSricharan R .clkr = {
3380d9db07f0SSricharan R .enable_reg = 0x68210,
3381d9db07f0SSricharan R .enable_mask = BIT(0),
3382d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3383d9db07f0SSricharan R .name = "gcc_ubi0_core_clk",
3384d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3385d9db07f0SSricharan R &nss_ubi0_div_clk_src.clkr.hw },
3386d9db07f0SSricharan R .num_parents = 1,
3387d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3388d9db07f0SSricharan R .ops = &clk_branch2_ops,
3389d9db07f0SSricharan R },
3390d9db07f0SSricharan R },
3391d9db07f0SSricharan R };
3392d9db07f0SSricharan R
3393d9db07f0SSricharan R static struct clk_branch gcc_pcie0_ahb_clk = {
3394d9db07f0SSricharan R .halt_reg = 0x75010,
3395d9db07f0SSricharan R .clkr = {
3396d9db07f0SSricharan R .enable_reg = 0x75010,
3397d9db07f0SSricharan R .enable_mask = BIT(0),
3398d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3399d9db07f0SSricharan R .name = "gcc_pcie0_ahb_clk",
3400d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3401d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3402d9db07f0SSricharan R .num_parents = 1,
3403d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3404d9db07f0SSricharan R .ops = &clk_branch2_ops,
3405d9db07f0SSricharan R },
3406d9db07f0SSricharan R },
3407d9db07f0SSricharan R };
3408d9db07f0SSricharan R
3409d9db07f0SSricharan R static struct clk_branch gcc_pcie0_aux_clk = {
3410d9db07f0SSricharan R .halt_reg = 0x75014,
3411d9db07f0SSricharan R .clkr = {
3412d9db07f0SSricharan R .enable_reg = 0x75014,
3413d9db07f0SSricharan R .enable_mask = BIT(0),
3414d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3415d9db07f0SSricharan R .name = "gcc_pcie0_aux_clk",
3416d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3417d9db07f0SSricharan R &pcie0_aux_clk_src.clkr.hw },
3418d9db07f0SSricharan R .num_parents = 1,
3419d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3420d9db07f0SSricharan R .ops = &clk_branch2_ops,
3421d9db07f0SSricharan R },
3422d9db07f0SSricharan R },
3423d9db07f0SSricharan R };
3424d9db07f0SSricharan R
3425d9db07f0SSricharan R static struct clk_branch gcc_pcie0_axi_m_clk = {
3426d9db07f0SSricharan R .halt_reg = 0x75008,
3427d9db07f0SSricharan R .clkr = {
3428d9db07f0SSricharan R .enable_reg = 0x75008,
3429d9db07f0SSricharan R .enable_mask = BIT(0),
3430d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3431d9db07f0SSricharan R .name = "gcc_pcie0_axi_m_clk",
3432d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3433d9db07f0SSricharan R &pcie0_axi_clk_src.clkr.hw },
3434d9db07f0SSricharan R .num_parents = 1,
3435d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3436d9db07f0SSricharan R .ops = &clk_branch2_ops,
3437d9db07f0SSricharan R },
3438d9db07f0SSricharan R },
3439d9db07f0SSricharan R };
3440d9db07f0SSricharan R
3441d9db07f0SSricharan R static struct clk_branch gcc_pcie0_axi_s_clk = {
3442d9db07f0SSricharan R .halt_reg = 0x7500c,
3443d9db07f0SSricharan R .clkr = {
3444d9db07f0SSricharan R .enable_reg = 0x7500c,
3445d9db07f0SSricharan R .enable_mask = BIT(0),
3446d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3447d9db07f0SSricharan R .name = "gcc_pcie0_axi_s_clk",
3448d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3449d9db07f0SSricharan R &pcie0_axi_clk_src.clkr.hw },
3450d9db07f0SSricharan R .num_parents = 1,
3451d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3452d9db07f0SSricharan R .ops = &clk_branch2_ops,
3453d9db07f0SSricharan R },
3454d9db07f0SSricharan R },
3455d9db07f0SSricharan R };
3456d9db07f0SSricharan R
3457d9db07f0SSricharan R static struct clk_branch gcc_sys_noc_pcie0_axi_clk = {
3458d9db07f0SSricharan R .halt_reg = 0x26048,
3459d9db07f0SSricharan R .clkr = {
3460d9db07f0SSricharan R .enable_reg = 0x26048,
3461d9db07f0SSricharan R .enable_mask = BIT(0),
3462d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3463d9db07f0SSricharan R .name = "gcc_sys_noc_pcie0_axi_clk",
3464d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3465d9db07f0SSricharan R &pcie0_axi_clk_src.clkr.hw },
3466d9db07f0SSricharan R .num_parents = 1,
3467d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3468d9db07f0SSricharan R .ops = &clk_branch2_ops,
3469d9db07f0SSricharan R },
3470d9db07f0SSricharan R },
3471d9db07f0SSricharan R };
3472d9db07f0SSricharan R
3473d9db07f0SSricharan R static struct clk_branch gcc_pcie0_pipe_clk = {
3474d9db07f0SSricharan R .halt_reg = 0x75018,
3475d9db07f0SSricharan R .halt_check = BRANCH_HALT_DELAY,
3476d9db07f0SSricharan R .clkr = {
3477d9db07f0SSricharan R .enable_reg = 0x75018,
3478d9db07f0SSricharan R .enable_mask = BIT(0),
3479d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3480d9db07f0SSricharan R .name = "gcc_pcie0_pipe_clk",
3481d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3482d9db07f0SSricharan R &pcie0_pipe_clk_src.clkr.hw },
3483d9db07f0SSricharan R .num_parents = 1,
3484d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3485d9db07f0SSricharan R .ops = &clk_branch2_ops,
3486d9db07f0SSricharan R },
3487d9db07f0SSricharan R },
3488d9db07f0SSricharan R };
3489d9db07f0SSricharan R
3490d9db07f0SSricharan R static struct clk_branch gcc_prng_ahb_clk = {
3491d9db07f0SSricharan R .halt_reg = 0x13004,
3492d9db07f0SSricharan R .halt_check = BRANCH_HALT_VOTED,
3493d9db07f0SSricharan R .clkr = {
3494d9db07f0SSricharan R .enable_reg = 0x0b004,
3495d9db07f0SSricharan R .enable_mask = BIT(8),
3496d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3497d9db07f0SSricharan R .name = "gcc_prng_ahb_clk",
3498d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3499d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3500d9db07f0SSricharan R .num_parents = 1,
3501d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3502d9db07f0SSricharan R .ops = &clk_branch2_ops,
3503d9db07f0SSricharan R },
3504d9db07f0SSricharan R },
3505d9db07f0SSricharan R };
3506d9db07f0SSricharan R
3507d9db07f0SSricharan R static struct clk_branch gcc_qdss_dap_clk = {
3508d9db07f0SSricharan R .halt_reg = 0x29084,
3509d9db07f0SSricharan R .clkr = {
3510d9db07f0SSricharan R .enable_reg = 0x29084,
3511d9db07f0SSricharan R .enable_mask = BIT(0),
3512d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3513d9db07f0SSricharan R .name = "gcc_qdss_dap_clk",
3514d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3515d9db07f0SSricharan R &qdss_dap_sync_clk_src.hw },
3516d9db07f0SSricharan R .num_parents = 1,
3517d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3518d9db07f0SSricharan R .ops = &clk_branch2_ops,
3519d9db07f0SSricharan R },
3520d9db07f0SSricharan R },
3521d9db07f0SSricharan R };
3522d9db07f0SSricharan R
3523d9db07f0SSricharan R static struct clk_branch gcc_qpic_ahb_clk = {
3524d9db07f0SSricharan R .halt_reg = 0x57024,
3525d9db07f0SSricharan R .clkr = {
3526d9db07f0SSricharan R .enable_reg = 0x57024,
3527d9db07f0SSricharan R .enable_mask = BIT(0),
3528d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3529d9db07f0SSricharan R .name = "gcc_qpic_ahb_clk",
3530d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3531d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3532d9db07f0SSricharan R .num_parents = 1,
3533d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3534d9db07f0SSricharan R .ops = &clk_branch2_ops,
3535d9db07f0SSricharan R },
3536d9db07f0SSricharan R },
3537d9db07f0SSricharan R };
3538d9db07f0SSricharan R
3539d9db07f0SSricharan R static struct clk_branch gcc_qpic_clk = {
3540d9db07f0SSricharan R .halt_reg = 0x57020,
3541d9db07f0SSricharan R .clkr = {
3542d9db07f0SSricharan R .enable_reg = 0x57020,
3543d9db07f0SSricharan R .enable_mask = BIT(0),
3544d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3545d9db07f0SSricharan R .name = "gcc_qpic_clk",
3546d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3547d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3548d9db07f0SSricharan R .num_parents = 1,
3549d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3550d9db07f0SSricharan R .ops = &clk_branch2_ops,
3551d9db07f0SSricharan R },
3552d9db07f0SSricharan R },
3553d9db07f0SSricharan R };
3554d9db07f0SSricharan R
3555d9db07f0SSricharan R static struct clk_branch gcc_sdcc1_ahb_clk = {
3556d9db07f0SSricharan R .halt_reg = 0x4201c,
3557d9db07f0SSricharan R .clkr = {
3558d9db07f0SSricharan R .enable_reg = 0x4201c,
3559d9db07f0SSricharan R .enable_mask = BIT(0),
3560d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3561d9db07f0SSricharan R .name = "gcc_sdcc1_ahb_clk",
3562d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3563d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3564d9db07f0SSricharan R .num_parents = 1,
3565d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3566d9db07f0SSricharan R .ops = &clk_branch2_ops,
3567d9db07f0SSricharan R },
3568d9db07f0SSricharan R },
3569d9db07f0SSricharan R };
3570d9db07f0SSricharan R
3571d9db07f0SSricharan R static struct clk_branch gcc_sdcc1_apps_clk = {
3572d9db07f0SSricharan R .halt_reg = 0x42018,
3573d9db07f0SSricharan R .clkr = {
3574d9db07f0SSricharan R .enable_reg = 0x42018,
3575d9db07f0SSricharan R .enable_mask = BIT(0),
3576d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3577d9db07f0SSricharan R .name = "gcc_sdcc1_apps_clk",
3578d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3579d9db07f0SSricharan R &sdcc1_apps_clk_src.clkr.hw },
3580d9db07f0SSricharan R .num_parents = 1,
3581d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3582d9db07f0SSricharan R .ops = &clk_branch2_ops,
3583d9db07f0SSricharan R },
3584d9db07f0SSricharan R },
3585d9db07f0SSricharan R };
3586d9db07f0SSricharan R
3587d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_ahb_clk = {
3588d9db07f0SSricharan R .halt_reg = 0x56008,
3589d9db07f0SSricharan R .clkr = {
3590d9db07f0SSricharan R .enable_reg = 0x56008,
3591d9db07f0SSricharan R .enable_mask = BIT(0),
3592d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3593d9db07f0SSricharan R .name = "gcc_uniphy0_ahb_clk",
3594d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3595d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3596d9db07f0SSricharan R .num_parents = 1,
3597d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3598d9db07f0SSricharan R .ops = &clk_branch2_ops,
3599d9db07f0SSricharan R },
3600d9db07f0SSricharan R },
3601d9db07f0SSricharan R };
3602d9db07f0SSricharan R
3603d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port1_rx_clk = {
3604d9db07f0SSricharan R .halt_reg = 0x56010,
3605d9db07f0SSricharan R .clkr = {
3606d9db07f0SSricharan R .enable_reg = 0x56010,
3607d9db07f0SSricharan R .enable_mask = BIT(0),
3608d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3609d9db07f0SSricharan R .name = "gcc_uniphy0_port1_rx_clk",
3610d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3611d9db07f0SSricharan R &nss_port1_rx_div_clk_src.clkr.hw },
3612d9db07f0SSricharan R .num_parents = 1,
3613d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3614d9db07f0SSricharan R .ops = &clk_branch2_ops,
3615d9db07f0SSricharan R },
3616d9db07f0SSricharan R },
3617d9db07f0SSricharan R };
3618d9db07f0SSricharan R
3619d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port1_tx_clk = {
3620d9db07f0SSricharan R .halt_reg = 0x56014,
3621d9db07f0SSricharan R .clkr = {
3622d9db07f0SSricharan R .enable_reg = 0x56014,
3623d9db07f0SSricharan R .enable_mask = BIT(0),
3624d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3625d9db07f0SSricharan R .name = "gcc_uniphy0_port1_tx_clk",
3626d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3627d9db07f0SSricharan R &nss_port1_tx_div_clk_src.clkr.hw },
3628d9db07f0SSricharan R .num_parents = 1,
3629d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3630d9db07f0SSricharan R .ops = &clk_branch2_ops,
3631d9db07f0SSricharan R },
3632d9db07f0SSricharan R },
3633d9db07f0SSricharan R };
3634d9db07f0SSricharan R
3635d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port2_rx_clk = {
3636d9db07f0SSricharan R .halt_reg = 0x56018,
3637d9db07f0SSricharan R .clkr = {
3638d9db07f0SSricharan R .enable_reg = 0x56018,
3639d9db07f0SSricharan R .enable_mask = BIT(0),
3640d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3641d9db07f0SSricharan R .name = "gcc_uniphy0_port2_rx_clk",
3642d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3643d9db07f0SSricharan R &nss_port2_rx_div_clk_src.clkr.hw },
3644d9db07f0SSricharan R .num_parents = 1,
3645d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3646d9db07f0SSricharan R .ops = &clk_branch2_ops,
3647d9db07f0SSricharan R },
3648d9db07f0SSricharan R },
3649d9db07f0SSricharan R };
3650d9db07f0SSricharan R
3651d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port2_tx_clk = {
3652d9db07f0SSricharan R .halt_reg = 0x5601c,
3653d9db07f0SSricharan R .clkr = {
3654d9db07f0SSricharan R .enable_reg = 0x5601c,
3655d9db07f0SSricharan R .enable_mask = BIT(0),
3656d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3657d9db07f0SSricharan R .name = "gcc_uniphy0_port2_tx_clk",
3658d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3659d9db07f0SSricharan R &nss_port2_tx_div_clk_src.clkr.hw },
3660d9db07f0SSricharan R .num_parents = 1,
3661d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3662d9db07f0SSricharan R .ops = &clk_branch2_ops,
3663d9db07f0SSricharan R },
3664d9db07f0SSricharan R },
3665d9db07f0SSricharan R };
3666d9db07f0SSricharan R
3667d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port3_rx_clk = {
3668d9db07f0SSricharan R .halt_reg = 0x56020,
3669d9db07f0SSricharan R .clkr = {
3670d9db07f0SSricharan R .enable_reg = 0x56020,
3671d9db07f0SSricharan R .enable_mask = BIT(0),
3672d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3673d9db07f0SSricharan R .name = "gcc_uniphy0_port3_rx_clk",
3674d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3675d9db07f0SSricharan R &nss_port3_rx_div_clk_src.clkr.hw },
3676d9db07f0SSricharan R .num_parents = 1,
3677d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3678d9db07f0SSricharan R .ops = &clk_branch2_ops,
3679d9db07f0SSricharan R },
3680d9db07f0SSricharan R },
3681d9db07f0SSricharan R };
3682d9db07f0SSricharan R
3683d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port3_tx_clk = {
3684d9db07f0SSricharan R .halt_reg = 0x56024,
3685d9db07f0SSricharan R .clkr = {
3686d9db07f0SSricharan R .enable_reg = 0x56024,
3687d9db07f0SSricharan R .enable_mask = BIT(0),
3688d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3689d9db07f0SSricharan R .name = "gcc_uniphy0_port3_tx_clk",
3690d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3691d9db07f0SSricharan R &nss_port3_tx_div_clk_src.clkr.hw },
3692d9db07f0SSricharan R .num_parents = 1,
3693d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3694d9db07f0SSricharan R .ops = &clk_branch2_ops,
3695d9db07f0SSricharan R },
3696d9db07f0SSricharan R },
3697d9db07f0SSricharan R };
3698d9db07f0SSricharan R
3699d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port4_rx_clk = {
3700d9db07f0SSricharan R .halt_reg = 0x56028,
3701d9db07f0SSricharan R .clkr = {
3702d9db07f0SSricharan R .enable_reg = 0x56028,
3703d9db07f0SSricharan R .enable_mask = BIT(0),
3704d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3705d9db07f0SSricharan R .name = "gcc_uniphy0_port4_rx_clk",
3706d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3707d9db07f0SSricharan R &nss_port4_rx_div_clk_src.clkr.hw },
3708d9db07f0SSricharan R .num_parents = 1,
3709d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3710d9db07f0SSricharan R .ops = &clk_branch2_ops,
3711d9db07f0SSricharan R },
3712d9db07f0SSricharan R },
3713d9db07f0SSricharan R };
3714d9db07f0SSricharan R
3715d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port4_tx_clk = {
3716d9db07f0SSricharan R .halt_reg = 0x5602c,
3717d9db07f0SSricharan R .clkr = {
3718d9db07f0SSricharan R .enable_reg = 0x5602c,
3719d9db07f0SSricharan R .enable_mask = BIT(0),
3720d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3721d9db07f0SSricharan R .name = "gcc_uniphy0_port4_tx_clk",
3722d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3723d9db07f0SSricharan R &nss_port4_tx_div_clk_src.clkr.hw },
3724d9db07f0SSricharan R .num_parents = 1,
3725d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3726d9db07f0SSricharan R .ops = &clk_branch2_ops,
3727d9db07f0SSricharan R },
3728d9db07f0SSricharan R },
3729d9db07f0SSricharan R };
3730d9db07f0SSricharan R
3731d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port5_rx_clk = {
3732d9db07f0SSricharan R .halt_reg = 0x56030,
3733d9db07f0SSricharan R .clkr = {
3734d9db07f0SSricharan R .enable_reg = 0x56030,
3735d9db07f0SSricharan R .enable_mask = BIT(0),
3736d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3737d9db07f0SSricharan R .name = "gcc_uniphy0_port5_rx_clk",
3738d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3739d9db07f0SSricharan R &nss_port5_rx_div_clk_src.clkr.hw },
3740d9db07f0SSricharan R .num_parents = 1,
3741d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3742d9db07f0SSricharan R .ops = &clk_branch2_ops,
3743d9db07f0SSricharan R },
3744d9db07f0SSricharan R },
3745d9db07f0SSricharan R };
3746d9db07f0SSricharan R
3747d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_port5_tx_clk = {
3748d9db07f0SSricharan R .halt_reg = 0x56034,
3749d9db07f0SSricharan R .clkr = {
3750d9db07f0SSricharan R .enable_reg = 0x56034,
3751d9db07f0SSricharan R .enable_mask = BIT(0),
3752d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3753d9db07f0SSricharan R .name = "gcc_uniphy0_port5_tx_clk",
3754d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3755d9db07f0SSricharan R &nss_port5_tx_div_clk_src.clkr.hw },
3756d9db07f0SSricharan R .num_parents = 1,
3757d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3758d9db07f0SSricharan R .ops = &clk_branch2_ops,
3759d9db07f0SSricharan R },
3760d9db07f0SSricharan R },
3761d9db07f0SSricharan R };
3762d9db07f0SSricharan R
3763d9db07f0SSricharan R static struct clk_branch gcc_uniphy0_sys_clk = {
3764d9db07f0SSricharan R .halt_reg = 0x5600C,
3765d9db07f0SSricharan R .clkr = {
3766d9db07f0SSricharan R .enable_reg = 0x5600C,
3767d9db07f0SSricharan R .enable_mask = BIT(0),
3768d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3769d9db07f0SSricharan R .name = "gcc_uniphy0_sys_clk",
3770d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3771d9db07f0SSricharan R &gcc_xo_clk_src.clkr.hw },
3772d9db07f0SSricharan R .num_parents = 1,
3773d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3774d9db07f0SSricharan R .ops = &clk_branch2_ops,
3775d9db07f0SSricharan R },
3776d9db07f0SSricharan R },
3777d9db07f0SSricharan R };
3778d9db07f0SSricharan R
3779d9db07f0SSricharan R static struct clk_branch gcc_uniphy1_ahb_clk = {
3780d9db07f0SSricharan R .halt_reg = 0x56108,
3781d9db07f0SSricharan R .clkr = {
3782d9db07f0SSricharan R .enable_reg = 0x56108,
3783d9db07f0SSricharan R .enable_mask = BIT(0),
3784d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3785d9db07f0SSricharan R .name = "gcc_uniphy1_ahb_clk",
3786d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3787d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3788d9db07f0SSricharan R .num_parents = 1,
3789d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3790d9db07f0SSricharan R .ops = &clk_branch2_ops,
3791d9db07f0SSricharan R },
3792d9db07f0SSricharan R },
3793d9db07f0SSricharan R };
3794d9db07f0SSricharan R
3795d9db07f0SSricharan R static struct clk_branch gcc_uniphy1_port5_rx_clk = {
3796d9db07f0SSricharan R .halt_reg = 0x56110,
3797d9db07f0SSricharan R .clkr = {
3798d9db07f0SSricharan R .enable_reg = 0x56110,
3799d9db07f0SSricharan R .enable_mask = BIT(0),
3800d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3801d9db07f0SSricharan R .name = "gcc_uniphy1_port5_rx_clk",
3802d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3803d9db07f0SSricharan R &nss_port5_rx_div_clk_src.clkr.hw },
3804d9db07f0SSricharan R .num_parents = 1,
3805d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3806d9db07f0SSricharan R .ops = &clk_branch2_ops,
3807d9db07f0SSricharan R },
3808d9db07f0SSricharan R },
3809d9db07f0SSricharan R };
3810d9db07f0SSricharan R
3811d9db07f0SSricharan R static struct clk_branch gcc_uniphy1_port5_tx_clk = {
3812d9db07f0SSricharan R .halt_reg = 0x56114,
3813d9db07f0SSricharan R .clkr = {
3814d9db07f0SSricharan R .enable_reg = 0x56114,
3815d9db07f0SSricharan R .enable_mask = BIT(0),
3816d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3817d9db07f0SSricharan R .name = "gcc_uniphy1_port5_tx_clk",
3818d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3819d9db07f0SSricharan R &nss_port5_tx_div_clk_src.clkr.hw },
3820d9db07f0SSricharan R .num_parents = 1,
3821d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3822d9db07f0SSricharan R .ops = &clk_branch2_ops,
3823d9db07f0SSricharan R },
3824d9db07f0SSricharan R },
3825d9db07f0SSricharan R };
3826d9db07f0SSricharan R
3827d9db07f0SSricharan R static struct clk_branch gcc_uniphy1_sys_clk = {
3828d9db07f0SSricharan R .halt_reg = 0x5610C,
3829d9db07f0SSricharan R .clkr = {
3830d9db07f0SSricharan R .enable_reg = 0x5610C,
3831d9db07f0SSricharan R .enable_mask = BIT(0),
3832d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3833d9db07f0SSricharan R .name = "gcc_uniphy1_sys_clk",
3834d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3835d9db07f0SSricharan R &gcc_xo_clk_src.clkr.hw },
3836d9db07f0SSricharan R .num_parents = 1,
3837d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3838d9db07f0SSricharan R .ops = &clk_branch2_ops,
3839d9db07f0SSricharan R },
3840d9db07f0SSricharan R },
3841d9db07f0SSricharan R };
3842d9db07f0SSricharan R
3843d9db07f0SSricharan R static struct clk_branch gcc_usb0_aux_clk = {
3844d9db07f0SSricharan R .halt_reg = 0x3e044,
3845d9db07f0SSricharan R .clkr = {
3846d9db07f0SSricharan R .enable_reg = 0x3e044,
3847d9db07f0SSricharan R .enable_mask = BIT(0),
3848d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3849d9db07f0SSricharan R .name = "gcc_usb0_aux_clk",
3850d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3851d9db07f0SSricharan R &usb0_aux_clk_src.clkr.hw },
3852d9db07f0SSricharan R .num_parents = 1,
3853d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3854d9db07f0SSricharan R .ops = &clk_branch2_ops,
3855d9db07f0SSricharan R },
3856d9db07f0SSricharan R },
3857d9db07f0SSricharan R };
3858d9db07f0SSricharan R
3859d9db07f0SSricharan R static struct clk_branch gcc_usb0_master_clk = {
3860d9db07f0SSricharan R .halt_reg = 0x3e000,
3861d9db07f0SSricharan R .clkr = {
3862d9db07f0SSricharan R .enable_reg = 0x3e000,
3863d9db07f0SSricharan R .enable_mask = BIT(0),
3864d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3865d9db07f0SSricharan R .name = "gcc_usb0_master_clk",
3866d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3867d9db07f0SSricharan R &usb0_master_clk_src.clkr.hw },
3868d9db07f0SSricharan R .num_parents = 1,
3869d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3870d9db07f0SSricharan R .ops = &clk_branch2_ops,
3871d9db07f0SSricharan R },
3872d9db07f0SSricharan R },
3873d9db07f0SSricharan R };
3874d9db07f0SSricharan R
3875d9db07f0SSricharan R static struct clk_branch gcc_snoc_bus_timeout2_ahb_clk = {
3876d9db07f0SSricharan R .halt_reg = 0x47014,
3877d9db07f0SSricharan R .clkr = {
3878d9db07f0SSricharan R .enable_reg = 0x47014,
3879d9db07f0SSricharan R .enable_mask = BIT(0),
3880d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3881d9db07f0SSricharan R .name = "gcc_snoc_bus_timeout2_ahb_clk",
3882d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3883d9db07f0SSricharan R &usb0_master_clk_src.clkr.hw },
3884d9db07f0SSricharan R .num_parents = 1,
3885d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3886d9db07f0SSricharan R .ops = &clk_branch2_ops,
3887d9db07f0SSricharan R },
3888d9db07f0SSricharan R },
3889d9db07f0SSricharan R };
3890d9db07f0SSricharan R
3891d9db07f0SSricharan R static struct clk_rcg2 pcie0_rchng_clk_src = {
3892d9db07f0SSricharan R .cmd_rcgr = 0x75070,
3893d9db07f0SSricharan R .freq_tbl = ftbl_pcie_rchng_clk_src,
3894d9db07f0SSricharan R .hid_width = 5,
3895d9db07f0SSricharan R .parent_map = gcc_xo_gpll0_map,
3896d9db07f0SSricharan R .clkr.hw.init = &(struct clk_init_data){
3897d9db07f0SSricharan R .name = "pcie0_rchng_clk_src",
3898d9db07f0SSricharan R .parent_data = gcc_xo_gpll0,
3899d9db07f0SSricharan R .num_parents = 2,
3900d9db07f0SSricharan R .ops = &clk_rcg2_ops,
3901d9db07f0SSricharan R },
3902d9db07f0SSricharan R };
3903d9db07f0SSricharan R
3904d9db07f0SSricharan R static struct clk_branch gcc_pcie0_rchng_clk = {
3905d9db07f0SSricharan R .halt_reg = 0x75070,
3906d9db07f0SSricharan R .clkr = {
3907d9db07f0SSricharan R .enable_reg = 0x75070,
3908d9db07f0SSricharan R .enable_mask = BIT(1),
3909d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3910d9db07f0SSricharan R .name = "gcc_pcie0_rchng_clk",
3911d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3912d9db07f0SSricharan R &pcie0_rchng_clk_src.clkr.hw },
3913d9db07f0SSricharan R .num_parents = 1,
3914d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3915d9db07f0SSricharan R .ops = &clk_branch2_ops,
3916d9db07f0SSricharan R },
3917d9db07f0SSricharan R },
3918d9db07f0SSricharan R };
3919d9db07f0SSricharan R
3920d9db07f0SSricharan R static struct clk_branch gcc_pcie0_axi_s_bridge_clk = {
3921d9db07f0SSricharan R .halt_reg = 0x75048,
3922d9db07f0SSricharan R .clkr = {
3923d9db07f0SSricharan R .enable_reg = 0x75048,
3924d9db07f0SSricharan R .enable_mask = BIT(0),
3925d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3926d9db07f0SSricharan R .name = "gcc_pcie0_axi_s_bridge_clk",
3927d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3928d9db07f0SSricharan R &pcie0_axi_clk_src.clkr.hw },
3929d9db07f0SSricharan R .num_parents = 1,
3930d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3931d9db07f0SSricharan R .ops = &clk_branch2_ops,
3932d9db07f0SSricharan R },
3933d9db07f0SSricharan R },
3934d9db07f0SSricharan R };
3935d9db07f0SSricharan R
3936d9db07f0SSricharan R static struct clk_branch gcc_sys_noc_usb0_axi_clk = {
3937d9db07f0SSricharan R .halt_reg = 0x26040,
3938d9db07f0SSricharan R .clkr = {
3939d9db07f0SSricharan R .enable_reg = 0x26040,
3940d9db07f0SSricharan R .enable_mask = BIT(0),
3941d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3942d9db07f0SSricharan R .name = "gcc_sys_noc_usb0_axi_clk",
3943d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3944d9db07f0SSricharan R &usb0_master_clk_src.clkr.hw },
3945d9db07f0SSricharan R .num_parents = 1,
3946d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3947d9db07f0SSricharan R .ops = &clk_branch2_ops,
3948d9db07f0SSricharan R },
3949d9db07f0SSricharan R },
3950d9db07f0SSricharan R };
3951d9db07f0SSricharan R
3952d9db07f0SSricharan R static struct clk_branch gcc_usb0_mock_utmi_clk = {
3953d9db07f0SSricharan R .halt_reg = 0x3e008,
3954d9db07f0SSricharan R .clkr = {
3955d9db07f0SSricharan R .enable_reg = 0x3e008,
3956d9db07f0SSricharan R .enable_mask = BIT(0),
3957d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3958d9db07f0SSricharan R .name = "gcc_usb0_mock_utmi_clk",
3959d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3960d9db07f0SSricharan R &usb0_mock_utmi_clk_src.clkr.hw },
3961d9db07f0SSricharan R .num_parents = 1,
3962d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3963d9db07f0SSricharan R .ops = &clk_branch2_ops,
3964d9db07f0SSricharan R },
3965d9db07f0SSricharan R },
3966d9db07f0SSricharan R };
3967d9db07f0SSricharan R
3968d9db07f0SSricharan R static struct clk_branch gcc_usb0_phy_cfg_ahb_clk = {
3969d9db07f0SSricharan R .halt_reg = 0x3e080,
3970d9db07f0SSricharan R .clkr = {
3971d9db07f0SSricharan R .enable_reg = 0x3e080,
3972d9db07f0SSricharan R .enable_mask = BIT(0),
3973d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3974d9db07f0SSricharan R .name = "gcc_usb0_phy_cfg_ahb_clk",
3975d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3976d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
3977d9db07f0SSricharan R .num_parents = 1,
3978d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3979d9db07f0SSricharan R .ops = &clk_branch2_ops,
3980d9db07f0SSricharan R },
3981d9db07f0SSricharan R },
3982d9db07f0SSricharan R };
3983d9db07f0SSricharan R
3984d9db07f0SSricharan R static struct clk_branch gcc_usb0_pipe_clk = {
3985d9db07f0SSricharan R .halt_reg = 0x3e040,
3986d9db07f0SSricharan R .halt_check = BRANCH_HALT_DELAY,
3987d9db07f0SSricharan R .clkr = {
3988d9db07f0SSricharan R .enable_reg = 0x3e040,
3989d9db07f0SSricharan R .enable_mask = BIT(0),
3990d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
3991d9db07f0SSricharan R .name = "gcc_usb0_pipe_clk",
3992d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
3993d9db07f0SSricharan R &usb0_pipe_clk_src.clkr.hw },
3994d9db07f0SSricharan R .num_parents = 1,
3995d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
3996d9db07f0SSricharan R .ops = &clk_branch2_ops,
3997d9db07f0SSricharan R },
3998d9db07f0SSricharan R },
3999d9db07f0SSricharan R };
4000d9db07f0SSricharan R
4001d9db07f0SSricharan R static struct clk_branch gcc_usb0_sleep_clk = {
4002d9db07f0SSricharan R .halt_reg = 0x3e004,
4003d9db07f0SSricharan R .clkr = {
4004d9db07f0SSricharan R .enable_reg = 0x3e004,
4005d9db07f0SSricharan R .enable_mask = BIT(0),
4006d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4007d9db07f0SSricharan R .name = "gcc_usb0_sleep_clk",
4008d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4009d9db07f0SSricharan R &gcc_sleep_clk_src.clkr.hw },
4010d9db07f0SSricharan R .num_parents = 1,
4011d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4012d9db07f0SSricharan R .ops = &clk_branch2_ops,
4013d9db07f0SSricharan R },
4014d9db07f0SSricharan R },
4015d9db07f0SSricharan R };
4016d9db07f0SSricharan R
4017d9db07f0SSricharan R static struct clk_branch gcc_usb1_master_clk = {
4018d9db07f0SSricharan R .halt_reg = 0x3f000,
4019d9db07f0SSricharan R .clkr = {
4020d9db07f0SSricharan R .enable_reg = 0x3f000,
4021d9db07f0SSricharan R .enable_mask = BIT(0),
4022d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4023d9db07f0SSricharan R .name = "gcc_usb1_master_clk",
4024d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4025d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
4026d9db07f0SSricharan R .num_parents = 1,
4027d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4028d9db07f0SSricharan R .ops = &clk_branch2_ops,
4029d9db07f0SSricharan R },
4030d9db07f0SSricharan R },
4031d9db07f0SSricharan R };
4032d9db07f0SSricharan R
4033d9db07f0SSricharan R static struct clk_branch gcc_usb1_mock_utmi_clk = {
4034d9db07f0SSricharan R .halt_reg = 0x3f008,
4035d9db07f0SSricharan R .clkr = {
4036d9db07f0SSricharan R .enable_reg = 0x3f008,
4037d9db07f0SSricharan R .enable_mask = BIT(0),
4038d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4039d9db07f0SSricharan R .name = "gcc_usb1_mock_utmi_clk",
4040d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4041d9db07f0SSricharan R &usb1_mock_utmi_clk_src.clkr.hw },
4042d9db07f0SSricharan R .num_parents = 1,
4043d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4044d9db07f0SSricharan R .ops = &clk_branch2_ops,
4045d9db07f0SSricharan R },
4046d9db07f0SSricharan R },
4047d9db07f0SSricharan R };
4048d9db07f0SSricharan R
4049d9db07f0SSricharan R static struct clk_branch gcc_usb1_phy_cfg_ahb_clk = {
4050d9db07f0SSricharan R .halt_reg = 0x3f080,
4051d9db07f0SSricharan R .clkr = {
4052d9db07f0SSricharan R .enable_reg = 0x3f080,
4053d9db07f0SSricharan R .enable_mask = BIT(0),
4054d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4055d9db07f0SSricharan R .name = "gcc_usb1_phy_cfg_ahb_clk",
4056d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4057d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
4058d9db07f0SSricharan R .num_parents = 1,
4059d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4060d9db07f0SSricharan R .ops = &clk_branch2_ops,
4061d9db07f0SSricharan R },
4062d9db07f0SSricharan R },
4063d9db07f0SSricharan R };
4064d9db07f0SSricharan R
4065d9db07f0SSricharan R static struct clk_branch gcc_usb1_sleep_clk = {
4066d9db07f0SSricharan R .halt_reg = 0x3f004,
4067d9db07f0SSricharan R .clkr = {
4068d9db07f0SSricharan R .enable_reg = 0x3f004,
4069d9db07f0SSricharan R .enable_mask = BIT(0),
4070d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4071d9db07f0SSricharan R .name = "gcc_usb1_sleep_clk",
4072d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4073d9db07f0SSricharan R &gcc_sleep_clk_src.clkr.hw },
4074d9db07f0SSricharan R .num_parents = 1,
4075d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4076d9db07f0SSricharan R .ops = &clk_branch2_ops,
4077d9db07f0SSricharan R },
4078d9db07f0SSricharan R },
4079d9db07f0SSricharan R };
4080d9db07f0SSricharan R
4081d9db07f0SSricharan R static struct clk_branch gcc_cmn_12gpll_ahb_clk = {
4082d9db07f0SSricharan R .halt_reg = 0x56308,
4083d9db07f0SSricharan R .clkr = {
4084d9db07f0SSricharan R .enable_reg = 0x56308,
4085d9db07f0SSricharan R .enable_mask = BIT(0),
4086d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4087d9db07f0SSricharan R .name = "gcc_cmn_12gpll_ahb_clk",
4088d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4089d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
4090d9db07f0SSricharan R .num_parents = 1,
4091d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4092d9db07f0SSricharan R .ops = &clk_branch2_ops,
4093d9db07f0SSricharan R },
4094d9db07f0SSricharan R },
4095d9db07f0SSricharan R };
4096d9db07f0SSricharan R
4097d9db07f0SSricharan R static struct clk_branch gcc_cmn_12gpll_sys_clk = {
4098d9db07f0SSricharan R .halt_reg = 0x5630c,
4099d9db07f0SSricharan R .clkr = {
4100d9db07f0SSricharan R .enable_reg = 0x5630c,
4101d9db07f0SSricharan R .enable_mask = BIT(0),
4102d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4103d9db07f0SSricharan R .name = "gcc_cmn_12gpll_sys_clk",
4104d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4105d9db07f0SSricharan R &gcc_xo_clk_src.clkr.hw },
4106d9db07f0SSricharan R .num_parents = 1,
4107d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4108d9db07f0SSricharan R .ops = &clk_branch2_ops,
4109d9db07f0SSricharan R },
4110d9db07f0SSricharan R },
4111d9db07f0SSricharan R };
4112d9db07f0SSricharan R
4113d9db07f0SSricharan R static struct clk_branch gcc_sdcc1_ice_core_clk = {
4114d9db07f0SSricharan R .halt_reg = 0x5d014,
4115d9db07f0SSricharan R .clkr = {
4116d9db07f0SSricharan R .enable_reg = 0x5d014,
4117d9db07f0SSricharan R .enable_mask = BIT(0),
4118d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4119d9db07f0SSricharan R .name = "gcc_sdcc1_ice_core_clk",
4120d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4121d9db07f0SSricharan R &sdcc1_ice_core_clk_src.clkr.hw },
4122d9db07f0SSricharan R .num_parents = 1,
4123d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4124d9db07f0SSricharan R .ops = &clk_branch2_ops,
4125d9db07f0SSricharan R },
4126d9db07f0SSricharan R },
4127d9db07f0SSricharan R };
4128d9db07f0SSricharan R
4129d9db07f0SSricharan R static struct clk_branch gcc_dcc_clk = {
4130d9db07f0SSricharan R .halt_reg = 0x77004,
4131d9db07f0SSricharan R .clkr = {
4132d9db07f0SSricharan R .enable_reg = 0x77004,
4133d9db07f0SSricharan R .enable_mask = BIT(0),
4134d9db07f0SSricharan R .hw.init = &(struct clk_init_data){
4135d9db07f0SSricharan R .name = "gcc_dcc_clk",
4136d9db07f0SSricharan R .parent_hws = (const struct clk_hw *[]){
4137d9db07f0SSricharan R &pcnoc_bfdcd_clk_src.clkr.hw },
4138d9db07f0SSricharan R .num_parents = 1,
4139d9db07f0SSricharan R .flags = CLK_SET_RATE_PARENT,
4140d9db07f0SSricharan R .ops = &clk_branch2_ops,
4141d9db07f0SSricharan R },
4142d9db07f0SSricharan R },
4143d9db07f0SSricharan R };
4144d9db07f0SSricharan R
4145d9db07f0SSricharan R static const struct alpha_pll_config ubi32_pll_config = {
4146d9db07f0SSricharan R .l = 0x3e,
4147f4f0c8acSRobert Marko .alpha = 0x6667,
4148f4f0c8acSRobert Marko .config_ctl_val = 0x240d4828,
4149f4f0c8acSRobert Marko .config_ctl_hi_val = 0x6,
4150d9db07f0SSricharan R .main_output_mask = BIT(0),
4151d9db07f0SSricharan R .aux_output_mask = BIT(1),
4152d9db07f0SSricharan R .pre_div_val = 0x0,
4153d9db07f0SSricharan R .pre_div_mask = BIT(12),
4154d9db07f0SSricharan R .post_div_val = 0x0,
4155d9db07f0SSricharan R .post_div_mask = GENMASK(9, 8),
4156f4f0c8acSRobert Marko .alpha_en_mask = BIT(24),
4157f4f0c8acSRobert Marko .test_ctl_val = 0x1C0000C0,
4158f4f0c8acSRobert Marko .test_ctl_hi_val = 0x4000,
4159d9db07f0SSricharan R };
4160d9db07f0SSricharan R
4161d9db07f0SSricharan R static const struct alpha_pll_config nss_crypto_pll_config = {
4162d9db07f0SSricharan R .l = 0x32,
4163d9db07f0SSricharan R .alpha = 0x0,
4164d9db07f0SSricharan R .alpha_hi = 0x0,
4165d9db07f0SSricharan R .config_ctl_val = 0x4001055b,
4166d9db07f0SSricharan R .main_output_mask = BIT(0),
4167d9db07f0SSricharan R .pre_div_val = 0x0,
4168d9db07f0SSricharan R .pre_div_mask = GENMASK(14, 12),
4169d9db07f0SSricharan R .post_div_val = 0x1 << 8,
4170d9db07f0SSricharan R .post_div_mask = GENMASK(11, 8),
4171d9db07f0SSricharan R .vco_mask = GENMASK(21, 20),
4172d9db07f0SSricharan R .vco_val = 0x0,
4173d9db07f0SSricharan R .alpha_en_mask = BIT(24),
4174d9db07f0SSricharan R };
4175d9db07f0SSricharan R
4176d9db07f0SSricharan R static struct clk_hw *gcc_ipq6018_hws[] = {
4177d9db07f0SSricharan R &gpll0_out_main_div2.hw,
4178d9db07f0SSricharan R &gcc_xo_div4_clk_src.hw,
4179d9db07f0SSricharan R &nss_ppe_cdiv_clk_src.hw,
4180d9db07f0SSricharan R &gpll6_out_main_div2.hw,
4181d9db07f0SSricharan R &qdss_dap_sync_clk_src.hw,
4182d9db07f0SSricharan R &qdss_tsctr_div2_clk_src.hw,
4183d9db07f0SSricharan R };
4184d9db07f0SSricharan R
4185d9db07f0SSricharan R static struct clk_regmap *gcc_ipq6018_clks[] = {
4186d9db07f0SSricharan R [GPLL0_MAIN] = &gpll0_main.clkr,
4187d9db07f0SSricharan R [GPLL0] = &gpll0.clkr,
4188d9db07f0SSricharan R [UBI32_PLL_MAIN] = &ubi32_pll_main.clkr,
4189d9db07f0SSricharan R [UBI32_PLL] = &ubi32_pll.clkr,
4190d9db07f0SSricharan R [GPLL6_MAIN] = &gpll6_main.clkr,
4191d9db07f0SSricharan R [GPLL6] = &gpll6.clkr,
4192d9db07f0SSricharan R [GPLL4_MAIN] = &gpll4_main.clkr,
4193d9db07f0SSricharan R [GPLL4] = &gpll4.clkr,
4194d9db07f0SSricharan R [PCNOC_BFDCD_CLK_SRC] = &pcnoc_bfdcd_clk_src.clkr,
4195d9db07f0SSricharan R [GPLL2_MAIN] = &gpll2_main.clkr,
4196d9db07f0SSricharan R [GPLL2] = &gpll2.clkr,
4197d9db07f0SSricharan R [NSS_CRYPTO_PLL_MAIN] = &nss_crypto_pll_main.clkr,
4198d9db07f0SSricharan R [NSS_CRYPTO_PLL] = &nss_crypto_pll.clkr,
4199d9db07f0SSricharan R [QDSS_TSCTR_CLK_SRC] = &qdss_tsctr_clk_src.clkr,
4200d9db07f0SSricharan R [QDSS_AT_CLK_SRC] = &qdss_at_clk_src.clkr,
4201d9db07f0SSricharan R [NSS_PPE_CLK_SRC] = &nss_ppe_clk_src.clkr,
4202d9db07f0SSricharan R [GCC_XO_CLK_SRC] = &gcc_xo_clk_src.clkr,
4203d9db07f0SSricharan R [SYSTEM_NOC_BFDCD_CLK_SRC] = &system_noc_bfdcd_clk_src.clkr,
4204d9db07f0SSricharan R [SNOC_NSSNOC_BFDCD_CLK_SRC] = &snoc_nssnoc_bfdcd_clk_src.clkr,
4205d9db07f0SSricharan R [NSS_CE_CLK_SRC] = &nss_ce_clk_src.clkr,
4206d9db07f0SSricharan R [GCC_SLEEP_CLK_SRC] = &gcc_sleep_clk_src.clkr,
4207d9db07f0SSricharan R [APSS_AHB_CLK_SRC] = &apss_ahb_clk_src.clkr,
4208d9db07f0SSricharan R [NSS_PORT5_RX_CLK_SRC] = &nss_port5_rx_clk_src.clkr,
4209d9db07f0SSricharan R [NSS_PORT5_TX_CLK_SRC] = &nss_port5_tx_clk_src.clkr,
4210d9db07f0SSricharan R [UBI32_MEM_NOC_BFDCD_CLK_SRC] = &ubi32_mem_noc_bfdcd_clk_src.clkr,
4211d9db07f0SSricharan R [PCIE0_AXI_CLK_SRC] = &pcie0_axi_clk_src.clkr,
4212d9db07f0SSricharan R [USB0_MASTER_CLK_SRC] = &usb0_master_clk_src.clkr,
4213d9db07f0SSricharan R [APSS_AHB_POSTDIV_CLK_SRC] = &apss_ahb_postdiv_clk_src.clkr,
4214d9db07f0SSricharan R [NSS_PORT1_RX_CLK_SRC] = &nss_port1_rx_clk_src.clkr,
4215d9db07f0SSricharan R [NSS_PORT1_TX_CLK_SRC] = &nss_port1_tx_clk_src.clkr,
4216d9db07f0SSricharan R [NSS_PORT2_RX_CLK_SRC] = &nss_port2_rx_clk_src.clkr,
4217d9db07f0SSricharan R [NSS_PORT2_TX_CLK_SRC] = &nss_port2_tx_clk_src.clkr,
4218d9db07f0SSricharan R [NSS_PORT3_RX_CLK_SRC] = &nss_port3_rx_clk_src.clkr,
4219d9db07f0SSricharan R [NSS_PORT3_TX_CLK_SRC] = &nss_port3_tx_clk_src.clkr,
4220d9db07f0SSricharan R [NSS_PORT4_RX_CLK_SRC] = &nss_port4_rx_clk_src.clkr,
4221d9db07f0SSricharan R [NSS_PORT4_TX_CLK_SRC] = &nss_port4_tx_clk_src.clkr,
4222d9db07f0SSricharan R [NSS_PORT5_RX_DIV_CLK_SRC] = &nss_port5_rx_div_clk_src.clkr,
4223d9db07f0SSricharan R [NSS_PORT5_TX_DIV_CLK_SRC] = &nss_port5_tx_div_clk_src.clkr,
4224d9db07f0SSricharan R [APSS_AXI_CLK_SRC] = &apss_axi_clk_src.clkr,
4225d9db07f0SSricharan R [NSS_CRYPTO_CLK_SRC] = &nss_crypto_clk_src.clkr,
4226d9db07f0SSricharan R [NSS_PORT1_RX_DIV_CLK_SRC] = &nss_port1_rx_div_clk_src.clkr,
4227d9db07f0SSricharan R [NSS_PORT1_TX_DIV_CLK_SRC] = &nss_port1_tx_div_clk_src.clkr,
4228d9db07f0SSricharan R [NSS_PORT2_RX_DIV_CLK_SRC] = &nss_port2_rx_div_clk_src.clkr,
4229d9db07f0SSricharan R [NSS_PORT2_TX_DIV_CLK_SRC] = &nss_port2_tx_div_clk_src.clkr,
4230d9db07f0SSricharan R [NSS_PORT3_RX_DIV_CLK_SRC] = &nss_port3_rx_div_clk_src.clkr,
4231d9db07f0SSricharan R [NSS_PORT3_TX_DIV_CLK_SRC] = &nss_port3_tx_div_clk_src.clkr,
4232d9db07f0SSricharan R [NSS_PORT4_RX_DIV_CLK_SRC] = &nss_port4_rx_div_clk_src.clkr,
4233d9db07f0SSricharan R [NSS_PORT4_TX_DIV_CLK_SRC] = &nss_port4_tx_div_clk_src.clkr,
4234d9db07f0SSricharan R [NSS_UBI0_CLK_SRC] = &nss_ubi0_clk_src.clkr,
4235d9db07f0SSricharan R [ADSS_PWM_CLK_SRC] = &adss_pwm_clk_src.clkr,
4236d9db07f0SSricharan R [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
4237d9db07f0SSricharan R [BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
4238d9db07f0SSricharan R [BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr,
4239d9db07f0SSricharan R [BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr,
4240d9db07f0SSricharan R [BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr,
4241d9db07f0SSricharan R [BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr,
4242d9db07f0SSricharan R [BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr,
4243d9db07f0SSricharan R [BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr,
4244d9db07f0SSricharan R [BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr,
4245d9db07f0SSricharan R [BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr,
4246d9db07f0SSricharan R [BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr,
4247d9db07f0SSricharan R [BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr,
4248d9db07f0SSricharan R [BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr,
4249d9db07f0SSricharan R [BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr,
4250d9db07f0SSricharan R [BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr,
4251d9db07f0SSricharan R [BLSP1_UART4_APPS_CLK_SRC] = &blsp1_uart4_apps_clk_src.clkr,
4252d9db07f0SSricharan R [BLSP1_UART5_APPS_CLK_SRC] = &blsp1_uart5_apps_clk_src.clkr,
4253d9db07f0SSricharan R [BLSP1_UART6_APPS_CLK_SRC] = &blsp1_uart6_apps_clk_src.clkr,
4254d9db07f0SSricharan R [CRYPTO_CLK_SRC] = &crypto_clk_src.clkr,
4255d9db07f0SSricharan R [GP1_CLK_SRC] = &gp1_clk_src.clkr,
4256d9db07f0SSricharan R [GP2_CLK_SRC] = &gp2_clk_src.clkr,
4257d9db07f0SSricharan R [GP3_CLK_SRC] = &gp3_clk_src.clkr,
4258d9db07f0SSricharan R [NSS_UBI0_DIV_CLK_SRC] = &nss_ubi0_div_clk_src.clkr,
4259d9db07f0SSricharan R [PCIE0_AUX_CLK_SRC] = &pcie0_aux_clk_src.clkr,
4260d9db07f0SSricharan R [PCIE0_PIPE_CLK_SRC] = &pcie0_pipe_clk_src.clkr,
4261d9db07f0SSricharan R [SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr,
4262d9db07f0SSricharan R [USB0_AUX_CLK_SRC] = &usb0_aux_clk_src.clkr,
4263d9db07f0SSricharan R [USB0_MOCK_UTMI_CLK_SRC] = &usb0_mock_utmi_clk_src.clkr,
4264d9db07f0SSricharan R [USB0_PIPE_CLK_SRC] = &usb0_pipe_clk_src.clkr,
4265d9db07f0SSricharan R [USB1_MOCK_UTMI_CLK_SRC] = &usb1_mock_utmi_clk_src.clkr,
4266d9db07f0SSricharan R [GCC_ADSS_PWM_CLK] = &gcc_adss_pwm_clk.clkr,
4267d9db07f0SSricharan R [GCC_APSS_AHB_CLK] = &gcc_apss_ahb_clk.clkr,
4268d9db07f0SSricharan R [GCC_APSS_AXI_CLK] = &gcc_apss_axi_clk.clkr,
4269d9db07f0SSricharan R [GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
4270d9db07f0SSricharan R [GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
4271d9db07f0SSricharan R [GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
4272d9db07f0SSricharan R [GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr,
4273d9db07f0SSricharan R [GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr,
4274d9db07f0SSricharan R [GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr,
4275d9db07f0SSricharan R [GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr,
4276d9db07f0SSricharan R [GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr,
4277d9db07f0SSricharan R [GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
4278d9db07f0SSricharan R [GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
4279d9db07f0SSricharan R [GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
4280d9db07f0SSricharan R [GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
4281d9db07f0SSricharan R [GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
4282d9db07f0SSricharan R [GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
4283d9db07f0SSricharan R [GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr,
4284d9db07f0SSricharan R [GCC_BLSP1_UART4_APPS_CLK] = &gcc_blsp1_uart4_apps_clk.clkr,
4285d9db07f0SSricharan R [GCC_BLSP1_UART5_APPS_CLK] = &gcc_blsp1_uart5_apps_clk.clkr,
4286d9db07f0SSricharan R [GCC_BLSP1_UART6_APPS_CLK] = &gcc_blsp1_uart6_apps_clk.clkr,
4287d9db07f0SSricharan R [GCC_CRYPTO_AHB_CLK] = &gcc_crypto_ahb_clk.clkr,
4288d9db07f0SSricharan R [GCC_CRYPTO_AXI_CLK] = &gcc_crypto_axi_clk.clkr,
4289d9db07f0SSricharan R [GCC_CRYPTO_CLK] = &gcc_crypto_clk.clkr,
4290d9db07f0SSricharan R [GCC_XO_CLK] = &gcc_xo_clk.clkr,
4291d9db07f0SSricharan R [GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
4292d9db07f0SSricharan R [GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
4293d9db07f0SSricharan R [GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
4294d9db07f0SSricharan R [GCC_MDIO_AHB_CLK] = &gcc_mdio_ahb_clk.clkr,
4295d9db07f0SSricharan R [GCC_CRYPTO_PPE_CLK] = &gcc_crypto_ppe_clk.clkr,
4296d9db07f0SSricharan R [GCC_NSS_CE_APB_CLK] = &gcc_nss_ce_apb_clk.clkr,
4297d9db07f0SSricharan R [GCC_NSS_CE_AXI_CLK] = &gcc_nss_ce_axi_clk.clkr,
4298d9db07f0SSricharan R [GCC_NSS_CFG_CLK] = &gcc_nss_cfg_clk.clkr,
4299d9db07f0SSricharan R [GCC_NSS_CRYPTO_CLK] = &gcc_nss_crypto_clk.clkr,
4300d9db07f0SSricharan R [GCC_NSS_CSR_CLK] = &gcc_nss_csr_clk.clkr,
4301d9db07f0SSricharan R [GCC_NSS_EDMA_CFG_CLK] = &gcc_nss_edma_cfg_clk.clkr,
4302d9db07f0SSricharan R [GCC_NSS_EDMA_CLK] = &gcc_nss_edma_clk.clkr,
4303d9db07f0SSricharan R [GCC_NSS_NOC_CLK] = &gcc_nss_noc_clk.clkr,
4304d9db07f0SSricharan R [GCC_UBI0_UTCM_CLK] = &gcc_ubi0_utcm_clk.clkr,
4305d9db07f0SSricharan R [GCC_SNOC_NSSNOC_CLK] = &gcc_snoc_nssnoc_clk.clkr,
4306d9db07f0SSricharan R [GCC_NSS_PORT1_RX_CLK] = &gcc_nss_port1_rx_clk.clkr,
4307d9db07f0SSricharan R [GCC_NSS_PORT1_TX_CLK] = &gcc_nss_port1_tx_clk.clkr,
4308d9db07f0SSricharan R [GCC_NSS_PORT2_RX_CLK] = &gcc_nss_port2_rx_clk.clkr,
4309d9db07f0SSricharan R [GCC_NSS_PORT2_TX_CLK] = &gcc_nss_port2_tx_clk.clkr,
4310d9db07f0SSricharan R [GCC_NSS_PORT3_RX_CLK] = &gcc_nss_port3_rx_clk.clkr,
4311d9db07f0SSricharan R [GCC_NSS_PORT3_TX_CLK] = &gcc_nss_port3_tx_clk.clkr,
4312d9db07f0SSricharan R [GCC_NSS_PORT4_RX_CLK] = &gcc_nss_port4_rx_clk.clkr,
4313d9db07f0SSricharan R [GCC_NSS_PORT4_TX_CLK] = &gcc_nss_port4_tx_clk.clkr,
4314d9db07f0SSricharan R [GCC_NSS_PORT5_RX_CLK] = &gcc_nss_port5_rx_clk.clkr,
4315d9db07f0SSricharan R [GCC_NSS_PORT5_TX_CLK] = &gcc_nss_port5_tx_clk.clkr,
4316d9db07f0SSricharan R [GCC_NSS_PPE_CFG_CLK] = &gcc_nss_ppe_cfg_clk.clkr,
4317d9db07f0SSricharan R [GCC_NSS_PPE_CLK] = &gcc_nss_ppe_clk.clkr,
4318d9db07f0SSricharan R [GCC_NSS_PPE_IPE_CLK] = &gcc_nss_ppe_ipe_clk.clkr,
4319d9db07f0SSricharan R [GCC_NSS_PTP_REF_CLK] = &gcc_nss_ptp_ref_clk.clkr,
4320d9db07f0SSricharan R [GCC_NSSNOC_CE_APB_CLK] = &gcc_nssnoc_ce_apb_clk.clkr,
4321d9db07f0SSricharan R [GCC_NSSNOC_CE_AXI_CLK] = &gcc_nssnoc_ce_axi_clk.clkr,
4322d9db07f0SSricharan R [GCC_NSSNOC_CRYPTO_CLK] = &gcc_nssnoc_crypto_clk.clkr,
4323d9db07f0SSricharan R [GCC_NSSNOC_PPE_CFG_CLK] = &gcc_nssnoc_ppe_cfg_clk.clkr,
4324d9db07f0SSricharan R [GCC_NSSNOC_PPE_CLK] = &gcc_nssnoc_ppe_clk.clkr,
4325d9db07f0SSricharan R [GCC_NSSNOC_QOSGEN_REF_CLK] = &gcc_nssnoc_qosgen_ref_clk.clkr,
4326d9db07f0SSricharan R [GCC_NSSNOC_SNOC_CLK] = &gcc_nssnoc_snoc_clk.clkr,
4327d9db07f0SSricharan R [GCC_NSSNOC_TIMEOUT_REF_CLK] = &gcc_nssnoc_timeout_ref_clk.clkr,
4328d9db07f0SSricharan R [GCC_NSSNOC_UBI0_AHB_CLK] = &gcc_nssnoc_ubi0_ahb_clk.clkr,
4329d9db07f0SSricharan R [GCC_PORT1_MAC_CLK] = &gcc_port1_mac_clk.clkr,
4330d9db07f0SSricharan R [GCC_PORT2_MAC_CLK] = &gcc_port2_mac_clk.clkr,
4331d9db07f0SSricharan R [GCC_PORT3_MAC_CLK] = &gcc_port3_mac_clk.clkr,
4332d9db07f0SSricharan R [GCC_PORT4_MAC_CLK] = &gcc_port4_mac_clk.clkr,
4333d9db07f0SSricharan R [GCC_PORT5_MAC_CLK] = &gcc_port5_mac_clk.clkr,
4334d9db07f0SSricharan R [GCC_UBI0_AHB_CLK] = &gcc_ubi0_ahb_clk.clkr,
4335d9db07f0SSricharan R [GCC_UBI0_AXI_CLK] = &gcc_ubi0_axi_clk.clkr,
4336d9db07f0SSricharan R [GCC_UBI0_NC_AXI_CLK] = &gcc_ubi0_nc_axi_clk.clkr,
4337d9db07f0SSricharan R [GCC_UBI0_CORE_CLK] = &gcc_ubi0_core_clk.clkr,
4338d9db07f0SSricharan R [GCC_PCIE0_AHB_CLK] = &gcc_pcie0_ahb_clk.clkr,
4339d9db07f0SSricharan R [GCC_PCIE0_AUX_CLK] = &gcc_pcie0_aux_clk.clkr,
4340d9db07f0SSricharan R [GCC_PCIE0_AXI_M_CLK] = &gcc_pcie0_axi_m_clk.clkr,
4341d9db07f0SSricharan R [GCC_PCIE0_AXI_S_CLK] = &gcc_pcie0_axi_s_clk.clkr,
4342d9db07f0SSricharan R [GCC_SYS_NOC_PCIE0_AXI_CLK] = &gcc_sys_noc_pcie0_axi_clk.clkr,
4343d9db07f0SSricharan R [GCC_PCIE0_PIPE_CLK] = &gcc_pcie0_pipe_clk.clkr,
4344d9db07f0SSricharan R [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
4345d9db07f0SSricharan R [GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
4346d9db07f0SSricharan R [GCC_QPIC_AHB_CLK] = &gcc_qpic_ahb_clk.clkr,
4347d9db07f0SSricharan R [GCC_QPIC_CLK] = &gcc_qpic_clk.clkr,
4348d9db07f0SSricharan R [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
4349d9db07f0SSricharan R [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
4350d9db07f0SSricharan R [GCC_UNIPHY0_AHB_CLK] = &gcc_uniphy0_ahb_clk.clkr,
4351d9db07f0SSricharan R [GCC_UNIPHY0_PORT1_RX_CLK] = &gcc_uniphy0_port1_rx_clk.clkr,
4352d9db07f0SSricharan R [GCC_UNIPHY0_PORT1_TX_CLK] = &gcc_uniphy0_port1_tx_clk.clkr,
4353d9db07f0SSricharan R [GCC_UNIPHY0_PORT2_RX_CLK] = &gcc_uniphy0_port2_rx_clk.clkr,
4354d9db07f0SSricharan R [GCC_UNIPHY0_PORT2_TX_CLK] = &gcc_uniphy0_port2_tx_clk.clkr,
4355d9db07f0SSricharan R [GCC_UNIPHY0_PORT3_RX_CLK] = &gcc_uniphy0_port3_rx_clk.clkr,
4356d9db07f0SSricharan R [GCC_UNIPHY0_PORT3_TX_CLK] = &gcc_uniphy0_port3_tx_clk.clkr,
4357d9db07f0SSricharan R [GCC_UNIPHY0_PORT4_RX_CLK] = &gcc_uniphy0_port4_rx_clk.clkr,
4358d9db07f0SSricharan R [GCC_UNIPHY0_PORT4_TX_CLK] = &gcc_uniphy0_port4_tx_clk.clkr,
4359d9db07f0SSricharan R [GCC_UNIPHY0_PORT5_RX_CLK] = &gcc_uniphy0_port5_rx_clk.clkr,
4360d9db07f0SSricharan R [GCC_UNIPHY0_PORT5_TX_CLK] = &gcc_uniphy0_port5_tx_clk.clkr,
4361d9db07f0SSricharan R [GCC_UNIPHY0_SYS_CLK] = &gcc_uniphy0_sys_clk.clkr,
4362d9db07f0SSricharan R [GCC_UNIPHY1_AHB_CLK] = &gcc_uniphy1_ahb_clk.clkr,
4363d9db07f0SSricharan R [GCC_UNIPHY1_PORT5_RX_CLK] = &gcc_uniphy1_port5_rx_clk.clkr,
4364d9db07f0SSricharan R [GCC_UNIPHY1_PORT5_TX_CLK] = &gcc_uniphy1_port5_tx_clk.clkr,
4365d9db07f0SSricharan R [GCC_UNIPHY1_SYS_CLK] = &gcc_uniphy1_sys_clk.clkr,
4366d9db07f0SSricharan R [GCC_USB0_AUX_CLK] = &gcc_usb0_aux_clk.clkr,
4367d9db07f0SSricharan R [GCC_SYS_NOC_USB0_AXI_CLK] = &gcc_sys_noc_usb0_axi_clk.clkr,
4368d9db07f0SSricharan R [GCC_SNOC_BUS_TIMEOUT2_AHB_CLK] = &gcc_snoc_bus_timeout2_ahb_clk.clkr,
4369d9db07f0SSricharan R [GCC_USB0_MASTER_CLK] = &gcc_usb0_master_clk.clkr,
4370d9db07f0SSricharan R [GCC_USB0_MOCK_UTMI_CLK] = &gcc_usb0_mock_utmi_clk.clkr,
4371d9db07f0SSricharan R [GCC_USB0_PHY_CFG_AHB_CLK] = &gcc_usb0_phy_cfg_ahb_clk.clkr,
4372d9db07f0SSricharan R [GCC_USB0_PIPE_CLK] = &gcc_usb0_pipe_clk.clkr,
4373d9db07f0SSricharan R [GCC_USB0_SLEEP_CLK] = &gcc_usb0_sleep_clk.clkr,
4374d9db07f0SSricharan R [GCC_USB1_MASTER_CLK] = &gcc_usb1_master_clk.clkr,
4375d9db07f0SSricharan R [GCC_USB1_MOCK_UTMI_CLK] = &gcc_usb1_mock_utmi_clk.clkr,
4376d9db07f0SSricharan R [GCC_USB1_PHY_CFG_AHB_CLK] = &gcc_usb1_phy_cfg_ahb_clk.clkr,
4377d9db07f0SSricharan R [GCC_USB1_SLEEP_CLK] = &gcc_usb1_sleep_clk.clkr,
4378d9db07f0SSricharan R [GCC_CMN_12GPLL_AHB_CLK] = &gcc_cmn_12gpll_ahb_clk.clkr,
4379d9db07f0SSricharan R [GCC_CMN_12GPLL_SYS_CLK] = &gcc_cmn_12gpll_sys_clk.clkr,
4380d9db07f0SSricharan R [GCC_SDCC1_ICE_CORE_CLK] = &gcc_sdcc1_ice_core_clk.clkr,
4381d9db07f0SSricharan R [SDCC1_ICE_CORE_CLK_SRC] = &sdcc1_ice_core_clk_src.clkr,
4382d9db07f0SSricharan R [GCC_DCC_CLK] = &gcc_dcc_clk.clkr,
4383d9db07f0SSricharan R [PCIE0_RCHNG_CLK_SRC] = &pcie0_rchng_clk_src.clkr,
4384d9db07f0SSricharan R [GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
4385d9db07f0SSricharan R [PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
4386d9db07f0SSricharan R [WCSS_AHB_CLK_SRC] = &wcss_ahb_clk_src.clkr,
4387d9db07f0SSricharan R [Q6_AXI_CLK_SRC] = &q6_axi_clk_src.clkr,
4388d9db07f0SSricharan R [RBCPR_WCSS_CLK_SRC] = &rbcpr_wcss_clk_src.clkr,
4389d9db07f0SSricharan R [GCC_LPASS_CORE_AXIM_CLK] = &gcc_lpass_core_axim_clk.clkr,
4390d9db07f0SSricharan R [LPASS_CORE_AXIM_CLK_SRC] = &lpass_core_axim_clk_src.clkr,
4391d9db07f0SSricharan R [GCC_LPASS_SNOC_CFG_CLK] = &gcc_lpass_snoc_cfg_clk.clkr,
4392d9db07f0SSricharan R [LPASS_SNOC_CFG_CLK_SRC] = &lpass_snoc_cfg_clk_src.clkr,
4393d9db07f0SSricharan R [GCC_LPASS_Q6_AXIM_CLK] = &gcc_lpass_q6_axim_clk.clkr,
4394d9db07f0SSricharan R [LPASS_Q6_AXIM_CLK_SRC] = &lpass_q6_axim_clk_src.clkr,
4395d9db07f0SSricharan R [GCC_LPASS_Q6_ATBM_AT_CLK] = &gcc_lpass_q6_atbm_at_clk.clkr,
4396d9db07f0SSricharan R [GCC_LPASS_Q6_PCLKDBG_CLK] = &gcc_lpass_q6_pclkdbg_clk.clkr,
4397d9db07f0SSricharan R [GCC_LPASS_Q6SS_TSCTR_1TO2_CLK] = &gcc_lpass_q6ss_tsctr_1to2_clk.clkr,
4398d9db07f0SSricharan R [GCC_LPASS_Q6SS_TRIG_CLK] = &gcc_lpass_q6ss_trig_clk.clkr,
4399d9db07f0SSricharan R [GCC_LPASS_TBU_CLK] = &gcc_lpass_tbu_clk.clkr,
4400d9db07f0SSricharan R [GCC_PCNOC_LPASS_CLK] = &gcc_pcnoc_lpass_clk.clkr,
4401d9db07f0SSricharan R [GCC_MEM_NOC_UBI32_CLK] = &gcc_mem_noc_ubi32_clk.clkr,
4402d9db07f0SSricharan R [GCC_MEM_NOC_LPASS_CLK] = &gcc_mem_noc_lpass_clk.clkr,
4403d9db07f0SSricharan R [GCC_SNOC_LPASS_CFG_CLK] = &gcc_snoc_lpass_cfg_clk.clkr,
4404d9db07f0SSricharan R [QDSS_STM_CLK_SRC] = &qdss_stm_clk_src.clkr,
4405d9db07f0SSricharan R [QDSS_TRACECLKIN_CLK_SRC] = &qdss_traceclkin_clk_src.clkr,
4406d9db07f0SSricharan R };
4407d9db07f0SSricharan R
4408d9db07f0SSricharan R static const struct qcom_reset_map gcc_ipq6018_resets[] = {
4409d9db07f0SSricharan R [GCC_BLSP1_BCR] = { 0x01000, 0 },
4410d9db07f0SSricharan R [GCC_BLSP1_QUP1_BCR] = { 0x02000, 0 },
4411d9db07f0SSricharan R [GCC_BLSP1_UART1_BCR] = { 0x02038, 0 },
4412d9db07f0SSricharan R [GCC_BLSP1_QUP2_BCR] = { 0x03008, 0 },
4413d9db07f0SSricharan R [GCC_BLSP1_UART2_BCR] = { 0x03028, 0 },
4414d9db07f0SSricharan R [GCC_BLSP1_QUP3_BCR] = { 0x04008, 0 },
4415d9db07f0SSricharan R [GCC_BLSP1_UART3_BCR] = { 0x04028, 0 },
4416d9db07f0SSricharan R [GCC_BLSP1_QUP4_BCR] = { 0x05008, 0 },
4417d9db07f0SSricharan R [GCC_BLSP1_UART4_BCR] = { 0x05028, 0 },
4418d9db07f0SSricharan R [GCC_BLSP1_QUP5_BCR] = { 0x06008, 0 },
4419d9db07f0SSricharan R [GCC_BLSP1_UART5_BCR] = { 0x06028, 0 },
4420d9db07f0SSricharan R [GCC_BLSP1_QUP6_BCR] = { 0x07008, 0 },
4421d9db07f0SSricharan R [GCC_BLSP1_UART6_BCR] = { 0x07028, 0 },
4422d9db07f0SSricharan R [GCC_IMEM_BCR] = { 0x0e000, 0 },
4423d9db07f0SSricharan R [GCC_SMMU_BCR] = { 0x12000, 0 },
4424d9db07f0SSricharan R [GCC_APSS_TCU_BCR] = { 0x12050, 0 },
4425d9db07f0SSricharan R [GCC_SMMU_XPU_BCR] = { 0x12054, 0 },
4426d9db07f0SSricharan R [GCC_PCNOC_TBU_BCR] = { 0x12058, 0 },
4427d9db07f0SSricharan R [GCC_SMMU_CFG_BCR] = { 0x1208c, 0 },
4428d9db07f0SSricharan R [GCC_PRNG_BCR] = { 0x13000, 0 },
4429d9db07f0SSricharan R [GCC_BOOT_ROM_BCR] = { 0x13008, 0 },
4430d9db07f0SSricharan R [GCC_CRYPTO_BCR] = { 0x16000, 0 },
4431d9db07f0SSricharan R [GCC_WCSS_BCR] = { 0x18000, 0 },
4432d9db07f0SSricharan R [GCC_WCSS_Q6_BCR] = { 0x18100, 0 },
4433d9db07f0SSricharan R [GCC_NSS_BCR] = { 0x19000, 0 },
4434d9db07f0SSricharan R [GCC_SEC_CTRL_BCR] = { 0x1a000, 0 },
4435d9db07f0SSricharan R [GCC_ADSS_BCR] = { 0x1c000, 0 },
4436d9db07f0SSricharan R [GCC_DDRSS_BCR] = { 0x1e000, 0 },
4437d9db07f0SSricharan R [GCC_SYSTEM_NOC_BCR] = { 0x26000, 0 },
4438d9db07f0SSricharan R [GCC_PCNOC_BCR] = { 0x27018, 0 },
4439d9db07f0SSricharan R [GCC_TCSR_BCR] = { 0x28000, 0 },
4440d9db07f0SSricharan R [GCC_QDSS_BCR] = { 0x29000, 0 },
4441d9db07f0SSricharan R [GCC_DCD_BCR] = { 0x2a000, 0 },
4442d9db07f0SSricharan R [GCC_MSG_RAM_BCR] = { 0x2b000, 0 },
4443d9db07f0SSricharan R [GCC_MPM_BCR] = { 0x2c000, 0 },
4444d9db07f0SSricharan R [GCC_SPDM_BCR] = { 0x2f000, 0 },
4445d9db07f0SSricharan R [GCC_RBCPR_BCR] = { 0x33000, 0 },
4446d9db07f0SSricharan R [GCC_RBCPR_MX_BCR] = { 0x33014, 0 },
4447d9db07f0SSricharan R [GCC_TLMM_BCR] = { 0x34000, 0 },
4448d9db07f0SSricharan R [GCC_RBCPR_WCSS_BCR] = { 0x3a000, 0 },
4449d9db07f0SSricharan R [GCC_USB0_PHY_BCR] = { 0x3e034, 0 },
4450d9db07f0SSricharan R [GCC_USB3PHY_0_PHY_BCR] = { 0x3e03c, 0 },
4451d9db07f0SSricharan R [GCC_USB0_BCR] = { 0x3e070, 0 },
4452d9db07f0SSricharan R [GCC_USB1_BCR] = { 0x3f070, 0 },
4453d9db07f0SSricharan R [GCC_QUSB2_0_PHY_BCR] = { 0x4103c, 0 },
4454d9db07f0SSricharan R [GCC_QUSB2_1_PHY_BCR] = { 0x41040, 0 },
4455d9db07f0SSricharan R [GCC_SDCC1_BCR] = { 0x42000, 0 },
4456d9db07f0SSricharan R [GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x47000, 0 },
4457d9db07f0SSricharan R [GCC_SNOC_BUS_TIMEOUT1_BCR] = { 0x47008, 0 },
4458d9db07f0SSricharan R [GCC_SNOC_BUS_TIMEOUT2_BCR] = { 0x47010, 0 },
4459d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT0_BCR] = { 0x48000, 0 },
4460d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT1_BCR] = { 0x48008, 0 },
4461d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT2_BCR] = { 0x48010, 0 },
4462d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT3_BCR] = { 0x48018, 0 },
4463d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT4_BCR] = { 0x48020, 0 },
4464d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT5_BCR] = { 0x48028, 0 },
4465d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT6_BCR] = { 0x48030, 0 },
4466d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT7_BCR] = { 0x48038, 0 },
4467d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT8_BCR] = { 0x48040, 0 },
4468d9db07f0SSricharan R [GCC_PCNOC_BUS_TIMEOUT9_BCR] = { 0x48048, 0 },
4469d9db07f0SSricharan R [GCC_UNIPHY0_BCR] = { 0x56000, 0 },
4470d9db07f0SSricharan R [GCC_UNIPHY1_BCR] = { 0x56100, 0 },
4471d9db07f0SSricharan R [GCC_CMN_12GPLL_BCR] = { 0x56300, 0 },
4472d9db07f0SSricharan R [GCC_QPIC_BCR] = { 0x57018, 0 },
4473d9db07f0SSricharan R [GCC_MDIO_BCR] = { 0x58000, 0 },
4474d9db07f0SSricharan R [GCC_WCSS_CORE_TBU_BCR] = { 0x66000, 0 },
4475d9db07f0SSricharan R [GCC_WCSS_Q6_TBU_BCR] = { 0x67000, 0 },
4476d9db07f0SSricharan R [GCC_USB0_TBU_BCR] = { 0x6a000, 0 },
4477d9db07f0SSricharan R [GCC_PCIE0_TBU_BCR] = { 0x6b000, 0 },
4478d9db07f0SSricharan R [GCC_NSS_NOC_TBU_BCR] = { 0x6e000, 0 },
4479d9db07f0SSricharan R [GCC_PCIE0_BCR] = { 0x75004, 0 },
4480d9db07f0SSricharan R [GCC_PCIE0_PHY_BCR] = { 0x75038, 0 },
4481d9db07f0SSricharan R [GCC_PCIE0PHY_PHY_BCR] = { 0x7503c, 0 },
4482d9db07f0SSricharan R [GCC_PCIE0_LINK_DOWN_BCR] = { 0x75044, 0 },
4483d9db07f0SSricharan R [GCC_DCC_BCR] = { 0x77000, 0 },
4484d9db07f0SSricharan R [GCC_APC0_VOLTAGE_DROOP_DETECTOR_BCR] = { 0x78000, 0 },
4485d9db07f0SSricharan R [GCC_SMMU_CATS_BCR] = { 0x7c000, 0 },
4486d9db07f0SSricharan R [GCC_UBI0_AXI_ARES] = { 0x68010, 0 },
4487d9db07f0SSricharan R [GCC_UBI0_AHB_ARES] = { 0x68010, 1 },
4488d9db07f0SSricharan R [GCC_UBI0_NC_AXI_ARES] = { 0x68010, 2 },
4489d9db07f0SSricharan R [GCC_UBI0_DBG_ARES] = { 0x68010, 3 },
4490d9db07f0SSricharan R [GCC_UBI0_CORE_CLAMP_ENABLE] = { 0x68010, 4 },
4491d9db07f0SSricharan R [GCC_UBI0_CLKRST_CLAMP_ENABLE] = { 0x68010, 5 },
4492d9db07f0SSricharan R [GCC_UBI0_UTCM_ARES] = { 0x68010, 6 },
4493d9db07f0SSricharan R [GCC_UBI0_CORE_ARES] = { 0x68010, 7 },
4494d9db07f0SSricharan R [GCC_NSS_CFG_ARES] = { 0x68010, 16 },
4495d9db07f0SSricharan R [GCC_NSS_NOC_ARES] = { 0x68010, 18 },
4496d9db07f0SSricharan R [GCC_NSS_CRYPTO_ARES] = { 0x68010, 19 },
4497d9db07f0SSricharan R [GCC_NSS_CSR_ARES] = { 0x68010, 20 },
4498d9db07f0SSricharan R [GCC_NSS_CE_APB_ARES] = { 0x68010, 21 },
4499d9db07f0SSricharan R [GCC_NSS_CE_AXI_ARES] = { 0x68010, 22 },
4500d9db07f0SSricharan R [GCC_NSSNOC_CE_APB_ARES] = { 0x68010, 23 },
4501d9db07f0SSricharan R [GCC_NSSNOC_CE_AXI_ARES] = { 0x68010, 24 },
4502d9db07f0SSricharan R [GCC_NSSNOC_UBI0_AHB_ARES] = { 0x68010, 25 },
4503d9db07f0SSricharan R [GCC_NSSNOC_SNOC_ARES] = { 0x68010, 27 },
4504d9db07f0SSricharan R [GCC_NSSNOC_CRYPTO_ARES] = { 0x68010, 28 },
4505d9db07f0SSricharan R [GCC_NSSNOC_ATB_ARES] = { 0x68010, 29 },
4506d9db07f0SSricharan R [GCC_NSSNOC_QOSGEN_REF_ARES] = { 0x68010, 30 },
4507d9db07f0SSricharan R [GCC_NSSNOC_TIMEOUT_REF_ARES] = { 0x68010, 31 },
4508d9db07f0SSricharan R [GCC_PCIE0_PIPE_ARES] = { 0x75040, 0 },
4509d9db07f0SSricharan R [GCC_PCIE0_SLEEP_ARES] = { 0x75040, 1 },
4510d9db07f0SSricharan R [GCC_PCIE0_CORE_STICKY_ARES] = { 0x75040, 2 },
4511d9db07f0SSricharan R [GCC_PCIE0_AXI_MASTER_ARES] = { 0x75040, 3 },
4512d9db07f0SSricharan R [GCC_PCIE0_AXI_SLAVE_ARES] = { 0x75040, 4 },
4513d9db07f0SSricharan R [GCC_PCIE0_AHB_ARES] = { 0x75040, 5 },
4514d9db07f0SSricharan R [GCC_PCIE0_AXI_MASTER_STICKY_ARES] = { 0x75040, 6 },
4515d9db07f0SSricharan R [GCC_PCIE0_AXI_SLAVE_STICKY_ARES] = { 0x75040, 7 },
4516349b5bedSRobert Marko [GCC_PPE_FULL_RESET] = { .reg = 0x68014, .bitmask = 0xf0000 },
4517349b5bedSRobert Marko [GCC_UNIPHY0_SOFT_RESET] = { .reg = 0x56004, .bitmask = 0x3ff2 },
4518d9db07f0SSricharan R [GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 },
4519349b5bedSRobert Marko [GCC_UNIPHY1_SOFT_RESET] = { .reg = 0x56104, .bitmask = 0x32 },
4520d9db07f0SSricharan R [GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 },
4521349b5bedSRobert Marko [GCC_EDMA_HW_RESET] = { .reg = 0x68014, .bitmask = 0x300000 },
4522349b5bedSRobert Marko [GCC_NSSPORT1_RESET] = { .reg = 0x68014, .bitmask = 0x1000003 },
4523349b5bedSRobert Marko [GCC_NSSPORT2_RESET] = { .reg = 0x68014, .bitmask = 0x200000c },
4524349b5bedSRobert Marko [GCC_NSSPORT3_RESET] = { .reg = 0x68014, .bitmask = 0x4000030 },
4525349b5bedSRobert Marko [GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = 0x8000300 },
4526349b5bedSRobert Marko [GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = 0x10000c00 },
4527349b5bedSRobert Marko [GCC_UNIPHY0_PORT1_ARES] = { .reg = 0x56004, .bitmask = 0x30 },
4528349b5bedSRobert Marko [GCC_UNIPHY0_PORT2_ARES] = { .reg = 0x56004, .bitmask = 0xc0 },
4529349b5bedSRobert Marko [GCC_UNIPHY0_PORT3_ARES] = { .reg = 0x56004, .bitmask = 0x300 },
4530349b5bedSRobert Marko [GCC_UNIPHY0_PORT4_ARES] = { .reg = 0x56004, .bitmask = 0xc00 },
4531349b5bedSRobert Marko [GCC_UNIPHY0_PORT5_ARES] = { .reg = 0x56004, .bitmask = 0x3000 },
4532349b5bedSRobert Marko [GCC_UNIPHY0_PORT_4_5_RESET] = { .reg = 0x56004, .bitmask = 0x3c02 },
4533349b5bedSRobert Marko [GCC_UNIPHY0_PORT_4_RESET] = { .reg = 0x56004, .bitmask = 0xc02 },
4534d9db07f0SSricharan R [GCC_LPASS_BCR] = {0x1F000, 0},
4535d9db07f0SSricharan R [GCC_UBI32_TBU_BCR] = {0x65000, 0},
4536d9db07f0SSricharan R [GCC_LPASS_TBU_BCR] = {0x6C000, 0},
4537d9db07f0SSricharan R [GCC_WCSSAON_RESET] = {0x59010, 0},
4538d9db07f0SSricharan R [GCC_LPASS_Q6_AXIM_ARES] = {0x1F004, 0},
4539d9db07f0SSricharan R [GCC_LPASS_Q6SS_TSCTR_1TO2_ARES] = {0x1F004, 1},
4540d9db07f0SSricharan R [GCC_LPASS_Q6SS_TRIG_ARES] = {0x1F004, 2},
4541d9db07f0SSricharan R [GCC_LPASS_Q6_ATBM_AT_ARES] = {0x1F004, 3},
4542d9db07f0SSricharan R [GCC_LPASS_Q6_PCLKDBG_ARES] = {0x1F004, 4},
4543d9db07f0SSricharan R [GCC_LPASS_CORE_AXIM_ARES] = {0x1F004, 5},
4544d9db07f0SSricharan R [GCC_LPASS_SNOC_CFG_ARES] = {0x1F004, 6},
4545d9db07f0SSricharan R [GCC_WCSS_DBG_ARES] = {0x59008, 0},
4546d9db07f0SSricharan R [GCC_WCSS_ECAHB_ARES] = {0x59008, 1},
4547d9db07f0SSricharan R [GCC_WCSS_ACMT_ARES] = {0x59008, 2},
4548d9db07f0SSricharan R [GCC_WCSS_DBG_BDG_ARES] = {0x59008, 3},
4549d9db07f0SSricharan R [GCC_WCSS_AHB_S_ARES] = {0x59008, 4},
4550d9db07f0SSricharan R [GCC_WCSS_AXI_M_ARES] = {0x59008, 5},
4551d9db07f0SSricharan R [GCC_Q6SS_DBG_ARES] = {0x59110, 0},
4552d9db07f0SSricharan R [GCC_Q6_AHB_S_ARES] = {0x59110, 1},
4553d9db07f0SSricharan R [GCC_Q6_AHB_ARES] = {0x59110, 2},
4554d9db07f0SSricharan R [GCC_Q6_AXIM2_ARES] = {0x59110, 3},
4555d9db07f0SSricharan R [GCC_Q6_AXIM_ARES] = {0x59110, 4},
4556d9db07f0SSricharan R };
4557d9db07f0SSricharan R
4558d9db07f0SSricharan R static const struct of_device_id gcc_ipq6018_match_table[] = {
4559d9db07f0SSricharan R { .compatible = "qcom,gcc-ipq6018" },
4560d9db07f0SSricharan R { }
4561d9db07f0SSricharan R };
4562d9db07f0SSricharan R MODULE_DEVICE_TABLE(of, gcc_ipq6018_match_table);
4563d9db07f0SSricharan R
4564d9db07f0SSricharan R static const struct regmap_config gcc_ipq6018_regmap_config = {
4565d9db07f0SSricharan R .reg_bits = 32,
4566d9db07f0SSricharan R .reg_stride = 4,
4567d9db07f0SSricharan R .val_bits = 32,
4568d9db07f0SSricharan R .max_register = 0x7fffc,
4569d9db07f0SSricharan R .fast_io = true,
4570d9db07f0SSricharan R };
4571d9db07f0SSricharan R
4572d9db07f0SSricharan R static const struct qcom_cc_desc gcc_ipq6018_desc = {
4573d9db07f0SSricharan R .config = &gcc_ipq6018_regmap_config,
4574d9db07f0SSricharan R .clks = gcc_ipq6018_clks,
4575d9db07f0SSricharan R .num_clks = ARRAY_SIZE(gcc_ipq6018_clks),
4576d9db07f0SSricharan R .resets = gcc_ipq6018_resets,
4577d9db07f0SSricharan R .num_resets = ARRAY_SIZE(gcc_ipq6018_resets),
4578d9db07f0SSricharan R .clk_hws = gcc_ipq6018_hws,
4579d9db07f0SSricharan R .num_clk_hws = ARRAY_SIZE(gcc_ipq6018_hws),
4580d9db07f0SSricharan R };
4581d9db07f0SSricharan R
gcc_ipq6018_probe(struct platform_device * pdev)4582d9db07f0SSricharan R static int gcc_ipq6018_probe(struct platform_device *pdev)
4583d9db07f0SSricharan R {
4584d9db07f0SSricharan R struct regmap *regmap;
4585d9db07f0SSricharan R
4586d9db07f0SSricharan R regmap = qcom_cc_map(pdev, &gcc_ipq6018_desc);
4587d9db07f0SSricharan R if (IS_ERR(regmap))
4588d9db07f0SSricharan R return PTR_ERR(regmap);
4589d9db07f0SSricharan R
4590d9db07f0SSricharan R /* Disable SW_COLLAPSE for USB0 GDSCR */
4591d9db07f0SSricharan R regmap_update_bits(regmap, 0x3e078, BIT(0), 0x0);
4592d9db07f0SSricharan R /* Enable SW_OVERRIDE for USB0 GDSCR */
4593d9db07f0SSricharan R regmap_update_bits(regmap, 0x3e078, BIT(2), BIT(2));
4594d9db07f0SSricharan R /* Disable SW_COLLAPSE for USB1 GDSCR */
4595d9db07f0SSricharan R regmap_update_bits(regmap, 0x3f078, BIT(0), 0x0);
4596d9db07f0SSricharan R /* Enable SW_OVERRIDE for USB1 GDSCR */
4597d9db07f0SSricharan R regmap_update_bits(regmap, 0x3f078, BIT(2), BIT(2));
4598d9db07f0SSricharan R
4599d9db07f0SSricharan R /* SW Workaround for UBI Huyara PLL */
4600d9db07f0SSricharan R regmap_update_bits(regmap, 0x2501c, BIT(26), BIT(26));
4601d9db07f0SSricharan R
4602d9db07f0SSricharan R clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config);
4603d9db07f0SSricharan R
4604d9db07f0SSricharan R clk_alpha_pll_configure(&nss_crypto_pll_main, regmap,
4605d9db07f0SSricharan R &nss_crypto_pll_config);
4606d9db07f0SSricharan R
4607d9db07f0SSricharan R return qcom_cc_really_probe(pdev, &gcc_ipq6018_desc, regmap);
4608d9db07f0SSricharan R }
4609d9db07f0SSricharan R
4610d9db07f0SSricharan R static struct platform_driver gcc_ipq6018_driver = {
4611d9db07f0SSricharan R .probe = gcc_ipq6018_probe,
4612d9db07f0SSricharan R .driver = {
4613d9db07f0SSricharan R .name = "qcom,gcc-ipq6018",
4614d9db07f0SSricharan R .of_match_table = gcc_ipq6018_match_table,
4615d9db07f0SSricharan R },
4616d9db07f0SSricharan R };
4617d9db07f0SSricharan R
gcc_ipq6018_init(void)4618d9db07f0SSricharan R static int __init gcc_ipq6018_init(void)
4619d9db07f0SSricharan R {
4620d9db07f0SSricharan R return platform_driver_register(&gcc_ipq6018_driver);
4621d9db07f0SSricharan R }
4622d9db07f0SSricharan R core_initcall(gcc_ipq6018_init);
4623d9db07f0SSricharan R
gcc_ipq6018_exit(void)4624d9db07f0SSricharan R static void __exit gcc_ipq6018_exit(void)
4625d9db07f0SSricharan R {
4626d9db07f0SSricharan R platform_driver_unregister(&gcc_ipq6018_driver);
4627d9db07f0SSricharan R }
4628d9db07f0SSricharan R module_exit(gcc_ipq6018_exit);
4629d9db07f0SSricharan R
4630d9db07f0SSricharan R MODULE_DESCRIPTION("Qualcomm Technologies, Inc. GCC IPQ6018 Driver");
4631d9db07f0SSricharan R MODULE_LICENSE("GPL v2");
4632