19c92ab61SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
224d8fba4SKumar Gala /*
324d8fba4SKumar Gala * Copyright (c) 2014, The Linux Foundation. All rights reserved.
424d8fba4SKumar Gala */
524d8fba4SKumar Gala
624d8fba4SKumar Gala #include <linux/kernel.h>
724d8fba4SKumar Gala #include <linux/bitops.h>
824d8fba4SKumar Gala #include <linux/err.h>
924d8fba4SKumar Gala #include <linux/platform_device.h>
1024d8fba4SKumar Gala #include <linux/module.h>
1124d8fba4SKumar Gala #include <linux/of.h>
12*a96cbb14SRob Herring #include <linux/of_platform.h>
1324d8fba4SKumar Gala #include <linux/clk-provider.h>
1424d8fba4SKumar Gala #include <linux/regmap.h>
1524d8fba4SKumar Gala #include <linux/reset-controller.h>
1624d8fba4SKumar Gala
1724d8fba4SKumar Gala #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
1824d8fba4SKumar Gala #include <dt-bindings/reset/qcom,gcc-ipq806x.h>
1924d8fba4SKumar Gala
2024d8fba4SKumar Gala #include "common.h"
2124d8fba4SKumar Gala #include "clk-regmap.h"
2224d8fba4SKumar Gala #include "clk-pll.h"
2324d8fba4SKumar Gala #include "clk-rcg.h"
2424d8fba4SKumar Gala #include "clk-branch.h"
251f79131bSStephen Boyd #include "clk-hfpll.h"
2624d8fba4SKumar Gala #include "reset.h"
2724d8fba4SKumar Gala
28cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo[] = {
29cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" },
30cb02866fSAnsuel Smith };
31cb02866fSAnsuel Smith
32dc1b3f65SAndy Gross static struct clk_pll pll0 = {
33dc1b3f65SAndy Gross .l_reg = 0x30c4,
34dc1b3f65SAndy Gross .m_reg = 0x30c8,
35dc1b3f65SAndy Gross .n_reg = 0x30cc,
36dc1b3f65SAndy Gross .config_reg = 0x30d4,
37dc1b3f65SAndy Gross .mode_reg = 0x30c0,
38dc1b3f65SAndy Gross .status_reg = 0x30d8,
39dc1b3f65SAndy Gross .status_bit = 16,
40dc1b3f65SAndy Gross .clkr.hw.init = &(struct clk_init_data){
41dc1b3f65SAndy Gross .name = "pll0",
42cb02866fSAnsuel Smith .parent_data = gcc_pxo,
43dc1b3f65SAndy Gross .num_parents = 1,
44dc1b3f65SAndy Gross .ops = &clk_pll_ops,
45dc1b3f65SAndy Gross },
46dc1b3f65SAndy Gross };
47dc1b3f65SAndy Gross
48dc1b3f65SAndy Gross static struct clk_regmap pll0_vote = {
49dc1b3f65SAndy Gross .enable_reg = 0x34c0,
50dc1b3f65SAndy Gross .enable_mask = BIT(0),
51dc1b3f65SAndy Gross .hw.init = &(struct clk_init_data){
52dc1b3f65SAndy Gross .name = "pll0_vote",
53cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
54cb02866fSAnsuel Smith &pll0.clkr.hw,
55cb02866fSAnsuel Smith },
56dc1b3f65SAndy Gross .num_parents = 1,
57dc1b3f65SAndy Gross .ops = &clk_pll_vote_ops,
58dc1b3f65SAndy Gross },
59dc1b3f65SAndy Gross };
60dc1b3f65SAndy Gross
6124d8fba4SKumar Gala static struct clk_pll pll3 = {
6224d8fba4SKumar Gala .l_reg = 0x3164,
6324d8fba4SKumar Gala .m_reg = 0x3168,
6424d8fba4SKumar Gala .n_reg = 0x316c,
6524d8fba4SKumar Gala .config_reg = 0x3174,
6624d8fba4SKumar Gala .mode_reg = 0x3160,
6724d8fba4SKumar Gala .status_reg = 0x3178,
6824d8fba4SKumar Gala .status_bit = 16,
6924d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){
7024d8fba4SKumar Gala .name = "pll3",
71cb02866fSAnsuel Smith .parent_data = gcc_pxo,
7224d8fba4SKumar Gala .num_parents = 1,
7324d8fba4SKumar Gala .ops = &clk_pll_ops,
7424d8fba4SKumar Gala },
7524d8fba4SKumar Gala };
7624d8fba4SKumar Gala
77c99e515aSRajendra Nayak static struct clk_regmap pll4_vote = {
78c99e515aSRajendra Nayak .enable_reg = 0x34c0,
79c99e515aSRajendra Nayak .enable_mask = BIT(4),
80c99e515aSRajendra Nayak .hw.init = &(struct clk_init_data){
81c99e515aSRajendra Nayak .name = "pll4_vote",
8255307e52SDmitry Baryshkov .parent_data = &(const struct clk_parent_data){
8355307e52SDmitry Baryshkov .fw_name = "pll4", .name = "pll4",
8455307e52SDmitry Baryshkov },
85c99e515aSRajendra Nayak .num_parents = 1,
86c99e515aSRajendra Nayak .ops = &clk_pll_vote_ops,
87c99e515aSRajendra Nayak },
88c99e515aSRajendra Nayak };
89c99e515aSRajendra Nayak
9024d8fba4SKumar Gala static struct clk_pll pll8 = {
9124d8fba4SKumar Gala .l_reg = 0x3144,
9224d8fba4SKumar Gala .m_reg = 0x3148,
9324d8fba4SKumar Gala .n_reg = 0x314c,
9424d8fba4SKumar Gala .config_reg = 0x3154,
9524d8fba4SKumar Gala .mode_reg = 0x3140,
9624d8fba4SKumar Gala .status_reg = 0x3158,
9724d8fba4SKumar Gala .status_bit = 16,
9824d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){
9924d8fba4SKumar Gala .name = "pll8",
100cb02866fSAnsuel Smith .parent_data = gcc_pxo,
10124d8fba4SKumar Gala .num_parents = 1,
10224d8fba4SKumar Gala .ops = &clk_pll_ops,
10324d8fba4SKumar Gala },
10424d8fba4SKumar Gala };
10524d8fba4SKumar Gala
10624d8fba4SKumar Gala static struct clk_regmap pll8_vote = {
10724d8fba4SKumar Gala .enable_reg = 0x34c0,
10824d8fba4SKumar Gala .enable_mask = BIT(8),
10924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
11024d8fba4SKumar Gala .name = "pll8_vote",
111cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
112cb02866fSAnsuel Smith &pll8.clkr.hw,
113cb02866fSAnsuel Smith },
11424d8fba4SKumar Gala .num_parents = 1,
11524d8fba4SKumar Gala .ops = &clk_pll_vote_ops,
11624d8fba4SKumar Gala },
11724d8fba4SKumar Gala };
11824d8fba4SKumar Gala
1191f79131bSStephen Boyd static struct hfpll_data hfpll0_data = {
1201f79131bSStephen Boyd .mode_reg = 0x3200,
1211f79131bSStephen Boyd .l_reg = 0x3208,
1221f79131bSStephen Boyd .m_reg = 0x320c,
1231f79131bSStephen Boyd .n_reg = 0x3210,
1241f79131bSStephen Boyd .config_reg = 0x3204,
1251f79131bSStephen Boyd .status_reg = 0x321c,
1261f79131bSStephen Boyd .config_val = 0x7845c665,
1271f79131bSStephen Boyd .droop_reg = 0x3214,
1281f79131bSStephen Boyd .droop_val = 0x0108c000,
1291f79131bSStephen Boyd .min_rate = 600000000UL,
1301f79131bSStephen Boyd .max_rate = 1800000000UL,
1311f79131bSStephen Boyd };
1321f79131bSStephen Boyd
1331f79131bSStephen Boyd static struct clk_hfpll hfpll0 = {
1341f79131bSStephen Boyd .d = &hfpll0_data,
1351f79131bSStephen Boyd .clkr.hw.init = &(struct clk_init_data){
136cb02866fSAnsuel Smith .parent_data = gcc_pxo,
1371f79131bSStephen Boyd .num_parents = 1,
1381f79131bSStephen Boyd .name = "hfpll0",
1391f79131bSStephen Boyd .ops = &clk_ops_hfpll,
1401f79131bSStephen Boyd .flags = CLK_IGNORE_UNUSED,
1411f79131bSStephen Boyd },
1421f79131bSStephen Boyd .lock = __SPIN_LOCK_UNLOCKED(hfpll0.lock),
1431f79131bSStephen Boyd };
1441f79131bSStephen Boyd
1451f79131bSStephen Boyd static struct hfpll_data hfpll1_data = {
1461f79131bSStephen Boyd .mode_reg = 0x3240,
1471f79131bSStephen Boyd .l_reg = 0x3248,
1481f79131bSStephen Boyd .m_reg = 0x324c,
1491f79131bSStephen Boyd .n_reg = 0x3250,
1501f79131bSStephen Boyd .config_reg = 0x3244,
1511f79131bSStephen Boyd .status_reg = 0x325c,
1521f79131bSStephen Boyd .config_val = 0x7845c665,
1531f79131bSStephen Boyd .droop_reg = 0x3314,
1541f79131bSStephen Boyd .droop_val = 0x0108c000,
1551f79131bSStephen Boyd .min_rate = 600000000UL,
1561f79131bSStephen Boyd .max_rate = 1800000000UL,
1571f79131bSStephen Boyd };
1581f79131bSStephen Boyd
1591f79131bSStephen Boyd static struct clk_hfpll hfpll1 = {
1601f79131bSStephen Boyd .d = &hfpll1_data,
1611f79131bSStephen Boyd .clkr.hw.init = &(struct clk_init_data){
162cb02866fSAnsuel Smith .parent_data = gcc_pxo,
1631f79131bSStephen Boyd .num_parents = 1,
1641f79131bSStephen Boyd .name = "hfpll1",
1651f79131bSStephen Boyd .ops = &clk_ops_hfpll,
1661f79131bSStephen Boyd .flags = CLK_IGNORE_UNUSED,
1671f79131bSStephen Boyd },
1681f79131bSStephen Boyd .lock = __SPIN_LOCK_UNLOCKED(hfpll1.lock),
1691f79131bSStephen Boyd };
1701f79131bSStephen Boyd
1711f79131bSStephen Boyd static struct hfpll_data hfpll_l2_data = {
1721f79131bSStephen Boyd .mode_reg = 0x3300,
1731f79131bSStephen Boyd .l_reg = 0x3308,
1741f79131bSStephen Boyd .m_reg = 0x330c,
1751f79131bSStephen Boyd .n_reg = 0x3310,
1761f79131bSStephen Boyd .config_reg = 0x3304,
1771f79131bSStephen Boyd .status_reg = 0x331c,
1781f79131bSStephen Boyd .config_val = 0x7845c665,
1791f79131bSStephen Boyd .droop_reg = 0x3314,
1801f79131bSStephen Boyd .droop_val = 0x0108c000,
1811f79131bSStephen Boyd .min_rate = 600000000UL,
1821f79131bSStephen Boyd .max_rate = 1800000000UL,
1831f79131bSStephen Boyd };
1841f79131bSStephen Boyd
1851f79131bSStephen Boyd static struct clk_hfpll hfpll_l2 = {
1861f79131bSStephen Boyd .d = &hfpll_l2_data,
1871f79131bSStephen Boyd .clkr.hw.init = &(struct clk_init_data){
188cb02866fSAnsuel Smith .parent_data = gcc_pxo,
1891f79131bSStephen Boyd .num_parents = 1,
1901f79131bSStephen Boyd .name = "hfpll_l2",
1911f79131bSStephen Boyd .ops = &clk_ops_hfpll,
1921f79131bSStephen Boyd .flags = CLK_IGNORE_UNUSED,
1931f79131bSStephen Boyd },
1941f79131bSStephen Boyd .lock = __SPIN_LOCK_UNLOCKED(hfpll_l2.lock),
1951f79131bSStephen Boyd };
1961f79131bSStephen Boyd
19724d8fba4SKumar Gala static struct clk_pll pll14 = {
19824d8fba4SKumar Gala .l_reg = 0x31c4,
19924d8fba4SKumar Gala .m_reg = 0x31c8,
20024d8fba4SKumar Gala .n_reg = 0x31cc,
20124d8fba4SKumar Gala .config_reg = 0x31d4,
20224d8fba4SKumar Gala .mode_reg = 0x31c0,
20324d8fba4SKumar Gala .status_reg = 0x31d8,
20424d8fba4SKumar Gala .status_bit = 16,
20524d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){
20624d8fba4SKumar Gala .name = "pll14",
207cb02866fSAnsuel Smith .parent_data = gcc_pxo,
20824d8fba4SKumar Gala .num_parents = 1,
20924d8fba4SKumar Gala .ops = &clk_pll_ops,
21024d8fba4SKumar Gala },
21124d8fba4SKumar Gala };
21224d8fba4SKumar Gala
21324d8fba4SKumar Gala static struct clk_regmap pll14_vote = {
21424d8fba4SKumar Gala .enable_reg = 0x34c0,
21524d8fba4SKumar Gala .enable_mask = BIT(14),
21624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
21724d8fba4SKumar Gala .name = "pll14_vote",
218cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
219cb02866fSAnsuel Smith &pll14.clkr.hw,
220cb02866fSAnsuel Smith },
22124d8fba4SKumar Gala .num_parents = 1,
22224d8fba4SKumar Gala .ops = &clk_pll_vote_ops,
22324d8fba4SKumar Gala },
22424d8fba4SKumar Gala };
22524d8fba4SKumar Gala
226f7b81d67SStephen Boyd #define NSS_PLL_RATE(f, _l, _m, _n, i) \
227f7b81d67SStephen Boyd { \
228f7b81d67SStephen Boyd .freq = f, \
229f7b81d67SStephen Boyd .l = _l, \
230f7b81d67SStephen Boyd .m = _m, \
231f7b81d67SStephen Boyd .n = _n, \
232f7b81d67SStephen Boyd .ibits = i, \
233f7b81d67SStephen Boyd }
234f7b81d67SStephen Boyd
235f7b81d67SStephen Boyd static struct pll_freq_tbl pll18_freq_tbl[] = {
236f7b81d67SStephen Boyd NSS_PLL_RATE(550000000, 44, 0, 1, 0x01495625),
237512ea2edSAnsuel Smith NSS_PLL_RATE(600000000, 48, 0, 1, 0x01495625),
238f7b81d67SStephen Boyd NSS_PLL_RATE(733000000, 58, 16, 25, 0x014b5625),
239512ea2edSAnsuel Smith NSS_PLL_RATE(800000000, 64, 0, 1, 0x01495625),
240f7b81d67SStephen Boyd };
241f7b81d67SStephen Boyd
242f7b81d67SStephen Boyd static struct clk_pll pll18 = {
243f7b81d67SStephen Boyd .l_reg = 0x31a4,
244f7b81d67SStephen Boyd .m_reg = 0x31a8,
245f7b81d67SStephen Boyd .n_reg = 0x31ac,
246f7b81d67SStephen Boyd .config_reg = 0x31b4,
247f7b81d67SStephen Boyd .mode_reg = 0x31a0,
248f7b81d67SStephen Boyd .status_reg = 0x31b8,
249f7b81d67SStephen Boyd .status_bit = 16,
250f7b81d67SStephen Boyd .post_div_shift = 16,
251f7b81d67SStephen Boyd .post_div_width = 1,
252f7b81d67SStephen Boyd .freq_tbl = pll18_freq_tbl,
253f7b81d67SStephen Boyd .clkr.hw.init = &(struct clk_init_data){
254f7b81d67SStephen Boyd .name = "pll18",
255cb02866fSAnsuel Smith .parent_data = gcc_pxo,
256f7b81d67SStephen Boyd .num_parents = 1,
257f7b81d67SStephen Boyd .ops = &clk_pll_ops,
258f7b81d67SStephen Boyd },
259f7b81d67SStephen Boyd };
260f7b81d67SStephen Boyd
261b293510fSAnsuel Smith static struct clk_pll pll11 = {
262b293510fSAnsuel Smith .l_reg = 0x3184,
263b293510fSAnsuel Smith .m_reg = 0x3188,
264b293510fSAnsuel Smith .n_reg = 0x318c,
265b293510fSAnsuel Smith .config_reg = 0x3194,
266b293510fSAnsuel Smith .mode_reg = 0x3180,
267b293510fSAnsuel Smith .status_reg = 0x3198,
268b293510fSAnsuel Smith .status_bit = 16,
269b293510fSAnsuel Smith .clkr.hw.init = &(struct clk_init_data){
270b293510fSAnsuel Smith .name = "pll11",
271b293510fSAnsuel Smith .parent_data = &(const struct clk_parent_data){
272b293510fSAnsuel Smith .fw_name = "pxo",
273b293510fSAnsuel Smith },
274b293510fSAnsuel Smith .num_parents = 1,
275b293510fSAnsuel Smith .ops = &clk_pll_ops,
276b293510fSAnsuel Smith },
277b293510fSAnsuel Smith };
278b293510fSAnsuel Smith
279293d2e97SGeorgi Djakov enum {
280293d2e97SGeorgi Djakov P_PXO,
281293d2e97SGeorgi Djakov P_PLL8,
282293d2e97SGeorgi Djakov P_PLL3,
283293d2e97SGeorgi Djakov P_PLL0,
284293d2e97SGeorgi Djakov P_CXO,
285f7b81d67SStephen Boyd P_PLL14,
286f7b81d67SStephen Boyd P_PLL18,
287b293510fSAnsuel Smith P_PLL11,
288293d2e97SGeorgi Djakov };
28924d8fba4SKumar Gala
290293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll8_map[] = {
291293d2e97SGeorgi Djakov { P_PXO, 0 },
292293d2e97SGeorgi Djakov { P_PLL8, 3 }
29324d8fba4SKumar Gala };
29424d8fba4SKumar Gala
295cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8[] = {
296cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" },
297cb02866fSAnsuel Smith { .hw = &pll8_vote.hw },
29824d8fba4SKumar Gala };
29924d8fba4SKumar Gala
300293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll8_cxo_map[] = {
301293d2e97SGeorgi Djakov { P_PXO, 0 },
302293d2e97SGeorgi Djakov { P_PLL8, 3 },
303293d2e97SGeorgi Djakov { P_CXO, 5 }
30424d8fba4SKumar Gala };
30524d8fba4SKumar Gala
306cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8_cxo[] = {
307cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" },
308cb02866fSAnsuel Smith { .hw = &pll8_vote.hw },
309cb02866fSAnsuel Smith { .fw_name = "cxo", .name = "cxo" },
31024d8fba4SKumar Gala };
31124d8fba4SKumar Gala
312293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll3_map[] = {
313293d2e97SGeorgi Djakov { P_PXO, 0 },
314293d2e97SGeorgi Djakov { P_PLL3, 1 }
31524d8fba4SKumar Gala };
31624d8fba4SKumar Gala
317293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll3_sata_map[] = {
318293d2e97SGeorgi Djakov { P_PXO, 0 },
319293d2e97SGeorgi Djakov { P_PLL3, 6 }
32024d8fba4SKumar Gala };
32124d8fba4SKumar Gala
322cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll3[] = {
323cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" },
324cb02866fSAnsuel Smith { .hw = &pll3.clkr.hw },
32524d8fba4SKumar Gala };
32624d8fba4SKumar Gala
327e95e8253SAnsuel Smith static const struct parent_map gcc_pxo_pll8_pll0_map[] = {
328293d2e97SGeorgi Djakov { P_PXO, 0 },
329293d2e97SGeorgi Djakov { P_PLL8, 3 },
330293d2e97SGeorgi Djakov { P_PLL0, 2 }
33124d8fba4SKumar Gala };
33224d8fba4SKumar Gala
333cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8_pll0[] = {
334cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" },
335cb02866fSAnsuel Smith { .hw = &pll8_vote.hw },
336cb02866fSAnsuel Smith { .hw = &pll0_vote.hw },
33724d8fba4SKumar Gala };
33824d8fba4SKumar Gala
339f7b81d67SStephen Boyd static const struct parent_map gcc_pxo_pll8_pll14_pll18_pll0_map[] = {
340f7b81d67SStephen Boyd { P_PXO, 0 },
341f7b81d67SStephen Boyd { P_PLL8, 4 },
342f7b81d67SStephen Boyd { P_PLL0, 2 },
343f7b81d67SStephen Boyd { P_PLL14, 5 },
344f7b81d67SStephen Boyd { P_PLL18, 1 }
345f7b81d67SStephen Boyd };
346f7b81d67SStephen Boyd
347cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8_pll14_pll18_pll0[] = {
348cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" },
349cb02866fSAnsuel Smith { .hw = &pll8_vote.hw },
350cb02866fSAnsuel Smith { .hw = &pll0_vote.hw },
351cb02866fSAnsuel Smith { .hw = &pll14.clkr.hw },
352cb02866fSAnsuel Smith { .hw = &pll18.clkr.hw },
353f7b81d67SStephen Boyd };
354f7b81d67SStephen Boyd
355b293510fSAnsuel Smith static const struct parent_map gcc_pxo_pll8_pll0_pll14_pll18_pll11_map[] = {
356b293510fSAnsuel Smith { P_PXO, 0 },
357b293510fSAnsuel Smith { P_PLL8, 4 },
358b293510fSAnsuel Smith { P_PLL0, 2 },
359b293510fSAnsuel Smith { P_PLL14, 5 },
360b293510fSAnsuel Smith { P_PLL18, 1 },
361b293510fSAnsuel Smith { P_PLL11, 3 },
362b293510fSAnsuel Smith };
363b293510fSAnsuel Smith
364b293510fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8_pll0_pll14_pll18_pll11[] = {
365b293510fSAnsuel Smith { .fw_name = "pxo" },
366b293510fSAnsuel Smith { .hw = &pll8_vote.hw },
367b293510fSAnsuel Smith { .hw = &pll0_vote.hw },
368b293510fSAnsuel Smith { .hw = &pll14.clkr.hw },
369b293510fSAnsuel Smith { .hw = &pll18.clkr.hw },
370b293510fSAnsuel Smith { .hw = &pll11.clkr.hw },
371b293510fSAnsuel Smith
372b293510fSAnsuel Smith };
373b293510fSAnsuel Smith
374b293510fSAnsuel Smith static const struct parent_map gcc_pxo_pll3_pll0_pll14_pll18_pll11_map[] = {
375b293510fSAnsuel Smith { P_PXO, 0 },
376b293510fSAnsuel Smith { P_PLL3, 6 },
377b293510fSAnsuel Smith { P_PLL0, 2 },
378b293510fSAnsuel Smith { P_PLL14, 5 },
379b293510fSAnsuel Smith { P_PLL18, 1 },
380b293510fSAnsuel Smith { P_PLL11, 3 },
381b293510fSAnsuel Smith };
382b293510fSAnsuel Smith
383b293510fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll3_pll0_pll14_pll18_pll11[] = {
384b293510fSAnsuel Smith { .fw_name = "pxo" },
385b293510fSAnsuel Smith { .hw = &pll3.clkr.hw },
386b293510fSAnsuel Smith { .hw = &pll0_vote.hw },
387b293510fSAnsuel Smith { .hw = &pll14.clkr.hw },
388b293510fSAnsuel Smith { .hw = &pll18.clkr.hw },
389b293510fSAnsuel Smith { .hw = &pll11.clkr.hw },
390b293510fSAnsuel Smith
391b293510fSAnsuel Smith };
392b293510fSAnsuel Smith
39324d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_uart[] = {
39424d8fba4SKumar Gala { 1843200, P_PLL8, 2, 6, 625 },
39524d8fba4SKumar Gala { 3686400, P_PLL8, 2, 12, 625 },
39624d8fba4SKumar Gala { 7372800, P_PLL8, 2, 24, 625 },
39724d8fba4SKumar Gala { 14745600, P_PLL8, 2, 48, 625 },
39824d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 },
39924d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 },
40024d8fba4SKumar Gala { 32000000, P_PLL8, 4, 1, 3 },
40124d8fba4SKumar Gala { 40000000, P_PLL8, 1, 5, 48 },
40224d8fba4SKumar Gala { 46400000, P_PLL8, 1, 29, 240 },
40324d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 },
40424d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 },
40524d8fba4SKumar Gala { 56000000, P_PLL8, 1, 7, 48 },
40624d8fba4SKumar Gala { 58982400, P_PLL8, 1, 96, 625 },
40724d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 },
40824d8fba4SKumar Gala { }
40924d8fba4SKumar Gala };
41024d8fba4SKumar Gala
41124d8fba4SKumar Gala static struct clk_rcg gsbi1_uart_src = {
41224d8fba4SKumar Gala .ns_reg = 0x29d4,
41324d8fba4SKumar Gala .md_reg = 0x29d0,
41424d8fba4SKumar Gala .mn = {
41524d8fba4SKumar Gala .mnctr_en_bit = 8,
41624d8fba4SKumar Gala .mnctr_reset_bit = 7,
41724d8fba4SKumar Gala .mnctr_mode_shift = 5,
41824d8fba4SKumar Gala .n_val_shift = 16,
41924d8fba4SKumar Gala .m_val_shift = 16,
42024d8fba4SKumar Gala .width = 16,
42124d8fba4SKumar Gala },
42224d8fba4SKumar Gala .p = {
42324d8fba4SKumar Gala .pre_div_shift = 3,
42424d8fba4SKumar Gala .pre_div_width = 2,
42524d8fba4SKumar Gala },
42624d8fba4SKumar Gala .s = {
42724d8fba4SKumar Gala .src_sel_shift = 0,
42824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
42924d8fba4SKumar Gala },
43024d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart,
43124d8fba4SKumar Gala .clkr = {
43224d8fba4SKumar Gala .enable_reg = 0x29d4,
43324d8fba4SKumar Gala .enable_mask = BIT(11),
43424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
43524d8fba4SKumar Gala .name = "gsbi1_uart_src",
436cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
437a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
43824d8fba4SKumar Gala .ops = &clk_rcg_ops,
43924d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
44024d8fba4SKumar Gala },
44124d8fba4SKumar Gala },
44224d8fba4SKumar Gala };
44324d8fba4SKumar Gala
44424d8fba4SKumar Gala static struct clk_branch gsbi1_uart_clk = {
44524d8fba4SKumar Gala .halt_reg = 0x2fcc,
44624d8fba4SKumar Gala .halt_bit = 12,
44724d8fba4SKumar Gala .clkr = {
44824d8fba4SKumar Gala .enable_reg = 0x29d4,
44924d8fba4SKumar Gala .enable_mask = BIT(9),
45024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
45124d8fba4SKumar Gala .name = "gsbi1_uart_clk",
452cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
453cb02866fSAnsuel Smith &gsbi1_uart_src.clkr.hw,
45424d8fba4SKumar Gala },
45524d8fba4SKumar Gala .num_parents = 1,
45624d8fba4SKumar Gala .ops = &clk_branch_ops,
45724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
45824d8fba4SKumar Gala },
45924d8fba4SKumar Gala },
46024d8fba4SKumar Gala };
46124d8fba4SKumar Gala
46224d8fba4SKumar Gala static struct clk_rcg gsbi2_uart_src = {
46324d8fba4SKumar Gala .ns_reg = 0x29f4,
46424d8fba4SKumar Gala .md_reg = 0x29f0,
46524d8fba4SKumar Gala .mn = {
46624d8fba4SKumar Gala .mnctr_en_bit = 8,
46724d8fba4SKumar Gala .mnctr_reset_bit = 7,
46824d8fba4SKumar Gala .mnctr_mode_shift = 5,
46924d8fba4SKumar Gala .n_val_shift = 16,
47024d8fba4SKumar Gala .m_val_shift = 16,
47124d8fba4SKumar Gala .width = 16,
47224d8fba4SKumar Gala },
47324d8fba4SKumar Gala .p = {
47424d8fba4SKumar Gala .pre_div_shift = 3,
47524d8fba4SKumar Gala .pre_div_width = 2,
47624d8fba4SKumar Gala },
47724d8fba4SKumar Gala .s = {
47824d8fba4SKumar Gala .src_sel_shift = 0,
47924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
48024d8fba4SKumar Gala },
48124d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart,
48224d8fba4SKumar Gala .clkr = {
48324d8fba4SKumar Gala .enable_reg = 0x29f4,
48424d8fba4SKumar Gala .enable_mask = BIT(11),
48524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
48624d8fba4SKumar Gala .name = "gsbi2_uart_src",
487cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
488a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
48924d8fba4SKumar Gala .ops = &clk_rcg_ops,
49024d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
49124d8fba4SKumar Gala },
49224d8fba4SKumar Gala },
49324d8fba4SKumar Gala };
49424d8fba4SKumar Gala
49524d8fba4SKumar Gala static struct clk_branch gsbi2_uart_clk = {
49624d8fba4SKumar Gala .halt_reg = 0x2fcc,
49724d8fba4SKumar Gala .halt_bit = 8,
49824d8fba4SKumar Gala .clkr = {
49924d8fba4SKumar Gala .enable_reg = 0x29f4,
50024d8fba4SKumar Gala .enable_mask = BIT(9),
50124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
50224d8fba4SKumar Gala .name = "gsbi2_uart_clk",
503cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
504cb02866fSAnsuel Smith &gsbi2_uart_src.clkr.hw,
50524d8fba4SKumar Gala },
50624d8fba4SKumar Gala .num_parents = 1,
50724d8fba4SKumar Gala .ops = &clk_branch_ops,
50824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
50924d8fba4SKumar Gala },
51024d8fba4SKumar Gala },
51124d8fba4SKumar Gala };
51224d8fba4SKumar Gala
51324d8fba4SKumar Gala static struct clk_rcg gsbi4_uart_src = {
51424d8fba4SKumar Gala .ns_reg = 0x2a34,
51524d8fba4SKumar Gala .md_reg = 0x2a30,
51624d8fba4SKumar Gala .mn = {
51724d8fba4SKumar Gala .mnctr_en_bit = 8,
51824d8fba4SKumar Gala .mnctr_reset_bit = 7,
51924d8fba4SKumar Gala .mnctr_mode_shift = 5,
52024d8fba4SKumar Gala .n_val_shift = 16,
52124d8fba4SKumar Gala .m_val_shift = 16,
52224d8fba4SKumar Gala .width = 16,
52324d8fba4SKumar Gala },
52424d8fba4SKumar Gala .p = {
52524d8fba4SKumar Gala .pre_div_shift = 3,
52624d8fba4SKumar Gala .pre_div_width = 2,
52724d8fba4SKumar Gala },
52824d8fba4SKumar Gala .s = {
52924d8fba4SKumar Gala .src_sel_shift = 0,
53024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
53124d8fba4SKumar Gala },
53224d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart,
53324d8fba4SKumar Gala .clkr = {
53424d8fba4SKumar Gala .enable_reg = 0x2a34,
53524d8fba4SKumar Gala .enable_mask = BIT(11),
53624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
53724d8fba4SKumar Gala .name = "gsbi4_uart_src",
538cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
539a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
54024d8fba4SKumar Gala .ops = &clk_rcg_ops,
54124d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
54224d8fba4SKumar Gala },
54324d8fba4SKumar Gala },
54424d8fba4SKumar Gala };
54524d8fba4SKumar Gala
54624d8fba4SKumar Gala static struct clk_branch gsbi4_uart_clk = {
54724d8fba4SKumar Gala .halt_reg = 0x2fd0,
54824d8fba4SKumar Gala .halt_bit = 26,
54924d8fba4SKumar Gala .clkr = {
55024d8fba4SKumar Gala .enable_reg = 0x2a34,
55124d8fba4SKumar Gala .enable_mask = BIT(9),
55224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
55324d8fba4SKumar Gala .name = "gsbi4_uart_clk",
554cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
555cb02866fSAnsuel Smith &gsbi4_uart_src.clkr.hw,
55624d8fba4SKumar Gala },
55724d8fba4SKumar Gala .num_parents = 1,
55824d8fba4SKumar Gala .ops = &clk_branch_ops,
55924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
56024d8fba4SKumar Gala },
56124d8fba4SKumar Gala },
56224d8fba4SKumar Gala };
56324d8fba4SKumar Gala
56424d8fba4SKumar Gala static struct clk_rcg gsbi5_uart_src = {
56524d8fba4SKumar Gala .ns_reg = 0x2a54,
56624d8fba4SKumar Gala .md_reg = 0x2a50,
56724d8fba4SKumar Gala .mn = {
56824d8fba4SKumar Gala .mnctr_en_bit = 8,
56924d8fba4SKumar Gala .mnctr_reset_bit = 7,
57024d8fba4SKumar Gala .mnctr_mode_shift = 5,
57124d8fba4SKumar Gala .n_val_shift = 16,
57224d8fba4SKumar Gala .m_val_shift = 16,
57324d8fba4SKumar Gala .width = 16,
57424d8fba4SKumar Gala },
57524d8fba4SKumar Gala .p = {
57624d8fba4SKumar Gala .pre_div_shift = 3,
57724d8fba4SKumar Gala .pre_div_width = 2,
57824d8fba4SKumar Gala },
57924d8fba4SKumar Gala .s = {
58024d8fba4SKumar Gala .src_sel_shift = 0,
58124d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
58224d8fba4SKumar Gala },
58324d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart,
58424d8fba4SKumar Gala .clkr = {
58524d8fba4SKumar Gala .enable_reg = 0x2a54,
58624d8fba4SKumar Gala .enable_mask = BIT(11),
58724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
58824d8fba4SKumar Gala .name = "gsbi5_uart_src",
589cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
590a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
59124d8fba4SKumar Gala .ops = &clk_rcg_ops,
59224d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
59324d8fba4SKumar Gala },
59424d8fba4SKumar Gala },
59524d8fba4SKumar Gala };
59624d8fba4SKumar Gala
59724d8fba4SKumar Gala static struct clk_branch gsbi5_uart_clk = {
59824d8fba4SKumar Gala .halt_reg = 0x2fd0,
59924d8fba4SKumar Gala .halt_bit = 22,
60024d8fba4SKumar Gala .clkr = {
60124d8fba4SKumar Gala .enable_reg = 0x2a54,
60224d8fba4SKumar Gala .enable_mask = BIT(9),
60324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
60424d8fba4SKumar Gala .name = "gsbi5_uart_clk",
605cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
606cb02866fSAnsuel Smith &gsbi5_uart_src.clkr.hw,
60724d8fba4SKumar Gala },
60824d8fba4SKumar Gala .num_parents = 1,
60924d8fba4SKumar Gala .ops = &clk_branch_ops,
61024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
61124d8fba4SKumar Gala },
61224d8fba4SKumar Gala },
61324d8fba4SKumar Gala };
61424d8fba4SKumar Gala
61524d8fba4SKumar Gala static struct clk_rcg gsbi6_uart_src = {
61624d8fba4SKumar Gala .ns_reg = 0x2a74,
61724d8fba4SKumar Gala .md_reg = 0x2a70,
61824d8fba4SKumar Gala .mn = {
61924d8fba4SKumar Gala .mnctr_en_bit = 8,
62024d8fba4SKumar Gala .mnctr_reset_bit = 7,
62124d8fba4SKumar Gala .mnctr_mode_shift = 5,
62224d8fba4SKumar Gala .n_val_shift = 16,
62324d8fba4SKumar Gala .m_val_shift = 16,
62424d8fba4SKumar Gala .width = 16,
62524d8fba4SKumar Gala },
62624d8fba4SKumar Gala .p = {
62724d8fba4SKumar Gala .pre_div_shift = 3,
62824d8fba4SKumar Gala .pre_div_width = 2,
62924d8fba4SKumar Gala },
63024d8fba4SKumar Gala .s = {
63124d8fba4SKumar Gala .src_sel_shift = 0,
63224d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
63324d8fba4SKumar Gala },
63424d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart,
63524d8fba4SKumar Gala .clkr = {
63624d8fba4SKumar Gala .enable_reg = 0x2a74,
63724d8fba4SKumar Gala .enable_mask = BIT(11),
63824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
63924d8fba4SKumar Gala .name = "gsbi6_uart_src",
640cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
641a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
64224d8fba4SKumar Gala .ops = &clk_rcg_ops,
64324d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
64424d8fba4SKumar Gala },
64524d8fba4SKumar Gala },
64624d8fba4SKumar Gala };
64724d8fba4SKumar Gala
64824d8fba4SKumar Gala static struct clk_branch gsbi6_uart_clk = {
64924d8fba4SKumar Gala .halt_reg = 0x2fd0,
65024d8fba4SKumar Gala .halt_bit = 18,
65124d8fba4SKumar Gala .clkr = {
65224d8fba4SKumar Gala .enable_reg = 0x2a74,
65324d8fba4SKumar Gala .enable_mask = BIT(9),
65424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
65524d8fba4SKumar Gala .name = "gsbi6_uart_clk",
656cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
657cb02866fSAnsuel Smith &gsbi6_uart_src.clkr.hw,
65824d8fba4SKumar Gala },
65924d8fba4SKumar Gala .num_parents = 1,
66024d8fba4SKumar Gala .ops = &clk_branch_ops,
66124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
66224d8fba4SKumar Gala },
66324d8fba4SKumar Gala },
66424d8fba4SKumar Gala };
66524d8fba4SKumar Gala
66624d8fba4SKumar Gala static struct clk_rcg gsbi7_uart_src = {
66724d8fba4SKumar Gala .ns_reg = 0x2a94,
66824d8fba4SKumar Gala .md_reg = 0x2a90,
66924d8fba4SKumar Gala .mn = {
67024d8fba4SKumar Gala .mnctr_en_bit = 8,
67124d8fba4SKumar Gala .mnctr_reset_bit = 7,
67224d8fba4SKumar Gala .mnctr_mode_shift = 5,
67324d8fba4SKumar Gala .n_val_shift = 16,
67424d8fba4SKumar Gala .m_val_shift = 16,
67524d8fba4SKumar Gala .width = 16,
67624d8fba4SKumar Gala },
67724d8fba4SKumar Gala .p = {
67824d8fba4SKumar Gala .pre_div_shift = 3,
67924d8fba4SKumar Gala .pre_div_width = 2,
68024d8fba4SKumar Gala },
68124d8fba4SKumar Gala .s = {
68224d8fba4SKumar Gala .src_sel_shift = 0,
68324d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
68424d8fba4SKumar Gala },
68524d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart,
68624d8fba4SKumar Gala .clkr = {
68724d8fba4SKumar Gala .enable_reg = 0x2a94,
68824d8fba4SKumar Gala .enable_mask = BIT(11),
68924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
69024d8fba4SKumar Gala .name = "gsbi7_uart_src",
691cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
692a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
69324d8fba4SKumar Gala .ops = &clk_rcg_ops,
69424d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
69524d8fba4SKumar Gala },
69624d8fba4SKumar Gala },
69724d8fba4SKumar Gala };
69824d8fba4SKumar Gala
69924d8fba4SKumar Gala static struct clk_branch gsbi7_uart_clk = {
70024d8fba4SKumar Gala .halt_reg = 0x2fd0,
70124d8fba4SKumar Gala .halt_bit = 14,
70224d8fba4SKumar Gala .clkr = {
70324d8fba4SKumar Gala .enable_reg = 0x2a94,
70424d8fba4SKumar Gala .enable_mask = BIT(9),
70524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
70624d8fba4SKumar Gala .name = "gsbi7_uart_clk",
707cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
708cb02866fSAnsuel Smith &gsbi7_uart_src.clkr.hw,
70924d8fba4SKumar Gala },
71024d8fba4SKumar Gala .num_parents = 1,
71124d8fba4SKumar Gala .ops = &clk_branch_ops,
71224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
71324d8fba4SKumar Gala },
71424d8fba4SKumar Gala },
71524d8fba4SKumar Gala };
71624d8fba4SKumar Gala
71724d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_qup[] = {
71824d8fba4SKumar Gala { 1100000, P_PXO, 1, 2, 49 },
71924d8fba4SKumar Gala { 5400000, P_PXO, 1, 1, 5 },
72024d8fba4SKumar Gala { 10800000, P_PXO, 1, 2, 5 },
72124d8fba4SKumar Gala { 15060000, P_PLL8, 1, 2, 51 },
72224d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 },
7230bf0ff82SStephen Boyd { 25000000, P_PXO, 1, 0, 0 },
72424d8fba4SKumar Gala { 25600000, P_PLL8, 1, 1, 15 },
72524d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 },
72624d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 },
72724d8fba4SKumar Gala { }
72824d8fba4SKumar Gala };
72924d8fba4SKumar Gala
73024d8fba4SKumar Gala static struct clk_rcg gsbi1_qup_src = {
73124d8fba4SKumar Gala .ns_reg = 0x29cc,
73224d8fba4SKumar Gala .md_reg = 0x29c8,
73324d8fba4SKumar Gala .mn = {
73424d8fba4SKumar Gala .mnctr_en_bit = 8,
73524d8fba4SKumar Gala .mnctr_reset_bit = 7,
73624d8fba4SKumar Gala .mnctr_mode_shift = 5,
73724d8fba4SKumar Gala .n_val_shift = 16,
73824d8fba4SKumar Gala .m_val_shift = 16,
73924d8fba4SKumar Gala .width = 8,
74024d8fba4SKumar Gala },
74124d8fba4SKumar Gala .p = {
74224d8fba4SKumar Gala .pre_div_shift = 3,
74324d8fba4SKumar Gala .pre_div_width = 2,
74424d8fba4SKumar Gala },
74524d8fba4SKumar Gala .s = {
74624d8fba4SKumar Gala .src_sel_shift = 0,
74724d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
74824d8fba4SKumar Gala },
74924d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup,
75024d8fba4SKumar Gala .clkr = {
75124d8fba4SKumar Gala .enable_reg = 0x29cc,
75224d8fba4SKumar Gala .enable_mask = BIT(11),
75324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
75424d8fba4SKumar Gala .name = "gsbi1_qup_src",
755cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
756a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
75724d8fba4SKumar Gala .ops = &clk_rcg_ops,
75824d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
75924d8fba4SKumar Gala },
76024d8fba4SKumar Gala },
76124d8fba4SKumar Gala };
76224d8fba4SKumar Gala
76324d8fba4SKumar Gala static struct clk_branch gsbi1_qup_clk = {
76424d8fba4SKumar Gala .halt_reg = 0x2fcc,
76524d8fba4SKumar Gala .halt_bit = 11,
76624d8fba4SKumar Gala .clkr = {
76724d8fba4SKumar Gala .enable_reg = 0x29cc,
76824d8fba4SKumar Gala .enable_mask = BIT(9),
76924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
77024d8fba4SKumar Gala .name = "gsbi1_qup_clk",
771cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
772cb02866fSAnsuel Smith &gsbi1_qup_src.clkr.hw,
773cb02866fSAnsuel Smith },
77424d8fba4SKumar Gala .num_parents = 1,
77524d8fba4SKumar Gala .ops = &clk_branch_ops,
77624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
77724d8fba4SKumar Gala },
77824d8fba4SKumar Gala },
77924d8fba4SKumar Gala };
78024d8fba4SKumar Gala
78124d8fba4SKumar Gala static struct clk_rcg gsbi2_qup_src = {
78224d8fba4SKumar Gala .ns_reg = 0x29ec,
78324d8fba4SKumar Gala .md_reg = 0x29e8,
78424d8fba4SKumar Gala .mn = {
78524d8fba4SKumar Gala .mnctr_en_bit = 8,
78624d8fba4SKumar Gala .mnctr_reset_bit = 7,
78724d8fba4SKumar Gala .mnctr_mode_shift = 5,
78824d8fba4SKumar Gala .n_val_shift = 16,
78924d8fba4SKumar Gala .m_val_shift = 16,
79024d8fba4SKumar Gala .width = 8,
79124d8fba4SKumar Gala },
79224d8fba4SKumar Gala .p = {
79324d8fba4SKumar Gala .pre_div_shift = 3,
79424d8fba4SKumar Gala .pre_div_width = 2,
79524d8fba4SKumar Gala },
79624d8fba4SKumar Gala .s = {
79724d8fba4SKumar Gala .src_sel_shift = 0,
79824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
79924d8fba4SKumar Gala },
80024d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup,
80124d8fba4SKumar Gala .clkr = {
80224d8fba4SKumar Gala .enable_reg = 0x29ec,
80324d8fba4SKumar Gala .enable_mask = BIT(11),
80424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
80524d8fba4SKumar Gala .name = "gsbi2_qup_src",
806cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
807a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
80824d8fba4SKumar Gala .ops = &clk_rcg_ops,
80924d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
81024d8fba4SKumar Gala },
81124d8fba4SKumar Gala },
81224d8fba4SKumar Gala };
81324d8fba4SKumar Gala
81424d8fba4SKumar Gala static struct clk_branch gsbi2_qup_clk = {
81524d8fba4SKumar Gala .halt_reg = 0x2fcc,
81624d8fba4SKumar Gala .halt_bit = 6,
81724d8fba4SKumar Gala .clkr = {
81824d8fba4SKumar Gala .enable_reg = 0x29ec,
81924d8fba4SKumar Gala .enable_mask = BIT(9),
82024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
82124d8fba4SKumar Gala .name = "gsbi2_qup_clk",
822cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
823cb02866fSAnsuel Smith &gsbi2_qup_src.clkr.hw,
824cb02866fSAnsuel Smith },
82524d8fba4SKumar Gala .num_parents = 1,
82624d8fba4SKumar Gala .ops = &clk_branch_ops,
82724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
82824d8fba4SKumar Gala },
82924d8fba4SKumar Gala },
83024d8fba4SKumar Gala };
83124d8fba4SKumar Gala
83224d8fba4SKumar Gala static struct clk_rcg gsbi4_qup_src = {
83324d8fba4SKumar Gala .ns_reg = 0x2a2c,
83424d8fba4SKumar Gala .md_reg = 0x2a28,
83524d8fba4SKumar Gala .mn = {
83624d8fba4SKumar Gala .mnctr_en_bit = 8,
83724d8fba4SKumar Gala .mnctr_reset_bit = 7,
83824d8fba4SKumar Gala .mnctr_mode_shift = 5,
83924d8fba4SKumar Gala .n_val_shift = 16,
84024d8fba4SKumar Gala .m_val_shift = 16,
84124d8fba4SKumar Gala .width = 8,
84224d8fba4SKumar Gala },
84324d8fba4SKumar Gala .p = {
84424d8fba4SKumar Gala .pre_div_shift = 3,
84524d8fba4SKumar Gala .pre_div_width = 2,
84624d8fba4SKumar Gala },
84724d8fba4SKumar Gala .s = {
84824d8fba4SKumar Gala .src_sel_shift = 0,
84924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
85024d8fba4SKumar Gala },
85124d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup,
85224d8fba4SKumar Gala .clkr = {
85324d8fba4SKumar Gala .enable_reg = 0x2a2c,
85424d8fba4SKumar Gala .enable_mask = BIT(11),
85524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
85624d8fba4SKumar Gala .name = "gsbi4_qup_src",
857cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
858a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
85924d8fba4SKumar Gala .ops = &clk_rcg_ops,
86028aa450dSAnsuel Smith .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
86124d8fba4SKumar Gala },
86224d8fba4SKumar Gala },
86324d8fba4SKumar Gala };
86424d8fba4SKumar Gala
86524d8fba4SKumar Gala static struct clk_branch gsbi4_qup_clk = {
86624d8fba4SKumar Gala .halt_reg = 0x2fd0,
86724d8fba4SKumar Gala .halt_bit = 24,
86824d8fba4SKumar Gala .clkr = {
86924d8fba4SKumar Gala .enable_reg = 0x2a2c,
87024d8fba4SKumar Gala .enable_mask = BIT(9),
87124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
87224d8fba4SKumar Gala .name = "gsbi4_qup_clk",
873cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
874cb02866fSAnsuel Smith &gsbi4_qup_src.clkr.hw,
875cb02866fSAnsuel Smith },
87624d8fba4SKumar Gala .num_parents = 1,
87724d8fba4SKumar Gala .ops = &clk_branch_ops,
87828aa450dSAnsuel Smith .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
87924d8fba4SKumar Gala },
88024d8fba4SKumar Gala },
88124d8fba4SKumar Gala };
88224d8fba4SKumar Gala
88324d8fba4SKumar Gala static struct clk_rcg gsbi5_qup_src = {
88424d8fba4SKumar Gala .ns_reg = 0x2a4c,
88524d8fba4SKumar Gala .md_reg = 0x2a48,
88624d8fba4SKumar Gala .mn = {
88724d8fba4SKumar Gala .mnctr_en_bit = 8,
88824d8fba4SKumar Gala .mnctr_reset_bit = 7,
88924d8fba4SKumar Gala .mnctr_mode_shift = 5,
89024d8fba4SKumar Gala .n_val_shift = 16,
89124d8fba4SKumar Gala .m_val_shift = 16,
89224d8fba4SKumar Gala .width = 8,
89324d8fba4SKumar Gala },
89424d8fba4SKumar Gala .p = {
89524d8fba4SKumar Gala .pre_div_shift = 3,
89624d8fba4SKumar Gala .pre_div_width = 2,
89724d8fba4SKumar Gala },
89824d8fba4SKumar Gala .s = {
89924d8fba4SKumar Gala .src_sel_shift = 0,
90024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
90124d8fba4SKumar Gala },
90224d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup,
90324d8fba4SKumar Gala .clkr = {
90424d8fba4SKumar Gala .enable_reg = 0x2a4c,
90524d8fba4SKumar Gala .enable_mask = BIT(11),
90624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
90724d8fba4SKumar Gala .name = "gsbi5_qup_src",
908cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
909a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
91024d8fba4SKumar Gala .ops = &clk_rcg_ops,
91124d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
91224d8fba4SKumar Gala },
91324d8fba4SKumar Gala },
91424d8fba4SKumar Gala };
91524d8fba4SKumar Gala
91624d8fba4SKumar Gala static struct clk_branch gsbi5_qup_clk = {
91724d8fba4SKumar Gala .halt_reg = 0x2fd0,
91824d8fba4SKumar Gala .halt_bit = 20,
91924d8fba4SKumar Gala .clkr = {
92024d8fba4SKumar Gala .enable_reg = 0x2a4c,
92124d8fba4SKumar Gala .enable_mask = BIT(9),
92224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
92324d8fba4SKumar Gala .name = "gsbi5_qup_clk",
924cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
925cb02866fSAnsuel Smith &gsbi5_qup_src.clkr.hw,
926cb02866fSAnsuel Smith },
92724d8fba4SKumar Gala .num_parents = 1,
92824d8fba4SKumar Gala .ops = &clk_branch_ops,
92924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
93024d8fba4SKumar Gala },
93124d8fba4SKumar Gala },
93224d8fba4SKumar Gala };
93324d8fba4SKumar Gala
93424d8fba4SKumar Gala static struct clk_rcg gsbi6_qup_src = {
93524d8fba4SKumar Gala .ns_reg = 0x2a6c,
93624d8fba4SKumar Gala .md_reg = 0x2a68,
93724d8fba4SKumar Gala .mn = {
93824d8fba4SKumar Gala .mnctr_en_bit = 8,
93924d8fba4SKumar Gala .mnctr_reset_bit = 7,
94024d8fba4SKumar Gala .mnctr_mode_shift = 5,
94124d8fba4SKumar Gala .n_val_shift = 16,
94224d8fba4SKumar Gala .m_val_shift = 16,
94324d8fba4SKumar Gala .width = 8,
94424d8fba4SKumar Gala },
94524d8fba4SKumar Gala .p = {
94624d8fba4SKumar Gala .pre_div_shift = 3,
94724d8fba4SKumar Gala .pre_div_width = 2,
94824d8fba4SKumar Gala },
94924d8fba4SKumar Gala .s = {
95024d8fba4SKumar Gala .src_sel_shift = 0,
95124d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
95224d8fba4SKumar Gala },
95324d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup,
95424d8fba4SKumar Gala .clkr = {
95524d8fba4SKumar Gala .enable_reg = 0x2a6c,
95624d8fba4SKumar Gala .enable_mask = BIT(11),
95724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
95824d8fba4SKumar Gala .name = "gsbi6_qup_src",
959cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
960a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
96124d8fba4SKumar Gala .ops = &clk_rcg_ops,
96228aa450dSAnsuel Smith .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
96324d8fba4SKumar Gala },
96424d8fba4SKumar Gala },
96524d8fba4SKumar Gala };
96624d8fba4SKumar Gala
96724d8fba4SKumar Gala static struct clk_branch gsbi6_qup_clk = {
96824d8fba4SKumar Gala .halt_reg = 0x2fd0,
96924d8fba4SKumar Gala .halt_bit = 16,
97024d8fba4SKumar Gala .clkr = {
97124d8fba4SKumar Gala .enable_reg = 0x2a6c,
97224d8fba4SKumar Gala .enable_mask = BIT(9),
97324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
97424d8fba4SKumar Gala .name = "gsbi6_qup_clk",
975cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
976cb02866fSAnsuel Smith &gsbi6_qup_src.clkr.hw,
977cb02866fSAnsuel Smith },
97824d8fba4SKumar Gala .num_parents = 1,
97924d8fba4SKumar Gala .ops = &clk_branch_ops,
98024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
98124d8fba4SKumar Gala },
98224d8fba4SKumar Gala },
98324d8fba4SKumar Gala };
98424d8fba4SKumar Gala
98524d8fba4SKumar Gala static struct clk_rcg gsbi7_qup_src = {
98624d8fba4SKumar Gala .ns_reg = 0x2a8c,
98724d8fba4SKumar Gala .md_reg = 0x2a88,
98824d8fba4SKumar Gala .mn = {
98924d8fba4SKumar Gala .mnctr_en_bit = 8,
99024d8fba4SKumar Gala .mnctr_reset_bit = 7,
99124d8fba4SKumar Gala .mnctr_mode_shift = 5,
99224d8fba4SKumar Gala .n_val_shift = 16,
99324d8fba4SKumar Gala .m_val_shift = 16,
99424d8fba4SKumar Gala .width = 8,
99524d8fba4SKumar Gala },
99624d8fba4SKumar Gala .p = {
99724d8fba4SKumar Gala .pre_div_shift = 3,
99824d8fba4SKumar Gala .pre_div_width = 2,
99924d8fba4SKumar Gala },
100024d8fba4SKumar Gala .s = {
100124d8fba4SKumar Gala .src_sel_shift = 0,
100224d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
100324d8fba4SKumar Gala },
100424d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup,
100524d8fba4SKumar Gala .clkr = {
100624d8fba4SKumar Gala .enable_reg = 0x2a8c,
100724d8fba4SKumar Gala .enable_mask = BIT(11),
100824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
100924d8fba4SKumar Gala .name = "gsbi7_qup_src",
1010cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
1011a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
101224d8fba4SKumar Gala .ops = &clk_rcg_ops,
101324d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
101424d8fba4SKumar Gala },
101524d8fba4SKumar Gala },
101624d8fba4SKumar Gala };
101724d8fba4SKumar Gala
101824d8fba4SKumar Gala static struct clk_branch gsbi7_qup_clk = {
101924d8fba4SKumar Gala .halt_reg = 0x2fd0,
102024d8fba4SKumar Gala .halt_bit = 12,
102124d8fba4SKumar Gala .clkr = {
102224d8fba4SKumar Gala .enable_reg = 0x2a8c,
102324d8fba4SKumar Gala .enable_mask = BIT(9),
102424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
102524d8fba4SKumar Gala .name = "gsbi7_qup_clk",
1026cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1027cb02866fSAnsuel Smith &gsbi7_qup_src.clkr.hw,
1028cb02866fSAnsuel Smith },
102924d8fba4SKumar Gala .num_parents = 1,
103024d8fba4SKumar Gala .ops = &clk_branch_ops,
103128aa450dSAnsuel Smith .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
103224d8fba4SKumar Gala },
103324d8fba4SKumar Gala },
103424d8fba4SKumar Gala };
103524d8fba4SKumar Gala
103624d8fba4SKumar Gala static struct clk_branch gsbi1_h_clk = {
103724d8fba4SKumar Gala .hwcg_reg = 0x29c0,
103824d8fba4SKumar Gala .hwcg_bit = 6,
103924d8fba4SKumar Gala .halt_reg = 0x2fcc,
104024d8fba4SKumar Gala .halt_bit = 13,
104124d8fba4SKumar Gala .clkr = {
104224d8fba4SKumar Gala .enable_reg = 0x29c0,
104324d8fba4SKumar Gala .enable_mask = BIT(4),
104424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
104524d8fba4SKumar Gala .name = "gsbi1_h_clk",
104624d8fba4SKumar Gala .ops = &clk_branch_ops,
104724d8fba4SKumar Gala },
104824d8fba4SKumar Gala },
104924d8fba4SKumar Gala };
105024d8fba4SKumar Gala
105124d8fba4SKumar Gala static struct clk_branch gsbi2_h_clk = {
105224d8fba4SKumar Gala .hwcg_reg = 0x29e0,
105324d8fba4SKumar Gala .hwcg_bit = 6,
105424d8fba4SKumar Gala .halt_reg = 0x2fcc,
105524d8fba4SKumar Gala .halt_bit = 9,
105624d8fba4SKumar Gala .clkr = {
105724d8fba4SKumar Gala .enable_reg = 0x29e0,
105824d8fba4SKumar Gala .enable_mask = BIT(4),
105924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
106024d8fba4SKumar Gala .name = "gsbi2_h_clk",
106124d8fba4SKumar Gala .ops = &clk_branch_ops,
106224d8fba4SKumar Gala },
106324d8fba4SKumar Gala },
106424d8fba4SKumar Gala };
106524d8fba4SKumar Gala
106624d8fba4SKumar Gala static struct clk_branch gsbi4_h_clk = {
106724d8fba4SKumar Gala .hwcg_reg = 0x2a20,
106824d8fba4SKumar Gala .hwcg_bit = 6,
106924d8fba4SKumar Gala .halt_reg = 0x2fd0,
107024d8fba4SKumar Gala .halt_bit = 27,
107124d8fba4SKumar Gala .clkr = {
107224d8fba4SKumar Gala .enable_reg = 0x2a20,
107324d8fba4SKumar Gala .enable_mask = BIT(4),
107424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
107524d8fba4SKumar Gala .name = "gsbi4_h_clk",
107624d8fba4SKumar Gala .ops = &clk_branch_ops,
107728aa450dSAnsuel Smith .flags = CLK_IGNORE_UNUSED,
107824d8fba4SKumar Gala },
107924d8fba4SKumar Gala },
108024d8fba4SKumar Gala };
108124d8fba4SKumar Gala
108224d8fba4SKumar Gala static struct clk_branch gsbi5_h_clk = {
108324d8fba4SKumar Gala .hwcg_reg = 0x2a40,
108424d8fba4SKumar Gala .hwcg_bit = 6,
108524d8fba4SKumar Gala .halt_reg = 0x2fd0,
108624d8fba4SKumar Gala .halt_bit = 23,
108724d8fba4SKumar Gala .clkr = {
108824d8fba4SKumar Gala .enable_reg = 0x2a40,
108924d8fba4SKumar Gala .enable_mask = BIT(4),
109024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
109124d8fba4SKumar Gala .name = "gsbi5_h_clk",
109224d8fba4SKumar Gala .ops = &clk_branch_ops,
109324d8fba4SKumar Gala },
109424d8fba4SKumar Gala },
109524d8fba4SKumar Gala };
109624d8fba4SKumar Gala
109724d8fba4SKumar Gala static struct clk_branch gsbi6_h_clk = {
109824d8fba4SKumar Gala .hwcg_reg = 0x2a60,
109924d8fba4SKumar Gala .hwcg_bit = 6,
110024d8fba4SKumar Gala .halt_reg = 0x2fd0,
110124d8fba4SKumar Gala .halt_bit = 19,
110224d8fba4SKumar Gala .clkr = {
110324d8fba4SKumar Gala .enable_reg = 0x2a60,
110424d8fba4SKumar Gala .enable_mask = BIT(4),
110524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
110624d8fba4SKumar Gala .name = "gsbi6_h_clk",
110724d8fba4SKumar Gala .ops = &clk_branch_ops,
110824d8fba4SKumar Gala },
110924d8fba4SKumar Gala },
111024d8fba4SKumar Gala };
111124d8fba4SKumar Gala
111224d8fba4SKumar Gala static struct clk_branch gsbi7_h_clk = {
111324d8fba4SKumar Gala .hwcg_reg = 0x2a80,
111424d8fba4SKumar Gala .hwcg_bit = 6,
111524d8fba4SKumar Gala .halt_reg = 0x2fd0,
111624d8fba4SKumar Gala .halt_bit = 15,
111724d8fba4SKumar Gala .clkr = {
111824d8fba4SKumar Gala .enable_reg = 0x2a80,
111924d8fba4SKumar Gala .enable_mask = BIT(4),
112024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
112124d8fba4SKumar Gala .name = "gsbi7_h_clk",
112224d8fba4SKumar Gala .ops = &clk_branch_ops,
112324d8fba4SKumar Gala },
112424d8fba4SKumar Gala },
112524d8fba4SKumar Gala };
112624d8fba4SKumar Gala
112724d8fba4SKumar Gala static const struct freq_tbl clk_tbl_gp[] = {
112824d8fba4SKumar Gala { 12500000, P_PXO, 2, 0, 0 },
112924d8fba4SKumar Gala { 25000000, P_PXO, 1, 0, 0 },
113024d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 },
113124d8fba4SKumar Gala { 76800000, P_PLL8, 1, 1, 5 },
113224d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 },
113324d8fba4SKumar Gala { 128000000, P_PLL8, 3, 0, 0 },
113424d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 },
113524d8fba4SKumar Gala { }
113624d8fba4SKumar Gala };
113724d8fba4SKumar Gala
113824d8fba4SKumar Gala static struct clk_rcg gp0_src = {
113924d8fba4SKumar Gala .ns_reg = 0x2d24,
114024d8fba4SKumar Gala .md_reg = 0x2d00,
114124d8fba4SKumar Gala .mn = {
114224d8fba4SKumar Gala .mnctr_en_bit = 8,
114324d8fba4SKumar Gala .mnctr_reset_bit = 7,
114424d8fba4SKumar Gala .mnctr_mode_shift = 5,
114524d8fba4SKumar Gala .n_val_shift = 16,
114624d8fba4SKumar Gala .m_val_shift = 16,
114724d8fba4SKumar Gala .width = 8,
114824d8fba4SKumar Gala },
114924d8fba4SKumar Gala .p = {
115024d8fba4SKumar Gala .pre_div_shift = 3,
115124d8fba4SKumar Gala .pre_div_width = 2,
115224d8fba4SKumar Gala },
115324d8fba4SKumar Gala .s = {
115424d8fba4SKumar Gala .src_sel_shift = 0,
115524d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map,
115624d8fba4SKumar Gala },
115724d8fba4SKumar Gala .freq_tbl = clk_tbl_gp,
115824d8fba4SKumar Gala .clkr = {
115924d8fba4SKumar Gala .enable_reg = 0x2d24,
116024d8fba4SKumar Gala .enable_mask = BIT(11),
116124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
116224d8fba4SKumar Gala .name = "gp0_src",
1163cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_cxo,
1164a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_cxo),
116524d8fba4SKumar Gala .ops = &clk_rcg_ops,
116624d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE,
116724d8fba4SKumar Gala },
116824d8fba4SKumar Gala }
116924d8fba4SKumar Gala };
117024d8fba4SKumar Gala
117124d8fba4SKumar Gala static struct clk_branch gp0_clk = {
117224d8fba4SKumar Gala .halt_reg = 0x2fd8,
117324d8fba4SKumar Gala .halt_bit = 7,
117424d8fba4SKumar Gala .clkr = {
117524d8fba4SKumar Gala .enable_reg = 0x2d24,
117624d8fba4SKumar Gala .enable_mask = BIT(9),
117724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
117824d8fba4SKumar Gala .name = "gp0_clk",
1179cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1180cb02866fSAnsuel Smith &gp0_src.clkr.hw,
1181cb02866fSAnsuel Smith },
118224d8fba4SKumar Gala .num_parents = 1,
118324d8fba4SKumar Gala .ops = &clk_branch_ops,
118424d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
118524d8fba4SKumar Gala },
118624d8fba4SKumar Gala },
118724d8fba4SKumar Gala };
118824d8fba4SKumar Gala
118924d8fba4SKumar Gala static struct clk_rcg gp1_src = {
119024d8fba4SKumar Gala .ns_reg = 0x2d44,
119124d8fba4SKumar Gala .md_reg = 0x2d40,
119224d8fba4SKumar Gala .mn = {
119324d8fba4SKumar Gala .mnctr_en_bit = 8,
119424d8fba4SKumar Gala .mnctr_reset_bit = 7,
119524d8fba4SKumar Gala .mnctr_mode_shift = 5,
119624d8fba4SKumar Gala .n_val_shift = 16,
119724d8fba4SKumar Gala .m_val_shift = 16,
119824d8fba4SKumar Gala .width = 8,
119924d8fba4SKumar Gala },
120024d8fba4SKumar Gala .p = {
120124d8fba4SKumar Gala .pre_div_shift = 3,
120224d8fba4SKumar Gala .pre_div_width = 2,
120324d8fba4SKumar Gala },
120424d8fba4SKumar Gala .s = {
120524d8fba4SKumar Gala .src_sel_shift = 0,
120624d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map,
120724d8fba4SKumar Gala },
120824d8fba4SKumar Gala .freq_tbl = clk_tbl_gp,
120924d8fba4SKumar Gala .clkr = {
121024d8fba4SKumar Gala .enable_reg = 0x2d44,
121124d8fba4SKumar Gala .enable_mask = BIT(11),
121224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
121324d8fba4SKumar Gala .name = "gp1_src",
1214cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_cxo,
1215a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_cxo),
121624d8fba4SKumar Gala .ops = &clk_rcg_ops,
121724d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
121824d8fba4SKumar Gala },
121924d8fba4SKumar Gala }
122024d8fba4SKumar Gala };
122124d8fba4SKumar Gala
122224d8fba4SKumar Gala static struct clk_branch gp1_clk = {
122324d8fba4SKumar Gala .halt_reg = 0x2fd8,
122424d8fba4SKumar Gala .halt_bit = 6,
122524d8fba4SKumar Gala .clkr = {
122624d8fba4SKumar Gala .enable_reg = 0x2d44,
122724d8fba4SKumar Gala .enable_mask = BIT(9),
122824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
122924d8fba4SKumar Gala .name = "gp1_clk",
1230cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1231cb02866fSAnsuel Smith &gp1_src.clkr.hw,
1232cb02866fSAnsuel Smith },
123324d8fba4SKumar Gala .num_parents = 1,
123424d8fba4SKumar Gala .ops = &clk_branch_ops,
123524d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
123624d8fba4SKumar Gala },
123724d8fba4SKumar Gala },
123824d8fba4SKumar Gala };
123924d8fba4SKumar Gala
124024d8fba4SKumar Gala static struct clk_rcg gp2_src = {
124124d8fba4SKumar Gala .ns_reg = 0x2d64,
124224d8fba4SKumar Gala .md_reg = 0x2d60,
124324d8fba4SKumar Gala .mn = {
124424d8fba4SKumar Gala .mnctr_en_bit = 8,
124524d8fba4SKumar Gala .mnctr_reset_bit = 7,
124624d8fba4SKumar Gala .mnctr_mode_shift = 5,
124724d8fba4SKumar Gala .n_val_shift = 16,
124824d8fba4SKumar Gala .m_val_shift = 16,
124924d8fba4SKumar Gala .width = 8,
125024d8fba4SKumar Gala },
125124d8fba4SKumar Gala .p = {
125224d8fba4SKumar Gala .pre_div_shift = 3,
125324d8fba4SKumar Gala .pre_div_width = 2,
125424d8fba4SKumar Gala },
125524d8fba4SKumar Gala .s = {
125624d8fba4SKumar Gala .src_sel_shift = 0,
125724d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map,
125824d8fba4SKumar Gala },
125924d8fba4SKumar Gala .freq_tbl = clk_tbl_gp,
126024d8fba4SKumar Gala .clkr = {
126124d8fba4SKumar Gala .enable_reg = 0x2d64,
126224d8fba4SKumar Gala .enable_mask = BIT(11),
126324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
126424d8fba4SKumar Gala .name = "gp2_src",
1265cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_cxo,
1266a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_cxo),
126724d8fba4SKumar Gala .ops = &clk_rcg_ops,
126824d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
126924d8fba4SKumar Gala },
127024d8fba4SKumar Gala }
127124d8fba4SKumar Gala };
127224d8fba4SKumar Gala
127324d8fba4SKumar Gala static struct clk_branch gp2_clk = {
127424d8fba4SKumar Gala .halt_reg = 0x2fd8,
127524d8fba4SKumar Gala .halt_bit = 5,
127624d8fba4SKumar Gala .clkr = {
127724d8fba4SKumar Gala .enable_reg = 0x2d64,
127824d8fba4SKumar Gala .enable_mask = BIT(9),
127924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
128024d8fba4SKumar Gala .name = "gp2_clk",
1281cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1282cb02866fSAnsuel Smith &gp2_src.clkr.hw,
1283cb02866fSAnsuel Smith },
128424d8fba4SKumar Gala .num_parents = 1,
128524d8fba4SKumar Gala .ops = &clk_branch_ops,
128624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
128724d8fba4SKumar Gala },
128824d8fba4SKumar Gala },
128924d8fba4SKumar Gala };
129024d8fba4SKumar Gala
129124d8fba4SKumar Gala static struct clk_branch pmem_clk = {
129224d8fba4SKumar Gala .hwcg_reg = 0x25a0,
129324d8fba4SKumar Gala .hwcg_bit = 6,
129424d8fba4SKumar Gala .halt_reg = 0x2fc8,
129524d8fba4SKumar Gala .halt_bit = 20,
129624d8fba4SKumar Gala .clkr = {
129724d8fba4SKumar Gala .enable_reg = 0x25a0,
129824d8fba4SKumar Gala .enable_mask = BIT(4),
129924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
130024d8fba4SKumar Gala .name = "pmem_clk",
130124d8fba4SKumar Gala .ops = &clk_branch_ops,
130224d8fba4SKumar Gala },
130324d8fba4SKumar Gala },
130424d8fba4SKumar Gala };
130524d8fba4SKumar Gala
130624d8fba4SKumar Gala static struct clk_rcg prng_src = {
130724d8fba4SKumar Gala .ns_reg = 0x2e80,
130824d8fba4SKumar Gala .p = {
130924d8fba4SKumar Gala .pre_div_shift = 3,
131024d8fba4SKumar Gala .pre_div_width = 4,
131124d8fba4SKumar Gala },
131224d8fba4SKumar Gala .s = {
131324d8fba4SKumar Gala .src_sel_shift = 0,
131424d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
131524d8fba4SKumar Gala },
131624d8fba4SKumar Gala .clkr = {
13171aec193eSAbhishek Sahu .enable_reg = 0x2e80,
13181aec193eSAbhishek Sahu .enable_mask = BIT(11),
131924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
132024d8fba4SKumar Gala .name = "prng_src",
1321cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
1322a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
132324d8fba4SKumar Gala .ops = &clk_rcg_ops,
132424d8fba4SKumar Gala },
132524d8fba4SKumar Gala },
132624d8fba4SKumar Gala };
132724d8fba4SKumar Gala
132824d8fba4SKumar Gala static struct clk_branch prng_clk = {
132924d8fba4SKumar Gala .halt_reg = 0x2fd8,
133024d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED,
133124d8fba4SKumar Gala .halt_bit = 10,
133224d8fba4SKumar Gala .clkr = {
133324d8fba4SKumar Gala .enable_reg = 0x3080,
133424d8fba4SKumar Gala .enable_mask = BIT(10),
133524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
133624d8fba4SKumar Gala .name = "prng_clk",
1337cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1338cb02866fSAnsuel Smith &prng_src.clkr.hw,
1339cb02866fSAnsuel Smith },
134024d8fba4SKumar Gala .num_parents = 1,
134124d8fba4SKumar Gala .ops = &clk_branch_ops,
134224d8fba4SKumar Gala },
134324d8fba4SKumar Gala },
134424d8fba4SKumar Gala };
134524d8fba4SKumar Gala
134624d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sdc[] = {
1347d8210e28SStephen Boyd { 200000, P_PXO, 2, 2, 125 },
134824d8fba4SKumar Gala { 400000, P_PLL8, 4, 1, 240 },
134924d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 },
135024d8fba4SKumar Gala { 17070000, P_PLL8, 1, 2, 45 },
135124d8fba4SKumar Gala { 20210000, P_PLL8, 1, 1, 19 },
135224d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 },
135324d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 },
13547e726f34SAnsuel Smith { 51200000, P_PLL8, 1, 2, 15 },
135524d8fba4SKumar Gala { 64000000, P_PLL8, 3, 1, 2 },
135624d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 },
135724d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 },
135824d8fba4SKumar Gala { }
135924d8fba4SKumar Gala };
136024d8fba4SKumar Gala
136124d8fba4SKumar Gala static struct clk_rcg sdc1_src = {
136224d8fba4SKumar Gala .ns_reg = 0x282c,
136324d8fba4SKumar Gala .md_reg = 0x2828,
136424d8fba4SKumar Gala .mn = {
136524d8fba4SKumar Gala .mnctr_en_bit = 8,
136624d8fba4SKumar Gala .mnctr_reset_bit = 7,
136724d8fba4SKumar Gala .mnctr_mode_shift = 5,
136824d8fba4SKumar Gala .n_val_shift = 16,
136924d8fba4SKumar Gala .m_val_shift = 16,
137024d8fba4SKumar Gala .width = 8,
137124d8fba4SKumar Gala },
137224d8fba4SKumar Gala .p = {
137324d8fba4SKumar Gala .pre_div_shift = 3,
137424d8fba4SKumar Gala .pre_div_width = 2,
137524d8fba4SKumar Gala },
137624d8fba4SKumar Gala .s = {
137724d8fba4SKumar Gala .src_sel_shift = 0,
137824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
137924d8fba4SKumar Gala },
138024d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc,
138124d8fba4SKumar Gala .clkr = {
138224d8fba4SKumar Gala .enable_reg = 0x282c,
138324d8fba4SKumar Gala .enable_mask = BIT(11),
138424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
138524d8fba4SKumar Gala .name = "sdc1_src",
1386cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
1387a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
13887e726f34SAnsuel Smith .ops = &clk_rcg_floor_ops,
138924d8fba4SKumar Gala },
139024d8fba4SKumar Gala }
139124d8fba4SKumar Gala };
139224d8fba4SKumar Gala
139324d8fba4SKumar Gala static struct clk_branch sdc1_clk = {
139424d8fba4SKumar Gala .halt_reg = 0x2fc8,
139524d8fba4SKumar Gala .halt_bit = 6,
139624d8fba4SKumar Gala .clkr = {
139724d8fba4SKumar Gala .enable_reg = 0x282c,
139824d8fba4SKumar Gala .enable_mask = BIT(9),
139924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
140024d8fba4SKumar Gala .name = "sdc1_clk",
1401cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1402cb02866fSAnsuel Smith &sdc1_src.clkr.hw,
1403cb02866fSAnsuel Smith },
140424d8fba4SKumar Gala .num_parents = 1,
140524d8fba4SKumar Gala .ops = &clk_branch_ops,
140624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
140724d8fba4SKumar Gala },
140824d8fba4SKumar Gala },
140924d8fba4SKumar Gala };
141024d8fba4SKumar Gala
141124d8fba4SKumar Gala static struct clk_rcg sdc3_src = {
141224d8fba4SKumar Gala .ns_reg = 0x286c,
141324d8fba4SKumar Gala .md_reg = 0x2868,
141424d8fba4SKumar Gala .mn = {
141524d8fba4SKumar Gala .mnctr_en_bit = 8,
141624d8fba4SKumar Gala .mnctr_reset_bit = 7,
141724d8fba4SKumar Gala .mnctr_mode_shift = 5,
141824d8fba4SKumar Gala .n_val_shift = 16,
141924d8fba4SKumar Gala .m_val_shift = 16,
142024d8fba4SKumar Gala .width = 8,
142124d8fba4SKumar Gala },
142224d8fba4SKumar Gala .p = {
142324d8fba4SKumar Gala .pre_div_shift = 3,
142424d8fba4SKumar Gala .pre_div_width = 2,
142524d8fba4SKumar Gala },
142624d8fba4SKumar Gala .s = {
142724d8fba4SKumar Gala .src_sel_shift = 0,
142824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
142924d8fba4SKumar Gala },
143024d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc,
143124d8fba4SKumar Gala .clkr = {
143224d8fba4SKumar Gala .enable_reg = 0x286c,
143324d8fba4SKumar Gala .enable_mask = BIT(11),
143424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
143524d8fba4SKumar Gala .name = "sdc3_src",
1436cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
1437a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
143824d8fba4SKumar Gala .ops = &clk_rcg_ops,
143924d8fba4SKumar Gala },
144024d8fba4SKumar Gala }
144124d8fba4SKumar Gala };
144224d8fba4SKumar Gala
144324d8fba4SKumar Gala static struct clk_branch sdc3_clk = {
144424d8fba4SKumar Gala .halt_reg = 0x2fc8,
144524d8fba4SKumar Gala .halt_bit = 4,
144624d8fba4SKumar Gala .clkr = {
144724d8fba4SKumar Gala .enable_reg = 0x286c,
144824d8fba4SKumar Gala .enable_mask = BIT(9),
144924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
145024d8fba4SKumar Gala .name = "sdc3_clk",
1451cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1452cb02866fSAnsuel Smith &sdc3_src.clkr.hw,
1453cb02866fSAnsuel Smith },
145424d8fba4SKumar Gala .num_parents = 1,
145524d8fba4SKumar Gala .ops = &clk_branch_ops,
145624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
145724d8fba4SKumar Gala },
145824d8fba4SKumar Gala },
145924d8fba4SKumar Gala };
146024d8fba4SKumar Gala
146124d8fba4SKumar Gala static struct clk_branch sdc1_h_clk = {
146224d8fba4SKumar Gala .hwcg_reg = 0x2820,
146324d8fba4SKumar Gala .hwcg_bit = 6,
146424d8fba4SKumar Gala .halt_reg = 0x2fc8,
146524d8fba4SKumar Gala .halt_bit = 11,
146624d8fba4SKumar Gala .clkr = {
146724d8fba4SKumar Gala .enable_reg = 0x2820,
146824d8fba4SKumar Gala .enable_mask = BIT(4),
146924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
147024d8fba4SKumar Gala .name = "sdc1_h_clk",
147124d8fba4SKumar Gala .ops = &clk_branch_ops,
147224d8fba4SKumar Gala },
147324d8fba4SKumar Gala },
147424d8fba4SKumar Gala };
147524d8fba4SKumar Gala
147624d8fba4SKumar Gala static struct clk_branch sdc3_h_clk = {
147724d8fba4SKumar Gala .hwcg_reg = 0x2860,
147824d8fba4SKumar Gala .hwcg_bit = 6,
147924d8fba4SKumar Gala .halt_reg = 0x2fc8,
148024d8fba4SKumar Gala .halt_bit = 9,
148124d8fba4SKumar Gala .clkr = {
148224d8fba4SKumar Gala .enable_reg = 0x2860,
148324d8fba4SKumar Gala .enable_mask = BIT(4),
148424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
148524d8fba4SKumar Gala .name = "sdc3_h_clk",
148624d8fba4SKumar Gala .ops = &clk_branch_ops,
148724d8fba4SKumar Gala },
148824d8fba4SKumar Gala },
148924d8fba4SKumar Gala };
149024d8fba4SKumar Gala
149124d8fba4SKumar Gala static const struct freq_tbl clk_tbl_tsif_ref[] = {
149224d8fba4SKumar Gala { 105000, P_PXO, 1, 1, 256 },
149324d8fba4SKumar Gala { }
149424d8fba4SKumar Gala };
149524d8fba4SKumar Gala
149624d8fba4SKumar Gala static struct clk_rcg tsif_ref_src = {
149724d8fba4SKumar Gala .ns_reg = 0x2710,
149824d8fba4SKumar Gala .md_reg = 0x270c,
149924d8fba4SKumar Gala .mn = {
150024d8fba4SKumar Gala .mnctr_en_bit = 8,
150124d8fba4SKumar Gala .mnctr_reset_bit = 7,
150224d8fba4SKumar Gala .mnctr_mode_shift = 5,
150324d8fba4SKumar Gala .n_val_shift = 16,
150424d8fba4SKumar Gala .m_val_shift = 16,
150524d8fba4SKumar Gala .width = 16,
150624d8fba4SKumar Gala },
150724d8fba4SKumar Gala .p = {
150824d8fba4SKumar Gala .pre_div_shift = 3,
150924d8fba4SKumar Gala .pre_div_width = 2,
151024d8fba4SKumar Gala },
151124d8fba4SKumar Gala .s = {
151224d8fba4SKumar Gala .src_sel_shift = 0,
151324d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map,
151424d8fba4SKumar Gala },
151524d8fba4SKumar Gala .freq_tbl = clk_tbl_tsif_ref,
151624d8fba4SKumar Gala .clkr = {
151724d8fba4SKumar Gala .enable_reg = 0x2710,
151824d8fba4SKumar Gala .enable_mask = BIT(11),
151924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
152024d8fba4SKumar Gala .name = "tsif_ref_src",
1521cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8,
1522a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
152324d8fba4SKumar Gala .ops = &clk_rcg_ops,
152424d8fba4SKumar Gala },
152524d8fba4SKumar Gala }
152624d8fba4SKumar Gala };
152724d8fba4SKumar Gala
152824d8fba4SKumar Gala static struct clk_branch tsif_ref_clk = {
152924d8fba4SKumar Gala .halt_reg = 0x2fd4,
153024d8fba4SKumar Gala .halt_bit = 5,
153124d8fba4SKumar Gala .clkr = {
153224d8fba4SKumar Gala .enable_reg = 0x2710,
153324d8fba4SKumar Gala .enable_mask = BIT(9),
153424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
153524d8fba4SKumar Gala .name = "tsif_ref_clk",
1536cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1537cb02866fSAnsuel Smith &tsif_ref_src.clkr.hw,
1538cb02866fSAnsuel Smith },
153924d8fba4SKumar Gala .num_parents = 1,
154024d8fba4SKumar Gala .ops = &clk_branch_ops,
154124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
154224d8fba4SKumar Gala },
154324d8fba4SKumar Gala },
154424d8fba4SKumar Gala };
154524d8fba4SKumar Gala
154624d8fba4SKumar Gala static struct clk_branch tsif_h_clk = {
154724d8fba4SKumar Gala .hwcg_reg = 0x2700,
154824d8fba4SKumar Gala .hwcg_bit = 6,
154924d8fba4SKumar Gala .halt_reg = 0x2fd4,
155024d8fba4SKumar Gala .halt_bit = 7,
155124d8fba4SKumar Gala .clkr = {
155224d8fba4SKumar Gala .enable_reg = 0x2700,
155324d8fba4SKumar Gala .enable_mask = BIT(4),
155424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
155524d8fba4SKumar Gala .name = "tsif_h_clk",
155624d8fba4SKumar Gala .ops = &clk_branch_ops,
155724d8fba4SKumar Gala },
155824d8fba4SKumar Gala },
155924d8fba4SKumar Gala };
156024d8fba4SKumar Gala
156124d8fba4SKumar Gala static struct clk_branch dma_bam_h_clk = {
156224d8fba4SKumar Gala .hwcg_reg = 0x25c0,
156324d8fba4SKumar Gala .hwcg_bit = 6,
156424d8fba4SKumar Gala .halt_reg = 0x2fc8,
156524d8fba4SKumar Gala .halt_bit = 12,
156624d8fba4SKumar Gala .clkr = {
156724d8fba4SKumar Gala .enable_reg = 0x25c0,
156824d8fba4SKumar Gala .enable_mask = BIT(4),
156924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
157024d8fba4SKumar Gala .name = "dma_bam_h_clk",
157124d8fba4SKumar Gala .ops = &clk_branch_ops,
157224d8fba4SKumar Gala },
157324d8fba4SKumar Gala },
157424d8fba4SKumar Gala };
157524d8fba4SKumar Gala
157624d8fba4SKumar Gala static struct clk_branch adm0_clk = {
157724d8fba4SKumar Gala .halt_reg = 0x2fdc,
157824d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED,
157924d8fba4SKumar Gala .halt_bit = 12,
158024d8fba4SKumar Gala .clkr = {
158124d8fba4SKumar Gala .enable_reg = 0x3080,
158224d8fba4SKumar Gala .enable_mask = BIT(2),
158324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
158424d8fba4SKumar Gala .name = "adm0_clk",
158524d8fba4SKumar Gala .ops = &clk_branch_ops,
158624d8fba4SKumar Gala },
158724d8fba4SKumar Gala },
158824d8fba4SKumar Gala };
158924d8fba4SKumar Gala
159024d8fba4SKumar Gala static struct clk_branch adm0_pbus_clk = {
159124d8fba4SKumar Gala .hwcg_reg = 0x2208,
159224d8fba4SKumar Gala .hwcg_bit = 6,
159324d8fba4SKumar Gala .halt_reg = 0x2fdc,
159424d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED,
159524d8fba4SKumar Gala .halt_bit = 11,
159624d8fba4SKumar Gala .clkr = {
159724d8fba4SKumar Gala .enable_reg = 0x3080,
159824d8fba4SKumar Gala .enable_mask = BIT(3),
159924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
160024d8fba4SKumar Gala .name = "adm0_pbus_clk",
160124d8fba4SKumar Gala .ops = &clk_branch_ops,
160224d8fba4SKumar Gala },
160324d8fba4SKumar Gala },
160424d8fba4SKumar Gala };
160524d8fba4SKumar Gala
160624d8fba4SKumar Gala static struct clk_branch pmic_arb0_h_clk = {
160724d8fba4SKumar Gala .halt_reg = 0x2fd8,
160824d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED,
160924d8fba4SKumar Gala .halt_bit = 22,
161024d8fba4SKumar Gala .clkr = {
161124d8fba4SKumar Gala .enable_reg = 0x3080,
161224d8fba4SKumar Gala .enable_mask = BIT(8),
161324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
161424d8fba4SKumar Gala .name = "pmic_arb0_h_clk",
161524d8fba4SKumar Gala .ops = &clk_branch_ops,
161624d8fba4SKumar Gala },
161724d8fba4SKumar Gala },
161824d8fba4SKumar Gala };
161924d8fba4SKumar Gala
162024d8fba4SKumar Gala static struct clk_branch pmic_arb1_h_clk = {
162124d8fba4SKumar Gala .halt_reg = 0x2fd8,
162224d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED,
162324d8fba4SKumar Gala .halt_bit = 21,
162424d8fba4SKumar Gala .clkr = {
162524d8fba4SKumar Gala .enable_reg = 0x3080,
162624d8fba4SKumar Gala .enable_mask = BIT(9),
162724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
162824d8fba4SKumar Gala .name = "pmic_arb1_h_clk",
162924d8fba4SKumar Gala .ops = &clk_branch_ops,
163024d8fba4SKumar Gala },
163124d8fba4SKumar Gala },
163224d8fba4SKumar Gala };
163324d8fba4SKumar Gala
163424d8fba4SKumar Gala static struct clk_branch pmic_ssbi2_clk = {
163524d8fba4SKumar Gala .halt_reg = 0x2fd8,
163624d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED,
163724d8fba4SKumar Gala .halt_bit = 23,
163824d8fba4SKumar Gala .clkr = {
163924d8fba4SKumar Gala .enable_reg = 0x3080,
164024d8fba4SKumar Gala .enable_mask = BIT(7),
164124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
164224d8fba4SKumar Gala .name = "pmic_ssbi2_clk",
164324d8fba4SKumar Gala .ops = &clk_branch_ops,
164424d8fba4SKumar Gala },
164524d8fba4SKumar Gala },
164624d8fba4SKumar Gala };
164724d8fba4SKumar Gala
164824d8fba4SKumar Gala static struct clk_branch rpm_msg_ram_h_clk = {
164924d8fba4SKumar Gala .hwcg_reg = 0x27e0,
165024d8fba4SKumar Gala .hwcg_bit = 6,
165124d8fba4SKumar Gala .halt_reg = 0x2fd8,
165224d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED,
165324d8fba4SKumar Gala .halt_bit = 12,
165424d8fba4SKumar Gala .clkr = {
165524d8fba4SKumar Gala .enable_reg = 0x3080,
165624d8fba4SKumar Gala .enable_mask = BIT(6),
165724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
165824d8fba4SKumar Gala .name = "rpm_msg_ram_h_clk",
165924d8fba4SKumar Gala .ops = &clk_branch_ops,
166024d8fba4SKumar Gala },
166124d8fba4SKumar Gala },
166224d8fba4SKumar Gala };
166324d8fba4SKumar Gala
166424d8fba4SKumar Gala static const struct freq_tbl clk_tbl_pcie_ref[] = {
166524d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 },
166624d8fba4SKumar Gala { }
166724d8fba4SKumar Gala };
166824d8fba4SKumar Gala
166924d8fba4SKumar Gala static struct clk_rcg pcie_ref_src = {
167024d8fba4SKumar Gala .ns_reg = 0x3860,
167124d8fba4SKumar Gala .p = {
167224d8fba4SKumar Gala .pre_div_shift = 3,
167324d8fba4SKumar Gala .pre_div_width = 4,
167424d8fba4SKumar Gala },
167524d8fba4SKumar Gala .s = {
167624d8fba4SKumar Gala .src_sel_shift = 0,
167724d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map,
167824d8fba4SKumar Gala },
167924d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref,
168024d8fba4SKumar Gala .clkr = {
168124d8fba4SKumar Gala .enable_reg = 0x3860,
168224d8fba4SKumar Gala .enable_mask = BIT(11),
168324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
168424d8fba4SKumar Gala .name = "pcie_ref_src",
1685cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3,
1686a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll3),
168724d8fba4SKumar Gala .ops = &clk_rcg_ops,
168824d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
168924d8fba4SKumar Gala },
169024d8fba4SKumar Gala },
169124d8fba4SKumar Gala };
169224d8fba4SKumar Gala
169324d8fba4SKumar Gala static struct clk_branch pcie_ref_src_clk = {
169424d8fba4SKumar Gala .halt_reg = 0x2fdc,
169524d8fba4SKumar Gala .halt_bit = 30,
169624d8fba4SKumar Gala .clkr = {
169724d8fba4SKumar Gala .enable_reg = 0x3860,
169824d8fba4SKumar Gala .enable_mask = BIT(9),
169924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
170024d8fba4SKumar Gala .name = "pcie_ref_src_clk",
1701cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1702cb02866fSAnsuel Smith &pcie_ref_src.clkr.hw,
1703cb02866fSAnsuel Smith },
170424d8fba4SKumar Gala .num_parents = 1,
170524d8fba4SKumar Gala .ops = &clk_branch_ops,
170624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
170724d8fba4SKumar Gala },
170824d8fba4SKumar Gala },
170924d8fba4SKumar Gala };
171024d8fba4SKumar Gala
171124d8fba4SKumar Gala static struct clk_branch pcie_a_clk = {
171224d8fba4SKumar Gala .halt_reg = 0x2fc0,
171324d8fba4SKumar Gala .halt_bit = 13,
171424d8fba4SKumar Gala .clkr = {
171524d8fba4SKumar Gala .enable_reg = 0x22c0,
171624d8fba4SKumar Gala .enable_mask = BIT(4),
171724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
171824d8fba4SKumar Gala .name = "pcie_a_clk",
171924d8fba4SKumar Gala .ops = &clk_branch_ops,
172024d8fba4SKumar Gala },
172124d8fba4SKumar Gala },
172224d8fba4SKumar Gala };
172324d8fba4SKumar Gala
172424d8fba4SKumar Gala static struct clk_branch pcie_aux_clk = {
172524d8fba4SKumar Gala .halt_reg = 0x2fdc,
172624d8fba4SKumar Gala .halt_bit = 31,
172724d8fba4SKumar Gala .clkr = {
172824d8fba4SKumar Gala .enable_reg = 0x22c8,
172924d8fba4SKumar Gala .enable_mask = BIT(4),
173024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
173124d8fba4SKumar Gala .name = "pcie_aux_clk",
173224d8fba4SKumar Gala .ops = &clk_branch_ops,
173324d8fba4SKumar Gala },
173424d8fba4SKumar Gala },
173524d8fba4SKumar Gala };
173624d8fba4SKumar Gala
173724d8fba4SKumar Gala static struct clk_branch pcie_h_clk = {
173824d8fba4SKumar Gala .halt_reg = 0x2fd4,
173924d8fba4SKumar Gala .halt_bit = 8,
174024d8fba4SKumar Gala .clkr = {
174124d8fba4SKumar Gala .enable_reg = 0x22cc,
174224d8fba4SKumar Gala .enable_mask = BIT(4),
174324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
174424d8fba4SKumar Gala .name = "pcie_h_clk",
174524d8fba4SKumar Gala .ops = &clk_branch_ops,
174624d8fba4SKumar Gala },
174724d8fba4SKumar Gala },
174824d8fba4SKumar Gala };
174924d8fba4SKumar Gala
175024d8fba4SKumar Gala static struct clk_branch pcie_phy_clk = {
175124d8fba4SKumar Gala .halt_reg = 0x2fdc,
175224d8fba4SKumar Gala .halt_bit = 29,
175324d8fba4SKumar Gala .clkr = {
175424d8fba4SKumar Gala .enable_reg = 0x22d0,
175524d8fba4SKumar Gala .enable_mask = BIT(4),
175624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
175724d8fba4SKumar Gala .name = "pcie_phy_clk",
175824d8fba4SKumar Gala .ops = &clk_branch_ops,
175924d8fba4SKumar Gala },
176024d8fba4SKumar Gala },
176124d8fba4SKumar Gala };
176224d8fba4SKumar Gala
176324d8fba4SKumar Gala static struct clk_rcg pcie1_ref_src = {
176424d8fba4SKumar Gala .ns_reg = 0x3aa0,
176524d8fba4SKumar Gala .p = {
176624d8fba4SKumar Gala .pre_div_shift = 3,
176724d8fba4SKumar Gala .pre_div_width = 4,
176824d8fba4SKumar Gala },
176924d8fba4SKumar Gala .s = {
177024d8fba4SKumar Gala .src_sel_shift = 0,
177124d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map,
177224d8fba4SKumar Gala },
177324d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref,
177424d8fba4SKumar Gala .clkr = {
177524d8fba4SKumar Gala .enable_reg = 0x3aa0,
177624d8fba4SKumar Gala .enable_mask = BIT(11),
177724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
177824d8fba4SKumar Gala .name = "pcie1_ref_src",
1779cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3,
1780a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll3),
178124d8fba4SKumar Gala .ops = &clk_rcg_ops,
178224d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
178324d8fba4SKumar Gala },
178424d8fba4SKumar Gala },
178524d8fba4SKumar Gala };
178624d8fba4SKumar Gala
178724d8fba4SKumar Gala static struct clk_branch pcie1_ref_src_clk = {
178824d8fba4SKumar Gala .halt_reg = 0x2fdc,
178924d8fba4SKumar Gala .halt_bit = 27,
179024d8fba4SKumar Gala .clkr = {
179124d8fba4SKumar Gala .enable_reg = 0x3aa0,
179224d8fba4SKumar Gala .enable_mask = BIT(9),
179324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
179424d8fba4SKumar Gala .name = "pcie1_ref_src_clk",
1795cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1796cb02866fSAnsuel Smith &pcie1_ref_src.clkr.hw,
1797cb02866fSAnsuel Smith },
179824d8fba4SKumar Gala .num_parents = 1,
179924d8fba4SKumar Gala .ops = &clk_branch_ops,
180024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
180124d8fba4SKumar Gala },
180224d8fba4SKumar Gala },
180324d8fba4SKumar Gala };
180424d8fba4SKumar Gala
180524d8fba4SKumar Gala static struct clk_branch pcie1_a_clk = {
180624d8fba4SKumar Gala .halt_reg = 0x2fc0,
180724d8fba4SKumar Gala .halt_bit = 10,
180824d8fba4SKumar Gala .clkr = {
180924d8fba4SKumar Gala .enable_reg = 0x3a80,
181024d8fba4SKumar Gala .enable_mask = BIT(4),
181124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
181224d8fba4SKumar Gala .name = "pcie1_a_clk",
181324d8fba4SKumar Gala .ops = &clk_branch_ops,
181424d8fba4SKumar Gala },
181524d8fba4SKumar Gala },
181624d8fba4SKumar Gala };
181724d8fba4SKumar Gala
181824d8fba4SKumar Gala static struct clk_branch pcie1_aux_clk = {
181924d8fba4SKumar Gala .halt_reg = 0x2fdc,
182024d8fba4SKumar Gala .halt_bit = 28,
182124d8fba4SKumar Gala .clkr = {
182224d8fba4SKumar Gala .enable_reg = 0x3a88,
182324d8fba4SKumar Gala .enable_mask = BIT(4),
182424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
182524d8fba4SKumar Gala .name = "pcie1_aux_clk",
182624d8fba4SKumar Gala .ops = &clk_branch_ops,
182724d8fba4SKumar Gala },
182824d8fba4SKumar Gala },
182924d8fba4SKumar Gala };
183024d8fba4SKumar Gala
183124d8fba4SKumar Gala static struct clk_branch pcie1_h_clk = {
183224d8fba4SKumar Gala .halt_reg = 0x2fd4,
183324d8fba4SKumar Gala .halt_bit = 9,
183424d8fba4SKumar Gala .clkr = {
183524d8fba4SKumar Gala .enable_reg = 0x3a8c,
183624d8fba4SKumar Gala .enable_mask = BIT(4),
183724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
183824d8fba4SKumar Gala .name = "pcie1_h_clk",
183924d8fba4SKumar Gala .ops = &clk_branch_ops,
184024d8fba4SKumar Gala },
184124d8fba4SKumar Gala },
184224d8fba4SKumar Gala };
184324d8fba4SKumar Gala
184424d8fba4SKumar Gala static struct clk_branch pcie1_phy_clk = {
184524d8fba4SKumar Gala .halt_reg = 0x2fdc,
184624d8fba4SKumar Gala .halt_bit = 26,
184724d8fba4SKumar Gala .clkr = {
184824d8fba4SKumar Gala .enable_reg = 0x3a90,
184924d8fba4SKumar Gala .enable_mask = BIT(4),
185024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
185124d8fba4SKumar Gala .name = "pcie1_phy_clk",
185224d8fba4SKumar Gala .ops = &clk_branch_ops,
185324d8fba4SKumar Gala },
185424d8fba4SKumar Gala },
185524d8fba4SKumar Gala };
185624d8fba4SKumar Gala
185724d8fba4SKumar Gala static struct clk_rcg pcie2_ref_src = {
185824d8fba4SKumar Gala .ns_reg = 0x3ae0,
185924d8fba4SKumar Gala .p = {
186024d8fba4SKumar Gala .pre_div_shift = 3,
186124d8fba4SKumar Gala .pre_div_width = 4,
186224d8fba4SKumar Gala },
186324d8fba4SKumar Gala .s = {
186424d8fba4SKumar Gala .src_sel_shift = 0,
186524d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map,
186624d8fba4SKumar Gala },
186724d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref,
186824d8fba4SKumar Gala .clkr = {
186924d8fba4SKumar Gala .enable_reg = 0x3ae0,
187024d8fba4SKumar Gala .enable_mask = BIT(11),
187124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
187224d8fba4SKumar Gala .name = "pcie2_ref_src",
1873cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3,
1874a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll3),
187524d8fba4SKumar Gala .ops = &clk_rcg_ops,
187624d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
187724d8fba4SKumar Gala },
187824d8fba4SKumar Gala },
187924d8fba4SKumar Gala };
188024d8fba4SKumar Gala
188124d8fba4SKumar Gala static struct clk_branch pcie2_ref_src_clk = {
188224d8fba4SKumar Gala .halt_reg = 0x2fdc,
188324d8fba4SKumar Gala .halt_bit = 24,
188424d8fba4SKumar Gala .clkr = {
188524d8fba4SKumar Gala .enable_reg = 0x3ae0,
188624d8fba4SKumar Gala .enable_mask = BIT(9),
188724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
188824d8fba4SKumar Gala .name = "pcie2_ref_src_clk",
1889cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1890cb02866fSAnsuel Smith &pcie2_ref_src.clkr.hw,
1891cb02866fSAnsuel Smith },
189224d8fba4SKumar Gala .num_parents = 1,
189324d8fba4SKumar Gala .ops = &clk_branch_ops,
189424d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
189524d8fba4SKumar Gala },
189624d8fba4SKumar Gala },
189724d8fba4SKumar Gala };
189824d8fba4SKumar Gala
189924d8fba4SKumar Gala static struct clk_branch pcie2_a_clk = {
190024d8fba4SKumar Gala .halt_reg = 0x2fc0,
190124d8fba4SKumar Gala .halt_bit = 9,
190224d8fba4SKumar Gala .clkr = {
190324d8fba4SKumar Gala .enable_reg = 0x3ac0,
190424d8fba4SKumar Gala .enable_mask = BIT(4),
190524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
190624d8fba4SKumar Gala .name = "pcie2_a_clk",
190724d8fba4SKumar Gala .ops = &clk_branch_ops,
190824d8fba4SKumar Gala },
190924d8fba4SKumar Gala },
191024d8fba4SKumar Gala };
191124d8fba4SKumar Gala
191224d8fba4SKumar Gala static struct clk_branch pcie2_aux_clk = {
191324d8fba4SKumar Gala .halt_reg = 0x2fdc,
191424d8fba4SKumar Gala .halt_bit = 25,
191524d8fba4SKumar Gala .clkr = {
191624d8fba4SKumar Gala .enable_reg = 0x3ac8,
191724d8fba4SKumar Gala .enable_mask = BIT(4),
191824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
191924d8fba4SKumar Gala .name = "pcie2_aux_clk",
192024d8fba4SKumar Gala .ops = &clk_branch_ops,
192124d8fba4SKumar Gala },
192224d8fba4SKumar Gala },
192324d8fba4SKumar Gala };
192424d8fba4SKumar Gala
192524d8fba4SKumar Gala static struct clk_branch pcie2_h_clk = {
192624d8fba4SKumar Gala .halt_reg = 0x2fd4,
192724d8fba4SKumar Gala .halt_bit = 10,
192824d8fba4SKumar Gala .clkr = {
192924d8fba4SKumar Gala .enable_reg = 0x3acc,
193024d8fba4SKumar Gala .enable_mask = BIT(4),
193124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
193224d8fba4SKumar Gala .name = "pcie2_h_clk",
193324d8fba4SKumar Gala .ops = &clk_branch_ops,
193424d8fba4SKumar Gala },
193524d8fba4SKumar Gala },
193624d8fba4SKumar Gala };
193724d8fba4SKumar Gala
193824d8fba4SKumar Gala static struct clk_branch pcie2_phy_clk = {
193924d8fba4SKumar Gala .halt_reg = 0x2fdc,
194024d8fba4SKumar Gala .halt_bit = 23,
194124d8fba4SKumar Gala .clkr = {
194224d8fba4SKumar Gala .enable_reg = 0x3ad0,
194324d8fba4SKumar Gala .enable_mask = BIT(4),
194424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
194524d8fba4SKumar Gala .name = "pcie2_phy_clk",
194624d8fba4SKumar Gala .ops = &clk_branch_ops,
194724d8fba4SKumar Gala },
194824d8fba4SKumar Gala },
194924d8fba4SKumar Gala };
195024d8fba4SKumar Gala
195124d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sata_ref[] = {
195224d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 },
195324d8fba4SKumar Gala { }
195424d8fba4SKumar Gala };
195524d8fba4SKumar Gala
195624d8fba4SKumar Gala static struct clk_rcg sata_ref_src = {
195724d8fba4SKumar Gala .ns_reg = 0x2c08,
195824d8fba4SKumar Gala .p = {
195924d8fba4SKumar Gala .pre_div_shift = 3,
196024d8fba4SKumar Gala .pre_div_width = 4,
196124d8fba4SKumar Gala },
196224d8fba4SKumar Gala .s = {
196324d8fba4SKumar Gala .src_sel_shift = 0,
196424d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_sata_map,
196524d8fba4SKumar Gala },
196624d8fba4SKumar Gala .freq_tbl = clk_tbl_sata_ref,
196724d8fba4SKumar Gala .clkr = {
196824d8fba4SKumar Gala .enable_reg = 0x2c08,
196924d8fba4SKumar Gala .enable_mask = BIT(7),
197024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
197124d8fba4SKumar Gala .name = "sata_ref_src",
1972cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3,
1973a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll3),
197424d8fba4SKumar Gala .ops = &clk_rcg_ops,
197524d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
197624d8fba4SKumar Gala },
197724d8fba4SKumar Gala },
197824d8fba4SKumar Gala };
197924d8fba4SKumar Gala
198024d8fba4SKumar Gala static struct clk_branch sata_rxoob_clk = {
198124d8fba4SKumar Gala .halt_reg = 0x2fdc,
198224d8fba4SKumar Gala .halt_bit = 20,
198324d8fba4SKumar Gala .clkr = {
198424d8fba4SKumar Gala .enable_reg = 0x2c0c,
198524d8fba4SKumar Gala .enable_mask = BIT(4),
198624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
198724d8fba4SKumar Gala .name = "sata_rxoob_clk",
1988cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
1989cb02866fSAnsuel Smith &sata_ref_src.clkr.hw,
1990cb02866fSAnsuel Smith },
199124d8fba4SKumar Gala .num_parents = 1,
199224d8fba4SKumar Gala .ops = &clk_branch_ops,
199324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
199424d8fba4SKumar Gala },
199524d8fba4SKumar Gala },
199624d8fba4SKumar Gala };
199724d8fba4SKumar Gala
199824d8fba4SKumar Gala static struct clk_branch sata_pmalive_clk = {
199924d8fba4SKumar Gala .halt_reg = 0x2fdc,
200024d8fba4SKumar Gala .halt_bit = 19,
200124d8fba4SKumar Gala .clkr = {
200224d8fba4SKumar Gala .enable_reg = 0x2c10,
200324d8fba4SKumar Gala .enable_mask = BIT(4),
200424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
200524d8fba4SKumar Gala .name = "sata_pmalive_clk",
2006cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2007cb02866fSAnsuel Smith &sata_ref_src.clkr.hw,
2008cb02866fSAnsuel Smith },
200924d8fba4SKumar Gala .num_parents = 1,
201024d8fba4SKumar Gala .ops = &clk_branch_ops,
201124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
201224d8fba4SKumar Gala },
201324d8fba4SKumar Gala },
201424d8fba4SKumar Gala };
201524d8fba4SKumar Gala
201624d8fba4SKumar Gala static struct clk_branch sata_phy_ref_clk = {
201724d8fba4SKumar Gala .halt_reg = 0x2fdc,
201824d8fba4SKumar Gala .halt_bit = 18,
201924d8fba4SKumar Gala .clkr = {
202024d8fba4SKumar Gala .enable_reg = 0x2c14,
202124d8fba4SKumar Gala .enable_mask = BIT(4),
202224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
202324d8fba4SKumar Gala .name = "sata_phy_ref_clk",
2024cb02866fSAnsuel Smith .parent_data = gcc_pxo,
202524d8fba4SKumar Gala .num_parents = 1,
202624d8fba4SKumar Gala .ops = &clk_branch_ops,
202724d8fba4SKumar Gala },
202824d8fba4SKumar Gala },
202924d8fba4SKumar Gala };
203024d8fba4SKumar Gala
203124d8fba4SKumar Gala static struct clk_branch sata_a_clk = {
203224d8fba4SKumar Gala .halt_reg = 0x2fc0,
203324d8fba4SKumar Gala .halt_bit = 12,
203424d8fba4SKumar Gala .clkr = {
203524d8fba4SKumar Gala .enable_reg = 0x2c20,
203624d8fba4SKumar Gala .enable_mask = BIT(4),
203724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
203824d8fba4SKumar Gala .name = "sata_a_clk",
203924d8fba4SKumar Gala .ops = &clk_branch_ops,
204024d8fba4SKumar Gala },
204124d8fba4SKumar Gala },
204224d8fba4SKumar Gala };
204324d8fba4SKumar Gala
204424d8fba4SKumar Gala static struct clk_branch sata_h_clk = {
204524d8fba4SKumar Gala .halt_reg = 0x2fdc,
204624d8fba4SKumar Gala .halt_bit = 21,
204724d8fba4SKumar Gala .clkr = {
204824d8fba4SKumar Gala .enable_reg = 0x2c00,
204924d8fba4SKumar Gala .enable_mask = BIT(4),
205024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
205124d8fba4SKumar Gala .name = "sata_h_clk",
205224d8fba4SKumar Gala .ops = &clk_branch_ops,
205324d8fba4SKumar Gala },
205424d8fba4SKumar Gala },
205524d8fba4SKumar Gala };
205624d8fba4SKumar Gala
205724d8fba4SKumar Gala static struct clk_branch sfab_sata_s_h_clk = {
205824d8fba4SKumar Gala .halt_reg = 0x2fc4,
205924d8fba4SKumar Gala .halt_bit = 14,
206024d8fba4SKumar Gala .clkr = {
206124d8fba4SKumar Gala .enable_reg = 0x2480,
206224d8fba4SKumar Gala .enable_mask = BIT(4),
206324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
206424d8fba4SKumar Gala .name = "sfab_sata_s_h_clk",
206524d8fba4SKumar Gala .ops = &clk_branch_ops,
206624d8fba4SKumar Gala },
206724d8fba4SKumar Gala },
206824d8fba4SKumar Gala };
206924d8fba4SKumar Gala
207024d8fba4SKumar Gala static struct clk_branch sata_phy_cfg_clk = {
207124d8fba4SKumar Gala .halt_reg = 0x2fcc,
207224d8fba4SKumar Gala .halt_bit = 14,
207324d8fba4SKumar Gala .clkr = {
207424d8fba4SKumar Gala .enable_reg = 0x2c40,
207524d8fba4SKumar Gala .enable_mask = BIT(4),
207624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
207724d8fba4SKumar Gala .name = "sata_phy_cfg_clk",
207824d8fba4SKumar Gala .ops = &clk_branch_ops,
207924d8fba4SKumar Gala },
208024d8fba4SKumar Gala },
208124d8fba4SKumar Gala };
208224d8fba4SKumar Gala
208324d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_master[] = {
208424d8fba4SKumar Gala { 125000000, P_PLL0, 1, 5, 32 },
208524d8fba4SKumar Gala { }
208624d8fba4SKumar Gala };
208724d8fba4SKumar Gala
208824d8fba4SKumar Gala static struct clk_rcg usb30_master_clk_src = {
208924d8fba4SKumar Gala .ns_reg = 0x3b2c,
209024d8fba4SKumar Gala .md_reg = 0x3b28,
209124d8fba4SKumar Gala .mn = {
209224d8fba4SKumar Gala .mnctr_en_bit = 8,
209324d8fba4SKumar Gala .mnctr_reset_bit = 7,
209424d8fba4SKumar Gala .mnctr_mode_shift = 5,
209524d8fba4SKumar Gala .n_val_shift = 16,
209624d8fba4SKumar Gala .m_val_shift = 16,
209724d8fba4SKumar Gala .width = 8,
209824d8fba4SKumar Gala },
209924d8fba4SKumar Gala .p = {
210024d8fba4SKumar Gala .pre_div_shift = 3,
210124d8fba4SKumar Gala .pre_div_width = 2,
210224d8fba4SKumar Gala },
210324d8fba4SKumar Gala .s = {
210424d8fba4SKumar Gala .src_sel_shift = 0,
2105e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map,
210624d8fba4SKumar Gala },
210724d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_master,
210824d8fba4SKumar Gala .clkr = {
210924d8fba4SKumar Gala .enable_reg = 0x3b2c,
211024d8fba4SKumar Gala .enable_mask = BIT(11),
211124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
211224d8fba4SKumar Gala .name = "usb30_master_ref_src",
2113cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0,
2114a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll0),
211524d8fba4SKumar Gala .ops = &clk_rcg_ops,
211624d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
211724d8fba4SKumar Gala },
211824d8fba4SKumar Gala },
211924d8fba4SKumar Gala };
212024d8fba4SKumar Gala
212124d8fba4SKumar Gala static struct clk_branch usb30_0_branch_clk = {
212224d8fba4SKumar Gala .halt_reg = 0x2fc4,
212324d8fba4SKumar Gala .halt_bit = 22,
212424d8fba4SKumar Gala .clkr = {
212524d8fba4SKumar Gala .enable_reg = 0x3b24,
212624d8fba4SKumar Gala .enable_mask = BIT(4),
212724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
212824d8fba4SKumar Gala .name = "usb30_0_branch_clk",
2129cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2130cb02866fSAnsuel Smith &usb30_master_clk_src.clkr.hw,
2131cb02866fSAnsuel Smith },
213224d8fba4SKumar Gala .num_parents = 1,
213324d8fba4SKumar Gala .ops = &clk_branch_ops,
213424d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
213524d8fba4SKumar Gala },
213624d8fba4SKumar Gala },
213724d8fba4SKumar Gala };
213824d8fba4SKumar Gala
213924d8fba4SKumar Gala static struct clk_branch usb30_1_branch_clk = {
214024d8fba4SKumar Gala .halt_reg = 0x2fc4,
214124d8fba4SKumar Gala .halt_bit = 17,
214224d8fba4SKumar Gala .clkr = {
214324d8fba4SKumar Gala .enable_reg = 0x3b34,
214424d8fba4SKumar Gala .enable_mask = BIT(4),
214524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
214624d8fba4SKumar Gala .name = "usb30_1_branch_clk",
2147cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2148cb02866fSAnsuel Smith &usb30_master_clk_src.clkr.hw,
2149cb02866fSAnsuel Smith },
215024d8fba4SKumar Gala .num_parents = 1,
215124d8fba4SKumar Gala .ops = &clk_branch_ops,
215224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
215324d8fba4SKumar Gala },
215424d8fba4SKumar Gala },
215524d8fba4SKumar Gala };
215624d8fba4SKumar Gala
215724d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_utmi[] = {
215824d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 },
215924d8fba4SKumar Gala { }
216024d8fba4SKumar Gala };
216124d8fba4SKumar Gala
216224d8fba4SKumar Gala static struct clk_rcg usb30_utmi_clk = {
216324d8fba4SKumar Gala .ns_reg = 0x3b44,
216424d8fba4SKumar Gala .md_reg = 0x3b40,
216524d8fba4SKumar Gala .mn = {
216624d8fba4SKumar Gala .mnctr_en_bit = 8,
216724d8fba4SKumar Gala .mnctr_reset_bit = 7,
216824d8fba4SKumar Gala .mnctr_mode_shift = 5,
216924d8fba4SKumar Gala .n_val_shift = 16,
217024d8fba4SKumar Gala .m_val_shift = 16,
217124d8fba4SKumar Gala .width = 8,
217224d8fba4SKumar Gala },
217324d8fba4SKumar Gala .p = {
217424d8fba4SKumar Gala .pre_div_shift = 3,
217524d8fba4SKumar Gala .pre_div_width = 2,
217624d8fba4SKumar Gala },
217724d8fba4SKumar Gala .s = {
217824d8fba4SKumar Gala .src_sel_shift = 0,
2179e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map,
218024d8fba4SKumar Gala },
218124d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_utmi,
218224d8fba4SKumar Gala .clkr = {
218324d8fba4SKumar Gala .enable_reg = 0x3b44,
218424d8fba4SKumar Gala .enable_mask = BIT(11),
218524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
218624d8fba4SKumar Gala .name = "usb30_utmi_clk",
2187cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0,
2188a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll0),
218924d8fba4SKumar Gala .ops = &clk_rcg_ops,
219024d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
219124d8fba4SKumar Gala },
219224d8fba4SKumar Gala },
219324d8fba4SKumar Gala };
219424d8fba4SKumar Gala
219524d8fba4SKumar Gala static struct clk_branch usb30_0_utmi_clk_ctl = {
219624d8fba4SKumar Gala .halt_reg = 0x2fc4,
219724d8fba4SKumar Gala .halt_bit = 21,
219824d8fba4SKumar Gala .clkr = {
219924d8fba4SKumar Gala .enable_reg = 0x3b48,
220024d8fba4SKumar Gala .enable_mask = BIT(4),
220124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
220224d8fba4SKumar Gala .name = "usb30_0_utmi_clk_ctl",
2203cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2204cb02866fSAnsuel Smith &usb30_utmi_clk.clkr.hw,
2205cb02866fSAnsuel Smith },
220624d8fba4SKumar Gala .num_parents = 1,
220724d8fba4SKumar Gala .ops = &clk_branch_ops,
220824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
220924d8fba4SKumar Gala },
221024d8fba4SKumar Gala },
221124d8fba4SKumar Gala };
221224d8fba4SKumar Gala
221324d8fba4SKumar Gala static struct clk_branch usb30_1_utmi_clk_ctl = {
221424d8fba4SKumar Gala .halt_reg = 0x2fc4,
221524d8fba4SKumar Gala .halt_bit = 15,
221624d8fba4SKumar Gala .clkr = {
221724d8fba4SKumar Gala .enable_reg = 0x3b4c,
221824d8fba4SKumar Gala .enable_mask = BIT(4),
221924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
222024d8fba4SKumar Gala .name = "usb30_1_utmi_clk_ctl",
2221cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2222cb02866fSAnsuel Smith &usb30_utmi_clk.clkr.hw,
2223cb02866fSAnsuel Smith },
222424d8fba4SKumar Gala .num_parents = 1,
222524d8fba4SKumar Gala .ops = &clk_branch_ops,
222624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
222724d8fba4SKumar Gala },
222824d8fba4SKumar Gala },
222924d8fba4SKumar Gala };
223024d8fba4SKumar Gala
223124d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb[] = {
223224d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 },
223324d8fba4SKumar Gala { }
223424d8fba4SKumar Gala };
223524d8fba4SKumar Gala
223624d8fba4SKumar Gala static struct clk_rcg usb_hs1_xcvr_clk_src = {
223724d8fba4SKumar Gala .ns_reg = 0x290C,
223824d8fba4SKumar Gala .md_reg = 0x2908,
223924d8fba4SKumar Gala .mn = {
224024d8fba4SKumar Gala .mnctr_en_bit = 8,
224124d8fba4SKumar Gala .mnctr_reset_bit = 7,
224224d8fba4SKumar Gala .mnctr_mode_shift = 5,
224324d8fba4SKumar Gala .n_val_shift = 16,
224424d8fba4SKumar Gala .m_val_shift = 16,
224524d8fba4SKumar Gala .width = 8,
224624d8fba4SKumar Gala },
224724d8fba4SKumar Gala .p = {
224824d8fba4SKumar Gala .pre_div_shift = 3,
224924d8fba4SKumar Gala .pre_div_width = 2,
225024d8fba4SKumar Gala },
225124d8fba4SKumar Gala .s = {
225224d8fba4SKumar Gala .src_sel_shift = 0,
2253e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map,
225424d8fba4SKumar Gala },
225524d8fba4SKumar Gala .freq_tbl = clk_tbl_usb,
225624d8fba4SKumar Gala .clkr = {
225724d8fba4SKumar Gala .enable_reg = 0x2968,
225824d8fba4SKumar Gala .enable_mask = BIT(11),
225924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
226024d8fba4SKumar Gala .name = "usb_hs1_xcvr_src",
2261cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0,
2262a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll0),
226324d8fba4SKumar Gala .ops = &clk_rcg_ops,
226424d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
226524d8fba4SKumar Gala },
226624d8fba4SKumar Gala },
226724d8fba4SKumar Gala };
226824d8fba4SKumar Gala
226924d8fba4SKumar Gala static struct clk_branch usb_hs1_xcvr_clk = {
227024d8fba4SKumar Gala .halt_reg = 0x2fcc,
227124d8fba4SKumar Gala .halt_bit = 17,
227224d8fba4SKumar Gala .clkr = {
227324d8fba4SKumar Gala .enable_reg = 0x290c,
227424d8fba4SKumar Gala .enable_mask = BIT(9),
227524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
227624d8fba4SKumar Gala .name = "usb_hs1_xcvr_clk",
2277cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2278cb02866fSAnsuel Smith &usb_hs1_xcvr_clk_src.clkr.hw,
2279cb02866fSAnsuel Smith },
228024d8fba4SKumar Gala .num_parents = 1,
228124d8fba4SKumar Gala .ops = &clk_branch_ops,
228224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
228324d8fba4SKumar Gala },
228424d8fba4SKumar Gala },
228524d8fba4SKumar Gala };
228624d8fba4SKumar Gala
228724d8fba4SKumar Gala static struct clk_branch usb_hs1_h_clk = {
228824d8fba4SKumar Gala .hwcg_reg = 0x2900,
228924d8fba4SKumar Gala .hwcg_bit = 6,
229024d8fba4SKumar Gala .halt_reg = 0x2fc8,
229124d8fba4SKumar Gala .halt_bit = 1,
229224d8fba4SKumar Gala .clkr = {
229324d8fba4SKumar Gala .enable_reg = 0x2900,
229424d8fba4SKumar Gala .enable_mask = BIT(4),
229524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
229624d8fba4SKumar Gala .name = "usb_hs1_h_clk",
229724d8fba4SKumar Gala .ops = &clk_branch_ops,
229824d8fba4SKumar Gala },
229924d8fba4SKumar Gala },
230024d8fba4SKumar Gala };
230124d8fba4SKumar Gala
230224d8fba4SKumar Gala static struct clk_rcg usb_fs1_xcvr_clk_src = {
230324d8fba4SKumar Gala .ns_reg = 0x2968,
230424d8fba4SKumar Gala .md_reg = 0x2964,
230524d8fba4SKumar Gala .mn = {
230624d8fba4SKumar Gala .mnctr_en_bit = 8,
230724d8fba4SKumar Gala .mnctr_reset_bit = 7,
230824d8fba4SKumar Gala .mnctr_mode_shift = 5,
230924d8fba4SKumar Gala .n_val_shift = 16,
231024d8fba4SKumar Gala .m_val_shift = 16,
231124d8fba4SKumar Gala .width = 8,
231224d8fba4SKumar Gala },
231324d8fba4SKumar Gala .p = {
231424d8fba4SKumar Gala .pre_div_shift = 3,
231524d8fba4SKumar Gala .pre_div_width = 2,
231624d8fba4SKumar Gala },
231724d8fba4SKumar Gala .s = {
231824d8fba4SKumar Gala .src_sel_shift = 0,
2319e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map,
232024d8fba4SKumar Gala },
232124d8fba4SKumar Gala .freq_tbl = clk_tbl_usb,
232224d8fba4SKumar Gala .clkr = {
232324d8fba4SKumar Gala .enable_reg = 0x2968,
232424d8fba4SKumar Gala .enable_mask = BIT(11),
232524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
232624d8fba4SKumar Gala .name = "usb_fs1_xcvr_src",
2327cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0,
2328a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll0),
232924d8fba4SKumar Gala .ops = &clk_rcg_ops,
233024d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE,
233124d8fba4SKumar Gala },
233224d8fba4SKumar Gala },
233324d8fba4SKumar Gala };
233424d8fba4SKumar Gala
233524d8fba4SKumar Gala static struct clk_branch usb_fs1_xcvr_clk = {
233624d8fba4SKumar Gala .halt_reg = 0x2fcc,
233724d8fba4SKumar Gala .halt_bit = 17,
233824d8fba4SKumar Gala .clkr = {
233924d8fba4SKumar Gala .enable_reg = 0x2968,
234024d8fba4SKumar Gala .enable_mask = BIT(9),
234124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
234224d8fba4SKumar Gala .name = "usb_fs1_xcvr_clk",
2343cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2344cb02866fSAnsuel Smith &usb_fs1_xcvr_clk_src.clkr.hw,
2345cb02866fSAnsuel Smith },
234624d8fba4SKumar Gala .num_parents = 1,
234724d8fba4SKumar Gala .ops = &clk_branch_ops,
234824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
234924d8fba4SKumar Gala },
235024d8fba4SKumar Gala },
235124d8fba4SKumar Gala };
235224d8fba4SKumar Gala
235324d8fba4SKumar Gala static struct clk_branch usb_fs1_sys_clk = {
235424d8fba4SKumar Gala .halt_reg = 0x2fcc,
235524d8fba4SKumar Gala .halt_bit = 18,
235624d8fba4SKumar Gala .clkr = {
235724d8fba4SKumar Gala .enable_reg = 0x296c,
235824d8fba4SKumar Gala .enable_mask = BIT(4),
235924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
236024d8fba4SKumar Gala .name = "usb_fs1_sys_clk",
2361cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2362cb02866fSAnsuel Smith &usb_fs1_xcvr_clk_src.clkr.hw,
2363cb02866fSAnsuel Smith },
236424d8fba4SKumar Gala .num_parents = 1,
236524d8fba4SKumar Gala .ops = &clk_branch_ops,
236624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT,
236724d8fba4SKumar Gala },
236824d8fba4SKumar Gala },
236924d8fba4SKumar Gala };
237024d8fba4SKumar Gala
237124d8fba4SKumar Gala static struct clk_branch usb_fs1_h_clk = {
237224d8fba4SKumar Gala .halt_reg = 0x2fcc,
237324d8fba4SKumar Gala .halt_bit = 19,
237424d8fba4SKumar Gala .clkr = {
237524d8fba4SKumar Gala .enable_reg = 0x2960,
237624d8fba4SKumar Gala .enable_mask = BIT(4),
237724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){
237824d8fba4SKumar Gala .name = "usb_fs1_h_clk",
237924d8fba4SKumar Gala .ops = &clk_branch_ops,
238024d8fba4SKumar Gala },
238124d8fba4SKumar Gala },
238224d8fba4SKumar Gala };
238324d8fba4SKumar Gala
23844c385b25SArchit Taneja static struct clk_branch ebi2_clk = {
23854c385b25SArchit Taneja .hwcg_reg = 0x3b00,
23864c385b25SArchit Taneja .hwcg_bit = 6,
23874c385b25SArchit Taneja .halt_reg = 0x2fcc,
23884c385b25SArchit Taneja .halt_bit = 1,
23894c385b25SArchit Taneja .clkr = {
23904c385b25SArchit Taneja .enable_reg = 0x3b00,
23914c385b25SArchit Taneja .enable_mask = BIT(4),
23924c385b25SArchit Taneja .hw.init = &(struct clk_init_data){
23934c385b25SArchit Taneja .name = "ebi2_clk",
23944c385b25SArchit Taneja .ops = &clk_branch_ops,
23954c385b25SArchit Taneja },
23964c385b25SArchit Taneja },
23974c385b25SArchit Taneja };
23984c385b25SArchit Taneja
23994c385b25SArchit Taneja static struct clk_branch ebi2_aon_clk = {
24004c385b25SArchit Taneja .halt_reg = 0x2fcc,
24014c385b25SArchit Taneja .halt_bit = 0,
24024c385b25SArchit Taneja .clkr = {
24034c385b25SArchit Taneja .enable_reg = 0x3b00,
24044c385b25SArchit Taneja .enable_mask = BIT(8),
24054c385b25SArchit Taneja .hw.init = &(struct clk_init_data){
24064c385b25SArchit Taneja .name = "ebi2_always_on_clk",
24074c385b25SArchit Taneja .ops = &clk_branch_ops,
24084c385b25SArchit Taneja },
24094c385b25SArchit Taneja },
24104c385b25SArchit Taneja };
24114c385b25SArchit Taneja
2412f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_gmac[] = {
2413f7b81d67SStephen Boyd { 133000000, P_PLL0, 1, 50, 301 },
2414f7b81d67SStephen Boyd { 266000000, P_PLL0, 1, 127, 382 },
2415f7b81d67SStephen Boyd { }
2416f7b81d67SStephen Boyd };
2417f7b81d67SStephen Boyd
2418f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core1_src = {
2419f7b81d67SStephen Boyd .ns_reg[0] = 0x3cac,
2420f7b81d67SStephen Boyd .ns_reg[1] = 0x3cb0,
2421f7b81d67SStephen Boyd .md_reg[0] = 0x3ca4,
2422f7b81d67SStephen Boyd .md_reg[1] = 0x3ca8,
2423f7b81d67SStephen Boyd .bank_reg = 0x3ca0,
2424f7b81d67SStephen Boyd .mn[0] = {
2425f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2426f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2427f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2428f7b81d67SStephen Boyd .n_val_shift = 16,
2429f7b81d67SStephen Boyd .m_val_shift = 16,
2430f7b81d67SStephen Boyd .width = 8,
2431f7b81d67SStephen Boyd },
2432f7b81d67SStephen Boyd .mn[1] = {
2433f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2434f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2435f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2436f7b81d67SStephen Boyd .n_val_shift = 16,
2437f7b81d67SStephen Boyd .m_val_shift = 16,
2438f7b81d67SStephen Boyd .width = 8,
2439f7b81d67SStephen Boyd },
2440f7b81d67SStephen Boyd .s[0] = {
2441f7b81d67SStephen Boyd .src_sel_shift = 0,
2442f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2443f7b81d67SStephen Boyd },
2444f7b81d67SStephen Boyd .s[1] = {
2445f7b81d67SStephen Boyd .src_sel_shift = 0,
2446f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2447f7b81d67SStephen Boyd },
2448f7b81d67SStephen Boyd .p[0] = {
2449f7b81d67SStephen Boyd .pre_div_shift = 3,
2450f7b81d67SStephen Boyd .pre_div_width = 2,
2451f7b81d67SStephen Boyd },
2452f7b81d67SStephen Boyd .p[1] = {
2453f7b81d67SStephen Boyd .pre_div_shift = 3,
2454f7b81d67SStephen Boyd .pre_div_width = 2,
2455f7b81d67SStephen Boyd },
2456f7b81d67SStephen Boyd .mux_sel_bit = 0,
2457f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac,
2458f7b81d67SStephen Boyd .clkr = {
2459f7b81d67SStephen Boyd .enable_reg = 0x3ca0,
2460f7b81d67SStephen Boyd .enable_mask = BIT(1),
2461f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2462f7b81d67SStephen Boyd .name = "gmac_core1_src",
2463cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0,
2464a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll14_pll18_pll0),
2465f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops,
2466f7b81d67SStephen Boyd },
2467f7b81d67SStephen Boyd },
2468f7b81d67SStephen Boyd };
2469f7b81d67SStephen Boyd
2470f7b81d67SStephen Boyd static struct clk_branch gmac_core1_clk = {
2471f7b81d67SStephen Boyd .halt_reg = 0x3c20,
2472f7b81d67SStephen Boyd .halt_bit = 4,
2473f7b81d67SStephen Boyd .hwcg_reg = 0x3cb4,
2474f7b81d67SStephen Boyd .hwcg_bit = 6,
2475f7b81d67SStephen Boyd .clkr = {
2476f7b81d67SStephen Boyd .enable_reg = 0x3cb4,
2477f7b81d67SStephen Boyd .enable_mask = BIT(4),
2478f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2479f7b81d67SStephen Boyd .name = "gmac_core1_clk",
2480cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2481cb02866fSAnsuel Smith &gmac_core1_src.clkr.hw,
2482f7b81d67SStephen Boyd },
2483f7b81d67SStephen Boyd .num_parents = 1,
2484f7b81d67SStephen Boyd .ops = &clk_branch_ops,
2485f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT,
2486f7b81d67SStephen Boyd },
2487f7b81d67SStephen Boyd },
2488f7b81d67SStephen Boyd };
2489f7b81d67SStephen Boyd
2490f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core2_src = {
2491f7b81d67SStephen Boyd .ns_reg[0] = 0x3ccc,
2492f7b81d67SStephen Boyd .ns_reg[1] = 0x3cd0,
2493f7b81d67SStephen Boyd .md_reg[0] = 0x3cc4,
2494f7b81d67SStephen Boyd .md_reg[1] = 0x3cc8,
2495f7b81d67SStephen Boyd .bank_reg = 0x3ca0,
2496f7b81d67SStephen Boyd .mn[0] = {
2497f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2498f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2499f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2500f7b81d67SStephen Boyd .n_val_shift = 16,
2501f7b81d67SStephen Boyd .m_val_shift = 16,
2502f7b81d67SStephen Boyd .width = 8,
2503f7b81d67SStephen Boyd },
2504f7b81d67SStephen Boyd .mn[1] = {
2505f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2506f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2507f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2508f7b81d67SStephen Boyd .n_val_shift = 16,
2509f7b81d67SStephen Boyd .m_val_shift = 16,
2510f7b81d67SStephen Boyd .width = 8,
2511f7b81d67SStephen Boyd },
2512f7b81d67SStephen Boyd .s[0] = {
2513f7b81d67SStephen Boyd .src_sel_shift = 0,
2514f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2515f7b81d67SStephen Boyd },
2516f7b81d67SStephen Boyd .s[1] = {
2517f7b81d67SStephen Boyd .src_sel_shift = 0,
2518f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2519f7b81d67SStephen Boyd },
2520f7b81d67SStephen Boyd .p[0] = {
2521f7b81d67SStephen Boyd .pre_div_shift = 3,
2522f7b81d67SStephen Boyd .pre_div_width = 2,
2523f7b81d67SStephen Boyd },
2524f7b81d67SStephen Boyd .p[1] = {
2525f7b81d67SStephen Boyd .pre_div_shift = 3,
2526f7b81d67SStephen Boyd .pre_div_width = 2,
2527f7b81d67SStephen Boyd },
2528f7b81d67SStephen Boyd .mux_sel_bit = 0,
2529f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac,
2530f7b81d67SStephen Boyd .clkr = {
2531f7b81d67SStephen Boyd .enable_reg = 0x3cc0,
2532f7b81d67SStephen Boyd .enable_mask = BIT(1),
2533f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2534f7b81d67SStephen Boyd .name = "gmac_core2_src",
2535cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0,
2536a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll14_pll18_pll0),
2537f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops,
2538f7b81d67SStephen Boyd },
2539f7b81d67SStephen Boyd },
2540f7b81d67SStephen Boyd };
2541f7b81d67SStephen Boyd
2542f7b81d67SStephen Boyd static struct clk_branch gmac_core2_clk = {
2543f7b81d67SStephen Boyd .halt_reg = 0x3c20,
2544f7b81d67SStephen Boyd .halt_bit = 5,
2545f7b81d67SStephen Boyd .hwcg_reg = 0x3cd4,
2546f7b81d67SStephen Boyd .hwcg_bit = 6,
2547f7b81d67SStephen Boyd .clkr = {
2548f7b81d67SStephen Boyd .enable_reg = 0x3cd4,
2549f7b81d67SStephen Boyd .enable_mask = BIT(4),
2550f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2551f7b81d67SStephen Boyd .name = "gmac_core2_clk",
2552cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2553cb02866fSAnsuel Smith &gmac_core2_src.clkr.hw,
2554f7b81d67SStephen Boyd },
2555f7b81d67SStephen Boyd .num_parents = 1,
2556f7b81d67SStephen Boyd .ops = &clk_branch_ops,
2557f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT,
2558f7b81d67SStephen Boyd },
2559f7b81d67SStephen Boyd },
2560f7b81d67SStephen Boyd };
2561f7b81d67SStephen Boyd
2562f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core3_src = {
2563f7b81d67SStephen Boyd .ns_reg[0] = 0x3cec,
2564f7b81d67SStephen Boyd .ns_reg[1] = 0x3cf0,
2565f7b81d67SStephen Boyd .md_reg[0] = 0x3ce4,
2566f7b81d67SStephen Boyd .md_reg[1] = 0x3ce8,
2567f7b81d67SStephen Boyd .bank_reg = 0x3ce0,
2568f7b81d67SStephen Boyd .mn[0] = {
2569f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2570f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2571f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2572f7b81d67SStephen Boyd .n_val_shift = 16,
2573f7b81d67SStephen Boyd .m_val_shift = 16,
2574f7b81d67SStephen Boyd .width = 8,
2575f7b81d67SStephen Boyd },
2576f7b81d67SStephen Boyd .mn[1] = {
2577f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2578f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2579f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2580f7b81d67SStephen Boyd .n_val_shift = 16,
2581f7b81d67SStephen Boyd .m_val_shift = 16,
2582f7b81d67SStephen Boyd .width = 8,
2583f7b81d67SStephen Boyd },
2584f7b81d67SStephen Boyd .s[0] = {
2585f7b81d67SStephen Boyd .src_sel_shift = 0,
2586f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2587f7b81d67SStephen Boyd },
2588f7b81d67SStephen Boyd .s[1] = {
2589f7b81d67SStephen Boyd .src_sel_shift = 0,
2590f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2591f7b81d67SStephen Boyd },
2592f7b81d67SStephen Boyd .p[0] = {
2593f7b81d67SStephen Boyd .pre_div_shift = 3,
2594f7b81d67SStephen Boyd .pre_div_width = 2,
2595f7b81d67SStephen Boyd },
2596f7b81d67SStephen Boyd .p[1] = {
2597f7b81d67SStephen Boyd .pre_div_shift = 3,
2598f7b81d67SStephen Boyd .pre_div_width = 2,
2599f7b81d67SStephen Boyd },
2600f7b81d67SStephen Boyd .mux_sel_bit = 0,
2601f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac,
2602f7b81d67SStephen Boyd .clkr = {
2603f7b81d67SStephen Boyd .enable_reg = 0x3ce0,
2604f7b81d67SStephen Boyd .enable_mask = BIT(1),
2605f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2606f7b81d67SStephen Boyd .name = "gmac_core3_src",
2607cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0,
2608a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll14_pll18_pll0),
2609f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops,
2610f7b81d67SStephen Boyd },
2611f7b81d67SStephen Boyd },
2612f7b81d67SStephen Boyd };
2613f7b81d67SStephen Boyd
2614f7b81d67SStephen Boyd static struct clk_branch gmac_core3_clk = {
2615f7b81d67SStephen Boyd .halt_reg = 0x3c20,
2616f7b81d67SStephen Boyd .halt_bit = 6,
2617f7b81d67SStephen Boyd .hwcg_reg = 0x3cf4,
2618f7b81d67SStephen Boyd .hwcg_bit = 6,
2619f7b81d67SStephen Boyd .clkr = {
2620f7b81d67SStephen Boyd .enable_reg = 0x3cf4,
2621f7b81d67SStephen Boyd .enable_mask = BIT(4),
2622f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2623f7b81d67SStephen Boyd .name = "gmac_core3_clk",
2624cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2625cb02866fSAnsuel Smith &gmac_core3_src.clkr.hw,
2626f7b81d67SStephen Boyd },
2627f7b81d67SStephen Boyd .num_parents = 1,
2628f7b81d67SStephen Boyd .ops = &clk_branch_ops,
2629f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT,
2630f7b81d67SStephen Boyd },
2631f7b81d67SStephen Boyd },
2632f7b81d67SStephen Boyd };
2633f7b81d67SStephen Boyd
2634f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core4_src = {
2635f7b81d67SStephen Boyd .ns_reg[0] = 0x3d0c,
2636f7b81d67SStephen Boyd .ns_reg[1] = 0x3d10,
2637f7b81d67SStephen Boyd .md_reg[0] = 0x3d04,
2638f7b81d67SStephen Boyd .md_reg[1] = 0x3d08,
2639f7b81d67SStephen Boyd .bank_reg = 0x3d00,
2640f7b81d67SStephen Boyd .mn[0] = {
2641f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2642f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2643f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2644f7b81d67SStephen Boyd .n_val_shift = 16,
2645f7b81d67SStephen Boyd .m_val_shift = 16,
2646f7b81d67SStephen Boyd .width = 8,
2647f7b81d67SStephen Boyd },
2648f7b81d67SStephen Boyd .mn[1] = {
2649f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2650f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2651f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2652f7b81d67SStephen Boyd .n_val_shift = 16,
2653f7b81d67SStephen Boyd .m_val_shift = 16,
2654f7b81d67SStephen Boyd .width = 8,
2655f7b81d67SStephen Boyd },
2656f7b81d67SStephen Boyd .s[0] = {
2657f7b81d67SStephen Boyd .src_sel_shift = 0,
2658f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2659f7b81d67SStephen Boyd },
2660f7b81d67SStephen Boyd .s[1] = {
2661f7b81d67SStephen Boyd .src_sel_shift = 0,
2662f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2663f7b81d67SStephen Boyd },
2664f7b81d67SStephen Boyd .p[0] = {
2665f7b81d67SStephen Boyd .pre_div_shift = 3,
2666f7b81d67SStephen Boyd .pre_div_width = 2,
2667f7b81d67SStephen Boyd },
2668f7b81d67SStephen Boyd .p[1] = {
2669f7b81d67SStephen Boyd .pre_div_shift = 3,
2670f7b81d67SStephen Boyd .pre_div_width = 2,
2671f7b81d67SStephen Boyd },
2672f7b81d67SStephen Boyd .mux_sel_bit = 0,
2673f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac,
2674f7b81d67SStephen Boyd .clkr = {
2675f7b81d67SStephen Boyd .enable_reg = 0x3d00,
2676f7b81d67SStephen Boyd .enable_mask = BIT(1),
2677f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2678f7b81d67SStephen Boyd .name = "gmac_core4_src",
2679cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0,
2680a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll14_pll18_pll0),
2681f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops,
2682f7b81d67SStephen Boyd },
2683f7b81d67SStephen Boyd },
2684f7b81d67SStephen Boyd };
2685f7b81d67SStephen Boyd
2686f7b81d67SStephen Boyd static struct clk_branch gmac_core4_clk = {
2687f7b81d67SStephen Boyd .halt_reg = 0x3c20,
2688f7b81d67SStephen Boyd .halt_bit = 7,
2689f7b81d67SStephen Boyd .hwcg_reg = 0x3d14,
2690f7b81d67SStephen Boyd .hwcg_bit = 6,
2691f7b81d67SStephen Boyd .clkr = {
2692f7b81d67SStephen Boyd .enable_reg = 0x3d14,
2693f7b81d67SStephen Boyd .enable_mask = BIT(4),
2694f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2695f7b81d67SStephen Boyd .name = "gmac_core4_clk",
2696cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2697cb02866fSAnsuel Smith &gmac_core4_src.clkr.hw,
2698f7b81d67SStephen Boyd },
2699f7b81d67SStephen Boyd .num_parents = 1,
2700f7b81d67SStephen Boyd .ops = &clk_branch_ops,
2701f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT,
2702f7b81d67SStephen Boyd },
2703f7b81d67SStephen Boyd },
2704f7b81d67SStephen Boyd };
2705f7b81d67SStephen Boyd
2706f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_nss_tcm[] = {
2707f7b81d67SStephen Boyd { 266000000, P_PLL0, 3, 0, 0 },
2708f7b81d67SStephen Boyd { 400000000, P_PLL0, 2, 0, 0 },
2709f7b81d67SStephen Boyd { }
2710f7b81d67SStephen Boyd };
2711f7b81d67SStephen Boyd
2712f7b81d67SStephen Boyd static struct clk_dyn_rcg nss_tcm_src = {
2713f7b81d67SStephen Boyd .ns_reg[0] = 0x3dc4,
2714f7b81d67SStephen Boyd .ns_reg[1] = 0x3dc8,
2715f7b81d67SStephen Boyd .bank_reg = 0x3dc0,
2716f7b81d67SStephen Boyd .s[0] = {
2717f7b81d67SStephen Boyd .src_sel_shift = 0,
2718f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2719f7b81d67SStephen Boyd },
2720f7b81d67SStephen Boyd .s[1] = {
2721f7b81d67SStephen Boyd .src_sel_shift = 0,
2722f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2723f7b81d67SStephen Boyd },
2724f7b81d67SStephen Boyd .p[0] = {
2725f7b81d67SStephen Boyd .pre_div_shift = 3,
2726f7b81d67SStephen Boyd .pre_div_width = 4,
2727f7b81d67SStephen Boyd },
2728f7b81d67SStephen Boyd .p[1] = {
2729f7b81d67SStephen Boyd .pre_div_shift = 3,
2730f7b81d67SStephen Boyd .pre_div_width = 4,
2731f7b81d67SStephen Boyd },
2732f7b81d67SStephen Boyd .mux_sel_bit = 0,
2733f7b81d67SStephen Boyd .freq_tbl = clk_tbl_nss_tcm,
2734f7b81d67SStephen Boyd .clkr = {
2735f7b81d67SStephen Boyd .enable_reg = 0x3dc0,
2736f7b81d67SStephen Boyd .enable_mask = BIT(1),
2737f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2738f7b81d67SStephen Boyd .name = "nss_tcm_src",
2739cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0,
2740a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll14_pll18_pll0),
2741f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops,
2742f7b81d67SStephen Boyd },
2743f7b81d67SStephen Boyd },
2744f7b81d67SStephen Boyd };
2745f7b81d67SStephen Boyd
2746f7b81d67SStephen Boyd static struct clk_branch nss_tcm_clk = {
2747f7b81d67SStephen Boyd .halt_reg = 0x3c20,
2748f7b81d67SStephen Boyd .halt_bit = 14,
2749f7b81d67SStephen Boyd .clkr = {
2750f7b81d67SStephen Boyd .enable_reg = 0x3dd0,
2751f7b81d67SStephen Boyd .enable_mask = BIT(6) | BIT(4),
2752f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2753f7b81d67SStephen Boyd .name = "nss_tcm_clk",
2754cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2755cb02866fSAnsuel Smith &nss_tcm_src.clkr.hw,
2756f7b81d67SStephen Boyd },
2757f7b81d67SStephen Boyd .num_parents = 1,
2758f7b81d67SStephen Boyd .ops = &clk_branch_ops,
2759f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT,
2760f7b81d67SStephen Boyd },
2761f7b81d67SStephen Boyd },
2762f7b81d67SStephen Boyd };
2763f7b81d67SStephen Boyd
2764512ea2edSAnsuel Smith static const struct freq_tbl clk_tbl_nss_ipq8064[] = {
2765f7b81d67SStephen Boyd { 110000000, P_PLL18, 1, 1, 5 },
2766f7b81d67SStephen Boyd { 275000000, P_PLL18, 2, 0, 0 },
2767f7b81d67SStephen Boyd { 550000000, P_PLL18, 1, 0, 0 },
2768f7b81d67SStephen Boyd { 733000000, P_PLL18, 1, 0, 0 },
2769f7b81d67SStephen Boyd { }
2770f7b81d67SStephen Boyd };
2771f7b81d67SStephen Boyd
2772512ea2edSAnsuel Smith static const struct freq_tbl clk_tbl_nss_ipq8065[] = {
2773512ea2edSAnsuel Smith { 110000000, P_PLL18, 1, 1, 5 },
2774512ea2edSAnsuel Smith { 275000000, P_PLL18, 2, 0, 0 },
2775512ea2edSAnsuel Smith { 600000000, P_PLL18, 1, 0, 0 },
2776512ea2edSAnsuel Smith { 800000000, P_PLL18, 1, 0, 0 },
2777512ea2edSAnsuel Smith { }
2778512ea2edSAnsuel Smith };
2779512ea2edSAnsuel Smith
2780f7b81d67SStephen Boyd static struct clk_dyn_rcg ubi32_core1_src_clk = {
2781f7b81d67SStephen Boyd .ns_reg[0] = 0x3d2c,
2782f7b81d67SStephen Boyd .ns_reg[1] = 0x3d30,
2783f7b81d67SStephen Boyd .md_reg[0] = 0x3d24,
2784f7b81d67SStephen Boyd .md_reg[1] = 0x3d28,
2785f7b81d67SStephen Boyd .bank_reg = 0x3d20,
2786f7b81d67SStephen Boyd .mn[0] = {
2787f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2788f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2789f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2790f7b81d67SStephen Boyd .n_val_shift = 16,
2791f7b81d67SStephen Boyd .m_val_shift = 16,
2792f7b81d67SStephen Boyd .width = 8,
2793f7b81d67SStephen Boyd },
2794f7b81d67SStephen Boyd .mn[1] = {
2795f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2796f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2797f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2798f7b81d67SStephen Boyd .n_val_shift = 16,
2799f7b81d67SStephen Boyd .m_val_shift = 16,
2800f7b81d67SStephen Boyd .width = 8,
2801f7b81d67SStephen Boyd },
2802f7b81d67SStephen Boyd .s[0] = {
2803f7b81d67SStephen Boyd .src_sel_shift = 0,
2804f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2805f7b81d67SStephen Boyd },
2806f7b81d67SStephen Boyd .s[1] = {
2807f7b81d67SStephen Boyd .src_sel_shift = 0,
2808f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2809f7b81d67SStephen Boyd },
2810f7b81d67SStephen Boyd .p[0] = {
2811f7b81d67SStephen Boyd .pre_div_shift = 3,
2812f7b81d67SStephen Boyd .pre_div_width = 2,
2813f7b81d67SStephen Boyd },
2814f7b81d67SStephen Boyd .p[1] = {
2815f7b81d67SStephen Boyd .pre_div_shift = 3,
2816f7b81d67SStephen Boyd .pre_div_width = 2,
2817f7b81d67SStephen Boyd },
2818f7b81d67SStephen Boyd .mux_sel_bit = 0,
2819512ea2edSAnsuel Smith /* nss freq table is selected based on the SoC compatible */
2820f7b81d67SStephen Boyd .clkr = {
2821f7b81d67SStephen Boyd .enable_reg = 0x3d20,
2822f7b81d67SStephen Boyd .enable_mask = BIT(1),
2823f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2824f7b81d67SStephen Boyd .name = "ubi32_core1_src_clk",
2825cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0,
2826a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll14_pll18_pll0),
2827f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops,
2828f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE,
2829f7b81d67SStephen Boyd },
2830f7b81d67SStephen Boyd },
2831f7b81d67SStephen Boyd };
2832f7b81d67SStephen Boyd
2833f7b81d67SStephen Boyd static struct clk_dyn_rcg ubi32_core2_src_clk = {
2834f7b81d67SStephen Boyd .ns_reg[0] = 0x3d4c,
2835f7b81d67SStephen Boyd .ns_reg[1] = 0x3d50,
2836f7b81d67SStephen Boyd .md_reg[0] = 0x3d44,
2837f7b81d67SStephen Boyd .md_reg[1] = 0x3d48,
2838f7b81d67SStephen Boyd .bank_reg = 0x3d40,
2839f7b81d67SStephen Boyd .mn[0] = {
2840f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2841f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2842f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2843f7b81d67SStephen Boyd .n_val_shift = 16,
2844f7b81d67SStephen Boyd .m_val_shift = 16,
2845f7b81d67SStephen Boyd .width = 8,
2846f7b81d67SStephen Boyd },
2847f7b81d67SStephen Boyd .mn[1] = {
2848f7b81d67SStephen Boyd .mnctr_en_bit = 8,
2849f7b81d67SStephen Boyd .mnctr_reset_bit = 7,
2850f7b81d67SStephen Boyd .mnctr_mode_shift = 5,
2851f7b81d67SStephen Boyd .n_val_shift = 16,
2852f7b81d67SStephen Boyd .m_val_shift = 16,
2853f7b81d67SStephen Boyd .width = 8,
2854f7b81d67SStephen Boyd },
2855f7b81d67SStephen Boyd .s[0] = {
2856f7b81d67SStephen Boyd .src_sel_shift = 0,
2857f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2858f7b81d67SStephen Boyd },
2859f7b81d67SStephen Boyd .s[1] = {
2860f7b81d67SStephen Boyd .src_sel_shift = 0,
2861f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map,
2862f7b81d67SStephen Boyd },
2863f7b81d67SStephen Boyd .p[0] = {
2864f7b81d67SStephen Boyd .pre_div_shift = 3,
2865f7b81d67SStephen Boyd .pre_div_width = 2,
2866f7b81d67SStephen Boyd },
2867f7b81d67SStephen Boyd .p[1] = {
2868f7b81d67SStephen Boyd .pre_div_shift = 3,
2869f7b81d67SStephen Boyd .pre_div_width = 2,
2870f7b81d67SStephen Boyd },
2871f7b81d67SStephen Boyd .mux_sel_bit = 0,
2872512ea2edSAnsuel Smith /* nss freq table is selected based on the SoC compatible */
2873f7b81d67SStephen Boyd .clkr = {
2874f7b81d67SStephen Boyd .enable_reg = 0x3d40,
2875f7b81d67SStephen Boyd .enable_mask = BIT(1),
2876f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){
2877f7b81d67SStephen Boyd .name = "ubi32_core2_src_clk",
2878cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0,
2879a6aedd65SAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll14_pll18_pll0),
2880f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops,
2881f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE,
2882f7b81d67SStephen Boyd },
2883f7b81d67SStephen Boyd },
2884f7b81d67SStephen Boyd };
2885f7b81d67SStephen Boyd
2886b293510fSAnsuel Smith static const struct freq_tbl clk_tbl_ce5_core[] = {
2887b293510fSAnsuel Smith { 150000000, P_PLL3, 8, 1, 1 },
2888b293510fSAnsuel Smith { 213200000, P_PLL11, 5, 1, 1 },
2889b293510fSAnsuel Smith { }
2890b293510fSAnsuel Smith };
2891b293510fSAnsuel Smith
2892b293510fSAnsuel Smith static struct clk_dyn_rcg ce5_core_src = {
2893b293510fSAnsuel Smith .ns_reg[0] = 0x36C4,
2894b293510fSAnsuel Smith .ns_reg[1] = 0x36C8,
2895b293510fSAnsuel Smith .bank_reg = 0x36C0,
2896b293510fSAnsuel Smith .s[0] = {
2897b293510fSAnsuel Smith .src_sel_shift = 0,
2898b293510fSAnsuel Smith .parent_map = gcc_pxo_pll3_pll0_pll14_pll18_pll11_map,
2899b293510fSAnsuel Smith },
2900b293510fSAnsuel Smith .s[1] = {
2901b293510fSAnsuel Smith .src_sel_shift = 0,
2902b293510fSAnsuel Smith .parent_map = gcc_pxo_pll3_pll0_pll14_pll18_pll11_map,
2903b293510fSAnsuel Smith },
2904b293510fSAnsuel Smith .p[0] = {
2905b293510fSAnsuel Smith .pre_div_shift = 3,
2906b293510fSAnsuel Smith .pre_div_width = 4,
2907b293510fSAnsuel Smith },
2908b293510fSAnsuel Smith .p[1] = {
2909b293510fSAnsuel Smith .pre_div_shift = 3,
2910b293510fSAnsuel Smith .pre_div_width = 4,
2911b293510fSAnsuel Smith },
2912b293510fSAnsuel Smith .mux_sel_bit = 0,
2913b293510fSAnsuel Smith .freq_tbl = clk_tbl_ce5_core,
2914b293510fSAnsuel Smith .clkr = {
2915b293510fSAnsuel Smith .enable_reg = 0x36C0,
2916b293510fSAnsuel Smith .enable_mask = BIT(1),
2917b293510fSAnsuel Smith .hw.init = &(struct clk_init_data){
2918b293510fSAnsuel Smith .name = "ce5_core_src",
2919b293510fSAnsuel Smith .parent_data = gcc_pxo_pll3_pll0_pll14_pll18_pll11,
2920b293510fSAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll3_pll0_pll14_pll18_pll11),
2921b293510fSAnsuel Smith .ops = &clk_dyn_rcg_ops,
2922b293510fSAnsuel Smith },
2923b293510fSAnsuel Smith },
2924b293510fSAnsuel Smith };
2925b293510fSAnsuel Smith
2926b293510fSAnsuel Smith static struct clk_branch ce5_core_clk = {
2927b293510fSAnsuel Smith .halt_reg = 0x2FDC,
2928b293510fSAnsuel Smith .halt_bit = 5,
2929b293510fSAnsuel Smith .hwcg_reg = 0x36CC,
2930b293510fSAnsuel Smith .hwcg_bit = 6,
2931b293510fSAnsuel Smith .clkr = {
2932b293510fSAnsuel Smith .enable_reg = 0x36CC,
2933b293510fSAnsuel Smith .enable_mask = BIT(4),
2934b293510fSAnsuel Smith .hw.init = &(struct clk_init_data){
2935b293510fSAnsuel Smith .name = "ce5_core_clk",
2936b293510fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2937b293510fSAnsuel Smith &ce5_core_src.clkr.hw,
2938b293510fSAnsuel Smith },
2939b293510fSAnsuel Smith .num_parents = 1,
2940b293510fSAnsuel Smith .ops = &clk_branch_ops,
2941b293510fSAnsuel Smith .flags = CLK_SET_RATE_PARENT,
2942b293510fSAnsuel Smith },
2943b293510fSAnsuel Smith },
2944b293510fSAnsuel Smith };
2945b293510fSAnsuel Smith
2946b293510fSAnsuel Smith static const struct freq_tbl clk_tbl_ce5_a_clk[] = {
2947b293510fSAnsuel Smith { 160000000, P_PLL0, 5, 1, 1 },
2948b293510fSAnsuel Smith { 213200000, P_PLL11, 5, 1, 1 },
2949b293510fSAnsuel Smith { }
2950b293510fSAnsuel Smith };
2951b293510fSAnsuel Smith
2952b293510fSAnsuel Smith static struct clk_dyn_rcg ce5_a_clk_src = {
2953b293510fSAnsuel Smith .ns_reg[0] = 0x3d84,
2954b293510fSAnsuel Smith .ns_reg[1] = 0x3d88,
2955b293510fSAnsuel Smith .bank_reg = 0x3d80,
2956b293510fSAnsuel Smith .s[0] = {
2957b293510fSAnsuel Smith .src_sel_shift = 0,
2958b293510fSAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
2959b293510fSAnsuel Smith },
2960b293510fSAnsuel Smith .s[1] = {
2961b293510fSAnsuel Smith .src_sel_shift = 0,
2962b293510fSAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
2963b293510fSAnsuel Smith },
2964b293510fSAnsuel Smith .p[0] = {
2965b293510fSAnsuel Smith .pre_div_shift = 3,
2966b293510fSAnsuel Smith .pre_div_width = 4,
2967b293510fSAnsuel Smith },
2968b293510fSAnsuel Smith .p[1] = {
2969b293510fSAnsuel Smith .pre_div_shift = 3,
2970b293510fSAnsuel Smith .pre_div_width = 4,
2971b293510fSAnsuel Smith },
2972b293510fSAnsuel Smith .mux_sel_bit = 0,
2973b293510fSAnsuel Smith .freq_tbl = clk_tbl_ce5_a_clk,
2974b293510fSAnsuel Smith .clkr = {
2975b293510fSAnsuel Smith .enable_reg = 0x3d80,
2976b293510fSAnsuel Smith .enable_mask = BIT(1),
2977b293510fSAnsuel Smith .hw.init = &(struct clk_init_data){
2978b293510fSAnsuel Smith .name = "ce5_a_clk_src",
2979b293510fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0_pll14_pll18_pll11,
2980b293510fSAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll0_pll14_pll18_pll11),
2981b293510fSAnsuel Smith .ops = &clk_dyn_rcg_ops,
2982b293510fSAnsuel Smith },
2983b293510fSAnsuel Smith },
2984b293510fSAnsuel Smith };
2985b293510fSAnsuel Smith
2986b293510fSAnsuel Smith static struct clk_branch ce5_a_clk = {
2987b293510fSAnsuel Smith .halt_reg = 0x3c20,
2988b293510fSAnsuel Smith .halt_bit = 12,
2989b293510fSAnsuel Smith .hwcg_reg = 0x3d8c,
2990b293510fSAnsuel Smith .hwcg_bit = 6,
2991b293510fSAnsuel Smith .clkr = {
2992b293510fSAnsuel Smith .enable_reg = 0x3d8c,
2993b293510fSAnsuel Smith .enable_mask = BIT(4),
2994b293510fSAnsuel Smith .hw.init = &(struct clk_init_data){
2995b293510fSAnsuel Smith .name = "ce5_a_clk",
2996b293510fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
2997b293510fSAnsuel Smith &ce5_a_clk_src.clkr.hw,
2998b293510fSAnsuel Smith },
2999b293510fSAnsuel Smith .num_parents = 1,
3000b293510fSAnsuel Smith .ops = &clk_branch_ops,
3001b293510fSAnsuel Smith .flags = CLK_SET_RATE_PARENT,
3002b293510fSAnsuel Smith },
3003b293510fSAnsuel Smith },
3004b293510fSAnsuel Smith };
3005b293510fSAnsuel Smith
3006b293510fSAnsuel Smith static const struct freq_tbl clk_tbl_ce5_h_clk[] = {
3007b293510fSAnsuel Smith { 160000000, P_PLL0, 5, 1, 1 },
3008b293510fSAnsuel Smith { 213200000, P_PLL11, 5, 1, 1 },
3009b293510fSAnsuel Smith { }
3010b293510fSAnsuel Smith };
3011b293510fSAnsuel Smith
3012b293510fSAnsuel Smith static struct clk_dyn_rcg ce5_h_clk_src = {
3013b293510fSAnsuel Smith .ns_reg[0] = 0x3c64,
3014b293510fSAnsuel Smith .ns_reg[1] = 0x3c68,
3015b293510fSAnsuel Smith .bank_reg = 0x3c60,
3016b293510fSAnsuel Smith .s[0] = {
3017b293510fSAnsuel Smith .src_sel_shift = 0,
3018b293510fSAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
3019b293510fSAnsuel Smith },
3020b293510fSAnsuel Smith .s[1] = {
3021b293510fSAnsuel Smith .src_sel_shift = 0,
3022b293510fSAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
3023b293510fSAnsuel Smith },
3024b293510fSAnsuel Smith .p[0] = {
3025b293510fSAnsuel Smith .pre_div_shift = 3,
3026b293510fSAnsuel Smith .pre_div_width = 4,
3027b293510fSAnsuel Smith },
3028b293510fSAnsuel Smith .p[1] = {
3029b293510fSAnsuel Smith .pre_div_shift = 3,
3030b293510fSAnsuel Smith .pre_div_width = 4,
3031b293510fSAnsuel Smith },
3032b293510fSAnsuel Smith .mux_sel_bit = 0,
3033b293510fSAnsuel Smith .freq_tbl = clk_tbl_ce5_h_clk,
3034b293510fSAnsuel Smith .clkr = {
3035b293510fSAnsuel Smith .enable_reg = 0x3c60,
3036b293510fSAnsuel Smith .enable_mask = BIT(1),
3037b293510fSAnsuel Smith .hw.init = &(struct clk_init_data){
3038b293510fSAnsuel Smith .name = "ce5_h_clk_src",
3039b293510fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0_pll14_pll18_pll11,
3040b293510fSAnsuel Smith .num_parents = ARRAY_SIZE(gcc_pxo_pll8_pll0_pll14_pll18_pll11),
3041b293510fSAnsuel Smith .ops = &clk_dyn_rcg_ops,
3042b293510fSAnsuel Smith },
3043b293510fSAnsuel Smith },
3044b293510fSAnsuel Smith };
3045b293510fSAnsuel Smith
3046b293510fSAnsuel Smith static struct clk_branch ce5_h_clk = {
3047b293510fSAnsuel Smith .halt_reg = 0x3c20,
3048b293510fSAnsuel Smith .halt_bit = 11,
3049b293510fSAnsuel Smith .hwcg_reg = 0x3c6c,
3050b293510fSAnsuel Smith .hwcg_bit = 6,
3051b293510fSAnsuel Smith .clkr = {
3052b293510fSAnsuel Smith .enable_reg = 0x3c6c,
3053b293510fSAnsuel Smith .enable_mask = BIT(4),
3054b293510fSAnsuel Smith .hw.init = &(struct clk_init_data){
3055b293510fSAnsuel Smith .name = "ce5_h_clk",
3056b293510fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){
3057b293510fSAnsuel Smith &ce5_h_clk_src.clkr.hw,
3058b293510fSAnsuel Smith },
3059b293510fSAnsuel Smith .num_parents = 1,
3060b293510fSAnsuel Smith .ops = &clk_branch_ops,
3061b293510fSAnsuel Smith .flags = CLK_SET_RATE_PARENT,
3062b293510fSAnsuel Smith },
3063b293510fSAnsuel Smith },
3064b293510fSAnsuel Smith };
3065b293510fSAnsuel Smith
306624d8fba4SKumar Gala static struct clk_regmap *gcc_ipq806x_clks[] = {
3067dc1b3f65SAndy Gross [PLL0] = &pll0.clkr,
3068dc1b3f65SAndy Gross [PLL0_VOTE] = &pll0_vote,
306924d8fba4SKumar Gala [PLL3] = &pll3.clkr,
3070c99e515aSRajendra Nayak [PLL4_VOTE] = &pll4_vote,
307124d8fba4SKumar Gala [PLL8] = &pll8.clkr,
307224d8fba4SKumar Gala [PLL8_VOTE] = &pll8_vote,
3073b293510fSAnsuel Smith [PLL11] = &pll11.clkr,
307424d8fba4SKumar Gala [PLL14] = &pll14.clkr,
307524d8fba4SKumar Gala [PLL14_VOTE] = &pll14_vote,
3076f7b81d67SStephen Boyd [PLL18] = &pll18.clkr,
307724d8fba4SKumar Gala [GSBI1_UART_SRC] = &gsbi1_uart_src.clkr,
307824d8fba4SKumar Gala [GSBI1_UART_CLK] = &gsbi1_uart_clk.clkr,
307924d8fba4SKumar Gala [GSBI2_UART_SRC] = &gsbi2_uart_src.clkr,
308024d8fba4SKumar Gala [GSBI2_UART_CLK] = &gsbi2_uart_clk.clkr,
308124d8fba4SKumar Gala [GSBI4_UART_SRC] = &gsbi4_uart_src.clkr,
308224d8fba4SKumar Gala [GSBI4_UART_CLK] = &gsbi4_uart_clk.clkr,
308324d8fba4SKumar Gala [GSBI5_UART_SRC] = &gsbi5_uart_src.clkr,
308424d8fba4SKumar Gala [GSBI5_UART_CLK] = &gsbi5_uart_clk.clkr,
308524d8fba4SKumar Gala [GSBI6_UART_SRC] = &gsbi6_uart_src.clkr,
308624d8fba4SKumar Gala [GSBI6_UART_CLK] = &gsbi6_uart_clk.clkr,
308724d8fba4SKumar Gala [GSBI7_UART_SRC] = &gsbi7_uart_src.clkr,
308824d8fba4SKumar Gala [GSBI7_UART_CLK] = &gsbi7_uart_clk.clkr,
308924d8fba4SKumar Gala [GSBI1_QUP_SRC] = &gsbi1_qup_src.clkr,
309024d8fba4SKumar Gala [GSBI1_QUP_CLK] = &gsbi1_qup_clk.clkr,
309124d8fba4SKumar Gala [GSBI2_QUP_SRC] = &gsbi2_qup_src.clkr,
309224d8fba4SKumar Gala [GSBI2_QUP_CLK] = &gsbi2_qup_clk.clkr,
309324d8fba4SKumar Gala [GSBI4_QUP_SRC] = &gsbi4_qup_src.clkr,
309424d8fba4SKumar Gala [GSBI4_QUP_CLK] = &gsbi4_qup_clk.clkr,
309524d8fba4SKumar Gala [GSBI5_QUP_SRC] = &gsbi5_qup_src.clkr,
309624d8fba4SKumar Gala [GSBI5_QUP_CLK] = &gsbi5_qup_clk.clkr,
309724d8fba4SKumar Gala [GSBI6_QUP_SRC] = &gsbi6_qup_src.clkr,
309824d8fba4SKumar Gala [GSBI6_QUP_CLK] = &gsbi6_qup_clk.clkr,
309924d8fba4SKumar Gala [GSBI7_QUP_SRC] = &gsbi7_qup_src.clkr,
310024d8fba4SKumar Gala [GSBI7_QUP_CLK] = &gsbi7_qup_clk.clkr,
310124d8fba4SKumar Gala [GP0_SRC] = &gp0_src.clkr,
310224d8fba4SKumar Gala [GP0_CLK] = &gp0_clk.clkr,
310324d8fba4SKumar Gala [GP1_SRC] = &gp1_src.clkr,
310424d8fba4SKumar Gala [GP1_CLK] = &gp1_clk.clkr,
310524d8fba4SKumar Gala [GP2_SRC] = &gp2_src.clkr,
310624d8fba4SKumar Gala [GP2_CLK] = &gp2_clk.clkr,
310724d8fba4SKumar Gala [PMEM_A_CLK] = &pmem_clk.clkr,
310824d8fba4SKumar Gala [PRNG_SRC] = &prng_src.clkr,
310924d8fba4SKumar Gala [PRNG_CLK] = &prng_clk.clkr,
311024d8fba4SKumar Gala [SDC1_SRC] = &sdc1_src.clkr,
311124d8fba4SKumar Gala [SDC1_CLK] = &sdc1_clk.clkr,
311224d8fba4SKumar Gala [SDC3_SRC] = &sdc3_src.clkr,
311324d8fba4SKumar Gala [SDC3_CLK] = &sdc3_clk.clkr,
311424d8fba4SKumar Gala [TSIF_REF_SRC] = &tsif_ref_src.clkr,
311524d8fba4SKumar Gala [TSIF_REF_CLK] = &tsif_ref_clk.clkr,
311624d8fba4SKumar Gala [DMA_BAM_H_CLK] = &dma_bam_h_clk.clkr,
311724d8fba4SKumar Gala [GSBI1_H_CLK] = &gsbi1_h_clk.clkr,
311824d8fba4SKumar Gala [GSBI2_H_CLK] = &gsbi2_h_clk.clkr,
311924d8fba4SKumar Gala [GSBI4_H_CLK] = &gsbi4_h_clk.clkr,
312024d8fba4SKumar Gala [GSBI5_H_CLK] = &gsbi5_h_clk.clkr,
312124d8fba4SKumar Gala [GSBI6_H_CLK] = &gsbi6_h_clk.clkr,
312224d8fba4SKumar Gala [GSBI7_H_CLK] = &gsbi7_h_clk.clkr,
312324d8fba4SKumar Gala [TSIF_H_CLK] = &tsif_h_clk.clkr,
312424d8fba4SKumar Gala [SDC1_H_CLK] = &sdc1_h_clk.clkr,
312524d8fba4SKumar Gala [SDC3_H_CLK] = &sdc3_h_clk.clkr,
312624d8fba4SKumar Gala [ADM0_CLK] = &adm0_clk.clkr,
312724d8fba4SKumar Gala [ADM0_PBUS_CLK] = &adm0_pbus_clk.clkr,
312824d8fba4SKumar Gala [PCIE_A_CLK] = &pcie_a_clk.clkr,
312924d8fba4SKumar Gala [PCIE_AUX_CLK] = &pcie_aux_clk.clkr,
313024d8fba4SKumar Gala [PCIE_H_CLK] = &pcie_h_clk.clkr,
313124d8fba4SKumar Gala [PCIE_PHY_CLK] = &pcie_phy_clk.clkr,
313224d8fba4SKumar Gala [SFAB_SATA_S_H_CLK] = &sfab_sata_s_h_clk.clkr,
313324d8fba4SKumar Gala [PMIC_ARB0_H_CLK] = &pmic_arb0_h_clk.clkr,
313424d8fba4SKumar Gala [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr,
313524d8fba4SKumar Gala [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr,
313624d8fba4SKumar Gala [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr,
313724d8fba4SKumar Gala [SATA_H_CLK] = &sata_h_clk.clkr,
313824d8fba4SKumar Gala [SATA_CLK_SRC] = &sata_ref_src.clkr,
313924d8fba4SKumar Gala [SATA_RXOOB_CLK] = &sata_rxoob_clk.clkr,
314024d8fba4SKumar Gala [SATA_PMALIVE_CLK] = &sata_pmalive_clk.clkr,
314124d8fba4SKumar Gala [SATA_PHY_REF_CLK] = &sata_phy_ref_clk.clkr,
314224d8fba4SKumar Gala [SATA_A_CLK] = &sata_a_clk.clkr,
314324d8fba4SKumar Gala [SATA_PHY_CFG_CLK] = &sata_phy_cfg_clk.clkr,
314424d8fba4SKumar Gala [PCIE_ALT_REF_SRC] = &pcie_ref_src.clkr,
314524d8fba4SKumar Gala [PCIE_ALT_REF_CLK] = &pcie_ref_src_clk.clkr,
314624d8fba4SKumar Gala [PCIE_1_A_CLK] = &pcie1_a_clk.clkr,
314724d8fba4SKumar Gala [PCIE_1_AUX_CLK] = &pcie1_aux_clk.clkr,
314824d8fba4SKumar Gala [PCIE_1_H_CLK] = &pcie1_h_clk.clkr,
314924d8fba4SKumar Gala [PCIE_1_PHY_CLK] = &pcie1_phy_clk.clkr,
315024d8fba4SKumar Gala [PCIE_1_ALT_REF_SRC] = &pcie1_ref_src.clkr,
315124d8fba4SKumar Gala [PCIE_1_ALT_REF_CLK] = &pcie1_ref_src_clk.clkr,
315224d8fba4SKumar Gala [PCIE_2_A_CLK] = &pcie2_a_clk.clkr,
315324d8fba4SKumar Gala [PCIE_2_AUX_CLK] = &pcie2_aux_clk.clkr,
315424d8fba4SKumar Gala [PCIE_2_H_CLK] = &pcie2_h_clk.clkr,
315524d8fba4SKumar Gala [PCIE_2_PHY_CLK] = &pcie2_phy_clk.clkr,
315624d8fba4SKumar Gala [PCIE_2_ALT_REF_SRC] = &pcie2_ref_src.clkr,
315724d8fba4SKumar Gala [PCIE_2_ALT_REF_CLK] = &pcie2_ref_src_clk.clkr,
315824d8fba4SKumar Gala [USB30_MASTER_SRC] = &usb30_master_clk_src.clkr,
315924d8fba4SKumar Gala [USB30_0_MASTER_CLK] = &usb30_0_branch_clk.clkr,
316024d8fba4SKumar Gala [USB30_1_MASTER_CLK] = &usb30_1_branch_clk.clkr,
316124d8fba4SKumar Gala [USB30_UTMI_SRC] = &usb30_utmi_clk.clkr,
316224d8fba4SKumar Gala [USB30_0_UTMI_CLK] = &usb30_0_utmi_clk_ctl.clkr,
316324d8fba4SKumar Gala [USB30_1_UTMI_CLK] = &usb30_1_utmi_clk_ctl.clkr,
316424d8fba4SKumar Gala [USB_HS1_H_CLK] = &usb_hs1_h_clk.clkr,
316524d8fba4SKumar Gala [USB_HS1_XCVR_SRC] = &usb_hs1_xcvr_clk_src.clkr,
316624d8fba4SKumar Gala [USB_HS1_XCVR_CLK] = &usb_hs1_xcvr_clk.clkr,
316724d8fba4SKumar Gala [USB_FS1_H_CLK] = &usb_fs1_h_clk.clkr,
316824d8fba4SKumar Gala [USB_FS1_XCVR_SRC] = &usb_fs1_xcvr_clk_src.clkr,
316924d8fba4SKumar Gala [USB_FS1_XCVR_CLK] = &usb_fs1_xcvr_clk.clkr,
317024d8fba4SKumar Gala [USB_FS1_SYSTEM_CLK] = &usb_fs1_sys_clk.clkr,
31714c385b25SArchit Taneja [EBI2_CLK] = &ebi2_clk.clkr,
31724c385b25SArchit Taneja [EBI2_AON_CLK] = &ebi2_aon_clk.clkr,
3173f7b81d67SStephen Boyd [GMAC_CORE1_CLK_SRC] = &gmac_core1_src.clkr,
3174f7b81d67SStephen Boyd [GMAC_CORE1_CLK] = &gmac_core1_clk.clkr,
3175f7b81d67SStephen Boyd [GMAC_CORE2_CLK_SRC] = &gmac_core2_src.clkr,
3176f7b81d67SStephen Boyd [GMAC_CORE2_CLK] = &gmac_core2_clk.clkr,
3177f7b81d67SStephen Boyd [GMAC_CORE3_CLK_SRC] = &gmac_core3_src.clkr,
3178f7b81d67SStephen Boyd [GMAC_CORE3_CLK] = &gmac_core3_clk.clkr,
3179f7b81d67SStephen Boyd [GMAC_CORE4_CLK_SRC] = &gmac_core4_src.clkr,
3180f7b81d67SStephen Boyd [GMAC_CORE4_CLK] = &gmac_core4_clk.clkr,
3181f7b81d67SStephen Boyd [UBI32_CORE1_CLK_SRC] = &ubi32_core1_src_clk.clkr,
3182f7b81d67SStephen Boyd [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr,
3183f7b81d67SStephen Boyd [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr,
3184f7b81d67SStephen Boyd [NSSTCM_CLK] = &nss_tcm_clk.clkr,
31851f79131bSStephen Boyd [PLL9] = &hfpll0.clkr,
31861f79131bSStephen Boyd [PLL10] = &hfpll1.clkr,
31871f79131bSStephen Boyd [PLL12] = &hfpll_l2.clkr,
3188b293510fSAnsuel Smith [CE5_A_CLK_SRC] = &ce5_a_clk_src.clkr,
3189b293510fSAnsuel Smith [CE5_A_CLK] = &ce5_a_clk.clkr,
3190b293510fSAnsuel Smith [CE5_H_CLK_SRC] = &ce5_h_clk_src.clkr,
3191b293510fSAnsuel Smith [CE5_H_CLK] = &ce5_h_clk.clkr,
3192b293510fSAnsuel Smith [CE5_CORE_CLK_SRC] = &ce5_core_src.clkr,
3193b293510fSAnsuel Smith [CE5_CORE_CLK] = &ce5_core_clk.clkr,
319424d8fba4SKumar Gala };
319524d8fba4SKumar Gala
319624d8fba4SKumar Gala static const struct qcom_reset_map gcc_ipq806x_resets[] = {
319724d8fba4SKumar Gala [QDSS_STM_RESET] = { 0x2060, 6 },
319824d8fba4SKumar Gala [AFAB_SMPSS_S_RESET] = { 0x20b8, 2 },
319924d8fba4SKumar Gala [AFAB_SMPSS_M1_RESET] = { 0x20b8, 1 },
320024d8fba4SKumar Gala [AFAB_SMPSS_M0_RESET] = { 0x20b8, 0 },
320124d8fba4SKumar Gala [AFAB_EBI1_CH0_RESET] = { 0x20c0, 7 },
320224d8fba4SKumar Gala [AFAB_EBI1_CH1_RESET] = { 0x20c4, 7 },
320324d8fba4SKumar Gala [SFAB_ADM0_M0_RESET] = { 0x21e0, 7 },
320424d8fba4SKumar Gala [SFAB_ADM0_M1_RESET] = { 0x21e4, 7 },
320524d8fba4SKumar Gala [SFAB_ADM0_M2_RESET] = { 0x21e8, 7 },
320624d8fba4SKumar Gala [ADM0_C2_RESET] = { 0x220c, 4 },
320724d8fba4SKumar Gala [ADM0_C1_RESET] = { 0x220c, 3 },
320824d8fba4SKumar Gala [ADM0_C0_RESET] = { 0x220c, 2 },
320924d8fba4SKumar Gala [ADM0_PBUS_RESET] = { 0x220c, 1 },
321024d8fba4SKumar Gala [ADM0_RESET] = { 0x220c, 0 },
321124d8fba4SKumar Gala [QDSS_CLKS_SW_RESET] = { 0x2260, 5 },
321224d8fba4SKumar Gala [QDSS_POR_RESET] = { 0x2260, 4 },
321324d8fba4SKumar Gala [QDSS_TSCTR_RESET] = { 0x2260, 3 },
321424d8fba4SKumar Gala [QDSS_HRESET_RESET] = { 0x2260, 2 },
321524d8fba4SKumar Gala [QDSS_AXI_RESET] = { 0x2260, 1 },
321624d8fba4SKumar Gala [QDSS_DBG_RESET] = { 0x2260, 0 },
321724d8fba4SKumar Gala [SFAB_PCIE_M_RESET] = { 0x22d8, 1 },
321824d8fba4SKumar Gala [SFAB_PCIE_S_RESET] = { 0x22d8, 0 },
321924d8fba4SKumar Gala [PCIE_EXT_RESET] = { 0x22dc, 6 },
322024d8fba4SKumar Gala [PCIE_PHY_RESET] = { 0x22dc, 5 },
322124d8fba4SKumar Gala [PCIE_PCI_RESET] = { 0x22dc, 4 },
322224d8fba4SKumar Gala [PCIE_POR_RESET] = { 0x22dc, 3 },
322324d8fba4SKumar Gala [PCIE_HCLK_RESET] = { 0x22dc, 2 },
322424d8fba4SKumar Gala [PCIE_ACLK_RESET] = { 0x22dc, 0 },
322524d8fba4SKumar Gala [SFAB_LPASS_RESET] = { 0x23a0, 7 },
322624d8fba4SKumar Gala [SFAB_AFAB_M_RESET] = { 0x23e0, 7 },
322724d8fba4SKumar Gala [AFAB_SFAB_M0_RESET] = { 0x2420, 7 },
322824d8fba4SKumar Gala [AFAB_SFAB_M1_RESET] = { 0x2424, 7 },
322924d8fba4SKumar Gala [SFAB_SATA_S_RESET] = { 0x2480, 7 },
323024d8fba4SKumar Gala [SFAB_DFAB_M_RESET] = { 0x2500, 7 },
323124d8fba4SKumar Gala [DFAB_SFAB_M_RESET] = { 0x2520, 7 },
323224d8fba4SKumar Gala [DFAB_SWAY0_RESET] = { 0x2540, 7 },
323324d8fba4SKumar Gala [DFAB_SWAY1_RESET] = { 0x2544, 7 },
323424d8fba4SKumar Gala [DFAB_ARB0_RESET] = { 0x2560, 7 },
323524d8fba4SKumar Gala [DFAB_ARB1_RESET] = { 0x2564, 7 },
323624d8fba4SKumar Gala [PPSS_PROC_RESET] = { 0x2594, 1 },
323724d8fba4SKumar Gala [PPSS_RESET] = { 0x2594, 0 },
323824d8fba4SKumar Gala [DMA_BAM_RESET] = { 0x25c0, 7 },
323924d8fba4SKumar Gala [SPS_TIC_H_RESET] = { 0x2600, 7 },
324024d8fba4SKumar Gala [SFAB_CFPB_M_RESET] = { 0x2680, 7 },
324124d8fba4SKumar Gala [SFAB_CFPB_S_RESET] = { 0x26c0, 7 },
324224d8fba4SKumar Gala [TSIF_H_RESET] = { 0x2700, 7 },
324324d8fba4SKumar Gala [CE1_H_RESET] = { 0x2720, 7 },
324424d8fba4SKumar Gala [CE1_CORE_RESET] = { 0x2724, 7 },
324524d8fba4SKumar Gala [CE1_SLEEP_RESET] = { 0x2728, 7 },
324624d8fba4SKumar Gala [CE2_H_RESET] = { 0x2740, 7 },
324724d8fba4SKumar Gala [CE2_CORE_RESET] = { 0x2744, 7 },
324824d8fba4SKumar Gala [SFAB_SFPB_M_RESET] = { 0x2780, 7 },
324924d8fba4SKumar Gala [SFAB_SFPB_S_RESET] = { 0x27a0, 7 },
325024d8fba4SKumar Gala [RPM_PROC_RESET] = { 0x27c0, 7 },
325124d8fba4SKumar Gala [PMIC_SSBI2_RESET] = { 0x280c, 12 },
325224d8fba4SKumar Gala [SDC1_RESET] = { 0x2830, 0 },
325324d8fba4SKumar Gala [SDC2_RESET] = { 0x2850, 0 },
325424d8fba4SKumar Gala [SDC3_RESET] = { 0x2870, 0 },
325524d8fba4SKumar Gala [SDC4_RESET] = { 0x2890, 0 },
325624d8fba4SKumar Gala [USB_HS1_RESET] = { 0x2910, 0 },
325724d8fba4SKumar Gala [USB_HSIC_RESET] = { 0x2934, 0 },
325824d8fba4SKumar Gala [USB_FS1_XCVR_RESET] = { 0x2974, 1 },
325924d8fba4SKumar Gala [USB_FS1_RESET] = { 0x2974, 0 },
326024d8fba4SKumar Gala [GSBI1_RESET] = { 0x29dc, 0 },
326124d8fba4SKumar Gala [GSBI2_RESET] = { 0x29fc, 0 },
326224d8fba4SKumar Gala [GSBI3_RESET] = { 0x2a1c, 0 },
326324d8fba4SKumar Gala [GSBI4_RESET] = { 0x2a3c, 0 },
326424d8fba4SKumar Gala [GSBI5_RESET] = { 0x2a5c, 0 },
326524d8fba4SKumar Gala [GSBI6_RESET] = { 0x2a7c, 0 },
326624d8fba4SKumar Gala [GSBI7_RESET] = { 0x2a9c, 0 },
326724d8fba4SKumar Gala [SPDM_RESET] = { 0x2b6c, 0 },
326824d8fba4SKumar Gala [SEC_CTRL_RESET] = { 0x2b80, 7 },
326924d8fba4SKumar Gala [TLMM_H_RESET] = { 0x2ba0, 7 },
327024d8fba4SKumar Gala [SFAB_SATA_M_RESET] = { 0x2c18, 0 },
327124d8fba4SKumar Gala [SATA_RESET] = { 0x2c1c, 0 },
327224d8fba4SKumar Gala [TSSC_RESET] = { 0x2ca0, 7 },
327324d8fba4SKumar Gala [PDM_RESET] = { 0x2cc0, 12 },
327424d8fba4SKumar Gala [MPM_H_RESET] = { 0x2da0, 7 },
327524d8fba4SKumar Gala [MPM_RESET] = { 0x2da4, 0 },
327624d8fba4SKumar Gala [SFAB_SMPSS_S_RESET] = { 0x2e00, 7 },
327724d8fba4SKumar Gala [PRNG_RESET] = { 0x2e80, 12 },
327824d8fba4SKumar Gala [SFAB_CE3_M_RESET] = { 0x36c8, 1 },
327924d8fba4SKumar Gala [SFAB_CE3_S_RESET] = { 0x36c8, 0 },
328024d8fba4SKumar Gala [CE3_SLEEP_RESET] = { 0x36d0, 7 },
328124d8fba4SKumar Gala [PCIE_1_M_RESET] = { 0x3a98, 1 },
328224d8fba4SKumar Gala [PCIE_1_S_RESET] = { 0x3a98, 0 },
328324d8fba4SKumar Gala [PCIE_1_EXT_RESET] = { 0x3a9c, 6 },
328424d8fba4SKumar Gala [PCIE_1_PHY_RESET] = { 0x3a9c, 5 },
328524d8fba4SKumar Gala [PCIE_1_PCI_RESET] = { 0x3a9c, 4 },
328624d8fba4SKumar Gala [PCIE_1_POR_RESET] = { 0x3a9c, 3 },
328724d8fba4SKumar Gala [PCIE_1_HCLK_RESET] = { 0x3a9c, 2 },
328824d8fba4SKumar Gala [PCIE_1_ACLK_RESET] = { 0x3a9c, 0 },
328924d8fba4SKumar Gala [PCIE_2_M_RESET] = { 0x3ad8, 1 },
329024d8fba4SKumar Gala [PCIE_2_S_RESET] = { 0x3ad8, 0 },
329124d8fba4SKumar Gala [PCIE_2_EXT_RESET] = { 0x3adc, 6 },
329224d8fba4SKumar Gala [PCIE_2_PHY_RESET] = { 0x3adc, 5 },
329324d8fba4SKumar Gala [PCIE_2_PCI_RESET] = { 0x3adc, 4 },
329424d8fba4SKumar Gala [PCIE_2_POR_RESET] = { 0x3adc, 3 },
329524d8fba4SKumar Gala [PCIE_2_HCLK_RESET] = { 0x3adc, 2 },
329624d8fba4SKumar Gala [PCIE_2_ACLK_RESET] = { 0x3adc, 0 },
329724d8fba4SKumar Gala [SFAB_USB30_S_RESET] = { 0x3b54, 1 },
329824d8fba4SKumar Gala [SFAB_USB30_M_RESET] = { 0x3b54, 0 },
329924d8fba4SKumar Gala [USB30_0_PORT2_HS_PHY_RESET] = { 0x3b50, 5 },
330024d8fba4SKumar Gala [USB30_0_MASTER_RESET] = { 0x3b50, 4 },
330124d8fba4SKumar Gala [USB30_0_SLEEP_RESET] = { 0x3b50, 3 },
330224d8fba4SKumar Gala [USB30_0_UTMI_PHY_RESET] = { 0x3b50, 2 },
330324d8fba4SKumar Gala [USB30_0_POWERON_RESET] = { 0x3b50, 1 },
330424d8fba4SKumar Gala [USB30_0_PHY_RESET] = { 0x3b50, 0 },
330524d8fba4SKumar Gala [USB30_1_MASTER_RESET] = { 0x3b58, 4 },
330624d8fba4SKumar Gala [USB30_1_SLEEP_RESET] = { 0x3b58, 3 },
330724d8fba4SKumar Gala [USB30_1_UTMI_PHY_RESET] = { 0x3b58, 2 },
330824d8fba4SKumar Gala [USB30_1_POWERON_RESET] = { 0x3b58, 1 },
330924d8fba4SKumar Gala [USB30_1_PHY_RESET] = { 0x3b58, 0 },
331024d8fba4SKumar Gala [NSSFB0_RESET] = { 0x3b60, 6 },
331124d8fba4SKumar Gala [NSSFB1_RESET] = { 0x3b60, 7 },
3312f7b81d67SStephen Boyd [UBI32_CORE1_CLKRST_CLAMP_RESET] = { 0x3d3c, 3},
3313f7b81d67SStephen Boyd [UBI32_CORE1_CLAMP_RESET] = { 0x3d3c, 2 },
3314f7b81d67SStephen Boyd [UBI32_CORE1_AHB_RESET] = { 0x3d3c, 1 },
3315f7b81d67SStephen Boyd [UBI32_CORE1_AXI_RESET] = { 0x3d3c, 0 },
3316f7b81d67SStephen Boyd [UBI32_CORE2_CLKRST_CLAMP_RESET] = { 0x3d5c, 3 },
3317f7b81d67SStephen Boyd [UBI32_CORE2_CLAMP_RESET] = { 0x3d5c, 2 },
3318f7b81d67SStephen Boyd [UBI32_CORE2_AHB_RESET] = { 0x3d5c, 1 },
3319f7b81d67SStephen Boyd [UBI32_CORE2_AXI_RESET] = { 0x3d5c, 0 },
3320f7b81d67SStephen Boyd [GMAC_CORE1_RESET] = { 0x3cbc, 0 },
3321f7b81d67SStephen Boyd [GMAC_CORE2_RESET] = { 0x3cdc, 0 },
3322f7b81d67SStephen Boyd [GMAC_CORE3_RESET] = { 0x3cfc, 0 },
3323f7b81d67SStephen Boyd [GMAC_CORE4_RESET] = { 0x3d1c, 0 },
3324f7b81d67SStephen Boyd [GMAC_AHB_RESET] = { 0x3e24, 0 },
33254f865bdcSAnsuel Smith [CRYPTO_ENG1_RESET] = { 0x3e00, 0},
33264f865bdcSAnsuel Smith [CRYPTO_ENG2_RESET] = { 0x3e04, 0},
33274f865bdcSAnsuel Smith [CRYPTO_ENG3_RESET] = { 0x3e08, 0},
33284f865bdcSAnsuel Smith [CRYPTO_ENG4_RESET] = { 0x3e0c, 0},
33294f865bdcSAnsuel Smith [CRYPTO_AHB_RESET] = { 0x3e10, 0},
3330f7b81d67SStephen Boyd [NSS_CH0_RST_RX_CLK_N_RESET] = { 0x3b60, 0 },
3331f7b81d67SStephen Boyd [NSS_CH0_RST_TX_CLK_N_RESET] = { 0x3b60, 1 },
3332f7b81d67SStephen Boyd [NSS_CH0_RST_RX_125M_N_RESET] = { 0x3b60, 2 },
3333f7b81d67SStephen Boyd [NSS_CH0_HW_RST_RX_125M_N_RESET] = { 0x3b60, 3 },
3334f7b81d67SStephen Boyd [NSS_CH0_RST_TX_125M_N_RESET] = { 0x3b60, 4 },
3335f7b81d67SStephen Boyd [NSS_CH1_RST_RX_CLK_N_RESET] = { 0x3b60, 5 },
3336f7b81d67SStephen Boyd [NSS_CH1_RST_TX_CLK_N_RESET] = { 0x3b60, 6 },
3337f7b81d67SStephen Boyd [NSS_CH1_RST_RX_125M_N_RESET] = { 0x3b60, 7 },
3338f7b81d67SStephen Boyd [NSS_CH1_HW_RST_RX_125M_N_RESET] = { 0x3b60, 8 },
3339f7b81d67SStephen Boyd [NSS_CH1_RST_TX_125M_N_RESET] = { 0x3b60, 9 },
3340f7b81d67SStephen Boyd [NSS_CH2_RST_RX_CLK_N_RESET] = { 0x3b60, 10 },
3341f7b81d67SStephen Boyd [NSS_CH2_RST_TX_CLK_N_RESET] = { 0x3b60, 11 },
3342f7b81d67SStephen Boyd [NSS_CH2_RST_RX_125M_N_RESET] = { 0x3b60, 12 },
3343f7b81d67SStephen Boyd [NSS_CH2_HW_RST_RX_125M_N_RESET] = { 0x3b60, 13 },
3344f7b81d67SStephen Boyd [NSS_CH2_RST_TX_125M_N_RESET] = { 0x3b60, 14 },
3345f7b81d67SStephen Boyd [NSS_CH3_RST_RX_CLK_N_RESET] = { 0x3b60, 15 },
3346f7b81d67SStephen Boyd [NSS_CH3_RST_TX_CLK_N_RESET] = { 0x3b60, 16 },
3347f7b81d67SStephen Boyd [NSS_CH3_RST_RX_125M_N_RESET] = { 0x3b60, 17 },
3348f7b81d67SStephen Boyd [NSS_CH3_HW_RST_RX_125M_N_RESET] = { 0x3b60, 18 },
3349f7b81d67SStephen Boyd [NSS_CH3_RST_TX_125M_N_RESET] = { 0x3b60, 19 },
3350f7b81d67SStephen Boyd [NSS_RST_RX_250M_125M_N_RESET] = { 0x3b60, 20 },
3351f7b81d67SStephen Boyd [NSS_RST_TX_250M_125M_N_RESET] = { 0x3b60, 21 },
3352f7b81d67SStephen Boyd [NSS_QSGMII_TXPI_RST_N_RESET] = { 0x3b60, 22 },
3353f7b81d67SStephen Boyd [NSS_QSGMII_CDR_RST_N_RESET] = { 0x3b60, 23 },
3354f7b81d67SStephen Boyd [NSS_SGMII2_CDR_RST_N_RESET] = { 0x3b60, 24 },
3355f7b81d67SStephen Boyd [NSS_SGMII3_CDR_RST_N_RESET] = { 0x3b60, 25 },
3356f7b81d67SStephen Boyd [NSS_CAL_PRBS_RST_N_RESET] = { 0x3b60, 26 },
3357f7b81d67SStephen Boyd [NSS_LCKDT_RST_N_RESET] = { 0x3b60, 27 },
3358f7b81d67SStephen Boyd [NSS_SRDS_N_RESET] = { 0x3b60, 28 },
335924d8fba4SKumar Gala };
336024d8fba4SKumar Gala
336124d8fba4SKumar Gala static const struct regmap_config gcc_ipq806x_regmap_config = {
336224d8fba4SKumar Gala .reg_bits = 32,
336324d8fba4SKumar Gala .reg_stride = 4,
336424d8fba4SKumar Gala .val_bits = 32,
336524d8fba4SKumar Gala .max_register = 0x3e40,
336624d8fba4SKumar Gala .fast_io = true,
336724d8fba4SKumar Gala };
336824d8fba4SKumar Gala
336924d8fba4SKumar Gala static const struct qcom_cc_desc gcc_ipq806x_desc = {
337024d8fba4SKumar Gala .config = &gcc_ipq806x_regmap_config,
337124d8fba4SKumar Gala .clks = gcc_ipq806x_clks,
337224d8fba4SKumar Gala .num_clks = ARRAY_SIZE(gcc_ipq806x_clks),
337324d8fba4SKumar Gala .resets = gcc_ipq806x_resets,
337424d8fba4SKumar Gala .num_resets = ARRAY_SIZE(gcc_ipq806x_resets),
337524d8fba4SKumar Gala };
337624d8fba4SKumar Gala
337724d8fba4SKumar Gala static const struct of_device_id gcc_ipq806x_match_table[] = {
337824d8fba4SKumar Gala { .compatible = "qcom,gcc-ipq8064" },
337924d8fba4SKumar Gala { }
338024d8fba4SKumar Gala };
338124d8fba4SKumar Gala MODULE_DEVICE_TABLE(of, gcc_ipq806x_match_table);
338224d8fba4SKumar Gala
gcc_ipq806x_probe(struct platform_device * pdev)338324d8fba4SKumar Gala static int gcc_ipq806x_probe(struct platform_device *pdev)
338424d8fba4SKumar Gala {
338524d8fba4SKumar Gala struct device *dev = &pdev->dev;
3386f7b81d67SStephen Boyd struct regmap *regmap;
3387f7b81d67SStephen Boyd int ret;
338824d8fba4SKumar Gala
3389cbf2e548SStephen Boyd ret = qcom_cc_register_board_clk(dev, "cxo_board", "cxo", 25000000);
3390a085f877SStephen Boyd if (ret)
3391a085f877SStephen Boyd return ret;
339224d8fba4SKumar Gala
3393cbf2e548SStephen Boyd ret = qcom_cc_register_board_clk(dev, "pxo_board", "pxo", 25000000);
3394a085f877SStephen Boyd if (ret)
3395a085f877SStephen Boyd return ret;
339624d8fba4SKumar Gala
3397512ea2edSAnsuel Smith if (of_machine_is_compatible("qcom,ipq8065")) {
3398512ea2edSAnsuel Smith ubi32_core1_src_clk.freq_tbl = clk_tbl_nss_ipq8065;
3399512ea2edSAnsuel Smith ubi32_core2_src_clk.freq_tbl = clk_tbl_nss_ipq8065;
3400512ea2edSAnsuel Smith } else {
3401512ea2edSAnsuel Smith ubi32_core1_src_clk.freq_tbl = clk_tbl_nss_ipq8064;
3402512ea2edSAnsuel Smith ubi32_core2_src_clk.freq_tbl = clk_tbl_nss_ipq8064;
3403512ea2edSAnsuel Smith }
3404512ea2edSAnsuel Smith
3405f7b81d67SStephen Boyd ret = qcom_cc_probe(pdev, &gcc_ipq806x_desc);
3406f7b81d67SStephen Boyd if (ret)
3407f7b81d67SStephen Boyd return ret;
3408f7b81d67SStephen Boyd
3409f7b81d67SStephen Boyd regmap = dev_get_regmap(dev, NULL);
3410f7b81d67SStephen Boyd if (!regmap)
3411f7b81d67SStephen Boyd return -ENODEV;
3412f7b81d67SStephen Boyd
3413f7b81d67SStephen Boyd /* Setup PLL18 static bits */
3414f7b81d67SStephen Boyd regmap_update_bits(regmap, 0x31a4, 0xffffffc0, 0x40000400);
3415f7b81d67SStephen Boyd regmap_write(regmap, 0x31b0, 0x3080);
3416f7b81d67SStephen Boyd
3417f7b81d67SStephen Boyd /* Set GMAC footswitch sleep/wakeup values */
3418f7b81d67SStephen Boyd regmap_write(regmap, 0x3cb8, 8);
3419f7b81d67SStephen Boyd regmap_write(regmap, 0x3cd8, 8);
3420f7b81d67SStephen Boyd regmap_write(regmap, 0x3cf8, 8);
3421f7b81d67SStephen Boyd regmap_write(regmap, 0x3d18, 8);
3422f7b81d67SStephen Boyd
34235ce728faSAnsuel Smith return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
342424d8fba4SKumar Gala }
342524d8fba4SKumar Gala
342624d8fba4SKumar Gala static struct platform_driver gcc_ipq806x_driver = {
342724d8fba4SKumar Gala .probe = gcc_ipq806x_probe,
342824d8fba4SKumar Gala .driver = {
342924d8fba4SKumar Gala .name = "gcc-ipq806x",
343024d8fba4SKumar Gala .of_match_table = gcc_ipq806x_match_table,
343124d8fba4SKumar Gala },
343224d8fba4SKumar Gala };
343324d8fba4SKumar Gala
gcc_ipq806x_init(void)343424d8fba4SKumar Gala static int __init gcc_ipq806x_init(void)
343524d8fba4SKumar Gala {
343624d8fba4SKumar Gala return platform_driver_register(&gcc_ipq806x_driver);
343724d8fba4SKumar Gala }
343824d8fba4SKumar Gala core_initcall(gcc_ipq806x_init);
343924d8fba4SKumar Gala
gcc_ipq806x_exit(void)344024d8fba4SKumar Gala static void __exit gcc_ipq806x_exit(void)
344124d8fba4SKumar Gala {
344224d8fba4SKumar Gala platform_driver_unregister(&gcc_ipq806x_driver);
344324d8fba4SKumar Gala }
344424d8fba4SKumar Gala module_exit(gcc_ipq806x_exit);
344524d8fba4SKumar Gala
344624d8fba4SKumar Gala MODULE_DESCRIPTION("QCOM GCC IPQ806x Driver");
344724d8fba4SKumar Gala MODULE_LICENSE("GPL v2");
344824d8fba4SKumar Gala MODULE_ALIAS("platform:gcc-ipq806x");
3449