124d8fba4SKumar Gala /* 224d8fba4SKumar Gala * Copyright (c) 2014, The Linux Foundation. All rights reserved. 324d8fba4SKumar Gala * 424d8fba4SKumar Gala * This software is licensed under the terms of the GNU General Public 524d8fba4SKumar Gala * License version 2, as published by the Free Software Foundation, and 624d8fba4SKumar Gala * may be copied, distributed, and modified under those terms. 724d8fba4SKumar Gala * 824d8fba4SKumar Gala * This program is distributed in the hope that it will be useful, 924d8fba4SKumar Gala * but WITHOUT ANY WARRANTY; without even the implied warranty of 1024d8fba4SKumar Gala * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1124d8fba4SKumar Gala * GNU General Public License for more details. 1224d8fba4SKumar Gala */ 1324d8fba4SKumar Gala 1424d8fba4SKumar Gala #include <linux/kernel.h> 1524d8fba4SKumar Gala #include <linux/bitops.h> 1624d8fba4SKumar Gala #include <linux/err.h> 1724d8fba4SKumar Gala #include <linux/platform_device.h> 1824d8fba4SKumar Gala #include <linux/module.h> 1924d8fba4SKumar Gala #include <linux/of.h> 2024d8fba4SKumar Gala #include <linux/of_device.h> 2124d8fba4SKumar Gala #include <linux/clk-provider.h> 2224d8fba4SKumar Gala #include <linux/regmap.h> 2324d8fba4SKumar Gala #include <linux/reset-controller.h> 2424d8fba4SKumar Gala 2524d8fba4SKumar Gala #include <dt-bindings/clock/qcom,gcc-ipq806x.h> 2624d8fba4SKumar Gala #include <dt-bindings/reset/qcom,gcc-ipq806x.h> 2724d8fba4SKumar Gala 2824d8fba4SKumar Gala #include "common.h" 2924d8fba4SKumar Gala #include "clk-regmap.h" 3024d8fba4SKumar Gala #include "clk-pll.h" 3124d8fba4SKumar Gala #include "clk-rcg.h" 3224d8fba4SKumar Gala #include "clk-branch.h" 3324d8fba4SKumar Gala #include "reset.h" 3424d8fba4SKumar Gala 35dc1b3f65SAndy Gross static struct clk_pll pll0 = { 36dc1b3f65SAndy Gross .l_reg = 0x30c4, 37dc1b3f65SAndy Gross .m_reg = 0x30c8, 38dc1b3f65SAndy Gross .n_reg = 0x30cc, 39dc1b3f65SAndy Gross .config_reg = 0x30d4, 40dc1b3f65SAndy Gross .mode_reg = 0x30c0, 41dc1b3f65SAndy Gross .status_reg = 0x30d8, 42dc1b3f65SAndy Gross .status_bit = 16, 43dc1b3f65SAndy Gross .clkr.hw.init = &(struct clk_init_data){ 44dc1b3f65SAndy Gross .name = "pll0", 45dc1b3f65SAndy Gross .parent_names = (const char *[]){ "pxo" }, 46dc1b3f65SAndy Gross .num_parents = 1, 47dc1b3f65SAndy Gross .ops = &clk_pll_ops, 48dc1b3f65SAndy Gross }, 49dc1b3f65SAndy Gross }; 50dc1b3f65SAndy Gross 51dc1b3f65SAndy Gross static struct clk_regmap pll0_vote = { 52dc1b3f65SAndy Gross .enable_reg = 0x34c0, 53dc1b3f65SAndy Gross .enable_mask = BIT(0), 54dc1b3f65SAndy Gross .hw.init = &(struct clk_init_data){ 55dc1b3f65SAndy Gross .name = "pll0_vote", 56dc1b3f65SAndy Gross .parent_names = (const char *[]){ "pll0" }, 57dc1b3f65SAndy Gross .num_parents = 1, 58dc1b3f65SAndy Gross .ops = &clk_pll_vote_ops, 59dc1b3f65SAndy Gross }, 60dc1b3f65SAndy Gross }; 61dc1b3f65SAndy Gross 6224d8fba4SKumar Gala static struct clk_pll pll3 = { 6324d8fba4SKumar Gala .l_reg = 0x3164, 6424d8fba4SKumar Gala .m_reg = 0x3168, 6524d8fba4SKumar Gala .n_reg = 0x316c, 6624d8fba4SKumar Gala .config_reg = 0x3174, 6724d8fba4SKumar Gala .mode_reg = 0x3160, 6824d8fba4SKumar Gala .status_reg = 0x3178, 6924d8fba4SKumar Gala .status_bit = 16, 7024d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 7124d8fba4SKumar Gala .name = "pll3", 7224d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 7324d8fba4SKumar Gala .num_parents = 1, 7424d8fba4SKumar Gala .ops = &clk_pll_ops, 7524d8fba4SKumar Gala }, 7624d8fba4SKumar Gala }; 7724d8fba4SKumar Gala 78c99e515aSRajendra Nayak static struct clk_regmap pll4_vote = { 79c99e515aSRajendra Nayak .enable_reg = 0x34c0, 80c99e515aSRajendra Nayak .enable_mask = BIT(4), 81c99e515aSRajendra Nayak .hw.init = &(struct clk_init_data){ 82c99e515aSRajendra Nayak .name = "pll4_vote", 83c99e515aSRajendra Nayak .parent_names = (const char *[]){ "pll4" }, 84c99e515aSRajendra Nayak .num_parents = 1, 85c99e515aSRajendra Nayak .ops = &clk_pll_vote_ops, 86c99e515aSRajendra Nayak }, 87c99e515aSRajendra Nayak }; 88c99e515aSRajendra Nayak 8924d8fba4SKumar Gala static struct clk_pll pll8 = { 9024d8fba4SKumar Gala .l_reg = 0x3144, 9124d8fba4SKumar Gala .m_reg = 0x3148, 9224d8fba4SKumar Gala .n_reg = 0x314c, 9324d8fba4SKumar Gala .config_reg = 0x3154, 9424d8fba4SKumar Gala .mode_reg = 0x3140, 9524d8fba4SKumar Gala .status_reg = 0x3158, 9624d8fba4SKumar Gala .status_bit = 16, 9724d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 9824d8fba4SKumar Gala .name = "pll8", 9924d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 10024d8fba4SKumar Gala .num_parents = 1, 10124d8fba4SKumar Gala .ops = &clk_pll_ops, 10224d8fba4SKumar Gala }, 10324d8fba4SKumar Gala }; 10424d8fba4SKumar Gala 10524d8fba4SKumar Gala static struct clk_regmap pll8_vote = { 10624d8fba4SKumar Gala .enable_reg = 0x34c0, 10724d8fba4SKumar Gala .enable_mask = BIT(8), 10824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 10924d8fba4SKumar Gala .name = "pll8_vote", 11024d8fba4SKumar Gala .parent_names = (const char *[]){ "pll8" }, 11124d8fba4SKumar Gala .num_parents = 1, 11224d8fba4SKumar Gala .ops = &clk_pll_vote_ops, 11324d8fba4SKumar Gala }, 11424d8fba4SKumar Gala }; 11524d8fba4SKumar Gala 11624d8fba4SKumar Gala static struct clk_pll pll14 = { 11724d8fba4SKumar Gala .l_reg = 0x31c4, 11824d8fba4SKumar Gala .m_reg = 0x31c8, 11924d8fba4SKumar Gala .n_reg = 0x31cc, 12024d8fba4SKumar Gala .config_reg = 0x31d4, 12124d8fba4SKumar Gala .mode_reg = 0x31c0, 12224d8fba4SKumar Gala .status_reg = 0x31d8, 12324d8fba4SKumar Gala .status_bit = 16, 12424d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 12524d8fba4SKumar Gala .name = "pll14", 12624d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 12724d8fba4SKumar Gala .num_parents = 1, 12824d8fba4SKumar Gala .ops = &clk_pll_ops, 12924d8fba4SKumar Gala }, 13024d8fba4SKumar Gala }; 13124d8fba4SKumar Gala 13224d8fba4SKumar Gala static struct clk_regmap pll14_vote = { 13324d8fba4SKumar Gala .enable_reg = 0x34c0, 13424d8fba4SKumar Gala .enable_mask = BIT(14), 13524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 13624d8fba4SKumar Gala .name = "pll14_vote", 13724d8fba4SKumar Gala .parent_names = (const char *[]){ "pll14" }, 13824d8fba4SKumar Gala .num_parents = 1, 13924d8fba4SKumar Gala .ops = &clk_pll_vote_ops, 14024d8fba4SKumar Gala }, 14124d8fba4SKumar Gala }; 14224d8fba4SKumar Gala 143*f7b81d67SStephen Boyd #define NSS_PLL_RATE(f, _l, _m, _n, i) \ 144*f7b81d67SStephen Boyd { \ 145*f7b81d67SStephen Boyd .freq = f, \ 146*f7b81d67SStephen Boyd .l = _l, \ 147*f7b81d67SStephen Boyd .m = _m, \ 148*f7b81d67SStephen Boyd .n = _n, \ 149*f7b81d67SStephen Boyd .ibits = i, \ 150*f7b81d67SStephen Boyd } 151*f7b81d67SStephen Boyd 152*f7b81d67SStephen Boyd static struct pll_freq_tbl pll18_freq_tbl[] = { 153*f7b81d67SStephen Boyd NSS_PLL_RATE(550000000, 44, 0, 1, 0x01495625), 154*f7b81d67SStephen Boyd NSS_PLL_RATE(733000000, 58, 16, 25, 0x014b5625), 155*f7b81d67SStephen Boyd }; 156*f7b81d67SStephen Boyd 157*f7b81d67SStephen Boyd static struct clk_pll pll18 = { 158*f7b81d67SStephen Boyd .l_reg = 0x31a4, 159*f7b81d67SStephen Boyd .m_reg = 0x31a8, 160*f7b81d67SStephen Boyd .n_reg = 0x31ac, 161*f7b81d67SStephen Boyd .config_reg = 0x31b4, 162*f7b81d67SStephen Boyd .mode_reg = 0x31a0, 163*f7b81d67SStephen Boyd .status_reg = 0x31b8, 164*f7b81d67SStephen Boyd .status_bit = 16, 165*f7b81d67SStephen Boyd .post_div_shift = 16, 166*f7b81d67SStephen Boyd .post_div_width = 1, 167*f7b81d67SStephen Boyd .freq_tbl = pll18_freq_tbl, 168*f7b81d67SStephen Boyd .clkr.hw.init = &(struct clk_init_data){ 169*f7b81d67SStephen Boyd .name = "pll18", 170*f7b81d67SStephen Boyd .parent_names = (const char *[]){ "pxo" }, 171*f7b81d67SStephen Boyd .num_parents = 1, 172*f7b81d67SStephen Boyd .ops = &clk_pll_ops, 173*f7b81d67SStephen Boyd }, 174*f7b81d67SStephen Boyd }; 175*f7b81d67SStephen Boyd 176293d2e97SGeorgi Djakov enum { 177293d2e97SGeorgi Djakov P_PXO, 178293d2e97SGeorgi Djakov P_PLL8, 179293d2e97SGeorgi Djakov P_PLL3, 180293d2e97SGeorgi Djakov P_PLL0, 181293d2e97SGeorgi Djakov P_CXO, 182*f7b81d67SStephen Boyd P_PLL14, 183*f7b81d67SStephen Boyd P_PLL18, 184293d2e97SGeorgi Djakov }; 18524d8fba4SKumar Gala 186293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll8_map[] = { 187293d2e97SGeorgi Djakov { P_PXO, 0 }, 188293d2e97SGeorgi Djakov { P_PLL8, 3 } 18924d8fba4SKumar Gala }; 19024d8fba4SKumar Gala 19124d8fba4SKumar Gala static const char *gcc_pxo_pll8[] = { 19224d8fba4SKumar Gala "pxo", 19324d8fba4SKumar Gala "pll8_vote", 19424d8fba4SKumar Gala }; 19524d8fba4SKumar Gala 196293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll8_cxo_map[] = { 197293d2e97SGeorgi Djakov { P_PXO, 0 }, 198293d2e97SGeorgi Djakov { P_PLL8, 3 }, 199293d2e97SGeorgi Djakov { P_CXO, 5 } 20024d8fba4SKumar Gala }; 20124d8fba4SKumar Gala 20224d8fba4SKumar Gala static const char *gcc_pxo_pll8_cxo[] = { 20324d8fba4SKumar Gala "pxo", 20424d8fba4SKumar Gala "pll8_vote", 20524d8fba4SKumar Gala "cxo", 20624d8fba4SKumar Gala }; 20724d8fba4SKumar Gala 208293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll3_map[] = { 209293d2e97SGeorgi Djakov { P_PXO, 0 }, 210293d2e97SGeorgi Djakov { P_PLL3, 1 } 21124d8fba4SKumar Gala }; 21224d8fba4SKumar Gala 213293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll3_sata_map[] = { 214293d2e97SGeorgi Djakov { P_PXO, 0 }, 215293d2e97SGeorgi Djakov { P_PLL3, 6 } 21624d8fba4SKumar Gala }; 21724d8fba4SKumar Gala 21824d8fba4SKumar Gala static const char *gcc_pxo_pll3[] = { 21924d8fba4SKumar Gala "pxo", 22024d8fba4SKumar Gala "pll3", 22124d8fba4SKumar Gala }; 22224d8fba4SKumar Gala 223293d2e97SGeorgi Djakov static const struct parent_map gcc_pxo_pll8_pll0[] = { 224293d2e97SGeorgi Djakov { P_PXO, 0 }, 225293d2e97SGeorgi Djakov { P_PLL8, 3 }, 226293d2e97SGeorgi Djakov { P_PLL0, 2 } 22724d8fba4SKumar Gala }; 22824d8fba4SKumar Gala 22924d8fba4SKumar Gala static const char *gcc_pxo_pll8_pll0_map[] = { 23024d8fba4SKumar Gala "pxo", 23124d8fba4SKumar Gala "pll8_vote", 232dc1b3f65SAndy Gross "pll0_vote", 23324d8fba4SKumar Gala }; 23424d8fba4SKumar Gala 235*f7b81d67SStephen Boyd static const struct parent_map gcc_pxo_pll8_pll14_pll18_pll0_map[] = { 236*f7b81d67SStephen Boyd { P_PXO, 0 }, 237*f7b81d67SStephen Boyd { P_PLL8, 4 }, 238*f7b81d67SStephen Boyd { P_PLL0, 2 }, 239*f7b81d67SStephen Boyd { P_PLL14, 5 }, 240*f7b81d67SStephen Boyd { P_PLL18, 1 } 241*f7b81d67SStephen Boyd }; 242*f7b81d67SStephen Boyd 243*f7b81d67SStephen Boyd static const char *gcc_pxo_pll8_pll14_pll18_pll0[] = { 244*f7b81d67SStephen Boyd "pxo", 245*f7b81d67SStephen Boyd "pll8_vote", 246*f7b81d67SStephen Boyd "pll0_vote", 247*f7b81d67SStephen Boyd "pll14", 248*f7b81d67SStephen Boyd "pll18", 249*f7b81d67SStephen Boyd }; 250*f7b81d67SStephen Boyd 25124d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_uart[] = { 25224d8fba4SKumar Gala { 1843200, P_PLL8, 2, 6, 625 }, 25324d8fba4SKumar Gala { 3686400, P_PLL8, 2, 12, 625 }, 25424d8fba4SKumar Gala { 7372800, P_PLL8, 2, 24, 625 }, 25524d8fba4SKumar Gala { 14745600, P_PLL8, 2, 48, 625 }, 25624d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 }, 25724d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 25824d8fba4SKumar Gala { 32000000, P_PLL8, 4, 1, 3 }, 25924d8fba4SKumar Gala { 40000000, P_PLL8, 1, 5, 48 }, 26024d8fba4SKumar Gala { 46400000, P_PLL8, 1, 29, 240 }, 26124d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 26224d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 }, 26324d8fba4SKumar Gala { 56000000, P_PLL8, 1, 7, 48 }, 26424d8fba4SKumar Gala { 58982400, P_PLL8, 1, 96, 625 }, 26524d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 }, 26624d8fba4SKumar Gala { } 26724d8fba4SKumar Gala }; 26824d8fba4SKumar Gala 26924d8fba4SKumar Gala static struct clk_rcg gsbi1_uart_src = { 27024d8fba4SKumar Gala .ns_reg = 0x29d4, 27124d8fba4SKumar Gala .md_reg = 0x29d0, 27224d8fba4SKumar Gala .mn = { 27324d8fba4SKumar Gala .mnctr_en_bit = 8, 27424d8fba4SKumar Gala .mnctr_reset_bit = 7, 27524d8fba4SKumar Gala .mnctr_mode_shift = 5, 27624d8fba4SKumar Gala .n_val_shift = 16, 27724d8fba4SKumar Gala .m_val_shift = 16, 27824d8fba4SKumar Gala .width = 16, 27924d8fba4SKumar Gala }, 28024d8fba4SKumar Gala .p = { 28124d8fba4SKumar Gala .pre_div_shift = 3, 28224d8fba4SKumar Gala .pre_div_width = 2, 28324d8fba4SKumar Gala }, 28424d8fba4SKumar Gala .s = { 28524d8fba4SKumar Gala .src_sel_shift = 0, 28624d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 28724d8fba4SKumar Gala }, 28824d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 28924d8fba4SKumar Gala .clkr = { 29024d8fba4SKumar Gala .enable_reg = 0x29d4, 29124d8fba4SKumar Gala .enable_mask = BIT(11), 29224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 29324d8fba4SKumar Gala .name = "gsbi1_uart_src", 29424d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 29524d8fba4SKumar Gala .num_parents = 2, 29624d8fba4SKumar Gala .ops = &clk_rcg_ops, 29724d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 29824d8fba4SKumar Gala }, 29924d8fba4SKumar Gala }, 30024d8fba4SKumar Gala }; 30124d8fba4SKumar Gala 30224d8fba4SKumar Gala static struct clk_branch gsbi1_uart_clk = { 30324d8fba4SKumar Gala .halt_reg = 0x2fcc, 30424d8fba4SKumar Gala .halt_bit = 12, 30524d8fba4SKumar Gala .clkr = { 30624d8fba4SKumar Gala .enable_reg = 0x29d4, 30724d8fba4SKumar Gala .enable_mask = BIT(9), 30824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 30924d8fba4SKumar Gala .name = "gsbi1_uart_clk", 31024d8fba4SKumar Gala .parent_names = (const char *[]){ 31124d8fba4SKumar Gala "gsbi1_uart_src", 31224d8fba4SKumar Gala }, 31324d8fba4SKumar Gala .num_parents = 1, 31424d8fba4SKumar Gala .ops = &clk_branch_ops, 31524d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 31624d8fba4SKumar Gala }, 31724d8fba4SKumar Gala }, 31824d8fba4SKumar Gala }; 31924d8fba4SKumar Gala 32024d8fba4SKumar Gala static struct clk_rcg gsbi2_uart_src = { 32124d8fba4SKumar Gala .ns_reg = 0x29f4, 32224d8fba4SKumar Gala .md_reg = 0x29f0, 32324d8fba4SKumar Gala .mn = { 32424d8fba4SKumar Gala .mnctr_en_bit = 8, 32524d8fba4SKumar Gala .mnctr_reset_bit = 7, 32624d8fba4SKumar Gala .mnctr_mode_shift = 5, 32724d8fba4SKumar Gala .n_val_shift = 16, 32824d8fba4SKumar Gala .m_val_shift = 16, 32924d8fba4SKumar Gala .width = 16, 33024d8fba4SKumar Gala }, 33124d8fba4SKumar Gala .p = { 33224d8fba4SKumar Gala .pre_div_shift = 3, 33324d8fba4SKumar Gala .pre_div_width = 2, 33424d8fba4SKumar Gala }, 33524d8fba4SKumar Gala .s = { 33624d8fba4SKumar Gala .src_sel_shift = 0, 33724d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 33824d8fba4SKumar Gala }, 33924d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 34024d8fba4SKumar Gala .clkr = { 34124d8fba4SKumar Gala .enable_reg = 0x29f4, 34224d8fba4SKumar Gala .enable_mask = BIT(11), 34324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 34424d8fba4SKumar Gala .name = "gsbi2_uart_src", 34524d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 34624d8fba4SKumar Gala .num_parents = 2, 34724d8fba4SKumar Gala .ops = &clk_rcg_ops, 34824d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 34924d8fba4SKumar Gala }, 35024d8fba4SKumar Gala }, 35124d8fba4SKumar Gala }; 35224d8fba4SKumar Gala 35324d8fba4SKumar Gala static struct clk_branch gsbi2_uart_clk = { 35424d8fba4SKumar Gala .halt_reg = 0x2fcc, 35524d8fba4SKumar Gala .halt_bit = 8, 35624d8fba4SKumar Gala .clkr = { 35724d8fba4SKumar Gala .enable_reg = 0x29f4, 35824d8fba4SKumar Gala .enable_mask = BIT(9), 35924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 36024d8fba4SKumar Gala .name = "gsbi2_uart_clk", 36124d8fba4SKumar Gala .parent_names = (const char *[]){ 36224d8fba4SKumar Gala "gsbi2_uart_src", 36324d8fba4SKumar Gala }, 36424d8fba4SKumar Gala .num_parents = 1, 36524d8fba4SKumar Gala .ops = &clk_branch_ops, 36624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 36724d8fba4SKumar Gala }, 36824d8fba4SKumar Gala }, 36924d8fba4SKumar Gala }; 37024d8fba4SKumar Gala 37124d8fba4SKumar Gala static struct clk_rcg gsbi4_uart_src = { 37224d8fba4SKumar Gala .ns_reg = 0x2a34, 37324d8fba4SKumar Gala .md_reg = 0x2a30, 37424d8fba4SKumar Gala .mn = { 37524d8fba4SKumar Gala .mnctr_en_bit = 8, 37624d8fba4SKumar Gala .mnctr_reset_bit = 7, 37724d8fba4SKumar Gala .mnctr_mode_shift = 5, 37824d8fba4SKumar Gala .n_val_shift = 16, 37924d8fba4SKumar Gala .m_val_shift = 16, 38024d8fba4SKumar Gala .width = 16, 38124d8fba4SKumar Gala }, 38224d8fba4SKumar Gala .p = { 38324d8fba4SKumar Gala .pre_div_shift = 3, 38424d8fba4SKumar Gala .pre_div_width = 2, 38524d8fba4SKumar Gala }, 38624d8fba4SKumar Gala .s = { 38724d8fba4SKumar Gala .src_sel_shift = 0, 38824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 38924d8fba4SKumar Gala }, 39024d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 39124d8fba4SKumar Gala .clkr = { 39224d8fba4SKumar Gala .enable_reg = 0x2a34, 39324d8fba4SKumar Gala .enable_mask = BIT(11), 39424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 39524d8fba4SKumar Gala .name = "gsbi4_uart_src", 39624d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 39724d8fba4SKumar Gala .num_parents = 2, 39824d8fba4SKumar Gala .ops = &clk_rcg_ops, 39924d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 40024d8fba4SKumar Gala }, 40124d8fba4SKumar Gala }, 40224d8fba4SKumar Gala }; 40324d8fba4SKumar Gala 40424d8fba4SKumar Gala static struct clk_branch gsbi4_uart_clk = { 40524d8fba4SKumar Gala .halt_reg = 0x2fd0, 40624d8fba4SKumar Gala .halt_bit = 26, 40724d8fba4SKumar Gala .clkr = { 40824d8fba4SKumar Gala .enable_reg = 0x2a34, 40924d8fba4SKumar Gala .enable_mask = BIT(9), 41024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 41124d8fba4SKumar Gala .name = "gsbi4_uart_clk", 41224d8fba4SKumar Gala .parent_names = (const char *[]){ 41324d8fba4SKumar Gala "gsbi4_uart_src", 41424d8fba4SKumar Gala }, 41524d8fba4SKumar Gala .num_parents = 1, 41624d8fba4SKumar Gala .ops = &clk_branch_ops, 41724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 41824d8fba4SKumar Gala }, 41924d8fba4SKumar Gala }, 42024d8fba4SKumar Gala }; 42124d8fba4SKumar Gala 42224d8fba4SKumar Gala static struct clk_rcg gsbi5_uart_src = { 42324d8fba4SKumar Gala .ns_reg = 0x2a54, 42424d8fba4SKumar Gala .md_reg = 0x2a50, 42524d8fba4SKumar Gala .mn = { 42624d8fba4SKumar Gala .mnctr_en_bit = 8, 42724d8fba4SKumar Gala .mnctr_reset_bit = 7, 42824d8fba4SKumar Gala .mnctr_mode_shift = 5, 42924d8fba4SKumar Gala .n_val_shift = 16, 43024d8fba4SKumar Gala .m_val_shift = 16, 43124d8fba4SKumar Gala .width = 16, 43224d8fba4SKumar Gala }, 43324d8fba4SKumar Gala .p = { 43424d8fba4SKumar Gala .pre_div_shift = 3, 43524d8fba4SKumar Gala .pre_div_width = 2, 43624d8fba4SKumar Gala }, 43724d8fba4SKumar Gala .s = { 43824d8fba4SKumar Gala .src_sel_shift = 0, 43924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 44024d8fba4SKumar Gala }, 44124d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 44224d8fba4SKumar Gala .clkr = { 44324d8fba4SKumar Gala .enable_reg = 0x2a54, 44424d8fba4SKumar Gala .enable_mask = BIT(11), 44524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 44624d8fba4SKumar Gala .name = "gsbi5_uart_src", 44724d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 44824d8fba4SKumar Gala .num_parents = 2, 44924d8fba4SKumar Gala .ops = &clk_rcg_ops, 45024d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 45124d8fba4SKumar Gala }, 45224d8fba4SKumar Gala }, 45324d8fba4SKumar Gala }; 45424d8fba4SKumar Gala 45524d8fba4SKumar Gala static struct clk_branch gsbi5_uart_clk = { 45624d8fba4SKumar Gala .halt_reg = 0x2fd0, 45724d8fba4SKumar Gala .halt_bit = 22, 45824d8fba4SKumar Gala .clkr = { 45924d8fba4SKumar Gala .enable_reg = 0x2a54, 46024d8fba4SKumar Gala .enable_mask = BIT(9), 46124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 46224d8fba4SKumar Gala .name = "gsbi5_uart_clk", 46324d8fba4SKumar Gala .parent_names = (const char *[]){ 46424d8fba4SKumar Gala "gsbi5_uart_src", 46524d8fba4SKumar Gala }, 46624d8fba4SKumar Gala .num_parents = 1, 46724d8fba4SKumar Gala .ops = &clk_branch_ops, 46824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 46924d8fba4SKumar Gala }, 47024d8fba4SKumar Gala }, 47124d8fba4SKumar Gala }; 47224d8fba4SKumar Gala 47324d8fba4SKumar Gala static struct clk_rcg gsbi6_uart_src = { 47424d8fba4SKumar Gala .ns_reg = 0x2a74, 47524d8fba4SKumar Gala .md_reg = 0x2a70, 47624d8fba4SKumar Gala .mn = { 47724d8fba4SKumar Gala .mnctr_en_bit = 8, 47824d8fba4SKumar Gala .mnctr_reset_bit = 7, 47924d8fba4SKumar Gala .mnctr_mode_shift = 5, 48024d8fba4SKumar Gala .n_val_shift = 16, 48124d8fba4SKumar Gala .m_val_shift = 16, 48224d8fba4SKumar Gala .width = 16, 48324d8fba4SKumar Gala }, 48424d8fba4SKumar Gala .p = { 48524d8fba4SKumar Gala .pre_div_shift = 3, 48624d8fba4SKumar Gala .pre_div_width = 2, 48724d8fba4SKumar Gala }, 48824d8fba4SKumar Gala .s = { 48924d8fba4SKumar Gala .src_sel_shift = 0, 49024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 49124d8fba4SKumar Gala }, 49224d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 49324d8fba4SKumar Gala .clkr = { 49424d8fba4SKumar Gala .enable_reg = 0x2a74, 49524d8fba4SKumar Gala .enable_mask = BIT(11), 49624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 49724d8fba4SKumar Gala .name = "gsbi6_uart_src", 49824d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 49924d8fba4SKumar Gala .num_parents = 2, 50024d8fba4SKumar Gala .ops = &clk_rcg_ops, 50124d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 50224d8fba4SKumar Gala }, 50324d8fba4SKumar Gala }, 50424d8fba4SKumar Gala }; 50524d8fba4SKumar Gala 50624d8fba4SKumar Gala static struct clk_branch gsbi6_uart_clk = { 50724d8fba4SKumar Gala .halt_reg = 0x2fd0, 50824d8fba4SKumar Gala .halt_bit = 18, 50924d8fba4SKumar Gala .clkr = { 51024d8fba4SKumar Gala .enable_reg = 0x2a74, 51124d8fba4SKumar Gala .enable_mask = BIT(9), 51224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 51324d8fba4SKumar Gala .name = "gsbi6_uart_clk", 51424d8fba4SKumar Gala .parent_names = (const char *[]){ 51524d8fba4SKumar Gala "gsbi6_uart_src", 51624d8fba4SKumar Gala }, 51724d8fba4SKumar Gala .num_parents = 1, 51824d8fba4SKumar Gala .ops = &clk_branch_ops, 51924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 52024d8fba4SKumar Gala }, 52124d8fba4SKumar Gala }, 52224d8fba4SKumar Gala }; 52324d8fba4SKumar Gala 52424d8fba4SKumar Gala static struct clk_rcg gsbi7_uart_src = { 52524d8fba4SKumar Gala .ns_reg = 0x2a94, 52624d8fba4SKumar Gala .md_reg = 0x2a90, 52724d8fba4SKumar Gala .mn = { 52824d8fba4SKumar Gala .mnctr_en_bit = 8, 52924d8fba4SKumar Gala .mnctr_reset_bit = 7, 53024d8fba4SKumar Gala .mnctr_mode_shift = 5, 53124d8fba4SKumar Gala .n_val_shift = 16, 53224d8fba4SKumar Gala .m_val_shift = 16, 53324d8fba4SKumar Gala .width = 16, 53424d8fba4SKumar Gala }, 53524d8fba4SKumar Gala .p = { 53624d8fba4SKumar Gala .pre_div_shift = 3, 53724d8fba4SKumar Gala .pre_div_width = 2, 53824d8fba4SKumar Gala }, 53924d8fba4SKumar Gala .s = { 54024d8fba4SKumar Gala .src_sel_shift = 0, 54124d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 54224d8fba4SKumar Gala }, 54324d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 54424d8fba4SKumar Gala .clkr = { 54524d8fba4SKumar Gala .enable_reg = 0x2a94, 54624d8fba4SKumar Gala .enable_mask = BIT(11), 54724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 54824d8fba4SKumar Gala .name = "gsbi7_uart_src", 54924d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 55024d8fba4SKumar Gala .num_parents = 2, 55124d8fba4SKumar Gala .ops = &clk_rcg_ops, 55224d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 55324d8fba4SKumar Gala }, 55424d8fba4SKumar Gala }, 55524d8fba4SKumar Gala }; 55624d8fba4SKumar Gala 55724d8fba4SKumar Gala static struct clk_branch gsbi7_uart_clk = { 55824d8fba4SKumar Gala .halt_reg = 0x2fd0, 55924d8fba4SKumar Gala .halt_bit = 14, 56024d8fba4SKumar Gala .clkr = { 56124d8fba4SKumar Gala .enable_reg = 0x2a94, 56224d8fba4SKumar Gala .enable_mask = BIT(9), 56324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 56424d8fba4SKumar Gala .name = "gsbi7_uart_clk", 56524d8fba4SKumar Gala .parent_names = (const char *[]){ 56624d8fba4SKumar Gala "gsbi7_uart_src", 56724d8fba4SKumar Gala }, 56824d8fba4SKumar Gala .num_parents = 1, 56924d8fba4SKumar Gala .ops = &clk_branch_ops, 57024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 57124d8fba4SKumar Gala }, 57224d8fba4SKumar Gala }, 57324d8fba4SKumar Gala }; 57424d8fba4SKumar Gala 57524d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_qup[] = { 57624d8fba4SKumar Gala { 1100000, P_PXO, 1, 2, 49 }, 57724d8fba4SKumar Gala { 5400000, P_PXO, 1, 1, 5 }, 57824d8fba4SKumar Gala { 10800000, P_PXO, 1, 2, 5 }, 57924d8fba4SKumar Gala { 15060000, P_PLL8, 1, 2, 51 }, 58024d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 5810bf0ff82SStephen Boyd { 25000000, P_PXO, 1, 0, 0 }, 58224d8fba4SKumar Gala { 25600000, P_PLL8, 1, 1, 15 }, 58324d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 58424d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 }, 58524d8fba4SKumar Gala { } 58624d8fba4SKumar Gala }; 58724d8fba4SKumar Gala 58824d8fba4SKumar Gala static struct clk_rcg gsbi1_qup_src = { 58924d8fba4SKumar Gala .ns_reg = 0x29cc, 59024d8fba4SKumar Gala .md_reg = 0x29c8, 59124d8fba4SKumar Gala .mn = { 59224d8fba4SKumar Gala .mnctr_en_bit = 8, 59324d8fba4SKumar Gala .mnctr_reset_bit = 7, 59424d8fba4SKumar Gala .mnctr_mode_shift = 5, 59524d8fba4SKumar Gala .n_val_shift = 16, 59624d8fba4SKumar Gala .m_val_shift = 16, 59724d8fba4SKumar Gala .width = 8, 59824d8fba4SKumar Gala }, 59924d8fba4SKumar Gala .p = { 60024d8fba4SKumar Gala .pre_div_shift = 3, 60124d8fba4SKumar Gala .pre_div_width = 2, 60224d8fba4SKumar Gala }, 60324d8fba4SKumar Gala .s = { 60424d8fba4SKumar Gala .src_sel_shift = 0, 60524d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 60624d8fba4SKumar Gala }, 60724d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 60824d8fba4SKumar Gala .clkr = { 60924d8fba4SKumar Gala .enable_reg = 0x29cc, 61024d8fba4SKumar Gala .enable_mask = BIT(11), 61124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 61224d8fba4SKumar Gala .name = "gsbi1_qup_src", 61324d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 61424d8fba4SKumar Gala .num_parents = 2, 61524d8fba4SKumar Gala .ops = &clk_rcg_ops, 61624d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 61724d8fba4SKumar Gala }, 61824d8fba4SKumar Gala }, 61924d8fba4SKumar Gala }; 62024d8fba4SKumar Gala 62124d8fba4SKumar Gala static struct clk_branch gsbi1_qup_clk = { 62224d8fba4SKumar Gala .halt_reg = 0x2fcc, 62324d8fba4SKumar Gala .halt_bit = 11, 62424d8fba4SKumar Gala .clkr = { 62524d8fba4SKumar Gala .enable_reg = 0x29cc, 62624d8fba4SKumar Gala .enable_mask = BIT(9), 62724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 62824d8fba4SKumar Gala .name = "gsbi1_qup_clk", 62924d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi1_qup_src" }, 63024d8fba4SKumar Gala .num_parents = 1, 63124d8fba4SKumar Gala .ops = &clk_branch_ops, 63224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 63324d8fba4SKumar Gala }, 63424d8fba4SKumar Gala }, 63524d8fba4SKumar Gala }; 63624d8fba4SKumar Gala 63724d8fba4SKumar Gala static struct clk_rcg gsbi2_qup_src = { 63824d8fba4SKumar Gala .ns_reg = 0x29ec, 63924d8fba4SKumar Gala .md_reg = 0x29e8, 64024d8fba4SKumar Gala .mn = { 64124d8fba4SKumar Gala .mnctr_en_bit = 8, 64224d8fba4SKumar Gala .mnctr_reset_bit = 7, 64324d8fba4SKumar Gala .mnctr_mode_shift = 5, 64424d8fba4SKumar Gala .n_val_shift = 16, 64524d8fba4SKumar Gala .m_val_shift = 16, 64624d8fba4SKumar Gala .width = 8, 64724d8fba4SKumar Gala }, 64824d8fba4SKumar Gala .p = { 64924d8fba4SKumar Gala .pre_div_shift = 3, 65024d8fba4SKumar Gala .pre_div_width = 2, 65124d8fba4SKumar Gala }, 65224d8fba4SKumar Gala .s = { 65324d8fba4SKumar Gala .src_sel_shift = 0, 65424d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 65524d8fba4SKumar Gala }, 65624d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 65724d8fba4SKumar Gala .clkr = { 65824d8fba4SKumar Gala .enable_reg = 0x29ec, 65924d8fba4SKumar Gala .enable_mask = BIT(11), 66024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 66124d8fba4SKumar Gala .name = "gsbi2_qup_src", 66224d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 66324d8fba4SKumar Gala .num_parents = 2, 66424d8fba4SKumar Gala .ops = &clk_rcg_ops, 66524d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 66624d8fba4SKumar Gala }, 66724d8fba4SKumar Gala }, 66824d8fba4SKumar Gala }; 66924d8fba4SKumar Gala 67024d8fba4SKumar Gala static struct clk_branch gsbi2_qup_clk = { 67124d8fba4SKumar Gala .halt_reg = 0x2fcc, 67224d8fba4SKumar Gala .halt_bit = 6, 67324d8fba4SKumar Gala .clkr = { 67424d8fba4SKumar Gala .enable_reg = 0x29ec, 67524d8fba4SKumar Gala .enable_mask = BIT(9), 67624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 67724d8fba4SKumar Gala .name = "gsbi2_qup_clk", 67824d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi2_qup_src" }, 67924d8fba4SKumar Gala .num_parents = 1, 68024d8fba4SKumar Gala .ops = &clk_branch_ops, 68124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 68224d8fba4SKumar Gala }, 68324d8fba4SKumar Gala }, 68424d8fba4SKumar Gala }; 68524d8fba4SKumar Gala 68624d8fba4SKumar Gala static struct clk_rcg gsbi4_qup_src = { 68724d8fba4SKumar Gala .ns_reg = 0x2a2c, 68824d8fba4SKumar Gala .md_reg = 0x2a28, 68924d8fba4SKumar Gala .mn = { 69024d8fba4SKumar Gala .mnctr_en_bit = 8, 69124d8fba4SKumar Gala .mnctr_reset_bit = 7, 69224d8fba4SKumar Gala .mnctr_mode_shift = 5, 69324d8fba4SKumar Gala .n_val_shift = 16, 69424d8fba4SKumar Gala .m_val_shift = 16, 69524d8fba4SKumar Gala .width = 8, 69624d8fba4SKumar Gala }, 69724d8fba4SKumar Gala .p = { 69824d8fba4SKumar Gala .pre_div_shift = 3, 69924d8fba4SKumar Gala .pre_div_width = 2, 70024d8fba4SKumar Gala }, 70124d8fba4SKumar Gala .s = { 70224d8fba4SKumar Gala .src_sel_shift = 0, 70324d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 70424d8fba4SKumar Gala }, 70524d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 70624d8fba4SKumar Gala .clkr = { 70724d8fba4SKumar Gala .enable_reg = 0x2a2c, 70824d8fba4SKumar Gala .enable_mask = BIT(11), 70924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 71024d8fba4SKumar Gala .name = "gsbi4_qup_src", 71124d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 71224d8fba4SKumar Gala .num_parents = 2, 71324d8fba4SKumar Gala .ops = &clk_rcg_ops, 71424d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 71524d8fba4SKumar Gala }, 71624d8fba4SKumar Gala }, 71724d8fba4SKumar Gala }; 71824d8fba4SKumar Gala 71924d8fba4SKumar Gala static struct clk_branch gsbi4_qup_clk = { 72024d8fba4SKumar Gala .halt_reg = 0x2fd0, 72124d8fba4SKumar Gala .halt_bit = 24, 72224d8fba4SKumar Gala .clkr = { 72324d8fba4SKumar Gala .enable_reg = 0x2a2c, 72424d8fba4SKumar Gala .enable_mask = BIT(9), 72524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 72624d8fba4SKumar Gala .name = "gsbi4_qup_clk", 72724d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi4_qup_src" }, 72824d8fba4SKumar Gala .num_parents = 1, 72924d8fba4SKumar Gala .ops = &clk_branch_ops, 73024d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 73124d8fba4SKumar Gala }, 73224d8fba4SKumar Gala }, 73324d8fba4SKumar Gala }; 73424d8fba4SKumar Gala 73524d8fba4SKumar Gala static struct clk_rcg gsbi5_qup_src = { 73624d8fba4SKumar Gala .ns_reg = 0x2a4c, 73724d8fba4SKumar Gala .md_reg = 0x2a48, 73824d8fba4SKumar Gala .mn = { 73924d8fba4SKumar Gala .mnctr_en_bit = 8, 74024d8fba4SKumar Gala .mnctr_reset_bit = 7, 74124d8fba4SKumar Gala .mnctr_mode_shift = 5, 74224d8fba4SKumar Gala .n_val_shift = 16, 74324d8fba4SKumar Gala .m_val_shift = 16, 74424d8fba4SKumar Gala .width = 8, 74524d8fba4SKumar Gala }, 74624d8fba4SKumar Gala .p = { 74724d8fba4SKumar Gala .pre_div_shift = 3, 74824d8fba4SKumar Gala .pre_div_width = 2, 74924d8fba4SKumar Gala }, 75024d8fba4SKumar Gala .s = { 75124d8fba4SKumar Gala .src_sel_shift = 0, 75224d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 75324d8fba4SKumar Gala }, 75424d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 75524d8fba4SKumar Gala .clkr = { 75624d8fba4SKumar Gala .enable_reg = 0x2a4c, 75724d8fba4SKumar Gala .enable_mask = BIT(11), 75824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 75924d8fba4SKumar Gala .name = "gsbi5_qup_src", 76024d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 76124d8fba4SKumar Gala .num_parents = 2, 76224d8fba4SKumar Gala .ops = &clk_rcg_ops, 76324d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 76424d8fba4SKumar Gala }, 76524d8fba4SKumar Gala }, 76624d8fba4SKumar Gala }; 76724d8fba4SKumar Gala 76824d8fba4SKumar Gala static struct clk_branch gsbi5_qup_clk = { 76924d8fba4SKumar Gala .halt_reg = 0x2fd0, 77024d8fba4SKumar Gala .halt_bit = 20, 77124d8fba4SKumar Gala .clkr = { 77224d8fba4SKumar Gala .enable_reg = 0x2a4c, 77324d8fba4SKumar Gala .enable_mask = BIT(9), 77424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 77524d8fba4SKumar Gala .name = "gsbi5_qup_clk", 77624d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi5_qup_src" }, 77724d8fba4SKumar Gala .num_parents = 1, 77824d8fba4SKumar Gala .ops = &clk_branch_ops, 77924d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 78024d8fba4SKumar Gala }, 78124d8fba4SKumar Gala }, 78224d8fba4SKumar Gala }; 78324d8fba4SKumar Gala 78424d8fba4SKumar Gala static struct clk_rcg gsbi6_qup_src = { 78524d8fba4SKumar Gala .ns_reg = 0x2a6c, 78624d8fba4SKumar Gala .md_reg = 0x2a68, 78724d8fba4SKumar Gala .mn = { 78824d8fba4SKumar Gala .mnctr_en_bit = 8, 78924d8fba4SKumar Gala .mnctr_reset_bit = 7, 79024d8fba4SKumar Gala .mnctr_mode_shift = 5, 79124d8fba4SKumar Gala .n_val_shift = 16, 79224d8fba4SKumar Gala .m_val_shift = 16, 79324d8fba4SKumar Gala .width = 8, 79424d8fba4SKumar Gala }, 79524d8fba4SKumar Gala .p = { 79624d8fba4SKumar Gala .pre_div_shift = 3, 79724d8fba4SKumar Gala .pre_div_width = 2, 79824d8fba4SKumar Gala }, 79924d8fba4SKumar Gala .s = { 80024d8fba4SKumar Gala .src_sel_shift = 0, 80124d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 80224d8fba4SKumar Gala }, 80324d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 80424d8fba4SKumar Gala .clkr = { 80524d8fba4SKumar Gala .enable_reg = 0x2a6c, 80624d8fba4SKumar Gala .enable_mask = BIT(11), 80724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 80824d8fba4SKumar Gala .name = "gsbi6_qup_src", 80924d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 81024d8fba4SKumar Gala .num_parents = 2, 81124d8fba4SKumar Gala .ops = &clk_rcg_ops, 81224d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 81324d8fba4SKumar Gala }, 81424d8fba4SKumar Gala }, 81524d8fba4SKumar Gala }; 81624d8fba4SKumar Gala 81724d8fba4SKumar Gala static struct clk_branch gsbi6_qup_clk = { 81824d8fba4SKumar Gala .halt_reg = 0x2fd0, 81924d8fba4SKumar Gala .halt_bit = 16, 82024d8fba4SKumar Gala .clkr = { 82124d8fba4SKumar Gala .enable_reg = 0x2a6c, 82224d8fba4SKumar Gala .enable_mask = BIT(9), 82324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 82424d8fba4SKumar Gala .name = "gsbi6_qup_clk", 82524d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi6_qup_src" }, 82624d8fba4SKumar Gala .num_parents = 1, 82724d8fba4SKumar Gala .ops = &clk_branch_ops, 82824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 82924d8fba4SKumar Gala }, 83024d8fba4SKumar Gala }, 83124d8fba4SKumar Gala }; 83224d8fba4SKumar Gala 83324d8fba4SKumar Gala static struct clk_rcg gsbi7_qup_src = { 83424d8fba4SKumar Gala .ns_reg = 0x2a8c, 83524d8fba4SKumar Gala .md_reg = 0x2a88, 83624d8fba4SKumar Gala .mn = { 83724d8fba4SKumar Gala .mnctr_en_bit = 8, 83824d8fba4SKumar Gala .mnctr_reset_bit = 7, 83924d8fba4SKumar Gala .mnctr_mode_shift = 5, 84024d8fba4SKumar Gala .n_val_shift = 16, 84124d8fba4SKumar Gala .m_val_shift = 16, 84224d8fba4SKumar Gala .width = 8, 84324d8fba4SKumar Gala }, 84424d8fba4SKumar Gala .p = { 84524d8fba4SKumar Gala .pre_div_shift = 3, 84624d8fba4SKumar Gala .pre_div_width = 2, 84724d8fba4SKumar Gala }, 84824d8fba4SKumar Gala .s = { 84924d8fba4SKumar Gala .src_sel_shift = 0, 85024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 85124d8fba4SKumar Gala }, 85224d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 85324d8fba4SKumar Gala .clkr = { 85424d8fba4SKumar Gala .enable_reg = 0x2a8c, 85524d8fba4SKumar Gala .enable_mask = BIT(11), 85624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 85724d8fba4SKumar Gala .name = "gsbi7_qup_src", 85824d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 85924d8fba4SKumar Gala .num_parents = 2, 86024d8fba4SKumar Gala .ops = &clk_rcg_ops, 86124d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 86224d8fba4SKumar Gala }, 86324d8fba4SKumar Gala }, 86424d8fba4SKumar Gala }; 86524d8fba4SKumar Gala 86624d8fba4SKumar Gala static struct clk_branch gsbi7_qup_clk = { 86724d8fba4SKumar Gala .halt_reg = 0x2fd0, 86824d8fba4SKumar Gala .halt_bit = 12, 86924d8fba4SKumar Gala .clkr = { 87024d8fba4SKumar Gala .enable_reg = 0x2a8c, 87124d8fba4SKumar Gala .enable_mask = BIT(9), 87224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 87324d8fba4SKumar Gala .name = "gsbi7_qup_clk", 87424d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi7_qup_src" }, 87524d8fba4SKumar Gala .num_parents = 1, 87624d8fba4SKumar Gala .ops = &clk_branch_ops, 87724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 87824d8fba4SKumar Gala }, 87924d8fba4SKumar Gala }, 88024d8fba4SKumar Gala }; 88124d8fba4SKumar Gala 88224d8fba4SKumar Gala static struct clk_branch gsbi1_h_clk = { 88324d8fba4SKumar Gala .hwcg_reg = 0x29c0, 88424d8fba4SKumar Gala .hwcg_bit = 6, 88524d8fba4SKumar Gala .halt_reg = 0x2fcc, 88624d8fba4SKumar Gala .halt_bit = 13, 88724d8fba4SKumar Gala .clkr = { 88824d8fba4SKumar Gala .enable_reg = 0x29c0, 88924d8fba4SKumar Gala .enable_mask = BIT(4), 89024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 89124d8fba4SKumar Gala .name = "gsbi1_h_clk", 89224d8fba4SKumar Gala .ops = &clk_branch_ops, 89324d8fba4SKumar Gala .flags = CLK_IS_ROOT, 89424d8fba4SKumar Gala }, 89524d8fba4SKumar Gala }, 89624d8fba4SKumar Gala }; 89724d8fba4SKumar Gala 89824d8fba4SKumar Gala static struct clk_branch gsbi2_h_clk = { 89924d8fba4SKumar Gala .hwcg_reg = 0x29e0, 90024d8fba4SKumar Gala .hwcg_bit = 6, 90124d8fba4SKumar Gala .halt_reg = 0x2fcc, 90224d8fba4SKumar Gala .halt_bit = 9, 90324d8fba4SKumar Gala .clkr = { 90424d8fba4SKumar Gala .enable_reg = 0x29e0, 90524d8fba4SKumar Gala .enable_mask = BIT(4), 90624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 90724d8fba4SKumar Gala .name = "gsbi2_h_clk", 90824d8fba4SKumar Gala .ops = &clk_branch_ops, 90924d8fba4SKumar Gala .flags = CLK_IS_ROOT, 91024d8fba4SKumar Gala }, 91124d8fba4SKumar Gala }, 91224d8fba4SKumar Gala }; 91324d8fba4SKumar Gala 91424d8fba4SKumar Gala static struct clk_branch gsbi4_h_clk = { 91524d8fba4SKumar Gala .hwcg_reg = 0x2a20, 91624d8fba4SKumar Gala .hwcg_bit = 6, 91724d8fba4SKumar Gala .halt_reg = 0x2fd0, 91824d8fba4SKumar Gala .halt_bit = 27, 91924d8fba4SKumar Gala .clkr = { 92024d8fba4SKumar Gala .enable_reg = 0x2a20, 92124d8fba4SKumar Gala .enable_mask = BIT(4), 92224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 92324d8fba4SKumar Gala .name = "gsbi4_h_clk", 92424d8fba4SKumar Gala .ops = &clk_branch_ops, 92524d8fba4SKumar Gala .flags = CLK_IS_ROOT, 92624d8fba4SKumar Gala }, 92724d8fba4SKumar Gala }, 92824d8fba4SKumar Gala }; 92924d8fba4SKumar Gala 93024d8fba4SKumar Gala static struct clk_branch gsbi5_h_clk = { 93124d8fba4SKumar Gala .hwcg_reg = 0x2a40, 93224d8fba4SKumar Gala .hwcg_bit = 6, 93324d8fba4SKumar Gala .halt_reg = 0x2fd0, 93424d8fba4SKumar Gala .halt_bit = 23, 93524d8fba4SKumar Gala .clkr = { 93624d8fba4SKumar Gala .enable_reg = 0x2a40, 93724d8fba4SKumar Gala .enable_mask = BIT(4), 93824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 93924d8fba4SKumar Gala .name = "gsbi5_h_clk", 94024d8fba4SKumar Gala .ops = &clk_branch_ops, 94124d8fba4SKumar Gala .flags = CLK_IS_ROOT, 94224d8fba4SKumar Gala }, 94324d8fba4SKumar Gala }, 94424d8fba4SKumar Gala }; 94524d8fba4SKumar Gala 94624d8fba4SKumar Gala static struct clk_branch gsbi6_h_clk = { 94724d8fba4SKumar Gala .hwcg_reg = 0x2a60, 94824d8fba4SKumar Gala .hwcg_bit = 6, 94924d8fba4SKumar Gala .halt_reg = 0x2fd0, 95024d8fba4SKumar Gala .halt_bit = 19, 95124d8fba4SKumar Gala .clkr = { 95224d8fba4SKumar Gala .enable_reg = 0x2a60, 95324d8fba4SKumar Gala .enable_mask = BIT(4), 95424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 95524d8fba4SKumar Gala .name = "gsbi6_h_clk", 95624d8fba4SKumar Gala .ops = &clk_branch_ops, 95724d8fba4SKumar Gala .flags = CLK_IS_ROOT, 95824d8fba4SKumar Gala }, 95924d8fba4SKumar Gala }, 96024d8fba4SKumar Gala }; 96124d8fba4SKumar Gala 96224d8fba4SKumar Gala static struct clk_branch gsbi7_h_clk = { 96324d8fba4SKumar Gala .hwcg_reg = 0x2a80, 96424d8fba4SKumar Gala .hwcg_bit = 6, 96524d8fba4SKumar Gala .halt_reg = 0x2fd0, 96624d8fba4SKumar Gala .halt_bit = 15, 96724d8fba4SKumar Gala .clkr = { 96824d8fba4SKumar Gala .enable_reg = 0x2a80, 96924d8fba4SKumar Gala .enable_mask = BIT(4), 97024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 97124d8fba4SKumar Gala .name = "gsbi7_h_clk", 97224d8fba4SKumar Gala .ops = &clk_branch_ops, 97324d8fba4SKumar Gala .flags = CLK_IS_ROOT, 97424d8fba4SKumar Gala }, 97524d8fba4SKumar Gala }, 97624d8fba4SKumar Gala }; 97724d8fba4SKumar Gala 97824d8fba4SKumar Gala static const struct freq_tbl clk_tbl_gp[] = { 97924d8fba4SKumar Gala { 12500000, P_PXO, 2, 0, 0 }, 98024d8fba4SKumar Gala { 25000000, P_PXO, 1, 0, 0 }, 98124d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 }, 98224d8fba4SKumar Gala { 76800000, P_PLL8, 1, 1, 5 }, 98324d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 }, 98424d8fba4SKumar Gala { 128000000, P_PLL8, 3, 0, 0 }, 98524d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 }, 98624d8fba4SKumar Gala { } 98724d8fba4SKumar Gala }; 98824d8fba4SKumar Gala 98924d8fba4SKumar Gala static struct clk_rcg gp0_src = { 99024d8fba4SKumar Gala .ns_reg = 0x2d24, 99124d8fba4SKumar Gala .md_reg = 0x2d00, 99224d8fba4SKumar Gala .mn = { 99324d8fba4SKumar Gala .mnctr_en_bit = 8, 99424d8fba4SKumar Gala .mnctr_reset_bit = 7, 99524d8fba4SKumar Gala .mnctr_mode_shift = 5, 99624d8fba4SKumar Gala .n_val_shift = 16, 99724d8fba4SKumar Gala .m_val_shift = 16, 99824d8fba4SKumar Gala .width = 8, 99924d8fba4SKumar Gala }, 100024d8fba4SKumar Gala .p = { 100124d8fba4SKumar Gala .pre_div_shift = 3, 100224d8fba4SKumar Gala .pre_div_width = 2, 100324d8fba4SKumar Gala }, 100424d8fba4SKumar Gala .s = { 100524d8fba4SKumar Gala .src_sel_shift = 0, 100624d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 100724d8fba4SKumar Gala }, 100824d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 100924d8fba4SKumar Gala .clkr = { 101024d8fba4SKumar Gala .enable_reg = 0x2d24, 101124d8fba4SKumar Gala .enable_mask = BIT(11), 101224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 101324d8fba4SKumar Gala .name = "gp0_src", 101424d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_cxo, 101524d8fba4SKumar Gala .num_parents = 3, 101624d8fba4SKumar Gala .ops = &clk_rcg_ops, 101724d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 101824d8fba4SKumar Gala }, 101924d8fba4SKumar Gala } 102024d8fba4SKumar Gala }; 102124d8fba4SKumar Gala 102224d8fba4SKumar Gala static struct clk_branch gp0_clk = { 102324d8fba4SKumar Gala .halt_reg = 0x2fd8, 102424d8fba4SKumar Gala .halt_bit = 7, 102524d8fba4SKumar Gala .clkr = { 102624d8fba4SKumar Gala .enable_reg = 0x2d24, 102724d8fba4SKumar Gala .enable_mask = BIT(9), 102824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 102924d8fba4SKumar Gala .name = "gp0_clk", 103024d8fba4SKumar Gala .parent_names = (const char *[]){ "gp0_src" }, 103124d8fba4SKumar Gala .num_parents = 1, 103224d8fba4SKumar Gala .ops = &clk_branch_ops, 103324d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 103424d8fba4SKumar Gala }, 103524d8fba4SKumar Gala }, 103624d8fba4SKumar Gala }; 103724d8fba4SKumar Gala 103824d8fba4SKumar Gala static struct clk_rcg gp1_src = { 103924d8fba4SKumar Gala .ns_reg = 0x2d44, 104024d8fba4SKumar Gala .md_reg = 0x2d40, 104124d8fba4SKumar Gala .mn = { 104224d8fba4SKumar Gala .mnctr_en_bit = 8, 104324d8fba4SKumar Gala .mnctr_reset_bit = 7, 104424d8fba4SKumar Gala .mnctr_mode_shift = 5, 104524d8fba4SKumar Gala .n_val_shift = 16, 104624d8fba4SKumar Gala .m_val_shift = 16, 104724d8fba4SKumar Gala .width = 8, 104824d8fba4SKumar Gala }, 104924d8fba4SKumar Gala .p = { 105024d8fba4SKumar Gala .pre_div_shift = 3, 105124d8fba4SKumar Gala .pre_div_width = 2, 105224d8fba4SKumar Gala }, 105324d8fba4SKumar Gala .s = { 105424d8fba4SKumar Gala .src_sel_shift = 0, 105524d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 105624d8fba4SKumar Gala }, 105724d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 105824d8fba4SKumar Gala .clkr = { 105924d8fba4SKumar Gala .enable_reg = 0x2d44, 106024d8fba4SKumar Gala .enable_mask = BIT(11), 106124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 106224d8fba4SKumar Gala .name = "gp1_src", 106324d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_cxo, 106424d8fba4SKumar Gala .num_parents = 3, 106524d8fba4SKumar Gala .ops = &clk_rcg_ops, 106624d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 106724d8fba4SKumar Gala }, 106824d8fba4SKumar Gala } 106924d8fba4SKumar Gala }; 107024d8fba4SKumar Gala 107124d8fba4SKumar Gala static struct clk_branch gp1_clk = { 107224d8fba4SKumar Gala .halt_reg = 0x2fd8, 107324d8fba4SKumar Gala .halt_bit = 6, 107424d8fba4SKumar Gala .clkr = { 107524d8fba4SKumar Gala .enable_reg = 0x2d44, 107624d8fba4SKumar Gala .enable_mask = BIT(9), 107724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 107824d8fba4SKumar Gala .name = "gp1_clk", 107924d8fba4SKumar Gala .parent_names = (const char *[]){ "gp1_src" }, 108024d8fba4SKumar Gala .num_parents = 1, 108124d8fba4SKumar Gala .ops = &clk_branch_ops, 108224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 108324d8fba4SKumar Gala }, 108424d8fba4SKumar Gala }, 108524d8fba4SKumar Gala }; 108624d8fba4SKumar Gala 108724d8fba4SKumar Gala static struct clk_rcg gp2_src = { 108824d8fba4SKumar Gala .ns_reg = 0x2d64, 108924d8fba4SKumar Gala .md_reg = 0x2d60, 109024d8fba4SKumar Gala .mn = { 109124d8fba4SKumar Gala .mnctr_en_bit = 8, 109224d8fba4SKumar Gala .mnctr_reset_bit = 7, 109324d8fba4SKumar Gala .mnctr_mode_shift = 5, 109424d8fba4SKumar Gala .n_val_shift = 16, 109524d8fba4SKumar Gala .m_val_shift = 16, 109624d8fba4SKumar Gala .width = 8, 109724d8fba4SKumar Gala }, 109824d8fba4SKumar Gala .p = { 109924d8fba4SKumar Gala .pre_div_shift = 3, 110024d8fba4SKumar Gala .pre_div_width = 2, 110124d8fba4SKumar Gala }, 110224d8fba4SKumar Gala .s = { 110324d8fba4SKumar Gala .src_sel_shift = 0, 110424d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 110524d8fba4SKumar Gala }, 110624d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 110724d8fba4SKumar Gala .clkr = { 110824d8fba4SKumar Gala .enable_reg = 0x2d64, 110924d8fba4SKumar Gala .enable_mask = BIT(11), 111024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 111124d8fba4SKumar Gala .name = "gp2_src", 111224d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_cxo, 111324d8fba4SKumar Gala .num_parents = 3, 111424d8fba4SKumar Gala .ops = &clk_rcg_ops, 111524d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 111624d8fba4SKumar Gala }, 111724d8fba4SKumar Gala } 111824d8fba4SKumar Gala }; 111924d8fba4SKumar Gala 112024d8fba4SKumar Gala static struct clk_branch gp2_clk = { 112124d8fba4SKumar Gala .halt_reg = 0x2fd8, 112224d8fba4SKumar Gala .halt_bit = 5, 112324d8fba4SKumar Gala .clkr = { 112424d8fba4SKumar Gala .enable_reg = 0x2d64, 112524d8fba4SKumar Gala .enable_mask = BIT(9), 112624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 112724d8fba4SKumar Gala .name = "gp2_clk", 112824d8fba4SKumar Gala .parent_names = (const char *[]){ "gp2_src" }, 112924d8fba4SKumar Gala .num_parents = 1, 113024d8fba4SKumar Gala .ops = &clk_branch_ops, 113124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 113224d8fba4SKumar Gala }, 113324d8fba4SKumar Gala }, 113424d8fba4SKumar Gala }; 113524d8fba4SKumar Gala 113624d8fba4SKumar Gala static struct clk_branch pmem_clk = { 113724d8fba4SKumar Gala .hwcg_reg = 0x25a0, 113824d8fba4SKumar Gala .hwcg_bit = 6, 113924d8fba4SKumar Gala .halt_reg = 0x2fc8, 114024d8fba4SKumar Gala .halt_bit = 20, 114124d8fba4SKumar Gala .clkr = { 114224d8fba4SKumar Gala .enable_reg = 0x25a0, 114324d8fba4SKumar Gala .enable_mask = BIT(4), 114424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 114524d8fba4SKumar Gala .name = "pmem_clk", 114624d8fba4SKumar Gala .ops = &clk_branch_ops, 114724d8fba4SKumar Gala .flags = CLK_IS_ROOT, 114824d8fba4SKumar Gala }, 114924d8fba4SKumar Gala }, 115024d8fba4SKumar Gala }; 115124d8fba4SKumar Gala 115224d8fba4SKumar Gala static struct clk_rcg prng_src = { 115324d8fba4SKumar Gala .ns_reg = 0x2e80, 115424d8fba4SKumar Gala .p = { 115524d8fba4SKumar Gala .pre_div_shift = 3, 115624d8fba4SKumar Gala .pre_div_width = 4, 115724d8fba4SKumar Gala }, 115824d8fba4SKumar Gala .s = { 115924d8fba4SKumar Gala .src_sel_shift = 0, 116024d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 116124d8fba4SKumar Gala }, 116224d8fba4SKumar Gala .clkr = { 116324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 116424d8fba4SKumar Gala .name = "prng_src", 116524d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 116624d8fba4SKumar Gala .num_parents = 2, 116724d8fba4SKumar Gala .ops = &clk_rcg_ops, 116824d8fba4SKumar Gala }, 116924d8fba4SKumar Gala }, 117024d8fba4SKumar Gala }; 117124d8fba4SKumar Gala 117224d8fba4SKumar Gala static struct clk_branch prng_clk = { 117324d8fba4SKumar Gala .halt_reg = 0x2fd8, 117424d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 117524d8fba4SKumar Gala .halt_bit = 10, 117624d8fba4SKumar Gala .clkr = { 117724d8fba4SKumar Gala .enable_reg = 0x3080, 117824d8fba4SKumar Gala .enable_mask = BIT(10), 117924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 118024d8fba4SKumar Gala .name = "prng_clk", 118124d8fba4SKumar Gala .parent_names = (const char *[]){ "prng_src" }, 118224d8fba4SKumar Gala .num_parents = 1, 118324d8fba4SKumar Gala .ops = &clk_branch_ops, 118424d8fba4SKumar Gala }, 118524d8fba4SKumar Gala }, 118624d8fba4SKumar Gala }; 118724d8fba4SKumar Gala 118824d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sdc[] = { 1189d8210e28SStephen Boyd { 200000, P_PXO, 2, 2, 125 }, 119024d8fba4SKumar Gala { 400000, P_PLL8, 4, 1, 240 }, 119124d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 }, 119224d8fba4SKumar Gala { 17070000, P_PLL8, 1, 2, 45 }, 119324d8fba4SKumar Gala { 20210000, P_PLL8, 1, 1, 19 }, 119424d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 119524d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 119624d8fba4SKumar Gala { 64000000, P_PLL8, 3, 1, 2 }, 119724d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 }, 119824d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 }, 119924d8fba4SKumar Gala { } 120024d8fba4SKumar Gala }; 120124d8fba4SKumar Gala 120224d8fba4SKumar Gala static struct clk_rcg sdc1_src = { 120324d8fba4SKumar Gala .ns_reg = 0x282c, 120424d8fba4SKumar Gala .md_reg = 0x2828, 120524d8fba4SKumar Gala .mn = { 120624d8fba4SKumar Gala .mnctr_en_bit = 8, 120724d8fba4SKumar Gala .mnctr_reset_bit = 7, 120824d8fba4SKumar Gala .mnctr_mode_shift = 5, 120924d8fba4SKumar Gala .n_val_shift = 16, 121024d8fba4SKumar Gala .m_val_shift = 16, 121124d8fba4SKumar Gala .width = 8, 121224d8fba4SKumar Gala }, 121324d8fba4SKumar Gala .p = { 121424d8fba4SKumar Gala .pre_div_shift = 3, 121524d8fba4SKumar Gala .pre_div_width = 2, 121624d8fba4SKumar Gala }, 121724d8fba4SKumar Gala .s = { 121824d8fba4SKumar Gala .src_sel_shift = 0, 121924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 122024d8fba4SKumar Gala }, 122124d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc, 122224d8fba4SKumar Gala .clkr = { 122324d8fba4SKumar Gala .enable_reg = 0x282c, 122424d8fba4SKumar Gala .enable_mask = BIT(11), 122524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 122624d8fba4SKumar Gala .name = "sdc1_src", 122724d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 122824d8fba4SKumar Gala .num_parents = 2, 122924d8fba4SKumar Gala .ops = &clk_rcg_ops, 123024d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 123124d8fba4SKumar Gala }, 123224d8fba4SKumar Gala } 123324d8fba4SKumar Gala }; 123424d8fba4SKumar Gala 123524d8fba4SKumar Gala static struct clk_branch sdc1_clk = { 123624d8fba4SKumar Gala .halt_reg = 0x2fc8, 123724d8fba4SKumar Gala .halt_bit = 6, 123824d8fba4SKumar Gala .clkr = { 123924d8fba4SKumar Gala .enable_reg = 0x282c, 124024d8fba4SKumar Gala .enable_mask = BIT(9), 124124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 124224d8fba4SKumar Gala .name = "sdc1_clk", 124324d8fba4SKumar Gala .parent_names = (const char *[]){ "sdc1_src" }, 124424d8fba4SKumar Gala .num_parents = 1, 124524d8fba4SKumar Gala .ops = &clk_branch_ops, 124624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 124724d8fba4SKumar Gala }, 124824d8fba4SKumar Gala }, 124924d8fba4SKumar Gala }; 125024d8fba4SKumar Gala 125124d8fba4SKumar Gala static struct clk_rcg sdc3_src = { 125224d8fba4SKumar Gala .ns_reg = 0x286c, 125324d8fba4SKumar Gala .md_reg = 0x2868, 125424d8fba4SKumar Gala .mn = { 125524d8fba4SKumar Gala .mnctr_en_bit = 8, 125624d8fba4SKumar Gala .mnctr_reset_bit = 7, 125724d8fba4SKumar Gala .mnctr_mode_shift = 5, 125824d8fba4SKumar Gala .n_val_shift = 16, 125924d8fba4SKumar Gala .m_val_shift = 16, 126024d8fba4SKumar Gala .width = 8, 126124d8fba4SKumar Gala }, 126224d8fba4SKumar Gala .p = { 126324d8fba4SKumar Gala .pre_div_shift = 3, 126424d8fba4SKumar Gala .pre_div_width = 2, 126524d8fba4SKumar Gala }, 126624d8fba4SKumar Gala .s = { 126724d8fba4SKumar Gala .src_sel_shift = 0, 126824d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 126924d8fba4SKumar Gala }, 127024d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc, 127124d8fba4SKumar Gala .clkr = { 127224d8fba4SKumar Gala .enable_reg = 0x286c, 127324d8fba4SKumar Gala .enable_mask = BIT(11), 127424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 127524d8fba4SKumar Gala .name = "sdc3_src", 127624d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 127724d8fba4SKumar Gala .num_parents = 2, 127824d8fba4SKumar Gala .ops = &clk_rcg_ops, 127924d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 128024d8fba4SKumar Gala }, 128124d8fba4SKumar Gala } 128224d8fba4SKumar Gala }; 128324d8fba4SKumar Gala 128424d8fba4SKumar Gala static struct clk_branch sdc3_clk = { 128524d8fba4SKumar Gala .halt_reg = 0x2fc8, 128624d8fba4SKumar Gala .halt_bit = 4, 128724d8fba4SKumar Gala .clkr = { 128824d8fba4SKumar Gala .enable_reg = 0x286c, 128924d8fba4SKumar Gala .enable_mask = BIT(9), 129024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 129124d8fba4SKumar Gala .name = "sdc3_clk", 129224d8fba4SKumar Gala .parent_names = (const char *[]){ "sdc3_src" }, 129324d8fba4SKumar Gala .num_parents = 1, 129424d8fba4SKumar Gala .ops = &clk_branch_ops, 129524d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 129624d8fba4SKumar Gala }, 129724d8fba4SKumar Gala }, 129824d8fba4SKumar Gala }; 129924d8fba4SKumar Gala 130024d8fba4SKumar Gala static struct clk_branch sdc1_h_clk = { 130124d8fba4SKumar Gala .hwcg_reg = 0x2820, 130224d8fba4SKumar Gala .hwcg_bit = 6, 130324d8fba4SKumar Gala .halt_reg = 0x2fc8, 130424d8fba4SKumar Gala .halt_bit = 11, 130524d8fba4SKumar Gala .clkr = { 130624d8fba4SKumar Gala .enable_reg = 0x2820, 130724d8fba4SKumar Gala .enable_mask = BIT(4), 130824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 130924d8fba4SKumar Gala .name = "sdc1_h_clk", 131024d8fba4SKumar Gala .ops = &clk_branch_ops, 131124d8fba4SKumar Gala .flags = CLK_IS_ROOT, 131224d8fba4SKumar Gala }, 131324d8fba4SKumar Gala }, 131424d8fba4SKumar Gala }; 131524d8fba4SKumar Gala 131624d8fba4SKumar Gala static struct clk_branch sdc3_h_clk = { 131724d8fba4SKumar Gala .hwcg_reg = 0x2860, 131824d8fba4SKumar Gala .hwcg_bit = 6, 131924d8fba4SKumar Gala .halt_reg = 0x2fc8, 132024d8fba4SKumar Gala .halt_bit = 9, 132124d8fba4SKumar Gala .clkr = { 132224d8fba4SKumar Gala .enable_reg = 0x2860, 132324d8fba4SKumar Gala .enable_mask = BIT(4), 132424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 132524d8fba4SKumar Gala .name = "sdc3_h_clk", 132624d8fba4SKumar Gala .ops = &clk_branch_ops, 132724d8fba4SKumar Gala .flags = CLK_IS_ROOT, 132824d8fba4SKumar Gala }, 132924d8fba4SKumar Gala }, 133024d8fba4SKumar Gala }; 133124d8fba4SKumar Gala 133224d8fba4SKumar Gala static const struct freq_tbl clk_tbl_tsif_ref[] = { 133324d8fba4SKumar Gala { 105000, P_PXO, 1, 1, 256 }, 133424d8fba4SKumar Gala { } 133524d8fba4SKumar Gala }; 133624d8fba4SKumar Gala 133724d8fba4SKumar Gala static struct clk_rcg tsif_ref_src = { 133824d8fba4SKumar Gala .ns_reg = 0x2710, 133924d8fba4SKumar Gala .md_reg = 0x270c, 134024d8fba4SKumar Gala .mn = { 134124d8fba4SKumar Gala .mnctr_en_bit = 8, 134224d8fba4SKumar Gala .mnctr_reset_bit = 7, 134324d8fba4SKumar Gala .mnctr_mode_shift = 5, 134424d8fba4SKumar Gala .n_val_shift = 16, 134524d8fba4SKumar Gala .m_val_shift = 16, 134624d8fba4SKumar Gala .width = 16, 134724d8fba4SKumar Gala }, 134824d8fba4SKumar Gala .p = { 134924d8fba4SKumar Gala .pre_div_shift = 3, 135024d8fba4SKumar Gala .pre_div_width = 2, 135124d8fba4SKumar Gala }, 135224d8fba4SKumar Gala .s = { 135324d8fba4SKumar Gala .src_sel_shift = 0, 135424d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 135524d8fba4SKumar Gala }, 135624d8fba4SKumar Gala .freq_tbl = clk_tbl_tsif_ref, 135724d8fba4SKumar Gala .clkr = { 135824d8fba4SKumar Gala .enable_reg = 0x2710, 135924d8fba4SKumar Gala .enable_mask = BIT(11), 136024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 136124d8fba4SKumar Gala .name = "tsif_ref_src", 136224d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 136324d8fba4SKumar Gala .num_parents = 2, 136424d8fba4SKumar Gala .ops = &clk_rcg_ops, 136524d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 136624d8fba4SKumar Gala }, 136724d8fba4SKumar Gala } 136824d8fba4SKumar Gala }; 136924d8fba4SKumar Gala 137024d8fba4SKumar Gala static struct clk_branch tsif_ref_clk = { 137124d8fba4SKumar Gala .halt_reg = 0x2fd4, 137224d8fba4SKumar Gala .halt_bit = 5, 137324d8fba4SKumar Gala .clkr = { 137424d8fba4SKumar Gala .enable_reg = 0x2710, 137524d8fba4SKumar Gala .enable_mask = BIT(9), 137624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 137724d8fba4SKumar Gala .name = "tsif_ref_clk", 137824d8fba4SKumar Gala .parent_names = (const char *[]){ "tsif_ref_src" }, 137924d8fba4SKumar Gala .num_parents = 1, 138024d8fba4SKumar Gala .ops = &clk_branch_ops, 138124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 138224d8fba4SKumar Gala }, 138324d8fba4SKumar Gala }, 138424d8fba4SKumar Gala }; 138524d8fba4SKumar Gala 138624d8fba4SKumar Gala static struct clk_branch tsif_h_clk = { 138724d8fba4SKumar Gala .hwcg_reg = 0x2700, 138824d8fba4SKumar Gala .hwcg_bit = 6, 138924d8fba4SKumar Gala .halt_reg = 0x2fd4, 139024d8fba4SKumar Gala .halt_bit = 7, 139124d8fba4SKumar Gala .clkr = { 139224d8fba4SKumar Gala .enable_reg = 0x2700, 139324d8fba4SKumar Gala .enable_mask = BIT(4), 139424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 139524d8fba4SKumar Gala .name = "tsif_h_clk", 139624d8fba4SKumar Gala .ops = &clk_branch_ops, 139724d8fba4SKumar Gala .flags = CLK_IS_ROOT, 139824d8fba4SKumar Gala }, 139924d8fba4SKumar Gala }, 140024d8fba4SKumar Gala }; 140124d8fba4SKumar Gala 140224d8fba4SKumar Gala static struct clk_branch dma_bam_h_clk = { 140324d8fba4SKumar Gala .hwcg_reg = 0x25c0, 140424d8fba4SKumar Gala .hwcg_bit = 6, 140524d8fba4SKumar Gala .halt_reg = 0x2fc8, 140624d8fba4SKumar Gala .halt_bit = 12, 140724d8fba4SKumar Gala .clkr = { 140824d8fba4SKumar Gala .enable_reg = 0x25c0, 140924d8fba4SKumar Gala .enable_mask = BIT(4), 141024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 141124d8fba4SKumar Gala .name = "dma_bam_h_clk", 141224d8fba4SKumar Gala .ops = &clk_branch_ops, 141324d8fba4SKumar Gala .flags = CLK_IS_ROOT, 141424d8fba4SKumar Gala }, 141524d8fba4SKumar Gala }, 141624d8fba4SKumar Gala }; 141724d8fba4SKumar Gala 141824d8fba4SKumar Gala static struct clk_branch adm0_clk = { 141924d8fba4SKumar Gala .halt_reg = 0x2fdc, 142024d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 142124d8fba4SKumar Gala .halt_bit = 12, 142224d8fba4SKumar Gala .clkr = { 142324d8fba4SKumar Gala .enable_reg = 0x3080, 142424d8fba4SKumar Gala .enable_mask = BIT(2), 142524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 142624d8fba4SKumar Gala .name = "adm0_clk", 142724d8fba4SKumar Gala .ops = &clk_branch_ops, 142824d8fba4SKumar Gala .flags = CLK_IS_ROOT, 142924d8fba4SKumar Gala }, 143024d8fba4SKumar Gala }, 143124d8fba4SKumar Gala }; 143224d8fba4SKumar Gala 143324d8fba4SKumar Gala static struct clk_branch adm0_pbus_clk = { 143424d8fba4SKumar Gala .hwcg_reg = 0x2208, 143524d8fba4SKumar Gala .hwcg_bit = 6, 143624d8fba4SKumar Gala .halt_reg = 0x2fdc, 143724d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 143824d8fba4SKumar Gala .halt_bit = 11, 143924d8fba4SKumar Gala .clkr = { 144024d8fba4SKumar Gala .enable_reg = 0x3080, 144124d8fba4SKumar Gala .enable_mask = BIT(3), 144224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 144324d8fba4SKumar Gala .name = "adm0_pbus_clk", 144424d8fba4SKumar Gala .ops = &clk_branch_ops, 144524d8fba4SKumar Gala .flags = CLK_IS_ROOT, 144624d8fba4SKumar Gala }, 144724d8fba4SKumar Gala }, 144824d8fba4SKumar Gala }; 144924d8fba4SKumar Gala 145024d8fba4SKumar Gala static struct clk_branch pmic_arb0_h_clk = { 145124d8fba4SKumar Gala .halt_reg = 0x2fd8, 145224d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 145324d8fba4SKumar Gala .halt_bit = 22, 145424d8fba4SKumar Gala .clkr = { 145524d8fba4SKumar Gala .enable_reg = 0x3080, 145624d8fba4SKumar Gala .enable_mask = BIT(8), 145724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 145824d8fba4SKumar Gala .name = "pmic_arb0_h_clk", 145924d8fba4SKumar Gala .ops = &clk_branch_ops, 146024d8fba4SKumar Gala .flags = CLK_IS_ROOT, 146124d8fba4SKumar Gala }, 146224d8fba4SKumar Gala }, 146324d8fba4SKumar Gala }; 146424d8fba4SKumar Gala 146524d8fba4SKumar Gala static struct clk_branch pmic_arb1_h_clk = { 146624d8fba4SKumar Gala .halt_reg = 0x2fd8, 146724d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 146824d8fba4SKumar Gala .halt_bit = 21, 146924d8fba4SKumar Gala .clkr = { 147024d8fba4SKumar Gala .enable_reg = 0x3080, 147124d8fba4SKumar Gala .enable_mask = BIT(9), 147224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 147324d8fba4SKumar Gala .name = "pmic_arb1_h_clk", 147424d8fba4SKumar Gala .ops = &clk_branch_ops, 147524d8fba4SKumar Gala .flags = CLK_IS_ROOT, 147624d8fba4SKumar Gala }, 147724d8fba4SKumar Gala }, 147824d8fba4SKumar Gala }; 147924d8fba4SKumar Gala 148024d8fba4SKumar Gala static struct clk_branch pmic_ssbi2_clk = { 148124d8fba4SKumar Gala .halt_reg = 0x2fd8, 148224d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 148324d8fba4SKumar Gala .halt_bit = 23, 148424d8fba4SKumar Gala .clkr = { 148524d8fba4SKumar Gala .enable_reg = 0x3080, 148624d8fba4SKumar Gala .enable_mask = BIT(7), 148724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 148824d8fba4SKumar Gala .name = "pmic_ssbi2_clk", 148924d8fba4SKumar Gala .ops = &clk_branch_ops, 149024d8fba4SKumar Gala .flags = CLK_IS_ROOT, 149124d8fba4SKumar Gala }, 149224d8fba4SKumar Gala }, 149324d8fba4SKumar Gala }; 149424d8fba4SKumar Gala 149524d8fba4SKumar Gala static struct clk_branch rpm_msg_ram_h_clk = { 149624d8fba4SKumar Gala .hwcg_reg = 0x27e0, 149724d8fba4SKumar Gala .hwcg_bit = 6, 149824d8fba4SKumar Gala .halt_reg = 0x2fd8, 149924d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 150024d8fba4SKumar Gala .halt_bit = 12, 150124d8fba4SKumar Gala .clkr = { 150224d8fba4SKumar Gala .enable_reg = 0x3080, 150324d8fba4SKumar Gala .enable_mask = BIT(6), 150424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 150524d8fba4SKumar Gala .name = "rpm_msg_ram_h_clk", 150624d8fba4SKumar Gala .ops = &clk_branch_ops, 150724d8fba4SKumar Gala .flags = CLK_IS_ROOT, 150824d8fba4SKumar Gala }, 150924d8fba4SKumar Gala }, 151024d8fba4SKumar Gala }; 151124d8fba4SKumar Gala 151224d8fba4SKumar Gala static const struct freq_tbl clk_tbl_pcie_ref[] = { 151324d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 }, 151424d8fba4SKumar Gala { } 151524d8fba4SKumar Gala }; 151624d8fba4SKumar Gala 151724d8fba4SKumar Gala static struct clk_rcg pcie_ref_src = { 151824d8fba4SKumar Gala .ns_reg = 0x3860, 151924d8fba4SKumar Gala .p = { 152024d8fba4SKumar Gala .pre_div_shift = 3, 152124d8fba4SKumar Gala .pre_div_width = 4, 152224d8fba4SKumar Gala }, 152324d8fba4SKumar Gala .s = { 152424d8fba4SKumar Gala .src_sel_shift = 0, 152524d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 152624d8fba4SKumar Gala }, 152724d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 152824d8fba4SKumar Gala .clkr = { 152924d8fba4SKumar Gala .enable_reg = 0x3860, 153024d8fba4SKumar Gala .enable_mask = BIT(11), 153124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 153224d8fba4SKumar Gala .name = "pcie_ref_src", 153324d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 153424d8fba4SKumar Gala .num_parents = 2, 153524d8fba4SKumar Gala .ops = &clk_rcg_ops, 153624d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 153724d8fba4SKumar Gala }, 153824d8fba4SKumar Gala }, 153924d8fba4SKumar Gala }; 154024d8fba4SKumar Gala 154124d8fba4SKumar Gala static struct clk_branch pcie_ref_src_clk = { 154224d8fba4SKumar Gala .halt_reg = 0x2fdc, 154324d8fba4SKumar Gala .halt_bit = 30, 154424d8fba4SKumar Gala .clkr = { 154524d8fba4SKumar Gala .enable_reg = 0x3860, 154624d8fba4SKumar Gala .enable_mask = BIT(9), 154724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 154824d8fba4SKumar Gala .name = "pcie_ref_src_clk", 154924d8fba4SKumar Gala .parent_names = (const char *[]){ "pcie_ref_src" }, 155024d8fba4SKumar Gala .num_parents = 1, 155124d8fba4SKumar Gala .ops = &clk_branch_ops, 155224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 155324d8fba4SKumar Gala }, 155424d8fba4SKumar Gala }, 155524d8fba4SKumar Gala }; 155624d8fba4SKumar Gala 155724d8fba4SKumar Gala static struct clk_branch pcie_a_clk = { 155824d8fba4SKumar Gala .halt_reg = 0x2fc0, 155924d8fba4SKumar Gala .halt_bit = 13, 156024d8fba4SKumar Gala .clkr = { 156124d8fba4SKumar Gala .enable_reg = 0x22c0, 156224d8fba4SKumar Gala .enable_mask = BIT(4), 156324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 156424d8fba4SKumar Gala .name = "pcie_a_clk", 156524d8fba4SKumar Gala .ops = &clk_branch_ops, 156624d8fba4SKumar Gala .flags = CLK_IS_ROOT, 156724d8fba4SKumar Gala }, 156824d8fba4SKumar Gala }, 156924d8fba4SKumar Gala }; 157024d8fba4SKumar Gala 157124d8fba4SKumar Gala static struct clk_branch pcie_aux_clk = { 157224d8fba4SKumar Gala .halt_reg = 0x2fdc, 157324d8fba4SKumar Gala .halt_bit = 31, 157424d8fba4SKumar Gala .clkr = { 157524d8fba4SKumar Gala .enable_reg = 0x22c8, 157624d8fba4SKumar Gala .enable_mask = BIT(4), 157724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 157824d8fba4SKumar Gala .name = "pcie_aux_clk", 157924d8fba4SKumar Gala .ops = &clk_branch_ops, 158024d8fba4SKumar Gala .flags = CLK_IS_ROOT, 158124d8fba4SKumar Gala }, 158224d8fba4SKumar Gala }, 158324d8fba4SKumar Gala }; 158424d8fba4SKumar Gala 158524d8fba4SKumar Gala static struct clk_branch pcie_h_clk = { 158624d8fba4SKumar Gala .halt_reg = 0x2fd4, 158724d8fba4SKumar Gala .halt_bit = 8, 158824d8fba4SKumar Gala .clkr = { 158924d8fba4SKumar Gala .enable_reg = 0x22cc, 159024d8fba4SKumar Gala .enable_mask = BIT(4), 159124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 159224d8fba4SKumar Gala .name = "pcie_h_clk", 159324d8fba4SKumar Gala .ops = &clk_branch_ops, 159424d8fba4SKumar Gala .flags = CLK_IS_ROOT, 159524d8fba4SKumar Gala }, 159624d8fba4SKumar Gala }, 159724d8fba4SKumar Gala }; 159824d8fba4SKumar Gala 159924d8fba4SKumar Gala static struct clk_branch pcie_phy_clk = { 160024d8fba4SKumar Gala .halt_reg = 0x2fdc, 160124d8fba4SKumar Gala .halt_bit = 29, 160224d8fba4SKumar Gala .clkr = { 160324d8fba4SKumar Gala .enable_reg = 0x22d0, 160424d8fba4SKumar Gala .enable_mask = BIT(4), 160524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 160624d8fba4SKumar Gala .name = "pcie_phy_clk", 160724d8fba4SKumar Gala .ops = &clk_branch_ops, 160824d8fba4SKumar Gala .flags = CLK_IS_ROOT, 160924d8fba4SKumar Gala }, 161024d8fba4SKumar Gala }, 161124d8fba4SKumar Gala }; 161224d8fba4SKumar Gala 161324d8fba4SKumar Gala static struct clk_rcg pcie1_ref_src = { 161424d8fba4SKumar Gala .ns_reg = 0x3aa0, 161524d8fba4SKumar Gala .p = { 161624d8fba4SKumar Gala .pre_div_shift = 3, 161724d8fba4SKumar Gala .pre_div_width = 4, 161824d8fba4SKumar Gala }, 161924d8fba4SKumar Gala .s = { 162024d8fba4SKumar Gala .src_sel_shift = 0, 162124d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 162224d8fba4SKumar Gala }, 162324d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 162424d8fba4SKumar Gala .clkr = { 162524d8fba4SKumar Gala .enable_reg = 0x3aa0, 162624d8fba4SKumar Gala .enable_mask = BIT(11), 162724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 162824d8fba4SKumar Gala .name = "pcie1_ref_src", 162924d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 163024d8fba4SKumar Gala .num_parents = 2, 163124d8fba4SKumar Gala .ops = &clk_rcg_ops, 163224d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 163324d8fba4SKumar Gala }, 163424d8fba4SKumar Gala }, 163524d8fba4SKumar Gala }; 163624d8fba4SKumar Gala 163724d8fba4SKumar Gala static struct clk_branch pcie1_ref_src_clk = { 163824d8fba4SKumar Gala .halt_reg = 0x2fdc, 163924d8fba4SKumar Gala .halt_bit = 27, 164024d8fba4SKumar Gala .clkr = { 164124d8fba4SKumar Gala .enable_reg = 0x3aa0, 164224d8fba4SKumar Gala .enable_mask = BIT(9), 164324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 164424d8fba4SKumar Gala .name = "pcie1_ref_src_clk", 164524d8fba4SKumar Gala .parent_names = (const char *[]){ "pcie1_ref_src" }, 164624d8fba4SKumar Gala .num_parents = 1, 164724d8fba4SKumar Gala .ops = &clk_branch_ops, 164824d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 164924d8fba4SKumar Gala }, 165024d8fba4SKumar Gala }, 165124d8fba4SKumar Gala }; 165224d8fba4SKumar Gala 165324d8fba4SKumar Gala static struct clk_branch pcie1_a_clk = { 165424d8fba4SKumar Gala .halt_reg = 0x2fc0, 165524d8fba4SKumar Gala .halt_bit = 10, 165624d8fba4SKumar Gala .clkr = { 165724d8fba4SKumar Gala .enable_reg = 0x3a80, 165824d8fba4SKumar Gala .enable_mask = BIT(4), 165924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 166024d8fba4SKumar Gala .name = "pcie1_a_clk", 166124d8fba4SKumar Gala .ops = &clk_branch_ops, 166224d8fba4SKumar Gala .flags = CLK_IS_ROOT, 166324d8fba4SKumar Gala }, 166424d8fba4SKumar Gala }, 166524d8fba4SKumar Gala }; 166624d8fba4SKumar Gala 166724d8fba4SKumar Gala static struct clk_branch pcie1_aux_clk = { 166824d8fba4SKumar Gala .halt_reg = 0x2fdc, 166924d8fba4SKumar Gala .halt_bit = 28, 167024d8fba4SKumar Gala .clkr = { 167124d8fba4SKumar Gala .enable_reg = 0x3a88, 167224d8fba4SKumar Gala .enable_mask = BIT(4), 167324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 167424d8fba4SKumar Gala .name = "pcie1_aux_clk", 167524d8fba4SKumar Gala .ops = &clk_branch_ops, 167624d8fba4SKumar Gala .flags = CLK_IS_ROOT, 167724d8fba4SKumar Gala }, 167824d8fba4SKumar Gala }, 167924d8fba4SKumar Gala }; 168024d8fba4SKumar Gala 168124d8fba4SKumar Gala static struct clk_branch pcie1_h_clk = { 168224d8fba4SKumar Gala .halt_reg = 0x2fd4, 168324d8fba4SKumar Gala .halt_bit = 9, 168424d8fba4SKumar Gala .clkr = { 168524d8fba4SKumar Gala .enable_reg = 0x3a8c, 168624d8fba4SKumar Gala .enable_mask = BIT(4), 168724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 168824d8fba4SKumar Gala .name = "pcie1_h_clk", 168924d8fba4SKumar Gala .ops = &clk_branch_ops, 169024d8fba4SKumar Gala .flags = CLK_IS_ROOT, 169124d8fba4SKumar Gala }, 169224d8fba4SKumar Gala }, 169324d8fba4SKumar Gala }; 169424d8fba4SKumar Gala 169524d8fba4SKumar Gala static struct clk_branch pcie1_phy_clk = { 169624d8fba4SKumar Gala .halt_reg = 0x2fdc, 169724d8fba4SKumar Gala .halt_bit = 26, 169824d8fba4SKumar Gala .clkr = { 169924d8fba4SKumar Gala .enable_reg = 0x3a90, 170024d8fba4SKumar Gala .enable_mask = BIT(4), 170124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 170224d8fba4SKumar Gala .name = "pcie1_phy_clk", 170324d8fba4SKumar Gala .ops = &clk_branch_ops, 170424d8fba4SKumar Gala .flags = CLK_IS_ROOT, 170524d8fba4SKumar Gala }, 170624d8fba4SKumar Gala }, 170724d8fba4SKumar Gala }; 170824d8fba4SKumar Gala 170924d8fba4SKumar Gala static struct clk_rcg pcie2_ref_src = { 171024d8fba4SKumar Gala .ns_reg = 0x3ae0, 171124d8fba4SKumar Gala .p = { 171224d8fba4SKumar Gala .pre_div_shift = 3, 171324d8fba4SKumar Gala .pre_div_width = 4, 171424d8fba4SKumar Gala }, 171524d8fba4SKumar Gala .s = { 171624d8fba4SKumar Gala .src_sel_shift = 0, 171724d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 171824d8fba4SKumar Gala }, 171924d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 172024d8fba4SKumar Gala .clkr = { 172124d8fba4SKumar Gala .enable_reg = 0x3ae0, 172224d8fba4SKumar Gala .enable_mask = BIT(11), 172324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 172424d8fba4SKumar Gala .name = "pcie2_ref_src", 172524d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 172624d8fba4SKumar Gala .num_parents = 2, 172724d8fba4SKumar Gala .ops = &clk_rcg_ops, 172824d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 172924d8fba4SKumar Gala }, 173024d8fba4SKumar Gala }, 173124d8fba4SKumar Gala }; 173224d8fba4SKumar Gala 173324d8fba4SKumar Gala static struct clk_branch pcie2_ref_src_clk = { 173424d8fba4SKumar Gala .halt_reg = 0x2fdc, 173524d8fba4SKumar Gala .halt_bit = 24, 173624d8fba4SKumar Gala .clkr = { 173724d8fba4SKumar Gala .enable_reg = 0x3ae0, 173824d8fba4SKumar Gala .enable_mask = BIT(9), 173924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 174024d8fba4SKumar Gala .name = "pcie2_ref_src_clk", 174124d8fba4SKumar Gala .parent_names = (const char *[]){ "pcie2_ref_src" }, 174224d8fba4SKumar Gala .num_parents = 1, 174324d8fba4SKumar Gala .ops = &clk_branch_ops, 174424d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 174524d8fba4SKumar Gala }, 174624d8fba4SKumar Gala }, 174724d8fba4SKumar Gala }; 174824d8fba4SKumar Gala 174924d8fba4SKumar Gala static struct clk_branch pcie2_a_clk = { 175024d8fba4SKumar Gala .halt_reg = 0x2fc0, 175124d8fba4SKumar Gala .halt_bit = 9, 175224d8fba4SKumar Gala .clkr = { 175324d8fba4SKumar Gala .enable_reg = 0x3ac0, 175424d8fba4SKumar Gala .enable_mask = BIT(4), 175524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 175624d8fba4SKumar Gala .name = "pcie2_a_clk", 175724d8fba4SKumar Gala .ops = &clk_branch_ops, 175824d8fba4SKumar Gala .flags = CLK_IS_ROOT, 175924d8fba4SKumar Gala }, 176024d8fba4SKumar Gala }, 176124d8fba4SKumar Gala }; 176224d8fba4SKumar Gala 176324d8fba4SKumar Gala static struct clk_branch pcie2_aux_clk = { 176424d8fba4SKumar Gala .halt_reg = 0x2fdc, 176524d8fba4SKumar Gala .halt_bit = 25, 176624d8fba4SKumar Gala .clkr = { 176724d8fba4SKumar Gala .enable_reg = 0x3ac8, 176824d8fba4SKumar Gala .enable_mask = BIT(4), 176924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 177024d8fba4SKumar Gala .name = "pcie2_aux_clk", 177124d8fba4SKumar Gala .ops = &clk_branch_ops, 177224d8fba4SKumar Gala .flags = CLK_IS_ROOT, 177324d8fba4SKumar Gala }, 177424d8fba4SKumar Gala }, 177524d8fba4SKumar Gala }; 177624d8fba4SKumar Gala 177724d8fba4SKumar Gala static struct clk_branch pcie2_h_clk = { 177824d8fba4SKumar Gala .halt_reg = 0x2fd4, 177924d8fba4SKumar Gala .halt_bit = 10, 178024d8fba4SKumar Gala .clkr = { 178124d8fba4SKumar Gala .enable_reg = 0x3acc, 178224d8fba4SKumar Gala .enable_mask = BIT(4), 178324d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 178424d8fba4SKumar Gala .name = "pcie2_h_clk", 178524d8fba4SKumar Gala .ops = &clk_branch_ops, 178624d8fba4SKumar Gala .flags = CLK_IS_ROOT, 178724d8fba4SKumar Gala }, 178824d8fba4SKumar Gala }, 178924d8fba4SKumar Gala }; 179024d8fba4SKumar Gala 179124d8fba4SKumar Gala static struct clk_branch pcie2_phy_clk = { 179224d8fba4SKumar Gala .halt_reg = 0x2fdc, 179324d8fba4SKumar Gala .halt_bit = 23, 179424d8fba4SKumar Gala .clkr = { 179524d8fba4SKumar Gala .enable_reg = 0x3ad0, 179624d8fba4SKumar Gala .enable_mask = BIT(4), 179724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 179824d8fba4SKumar Gala .name = "pcie2_phy_clk", 179924d8fba4SKumar Gala .ops = &clk_branch_ops, 180024d8fba4SKumar Gala .flags = CLK_IS_ROOT, 180124d8fba4SKumar Gala }, 180224d8fba4SKumar Gala }, 180324d8fba4SKumar Gala }; 180424d8fba4SKumar Gala 180524d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sata_ref[] = { 180624d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 }, 180724d8fba4SKumar Gala { } 180824d8fba4SKumar Gala }; 180924d8fba4SKumar Gala 181024d8fba4SKumar Gala static struct clk_rcg sata_ref_src = { 181124d8fba4SKumar Gala .ns_reg = 0x2c08, 181224d8fba4SKumar Gala .p = { 181324d8fba4SKumar Gala .pre_div_shift = 3, 181424d8fba4SKumar Gala .pre_div_width = 4, 181524d8fba4SKumar Gala }, 181624d8fba4SKumar Gala .s = { 181724d8fba4SKumar Gala .src_sel_shift = 0, 181824d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_sata_map, 181924d8fba4SKumar Gala }, 182024d8fba4SKumar Gala .freq_tbl = clk_tbl_sata_ref, 182124d8fba4SKumar Gala .clkr = { 182224d8fba4SKumar Gala .enable_reg = 0x2c08, 182324d8fba4SKumar Gala .enable_mask = BIT(7), 182424d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 182524d8fba4SKumar Gala .name = "sata_ref_src", 182624d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 182724d8fba4SKumar Gala .num_parents = 2, 182824d8fba4SKumar Gala .ops = &clk_rcg_ops, 182924d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 183024d8fba4SKumar Gala }, 183124d8fba4SKumar Gala }, 183224d8fba4SKumar Gala }; 183324d8fba4SKumar Gala 183424d8fba4SKumar Gala static struct clk_branch sata_rxoob_clk = { 183524d8fba4SKumar Gala .halt_reg = 0x2fdc, 183624d8fba4SKumar Gala .halt_bit = 20, 183724d8fba4SKumar Gala .clkr = { 183824d8fba4SKumar Gala .enable_reg = 0x2c0c, 183924d8fba4SKumar Gala .enable_mask = BIT(4), 184024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 184124d8fba4SKumar Gala .name = "sata_rxoob_clk", 184224d8fba4SKumar Gala .parent_names = (const char *[]){ "sata_ref_src" }, 184324d8fba4SKumar Gala .num_parents = 1, 184424d8fba4SKumar Gala .ops = &clk_branch_ops, 184524d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 184624d8fba4SKumar Gala }, 184724d8fba4SKumar Gala }, 184824d8fba4SKumar Gala }; 184924d8fba4SKumar Gala 185024d8fba4SKumar Gala static struct clk_branch sata_pmalive_clk = { 185124d8fba4SKumar Gala .halt_reg = 0x2fdc, 185224d8fba4SKumar Gala .halt_bit = 19, 185324d8fba4SKumar Gala .clkr = { 185424d8fba4SKumar Gala .enable_reg = 0x2c10, 185524d8fba4SKumar Gala .enable_mask = BIT(4), 185624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 185724d8fba4SKumar Gala .name = "sata_pmalive_clk", 185824d8fba4SKumar Gala .parent_names = (const char *[]){ "sata_ref_src" }, 185924d8fba4SKumar Gala .num_parents = 1, 186024d8fba4SKumar Gala .ops = &clk_branch_ops, 186124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 186224d8fba4SKumar Gala }, 186324d8fba4SKumar Gala }, 186424d8fba4SKumar Gala }; 186524d8fba4SKumar Gala 186624d8fba4SKumar Gala static struct clk_branch sata_phy_ref_clk = { 186724d8fba4SKumar Gala .halt_reg = 0x2fdc, 186824d8fba4SKumar Gala .halt_bit = 18, 186924d8fba4SKumar Gala .clkr = { 187024d8fba4SKumar Gala .enable_reg = 0x2c14, 187124d8fba4SKumar Gala .enable_mask = BIT(4), 187224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 187324d8fba4SKumar Gala .name = "sata_phy_ref_clk", 187424d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 187524d8fba4SKumar Gala .num_parents = 1, 187624d8fba4SKumar Gala .ops = &clk_branch_ops, 187724d8fba4SKumar Gala }, 187824d8fba4SKumar Gala }, 187924d8fba4SKumar Gala }; 188024d8fba4SKumar Gala 188124d8fba4SKumar Gala static struct clk_branch sata_a_clk = { 188224d8fba4SKumar Gala .halt_reg = 0x2fc0, 188324d8fba4SKumar Gala .halt_bit = 12, 188424d8fba4SKumar Gala .clkr = { 188524d8fba4SKumar Gala .enable_reg = 0x2c20, 188624d8fba4SKumar Gala .enable_mask = BIT(4), 188724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 188824d8fba4SKumar Gala .name = "sata_a_clk", 188924d8fba4SKumar Gala .ops = &clk_branch_ops, 189024d8fba4SKumar Gala .flags = CLK_IS_ROOT, 189124d8fba4SKumar Gala }, 189224d8fba4SKumar Gala }, 189324d8fba4SKumar Gala }; 189424d8fba4SKumar Gala 189524d8fba4SKumar Gala static struct clk_branch sata_h_clk = { 189624d8fba4SKumar Gala .halt_reg = 0x2fdc, 189724d8fba4SKumar Gala .halt_bit = 21, 189824d8fba4SKumar Gala .clkr = { 189924d8fba4SKumar Gala .enable_reg = 0x2c00, 190024d8fba4SKumar Gala .enable_mask = BIT(4), 190124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 190224d8fba4SKumar Gala .name = "sata_h_clk", 190324d8fba4SKumar Gala .ops = &clk_branch_ops, 190424d8fba4SKumar Gala .flags = CLK_IS_ROOT, 190524d8fba4SKumar Gala }, 190624d8fba4SKumar Gala }, 190724d8fba4SKumar Gala }; 190824d8fba4SKumar Gala 190924d8fba4SKumar Gala static struct clk_branch sfab_sata_s_h_clk = { 191024d8fba4SKumar Gala .halt_reg = 0x2fc4, 191124d8fba4SKumar Gala .halt_bit = 14, 191224d8fba4SKumar Gala .clkr = { 191324d8fba4SKumar Gala .enable_reg = 0x2480, 191424d8fba4SKumar Gala .enable_mask = BIT(4), 191524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 191624d8fba4SKumar Gala .name = "sfab_sata_s_h_clk", 191724d8fba4SKumar Gala .ops = &clk_branch_ops, 191824d8fba4SKumar Gala .flags = CLK_IS_ROOT, 191924d8fba4SKumar Gala }, 192024d8fba4SKumar Gala }, 192124d8fba4SKumar Gala }; 192224d8fba4SKumar Gala 192324d8fba4SKumar Gala static struct clk_branch sata_phy_cfg_clk = { 192424d8fba4SKumar Gala .halt_reg = 0x2fcc, 192524d8fba4SKumar Gala .halt_bit = 14, 192624d8fba4SKumar Gala .clkr = { 192724d8fba4SKumar Gala .enable_reg = 0x2c40, 192824d8fba4SKumar Gala .enable_mask = BIT(4), 192924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 193024d8fba4SKumar Gala .name = "sata_phy_cfg_clk", 193124d8fba4SKumar Gala .ops = &clk_branch_ops, 193224d8fba4SKumar Gala .flags = CLK_IS_ROOT, 193324d8fba4SKumar Gala }, 193424d8fba4SKumar Gala }, 193524d8fba4SKumar Gala }; 193624d8fba4SKumar Gala 193724d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_master[] = { 193824d8fba4SKumar Gala { 125000000, P_PLL0, 1, 5, 32 }, 193924d8fba4SKumar Gala { } 194024d8fba4SKumar Gala }; 194124d8fba4SKumar Gala 194224d8fba4SKumar Gala static struct clk_rcg usb30_master_clk_src = { 194324d8fba4SKumar Gala .ns_reg = 0x3b2c, 194424d8fba4SKumar Gala .md_reg = 0x3b28, 194524d8fba4SKumar Gala .mn = { 194624d8fba4SKumar Gala .mnctr_en_bit = 8, 194724d8fba4SKumar Gala .mnctr_reset_bit = 7, 194824d8fba4SKumar Gala .mnctr_mode_shift = 5, 194924d8fba4SKumar Gala .n_val_shift = 16, 195024d8fba4SKumar Gala .m_val_shift = 16, 195124d8fba4SKumar Gala .width = 8, 195224d8fba4SKumar Gala }, 195324d8fba4SKumar Gala .p = { 195424d8fba4SKumar Gala .pre_div_shift = 3, 195524d8fba4SKumar Gala .pre_div_width = 2, 195624d8fba4SKumar Gala }, 195724d8fba4SKumar Gala .s = { 195824d8fba4SKumar Gala .src_sel_shift = 0, 195924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 196024d8fba4SKumar Gala }, 196124d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_master, 196224d8fba4SKumar Gala .clkr = { 196324d8fba4SKumar Gala .enable_reg = 0x3b2c, 196424d8fba4SKumar Gala .enable_mask = BIT(11), 196524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 196624d8fba4SKumar Gala .name = "usb30_master_ref_src", 196724d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 196824d8fba4SKumar Gala .num_parents = 3, 196924d8fba4SKumar Gala .ops = &clk_rcg_ops, 197024d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 197124d8fba4SKumar Gala }, 197224d8fba4SKumar Gala }, 197324d8fba4SKumar Gala }; 197424d8fba4SKumar Gala 197524d8fba4SKumar Gala static struct clk_branch usb30_0_branch_clk = { 197624d8fba4SKumar Gala .halt_reg = 0x2fc4, 197724d8fba4SKumar Gala .halt_bit = 22, 197824d8fba4SKumar Gala .clkr = { 197924d8fba4SKumar Gala .enable_reg = 0x3b24, 198024d8fba4SKumar Gala .enable_mask = BIT(4), 198124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 198224d8fba4SKumar Gala .name = "usb30_0_branch_clk", 198324d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_master_ref_src", }, 198424d8fba4SKumar Gala .num_parents = 1, 198524d8fba4SKumar Gala .ops = &clk_branch_ops, 198624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 198724d8fba4SKumar Gala }, 198824d8fba4SKumar Gala }, 198924d8fba4SKumar Gala }; 199024d8fba4SKumar Gala 199124d8fba4SKumar Gala static struct clk_branch usb30_1_branch_clk = { 199224d8fba4SKumar Gala .halt_reg = 0x2fc4, 199324d8fba4SKumar Gala .halt_bit = 17, 199424d8fba4SKumar Gala .clkr = { 199524d8fba4SKumar Gala .enable_reg = 0x3b34, 199624d8fba4SKumar Gala .enable_mask = BIT(4), 199724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 199824d8fba4SKumar Gala .name = "usb30_1_branch_clk", 199924d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_master_ref_src", }, 200024d8fba4SKumar Gala .num_parents = 1, 200124d8fba4SKumar Gala .ops = &clk_branch_ops, 200224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 200324d8fba4SKumar Gala }, 200424d8fba4SKumar Gala }, 200524d8fba4SKumar Gala }; 200624d8fba4SKumar Gala 200724d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_utmi[] = { 200824d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 }, 200924d8fba4SKumar Gala { } 201024d8fba4SKumar Gala }; 201124d8fba4SKumar Gala 201224d8fba4SKumar Gala static struct clk_rcg usb30_utmi_clk = { 201324d8fba4SKumar Gala .ns_reg = 0x3b44, 201424d8fba4SKumar Gala .md_reg = 0x3b40, 201524d8fba4SKumar Gala .mn = { 201624d8fba4SKumar Gala .mnctr_en_bit = 8, 201724d8fba4SKumar Gala .mnctr_reset_bit = 7, 201824d8fba4SKumar Gala .mnctr_mode_shift = 5, 201924d8fba4SKumar Gala .n_val_shift = 16, 202024d8fba4SKumar Gala .m_val_shift = 16, 202124d8fba4SKumar Gala .width = 8, 202224d8fba4SKumar Gala }, 202324d8fba4SKumar Gala .p = { 202424d8fba4SKumar Gala .pre_div_shift = 3, 202524d8fba4SKumar Gala .pre_div_width = 2, 202624d8fba4SKumar Gala }, 202724d8fba4SKumar Gala .s = { 202824d8fba4SKumar Gala .src_sel_shift = 0, 202924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 203024d8fba4SKumar Gala }, 203124d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_utmi, 203224d8fba4SKumar Gala .clkr = { 203324d8fba4SKumar Gala .enable_reg = 0x3b44, 203424d8fba4SKumar Gala .enable_mask = BIT(11), 203524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 203624d8fba4SKumar Gala .name = "usb30_utmi_clk", 203724d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 203824d8fba4SKumar Gala .num_parents = 3, 203924d8fba4SKumar Gala .ops = &clk_rcg_ops, 204024d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 204124d8fba4SKumar Gala }, 204224d8fba4SKumar Gala }, 204324d8fba4SKumar Gala }; 204424d8fba4SKumar Gala 204524d8fba4SKumar Gala static struct clk_branch usb30_0_utmi_clk_ctl = { 204624d8fba4SKumar Gala .halt_reg = 0x2fc4, 204724d8fba4SKumar Gala .halt_bit = 21, 204824d8fba4SKumar Gala .clkr = { 204924d8fba4SKumar Gala .enable_reg = 0x3b48, 205024d8fba4SKumar Gala .enable_mask = BIT(4), 205124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 205224d8fba4SKumar Gala .name = "usb30_0_utmi_clk_ctl", 205324d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_utmi_clk", }, 205424d8fba4SKumar Gala .num_parents = 1, 205524d8fba4SKumar Gala .ops = &clk_branch_ops, 205624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 205724d8fba4SKumar Gala }, 205824d8fba4SKumar Gala }, 205924d8fba4SKumar Gala }; 206024d8fba4SKumar Gala 206124d8fba4SKumar Gala static struct clk_branch usb30_1_utmi_clk_ctl = { 206224d8fba4SKumar Gala .halt_reg = 0x2fc4, 206324d8fba4SKumar Gala .halt_bit = 15, 206424d8fba4SKumar Gala .clkr = { 206524d8fba4SKumar Gala .enable_reg = 0x3b4c, 206624d8fba4SKumar Gala .enable_mask = BIT(4), 206724d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 206824d8fba4SKumar Gala .name = "usb30_1_utmi_clk_ctl", 206924d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_utmi_clk", }, 207024d8fba4SKumar Gala .num_parents = 1, 207124d8fba4SKumar Gala .ops = &clk_branch_ops, 207224d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 207324d8fba4SKumar Gala }, 207424d8fba4SKumar Gala }, 207524d8fba4SKumar Gala }; 207624d8fba4SKumar Gala 207724d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb[] = { 207824d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 }, 207924d8fba4SKumar Gala { } 208024d8fba4SKumar Gala }; 208124d8fba4SKumar Gala 208224d8fba4SKumar Gala static struct clk_rcg usb_hs1_xcvr_clk_src = { 208324d8fba4SKumar Gala .ns_reg = 0x290C, 208424d8fba4SKumar Gala .md_reg = 0x2908, 208524d8fba4SKumar Gala .mn = { 208624d8fba4SKumar Gala .mnctr_en_bit = 8, 208724d8fba4SKumar Gala .mnctr_reset_bit = 7, 208824d8fba4SKumar Gala .mnctr_mode_shift = 5, 208924d8fba4SKumar Gala .n_val_shift = 16, 209024d8fba4SKumar Gala .m_val_shift = 16, 209124d8fba4SKumar Gala .width = 8, 209224d8fba4SKumar Gala }, 209324d8fba4SKumar Gala .p = { 209424d8fba4SKumar Gala .pre_div_shift = 3, 209524d8fba4SKumar Gala .pre_div_width = 2, 209624d8fba4SKumar Gala }, 209724d8fba4SKumar Gala .s = { 209824d8fba4SKumar Gala .src_sel_shift = 0, 209924d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 210024d8fba4SKumar Gala }, 210124d8fba4SKumar Gala .freq_tbl = clk_tbl_usb, 210224d8fba4SKumar Gala .clkr = { 210324d8fba4SKumar Gala .enable_reg = 0x2968, 210424d8fba4SKumar Gala .enable_mask = BIT(11), 210524d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 210624d8fba4SKumar Gala .name = "usb_hs1_xcvr_src", 210724d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 210824d8fba4SKumar Gala .num_parents = 3, 210924d8fba4SKumar Gala .ops = &clk_rcg_ops, 211024d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 211124d8fba4SKumar Gala }, 211224d8fba4SKumar Gala }, 211324d8fba4SKumar Gala }; 211424d8fba4SKumar Gala 211524d8fba4SKumar Gala static struct clk_branch usb_hs1_xcvr_clk = { 211624d8fba4SKumar Gala .halt_reg = 0x2fcc, 211724d8fba4SKumar Gala .halt_bit = 17, 211824d8fba4SKumar Gala .clkr = { 211924d8fba4SKumar Gala .enable_reg = 0x290c, 212024d8fba4SKumar Gala .enable_mask = BIT(9), 212124d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 212224d8fba4SKumar Gala .name = "usb_hs1_xcvr_clk", 212324d8fba4SKumar Gala .parent_names = (const char *[]){ "usb_hs1_xcvr_src" }, 212424d8fba4SKumar Gala .num_parents = 1, 212524d8fba4SKumar Gala .ops = &clk_branch_ops, 212624d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 212724d8fba4SKumar Gala }, 212824d8fba4SKumar Gala }, 212924d8fba4SKumar Gala }; 213024d8fba4SKumar Gala 213124d8fba4SKumar Gala static struct clk_branch usb_hs1_h_clk = { 213224d8fba4SKumar Gala .hwcg_reg = 0x2900, 213324d8fba4SKumar Gala .hwcg_bit = 6, 213424d8fba4SKumar Gala .halt_reg = 0x2fc8, 213524d8fba4SKumar Gala .halt_bit = 1, 213624d8fba4SKumar Gala .clkr = { 213724d8fba4SKumar Gala .enable_reg = 0x2900, 213824d8fba4SKumar Gala .enable_mask = BIT(4), 213924d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 214024d8fba4SKumar Gala .name = "usb_hs1_h_clk", 214124d8fba4SKumar Gala .ops = &clk_branch_ops, 214224d8fba4SKumar Gala .flags = CLK_IS_ROOT, 214324d8fba4SKumar Gala }, 214424d8fba4SKumar Gala }, 214524d8fba4SKumar Gala }; 214624d8fba4SKumar Gala 214724d8fba4SKumar Gala static struct clk_rcg usb_fs1_xcvr_clk_src = { 214824d8fba4SKumar Gala .ns_reg = 0x2968, 214924d8fba4SKumar Gala .md_reg = 0x2964, 215024d8fba4SKumar Gala .mn = { 215124d8fba4SKumar Gala .mnctr_en_bit = 8, 215224d8fba4SKumar Gala .mnctr_reset_bit = 7, 215324d8fba4SKumar Gala .mnctr_mode_shift = 5, 215424d8fba4SKumar Gala .n_val_shift = 16, 215524d8fba4SKumar Gala .m_val_shift = 16, 215624d8fba4SKumar Gala .width = 8, 215724d8fba4SKumar Gala }, 215824d8fba4SKumar Gala .p = { 215924d8fba4SKumar Gala .pre_div_shift = 3, 216024d8fba4SKumar Gala .pre_div_width = 2, 216124d8fba4SKumar Gala }, 216224d8fba4SKumar Gala .s = { 216324d8fba4SKumar Gala .src_sel_shift = 0, 216424d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 216524d8fba4SKumar Gala }, 216624d8fba4SKumar Gala .freq_tbl = clk_tbl_usb, 216724d8fba4SKumar Gala .clkr = { 216824d8fba4SKumar Gala .enable_reg = 0x2968, 216924d8fba4SKumar Gala .enable_mask = BIT(11), 217024d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 217124d8fba4SKumar Gala .name = "usb_fs1_xcvr_src", 217224d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 217324d8fba4SKumar Gala .num_parents = 3, 217424d8fba4SKumar Gala .ops = &clk_rcg_ops, 217524d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 217624d8fba4SKumar Gala }, 217724d8fba4SKumar Gala }, 217824d8fba4SKumar Gala }; 217924d8fba4SKumar Gala 218024d8fba4SKumar Gala static struct clk_branch usb_fs1_xcvr_clk = { 218124d8fba4SKumar Gala .halt_reg = 0x2fcc, 218224d8fba4SKumar Gala .halt_bit = 17, 218324d8fba4SKumar Gala .clkr = { 218424d8fba4SKumar Gala .enable_reg = 0x2968, 218524d8fba4SKumar Gala .enable_mask = BIT(9), 218624d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 218724d8fba4SKumar Gala .name = "usb_fs1_xcvr_clk", 218824d8fba4SKumar Gala .parent_names = (const char *[]){ "usb_fs1_xcvr_src", }, 218924d8fba4SKumar Gala .num_parents = 1, 219024d8fba4SKumar Gala .ops = &clk_branch_ops, 219124d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 219224d8fba4SKumar Gala }, 219324d8fba4SKumar Gala }, 219424d8fba4SKumar Gala }; 219524d8fba4SKumar Gala 219624d8fba4SKumar Gala static struct clk_branch usb_fs1_sys_clk = { 219724d8fba4SKumar Gala .halt_reg = 0x2fcc, 219824d8fba4SKumar Gala .halt_bit = 18, 219924d8fba4SKumar Gala .clkr = { 220024d8fba4SKumar Gala .enable_reg = 0x296c, 220124d8fba4SKumar Gala .enable_mask = BIT(4), 220224d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 220324d8fba4SKumar Gala .name = "usb_fs1_sys_clk", 220424d8fba4SKumar Gala .parent_names = (const char *[]){ "usb_fs1_xcvr_src", }, 220524d8fba4SKumar Gala .num_parents = 1, 220624d8fba4SKumar Gala .ops = &clk_branch_ops, 220724d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 220824d8fba4SKumar Gala }, 220924d8fba4SKumar Gala }, 221024d8fba4SKumar Gala }; 221124d8fba4SKumar Gala 221224d8fba4SKumar Gala static struct clk_branch usb_fs1_h_clk = { 221324d8fba4SKumar Gala .halt_reg = 0x2fcc, 221424d8fba4SKumar Gala .halt_bit = 19, 221524d8fba4SKumar Gala .clkr = { 221624d8fba4SKumar Gala .enable_reg = 0x2960, 221724d8fba4SKumar Gala .enable_mask = BIT(4), 221824d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 221924d8fba4SKumar Gala .name = "usb_fs1_h_clk", 222024d8fba4SKumar Gala .ops = &clk_branch_ops, 222124d8fba4SKumar Gala .flags = CLK_IS_ROOT, 222224d8fba4SKumar Gala }, 222324d8fba4SKumar Gala }, 222424d8fba4SKumar Gala }; 222524d8fba4SKumar Gala 22264c385b25SArchit Taneja static struct clk_branch ebi2_clk = { 22274c385b25SArchit Taneja .hwcg_reg = 0x3b00, 22284c385b25SArchit Taneja .hwcg_bit = 6, 22294c385b25SArchit Taneja .halt_reg = 0x2fcc, 22304c385b25SArchit Taneja .halt_bit = 1, 22314c385b25SArchit Taneja .clkr = { 22324c385b25SArchit Taneja .enable_reg = 0x3b00, 22334c385b25SArchit Taneja .enable_mask = BIT(4), 22344c385b25SArchit Taneja .hw.init = &(struct clk_init_data){ 22354c385b25SArchit Taneja .name = "ebi2_clk", 22364c385b25SArchit Taneja .ops = &clk_branch_ops, 22374c385b25SArchit Taneja .flags = CLK_IS_ROOT, 22384c385b25SArchit Taneja }, 22394c385b25SArchit Taneja }, 22404c385b25SArchit Taneja }; 22414c385b25SArchit Taneja 22424c385b25SArchit Taneja static struct clk_branch ebi2_aon_clk = { 22434c385b25SArchit Taneja .halt_reg = 0x2fcc, 22444c385b25SArchit Taneja .halt_bit = 0, 22454c385b25SArchit Taneja .clkr = { 22464c385b25SArchit Taneja .enable_reg = 0x3b00, 22474c385b25SArchit Taneja .enable_mask = BIT(8), 22484c385b25SArchit Taneja .hw.init = &(struct clk_init_data){ 22494c385b25SArchit Taneja .name = "ebi2_always_on_clk", 22504c385b25SArchit Taneja .ops = &clk_branch_ops, 22514c385b25SArchit Taneja .flags = CLK_IS_ROOT, 22524c385b25SArchit Taneja }, 22534c385b25SArchit Taneja }, 22544c385b25SArchit Taneja }; 22554c385b25SArchit Taneja 2256*f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_gmac[] = { 2257*f7b81d67SStephen Boyd { 133000000, P_PLL0, 1, 50, 301 }, 2258*f7b81d67SStephen Boyd { 266000000, P_PLL0, 1, 127, 382 }, 2259*f7b81d67SStephen Boyd { } 2260*f7b81d67SStephen Boyd }; 2261*f7b81d67SStephen Boyd 2262*f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core1_src = { 2263*f7b81d67SStephen Boyd .ns_reg[0] = 0x3cac, 2264*f7b81d67SStephen Boyd .ns_reg[1] = 0x3cb0, 2265*f7b81d67SStephen Boyd .md_reg[0] = 0x3ca4, 2266*f7b81d67SStephen Boyd .md_reg[1] = 0x3ca8, 2267*f7b81d67SStephen Boyd .bank_reg = 0x3ca0, 2268*f7b81d67SStephen Boyd .mn[0] = { 2269*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2270*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2271*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2272*f7b81d67SStephen Boyd .n_val_shift = 16, 2273*f7b81d67SStephen Boyd .m_val_shift = 16, 2274*f7b81d67SStephen Boyd .width = 8, 2275*f7b81d67SStephen Boyd }, 2276*f7b81d67SStephen Boyd .mn[1] = { 2277*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2278*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2279*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2280*f7b81d67SStephen Boyd .n_val_shift = 16, 2281*f7b81d67SStephen Boyd .m_val_shift = 16, 2282*f7b81d67SStephen Boyd .width = 8, 2283*f7b81d67SStephen Boyd }, 2284*f7b81d67SStephen Boyd .s[0] = { 2285*f7b81d67SStephen Boyd .src_sel_shift = 0, 2286*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2287*f7b81d67SStephen Boyd }, 2288*f7b81d67SStephen Boyd .s[1] = { 2289*f7b81d67SStephen Boyd .src_sel_shift = 0, 2290*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2291*f7b81d67SStephen Boyd }, 2292*f7b81d67SStephen Boyd .p[0] = { 2293*f7b81d67SStephen Boyd .pre_div_shift = 3, 2294*f7b81d67SStephen Boyd .pre_div_width = 2, 2295*f7b81d67SStephen Boyd }, 2296*f7b81d67SStephen Boyd .p[1] = { 2297*f7b81d67SStephen Boyd .pre_div_shift = 3, 2298*f7b81d67SStephen Boyd .pre_div_width = 2, 2299*f7b81d67SStephen Boyd }, 2300*f7b81d67SStephen Boyd .mux_sel_bit = 0, 2301*f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2302*f7b81d67SStephen Boyd .clkr = { 2303*f7b81d67SStephen Boyd .enable_reg = 0x3ca0, 2304*f7b81d67SStephen Boyd .enable_mask = BIT(1), 2305*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2306*f7b81d67SStephen Boyd .name = "gmac_core1_src", 2307*f7b81d67SStephen Boyd .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, 2308*f7b81d67SStephen Boyd .num_parents = 5, 2309*f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2310*f7b81d67SStephen Boyd }, 2311*f7b81d67SStephen Boyd }, 2312*f7b81d67SStephen Boyd }; 2313*f7b81d67SStephen Boyd 2314*f7b81d67SStephen Boyd static struct clk_branch gmac_core1_clk = { 2315*f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2316*f7b81d67SStephen Boyd .halt_bit = 4, 2317*f7b81d67SStephen Boyd .hwcg_reg = 0x3cb4, 2318*f7b81d67SStephen Boyd .hwcg_bit = 6, 2319*f7b81d67SStephen Boyd .clkr = { 2320*f7b81d67SStephen Boyd .enable_reg = 0x3cb4, 2321*f7b81d67SStephen Boyd .enable_mask = BIT(4), 2322*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2323*f7b81d67SStephen Boyd .name = "gmac_core1_clk", 2324*f7b81d67SStephen Boyd .parent_names = (const char *[]){ 2325*f7b81d67SStephen Boyd "gmac_core1_src", 2326*f7b81d67SStephen Boyd }, 2327*f7b81d67SStephen Boyd .num_parents = 1, 2328*f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2329*f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2330*f7b81d67SStephen Boyd }, 2331*f7b81d67SStephen Boyd }, 2332*f7b81d67SStephen Boyd }; 2333*f7b81d67SStephen Boyd 2334*f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core2_src = { 2335*f7b81d67SStephen Boyd .ns_reg[0] = 0x3ccc, 2336*f7b81d67SStephen Boyd .ns_reg[1] = 0x3cd0, 2337*f7b81d67SStephen Boyd .md_reg[0] = 0x3cc4, 2338*f7b81d67SStephen Boyd .md_reg[1] = 0x3cc8, 2339*f7b81d67SStephen Boyd .bank_reg = 0x3ca0, 2340*f7b81d67SStephen Boyd .mn[0] = { 2341*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2342*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2343*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2344*f7b81d67SStephen Boyd .n_val_shift = 16, 2345*f7b81d67SStephen Boyd .m_val_shift = 16, 2346*f7b81d67SStephen Boyd .width = 8, 2347*f7b81d67SStephen Boyd }, 2348*f7b81d67SStephen Boyd .mn[1] = { 2349*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2350*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2351*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2352*f7b81d67SStephen Boyd .n_val_shift = 16, 2353*f7b81d67SStephen Boyd .m_val_shift = 16, 2354*f7b81d67SStephen Boyd .width = 8, 2355*f7b81d67SStephen Boyd }, 2356*f7b81d67SStephen Boyd .s[0] = { 2357*f7b81d67SStephen Boyd .src_sel_shift = 0, 2358*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2359*f7b81d67SStephen Boyd }, 2360*f7b81d67SStephen Boyd .s[1] = { 2361*f7b81d67SStephen Boyd .src_sel_shift = 0, 2362*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2363*f7b81d67SStephen Boyd }, 2364*f7b81d67SStephen Boyd .p[0] = { 2365*f7b81d67SStephen Boyd .pre_div_shift = 3, 2366*f7b81d67SStephen Boyd .pre_div_width = 2, 2367*f7b81d67SStephen Boyd }, 2368*f7b81d67SStephen Boyd .p[1] = { 2369*f7b81d67SStephen Boyd .pre_div_shift = 3, 2370*f7b81d67SStephen Boyd .pre_div_width = 2, 2371*f7b81d67SStephen Boyd }, 2372*f7b81d67SStephen Boyd .mux_sel_bit = 0, 2373*f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2374*f7b81d67SStephen Boyd .clkr = { 2375*f7b81d67SStephen Boyd .enable_reg = 0x3cc0, 2376*f7b81d67SStephen Boyd .enable_mask = BIT(1), 2377*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2378*f7b81d67SStephen Boyd .name = "gmac_core2_src", 2379*f7b81d67SStephen Boyd .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, 2380*f7b81d67SStephen Boyd .num_parents = 5, 2381*f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2382*f7b81d67SStephen Boyd }, 2383*f7b81d67SStephen Boyd }, 2384*f7b81d67SStephen Boyd }; 2385*f7b81d67SStephen Boyd 2386*f7b81d67SStephen Boyd static struct clk_branch gmac_core2_clk = { 2387*f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2388*f7b81d67SStephen Boyd .halt_bit = 5, 2389*f7b81d67SStephen Boyd .hwcg_reg = 0x3cd4, 2390*f7b81d67SStephen Boyd .hwcg_bit = 6, 2391*f7b81d67SStephen Boyd .clkr = { 2392*f7b81d67SStephen Boyd .enable_reg = 0x3cd4, 2393*f7b81d67SStephen Boyd .enable_mask = BIT(4), 2394*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2395*f7b81d67SStephen Boyd .name = "gmac_core2_clk", 2396*f7b81d67SStephen Boyd .parent_names = (const char *[]){ 2397*f7b81d67SStephen Boyd "gmac_core2_src", 2398*f7b81d67SStephen Boyd }, 2399*f7b81d67SStephen Boyd .num_parents = 1, 2400*f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2401*f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2402*f7b81d67SStephen Boyd }, 2403*f7b81d67SStephen Boyd }, 2404*f7b81d67SStephen Boyd }; 2405*f7b81d67SStephen Boyd 2406*f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core3_src = { 2407*f7b81d67SStephen Boyd .ns_reg[0] = 0x3cec, 2408*f7b81d67SStephen Boyd .ns_reg[1] = 0x3cf0, 2409*f7b81d67SStephen Boyd .md_reg[0] = 0x3ce4, 2410*f7b81d67SStephen Boyd .md_reg[1] = 0x3ce8, 2411*f7b81d67SStephen Boyd .bank_reg = 0x3ce0, 2412*f7b81d67SStephen Boyd .mn[0] = { 2413*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2414*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2415*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2416*f7b81d67SStephen Boyd .n_val_shift = 16, 2417*f7b81d67SStephen Boyd .m_val_shift = 16, 2418*f7b81d67SStephen Boyd .width = 8, 2419*f7b81d67SStephen Boyd }, 2420*f7b81d67SStephen Boyd .mn[1] = { 2421*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2422*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2423*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2424*f7b81d67SStephen Boyd .n_val_shift = 16, 2425*f7b81d67SStephen Boyd .m_val_shift = 16, 2426*f7b81d67SStephen Boyd .width = 8, 2427*f7b81d67SStephen Boyd }, 2428*f7b81d67SStephen Boyd .s[0] = { 2429*f7b81d67SStephen Boyd .src_sel_shift = 0, 2430*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2431*f7b81d67SStephen Boyd }, 2432*f7b81d67SStephen Boyd .s[1] = { 2433*f7b81d67SStephen Boyd .src_sel_shift = 0, 2434*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2435*f7b81d67SStephen Boyd }, 2436*f7b81d67SStephen Boyd .p[0] = { 2437*f7b81d67SStephen Boyd .pre_div_shift = 3, 2438*f7b81d67SStephen Boyd .pre_div_width = 2, 2439*f7b81d67SStephen Boyd }, 2440*f7b81d67SStephen Boyd .p[1] = { 2441*f7b81d67SStephen Boyd .pre_div_shift = 3, 2442*f7b81d67SStephen Boyd .pre_div_width = 2, 2443*f7b81d67SStephen Boyd }, 2444*f7b81d67SStephen Boyd .mux_sel_bit = 0, 2445*f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2446*f7b81d67SStephen Boyd .clkr = { 2447*f7b81d67SStephen Boyd .enable_reg = 0x3ce0, 2448*f7b81d67SStephen Boyd .enable_mask = BIT(1), 2449*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2450*f7b81d67SStephen Boyd .name = "gmac_core3_src", 2451*f7b81d67SStephen Boyd .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, 2452*f7b81d67SStephen Boyd .num_parents = 5, 2453*f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2454*f7b81d67SStephen Boyd }, 2455*f7b81d67SStephen Boyd }, 2456*f7b81d67SStephen Boyd }; 2457*f7b81d67SStephen Boyd 2458*f7b81d67SStephen Boyd static struct clk_branch gmac_core3_clk = { 2459*f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2460*f7b81d67SStephen Boyd .halt_bit = 6, 2461*f7b81d67SStephen Boyd .hwcg_reg = 0x3cf4, 2462*f7b81d67SStephen Boyd .hwcg_bit = 6, 2463*f7b81d67SStephen Boyd .clkr = { 2464*f7b81d67SStephen Boyd .enable_reg = 0x3cf4, 2465*f7b81d67SStephen Boyd .enable_mask = BIT(4), 2466*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2467*f7b81d67SStephen Boyd .name = "gmac_core3_clk", 2468*f7b81d67SStephen Boyd .parent_names = (const char *[]){ 2469*f7b81d67SStephen Boyd "gmac_core3_src", 2470*f7b81d67SStephen Boyd }, 2471*f7b81d67SStephen Boyd .num_parents = 1, 2472*f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2473*f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2474*f7b81d67SStephen Boyd }, 2475*f7b81d67SStephen Boyd }, 2476*f7b81d67SStephen Boyd }; 2477*f7b81d67SStephen Boyd 2478*f7b81d67SStephen Boyd static struct clk_dyn_rcg gmac_core4_src = { 2479*f7b81d67SStephen Boyd .ns_reg[0] = 0x3d0c, 2480*f7b81d67SStephen Boyd .ns_reg[1] = 0x3d10, 2481*f7b81d67SStephen Boyd .md_reg[0] = 0x3d04, 2482*f7b81d67SStephen Boyd .md_reg[1] = 0x3d08, 2483*f7b81d67SStephen Boyd .bank_reg = 0x3d00, 2484*f7b81d67SStephen Boyd .mn[0] = { 2485*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2486*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2487*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2488*f7b81d67SStephen Boyd .n_val_shift = 16, 2489*f7b81d67SStephen Boyd .m_val_shift = 16, 2490*f7b81d67SStephen Boyd .width = 8, 2491*f7b81d67SStephen Boyd }, 2492*f7b81d67SStephen Boyd .mn[1] = { 2493*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2494*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2495*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2496*f7b81d67SStephen Boyd .n_val_shift = 16, 2497*f7b81d67SStephen Boyd .m_val_shift = 16, 2498*f7b81d67SStephen Boyd .width = 8, 2499*f7b81d67SStephen Boyd }, 2500*f7b81d67SStephen Boyd .s[0] = { 2501*f7b81d67SStephen Boyd .src_sel_shift = 0, 2502*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2503*f7b81d67SStephen Boyd }, 2504*f7b81d67SStephen Boyd .s[1] = { 2505*f7b81d67SStephen Boyd .src_sel_shift = 0, 2506*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2507*f7b81d67SStephen Boyd }, 2508*f7b81d67SStephen Boyd .p[0] = { 2509*f7b81d67SStephen Boyd .pre_div_shift = 3, 2510*f7b81d67SStephen Boyd .pre_div_width = 2, 2511*f7b81d67SStephen Boyd }, 2512*f7b81d67SStephen Boyd .p[1] = { 2513*f7b81d67SStephen Boyd .pre_div_shift = 3, 2514*f7b81d67SStephen Boyd .pre_div_width = 2, 2515*f7b81d67SStephen Boyd }, 2516*f7b81d67SStephen Boyd .mux_sel_bit = 0, 2517*f7b81d67SStephen Boyd .freq_tbl = clk_tbl_gmac, 2518*f7b81d67SStephen Boyd .clkr = { 2519*f7b81d67SStephen Boyd .enable_reg = 0x3d00, 2520*f7b81d67SStephen Boyd .enable_mask = BIT(1), 2521*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2522*f7b81d67SStephen Boyd .name = "gmac_core4_src", 2523*f7b81d67SStephen Boyd .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, 2524*f7b81d67SStephen Boyd .num_parents = 5, 2525*f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2526*f7b81d67SStephen Boyd }, 2527*f7b81d67SStephen Boyd }, 2528*f7b81d67SStephen Boyd }; 2529*f7b81d67SStephen Boyd 2530*f7b81d67SStephen Boyd static struct clk_branch gmac_core4_clk = { 2531*f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2532*f7b81d67SStephen Boyd .halt_bit = 7, 2533*f7b81d67SStephen Boyd .hwcg_reg = 0x3d14, 2534*f7b81d67SStephen Boyd .hwcg_bit = 6, 2535*f7b81d67SStephen Boyd .clkr = { 2536*f7b81d67SStephen Boyd .enable_reg = 0x3d14, 2537*f7b81d67SStephen Boyd .enable_mask = BIT(4), 2538*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2539*f7b81d67SStephen Boyd .name = "gmac_core4_clk", 2540*f7b81d67SStephen Boyd .parent_names = (const char *[]){ 2541*f7b81d67SStephen Boyd "gmac_core4_src", 2542*f7b81d67SStephen Boyd }, 2543*f7b81d67SStephen Boyd .num_parents = 1, 2544*f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2545*f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2546*f7b81d67SStephen Boyd }, 2547*f7b81d67SStephen Boyd }, 2548*f7b81d67SStephen Boyd }; 2549*f7b81d67SStephen Boyd 2550*f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_nss_tcm[] = { 2551*f7b81d67SStephen Boyd { 266000000, P_PLL0, 3, 0, 0 }, 2552*f7b81d67SStephen Boyd { 400000000, P_PLL0, 2, 0, 0 }, 2553*f7b81d67SStephen Boyd { } 2554*f7b81d67SStephen Boyd }; 2555*f7b81d67SStephen Boyd 2556*f7b81d67SStephen Boyd static struct clk_dyn_rcg nss_tcm_src = { 2557*f7b81d67SStephen Boyd .ns_reg[0] = 0x3dc4, 2558*f7b81d67SStephen Boyd .ns_reg[1] = 0x3dc8, 2559*f7b81d67SStephen Boyd .bank_reg = 0x3dc0, 2560*f7b81d67SStephen Boyd .s[0] = { 2561*f7b81d67SStephen Boyd .src_sel_shift = 0, 2562*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2563*f7b81d67SStephen Boyd }, 2564*f7b81d67SStephen Boyd .s[1] = { 2565*f7b81d67SStephen Boyd .src_sel_shift = 0, 2566*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2567*f7b81d67SStephen Boyd }, 2568*f7b81d67SStephen Boyd .p[0] = { 2569*f7b81d67SStephen Boyd .pre_div_shift = 3, 2570*f7b81d67SStephen Boyd .pre_div_width = 4, 2571*f7b81d67SStephen Boyd }, 2572*f7b81d67SStephen Boyd .p[1] = { 2573*f7b81d67SStephen Boyd .pre_div_shift = 3, 2574*f7b81d67SStephen Boyd .pre_div_width = 4, 2575*f7b81d67SStephen Boyd }, 2576*f7b81d67SStephen Boyd .mux_sel_bit = 0, 2577*f7b81d67SStephen Boyd .freq_tbl = clk_tbl_nss_tcm, 2578*f7b81d67SStephen Boyd .clkr = { 2579*f7b81d67SStephen Boyd .enable_reg = 0x3dc0, 2580*f7b81d67SStephen Boyd .enable_mask = BIT(1), 2581*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2582*f7b81d67SStephen Boyd .name = "nss_tcm_src", 2583*f7b81d67SStephen Boyd .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, 2584*f7b81d67SStephen Boyd .num_parents = 5, 2585*f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2586*f7b81d67SStephen Boyd }, 2587*f7b81d67SStephen Boyd }, 2588*f7b81d67SStephen Boyd }; 2589*f7b81d67SStephen Boyd 2590*f7b81d67SStephen Boyd static struct clk_branch nss_tcm_clk = { 2591*f7b81d67SStephen Boyd .halt_reg = 0x3c20, 2592*f7b81d67SStephen Boyd .halt_bit = 14, 2593*f7b81d67SStephen Boyd .clkr = { 2594*f7b81d67SStephen Boyd .enable_reg = 0x3dd0, 2595*f7b81d67SStephen Boyd .enable_mask = BIT(6) | BIT(4), 2596*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2597*f7b81d67SStephen Boyd .name = "nss_tcm_clk", 2598*f7b81d67SStephen Boyd .parent_names = (const char *[]){ 2599*f7b81d67SStephen Boyd "nss_tcm_src", 2600*f7b81d67SStephen Boyd }, 2601*f7b81d67SStephen Boyd .num_parents = 1, 2602*f7b81d67SStephen Boyd .ops = &clk_branch_ops, 2603*f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT, 2604*f7b81d67SStephen Boyd }, 2605*f7b81d67SStephen Boyd }, 2606*f7b81d67SStephen Boyd }; 2607*f7b81d67SStephen Boyd 2608*f7b81d67SStephen Boyd static const struct freq_tbl clk_tbl_nss[] = { 2609*f7b81d67SStephen Boyd { 110000000, P_PLL18, 1, 1, 5 }, 2610*f7b81d67SStephen Boyd { 275000000, P_PLL18, 2, 0, 0 }, 2611*f7b81d67SStephen Boyd { 550000000, P_PLL18, 1, 0, 0 }, 2612*f7b81d67SStephen Boyd { 733000000, P_PLL18, 1, 0, 0 }, 2613*f7b81d67SStephen Boyd { } 2614*f7b81d67SStephen Boyd }; 2615*f7b81d67SStephen Boyd 2616*f7b81d67SStephen Boyd static struct clk_dyn_rcg ubi32_core1_src_clk = { 2617*f7b81d67SStephen Boyd .ns_reg[0] = 0x3d2c, 2618*f7b81d67SStephen Boyd .ns_reg[1] = 0x3d30, 2619*f7b81d67SStephen Boyd .md_reg[0] = 0x3d24, 2620*f7b81d67SStephen Boyd .md_reg[1] = 0x3d28, 2621*f7b81d67SStephen Boyd .bank_reg = 0x3d20, 2622*f7b81d67SStephen Boyd .mn[0] = { 2623*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2624*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2625*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2626*f7b81d67SStephen Boyd .n_val_shift = 16, 2627*f7b81d67SStephen Boyd .m_val_shift = 16, 2628*f7b81d67SStephen Boyd .width = 8, 2629*f7b81d67SStephen Boyd }, 2630*f7b81d67SStephen Boyd .mn[1] = { 2631*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2632*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2633*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2634*f7b81d67SStephen Boyd .n_val_shift = 16, 2635*f7b81d67SStephen Boyd .m_val_shift = 16, 2636*f7b81d67SStephen Boyd .width = 8, 2637*f7b81d67SStephen Boyd }, 2638*f7b81d67SStephen Boyd .s[0] = { 2639*f7b81d67SStephen Boyd .src_sel_shift = 0, 2640*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2641*f7b81d67SStephen Boyd }, 2642*f7b81d67SStephen Boyd .s[1] = { 2643*f7b81d67SStephen Boyd .src_sel_shift = 0, 2644*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2645*f7b81d67SStephen Boyd }, 2646*f7b81d67SStephen Boyd .p[0] = { 2647*f7b81d67SStephen Boyd .pre_div_shift = 3, 2648*f7b81d67SStephen Boyd .pre_div_width = 2, 2649*f7b81d67SStephen Boyd }, 2650*f7b81d67SStephen Boyd .p[1] = { 2651*f7b81d67SStephen Boyd .pre_div_shift = 3, 2652*f7b81d67SStephen Boyd .pre_div_width = 2, 2653*f7b81d67SStephen Boyd }, 2654*f7b81d67SStephen Boyd .mux_sel_bit = 0, 2655*f7b81d67SStephen Boyd .freq_tbl = clk_tbl_nss, 2656*f7b81d67SStephen Boyd .clkr = { 2657*f7b81d67SStephen Boyd .enable_reg = 0x3d20, 2658*f7b81d67SStephen Boyd .enable_mask = BIT(1), 2659*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2660*f7b81d67SStephen Boyd .name = "ubi32_core1_src_clk", 2661*f7b81d67SStephen Boyd .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, 2662*f7b81d67SStephen Boyd .num_parents = 5, 2663*f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2664*f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE, 2665*f7b81d67SStephen Boyd }, 2666*f7b81d67SStephen Boyd }, 2667*f7b81d67SStephen Boyd }; 2668*f7b81d67SStephen Boyd 2669*f7b81d67SStephen Boyd static struct clk_dyn_rcg ubi32_core2_src_clk = { 2670*f7b81d67SStephen Boyd .ns_reg[0] = 0x3d4c, 2671*f7b81d67SStephen Boyd .ns_reg[1] = 0x3d50, 2672*f7b81d67SStephen Boyd .md_reg[0] = 0x3d44, 2673*f7b81d67SStephen Boyd .md_reg[1] = 0x3d48, 2674*f7b81d67SStephen Boyd .bank_reg = 0x3d40, 2675*f7b81d67SStephen Boyd .mn[0] = { 2676*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2677*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2678*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2679*f7b81d67SStephen Boyd .n_val_shift = 16, 2680*f7b81d67SStephen Boyd .m_val_shift = 16, 2681*f7b81d67SStephen Boyd .width = 8, 2682*f7b81d67SStephen Boyd }, 2683*f7b81d67SStephen Boyd .mn[1] = { 2684*f7b81d67SStephen Boyd .mnctr_en_bit = 8, 2685*f7b81d67SStephen Boyd .mnctr_reset_bit = 7, 2686*f7b81d67SStephen Boyd .mnctr_mode_shift = 5, 2687*f7b81d67SStephen Boyd .n_val_shift = 16, 2688*f7b81d67SStephen Boyd .m_val_shift = 16, 2689*f7b81d67SStephen Boyd .width = 8, 2690*f7b81d67SStephen Boyd }, 2691*f7b81d67SStephen Boyd .s[0] = { 2692*f7b81d67SStephen Boyd .src_sel_shift = 0, 2693*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2694*f7b81d67SStephen Boyd }, 2695*f7b81d67SStephen Boyd .s[1] = { 2696*f7b81d67SStephen Boyd .src_sel_shift = 0, 2697*f7b81d67SStephen Boyd .parent_map = gcc_pxo_pll8_pll14_pll18_pll0_map, 2698*f7b81d67SStephen Boyd }, 2699*f7b81d67SStephen Boyd .p[0] = { 2700*f7b81d67SStephen Boyd .pre_div_shift = 3, 2701*f7b81d67SStephen Boyd .pre_div_width = 2, 2702*f7b81d67SStephen Boyd }, 2703*f7b81d67SStephen Boyd .p[1] = { 2704*f7b81d67SStephen Boyd .pre_div_shift = 3, 2705*f7b81d67SStephen Boyd .pre_div_width = 2, 2706*f7b81d67SStephen Boyd }, 2707*f7b81d67SStephen Boyd .mux_sel_bit = 0, 2708*f7b81d67SStephen Boyd .freq_tbl = clk_tbl_nss, 2709*f7b81d67SStephen Boyd .clkr = { 2710*f7b81d67SStephen Boyd .enable_reg = 0x3d40, 2711*f7b81d67SStephen Boyd .enable_mask = BIT(1), 2712*f7b81d67SStephen Boyd .hw.init = &(struct clk_init_data){ 2713*f7b81d67SStephen Boyd .name = "ubi32_core2_src_clk", 2714*f7b81d67SStephen Boyd .parent_names = gcc_pxo_pll8_pll14_pll18_pll0, 2715*f7b81d67SStephen Boyd .num_parents = 5, 2716*f7b81d67SStephen Boyd .ops = &clk_dyn_rcg_ops, 2717*f7b81d67SStephen Boyd .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE, 2718*f7b81d67SStephen Boyd }, 2719*f7b81d67SStephen Boyd }, 2720*f7b81d67SStephen Boyd }; 2721*f7b81d67SStephen Boyd 272224d8fba4SKumar Gala static struct clk_regmap *gcc_ipq806x_clks[] = { 2723dc1b3f65SAndy Gross [PLL0] = &pll0.clkr, 2724dc1b3f65SAndy Gross [PLL0_VOTE] = &pll0_vote, 272524d8fba4SKumar Gala [PLL3] = &pll3.clkr, 2726c99e515aSRajendra Nayak [PLL4_VOTE] = &pll4_vote, 272724d8fba4SKumar Gala [PLL8] = &pll8.clkr, 272824d8fba4SKumar Gala [PLL8_VOTE] = &pll8_vote, 272924d8fba4SKumar Gala [PLL14] = &pll14.clkr, 273024d8fba4SKumar Gala [PLL14_VOTE] = &pll14_vote, 2731*f7b81d67SStephen Boyd [PLL18] = &pll18.clkr, 273224d8fba4SKumar Gala [GSBI1_UART_SRC] = &gsbi1_uart_src.clkr, 273324d8fba4SKumar Gala [GSBI1_UART_CLK] = &gsbi1_uart_clk.clkr, 273424d8fba4SKumar Gala [GSBI2_UART_SRC] = &gsbi2_uart_src.clkr, 273524d8fba4SKumar Gala [GSBI2_UART_CLK] = &gsbi2_uart_clk.clkr, 273624d8fba4SKumar Gala [GSBI4_UART_SRC] = &gsbi4_uart_src.clkr, 273724d8fba4SKumar Gala [GSBI4_UART_CLK] = &gsbi4_uart_clk.clkr, 273824d8fba4SKumar Gala [GSBI5_UART_SRC] = &gsbi5_uart_src.clkr, 273924d8fba4SKumar Gala [GSBI5_UART_CLK] = &gsbi5_uart_clk.clkr, 274024d8fba4SKumar Gala [GSBI6_UART_SRC] = &gsbi6_uart_src.clkr, 274124d8fba4SKumar Gala [GSBI6_UART_CLK] = &gsbi6_uart_clk.clkr, 274224d8fba4SKumar Gala [GSBI7_UART_SRC] = &gsbi7_uart_src.clkr, 274324d8fba4SKumar Gala [GSBI7_UART_CLK] = &gsbi7_uart_clk.clkr, 274424d8fba4SKumar Gala [GSBI1_QUP_SRC] = &gsbi1_qup_src.clkr, 274524d8fba4SKumar Gala [GSBI1_QUP_CLK] = &gsbi1_qup_clk.clkr, 274624d8fba4SKumar Gala [GSBI2_QUP_SRC] = &gsbi2_qup_src.clkr, 274724d8fba4SKumar Gala [GSBI2_QUP_CLK] = &gsbi2_qup_clk.clkr, 274824d8fba4SKumar Gala [GSBI4_QUP_SRC] = &gsbi4_qup_src.clkr, 274924d8fba4SKumar Gala [GSBI4_QUP_CLK] = &gsbi4_qup_clk.clkr, 275024d8fba4SKumar Gala [GSBI5_QUP_SRC] = &gsbi5_qup_src.clkr, 275124d8fba4SKumar Gala [GSBI5_QUP_CLK] = &gsbi5_qup_clk.clkr, 275224d8fba4SKumar Gala [GSBI6_QUP_SRC] = &gsbi6_qup_src.clkr, 275324d8fba4SKumar Gala [GSBI6_QUP_CLK] = &gsbi6_qup_clk.clkr, 275424d8fba4SKumar Gala [GSBI7_QUP_SRC] = &gsbi7_qup_src.clkr, 275524d8fba4SKumar Gala [GSBI7_QUP_CLK] = &gsbi7_qup_clk.clkr, 275624d8fba4SKumar Gala [GP0_SRC] = &gp0_src.clkr, 275724d8fba4SKumar Gala [GP0_CLK] = &gp0_clk.clkr, 275824d8fba4SKumar Gala [GP1_SRC] = &gp1_src.clkr, 275924d8fba4SKumar Gala [GP1_CLK] = &gp1_clk.clkr, 276024d8fba4SKumar Gala [GP2_SRC] = &gp2_src.clkr, 276124d8fba4SKumar Gala [GP2_CLK] = &gp2_clk.clkr, 276224d8fba4SKumar Gala [PMEM_A_CLK] = &pmem_clk.clkr, 276324d8fba4SKumar Gala [PRNG_SRC] = &prng_src.clkr, 276424d8fba4SKumar Gala [PRNG_CLK] = &prng_clk.clkr, 276524d8fba4SKumar Gala [SDC1_SRC] = &sdc1_src.clkr, 276624d8fba4SKumar Gala [SDC1_CLK] = &sdc1_clk.clkr, 276724d8fba4SKumar Gala [SDC3_SRC] = &sdc3_src.clkr, 276824d8fba4SKumar Gala [SDC3_CLK] = &sdc3_clk.clkr, 276924d8fba4SKumar Gala [TSIF_REF_SRC] = &tsif_ref_src.clkr, 277024d8fba4SKumar Gala [TSIF_REF_CLK] = &tsif_ref_clk.clkr, 277124d8fba4SKumar Gala [DMA_BAM_H_CLK] = &dma_bam_h_clk.clkr, 277224d8fba4SKumar Gala [GSBI1_H_CLK] = &gsbi1_h_clk.clkr, 277324d8fba4SKumar Gala [GSBI2_H_CLK] = &gsbi2_h_clk.clkr, 277424d8fba4SKumar Gala [GSBI4_H_CLK] = &gsbi4_h_clk.clkr, 277524d8fba4SKumar Gala [GSBI5_H_CLK] = &gsbi5_h_clk.clkr, 277624d8fba4SKumar Gala [GSBI6_H_CLK] = &gsbi6_h_clk.clkr, 277724d8fba4SKumar Gala [GSBI7_H_CLK] = &gsbi7_h_clk.clkr, 277824d8fba4SKumar Gala [TSIF_H_CLK] = &tsif_h_clk.clkr, 277924d8fba4SKumar Gala [SDC1_H_CLK] = &sdc1_h_clk.clkr, 278024d8fba4SKumar Gala [SDC3_H_CLK] = &sdc3_h_clk.clkr, 278124d8fba4SKumar Gala [ADM0_CLK] = &adm0_clk.clkr, 278224d8fba4SKumar Gala [ADM0_PBUS_CLK] = &adm0_pbus_clk.clkr, 278324d8fba4SKumar Gala [PCIE_A_CLK] = &pcie_a_clk.clkr, 278424d8fba4SKumar Gala [PCIE_AUX_CLK] = &pcie_aux_clk.clkr, 278524d8fba4SKumar Gala [PCIE_H_CLK] = &pcie_h_clk.clkr, 278624d8fba4SKumar Gala [PCIE_PHY_CLK] = &pcie_phy_clk.clkr, 278724d8fba4SKumar Gala [SFAB_SATA_S_H_CLK] = &sfab_sata_s_h_clk.clkr, 278824d8fba4SKumar Gala [PMIC_ARB0_H_CLK] = &pmic_arb0_h_clk.clkr, 278924d8fba4SKumar Gala [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr, 279024d8fba4SKumar Gala [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr, 279124d8fba4SKumar Gala [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr, 279224d8fba4SKumar Gala [SATA_H_CLK] = &sata_h_clk.clkr, 279324d8fba4SKumar Gala [SATA_CLK_SRC] = &sata_ref_src.clkr, 279424d8fba4SKumar Gala [SATA_RXOOB_CLK] = &sata_rxoob_clk.clkr, 279524d8fba4SKumar Gala [SATA_PMALIVE_CLK] = &sata_pmalive_clk.clkr, 279624d8fba4SKumar Gala [SATA_PHY_REF_CLK] = &sata_phy_ref_clk.clkr, 279724d8fba4SKumar Gala [SATA_A_CLK] = &sata_a_clk.clkr, 279824d8fba4SKumar Gala [SATA_PHY_CFG_CLK] = &sata_phy_cfg_clk.clkr, 279924d8fba4SKumar Gala [PCIE_ALT_REF_SRC] = &pcie_ref_src.clkr, 280024d8fba4SKumar Gala [PCIE_ALT_REF_CLK] = &pcie_ref_src_clk.clkr, 280124d8fba4SKumar Gala [PCIE_1_A_CLK] = &pcie1_a_clk.clkr, 280224d8fba4SKumar Gala [PCIE_1_AUX_CLK] = &pcie1_aux_clk.clkr, 280324d8fba4SKumar Gala [PCIE_1_H_CLK] = &pcie1_h_clk.clkr, 280424d8fba4SKumar Gala [PCIE_1_PHY_CLK] = &pcie1_phy_clk.clkr, 280524d8fba4SKumar Gala [PCIE_1_ALT_REF_SRC] = &pcie1_ref_src.clkr, 280624d8fba4SKumar Gala [PCIE_1_ALT_REF_CLK] = &pcie1_ref_src_clk.clkr, 280724d8fba4SKumar Gala [PCIE_2_A_CLK] = &pcie2_a_clk.clkr, 280824d8fba4SKumar Gala [PCIE_2_AUX_CLK] = &pcie2_aux_clk.clkr, 280924d8fba4SKumar Gala [PCIE_2_H_CLK] = &pcie2_h_clk.clkr, 281024d8fba4SKumar Gala [PCIE_2_PHY_CLK] = &pcie2_phy_clk.clkr, 281124d8fba4SKumar Gala [PCIE_2_ALT_REF_SRC] = &pcie2_ref_src.clkr, 281224d8fba4SKumar Gala [PCIE_2_ALT_REF_CLK] = &pcie2_ref_src_clk.clkr, 281324d8fba4SKumar Gala [USB30_MASTER_SRC] = &usb30_master_clk_src.clkr, 281424d8fba4SKumar Gala [USB30_0_MASTER_CLK] = &usb30_0_branch_clk.clkr, 281524d8fba4SKumar Gala [USB30_1_MASTER_CLK] = &usb30_1_branch_clk.clkr, 281624d8fba4SKumar Gala [USB30_UTMI_SRC] = &usb30_utmi_clk.clkr, 281724d8fba4SKumar Gala [USB30_0_UTMI_CLK] = &usb30_0_utmi_clk_ctl.clkr, 281824d8fba4SKumar Gala [USB30_1_UTMI_CLK] = &usb30_1_utmi_clk_ctl.clkr, 281924d8fba4SKumar Gala [USB_HS1_H_CLK] = &usb_hs1_h_clk.clkr, 282024d8fba4SKumar Gala [USB_HS1_XCVR_SRC] = &usb_hs1_xcvr_clk_src.clkr, 282124d8fba4SKumar Gala [USB_HS1_XCVR_CLK] = &usb_hs1_xcvr_clk.clkr, 282224d8fba4SKumar Gala [USB_FS1_H_CLK] = &usb_fs1_h_clk.clkr, 282324d8fba4SKumar Gala [USB_FS1_XCVR_SRC] = &usb_fs1_xcvr_clk_src.clkr, 282424d8fba4SKumar Gala [USB_FS1_XCVR_CLK] = &usb_fs1_xcvr_clk.clkr, 282524d8fba4SKumar Gala [USB_FS1_SYSTEM_CLK] = &usb_fs1_sys_clk.clkr, 28264c385b25SArchit Taneja [EBI2_CLK] = &ebi2_clk.clkr, 28274c385b25SArchit Taneja [EBI2_AON_CLK] = &ebi2_aon_clk.clkr, 2828*f7b81d67SStephen Boyd [GMAC_CORE1_CLK_SRC] = &gmac_core1_src.clkr, 2829*f7b81d67SStephen Boyd [GMAC_CORE1_CLK] = &gmac_core1_clk.clkr, 2830*f7b81d67SStephen Boyd [GMAC_CORE2_CLK_SRC] = &gmac_core2_src.clkr, 2831*f7b81d67SStephen Boyd [GMAC_CORE2_CLK] = &gmac_core2_clk.clkr, 2832*f7b81d67SStephen Boyd [GMAC_CORE3_CLK_SRC] = &gmac_core3_src.clkr, 2833*f7b81d67SStephen Boyd [GMAC_CORE3_CLK] = &gmac_core3_clk.clkr, 2834*f7b81d67SStephen Boyd [GMAC_CORE4_CLK_SRC] = &gmac_core4_src.clkr, 2835*f7b81d67SStephen Boyd [GMAC_CORE4_CLK] = &gmac_core4_clk.clkr, 2836*f7b81d67SStephen Boyd [UBI32_CORE1_CLK_SRC] = &ubi32_core1_src_clk.clkr, 2837*f7b81d67SStephen Boyd [UBI32_CORE2_CLK_SRC] = &ubi32_core2_src_clk.clkr, 2838*f7b81d67SStephen Boyd [NSSTCM_CLK_SRC] = &nss_tcm_src.clkr, 2839*f7b81d67SStephen Boyd [NSSTCM_CLK] = &nss_tcm_clk.clkr, 284024d8fba4SKumar Gala }; 284124d8fba4SKumar Gala 284224d8fba4SKumar Gala static const struct qcom_reset_map gcc_ipq806x_resets[] = { 284324d8fba4SKumar Gala [QDSS_STM_RESET] = { 0x2060, 6 }, 284424d8fba4SKumar Gala [AFAB_SMPSS_S_RESET] = { 0x20b8, 2 }, 284524d8fba4SKumar Gala [AFAB_SMPSS_M1_RESET] = { 0x20b8, 1 }, 284624d8fba4SKumar Gala [AFAB_SMPSS_M0_RESET] = { 0x20b8, 0 }, 284724d8fba4SKumar Gala [AFAB_EBI1_CH0_RESET] = { 0x20c0, 7 }, 284824d8fba4SKumar Gala [AFAB_EBI1_CH1_RESET] = { 0x20c4, 7 }, 284924d8fba4SKumar Gala [SFAB_ADM0_M0_RESET] = { 0x21e0, 7 }, 285024d8fba4SKumar Gala [SFAB_ADM0_M1_RESET] = { 0x21e4, 7 }, 285124d8fba4SKumar Gala [SFAB_ADM0_M2_RESET] = { 0x21e8, 7 }, 285224d8fba4SKumar Gala [ADM0_C2_RESET] = { 0x220c, 4 }, 285324d8fba4SKumar Gala [ADM0_C1_RESET] = { 0x220c, 3 }, 285424d8fba4SKumar Gala [ADM0_C0_RESET] = { 0x220c, 2 }, 285524d8fba4SKumar Gala [ADM0_PBUS_RESET] = { 0x220c, 1 }, 285624d8fba4SKumar Gala [ADM0_RESET] = { 0x220c, 0 }, 285724d8fba4SKumar Gala [QDSS_CLKS_SW_RESET] = { 0x2260, 5 }, 285824d8fba4SKumar Gala [QDSS_POR_RESET] = { 0x2260, 4 }, 285924d8fba4SKumar Gala [QDSS_TSCTR_RESET] = { 0x2260, 3 }, 286024d8fba4SKumar Gala [QDSS_HRESET_RESET] = { 0x2260, 2 }, 286124d8fba4SKumar Gala [QDSS_AXI_RESET] = { 0x2260, 1 }, 286224d8fba4SKumar Gala [QDSS_DBG_RESET] = { 0x2260, 0 }, 286324d8fba4SKumar Gala [SFAB_PCIE_M_RESET] = { 0x22d8, 1 }, 286424d8fba4SKumar Gala [SFAB_PCIE_S_RESET] = { 0x22d8, 0 }, 286524d8fba4SKumar Gala [PCIE_EXT_RESET] = { 0x22dc, 6 }, 286624d8fba4SKumar Gala [PCIE_PHY_RESET] = { 0x22dc, 5 }, 286724d8fba4SKumar Gala [PCIE_PCI_RESET] = { 0x22dc, 4 }, 286824d8fba4SKumar Gala [PCIE_POR_RESET] = { 0x22dc, 3 }, 286924d8fba4SKumar Gala [PCIE_HCLK_RESET] = { 0x22dc, 2 }, 287024d8fba4SKumar Gala [PCIE_ACLK_RESET] = { 0x22dc, 0 }, 287124d8fba4SKumar Gala [SFAB_LPASS_RESET] = { 0x23a0, 7 }, 287224d8fba4SKumar Gala [SFAB_AFAB_M_RESET] = { 0x23e0, 7 }, 287324d8fba4SKumar Gala [AFAB_SFAB_M0_RESET] = { 0x2420, 7 }, 287424d8fba4SKumar Gala [AFAB_SFAB_M1_RESET] = { 0x2424, 7 }, 287524d8fba4SKumar Gala [SFAB_SATA_S_RESET] = { 0x2480, 7 }, 287624d8fba4SKumar Gala [SFAB_DFAB_M_RESET] = { 0x2500, 7 }, 287724d8fba4SKumar Gala [DFAB_SFAB_M_RESET] = { 0x2520, 7 }, 287824d8fba4SKumar Gala [DFAB_SWAY0_RESET] = { 0x2540, 7 }, 287924d8fba4SKumar Gala [DFAB_SWAY1_RESET] = { 0x2544, 7 }, 288024d8fba4SKumar Gala [DFAB_ARB0_RESET] = { 0x2560, 7 }, 288124d8fba4SKumar Gala [DFAB_ARB1_RESET] = { 0x2564, 7 }, 288224d8fba4SKumar Gala [PPSS_PROC_RESET] = { 0x2594, 1 }, 288324d8fba4SKumar Gala [PPSS_RESET] = { 0x2594, 0 }, 288424d8fba4SKumar Gala [DMA_BAM_RESET] = { 0x25c0, 7 }, 288524d8fba4SKumar Gala [SPS_TIC_H_RESET] = { 0x2600, 7 }, 288624d8fba4SKumar Gala [SFAB_CFPB_M_RESET] = { 0x2680, 7 }, 288724d8fba4SKumar Gala [SFAB_CFPB_S_RESET] = { 0x26c0, 7 }, 288824d8fba4SKumar Gala [TSIF_H_RESET] = { 0x2700, 7 }, 288924d8fba4SKumar Gala [CE1_H_RESET] = { 0x2720, 7 }, 289024d8fba4SKumar Gala [CE1_CORE_RESET] = { 0x2724, 7 }, 289124d8fba4SKumar Gala [CE1_SLEEP_RESET] = { 0x2728, 7 }, 289224d8fba4SKumar Gala [CE2_H_RESET] = { 0x2740, 7 }, 289324d8fba4SKumar Gala [CE2_CORE_RESET] = { 0x2744, 7 }, 289424d8fba4SKumar Gala [SFAB_SFPB_M_RESET] = { 0x2780, 7 }, 289524d8fba4SKumar Gala [SFAB_SFPB_S_RESET] = { 0x27a0, 7 }, 289624d8fba4SKumar Gala [RPM_PROC_RESET] = { 0x27c0, 7 }, 289724d8fba4SKumar Gala [PMIC_SSBI2_RESET] = { 0x280c, 12 }, 289824d8fba4SKumar Gala [SDC1_RESET] = { 0x2830, 0 }, 289924d8fba4SKumar Gala [SDC2_RESET] = { 0x2850, 0 }, 290024d8fba4SKumar Gala [SDC3_RESET] = { 0x2870, 0 }, 290124d8fba4SKumar Gala [SDC4_RESET] = { 0x2890, 0 }, 290224d8fba4SKumar Gala [USB_HS1_RESET] = { 0x2910, 0 }, 290324d8fba4SKumar Gala [USB_HSIC_RESET] = { 0x2934, 0 }, 290424d8fba4SKumar Gala [USB_FS1_XCVR_RESET] = { 0x2974, 1 }, 290524d8fba4SKumar Gala [USB_FS1_RESET] = { 0x2974, 0 }, 290624d8fba4SKumar Gala [GSBI1_RESET] = { 0x29dc, 0 }, 290724d8fba4SKumar Gala [GSBI2_RESET] = { 0x29fc, 0 }, 290824d8fba4SKumar Gala [GSBI3_RESET] = { 0x2a1c, 0 }, 290924d8fba4SKumar Gala [GSBI4_RESET] = { 0x2a3c, 0 }, 291024d8fba4SKumar Gala [GSBI5_RESET] = { 0x2a5c, 0 }, 291124d8fba4SKumar Gala [GSBI6_RESET] = { 0x2a7c, 0 }, 291224d8fba4SKumar Gala [GSBI7_RESET] = { 0x2a9c, 0 }, 291324d8fba4SKumar Gala [SPDM_RESET] = { 0x2b6c, 0 }, 291424d8fba4SKumar Gala [SEC_CTRL_RESET] = { 0x2b80, 7 }, 291524d8fba4SKumar Gala [TLMM_H_RESET] = { 0x2ba0, 7 }, 291624d8fba4SKumar Gala [SFAB_SATA_M_RESET] = { 0x2c18, 0 }, 291724d8fba4SKumar Gala [SATA_RESET] = { 0x2c1c, 0 }, 291824d8fba4SKumar Gala [TSSC_RESET] = { 0x2ca0, 7 }, 291924d8fba4SKumar Gala [PDM_RESET] = { 0x2cc0, 12 }, 292024d8fba4SKumar Gala [MPM_H_RESET] = { 0x2da0, 7 }, 292124d8fba4SKumar Gala [MPM_RESET] = { 0x2da4, 0 }, 292224d8fba4SKumar Gala [SFAB_SMPSS_S_RESET] = { 0x2e00, 7 }, 292324d8fba4SKumar Gala [PRNG_RESET] = { 0x2e80, 12 }, 292424d8fba4SKumar Gala [SFAB_CE3_M_RESET] = { 0x36c8, 1 }, 292524d8fba4SKumar Gala [SFAB_CE3_S_RESET] = { 0x36c8, 0 }, 292624d8fba4SKumar Gala [CE3_SLEEP_RESET] = { 0x36d0, 7 }, 292724d8fba4SKumar Gala [PCIE_1_M_RESET] = { 0x3a98, 1 }, 292824d8fba4SKumar Gala [PCIE_1_S_RESET] = { 0x3a98, 0 }, 292924d8fba4SKumar Gala [PCIE_1_EXT_RESET] = { 0x3a9c, 6 }, 293024d8fba4SKumar Gala [PCIE_1_PHY_RESET] = { 0x3a9c, 5 }, 293124d8fba4SKumar Gala [PCIE_1_PCI_RESET] = { 0x3a9c, 4 }, 293224d8fba4SKumar Gala [PCIE_1_POR_RESET] = { 0x3a9c, 3 }, 293324d8fba4SKumar Gala [PCIE_1_HCLK_RESET] = { 0x3a9c, 2 }, 293424d8fba4SKumar Gala [PCIE_1_ACLK_RESET] = { 0x3a9c, 0 }, 293524d8fba4SKumar Gala [PCIE_2_M_RESET] = { 0x3ad8, 1 }, 293624d8fba4SKumar Gala [PCIE_2_S_RESET] = { 0x3ad8, 0 }, 293724d8fba4SKumar Gala [PCIE_2_EXT_RESET] = { 0x3adc, 6 }, 293824d8fba4SKumar Gala [PCIE_2_PHY_RESET] = { 0x3adc, 5 }, 293924d8fba4SKumar Gala [PCIE_2_PCI_RESET] = { 0x3adc, 4 }, 294024d8fba4SKumar Gala [PCIE_2_POR_RESET] = { 0x3adc, 3 }, 294124d8fba4SKumar Gala [PCIE_2_HCLK_RESET] = { 0x3adc, 2 }, 294224d8fba4SKumar Gala [PCIE_2_ACLK_RESET] = { 0x3adc, 0 }, 294324d8fba4SKumar Gala [SFAB_USB30_S_RESET] = { 0x3b54, 1 }, 294424d8fba4SKumar Gala [SFAB_USB30_M_RESET] = { 0x3b54, 0 }, 294524d8fba4SKumar Gala [USB30_0_PORT2_HS_PHY_RESET] = { 0x3b50, 5 }, 294624d8fba4SKumar Gala [USB30_0_MASTER_RESET] = { 0x3b50, 4 }, 294724d8fba4SKumar Gala [USB30_0_SLEEP_RESET] = { 0x3b50, 3 }, 294824d8fba4SKumar Gala [USB30_0_UTMI_PHY_RESET] = { 0x3b50, 2 }, 294924d8fba4SKumar Gala [USB30_0_POWERON_RESET] = { 0x3b50, 1 }, 295024d8fba4SKumar Gala [USB30_0_PHY_RESET] = { 0x3b50, 0 }, 295124d8fba4SKumar Gala [USB30_1_MASTER_RESET] = { 0x3b58, 4 }, 295224d8fba4SKumar Gala [USB30_1_SLEEP_RESET] = { 0x3b58, 3 }, 295324d8fba4SKumar Gala [USB30_1_UTMI_PHY_RESET] = { 0x3b58, 2 }, 295424d8fba4SKumar Gala [USB30_1_POWERON_RESET] = { 0x3b58, 1 }, 295524d8fba4SKumar Gala [USB30_1_PHY_RESET] = { 0x3b58, 0 }, 295624d8fba4SKumar Gala [NSSFB0_RESET] = { 0x3b60, 6 }, 295724d8fba4SKumar Gala [NSSFB1_RESET] = { 0x3b60, 7 }, 2958*f7b81d67SStephen Boyd [UBI32_CORE1_CLKRST_CLAMP_RESET] = { 0x3d3c, 3}, 2959*f7b81d67SStephen Boyd [UBI32_CORE1_CLAMP_RESET] = { 0x3d3c, 2 }, 2960*f7b81d67SStephen Boyd [UBI32_CORE1_AHB_RESET] = { 0x3d3c, 1 }, 2961*f7b81d67SStephen Boyd [UBI32_CORE1_AXI_RESET] = { 0x3d3c, 0 }, 2962*f7b81d67SStephen Boyd [UBI32_CORE2_CLKRST_CLAMP_RESET] = { 0x3d5c, 3 }, 2963*f7b81d67SStephen Boyd [UBI32_CORE2_CLAMP_RESET] = { 0x3d5c, 2 }, 2964*f7b81d67SStephen Boyd [UBI32_CORE2_AHB_RESET] = { 0x3d5c, 1 }, 2965*f7b81d67SStephen Boyd [UBI32_CORE2_AXI_RESET] = { 0x3d5c, 0 }, 2966*f7b81d67SStephen Boyd [GMAC_CORE1_RESET] = { 0x3cbc, 0 }, 2967*f7b81d67SStephen Boyd [GMAC_CORE2_RESET] = { 0x3cdc, 0 }, 2968*f7b81d67SStephen Boyd [GMAC_CORE3_RESET] = { 0x3cfc, 0 }, 2969*f7b81d67SStephen Boyd [GMAC_CORE4_RESET] = { 0x3d1c, 0 }, 2970*f7b81d67SStephen Boyd [GMAC_AHB_RESET] = { 0x3e24, 0 }, 2971*f7b81d67SStephen Boyd [NSS_CH0_RST_RX_CLK_N_RESET] = { 0x3b60, 0 }, 2972*f7b81d67SStephen Boyd [NSS_CH0_RST_TX_CLK_N_RESET] = { 0x3b60, 1 }, 2973*f7b81d67SStephen Boyd [NSS_CH0_RST_RX_125M_N_RESET] = { 0x3b60, 2 }, 2974*f7b81d67SStephen Boyd [NSS_CH0_HW_RST_RX_125M_N_RESET] = { 0x3b60, 3 }, 2975*f7b81d67SStephen Boyd [NSS_CH0_RST_TX_125M_N_RESET] = { 0x3b60, 4 }, 2976*f7b81d67SStephen Boyd [NSS_CH1_RST_RX_CLK_N_RESET] = { 0x3b60, 5 }, 2977*f7b81d67SStephen Boyd [NSS_CH1_RST_TX_CLK_N_RESET] = { 0x3b60, 6 }, 2978*f7b81d67SStephen Boyd [NSS_CH1_RST_RX_125M_N_RESET] = { 0x3b60, 7 }, 2979*f7b81d67SStephen Boyd [NSS_CH1_HW_RST_RX_125M_N_RESET] = { 0x3b60, 8 }, 2980*f7b81d67SStephen Boyd [NSS_CH1_RST_TX_125M_N_RESET] = { 0x3b60, 9 }, 2981*f7b81d67SStephen Boyd [NSS_CH2_RST_RX_CLK_N_RESET] = { 0x3b60, 10 }, 2982*f7b81d67SStephen Boyd [NSS_CH2_RST_TX_CLK_N_RESET] = { 0x3b60, 11 }, 2983*f7b81d67SStephen Boyd [NSS_CH2_RST_RX_125M_N_RESET] = { 0x3b60, 12 }, 2984*f7b81d67SStephen Boyd [NSS_CH2_HW_RST_RX_125M_N_RESET] = { 0x3b60, 13 }, 2985*f7b81d67SStephen Boyd [NSS_CH2_RST_TX_125M_N_RESET] = { 0x3b60, 14 }, 2986*f7b81d67SStephen Boyd [NSS_CH3_RST_RX_CLK_N_RESET] = { 0x3b60, 15 }, 2987*f7b81d67SStephen Boyd [NSS_CH3_RST_TX_CLK_N_RESET] = { 0x3b60, 16 }, 2988*f7b81d67SStephen Boyd [NSS_CH3_RST_RX_125M_N_RESET] = { 0x3b60, 17 }, 2989*f7b81d67SStephen Boyd [NSS_CH3_HW_RST_RX_125M_N_RESET] = { 0x3b60, 18 }, 2990*f7b81d67SStephen Boyd [NSS_CH3_RST_TX_125M_N_RESET] = { 0x3b60, 19 }, 2991*f7b81d67SStephen Boyd [NSS_RST_RX_250M_125M_N_RESET] = { 0x3b60, 20 }, 2992*f7b81d67SStephen Boyd [NSS_RST_TX_250M_125M_N_RESET] = { 0x3b60, 21 }, 2993*f7b81d67SStephen Boyd [NSS_QSGMII_TXPI_RST_N_RESET] = { 0x3b60, 22 }, 2994*f7b81d67SStephen Boyd [NSS_QSGMII_CDR_RST_N_RESET] = { 0x3b60, 23 }, 2995*f7b81d67SStephen Boyd [NSS_SGMII2_CDR_RST_N_RESET] = { 0x3b60, 24 }, 2996*f7b81d67SStephen Boyd [NSS_SGMII3_CDR_RST_N_RESET] = { 0x3b60, 25 }, 2997*f7b81d67SStephen Boyd [NSS_CAL_PRBS_RST_N_RESET] = { 0x3b60, 26 }, 2998*f7b81d67SStephen Boyd [NSS_LCKDT_RST_N_RESET] = { 0x3b60, 27 }, 2999*f7b81d67SStephen Boyd [NSS_SRDS_N_RESET] = { 0x3b60, 28 }, 300024d8fba4SKumar Gala }; 300124d8fba4SKumar Gala 300224d8fba4SKumar Gala static const struct regmap_config gcc_ipq806x_regmap_config = { 300324d8fba4SKumar Gala .reg_bits = 32, 300424d8fba4SKumar Gala .reg_stride = 4, 300524d8fba4SKumar Gala .val_bits = 32, 300624d8fba4SKumar Gala .max_register = 0x3e40, 300724d8fba4SKumar Gala .fast_io = true, 300824d8fba4SKumar Gala }; 300924d8fba4SKumar Gala 301024d8fba4SKumar Gala static const struct qcom_cc_desc gcc_ipq806x_desc = { 301124d8fba4SKumar Gala .config = &gcc_ipq806x_regmap_config, 301224d8fba4SKumar Gala .clks = gcc_ipq806x_clks, 301324d8fba4SKumar Gala .num_clks = ARRAY_SIZE(gcc_ipq806x_clks), 301424d8fba4SKumar Gala .resets = gcc_ipq806x_resets, 301524d8fba4SKumar Gala .num_resets = ARRAY_SIZE(gcc_ipq806x_resets), 301624d8fba4SKumar Gala }; 301724d8fba4SKumar Gala 301824d8fba4SKumar Gala static const struct of_device_id gcc_ipq806x_match_table[] = { 301924d8fba4SKumar Gala { .compatible = "qcom,gcc-ipq8064" }, 302024d8fba4SKumar Gala { } 302124d8fba4SKumar Gala }; 302224d8fba4SKumar Gala MODULE_DEVICE_TABLE(of, gcc_ipq806x_match_table); 302324d8fba4SKumar Gala 302424d8fba4SKumar Gala static int gcc_ipq806x_probe(struct platform_device *pdev) 302524d8fba4SKumar Gala { 302624d8fba4SKumar Gala struct clk *clk; 302724d8fba4SKumar Gala struct device *dev = &pdev->dev; 3028*f7b81d67SStephen Boyd struct regmap *regmap; 3029*f7b81d67SStephen Boyd int ret; 303024d8fba4SKumar Gala 303124d8fba4SKumar Gala /* Temporary until RPM clocks supported */ 303224d8fba4SKumar Gala clk = clk_register_fixed_rate(dev, "cxo", NULL, CLK_IS_ROOT, 25000000); 303324d8fba4SKumar Gala if (IS_ERR(clk)) 303424d8fba4SKumar Gala return PTR_ERR(clk); 303524d8fba4SKumar Gala 303624d8fba4SKumar Gala clk = clk_register_fixed_rate(dev, "pxo", NULL, CLK_IS_ROOT, 25000000); 303724d8fba4SKumar Gala if (IS_ERR(clk)) 303824d8fba4SKumar Gala return PTR_ERR(clk); 303924d8fba4SKumar Gala 3040*f7b81d67SStephen Boyd ret = qcom_cc_probe(pdev, &gcc_ipq806x_desc); 3041*f7b81d67SStephen Boyd if (ret) 3042*f7b81d67SStephen Boyd return ret; 3043*f7b81d67SStephen Boyd 3044*f7b81d67SStephen Boyd regmap = dev_get_regmap(dev, NULL); 3045*f7b81d67SStephen Boyd if (!regmap) 3046*f7b81d67SStephen Boyd return -ENODEV; 3047*f7b81d67SStephen Boyd 3048*f7b81d67SStephen Boyd /* Setup PLL18 static bits */ 3049*f7b81d67SStephen Boyd regmap_update_bits(regmap, 0x31a4, 0xffffffc0, 0x40000400); 3050*f7b81d67SStephen Boyd regmap_write(regmap, 0x31b0, 0x3080); 3051*f7b81d67SStephen Boyd 3052*f7b81d67SStephen Boyd /* Set GMAC footswitch sleep/wakeup values */ 3053*f7b81d67SStephen Boyd regmap_write(regmap, 0x3cb8, 8); 3054*f7b81d67SStephen Boyd regmap_write(regmap, 0x3cd8, 8); 3055*f7b81d67SStephen Boyd regmap_write(regmap, 0x3cf8, 8); 3056*f7b81d67SStephen Boyd regmap_write(regmap, 0x3d18, 8); 3057*f7b81d67SStephen Boyd 3058*f7b81d67SStephen Boyd return 0; 305924d8fba4SKumar Gala } 306024d8fba4SKumar Gala 306124d8fba4SKumar Gala static int gcc_ipq806x_remove(struct platform_device *pdev) 306224d8fba4SKumar Gala { 306324d8fba4SKumar Gala qcom_cc_remove(pdev); 306424d8fba4SKumar Gala return 0; 306524d8fba4SKumar Gala } 306624d8fba4SKumar Gala 306724d8fba4SKumar Gala static struct platform_driver gcc_ipq806x_driver = { 306824d8fba4SKumar Gala .probe = gcc_ipq806x_probe, 306924d8fba4SKumar Gala .remove = gcc_ipq806x_remove, 307024d8fba4SKumar Gala .driver = { 307124d8fba4SKumar Gala .name = "gcc-ipq806x", 307224d8fba4SKumar Gala .of_match_table = gcc_ipq806x_match_table, 307324d8fba4SKumar Gala }, 307424d8fba4SKumar Gala }; 307524d8fba4SKumar Gala 307624d8fba4SKumar Gala static int __init gcc_ipq806x_init(void) 307724d8fba4SKumar Gala { 307824d8fba4SKumar Gala return platform_driver_register(&gcc_ipq806x_driver); 307924d8fba4SKumar Gala } 308024d8fba4SKumar Gala core_initcall(gcc_ipq806x_init); 308124d8fba4SKumar Gala 308224d8fba4SKumar Gala static void __exit gcc_ipq806x_exit(void) 308324d8fba4SKumar Gala { 308424d8fba4SKumar Gala platform_driver_unregister(&gcc_ipq806x_driver); 308524d8fba4SKumar Gala } 308624d8fba4SKumar Gala module_exit(gcc_ipq806x_exit); 308724d8fba4SKumar Gala 308824d8fba4SKumar Gala MODULE_DESCRIPTION("QCOM GCC IPQ806x Driver"); 308924d8fba4SKumar Gala MODULE_LICENSE("GPL v2"); 309024d8fba4SKumar Gala MODULE_ALIAS("platform:gcc-ipq806x"); 3091