1*24d8fba4SKumar Gala /* 2*24d8fba4SKumar Gala * Copyright (c) 2014, The Linux Foundation. All rights reserved. 3*24d8fba4SKumar Gala * 4*24d8fba4SKumar Gala * This software is licensed under the terms of the GNU General Public 5*24d8fba4SKumar Gala * License version 2, as published by the Free Software Foundation, and 6*24d8fba4SKumar Gala * may be copied, distributed, and modified under those terms. 7*24d8fba4SKumar Gala * 8*24d8fba4SKumar Gala * This program is distributed in the hope that it will be useful, 9*24d8fba4SKumar Gala * but WITHOUT ANY WARRANTY; without even the implied warranty of 10*24d8fba4SKumar Gala * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11*24d8fba4SKumar Gala * GNU General Public License for more details. 12*24d8fba4SKumar Gala */ 13*24d8fba4SKumar Gala 14*24d8fba4SKumar Gala #include <linux/kernel.h> 15*24d8fba4SKumar Gala #include <linux/bitops.h> 16*24d8fba4SKumar Gala #include <linux/err.h> 17*24d8fba4SKumar Gala #include <linux/platform_device.h> 18*24d8fba4SKumar Gala #include <linux/module.h> 19*24d8fba4SKumar Gala #include <linux/of.h> 20*24d8fba4SKumar Gala #include <linux/of_device.h> 21*24d8fba4SKumar Gala #include <linux/clk-provider.h> 22*24d8fba4SKumar Gala #include <linux/regmap.h> 23*24d8fba4SKumar Gala #include <linux/reset-controller.h> 24*24d8fba4SKumar Gala 25*24d8fba4SKumar Gala #include <dt-bindings/clock/qcom,gcc-ipq806x.h> 26*24d8fba4SKumar Gala #include <dt-bindings/reset/qcom,gcc-ipq806x.h> 27*24d8fba4SKumar Gala 28*24d8fba4SKumar Gala #include "common.h" 29*24d8fba4SKumar Gala #include "clk-regmap.h" 30*24d8fba4SKumar Gala #include "clk-pll.h" 31*24d8fba4SKumar Gala #include "clk-rcg.h" 32*24d8fba4SKumar Gala #include "clk-branch.h" 33*24d8fba4SKumar Gala #include "reset.h" 34*24d8fba4SKumar Gala 35*24d8fba4SKumar Gala static struct clk_pll pll3 = { 36*24d8fba4SKumar Gala .l_reg = 0x3164, 37*24d8fba4SKumar Gala .m_reg = 0x3168, 38*24d8fba4SKumar Gala .n_reg = 0x316c, 39*24d8fba4SKumar Gala .config_reg = 0x3174, 40*24d8fba4SKumar Gala .mode_reg = 0x3160, 41*24d8fba4SKumar Gala .status_reg = 0x3178, 42*24d8fba4SKumar Gala .status_bit = 16, 43*24d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 44*24d8fba4SKumar Gala .name = "pll3", 45*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 46*24d8fba4SKumar Gala .num_parents = 1, 47*24d8fba4SKumar Gala .ops = &clk_pll_ops, 48*24d8fba4SKumar Gala }, 49*24d8fba4SKumar Gala }; 50*24d8fba4SKumar Gala 51*24d8fba4SKumar Gala static struct clk_pll pll8 = { 52*24d8fba4SKumar Gala .l_reg = 0x3144, 53*24d8fba4SKumar Gala .m_reg = 0x3148, 54*24d8fba4SKumar Gala .n_reg = 0x314c, 55*24d8fba4SKumar Gala .config_reg = 0x3154, 56*24d8fba4SKumar Gala .mode_reg = 0x3140, 57*24d8fba4SKumar Gala .status_reg = 0x3158, 58*24d8fba4SKumar Gala .status_bit = 16, 59*24d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 60*24d8fba4SKumar Gala .name = "pll8", 61*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 62*24d8fba4SKumar Gala .num_parents = 1, 63*24d8fba4SKumar Gala .ops = &clk_pll_ops, 64*24d8fba4SKumar Gala }, 65*24d8fba4SKumar Gala }; 66*24d8fba4SKumar Gala 67*24d8fba4SKumar Gala static struct clk_regmap pll8_vote = { 68*24d8fba4SKumar Gala .enable_reg = 0x34c0, 69*24d8fba4SKumar Gala .enable_mask = BIT(8), 70*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 71*24d8fba4SKumar Gala .name = "pll8_vote", 72*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pll8" }, 73*24d8fba4SKumar Gala .num_parents = 1, 74*24d8fba4SKumar Gala .ops = &clk_pll_vote_ops, 75*24d8fba4SKumar Gala }, 76*24d8fba4SKumar Gala }; 77*24d8fba4SKumar Gala 78*24d8fba4SKumar Gala static struct clk_pll pll14 = { 79*24d8fba4SKumar Gala .l_reg = 0x31c4, 80*24d8fba4SKumar Gala .m_reg = 0x31c8, 81*24d8fba4SKumar Gala .n_reg = 0x31cc, 82*24d8fba4SKumar Gala .config_reg = 0x31d4, 83*24d8fba4SKumar Gala .mode_reg = 0x31c0, 84*24d8fba4SKumar Gala .status_reg = 0x31d8, 85*24d8fba4SKumar Gala .status_bit = 16, 86*24d8fba4SKumar Gala .clkr.hw.init = &(struct clk_init_data){ 87*24d8fba4SKumar Gala .name = "pll14", 88*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 89*24d8fba4SKumar Gala .num_parents = 1, 90*24d8fba4SKumar Gala .ops = &clk_pll_ops, 91*24d8fba4SKumar Gala }, 92*24d8fba4SKumar Gala }; 93*24d8fba4SKumar Gala 94*24d8fba4SKumar Gala static struct clk_regmap pll14_vote = { 95*24d8fba4SKumar Gala .enable_reg = 0x34c0, 96*24d8fba4SKumar Gala .enable_mask = BIT(14), 97*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 98*24d8fba4SKumar Gala .name = "pll14_vote", 99*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pll14" }, 100*24d8fba4SKumar Gala .num_parents = 1, 101*24d8fba4SKumar Gala .ops = &clk_pll_vote_ops, 102*24d8fba4SKumar Gala }, 103*24d8fba4SKumar Gala }; 104*24d8fba4SKumar Gala 105*24d8fba4SKumar Gala #define P_PXO 0 106*24d8fba4SKumar Gala #define P_PLL8 1 107*24d8fba4SKumar Gala #define P_PLL3 1 108*24d8fba4SKumar Gala #define P_PLL0 2 109*24d8fba4SKumar Gala #define P_CXO 2 110*24d8fba4SKumar Gala 111*24d8fba4SKumar Gala static const u8 gcc_pxo_pll8_map[] = { 112*24d8fba4SKumar Gala [P_PXO] = 0, 113*24d8fba4SKumar Gala [P_PLL8] = 3, 114*24d8fba4SKumar Gala }; 115*24d8fba4SKumar Gala 116*24d8fba4SKumar Gala static const char *gcc_pxo_pll8[] = { 117*24d8fba4SKumar Gala "pxo", 118*24d8fba4SKumar Gala "pll8_vote", 119*24d8fba4SKumar Gala }; 120*24d8fba4SKumar Gala 121*24d8fba4SKumar Gala static const u8 gcc_pxo_pll8_cxo_map[] = { 122*24d8fba4SKumar Gala [P_PXO] = 0, 123*24d8fba4SKumar Gala [P_PLL8] = 3, 124*24d8fba4SKumar Gala [P_CXO] = 5, 125*24d8fba4SKumar Gala }; 126*24d8fba4SKumar Gala 127*24d8fba4SKumar Gala static const char *gcc_pxo_pll8_cxo[] = { 128*24d8fba4SKumar Gala "pxo", 129*24d8fba4SKumar Gala "pll8_vote", 130*24d8fba4SKumar Gala "cxo", 131*24d8fba4SKumar Gala }; 132*24d8fba4SKumar Gala 133*24d8fba4SKumar Gala static const u8 gcc_pxo_pll3_map[] = { 134*24d8fba4SKumar Gala [P_PXO] = 0, 135*24d8fba4SKumar Gala [P_PLL3] = 1, 136*24d8fba4SKumar Gala }; 137*24d8fba4SKumar Gala 138*24d8fba4SKumar Gala static const u8 gcc_pxo_pll3_sata_map[] = { 139*24d8fba4SKumar Gala [P_PXO] = 0, 140*24d8fba4SKumar Gala [P_PLL3] = 6, 141*24d8fba4SKumar Gala }; 142*24d8fba4SKumar Gala 143*24d8fba4SKumar Gala static const char *gcc_pxo_pll3[] = { 144*24d8fba4SKumar Gala "pxo", 145*24d8fba4SKumar Gala "pll3", 146*24d8fba4SKumar Gala }; 147*24d8fba4SKumar Gala 148*24d8fba4SKumar Gala static const u8 gcc_pxo_pll8_pll0[] = { 149*24d8fba4SKumar Gala [P_PXO] = 0, 150*24d8fba4SKumar Gala [P_PLL8] = 3, 151*24d8fba4SKumar Gala [P_PLL0] = 2, 152*24d8fba4SKumar Gala }; 153*24d8fba4SKumar Gala 154*24d8fba4SKumar Gala static const char *gcc_pxo_pll8_pll0_map[] = { 155*24d8fba4SKumar Gala "pxo", 156*24d8fba4SKumar Gala "pll8_vote", 157*24d8fba4SKumar Gala "pll0", 158*24d8fba4SKumar Gala }; 159*24d8fba4SKumar Gala 160*24d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_uart[] = { 161*24d8fba4SKumar Gala { 1843200, P_PLL8, 2, 6, 625 }, 162*24d8fba4SKumar Gala { 3686400, P_PLL8, 2, 12, 625 }, 163*24d8fba4SKumar Gala { 7372800, P_PLL8, 2, 24, 625 }, 164*24d8fba4SKumar Gala { 14745600, P_PLL8, 2, 48, 625 }, 165*24d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 }, 166*24d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 167*24d8fba4SKumar Gala { 32000000, P_PLL8, 4, 1, 3 }, 168*24d8fba4SKumar Gala { 40000000, P_PLL8, 1, 5, 48 }, 169*24d8fba4SKumar Gala { 46400000, P_PLL8, 1, 29, 240 }, 170*24d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 171*24d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 }, 172*24d8fba4SKumar Gala { 56000000, P_PLL8, 1, 7, 48 }, 173*24d8fba4SKumar Gala { 58982400, P_PLL8, 1, 96, 625 }, 174*24d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 }, 175*24d8fba4SKumar Gala { } 176*24d8fba4SKumar Gala }; 177*24d8fba4SKumar Gala 178*24d8fba4SKumar Gala static struct clk_rcg gsbi1_uart_src = { 179*24d8fba4SKumar Gala .ns_reg = 0x29d4, 180*24d8fba4SKumar Gala .md_reg = 0x29d0, 181*24d8fba4SKumar Gala .mn = { 182*24d8fba4SKumar Gala .mnctr_en_bit = 8, 183*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 184*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 185*24d8fba4SKumar Gala .n_val_shift = 16, 186*24d8fba4SKumar Gala .m_val_shift = 16, 187*24d8fba4SKumar Gala .width = 16, 188*24d8fba4SKumar Gala }, 189*24d8fba4SKumar Gala .p = { 190*24d8fba4SKumar Gala .pre_div_shift = 3, 191*24d8fba4SKumar Gala .pre_div_width = 2, 192*24d8fba4SKumar Gala }, 193*24d8fba4SKumar Gala .s = { 194*24d8fba4SKumar Gala .src_sel_shift = 0, 195*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 196*24d8fba4SKumar Gala }, 197*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 198*24d8fba4SKumar Gala .clkr = { 199*24d8fba4SKumar Gala .enable_reg = 0x29d4, 200*24d8fba4SKumar Gala .enable_mask = BIT(11), 201*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 202*24d8fba4SKumar Gala .name = "gsbi1_uart_src", 203*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 204*24d8fba4SKumar Gala .num_parents = 2, 205*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 206*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 207*24d8fba4SKumar Gala }, 208*24d8fba4SKumar Gala }, 209*24d8fba4SKumar Gala }; 210*24d8fba4SKumar Gala 211*24d8fba4SKumar Gala static struct clk_branch gsbi1_uart_clk = { 212*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 213*24d8fba4SKumar Gala .halt_bit = 12, 214*24d8fba4SKumar Gala .clkr = { 215*24d8fba4SKumar Gala .enable_reg = 0x29d4, 216*24d8fba4SKumar Gala .enable_mask = BIT(9), 217*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 218*24d8fba4SKumar Gala .name = "gsbi1_uart_clk", 219*24d8fba4SKumar Gala .parent_names = (const char *[]){ 220*24d8fba4SKumar Gala "gsbi1_uart_src", 221*24d8fba4SKumar Gala }, 222*24d8fba4SKumar Gala .num_parents = 1, 223*24d8fba4SKumar Gala .ops = &clk_branch_ops, 224*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 225*24d8fba4SKumar Gala }, 226*24d8fba4SKumar Gala }, 227*24d8fba4SKumar Gala }; 228*24d8fba4SKumar Gala 229*24d8fba4SKumar Gala static struct clk_rcg gsbi2_uart_src = { 230*24d8fba4SKumar Gala .ns_reg = 0x29f4, 231*24d8fba4SKumar Gala .md_reg = 0x29f0, 232*24d8fba4SKumar Gala .mn = { 233*24d8fba4SKumar Gala .mnctr_en_bit = 8, 234*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 235*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 236*24d8fba4SKumar Gala .n_val_shift = 16, 237*24d8fba4SKumar Gala .m_val_shift = 16, 238*24d8fba4SKumar Gala .width = 16, 239*24d8fba4SKumar Gala }, 240*24d8fba4SKumar Gala .p = { 241*24d8fba4SKumar Gala .pre_div_shift = 3, 242*24d8fba4SKumar Gala .pre_div_width = 2, 243*24d8fba4SKumar Gala }, 244*24d8fba4SKumar Gala .s = { 245*24d8fba4SKumar Gala .src_sel_shift = 0, 246*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 247*24d8fba4SKumar Gala }, 248*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 249*24d8fba4SKumar Gala .clkr = { 250*24d8fba4SKumar Gala .enable_reg = 0x29f4, 251*24d8fba4SKumar Gala .enable_mask = BIT(11), 252*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 253*24d8fba4SKumar Gala .name = "gsbi2_uart_src", 254*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 255*24d8fba4SKumar Gala .num_parents = 2, 256*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 257*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 258*24d8fba4SKumar Gala }, 259*24d8fba4SKumar Gala }, 260*24d8fba4SKumar Gala }; 261*24d8fba4SKumar Gala 262*24d8fba4SKumar Gala static struct clk_branch gsbi2_uart_clk = { 263*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 264*24d8fba4SKumar Gala .halt_bit = 8, 265*24d8fba4SKumar Gala .clkr = { 266*24d8fba4SKumar Gala .enable_reg = 0x29f4, 267*24d8fba4SKumar Gala .enable_mask = BIT(9), 268*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 269*24d8fba4SKumar Gala .name = "gsbi2_uart_clk", 270*24d8fba4SKumar Gala .parent_names = (const char *[]){ 271*24d8fba4SKumar Gala "gsbi2_uart_src", 272*24d8fba4SKumar Gala }, 273*24d8fba4SKumar Gala .num_parents = 1, 274*24d8fba4SKumar Gala .ops = &clk_branch_ops, 275*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 276*24d8fba4SKumar Gala }, 277*24d8fba4SKumar Gala }, 278*24d8fba4SKumar Gala }; 279*24d8fba4SKumar Gala 280*24d8fba4SKumar Gala static struct clk_rcg gsbi4_uart_src = { 281*24d8fba4SKumar Gala .ns_reg = 0x2a34, 282*24d8fba4SKumar Gala .md_reg = 0x2a30, 283*24d8fba4SKumar Gala .mn = { 284*24d8fba4SKumar Gala .mnctr_en_bit = 8, 285*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 286*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 287*24d8fba4SKumar Gala .n_val_shift = 16, 288*24d8fba4SKumar Gala .m_val_shift = 16, 289*24d8fba4SKumar Gala .width = 16, 290*24d8fba4SKumar Gala }, 291*24d8fba4SKumar Gala .p = { 292*24d8fba4SKumar Gala .pre_div_shift = 3, 293*24d8fba4SKumar Gala .pre_div_width = 2, 294*24d8fba4SKumar Gala }, 295*24d8fba4SKumar Gala .s = { 296*24d8fba4SKumar Gala .src_sel_shift = 0, 297*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 298*24d8fba4SKumar Gala }, 299*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 300*24d8fba4SKumar Gala .clkr = { 301*24d8fba4SKumar Gala .enable_reg = 0x2a34, 302*24d8fba4SKumar Gala .enable_mask = BIT(11), 303*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 304*24d8fba4SKumar Gala .name = "gsbi4_uart_src", 305*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 306*24d8fba4SKumar Gala .num_parents = 2, 307*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 308*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 309*24d8fba4SKumar Gala }, 310*24d8fba4SKumar Gala }, 311*24d8fba4SKumar Gala }; 312*24d8fba4SKumar Gala 313*24d8fba4SKumar Gala static struct clk_branch gsbi4_uart_clk = { 314*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 315*24d8fba4SKumar Gala .halt_bit = 26, 316*24d8fba4SKumar Gala .clkr = { 317*24d8fba4SKumar Gala .enable_reg = 0x2a34, 318*24d8fba4SKumar Gala .enable_mask = BIT(9), 319*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 320*24d8fba4SKumar Gala .name = "gsbi4_uart_clk", 321*24d8fba4SKumar Gala .parent_names = (const char *[]){ 322*24d8fba4SKumar Gala "gsbi4_uart_src", 323*24d8fba4SKumar Gala }, 324*24d8fba4SKumar Gala .num_parents = 1, 325*24d8fba4SKumar Gala .ops = &clk_branch_ops, 326*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 327*24d8fba4SKumar Gala }, 328*24d8fba4SKumar Gala }, 329*24d8fba4SKumar Gala }; 330*24d8fba4SKumar Gala 331*24d8fba4SKumar Gala static struct clk_rcg gsbi5_uart_src = { 332*24d8fba4SKumar Gala .ns_reg = 0x2a54, 333*24d8fba4SKumar Gala .md_reg = 0x2a50, 334*24d8fba4SKumar Gala .mn = { 335*24d8fba4SKumar Gala .mnctr_en_bit = 8, 336*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 337*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 338*24d8fba4SKumar Gala .n_val_shift = 16, 339*24d8fba4SKumar Gala .m_val_shift = 16, 340*24d8fba4SKumar Gala .width = 16, 341*24d8fba4SKumar Gala }, 342*24d8fba4SKumar Gala .p = { 343*24d8fba4SKumar Gala .pre_div_shift = 3, 344*24d8fba4SKumar Gala .pre_div_width = 2, 345*24d8fba4SKumar Gala }, 346*24d8fba4SKumar Gala .s = { 347*24d8fba4SKumar Gala .src_sel_shift = 0, 348*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 349*24d8fba4SKumar Gala }, 350*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 351*24d8fba4SKumar Gala .clkr = { 352*24d8fba4SKumar Gala .enable_reg = 0x2a54, 353*24d8fba4SKumar Gala .enable_mask = BIT(11), 354*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 355*24d8fba4SKumar Gala .name = "gsbi5_uart_src", 356*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 357*24d8fba4SKumar Gala .num_parents = 2, 358*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 359*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 360*24d8fba4SKumar Gala }, 361*24d8fba4SKumar Gala }, 362*24d8fba4SKumar Gala }; 363*24d8fba4SKumar Gala 364*24d8fba4SKumar Gala static struct clk_branch gsbi5_uart_clk = { 365*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 366*24d8fba4SKumar Gala .halt_bit = 22, 367*24d8fba4SKumar Gala .clkr = { 368*24d8fba4SKumar Gala .enable_reg = 0x2a54, 369*24d8fba4SKumar Gala .enable_mask = BIT(9), 370*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 371*24d8fba4SKumar Gala .name = "gsbi5_uart_clk", 372*24d8fba4SKumar Gala .parent_names = (const char *[]){ 373*24d8fba4SKumar Gala "gsbi5_uart_src", 374*24d8fba4SKumar Gala }, 375*24d8fba4SKumar Gala .num_parents = 1, 376*24d8fba4SKumar Gala .ops = &clk_branch_ops, 377*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 378*24d8fba4SKumar Gala }, 379*24d8fba4SKumar Gala }, 380*24d8fba4SKumar Gala }; 381*24d8fba4SKumar Gala 382*24d8fba4SKumar Gala static struct clk_rcg gsbi6_uart_src = { 383*24d8fba4SKumar Gala .ns_reg = 0x2a74, 384*24d8fba4SKumar Gala .md_reg = 0x2a70, 385*24d8fba4SKumar Gala .mn = { 386*24d8fba4SKumar Gala .mnctr_en_bit = 8, 387*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 388*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 389*24d8fba4SKumar Gala .n_val_shift = 16, 390*24d8fba4SKumar Gala .m_val_shift = 16, 391*24d8fba4SKumar Gala .width = 16, 392*24d8fba4SKumar Gala }, 393*24d8fba4SKumar Gala .p = { 394*24d8fba4SKumar Gala .pre_div_shift = 3, 395*24d8fba4SKumar Gala .pre_div_width = 2, 396*24d8fba4SKumar Gala }, 397*24d8fba4SKumar Gala .s = { 398*24d8fba4SKumar Gala .src_sel_shift = 0, 399*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 400*24d8fba4SKumar Gala }, 401*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 402*24d8fba4SKumar Gala .clkr = { 403*24d8fba4SKumar Gala .enable_reg = 0x2a74, 404*24d8fba4SKumar Gala .enable_mask = BIT(11), 405*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 406*24d8fba4SKumar Gala .name = "gsbi6_uart_src", 407*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 408*24d8fba4SKumar Gala .num_parents = 2, 409*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 410*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 411*24d8fba4SKumar Gala }, 412*24d8fba4SKumar Gala }, 413*24d8fba4SKumar Gala }; 414*24d8fba4SKumar Gala 415*24d8fba4SKumar Gala static struct clk_branch gsbi6_uart_clk = { 416*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 417*24d8fba4SKumar Gala .halt_bit = 18, 418*24d8fba4SKumar Gala .clkr = { 419*24d8fba4SKumar Gala .enable_reg = 0x2a74, 420*24d8fba4SKumar Gala .enable_mask = BIT(9), 421*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 422*24d8fba4SKumar Gala .name = "gsbi6_uart_clk", 423*24d8fba4SKumar Gala .parent_names = (const char *[]){ 424*24d8fba4SKumar Gala "gsbi6_uart_src", 425*24d8fba4SKumar Gala }, 426*24d8fba4SKumar Gala .num_parents = 1, 427*24d8fba4SKumar Gala .ops = &clk_branch_ops, 428*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 429*24d8fba4SKumar Gala }, 430*24d8fba4SKumar Gala }, 431*24d8fba4SKumar Gala }; 432*24d8fba4SKumar Gala 433*24d8fba4SKumar Gala static struct clk_rcg gsbi7_uart_src = { 434*24d8fba4SKumar Gala .ns_reg = 0x2a94, 435*24d8fba4SKumar Gala .md_reg = 0x2a90, 436*24d8fba4SKumar Gala .mn = { 437*24d8fba4SKumar Gala .mnctr_en_bit = 8, 438*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 439*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 440*24d8fba4SKumar Gala .n_val_shift = 16, 441*24d8fba4SKumar Gala .m_val_shift = 16, 442*24d8fba4SKumar Gala .width = 16, 443*24d8fba4SKumar Gala }, 444*24d8fba4SKumar Gala .p = { 445*24d8fba4SKumar Gala .pre_div_shift = 3, 446*24d8fba4SKumar Gala .pre_div_width = 2, 447*24d8fba4SKumar Gala }, 448*24d8fba4SKumar Gala .s = { 449*24d8fba4SKumar Gala .src_sel_shift = 0, 450*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 451*24d8fba4SKumar Gala }, 452*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_uart, 453*24d8fba4SKumar Gala .clkr = { 454*24d8fba4SKumar Gala .enable_reg = 0x2a94, 455*24d8fba4SKumar Gala .enable_mask = BIT(11), 456*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 457*24d8fba4SKumar Gala .name = "gsbi7_uart_src", 458*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 459*24d8fba4SKumar Gala .num_parents = 2, 460*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 461*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 462*24d8fba4SKumar Gala }, 463*24d8fba4SKumar Gala }, 464*24d8fba4SKumar Gala }; 465*24d8fba4SKumar Gala 466*24d8fba4SKumar Gala static struct clk_branch gsbi7_uart_clk = { 467*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 468*24d8fba4SKumar Gala .halt_bit = 14, 469*24d8fba4SKumar Gala .clkr = { 470*24d8fba4SKumar Gala .enable_reg = 0x2a94, 471*24d8fba4SKumar Gala .enable_mask = BIT(9), 472*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 473*24d8fba4SKumar Gala .name = "gsbi7_uart_clk", 474*24d8fba4SKumar Gala .parent_names = (const char *[]){ 475*24d8fba4SKumar Gala "gsbi7_uart_src", 476*24d8fba4SKumar Gala }, 477*24d8fba4SKumar Gala .num_parents = 1, 478*24d8fba4SKumar Gala .ops = &clk_branch_ops, 479*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 480*24d8fba4SKumar Gala }, 481*24d8fba4SKumar Gala }, 482*24d8fba4SKumar Gala }; 483*24d8fba4SKumar Gala 484*24d8fba4SKumar Gala static struct freq_tbl clk_tbl_gsbi_qup[] = { 485*24d8fba4SKumar Gala { 1100000, P_PXO, 1, 2, 49 }, 486*24d8fba4SKumar Gala { 5400000, P_PXO, 1, 1, 5 }, 487*24d8fba4SKumar Gala { 10800000, P_PXO, 1, 2, 5 }, 488*24d8fba4SKumar Gala { 15060000, P_PLL8, 1, 2, 51 }, 489*24d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 490*24d8fba4SKumar Gala { 25600000, P_PLL8, 1, 1, 15 }, 491*24d8fba4SKumar Gala { 27000000, P_PXO, 1, 0, 0 }, 492*24d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 493*24d8fba4SKumar Gala { 51200000, P_PLL8, 1, 2, 15 }, 494*24d8fba4SKumar Gala { } 495*24d8fba4SKumar Gala }; 496*24d8fba4SKumar Gala 497*24d8fba4SKumar Gala static struct clk_rcg gsbi1_qup_src = { 498*24d8fba4SKumar Gala .ns_reg = 0x29cc, 499*24d8fba4SKumar Gala .md_reg = 0x29c8, 500*24d8fba4SKumar Gala .mn = { 501*24d8fba4SKumar Gala .mnctr_en_bit = 8, 502*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 503*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 504*24d8fba4SKumar Gala .n_val_shift = 16, 505*24d8fba4SKumar Gala .m_val_shift = 16, 506*24d8fba4SKumar Gala .width = 8, 507*24d8fba4SKumar Gala }, 508*24d8fba4SKumar Gala .p = { 509*24d8fba4SKumar Gala .pre_div_shift = 3, 510*24d8fba4SKumar Gala .pre_div_width = 2, 511*24d8fba4SKumar Gala }, 512*24d8fba4SKumar Gala .s = { 513*24d8fba4SKumar Gala .src_sel_shift = 0, 514*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 515*24d8fba4SKumar Gala }, 516*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 517*24d8fba4SKumar Gala .clkr = { 518*24d8fba4SKumar Gala .enable_reg = 0x29cc, 519*24d8fba4SKumar Gala .enable_mask = BIT(11), 520*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 521*24d8fba4SKumar Gala .name = "gsbi1_qup_src", 522*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 523*24d8fba4SKumar Gala .num_parents = 2, 524*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 525*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 526*24d8fba4SKumar Gala }, 527*24d8fba4SKumar Gala }, 528*24d8fba4SKumar Gala }; 529*24d8fba4SKumar Gala 530*24d8fba4SKumar Gala static struct clk_branch gsbi1_qup_clk = { 531*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 532*24d8fba4SKumar Gala .halt_bit = 11, 533*24d8fba4SKumar Gala .clkr = { 534*24d8fba4SKumar Gala .enable_reg = 0x29cc, 535*24d8fba4SKumar Gala .enable_mask = BIT(9), 536*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 537*24d8fba4SKumar Gala .name = "gsbi1_qup_clk", 538*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi1_qup_src" }, 539*24d8fba4SKumar Gala .num_parents = 1, 540*24d8fba4SKumar Gala .ops = &clk_branch_ops, 541*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 542*24d8fba4SKumar Gala }, 543*24d8fba4SKumar Gala }, 544*24d8fba4SKumar Gala }; 545*24d8fba4SKumar Gala 546*24d8fba4SKumar Gala static struct clk_rcg gsbi2_qup_src = { 547*24d8fba4SKumar Gala .ns_reg = 0x29ec, 548*24d8fba4SKumar Gala .md_reg = 0x29e8, 549*24d8fba4SKumar Gala .mn = { 550*24d8fba4SKumar Gala .mnctr_en_bit = 8, 551*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 552*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 553*24d8fba4SKumar Gala .n_val_shift = 16, 554*24d8fba4SKumar Gala .m_val_shift = 16, 555*24d8fba4SKumar Gala .width = 8, 556*24d8fba4SKumar Gala }, 557*24d8fba4SKumar Gala .p = { 558*24d8fba4SKumar Gala .pre_div_shift = 3, 559*24d8fba4SKumar Gala .pre_div_width = 2, 560*24d8fba4SKumar Gala }, 561*24d8fba4SKumar Gala .s = { 562*24d8fba4SKumar Gala .src_sel_shift = 0, 563*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 564*24d8fba4SKumar Gala }, 565*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 566*24d8fba4SKumar Gala .clkr = { 567*24d8fba4SKumar Gala .enable_reg = 0x29ec, 568*24d8fba4SKumar Gala .enable_mask = BIT(11), 569*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 570*24d8fba4SKumar Gala .name = "gsbi2_qup_src", 571*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 572*24d8fba4SKumar Gala .num_parents = 2, 573*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 574*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 575*24d8fba4SKumar Gala }, 576*24d8fba4SKumar Gala }, 577*24d8fba4SKumar Gala }; 578*24d8fba4SKumar Gala 579*24d8fba4SKumar Gala static struct clk_branch gsbi2_qup_clk = { 580*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 581*24d8fba4SKumar Gala .halt_bit = 6, 582*24d8fba4SKumar Gala .clkr = { 583*24d8fba4SKumar Gala .enable_reg = 0x29ec, 584*24d8fba4SKumar Gala .enable_mask = BIT(9), 585*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 586*24d8fba4SKumar Gala .name = "gsbi2_qup_clk", 587*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi2_qup_src" }, 588*24d8fba4SKumar Gala .num_parents = 1, 589*24d8fba4SKumar Gala .ops = &clk_branch_ops, 590*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 591*24d8fba4SKumar Gala }, 592*24d8fba4SKumar Gala }, 593*24d8fba4SKumar Gala }; 594*24d8fba4SKumar Gala 595*24d8fba4SKumar Gala static struct clk_rcg gsbi4_qup_src = { 596*24d8fba4SKumar Gala .ns_reg = 0x2a2c, 597*24d8fba4SKumar Gala .md_reg = 0x2a28, 598*24d8fba4SKumar Gala .mn = { 599*24d8fba4SKumar Gala .mnctr_en_bit = 8, 600*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 601*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 602*24d8fba4SKumar Gala .n_val_shift = 16, 603*24d8fba4SKumar Gala .m_val_shift = 16, 604*24d8fba4SKumar Gala .width = 8, 605*24d8fba4SKumar Gala }, 606*24d8fba4SKumar Gala .p = { 607*24d8fba4SKumar Gala .pre_div_shift = 3, 608*24d8fba4SKumar Gala .pre_div_width = 2, 609*24d8fba4SKumar Gala }, 610*24d8fba4SKumar Gala .s = { 611*24d8fba4SKumar Gala .src_sel_shift = 0, 612*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 613*24d8fba4SKumar Gala }, 614*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 615*24d8fba4SKumar Gala .clkr = { 616*24d8fba4SKumar Gala .enable_reg = 0x2a2c, 617*24d8fba4SKumar Gala .enable_mask = BIT(11), 618*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 619*24d8fba4SKumar Gala .name = "gsbi4_qup_src", 620*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 621*24d8fba4SKumar Gala .num_parents = 2, 622*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 623*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 624*24d8fba4SKumar Gala }, 625*24d8fba4SKumar Gala }, 626*24d8fba4SKumar Gala }; 627*24d8fba4SKumar Gala 628*24d8fba4SKumar Gala static struct clk_branch gsbi4_qup_clk = { 629*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 630*24d8fba4SKumar Gala .halt_bit = 24, 631*24d8fba4SKumar Gala .clkr = { 632*24d8fba4SKumar Gala .enable_reg = 0x2a2c, 633*24d8fba4SKumar Gala .enable_mask = BIT(9), 634*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 635*24d8fba4SKumar Gala .name = "gsbi4_qup_clk", 636*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi4_qup_src" }, 637*24d8fba4SKumar Gala .num_parents = 1, 638*24d8fba4SKumar Gala .ops = &clk_branch_ops, 639*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 640*24d8fba4SKumar Gala }, 641*24d8fba4SKumar Gala }, 642*24d8fba4SKumar Gala }; 643*24d8fba4SKumar Gala 644*24d8fba4SKumar Gala static struct clk_rcg gsbi5_qup_src = { 645*24d8fba4SKumar Gala .ns_reg = 0x2a4c, 646*24d8fba4SKumar Gala .md_reg = 0x2a48, 647*24d8fba4SKumar Gala .mn = { 648*24d8fba4SKumar Gala .mnctr_en_bit = 8, 649*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 650*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 651*24d8fba4SKumar Gala .n_val_shift = 16, 652*24d8fba4SKumar Gala .m_val_shift = 16, 653*24d8fba4SKumar Gala .width = 8, 654*24d8fba4SKumar Gala }, 655*24d8fba4SKumar Gala .p = { 656*24d8fba4SKumar Gala .pre_div_shift = 3, 657*24d8fba4SKumar Gala .pre_div_width = 2, 658*24d8fba4SKumar Gala }, 659*24d8fba4SKumar Gala .s = { 660*24d8fba4SKumar Gala .src_sel_shift = 0, 661*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 662*24d8fba4SKumar Gala }, 663*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 664*24d8fba4SKumar Gala .clkr = { 665*24d8fba4SKumar Gala .enable_reg = 0x2a4c, 666*24d8fba4SKumar Gala .enable_mask = BIT(11), 667*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 668*24d8fba4SKumar Gala .name = "gsbi5_qup_src", 669*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 670*24d8fba4SKumar Gala .num_parents = 2, 671*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 672*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 673*24d8fba4SKumar Gala }, 674*24d8fba4SKumar Gala }, 675*24d8fba4SKumar Gala }; 676*24d8fba4SKumar Gala 677*24d8fba4SKumar Gala static struct clk_branch gsbi5_qup_clk = { 678*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 679*24d8fba4SKumar Gala .halt_bit = 20, 680*24d8fba4SKumar Gala .clkr = { 681*24d8fba4SKumar Gala .enable_reg = 0x2a4c, 682*24d8fba4SKumar Gala .enable_mask = BIT(9), 683*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 684*24d8fba4SKumar Gala .name = "gsbi5_qup_clk", 685*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi5_qup_src" }, 686*24d8fba4SKumar Gala .num_parents = 1, 687*24d8fba4SKumar Gala .ops = &clk_branch_ops, 688*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 689*24d8fba4SKumar Gala }, 690*24d8fba4SKumar Gala }, 691*24d8fba4SKumar Gala }; 692*24d8fba4SKumar Gala 693*24d8fba4SKumar Gala static struct clk_rcg gsbi6_qup_src = { 694*24d8fba4SKumar Gala .ns_reg = 0x2a6c, 695*24d8fba4SKumar Gala .md_reg = 0x2a68, 696*24d8fba4SKumar Gala .mn = { 697*24d8fba4SKumar Gala .mnctr_en_bit = 8, 698*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 699*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 700*24d8fba4SKumar Gala .n_val_shift = 16, 701*24d8fba4SKumar Gala .m_val_shift = 16, 702*24d8fba4SKumar Gala .width = 8, 703*24d8fba4SKumar Gala }, 704*24d8fba4SKumar Gala .p = { 705*24d8fba4SKumar Gala .pre_div_shift = 3, 706*24d8fba4SKumar Gala .pre_div_width = 2, 707*24d8fba4SKumar Gala }, 708*24d8fba4SKumar Gala .s = { 709*24d8fba4SKumar Gala .src_sel_shift = 0, 710*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 711*24d8fba4SKumar Gala }, 712*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 713*24d8fba4SKumar Gala .clkr = { 714*24d8fba4SKumar Gala .enable_reg = 0x2a6c, 715*24d8fba4SKumar Gala .enable_mask = BIT(11), 716*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 717*24d8fba4SKumar Gala .name = "gsbi6_qup_src", 718*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 719*24d8fba4SKumar Gala .num_parents = 2, 720*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 721*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 722*24d8fba4SKumar Gala }, 723*24d8fba4SKumar Gala }, 724*24d8fba4SKumar Gala }; 725*24d8fba4SKumar Gala 726*24d8fba4SKumar Gala static struct clk_branch gsbi6_qup_clk = { 727*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 728*24d8fba4SKumar Gala .halt_bit = 16, 729*24d8fba4SKumar Gala .clkr = { 730*24d8fba4SKumar Gala .enable_reg = 0x2a6c, 731*24d8fba4SKumar Gala .enable_mask = BIT(9), 732*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 733*24d8fba4SKumar Gala .name = "gsbi6_qup_clk", 734*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi6_qup_src" }, 735*24d8fba4SKumar Gala .num_parents = 1, 736*24d8fba4SKumar Gala .ops = &clk_branch_ops, 737*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 738*24d8fba4SKumar Gala }, 739*24d8fba4SKumar Gala }, 740*24d8fba4SKumar Gala }; 741*24d8fba4SKumar Gala 742*24d8fba4SKumar Gala static struct clk_rcg gsbi7_qup_src = { 743*24d8fba4SKumar Gala .ns_reg = 0x2a8c, 744*24d8fba4SKumar Gala .md_reg = 0x2a88, 745*24d8fba4SKumar Gala .mn = { 746*24d8fba4SKumar Gala .mnctr_en_bit = 8, 747*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 748*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 749*24d8fba4SKumar Gala .n_val_shift = 16, 750*24d8fba4SKumar Gala .m_val_shift = 16, 751*24d8fba4SKumar Gala .width = 8, 752*24d8fba4SKumar Gala }, 753*24d8fba4SKumar Gala .p = { 754*24d8fba4SKumar Gala .pre_div_shift = 3, 755*24d8fba4SKumar Gala .pre_div_width = 2, 756*24d8fba4SKumar Gala }, 757*24d8fba4SKumar Gala .s = { 758*24d8fba4SKumar Gala .src_sel_shift = 0, 759*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 760*24d8fba4SKumar Gala }, 761*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gsbi_qup, 762*24d8fba4SKumar Gala .clkr = { 763*24d8fba4SKumar Gala .enable_reg = 0x2a8c, 764*24d8fba4SKumar Gala .enable_mask = BIT(11), 765*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 766*24d8fba4SKumar Gala .name = "gsbi7_qup_src", 767*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 768*24d8fba4SKumar Gala .num_parents = 2, 769*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 770*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 771*24d8fba4SKumar Gala }, 772*24d8fba4SKumar Gala }, 773*24d8fba4SKumar Gala }; 774*24d8fba4SKumar Gala 775*24d8fba4SKumar Gala static struct clk_branch gsbi7_qup_clk = { 776*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 777*24d8fba4SKumar Gala .halt_bit = 12, 778*24d8fba4SKumar Gala .clkr = { 779*24d8fba4SKumar Gala .enable_reg = 0x2a8c, 780*24d8fba4SKumar Gala .enable_mask = BIT(9), 781*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 782*24d8fba4SKumar Gala .name = "gsbi7_qup_clk", 783*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gsbi7_qup_src" }, 784*24d8fba4SKumar Gala .num_parents = 1, 785*24d8fba4SKumar Gala .ops = &clk_branch_ops, 786*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 787*24d8fba4SKumar Gala }, 788*24d8fba4SKumar Gala }, 789*24d8fba4SKumar Gala }; 790*24d8fba4SKumar Gala 791*24d8fba4SKumar Gala static struct clk_branch gsbi1_h_clk = { 792*24d8fba4SKumar Gala .hwcg_reg = 0x29c0, 793*24d8fba4SKumar Gala .hwcg_bit = 6, 794*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 795*24d8fba4SKumar Gala .halt_bit = 13, 796*24d8fba4SKumar Gala .clkr = { 797*24d8fba4SKumar Gala .enable_reg = 0x29c0, 798*24d8fba4SKumar Gala .enable_mask = BIT(4), 799*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 800*24d8fba4SKumar Gala .name = "gsbi1_h_clk", 801*24d8fba4SKumar Gala .ops = &clk_branch_ops, 802*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 803*24d8fba4SKumar Gala }, 804*24d8fba4SKumar Gala }, 805*24d8fba4SKumar Gala }; 806*24d8fba4SKumar Gala 807*24d8fba4SKumar Gala static struct clk_branch gsbi2_h_clk = { 808*24d8fba4SKumar Gala .hwcg_reg = 0x29e0, 809*24d8fba4SKumar Gala .hwcg_bit = 6, 810*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 811*24d8fba4SKumar Gala .halt_bit = 9, 812*24d8fba4SKumar Gala .clkr = { 813*24d8fba4SKumar Gala .enable_reg = 0x29e0, 814*24d8fba4SKumar Gala .enable_mask = BIT(4), 815*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 816*24d8fba4SKumar Gala .name = "gsbi2_h_clk", 817*24d8fba4SKumar Gala .ops = &clk_branch_ops, 818*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 819*24d8fba4SKumar Gala }, 820*24d8fba4SKumar Gala }, 821*24d8fba4SKumar Gala }; 822*24d8fba4SKumar Gala 823*24d8fba4SKumar Gala static struct clk_branch gsbi4_h_clk = { 824*24d8fba4SKumar Gala .hwcg_reg = 0x2a20, 825*24d8fba4SKumar Gala .hwcg_bit = 6, 826*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 827*24d8fba4SKumar Gala .halt_bit = 27, 828*24d8fba4SKumar Gala .clkr = { 829*24d8fba4SKumar Gala .enable_reg = 0x2a20, 830*24d8fba4SKumar Gala .enable_mask = BIT(4), 831*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 832*24d8fba4SKumar Gala .name = "gsbi4_h_clk", 833*24d8fba4SKumar Gala .ops = &clk_branch_ops, 834*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 835*24d8fba4SKumar Gala }, 836*24d8fba4SKumar Gala }, 837*24d8fba4SKumar Gala }; 838*24d8fba4SKumar Gala 839*24d8fba4SKumar Gala static struct clk_branch gsbi5_h_clk = { 840*24d8fba4SKumar Gala .hwcg_reg = 0x2a40, 841*24d8fba4SKumar Gala .hwcg_bit = 6, 842*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 843*24d8fba4SKumar Gala .halt_bit = 23, 844*24d8fba4SKumar Gala .clkr = { 845*24d8fba4SKumar Gala .enable_reg = 0x2a40, 846*24d8fba4SKumar Gala .enable_mask = BIT(4), 847*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 848*24d8fba4SKumar Gala .name = "gsbi5_h_clk", 849*24d8fba4SKumar Gala .ops = &clk_branch_ops, 850*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 851*24d8fba4SKumar Gala }, 852*24d8fba4SKumar Gala }, 853*24d8fba4SKumar Gala }; 854*24d8fba4SKumar Gala 855*24d8fba4SKumar Gala static struct clk_branch gsbi6_h_clk = { 856*24d8fba4SKumar Gala .hwcg_reg = 0x2a60, 857*24d8fba4SKumar Gala .hwcg_bit = 6, 858*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 859*24d8fba4SKumar Gala .halt_bit = 19, 860*24d8fba4SKumar Gala .clkr = { 861*24d8fba4SKumar Gala .enable_reg = 0x2a60, 862*24d8fba4SKumar Gala .enable_mask = BIT(4), 863*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 864*24d8fba4SKumar Gala .name = "gsbi6_h_clk", 865*24d8fba4SKumar Gala .ops = &clk_branch_ops, 866*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 867*24d8fba4SKumar Gala }, 868*24d8fba4SKumar Gala }, 869*24d8fba4SKumar Gala }; 870*24d8fba4SKumar Gala 871*24d8fba4SKumar Gala static struct clk_branch gsbi7_h_clk = { 872*24d8fba4SKumar Gala .hwcg_reg = 0x2a80, 873*24d8fba4SKumar Gala .hwcg_bit = 6, 874*24d8fba4SKumar Gala .halt_reg = 0x2fd0, 875*24d8fba4SKumar Gala .halt_bit = 15, 876*24d8fba4SKumar Gala .clkr = { 877*24d8fba4SKumar Gala .enable_reg = 0x2a80, 878*24d8fba4SKumar Gala .enable_mask = BIT(4), 879*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 880*24d8fba4SKumar Gala .name = "gsbi7_h_clk", 881*24d8fba4SKumar Gala .ops = &clk_branch_ops, 882*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 883*24d8fba4SKumar Gala }, 884*24d8fba4SKumar Gala }, 885*24d8fba4SKumar Gala }; 886*24d8fba4SKumar Gala 887*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_gp[] = { 888*24d8fba4SKumar Gala { 12500000, P_PXO, 2, 0, 0 }, 889*24d8fba4SKumar Gala { 25000000, P_PXO, 1, 0, 0 }, 890*24d8fba4SKumar Gala { 64000000, P_PLL8, 2, 1, 3 }, 891*24d8fba4SKumar Gala { 76800000, P_PLL8, 1, 1, 5 }, 892*24d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 }, 893*24d8fba4SKumar Gala { 128000000, P_PLL8, 3, 0, 0 }, 894*24d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 }, 895*24d8fba4SKumar Gala { } 896*24d8fba4SKumar Gala }; 897*24d8fba4SKumar Gala 898*24d8fba4SKumar Gala static struct clk_rcg gp0_src = { 899*24d8fba4SKumar Gala .ns_reg = 0x2d24, 900*24d8fba4SKumar Gala .md_reg = 0x2d00, 901*24d8fba4SKumar Gala .mn = { 902*24d8fba4SKumar Gala .mnctr_en_bit = 8, 903*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 904*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 905*24d8fba4SKumar Gala .n_val_shift = 16, 906*24d8fba4SKumar Gala .m_val_shift = 16, 907*24d8fba4SKumar Gala .width = 8, 908*24d8fba4SKumar Gala }, 909*24d8fba4SKumar Gala .p = { 910*24d8fba4SKumar Gala .pre_div_shift = 3, 911*24d8fba4SKumar Gala .pre_div_width = 2, 912*24d8fba4SKumar Gala }, 913*24d8fba4SKumar Gala .s = { 914*24d8fba4SKumar Gala .src_sel_shift = 0, 915*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 916*24d8fba4SKumar Gala }, 917*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 918*24d8fba4SKumar Gala .clkr = { 919*24d8fba4SKumar Gala .enable_reg = 0x2d24, 920*24d8fba4SKumar Gala .enable_mask = BIT(11), 921*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 922*24d8fba4SKumar Gala .name = "gp0_src", 923*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_cxo, 924*24d8fba4SKumar Gala .num_parents = 3, 925*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 926*24d8fba4SKumar Gala .flags = CLK_SET_PARENT_GATE, 927*24d8fba4SKumar Gala }, 928*24d8fba4SKumar Gala } 929*24d8fba4SKumar Gala }; 930*24d8fba4SKumar Gala 931*24d8fba4SKumar Gala static struct clk_branch gp0_clk = { 932*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 933*24d8fba4SKumar Gala .halt_bit = 7, 934*24d8fba4SKumar Gala .clkr = { 935*24d8fba4SKumar Gala .enable_reg = 0x2d24, 936*24d8fba4SKumar Gala .enable_mask = BIT(9), 937*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 938*24d8fba4SKumar Gala .name = "gp0_clk", 939*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gp0_src" }, 940*24d8fba4SKumar Gala .num_parents = 1, 941*24d8fba4SKumar Gala .ops = &clk_branch_ops, 942*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 943*24d8fba4SKumar Gala }, 944*24d8fba4SKumar Gala }, 945*24d8fba4SKumar Gala }; 946*24d8fba4SKumar Gala 947*24d8fba4SKumar Gala static struct clk_rcg gp1_src = { 948*24d8fba4SKumar Gala .ns_reg = 0x2d44, 949*24d8fba4SKumar Gala .md_reg = 0x2d40, 950*24d8fba4SKumar Gala .mn = { 951*24d8fba4SKumar Gala .mnctr_en_bit = 8, 952*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 953*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 954*24d8fba4SKumar Gala .n_val_shift = 16, 955*24d8fba4SKumar Gala .m_val_shift = 16, 956*24d8fba4SKumar Gala .width = 8, 957*24d8fba4SKumar Gala }, 958*24d8fba4SKumar Gala .p = { 959*24d8fba4SKumar Gala .pre_div_shift = 3, 960*24d8fba4SKumar Gala .pre_div_width = 2, 961*24d8fba4SKumar Gala }, 962*24d8fba4SKumar Gala .s = { 963*24d8fba4SKumar Gala .src_sel_shift = 0, 964*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 965*24d8fba4SKumar Gala }, 966*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 967*24d8fba4SKumar Gala .clkr = { 968*24d8fba4SKumar Gala .enable_reg = 0x2d44, 969*24d8fba4SKumar Gala .enable_mask = BIT(11), 970*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 971*24d8fba4SKumar Gala .name = "gp1_src", 972*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_cxo, 973*24d8fba4SKumar Gala .num_parents = 3, 974*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 975*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 976*24d8fba4SKumar Gala }, 977*24d8fba4SKumar Gala } 978*24d8fba4SKumar Gala }; 979*24d8fba4SKumar Gala 980*24d8fba4SKumar Gala static struct clk_branch gp1_clk = { 981*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 982*24d8fba4SKumar Gala .halt_bit = 6, 983*24d8fba4SKumar Gala .clkr = { 984*24d8fba4SKumar Gala .enable_reg = 0x2d44, 985*24d8fba4SKumar Gala .enable_mask = BIT(9), 986*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 987*24d8fba4SKumar Gala .name = "gp1_clk", 988*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gp1_src" }, 989*24d8fba4SKumar Gala .num_parents = 1, 990*24d8fba4SKumar Gala .ops = &clk_branch_ops, 991*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 992*24d8fba4SKumar Gala }, 993*24d8fba4SKumar Gala }, 994*24d8fba4SKumar Gala }; 995*24d8fba4SKumar Gala 996*24d8fba4SKumar Gala static struct clk_rcg gp2_src = { 997*24d8fba4SKumar Gala .ns_reg = 0x2d64, 998*24d8fba4SKumar Gala .md_reg = 0x2d60, 999*24d8fba4SKumar Gala .mn = { 1000*24d8fba4SKumar Gala .mnctr_en_bit = 8, 1001*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 1002*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 1003*24d8fba4SKumar Gala .n_val_shift = 16, 1004*24d8fba4SKumar Gala .m_val_shift = 16, 1005*24d8fba4SKumar Gala .width = 8, 1006*24d8fba4SKumar Gala }, 1007*24d8fba4SKumar Gala .p = { 1008*24d8fba4SKumar Gala .pre_div_shift = 3, 1009*24d8fba4SKumar Gala .pre_div_width = 2, 1010*24d8fba4SKumar Gala }, 1011*24d8fba4SKumar Gala .s = { 1012*24d8fba4SKumar Gala .src_sel_shift = 0, 1013*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_cxo_map, 1014*24d8fba4SKumar Gala }, 1015*24d8fba4SKumar Gala .freq_tbl = clk_tbl_gp, 1016*24d8fba4SKumar Gala .clkr = { 1017*24d8fba4SKumar Gala .enable_reg = 0x2d64, 1018*24d8fba4SKumar Gala .enable_mask = BIT(11), 1019*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1020*24d8fba4SKumar Gala .name = "gp2_src", 1021*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_cxo, 1022*24d8fba4SKumar Gala .num_parents = 3, 1023*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1024*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1025*24d8fba4SKumar Gala }, 1026*24d8fba4SKumar Gala } 1027*24d8fba4SKumar Gala }; 1028*24d8fba4SKumar Gala 1029*24d8fba4SKumar Gala static struct clk_branch gp2_clk = { 1030*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 1031*24d8fba4SKumar Gala .halt_bit = 5, 1032*24d8fba4SKumar Gala .clkr = { 1033*24d8fba4SKumar Gala .enable_reg = 0x2d64, 1034*24d8fba4SKumar Gala .enable_mask = BIT(9), 1035*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1036*24d8fba4SKumar Gala .name = "gp2_clk", 1037*24d8fba4SKumar Gala .parent_names = (const char *[]){ "gp2_src" }, 1038*24d8fba4SKumar Gala .num_parents = 1, 1039*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1040*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1041*24d8fba4SKumar Gala }, 1042*24d8fba4SKumar Gala }, 1043*24d8fba4SKumar Gala }; 1044*24d8fba4SKumar Gala 1045*24d8fba4SKumar Gala static struct clk_branch pmem_clk = { 1046*24d8fba4SKumar Gala .hwcg_reg = 0x25a0, 1047*24d8fba4SKumar Gala .hwcg_bit = 6, 1048*24d8fba4SKumar Gala .halt_reg = 0x2fc8, 1049*24d8fba4SKumar Gala .halt_bit = 20, 1050*24d8fba4SKumar Gala .clkr = { 1051*24d8fba4SKumar Gala .enable_reg = 0x25a0, 1052*24d8fba4SKumar Gala .enable_mask = BIT(4), 1053*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1054*24d8fba4SKumar Gala .name = "pmem_clk", 1055*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1056*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1057*24d8fba4SKumar Gala }, 1058*24d8fba4SKumar Gala }, 1059*24d8fba4SKumar Gala }; 1060*24d8fba4SKumar Gala 1061*24d8fba4SKumar Gala static struct clk_rcg prng_src = { 1062*24d8fba4SKumar Gala .ns_reg = 0x2e80, 1063*24d8fba4SKumar Gala .p = { 1064*24d8fba4SKumar Gala .pre_div_shift = 3, 1065*24d8fba4SKumar Gala .pre_div_width = 4, 1066*24d8fba4SKumar Gala }, 1067*24d8fba4SKumar Gala .s = { 1068*24d8fba4SKumar Gala .src_sel_shift = 0, 1069*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 1070*24d8fba4SKumar Gala }, 1071*24d8fba4SKumar Gala .clkr = { 1072*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1073*24d8fba4SKumar Gala .name = "prng_src", 1074*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 1075*24d8fba4SKumar Gala .num_parents = 2, 1076*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1077*24d8fba4SKumar Gala }, 1078*24d8fba4SKumar Gala }, 1079*24d8fba4SKumar Gala }; 1080*24d8fba4SKumar Gala 1081*24d8fba4SKumar Gala static struct clk_branch prng_clk = { 1082*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 1083*24d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 1084*24d8fba4SKumar Gala .halt_bit = 10, 1085*24d8fba4SKumar Gala .clkr = { 1086*24d8fba4SKumar Gala .enable_reg = 0x3080, 1087*24d8fba4SKumar Gala .enable_mask = BIT(10), 1088*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1089*24d8fba4SKumar Gala .name = "prng_clk", 1090*24d8fba4SKumar Gala .parent_names = (const char *[]){ "prng_src" }, 1091*24d8fba4SKumar Gala .num_parents = 1, 1092*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1093*24d8fba4SKumar Gala }, 1094*24d8fba4SKumar Gala }, 1095*24d8fba4SKumar Gala }; 1096*24d8fba4SKumar Gala 1097*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sdc[] = { 1098*24d8fba4SKumar Gala { 144000, P_PXO, 5, 18,625 }, 1099*24d8fba4SKumar Gala { 400000, P_PLL8, 4, 1, 240 }, 1100*24d8fba4SKumar Gala { 16000000, P_PLL8, 4, 1, 6 }, 1101*24d8fba4SKumar Gala { 17070000, P_PLL8, 1, 2, 45 }, 1102*24d8fba4SKumar Gala { 20210000, P_PLL8, 1, 1, 19 }, 1103*24d8fba4SKumar Gala { 24000000, P_PLL8, 4, 1, 4 }, 1104*24d8fba4SKumar Gala { 48000000, P_PLL8, 4, 1, 2 }, 1105*24d8fba4SKumar Gala { 64000000, P_PLL8, 3, 1, 2 }, 1106*24d8fba4SKumar Gala { 96000000, P_PLL8, 4, 0, 0 }, 1107*24d8fba4SKumar Gala { 192000000, P_PLL8, 2, 0, 0 }, 1108*24d8fba4SKumar Gala { } 1109*24d8fba4SKumar Gala }; 1110*24d8fba4SKumar Gala 1111*24d8fba4SKumar Gala static struct clk_rcg sdc1_src = { 1112*24d8fba4SKumar Gala .ns_reg = 0x282c, 1113*24d8fba4SKumar Gala .md_reg = 0x2828, 1114*24d8fba4SKumar Gala .mn = { 1115*24d8fba4SKumar Gala .mnctr_en_bit = 8, 1116*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 1117*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 1118*24d8fba4SKumar Gala .n_val_shift = 16, 1119*24d8fba4SKumar Gala .m_val_shift = 16, 1120*24d8fba4SKumar Gala .width = 8, 1121*24d8fba4SKumar Gala }, 1122*24d8fba4SKumar Gala .p = { 1123*24d8fba4SKumar Gala .pre_div_shift = 3, 1124*24d8fba4SKumar Gala .pre_div_width = 2, 1125*24d8fba4SKumar Gala }, 1126*24d8fba4SKumar Gala .s = { 1127*24d8fba4SKumar Gala .src_sel_shift = 0, 1128*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 1129*24d8fba4SKumar Gala }, 1130*24d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc, 1131*24d8fba4SKumar Gala .clkr = { 1132*24d8fba4SKumar Gala .enable_reg = 0x282c, 1133*24d8fba4SKumar Gala .enable_mask = BIT(11), 1134*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1135*24d8fba4SKumar Gala .name = "sdc1_src", 1136*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 1137*24d8fba4SKumar Gala .num_parents = 2, 1138*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1139*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1140*24d8fba4SKumar Gala }, 1141*24d8fba4SKumar Gala } 1142*24d8fba4SKumar Gala }; 1143*24d8fba4SKumar Gala 1144*24d8fba4SKumar Gala static struct clk_branch sdc1_clk = { 1145*24d8fba4SKumar Gala .halt_reg = 0x2fc8, 1146*24d8fba4SKumar Gala .halt_bit = 6, 1147*24d8fba4SKumar Gala .clkr = { 1148*24d8fba4SKumar Gala .enable_reg = 0x282c, 1149*24d8fba4SKumar Gala .enable_mask = BIT(9), 1150*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1151*24d8fba4SKumar Gala .name = "sdc1_clk", 1152*24d8fba4SKumar Gala .parent_names = (const char *[]){ "sdc1_src" }, 1153*24d8fba4SKumar Gala .num_parents = 1, 1154*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1155*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1156*24d8fba4SKumar Gala }, 1157*24d8fba4SKumar Gala }, 1158*24d8fba4SKumar Gala }; 1159*24d8fba4SKumar Gala 1160*24d8fba4SKumar Gala static struct clk_rcg sdc3_src = { 1161*24d8fba4SKumar Gala .ns_reg = 0x286c, 1162*24d8fba4SKumar Gala .md_reg = 0x2868, 1163*24d8fba4SKumar Gala .mn = { 1164*24d8fba4SKumar Gala .mnctr_en_bit = 8, 1165*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 1166*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 1167*24d8fba4SKumar Gala .n_val_shift = 16, 1168*24d8fba4SKumar Gala .m_val_shift = 16, 1169*24d8fba4SKumar Gala .width = 8, 1170*24d8fba4SKumar Gala }, 1171*24d8fba4SKumar Gala .p = { 1172*24d8fba4SKumar Gala .pre_div_shift = 3, 1173*24d8fba4SKumar Gala .pre_div_width = 2, 1174*24d8fba4SKumar Gala }, 1175*24d8fba4SKumar Gala .s = { 1176*24d8fba4SKumar Gala .src_sel_shift = 0, 1177*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 1178*24d8fba4SKumar Gala }, 1179*24d8fba4SKumar Gala .freq_tbl = clk_tbl_sdc, 1180*24d8fba4SKumar Gala .clkr = { 1181*24d8fba4SKumar Gala .enable_reg = 0x286c, 1182*24d8fba4SKumar Gala .enable_mask = BIT(11), 1183*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1184*24d8fba4SKumar Gala .name = "sdc3_src", 1185*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 1186*24d8fba4SKumar Gala .num_parents = 2, 1187*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1188*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1189*24d8fba4SKumar Gala }, 1190*24d8fba4SKumar Gala } 1191*24d8fba4SKumar Gala }; 1192*24d8fba4SKumar Gala 1193*24d8fba4SKumar Gala static struct clk_branch sdc3_clk = { 1194*24d8fba4SKumar Gala .halt_reg = 0x2fc8, 1195*24d8fba4SKumar Gala .halt_bit = 4, 1196*24d8fba4SKumar Gala .clkr = { 1197*24d8fba4SKumar Gala .enable_reg = 0x286c, 1198*24d8fba4SKumar Gala .enable_mask = BIT(9), 1199*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1200*24d8fba4SKumar Gala .name = "sdc3_clk", 1201*24d8fba4SKumar Gala .parent_names = (const char *[]){ "sdc3_src" }, 1202*24d8fba4SKumar Gala .num_parents = 1, 1203*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1204*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1205*24d8fba4SKumar Gala }, 1206*24d8fba4SKumar Gala }, 1207*24d8fba4SKumar Gala }; 1208*24d8fba4SKumar Gala 1209*24d8fba4SKumar Gala static struct clk_branch sdc1_h_clk = { 1210*24d8fba4SKumar Gala .hwcg_reg = 0x2820, 1211*24d8fba4SKumar Gala .hwcg_bit = 6, 1212*24d8fba4SKumar Gala .halt_reg = 0x2fc8, 1213*24d8fba4SKumar Gala .halt_bit = 11, 1214*24d8fba4SKumar Gala .clkr = { 1215*24d8fba4SKumar Gala .enable_reg = 0x2820, 1216*24d8fba4SKumar Gala .enable_mask = BIT(4), 1217*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1218*24d8fba4SKumar Gala .name = "sdc1_h_clk", 1219*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1220*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1221*24d8fba4SKumar Gala }, 1222*24d8fba4SKumar Gala }, 1223*24d8fba4SKumar Gala }; 1224*24d8fba4SKumar Gala 1225*24d8fba4SKumar Gala static struct clk_branch sdc3_h_clk = { 1226*24d8fba4SKumar Gala .hwcg_reg = 0x2860, 1227*24d8fba4SKumar Gala .hwcg_bit = 6, 1228*24d8fba4SKumar Gala .halt_reg = 0x2fc8, 1229*24d8fba4SKumar Gala .halt_bit = 9, 1230*24d8fba4SKumar Gala .clkr = { 1231*24d8fba4SKumar Gala .enable_reg = 0x2860, 1232*24d8fba4SKumar Gala .enable_mask = BIT(4), 1233*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1234*24d8fba4SKumar Gala .name = "sdc3_h_clk", 1235*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1236*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1237*24d8fba4SKumar Gala }, 1238*24d8fba4SKumar Gala }, 1239*24d8fba4SKumar Gala }; 1240*24d8fba4SKumar Gala 1241*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_tsif_ref[] = { 1242*24d8fba4SKumar Gala { 105000, P_PXO, 1, 1, 256 }, 1243*24d8fba4SKumar Gala { } 1244*24d8fba4SKumar Gala }; 1245*24d8fba4SKumar Gala 1246*24d8fba4SKumar Gala static struct clk_rcg tsif_ref_src = { 1247*24d8fba4SKumar Gala .ns_reg = 0x2710, 1248*24d8fba4SKumar Gala .md_reg = 0x270c, 1249*24d8fba4SKumar Gala .mn = { 1250*24d8fba4SKumar Gala .mnctr_en_bit = 8, 1251*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 1252*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 1253*24d8fba4SKumar Gala .n_val_shift = 16, 1254*24d8fba4SKumar Gala .m_val_shift = 16, 1255*24d8fba4SKumar Gala .width = 16, 1256*24d8fba4SKumar Gala }, 1257*24d8fba4SKumar Gala .p = { 1258*24d8fba4SKumar Gala .pre_div_shift = 3, 1259*24d8fba4SKumar Gala .pre_div_width = 2, 1260*24d8fba4SKumar Gala }, 1261*24d8fba4SKumar Gala .s = { 1262*24d8fba4SKumar Gala .src_sel_shift = 0, 1263*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_map, 1264*24d8fba4SKumar Gala }, 1265*24d8fba4SKumar Gala .freq_tbl = clk_tbl_tsif_ref, 1266*24d8fba4SKumar Gala .clkr = { 1267*24d8fba4SKumar Gala .enable_reg = 0x2710, 1268*24d8fba4SKumar Gala .enable_mask = BIT(11), 1269*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1270*24d8fba4SKumar Gala .name = "tsif_ref_src", 1271*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8, 1272*24d8fba4SKumar Gala .num_parents = 2, 1273*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1274*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1275*24d8fba4SKumar Gala }, 1276*24d8fba4SKumar Gala } 1277*24d8fba4SKumar Gala }; 1278*24d8fba4SKumar Gala 1279*24d8fba4SKumar Gala static struct clk_branch tsif_ref_clk = { 1280*24d8fba4SKumar Gala .halt_reg = 0x2fd4, 1281*24d8fba4SKumar Gala .halt_bit = 5, 1282*24d8fba4SKumar Gala .clkr = { 1283*24d8fba4SKumar Gala .enable_reg = 0x2710, 1284*24d8fba4SKumar Gala .enable_mask = BIT(9), 1285*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1286*24d8fba4SKumar Gala .name = "tsif_ref_clk", 1287*24d8fba4SKumar Gala .parent_names = (const char *[]){ "tsif_ref_src" }, 1288*24d8fba4SKumar Gala .num_parents = 1, 1289*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1290*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1291*24d8fba4SKumar Gala }, 1292*24d8fba4SKumar Gala }, 1293*24d8fba4SKumar Gala }; 1294*24d8fba4SKumar Gala 1295*24d8fba4SKumar Gala static struct clk_branch tsif_h_clk = { 1296*24d8fba4SKumar Gala .hwcg_reg = 0x2700, 1297*24d8fba4SKumar Gala .hwcg_bit = 6, 1298*24d8fba4SKumar Gala .halt_reg = 0x2fd4, 1299*24d8fba4SKumar Gala .halt_bit = 7, 1300*24d8fba4SKumar Gala .clkr = { 1301*24d8fba4SKumar Gala .enable_reg = 0x2700, 1302*24d8fba4SKumar Gala .enable_mask = BIT(4), 1303*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1304*24d8fba4SKumar Gala .name = "tsif_h_clk", 1305*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1306*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1307*24d8fba4SKumar Gala }, 1308*24d8fba4SKumar Gala }, 1309*24d8fba4SKumar Gala }; 1310*24d8fba4SKumar Gala 1311*24d8fba4SKumar Gala static struct clk_branch dma_bam_h_clk = { 1312*24d8fba4SKumar Gala .hwcg_reg = 0x25c0, 1313*24d8fba4SKumar Gala .hwcg_bit = 6, 1314*24d8fba4SKumar Gala .halt_reg = 0x2fc8, 1315*24d8fba4SKumar Gala .halt_bit = 12, 1316*24d8fba4SKumar Gala .clkr = { 1317*24d8fba4SKumar Gala .enable_reg = 0x25c0, 1318*24d8fba4SKumar Gala .enable_mask = BIT(4), 1319*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1320*24d8fba4SKumar Gala .name = "dma_bam_h_clk", 1321*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1322*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1323*24d8fba4SKumar Gala }, 1324*24d8fba4SKumar Gala }, 1325*24d8fba4SKumar Gala }; 1326*24d8fba4SKumar Gala 1327*24d8fba4SKumar Gala static struct clk_branch adm0_clk = { 1328*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1329*24d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 1330*24d8fba4SKumar Gala .halt_bit = 12, 1331*24d8fba4SKumar Gala .clkr = { 1332*24d8fba4SKumar Gala .enable_reg = 0x3080, 1333*24d8fba4SKumar Gala .enable_mask = BIT(2), 1334*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1335*24d8fba4SKumar Gala .name = "adm0_clk", 1336*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1337*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1338*24d8fba4SKumar Gala }, 1339*24d8fba4SKumar Gala }, 1340*24d8fba4SKumar Gala }; 1341*24d8fba4SKumar Gala 1342*24d8fba4SKumar Gala static struct clk_branch adm0_pbus_clk = { 1343*24d8fba4SKumar Gala .hwcg_reg = 0x2208, 1344*24d8fba4SKumar Gala .hwcg_bit = 6, 1345*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1346*24d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 1347*24d8fba4SKumar Gala .halt_bit = 11, 1348*24d8fba4SKumar Gala .clkr = { 1349*24d8fba4SKumar Gala .enable_reg = 0x3080, 1350*24d8fba4SKumar Gala .enable_mask = BIT(3), 1351*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1352*24d8fba4SKumar Gala .name = "adm0_pbus_clk", 1353*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1354*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1355*24d8fba4SKumar Gala }, 1356*24d8fba4SKumar Gala }, 1357*24d8fba4SKumar Gala }; 1358*24d8fba4SKumar Gala 1359*24d8fba4SKumar Gala static struct clk_branch pmic_arb0_h_clk = { 1360*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 1361*24d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 1362*24d8fba4SKumar Gala .halt_bit = 22, 1363*24d8fba4SKumar Gala .clkr = { 1364*24d8fba4SKumar Gala .enable_reg = 0x3080, 1365*24d8fba4SKumar Gala .enable_mask = BIT(8), 1366*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1367*24d8fba4SKumar Gala .name = "pmic_arb0_h_clk", 1368*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1369*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1370*24d8fba4SKumar Gala }, 1371*24d8fba4SKumar Gala }, 1372*24d8fba4SKumar Gala }; 1373*24d8fba4SKumar Gala 1374*24d8fba4SKumar Gala static struct clk_branch pmic_arb1_h_clk = { 1375*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 1376*24d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 1377*24d8fba4SKumar Gala .halt_bit = 21, 1378*24d8fba4SKumar Gala .clkr = { 1379*24d8fba4SKumar Gala .enable_reg = 0x3080, 1380*24d8fba4SKumar Gala .enable_mask = BIT(9), 1381*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1382*24d8fba4SKumar Gala .name = "pmic_arb1_h_clk", 1383*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1384*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1385*24d8fba4SKumar Gala }, 1386*24d8fba4SKumar Gala }, 1387*24d8fba4SKumar Gala }; 1388*24d8fba4SKumar Gala 1389*24d8fba4SKumar Gala static struct clk_branch pmic_ssbi2_clk = { 1390*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 1391*24d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 1392*24d8fba4SKumar Gala .halt_bit = 23, 1393*24d8fba4SKumar Gala .clkr = { 1394*24d8fba4SKumar Gala .enable_reg = 0x3080, 1395*24d8fba4SKumar Gala .enable_mask = BIT(7), 1396*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1397*24d8fba4SKumar Gala .name = "pmic_ssbi2_clk", 1398*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1399*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1400*24d8fba4SKumar Gala }, 1401*24d8fba4SKumar Gala }, 1402*24d8fba4SKumar Gala }; 1403*24d8fba4SKumar Gala 1404*24d8fba4SKumar Gala static struct clk_branch rpm_msg_ram_h_clk = { 1405*24d8fba4SKumar Gala .hwcg_reg = 0x27e0, 1406*24d8fba4SKumar Gala .hwcg_bit = 6, 1407*24d8fba4SKumar Gala .halt_reg = 0x2fd8, 1408*24d8fba4SKumar Gala .halt_check = BRANCH_HALT_VOTED, 1409*24d8fba4SKumar Gala .halt_bit = 12, 1410*24d8fba4SKumar Gala .clkr = { 1411*24d8fba4SKumar Gala .enable_reg = 0x3080, 1412*24d8fba4SKumar Gala .enable_mask = BIT(6), 1413*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1414*24d8fba4SKumar Gala .name = "rpm_msg_ram_h_clk", 1415*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1416*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1417*24d8fba4SKumar Gala }, 1418*24d8fba4SKumar Gala }, 1419*24d8fba4SKumar Gala }; 1420*24d8fba4SKumar Gala 1421*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_pcie_ref[] = { 1422*24d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 }, 1423*24d8fba4SKumar Gala { } 1424*24d8fba4SKumar Gala }; 1425*24d8fba4SKumar Gala 1426*24d8fba4SKumar Gala static struct clk_rcg pcie_ref_src = { 1427*24d8fba4SKumar Gala .ns_reg = 0x3860, 1428*24d8fba4SKumar Gala .p = { 1429*24d8fba4SKumar Gala .pre_div_shift = 3, 1430*24d8fba4SKumar Gala .pre_div_width = 4, 1431*24d8fba4SKumar Gala }, 1432*24d8fba4SKumar Gala .s = { 1433*24d8fba4SKumar Gala .src_sel_shift = 0, 1434*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 1435*24d8fba4SKumar Gala }, 1436*24d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 1437*24d8fba4SKumar Gala .clkr = { 1438*24d8fba4SKumar Gala .enable_reg = 0x3860, 1439*24d8fba4SKumar Gala .enable_mask = BIT(11), 1440*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1441*24d8fba4SKumar Gala .name = "pcie_ref_src", 1442*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 1443*24d8fba4SKumar Gala .num_parents = 2, 1444*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1445*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1446*24d8fba4SKumar Gala }, 1447*24d8fba4SKumar Gala }, 1448*24d8fba4SKumar Gala }; 1449*24d8fba4SKumar Gala 1450*24d8fba4SKumar Gala static struct clk_branch pcie_ref_src_clk = { 1451*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1452*24d8fba4SKumar Gala .halt_bit = 30, 1453*24d8fba4SKumar Gala .clkr = { 1454*24d8fba4SKumar Gala .enable_reg = 0x3860, 1455*24d8fba4SKumar Gala .enable_mask = BIT(9), 1456*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1457*24d8fba4SKumar Gala .name = "pcie_ref_src_clk", 1458*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pcie_ref_src" }, 1459*24d8fba4SKumar Gala .num_parents = 1, 1460*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1461*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1462*24d8fba4SKumar Gala }, 1463*24d8fba4SKumar Gala }, 1464*24d8fba4SKumar Gala }; 1465*24d8fba4SKumar Gala 1466*24d8fba4SKumar Gala static struct clk_branch pcie_a_clk = { 1467*24d8fba4SKumar Gala .halt_reg = 0x2fc0, 1468*24d8fba4SKumar Gala .halt_bit = 13, 1469*24d8fba4SKumar Gala .clkr = { 1470*24d8fba4SKumar Gala .enable_reg = 0x22c0, 1471*24d8fba4SKumar Gala .enable_mask = BIT(4), 1472*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1473*24d8fba4SKumar Gala .name = "pcie_a_clk", 1474*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1475*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1476*24d8fba4SKumar Gala }, 1477*24d8fba4SKumar Gala }, 1478*24d8fba4SKumar Gala }; 1479*24d8fba4SKumar Gala 1480*24d8fba4SKumar Gala static struct clk_branch pcie_aux_clk = { 1481*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1482*24d8fba4SKumar Gala .halt_bit = 31, 1483*24d8fba4SKumar Gala .clkr = { 1484*24d8fba4SKumar Gala .enable_reg = 0x22c8, 1485*24d8fba4SKumar Gala .enable_mask = BIT(4), 1486*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1487*24d8fba4SKumar Gala .name = "pcie_aux_clk", 1488*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1489*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1490*24d8fba4SKumar Gala }, 1491*24d8fba4SKumar Gala }, 1492*24d8fba4SKumar Gala }; 1493*24d8fba4SKumar Gala 1494*24d8fba4SKumar Gala static struct clk_branch pcie_h_clk = { 1495*24d8fba4SKumar Gala .halt_reg = 0x2fd4, 1496*24d8fba4SKumar Gala .halt_bit = 8, 1497*24d8fba4SKumar Gala .clkr = { 1498*24d8fba4SKumar Gala .enable_reg = 0x22cc, 1499*24d8fba4SKumar Gala .enable_mask = BIT(4), 1500*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1501*24d8fba4SKumar Gala .name = "pcie_h_clk", 1502*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1503*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1504*24d8fba4SKumar Gala }, 1505*24d8fba4SKumar Gala }, 1506*24d8fba4SKumar Gala }; 1507*24d8fba4SKumar Gala 1508*24d8fba4SKumar Gala static struct clk_branch pcie_phy_clk = { 1509*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1510*24d8fba4SKumar Gala .halt_bit = 29, 1511*24d8fba4SKumar Gala .clkr = { 1512*24d8fba4SKumar Gala .enable_reg = 0x22d0, 1513*24d8fba4SKumar Gala .enable_mask = BIT(4), 1514*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1515*24d8fba4SKumar Gala .name = "pcie_phy_clk", 1516*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1517*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1518*24d8fba4SKumar Gala }, 1519*24d8fba4SKumar Gala }, 1520*24d8fba4SKumar Gala }; 1521*24d8fba4SKumar Gala 1522*24d8fba4SKumar Gala static struct clk_rcg pcie1_ref_src = { 1523*24d8fba4SKumar Gala .ns_reg = 0x3aa0, 1524*24d8fba4SKumar Gala .p = { 1525*24d8fba4SKumar Gala .pre_div_shift = 3, 1526*24d8fba4SKumar Gala .pre_div_width = 4, 1527*24d8fba4SKumar Gala }, 1528*24d8fba4SKumar Gala .s = { 1529*24d8fba4SKumar Gala .src_sel_shift = 0, 1530*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 1531*24d8fba4SKumar Gala }, 1532*24d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 1533*24d8fba4SKumar Gala .clkr = { 1534*24d8fba4SKumar Gala .enable_reg = 0x3aa0, 1535*24d8fba4SKumar Gala .enable_mask = BIT(11), 1536*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1537*24d8fba4SKumar Gala .name = "pcie1_ref_src", 1538*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 1539*24d8fba4SKumar Gala .num_parents = 2, 1540*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1541*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1542*24d8fba4SKumar Gala }, 1543*24d8fba4SKumar Gala }, 1544*24d8fba4SKumar Gala }; 1545*24d8fba4SKumar Gala 1546*24d8fba4SKumar Gala static struct clk_branch pcie1_ref_src_clk = { 1547*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1548*24d8fba4SKumar Gala .halt_bit = 27, 1549*24d8fba4SKumar Gala .clkr = { 1550*24d8fba4SKumar Gala .enable_reg = 0x3aa0, 1551*24d8fba4SKumar Gala .enable_mask = BIT(9), 1552*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1553*24d8fba4SKumar Gala .name = "pcie1_ref_src_clk", 1554*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pcie1_ref_src" }, 1555*24d8fba4SKumar Gala .num_parents = 1, 1556*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1557*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1558*24d8fba4SKumar Gala }, 1559*24d8fba4SKumar Gala }, 1560*24d8fba4SKumar Gala }; 1561*24d8fba4SKumar Gala 1562*24d8fba4SKumar Gala static struct clk_branch pcie1_a_clk = { 1563*24d8fba4SKumar Gala .halt_reg = 0x2fc0, 1564*24d8fba4SKumar Gala .halt_bit = 10, 1565*24d8fba4SKumar Gala .clkr = { 1566*24d8fba4SKumar Gala .enable_reg = 0x3a80, 1567*24d8fba4SKumar Gala .enable_mask = BIT(4), 1568*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1569*24d8fba4SKumar Gala .name = "pcie1_a_clk", 1570*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1571*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1572*24d8fba4SKumar Gala }, 1573*24d8fba4SKumar Gala }, 1574*24d8fba4SKumar Gala }; 1575*24d8fba4SKumar Gala 1576*24d8fba4SKumar Gala static struct clk_branch pcie1_aux_clk = { 1577*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1578*24d8fba4SKumar Gala .halt_bit = 28, 1579*24d8fba4SKumar Gala .clkr = { 1580*24d8fba4SKumar Gala .enable_reg = 0x3a88, 1581*24d8fba4SKumar Gala .enable_mask = BIT(4), 1582*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1583*24d8fba4SKumar Gala .name = "pcie1_aux_clk", 1584*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1585*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1586*24d8fba4SKumar Gala }, 1587*24d8fba4SKumar Gala }, 1588*24d8fba4SKumar Gala }; 1589*24d8fba4SKumar Gala 1590*24d8fba4SKumar Gala static struct clk_branch pcie1_h_clk = { 1591*24d8fba4SKumar Gala .halt_reg = 0x2fd4, 1592*24d8fba4SKumar Gala .halt_bit = 9, 1593*24d8fba4SKumar Gala .clkr = { 1594*24d8fba4SKumar Gala .enable_reg = 0x3a8c, 1595*24d8fba4SKumar Gala .enable_mask = BIT(4), 1596*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1597*24d8fba4SKumar Gala .name = "pcie1_h_clk", 1598*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1599*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1600*24d8fba4SKumar Gala }, 1601*24d8fba4SKumar Gala }, 1602*24d8fba4SKumar Gala }; 1603*24d8fba4SKumar Gala 1604*24d8fba4SKumar Gala static struct clk_branch pcie1_phy_clk = { 1605*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1606*24d8fba4SKumar Gala .halt_bit = 26, 1607*24d8fba4SKumar Gala .clkr = { 1608*24d8fba4SKumar Gala .enable_reg = 0x3a90, 1609*24d8fba4SKumar Gala .enable_mask = BIT(4), 1610*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1611*24d8fba4SKumar Gala .name = "pcie1_phy_clk", 1612*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1613*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1614*24d8fba4SKumar Gala }, 1615*24d8fba4SKumar Gala }, 1616*24d8fba4SKumar Gala }; 1617*24d8fba4SKumar Gala 1618*24d8fba4SKumar Gala static struct clk_rcg pcie2_ref_src = { 1619*24d8fba4SKumar Gala .ns_reg = 0x3ae0, 1620*24d8fba4SKumar Gala .p = { 1621*24d8fba4SKumar Gala .pre_div_shift = 3, 1622*24d8fba4SKumar Gala .pre_div_width = 4, 1623*24d8fba4SKumar Gala }, 1624*24d8fba4SKumar Gala .s = { 1625*24d8fba4SKumar Gala .src_sel_shift = 0, 1626*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_map, 1627*24d8fba4SKumar Gala }, 1628*24d8fba4SKumar Gala .freq_tbl = clk_tbl_pcie_ref, 1629*24d8fba4SKumar Gala .clkr = { 1630*24d8fba4SKumar Gala .enable_reg = 0x3ae0, 1631*24d8fba4SKumar Gala .enable_mask = BIT(11), 1632*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1633*24d8fba4SKumar Gala .name = "pcie2_ref_src", 1634*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 1635*24d8fba4SKumar Gala .num_parents = 2, 1636*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1637*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1638*24d8fba4SKumar Gala }, 1639*24d8fba4SKumar Gala }, 1640*24d8fba4SKumar Gala }; 1641*24d8fba4SKumar Gala 1642*24d8fba4SKumar Gala static struct clk_branch pcie2_ref_src_clk = { 1643*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1644*24d8fba4SKumar Gala .halt_bit = 24, 1645*24d8fba4SKumar Gala .clkr = { 1646*24d8fba4SKumar Gala .enable_reg = 0x3ae0, 1647*24d8fba4SKumar Gala .enable_mask = BIT(9), 1648*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1649*24d8fba4SKumar Gala .name = "pcie2_ref_src_clk", 1650*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pcie2_ref_src" }, 1651*24d8fba4SKumar Gala .num_parents = 1, 1652*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1653*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1654*24d8fba4SKumar Gala }, 1655*24d8fba4SKumar Gala }, 1656*24d8fba4SKumar Gala }; 1657*24d8fba4SKumar Gala 1658*24d8fba4SKumar Gala static struct clk_branch pcie2_a_clk = { 1659*24d8fba4SKumar Gala .halt_reg = 0x2fc0, 1660*24d8fba4SKumar Gala .halt_bit = 9, 1661*24d8fba4SKumar Gala .clkr = { 1662*24d8fba4SKumar Gala .enable_reg = 0x3ac0, 1663*24d8fba4SKumar Gala .enable_mask = BIT(4), 1664*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1665*24d8fba4SKumar Gala .name = "pcie2_a_clk", 1666*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1667*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1668*24d8fba4SKumar Gala }, 1669*24d8fba4SKumar Gala }, 1670*24d8fba4SKumar Gala }; 1671*24d8fba4SKumar Gala 1672*24d8fba4SKumar Gala static struct clk_branch pcie2_aux_clk = { 1673*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1674*24d8fba4SKumar Gala .halt_bit = 25, 1675*24d8fba4SKumar Gala .clkr = { 1676*24d8fba4SKumar Gala .enable_reg = 0x3ac8, 1677*24d8fba4SKumar Gala .enable_mask = BIT(4), 1678*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1679*24d8fba4SKumar Gala .name = "pcie2_aux_clk", 1680*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1681*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1682*24d8fba4SKumar Gala }, 1683*24d8fba4SKumar Gala }, 1684*24d8fba4SKumar Gala }; 1685*24d8fba4SKumar Gala 1686*24d8fba4SKumar Gala static struct clk_branch pcie2_h_clk = { 1687*24d8fba4SKumar Gala .halt_reg = 0x2fd4, 1688*24d8fba4SKumar Gala .halt_bit = 10, 1689*24d8fba4SKumar Gala .clkr = { 1690*24d8fba4SKumar Gala .enable_reg = 0x3acc, 1691*24d8fba4SKumar Gala .enable_mask = BIT(4), 1692*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1693*24d8fba4SKumar Gala .name = "pcie2_h_clk", 1694*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1695*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1696*24d8fba4SKumar Gala }, 1697*24d8fba4SKumar Gala }, 1698*24d8fba4SKumar Gala }; 1699*24d8fba4SKumar Gala 1700*24d8fba4SKumar Gala static struct clk_branch pcie2_phy_clk = { 1701*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1702*24d8fba4SKumar Gala .halt_bit = 23, 1703*24d8fba4SKumar Gala .clkr = { 1704*24d8fba4SKumar Gala .enable_reg = 0x3ad0, 1705*24d8fba4SKumar Gala .enable_mask = BIT(4), 1706*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1707*24d8fba4SKumar Gala .name = "pcie2_phy_clk", 1708*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1709*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1710*24d8fba4SKumar Gala }, 1711*24d8fba4SKumar Gala }, 1712*24d8fba4SKumar Gala }; 1713*24d8fba4SKumar Gala 1714*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_sata_ref[] = { 1715*24d8fba4SKumar Gala { 100000000, P_PLL3, 12, 0, 0 }, 1716*24d8fba4SKumar Gala { } 1717*24d8fba4SKumar Gala }; 1718*24d8fba4SKumar Gala 1719*24d8fba4SKumar Gala static struct clk_rcg sata_ref_src = { 1720*24d8fba4SKumar Gala .ns_reg = 0x2c08, 1721*24d8fba4SKumar Gala .p = { 1722*24d8fba4SKumar Gala .pre_div_shift = 3, 1723*24d8fba4SKumar Gala .pre_div_width = 4, 1724*24d8fba4SKumar Gala }, 1725*24d8fba4SKumar Gala .s = { 1726*24d8fba4SKumar Gala .src_sel_shift = 0, 1727*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll3_sata_map, 1728*24d8fba4SKumar Gala }, 1729*24d8fba4SKumar Gala .freq_tbl = clk_tbl_sata_ref, 1730*24d8fba4SKumar Gala .clkr = { 1731*24d8fba4SKumar Gala .enable_reg = 0x2c08, 1732*24d8fba4SKumar Gala .enable_mask = BIT(7), 1733*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1734*24d8fba4SKumar Gala .name = "sata_ref_src", 1735*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll3, 1736*24d8fba4SKumar Gala .num_parents = 2, 1737*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1738*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1739*24d8fba4SKumar Gala }, 1740*24d8fba4SKumar Gala }, 1741*24d8fba4SKumar Gala }; 1742*24d8fba4SKumar Gala 1743*24d8fba4SKumar Gala static struct clk_branch sata_rxoob_clk = { 1744*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1745*24d8fba4SKumar Gala .halt_bit = 20, 1746*24d8fba4SKumar Gala .clkr = { 1747*24d8fba4SKumar Gala .enable_reg = 0x2c0c, 1748*24d8fba4SKumar Gala .enable_mask = BIT(4), 1749*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1750*24d8fba4SKumar Gala .name = "sata_rxoob_clk", 1751*24d8fba4SKumar Gala .parent_names = (const char *[]){ "sata_ref_src" }, 1752*24d8fba4SKumar Gala .num_parents = 1, 1753*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1754*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1755*24d8fba4SKumar Gala }, 1756*24d8fba4SKumar Gala }, 1757*24d8fba4SKumar Gala }; 1758*24d8fba4SKumar Gala 1759*24d8fba4SKumar Gala static struct clk_branch sata_pmalive_clk = { 1760*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1761*24d8fba4SKumar Gala .halt_bit = 19, 1762*24d8fba4SKumar Gala .clkr = { 1763*24d8fba4SKumar Gala .enable_reg = 0x2c10, 1764*24d8fba4SKumar Gala .enable_mask = BIT(4), 1765*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1766*24d8fba4SKumar Gala .name = "sata_pmalive_clk", 1767*24d8fba4SKumar Gala .parent_names = (const char *[]){ "sata_ref_src" }, 1768*24d8fba4SKumar Gala .num_parents = 1, 1769*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1770*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1771*24d8fba4SKumar Gala }, 1772*24d8fba4SKumar Gala }, 1773*24d8fba4SKumar Gala }; 1774*24d8fba4SKumar Gala 1775*24d8fba4SKumar Gala static struct clk_branch sata_phy_ref_clk = { 1776*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1777*24d8fba4SKumar Gala .halt_bit = 18, 1778*24d8fba4SKumar Gala .clkr = { 1779*24d8fba4SKumar Gala .enable_reg = 0x2c14, 1780*24d8fba4SKumar Gala .enable_mask = BIT(4), 1781*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1782*24d8fba4SKumar Gala .name = "sata_phy_ref_clk", 1783*24d8fba4SKumar Gala .parent_names = (const char *[]){ "pxo" }, 1784*24d8fba4SKumar Gala .num_parents = 1, 1785*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1786*24d8fba4SKumar Gala }, 1787*24d8fba4SKumar Gala }, 1788*24d8fba4SKumar Gala }; 1789*24d8fba4SKumar Gala 1790*24d8fba4SKumar Gala static struct clk_branch sata_a_clk = { 1791*24d8fba4SKumar Gala .halt_reg = 0x2fc0, 1792*24d8fba4SKumar Gala .halt_bit = 12, 1793*24d8fba4SKumar Gala .clkr = { 1794*24d8fba4SKumar Gala .enable_reg = 0x2c20, 1795*24d8fba4SKumar Gala .enable_mask = BIT(4), 1796*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1797*24d8fba4SKumar Gala .name = "sata_a_clk", 1798*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1799*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1800*24d8fba4SKumar Gala }, 1801*24d8fba4SKumar Gala }, 1802*24d8fba4SKumar Gala }; 1803*24d8fba4SKumar Gala 1804*24d8fba4SKumar Gala static struct clk_branch sata_h_clk = { 1805*24d8fba4SKumar Gala .halt_reg = 0x2fdc, 1806*24d8fba4SKumar Gala .halt_bit = 21, 1807*24d8fba4SKumar Gala .clkr = { 1808*24d8fba4SKumar Gala .enable_reg = 0x2c00, 1809*24d8fba4SKumar Gala .enable_mask = BIT(4), 1810*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1811*24d8fba4SKumar Gala .name = "sata_h_clk", 1812*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1813*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1814*24d8fba4SKumar Gala }, 1815*24d8fba4SKumar Gala }, 1816*24d8fba4SKumar Gala }; 1817*24d8fba4SKumar Gala 1818*24d8fba4SKumar Gala static struct clk_branch sfab_sata_s_h_clk = { 1819*24d8fba4SKumar Gala .halt_reg = 0x2fc4, 1820*24d8fba4SKumar Gala .halt_bit = 14, 1821*24d8fba4SKumar Gala .clkr = { 1822*24d8fba4SKumar Gala .enable_reg = 0x2480, 1823*24d8fba4SKumar Gala .enable_mask = BIT(4), 1824*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1825*24d8fba4SKumar Gala .name = "sfab_sata_s_h_clk", 1826*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1827*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1828*24d8fba4SKumar Gala }, 1829*24d8fba4SKumar Gala }, 1830*24d8fba4SKumar Gala }; 1831*24d8fba4SKumar Gala 1832*24d8fba4SKumar Gala static struct clk_branch sata_phy_cfg_clk = { 1833*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 1834*24d8fba4SKumar Gala .halt_bit = 14, 1835*24d8fba4SKumar Gala .clkr = { 1836*24d8fba4SKumar Gala .enable_reg = 0x2c40, 1837*24d8fba4SKumar Gala .enable_mask = BIT(4), 1838*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1839*24d8fba4SKumar Gala .name = "sata_phy_cfg_clk", 1840*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1841*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 1842*24d8fba4SKumar Gala }, 1843*24d8fba4SKumar Gala }, 1844*24d8fba4SKumar Gala }; 1845*24d8fba4SKumar Gala 1846*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_master[] = { 1847*24d8fba4SKumar Gala { 125000000, P_PLL0, 1, 5, 32 }, 1848*24d8fba4SKumar Gala { } 1849*24d8fba4SKumar Gala }; 1850*24d8fba4SKumar Gala 1851*24d8fba4SKumar Gala static struct clk_rcg usb30_master_clk_src = { 1852*24d8fba4SKumar Gala .ns_reg = 0x3b2c, 1853*24d8fba4SKumar Gala .md_reg = 0x3b28, 1854*24d8fba4SKumar Gala .mn = { 1855*24d8fba4SKumar Gala .mnctr_en_bit = 8, 1856*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 1857*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 1858*24d8fba4SKumar Gala .n_val_shift = 16, 1859*24d8fba4SKumar Gala .m_val_shift = 16, 1860*24d8fba4SKumar Gala .width = 8, 1861*24d8fba4SKumar Gala }, 1862*24d8fba4SKumar Gala .p = { 1863*24d8fba4SKumar Gala .pre_div_shift = 3, 1864*24d8fba4SKumar Gala .pre_div_width = 2, 1865*24d8fba4SKumar Gala }, 1866*24d8fba4SKumar Gala .s = { 1867*24d8fba4SKumar Gala .src_sel_shift = 0, 1868*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 1869*24d8fba4SKumar Gala }, 1870*24d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_master, 1871*24d8fba4SKumar Gala .clkr = { 1872*24d8fba4SKumar Gala .enable_reg = 0x3b2c, 1873*24d8fba4SKumar Gala .enable_mask = BIT(11), 1874*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1875*24d8fba4SKumar Gala .name = "usb30_master_ref_src", 1876*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 1877*24d8fba4SKumar Gala .num_parents = 3, 1878*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1879*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1880*24d8fba4SKumar Gala }, 1881*24d8fba4SKumar Gala }, 1882*24d8fba4SKumar Gala }; 1883*24d8fba4SKumar Gala 1884*24d8fba4SKumar Gala static struct clk_branch usb30_0_branch_clk = { 1885*24d8fba4SKumar Gala .halt_reg = 0x2fc4, 1886*24d8fba4SKumar Gala .halt_bit = 22, 1887*24d8fba4SKumar Gala .clkr = { 1888*24d8fba4SKumar Gala .enable_reg = 0x3b24, 1889*24d8fba4SKumar Gala .enable_mask = BIT(4), 1890*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1891*24d8fba4SKumar Gala .name = "usb30_0_branch_clk", 1892*24d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_master_ref_src", }, 1893*24d8fba4SKumar Gala .num_parents = 1, 1894*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1895*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1896*24d8fba4SKumar Gala }, 1897*24d8fba4SKumar Gala }, 1898*24d8fba4SKumar Gala }; 1899*24d8fba4SKumar Gala 1900*24d8fba4SKumar Gala static struct clk_branch usb30_1_branch_clk = { 1901*24d8fba4SKumar Gala .halt_reg = 0x2fc4, 1902*24d8fba4SKumar Gala .halt_bit = 17, 1903*24d8fba4SKumar Gala .clkr = { 1904*24d8fba4SKumar Gala .enable_reg = 0x3b34, 1905*24d8fba4SKumar Gala .enable_mask = BIT(4), 1906*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1907*24d8fba4SKumar Gala .name = "usb30_1_branch_clk", 1908*24d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_master_ref_src", }, 1909*24d8fba4SKumar Gala .num_parents = 1, 1910*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1911*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1912*24d8fba4SKumar Gala }, 1913*24d8fba4SKumar Gala }, 1914*24d8fba4SKumar Gala }; 1915*24d8fba4SKumar Gala 1916*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb30_utmi[] = { 1917*24d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 }, 1918*24d8fba4SKumar Gala { } 1919*24d8fba4SKumar Gala }; 1920*24d8fba4SKumar Gala 1921*24d8fba4SKumar Gala static struct clk_rcg usb30_utmi_clk = { 1922*24d8fba4SKumar Gala .ns_reg = 0x3b44, 1923*24d8fba4SKumar Gala .md_reg = 0x3b40, 1924*24d8fba4SKumar Gala .mn = { 1925*24d8fba4SKumar Gala .mnctr_en_bit = 8, 1926*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 1927*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 1928*24d8fba4SKumar Gala .n_val_shift = 16, 1929*24d8fba4SKumar Gala .m_val_shift = 16, 1930*24d8fba4SKumar Gala .width = 8, 1931*24d8fba4SKumar Gala }, 1932*24d8fba4SKumar Gala .p = { 1933*24d8fba4SKumar Gala .pre_div_shift = 3, 1934*24d8fba4SKumar Gala .pre_div_width = 2, 1935*24d8fba4SKumar Gala }, 1936*24d8fba4SKumar Gala .s = { 1937*24d8fba4SKumar Gala .src_sel_shift = 0, 1938*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 1939*24d8fba4SKumar Gala }, 1940*24d8fba4SKumar Gala .freq_tbl = clk_tbl_usb30_utmi, 1941*24d8fba4SKumar Gala .clkr = { 1942*24d8fba4SKumar Gala .enable_reg = 0x3b44, 1943*24d8fba4SKumar Gala .enable_mask = BIT(11), 1944*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1945*24d8fba4SKumar Gala .name = "usb30_utmi_clk", 1946*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 1947*24d8fba4SKumar Gala .num_parents = 3, 1948*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 1949*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 1950*24d8fba4SKumar Gala }, 1951*24d8fba4SKumar Gala }, 1952*24d8fba4SKumar Gala }; 1953*24d8fba4SKumar Gala 1954*24d8fba4SKumar Gala static struct clk_branch usb30_0_utmi_clk_ctl = { 1955*24d8fba4SKumar Gala .halt_reg = 0x2fc4, 1956*24d8fba4SKumar Gala .halt_bit = 21, 1957*24d8fba4SKumar Gala .clkr = { 1958*24d8fba4SKumar Gala .enable_reg = 0x3b48, 1959*24d8fba4SKumar Gala .enable_mask = BIT(4), 1960*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1961*24d8fba4SKumar Gala .name = "usb30_0_utmi_clk_ctl", 1962*24d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_utmi_clk", }, 1963*24d8fba4SKumar Gala .num_parents = 1, 1964*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1965*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1966*24d8fba4SKumar Gala }, 1967*24d8fba4SKumar Gala }, 1968*24d8fba4SKumar Gala }; 1969*24d8fba4SKumar Gala 1970*24d8fba4SKumar Gala static struct clk_branch usb30_1_utmi_clk_ctl = { 1971*24d8fba4SKumar Gala .halt_reg = 0x2fc4, 1972*24d8fba4SKumar Gala .halt_bit = 15, 1973*24d8fba4SKumar Gala .clkr = { 1974*24d8fba4SKumar Gala .enable_reg = 0x3b4c, 1975*24d8fba4SKumar Gala .enable_mask = BIT(4), 1976*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 1977*24d8fba4SKumar Gala .name = "usb30_1_utmi_clk_ctl", 1978*24d8fba4SKumar Gala .parent_names = (const char *[]){ "usb30_utmi_clk", }, 1979*24d8fba4SKumar Gala .num_parents = 1, 1980*24d8fba4SKumar Gala .ops = &clk_branch_ops, 1981*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 1982*24d8fba4SKumar Gala }, 1983*24d8fba4SKumar Gala }, 1984*24d8fba4SKumar Gala }; 1985*24d8fba4SKumar Gala 1986*24d8fba4SKumar Gala static const struct freq_tbl clk_tbl_usb[] = { 1987*24d8fba4SKumar Gala { 60000000, P_PLL8, 1, 5, 32 }, 1988*24d8fba4SKumar Gala { } 1989*24d8fba4SKumar Gala }; 1990*24d8fba4SKumar Gala 1991*24d8fba4SKumar Gala static struct clk_rcg usb_hs1_xcvr_clk_src = { 1992*24d8fba4SKumar Gala .ns_reg = 0x290C, 1993*24d8fba4SKumar Gala .md_reg = 0x2908, 1994*24d8fba4SKumar Gala .mn = { 1995*24d8fba4SKumar Gala .mnctr_en_bit = 8, 1996*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 1997*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 1998*24d8fba4SKumar Gala .n_val_shift = 16, 1999*24d8fba4SKumar Gala .m_val_shift = 16, 2000*24d8fba4SKumar Gala .width = 8, 2001*24d8fba4SKumar Gala }, 2002*24d8fba4SKumar Gala .p = { 2003*24d8fba4SKumar Gala .pre_div_shift = 3, 2004*24d8fba4SKumar Gala .pre_div_width = 2, 2005*24d8fba4SKumar Gala }, 2006*24d8fba4SKumar Gala .s = { 2007*24d8fba4SKumar Gala .src_sel_shift = 0, 2008*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 2009*24d8fba4SKumar Gala }, 2010*24d8fba4SKumar Gala .freq_tbl = clk_tbl_usb, 2011*24d8fba4SKumar Gala .clkr = { 2012*24d8fba4SKumar Gala .enable_reg = 0x2968, 2013*24d8fba4SKumar Gala .enable_mask = BIT(11), 2014*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 2015*24d8fba4SKumar Gala .name = "usb_hs1_xcvr_src", 2016*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 2017*24d8fba4SKumar Gala .num_parents = 3, 2018*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 2019*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 2020*24d8fba4SKumar Gala }, 2021*24d8fba4SKumar Gala }, 2022*24d8fba4SKumar Gala }; 2023*24d8fba4SKumar Gala 2024*24d8fba4SKumar Gala static struct clk_branch usb_hs1_xcvr_clk = { 2025*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 2026*24d8fba4SKumar Gala .halt_bit = 17, 2027*24d8fba4SKumar Gala .clkr = { 2028*24d8fba4SKumar Gala .enable_reg = 0x290c, 2029*24d8fba4SKumar Gala .enable_mask = BIT(9), 2030*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 2031*24d8fba4SKumar Gala .name = "usb_hs1_xcvr_clk", 2032*24d8fba4SKumar Gala .parent_names = (const char *[]){ "usb_hs1_xcvr_src" }, 2033*24d8fba4SKumar Gala .num_parents = 1, 2034*24d8fba4SKumar Gala .ops = &clk_branch_ops, 2035*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 2036*24d8fba4SKumar Gala }, 2037*24d8fba4SKumar Gala }, 2038*24d8fba4SKumar Gala }; 2039*24d8fba4SKumar Gala 2040*24d8fba4SKumar Gala static struct clk_branch usb_hs1_h_clk = { 2041*24d8fba4SKumar Gala .hwcg_reg = 0x2900, 2042*24d8fba4SKumar Gala .hwcg_bit = 6, 2043*24d8fba4SKumar Gala .halt_reg = 0x2fc8, 2044*24d8fba4SKumar Gala .halt_bit = 1, 2045*24d8fba4SKumar Gala .clkr = { 2046*24d8fba4SKumar Gala .enable_reg = 0x2900, 2047*24d8fba4SKumar Gala .enable_mask = BIT(4), 2048*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 2049*24d8fba4SKumar Gala .name = "usb_hs1_h_clk", 2050*24d8fba4SKumar Gala .ops = &clk_branch_ops, 2051*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 2052*24d8fba4SKumar Gala }, 2053*24d8fba4SKumar Gala }, 2054*24d8fba4SKumar Gala }; 2055*24d8fba4SKumar Gala 2056*24d8fba4SKumar Gala static struct clk_rcg usb_fs1_xcvr_clk_src = { 2057*24d8fba4SKumar Gala .ns_reg = 0x2968, 2058*24d8fba4SKumar Gala .md_reg = 0x2964, 2059*24d8fba4SKumar Gala .mn = { 2060*24d8fba4SKumar Gala .mnctr_en_bit = 8, 2061*24d8fba4SKumar Gala .mnctr_reset_bit = 7, 2062*24d8fba4SKumar Gala .mnctr_mode_shift = 5, 2063*24d8fba4SKumar Gala .n_val_shift = 16, 2064*24d8fba4SKumar Gala .m_val_shift = 16, 2065*24d8fba4SKumar Gala .width = 8, 2066*24d8fba4SKumar Gala }, 2067*24d8fba4SKumar Gala .p = { 2068*24d8fba4SKumar Gala .pre_div_shift = 3, 2069*24d8fba4SKumar Gala .pre_div_width = 2, 2070*24d8fba4SKumar Gala }, 2071*24d8fba4SKumar Gala .s = { 2072*24d8fba4SKumar Gala .src_sel_shift = 0, 2073*24d8fba4SKumar Gala .parent_map = gcc_pxo_pll8_pll0, 2074*24d8fba4SKumar Gala }, 2075*24d8fba4SKumar Gala .freq_tbl = clk_tbl_usb, 2076*24d8fba4SKumar Gala .clkr = { 2077*24d8fba4SKumar Gala .enable_reg = 0x2968, 2078*24d8fba4SKumar Gala .enable_mask = BIT(11), 2079*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 2080*24d8fba4SKumar Gala .name = "usb_fs1_xcvr_src", 2081*24d8fba4SKumar Gala .parent_names = gcc_pxo_pll8_pll0_map, 2082*24d8fba4SKumar Gala .num_parents = 3, 2083*24d8fba4SKumar Gala .ops = &clk_rcg_ops, 2084*24d8fba4SKumar Gala .flags = CLK_SET_RATE_GATE, 2085*24d8fba4SKumar Gala }, 2086*24d8fba4SKumar Gala }, 2087*24d8fba4SKumar Gala }; 2088*24d8fba4SKumar Gala 2089*24d8fba4SKumar Gala static struct clk_branch usb_fs1_xcvr_clk = { 2090*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 2091*24d8fba4SKumar Gala .halt_bit = 17, 2092*24d8fba4SKumar Gala .clkr = { 2093*24d8fba4SKumar Gala .enable_reg = 0x2968, 2094*24d8fba4SKumar Gala .enable_mask = BIT(9), 2095*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 2096*24d8fba4SKumar Gala .name = "usb_fs1_xcvr_clk", 2097*24d8fba4SKumar Gala .parent_names = (const char *[]){ "usb_fs1_xcvr_src", }, 2098*24d8fba4SKumar Gala .num_parents = 1, 2099*24d8fba4SKumar Gala .ops = &clk_branch_ops, 2100*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 2101*24d8fba4SKumar Gala }, 2102*24d8fba4SKumar Gala }, 2103*24d8fba4SKumar Gala }; 2104*24d8fba4SKumar Gala 2105*24d8fba4SKumar Gala static struct clk_branch usb_fs1_sys_clk = { 2106*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 2107*24d8fba4SKumar Gala .halt_bit = 18, 2108*24d8fba4SKumar Gala .clkr = { 2109*24d8fba4SKumar Gala .enable_reg = 0x296c, 2110*24d8fba4SKumar Gala .enable_mask = BIT(4), 2111*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 2112*24d8fba4SKumar Gala .name = "usb_fs1_sys_clk", 2113*24d8fba4SKumar Gala .parent_names = (const char *[]){ "usb_fs1_xcvr_src", }, 2114*24d8fba4SKumar Gala .num_parents = 1, 2115*24d8fba4SKumar Gala .ops = &clk_branch_ops, 2116*24d8fba4SKumar Gala .flags = CLK_SET_RATE_PARENT, 2117*24d8fba4SKumar Gala }, 2118*24d8fba4SKumar Gala }, 2119*24d8fba4SKumar Gala }; 2120*24d8fba4SKumar Gala 2121*24d8fba4SKumar Gala static struct clk_branch usb_fs1_h_clk = { 2122*24d8fba4SKumar Gala .halt_reg = 0x2fcc, 2123*24d8fba4SKumar Gala .halt_bit = 19, 2124*24d8fba4SKumar Gala .clkr = { 2125*24d8fba4SKumar Gala .enable_reg = 0x2960, 2126*24d8fba4SKumar Gala .enable_mask = BIT(4), 2127*24d8fba4SKumar Gala .hw.init = &(struct clk_init_data){ 2128*24d8fba4SKumar Gala .name = "usb_fs1_h_clk", 2129*24d8fba4SKumar Gala .ops = &clk_branch_ops, 2130*24d8fba4SKumar Gala .flags = CLK_IS_ROOT, 2131*24d8fba4SKumar Gala }, 2132*24d8fba4SKumar Gala }, 2133*24d8fba4SKumar Gala }; 2134*24d8fba4SKumar Gala 2135*24d8fba4SKumar Gala static struct clk_regmap *gcc_ipq806x_clks[] = { 2136*24d8fba4SKumar Gala [PLL3] = &pll3.clkr, 2137*24d8fba4SKumar Gala [PLL8] = &pll8.clkr, 2138*24d8fba4SKumar Gala [PLL8_VOTE] = &pll8_vote, 2139*24d8fba4SKumar Gala [PLL14] = &pll14.clkr, 2140*24d8fba4SKumar Gala [PLL14_VOTE] = &pll14_vote, 2141*24d8fba4SKumar Gala [GSBI1_UART_SRC] = &gsbi1_uart_src.clkr, 2142*24d8fba4SKumar Gala [GSBI1_UART_CLK] = &gsbi1_uart_clk.clkr, 2143*24d8fba4SKumar Gala [GSBI2_UART_SRC] = &gsbi2_uart_src.clkr, 2144*24d8fba4SKumar Gala [GSBI2_UART_CLK] = &gsbi2_uart_clk.clkr, 2145*24d8fba4SKumar Gala [GSBI4_UART_SRC] = &gsbi4_uart_src.clkr, 2146*24d8fba4SKumar Gala [GSBI4_UART_CLK] = &gsbi4_uart_clk.clkr, 2147*24d8fba4SKumar Gala [GSBI5_UART_SRC] = &gsbi5_uart_src.clkr, 2148*24d8fba4SKumar Gala [GSBI5_UART_CLK] = &gsbi5_uart_clk.clkr, 2149*24d8fba4SKumar Gala [GSBI6_UART_SRC] = &gsbi6_uart_src.clkr, 2150*24d8fba4SKumar Gala [GSBI6_UART_CLK] = &gsbi6_uart_clk.clkr, 2151*24d8fba4SKumar Gala [GSBI7_UART_SRC] = &gsbi7_uart_src.clkr, 2152*24d8fba4SKumar Gala [GSBI7_UART_CLK] = &gsbi7_uart_clk.clkr, 2153*24d8fba4SKumar Gala [GSBI1_QUP_SRC] = &gsbi1_qup_src.clkr, 2154*24d8fba4SKumar Gala [GSBI1_QUP_CLK] = &gsbi1_qup_clk.clkr, 2155*24d8fba4SKumar Gala [GSBI2_QUP_SRC] = &gsbi2_qup_src.clkr, 2156*24d8fba4SKumar Gala [GSBI2_QUP_CLK] = &gsbi2_qup_clk.clkr, 2157*24d8fba4SKumar Gala [GSBI4_QUP_SRC] = &gsbi4_qup_src.clkr, 2158*24d8fba4SKumar Gala [GSBI4_QUP_CLK] = &gsbi4_qup_clk.clkr, 2159*24d8fba4SKumar Gala [GSBI5_QUP_SRC] = &gsbi5_qup_src.clkr, 2160*24d8fba4SKumar Gala [GSBI5_QUP_CLK] = &gsbi5_qup_clk.clkr, 2161*24d8fba4SKumar Gala [GSBI6_QUP_SRC] = &gsbi6_qup_src.clkr, 2162*24d8fba4SKumar Gala [GSBI6_QUP_CLK] = &gsbi6_qup_clk.clkr, 2163*24d8fba4SKumar Gala [GSBI7_QUP_SRC] = &gsbi7_qup_src.clkr, 2164*24d8fba4SKumar Gala [GSBI7_QUP_CLK] = &gsbi7_qup_clk.clkr, 2165*24d8fba4SKumar Gala [GP0_SRC] = &gp0_src.clkr, 2166*24d8fba4SKumar Gala [GP0_CLK] = &gp0_clk.clkr, 2167*24d8fba4SKumar Gala [GP1_SRC] = &gp1_src.clkr, 2168*24d8fba4SKumar Gala [GP1_CLK] = &gp1_clk.clkr, 2169*24d8fba4SKumar Gala [GP2_SRC] = &gp2_src.clkr, 2170*24d8fba4SKumar Gala [GP2_CLK] = &gp2_clk.clkr, 2171*24d8fba4SKumar Gala [PMEM_A_CLK] = &pmem_clk.clkr, 2172*24d8fba4SKumar Gala [PRNG_SRC] = &prng_src.clkr, 2173*24d8fba4SKumar Gala [PRNG_CLK] = &prng_clk.clkr, 2174*24d8fba4SKumar Gala [SDC1_SRC] = &sdc1_src.clkr, 2175*24d8fba4SKumar Gala [SDC1_CLK] = &sdc1_clk.clkr, 2176*24d8fba4SKumar Gala [SDC3_SRC] = &sdc3_src.clkr, 2177*24d8fba4SKumar Gala [SDC3_CLK] = &sdc3_clk.clkr, 2178*24d8fba4SKumar Gala [TSIF_REF_SRC] = &tsif_ref_src.clkr, 2179*24d8fba4SKumar Gala [TSIF_REF_CLK] = &tsif_ref_clk.clkr, 2180*24d8fba4SKumar Gala [DMA_BAM_H_CLK] = &dma_bam_h_clk.clkr, 2181*24d8fba4SKumar Gala [GSBI1_H_CLK] = &gsbi1_h_clk.clkr, 2182*24d8fba4SKumar Gala [GSBI2_H_CLK] = &gsbi2_h_clk.clkr, 2183*24d8fba4SKumar Gala [GSBI4_H_CLK] = &gsbi4_h_clk.clkr, 2184*24d8fba4SKumar Gala [GSBI5_H_CLK] = &gsbi5_h_clk.clkr, 2185*24d8fba4SKumar Gala [GSBI6_H_CLK] = &gsbi6_h_clk.clkr, 2186*24d8fba4SKumar Gala [GSBI7_H_CLK] = &gsbi7_h_clk.clkr, 2187*24d8fba4SKumar Gala [TSIF_H_CLK] = &tsif_h_clk.clkr, 2188*24d8fba4SKumar Gala [SDC1_H_CLK] = &sdc1_h_clk.clkr, 2189*24d8fba4SKumar Gala [SDC3_H_CLK] = &sdc3_h_clk.clkr, 2190*24d8fba4SKumar Gala [ADM0_CLK] = &adm0_clk.clkr, 2191*24d8fba4SKumar Gala [ADM0_PBUS_CLK] = &adm0_pbus_clk.clkr, 2192*24d8fba4SKumar Gala [PCIE_A_CLK] = &pcie_a_clk.clkr, 2193*24d8fba4SKumar Gala [PCIE_AUX_CLK] = &pcie_aux_clk.clkr, 2194*24d8fba4SKumar Gala [PCIE_H_CLK] = &pcie_h_clk.clkr, 2195*24d8fba4SKumar Gala [PCIE_PHY_CLK] = &pcie_phy_clk.clkr, 2196*24d8fba4SKumar Gala [SFAB_SATA_S_H_CLK] = &sfab_sata_s_h_clk.clkr, 2197*24d8fba4SKumar Gala [PMIC_ARB0_H_CLK] = &pmic_arb0_h_clk.clkr, 2198*24d8fba4SKumar Gala [PMIC_ARB1_H_CLK] = &pmic_arb1_h_clk.clkr, 2199*24d8fba4SKumar Gala [PMIC_SSBI2_CLK] = &pmic_ssbi2_clk.clkr, 2200*24d8fba4SKumar Gala [RPM_MSG_RAM_H_CLK] = &rpm_msg_ram_h_clk.clkr, 2201*24d8fba4SKumar Gala [SATA_H_CLK] = &sata_h_clk.clkr, 2202*24d8fba4SKumar Gala [SATA_CLK_SRC] = &sata_ref_src.clkr, 2203*24d8fba4SKumar Gala [SATA_RXOOB_CLK] = &sata_rxoob_clk.clkr, 2204*24d8fba4SKumar Gala [SATA_PMALIVE_CLK] = &sata_pmalive_clk.clkr, 2205*24d8fba4SKumar Gala [SATA_PHY_REF_CLK] = &sata_phy_ref_clk.clkr, 2206*24d8fba4SKumar Gala [SATA_A_CLK] = &sata_a_clk.clkr, 2207*24d8fba4SKumar Gala [SATA_PHY_CFG_CLK] = &sata_phy_cfg_clk.clkr, 2208*24d8fba4SKumar Gala [PCIE_ALT_REF_SRC] = &pcie_ref_src.clkr, 2209*24d8fba4SKumar Gala [PCIE_ALT_REF_CLK] = &pcie_ref_src_clk.clkr, 2210*24d8fba4SKumar Gala [PCIE_1_A_CLK] = &pcie1_a_clk.clkr, 2211*24d8fba4SKumar Gala [PCIE_1_AUX_CLK] = &pcie1_aux_clk.clkr, 2212*24d8fba4SKumar Gala [PCIE_1_H_CLK] = &pcie1_h_clk.clkr, 2213*24d8fba4SKumar Gala [PCIE_1_PHY_CLK] = &pcie1_phy_clk.clkr, 2214*24d8fba4SKumar Gala [PCIE_1_ALT_REF_SRC] = &pcie1_ref_src.clkr, 2215*24d8fba4SKumar Gala [PCIE_1_ALT_REF_CLK] = &pcie1_ref_src_clk.clkr, 2216*24d8fba4SKumar Gala [PCIE_2_A_CLK] = &pcie2_a_clk.clkr, 2217*24d8fba4SKumar Gala [PCIE_2_AUX_CLK] = &pcie2_aux_clk.clkr, 2218*24d8fba4SKumar Gala [PCIE_2_H_CLK] = &pcie2_h_clk.clkr, 2219*24d8fba4SKumar Gala [PCIE_2_PHY_CLK] = &pcie2_phy_clk.clkr, 2220*24d8fba4SKumar Gala [PCIE_2_ALT_REF_SRC] = &pcie2_ref_src.clkr, 2221*24d8fba4SKumar Gala [PCIE_2_ALT_REF_CLK] = &pcie2_ref_src_clk.clkr, 2222*24d8fba4SKumar Gala [USB30_MASTER_SRC] = &usb30_master_clk_src.clkr, 2223*24d8fba4SKumar Gala [USB30_0_MASTER_CLK] = &usb30_0_branch_clk.clkr, 2224*24d8fba4SKumar Gala [USB30_1_MASTER_CLK] = &usb30_1_branch_clk.clkr, 2225*24d8fba4SKumar Gala [USB30_UTMI_SRC] = &usb30_utmi_clk.clkr, 2226*24d8fba4SKumar Gala [USB30_0_UTMI_CLK] = &usb30_0_utmi_clk_ctl.clkr, 2227*24d8fba4SKumar Gala [USB30_1_UTMI_CLK] = &usb30_1_utmi_clk_ctl.clkr, 2228*24d8fba4SKumar Gala [USB_HS1_H_CLK] = &usb_hs1_h_clk.clkr, 2229*24d8fba4SKumar Gala [USB_HS1_XCVR_SRC] = &usb_hs1_xcvr_clk_src.clkr, 2230*24d8fba4SKumar Gala [USB_HS1_XCVR_CLK] = &usb_hs1_xcvr_clk.clkr, 2231*24d8fba4SKumar Gala [USB_FS1_H_CLK] = &usb_fs1_h_clk.clkr, 2232*24d8fba4SKumar Gala [USB_FS1_XCVR_SRC] = &usb_fs1_xcvr_clk_src.clkr, 2233*24d8fba4SKumar Gala [USB_FS1_XCVR_CLK] = &usb_fs1_xcvr_clk.clkr, 2234*24d8fba4SKumar Gala [USB_FS1_SYSTEM_CLK] = &usb_fs1_sys_clk.clkr, 2235*24d8fba4SKumar Gala }; 2236*24d8fba4SKumar Gala 2237*24d8fba4SKumar Gala static const struct qcom_reset_map gcc_ipq806x_resets[] = { 2238*24d8fba4SKumar Gala [QDSS_STM_RESET] = { 0x2060, 6 }, 2239*24d8fba4SKumar Gala [AFAB_SMPSS_S_RESET] = { 0x20b8, 2 }, 2240*24d8fba4SKumar Gala [AFAB_SMPSS_M1_RESET] = { 0x20b8, 1 }, 2241*24d8fba4SKumar Gala [AFAB_SMPSS_M0_RESET] = { 0x20b8, 0 }, 2242*24d8fba4SKumar Gala [AFAB_EBI1_CH0_RESET] = { 0x20c0, 7 }, 2243*24d8fba4SKumar Gala [AFAB_EBI1_CH1_RESET] = { 0x20c4, 7 }, 2244*24d8fba4SKumar Gala [SFAB_ADM0_M0_RESET] = { 0x21e0, 7 }, 2245*24d8fba4SKumar Gala [SFAB_ADM0_M1_RESET] = { 0x21e4, 7 }, 2246*24d8fba4SKumar Gala [SFAB_ADM0_M2_RESET] = { 0x21e8, 7 }, 2247*24d8fba4SKumar Gala [ADM0_C2_RESET] = { 0x220c, 4 }, 2248*24d8fba4SKumar Gala [ADM0_C1_RESET] = { 0x220c, 3 }, 2249*24d8fba4SKumar Gala [ADM0_C0_RESET] = { 0x220c, 2 }, 2250*24d8fba4SKumar Gala [ADM0_PBUS_RESET] = { 0x220c, 1 }, 2251*24d8fba4SKumar Gala [ADM0_RESET] = { 0x220c, 0 }, 2252*24d8fba4SKumar Gala [QDSS_CLKS_SW_RESET] = { 0x2260, 5 }, 2253*24d8fba4SKumar Gala [QDSS_POR_RESET] = { 0x2260, 4 }, 2254*24d8fba4SKumar Gala [QDSS_TSCTR_RESET] = { 0x2260, 3 }, 2255*24d8fba4SKumar Gala [QDSS_HRESET_RESET] = { 0x2260, 2 }, 2256*24d8fba4SKumar Gala [QDSS_AXI_RESET] = { 0x2260, 1 }, 2257*24d8fba4SKumar Gala [QDSS_DBG_RESET] = { 0x2260, 0 }, 2258*24d8fba4SKumar Gala [SFAB_PCIE_M_RESET] = { 0x22d8, 1 }, 2259*24d8fba4SKumar Gala [SFAB_PCIE_S_RESET] = { 0x22d8, 0 }, 2260*24d8fba4SKumar Gala [PCIE_EXT_RESET] = { 0x22dc, 6 }, 2261*24d8fba4SKumar Gala [PCIE_PHY_RESET] = { 0x22dc, 5 }, 2262*24d8fba4SKumar Gala [PCIE_PCI_RESET] = { 0x22dc, 4 }, 2263*24d8fba4SKumar Gala [PCIE_POR_RESET] = { 0x22dc, 3 }, 2264*24d8fba4SKumar Gala [PCIE_HCLK_RESET] = { 0x22dc, 2 }, 2265*24d8fba4SKumar Gala [PCIE_ACLK_RESET] = { 0x22dc, 0 }, 2266*24d8fba4SKumar Gala [SFAB_LPASS_RESET] = { 0x23a0, 7 }, 2267*24d8fba4SKumar Gala [SFAB_AFAB_M_RESET] = { 0x23e0, 7 }, 2268*24d8fba4SKumar Gala [AFAB_SFAB_M0_RESET] = { 0x2420, 7 }, 2269*24d8fba4SKumar Gala [AFAB_SFAB_M1_RESET] = { 0x2424, 7 }, 2270*24d8fba4SKumar Gala [SFAB_SATA_S_RESET] = { 0x2480, 7 }, 2271*24d8fba4SKumar Gala [SFAB_DFAB_M_RESET] = { 0x2500, 7 }, 2272*24d8fba4SKumar Gala [DFAB_SFAB_M_RESET] = { 0x2520, 7 }, 2273*24d8fba4SKumar Gala [DFAB_SWAY0_RESET] = { 0x2540, 7 }, 2274*24d8fba4SKumar Gala [DFAB_SWAY1_RESET] = { 0x2544, 7 }, 2275*24d8fba4SKumar Gala [DFAB_ARB0_RESET] = { 0x2560, 7 }, 2276*24d8fba4SKumar Gala [DFAB_ARB1_RESET] = { 0x2564, 7 }, 2277*24d8fba4SKumar Gala [PPSS_PROC_RESET] = { 0x2594, 1 }, 2278*24d8fba4SKumar Gala [PPSS_RESET] = { 0x2594, 0 }, 2279*24d8fba4SKumar Gala [DMA_BAM_RESET] = { 0x25c0, 7 }, 2280*24d8fba4SKumar Gala [SPS_TIC_H_RESET] = { 0x2600, 7 }, 2281*24d8fba4SKumar Gala [SFAB_CFPB_M_RESET] = { 0x2680, 7 }, 2282*24d8fba4SKumar Gala [SFAB_CFPB_S_RESET] = { 0x26c0, 7 }, 2283*24d8fba4SKumar Gala [TSIF_H_RESET] = { 0x2700, 7 }, 2284*24d8fba4SKumar Gala [CE1_H_RESET] = { 0x2720, 7 }, 2285*24d8fba4SKumar Gala [CE1_CORE_RESET] = { 0x2724, 7 }, 2286*24d8fba4SKumar Gala [CE1_SLEEP_RESET] = { 0x2728, 7 }, 2287*24d8fba4SKumar Gala [CE2_H_RESET] = { 0x2740, 7 }, 2288*24d8fba4SKumar Gala [CE2_CORE_RESET] = { 0x2744, 7 }, 2289*24d8fba4SKumar Gala [SFAB_SFPB_M_RESET] = { 0x2780, 7 }, 2290*24d8fba4SKumar Gala [SFAB_SFPB_S_RESET] = { 0x27a0, 7 }, 2291*24d8fba4SKumar Gala [RPM_PROC_RESET] = { 0x27c0, 7 }, 2292*24d8fba4SKumar Gala [PMIC_SSBI2_RESET] = { 0x280c, 12 }, 2293*24d8fba4SKumar Gala [SDC1_RESET] = { 0x2830, 0 }, 2294*24d8fba4SKumar Gala [SDC2_RESET] = { 0x2850, 0 }, 2295*24d8fba4SKumar Gala [SDC3_RESET] = { 0x2870, 0 }, 2296*24d8fba4SKumar Gala [SDC4_RESET] = { 0x2890, 0 }, 2297*24d8fba4SKumar Gala [USB_HS1_RESET] = { 0x2910, 0 }, 2298*24d8fba4SKumar Gala [USB_HSIC_RESET] = { 0x2934, 0 }, 2299*24d8fba4SKumar Gala [USB_FS1_XCVR_RESET] = { 0x2974, 1 }, 2300*24d8fba4SKumar Gala [USB_FS1_RESET] = { 0x2974, 0 }, 2301*24d8fba4SKumar Gala [GSBI1_RESET] = { 0x29dc, 0 }, 2302*24d8fba4SKumar Gala [GSBI2_RESET] = { 0x29fc, 0 }, 2303*24d8fba4SKumar Gala [GSBI3_RESET] = { 0x2a1c, 0 }, 2304*24d8fba4SKumar Gala [GSBI4_RESET] = { 0x2a3c, 0 }, 2305*24d8fba4SKumar Gala [GSBI5_RESET] = { 0x2a5c, 0 }, 2306*24d8fba4SKumar Gala [GSBI6_RESET] = { 0x2a7c, 0 }, 2307*24d8fba4SKumar Gala [GSBI7_RESET] = { 0x2a9c, 0 }, 2308*24d8fba4SKumar Gala [SPDM_RESET] = { 0x2b6c, 0 }, 2309*24d8fba4SKumar Gala [SEC_CTRL_RESET] = { 0x2b80, 7 }, 2310*24d8fba4SKumar Gala [TLMM_H_RESET] = { 0x2ba0, 7 }, 2311*24d8fba4SKumar Gala [SFAB_SATA_M_RESET] = { 0x2c18, 0 }, 2312*24d8fba4SKumar Gala [SATA_RESET] = { 0x2c1c, 0 }, 2313*24d8fba4SKumar Gala [TSSC_RESET] = { 0x2ca0, 7 }, 2314*24d8fba4SKumar Gala [PDM_RESET] = { 0x2cc0, 12 }, 2315*24d8fba4SKumar Gala [MPM_H_RESET] = { 0x2da0, 7 }, 2316*24d8fba4SKumar Gala [MPM_RESET] = { 0x2da4, 0 }, 2317*24d8fba4SKumar Gala [SFAB_SMPSS_S_RESET] = { 0x2e00, 7 }, 2318*24d8fba4SKumar Gala [PRNG_RESET] = { 0x2e80, 12 }, 2319*24d8fba4SKumar Gala [SFAB_CE3_M_RESET] = { 0x36c8, 1 }, 2320*24d8fba4SKumar Gala [SFAB_CE3_S_RESET] = { 0x36c8, 0 }, 2321*24d8fba4SKumar Gala [CE3_SLEEP_RESET] = { 0x36d0, 7 }, 2322*24d8fba4SKumar Gala [PCIE_1_M_RESET] = { 0x3a98, 1 }, 2323*24d8fba4SKumar Gala [PCIE_1_S_RESET] = { 0x3a98, 0 }, 2324*24d8fba4SKumar Gala [PCIE_1_EXT_RESET] = { 0x3a9c, 6 }, 2325*24d8fba4SKumar Gala [PCIE_1_PHY_RESET] = { 0x3a9c, 5 }, 2326*24d8fba4SKumar Gala [PCIE_1_PCI_RESET] = { 0x3a9c, 4 }, 2327*24d8fba4SKumar Gala [PCIE_1_POR_RESET] = { 0x3a9c, 3 }, 2328*24d8fba4SKumar Gala [PCIE_1_HCLK_RESET] = { 0x3a9c, 2 }, 2329*24d8fba4SKumar Gala [PCIE_1_ACLK_RESET] = { 0x3a9c, 0 }, 2330*24d8fba4SKumar Gala [PCIE_2_M_RESET] = { 0x3ad8, 1 }, 2331*24d8fba4SKumar Gala [PCIE_2_S_RESET] = { 0x3ad8, 0 }, 2332*24d8fba4SKumar Gala [PCIE_2_EXT_RESET] = { 0x3adc, 6 }, 2333*24d8fba4SKumar Gala [PCIE_2_PHY_RESET] = { 0x3adc, 5 }, 2334*24d8fba4SKumar Gala [PCIE_2_PCI_RESET] = { 0x3adc, 4 }, 2335*24d8fba4SKumar Gala [PCIE_2_POR_RESET] = { 0x3adc, 3 }, 2336*24d8fba4SKumar Gala [PCIE_2_HCLK_RESET] = { 0x3adc, 2 }, 2337*24d8fba4SKumar Gala [PCIE_2_ACLK_RESET] = { 0x3adc, 0 }, 2338*24d8fba4SKumar Gala [SFAB_USB30_S_RESET] = { 0x3b54, 1 }, 2339*24d8fba4SKumar Gala [SFAB_USB30_M_RESET] = { 0x3b54, 0 }, 2340*24d8fba4SKumar Gala [USB30_0_PORT2_HS_PHY_RESET] = { 0x3b50, 5 }, 2341*24d8fba4SKumar Gala [USB30_0_MASTER_RESET] = { 0x3b50, 4 }, 2342*24d8fba4SKumar Gala [USB30_0_SLEEP_RESET] = { 0x3b50, 3 }, 2343*24d8fba4SKumar Gala [USB30_0_UTMI_PHY_RESET] = { 0x3b50, 2 }, 2344*24d8fba4SKumar Gala [USB30_0_POWERON_RESET] = { 0x3b50, 1 }, 2345*24d8fba4SKumar Gala [USB30_0_PHY_RESET] = { 0x3b50, 0 }, 2346*24d8fba4SKumar Gala [USB30_1_MASTER_RESET] = { 0x3b58, 4 }, 2347*24d8fba4SKumar Gala [USB30_1_SLEEP_RESET] = { 0x3b58, 3 }, 2348*24d8fba4SKumar Gala [USB30_1_UTMI_PHY_RESET] = { 0x3b58, 2 }, 2349*24d8fba4SKumar Gala [USB30_1_POWERON_RESET] = { 0x3b58, 1 }, 2350*24d8fba4SKumar Gala [USB30_1_PHY_RESET] = { 0x3b58, 0 }, 2351*24d8fba4SKumar Gala [NSSFB0_RESET] = { 0x3b60, 6 }, 2352*24d8fba4SKumar Gala [NSSFB1_RESET] = { 0x3b60, 7 }, 2353*24d8fba4SKumar Gala }; 2354*24d8fba4SKumar Gala 2355*24d8fba4SKumar Gala static const struct regmap_config gcc_ipq806x_regmap_config = { 2356*24d8fba4SKumar Gala .reg_bits = 32, 2357*24d8fba4SKumar Gala .reg_stride = 4, 2358*24d8fba4SKumar Gala .val_bits = 32, 2359*24d8fba4SKumar Gala .max_register = 0x3e40, 2360*24d8fba4SKumar Gala .fast_io = true, 2361*24d8fba4SKumar Gala }; 2362*24d8fba4SKumar Gala 2363*24d8fba4SKumar Gala static const struct qcom_cc_desc gcc_ipq806x_desc = { 2364*24d8fba4SKumar Gala .config = &gcc_ipq806x_regmap_config, 2365*24d8fba4SKumar Gala .clks = gcc_ipq806x_clks, 2366*24d8fba4SKumar Gala .num_clks = ARRAY_SIZE(gcc_ipq806x_clks), 2367*24d8fba4SKumar Gala .resets = gcc_ipq806x_resets, 2368*24d8fba4SKumar Gala .num_resets = ARRAY_SIZE(gcc_ipq806x_resets), 2369*24d8fba4SKumar Gala }; 2370*24d8fba4SKumar Gala 2371*24d8fba4SKumar Gala static const struct of_device_id gcc_ipq806x_match_table[] = { 2372*24d8fba4SKumar Gala { .compatible = "qcom,gcc-ipq8064" }, 2373*24d8fba4SKumar Gala { } 2374*24d8fba4SKumar Gala }; 2375*24d8fba4SKumar Gala MODULE_DEVICE_TABLE(of, gcc_ipq806x_match_table); 2376*24d8fba4SKumar Gala 2377*24d8fba4SKumar Gala static int gcc_ipq806x_probe(struct platform_device *pdev) 2378*24d8fba4SKumar Gala { 2379*24d8fba4SKumar Gala struct clk *clk; 2380*24d8fba4SKumar Gala struct device *dev = &pdev->dev; 2381*24d8fba4SKumar Gala 2382*24d8fba4SKumar Gala /* Temporary until RPM clocks supported */ 2383*24d8fba4SKumar Gala clk = clk_register_fixed_rate(dev, "cxo", NULL, CLK_IS_ROOT, 25000000); 2384*24d8fba4SKumar Gala if (IS_ERR(clk)) 2385*24d8fba4SKumar Gala return PTR_ERR(clk); 2386*24d8fba4SKumar Gala 2387*24d8fba4SKumar Gala clk = clk_register_fixed_rate(dev, "pxo", NULL, CLK_IS_ROOT, 25000000); 2388*24d8fba4SKumar Gala if (IS_ERR(clk)) 2389*24d8fba4SKumar Gala return PTR_ERR(clk); 2390*24d8fba4SKumar Gala 2391*24d8fba4SKumar Gala return qcom_cc_probe(pdev, &gcc_ipq806x_desc); 2392*24d8fba4SKumar Gala } 2393*24d8fba4SKumar Gala 2394*24d8fba4SKumar Gala static int gcc_ipq806x_remove(struct platform_device *pdev) 2395*24d8fba4SKumar Gala { 2396*24d8fba4SKumar Gala qcom_cc_remove(pdev); 2397*24d8fba4SKumar Gala return 0; 2398*24d8fba4SKumar Gala } 2399*24d8fba4SKumar Gala 2400*24d8fba4SKumar Gala static struct platform_driver gcc_ipq806x_driver = { 2401*24d8fba4SKumar Gala .probe = gcc_ipq806x_probe, 2402*24d8fba4SKumar Gala .remove = gcc_ipq806x_remove, 2403*24d8fba4SKumar Gala .driver = { 2404*24d8fba4SKumar Gala .name = "gcc-ipq806x", 2405*24d8fba4SKumar Gala .owner = THIS_MODULE, 2406*24d8fba4SKumar Gala .of_match_table = gcc_ipq806x_match_table, 2407*24d8fba4SKumar Gala }, 2408*24d8fba4SKumar Gala }; 2409*24d8fba4SKumar Gala 2410*24d8fba4SKumar Gala static int __init gcc_ipq806x_init(void) 2411*24d8fba4SKumar Gala { 2412*24d8fba4SKumar Gala return platform_driver_register(&gcc_ipq806x_driver); 2413*24d8fba4SKumar Gala } 2414*24d8fba4SKumar Gala core_initcall(gcc_ipq806x_init); 2415*24d8fba4SKumar Gala 2416*24d8fba4SKumar Gala static void __exit gcc_ipq806x_exit(void) 2417*24d8fba4SKumar Gala { 2418*24d8fba4SKumar Gala platform_driver_unregister(&gcc_ipq806x_driver); 2419*24d8fba4SKumar Gala } 2420*24d8fba4SKumar Gala module_exit(gcc_ipq806x_exit); 2421*24d8fba4SKumar Gala 2422*24d8fba4SKumar Gala MODULE_DESCRIPTION("QCOM GCC IPQ806x Driver"); 2423*24d8fba4SKumar Gala MODULE_LICENSE("GPL v2"); 2424*24d8fba4SKumar Gala MODULE_ALIAS("platform:gcc-ipq806x"); 2425