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> 1224d8fba4SKumar Gala #include <linux/of_device.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 28*cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo[] = { 29*cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" }, 30*cb02866fSAnsuel Smith }; 31*cb02866fSAnsuel 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", 42*cb02866fSAnsuel 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", 53*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 54*cb02866fSAnsuel Smith &pll0.clkr.hw, 55*cb02866fSAnsuel 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", 71*cb02866fSAnsuel 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", 82c99e515aSRajendra Nayak .parent_names = (const char *[]){ "pll4" }, 83c99e515aSRajendra Nayak .num_parents = 1, 84c99e515aSRajendra Nayak .ops = &clk_pll_vote_ops, 85c99e515aSRajendra Nayak }, 86c99e515aSRajendra Nayak }; 87c99e515aSRajendra Nayak 8824d8fba4SKumar Gala static struct clk_pll pll8 = { 8924d8fba4SKumar Gala .l_reg = 0x3144, 9024d8fba4SKumar Gala .m_reg = 0x3148, 9124d8fba4SKumar Gala .n_reg = 0x314c, 9224d8fba4SKumar Gala .config_reg = 0x3154, 9324d8fba4SKumar Gala .mode_reg = 0x3140, 9424d8fba4SKumar Gala .status_reg = 0x3158, 9524d8fba4SKumar Gala .status_bit = 16, 9624d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 9724d8fba4SKumar Gala .name = "pll8", 98*cb02866fSAnsuel Smith .parent_data = gcc_pxo, 9924d8fba4SKumar Gala .num_parents = 1, 10024d8fba4SKumar Gala .ops = &clk_pll_ops, 10124d8fba4SKumar Gala }, 10224d8fba4SKumar Gala }; 10324d8fba4SKumar Gala 10424d8fba4SKumar Gala static struct clk_regmap pll8_vote = { 10524d8fba4SKumar Gala .enable_reg = 0x34c0, 10624d8fba4SKumar Gala .enable_mask = BIT(8), 10724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 10824d8fba4SKumar Gala .name = "pll8_vote", 109*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 110*cb02866fSAnsuel Smith &pll8.clkr.hw, 111*cb02866fSAnsuel Smith }, 11224d8fba4SKumar Gala .num_parents = 1, 11324d8fba4SKumar Gala .ops = &clk_pll_vote_ops, 11424d8fba4SKumar Gala }, 11524d8fba4SKumar Gala }; 11624d8fba4SKumar Gala 1171f79131bSStephen Boyd static struct hfpll_data hfpll0_data = { 1181f79131bSStephen Boyd .mode_reg = 0x3200, 1191f79131bSStephen Boyd .l_reg = 0x3208, 1201f79131bSStephen Boyd .m_reg = 0x320c, 1211f79131bSStephen Boyd .n_reg = 0x3210, 1221f79131bSStephen Boyd .config_reg = 0x3204, 1231f79131bSStephen Boyd .status_reg = 0x321c, 1241f79131bSStephen Boyd .config_val = 0x7845c665, 1251f79131bSStephen Boyd .droop_reg = 0x3214, 1261f79131bSStephen Boyd .droop_val = 0x0108c000, 1271f79131bSStephen Boyd .min_rate = 600000000UL, 1281f79131bSStephen Boyd .max_rate = 1800000000UL, 1291f79131bSStephen Boyd }; 1301f79131bSStephen Boyd 1311f79131bSStephen Boyd static struct clk_hfpll hfpll0 = { 1321f79131bSStephen Boyd .d = &hfpll0_data, 1331f79131bSStephen Boyd .clkr.hw.init = &(struct clk_init_data){ 134*cb02866fSAnsuel Smith .parent_data = gcc_pxo, 1351f79131bSStephen Boyd .num_parents = 1, 1361f79131bSStephen Boyd .name = "hfpll0", 1371f79131bSStephen Boyd .ops = &clk_ops_hfpll, 1381f79131bSStephen Boyd .flags = CLK_IGNORE_UNUSED, 1391f79131bSStephen Boyd }, 1401f79131bSStephen Boyd .lock = __SPIN_LOCK_UNLOCKED(hfpll0.lock), 1411f79131bSStephen Boyd }; 1421f79131bSStephen Boyd 1431f79131bSStephen Boyd static struct hfpll_data hfpll1_data = { 1441f79131bSStephen Boyd .mode_reg = 0x3240, 1451f79131bSStephen Boyd .l_reg = 0x3248, 1461f79131bSStephen Boyd .m_reg = 0x324c, 1471f79131bSStephen Boyd .n_reg = 0x3250, 1481f79131bSStephen Boyd .config_reg = 0x3244, 1491f79131bSStephen Boyd .status_reg = 0x325c, 1501f79131bSStephen Boyd .config_val = 0x7845c665, 1511f79131bSStephen Boyd .droop_reg = 0x3314, 1521f79131bSStephen Boyd .droop_val = 0x0108c000, 1531f79131bSStephen Boyd .min_rate = 600000000UL, 1541f79131bSStephen Boyd .max_rate = 1800000000UL, 1551f79131bSStephen Boyd }; 1561f79131bSStephen Boyd 1571f79131bSStephen Boyd static struct clk_hfpll hfpll1 = { 1581f79131bSStephen Boyd .d = &hfpll1_data, 1591f79131bSStephen Boyd .clkr.hw.init = &(struct clk_init_data){ 160*cb02866fSAnsuel Smith .parent_data = gcc_pxo, 1611f79131bSStephen Boyd .num_parents = 1, 1621f79131bSStephen Boyd .name = "hfpll1", 1631f79131bSStephen Boyd .ops = &clk_ops_hfpll, 1641f79131bSStephen Boyd .flags = CLK_IGNORE_UNUSED, 1651f79131bSStephen Boyd }, 1661f79131bSStephen Boyd .lock = __SPIN_LOCK_UNLOCKED(hfpll1.lock), 1671f79131bSStephen Boyd }; 1681f79131bSStephen Boyd 1691f79131bSStephen Boyd static struct hfpll_data hfpll_l2_data = { 1701f79131bSStephen Boyd .mode_reg = 0x3300, 1711f79131bSStephen Boyd .l_reg = 0x3308, 1721f79131bSStephen Boyd .m_reg = 0x330c, 1731f79131bSStephen Boyd .n_reg = 0x3310, 1741f79131bSStephen Boyd .config_reg = 0x3304, 1751f79131bSStephen Boyd .status_reg = 0x331c, 1761f79131bSStephen Boyd .config_val = 0x7845c665, 1771f79131bSStephen Boyd .droop_reg = 0x3314, 1781f79131bSStephen Boyd .droop_val = 0x0108c000, 1791f79131bSStephen Boyd .min_rate = 600000000UL, 1801f79131bSStephen Boyd .max_rate = 1800000000UL, 1811f79131bSStephen Boyd }; 1821f79131bSStephen Boyd 1831f79131bSStephen Boyd static struct clk_hfpll hfpll_l2 = { 1841f79131bSStephen Boyd .d = &hfpll_l2_data, 1851f79131bSStephen Boyd .clkr.hw.init = &(struct clk_init_data){ 186*cb02866fSAnsuel Smith .parent_data = gcc_pxo, 1871f79131bSStephen Boyd .num_parents = 1, 1881f79131bSStephen Boyd .name = "hfpll_l2", 1891f79131bSStephen Boyd .ops = &clk_ops_hfpll, 1901f79131bSStephen Boyd .flags = CLK_IGNORE_UNUSED, 1911f79131bSStephen Boyd }, 1921f79131bSStephen Boyd .lock = __SPIN_LOCK_UNLOCKED(hfpll_l2.lock), 1931f79131bSStephen Boyd }; 1941f79131bSStephen Boyd 19524d8fba4SKumar Gala static struct clk_pll pll14 = { 19624d8fba4SKumar Gala .l_reg = 0x31c4, 19724d8fba4SKumar Gala .m_reg = 0x31c8, 19824d8fba4SKumar Gala .n_reg = 0x31cc, 19924d8fba4SKumar Gala .config_reg = 0x31d4, 20024d8fba4SKumar Gala .mode_reg = 0x31c0, 20124d8fba4SKumar Gala .status_reg = 0x31d8, 20224d8fba4SKumar Gala .status_bit = 16, 20324d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 20424d8fba4SKumar Gala .name = "pll14", 205*cb02866fSAnsuel Smith .parent_data = gcc_pxo, 20624d8fba4SKumar Gala .num_parents = 1, 20724d8fba4SKumar Gala .ops = &clk_pll_ops, 20824d8fba4SKumar Gala }, 20924d8fba4SKumar Gala }; 21024d8fba4SKumar Gala 21124d8fba4SKumar Gala static struct clk_regmap pll14_vote = { 21224d8fba4SKumar Gala .enable_reg = 0x34c0, 21324d8fba4SKumar Gala .enable_mask = BIT(14), 21424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 21524d8fba4SKumar Gala .name = "pll14_vote", 216*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 217*cb02866fSAnsuel Smith &pll14.clkr.hw, 218*cb02866fSAnsuel Smith }, 21924d8fba4SKumar Gala .num_parents = 1, 22024d8fba4SKumar Gala .ops = &clk_pll_vote_ops, 22124d8fba4SKumar Gala }, 22224d8fba4SKumar Gala }; 22324d8fba4SKumar Gala 224f7b81d67SStephen Boyd #define NSS_PLL_RATE(f, _l, _m, _n, i) \ 225f7b81d67SStephen Boyd { \ 226f7b81d67SStephen Boyd .freq = f, \ 227f7b81d67SStephen Boyd .l = _l, \ 228f7b81d67SStephen Boyd .m = _m, \ 229f7b81d67SStephen Boyd .n = _n, \ 230f7b81d67SStephen Boyd .ibits = i, \ 231f7b81d67SStephen Boyd } 232f7b81d67SStephen Boyd 233f7b81d67SStephen Boyd static struct pll_freq_tbl pll18_freq_tbl[] = { 234f7b81d67SStephen Boyd NSS_PLL_RATE(550000000, 44, 0, 1, 0x01495625), 235f7b81d67SStephen Boyd NSS_PLL_RATE(733000000, 58, 16, 25, 0x014b5625), 236f7b81d67SStephen Boyd }; 237f7b81d67SStephen Boyd 238f7b81d67SStephen Boyd static struct clk_pll pll18 = { 239f7b81d67SStephen Boyd .l_reg = 0x31a4, 240f7b81d67SStephen Boyd .m_reg = 0x31a8, 241f7b81d67SStephen Boyd .n_reg = 0x31ac, 242f7b81d67SStephen Boyd .config_reg = 0x31b4, 243f7b81d67SStephen Boyd .mode_reg = 0x31a0, 244f7b81d67SStephen Boyd .status_reg = 0x31b8, 245f7b81d67SStephen Boyd .status_bit = 16, 246f7b81d67SStephen Boyd .post_div_shift = 16, 247f7b81d67SStephen Boyd .post_div_width = 1, 248f7b81d67SStephen Boyd .freq_tbl = pll18_freq_tbl, 249f7b81d67SStephen Boyd .clkr.hw.init = &(struct clk_init_data){ 250f7b81d67SStephen Boyd .name = "pll18", 251*cb02866fSAnsuel Smith .parent_data = gcc_pxo, 252f7b81d67SStephen Boyd .num_parents = 1, 253f7b81d67SStephen Boyd .ops = &clk_pll_ops, 254f7b81d67SStephen Boyd }, 255f7b81d67SStephen Boyd }; 256f7b81d67SStephen Boyd 257293d2e97SGeorgi Djakov enum { 258293d2e97SGeorgi Djakov P_PXO, 259293d2e97SGeorgi Djakov P_PLL8, 260293d2e97SGeorgi Djakov P_PLL3, 261293d2e97SGeorgi Djakov P_PLL0, 262293d2e97SGeorgi Djakov P_CXO, 263f7b81d67SStephen Boyd P_PLL14, 264f7b81d67SStephen Boyd P_PLL18, 265293d2e97SGeorgi Djakov }; 26624d8fba4SKumar Gala 267293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll8_map[] = { 268293d2e97SGeorgi Djakov { P_PXO, 0 }, 269293d2e97SGeorgi Djakov { P_PLL8, 3 } 27024d8fba4SKumar Gala }; 27124d8fba4SKumar Gala 272*cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8[] = { 273*cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" }, 274*cb02866fSAnsuel Smith { .hw = &pll8_vote.hw }, 27524d8fba4SKumar Gala }; 27624d8fba4SKumar Gala 277293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll8_cxo_map[] = { 278293d2e97SGeorgi Djakov { P_PXO, 0 }, 279293d2e97SGeorgi Djakov { P_PLL8, 3 }, 280293d2e97SGeorgi Djakov { P_CXO, 5 } 28124d8fba4SKumar Gala }; 28224d8fba4SKumar Gala 283*cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8_cxo[] = { 284*cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" }, 285*cb02866fSAnsuel Smith { .hw = &pll8_vote.hw }, 286*cb02866fSAnsuel Smith { .fw_name = "cxo", .name = "cxo" }, 28724d8fba4SKumar Gala }; 28824d8fba4SKumar Gala 289293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll3_map[] = { 290293d2e97SGeorgi Djakov { P_PXO, 0 }, 291293d2e97SGeorgi Djakov { P_PLL3, 1 } 29224d8fba4SKumar Gala }; 29324d8fba4SKumar Gala 294293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll3_sata_map[] = { 295293d2e97SGeorgi Djakov { P_PXO, 0 }, 296293d2e97SGeorgi Djakov { P_PLL3, 6 } 29724d8fba4SKumar Gala }; 29824d8fba4SKumar Gala 299*cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll3[] = { 300*cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" }, 301*cb02866fSAnsuel Smith { .hw = &pll3.clkr.hw }, 30224d8fba4SKumar Gala }; 30324d8fba4SKumar Gala 304e95e8253SAnsuel Smith static const struct parent_map gcc_pxo_pll8_pll0_map[] = { 305293d2e97SGeorgi Djakov { P_PXO, 0 }, 306293d2e97SGeorgi Djakov { P_PLL8, 3 }, 307293d2e97SGeorgi Djakov { P_PLL0, 2 } 30824d8fba4SKumar Gala }; 30924d8fba4SKumar Gala 310*cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8_pll0[] = { 311*cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" }, 312*cb02866fSAnsuel Smith { .hw = &pll8_vote.hw }, 313*cb02866fSAnsuel Smith { .hw = &pll0_vote.hw }, 31424d8fba4SKumar Gala }; 31524d8fba4SKumar Gala 316f7b81d67SStephen Boyd static const struct parent_map gcc_pxo_pll8_pll14_pll18_pll0_map[] = { 317f7b81d67SStephen Boyd { P_PXO, 0 }, 318f7b81d67SStephen Boyd { P_PLL8, 4 }, 319f7b81d67SStephen Boyd { P_PLL0, 2 }, 320f7b81d67SStephen Boyd { P_PLL14, 5 }, 321f7b81d67SStephen Boyd { P_PLL18, 1 } 322f7b81d67SStephen Boyd }; 323f7b81d67SStephen Boyd 324*cb02866fSAnsuel Smith static const struct clk_parent_data gcc_pxo_pll8_pll14_pll18_pll0[] = { 325*cb02866fSAnsuel Smith { .fw_name = "pxo", .name = "pxo" }, 326*cb02866fSAnsuel Smith { .hw = &pll8_vote.hw }, 327*cb02866fSAnsuel Smith { .hw = &pll0_vote.hw }, 328*cb02866fSAnsuel Smith { .hw = &pll14.clkr.hw }, 329*cb02866fSAnsuel Smith { .hw = &pll18.clkr.hw }, 330f7b81d67SStephen Boyd }; 331f7b81d67SStephen Boyd 33224d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_uart[] = { 33324d8fba4SKumar Gala { 1843200, P_PLL8, 2, 6, 625 }, 33424d8fba4SKumar Gala { 3686400, P_PLL8, 2, 12, 625 }, 33524d8fba4SKumar Gala { 7372800, P_PLL8, 2, 24, 625 }, 33624d8fba4SKumar Gala { 14745600, P_PLL8, 2, 48, 625 }, 33724d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 }, 33824d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 33924d8fba4SKumar Gala { 32000000, P_PLL8, 4, 1, 3 }, 34024d8fba4SKumar Gala { 40000000, P_PLL8, 1, 5, 48 }, 34124d8fba4SKumar Gala { 46400000, P_PLL8, 1, 29, 240 }, 34224d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 34324d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 }, 34424d8fba4SKumar Gala { 56000000, P_PLL8, 1, 7, 48 }, 34524d8fba4SKumar Gala { 58982400, P_PLL8, 1, 96, 625 }, 34624d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 }, 34724d8fba4SKumar Gala { } 34824d8fba4SKumar Gala }; 34924d8fba4SKumar Gala 35024d8fba4SKumar Gala static struct clk_rcg gsbi1_uart_src = { 35124d8fba4SKumar Gala .ns_reg = 0x29d4, 35224d8fba4SKumar Gala .md_reg = 0x29d0, 35324d8fba4SKumar Gala .mn = { 35424d8fba4SKumar Gala .mnctr_en_bit = 8, 35524d8fba4SKumar Gala .mnctr_reset_bit = 7, 35624d8fba4SKumar Gala .mnctr_mode_shift = 5, 35724d8fba4SKumar Gala .n_val_shift = 16, 35824d8fba4SKumar Gala .m_val_shift = 16, 35924d8fba4SKumar Gala .width = 16, 36024d8fba4SKumar Gala }, 36124d8fba4SKumar Gala .p = { 36224d8fba4SKumar Gala .pre_div_shift = 3, 36324d8fba4SKumar Gala .pre_div_width = 2, 36424d8fba4SKumar Gala }, 36524d8fba4SKumar Gala .s = { 36624d8fba4SKumar Gala .src_sel_shift = 0, 36724d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 36824d8fba4SKumar Gala }, 36924d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 37024d8fba4SKumar Gala .clkr = { 37124d8fba4SKumar Gala .enable_reg = 0x29d4, 37224d8fba4SKumar Gala .enable_mask = BIT(11), 37324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 37424d8fba4SKumar Gala .name = "gsbi1_uart_src", 375*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 37624d8fba4SKumar Gala .num_parents = 2, 37724d8fba4SKumar Gala .ops = &clk_rcg_ops, 37824d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 37924d8fba4SKumar Gala }, 38024d8fba4SKumar Gala }, 38124d8fba4SKumar Gala }; 38224d8fba4SKumar Gala 38324d8fba4SKumar Gala static struct clk_branch gsbi1_uart_clk = { 38424d8fba4SKumar Gala .halt_reg = 0x2fcc, 38524d8fba4SKumar Gala .halt_bit = 12, 38624d8fba4SKumar Gala .clkr = { 38724d8fba4SKumar Gala .enable_reg = 0x29d4, 38824d8fba4SKumar Gala .enable_mask = BIT(9), 38924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 39024d8fba4SKumar Gala .name = "gsbi1_uart_clk", 391*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 392*cb02866fSAnsuel Smith &gsbi1_uart_src.clkr.hw, 39324d8fba4SKumar Gala }, 39424d8fba4SKumar Gala .num_parents = 1, 39524d8fba4SKumar Gala .ops = &clk_branch_ops, 39624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 39724d8fba4SKumar Gala }, 39824d8fba4SKumar Gala }, 39924d8fba4SKumar Gala }; 40024d8fba4SKumar Gala 40124d8fba4SKumar Gala static struct clk_rcg gsbi2_uart_src = { 40224d8fba4SKumar Gala .ns_reg = 0x29f4, 40324d8fba4SKumar Gala .md_reg = 0x29f0, 40424d8fba4SKumar Gala .mn = { 40524d8fba4SKumar Gala .mnctr_en_bit = 8, 40624d8fba4SKumar Gala .mnctr_reset_bit = 7, 40724d8fba4SKumar Gala .mnctr_mode_shift = 5, 40824d8fba4SKumar Gala .n_val_shift = 16, 40924d8fba4SKumar Gala .m_val_shift = 16, 41024d8fba4SKumar Gala .width = 16, 41124d8fba4SKumar Gala }, 41224d8fba4SKumar Gala .p = { 41324d8fba4SKumar Gala .pre_div_shift = 3, 41424d8fba4SKumar Gala .pre_div_width = 2, 41524d8fba4SKumar Gala }, 41624d8fba4SKumar Gala .s = { 41724d8fba4SKumar Gala .src_sel_shift = 0, 41824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 41924d8fba4SKumar Gala }, 42024d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 42124d8fba4SKumar Gala .clkr = { 42224d8fba4SKumar Gala .enable_reg = 0x29f4, 42324d8fba4SKumar Gala .enable_mask = BIT(11), 42424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 42524d8fba4SKumar Gala .name = "gsbi2_uart_src", 426*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 42724d8fba4SKumar Gala .num_parents = 2, 42824d8fba4SKumar Gala .ops = &clk_rcg_ops, 42924d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 43024d8fba4SKumar Gala }, 43124d8fba4SKumar Gala }, 43224d8fba4SKumar Gala }; 43324d8fba4SKumar Gala 43424d8fba4SKumar Gala static struct clk_branch gsbi2_uart_clk = { 43524d8fba4SKumar Gala .halt_reg = 0x2fcc, 43624d8fba4SKumar Gala .halt_bit = 8, 43724d8fba4SKumar Gala .clkr = { 43824d8fba4SKumar Gala .enable_reg = 0x29f4, 43924d8fba4SKumar Gala .enable_mask = BIT(9), 44024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 44124d8fba4SKumar Gala .name = "gsbi2_uart_clk", 442*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 443*cb02866fSAnsuel Smith &gsbi2_uart_src.clkr.hw, 44424d8fba4SKumar Gala }, 44524d8fba4SKumar Gala .num_parents = 1, 44624d8fba4SKumar Gala .ops = &clk_branch_ops, 44724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 44824d8fba4SKumar Gala }, 44924d8fba4SKumar Gala }, 45024d8fba4SKumar Gala }; 45124d8fba4SKumar Gala 45224d8fba4SKumar Gala static struct clk_rcg gsbi4_uart_src = { 45324d8fba4SKumar Gala .ns_reg = 0x2a34, 45424d8fba4SKumar Gala .md_reg = 0x2a30, 45524d8fba4SKumar Gala .mn = { 45624d8fba4SKumar Gala .mnctr_en_bit = 8, 45724d8fba4SKumar Gala .mnctr_reset_bit = 7, 45824d8fba4SKumar Gala .mnctr_mode_shift = 5, 45924d8fba4SKumar Gala .n_val_shift = 16, 46024d8fba4SKumar Gala .m_val_shift = 16, 46124d8fba4SKumar Gala .width = 16, 46224d8fba4SKumar Gala }, 46324d8fba4SKumar Gala .p = { 46424d8fba4SKumar Gala .pre_div_shift = 3, 46524d8fba4SKumar Gala .pre_div_width = 2, 46624d8fba4SKumar Gala }, 46724d8fba4SKumar Gala .s = { 46824d8fba4SKumar Gala .src_sel_shift = 0, 46924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 47024d8fba4SKumar Gala }, 47124d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 47224d8fba4SKumar Gala .clkr = { 47324d8fba4SKumar Gala .enable_reg = 0x2a34, 47424d8fba4SKumar Gala .enable_mask = BIT(11), 47524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 47624d8fba4SKumar Gala .name = "gsbi4_uart_src", 477*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 47824d8fba4SKumar Gala .num_parents = 2, 47924d8fba4SKumar Gala .ops = &clk_rcg_ops, 48024d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 48124d8fba4SKumar Gala }, 48224d8fba4SKumar Gala }, 48324d8fba4SKumar Gala }; 48424d8fba4SKumar Gala 48524d8fba4SKumar Gala static struct clk_branch gsbi4_uart_clk = { 48624d8fba4SKumar Gala .halt_reg = 0x2fd0, 48724d8fba4SKumar Gala .halt_bit = 26, 48824d8fba4SKumar Gala .clkr = { 48924d8fba4SKumar Gala .enable_reg = 0x2a34, 49024d8fba4SKumar Gala .enable_mask = BIT(9), 49124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 49224d8fba4SKumar Gala .name = "gsbi4_uart_clk", 493*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 494*cb02866fSAnsuel Smith &gsbi4_uart_src.clkr.hw, 49524d8fba4SKumar Gala }, 49624d8fba4SKumar Gala .num_parents = 1, 49724d8fba4SKumar Gala .ops = &clk_branch_ops, 49824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 49924d8fba4SKumar Gala }, 50024d8fba4SKumar Gala }, 50124d8fba4SKumar Gala }; 50224d8fba4SKumar Gala 50324d8fba4SKumar Gala static struct clk_rcg gsbi5_uart_src = { 50424d8fba4SKumar Gala .ns_reg = 0x2a54, 50524d8fba4SKumar Gala .md_reg = 0x2a50, 50624d8fba4SKumar Gala .mn = { 50724d8fba4SKumar Gala .mnctr_en_bit = 8, 50824d8fba4SKumar Gala .mnctr_reset_bit = 7, 50924d8fba4SKumar Gala .mnctr_mode_shift = 5, 51024d8fba4SKumar Gala .n_val_shift = 16, 51124d8fba4SKumar Gala .m_val_shift = 16, 51224d8fba4SKumar Gala .width = 16, 51324d8fba4SKumar Gala }, 51424d8fba4SKumar Gala .p = { 51524d8fba4SKumar Gala .pre_div_shift = 3, 51624d8fba4SKumar Gala .pre_div_width = 2, 51724d8fba4SKumar Gala }, 51824d8fba4SKumar Gala .s = { 51924d8fba4SKumar Gala .src_sel_shift = 0, 52024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 52124d8fba4SKumar Gala }, 52224d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 52324d8fba4SKumar Gala .clkr = { 52424d8fba4SKumar Gala .enable_reg = 0x2a54, 52524d8fba4SKumar Gala .enable_mask = BIT(11), 52624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 52724d8fba4SKumar Gala .name = "gsbi5_uart_src", 528*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 52924d8fba4SKumar Gala .num_parents = 2, 53024d8fba4SKumar Gala .ops = &clk_rcg_ops, 53124d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 53224d8fba4SKumar Gala }, 53324d8fba4SKumar Gala }, 53424d8fba4SKumar Gala }; 53524d8fba4SKumar Gala 53624d8fba4SKumar Gala static struct clk_branch gsbi5_uart_clk = { 53724d8fba4SKumar Gala .halt_reg = 0x2fd0, 53824d8fba4SKumar Gala .halt_bit = 22, 53924d8fba4SKumar Gala .clkr = { 54024d8fba4SKumar Gala .enable_reg = 0x2a54, 54124d8fba4SKumar Gala .enable_mask = BIT(9), 54224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 54324d8fba4SKumar Gala .name = "gsbi5_uart_clk", 544*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 545*cb02866fSAnsuel Smith &gsbi5_uart_src.clkr.hw, 54624d8fba4SKumar Gala }, 54724d8fba4SKumar Gala .num_parents = 1, 54824d8fba4SKumar Gala .ops = &clk_branch_ops, 54924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 55024d8fba4SKumar Gala }, 55124d8fba4SKumar Gala }, 55224d8fba4SKumar Gala }; 55324d8fba4SKumar Gala 55424d8fba4SKumar Gala static struct clk_rcg gsbi6_uart_src = { 55524d8fba4SKumar Gala .ns_reg = 0x2a74, 55624d8fba4SKumar Gala .md_reg = 0x2a70, 55724d8fba4SKumar Gala .mn = { 55824d8fba4SKumar Gala .mnctr_en_bit = 8, 55924d8fba4SKumar Gala .mnctr_reset_bit = 7, 56024d8fba4SKumar Gala .mnctr_mode_shift = 5, 56124d8fba4SKumar Gala .n_val_shift = 16, 56224d8fba4SKumar Gala .m_val_shift = 16, 56324d8fba4SKumar Gala .width = 16, 56424d8fba4SKumar Gala }, 56524d8fba4SKumar Gala .p = { 56624d8fba4SKumar Gala .pre_div_shift = 3, 56724d8fba4SKumar Gala .pre_div_width = 2, 56824d8fba4SKumar Gala }, 56924d8fba4SKumar Gala .s = { 57024d8fba4SKumar Gala .src_sel_shift = 0, 57124d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 57224d8fba4SKumar Gala }, 57324d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 57424d8fba4SKumar Gala .clkr = { 57524d8fba4SKumar Gala .enable_reg = 0x2a74, 57624d8fba4SKumar Gala .enable_mask = BIT(11), 57724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 57824d8fba4SKumar Gala .name = "gsbi6_uart_src", 579*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 58024d8fba4SKumar Gala .num_parents = 2, 58124d8fba4SKumar Gala .ops = &clk_rcg_ops, 58224d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 58324d8fba4SKumar Gala }, 58424d8fba4SKumar Gala }, 58524d8fba4SKumar Gala }; 58624d8fba4SKumar Gala 58724d8fba4SKumar Gala static struct clk_branch gsbi6_uart_clk = { 58824d8fba4SKumar Gala .halt_reg = 0x2fd0, 58924d8fba4SKumar Gala .halt_bit = 18, 59024d8fba4SKumar Gala .clkr = { 59124d8fba4SKumar Gala .enable_reg = 0x2a74, 59224d8fba4SKumar Gala .enable_mask = BIT(9), 59324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 59424d8fba4SKumar Gala .name = "gsbi6_uart_clk", 595*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 596*cb02866fSAnsuel Smith &gsbi6_uart_src.clkr.hw, 59724d8fba4SKumar Gala }, 59824d8fba4SKumar Gala .num_parents = 1, 59924d8fba4SKumar Gala .ops = &clk_branch_ops, 60024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 60124d8fba4SKumar Gala }, 60224d8fba4SKumar Gala }, 60324d8fba4SKumar Gala }; 60424d8fba4SKumar Gala 60524d8fba4SKumar Gala static struct clk_rcg gsbi7_uart_src = { 60624d8fba4SKumar Gala .ns_reg = 0x2a94, 60724d8fba4SKumar Gala .md_reg = 0x2a90, 60824d8fba4SKumar Gala .mn = { 60924d8fba4SKumar Gala .mnctr_en_bit = 8, 61024d8fba4SKumar Gala .mnctr_reset_bit = 7, 61124d8fba4SKumar Gala .mnctr_mode_shift = 5, 61224d8fba4SKumar Gala .n_val_shift = 16, 61324d8fba4SKumar Gala .m_val_shift = 16, 61424d8fba4SKumar Gala .width = 16, 61524d8fba4SKumar Gala }, 61624d8fba4SKumar Gala .p = { 61724d8fba4SKumar Gala .pre_div_shift = 3, 61824d8fba4SKumar Gala .pre_div_width = 2, 61924d8fba4SKumar Gala }, 62024d8fba4SKumar Gala .s = { 62124d8fba4SKumar Gala .src_sel_shift = 0, 62224d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 62324d8fba4SKumar Gala }, 62424d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 62524d8fba4SKumar Gala .clkr = { 62624d8fba4SKumar Gala .enable_reg = 0x2a94, 62724d8fba4SKumar Gala .enable_mask = BIT(11), 62824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 62924d8fba4SKumar Gala .name = "gsbi7_uart_src", 630*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 63124d8fba4SKumar Gala .num_parents = 2, 63224d8fba4SKumar Gala .ops = &clk_rcg_ops, 63324d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 63424d8fba4SKumar Gala }, 63524d8fba4SKumar Gala }, 63624d8fba4SKumar Gala }; 63724d8fba4SKumar Gala 63824d8fba4SKumar Gala static struct clk_branch gsbi7_uart_clk = { 63924d8fba4SKumar Gala .halt_reg = 0x2fd0, 64024d8fba4SKumar Gala .halt_bit = 14, 64124d8fba4SKumar Gala .clkr = { 64224d8fba4SKumar Gala .enable_reg = 0x2a94, 64324d8fba4SKumar Gala .enable_mask = BIT(9), 64424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 64524d8fba4SKumar Gala .name = "gsbi7_uart_clk", 646*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 647*cb02866fSAnsuel Smith &gsbi7_uart_src.clkr.hw, 64824d8fba4SKumar Gala }, 64924d8fba4SKumar Gala .num_parents = 1, 65024d8fba4SKumar Gala .ops = &clk_branch_ops, 65124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 65224d8fba4SKumar Gala }, 65324d8fba4SKumar Gala }, 65424d8fba4SKumar Gala }; 65524d8fba4SKumar Gala 65624d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_qup[] = { 65724d8fba4SKumar Gala { 1100000, P_PXO, 1, 2, 49 }, 65824d8fba4SKumar Gala { 5400000, P_PXO, 1, 1, 5 }, 65924d8fba4SKumar Gala { 10800000, P_PXO, 1, 2, 5 }, 66024d8fba4SKumar Gala { 15060000, P_PLL8, 1, 2, 51 }, 66124d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 6620bf0ff82SStephen Boyd { 25000000, P_PXO, 1, 0, 0 }, 66324d8fba4SKumar Gala { 25600000, P_PLL8, 1, 1, 15 }, 66424d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 66524d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 }, 66624d8fba4SKumar Gala { } 66724d8fba4SKumar Gala }; 66824d8fba4SKumar Gala 66924d8fba4SKumar Gala static struct clk_rcg gsbi1_qup_src = { 67024d8fba4SKumar Gala .ns_reg = 0x29cc, 67124d8fba4SKumar Gala .md_reg = 0x29c8, 67224d8fba4SKumar Gala .mn = { 67324d8fba4SKumar Gala .mnctr_en_bit = 8, 67424d8fba4SKumar Gala .mnctr_reset_bit = 7, 67524d8fba4SKumar Gala .mnctr_mode_shift = 5, 67624d8fba4SKumar Gala .n_val_shift = 16, 67724d8fba4SKumar Gala .m_val_shift = 16, 67824d8fba4SKumar Gala .width = 8, 67924d8fba4SKumar Gala }, 68024d8fba4SKumar Gala .p = { 68124d8fba4SKumar Gala .pre_div_shift = 3, 68224d8fba4SKumar Gala .pre_div_width = 2, 68324d8fba4SKumar Gala }, 68424d8fba4SKumar Gala .s = { 68524d8fba4SKumar Gala .src_sel_shift = 0, 68624d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 68724d8fba4SKumar Gala }, 68824d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 68924d8fba4SKumar Gala .clkr = { 69024d8fba4SKumar Gala .enable_reg = 0x29cc, 69124d8fba4SKumar Gala .enable_mask = BIT(11), 69224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 69324d8fba4SKumar Gala .name = "gsbi1_qup_src", 694*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 69524d8fba4SKumar Gala .num_parents = 2, 69624d8fba4SKumar Gala .ops = &clk_rcg_ops, 69724d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 69824d8fba4SKumar Gala }, 69924d8fba4SKumar Gala }, 70024d8fba4SKumar Gala }; 70124d8fba4SKumar Gala 70224d8fba4SKumar Gala static struct clk_branch gsbi1_qup_clk = { 70324d8fba4SKumar Gala .halt_reg = 0x2fcc, 70424d8fba4SKumar Gala .halt_bit = 11, 70524d8fba4SKumar Gala .clkr = { 70624d8fba4SKumar Gala .enable_reg = 0x29cc, 70724d8fba4SKumar Gala .enable_mask = BIT(9), 70824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 70924d8fba4SKumar Gala .name = "gsbi1_qup_clk", 710*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 711*cb02866fSAnsuel Smith &gsbi1_qup_src.clkr.hw, 712*cb02866fSAnsuel Smith }, 71324d8fba4SKumar Gala .num_parents = 1, 71424d8fba4SKumar Gala .ops = &clk_branch_ops, 71524d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 71624d8fba4SKumar Gala }, 71724d8fba4SKumar Gala }, 71824d8fba4SKumar Gala }; 71924d8fba4SKumar Gala 72024d8fba4SKumar Gala static struct clk_rcg gsbi2_qup_src = { 72124d8fba4SKumar Gala .ns_reg = 0x29ec, 72224d8fba4SKumar Gala .md_reg = 0x29e8, 72324d8fba4SKumar Gala .mn = { 72424d8fba4SKumar Gala .mnctr_en_bit = 8, 72524d8fba4SKumar Gala .mnctr_reset_bit = 7, 72624d8fba4SKumar Gala .mnctr_mode_shift = 5, 72724d8fba4SKumar Gala .n_val_shift = 16, 72824d8fba4SKumar Gala .m_val_shift = 16, 72924d8fba4SKumar Gala .width = 8, 73024d8fba4SKumar Gala }, 73124d8fba4SKumar Gala .p = { 73224d8fba4SKumar Gala .pre_div_shift = 3, 73324d8fba4SKumar Gala .pre_div_width = 2, 73424d8fba4SKumar Gala }, 73524d8fba4SKumar Gala .s = { 73624d8fba4SKumar Gala .src_sel_shift = 0, 73724d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 73824d8fba4SKumar Gala }, 73924d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 74024d8fba4SKumar Gala .clkr = { 74124d8fba4SKumar Gala .enable_reg = 0x29ec, 74224d8fba4SKumar Gala .enable_mask = BIT(11), 74324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 74424d8fba4SKumar Gala .name = "gsbi2_qup_src", 745*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 74624d8fba4SKumar Gala .num_parents = 2, 74724d8fba4SKumar Gala .ops = &clk_rcg_ops, 74824d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 74924d8fba4SKumar Gala }, 75024d8fba4SKumar Gala }, 75124d8fba4SKumar Gala }; 75224d8fba4SKumar Gala 75324d8fba4SKumar Gala static struct clk_branch gsbi2_qup_clk = { 75424d8fba4SKumar Gala .halt_reg = 0x2fcc, 75524d8fba4SKumar Gala .halt_bit = 6, 75624d8fba4SKumar Gala .clkr = { 75724d8fba4SKumar Gala .enable_reg = 0x29ec, 75824d8fba4SKumar Gala .enable_mask = BIT(9), 75924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 76024d8fba4SKumar Gala .name = "gsbi2_qup_clk", 761*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 762*cb02866fSAnsuel Smith &gsbi2_qup_src.clkr.hw, 763*cb02866fSAnsuel Smith }, 76424d8fba4SKumar Gala .num_parents = 1, 76524d8fba4SKumar Gala .ops = &clk_branch_ops, 76624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 76724d8fba4SKumar Gala }, 76824d8fba4SKumar Gala }, 76924d8fba4SKumar Gala }; 77024d8fba4SKumar Gala 77124d8fba4SKumar Gala static struct clk_rcg gsbi4_qup_src = { 77224d8fba4SKumar Gala .ns_reg = 0x2a2c, 77324d8fba4SKumar Gala .md_reg = 0x2a28, 77424d8fba4SKumar Gala .mn = { 77524d8fba4SKumar Gala .mnctr_en_bit = 8, 77624d8fba4SKumar Gala .mnctr_reset_bit = 7, 77724d8fba4SKumar Gala .mnctr_mode_shift = 5, 77824d8fba4SKumar Gala .n_val_shift = 16, 77924d8fba4SKumar Gala .m_val_shift = 16, 78024d8fba4SKumar Gala .width = 8, 78124d8fba4SKumar Gala }, 78224d8fba4SKumar Gala .p = { 78324d8fba4SKumar Gala .pre_div_shift = 3, 78424d8fba4SKumar Gala .pre_div_width = 2, 78524d8fba4SKumar Gala }, 78624d8fba4SKumar Gala .s = { 78724d8fba4SKumar Gala .src_sel_shift = 0, 78824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 78924d8fba4SKumar Gala }, 79024d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 79124d8fba4SKumar Gala .clkr = { 79224d8fba4SKumar Gala .enable_reg = 0x2a2c, 79324d8fba4SKumar Gala .enable_mask = BIT(11), 79424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 79524d8fba4SKumar Gala .name = "gsbi4_qup_src", 796*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 79724d8fba4SKumar Gala .num_parents = 2, 79824d8fba4SKumar Gala .ops = &clk_rcg_ops, 79924d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 80024d8fba4SKumar Gala }, 80124d8fba4SKumar Gala }, 80224d8fba4SKumar Gala }; 80324d8fba4SKumar Gala 80424d8fba4SKumar Gala static struct clk_branch gsbi4_qup_clk = { 80524d8fba4SKumar Gala .halt_reg = 0x2fd0, 80624d8fba4SKumar Gala .halt_bit = 24, 80724d8fba4SKumar Gala .clkr = { 80824d8fba4SKumar Gala .enable_reg = 0x2a2c, 80924d8fba4SKumar Gala .enable_mask = BIT(9), 81024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 81124d8fba4SKumar Gala .name = "gsbi4_qup_clk", 812*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 813*cb02866fSAnsuel Smith &gsbi4_qup_src.clkr.hw, 814*cb02866fSAnsuel Smith }, 81524d8fba4SKumar Gala .num_parents = 1, 81624d8fba4SKumar Gala .ops = &clk_branch_ops, 81724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 81824d8fba4SKumar Gala }, 81924d8fba4SKumar Gala }, 82024d8fba4SKumar Gala }; 82124d8fba4SKumar Gala 82224d8fba4SKumar Gala static struct clk_rcg gsbi5_qup_src = { 82324d8fba4SKumar Gala .ns_reg = 0x2a4c, 82424d8fba4SKumar Gala .md_reg = 0x2a48, 82524d8fba4SKumar Gala .mn = { 82624d8fba4SKumar Gala .mnctr_en_bit = 8, 82724d8fba4SKumar Gala .mnctr_reset_bit = 7, 82824d8fba4SKumar Gala .mnctr_mode_shift = 5, 82924d8fba4SKumar Gala .n_val_shift = 16, 83024d8fba4SKumar Gala .m_val_shift = 16, 83124d8fba4SKumar Gala .width = 8, 83224d8fba4SKumar Gala }, 83324d8fba4SKumar Gala .p = { 83424d8fba4SKumar Gala .pre_div_shift = 3, 83524d8fba4SKumar Gala .pre_div_width = 2, 83624d8fba4SKumar Gala }, 83724d8fba4SKumar Gala .s = { 83824d8fba4SKumar Gala .src_sel_shift = 0, 83924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 84024d8fba4SKumar Gala }, 84124d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 84224d8fba4SKumar Gala .clkr = { 84324d8fba4SKumar Gala .enable_reg = 0x2a4c, 84424d8fba4SKumar Gala .enable_mask = BIT(11), 84524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 84624d8fba4SKumar Gala .name = "gsbi5_qup_src", 847*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 84824d8fba4SKumar Gala .num_parents = 2, 84924d8fba4SKumar Gala .ops = &clk_rcg_ops, 85024d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 85124d8fba4SKumar Gala }, 85224d8fba4SKumar Gala }, 85324d8fba4SKumar Gala }; 85424d8fba4SKumar Gala 85524d8fba4SKumar Gala static struct clk_branch gsbi5_qup_clk = { 85624d8fba4SKumar Gala .halt_reg = 0x2fd0, 85724d8fba4SKumar Gala .halt_bit = 20, 85824d8fba4SKumar Gala .clkr = { 85924d8fba4SKumar Gala .enable_reg = 0x2a4c, 86024d8fba4SKumar Gala .enable_mask = BIT(9), 86124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 86224d8fba4SKumar Gala .name = "gsbi5_qup_clk", 863*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 864*cb02866fSAnsuel Smith &gsbi5_qup_src.clkr.hw, 865*cb02866fSAnsuel Smith }, 86624d8fba4SKumar Gala .num_parents = 1, 86724d8fba4SKumar Gala .ops = &clk_branch_ops, 86824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 86924d8fba4SKumar Gala }, 87024d8fba4SKumar Gala }, 87124d8fba4SKumar Gala }; 87224d8fba4SKumar Gala 87324d8fba4SKumar Gala static struct clk_rcg gsbi6_qup_src = { 87424d8fba4SKumar Gala .ns_reg = 0x2a6c, 87524d8fba4SKumar Gala .md_reg = 0x2a68, 87624d8fba4SKumar Gala .mn = { 87724d8fba4SKumar Gala .mnctr_en_bit = 8, 87824d8fba4SKumar Gala .mnctr_reset_bit = 7, 87924d8fba4SKumar Gala .mnctr_mode_shift = 5, 88024d8fba4SKumar Gala .n_val_shift = 16, 88124d8fba4SKumar Gala .m_val_shift = 16, 88224d8fba4SKumar Gala .width = 8, 88324d8fba4SKumar Gala }, 88424d8fba4SKumar Gala .p = { 88524d8fba4SKumar Gala .pre_div_shift = 3, 88624d8fba4SKumar Gala .pre_div_width = 2, 88724d8fba4SKumar Gala }, 88824d8fba4SKumar Gala .s = { 88924d8fba4SKumar Gala .src_sel_shift = 0, 89024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 89124d8fba4SKumar Gala }, 89224d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 89324d8fba4SKumar Gala .clkr = { 89424d8fba4SKumar Gala .enable_reg = 0x2a6c, 89524d8fba4SKumar Gala .enable_mask = BIT(11), 89624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 89724d8fba4SKumar Gala .name = "gsbi6_qup_src", 898*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 89924d8fba4SKumar Gala .num_parents = 2, 90024d8fba4SKumar Gala .ops = &clk_rcg_ops, 90124d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 90224d8fba4SKumar Gala }, 90324d8fba4SKumar Gala }, 90424d8fba4SKumar Gala }; 90524d8fba4SKumar Gala 90624d8fba4SKumar Gala static struct clk_branch gsbi6_qup_clk = { 90724d8fba4SKumar Gala .halt_reg = 0x2fd0, 90824d8fba4SKumar Gala .halt_bit = 16, 90924d8fba4SKumar Gala .clkr = { 91024d8fba4SKumar Gala .enable_reg = 0x2a6c, 91124d8fba4SKumar Gala .enable_mask = BIT(9), 91224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 91324d8fba4SKumar Gala .name = "gsbi6_qup_clk", 914*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 915*cb02866fSAnsuel Smith &gsbi6_qup_src.clkr.hw, 916*cb02866fSAnsuel Smith }, 91724d8fba4SKumar Gala .num_parents = 1, 91824d8fba4SKumar Gala .ops = &clk_branch_ops, 91924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 92024d8fba4SKumar Gala }, 92124d8fba4SKumar Gala }, 92224d8fba4SKumar Gala }; 92324d8fba4SKumar Gala 92424d8fba4SKumar Gala static struct clk_rcg gsbi7_qup_src = { 92524d8fba4SKumar Gala .ns_reg = 0x2a8c, 92624d8fba4SKumar Gala .md_reg = 0x2a88, 92724d8fba4SKumar Gala .mn = { 92824d8fba4SKumar Gala .mnctr_en_bit = 8, 92924d8fba4SKumar Gala .mnctr_reset_bit = 7, 93024d8fba4SKumar Gala .mnctr_mode_shift = 5, 93124d8fba4SKumar Gala .n_val_shift = 16, 93224d8fba4SKumar Gala .m_val_shift = 16, 93324d8fba4SKumar Gala .width = 8, 93424d8fba4SKumar Gala }, 93524d8fba4SKumar Gala .p = { 93624d8fba4SKumar Gala .pre_div_shift = 3, 93724d8fba4SKumar Gala .pre_div_width = 2, 93824d8fba4SKumar Gala }, 93924d8fba4SKumar Gala .s = { 94024d8fba4SKumar Gala .src_sel_shift = 0, 94124d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 94224d8fba4SKumar Gala }, 94324d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 94424d8fba4SKumar Gala .clkr = { 94524d8fba4SKumar Gala .enable_reg = 0x2a8c, 94624d8fba4SKumar Gala .enable_mask = BIT(11), 94724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 94824d8fba4SKumar Gala .name = "gsbi7_qup_src", 949*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 95024d8fba4SKumar Gala .num_parents = 2, 95124d8fba4SKumar Gala .ops = &clk_rcg_ops, 95224d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 95324d8fba4SKumar Gala }, 95424d8fba4SKumar Gala }, 95524d8fba4SKumar Gala }; 95624d8fba4SKumar Gala 95724d8fba4SKumar Gala static struct clk_branch gsbi7_qup_clk = { 95824d8fba4SKumar Gala .halt_reg = 0x2fd0, 95924d8fba4SKumar Gala .halt_bit = 12, 96024d8fba4SKumar Gala .clkr = { 96124d8fba4SKumar Gala .enable_reg = 0x2a8c, 96224d8fba4SKumar Gala .enable_mask = BIT(9), 96324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 96424d8fba4SKumar Gala .name = "gsbi7_qup_clk", 965*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 966*cb02866fSAnsuel Smith &gsbi7_qup_src.clkr.hw, 967*cb02866fSAnsuel Smith }, 96824d8fba4SKumar Gala .num_parents = 1, 96924d8fba4SKumar Gala .ops = &clk_branch_ops, 97024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 97124d8fba4SKumar Gala }, 97224d8fba4SKumar Gala }, 97324d8fba4SKumar Gala }; 97424d8fba4SKumar Gala 97524d8fba4SKumar Gala static struct clk_branch gsbi1_h_clk = { 97624d8fba4SKumar Gala .hwcg_reg = 0x29c0, 97724d8fba4SKumar Gala .hwcg_bit = 6, 97824d8fba4SKumar Gala .halt_reg = 0x2fcc, 97924d8fba4SKumar Gala .halt_bit = 13, 98024d8fba4SKumar Gala .clkr = { 98124d8fba4SKumar Gala .enable_reg = 0x29c0, 98224d8fba4SKumar Gala .enable_mask = BIT(4), 98324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 98424d8fba4SKumar Gala .name = "gsbi1_h_clk", 98524d8fba4SKumar Gala .ops = &clk_branch_ops, 98624d8fba4SKumar Gala }, 98724d8fba4SKumar Gala }, 98824d8fba4SKumar Gala }; 98924d8fba4SKumar Gala 99024d8fba4SKumar Gala static struct clk_branch gsbi2_h_clk = { 99124d8fba4SKumar Gala .hwcg_reg = 0x29e0, 99224d8fba4SKumar Gala .hwcg_bit = 6, 99324d8fba4SKumar Gala .halt_reg = 0x2fcc, 99424d8fba4SKumar Gala .halt_bit = 9, 99524d8fba4SKumar Gala .clkr = { 99624d8fba4SKumar Gala .enable_reg = 0x29e0, 99724d8fba4SKumar Gala .enable_mask = BIT(4), 99824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 99924d8fba4SKumar Gala .name = "gsbi2_h_clk", 100024d8fba4SKumar Gala .ops = &clk_branch_ops, 100124d8fba4SKumar Gala }, 100224d8fba4SKumar Gala }, 100324d8fba4SKumar Gala }; 100424d8fba4SKumar Gala 100524d8fba4SKumar Gala static struct clk_branch gsbi4_h_clk = { 100624d8fba4SKumar Gala .hwcg_reg = 0x2a20, 100724d8fba4SKumar Gala .hwcg_bit = 6, 100824d8fba4SKumar Gala .halt_reg = 0x2fd0, 100924d8fba4SKumar Gala .halt_bit = 27, 101024d8fba4SKumar Gala .clkr = { 101124d8fba4SKumar Gala .enable_reg = 0x2a20, 101224d8fba4SKumar Gala .enable_mask = BIT(4), 101324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 101424d8fba4SKumar Gala .name = "gsbi4_h_clk", 101524d8fba4SKumar Gala .ops = &clk_branch_ops, 101624d8fba4SKumar Gala }, 101724d8fba4SKumar Gala }, 101824d8fba4SKumar Gala }; 101924d8fba4SKumar Gala 102024d8fba4SKumar Gala static struct clk_branch gsbi5_h_clk = { 102124d8fba4SKumar Gala .hwcg_reg = 0x2a40, 102224d8fba4SKumar Gala .hwcg_bit = 6, 102324d8fba4SKumar Gala .halt_reg = 0x2fd0, 102424d8fba4SKumar Gala .halt_bit = 23, 102524d8fba4SKumar Gala .clkr = { 102624d8fba4SKumar Gala .enable_reg = 0x2a40, 102724d8fba4SKumar Gala .enable_mask = BIT(4), 102824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 102924d8fba4SKumar Gala .name = "gsbi5_h_clk", 103024d8fba4SKumar Gala .ops = &clk_branch_ops, 103124d8fba4SKumar Gala }, 103224d8fba4SKumar Gala }, 103324d8fba4SKumar Gala }; 103424d8fba4SKumar Gala 103524d8fba4SKumar Gala static struct clk_branch gsbi6_h_clk = { 103624d8fba4SKumar Gala .hwcg_reg = 0x2a60, 103724d8fba4SKumar Gala .hwcg_bit = 6, 103824d8fba4SKumar Gala .halt_reg = 0x2fd0, 103924d8fba4SKumar Gala .halt_bit = 19, 104024d8fba4SKumar Gala .clkr = { 104124d8fba4SKumar Gala .enable_reg = 0x2a60, 104224d8fba4SKumar Gala .enable_mask = BIT(4), 104324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 104424d8fba4SKumar Gala .name = "gsbi6_h_clk", 104524d8fba4SKumar Gala .ops = &clk_branch_ops, 104624d8fba4SKumar Gala }, 104724d8fba4SKumar Gala }, 104824d8fba4SKumar Gala }; 104924d8fba4SKumar Gala 105024d8fba4SKumar Gala static struct clk_branch gsbi7_h_clk = { 105124d8fba4SKumar Gala .hwcg_reg = 0x2a80, 105224d8fba4SKumar Gala .hwcg_bit = 6, 105324d8fba4SKumar Gala .halt_reg = 0x2fd0, 105424d8fba4SKumar Gala .halt_bit = 15, 105524d8fba4SKumar Gala .clkr = { 105624d8fba4SKumar Gala .enable_reg = 0x2a80, 105724d8fba4SKumar Gala .enable_mask = BIT(4), 105824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 105924d8fba4SKumar Gala .name = "gsbi7_h_clk", 106024d8fba4SKumar Gala .ops = &clk_branch_ops, 106124d8fba4SKumar Gala }, 106224d8fba4SKumar Gala }, 106324d8fba4SKumar Gala }; 106424d8fba4SKumar Gala 106524d8fba4SKumar Gala static const struct freq_tbl clk_tbl_gp[] = { 106624d8fba4SKumar Gala { 12500000, P_PXO, 2, 0, 0 }, 106724d8fba4SKumar Gala { 25000000, P_PXO, 1, 0, 0 }, 106824d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 }, 106924d8fba4SKumar Gala { 76800000, P_PLL8, 1, 1, 5 }, 107024d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 }, 107124d8fba4SKumar Gala { 128000000, P_PLL8, 3, 0, 0 }, 107224d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 }, 107324d8fba4SKumar Gala { } 107424d8fba4SKumar Gala }; 107524d8fba4SKumar Gala 107624d8fba4SKumar Gala static struct clk_rcg gp0_src = { 107724d8fba4SKumar Gala .ns_reg = 0x2d24, 107824d8fba4SKumar Gala .md_reg = 0x2d00, 107924d8fba4SKumar Gala .mn = { 108024d8fba4SKumar Gala .mnctr_en_bit = 8, 108124d8fba4SKumar Gala .mnctr_reset_bit = 7, 108224d8fba4SKumar Gala .mnctr_mode_shift = 5, 108324d8fba4SKumar Gala .n_val_shift = 16, 108424d8fba4SKumar Gala .m_val_shift = 16, 108524d8fba4SKumar Gala .width = 8, 108624d8fba4SKumar Gala }, 108724d8fba4SKumar Gala .p = { 108824d8fba4SKumar Gala .pre_div_shift = 3, 108924d8fba4SKumar Gala .pre_div_width = 2, 109024d8fba4SKumar Gala }, 109124d8fba4SKumar Gala .s = { 109224d8fba4SKumar Gala .src_sel_shift = 0, 109324d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 109424d8fba4SKumar Gala }, 109524d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 109624d8fba4SKumar Gala .clkr = { 109724d8fba4SKumar Gala .enable_reg = 0x2d24, 109824d8fba4SKumar Gala .enable_mask = BIT(11), 109924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 110024d8fba4SKumar Gala .name = "gp0_src", 1101*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_cxo, 110224d8fba4SKumar Gala .num_parents = 3, 110324d8fba4SKumar Gala .ops = &clk_rcg_ops, 110424d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 110524d8fba4SKumar Gala }, 110624d8fba4SKumar Gala } 110724d8fba4SKumar Gala }; 110824d8fba4SKumar Gala 110924d8fba4SKumar Gala static struct clk_branch gp0_clk = { 111024d8fba4SKumar Gala .halt_reg = 0x2fd8, 111124d8fba4SKumar Gala .halt_bit = 7, 111224d8fba4SKumar Gala .clkr = { 111324d8fba4SKumar Gala .enable_reg = 0x2d24, 111424d8fba4SKumar Gala .enable_mask = BIT(9), 111524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 111624d8fba4SKumar Gala .name = "gp0_clk", 1117*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1118*cb02866fSAnsuel Smith &gp0_src.clkr.hw, 1119*cb02866fSAnsuel Smith }, 112024d8fba4SKumar Gala .num_parents = 1, 112124d8fba4SKumar Gala .ops = &clk_branch_ops, 112224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 112324d8fba4SKumar Gala }, 112424d8fba4SKumar Gala }, 112524d8fba4SKumar Gala }; 112624d8fba4SKumar Gala 112724d8fba4SKumar Gala static struct clk_rcg gp1_src = { 112824d8fba4SKumar Gala .ns_reg = 0x2d44, 112924d8fba4SKumar Gala .md_reg = 0x2d40, 113024d8fba4SKumar Gala .mn = { 113124d8fba4SKumar Gala .mnctr_en_bit = 8, 113224d8fba4SKumar Gala .mnctr_reset_bit = 7, 113324d8fba4SKumar Gala .mnctr_mode_shift = 5, 113424d8fba4SKumar Gala .n_val_shift = 16, 113524d8fba4SKumar Gala .m_val_shift = 16, 113624d8fba4SKumar Gala .width = 8, 113724d8fba4SKumar Gala }, 113824d8fba4SKumar Gala .p = { 113924d8fba4SKumar Gala .pre_div_shift = 3, 114024d8fba4SKumar Gala .pre_div_width = 2, 114124d8fba4SKumar Gala }, 114224d8fba4SKumar Gala .s = { 114324d8fba4SKumar Gala .src_sel_shift = 0, 114424d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 114524d8fba4SKumar Gala }, 114624d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 114724d8fba4SKumar Gala .clkr = { 114824d8fba4SKumar Gala .enable_reg = 0x2d44, 114924d8fba4SKumar Gala .enable_mask = BIT(11), 115024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 115124d8fba4SKumar Gala .name = "gp1_src", 1152*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_cxo, 115324d8fba4SKumar Gala .num_parents = 3, 115424d8fba4SKumar Gala .ops = &clk_rcg_ops, 115524d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 115624d8fba4SKumar Gala }, 115724d8fba4SKumar Gala } 115824d8fba4SKumar Gala }; 115924d8fba4SKumar Gala 116024d8fba4SKumar Gala static struct clk_branch gp1_clk = { 116124d8fba4SKumar Gala .halt_reg = 0x2fd8, 116224d8fba4SKumar Gala .halt_bit = 6, 116324d8fba4SKumar Gala .clkr = { 116424d8fba4SKumar Gala .enable_reg = 0x2d44, 116524d8fba4SKumar Gala .enable_mask = BIT(9), 116624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 116724d8fba4SKumar Gala .name = "gp1_clk", 1168*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1169*cb02866fSAnsuel Smith &gp1_src.clkr.hw, 1170*cb02866fSAnsuel Smith }, 117124d8fba4SKumar Gala .num_parents = 1, 117224d8fba4SKumar Gala .ops = &clk_branch_ops, 117324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 117424d8fba4SKumar Gala }, 117524d8fba4SKumar Gala }, 117624d8fba4SKumar Gala }; 117724d8fba4SKumar Gala 117824d8fba4SKumar Gala static struct clk_rcg gp2_src = { 117924d8fba4SKumar Gala .ns_reg = 0x2d64, 118024d8fba4SKumar Gala .md_reg = 0x2d60, 118124d8fba4SKumar Gala .mn = { 118224d8fba4SKumar Gala .mnctr_en_bit = 8, 118324d8fba4SKumar Gala .mnctr_reset_bit = 7, 118424d8fba4SKumar Gala .mnctr_mode_shift = 5, 118524d8fba4SKumar Gala .n_val_shift = 16, 118624d8fba4SKumar Gala .m_val_shift = 16, 118724d8fba4SKumar Gala .width = 8, 118824d8fba4SKumar Gala }, 118924d8fba4SKumar Gala .p = { 119024d8fba4SKumar Gala .pre_div_shift = 3, 119124d8fba4SKumar Gala .pre_div_width = 2, 119224d8fba4SKumar Gala }, 119324d8fba4SKumar Gala .s = { 119424d8fba4SKumar Gala .src_sel_shift = 0, 119524d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 119624d8fba4SKumar Gala }, 119724d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 119824d8fba4SKumar Gala .clkr = { 119924d8fba4SKumar Gala .enable_reg = 0x2d64, 120024d8fba4SKumar Gala .enable_mask = BIT(11), 120124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 120224d8fba4SKumar Gala .name = "gp2_src", 1203*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_cxo, 120424d8fba4SKumar Gala .num_parents = 3, 120524d8fba4SKumar Gala .ops = &clk_rcg_ops, 120624d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 120724d8fba4SKumar Gala }, 120824d8fba4SKumar Gala } 120924d8fba4SKumar Gala }; 121024d8fba4SKumar Gala 121124d8fba4SKumar Gala static struct clk_branch gp2_clk = { 121224d8fba4SKumar Gala .halt_reg = 0x2fd8, 121324d8fba4SKumar Gala .halt_bit = 5, 121424d8fba4SKumar Gala .clkr = { 121524d8fba4SKumar Gala .enable_reg = 0x2d64, 121624d8fba4SKumar Gala .enable_mask = BIT(9), 121724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 121824d8fba4SKumar Gala .name = "gp2_clk", 1219*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1220*cb02866fSAnsuel Smith &gp2_src.clkr.hw, 1221*cb02866fSAnsuel Smith }, 122224d8fba4SKumar Gala .num_parents = 1, 122324d8fba4SKumar Gala .ops = &clk_branch_ops, 122424d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 122524d8fba4SKumar Gala }, 122624d8fba4SKumar Gala }, 122724d8fba4SKumar Gala }; 122824d8fba4SKumar Gala 122924d8fba4SKumar Gala static struct clk_branch pmem_clk = { 123024d8fba4SKumar Gala .hwcg_reg = 0x25a0, 123124d8fba4SKumar Gala .hwcg_bit = 6, 123224d8fba4SKumar Gala .halt_reg = 0x2fc8, 123324d8fba4SKumar Gala .halt_bit = 20, 123424d8fba4SKumar Gala .clkr = { 123524d8fba4SKumar Gala .enable_reg = 0x25a0, 123624d8fba4SKumar Gala .enable_mask = BIT(4), 123724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 123824d8fba4SKumar Gala .name = "pmem_clk", 123924d8fba4SKumar Gala .ops = &clk_branch_ops, 124024d8fba4SKumar Gala }, 124124d8fba4SKumar Gala }, 124224d8fba4SKumar Gala }; 124324d8fba4SKumar Gala 124424d8fba4SKumar Gala static struct clk_rcg prng_src = { 124524d8fba4SKumar Gala .ns_reg = 0x2e80, 124624d8fba4SKumar Gala .p = { 124724d8fba4SKumar Gala .pre_div_shift = 3, 124824d8fba4SKumar Gala .pre_div_width = 4, 124924d8fba4SKumar Gala }, 125024d8fba4SKumar Gala .s = { 125124d8fba4SKumar Gala .src_sel_shift = 0, 125224d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 125324d8fba4SKumar Gala }, 125424d8fba4SKumar Gala .clkr = { 12551aec193eSAbhishek Sahu .enable_reg = 0x2e80, 12561aec193eSAbhishek Sahu .enable_mask = BIT(11), 125724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 125824d8fba4SKumar Gala .name = "prng_src", 1259*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 126024d8fba4SKumar Gala .num_parents = 2, 126124d8fba4SKumar Gala .ops = &clk_rcg_ops, 126224d8fba4SKumar Gala }, 126324d8fba4SKumar Gala }, 126424d8fba4SKumar Gala }; 126524d8fba4SKumar Gala 126624d8fba4SKumar Gala static struct clk_branch prng_clk = { 126724d8fba4SKumar Gala .halt_reg = 0x2fd8, 126824d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 126924d8fba4SKumar Gala .halt_bit = 10, 127024d8fba4SKumar Gala .clkr = { 127124d8fba4SKumar Gala .enable_reg = 0x3080, 127224d8fba4SKumar Gala .enable_mask = BIT(10), 127324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 127424d8fba4SKumar Gala .name = "prng_clk", 1275*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1276*cb02866fSAnsuel Smith &prng_src.clkr.hw, 1277*cb02866fSAnsuel Smith }, 127824d8fba4SKumar Gala .num_parents = 1, 127924d8fba4SKumar Gala .ops = &clk_branch_ops, 128024d8fba4SKumar Gala }, 128124d8fba4SKumar Gala }, 128224d8fba4SKumar Gala }; 128324d8fba4SKumar Gala 128424d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sdc[] = { 1285d8210e28SStephen Boyd { 200000, P_PXO, 2, 2, 125 }, 128624d8fba4SKumar Gala { 400000, P_PLL8, 4, 1, 240 }, 128724d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 }, 128824d8fba4SKumar Gala { 17070000, P_PLL8, 1, 2, 45 }, 128924d8fba4SKumar Gala { 20210000, P_PLL8, 1, 1, 19 }, 129024d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 129124d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 129224d8fba4SKumar Gala { 64000000, P_PLL8, 3, 1, 2 }, 129324d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 }, 129424d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 }, 129524d8fba4SKumar Gala { } 129624d8fba4SKumar Gala }; 129724d8fba4SKumar Gala 129824d8fba4SKumar Gala static struct clk_rcg sdc1_src = { 129924d8fba4SKumar Gala .ns_reg = 0x282c, 130024d8fba4SKumar Gala .md_reg = 0x2828, 130124d8fba4SKumar Gala .mn = { 130224d8fba4SKumar Gala .mnctr_en_bit = 8, 130324d8fba4SKumar Gala .mnctr_reset_bit = 7, 130424d8fba4SKumar Gala .mnctr_mode_shift = 5, 130524d8fba4SKumar Gala .n_val_shift = 16, 130624d8fba4SKumar Gala .m_val_shift = 16, 130724d8fba4SKumar Gala .width = 8, 130824d8fba4SKumar Gala }, 130924d8fba4SKumar Gala .p = { 131024d8fba4SKumar Gala .pre_div_shift = 3, 131124d8fba4SKumar Gala .pre_div_width = 2, 131224d8fba4SKumar Gala }, 131324d8fba4SKumar Gala .s = { 131424d8fba4SKumar Gala .src_sel_shift = 0, 131524d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 131624d8fba4SKumar Gala }, 131724d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc, 131824d8fba4SKumar Gala .clkr = { 131924d8fba4SKumar Gala .enable_reg = 0x282c, 132024d8fba4SKumar Gala .enable_mask = BIT(11), 132124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 132224d8fba4SKumar Gala .name = "sdc1_src", 1323*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 132424d8fba4SKumar Gala .num_parents = 2, 132524d8fba4SKumar Gala .ops = &clk_rcg_ops, 132624d8fba4SKumar Gala }, 132724d8fba4SKumar Gala } 132824d8fba4SKumar Gala }; 132924d8fba4SKumar Gala 133024d8fba4SKumar Gala static struct clk_branch sdc1_clk = { 133124d8fba4SKumar Gala .halt_reg = 0x2fc8, 133224d8fba4SKumar Gala .halt_bit = 6, 133324d8fba4SKumar Gala .clkr = { 133424d8fba4SKumar Gala .enable_reg = 0x282c, 133524d8fba4SKumar Gala .enable_mask = BIT(9), 133624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 133724d8fba4SKumar Gala .name = "sdc1_clk", 1338*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1339*cb02866fSAnsuel Smith &sdc1_src.clkr.hw, 1340*cb02866fSAnsuel Smith }, 134124d8fba4SKumar Gala .num_parents = 1, 134224d8fba4SKumar Gala .ops = &clk_branch_ops, 134324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 134424d8fba4SKumar Gala }, 134524d8fba4SKumar Gala }, 134624d8fba4SKumar Gala }; 134724d8fba4SKumar Gala 134824d8fba4SKumar Gala static struct clk_rcg sdc3_src = { 134924d8fba4SKumar Gala .ns_reg = 0x286c, 135024d8fba4SKumar Gala .md_reg = 0x2868, 135124d8fba4SKumar Gala .mn = { 135224d8fba4SKumar Gala .mnctr_en_bit = 8, 135324d8fba4SKumar Gala .mnctr_reset_bit = 7, 135424d8fba4SKumar Gala .mnctr_mode_shift = 5, 135524d8fba4SKumar Gala .n_val_shift = 16, 135624d8fba4SKumar Gala .m_val_shift = 16, 135724d8fba4SKumar Gala .width = 8, 135824d8fba4SKumar Gala }, 135924d8fba4SKumar Gala .p = { 136024d8fba4SKumar Gala .pre_div_shift = 3, 136124d8fba4SKumar Gala .pre_div_width = 2, 136224d8fba4SKumar Gala }, 136324d8fba4SKumar Gala .s = { 136424d8fba4SKumar Gala .src_sel_shift = 0, 136524d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 136624d8fba4SKumar Gala }, 136724d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc, 136824d8fba4SKumar Gala .clkr = { 136924d8fba4SKumar Gala .enable_reg = 0x286c, 137024d8fba4SKumar Gala .enable_mask = BIT(11), 137124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 137224d8fba4SKumar Gala .name = "sdc3_src", 1373*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 137424d8fba4SKumar Gala .num_parents = 2, 137524d8fba4SKumar Gala .ops = &clk_rcg_ops, 137624d8fba4SKumar Gala }, 137724d8fba4SKumar Gala } 137824d8fba4SKumar Gala }; 137924d8fba4SKumar Gala 138024d8fba4SKumar Gala static struct clk_branch sdc3_clk = { 138124d8fba4SKumar Gala .halt_reg = 0x2fc8, 138224d8fba4SKumar Gala .halt_bit = 4, 138324d8fba4SKumar Gala .clkr = { 138424d8fba4SKumar Gala .enable_reg = 0x286c, 138524d8fba4SKumar Gala .enable_mask = BIT(9), 138624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 138724d8fba4SKumar Gala .name = "sdc3_clk", 1388*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1389*cb02866fSAnsuel Smith &sdc3_src.clkr.hw, 1390*cb02866fSAnsuel Smith }, 139124d8fba4SKumar Gala .num_parents = 1, 139224d8fba4SKumar Gala .ops = &clk_branch_ops, 139324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 139424d8fba4SKumar Gala }, 139524d8fba4SKumar Gala }, 139624d8fba4SKumar Gala }; 139724d8fba4SKumar Gala 139824d8fba4SKumar Gala static struct clk_branch sdc1_h_clk = { 139924d8fba4SKumar Gala .hwcg_reg = 0x2820, 140024d8fba4SKumar Gala .hwcg_bit = 6, 140124d8fba4SKumar Gala .halt_reg = 0x2fc8, 140224d8fba4SKumar Gala .halt_bit = 11, 140324d8fba4SKumar Gala .clkr = { 140424d8fba4SKumar Gala .enable_reg = 0x2820, 140524d8fba4SKumar Gala .enable_mask = BIT(4), 140624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 140724d8fba4SKumar Gala .name = "sdc1_h_clk", 140824d8fba4SKumar Gala .ops = &clk_branch_ops, 140924d8fba4SKumar Gala }, 141024d8fba4SKumar Gala }, 141124d8fba4SKumar Gala }; 141224d8fba4SKumar Gala 141324d8fba4SKumar Gala static struct clk_branch sdc3_h_clk = { 141424d8fba4SKumar Gala .hwcg_reg = 0x2860, 141524d8fba4SKumar Gala .hwcg_bit = 6, 141624d8fba4SKumar Gala .halt_reg = 0x2fc8, 141724d8fba4SKumar Gala .halt_bit = 9, 141824d8fba4SKumar Gala .clkr = { 141924d8fba4SKumar Gala .enable_reg = 0x2860, 142024d8fba4SKumar Gala .enable_mask = BIT(4), 142124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 142224d8fba4SKumar Gala .name = "sdc3_h_clk", 142324d8fba4SKumar Gala .ops = &clk_branch_ops, 142424d8fba4SKumar Gala }, 142524d8fba4SKumar Gala }, 142624d8fba4SKumar Gala }; 142724d8fba4SKumar Gala 142824d8fba4SKumar Gala static const struct freq_tbl clk_tbl_tsif_ref[] = { 142924d8fba4SKumar Gala { 105000, P_PXO, 1, 1, 256 }, 143024d8fba4SKumar Gala { } 143124d8fba4SKumar Gala }; 143224d8fba4SKumar Gala 143324d8fba4SKumar Gala static struct clk_rcg tsif_ref_src = { 143424d8fba4SKumar Gala .ns_reg = 0x2710, 143524d8fba4SKumar Gala .md_reg = 0x270c, 143624d8fba4SKumar Gala .mn = { 143724d8fba4SKumar Gala .mnctr_en_bit = 8, 143824d8fba4SKumar Gala .mnctr_reset_bit = 7, 143924d8fba4SKumar Gala .mnctr_mode_shift = 5, 144024d8fba4SKumar Gala .n_val_shift = 16, 144124d8fba4SKumar Gala .m_val_shift = 16, 144224d8fba4SKumar Gala .width = 16, 144324d8fba4SKumar Gala }, 144424d8fba4SKumar Gala .p = { 144524d8fba4SKumar Gala .pre_div_shift = 3, 144624d8fba4SKumar Gala .pre_div_width = 2, 144724d8fba4SKumar Gala }, 144824d8fba4SKumar Gala .s = { 144924d8fba4SKumar Gala .src_sel_shift = 0, 145024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 145124d8fba4SKumar Gala }, 145224d8fba4SKumar Gala .freq_tbl = clk_tbl_tsif_ref, 145324d8fba4SKumar Gala .clkr = { 145424d8fba4SKumar Gala .enable_reg = 0x2710, 145524d8fba4SKumar Gala .enable_mask = BIT(11), 145624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 145724d8fba4SKumar Gala .name = "tsif_ref_src", 1458*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8, 145924d8fba4SKumar Gala .num_parents = 2, 146024d8fba4SKumar Gala .ops = &clk_rcg_ops, 146124d8fba4SKumar Gala }, 146224d8fba4SKumar Gala } 146324d8fba4SKumar Gala }; 146424d8fba4SKumar Gala 146524d8fba4SKumar Gala static struct clk_branch tsif_ref_clk = { 146624d8fba4SKumar Gala .halt_reg = 0x2fd4, 146724d8fba4SKumar Gala .halt_bit = 5, 146824d8fba4SKumar Gala .clkr = { 146924d8fba4SKumar Gala .enable_reg = 0x2710, 147024d8fba4SKumar Gala .enable_mask = BIT(9), 147124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 147224d8fba4SKumar Gala .name = "tsif_ref_clk", 1473*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1474*cb02866fSAnsuel Smith &tsif_ref_src.clkr.hw, 1475*cb02866fSAnsuel Smith }, 147624d8fba4SKumar Gala .num_parents = 1, 147724d8fba4SKumar Gala .ops = &clk_branch_ops, 147824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 147924d8fba4SKumar Gala }, 148024d8fba4SKumar Gala }, 148124d8fba4SKumar Gala }; 148224d8fba4SKumar Gala 148324d8fba4SKumar Gala static struct clk_branch tsif_h_clk = { 148424d8fba4SKumar Gala .hwcg_reg = 0x2700, 148524d8fba4SKumar Gala .hwcg_bit = 6, 148624d8fba4SKumar Gala .halt_reg = 0x2fd4, 148724d8fba4SKumar Gala .halt_bit = 7, 148824d8fba4SKumar Gala .clkr = { 148924d8fba4SKumar Gala .enable_reg = 0x2700, 149024d8fba4SKumar Gala .enable_mask = BIT(4), 149124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 149224d8fba4SKumar Gala .name = "tsif_h_clk", 149324d8fba4SKumar Gala .ops = &clk_branch_ops, 149424d8fba4SKumar Gala }, 149524d8fba4SKumar Gala }, 149624d8fba4SKumar Gala }; 149724d8fba4SKumar Gala 149824d8fba4SKumar Gala static struct clk_branch dma_bam_h_clk = { 149924d8fba4SKumar Gala .hwcg_reg = 0x25c0, 150024d8fba4SKumar Gala .hwcg_bit = 6, 150124d8fba4SKumar Gala .halt_reg = 0x2fc8, 150224d8fba4SKumar Gala .halt_bit = 12, 150324d8fba4SKumar Gala .clkr = { 150424d8fba4SKumar Gala .enable_reg = 0x25c0, 150524d8fba4SKumar Gala .enable_mask = BIT(4), 150624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 150724d8fba4SKumar Gala .name = "dma_bam_h_clk", 150824d8fba4SKumar Gala .ops = &clk_branch_ops, 150924d8fba4SKumar Gala }, 151024d8fba4SKumar Gala }, 151124d8fba4SKumar Gala }; 151224d8fba4SKumar Gala 151324d8fba4SKumar Gala static struct clk_branch adm0_clk = { 151424d8fba4SKumar Gala .halt_reg = 0x2fdc, 151524d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 151624d8fba4SKumar Gala .halt_bit = 12, 151724d8fba4SKumar Gala .clkr = { 151824d8fba4SKumar Gala .enable_reg = 0x3080, 151924d8fba4SKumar Gala .enable_mask = BIT(2), 152024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 152124d8fba4SKumar Gala .name = "adm0_clk", 152224d8fba4SKumar Gala .ops = &clk_branch_ops, 152324d8fba4SKumar Gala }, 152424d8fba4SKumar Gala }, 152524d8fba4SKumar Gala }; 152624d8fba4SKumar Gala 152724d8fba4SKumar Gala static struct clk_branch adm0_pbus_clk = { 152824d8fba4SKumar Gala .hwcg_reg = 0x2208, 152924d8fba4SKumar Gala .hwcg_bit = 6, 153024d8fba4SKumar Gala .halt_reg = 0x2fdc, 153124d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 153224d8fba4SKumar Gala .halt_bit = 11, 153324d8fba4SKumar Gala .clkr = { 153424d8fba4SKumar Gala .enable_reg = 0x3080, 153524d8fba4SKumar Gala .enable_mask = BIT(3), 153624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 153724d8fba4SKumar Gala .name = "adm0_pbus_clk", 153824d8fba4SKumar Gala .ops = &clk_branch_ops, 153924d8fba4SKumar Gala }, 154024d8fba4SKumar Gala }, 154124d8fba4SKumar Gala }; 154224d8fba4SKumar Gala 154324d8fba4SKumar Gala static struct clk_branch pmic_arb0_h_clk = { 154424d8fba4SKumar Gala .halt_reg = 0x2fd8, 154524d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 154624d8fba4SKumar Gala .halt_bit = 22, 154724d8fba4SKumar Gala .clkr = { 154824d8fba4SKumar Gala .enable_reg = 0x3080, 154924d8fba4SKumar Gala .enable_mask = BIT(8), 155024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 155124d8fba4SKumar Gala .name = "pmic_arb0_h_clk", 155224d8fba4SKumar Gala .ops = &clk_branch_ops, 155324d8fba4SKumar Gala }, 155424d8fba4SKumar Gala }, 155524d8fba4SKumar Gala }; 155624d8fba4SKumar Gala 155724d8fba4SKumar Gala static struct clk_branch pmic_arb1_h_clk = { 155824d8fba4SKumar Gala .halt_reg = 0x2fd8, 155924d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 156024d8fba4SKumar Gala .halt_bit = 21, 156124d8fba4SKumar Gala .clkr = { 156224d8fba4SKumar Gala .enable_reg = 0x3080, 156324d8fba4SKumar Gala .enable_mask = BIT(9), 156424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 156524d8fba4SKumar Gala .name = "pmic_arb1_h_clk", 156624d8fba4SKumar Gala .ops = &clk_branch_ops, 156724d8fba4SKumar Gala }, 156824d8fba4SKumar Gala }, 156924d8fba4SKumar Gala }; 157024d8fba4SKumar Gala 157124d8fba4SKumar Gala static struct clk_branch pmic_ssbi2_clk = { 157224d8fba4SKumar Gala .halt_reg = 0x2fd8, 157324d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 157424d8fba4SKumar Gala .halt_bit = 23, 157524d8fba4SKumar Gala .clkr = { 157624d8fba4SKumar Gala .enable_reg = 0x3080, 157724d8fba4SKumar Gala .enable_mask = BIT(7), 157824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 157924d8fba4SKumar Gala .name = "pmic_ssbi2_clk", 158024d8fba4SKumar Gala .ops = &clk_branch_ops, 158124d8fba4SKumar Gala }, 158224d8fba4SKumar Gala }, 158324d8fba4SKumar Gala }; 158424d8fba4SKumar Gala 158524d8fba4SKumar Gala static struct clk_branch rpm_msg_ram_h_clk = { 158624d8fba4SKumar Gala .hwcg_reg = 0x27e0, 158724d8fba4SKumar Gala .hwcg_bit = 6, 158824d8fba4SKumar Gala .halt_reg = 0x2fd8, 158924d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 159024d8fba4SKumar Gala .halt_bit = 12, 159124d8fba4SKumar Gala .clkr = { 159224d8fba4SKumar Gala .enable_reg = 0x3080, 159324d8fba4SKumar Gala .enable_mask = BIT(6), 159424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 159524d8fba4SKumar Gala .name = "rpm_msg_ram_h_clk", 159624d8fba4SKumar Gala .ops = &clk_branch_ops, 159724d8fba4SKumar Gala }, 159824d8fba4SKumar Gala }, 159924d8fba4SKumar Gala }; 160024d8fba4SKumar Gala 160124d8fba4SKumar Gala static const struct freq_tbl clk_tbl_pcie_ref[] = { 160224d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 }, 160324d8fba4SKumar Gala { } 160424d8fba4SKumar Gala }; 160524d8fba4SKumar Gala 160624d8fba4SKumar Gala static struct clk_rcg pcie_ref_src = { 160724d8fba4SKumar Gala .ns_reg = 0x3860, 160824d8fba4SKumar Gala .p = { 160924d8fba4SKumar Gala .pre_div_shift = 3, 161024d8fba4SKumar Gala .pre_div_width = 4, 161124d8fba4SKumar Gala }, 161224d8fba4SKumar Gala .s = { 161324d8fba4SKumar Gala .src_sel_shift = 0, 161424d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 161524d8fba4SKumar Gala }, 161624d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 161724d8fba4SKumar Gala .clkr = { 161824d8fba4SKumar Gala .enable_reg = 0x3860, 161924d8fba4SKumar Gala .enable_mask = BIT(11), 162024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 162124d8fba4SKumar Gala .name = "pcie_ref_src", 1622*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3, 162324d8fba4SKumar Gala .num_parents = 2, 162424d8fba4SKumar Gala .ops = &clk_rcg_ops, 162524d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 162624d8fba4SKumar Gala }, 162724d8fba4SKumar Gala }, 162824d8fba4SKumar Gala }; 162924d8fba4SKumar Gala 163024d8fba4SKumar Gala static struct clk_branch pcie_ref_src_clk = { 163124d8fba4SKumar Gala .halt_reg = 0x2fdc, 163224d8fba4SKumar Gala .halt_bit = 30, 163324d8fba4SKumar Gala .clkr = { 163424d8fba4SKumar Gala .enable_reg = 0x3860, 163524d8fba4SKumar Gala .enable_mask = BIT(9), 163624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 163724d8fba4SKumar Gala .name = "pcie_ref_src_clk", 1638*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1639*cb02866fSAnsuel Smith &pcie_ref_src.clkr.hw, 1640*cb02866fSAnsuel Smith }, 164124d8fba4SKumar Gala .num_parents = 1, 164224d8fba4SKumar Gala .ops = &clk_branch_ops, 164324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 164424d8fba4SKumar Gala }, 164524d8fba4SKumar Gala }, 164624d8fba4SKumar Gala }; 164724d8fba4SKumar Gala 164824d8fba4SKumar Gala static struct clk_branch pcie_a_clk = { 164924d8fba4SKumar Gala .halt_reg = 0x2fc0, 165024d8fba4SKumar Gala .halt_bit = 13, 165124d8fba4SKumar Gala .clkr = { 165224d8fba4SKumar Gala .enable_reg = 0x22c0, 165324d8fba4SKumar Gala .enable_mask = BIT(4), 165424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 165524d8fba4SKumar Gala .name = "pcie_a_clk", 165624d8fba4SKumar Gala .ops = &clk_branch_ops, 165724d8fba4SKumar Gala }, 165824d8fba4SKumar Gala }, 165924d8fba4SKumar Gala }; 166024d8fba4SKumar Gala 166124d8fba4SKumar Gala static struct clk_branch pcie_aux_clk = { 166224d8fba4SKumar Gala .halt_reg = 0x2fdc, 166324d8fba4SKumar Gala .halt_bit = 31, 166424d8fba4SKumar Gala .clkr = { 166524d8fba4SKumar Gala .enable_reg = 0x22c8, 166624d8fba4SKumar Gala .enable_mask = BIT(4), 166724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 166824d8fba4SKumar Gala .name = "pcie_aux_clk", 166924d8fba4SKumar Gala .ops = &clk_branch_ops, 167024d8fba4SKumar Gala }, 167124d8fba4SKumar Gala }, 167224d8fba4SKumar Gala }; 167324d8fba4SKumar Gala 167424d8fba4SKumar Gala static struct clk_branch pcie_h_clk = { 167524d8fba4SKumar Gala .halt_reg = 0x2fd4, 167624d8fba4SKumar Gala .halt_bit = 8, 167724d8fba4SKumar Gala .clkr = { 167824d8fba4SKumar Gala .enable_reg = 0x22cc, 167924d8fba4SKumar Gala .enable_mask = BIT(4), 168024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 168124d8fba4SKumar Gala .name = "pcie_h_clk", 168224d8fba4SKumar Gala .ops = &clk_branch_ops, 168324d8fba4SKumar Gala }, 168424d8fba4SKumar Gala }, 168524d8fba4SKumar Gala }; 168624d8fba4SKumar Gala 168724d8fba4SKumar Gala static struct clk_branch pcie_phy_clk = { 168824d8fba4SKumar Gala .halt_reg = 0x2fdc, 168924d8fba4SKumar Gala .halt_bit = 29, 169024d8fba4SKumar Gala .clkr = { 169124d8fba4SKumar Gala .enable_reg = 0x22d0, 169224d8fba4SKumar Gala .enable_mask = BIT(4), 169324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 169424d8fba4SKumar Gala .name = "pcie_phy_clk", 169524d8fba4SKumar Gala .ops = &clk_branch_ops, 169624d8fba4SKumar Gala }, 169724d8fba4SKumar Gala }, 169824d8fba4SKumar Gala }; 169924d8fba4SKumar Gala 170024d8fba4SKumar Gala static struct clk_rcg pcie1_ref_src = { 170124d8fba4SKumar Gala .ns_reg = 0x3aa0, 170224d8fba4SKumar Gala .p = { 170324d8fba4SKumar Gala .pre_div_shift = 3, 170424d8fba4SKumar Gala .pre_div_width = 4, 170524d8fba4SKumar Gala }, 170624d8fba4SKumar Gala .s = { 170724d8fba4SKumar Gala .src_sel_shift = 0, 170824d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 170924d8fba4SKumar Gala }, 171024d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 171124d8fba4SKumar Gala .clkr = { 171224d8fba4SKumar Gala .enable_reg = 0x3aa0, 171324d8fba4SKumar Gala .enable_mask = BIT(11), 171424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 171524d8fba4SKumar Gala .name = "pcie1_ref_src", 1716*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3, 171724d8fba4SKumar Gala .num_parents = 2, 171824d8fba4SKumar Gala .ops = &clk_rcg_ops, 171924d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 172024d8fba4SKumar Gala }, 172124d8fba4SKumar Gala }, 172224d8fba4SKumar Gala }; 172324d8fba4SKumar Gala 172424d8fba4SKumar Gala static struct clk_branch pcie1_ref_src_clk = { 172524d8fba4SKumar Gala .halt_reg = 0x2fdc, 172624d8fba4SKumar Gala .halt_bit = 27, 172724d8fba4SKumar Gala .clkr = { 172824d8fba4SKumar Gala .enable_reg = 0x3aa0, 172924d8fba4SKumar Gala .enable_mask = BIT(9), 173024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 173124d8fba4SKumar Gala .name = "pcie1_ref_src_clk", 1732*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1733*cb02866fSAnsuel Smith &pcie1_ref_src.clkr.hw, 1734*cb02866fSAnsuel Smith }, 173524d8fba4SKumar Gala .num_parents = 1, 173624d8fba4SKumar Gala .ops = &clk_branch_ops, 173724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 173824d8fba4SKumar Gala }, 173924d8fba4SKumar Gala }, 174024d8fba4SKumar Gala }; 174124d8fba4SKumar Gala 174224d8fba4SKumar Gala static struct clk_branch pcie1_a_clk = { 174324d8fba4SKumar Gala .halt_reg = 0x2fc0, 174424d8fba4SKumar Gala .halt_bit = 10, 174524d8fba4SKumar Gala .clkr = { 174624d8fba4SKumar Gala .enable_reg = 0x3a80, 174724d8fba4SKumar Gala .enable_mask = BIT(4), 174824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 174924d8fba4SKumar Gala .name = "pcie1_a_clk", 175024d8fba4SKumar Gala .ops = &clk_branch_ops, 175124d8fba4SKumar Gala }, 175224d8fba4SKumar Gala }, 175324d8fba4SKumar Gala }; 175424d8fba4SKumar Gala 175524d8fba4SKumar Gala static struct clk_branch pcie1_aux_clk = { 175624d8fba4SKumar Gala .halt_reg = 0x2fdc, 175724d8fba4SKumar Gala .halt_bit = 28, 175824d8fba4SKumar Gala .clkr = { 175924d8fba4SKumar Gala .enable_reg = 0x3a88, 176024d8fba4SKumar Gala .enable_mask = BIT(4), 176124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 176224d8fba4SKumar Gala .name = "pcie1_aux_clk", 176324d8fba4SKumar Gala .ops = &clk_branch_ops, 176424d8fba4SKumar Gala }, 176524d8fba4SKumar Gala }, 176624d8fba4SKumar Gala }; 176724d8fba4SKumar Gala 176824d8fba4SKumar Gala static struct clk_branch pcie1_h_clk = { 176924d8fba4SKumar Gala .halt_reg = 0x2fd4, 177024d8fba4SKumar Gala .halt_bit = 9, 177124d8fba4SKumar Gala .clkr = { 177224d8fba4SKumar Gala .enable_reg = 0x3a8c, 177324d8fba4SKumar Gala .enable_mask = BIT(4), 177424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 177524d8fba4SKumar Gala .name = "pcie1_h_clk", 177624d8fba4SKumar Gala .ops = &clk_branch_ops, 177724d8fba4SKumar Gala }, 177824d8fba4SKumar Gala }, 177924d8fba4SKumar Gala }; 178024d8fba4SKumar Gala 178124d8fba4SKumar Gala static struct clk_branch pcie1_phy_clk = { 178224d8fba4SKumar Gala .halt_reg = 0x2fdc, 178324d8fba4SKumar Gala .halt_bit = 26, 178424d8fba4SKumar Gala .clkr = { 178524d8fba4SKumar Gala .enable_reg = 0x3a90, 178624d8fba4SKumar Gala .enable_mask = BIT(4), 178724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 178824d8fba4SKumar Gala .name = "pcie1_phy_clk", 178924d8fba4SKumar Gala .ops = &clk_branch_ops, 179024d8fba4SKumar Gala }, 179124d8fba4SKumar Gala }, 179224d8fba4SKumar Gala }; 179324d8fba4SKumar Gala 179424d8fba4SKumar Gala static struct clk_rcg pcie2_ref_src = { 179524d8fba4SKumar Gala .ns_reg = 0x3ae0, 179624d8fba4SKumar Gala .p = { 179724d8fba4SKumar Gala .pre_div_shift = 3, 179824d8fba4SKumar Gala .pre_div_width = 4, 179924d8fba4SKumar Gala }, 180024d8fba4SKumar Gala .s = { 180124d8fba4SKumar Gala .src_sel_shift = 0, 180224d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 180324d8fba4SKumar Gala }, 180424d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 180524d8fba4SKumar Gala .clkr = { 180624d8fba4SKumar Gala .enable_reg = 0x3ae0, 180724d8fba4SKumar Gala .enable_mask = BIT(11), 180824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 180924d8fba4SKumar Gala .name = "pcie2_ref_src", 1810*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3, 181124d8fba4SKumar Gala .num_parents = 2, 181224d8fba4SKumar Gala .ops = &clk_rcg_ops, 181324d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 181424d8fba4SKumar Gala }, 181524d8fba4SKumar Gala }, 181624d8fba4SKumar Gala }; 181724d8fba4SKumar Gala 181824d8fba4SKumar Gala static struct clk_branch pcie2_ref_src_clk = { 181924d8fba4SKumar Gala .halt_reg = 0x2fdc, 182024d8fba4SKumar Gala .halt_bit = 24, 182124d8fba4SKumar Gala .clkr = { 182224d8fba4SKumar Gala .enable_reg = 0x3ae0, 182324d8fba4SKumar Gala .enable_mask = BIT(9), 182424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 182524d8fba4SKumar Gala .name = "pcie2_ref_src_clk", 1826*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1827*cb02866fSAnsuel Smith &pcie2_ref_src.clkr.hw, 1828*cb02866fSAnsuel Smith }, 182924d8fba4SKumar Gala .num_parents = 1, 183024d8fba4SKumar Gala .ops = &clk_branch_ops, 183124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 183224d8fba4SKumar Gala }, 183324d8fba4SKumar Gala }, 183424d8fba4SKumar Gala }; 183524d8fba4SKumar Gala 183624d8fba4SKumar Gala static struct clk_branch pcie2_a_clk = { 183724d8fba4SKumar Gala .halt_reg = 0x2fc0, 183824d8fba4SKumar Gala .halt_bit = 9, 183924d8fba4SKumar Gala .clkr = { 184024d8fba4SKumar Gala .enable_reg = 0x3ac0, 184124d8fba4SKumar Gala .enable_mask = BIT(4), 184224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 184324d8fba4SKumar Gala .name = "pcie2_a_clk", 184424d8fba4SKumar Gala .ops = &clk_branch_ops, 184524d8fba4SKumar Gala }, 184624d8fba4SKumar Gala }, 184724d8fba4SKumar Gala }; 184824d8fba4SKumar Gala 184924d8fba4SKumar Gala static struct clk_branch pcie2_aux_clk = { 185024d8fba4SKumar Gala .halt_reg = 0x2fdc, 185124d8fba4SKumar Gala .halt_bit = 25, 185224d8fba4SKumar Gala .clkr = { 185324d8fba4SKumar Gala .enable_reg = 0x3ac8, 185424d8fba4SKumar Gala .enable_mask = BIT(4), 185524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 185624d8fba4SKumar Gala .name = "pcie2_aux_clk", 185724d8fba4SKumar Gala .ops = &clk_branch_ops, 185824d8fba4SKumar Gala }, 185924d8fba4SKumar Gala }, 186024d8fba4SKumar Gala }; 186124d8fba4SKumar Gala 186224d8fba4SKumar Gala static struct clk_branch pcie2_h_clk = { 186324d8fba4SKumar Gala .halt_reg = 0x2fd4, 186424d8fba4SKumar Gala .halt_bit = 10, 186524d8fba4SKumar Gala .clkr = { 186624d8fba4SKumar Gala .enable_reg = 0x3acc, 186724d8fba4SKumar Gala .enable_mask = BIT(4), 186824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 186924d8fba4SKumar Gala .name = "pcie2_h_clk", 187024d8fba4SKumar Gala .ops = &clk_branch_ops, 187124d8fba4SKumar Gala }, 187224d8fba4SKumar Gala }, 187324d8fba4SKumar Gala }; 187424d8fba4SKumar Gala 187524d8fba4SKumar Gala static struct clk_branch pcie2_phy_clk = { 187624d8fba4SKumar Gala .halt_reg = 0x2fdc, 187724d8fba4SKumar Gala .halt_bit = 23, 187824d8fba4SKumar Gala .clkr = { 187924d8fba4SKumar Gala .enable_reg = 0x3ad0, 188024d8fba4SKumar Gala .enable_mask = BIT(4), 188124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 188224d8fba4SKumar Gala .name = "pcie2_phy_clk", 188324d8fba4SKumar Gala .ops = &clk_branch_ops, 188424d8fba4SKumar Gala }, 188524d8fba4SKumar Gala }, 188624d8fba4SKumar Gala }; 188724d8fba4SKumar Gala 188824d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sata_ref[] = { 188924d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 }, 189024d8fba4SKumar Gala { } 189124d8fba4SKumar Gala }; 189224d8fba4SKumar Gala 189324d8fba4SKumar Gala static struct clk_rcg sata_ref_src = { 189424d8fba4SKumar Gala .ns_reg = 0x2c08, 189524d8fba4SKumar Gala .p = { 189624d8fba4SKumar Gala .pre_div_shift = 3, 189724d8fba4SKumar Gala .pre_div_width = 4, 189824d8fba4SKumar Gala }, 189924d8fba4SKumar Gala .s = { 190024d8fba4SKumar Gala .src_sel_shift = 0, 190124d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_sata_map, 190224d8fba4SKumar Gala }, 190324d8fba4SKumar Gala .freq_tbl = clk_tbl_sata_ref, 190424d8fba4SKumar Gala .clkr = { 190524d8fba4SKumar Gala .enable_reg = 0x2c08, 190624d8fba4SKumar Gala .enable_mask = BIT(7), 190724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 190824d8fba4SKumar Gala .name = "sata_ref_src", 1909*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll3, 191024d8fba4SKumar Gala .num_parents = 2, 191124d8fba4SKumar Gala .ops = &clk_rcg_ops, 191224d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 191324d8fba4SKumar Gala }, 191424d8fba4SKumar Gala }, 191524d8fba4SKumar Gala }; 191624d8fba4SKumar Gala 191724d8fba4SKumar Gala static struct clk_branch sata_rxoob_clk = { 191824d8fba4SKumar Gala .halt_reg = 0x2fdc, 191924d8fba4SKumar Gala .halt_bit = 20, 192024d8fba4SKumar Gala .clkr = { 192124d8fba4SKumar Gala .enable_reg = 0x2c0c, 192224d8fba4SKumar Gala .enable_mask = BIT(4), 192324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 192424d8fba4SKumar Gala .name = "sata_rxoob_clk", 1925*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1926*cb02866fSAnsuel Smith &sata_ref_src.clkr.hw, 1927*cb02866fSAnsuel Smith }, 192824d8fba4SKumar Gala .num_parents = 1, 192924d8fba4SKumar Gala .ops = &clk_branch_ops, 193024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 193124d8fba4SKumar Gala }, 193224d8fba4SKumar Gala }, 193324d8fba4SKumar Gala }; 193424d8fba4SKumar Gala 193524d8fba4SKumar Gala static struct clk_branch sata_pmalive_clk = { 193624d8fba4SKumar Gala .halt_reg = 0x2fdc, 193724d8fba4SKumar Gala .halt_bit = 19, 193824d8fba4SKumar Gala .clkr = { 193924d8fba4SKumar Gala .enable_reg = 0x2c10, 194024d8fba4SKumar Gala .enable_mask = BIT(4), 194124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 194224d8fba4SKumar Gala .name = "sata_pmalive_clk", 1943*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 1944*cb02866fSAnsuel Smith &sata_ref_src.clkr.hw, 1945*cb02866fSAnsuel Smith }, 194624d8fba4SKumar Gala .num_parents = 1, 194724d8fba4SKumar Gala .ops = &clk_branch_ops, 194824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 194924d8fba4SKumar Gala }, 195024d8fba4SKumar Gala }, 195124d8fba4SKumar Gala }; 195224d8fba4SKumar Gala 195324d8fba4SKumar Gala static struct clk_branch sata_phy_ref_clk = { 195424d8fba4SKumar Gala .halt_reg = 0x2fdc, 195524d8fba4SKumar Gala .halt_bit = 18, 195624d8fba4SKumar Gala .clkr = { 195724d8fba4SKumar Gala .enable_reg = 0x2c14, 195824d8fba4SKumar Gala .enable_mask = BIT(4), 195924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 196024d8fba4SKumar Gala .name = "sata_phy_ref_clk", 1961*cb02866fSAnsuel Smith .parent_data = gcc_pxo, 196224d8fba4SKumar Gala .num_parents = 1, 196324d8fba4SKumar Gala .ops = &clk_branch_ops, 196424d8fba4SKumar Gala }, 196524d8fba4SKumar Gala }, 196624d8fba4SKumar Gala }; 196724d8fba4SKumar Gala 196824d8fba4SKumar Gala static struct clk_branch sata_a_clk = { 196924d8fba4SKumar Gala .halt_reg = 0x2fc0, 197024d8fba4SKumar Gala .halt_bit = 12, 197124d8fba4SKumar Gala .clkr = { 197224d8fba4SKumar Gala .enable_reg = 0x2c20, 197324d8fba4SKumar Gala .enable_mask = BIT(4), 197424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 197524d8fba4SKumar Gala .name = "sata_a_clk", 197624d8fba4SKumar Gala .ops = &clk_branch_ops, 197724d8fba4SKumar Gala }, 197824d8fba4SKumar Gala }, 197924d8fba4SKumar Gala }; 198024d8fba4SKumar Gala 198124d8fba4SKumar Gala static struct clk_branch sata_h_clk = { 198224d8fba4SKumar Gala .halt_reg = 0x2fdc, 198324d8fba4SKumar Gala .halt_bit = 21, 198424d8fba4SKumar Gala .clkr = { 198524d8fba4SKumar Gala .enable_reg = 0x2c00, 198624d8fba4SKumar Gala .enable_mask = BIT(4), 198724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 198824d8fba4SKumar Gala .name = "sata_h_clk", 198924d8fba4SKumar Gala .ops = &clk_branch_ops, 199024d8fba4SKumar Gala }, 199124d8fba4SKumar Gala }, 199224d8fba4SKumar Gala }; 199324d8fba4SKumar Gala 199424d8fba4SKumar Gala static struct clk_branch sfab_sata_s_h_clk = { 199524d8fba4SKumar Gala .halt_reg = 0x2fc4, 199624d8fba4SKumar Gala .halt_bit = 14, 199724d8fba4SKumar Gala .clkr = { 199824d8fba4SKumar Gala .enable_reg = 0x2480, 199924d8fba4SKumar Gala .enable_mask = BIT(4), 200024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 200124d8fba4SKumar Gala .name = "sfab_sata_s_h_clk", 200224d8fba4SKumar Gala .ops = &clk_branch_ops, 200324d8fba4SKumar Gala }, 200424d8fba4SKumar Gala }, 200524d8fba4SKumar Gala }; 200624d8fba4SKumar Gala 200724d8fba4SKumar Gala static struct clk_branch sata_phy_cfg_clk = { 200824d8fba4SKumar Gala .halt_reg = 0x2fcc, 200924d8fba4SKumar Gala .halt_bit = 14, 201024d8fba4SKumar Gala .clkr = { 201124d8fba4SKumar Gala .enable_reg = 0x2c40, 201224d8fba4SKumar Gala .enable_mask = BIT(4), 201324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 201424d8fba4SKumar Gala .name = "sata_phy_cfg_clk", 201524d8fba4SKumar Gala .ops = &clk_branch_ops, 201624d8fba4SKumar Gala }, 201724d8fba4SKumar Gala }, 201824d8fba4SKumar Gala }; 201924d8fba4SKumar Gala 202024d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_master[] = { 202124d8fba4SKumar Gala { 125000000, P_PLL0, 1, 5, 32 }, 202224d8fba4SKumar Gala { } 202324d8fba4SKumar Gala }; 202424d8fba4SKumar Gala 202524d8fba4SKumar Gala static struct clk_rcg usb30_master_clk_src = { 202624d8fba4SKumar Gala .ns_reg = 0x3b2c, 202724d8fba4SKumar Gala .md_reg = 0x3b28, 202824d8fba4SKumar Gala .mn = { 202924d8fba4SKumar Gala .mnctr_en_bit = 8, 203024d8fba4SKumar Gala .mnctr_reset_bit = 7, 203124d8fba4SKumar Gala .mnctr_mode_shift = 5, 203224d8fba4SKumar Gala .n_val_shift = 16, 203324d8fba4SKumar Gala .m_val_shift = 16, 203424d8fba4SKumar Gala .width = 8, 203524d8fba4SKumar Gala }, 203624d8fba4SKumar Gala .p = { 203724d8fba4SKumar Gala .pre_div_shift = 3, 203824d8fba4SKumar Gala .pre_div_width = 2, 203924d8fba4SKumar Gala }, 204024d8fba4SKumar Gala .s = { 204124d8fba4SKumar Gala .src_sel_shift = 0, 2042e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map, 204324d8fba4SKumar Gala }, 204424d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_master, 204524d8fba4SKumar Gala .clkr = { 204624d8fba4SKumar Gala .enable_reg = 0x3b2c, 204724d8fba4SKumar Gala .enable_mask = BIT(11), 204824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 204924d8fba4SKumar Gala .name = "usb30_master_ref_src", 2050*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0, 205124d8fba4SKumar Gala .num_parents = 3, 205224d8fba4SKumar Gala .ops = &clk_rcg_ops, 205324d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 205424d8fba4SKumar Gala }, 205524d8fba4SKumar Gala }, 205624d8fba4SKumar Gala }; 205724d8fba4SKumar Gala 205824d8fba4SKumar Gala static struct clk_branch usb30_0_branch_clk = { 205924d8fba4SKumar Gala .halt_reg = 0x2fc4, 206024d8fba4SKumar Gala .halt_bit = 22, 206124d8fba4SKumar Gala .clkr = { 206224d8fba4SKumar Gala .enable_reg = 0x3b24, 206324d8fba4SKumar Gala .enable_mask = BIT(4), 206424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 206524d8fba4SKumar Gala .name = "usb30_0_branch_clk", 2066*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2067*cb02866fSAnsuel Smith &usb30_master_clk_src.clkr.hw, 2068*cb02866fSAnsuel Smith }, 206924d8fba4SKumar Gala .num_parents = 1, 207024d8fba4SKumar Gala .ops = &clk_branch_ops, 207124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 207224d8fba4SKumar Gala }, 207324d8fba4SKumar Gala }, 207424d8fba4SKumar Gala }; 207524d8fba4SKumar Gala 207624d8fba4SKumar Gala static struct clk_branch usb30_1_branch_clk = { 207724d8fba4SKumar Gala .halt_reg = 0x2fc4, 207824d8fba4SKumar Gala .halt_bit = 17, 207924d8fba4SKumar Gala .clkr = { 208024d8fba4SKumar Gala .enable_reg = 0x3b34, 208124d8fba4SKumar Gala .enable_mask = BIT(4), 208224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 208324d8fba4SKumar Gala .name = "usb30_1_branch_clk", 2084*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2085*cb02866fSAnsuel Smith &usb30_master_clk_src.clkr.hw, 2086*cb02866fSAnsuel Smith }, 208724d8fba4SKumar Gala .num_parents = 1, 208824d8fba4SKumar Gala .ops = &clk_branch_ops, 208924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 209024d8fba4SKumar Gala }, 209124d8fba4SKumar Gala }, 209224d8fba4SKumar Gala }; 209324d8fba4SKumar Gala 209424d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_utmi[] = { 209524d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 }, 209624d8fba4SKumar Gala { } 209724d8fba4SKumar Gala }; 209824d8fba4SKumar Gala 209924d8fba4SKumar Gala static struct clk_rcg usb30_utmi_clk = { 210024d8fba4SKumar Gala .ns_reg = 0x3b44, 210124d8fba4SKumar Gala .md_reg = 0x3b40, 210224d8fba4SKumar Gala .mn = { 210324d8fba4SKumar Gala .mnctr_en_bit = 8, 210424d8fba4SKumar Gala .mnctr_reset_bit = 7, 210524d8fba4SKumar Gala .mnctr_mode_shift = 5, 210624d8fba4SKumar Gala .n_val_shift = 16, 210724d8fba4SKumar Gala .m_val_shift = 16, 210824d8fba4SKumar Gala .width = 8, 210924d8fba4SKumar Gala }, 211024d8fba4SKumar Gala .p = { 211124d8fba4SKumar Gala .pre_div_shift = 3, 211224d8fba4SKumar Gala .pre_div_width = 2, 211324d8fba4SKumar Gala }, 211424d8fba4SKumar Gala .s = { 211524d8fba4SKumar Gala .src_sel_shift = 0, 2116e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map, 211724d8fba4SKumar Gala }, 211824d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_utmi, 211924d8fba4SKumar Gala .clkr = { 212024d8fba4SKumar Gala .enable_reg = 0x3b44, 212124d8fba4SKumar Gala .enable_mask = BIT(11), 212224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 212324d8fba4SKumar Gala .name = "usb30_utmi_clk", 2124*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0, 212524d8fba4SKumar Gala .num_parents = 3, 212624d8fba4SKumar Gala .ops = &clk_rcg_ops, 212724d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 212824d8fba4SKumar Gala }, 212924d8fba4SKumar Gala }, 213024d8fba4SKumar Gala }; 213124d8fba4SKumar Gala 213224d8fba4SKumar Gala static struct clk_branch usb30_0_utmi_clk_ctl = { 213324d8fba4SKumar Gala .halt_reg = 0x2fc4, 213424d8fba4SKumar Gala .halt_bit = 21, 213524d8fba4SKumar Gala .clkr = { 213624d8fba4SKumar Gala .enable_reg = 0x3b48, 213724d8fba4SKumar Gala .enable_mask = BIT(4), 213824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 213924d8fba4SKumar Gala .name = "usb30_0_utmi_clk_ctl", 2140*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2141*cb02866fSAnsuel Smith &usb30_utmi_clk.clkr.hw, 2142*cb02866fSAnsuel Smith }, 214324d8fba4SKumar Gala .num_parents = 1, 214424d8fba4SKumar Gala .ops = &clk_branch_ops, 214524d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 214624d8fba4SKumar Gala }, 214724d8fba4SKumar Gala }, 214824d8fba4SKumar Gala }; 214924d8fba4SKumar Gala 215024d8fba4SKumar Gala static struct clk_branch usb30_1_utmi_clk_ctl = { 215124d8fba4SKumar Gala .halt_reg = 0x2fc4, 215224d8fba4SKumar Gala .halt_bit = 15, 215324d8fba4SKumar Gala .clkr = { 215424d8fba4SKumar Gala .enable_reg = 0x3b4c, 215524d8fba4SKumar Gala .enable_mask = BIT(4), 215624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 215724d8fba4SKumar Gala .name = "usb30_1_utmi_clk_ctl", 2158*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2159*cb02866fSAnsuel Smith &usb30_utmi_clk.clkr.hw, 2160*cb02866fSAnsuel Smith }, 216124d8fba4SKumar Gala .num_parents = 1, 216224d8fba4SKumar Gala .ops = &clk_branch_ops, 216324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 216424d8fba4SKumar Gala }, 216524d8fba4SKumar Gala }, 216624d8fba4SKumar Gala }; 216724d8fba4SKumar Gala 216824d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb[] = { 216924d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 }, 217024d8fba4SKumar Gala { } 217124d8fba4SKumar Gala }; 217224d8fba4SKumar Gala 217324d8fba4SKumar Gala static struct clk_rcg usb_hs1_xcvr_clk_src = { 217424d8fba4SKumar Gala .ns_reg = 0x290C, 217524d8fba4SKumar Gala .md_reg = 0x2908, 217624d8fba4SKumar Gala .mn = { 217724d8fba4SKumar Gala .mnctr_en_bit = 8, 217824d8fba4SKumar Gala .mnctr_reset_bit = 7, 217924d8fba4SKumar Gala .mnctr_mode_shift = 5, 218024d8fba4SKumar Gala .n_val_shift = 16, 218124d8fba4SKumar Gala .m_val_shift = 16, 218224d8fba4SKumar Gala .width = 8, 218324d8fba4SKumar Gala }, 218424d8fba4SKumar Gala .p = { 218524d8fba4SKumar Gala .pre_div_shift = 3, 218624d8fba4SKumar Gala .pre_div_width = 2, 218724d8fba4SKumar Gala }, 218824d8fba4SKumar Gala .s = { 218924d8fba4SKumar Gala .src_sel_shift = 0, 2190e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map, 219124d8fba4SKumar Gala }, 219224d8fba4SKumar Gala .freq_tbl = clk_tbl_usb, 219324d8fba4SKumar Gala .clkr = { 219424d8fba4SKumar Gala .enable_reg = 0x2968, 219524d8fba4SKumar Gala .enable_mask = BIT(11), 219624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 219724d8fba4SKumar Gala .name = "usb_hs1_xcvr_src", 2198*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0, 219924d8fba4SKumar Gala .num_parents = 3, 220024d8fba4SKumar Gala .ops = &clk_rcg_ops, 220124d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 220224d8fba4SKumar Gala }, 220324d8fba4SKumar Gala }, 220424d8fba4SKumar Gala }; 220524d8fba4SKumar Gala 220624d8fba4SKumar Gala static struct clk_branch usb_hs1_xcvr_clk = { 220724d8fba4SKumar Gala .halt_reg = 0x2fcc, 220824d8fba4SKumar Gala .halt_bit = 17, 220924d8fba4SKumar Gala .clkr = { 221024d8fba4SKumar Gala .enable_reg = 0x290c, 221124d8fba4SKumar Gala .enable_mask = BIT(9), 221224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 221324d8fba4SKumar Gala .name = "usb_hs1_xcvr_clk", 2214*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2215*cb02866fSAnsuel Smith &usb_hs1_xcvr_clk_src.clkr.hw, 2216*cb02866fSAnsuel Smith }, 221724d8fba4SKumar Gala .num_parents = 1, 221824d8fba4SKumar Gala .ops = &clk_branch_ops, 221924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 222024d8fba4SKumar Gala }, 222124d8fba4SKumar Gala }, 222224d8fba4SKumar Gala }; 222324d8fba4SKumar Gala 222424d8fba4SKumar Gala static struct clk_branch usb_hs1_h_clk = { 222524d8fba4SKumar Gala .hwcg_reg = 0x2900, 222624d8fba4SKumar Gala .hwcg_bit = 6, 222724d8fba4SKumar Gala .halt_reg = 0x2fc8, 222824d8fba4SKumar Gala .halt_bit = 1, 222924d8fba4SKumar Gala .clkr = { 223024d8fba4SKumar Gala .enable_reg = 0x2900, 223124d8fba4SKumar Gala .enable_mask = BIT(4), 223224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 223324d8fba4SKumar Gala .name = "usb_hs1_h_clk", 223424d8fba4SKumar Gala .ops = &clk_branch_ops, 223524d8fba4SKumar Gala }, 223624d8fba4SKumar Gala }, 223724d8fba4SKumar Gala }; 223824d8fba4SKumar Gala 223924d8fba4SKumar Gala static struct clk_rcg usb_fs1_xcvr_clk_src = { 224024d8fba4SKumar Gala .ns_reg = 0x2968, 224124d8fba4SKumar Gala .md_reg = 0x2964, 224224d8fba4SKumar Gala .mn = { 224324d8fba4SKumar Gala .mnctr_en_bit = 8, 224424d8fba4SKumar Gala .mnctr_reset_bit = 7, 224524d8fba4SKumar Gala .mnctr_mode_shift = 5, 224624d8fba4SKumar Gala .n_val_shift = 16, 224724d8fba4SKumar Gala .m_val_shift = 16, 224824d8fba4SKumar Gala .width = 8, 224924d8fba4SKumar Gala }, 225024d8fba4SKumar Gala .p = { 225124d8fba4SKumar Gala .pre_div_shift = 3, 225224d8fba4SKumar Gala .pre_div_width = 2, 225324d8fba4SKumar Gala }, 225424d8fba4SKumar Gala .s = { 225524d8fba4SKumar Gala .src_sel_shift = 0, 2256e95e8253SAnsuel Smith .parent_map = gcc_pxo_pll8_pll0_map, 225724d8fba4SKumar Gala }, 225824d8fba4SKumar Gala .freq_tbl = clk_tbl_usb, 225924d8fba4SKumar Gala .clkr = { 226024d8fba4SKumar Gala .enable_reg = 0x2968, 226124d8fba4SKumar Gala .enable_mask = BIT(11), 226224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 226324d8fba4SKumar Gala .name = "usb_fs1_xcvr_src", 2264*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll0, 226524d8fba4SKumar Gala .num_parents = 3, 226624d8fba4SKumar Gala .ops = &clk_rcg_ops, 226724d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 226824d8fba4SKumar Gala }, 226924d8fba4SKumar Gala }, 227024d8fba4SKumar Gala }; 227124d8fba4SKumar Gala 227224d8fba4SKumar Gala static struct clk_branch usb_fs1_xcvr_clk = { 227324d8fba4SKumar Gala .halt_reg = 0x2fcc, 227424d8fba4SKumar Gala .halt_bit = 17, 227524d8fba4SKumar Gala .clkr = { 227624d8fba4SKumar Gala .enable_reg = 0x2968, 227724d8fba4SKumar Gala .enable_mask = BIT(9), 227824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 227924d8fba4SKumar Gala .name = "usb_fs1_xcvr_clk", 2280*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2281*cb02866fSAnsuel Smith &usb_fs1_xcvr_clk_src.clkr.hw, 2282*cb02866fSAnsuel Smith }, 228324d8fba4SKumar Gala .num_parents = 1, 228424d8fba4SKumar Gala .ops = &clk_branch_ops, 228524d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 228624d8fba4SKumar Gala }, 228724d8fba4SKumar Gala }, 228824d8fba4SKumar Gala }; 228924d8fba4SKumar Gala 229024d8fba4SKumar Gala static struct clk_branch usb_fs1_sys_clk = { 229124d8fba4SKumar Gala .halt_reg = 0x2fcc, 229224d8fba4SKumar Gala .halt_bit = 18, 229324d8fba4SKumar Gala .clkr = { 229424d8fba4SKumar Gala .enable_reg = 0x296c, 229524d8fba4SKumar Gala .enable_mask = BIT(4), 229624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 229724d8fba4SKumar Gala .name = "usb_fs1_sys_clk", 2298*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2299*cb02866fSAnsuel Smith &usb_fs1_xcvr_clk_src.clkr.hw, 2300*cb02866fSAnsuel Smith }, 230124d8fba4SKumar Gala .num_parents = 1, 230224d8fba4SKumar Gala .ops = &clk_branch_ops, 230324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 230424d8fba4SKumar Gala }, 230524d8fba4SKumar Gala }, 230624d8fba4SKumar Gala }; 230724d8fba4SKumar Gala 230824d8fba4SKumar Gala static struct clk_branch usb_fs1_h_clk = { 230924d8fba4SKumar Gala .halt_reg = 0x2fcc, 231024d8fba4SKumar Gala .halt_bit = 19, 231124d8fba4SKumar Gala .clkr = { 231224d8fba4SKumar Gala .enable_reg = 0x2960, 231324d8fba4SKumar Gala .enable_mask = BIT(4), 231424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 231524d8fba4SKumar Gala .name = "usb_fs1_h_clk", 231624d8fba4SKumar Gala .ops = &clk_branch_ops, 231724d8fba4SKumar Gala }, 231824d8fba4SKumar Gala }, 231924d8fba4SKumar Gala }; 232024d8fba4SKumar Gala 23214c385b25SArchit Taneja static struct clk_branch ebi2_clk = { 23224c385b25SArchit Taneja .hwcg_reg = 0x3b00, 23234c385b25SArchit Taneja .hwcg_bit = 6, 23244c385b25SArchit Taneja .halt_reg = 0x2fcc, 23254c385b25SArchit Taneja .halt_bit = 1, 23264c385b25SArchit Taneja .clkr = { 23274c385b25SArchit Taneja .enable_reg = 0x3b00, 23284c385b25SArchit Taneja .enable_mask = BIT(4), 23294c385b25SArchit Taneja .hw.init = &(struct clk_init_data){ 23304c385b25SArchit Taneja .name = "ebi2_clk", 23314c385b25SArchit Taneja .ops = &clk_branch_ops, 23324c385b25SArchit Taneja }, 23334c385b25SArchit Taneja }, 23344c385b25SArchit Taneja }; 23354c385b25SArchit Taneja 23364c385b25SArchit Taneja static struct clk_branch ebi2_aon_clk = { 23374c385b25SArchit Taneja .halt_reg = 0x2fcc, 23384c385b25SArchit Taneja .halt_bit = 0, 23394c385b25SArchit Taneja .clkr = { 23404c385b25SArchit Taneja .enable_reg = 0x3b00, 23414c385b25SArchit Taneja .enable_mask = BIT(8), 23424c385b25SArchit Taneja .hw.init = &(struct clk_init_data){ 23434c385b25SArchit Taneja .name = "ebi2_always_on_clk", 23444c385b25SArchit Taneja .ops = &clk_branch_ops, 23454c385b25SArchit Taneja }, 23464c385b25SArchit Taneja }, 23474c385b25SArchit Taneja }; 23484c385b25SArchit Taneja 2349f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_gmac[] = { 2350f7b81d67SStephen Boyd { 133000000, P_PLL0, 1, 50, 301 }, 2351f7b81d67SStephen Boyd { 266000000, P_PLL0, 1, 127, 382 }, 2352f7b81d67SStephen Boyd { } 2353f7b81d67SStephen Boyd }; 2354f7b81d67SStephen Boyd 2355f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core1_src = { 2356f7b81d67SStephen Boyd .ns_reg[0] = 0x3cac, 2357f7b81d67SStephen Boyd .ns_reg[1] = 0x3cb0, 2358f7b81d67SStephen Boyd .md_reg[0] = 0x3ca4, 2359f7b81d67SStephen Boyd .md_reg[1] = 0x3ca8, 2360f7b81d67SStephen Boyd .bank_reg = 0x3ca0, 2361f7b81d67SStephen Boyd .mn[0] = { 2362f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2363f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2364f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2365f7b81d67SStephen Boyd .n_val_shift = 16, 2366f7b81d67SStephen Boyd .m_val_shift = 16, 2367f7b81d67SStephen Boyd .width = 8, 2368f7b81d67SStephen Boyd }, 2369f7b81d67SStephen Boyd .mn[1] = { 2370f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2371f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2372f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2373f7b81d67SStephen Boyd .n_val_shift = 16, 2374f7b81d67SStephen Boyd .m_val_shift = 16, 2375f7b81d67SStephen Boyd .width = 8, 2376f7b81d67SStephen Boyd }, 2377f7b81d67SStephen Boyd .s[0] = { 2378f7b81d67SStephen Boyd .src_sel_shift = 0, 2379f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2380f7b81d67SStephen Boyd }, 2381f7b81d67SStephen Boyd .s[1] = { 2382f7b81d67SStephen Boyd .src_sel_shift = 0, 2383f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2384f7b81d67SStephen Boyd }, 2385f7b81d67SStephen Boyd .p[0] = { 2386f7b81d67SStephen Boyd .pre_div_shift = 3, 2387f7b81d67SStephen Boyd .pre_div_width = 2, 2388f7b81d67SStephen Boyd }, 2389f7b81d67SStephen Boyd .p[1] = { 2390f7b81d67SStephen Boyd .pre_div_shift = 3, 2391f7b81d67SStephen Boyd .pre_div_width = 2, 2392f7b81d67SStephen Boyd }, 2393f7b81d67SStephen Boyd .mux_sel_bit = 0, 2394f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2395f7b81d67SStephen Boyd .clkr = { 2396f7b81d67SStephen Boyd .enable_reg = 0x3ca0, 2397f7b81d67SStephen Boyd .enable_mask = BIT(1), 2398f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2399f7b81d67SStephen Boyd .name = "gmac_core1_src", 2400*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0, 2401f7b81d67SStephen Boyd .num_parents = 5, 2402f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2403f7b81d67SStephen Boyd }, 2404f7b81d67SStephen Boyd }, 2405f7b81d67SStephen Boyd }; 2406f7b81d67SStephen Boyd 2407f7b81d67SStephen Boyd static struct clk_branch gmac_core1_clk = { 2408f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2409f7b81d67SStephen Boyd .halt_bit = 4, 2410f7b81d67SStephen Boyd .hwcg_reg = 0x3cb4, 2411f7b81d67SStephen Boyd .hwcg_bit = 6, 2412f7b81d67SStephen Boyd .clkr = { 2413f7b81d67SStephen Boyd .enable_reg = 0x3cb4, 2414f7b81d67SStephen Boyd .enable_mask = BIT(4), 2415f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2416f7b81d67SStephen Boyd .name = "gmac_core1_clk", 2417*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2418*cb02866fSAnsuel Smith &gmac_core1_src.clkr.hw, 2419f7b81d67SStephen Boyd }, 2420f7b81d67SStephen Boyd .num_parents = 1, 2421f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2422f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2423f7b81d67SStephen Boyd }, 2424f7b81d67SStephen Boyd }, 2425f7b81d67SStephen Boyd }; 2426f7b81d67SStephen Boyd 2427f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core2_src = { 2428f7b81d67SStephen Boyd .ns_reg[0] = 0x3ccc, 2429f7b81d67SStephen Boyd .ns_reg[1] = 0x3cd0, 2430f7b81d67SStephen Boyd .md_reg[0] = 0x3cc4, 2431f7b81d67SStephen Boyd .md_reg[1] = 0x3cc8, 2432f7b81d67SStephen Boyd .bank_reg = 0x3ca0, 2433f7b81d67SStephen Boyd .mn[0] = { 2434f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2435f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2436f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2437f7b81d67SStephen Boyd .n_val_shift = 16, 2438f7b81d67SStephen Boyd .m_val_shift = 16, 2439f7b81d67SStephen Boyd .width = 8, 2440f7b81d67SStephen Boyd }, 2441f7b81d67SStephen Boyd .mn[1] = { 2442f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2443f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2444f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2445f7b81d67SStephen Boyd .n_val_shift = 16, 2446f7b81d67SStephen Boyd .m_val_shift = 16, 2447f7b81d67SStephen Boyd .width = 8, 2448f7b81d67SStephen Boyd }, 2449f7b81d67SStephen Boyd .s[0] = { 2450f7b81d67SStephen Boyd .src_sel_shift = 0, 2451f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2452f7b81d67SStephen Boyd }, 2453f7b81d67SStephen Boyd .s[1] = { 2454f7b81d67SStephen Boyd .src_sel_shift = 0, 2455f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2456f7b81d67SStephen Boyd }, 2457f7b81d67SStephen Boyd .p[0] = { 2458f7b81d67SStephen Boyd .pre_div_shift = 3, 2459f7b81d67SStephen Boyd .pre_div_width = 2, 2460f7b81d67SStephen Boyd }, 2461f7b81d67SStephen Boyd .p[1] = { 2462f7b81d67SStephen Boyd .pre_div_shift = 3, 2463f7b81d67SStephen Boyd .pre_div_width = 2, 2464f7b81d67SStephen Boyd }, 2465f7b81d67SStephen Boyd .mux_sel_bit = 0, 2466f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2467f7b81d67SStephen Boyd .clkr = { 2468f7b81d67SStephen Boyd .enable_reg = 0x3cc0, 2469f7b81d67SStephen Boyd .enable_mask = BIT(1), 2470f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2471f7b81d67SStephen Boyd .name = "gmac_core2_src", 2472*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0, 2473f7b81d67SStephen Boyd .num_parents = 5, 2474f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2475f7b81d67SStephen Boyd }, 2476f7b81d67SStephen Boyd }, 2477f7b81d67SStephen Boyd }; 2478f7b81d67SStephen Boyd 2479f7b81d67SStephen Boyd static struct clk_branch gmac_core2_clk = { 2480f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2481f7b81d67SStephen Boyd .halt_bit = 5, 2482f7b81d67SStephen Boyd .hwcg_reg = 0x3cd4, 2483f7b81d67SStephen Boyd .hwcg_bit = 6, 2484f7b81d67SStephen Boyd .clkr = { 2485f7b81d67SStephen Boyd .enable_reg = 0x3cd4, 2486f7b81d67SStephen Boyd .enable_mask = BIT(4), 2487f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2488f7b81d67SStephen Boyd .name = "gmac_core2_clk", 2489*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2490*cb02866fSAnsuel Smith &gmac_core2_src.clkr.hw, 2491f7b81d67SStephen Boyd }, 2492f7b81d67SStephen Boyd .num_parents = 1, 2493f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2494f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2495f7b81d67SStephen Boyd }, 2496f7b81d67SStephen Boyd }, 2497f7b81d67SStephen Boyd }; 2498f7b81d67SStephen Boyd 2499f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core3_src = { 2500f7b81d67SStephen Boyd .ns_reg[0] = 0x3cec, 2501f7b81d67SStephen Boyd .ns_reg[1] = 0x3cf0, 2502f7b81d67SStephen Boyd .md_reg[0] = 0x3ce4, 2503f7b81d67SStephen Boyd .md_reg[1] = 0x3ce8, 2504f7b81d67SStephen Boyd .bank_reg = 0x3ce0, 2505f7b81d67SStephen Boyd .mn[0] = { 2506f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2507f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2508f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2509f7b81d67SStephen Boyd .n_val_shift = 16, 2510f7b81d67SStephen Boyd .m_val_shift = 16, 2511f7b81d67SStephen Boyd .width = 8, 2512f7b81d67SStephen Boyd }, 2513f7b81d67SStephen Boyd .mn[1] = { 2514f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2515f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2516f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2517f7b81d67SStephen Boyd .n_val_shift = 16, 2518f7b81d67SStephen Boyd .m_val_shift = 16, 2519f7b81d67SStephen Boyd .width = 8, 2520f7b81d67SStephen Boyd }, 2521f7b81d67SStephen Boyd .s[0] = { 2522f7b81d67SStephen Boyd .src_sel_shift = 0, 2523f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2524f7b81d67SStephen Boyd }, 2525f7b81d67SStephen Boyd .s[1] = { 2526f7b81d67SStephen Boyd .src_sel_shift = 0, 2527f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2528f7b81d67SStephen Boyd }, 2529f7b81d67SStephen Boyd .p[0] = { 2530f7b81d67SStephen Boyd .pre_div_shift = 3, 2531f7b81d67SStephen Boyd .pre_div_width = 2, 2532f7b81d67SStephen Boyd }, 2533f7b81d67SStephen Boyd .p[1] = { 2534f7b81d67SStephen Boyd .pre_div_shift = 3, 2535f7b81d67SStephen Boyd .pre_div_width = 2, 2536f7b81d67SStephen Boyd }, 2537f7b81d67SStephen Boyd .mux_sel_bit = 0, 2538f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2539f7b81d67SStephen Boyd .clkr = { 2540f7b81d67SStephen Boyd .enable_reg = 0x3ce0, 2541f7b81d67SStephen Boyd .enable_mask = BIT(1), 2542f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2543f7b81d67SStephen Boyd .name = "gmac_core3_src", 2544*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0, 2545f7b81d67SStephen Boyd .num_parents = 5, 2546f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2547f7b81d67SStephen Boyd }, 2548f7b81d67SStephen Boyd }, 2549f7b81d67SStephen Boyd }; 2550f7b81d67SStephen Boyd 2551f7b81d67SStephen Boyd static struct clk_branch gmac_core3_clk = { 2552f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2553f7b81d67SStephen Boyd .halt_bit = 6, 2554f7b81d67SStephen Boyd .hwcg_reg = 0x3cf4, 2555f7b81d67SStephen Boyd .hwcg_bit = 6, 2556f7b81d67SStephen Boyd .clkr = { 2557f7b81d67SStephen Boyd .enable_reg = 0x3cf4, 2558f7b81d67SStephen Boyd .enable_mask = BIT(4), 2559f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2560f7b81d67SStephen Boyd .name = "gmac_core3_clk", 2561*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2562*cb02866fSAnsuel Smith &gmac_core3_src.clkr.hw, 2563f7b81d67SStephen Boyd }, 2564f7b81d67SStephen Boyd .num_parents = 1, 2565f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2566f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2567f7b81d67SStephen Boyd }, 2568f7b81d67SStephen Boyd }, 2569f7b81d67SStephen Boyd }; 2570f7b81d67SStephen Boyd 2571f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core4_src = { 2572f7b81d67SStephen Boyd .ns_reg[0] = 0x3d0c, 2573f7b81d67SStephen Boyd .ns_reg[1] = 0x3d10, 2574f7b81d67SStephen Boyd .md_reg[0] = 0x3d04, 2575f7b81d67SStephen Boyd .md_reg[1] = 0x3d08, 2576f7b81d67SStephen Boyd .bank_reg = 0x3d00, 2577f7b81d67SStephen Boyd .mn[0] = { 2578f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2579f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2580f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2581f7b81d67SStephen Boyd .n_val_shift = 16, 2582f7b81d67SStephen Boyd .m_val_shift = 16, 2583f7b81d67SStephen Boyd .width = 8, 2584f7b81d67SStephen Boyd }, 2585f7b81d67SStephen Boyd .mn[1] = { 2586f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2587f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2588f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2589f7b81d67SStephen Boyd .n_val_shift = 16, 2590f7b81d67SStephen Boyd .m_val_shift = 16, 2591f7b81d67SStephen Boyd .width = 8, 2592f7b81d67SStephen Boyd }, 2593f7b81d67SStephen Boyd .s[0] = { 2594f7b81d67SStephen Boyd .src_sel_shift = 0, 2595f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2596f7b81d67SStephen Boyd }, 2597f7b81d67SStephen Boyd .s[1] = { 2598f7b81d67SStephen Boyd .src_sel_shift = 0, 2599f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2600f7b81d67SStephen Boyd }, 2601f7b81d67SStephen Boyd .p[0] = { 2602f7b81d67SStephen Boyd .pre_div_shift = 3, 2603f7b81d67SStephen Boyd .pre_div_width = 2, 2604f7b81d67SStephen Boyd }, 2605f7b81d67SStephen Boyd .p[1] = { 2606f7b81d67SStephen Boyd .pre_div_shift = 3, 2607f7b81d67SStephen Boyd .pre_div_width = 2, 2608f7b81d67SStephen Boyd }, 2609f7b81d67SStephen Boyd .mux_sel_bit = 0, 2610f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2611f7b81d67SStephen Boyd .clkr = { 2612f7b81d67SStephen Boyd .enable_reg = 0x3d00, 2613f7b81d67SStephen Boyd .enable_mask = BIT(1), 2614f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2615f7b81d67SStephen Boyd .name = "gmac_core4_src", 2616*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0, 2617f7b81d67SStephen Boyd .num_parents = 5, 2618f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2619f7b81d67SStephen Boyd }, 2620f7b81d67SStephen Boyd }, 2621f7b81d67SStephen Boyd }; 2622f7b81d67SStephen Boyd 2623f7b81d67SStephen Boyd static struct clk_branch gmac_core4_clk = { 2624f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2625f7b81d67SStephen Boyd .halt_bit = 7, 2626f7b81d67SStephen Boyd .hwcg_reg = 0x3d14, 2627f7b81d67SStephen Boyd .hwcg_bit = 6, 2628f7b81d67SStephen Boyd .clkr = { 2629f7b81d67SStephen Boyd .enable_reg = 0x3d14, 2630f7b81d67SStephen Boyd .enable_mask = BIT(4), 2631f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2632f7b81d67SStephen Boyd .name = "gmac_core4_clk", 2633*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2634*cb02866fSAnsuel Smith &gmac_core4_src.clkr.hw, 2635f7b81d67SStephen Boyd }, 2636f7b81d67SStephen Boyd .num_parents = 1, 2637f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2638f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2639f7b81d67SStephen Boyd }, 2640f7b81d67SStephen Boyd }, 2641f7b81d67SStephen Boyd }; 2642f7b81d67SStephen Boyd 2643f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_nss_tcm[] = { 2644f7b81d67SStephen Boyd { 266000000, P_PLL0, 3, 0, 0 }, 2645f7b81d67SStephen Boyd { 400000000, P_PLL0, 2, 0, 0 }, 2646f7b81d67SStephen Boyd { } 2647f7b81d67SStephen Boyd }; 2648f7b81d67SStephen Boyd 2649f7b81d67SStephen Boyd static struct clk_dyn_rcg nss_tcm_src = { 2650f7b81d67SStephen Boyd .ns_reg[0] = 0x3dc4, 2651f7b81d67SStephen Boyd .ns_reg[1] = 0x3dc8, 2652f7b81d67SStephen Boyd .bank_reg = 0x3dc0, 2653f7b81d67SStephen Boyd .s[0] = { 2654f7b81d67SStephen Boyd .src_sel_shift = 0, 2655f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2656f7b81d67SStephen Boyd }, 2657f7b81d67SStephen Boyd .s[1] = { 2658f7b81d67SStephen Boyd .src_sel_shift = 0, 2659f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2660f7b81d67SStephen Boyd }, 2661f7b81d67SStephen Boyd .p[0] = { 2662f7b81d67SStephen Boyd .pre_div_shift = 3, 2663f7b81d67SStephen Boyd .pre_div_width = 4, 2664f7b81d67SStephen Boyd }, 2665f7b81d67SStephen Boyd .p[1] = { 2666f7b81d67SStephen Boyd .pre_div_shift = 3, 2667f7b81d67SStephen Boyd .pre_div_width = 4, 2668f7b81d67SStephen Boyd }, 2669f7b81d67SStephen Boyd .mux_sel_bit = 0, 2670f7b81d67SStephen Boyd .freq_tbl = clk_tbl_nss_tcm, 2671f7b81d67SStephen Boyd .clkr = { 2672f7b81d67SStephen Boyd .enable_reg = 0x3dc0, 2673f7b81d67SStephen Boyd .enable_mask = BIT(1), 2674f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2675f7b81d67SStephen Boyd .name = "nss_tcm_src", 2676*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0, 2677f7b81d67SStephen Boyd .num_parents = 5, 2678f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2679f7b81d67SStephen Boyd }, 2680f7b81d67SStephen Boyd }, 2681f7b81d67SStephen Boyd }; 2682f7b81d67SStephen Boyd 2683f7b81d67SStephen Boyd static struct clk_branch nss_tcm_clk = { 2684f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2685f7b81d67SStephen Boyd .halt_bit = 14, 2686f7b81d67SStephen Boyd .clkr = { 2687f7b81d67SStephen Boyd .enable_reg = 0x3dd0, 2688f7b81d67SStephen Boyd .enable_mask = BIT(6) | BIT(4), 2689f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2690f7b81d67SStephen Boyd .name = "nss_tcm_clk", 2691*cb02866fSAnsuel Smith .parent_hws = (const struct clk_hw*[]){ 2692*cb02866fSAnsuel Smith &nss_tcm_src.clkr.hw, 2693f7b81d67SStephen Boyd }, 2694f7b81d67SStephen Boyd .num_parents = 1, 2695f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2696f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2697f7b81d67SStephen Boyd }, 2698f7b81d67SStephen Boyd }, 2699f7b81d67SStephen Boyd }; 2700f7b81d67SStephen Boyd 2701f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_nss[] = { 2702f7b81d67SStephen Boyd { 110000000, P_PLL18, 1, 1, 5 }, 2703f7b81d67SStephen Boyd { 275000000, P_PLL18, 2, 0, 0 }, 2704f7b81d67SStephen Boyd { 550000000, P_PLL18, 1, 0, 0 }, 2705f7b81d67SStephen Boyd { 733000000, P_PLL18, 1, 0, 0 }, 2706f7b81d67SStephen Boyd { } 2707f7b81d67SStephen Boyd }; 2708f7b81d67SStephen Boyd 2709f7b81d67SStephen Boyd static struct clk_dyn_rcg ubi32_core1_src_clk = { 2710f7b81d67SStephen Boyd .ns_reg[0] = 0x3d2c, 2711f7b81d67SStephen Boyd .ns_reg[1] = 0x3d30, 2712f7b81d67SStephen Boyd .md_reg[0] = 0x3d24, 2713f7b81d67SStephen Boyd .md_reg[1] = 0x3d28, 2714f7b81d67SStephen Boyd .bank_reg = 0x3d20, 2715f7b81d67SStephen Boyd .mn[0] = { 2716f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2717f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2718f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2719f7b81d67SStephen Boyd .n_val_shift = 16, 2720f7b81d67SStephen Boyd .m_val_shift = 16, 2721f7b81d67SStephen Boyd .width = 8, 2722f7b81d67SStephen Boyd }, 2723f7b81d67SStephen Boyd .mn[1] = { 2724f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2725f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2726f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2727f7b81d67SStephen Boyd .n_val_shift = 16, 2728f7b81d67SStephen Boyd .m_val_shift = 16, 2729f7b81d67SStephen Boyd .width = 8, 2730f7b81d67SStephen Boyd }, 2731f7b81d67SStephen Boyd .s[0] = { 2732f7b81d67SStephen Boyd .src_sel_shift = 0, 2733f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2734f7b81d67SStephen Boyd }, 2735f7b81d67SStephen Boyd .s[1] = { 2736f7b81d67SStephen Boyd .src_sel_shift = 0, 2737f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2738f7b81d67SStephen Boyd }, 2739f7b81d67SStephen Boyd .p[0] = { 2740f7b81d67SStephen Boyd .pre_div_shift = 3, 2741f7b81d67SStephen Boyd .pre_div_width = 2, 2742f7b81d67SStephen Boyd }, 2743f7b81d67SStephen Boyd .p[1] = { 2744f7b81d67SStephen Boyd .pre_div_shift = 3, 2745f7b81d67SStephen Boyd .pre_div_width = 2, 2746f7b81d67SStephen Boyd }, 2747f7b81d67SStephen Boyd .mux_sel_bit = 0, 2748f7b81d67SStephen Boyd .freq_tbl = clk_tbl_nss, 2749f7b81d67SStephen Boyd .clkr = { 2750f7b81d67SStephen Boyd .enable_reg = 0x3d20, 2751f7b81d67SStephen Boyd .enable_mask = BIT(1), 2752f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2753f7b81d67SStephen Boyd .name = "ubi32_core1_src_clk", 2754*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0, 2755f7b81d67SStephen Boyd .num_parents = 5, 2756f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2757f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE, 2758f7b81d67SStephen Boyd }, 2759f7b81d67SStephen Boyd }, 2760f7b81d67SStephen Boyd }; 2761f7b81d67SStephen Boyd 2762f7b81d67SStephen Boyd static struct clk_dyn_rcg ubi32_core2_src_clk = { 2763f7b81d67SStephen Boyd .ns_reg[0] = 0x3d4c, 2764f7b81d67SStephen Boyd .ns_reg[1] = 0x3d50, 2765f7b81d67SStephen Boyd .md_reg[0] = 0x3d44, 2766f7b81d67SStephen Boyd .md_reg[1] = 0x3d48, 2767f7b81d67SStephen Boyd .bank_reg = 0x3d40, 2768f7b81d67SStephen Boyd .mn[0] = { 2769f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2770f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2771f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2772f7b81d67SStephen Boyd .n_val_shift = 16, 2773f7b81d67SStephen Boyd .m_val_shift = 16, 2774f7b81d67SStephen Boyd .width = 8, 2775f7b81d67SStephen Boyd }, 2776f7b81d67SStephen Boyd .mn[1] = { 2777f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2778f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2779f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2780f7b81d67SStephen Boyd .n_val_shift = 16, 2781f7b81d67SStephen Boyd .m_val_shift = 16, 2782f7b81d67SStephen Boyd .width = 8, 2783f7b81d67SStephen Boyd }, 2784f7b81d67SStephen Boyd .s[0] = { 2785f7b81d67SStephen Boyd .src_sel_shift = 0, 2786f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2787f7b81d67SStephen Boyd }, 2788f7b81d67SStephen Boyd .s[1] = { 2789f7b81d67SStephen Boyd .src_sel_shift = 0, 2790f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2791f7b81d67SStephen Boyd }, 2792f7b81d67SStephen Boyd .p[0] = { 2793f7b81d67SStephen Boyd .pre_div_shift = 3, 2794f7b81d67SStephen Boyd .pre_div_width = 2, 2795f7b81d67SStephen Boyd }, 2796f7b81d67SStephen Boyd .p[1] = { 2797f7b81d67SStephen Boyd .pre_div_shift = 3, 2798f7b81d67SStephen Boyd .pre_div_width = 2, 2799f7b81d67SStephen Boyd }, 2800f7b81d67SStephen Boyd .mux_sel_bit = 0, 2801f7b81d67SStephen Boyd .freq_tbl = clk_tbl_nss, 2802f7b81d67SStephen Boyd .clkr = { 2803f7b81d67SStephen Boyd .enable_reg = 0x3d40, 2804f7b81d67SStephen Boyd .enable_mask = BIT(1), 2805f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2806f7b81d67SStephen Boyd .name = "ubi32_core2_src_clk", 2807*cb02866fSAnsuel Smith .parent_data = gcc_pxo_pll8_pll14_pll18_pll0, 2808f7b81d67SStephen Boyd .num_parents = 5, 2809f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2810f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE, 2811f7b81d67SStephen Boyd }, 2812f7b81d67SStephen Boyd }, 2813f7b81d67SStephen Boyd }; 2814f7b81d67SStephen Boyd 281524d8fba4SKumar Gala static struct clk_regmap *gcc_ipq806x_clks[] = { 2816dc1b3f65SAndy Gross [PLL0] = &pll0.clkr, 2817dc1b3f65SAndy Gross [PLL0_VOTE] = &pll0_vote, 281824d8fba4SKumar Gala [PLL3] = &pll3.clkr, 2819c99e515aSRajendra Nayak [PLL4_VOTE] = &pll4_vote, 282024d8fba4SKumar Gala [PLL8] = &pll8.clkr, 282124d8fba4SKumar Gala [PLL8_VOTE] = &pll8_vote, 282224d8fba4SKumar Gala [PLL14] = &pll14.clkr, 282324d8fba4SKumar Gala [PLL14_VOTE] = &pll14_vote, 2824f7b81d67SStephen Boyd [PLL18] = &pll18.clkr, 282524d8fba4SKumar Gala [GSBI1_UART_SRC] = &gsbi1_uart_src.clkr, 282624d8fba4SKumar Gala [GSBI1_UART_CLK] = &gsbi1_uart_clk.clkr, 282724d8fba4SKumar Gala [GSBI2_UART_SRC] = &gsbi2_uart_src.clkr, 282824d8fba4SKumar Gala [GSBI2_UART_CLK] = &gsbi2_uart_clk.clkr, 282924d8fba4SKumar Gala [GSBI4_UART_SRC] = &gsbi4_uart_src.clkr, 283024d8fba4SKumar Gala [GSBI4_UART_CLK] = &gsbi4_uart_clk.clkr, 283124d8fba4SKumar Gala [GSBI5_UART_SRC] = &gsbi5_uart_src.clkr, 283224d8fba4SKumar Gala [GSBI5_UART_CLK] = &gsbi5_uart_clk.clkr, 283324d8fba4SKumar Gala [GSBI6_UART_SRC] = &gsbi6_uart_src.clkr, 283424d8fba4SKumar Gala [GSBI6_UART_CLK] = &gsbi6_uart_clk.clkr, 283524d8fba4SKumar Gala [GSBI7_UART_SRC] = &gsbi7_uart_src.clkr, 283624d8fba4SKumar Gala [GSBI7_UART_CLK] = &gsbi7_uart_clk.clkr, 283724d8fba4SKumar Gala [GSBI1_QUP_SRC] = &gsbi1_qup_src.clkr, 283824d8fba4SKumar Gala [GSBI1_QUP_CLK] = &gsbi1_qup_clk.clkr, 283924d8fba4SKumar Gala [GSBI2_QUP_SRC] = &gsbi2_qup_src.clkr, 284024d8fba4SKumar Gala [GSBI2_QUP_CLK] = &gsbi2_qup_clk.clkr, 284124d8fba4SKumar Gala [GSBI4_QUP_SRC] = &gsbi4_qup_src.clkr, 284224d8fba4SKumar Gala [GSBI4_QUP_CLK] = &gsbi4_qup_clk.clkr, 284324d8fba4SKumar Gala [GSBI5_QUP_SRC] = &gsbi5_qup_src.clkr, 284424d8fba4SKumar Gala [GSBI5_QUP_CLK] = &gsbi5_qup_clk.clkr, 284524d8fba4SKumar Gala [GSBI6_QUP_SRC] = &gsbi6_qup_src.clkr, 284624d8fba4SKumar Gala [GSBI6_QUP_CLK] = &gsbi6_qup_clk.clkr, 284724d8fba4SKumar Gala [GSBI7_QUP_SRC] = &gsbi7_qup_src.clkr, 284824d8fba4SKumar Gala [GSBI7_QUP_CLK] = &gsbi7_qup_clk.clkr, 284924d8fba4SKumar Gala [GP0_SRC] = &gp0_src.clkr, 285024d8fba4SKumar Gala [GP0_CLK] = &gp0_clk.clkr, 285124d8fba4SKumar Gala [GP1_SRC] = &gp1_src.clkr, 285224d8fba4SKumar Gala [GP1_CLK] = &gp1_clk.clkr, 285324d8fba4SKumar Gala [GP2_SRC] = &gp2_src.clkr, 285424d8fba4SKumar Gala [GP2_CLK] = &gp2_clk.clkr, 285524d8fba4SKumar Gala [PMEM_A_CLK] = &pmem_clk.clkr, 285624d8fba4SKumar Gala [PRNG_SRC] = &prng_src.clkr, 285724d8fba4SKumar Gala [PRNG_CLK] = &prng_clk.clkr, 285824d8fba4SKumar Gala [SDC1_SRC] = &sdc1_src.clkr, 285924d8fba4SKumar Gala [SDC1_CLK] = &sdc1_clk.clkr, 286024d8fba4SKumar Gala [SDC3_SRC] = &sdc3_src.clkr, 286124d8fba4SKumar Gala [SDC3_CLK] = &sdc3_clk.clkr, 286224d8fba4SKumar Gala [TSIF_REF_SRC] = &tsif_ref_src.clkr, 286324d8fba4SKumar Gala [TSIF_REF_CLK] = &tsif_ref_clk.clkr, 286424d8fba4SKumar Gala [DMA_BAM_H_CLK] = &dma_bam_h_clk.clkr, 286524d8fba4SKumar Gala [GSBI1_H_CLK] = &gsbi1_h_clk.clkr, 286624d8fba4SKumar Gala [GSBI2_H_CLK] = &gsbi2_h_clk.clkr, 286724d8fba4SKumar Gala [GSBI4_H_CLK] = &gsbi4_h_clk.clkr, 286824d8fba4SKumar Gala [GSBI5_H_CLK] = &gsbi5_h_clk.clkr, 286924d8fba4SKumar Gala [GSBI6_H_CLK] = &gsbi6_h_clk.clkr, 287024d8fba4SKumar Gala [GSBI7_H_CLK] = &gsbi7_h_clk.clkr, 287124d8fba4SKumar Gala [TSIF_H_CLK] = &tsif_h_clk.clkr, 287224d8fba4SKumar Gala [SDC1_H_CLK] = &sdc1_h_clk.clkr, 287324d8fba4SKumar Gala [SDC3_H_CLK] = &sdc3_h_clk.clkr, 287424d8fba4SKumar Gala [ADM0_CLK] = &adm0_clk.clkr, 287524d8fba4SKumar Gala [ADM0_PBUS_CLK] = &adm0_pbus_clk.clkr, 287624d8fba4SKumar Gala [PCIE_A_CLK] = &pcie_a_clk.clkr, 287724d8fba4SKumar Gala [PCIE_AUX_CLK] = &pcie_aux_clk.clkr, 287824d8fba4SKumar Gala [PCIE_H_CLK] = &pcie_h_clk.clkr, 287924d8fba4SKumar Gala [PCIE_PHY_CLK] = &pcie_phy_clk.clkr, 288024d8fba4SKumar Gala [SFAB_SATA_S_H_CLK] = &sfab_sata_s_h_clk.clkr, 288124d8fba4SKumar Gala [PMIC_ARB0_H_CLK] = &pmic_arb0_h_clk.clkr, 288224d8fba4SKumar Gala [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr, 288324d8fba4SKumar Gala [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr, 288424d8fba4SKumar Gala [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr, 288524d8fba4SKumar Gala [SATA_H_CLK] = &sata_h_clk.clkr, 288624d8fba4SKumar Gala [SATA_CLK_SRC] = &sata_ref_src.clkr, 288724d8fba4SKumar Gala [SATA_RXOOB_CLK] = &sata_rxoob_clk.clkr, 288824d8fba4SKumar Gala [SATA_PMALIVE_CLK] = &sata_pmalive_clk.clkr, 288924d8fba4SKumar Gala [SATA_PHY_REF_CLK] = &sata_phy_ref_clk.clkr, 289024d8fba4SKumar Gala [SATA_A_CLK] = &sata_a_clk.clkr, 289124d8fba4SKumar Gala [SATA_PHY_CFG_CLK] = &sata_phy_cfg_clk.clkr, 289224d8fba4SKumar Gala [PCIE_ALT_REF_SRC] = &pcie_ref_src.clkr, 289324d8fba4SKumar Gala [PCIE_ALT_REF_CLK] = &pcie_ref_src_clk.clkr, 289424d8fba4SKumar Gala [PCIE_1_A_CLK] = &pcie1_a_clk.clkr, 289524d8fba4SKumar Gala [PCIE_1_AUX_CLK] = &pcie1_aux_clk.clkr, 289624d8fba4SKumar Gala [PCIE_1_H_CLK] = &pcie1_h_clk.clkr, 289724d8fba4SKumar Gala [PCIE_1_PHY_CLK] = &pcie1_phy_clk.clkr, 289824d8fba4SKumar Gala [PCIE_1_ALT_REF_SRC] = &pcie1_ref_src.clkr, 289924d8fba4SKumar Gala [PCIE_1_ALT_REF_CLK] = &pcie1_ref_src_clk.clkr, 290024d8fba4SKumar Gala [PCIE_2_A_CLK] = &pcie2_a_clk.clkr, 290124d8fba4SKumar Gala [PCIE_2_AUX_CLK] = &pcie2_aux_clk.clkr, 290224d8fba4SKumar Gala [PCIE_2_H_CLK] = &pcie2_h_clk.clkr, 290324d8fba4SKumar Gala [PCIE_2_PHY_CLK] = &pcie2_phy_clk.clkr, 290424d8fba4SKumar Gala [PCIE_2_ALT_REF_SRC] = &pcie2_ref_src.clkr, 290524d8fba4SKumar Gala [PCIE_2_ALT_REF_CLK] = &pcie2_ref_src_clk.clkr, 290624d8fba4SKumar Gala [USB30_MASTER_SRC] = &usb30_master_clk_src.clkr, 290724d8fba4SKumar Gala [USB30_0_MASTER_CLK] = &usb30_0_branch_clk.clkr, 290824d8fba4SKumar Gala [USB30_1_MASTER_CLK] = &usb30_1_branch_clk.clkr, 290924d8fba4SKumar Gala [USB30_UTMI_SRC] = &usb30_utmi_clk.clkr, 291024d8fba4SKumar Gala [USB30_0_UTMI_CLK] = &usb30_0_utmi_clk_ctl.clkr, 291124d8fba4SKumar Gala [USB30_1_UTMI_CLK] = &usb30_1_utmi_clk_ctl.clkr, 291224d8fba4SKumar Gala [USB_HS1_H_CLK] = &usb_hs1_h_clk.clkr, 291324d8fba4SKumar Gala [USB_HS1_XCVR_SRC] = &usb_hs1_xcvr_clk_src.clkr, 291424d8fba4SKumar Gala [USB_HS1_XCVR_CLK] = &usb_hs1_xcvr_clk.clkr, 291524d8fba4SKumar Gala [USB_FS1_H_CLK] = &usb_fs1_h_clk.clkr, 291624d8fba4SKumar Gala [USB_FS1_XCVR_SRC] = &usb_fs1_xcvr_clk_src.clkr, 291724d8fba4SKumar Gala [USB_FS1_XCVR_CLK] = &usb_fs1_xcvr_clk.clkr, 291824d8fba4SKumar Gala [USB_FS1_SYSTEM_CLK] = &usb_fs1_sys_clk.clkr, 29194c385b25SArchit Taneja [EBI2_CLK] = &ebi2_clk.clkr, 29204c385b25SArchit Taneja [EBI2_AON_CLK] = &ebi2_aon_clk.clkr, 2921f7b81d67SStephen Boyd [GMAC_CORE1_CLK_SRC] = &gmac_core1_src.clkr, 2922f7b81d67SStephen Boyd [GMAC_CORE1_CLK] = &gmac_core1_clk.clkr, 2923f7b81d67SStephen Boyd [GMAC_CORE2_CLK_SRC] = &gmac_core2_src.clkr, 2924f7b81d67SStephen Boyd [GMAC_CORE2_CLK] = &gmac_core2_clk.clkr, 2925f7b81d67SStephen Boyd [GMAC_CORE3_CLK_SRC] = &gmac_core3_src.clkr, 2926f7b81d67SStephen Boyd [GMAC_CORE3_CLK] = &gmac_core3_clk.clkr, 2927f7b81d67SStephen Boyd [GMAC_CORE4_CLK_SRC] = &gmac_core4_src.clkr, 2928f7b81d67SStephen Boyd [GMAC_CORE4_CLK] = &gmac_core4_clk.clkr, 2929f7b81d67SStephen Boyd [UBI32_CORE1_CLK_SRC] = &ubi32_core1_src_clk.clkr, 2930f7b81d67SStephen Boyd [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr, 2931f7b81d67SStephen Boyd [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr, 2932f7b81d67SStephen Boyd [NSSTCM_CLK] = &nss_tcm_clk.clkr, 29331f79131bSStephen Boyd [PLL9] = &hfpll0.clkr, 29341f79131bSStephen Boyd [PLL10] = &hfpll1.clkr, 29351f79131bSStephen Boyd [PLL12] = &hfpll_l2.clkr, 293624d8fba4SKumar Gala }; 293724d8fba4SKumar Gala 293824d8fba4SKumar Gala static const struct qcom_reset_map gcc_ipq806x_resets[] = { 293924d8fba4SKumar Gala [QDSS_STM_RESET] = { 0x2060, 6 }, 294024d8fba4SKumar Gala [AFAB_SMPSS_S_RESET] = { 0x20b8, 2 }, 294124d8fba4SKumar Gala [AFAB_SMPSS_M1_RESET] = { 0x20b8, 1 }, 294224d8fba4SKumar Gala [AFAB_SMPSS_M0_RESET] = { 0x20b8, 0 }, 294324d8fba4SKumar Gala [AFAB_EBI1_CH0_RESET] = { 0x20c0, 7 }, 294424d8fba4SKumar Gala [AFAB_EBI1_CH1_RESET] = { 0x20c4, 7 }, 294524d8fba4SKumar Gala [SFAB_ADM0_M0_RESET] = { 0x21e0, 7 }, 294624d8fba4SKumar Gala [SFAB_ADM0_M1_RESET] = { 0x21e4, 7 }, 294724d8fba4SKumar Gala [SFAB_ADM0_M2_RESET] = { 0x21e8, 7 }, 294824d8fba4SKumar Gala [ADM0_C2_RESET] = { 0x220c, 4 }, 294924d8fba4SKumar Gala [ADM0_C1_RESET] = { 0x220c, 3 }, 295024d8fba4SKumar Gala [ADM0_C0_RESET] = { 0x220c, 2 }, 295124d8fba4SKumar Gala [ADM0_PBUS_RESET] = { 0x220c, 1 }, 295224d8fba4SKumar Gala [ADM0_RESET] = { 0x220c, 0 }, 295324d8fba4SKumar Gala [QDSS_CLKS_SW_RESET] = { 0x2260, 5 }, 295424d8fba4SKumar Gala [QDSS_POR_RESET] = { 0x2260, 4 }, 295524d8fba4SKumar Gala [QDSS_TSCTR_RESET] = { 0x2260, 3 }, 295624d8fba4SKumar Gala [QDSS_HRESET_RESET] = { 0x2260, 2 }, 295724d8fba4SKumar Gala [QDSS_AXI_RESET] = { 0x2260, 1 }, 295824d8fba4SKumar Gala [QDSS_DBG_RESET] = { 0x2260, 0 }, 295924d8fba4SKumar Gala [SFAB_PCIE_M_RESET] = { 0x22d8, 1 }, 296024d8fba4SKumar Gala [SFAB_PCIE_S_RESET] = { 0x22d8, 0 }, 296124d8fba4SKumar Gala [PCIE_EXT_RESET] = { 0x22dc, 6 }, 296224d8fba4SKumar Gala [PCIE_PHY_RESET] = { 0x22dc, 5 }, 296324d8fba4SKumar Gala [PCIE_PCI_RESET] = { 0x22dc, 4 }, 296424d8fba4SKumar Gala [PCIE_POR_RESET] = { 0x22dc, 3 }, 296524d8fba4SKumar Gala [PCIE_HCLK_RESET] = { 0x22dc, 2 }, 296624d8fba4SKumar Gala [PCIE_ACLK_RESET] = { 0x22dc, 0 }, 296724d8fba4SKumar Gala [SFAB_LPASS_RESET] = { 0x23a0, 7 }, 296824d8fba4SKumar Gala [SFAB_AFAB_M_RESET] = { 0x23e0, 7 }, 296924d8fba4SKumar Gala [AFAB_SFAB_M0_RESET] = { 0x2420, 7 }, 297024d8fba4SKumar Gala [AFAB_SFAB_M1_RESET] = { 0x2424, 7 }, 297124d8fba4SKumar Gala [SFAB_SATA_S_RESET] = { 0x2480, 7 }, 297224d8fba4SKumar Gala [SFAB_DFAB_M_RESET] = { 0x2500, 7 }, 297324d8fba4SKumar Gala [DFAB_SFAB_M_RESET] = { 0x2520, 7 }, 297424d8fba4SKumar Gala [DFAB_SWAY0_RESET] = { 0x2540, 7 }, 297524d8fba4SKumar Gala [DFAB_SWAY1_RESET] = { 0x2544, 7 }, 297624d8fba4SKumar Gala [DFAB_ARB0_RESET] = { 0x2560, 7 }, 297724d8fba4SKumar Gala [DFAB_ARB1_RESET] = { 0x2564, 7 }, 297824d8fba4SKumar Gala [PPSS_PROC_RESET] = { 0x2594, 1 }, 297924d8fba4SKumar Gala [PPSS_RESET] = { 0x2594, 0 }, 298024d8fba4SKumar Gala [DMA_BAM_RESET] = { 0x25c0, 7 }, 298124d8fba4SKumar Gala [SPS_TIC_H_RESET] = { 0x2600, 7 }, 298224d8fba4SKumar Gala [SFAB_CFPB_M_RESET] = { 0x2680, 7 }, 298324d8fba4SKumar Gala [SFAB_CFPB_S_RESET] = { 0x26c0, 7 }, 298424d8fba4SKumar Gala [TSIF_H_RESET] = { 0x2700, 7 }, 298524d8fba4SKumar Gala [CE1_H_RESET] = { 0x2720, 7 }, 298624d8fba4SKumar Gala [CE1_CORE_RESET] = { 0x2724, 7 }, 298724d8fba4SKumar Gala [CE1_SLEEP_RESET] = { 0x2728, 7 }, 298824d8fba4SKumar Gala [CE2_H_RESET] = { 0x2740, 7 }, 298924d8fba4SKumar Gala [CE2_CORE_RESET] = { 0x2744, 7 }, 299024d8fba4SKumar Gala [SFAB_SFPB_M_RESET] = { 0x2780, 7 }, 299124d8fba4SKumar Gala [SFAB_SFPB_S_RESET] = { 0x27a0, 7 }, 299224d8fba4SKumar Gala [RPM_PROC_RESET] = { 0x27c0, 7 }, 299324d8fba4SKumar Gala [PMIC_SSBI2_RESET] = { 0x280c, 12 }, 299424d8fba4SKumar Gala [SDC1_RESET] = { 0x2830, 0 }, 299524d8fba4SKumar Gala [SDC2_RESET] = { 0x2850, 0 }, 299624d8fba4SKumar Gala [SDC3_RESET] = { 0x2870, 0 }, 299724d8fba4SKumar Gala [SDC4_RESET] = { 0x2890, 0 }, 299824d8fba4SKumar Gala [USB_HS1_RESET] = { 0x2910, 0 }, 299924d8fba4SKumar Gala [USB_HSIC_RESET] = { 0x2934, 0 }, 300024d8fba4SKumar Gala [USB_FS1_XCVR_RESET] = { 0x2974, 1 }, 300124d8fba4SKumar Gala [USB_FS1_RESET] = { 0x2974, 0 }, 300224d8fba4SKumar Gala [GSBI1_RESET] = { 0x29dc, 0 }, 300324d8fba4SKumar Gala [GSBI2_RESET] = { 0x29fc, 0 }, 300424d8fba4SKumar Gala [GSBI3_RESET] = { 0x2a1c, 0 }, 300524d8fba4SKumar Gala [GSBI4_RESET] = { 0x2a3c, 0 }, 300624d8fba4SKumar Gala [GSBI5_RESET] = { 0x2a5c, 0 }, 300724d8fba4SKumar Gala [GSBI6_RESET] = { 0x2a7c, 0 }, 300824d8fba4SKumar Gala [GSBI7_RESET] = { 0x2a9c, 0 }, 300924d8fba4SKumar Gala [SPDM_RESET] = { 0x2b6c, 0 }, 301024d8fba4SKumar Gala [SEC_CTRL_RESET] = { 0x2b80, 7 }, 301124d8fba4SKumar Gala [TLMM_H_RESET] = { 0x2ba0, 7 }, 301224d8fba4SKumar Gala [SFAB_SATA_M_RESET] = { 0x2c18, 0 }, 301324d8fba4SKumar Gala [SATA_RESET] = { 0x2c1c, 0 }, 301424d8fba4SKumar Gala [TSSC_RESET] = { 0x2ca0, 7 }, 301524d8fba4SKumar Gala [PDM_RESET] = { 0x2cc0, 12 }, 301624d8fba4SKumar Gala [MPM_H_RESET] = { 0x2da0, 7 }, 301724d8fba4SKumar Gala [MPM_RESET] = { 0x2da4, 0 }, 301824d8fba4SKumar Gala [SFAB_SMPSS_S_RESET] = { 0x2e00, 7 }, 301924d8fba4SKumar Gala [PRNG_RESET] = { 0x2e80, 12 }, 302024d8fba4SKumar Gala [SFAB_CE3_M_RESET] = { 0x36c8, 1 }, 302124d8fba4SKumar Gala [SFAB_CE3_S_RESET] = { 0x36c8, 0 }, 302224d8fba4SKumar Gala [CE3_SLEEP_RESET] = { 0x36d0, 7 }, 302324d8fba4SKumar Gala [PCIE_1_M_RESET] = { 0x3a98, 1 }, 302424d8fba4SKumar Gala [PCIE_1_S_RESET] = { 0x3a98, 0 }, 302524d8fba4SKumar Gala [PCIE_1_EXT_RESET] = { 0x3a9c, 6 }, 302624d8fba4SKumar Gala [PCIE_1_PHY_RESET] = { 0x3a9c, 5 }, 302724d8fba4SKumar Gala [PCIE_1_PCI_RESET] = { 0x3a9c, 4 }, 302824d8fba4SKumar Gala [PCIE_1_POR_RESET] = { 0x3a9c, 3 }, 302924d8fba4SKumar Gala [PCIE_1_HCLK_RESET] = { 0x3a9c, 2 }, 303024d8fba4SKumar Gala [PCIE_1_ACLK_RESET] = { 0x3a9c, 0 }, 303124d8fba4SKumar Gala [PCIE_2_M_RESET] = { 0x3ad8, 1 }, 303224d8fba4SKumar Gala [PCIE_2_S_RESET] = { 0x3ad8, 0 }, 303324d8fba4SKumar Gala [PCIE_2_EXT_RESET] = { 0x3adc, 6 }, 303424d8fba4SKumar Gala [PCIE_2_PHY_RESET] = { 0x3adc, 5 }, 303524d8fba4SKumar Gala [PCIE_2_PCI_RESET] = { 0x3adc, 4 }, 303624d8fba4SKumar Gala [PCIE_2_POR_RESET] = { 0x3adc, 3 }, 303724d8fba4SKumar Gala [PCIE_2_HCLK_RESET] = { 0x3adc, 2 }, 303824d8fba4SKumar Gala [PCIE_2_ACLK_RESET] = { 0x3adc, 0 }, 303924d8fba4SKumar Gala [SFAB_USB30_S_RESET] = { 0x3b54, 1 }, 304024d8fba4SKumar Gala [SFAB_USB30_M_RESET] = { 0x3b54, 0 }, 304124d8fba4SKumar Gala [USB30_0_PORT2_HS_PHY_RESET] = { 0x3b50, 5 }, 304224d8fba4SKumar Gala [USB30_0_MASTER_RESET] = { 0x3b50, 4 }, 304324d8fba4SKumar Gala [USB30_0_SLEEP_RESET] = { 0x3b50, 3 }, 304424d8fba4SKumar Gala [USB30_0_UTMI_PHY_RESET] = { 0x3b50, 2 }, 304524d8fba4SKumar Gala [USB30_0_POWERON_RESET] = { 0x3b50, 1 }, 304624d8fba4SKumar Gala [USB30_0_PHY_RESET] = { 0x3b50, 0 }, 304724d8fba4SKumar Gala [USB30_1_MASTER_RESET] = { 0x3b58, 4 }, 304824d8fba4SKumar Gala [USB30_1_SLEEP_RESET] = { 0x3b58, 3 }, 304924d8fba4SKumar Gala [USB30_1_UTMI_PHY_RESET] = { 0x3b58, 2 }, 305024d8fba4SKumar Gala [USB30_1_POWERON_RESET] = { 0x3b58, 1 }, 305124d8fba4SKumar Gala [USB30_1_PHY_RESET] = { 0x3b58, 0 }, 305224d8fba4SKumar Gala [NSSFB0_RESET] = { 0x3b60, 6 }, 305324d8fba4SKumar Gala [NSSFB1_RESET] = { 0x3b60, 7 }, 3054f7b81d67SStephen Boyd [UBI32_CORE1_CLKRST_CLAMP_RESET] = { 0x3d3c, 3}, 3055f7b81d67SStephen Boyd [UBI32_CORE1_CLAMP_RESET] = { 0x3d3c, 2 }, 3056f7b81d67SStephen Boyd [UBI32_CORE1_AHB_RESET] = { 0x3d3c, 1 }, 3057f7b81d67SStephen Boyd [UBI32_CORE1_AXI_RESET] = { 0x3d3c, 0 }, 3058f7b81d67SStephen Boyd [UBI32_CORE2_CLKRST_CLAMP_RESET] = { 0x3d5c, 3 }, 3059f7b81d67SStephen Boyd [UBI32_CORE2_CLAMP_RESET] = { 0x3d5c, 2 }, 3060f7b81d67SStephen Boyd [UBI32_CORE2_AHB_RESET] = { 0x3d5c, 1 }, 3061f7b81d67SStephen Boyd [UBI32_CORE2_AXI_RESET] = { 0x3d5c, 0 }, 3062f7b81d67SStephen Boyd [GMAC_CORE1_RESET] = { 0x3cbc, 0 }, 3063f7b81d67SStephen Boyd [GMAC_CORE2_RESET] = { 0x3cdc, 0 }, 3064f7b81d67SStephen Boyd [GMAC_CORE3_RESET] = { 0x3cfc, 0 }, 3065f7b81d67SStephen Boyd [GMAC_CORE4_RESET] = { 0x3d1c, 0 }, 3066f7b81d67SStephen Boyd [GMAC_AHB_RESET] = { 0x3e24, 0 }, 3067f7b81d67SStephen Boyd [NSS_CH0_RST_RX_CLK_N_RESET] = { 0x3b60, 0 }, 3068f7b81d67SStephen Boyd [NSS_CH0_RST_TX_CLK_N_RESET] = { 0x3b60, 1 }, 3069f7b81d67SStephen Boyd [NSS_CH0_RST_RX_125M_N_RESET] = { 0x3b60, 2 }, 3070f7b81d67SStephen Boyd [NSS_CH0_HW_RST_RX_125M_N_RESET] = { 0x3b60, 3 }, 3071f7b81d67SStephen Boyd [NSS_CH0_RST_TX_125M_N_RESET] = { 0x3b60, 4 }, 3072f7b81d67SStephen Boyd [NSS_CH1_RST_RX_CLK_N_RESET] = { 0x3b60, 5 }, 3073f7b81d67SStephen Boyd [NSS_CH1_RST_TX_CLK_N_RESET] = { 0x3b60, 6 }, 3074f7b81d67SStephen Boyd [NSS_CH1_RST_RX_125M_N_RESET] = { 0x3b60, 7 }, 3075f7b81d67SStephen Boyd [NSS_CH1_HW_RST_RX_125M_N_RESET] = { 0x3b60, 8 }, 3076f7b81d67SStephen Boyd [NSS_CH1_RST_TX_125M_N_RESET] = { 0x3b60, 9 }, 3077f7b81d67SStephen Boyd [NSS_CH2_RST_RX_CLK_N_RESET] = { 0x3b60, 10 }, 3078f7b81d67SStephen Boyd [NSS_CH2_RST_TX_CLK_N_RESET] = { 0x3b60, 11 }, 3079f7b81d67SStephen Boyd [NSS_CH2_RST_RX_125M_N_RESET] = { 0x3b60, 12 }, 3080f7b81d67SStephen Boyd [NSS_CH2_HW_RST_RX_125M_N_RESET] = { 0x3b60, 13 }, 3081f7b81d67SStephen Boyd [NSS_CH2_RST_TX_125M_N_RESET] = { 0x3b60, 14 }, 3082f7b81d67SStephen Boyd [NSS_CH3_RST_RX_CLK_N_RESET] = { 0x3b60, 15 }, 3083f7b81d67SStephen Boyd [NSS_CH3_RST_TX_CLK_N_RESET] = { 0x3b60, 16 }, 3084f7b81d67SStephen Boyd [NSS_CH3_RST_RX_125M_N_RESET] = { 0x3b60, 17 }, 3085f7b81d67SStephen Boyd [NSS_CH3_HW_RST_RX_125M_N_RESET] = { 0x3b60, 18 }, 3086f7b81d67SStephen Boyd [NSS_CH3_RST_TX_125M_N_RESET] = { 0x3b60, 19 }, 3087f7b81d67SStephen Boyd [NSS_RST_RX_250M_125M_N_RESET] = { 0x3b60, 20 }, 3088f7b81d67SStephen Boyd [NSS_RST_TX_250M_125M_N_RESET] = { 0x3b60, 21 }, 3089f7b81d67SStephen Boyd [NSS_QSGMII_TXPI_RST_N_RESET] = { 0x3b60, 22 }, 3090f7b81d67SStephen Boyd [NSS_QSGMII_CDR_RST_N_RESET] = { 0x3b60, 23 }, 3091f7b81d67SStephen Boyd [NSS_SGMII2_CDR_RST_N_RESET] = { 0x3b60, 24 }, 3092f7b81d67SStephen Boyd [NSS_SGMII3_CDR_RST_N_RESET] = { 0x3b60, 25 }, 3093f7b81d67SStephen Boyd [NSS_CAL_PRBS_RST_N_RESET] = { 0x3b60, 26 }, 3094f7b81d67SStephen Boyd [NSS_LCKDT_RST_N_RESET] = { 0x3b60, 27 }, 3095f7b81d67SStephen Boyd [NSS_SRDS_N_RESET] = { 0x3b60, 28 }, 309624d8fba4SKumar Gala }; 309724d8fba4SKumar Gala 309824d8fba4SKumar Gala static const struct regmap_config gcc_ipq806x_regmap_config = { 309924d8fba4SKumar Gala .reg_bits = 32, 310024d8fba4SKumar Gala .reg_stride = 4, 310124d8fba4SKumar Gala .val_bits = 32, 310224d8fba4SKumar Gala .max_register = 0x3e40, 310324d8fba4SKumar Gala .fast_io = true, 310424d8fba4SKumar Gala }; 310524d8fba4SKumar Gala 310624d8fba4SKumar Gala static const struct qcom_cc_desc gcc_ipq806x_desc = { 310724d8fba4SKumar Gala .config = &gcc_ipq806x_regmap_config, 310824d8fba4SKumar Gala .clks = gcc_ipq806x_clks, 310924d8fba4SKumar Gala .num_clks = ARRAY_SIZE(gcc_ipq806x_clks), 311024d8fba4SKumar Gala .resets = gcc_ipq806x_resets, 311124d8fba4SKumar Gala .num_resets = ARRAY_SIZE(gcc_ipq806x_resets), 311224d8fba4SKumar Gala }; 311324d8fba4SKumar Gala 311424d8fba4SKumar Gala static const struct of_device_id gcc_ipq806x_match_table[] = { 311524d8fba4SKumar Gala { .compatible = "qcom,gcc-ipq8064" }, 311624d8fba4SKumar Gala { } 311724d8fba4SKumar Gala }; 311824d8fba4SKumar Gala MODULE_DEVICE_TABLE(of, gcc_ipq806x_match_table); 311924d8fba4SKumar Gala 312024d8fba4SKumar Gala static int gcc_ipq806x_probe(struct platform_device *pdev) 312124d8fba4SKumar Gala { 312224d8fba4SKumar Gala struct device *dev = &pdev->dev; 3123f7b81d67SStephen Boyd struct regmap *regmap; 3124f7b81d67SStephen Boyd int ret; 312524d8fba4SKumar Gala 3126cbf2e548SStephen Boyd ret = qcom_cc_register_board_clk(dev, "cxo_board", "cxo", 25000000); 3127a085f877SStephen Boyd if (ret) 3128a085f877SStephen Boyd return ret; 312924d8fba4SKumar Gala 3130cbf2e548SStephen Boyd ret = qcom_cc_register_board_clk(dev, "pxo_board", "pxo", 25000000); 3131a085f877SStephen Boyd if (ret) 3132a085f877SStephen Boyd return ret; 313324d8fba4SKumar Gala 3134f7b81d67SStephen Boyd ret = qcom_cc_probe(pdev, &gcc_ipq806x_desc); 3135f7b81d67SStephen Boyd if (ret) 3136f7b81d67SStephen Boyd return ret; 3137f7b81d67SStephen Boyd 3138f7b81d67SStephen Boyd regmap = dev_get_regmap(dev, NULL); 3139f7b81d67SStephen Boyd if (!regmap) 3140f7b81d67SStephen Boyd return -ENODEV; 3141f7b81d67SStephen Boyd 3142f7b81d67SStephen Boyd /* Setup PLL18 static bits */ 3143f7b81d67SStephen Boyd regmap_update_bits(regmap, 0x31a4, 0xffffffc0, 0x40000400); 3144f7b81d67SStephen Boyd regmap_write(regmap, 0x31b0, 0x3080); 3145f7b81d67SStephen Boyd 3146f7b81d67SStephen Boyd /* Set GMAC footswitch sleep/wakeup values */ 3147f7b81d67SStephen Boyd regmap_write(regmap, 0x3cb8, 8); 3148f7b81d67SStephen Boyd regmap_write(regmap, 0x3cd8, 8); 3149f7b81d67SStephen Boyd regmap_write(regmap, 0x3cf8, 8); 3150f7b81d67SStephen Boyd regmap_write(regmap, 0x3d18, 8); 3151f7b81d67SStephen Boyd 31525ce728faSAnsuel Smith return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); 315324d8fba4SKumar Gala } 315424d8fba4SKumar Gala 315524d8fba4SKumar Gala static struct platform_driver gcc_ipq806x_driver = { 315624d8fba4SKumar Gala .probe = gcc_ipq806x_probe, 315724d8fba4SKumar Gala .driver = { 315824d8fba4SKumar Gala .name = "gcc-ipq806x", 315924d8fba4SKumar Gala .of_match_table = gcc_ipq806x_match_table, 316024d8fba4SKumar Gala }, 316124d8fba4SKumar Gala }; 316224d8fba4SKumar Gala 316324d8fba4SKumar Gala static int __init gcc_ipq806x_init(void) 316424d8fba4SKumar Gala { 316524d8fba4SKumar Gala return platform_driver_register(&gcc_ipq806x_driver); 316624d8fba4SKumar Gala } 316724d8fba4SKumar Gala core_initcall(gcc_ipq806x_init); 316824d8fba4SKumar Gala 316924d8fba4SKumar Gala static void __exit gcc_ipq806x_exit(void) 317024d8fba4SKumar Gala { 317124d8fba4SKumar Gala platform_driver_unregister(&gcc_ipq806x_driver); 317224d8fba4SKumar Gala } 317324d8fba4SKumar Gala module_exit(gcc_ipq806x_exit); 317424d8fba4SKumar Gala 317524d8fba4SKumar Gala MODULE_DESCRIPTION("QCOM GCC IPQ806x Driver"); 317624d8fba4SKumar Gala MODULE_LICENSE("GPL v2"); 317724d8fba4SKumar Gala MODULE_ALIAS("platform:gcc-ipq806x"); 3178