1d14b15b5SJeffrey Hugo // SPDX-License-Identifier: GPL-2.0 2d14b15b5SJeffrey Hugo /* 3d14b15b5SJeffrey Hugo * Copyright (c) 2019, The Linux Foundation. All rights reserved. 4d14b15b5SJeffrey Hugo */ 5d14b15b5SJeffrey Hugo 6d14b15b5SJeffrey Hugo #include <linux/kernel.h> 7d14b15b5SJeffrey Hugo #include <linux/bitops.h> 8d14b15b5SJeffrey Hugo #include <linux/err.h> 9d14b15b5SJeffrey Hugo #include <linux/platform_device.h> 10d14b15b5SJeffrey Hugo #include <linux/module.h> 11d14b15b5SJeffrey Hugo #include <linux/of.h> 12d14b15b5SJeffrey Hugo #include <linux/of_device.h> 13d14b15b5SJeffrey Hugo #include <linux/clk-provider.h> 14d14b15b5SJeffrey Hugo #include <linux/regmap.h> 15d14b15b5SJeffrey Hugo #include <linux/reset-controller.h> 16d14b15b5SJeffrey Hugo 17d14b15b5SJeffrey Hugo #include <dt-bindings/clock/qcom,mmcc-msm8998.h> 18d14b15b5SJeffrey Hugo 19d14b15b5SJeffrey Hugo #include "common.h" 20d14b15b5SJeffrey Hugo #include "clk-regmap.h" 21d14b15b5SJeffrey Hugo #include "clk-regmap-divider.h" 22d14b15b5SJeffrey Hugo #include "clk-alpha-pll.h" 23d14b15b5SJeffrey Hugo #include "clk-rcg.h" 24d14b15b5SJeffrey Hugo #include "clk-branch.h" 25d14b15b5SJeffrey Hugo #include "reset.h" 26d14b15b5SJeffrey Hugo #include "gdsc.h" 27d14b15b5SJeffrey Hugo 28d14b15b5SJeffrey Hugo enum { 29d14b15b5SJeffrey Hugo P_XO, 30d14b15b5SJeffrey Hugo P_GPLL0, 31d14b15b5SJeffrey Hugo P_GPLL0_DIV, 32d14b15b5SJeffrey Hugo P_MMPLL0_OUT_EVEN, 33d14b15b5SJeffrey Hugo P_MMPLL1_OUT_EVEN, 34d14b15b5SJeffrey Hugo P_MMPLL3_OUT_EVEN, 35d14b15b5SJeffrey Hugo P_MMPLL4_OUT_EVEN, 36d14b15b5SJeffrey Hugo P_MMPLL5_OUT_EVEN, 37d14b15b5SJeffrey Hugo P_MMPLL6_OUT_EVEN, 38d14b15b5SJeffrey Hugo P_MMPLL7_OUT_EVEN, 39d14b15b5SJeffrey Hugo P_MMPLL10_OUT_EVEN, 40d14b15b5SJeffrey Hugo P_DSI0PLL, 41d14b15b5SJeffrey Hugo P_DSI1PLL, 42d14b15b5SJeffrey Hugo P_DSI0PLL_BYTE, 43d14b15b5SJeffrey Hugo P_DSI1PLL_BYTE, 44d14b15b5SJeffrey Hugo P_HDMIPLL, 45d14b15b5SJeffrey Hugo P_DPVCO, 46d14b15b5SJeffrey Hugo P_DPLINK, 47d14b15b5SJeffrey Hugo P_CORE_BI_PLL_TEST_SE, 48d14b15b5SJeffrey Hugo }; 49d14b15b5SJeffrey Hugo 50d14b15b5SJeffrey Hugo static struct clk_fixed_factor gpll0_div = { 51d14b15b5SJeffrey Hugo .mult = 1, 52d14b15b5SJeffrey Hugo .div = 2, 53d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 54d14b15b5SJeffrey Hugo .name = "mmss_gpll0_div", 55d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 56*6d26bb22SMarijn Suijten .fw_name = "gpll0" 57d14b15b5SJeffrey Hugo }, 58d14b15b5SJeffrey Hugo .num_parents = 1, 59d14b15b5SJeffrey Hugo .ops = &clk_fixed_factor_ops, 60d14b15b5SJeffrey Hugo }, 61d14b15b5SJeffrey Hugo }; 62d14b15b5SJeffrey Hugo 63d14b15b5SJeffrey Hugo static const struct clk_div_table post_div_table_fabia_even[] = { 64d14b15b5SJeffrey Hugo { 0x0, 1 }, 65d14b15b5SJeffrey Hugo { 0x1, 2 }, 66d14b15b5SJeffrey Hugo { 0x3, 4 }, 67d14b15b5SJeffrey Hugo { 0x7, 8 }, 68d14b15b5SJeffrey Hugo { } 69d14b15b5SJeffrey Hugo }; 70d14b15b5SJeffrey Hugo 71d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll0 = { 72d14b15b5SJeffrey Hugo .offset = 0xc000, 73d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 74d14b15b5SJeffrey Hugo .clkr = { 75d14b15b5SJeffrey Hugo .enable_reg = 0x1e0, 76d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 77d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 78d14b15b5SJeffrey Hugo .name = "mmpll0", 79d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 80*6d26bb22SMarijn Suijten .fw_name = "xo" 81d14b15b5SJeffrey Hugo }, 82d14b15b5SJeffrey Hugo .num_parents = 1, 83d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 84d14b15b5SJeffrey Hugo }, 85d14b15b5SJeffrey Hugo }, 86d14b15b5SJeffrey Hugo }; 87d14b15b5SJeffrey Hugo 88d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll0_out_even = { 89d14b15b5SJeffrey Hugo .offset = 0xc000, 90d14b15b5SJeffrey Hugo .post_div_shift = 8, 91d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 92d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 93d14b15b5SJeffrey Hugo .width = 4, 94d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 95d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 96d14b15b5SJeffrey Hugo .name = "mmpll0_out_even", 97d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll0.clkr.hw }, 98d14b15b5SJeffrey Hugo .num_parents = 1, 99d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 100d14b15b5SJeffrey Hugo }, 101d14b15b5SJeffrey Hugo }; 102d14b15b5SJeffrey Hugo 103d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll1 = { 104d14b15b5SJeffrey Hugo .offset = 0xc050, 105d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 106d14b15b5SJeffrey Hugo .clkr = { 107d14b15b5SJeffrey Hugo .enable_reg = 0x1e0, 108d14b15b5SJeffrey Hugo .enable_mask = BIT(1), 109d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 110d14b15b5SJeffrey Hugo .name = "mmpll1", 111d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 112*6d26bb22SMarijn Suijten .fw_name = "xo" 113d14b15b5SJeffrey Hugo }, 114d14b15b5SJeffrey Hugo .num_parents = 1, 115d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 116d14b15b5SJeffrey Hugo }, 117d14b15b5SJeffrey Hugo }, 118d14b15b5SJeffrey Hugo }; 119d14b15b5SJeffrey Hugo 120d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll1_out_even = { 121d14b15b5SJeffrey Hugo .offset = 0xc050, 122d14b15b5SJeffrey Hugo .post_div_shift = 8, 123d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 124d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 125d14b15b5SJeffrey Hugo .width = 4, 126d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 127d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 128d14b15b5SJeffrey Hugo .name = "mmpll1_out_even", 129d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll1.clkr.hw }, 130d14b15b5SJeffrey Hugo .num_parents = 1, 131d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 132d14b15b5SJeffrey Hugo }, 133d14b15b5SJeffrey Hugo }; 134d14b15b5SJeffrey Hugo 135d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll3 = { 136d14b15b5SJeffrey Hugo .offset = 0x0, 137d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 138d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 139d14b15b5SJeffrey Hugo .name = "mmpll3", 140d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 141*6d26bb22SMarijn Suijten .fw_name = "xo" 142d14b15b5SJeffrey Hugo }, 143d14b15b5SJeffrey Hugo .num_parents = 1, 144d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 145d14b15b5SJeffrey Hugo }, 146d14b15b5SJeffrey Hugo }; 147d14b15b5SJeffrey Hugo 148d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll3_out_even = { 149d14b15b5SJeffrey Hugo .offset = 0x0, 150d14b15b5SJeffrey Hugo .post_div_shift = 8, 151d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 152d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 153d14b15b5SJeffrey Hugo .width = 4, 154d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 155d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 156d14b15b5SJeffrey Hugo .name = "mmpll3_out_even", 157d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll3.clkr.hw }, 158d14b15b5SJeffrey Hugo .num_parents = 1, 159d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 160d14b15b5SJeffrey Hugo }, 161d14b15b5SJeffrey Hugo }; 162d14b15b5SJeffrey Hugo 163d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll4 = { 164d14b15b5SJeffrey Hugo .offset = 0x50, 165d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 166d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 167d14b15b5SJeffrey Hugo .name = "mmpll4", 168d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 169*6d26bb22SMarijn Suijten .fw_name = "xo" 170d14b15b5SJeffrey Hugo }, 171d14b15b5SJeffrey Hugo .num_parents = 1, 172d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 173d14b15b5SJeffrey Hugo }, 174d14b15b5SJeffrey Hugo }; 175d14b15b5SJeffrey Hugo 176d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll4_out_even = { 177d14b15b5SJeffrey Hugo .offset = 0x50, 178d14b15b5SJeffrey Hugo .post_div_shift = 8, 179d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 180d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 181d14b15b5SJeffrey Hugo .width = 4, 182d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 183d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 184d14b15b5SJeffrey Hugo .name = "mmpll4_out_even", 185d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll4.clkr.hw }, 186d14b15b5SJeffrey Hugo .num_parents = 1, 187d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 188d14b15b5SJeffrey Hugo }, 189d14b15b5SJeffrey Hugo }; 190d14b15b5SJeffrey Hugo 191d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll5 = { 192d14b15b5SJeffrey Hugo .offset = 0xa0, 193d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 194d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 195d14b15b5SJeffrey Hugo .name = "mmpll5", 196d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 197*6d26bb22SMarijn Suijten .fw_name = "xo" 198d14b15b5SJeffrey Hugo }, 199d14b15b5SJeffrey Hugo .num_parents = 1, 200d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 201d14b15b5SJeffrey Hugo }, 202d14b15b5SJeffrey Hugo }; 203d14b15b5SJeffrey Hugo 204d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll5_out_even = { 205d14b15b5SJeffrey Hugo .offset = 0xa0, 206d14b15b5SJeffrey Hugo .post_div_shift = 8, 207d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 208d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 209d14b15b5SJeffrey Hugo .width = 4, 210d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 211d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 212d14b15b5SJeffrey Hugo .name = "mmpll5_out_even", 213d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll5.clkr.hw }, 214d14b15b5SJeffrey Hugo .num_parents = 1, 215d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 216d14b15b5SJeffrey Hugo }, 217d14b15b5SJeffrey Hugo }; 218d14b15b5SJeffrey Hugo 219d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll6 = { 220d14b15b5SJeffrey Hugo .offset = 0xf0, 221d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 222d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 223d14b15b5SJeffrey Hugo .name = "mmpll6", 224d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 225*6d26bb22SMarijn Suijten .fw_name = "xo" 226d14b15b5SJeffrey Hugo }, 227d14b15b5SJeffrey Hugo .num_parents = 1, 228d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 229d14b15b5SJeffrey Hugo }, 230d14b15b5SJeffrey Hugo }; 231d14b15b5SJeffrey Hugo 232d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll6_out_even = { 233d14b15b5SJeffrey Hugo .offset = 0xf0, 234d14b15b5SJeffrey Hugo .post_div_shift = 8, 235d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 236d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 237d14b15b5SJeffrey Hugo .width = 4, 238d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 239d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 240d14b15b5SJeffrey Hugo .name = "mmpll6_out_even", 241d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll6.clkr.hw }, 242d14b15b5SJeffrey Hugo .num_parents = 1, 243d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 244d14b15b5SJeffrey Hugo }, 245d14b15b5SJeffrey Hugo }; 246d14b15b5SJeffrey Hugo 247d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll7 = { 248d14b15b5SJeffrey Hugo .offset = 0x140, 249d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 250d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 251d14b15b5SJeffrey Hugo .name = "mmpll7", 252d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 253*6d26bb22SMarijn Suijten .fw_name = "xo" 254d14b15b5SJeffrey Hugo }, 255d14b15b5SJeffrey Hugo .num_parents = 1, 256d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 257d14b15b5SJeffrey Hugo }, 258d14b15b5SJeffrey Hugo }; 259d14b15b5SJeffrey Hugo 260d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll7_out_even = { 261d14b15b5SJeffrey Hugo .offset = 0x140, 262d14b15b5SJeffrey Hugo .post_div_shift = 8, 263d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 264d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 265d14b15b5SJeffrey Hugo .width = 4, 266d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 267d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 268d14b15b5SJeffrey Hugo .name = "mmpll7_out_even", 269d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll7.clkr.hw }, 270d14b15b5SJeffrey Hugo .num_parents = 1, 271d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 272d14b15b5SJeffrey Hugo }, 273d14b15b5SJeffrey Hugo }; 274d14b15b5SJeffrey Hugo 275d14b15b5SJeffrey Hugo static struct clk_alpha_pll mmpll10 = { 276d14b15b5SJeffrey Hugo .offset = 0x190, 277d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 278d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 279d14b15b5SJeffrey Hugo .name = "mmpll10", 280d14b15b5SJeffrey Hugo .parent_data = &(const struct clk_parent_data){ 281*6d26bb22SMarijn Suijten .fw_name = "xo" 282d14b15b5SJeffrey Hugo }, 283d14b15b5SJeffrey Hugo .num_parents = 1, 284d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_fixed_fabia_ops, 285d14b15b5SJeffrey Hugo }, 286d14b15b5SJeffrey Hugo }; 287d14b15b5SJeffrey Hugo 288d14b15b5SJeffrey Hugo static struct clk_alpha_pll_postdiv mmpll10_out_even = { 289d14b15b5SJeffrey Hugo .offset = 0x190, 290d14b15b5SJeffrey Hugo .post_div_shift = 8, 291d14b15b5SJeffrey Hugo .post_div_table = post_div_table_fabia_even, 292d14b15b5SJeffrey Hugo .num_post_div = ARRAY_SIZE(post_div_table_fabia_even), 293d14b15b5SJeffrey Hugo .width = 4, 294d14b15b5SJeffrey Hugo .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA], 295d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 296d14b15b5SJeffrey Hugo .name = "mmpll10_out_even", 297d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mmpll10.clkr.hw }, 298d14b15b5SJeffrey Hugo .num_parents = 1, 299d14b15b5SJeffrey Hugo .ops = &clk_alpha_pll_postdiv_fabia_ops, 300d14b15b5SJeffrey Hugo }, 301d14b15b5SJeffrey Hugo }; 302d14b15b5SJeffrey Hugo 303d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_hdmi_map[] = { 304d14b15b5SJeffrey Hugo { P_XO, 0 }, 305d14b15b5SJeffrey Hugo { P_HDMIPLL, 1 }, 306d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 307d14b15b5SJeffrey Hugo }; 308d14b15b5SJeffrey Hugo 309d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_hdmi[] = { 310*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 311*6d26bb22SMarijn Suijten { .fw_name = "hdmipll" }, 312*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 313d14b15b5SJeffrey Hugo }; 314d14b15b5SJeffrey Hugo 315d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_dsi0pll_dsi1pll_map[] = { 316d14b15b5SJeffrey Hugo { P_XO, 0 }, 317d14b15b5SJeffrey Hugo { P_DSI0PLL, 1 }, 318d14b15b5SJeffrey Hugo { P_DSI1PLL, 2 }, 319d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 320d14b15b5SJeffrey Hugo }; 321d14b15b5SJeffrey Hugo 322d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_dsi0pll_dsi1pll[] = { 323*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 324*6d26bb22SMarijn Suijten { .fw_name = "dsi0dsi" }, 325*6d26bb22SMarijn Suijten { .fw_name = "dsi1dsi" }, 326*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 327d14b15b5SJeffrey Hugo }; 328d14b15b5SJeffrey Hugo 329d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_dsibyte_map[] = { 330d14b15b5SJeffrey Hugo { P_XO, 0 }, 331d14b15b5SJeffrey Hugo { P_DSI0PLL_BYTE, 1 }, 332d14b15b5SJeffrey Hugo { P_DSI1PLL_BYTE, 2 }, 333d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 334d14b15b5SJeffrey Hugo }; 335d14b15b5SJeffrey Hugo 336d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_dsibyte[] = { 337*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 338*6d26bb22SMarijn Suijten { .fw_name = "dsi0byte" }, 339*6d26bb22SMarijn Suijten { .fw_name = "dsi1byte" }, 340*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 341d14b15b5SJeffrey Hugo }; 342d14b15b5SJeffrey Hugo 343d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_dp_map[] = { 344d14b15b5SJeffrey Hugo { P_XO, 0 }, 345d14b15b5SJeffrey Hugo { P_DPLINK, 1 }, 346d14b15b5SJeffrey Hugo { P_DPVCO, 2 }, 347d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 348d14b15b5SJeffrey Hugo }; 349d14b15b5SJeffrey Hugo 350d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_dp[] = { 351*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 352*6d26bb22SMarijn Suijten { .fw_name = "dplink" }, 353*6d26bb22SMarijn Suijten { .fw_name = "dpvco" }, 354*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 355d14b15b5SJeffrey Hugo }; 356d14b15b5SJeffrey Hugo 357d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_gpll0_gpll0_div_map[] = { 358d14b15b5SJeffrey Hugo { P_XO, 0 }, 359d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 360d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 361d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 362d14b15b5SJeffrey Hugo }; 363d14b15b5SJeffrey Hugo 364d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_gpll0_gpll0_div[] = { 365*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 366*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 367d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 368*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 369d14b15b5SJeffrey Hugo }; 370d14b15b5SJeffrey Hugo 371d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_gpll0_gpll0_div_map[] = { 372d14b15b5SJeffrey Hugo { P_XO, 0 }, 373d14b15b5SJeffrey Hugo { P_MMPLL0_OUT_EVEN, 1 }, 374d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 375d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 376d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 377d14b15b5SJeffrey Hugo }; 378d14b15b5SJeffrey Hugo 379d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_gpll0_gpll0_div[] = { 380*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 381d14b15b5SJeffrey Hugo { .hw = &mmpll0_out_even.clkr.hw }, 382*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 383d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 384*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 385d14b15b5SJeffrey Hugo }; 386d14b15b5SJeffrey Hugo 387d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map[] = { 388d14b15b5SJeffrey Hugo { P_XO, 0 }, 389d14b15b5SJeffrey Hugo { P_MMPLL0_OUT_EVEN, 1 }, 390d14b15b5SJeffrey Hugo { P_MMPLL1_OUT_EVEN, 2 }, 391d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 392d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 393d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 394d14b15b5SJeffrey Hugo }; 395d14b15b5SJeffrey Hugo 396d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div[] = { 397*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 398d14b15b5SJeffrey Hugo { .hw = &mmpll0_out_even.clkr.hw }, 399d14b15b5SJeffrey Hugo { .hw = &mmpll1_out_even.clkr.hw }, 400*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 401d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 402*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 403d14b15b5SJeffrey Hugo }; 404d14b15b5SJeffrey Hugo 405d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map[] = { 406d14b15b5SJeffrey Hugo { P_XO, 0 }, 407d14b15b5SJeffrey Hugo { P_MMPLL0_OUT_EVEN, 1 }, 408d14b15b5SJeffrey Hugo { P_MMPLL5_OUT_EVEN, 2 }, 409d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 410d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 411d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 412d14b15b5SJeffrey Hugo }; 413d14b15b5SJeffrey Hugo 414d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div[] = { 415*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 416d14b15b5SJeffrey Hugo { .hw = &mmpll0_out_even.clkr.hw }, 417d14b15b5SJeffrey Hugo { .hw = &mmpll5_out_even.clkr.hw }, 418*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 419d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 420*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 421d14b15b5SJeffrey Hugo }; 422d14b15b5SJeffrey Hugo 423d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map[] = { 424d14b15b5SJeffrey Hugo { P_XO, 0 }, 425d14b15b5SJeffrey Hugo { P_MMPLL0_OUT_EVEN, 1 }, 426d14b15b5SJeffrey Hugo { P_MMPLL3_OUT_EVEN, 3 }, 427d14b15b5SJeffrey Hugo { P_MMPLL6_OUT_EVEN, 4 }, 428d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 429d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 430d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 431d14b15b5SJeffrey Hugo }; 432d14b15b5SJeffrey Hugo 433d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div[] = { 434*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 435d14b15b5SJeffrey Hugo { .hw = &mmpll0_out_even.clkr.hw }, 436d14b15b5SJeffrey Hugo { .hw = &mmpll3_out_even.clkr.hw }, 437d14b15b5SJeffrey Hugo { .hw = &mmpll6_out_even.clkr.hw }, 438*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 439d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 440*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 441d14b15b5SJeffrey Hugo }; 442d14b15b5SJeffrey Hugo 443d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = { 444d14b15b5SJeffrey Hugo { P_XO, 0 }, 445d14b15b5SJeffrey Hugo { P_MMPLL4_OUT_EVEN, 1 }, 446d14b15b5SJeffrey Hugo { P_MMPLL7_OUT_EVEN, 2 }, 447d14b15b5SJeffrey Hugo { P_MMPLL10_OUT_EVEN, 3 }, 448d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 449d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 450d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 451d14b15b5SJeffrey Hugo }; 452d14b15b5SJeffrey Hugo 453d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div[] = { 454*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 455d14b15b5SJeffrey Hugo { .hw = &mmpll4_out_even.clkr.hw }, 456d14b15b5SJeffrey Hugo { .hw = &mmpll7_out_even.clkr.hw }, 457d14b15b5SJeffrey Hugo { .hw = &mmpll10_out_even.clkr.hw }, 458*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 459d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 460*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 461d14b15b5SJeffrey Hugo }; 462d14b15b5SJeffrey Hugo 463d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map[] = { 464d14b15b5SJeffrey Hugo { P_XO, 0 }, 465d14b15b5SJeffrey Hugo { P_MMPLL0_OUT_EVEN, 1 }, 466d14b15b5SJeffrey Hugo { P_MMPLL7_OUT_EVEN, 2 }, 467d14b15b5SJeffrey Hugo { P_MMPLL10_OUT_EVEN, 3 }, 468d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 469d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 470d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 471d14b15b5SJeffrey Hugo }; 472d14b15b5SJeffrey Hugo 473d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div[] = { 474*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 475d14b15b5SJeffrey Hugo { .hw = &mmpll0_out_even.clkr.hw }, 476d14b15b5SJeffrey Hugo { .hw = &mmpll7_out_even.clkr.hw }, 477d14b15b5SJeffrey Hugo { .hw = &mmpll10_out_even.clkr.hw }, 478*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 479d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 480*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 481d14b15b5SJeffrey Hugo }; 482d14b15b5SJeffrey Hugo 483d14b15b5SJeffrey Hugo static const struct parent_map mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = { 484d14b15b5SJeffrey Hugo { P_XO, 0 }, 485d14b15b5SJeffrey Hugo { P_MMPLL0_OUT_EVEN, 1 }, 486d14b15b5SJeffrey Hugo { P_MMPLL4_OUT_EVEN, 2 }, 487d14b15b5SJeffrey Hugo { P_MMPLL7_OUT_EVEN, 3 }, 488d14b15b5SJeffrey Hugo { P_MMPLL10_OUT_EVEN, 4 }, 489d14b15b5SJeffrey Hugo { P_GPLL0, 5 }, 490d14b15b5SJeffrey Hugo { P_GPLL0_DIV, 6 }, 491d14b15b5SJeffrey Hugo { P_CORE_BI_PLL_TEST_SE, 7 } 492d14b15b5SJeffrey Hugo }; 493d14b15b5SJeffrey Hugo 494d14b15b5SJeffrey Hugo static const struct clk_parent_data mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div[] = { 495*6d26bb22SMarijn Suijten { .fw_name = "xo" }, 496d14b15b5SJeffrey Hugo { .hw = &mmpll0_out_even.clkr.hw }, 497d14b15b5SJeffrey Hugo { .hw = &mmpll4_out_even.clkr.hw }, 498d14b15b5SJeffrey Hugo { .hw = &mmpll7_out_even.clkr.hw }, 499d14b15b5SJeffrey Hugo { .hw = &mmpll10_out_even.clkr.hw }, 500*6d26bb22SMarijn Suijten { .fw_name = "gpll0" }, 501d14b15b5SJeffrey Hugo { .hw = &gpll0_div.hw }, 502*6d26bb22SMarijn Suijten { .fw_name = "core_bi_pll_test_se" }, 503d14b15b5SJeffrey Hugo }; 504d14b15b5SJeffrey Hugo 505d14b15b5SJeffrey Hugo static struct clk_rcg2 byte0_clk_src = { 506d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2120, 507d14b15b5SJeffrey Hugo .hid_width = 5, 508d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dsibyte_map, 509d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 510d14b15b5SJeffrey Hugo .name = "byte0_clk_src", 511d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dsibyte, 5129ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dsibyte), 513d14b15b5SJeffrey Hugo .ops = &clk_byte2_ops, 514d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 515d14b15b5SJeffrey Hugo }, 516d14b15b5SJeffrey Hugo }; 517d14b15b5SJeffrey Hugo 518d14b15b5SJeffrey Hugo static struct clk_rcg2 byte1_clk_src = { 519d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2140, 520d14b15b5SJeffrey Hugo .hid_width = 5, 521d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dsibyte_map, 522d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 523d14b15b5SJeffrey Hugo .name = "byte1_clk_src", 524d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dsibyte, 5259ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dsibyte), 526d14b15b5SJeffrey Hugo .ops = &clk_byte2_ops, 527d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 528d14b15b5SJeffrey Hugo }, 529d14b15b5SJeffrey Hugo }; 530d14b15b5SJeffrey Hugo 531d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_cci_clk_src[] = { 532d14b15b5SJeffrey Hugo F(37500000, P_GPLL0, 16, 0, 0), 533d14b15b5SJeffrey Hugo F(50000000, P_GPLL0, 12, 0, 0), 534d14b15b5SJeffrey Hugo F(100000000, P_GPLL0, 6, 0, 0), 535d14b15b5SJeffrey Hugo { } 536d14b15b5SJeffrey Hugo }; 537d14b15b5SJeffrey Hugo 538d14b15b5SJeffrey Hugo static struct clk_rcg2 cci_clk_src = { 539d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3300, 540d14b15b5SJeffrey Hugo .hid_width = 5, 541d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map, 542d14b15b5SJeffrey Hugo .freq_tbl = ftbl_cci_clk_src, 543d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 544d14b15b5SJeffrey Hugo .name = "cci_clk_src", 545d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div, 5469ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div), 547d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 548d14b15b5SJeffrey Hugo }, 549d14b15b5SJeffrey Hugo }; 550d14b15b5SJeffrey Hugo 551d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_cpp_clk_src[] = { 552d14b15b5SJeffrey Hugo F(100000000, P_GPLL0, 6, 0, 0), 553d14b15b5SJeffrey Hugo F(200000000, P_GPLL0, 3, 0, 0), 554d14b15b5SJeffrey Hugo F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0), 555d14b15b5SJeffrey Hugo F(404000000, P_MMPLL0_OUT_EVEN, 2, 0, 0), 556d14b15b5SJeffrey Hugo F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0), 557d14b15b5SJeffrey Hugo F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0), 558d14b15b5SJeffrey Hugo F(600000000, P_GPLL0, 1, 0, 0), 559d14b15b5SJeffrey Hugo { } 560d14b15b5SJeffrey Hugo }; 561d14b15b5SJeffrey Hugo 562d14b15b5SJeffrey Hugo static struct clk_rcg2 cpp_clk_src = { 563d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3640, 564d14b15b5SJeffrey Hugo .hid_width = 5, 565d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 566d14b15b5SJeffrey Hugo .freq_tbl = ftbl_cpp_clk_src, 567d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 568d14b15b5SJeffrey Hugo .name = "cpp_clk_src", 569d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 5709ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 571d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 572d14b15b5SJeffrey Hugo }, 573d14b15b5SJeffrey Hugo }; 574d14b15b5SJeffrey Hugo 575d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_csi_clk_src[] = { 576d14b15b5SJeffrey Hugo F(164571429, P_MMPLL10_OUT_EVEN, 3.5, 0, 0), 577d14b15b5SJeffrey Hugo F(256000000, P_MMPLL4_OUT_EVEN, 3, 0, 0), 578d14b15b5SJeffrey Hugo F(274290000, P_MMPLL7_OUT_EVEN, 3.5, 0, 0), 579d14b15b5SJeffrey Hugo F(300000000, P_GPLL0, 2, 0, 0), 580d14b15b5SJeffrey Hugo F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0), 581d14b15b5SJeffrey Hugo F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0), 582d14b15b5SJeffrey Hugo { } 583d14b15b5SJeffrey Hugo }; 584d14b15b5SJeffrey Hugo 585d14b15b5SJeffrey Hugo static struct clk_rcg2 csi0_clk_src = { 586d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3090, 587d14b15b5SJeffrey Hugo .hid_width = 5, 588d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 589d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csi_clk_src, 590d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 591d14b15b5SJeffrey Hugo .name = "csi0_clk_src", 592d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 5939ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 594d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 595d14b15b5SJeffrey Hugo }, 596d14b15b5SJeffrey Hugo }; 597d14b15b5SJeffrey Hugo 598d14b15b5SJeffrey Hugo static struct clk_rcg2 csi1_clk_src = { 599d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3100, 600d14b15b5SJeffrey Hugo .hid_width = 5, 601d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 602d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csi_clk_src, 603d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 604d14b15b5SJeffrey Hugo .name = "csi1_clk_src", 605d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 6069ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 607d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 608d14b15b5SJeffrey Hugo }, 609d14b15b5SJeffrey Hugo }; 610d14b15b5SJeffrey Hugo 611d14b15b5SJeffrey Hugo static struct clk_rcg2 csi2_clk_src = { 612d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3160, 613d14b15b5SJeffrey Hugo .hid_width = 5, 614d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 615d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csi_clk_src, 616d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 617d14b15b5SJeffrey Hugo .name = "csi2_clk_src", 618d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 6199ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 620d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 621d14b15b5SJeffrey Hugo }, 622d14b15b5SJeffrey Hugo }; 623d14b15b5SJeffrey Hugo 624d14b15b5SJeffrey Hugo static struct clk_rcg2 csi3_clk_src = { 625d14b15b5SJeffrey Hugo .cmd_rcgr = 0x31c0, 626d14b15b5SJeffrey Hugo .hid_width = 5, 627d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 628d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csi_clk_src, 629d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 630d14b15b5SJeffrey Hugo .name = "csi3_clk_src", 631d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 6329ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 633d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 634d14b15b5SJeffrey Hugo }, 635d14b15b5SJeffrey Hugo }; 636d14b15b5SJeffrey Hugo 637d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_csiphy_clk_src[] = { 638d14b15b5SJeffrey Hugo F(164571429, P_MMPLL10_OUT_EVEN, 3.5, 0, 0), 639d14b15b5SJeffrey Hugo F(256000000, P_MMPLL4_OUT_EVEN, 3, 0, 0), 640d14b15b5SJeffrey Hugo F(274290000, P_MMPLL7_OUT_EVEN, 3.5, 0, 0), 641d14b15b5SJeffrey Hugo F(300000000, P_GPLL0, 2, 0, 0), 642d14b15b5SJeffrey Hugo F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0), 643d14b15b5SJeffrey Hugo { } 644d14b15b5SJeffrey Hugo }; 645d14b15b5SJeffrey Hugo 646d14b15b5SJeffrey Hugo static struct clk_rcg2 csiphy_clk_src = { 647d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3800, 648d14b15b5SJeffrey Hugo .hid_width = 5, 649d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 650d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csiphy_clk_src, 651d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 652d14b15b5SJeffrey Hugo .name = "csiphy_clk_src", 653d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 6549ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 655d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 656d14b15b5SJeffrey Hugo }, 657d14b15b5SJeffrey Hugo }; 658d14b15b5SJeffrey Hugo 659d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_csiphytimer_clk_src[] = { 660d14b15b5SJeffrey Hugo F(200000000, P_GPLL0, 3, 0, 0), 661d14b15b5SJeffrey Hugo F(269333333, P_MMPLL0_OUT_EVEN, 3, 0, 0), 662d14b15b5SJeffrey Hugo { } 663d14b15b5SJeffrey Hugo }; 664d14b15b5SJeffrey Hugo 665d14b15b5SJeffrey Hugo static struct clk_rcg2 csi0phytimer_clk_src = { 666d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3000, 667d14b15b5SJeffrey Hugo .hid_width = 5, 668d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 669d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csiphytimer_clk_src, 670d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 671d14b15b5SJeffrey Hugo .name = "csi0phytimer_clk_src", 672d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 6739ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 674d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 675d14b15b5SJeffrey Hugo }, 676d14b15b5SJeffrey Hugo }; 677d14b15b5SJeffrey Hugo 678d14b15b5SJeffrey Hugo static struct clk_rcg2 csi1phytimer_clk_src = { 679d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3030, 680d14b15b5SJeffrey Hugo .hid_width = 5, 681d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 682d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csiphytimer_clk_src, 683d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 684d14b15b5SJeffrey Hugo .name = "csi1phytimer_clk_src", 685d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 6869ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 687d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 688d14b15b5SJeffrey Hugo }, 689d14b15b5SJeffrey Hugo }; 690d14b15b5SJeffrey Hugo 691d14b15b5SJeffrey Hugo static struct clk_rcg2 csi2phytimer_clk_src = { 692d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3060, 693d14b15b5SJeffrey Hugo .hid_width = 5, 694d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 695d14b15b5SJeffrey Hugo .freq_tbl = ftbl_csiphytimer_clk_src, 696d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 697d14b15b5SJeffrey Hugo .name = "csi2phytimer_clk_src", 698d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 6999ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 700d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 701d14b15b5SJeffrey Hugo }, 702d14b15b5SJeffrey Hugo }; 703d14b15b5SJeffrey Hugo 704d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_aux_clk_src[] = { 705d14b15b5SJeffrey Hugo F(19200000, P_XO, 1, 0, 0), 706d14b15b5SJeffrey Hugo { } 707d14b15b5SJeffrey Hugo }; 708d14b15b5SJeffrey Hugo 709d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_aux_clk_src = { 710d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2260, 711d14b15b5SJeffrey Hugo .hid_width = 5, 712d14b15b5SJeffrey Hugo .parent_map = mmss_xo_gpll0_gpll0_div_map, 713d14b15b5SJeffrey Hugo .freq_tbl = ftbl_dp_aux_clk_src, 714d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 715d14b15b5SJeffrey Hugo .name = "dp_aux_clk_src", 716d14b15b5SJeffrey Hugo .parent_data = mmss_xo_gpll0_gpll0_div, 7179ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_gpll0_gpll0_div), 718d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 719d14b15b5SJeffrey Hugo }, 720d14b15b5SJeffrey Hugo }; 721d14b15b5SJeffrey Hugo 722d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_crypto_clk_src[] = { 723d14b15b5SJeffrey Hugo F(101250, P_DPLINK, 1, 5, 16), 724d14b15b5SJeffrey Hugo F(168750, P_DPLINK, 1, 5, 16), 725d14b15b5SJeffrey Hugo F(337500, P_DPLINK, 1, 5, 16), 726d14b15b5SJeffrey Hugo { } 727d14b15b5SJeffrey Hugo }; 728d14b15b5SJeffrey Hugo 729d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_crypto_clk_src = { 730d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2220, 731d14b15b5SJeffrey Hugo .hid_width = 5, 732d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dp_map, 733d14b15b5SJeffrey Hugo .freq_tbl = ftbl_dp_crypto_clk_src, 734d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 735d14b15b5SJeffrey Hugo .name = "dp_crypto_clk_src", 736d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dp, 7379ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dp), 738d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 739d14b15b5SJeffrey Hugo }, 740d14b15b5SJeffrey Hugo }; 741d14b15b5SJeffrey Hugo 742d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_link_clk_src[] = { 743d14b15b5SJeffrey Hugo F(162000, P_DPLINK, 2, 0, 0), 744d14b15b5SJeffrey Hugo F(270000, P_DPLINK, 2, 0, 0), 745d14b15b5SJeffrey Hugo F(540000, P_DPLINK, 2, 0, 0), 746d14b15b5SJeffrey Hugo { } 747d14b15b5SJeffrey Hugo }; 748d14b15b5SJeffrey Hugo 749d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_link_clk_src = { 750d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2200, 751d14b15b5SJeffrey Hugo .hid_width = 5, 752d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dp_map, 753d14b15b5SJeffrey Hugo .freq_tbl = ftbl_dp_link_clk_src, 754d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 755d14b15b5SJeffrey Hugo .name = "dp_link_clk_src", 756d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dp, 7579ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dp), 758d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 759d14b15b5SJeffrey Hugo }, 760d14b15b5SJeffrey Hugo }; 761d14b15b5SJeffrey Hugo 762d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_dp_pixel_clk_src[] = { 763d14b15b5SJeffrey Hugo F(154000000, P_DPVCO, 1, 0, 0), 764d14b15b5SJeffrey Hugo F(337500000, P_DPVCO, 2, 0, 0), 765d14b15b5SJeffrey Hugo F(675000000, P_DPVCO, 2, 0, 0), 766d14b15b5SJeffrey Hugo { } 767d14b15b5SJeffrey Hugo }; 768d14b15b5SJeffrey Hugo 769d14b15b5SJeffrey Hugo static struct clk_rcg2 dp_pixel_clk_src = { 770d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2240, 771d14b15b5SJeffrey Hugo .hid_width = 5, 772d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dp_map, 773d14b15b5SJeffrey Hugo .freq_tbl = ftbl_dp_pixel_clk_src, 774d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 775d14b15b5SJeffrey Hugo .name = "dp_pixel_clk_src", 776d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dp, 7779ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dp), 778d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 779d14b15b5SJeffrey Hugo }, 780d14b15b5SJeffrey Hugo }; 781d14b15b5SJeffrey Hugo 782d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_esc_clk_src[] = { 783d14b15b5SJeffrey Hugo F(19200000, P_XO, 1, 0, 0), 784d14b15b5SJeffrey Hugo { } 785d14b15b5SJeffrey Hugo }; 786d14b15b5SJeffrey Hugo 787d14b15b5SJeffrey Hugo static struct clk_rcg2 esc0_clk_src = { 788d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2160, 789d14b15b5SJeffrey Hugo .hid_width = 5, 790d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dsibyte_map, 791d14b15b5SJeffrey Hugo .freq_tbl = ftbl_esc_clk_src, 792d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 793d14b15b5SJeffrey Hugo .name = "esc0_clk_src", 794d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dsibyte, 7959ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dsibyte), 796d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 797d14b15b5SJeffrey Hugo }, 798d14b15b5SJeffrey Hugo }; 799d14b15b5SJeffrey Hugo 800d14b15b5SJeffrey Hugo static struct clk_rcg2 esc1_clk_src = { 801d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2180, 802d14b15b5SJeffrey Hugo .hid_width = 5, 803d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dsibyte_map, 804d14b15b5SJeffrey Hugo .freq_tbl = ftbl_esc_clk_src, 805d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 806d14b15b5SJeffrey Hugo .name = "esc1_clk_src", 807d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dsibyte, 8089ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dsibyte), 809d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 810d14b15b5SJeffrey Hugo }, 811d14b15b5SJeffrey Hugo }; 812d14b15b5SJeffrey Hugo 813d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_extpclk_clk_src[] = { 814d14b15b5SJeffrey Hugo { .src = P_HDMIPLL }, 815d14b15b5SJeffrey Hugo { } 816d14b15b5SJeffrey Hugo }; 817d14b15b5SJeffrey Hugo 818d14b15b5SJeffrey Hugo static struct clk_rcg2 extpclk_clk_src = { 819d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2060, 820d14b15b5SJeffrey Hugo .hid_width = 5, 821d14b15b5SJeffrey Hugo .parent_map = mmss_xo_hdmi_map, 822d14b15b5SJeffrey Hugo .freq_tbl = ftbl_extpclk_clk_src, 823d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 824d14b15b5SJeffrey Hugo .name = "extpclk_clk_src", 825d14b15b5SJeffrey Hugo .parent_data = mmss_xo_hdmi, 8269ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_hdmi), 827d14b15b5SJeffrey Hugo .ops = &clk_byte_ops, 828d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 829d14b15b5SJeffrey Hugo }, 830d14b15b5SJeffrey Hugo }; 831d14b15b5SJeffrey Hugo 832d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_fd_core_clk_src[] = { 833d14b15b5SJeffrey Hugo F(100000000, P_GPLL0, 6, 0, 0), 834d14b15b5SJeffrey Hugo F(200000000, P_GPLL0, 3, 0, 0), 835d14b15b5SJeffrey Hugo F(404000000, P_MMPLL0_OUT_EVEN, 2, 0, 0), 836d14b15b5SJeffrey Hugo F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0), 837d14b15b5SJeffrey Hugo F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0), 838d14b15b5SJeffrey Hugo { } 839d14b15b5SJeffrey Hugo }; 840d14b15b5SJeffrey Hugo 841d14b15b5SJeffrey Hugo static struct clk_rcg2 fd_core_clk_src = { 842d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3b00, 843d14b15b5SJeffrey Hugo .hid_width = 5, 844d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 845d14b15b5SJeffrey Hugo .freq_tbl = ftbl_fd_core_clk_src, 846d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 847d14b15b5SJeffrey Hugo .name = "fd_core_clk_src", 848d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 8499ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 850d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 851d14b15b5SJeffrey Hugo }, 852d14b15b5SJeffrey Hugo }; 853d14b15b5SJeffrey Hugo 854d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_hdmi_clk_src[] = { 855d14b15b5SJeffrey Hugo F(19200000, P_XO, 1, 0, 0), 856d14b15b5SJeffrey Hugo { } 857d14b15b5SJeffrey Hugo }; 858d14b15b5SJeffrey Hugo 859d14b15b5SJeffrey Hugo static struct clk_rcg2 hdmi_clk_src = { 860d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2100, 861d14b15b5SJeffrey Hugo .hid_width = 5, 862d14b15b5SJeffrey Hugo .parent_map = mmss_xo_gpll0_gpll0_div_map, 863d14b15b5SJeffrey Hugo .freq_tbl = ftbl_hdmi_clk_src, 864d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 865d14b15b5SJeffrey Hugo .name = "hdmi_clk_src", 866d14b15b5SJeffrey Hugo .parent_data = mmss_xo_gpll0_gpll0_div, 8679ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_gpll0_gpll0_div), 868d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 869d14b15b5SJeffrey Hugo }, 870d14b15b5SJeffrey Hugo }; 871d14b15b5SJeffrey Hugo 872d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_jpeg0_clk_src[] = { 873d14b15b5SJeffrey Hugo F(75000000, P_GPLL0, 8, 0, 0), 874d14b15b5SJeffrey Hugo F(150000000, P_GPLL0, 4, 0, 0), 875d14b15b5SJeffrey Hugo F(320000000, P_MMPLL7_OUT_EVEN, 3, 0, 0), 876d14b15b5SJeffrey Hugo F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0), 877d14b15b5SJeffrey Hugo { } 878d14b15b5SJeffrey Hugo }; 879d14b15b5SJeffrey Hugo 880d14b15b5SJeffrey Hugo static struct clk_rcg2 jpeg0_clk_src = { 881d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3500, 882d14b15b5SJeffrey Hugo .hid_width = 5, 883d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 884d14b15b5SJeffrey Hugo .freq_tbl = ftbl_jpeg0_clk_src, 885d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 886d14b15b5SJeffrey Hugo .name = "jpeg0_clk_src", 887d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 8889ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 889d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 890d14b15b5SJeffrey Hugo }, 891d14b15b5SJeffrey Hugo }; 892d14b15b5SJeffrey Hugo 893d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_maxi_clk_src[] = { 894d14b15b5SJeffrey Hugo F(19200000, P_XO, 1, 0, 0), 895d14b15b5SJeffrey Hugo F(75000000, P_GPLL0_DIV, 4, 0, 0), 896d14b15b5SJeffrey Hugo F(171428571, P_GPLL0, 3.5, 0, 0), 897d14b15b5SJeffrey Hugo F(323200000, P_MMPLL0_OUT_EVEN, 2.5, 0, 0), 898d14b15b5SJeffrey Hugo F(406000000, P_MMPLL1_OUT_EVEN, 2, 0, 0), 899d14b15b5SJeffrey Hugo { } 900d14b15b5SJeffrey Hugo }; 901d14b15b5SJeffrey Hugo 902d14b15b5SJeffrey Hugo static struct clk_rcg2 maxi_clk_src = { 903d14b15b5SJeffrey Hugo .cmd_rcgr = 0xf020, 904d14b15b5SJeffrey Hugo .hid_width = 5, 905d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map, 906d14b15b5SJeffrey Hugo .freq_tbl = ftbl_maxi_clk_src, 907d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 908d14b15b5SJeffrey Hugo .name = "maxi_clk_src", 909d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div, 9109ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div), 911d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 912d14b15b5SJeffrey Hugo }, 913d14b15b5SJeffrey Hugo }; 914d14b15b5SJeffrey Hugo 915d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_mclk_clk_src[] = { 916d14b15b5SJeffrey Hugo F(4800000, P_XO, 4, 0, 0), 917d14b15b5SJeffrey Hugo F(6000000, P_GPLL0_DIV, 10, 1, 5), 918d14b15b5SJeffrey Hugo F(8000000, P_GPLL0_DIV, 1, 2, 75), 919d14b15b5SJeffrey Hugo F(9600000, P_XO, 2, 0, 0), 920d14b15b5SJeffrey Hugo F(16666667, P_GPLL0_DIV, 2, 1, 9), 921d14b15b5SJeffrey Hugo F(19200000, P_XO, 1, 0, 0), 922d14b15b5SJeffrey Hugo F(24000000, P_GPLL0_DIV, 1, 2, 25), 923d14b15b5SJeffrey Hugo F(33333333, P_GPLL0_DIV, 1, 2, 9), 924d14b15b5SJeffrey Hugo F(48000000, P_GPLL0, 1, 2, 25), 925d14b15b5SJeffrey Hugo F(66666667, P_GPLL0, 1, 2, 9), 926d14b15b5SJeffrey Hugo { } 927d14b15b5SJeffrey Hugo }; 928d14b15b5SJeffrey Hugo 929d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk0_clk_src = { 930d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3360, 931d14b15b5SJeffrey Hugo .hid_width = 5, 932d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 933d14b15b5SJeffrey Hugo .freq_tbl = ftbl_mclk_clk_src, 934d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 935d14b15b5SJeffrey Hugo .name = "mclk0_clk_src", 936d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 9379ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 938d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 939d14b15b5SJeffrey Hugo }, 940d14b15b5SJeffrey Hugo }; 941d14b15b5SJeffrey Hugo 942d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk1_clk_src = { 943d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3390, 944d14b15b5SJeffrey Hugo .hid_width = 5, 945d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 946d14b15b5SJeffrey Hugo .freq_tbl = ftbl_mclk_clk_src, 947d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 948d14b15b5SJeffrey Hugo .name = "mclk1_clk_src", 949d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 9509ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 951d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 952d14b15b5SJeffrey Hugo }, 953d14b15b5SJeffrey Hugo }; 954d14b15b5SJeffrey Hugo 955d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk2_clk_src = { 956d14b15b5SJeffrey Hugo .cmd_rcgr = 0x33c0, 957d14b15b5SJeffrey Hugo .hid_width = 5, 958d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 959d14b15b5SJeffrey Hugo .freq_tbl = ftbl_mclk_clk_src, 960d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 961d14b15b5SJeffrey Hugo .name = "mclk2_clk_src", 962d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 9639ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 964d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 965d14b15b5SJeffrey Hugo }, 966d14b15b5SJeffrey Hugo }; 967d14b15b5SJeffrey Hugo 968d14b15b5SJeffrey Hugo static struct clk_rcg2 mclk3_clk_src = { 969d14b15b5SJeffrey Hugo .cmd_rcgr = 0x33f0, 970d14b15b5SJeffrey Hugo .hid_width = 5, 971d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 972d14b15b5SJeffrey Hugo .freq_tbl = ftbl_mclk_clk_src, 973d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 974d14b15b5SJeffrey Hugo .name = "mclk3_clk_src", 975d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 9769ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 977d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 978d14b15b5SJeffrey Hugo }, 979d14b15b5SJeffrey Hugo }; 980d14b15b5SJeffrey Hugo 981d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_mdp_clk_src[] = { 982d14b15b5SJeffrey Hugo F(85714286, P_GPLL0, 7, 0, 0), 983d14b15b5SJeffrey Hugo F(100000000, P_GPLL0, 6, 0, 0), 984d14b15b5SJeffrey Hugo F(150000000, P_GPLL0, 4, 0, 0), 985d14b15b5SJeffrey Hugo F(171428571, P_GPLL0, 3.5, 0, 0), 986d14b15b5SJeffrey Hugo F(200000000, P_GPLL0, 3, 0, 0), 987d14b15b5SJeffrey Hugo F(275000000, P_MMPLL5_OUT_EVEN, 3, 0, 0), 988d14b15b5SJeffrey Hugo F(300000000, P_GPLL0, 2, 0, 0), 989d14b15b5SJeffrey Hugo F(330000000, P_MMPLL5_OUT_EVEN, 2.5, 0, 0), 990d14b15b5SJeffrey Hugo F(412500000, P_MMPLL5_OUT_EVEN, 2, 0, 0), 991d14b15b5SJeffrey Hugo { } 992d14b15b5SJeffrey Hugo }; 993d14b15b5SJeffrey Hugo 994d14b15b5SJeffrey Hugo static struct clk_rcg2 mdp_clk_src = { 995d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2040, 996d14b15b5SJeffrey Hugo .hid_width = 5, 997d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map, 998d14b15b5SJeffrey Hugo .freq_tbl = ftbl_mdp_clk_src, 999d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1000d14b15b5SJeffrey Hugo .name = "mdp_clk_src", 1001d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div, 10029ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div), 1003d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1004d14b15b5SJeffrey Hugo }, 1005d14b15b5SJeffrey Hugo }; 1006d14b15b5SJeffrey Hugo 1007d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_vsync_clk_src[] = { 1008d14b15b5SJeffrey Hugo F(19200000, P_XO, 1, 0, 0), 1009d14b15b5SJeffrey Hugo { } 1010d14b15b5SJeffrey Hugo }; 1011d14b15b5SJeffrey Hugo 1012d14b15b5SJeffrey Hugo static struct clk_rcg2 vsync_clk_src = { 1013d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2080, 1014d14b15b5SJeffrey Hugo .hid_width = 5, 1015d14b15b5SJeffrey Hugo .parent_map = mmss_xo_gpll0_gpll0_div_map, 1016d14b15b5SJeffrey Hugo .freq_tbl = ftbl_vsync_clk_src, 1017d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1018d14b15b5SJeffrey Hugo .name = "vsync_clk_src", 1019d14b15b5SJeffrey Hugo .parent_data = mmss_xo_gpll0_gpll0_div, 10209ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_gpll0_gpll0_div), 1021d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1022d14b15b5SJeffrey Hugo }, 1023d14b15b5SJeffrey Hugo }; 1024d14b15b5SJeffrey Hugo 1025d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_ahb_clk_src[] = { 1026d14b15b5SJeffrey Hugo F(19200000, P_XO, 1, 0, 0), 1027d14b15b5SJeffrey Hugo F(40000000, P_GPLL0, 15, 0, 0), 1028d14b15b5SJeffrey Hugo F(80800000, P_MMPLL0_OUT_EVEN, 10, 0, 0), 1029d14b15b5SJeffrey Hugo { } 1030d14b15b5SJeffrey Hugo }; 1031d14b15b5SJeffrey Hugo 1032d14b15b5SJeffrey Hugo static struct clk_rcg2 ahb_clk_src = { 1033d14b15b5SJeffrey Hugo .cmd_rcgr = 0x5000, 1034d14b15b5SJeffrey Hugo .hid_width = 5, 1035d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_gpll0_gpll0_div_map, 1036d14b15b5SJeffrey Hugo .freq_tbl = ftbl_ahb_clk_src, 1037d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1038d14b15b5SJeffrey Hugo .name = "ahb_clk_src", 1039d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_gpll0_gpll0_div, 10409ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_gpll0_gpll0_div), 1041d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1042d14b15b5SJeffrey Hugo }, 1043d14b15b5SJeffrey Hugo }; 1044d14b15b5SJeffrey Hugo 1045d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_axi_clk_src[] = { 1046d14b15b5SJeffrey Hugo F(75000000, P_GPLL0, 8, 0, 0), 1047d14b15b5SJeffrey Hugo F(171428571, P_GPLL0, 3.5, 0, 0), 1048d14b15b5SJeffrey Hugo F(240000000, P_GPLL0, 2.5, 0, 0), 1049d14b15b5SJeffrey Hugo F(323200000, P_MMPLL0_OUT_EVEN, 2.5, 0, 0), 1050d14b15b5SJeffrey Hugo F(406000000, P_MMPLL0_OUT_EVEN, 2, 0, 0), 1051d14b15b5SJeffrey Hugo { } 1052d14b15b5SJeffrey Hugo }; 1053d14b15b5SJeffrey Hugo 1054d14b15b5SJeffrey Hugo /* RO to linux */ 1055d14b15b5SJeffrey Hugo static struct clk_rcg2 axi_clk_src = { 1056d14b15b5SJeffrey Hugo .cmd_rcgr = 0xd000, 1057d14b15b5SJeffrey Hugo .hid_width = 5, 1058d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map, 1059d14b15b5SJeffrey Hugo .freq_tbl = ftbl_axi_clk_src, 1060d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1061d14b15b5SJeffrey Hugo .name = "axi_clk_src", 1062d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div, 10639ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div), 1064d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1065d14b15b5SJeffrey Hugo }, 1066d14b15b5SJeffrey Hugo }; 1067d14b15b5SJeffrey Hugo 1068d14b15b5SJeffrey Hugo static struct clk_rcg2 pclk0_clk_src = { 1069d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2000, 1070d14b15b5SJeffrey Hugo .mnd_width = 8, 1071d14b15b5SJeffrey Hugo .hid_width = 5, 1072d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dsi0pll_dsi1pll_map, 1073d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1074d14b15b5SJeffrey Hugo .name = "pclk0_clk_src", 1075d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dsi0pll_dsi1pll, 10769ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dsi0pll_dsi1pll), 1077d14b15b5SJeffrey Hugo .ops = &clk_pixel_ops, 1078d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1079d14b15b5SJeffrey Hugo }, 1080d14b15b5SJeffrey Hugo }; 1081d14b15b5SJeffrey Hugo 1082d14b15b5SJeffrey Hugo static struct clk_rcg2 pclk1_clk_src = { 1083d14b15b5SJeffrey Hugo .cmd_rcgr = 0x2020, 1084d14b15b5SJeffrey Hugo .mnd_width = 8, 1085d14b15b5SJeffrey Hugo .hid_width = 5, 1086d14b15b5SJeffrey Hugo .parent_map = mmss_xo_dsi0pll_dsi1pll_map, 1087d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1088d14b15b5SJeffrey Hugo .name = "pclk1_clk_src", 1089d14b15b5SJeffrey Hugo .parent_data = mmss_xo_dsi0pll_dsi1pll, 10909ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_dsi0pll_dsi1pll), 1091d14b15b5SJeffrey Hugo .ops = &clk_pixel_ops, 1092d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1093d14b15b5SJeffrey Hugo }, 1094d14b15b5SJeffrey Hugo }; 1095d14b15b5SJeffrey Hugo 1096d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_rot_clk_src[] = { 1097d14b15b5SJeffrey Hugo F(171428571, P_GPLL0, 3.5, 0, 0), 1098d14b15b5SJeffrey Hugo F(275000000, P_MMPLL5_OUT_EVEN, 3, 0, 0), 1099d14b15b5SJeffrey Hugo F(330000000, P_MMPLL5_OUT_EVEN, 2.5, 0, 0), 1100d14b15b5SJeffrey Hugo F(412500000, P_MMPLL5_OUT_EVEN, 2, 0, 0), 1101d14b15b5SJeffrey Hugo { } 1102d14b15b5SJeffrey Hugo }; 1103d14b15b5SJeffrey Hugo 1104d14b15b5SJeffrey Hugo static struct clk_rcg2 rot_clk_src = { 1105d14b15b5SJeffrey Hugo .cmd_rcgr = 0x21a0, 1106d14b15b5SJeffrey Hugo .hid_width = 5, 1107d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map, 1108d14b15b5SJeffrey Hugo .freq_tbl = ftbl_rot_clk_src, 1109d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1110d14b15b5SJeffrey Hugo .name = "rot_clk_src", 1111d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div, 11129ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div), 1113d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1114d14b15b5SJeffrey Hugo }, 1115d14b15b5SJeffrey Hugo }; 1116d14b15b5SJeffrey Hugo 1117d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_video_core_clk_src[] = { 1118d14b15b5SJeffrey Hugo F(200000000, P_GPLL0, 3, 0, 0), 1119d14b15b5SJeffrey Hugo F(269330000, P_MMPLL0_OUT_EVEN, 3, 0, 0), 1120d14b15b5SJeffrey Hugo F(355200000, P_MMPLL6_OUT_EVEN, 2.5, 0, 0), 1121d14b15b5SJeffrey Hugo F(444000000, P_MMPLL6_OUT_EVEN, 2, 0, 0), 1122d14b15b5SJeffrey Hugo F(533000000, P_MMPLL3_OUT_EVEN, 2, 0, 0), 1123d14b15b5SJeffrey Hugo { } 1124d14b15b5SJeffrey Hugo }; 1125d14b15b5SJeffrey Hugo 1126d14b15b5SJeffrey Hugo static struct clk_rcg2 video_core_clk_src = { 1127d14b15b5SJeffrey Hugo .cmd_rcgr = 0x1000, 1128d14b15b5SJeffrey Hugo .hid_width = 5, 1129d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map, 1130d14b15b5SJeffrey Hugo .freq_tbl = ftbl_video_core_clk_src, 1131d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1132d14b15b5SJeffrey Hugo .name = "video_core_clk_src", 1133d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div, 11349ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div), 1135d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1136d14b15b5SJeffrey Hugo }, 1137d14b15b5SJeffrey Hugo }; 1138d14b15b5SJeffrey Hugo 1139d14b15b5SJeffrey Hugo static struct clk_rcg2 video_subcore0_clk_src = { 1140d14b15b5SJeffrey Hugo .cmd_rcgr = 0x1060, 1141d14b15b5SJeffrey Hugo .hid_width = 5, 1142d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map, 1143d14b15b5SJeffrey Hugo .freq_tbl = ftbl_video_core_clk_src, 1144d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1145d14b15b5SJeffrey Hugo .name = "video_subcore0_clk_src", 1146d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div, 11479ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div), 1148d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1149d14b15b5SJeffrey Hugo }, 1150d14b15b5SJeffrey Hugo }; 1151d14b15b5SJeffrey Hugo 1152d14b15b5SJeffrey Hugo static struct clk_rcg2 video_subcore1_clk_src = { 1153d14b15b5SJeffrey Hugo .cmd_rcgr = 0x1080, 1154d14b15b5SJeffrey Hugo .hid_width = 5, 1155d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map, 1156d14b15b5SJeffrey Hugo .freq_tbl = ftbl_video_core_clk_src, 1157d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1158d14b15b5SJeffrey Hugo .name = "video_subcore1_clk_src", 1159d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div, 11609ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div), 1161d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1162d14b15b5SJeffrey Hugo }, 1163d14b15b5SJeffrey Hugo }; 1164d14b15b5SJeffrey Hugo 1165d14b15b5SJeffrey Hugo static const struct freq_tbl ftbl_vfe_clk_src[] = { 1166d14b15b5SJeffrey Hugo F(200000000, P_GPLL0, 3, 0, 0), 1167d14b15b5SJeffrey Hugo F(300000000, P_GPLL0, 2, 0, 0), 1168d14b15b5SJeffrey Hugo F(320000000, P_MMPLL7_OUT_EVEN, 3, 0, 0), 1169d14b15b5SJeffrey Hugo F(384000000, P_MMPLL4_OUT_EVEN, 2, 0, 0), 1170d14b15b5SJeffrey Hugo F(404000000, P_MMPLL0_OUT_EVEN, 2, 0, 0), 1171d14b15b5SJeffrey Hugo F(480000000, P_MMPLL7_OUT_EVEN, 2, 0, 0), 1172d14b15b5SJeffrey Hugo F(576000000, P_MMPLL10_OUT_EVEN, 1, 0, 0), 1173d14b15b5SJeffrey Hugo F(600000000, P_GPLL0, 1, 0, 0), 1174d14b15b5SJeffrey Hugo { } 1175d14b15b5SJeffrey Hugo }; 1176d14b15b5SJeffrey Hugo 1177d14b15b5SJeffrey Hugo static struct clk_rcg2 vfe0_clk_src = { 1178d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3600, 1179d14b15b5SJeffrey Hugo .hid_width = 5, 1180d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 1181d14b15b5SJeffrey Hugo .freq_tbl = ftbl_vfe_clk_src, 1182d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1183d14b15b5SJeffrey Hugo .name = "vfe0_clk_src", 1184d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 11859ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 1186d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1187d14b15b5SJeffrey Hugo }, 1188d14b15b5SJeffrey Hugo }; 1189d14b15b5SJeffrey Hugo 1190d14b15b5SJeffrey Hugo static struct clk_rcg2 vfe1_clk_src = { 1191d14b15b5SJeffrey Hugo .cmd_rcgr = 0x3620, 1192d14b15b5SJeffrey Hugo .hid_width = 5, 1193d14b15b5SJeffrey Hugo .parent_map = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map, 1194d14b15b5SJeffrey Hugo .freq_tbl = ftbl_vfe_clk_src, 1195d14b15b5SJeffrey Hugo .clkr.hw.init = &(struct clk_init_data){ 1196d14b15b5SJeffrey Hugo .name = "vfe1_clk_src", 1197d14b15b5SJeffrey Hugo .parent_data = mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div, 11989ee049ebSMarijn Suijten .num_parents = ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div), 1199d14b15b5SJeffrey Hugo .ops = &clk_rcg2_ops, 1200d14b15b5SJeffrey Hugo }, 1201d14b15b5SJeffrey Hugo }; 1202d14b15b5SJeffrey Hugo 1203d14b15b5SJeffrey Hugo static struct clk_branch misc_ahb_clk = { 1204d14b15b5SJeffrey Hugo .halt_reg = 0x328, 1205fa92f3b0SAngeloGioacchino Del Regno .hwcg_reg = 0x328, 1206fa92f3b0SAngeloGioacchino Del Regno .hwcg_bit = 1, 1207d14b15b5SJeffrey Hugo .clkr = { 1208d14b15b5SJeffrey Hugo .enable_reg = 0x328, 1209d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1210d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1211d14b15b5SJeffrey Hugo .name = "misc_ahb_clk", 1212d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1213d14b15b5SJeffrey Hugo .num_parents = 1, 1214d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1215d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1216d14b15b5SJeffrey Hugo }, 1217d14b15b5SJeffrey Hugo }, 1218d14b15b5SJeffrey Hugo }; 1219d14b15b5SJeffrey Hugo 1220d14b15b5SJeffrey Hugo static struct clk_branch video_core_clk = { 1221d14b15b5SJeffrey Hugo .halt_reg = 0x1028, 1222d14b15b5SJeffrey Hugo .clkr = { 1223d14b15b5SJeffrey Hugo .enable_reg = 0x1028, 1224d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1225d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1226d14b15b5SJeffrey Hugo .name = "video_core_clk", 1227d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &video_core_clk_src.clkr.hw }, 1228d14b15b5SJeffrey Hugo .num_parents = 1, 1229d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1230d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1231d14b15b5SJeffrey Hugo }, 1232d14b15b5SJeffrey Hugo }, 1233d14b15b5SJeffrey Hugo }; 1234d14b15b5SJeffrey Hugo 1235d14b15b5SJeffrey Hugo static struct clk_branch video_ahb_clk = { 1236d14b15b5SJeffrey Hugo .halt_reg = 0x1030, 1237fa92f3b0SAngeloGioacchino Del Regno .hwcg_reg = 0x1030, 1238fa92f3b0SAngeloGioacchino Del Regno .hwcg_bit = 1, 1239d14b15b5SJeffrey Hugo .clkr = { 1240d14b15b5SJeffrey Hugo .enable_reg = 0x1030, 1241d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1242d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1243d14b15b5SJeffrey Hugo .name = "video_ahb_clk", 1244d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1245d14b15b5SJeffrey Hugo .num_parents = 1, 1246d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1247d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1248d14b15b5SJeffrey Hugo }, 1249d14b15b5SJeffrey Hugo }, 1250d14b15b5SJeffrey Hugo }; 1251d14b15b5SJeffrey Hugo 1252d14b15b5SJeffrey Hugo static struct clk_branch video_axi_clk = { 1253d14b15b5SJeffrey Hugo .halt_reg = 0x1034, 1254d14b15b5SJeffrey Hugo .clkr = { 1255d14b15b5SJeffrey Hugo .enable_reg = 0x1034, 1256d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1257d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1258d14b15b5SJeffrey Hugo .name = "video_axi_clk", 1259d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw }, 1260d14b15b5SJeffrey Hugo .num_parents = 1, 1261d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1262d14b15b5SJeffrey Hugo }, 1263d14b15b5SJeffrey Hugo }, 1264d14b15b5SJeffrey Hugo }; 1265d14b15b5SJeffrey Hugo 1266d14b15b5SJeffrey Hugo static struct clk_branch video_maxi_clk = { 1267d14b15b5SJeffrey Hugo .halt_reg = 0x1038, 1268d14b15b5SJeffrey Hugo .clkr = { 1269d14b15b5SJeffrey Hugo .enable_reg = 0x1038, 1270d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1271d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1272d14b15b5SJeffrey Hugo .name = "video_maxi_clk", 1273d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &maxi_clk_src.clkr.hw }, 1274d14b15b5SJeffrey Hugo .num_parents = 1, 1275d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1276d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1277d14b15b5SJeffrey Hugo }, 1278d14b15b5SJeffrey Hugo }, 1279d14b15b5SJeffrey Hugo }; 1280d14b15b5SJeffrey Hugo 1281d14b15b5SJeffrey Hugo static struct clk_branch video_subcore0_clk = { 1282d14b15b5SJeffrey Hugo .halt_reg = 0x1048, 1283d14b15b5SJeffrey Hugo .clkr = { 1284d14b15b5SJeffrey Hugo .enable_reg = 0x1048, 1285d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1286d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1287d14b15b5SJeffrey Hugo .name = "video_subcore0_clk", 1288d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &video_subcore0_clk_src.clkr.hw }, 1289d14b15b5SJeffrey Hugo .num_parents = 1, 1290d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1291d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1292d14b15b5SJeffrey Hugo }, 1293d14b15b5SJeffrey Hugo }, 1294d14b15b5SJeffrey Hugo }; 1295d14b15b5SJeffrey Hugo 1296d14b15b5SJeffrey Hugo static struct clk_branch video_subcore1_clk = { 1297d14b15b5SJeffrey Hugo .halt_reg = 0x104c, 1298d14b15b5SJeffrey Hugo .clkr = { 1299d14b15b5SJeffrey Hugo .enable_reg = 0x104c, 1300d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1301d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1302d14b15b5SJeffrey Hugo .name = "video_subcore1_clk", 1303d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &video_subcore1_clk_src.clkr.hw }, 1304d14b15b5SJeffrey Hugo .num_parents = 1, 1305d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1306d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1307d14b15b5SJeffrey Hugo }, 1308d14b15b5SJeffrey Hugo }, 1309d14b15b5SJeffrey Hugo }; 1310d14b15b5SJeffrey Hugo 1311d14b15b5SJeffrey Hugo static struct clk_branch mdss_ahb_clk = { 1312d14b15b5SJeffrey Hugo .halt_reg = 0x2308, 1313fa92f3b0SAngeloGioacchino Del Regno .hwcg_reg = 0x2308, 1314fa92f3b0SAngeloGioacchino Del Regno .hwcg_bit = 1, 1315d14b15b5SJeffrey Hugo .clkr = { 1316d14b15b5SJeffrey Hugo .enable_reg = 0x2308, 1317d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1318d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1319d14b15b5SJeffrey Hugo .name = "mdss_ahb_clk", 1320d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1321d14b15b5SJeffrey Hugo .num_parents = 1, 1322d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1323d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1324d14b15b5SJeffrey Hugo }, 1325d14b15b5SJeffrey Hugo }, 1326d14b15b5SJeffrey Hugo }; 1327d14b15b5SJeffrey Hugo 1328d14b15b5SJeffrey Hugo static struct clk_branch mdss_hdmi_dp_ahb_clk = { 1329d14b15b5SJeffrey Hugo .halt_reg = 0x230c, 1330d14b15b5SJeffrey Hugo .clkr = { 1331d14b15b5SJeffrey Hugo .enable_reg = 0x230c, 1332d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1333d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1334d14b15b5SJeffrey Hugo .name = "mdss_hdmi_dp_ahb_clk", 1335d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1336d14b15b5SJeffrey Hugo .num_parents = 1, 1337d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1338d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1339d14b15b5SJeffrey Hugo }, 1340d14b15b5SJeffrey Hugo }, 1341d14b15b5SJeffrey Hugo }; 1342d14b15b5SJeffrey Hugo 1343d14b15b5SJeffrey Hugo static struct clk_branch mdss_axi_clk = { 1344d14b15b5SJeffrey Hugo .halt_reg = 0x2310, 1345d14b15b5SJeffrey Hugo .clkr = { 1346d14b15b5SJeffrey Hugo .enable_reg = 0x2310, 1347d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1348d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1349d14b15b5SJeffrey Hugo .name = "mdss_axi_clk", 1350d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw }, 1351d14b15b5SJeffrey Hugo .num_parents = 1, 1352d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1353d14b15b5SJeffrey Hugo }, 1354d14b15b5SJeffrey Hugo }, 1355d14b15b5SJeffrey Hugo }; 1356d14b15b5SJeffrey Hugo 1357d14b15b5SJeffrey Hugo static struct clk_branch mdss_pclk0_clk = { 1358d14b15b5SJeffrey Hugo .halt_reg = 0x2314, 1359d14b15b5SJeffrey Hugo .clkr = { 1360d14b15b5SJeffrey Hugo .enable_reg = 0x2314, 1361d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1362d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1363d14b15b5SJeffrey Hugo .name = "mdss_pclk0_clk", 1364d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &pclk0_clk_src.clkr.hw }, 1365d14b15b5SJeffrey Hugo .num_parents = 1, 1366d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1367d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1368d14b15b5SJeffrey Hugo }, 1369d14b15b5SJeffrey Hugo }, 1370d14b15b5SJeffrey Hugo }; 1371d14b15b5SJeffrey Hugo 1372d14b15b5SJeffrey Hugo static struct clk_branch mdss_pclk1_clk = { 1373d14b15b5SJeffrey Hugo .halt_reg = 0x2318, 1374d14b15b5SJeffrey Hugo .clkr = { 1375d14b15b5SJeffrey Hugo .enable_reg = 0x2318, 1376d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1377d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1378d14b15b5SJeffrey Hugo .name = "mdss_pclk1_clk", 1379d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &pclk1_clk_src.clkr.hw }, 1380d14b15b5SJeffrey Hugo .num_parents = 1, 1381d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1382d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1383d14b15b5SJeffrey Hugo }, 1384d14b15b5SJeffrey Hugo }, 1385d14b15b5SJeffrey Hugo }; 1386d14b15b5SJeffrey Hugo 1387d14b15b5SJeffrey Hugo static struct clk_branch mdss_mdp_clk = { 1388d14b15b5SJeffrey Hugo .halt_reg = 0x231c, 1389d14b15b5SJeffrey Hugo .clkr = { 1390d14b15b5SJeffrey Hugo .enable_reg = 0x231c, 1391d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1392d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1393d14b15b5SJeffrey Hugo .name = "mdss_mdp_clk", 1394d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mdp_clk_src.clkr.hw }, 1395d14b15b5SJeffrey Hugo .num_parents = 1, 1396d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1397d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1398d14b15b5SJeffrey Hugo }, 1399d14b15b5SJeffrey Hugo }, 1400d14b15b5SJeffrey Hugo }; 1401d14b15b5SJeffrey Hugo 1402d14b15b5SJeffrey Hugo static struct clk_branch mdss_mdp_lut_clk = { 1403d14b15b5SJeffrey Hugo .halt_reg = 0x2320, 1404d14b15b5SJeffrey Hugo .clkr = { 1405d14b15b5SJeffrey Hugo .enable_reg = 0x2320, 1406d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1407d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1408d14b15b5SJeffrey Hugo .name = "mdss_mdp_lut_clk", 1409d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mdp_clk_src.clkr.hw }, 1410d14b15b5SJeffrey Hugo .num_parents = 1, 1411d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1412d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1413d14b15b5SJeffrey Hugo }, 1414d14b15b5SJeffrey Hugo }, 1415d14b15b5SJeffrey Hugo }; 1416d14b15b5SJeffrey Hugo 1417d14b15b5SJeffrey Hugo static struct clk_branch mdss_extpclk_clk = { 1418d14b15b5SJeffrey Hugo .halt_reg = 0x2324, 1419d14b15b5SJeffrey Hugo .clkr = { 1420d14b15b5SJeffrey Hugo .enable_reg = 0x2324, 1421d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1422d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1423d14b15b5SJeffrey Hugo .name = "mdss_extpclk_clk", 1424d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &extpclk_clk_src.clkr.hw }, 1425d14b15b5SJeffrey Hugo .num_parents = 1, 1426d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1427d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1428d14b15b5SJeffrey Hugo }, 1429d14b15b5SJeffrey Hugo }, 1430d14b15b5SJeffrey Hugo }; 1431d14b15b5SJeffrey Hugo 1432d14b15b5SJeffrey Hugo static struct clk_branch mdss_vsync_clk = { 1433d14b15b5SJeffrey Hugo .halt_reg = 0x2328, 1434d14b15b5SJeffrey Hugo .clkr = { 1435d14b15b5SJeffrey Hugo .enable_reg = 0x2328, 1436d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1437d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1438d14b15b5SJeffrey Hugo .name = "mdss_vsync_clk", 1439d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &vsync_clk_src.clkr.hw }, 1440d14b15b5SJeffrey Hugo .num_parents = 1, 1441d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1442d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1443d14b15b5SJeffrey Hugo }, 1444d14b15b5SJeffrey Hugo }, 1445d14b15b5SJeffrey Hugo }; 1446d14b15b5SJeffrey Hugo 1447d14b15b5SJeffrey Hugo static struct clk_branch mdss_hdmi_clk = { 1448d14b15b5SJeffrey Hugo .halt_reg = 0x2338, 1449d14b15b5SJeffrey Hugo .clkr = { 1450d14b15b5SJeffrey Hugo .enable_reg = 0x2338, 1451d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1452d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1453d14b15b5SJeffrey Hugo .name = "mdss_hdmi_clk", 1454d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &hdmi_clk_src.clkr.hw }, 1455d14b15b5SJeffrey Hugo .num_parents = 1, 1456d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1457d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1458d14b15b5SJeffrey Hugo }, 1459d14b15b5SJeffrey Hugo }, 1460d14b15b5SJeffrey Hugo }; 1461d14b15b5SJeffrey Hugo 1462d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte0_clk = { 1463d14b15b5SJeffrey Hugo .halt_reg = 0x233c, 1464d14b15b5SJeffrey Hugo .clkr = { 1465d14b15b5SJeffrey Hugo .enable_reg = 0x233c, 1466d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1467d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1468d14b15b5SJeffrey Hugo .name = "mdss_byte0_clk", 1469d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &byte0_clk_src.clkr.hw }, 1470d14b15b5SJeffrey Hugo .num_parents = 1, 1471d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1472d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1473d14b15b5SJeffrey Hugo }, 1474d14b15b5SJeffrey Hugo }, 1475d14b15b5SJeffrey Hugo }; 1476d14b15b5SJeffrey Hugo 1477d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte1_clk = { 1478d14b15b5SJeffrey Hugo .halt_reg = 0x2340, 1479d14b15b5SJeffrey Hugo .clkr = { 1480d14b15b5SJeffrey Hugo .enable_reg = 0x2340, 1481d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1482d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1483d14b15b5SJeffrey Hugo .name = "mdss_byte1_clk", 1484d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &byte1_clk_src.clkr.hw }, 1485d14b15b5SJeffrey Hugo .num_parents = 1, 1486d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1487d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1488d14b15b5SJeffrey Hugo }, 1489d14b15b5SJeffrey Hugo }, 1490d14b15b5SJeffrey Hugo }; 1491d14b15b5SJeffrey Hugo 1492d14b15b5SJeffrey Hugo static struct clk_branch mdss_esc0_clk = { 1493d14b15b5SJeffrey Hugo .halt_reg = 0x2344, 1494d14b15b5SJeffrey Hugo .clkr = { 1495d14b15b5SJeffrey Hugo .enable_reg = 0x2344, 1496d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1497d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1498d14b15b5SJeffrey Hugo .name = "mdss_esc0_clk", 1499d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &esc0_clk_src.clkr.hw }, 1500d14b15b5SJeffrey Hugo .num_parents = 1, 1501d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1502d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1503d14b15b5SJeffrey Hugo }, 1504d14b15b5SJeffrey Hugo }, 1505d14b15b5SJeffrey Hugo }; 1506d14b15b5SJeffrey Hugo 1507d14b15b5SJeffrey Hugo static struct clk_branch mdss_esc1_clk = { 1508d14b15b5SJeffrey Hugo .halt_reg = 0x2348, 1509d14b15b5SJeffrey Hugo .clkr = { 1510d14b15b5SJeffrey Hugo .enable_reg = 0x2348, 1511d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1512d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1513d14b15b5SJeffrey Hugo .name = "mdss_esc1_clk", 1514d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &esc1_clk_src.clkr.hw }, 1515d14b15b5SJeffrey Hugo .num_parents = 1, 1516d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1517d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1518d14b15b5SJeffrey Hugo }, 1519d14b15b5SJeffrey Hugo }, 1520d14b15b5SJeffrey Hugo }; 1521d14b15b5SJeffrey Hugo 1522d14b15b5SJeffrey Hugo static struct clk_branch mdss_rot_clk = { 1523d14b15b5SJeffrey Hugo .halt_reg = 0x2350, 1524d14b15b5SJeffrey Hugo .clkr = { 1525d14b15b5SJeffrey Hugo .enable_reg = 0x2350, 1526d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1527d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1528d14b15b5SJeffrey Hugo .name = "mdss_rot_clk", 1529d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &rot_clk_src.clkr.hw }, 1530d14b15b5SJeffrey Hugo .num_parents = 1, 1531d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1532d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1533d14b15b5SJeffrey Hugo }, 1534d14b15b5SJeffrey Hugo }, 1535d14b15b5SJeffrey Hugo }; 1536d14b15b5SJeffrey Hugo 1537d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_link_clk = { 1538d14b15b5SJeffrey Hugo .halt_reg = 0x2354, 1539d14b15b5SJeffrey Hugo .clkr = { 1540d14b15b5SJeffrey Hugo .enable_reg = 0x2354, 1541d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1542d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1543d14b15b5SJeffrey Hugo .name = "mdss_dp_link_clk", 1544d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &dp_link_clk_src.clkr.hw }, 1545d14b15b5SJeffrey Hugo .num_parents = 1, 1546d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1547d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1548d14b15b5SJeffrey Hugo }, 1549d14b15b5SJeffrey Hugo }, 1550d14b15b5SJeffrey Hugo }; 1551d14b15b5SJeffrey Hugo 1552d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_link_intf_clk = { 1553d14b15b5SJeffrey Hugo .halt_reg = 0x2358, 1554d14b15b5SJeffrey Hugo .clkr = { 1555d14b15b5SJeffrey Hugo .enable_reg = 0x2358, 1556d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1557d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1558d14b15b5SJeffrey Hugo .name = "mdss_dp_link_intf_clk", 1559d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &dp_link_clk_src.clkr.hw }, 1560d14b15b5SJeffrey Hugo .num_parents = 1, 1561d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1562d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1563d14b15b5SJeffrey Hugo }, 1564d14b15b5SJeffrey Hugo }, 1565d14b15b5SJeffrey Hugo }; 1566d14b15b5SJeffrey Hugo 1567d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_crypto_clk = { 1568d14b15b5SJeffrey Hugo .halt_reg = 0x235c, 1569d14b15b5SJeffrey Hugo .clkr = { 1570d14b15b5SJeffrey Hugo .enable_reg = 0x235c, 1571d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1572d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1573d14b15b5SJeffrey Hugo .name = "mdss_dp_crypto_clk", 1574d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &dp_crypto_clk_src.clkr.hw }, 1575d14b15b5SJeffrey Hugo .num_parents = 1, 1576d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1577d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1578d14b15b5SJeffrey Hugo }, 1579d14b15b5SJeffrey Hugo }, 1580d14b15b5SJeffrey Hugo }; 1581d14b15b5SJeffrey Hugo 1582d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_pixel_clk = { 1583d14b15b5SJeffrey Hugo .halt_reg = 0x2360, 1584d14b15b5SJeffrey Hugo .clkr = { 1585d14b15b5SJeffrey Hugo .enable_reg = 0x2360, 1586d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1587d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1588d14b15b5SJeffrey Hugo .name = "mdss_dp_pixel_clk", 1589d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &dp_pixel_clk_src.clkr.hw }, 1590d14b15b5SJeffrey Hugo .num_parents = 1, 1591d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1592d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1593d14b15b5SJeffrey Hugo }, 1594d14b15b5SJeffrey Hugo }, 1595d14b15b5SJeffrey Hugo }; 1596d14b15b5SJeffrey Hugo 1597d14b15b5SJeffrey Hugo static struct clk_branch mdss_dp_aux_clk = { 1598d14b15b5SJeffrey Hugo .halt_reg = 0x2364, 1599d14b15b5SJeffrey Hugo .clkr = { 1600d14b15b5SJeffrey Hugo .enable_reg = 0x2364, 1601d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1602d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1603d14b15b5SJeffrey Hugo .name = "mdss_dp_aux_clk", 1604d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &dp_aux_clk_src.clkr.hw }, 1605d14b15b5SJeffrey Hugo .num_parents = 1, 1606d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1607d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1608d14b15b5SJeffrey Hugo }, 1609d14b15b5SJeffrey Hugo }, 1610d14b15b5SJeffrey Hugo }; 1611d14b15b5SJeffrey Hugo 1612d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte0_intf_clk = { 1613d14b15b5SJeffrey Hugo .halt_reg = 0x2374, 1614d14b15b5SJeffrey Hugo .clkr = { 1615d14b15b5SJeffrey Hugo .enable_reg = 0x2374, 1616d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1617d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1618d14b15b5SJeffrey Hugo .name = "mdss_byte0_intf_clk", 1619d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &byte0_clk_src.clkr.hw }, 1620d14b15b5SJeffrey Hugo .num_parents = 1, 1621d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1622d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1623d14b15b5SJeffrey Hugo }, 1624d14b15b5SJeffrey Hugo }, 1625d14b15b5SJeffrey Hugo }; 1626d14b15b5SJeffrey Hugo 1627d14b15b5SJeffrey Hugo static struct clk_branch mdss_byte1_intf_clk = { 1628d14b15b5SJeffrey Hugo .halt_reg = 0x2378, 1629d14b15b5SJeffrey Hugo .clkr = { 1630d14b15b5SJeffrey Hugo .enable_reg = 0x2378, 1631d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1632d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1633d14b15b5SJeffrey Hugo .name = "mdss_byte1_intf_clk", 1634d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &byte1_clk_src.clkr.hw }, 1635d14b15b5SJeffrey Hugo .num_parents = 1, 1636d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1637d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1638d14b15b5SJeffrey Hugo }, 1639d14b15b5SJeffrey Hugo }, 1640d14b15b5SJeffrey Hugo }; 1641d14b15b5SJeffrey Hugo 1642d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0phytimer_clk = { 1643d14b15b5SJeffrey Hugo .halt_reg = 0x3024, 1644d14b15b5SJeffrey Hugo .clkr = { 1645d14b15b5SJeffrey Hugo .enable_reg = 0x3024, 1646d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1647d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1648d14b15b5SJeffrey Hugo .name = "camss_csi0phytimer_clk", 1649d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi0phytimer_clk_src.clkr.hw }, 1650d14b15b5SJeffrey Hugo .num_parents = 1, 1651d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1652d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1653d14b15b5SJeffrey Hugo }, 1654d14b15b5SJeffrey Hugo }, 1655d14b15b5SJeffrey Hugo }; 1656d14b15b5SJeffrey Hugo 1657d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1phytimer_clk = { 1658d14b15b5SJeffrey Hugo .halt_reg = 0x3054, 1659d14b15b5SJeffrey Hugo .clkr = { 1660d14b15b5SJeffrey Hugo .enable_reg = 0x3054, 1661d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1662d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1663d14b15b5SJeffrey Hugo .name = "camss_csi1phytimer_clk", 1664d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi1phytimer_clk_src.clkr.hw }, 1665d14b15b5SJeffrey Hugo .num_parents = 1, 1666d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1667d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1668d14b15b5SJeffrey Hugo }, 1669d14b15b5SJeffrey Hugo }, 1670d14b15b5SJeffrey Hugo }; 1671d14b15b5SJeffrey Hugo 1672d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2phytimer_clk = { 1673d14b15b5SJeffrey Hugo .halt_reg = 0x3084, 1674d14b15b5SJeffrey Hugo .clkr = { 1675d14b15b5SJeffrey Hugo .enable_reg = 0x3084, 1676d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1677d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1678d14b15b5SJeffrey Hugo .name = "camss_csi2phytimer_clk", 1679d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi2phytimer_clk_src.clkr.hw }, 1680d14b15b5SJeffrey Hugo .num_parents = 1, 1681d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1682d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1683d14b15b5SJeffrey Hugo }, 1684d14b15b5SJeffrey Hugo }, 1685d14b15b5SJeffrey Hugo }; 1686d14b15b5SJeffrey Hugo 1687d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0_clk = { 1688d14b15b5SJeffrey Hugo .halt_reg = 0x30b4, 1689d14b15b5SJeffrey Hugo .clkr = { 1690d14b15b5SJeffrey Hugo .enable_reg = 0x30b4, 1691d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1692d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1693d14b15b5SJeffrey Hugo .name = "camss_csi0_clk", 1694d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi0_clk_src.clkr.hw }, 1695d14b15b5SJeffrey Hugo .num_parents = 1, 1696d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1697d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1698d14b15b5SJeffrey Hugo }, 1699d14b15b5SJeffrey Hugo }, 1700d14b15b5SJeffrey Hugo }; 1701d14b15b5SJeffrey Hugo 1702d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0_ahb_clk = { 1703d14b15b5SJeffrey Hugo .halt_reg = 0x30bc, 1704d14b15b5SJeffrey Hugo .clkr = { 1705d14b15b5SJeffrey Hugo .enable_reg = 0x30bc, 1706d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1707d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1708d14b15b5SJeffrey Hugo .name = "camss_csi0_ahb_clk", 1709d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1710d14b15b5SJeffrey Hugo .num_parents = 1, 1711d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1712d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1713d14b15b5SJeffrey Hugo }, 1714d14b15b5SJeffrey Hugo }, 1715d14b15b5SJeffrey Hugo }; 1716d14b15b5SJeffrey Hugo 1717d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0rdi_clk = { 1718d14b15b5SJeffrey Hugo .halt_reg = 0x30d4, 1719d14b15b5SJeffrey Hugo .clkr = { 1720d14b15b5SJeffrey Hugo .enable_reg = 0x30d4, 1721d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1722d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1723d14b15b5SJeffrey Hugo .name = "camss_csi0rdi_clk", 1724d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi0_clk_src.clkr.hw }, 1725d14b15b5SJeffrey Hugo .num_parents = 1, 1726d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1727d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1728d14b15b5SJeffrey Hugo }, 1729d14b15b5SJeffrey Hugo }, 1730d14b15b5SJeffrey Hugo }; 1731d14b15b5SJeffrey Hugo 1732d14b15b5SJeffrey Hugo static struct clk_branch camss_csi0pix_clk = { 1733d14b15b5SJeffrey Hugo .halt_reg = 0x30e4, 1734d14b15b5SJeffrey Hugo .clkr = { 1735d14b15b5SJeffrey Hugo .enable_reg = 0x30e4, 1736d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1737d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1738d14b15b5SJeffrey Hugo .name = "camss_csi0pix_clk", 1739d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi0_clk_src.clkr.hw }, 1740d14b15b5SJeffrey Hugo .num_parents = 1, 1741d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1742d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1743d14b15b5SJeffrey Hugo }, 1744d14b15b5SJeffrey Hugo }, 1745d14b15b5SJeffrey Hugo }; 1746d14b15b5SJeffrey Hugo 1747d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1_clk = { 1748d14b15b5SJeffrey Hugo .halt_reg = 0x3124, 1749d14b15b5SJeffrey Hugo .clkr = { 1750d14b15b5SJeffrey Hugo .enable_reg = 0x3124, 1751d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1752d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1753d14b15b5SJeffrey Hugo .name = "camss_csi1_clk", 1754d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi1_clk_src.clkr.hw }, 1755d14b15b5SJeffrey Hugo .num_parents = 1, 1756d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1757d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1758d14b15b5SJeffrey Hugo }, 1759d14b15b5SJeffrey Hugo }, 1760d14b15b5SJeffrey Hugo }; 1761d14b15b5SJeffrey Hugo 1762d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1_ahb_clk = { 1763d14b15b5SJeffrey Hugo .halt_reg = 0x3128, 1764d14b15b5SJeffrey Hugo .clkr = { 1765d14b15b5SJeffrey Hugo .enable_reg = 0x3128, 1766d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1767d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1768d14b15b5SJeffrey Hugo .name = "camss_csi1_ahb_clk", 1769d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1770d14b15b5SJeffrey Hugo .num_parents = 1, 1771d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1772d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1773d14b15b5SJeffrey Hugo }, 1774d14b15b5SJeffrey Hugo }, 1775d14b15b5SJeffrey Hugo }; 1776d14b15b5SJeffrey Hugo 1777d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1rdi_clk = { 1778d14b15b5SJeffrey Hugo .halt_reg = 0x3144, 1779d14b15b5SJeffrey Hugo .clkr = { 1780d14b15b5SJeffrey Hugo .enable_reg = 0x3144, 1781d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1782d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1783d14b15b5SJeffrey Hugo .name = "camss_csi1rdi_clk", 1784d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi1_clk_src.clkr.hw }, 1785d14b15b5SJeffrey Hugo .num_parents = 1, 1786d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1787d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1788d14b15b5SJeffrey Hugo }, 1789d14b15b5SJeffrey Hugo }, 1790d14b15b5SJeffrey Hugo }; 1791d14b15b5SJeffrey Hugo 1792d14b15b5SJeffrey Hugo static struct clk_branch camss_csi1pix_clk = { 1793d14b15b5SJeffrey Hugo .halt_reg = 0x3154, 1794d14b15b5SJeffrey Hugo .clkr = { 1795d14b15b5SJeffrey Hugo .enable_reg = 0x3154, 1796d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1797d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1798d14b15b5SJeffrey Hugo .name = "camss_csi1pix_clk", 1799d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi1_clk_src.clkr.hw }, 1800d14b15b5SJeffrey Hugo .num_parents = 1, 1801d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1802d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1803d14b15b5SJeffrey Hugo }, 1804d14b15b5SJeffrey Hugo }, 1805d14b15b5SJeffrey Hugo }; 1806d14b15b5SJeffrey Hugo 1807d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2_clk = { 1808d14b15b5SJeffrey Hugo .halt_reg = 0x3184, 1809d14b15b5SJeffrey Hugo .clkr = { 1810d14b15b5SJeffrey Hugo .enable_reg = 0x3184, 1811d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1812d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1813d14b15b5SJeffrey Hugo .name = "camss_csi2_clk", 1814d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi2_clk_src.clkr.hw }, 1815d14b15b5SJeffrey Hugo .num_parents = 1, 1816d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1817d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1818d14b15b5SJeffrey Hugo }, 1819d14b15b5SJeffrey Hugo }, 1820d14b15b5SJeffrey Hugo }; 1821d14b15b5SJeffrey Hugo 1822d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2_ahb_clk = { 1823d14b15b5SJeffrey Hugo .halt_reg = 0x3188, 1824d14b15b5SJeffrey Hugo .clkr = { 1825d14b15b5SJeffrey Hugo .enable_reg = 0x3188, 1826d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1827d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1828d14b15b5SJeffrey Hugo .name = "camss_csi2_ahb_clk", 1829d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1830d14b15b5SJeffrey Hugo .num_parents = 1, 1831d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1832d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1833d14b15b5SJeffrey Hugo }, 1834d14b15b5SJeffrey Hugo }, 1835d14b15b5SJeffrey Hugo }; 1836d14b15b5SJeffrey Hugo 1837d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2rdi_clk = { 1838d14b15b5SJeffrey Hugo .halt_reg = 0x31a4, 1839d14b15b5SJeffrey Hugo .clkr = { 1840d14b15b5SJeffrey Hugo .enable_reg = 0x31a4, 1841d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1842d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1843d14b15b5SJeffrey Hugo .name = "camss_csi2rdi_clk", 1844d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi2_clk_src.clkr.hw }, 1845d14b15b5SJeffrey Hugo .num_parents = 1, 1846d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1847d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1848d14b15b5SJeffrey Hugo }, 1849d14b15b5SJeffrey Hugo }, 1850d14b15b5SJeffrey Hugo }; 1851d14b15b5SJeffrey Hugo 1852d14b15b5SJeffrey Hugo static struct clk_branch camss_csi2pix_clk = { 1853d14b15b5SJeffrey Hugo .halt_reg = 0x31b4, 1854d14b15b5SJeffrey Hugo .clkr = { 1855d14b15b5SJeffrey Hugo .enable_reg = 0x31b4, 1856d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1857d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1858d14b15b5SJeffrey Hugo .name = "camss_csi2pix_clk", 1859d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi2_clk_src.clkr.hw }, 1860d14b15b5SJeffrey Hugo .num_parents = 1, 1861d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1862d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1863d14b15b5SJeffrey Hugo }, 1864d14b15b5SJeffrey Hugo }, 1865d14b15b5SJeffrey Hugo }; 1866d14b15b5SJeffrey Hugo 1867d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3_clk = { 1868d14b15b5SJeffrey Hugo .halt_reg = 0x31e4, 1869d14b15b5SJeffrey Hugo .clkr = { 1870d14b15b5SJeffrey Hugo .enable_reg = 0x31e4, 1871d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1872d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1873d14b15b5SJeffrey Hugo .name = "camss_csi3_clk", 1874d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi3_clk_src.clkr.hw }, 1875d14b15b5SJeffrey Hugo .num_parents = 1, 1876d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1877d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1878d14b15b5SJeffrey Hugo }, 1879d14b15b5SJeffrey Hugo }, 1880d14b15b5SJeffrey Hugo }; 1881d14b15b5SJeffrey Hugo 1882d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3_ahb_clk = { 1883d14b15b5SJeffrey Hugo .halt_reg = 0x31e8, 1884d14b15b5SJeffrey Hugo .clkr = { 1885d14b15b5SJeffrey Hugo .enable_reg = 0x31e8, 1886d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1887d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1888d14b15b5SJeffrey Hugo .name = "camss_csi3_ahb_clk", 1889d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1890d14b15b5SJeffrey Hugo .num_parents = 1, 1891d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1892d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1893d14b15b5SJeffrey Hugo }, 1894d14b15b5SJeffrey Hugo }, 1895d14b15b5SJeffrey Hugo }; 1896d14b15b5SJeffrey Hugo 1897d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3rdi_clk = { 1898d14b15b5SJeffrey Hugo .halt_reg = 0x3204, 1899d14b15b5SJeffrey Hugo .clkr = { 1900d14b15b5SJeffrey Hugo .enable_reg = 0x3204, 1901d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1902d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1903d14b15b5SJeffrey Hugo .name = "camss_csi3rdi_clk", 1904d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi3_clk_src.clkr.hw }, 1905d14b15b5SJeffrey Hugo .num_parents = 1, 1906d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1907d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1908d14b15b5SJeffrey Hugo }, 1909d14b15b5SJeffrey Hugo }, 1910d14b15b5SJeffrey Hugo }; 1911d14b15b5SJeffrey Hugo 1912d14b15b5SJeffrey Hugo static struct clk_branch camss_csi3pix_clk = { 1913d14b15b5SJeffrey Hugo .halt_reg = 0x3214, 1914d14b15b5SJeffrey Hugo .clkr = { 1915d14b15b5SJeffrey Hugo .enable_reg = 0x3214, 1916d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1917d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1918d14b15b5SJeffrey Hugo .name = "camss_csi3pix_clk", 1919d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csi3_clk_src.clkr.hw }, 1920d14b15b5SJeffrey Hugo .num_parents = 1, 1921d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1922d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1923d14b15b5SJeffrey Hugo }, 1924d14b15b5SJeffrey Hugo }, 1925d14b15b5SJeffrey Hugo }; 1926d14b15b5SJeffrey Hugo 1927d14b15b5SJeffrey Hugo static struct clk_branch camss_ispif_ahb_clk = { 1928d14b15b5SJeffrey Hugo .halt_reg = 0x3224, 1929d14b15b5SJeffrey Hugo .clkr = { 1930d14b15b5SJeffrey Hugo .enable_reg = 0x3224, 1931d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1932d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1933d14b15b5SJeffrey Hugo .name = "camss_ispif_ahb_clk", 1934d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1935d14b15b5SJeffrey Hugo .num_parents = 1, 1936d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1937d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1938d14b15b5SJeffrey Hugo }, 1939d14b15b5SJeffrey Hugo }, 1940d14b15b5SJeffrey Hugo }; 1941d14b15b5SJeffrey Hugo 1942d14b15b5SJeffrey Hugo static struct clk_branch camss_cci_clk = { 1943d14b15b5SJeffrey Hugo .halt_reg = 0x3344, 1944d14b15b5SJeffrey Hugo .clkr = { 1945d14b15b5SJeffrey Hugo .enable_reg = 0x3344, 1946d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1947d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1948d14b15b5SJeffrey Hugo .name = "camss_cci_clk", 1949d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &cci_clk_src.clkr.hw }, 1950d14b15b5SJeffrey Hugo .num_parents = 1, 1951d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1952d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1953d14b15b5SJeffrey Hugo }, 1954d14b15b5SJeffrey Hugo }, 1955d14b15b5SJeffrey Hugo }; 1956d14b15b5SJeffrey Hugo 1957d14b15b5SJeffrey Hugo static struct clk_branch camss_cci_ahb_clk = { 1958d14b15b5SJeffrey Hugo .halt_reg = 0x3348, 1959d14b15b5SJeffrey Hugo .clkr = { 1960d14b15b5SJeffrey Hugo .enable_reg = 0x3348, 1961d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1962d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1963d14b15b5SJeffrey Hugo .name = "camss_cci_ahb_clk", 1964d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 1965d14b15b5SJeffrey Hugo .num_parents = 1, 1966d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1967d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1968d14b15b5SJeffrey Hugo }, 1969d14b15b5SJeffrey Hugo }, 1970d14b15b5SJeffrey Hugo }; 1971d14b15b5SJeffrey Hugo 1972d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk0_clk = { 1973d14b15b5SJeffrey Hugo .halt_reg = 0x3384, 1974d14b15b5SJeffrey Hugo .clkr = { 1975d14b15b5SJeffrey Hugo .enable_reg = 0x3384, 1976d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1977d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1978d14b15b5SJeffrey Hugo .name = "camss_mclk0_clk", 1979d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mclk0_clk_src.clkr.hw }, 1980d14b15b5SJeffrey Hugo .num_parents = 1, 1981d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1982d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1983d14b15b5SJeffrey Hugo }, 1984d14b15b5SJeffrey Hugo }, 1985d14b15b5SJeffrey Hugo }; 1986d14b15b5SJeffrey Hugo 1987d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk1_clk = { 1988d14b15b5SJeffrey Hugo .halt_reg = 0x33b4, 1989d14b15b5SJeffrey Hugo .clkr = { 1990d14b15b5SJeffrey Hugo .enable_reg = 0x33b4, 1991d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 1992d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 1993d14b15b5SJeffrey Hugo .name = "camss_mclk1_clk", 1994d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mclk1_clk_src.clkr.hw }, 1995d14b15b5SJeffrey Hugo .num_parents = 1, 1996d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 1997d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 1998d14b15b5SJeffrey Hugo }, 1999d14b15b5SJeffrey Hugo }, 2000d14b15b5SJeffrey Hugo }; 2001d14b15b5SJeffrey Hugo 2002d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk2_clk = { 2003d14b15b5SJeffrey Hugo .halt_reg = 0x33e4, 2004d14b15b5SJeffrey Hugo .clkr = { 2005d14b15b5SJeffrey Hugo .enable_reg = 0x33e4, 2006d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2007d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2008d14b15b5SJeffrey Hugo .name = "camss_mclk2_clk", 2009d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mclk2_clk_src.clkr.hw }, 2010d14b15b5SJeffrey Hugo .num_parents = 1, 2011d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2012d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2013d14b15b5SJeffrey Hugo }, 2014d14b15b5SJeffrey Hugo }, 2015d14b15b5SJeffrey Hugo }; 2016d14b15b5SJeffrey Hugo 2017d14b15b5SJeffrey Hugo static struct clk_branch camss_mclk3_clk = { 2018d14b15b5SJeffrey Hugo .halt_reg = 0x3414, 2019d14b15b5SJeffrey Hugo .clkr = { 2020d14b15b5SJeffrey Hugo .enable_reg = 0x3414, 2021d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2022d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2023d14b15b5SJeffrey Hugo .name = "camss_mclk3_clk", 2024d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &mclk3_clk_src.clkr.hw }, 2025d14b15b5SJeffrey Hugo .num_parents = 1, 2026d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2027d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2028d14b15b5SJeffrey Hugo }, 2029d14b15b5SJeffrey Hugo }, 2030d14b15b5SJeffrey Hugo }; 2031d14b15b5SJeffrey Hugo 2032d14b15b5SJeffrey Hugo static struct clk_branch camss_top_ahb_clk = { 2033d14b15b5SJeffrey Hugo .halt_reg = 0x3484, 2034d14b15b5SJeffrey Hugo .clkr = { 2035d14b15b5SJeffrey Hugo .enable_reg = 0x3484, 2036d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2037d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2038d14b15b5SJeffrey Hugo .name = "camss_top_ahb_clk", 2039d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2040d14b15b5SJeffrey Hugo .num_parents = 1, 2041d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2042d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2043d14b15b5SJeffrey Hugo }, 2044d14b15b5SJeffrey Hugo }, 2045d14b15b5SJeffrey Hugo }; 2046d14b15b5SJeffrey Hugo 2047d14b15b5SJeffrey Hugo static struct clk_branch camss_ahb_clk = { 2048d14b15b5SJeffrey Hugo .halt_reg = 0x348c, 2049d14b15b5SJeffrey Hugo .clkr = { 2050d14b15b5SJeffrey Hugo .enable_reg = 0x348c, 2051d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2052d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2053d14b15b5SJeffrey Hugo .name = "camss_ahb_clk", 2054d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2055d14b15b5SJeffrey Hugo .num_parents = 1, 2056d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2057d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2058d14b15b5SJeffrey Hugo }, 2059d14b15b5SJeffrey Hugo }, 2060d14b15b5SJeffrey Hugo }; 2061d14b15b5SJeffrey Hugo 2062d14b15b5SJeffrey Hugo static struct clk_branch camss_micro_ahb_clk = { 2063d14b15b5SJeffrey Hugo .halt_reg = 0x3494, 2064d14b15b5SJeffrey Hugo .clkr = { 2065d14b15b5SJeffrey Hugo .enable_reg = 0x3494, 2066d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2067d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2068d14b15b5SJeffrey Hugo .name = "camss_micro_ahb_clk", 2069d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2070d14b15b5SJeffrey Hugo .num_parents = 1, 2071d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2072d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2073d14b15b5SJeffrey Hugo }, 2074d14b15b5SJeffrey Hugo }, 2075d14b15b5SJeffrey Hugo }; 2076d14b15b5SJeffrey Hugo 2077d14b15b5SJeffrey Hugo static struct clk_branch camss_jpeg0_clk = { 2078d14b15b5SJeffrey Hugo .halt_reg = 0x35a8, 2079d14b15b5SJeffrey Hugo .clkr = { 2080d14b15b5SJeffrey Hugo .enable_reg = 0x35a8, 2081d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2082d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2083d14b15b5SJeffrey Hugo .name = "camss_jpeg0_clk", 2084d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &jpeg0_clk_src.clkr.hw }, 2085d14b15b5SJeffrey Hugo .num_parents = 1, 2086d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2087d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2088d14b15b5SJeffrey Hugo }, 2089d14b15b5SJeffrey Hugo }, 2090d14b15b5SJeffrey Hugo }; 2091d14b15b5SJeffrey Hugo 2092d14b15b5SJeffrey Hugo static struct clk_branch camss_jpeg_ahb_clk = { 2093d14b15b5SJeffrey Hugo .halt_reg = 0x35b4, 2094d14b15b5SJeffrey Hugo .clkr = { 2095d14b15b5SJeffrey Hugo .enable_reg = 0x35b4, 2096d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2097d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2098d14b15b5SJeffrey Hugo .name = "camss_jpeg_ahb_clk", 2099d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2100d14b15b5SJeffrey Hugo .num_parents = 1, 2101d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2102d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2103d14b15b5SJeffrey Hugo }, 2104d14b15b5SJeffrey Hugo }, 2105d14b15b5SJeffrey Hugo }; 2106d14b15b5SJeffrey Hugo 2107d14b15b5SJeffrey Hugo static struct clk_branch camss_jpeg_axi_clk = { 2108d14b15b5SJeffrey Hugo .halt_reg = 0x35b8, 2109d14b15b5SJeffrey Hugo .clkr = { 2110d14b15b5SJeffrey Hugo .enable_reg = 0x35b8, 2111d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2112d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2113d14b15b5SJeffrey Hugo .name = "camss_jpeg_axi_clk", 2114d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw }, 2115d14b15b5SJeffrey Hugo .num_parents = 1, 2116d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2117d14b15b5SJeffrey Hugo }, 2118d14b15b5SJeffrey Hugo }, 2119d14b15b5SJeffrey Hugo }; 2120d14b15b5SJeffrey Hugo 2121d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe0_ahb_clk = { 2122d14b15b5SJeffrey Hugo .halt_reg = 0x3668, 2123d14b15b5SJeffrey Hugo .clkr = { 2124d14b15b5SJeffrey Hugo .enable_reg = 0x3668, 2125d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2126d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2127d14b15b5SJeffrey Hugo .name = "camss_vfe0_ahb_clk", 2128d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2129d14b15b5SJeffrey Hugo .num_parents = 1, 2130d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2131d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2132d14b15b5SJeffrey Hugo }, 2133d14b15b5SJeffrey Hugo }, 2134d14b15b5SJeffrey Hugo }; 2135d14b15b5SJeffrey Hugo 2136d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe1_ahb_clk = { 2137d14b15b5SJeffrey Hugo .halt_reg = 0x3678, 2138d14b15b5SJeffrey Hugo .clkr = { 2139d14b15b5SJeffrey Hugo .enable_reg = 0x3678, 2140d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2141d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2142d14b15b5SJeffrey Hugo .name = "camss_vfe1_ahb_clk", 2143d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2144d14b15b5SJeffrey Hugo .num_parents = 1, 2145d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2146d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2147d14b15b5SJeffrey Hugo }, 2148d14b15b5SJeffrey Hugo }, 2149d14b15b5SJeffrey Hugo }; 2150d14b15b5SJeffrey Hugo 2151d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe0_clk = { 2152d14b15b5SJeffrey Hugo .halt_reg = 0x36a8, 2153d14b15b5SJeffrey Hugo .clkr = { 2154d14b15b5SJeffrey Hugo .enable_reg = 0x36a8, 2155d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2156d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2157d14b15b5SJeffrey Hugo .name = "camss_vfe0_clk", 2158d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &vfe0_clk_src.clkr.hw }, 2159d14b15b5SJeffrey Hugo .num_parents = 1, 2160d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2161d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2162d14b15b5SJeffrey Hugo }, 2163d14b15b5SJeffrey Hugo }, 2164d14b15b5SJeffrey Hugo }; 2165d14b15b5SJeffrey Hugo 2166d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe1_clk = { 2167d14b15b5SJeffrey Hugo .halt_reg = 0x36ac, 2168d14b15b5SJeffrey Hugo .clkr = { 2169d14b15b5SJeffrey Hugo .enable_reg = 0x36ac, 2170d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2171d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2172d14b15b5SJeffrey Hugo .name = "camss_vfe1_clk", 2173d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &vfe1_clk_src.clkr.hw }, 2174d14b15b5SJeffrey Hugo .num_parents = 1, 2175d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2176d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2177d14b15b5SJeffrey Hugo }, 2178d14b15b5SJeffrey Hugo }, 2179d14b15b5SJeffrey Hugo }; 2180d14b15b5SJeffrey Hugo 2181d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_clk = { 2182d14b15b5SJeffrey Hugo .halt_reg = 0x36b0, 2183d14b15b5SJeffrey Hugo .clkr = { 2184d14b15b5SJeffrey Hugo .enable_reg = 0x36b0, 2185d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2186d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2187d14b15b5SJeffrey Hugo .name = "camss_cpp_clk", 2188d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &cpp_clk_src.clkr.hw }, 2189d14b15b5SJeffrey Hugo .num_parents = 1, 2190d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2191d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2192d14b15b5SJeffrey Hugo }, 2193d14b15b5SJeffrey Hugo }, 2194d14b15b5SJeffrey Hugo }; 2195d14b15b5SJeffrey Hugo 2196d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_ahb_clk = { 2197d14b15b5SJeffrey Hugo .halt_reg = 0x36b4, 2198d14b15b5SJeffrey Hugo .clkr = { 2199d14b15b5SJeffrey Hugo .enable_reg = 0x36b4, 2200d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2201d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2202d14b15b5SJeffrey Hugo .name = "camss_cpp_ahb_clk", 2203d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2204d14b15b5SJeffrey Hugo .num_parents = 1, 2205d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2206d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2207d14b15b5SJeffrey Hugo }, 2208d14b15b5SJeffrey Hugo }, 2209d14b15b5SJeffrey Hugo }; 2210d14b15b5SJeffrey Hugo 2211d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe_vbif_ahb_clk = { 2212d14b15b5SJeffrey Hugo .halt_reg = 0x36b8, 2213d14b15b5SJeffrey Hugo .clkr = { 2214d14b15b5SJeffrey Hugo .enable_reg = 0x36b8, 2215d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2216d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2217d14b15b5SJeffrey Hugo .name = "camss_vfe_vbif_ahb_clk", 2218d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2219d14b15b5SJeffrey Hugo .num_parents = 1, 2220d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2221d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2222d14b15b5SJeffrey Hugo }, 2223d14b15b5SJeffrey Hugo }, 2224d14b15b5SJeffrey Hugo }; 2225d14b15b5SJeffrey Hugo 2226d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe_vbif_axi_clk = { 2227d14b15b5SJeffrey Hugo .halt_reg = 0x36bc, 2228d14b15b5SJeffrey Hugo .clkr = { 2229d14b15b5SJeffrey Hugo .enable_reg = 0x36bc, 2230d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2231d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2232d14b15b5SJeffrey Hugo .name = "camss_vfe_vbif_axi_clk", 2233d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw }, 2234d14b15b5SJeffrey Hugo .num_parents = 1, 2235d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2236d14b15b5SJeffrey Hugo }, 2237d14b15b5SJeffrey Hugo }, 2238d14b15b5SJeffrey Hugo }; 2239d14b15b5SJeffrey Hugo 2240d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_axi_clk = { 2241d14b15b5SJeffrey Hugo .halt_reg = 0x36c4, 2242d14b15b5SJeffrey Hugo .clkr = { 2243d14b15b5SJeffrey Hugo .enable_reg = 0x36c4, 2244d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2245d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2246d14b15b5SJeffrey Hugo .name = "camss_cpp_axi_clk", 2247d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw }, 2248d14b15b5SJeffrey Hugo .num_parents = 1, 2249d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2250d14b15b5SJeffrey Hugo }, 2251d14b15b5SJeffrey Hugo }, 2252d14b15b5SJeffrey Hugo }; 2253d14b15b5SJeffrey Hugo 2254d14b15b5SJeffrey Hugo static struct clk_branch camss_cpp_vbif_ahb_clk = { 2255d14b15b5SJeffrey Hugo .halt_reg = 0x36c8, 2256d14b15b5SJeffrey Hugo .clkr = { 2257d14b15b5SJeffrey Hugo .enable_reg = 0x36c8, 2258d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2259d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2260d14b15b5SJeffrey Hugo .name = "camss_cpp_vbif_ahb_clk", 2261d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2262d14b15b5SJeffrey Hugo .num_parents = 1, 2263d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2264d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2265d14b15b5SJeffrey Hugo }, 2266d14b15b5SJeffrey Hugo }, 2267d14b15b5SJeffrey Hugo }; 2268d14b15b5SJeffrey Hugo 2269d14b15b5SJeffrey Hugo static struct clk_branch camss_csi_vfe0_clk = { 2270d14b15b5SJeffrey Hugo .halt_reg = 0x3704, 2271d14b15b5SJeffrey Hugo .clkr = { 2272d14b15b5SJeffrey Hugo .enable_reg = 0x3704, 2273d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2274d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2275d14b15b5SJeffrey Hugo .name = "camss_csi_vfe0_clk", 2276d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &vfe0_clk_src.clkr.hw }, 2277d14b15b5SJeffrey Hugo .num_parents = 1, 2278d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2279d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2280d14b15b5SJeffrey Hugo }, 2281d14b15b5SJeffrey Hugo }, 2282d14b15b5SJeffrey Hugo }; 2283d14b15b5SJeffrey Hugo 2284d14b15b5SJeffrey Hugo static struct clk_branch camss_csi_vfe1_clk = { 2285d14b15b5SJeffrey Hugo .halt_reg = 0x3714, 2286d14b15b5SJeffrey Hugo .clkr = { 2287d14b15b5SJeffrey Hugo .enable_reg = 0x3714, 2288d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2289d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2290d14b15b5SJeffrey Hugo .name = "camss_csi_vfe1_clk", 2291d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &vfe1_clk_src.clkr.hw }, 2292d14b15b5SJeffrey Hugo .num_parents = 1, 2293d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2294d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2295d14b15b5SJeffrey Hugo }, 2296d14b15b5SJeffrey Hugo }, 2297d14b15b5SJeffrey Hugo }; 2298d14b15b5SJeffrey Hugo 2299d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe0_stream_clk = { 2300d14b15b5SJeffrey Hugo .halt_reg = 0x3720, 2301d14b15b5SJeffrey Hugo .clkr = { 2302d14b15b5SJeffrey Hugo .enable_reg = 0x3720, 2303d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2304d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2305d14b15b5SJeffrey Hugo .name = "camss_vfe0_stream_clk", 2306d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &vfe0_clk_src.clkr.hw }, 2307d14b15b5SJeffrey Hugo .num_parents = 1, 2308d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2309d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2310d14b15b5SJeffrey Hugo }, 2311d14b15b5SJeffrey Hugo }, 2312d14b15b5SJeffrey Hugo }; 2313d14b15b5SJeffrey Hugo 2314d14b15b5SJeffrey Hugo static struct clk_branch camss_vfe1_stream_clk = { 2315d14b15b5SJeffrey Hugo .halt_reg = 0x3724, 2316d14b15b5SJeffrey Hugo .clkr = { 2317d14b15b5SJeffrey Hugo .enable_reg = 0x3724, 2318d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2319d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2320d14b15b5SJeffrey Hugo .name = "camss_vfe1_stream_clk", 2321d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &vfe1_clk_src.clkr.hw }, 2322d14b15b5SJeffrey Hugo .num_parents = 1, 2323d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2324d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2325d14b15b5SJeffrey Hugo }, 2326d14b15b5SJeffrey Hugo }, 2327d14b15b5SJeffrey Hugo }; 2328d14b15b5SJeffrey Hugo 2329d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid0_clk = { 2330d14b15b5SJeffrey Hugo .halt_reg = 0x3730, 2331d14b15b5SJeffrey Hugo .clkr = { 2332d14b15b5SJeffrey Hugo .enable_reg = 0x3730, 2333d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2334d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2335d14b15b5SJeffrey Hugo .name = "camss_cphy_csid0_clk", 2336d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw }, 2337d14b15b5SJeffrey Hugo .num_parents = 1, 2338d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2339d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2340d14b15b5SJeffrey Hugo }, 2341d14b15b5SJeffrey Hugo }, 2342d14b15b5SJeffrey Hugo }; 2343d14b15b5SJeffrey Hugo 2344d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid1_clk = { 2345d14b15b5SJeffrey Hugo .halt_reg = 0x3734, 2346d14b15b5SJeffrey Hugo .clkr = { 2347d14b15b5SJeffrey Hugo .enable_reg = 0x3734, 2348d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2349d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2350d14b15b5SJeffrey Hugo .name = "camss_cphy_csid1_clk", 2351d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw }, 2352d14b15b5SJeffrey Hugo .num_parents = 1, 2353d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2354d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2355d14b15b5SJeffrey Hugo }, 2356d14b15b5SJeffrey Hugo }, 2357d14b15b5SJeffrey Hugo }; 2358d14b15b5SJeffrey Hugo 2359d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid2_clk = { 2360d14b15b5SJeffrey Hugo .halt_reg = 0x3738, 2361d14b15b5SJeffrey Hugo .clkr = { 2362d14b15b5SJeffrey Hugo .enable_reg = 0x3738, 2363d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2364d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2365d14b15b5SJeffrey Hugo .name = "camss_cphy_csid2_clk", 2366d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw }, 2367d14b15b5SJeffrey Hugo .num_parents = 1, 2368d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2369d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2370d14b15b5SJeffrey Hugo }, 2371d14b15b5SJeffrey Hugo }, 2372d14b15b5SJeffrey Hugo }; 2373d14b15b5SJeffrey Hugo 2374d14b15b5SJeffrey Hugo static struct clk_branch camss_cphy_csid3_clk = { 2375d14b15b5SJeffrey Hugo .halt_reg = 0x373c, 2376d14b15b5SJeffrey Hugo .clkr = { 2377d14b15b5SJeffrey Hugo .enable_reg = 0x373c, 2378d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2379d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2380d14b15b5SJeffrey Hugo .name = "camss_cphy_csid3_clk", 2381d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw }, 2382d14b15b5SJeffrey Hugo .num_parents = 1, 2383d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2384d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2385d14b15b5SJeffrey Hugo }, 2386d14b15b5SJeffrey Hugo }, 2387d14b15b5SJeffrey Hugo }; 2388d14b15b5SJeffrey Hugo 2389d14b15b5SJeffrey Hugo static struct clk_branch camss_csiphy0_clk = { 2390d14b15b5SJeffrey Hugo .halt_reg = 0x3740, 2391d14b15b5SJeffrey Hugo .clkr = { 2392d14b15b5SJeffrey Hugo .enable_reg = 0x3740, 2393d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2394d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2395d14b15b5SJeffrey Hugo .name = "camss_csiphy0_clk", 2396d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw }, 2397d14b15b5SJeffrey Hugo .num_parents = 1, 2398d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2399d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2400d14b15b5SJeffrey Hugo }, 2401d14b15b5SJeffrey Hugo }, 2402d14b15b5SJeffrey Hugo }; 2403d14b15b5SJeffrey Hugo 2404d14b15b5SJeffrey Hugo static struct clk_branch camss_csiphy1_clk = { 2405d14b15b5SJeffrey Hugo .halt_reg = 0x3744, 2406d14b15b5SJeffrey Hugo .clkr = { 2407d14b15b5SJeffrey Hugo .enable_reg = 0x3744, 2408d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2409d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2410d14b15b5SJeffrey Hugo .name = "camss_csiphy1_clk", 2411d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw }, 2412d14b15b5SJeffrey Hugo .num_parents = 1, 2413d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2414d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2415d14b15b5SJeffrey Hugo }, 2416d14b15b5SJeffrey Hugo }, 2417d14b15b5SJeffrey Hugo }; 2418d14b15b5SJeffrey Hugo 2419d14b15b5SJeffrey Hugo static struct clk_branch camss_csiphy2_clk = { 2420d14b15b5SJeffrey Hugo .halt_reg = 0x3748, 2421d14b15b5SJeffrey Hugo .clkr = { 2422d14b15b5SJeffrey Hugo .enable_reg = 0x3748, 2423d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2424d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2425d14b15b5SJeffrey Hugo .name = "camss_csiphy2_clk", 2426d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &csiphy_clk_src.clkr.hw }, 2427d14b15b5SJeffrey Hugo .num_parents = 1, 2428d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2429d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2430d14b15b5SJeffrey Hugo }, 2431d14b15b5SJeffrey Hugo }, 2432d14b15b5SJeffrey Hugo }; 2433d14b15b5SJeffrey Hugo 2434d14b15b5SJeffrey Hugo static struct clk_branch fd_core_clk = { 2435d14b15b5SJeffrey Hugo .halt_reg = 0x3b68, 2436d14b15b5SJeffrey Hugo .clkr = { 2437d14b15b5SJeffrey Hugo .enable_reg = 0x3b68, 2438d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2439d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2440d14b15b5SJeffrey Hugo .name = "fd_core_clk", 2441d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &fd_core_clk_src.clkr.hw }, 2442d14b15b5SJeffrey Hugo .num_parents = 1, 2443d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2444d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2445d14b15b5SJeffrey Hugo }, 2446d14b15b5SJeffrey Hugo }, 2447d14b15b5SJeffrey Hugo }; 2448d14b15b5SJeffrey Hugo 2449d14b15b5SJeffrey Hugo static struct clk_branch fd_core_uar_clk = { 2450d14b15b5SJeffrey Hugo .halt_reg = 0x3b6c, 2451d14b15b5SJeffrey Hugo .clkr = { 2452d14b15b5SJeffrey Hugo .enable_reg = 0x3b6c, 2453d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2454d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2455d14b15b5SJeffrey Hugo .name = "fd_core_uar_clk", 2456d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &fd_core_clk_src.clkr.hw }, 2457d14b15b5SJeffrey Hugo .num_parents = 1, 2458d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2459d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2460d14b15b5SJeffrey Hugo }, 2461d14b15b5SJeffrey Hugo }, 2462d14b15b5SJeffrey Hugo }; 2463d14b15b5SJeffrey Hugo 2464d14b15b5SJeffrey Hugo static struct clk_branch fd_ahb_clk = { 2465d14b15b5SJeffrey Hugo .halt_reg = 0x3b74, 2466d14b15b5SJeffrey Hugo .clkr = { 2467d14b15b5SJeffrey Hugo .enable_reg = 0x3b74, 2468d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2469d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2470d14b15b5SJeffrey Hugo .name = "fd_ahb_clk", 2471d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2472d14b15b5SJeffrey Hugo .num_parents = 1, 2473d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2474d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2475d14b15b5SJeffrey Hugo }, 2476d14b15b5SJeffrey Hugo }, 2477d14b15b5SJeffrey Hugo }; 2478d14b15b5SJeffrey Hugo 2479d14b15b5SJeffrey Hugo static struct clk_branch mnoc_ahb_clk = { 2480d14b15b5SJeffrey Hugo .halt_reg = 0x5024, 2481d14b15b5SJeffrey Hugo .clkr = { 2482d14b15b5SJeffrey Hugo .enable_reg = 0x5024, 2483d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2484d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2485d14b15b5SJeffrey Hugo .name = "mnoc_ahb_clk", 2486d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2487d14b15b5SJeffrey Hugo .num_parents = 1, 2488d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2489d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2490d14b15b5SJeffrey Hugo }, 2491d14b15b5SJeffrey Hugo }, 2492d14b15b5SJeffrey Hugo }; 2493d14b15b5SJeffrey Hugo 2494d14b15b5SJeffrey Hugo static struct clk_branch bimc_smmu_ahb_clk = { 2495d14b15b5SJeffrey Hugo .halt_reg = 0xe004, 2496fa92f3b0SAngeloGioacchino Del Regno .hwcg_reg = 0xe004, 2497fa92f3b0SAngeloGioacchino Del Regno .hwcg_bit = 1, 2498d14b15b5SJeffrey Hugo .clkr = { 2499d14b15b5SJeffrey Hugo .enable_reg = 0xe004, 2500d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2501d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2502d14b15b5SJeffrey Hugo .name = "bimc_smmu_ahb_clk", 2503d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2504d14b15b5SJeffrey Hugo .num_parents = 1, 2505d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2506d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2507d14b15b5SJeffrey Hugo }, 2508d14b15b5SJeffrey Hugo }, 2509d14b15b5SJeffrey Hugo }; 2510d14b15b5SJeffrey Hugo 2511d14b15b5SJeffrey Hugo static struct clk_branch bimc_smmu_axi_clk = { 2512d14b15b5SJeffrey Hugo .halt_reg = 0xe008, 2513fa92f3b0SAngeloGioacchino Del Regno .hwcg_reg = 0xe008, 2514fa92f3b0SAngeloGioacchino Del Regno .hwcg_bit = 1, 2515d14b15b5SJeffrey Hugo .clkr = { 2516d14b15b5SJeffrey Hugo .enable_reg = 0xe008, 2517d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2518d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2519d14b15b5SJeffrey Hugo .name = "bimc_smmu_axi_clk", 2520d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &axi_clk_src.clkr.hw }, 2521d14b15b5SJeffrey Hugo .num_parents = 1, 2522d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2523d14b15b5SJeffrey Hugo }, 2524d14b15b5SJeffrey Hugo }, 2525d14b15b5SJeffrey Hugo }; 2526d14b15b5SJeffrey Hugo 2527d14b15b5SJeffrey Hugo static struct clk_branch mnoc_maxi_clk = { 2528d14b15b5SJeffrey Hugo .halt_reg = 0xf004, 2529d14b15b5SJeffrey Hugo .clkr = { 2530d14b15b5SJeffrey Hugo .enable_reg = 0xf004, 2531d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2532d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2533d14b15b5SJeffrey Hugo .name = "mnoc_maxi_clk", 2534d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &maxi_clk_src.clkr.hw }, 2535d14b15b5SJeffrey Hugo .num_parents = 1, 2536d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2537d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2538d14b15b5SJeffrey Hugo }, 2539d14b15b5SJeffrey Hugo }, 2540d14b15b5SJeffrey Hugo }; 2541d14b15b5SJeffrey Hugo 2542d14b15b5SJeffrey Hugo static struct clk_branch vmem_maxi_clk = { 2543d14b15b5SJeffrey Hugo .halt_reg = 0xf064, 2544d14b15b5SJeffrey Hugo .clkr = { 2545d14b15b5SJeffrey Hugo .enable_reg = 0xf064, 2546d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2547d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2548d14b15b5SJeffrey Hugo .name = "vmem_maxi_clk", 2549d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &maxi_clk_src.clkr.hw }, 2550d14b15b5SJeffrey Hugo .num_parents = 1, 2551d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2552d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2553d14b15b5SJeffrey Hugo }, 2554d14b15b5SJeffrey Hugo }, 2555d14b15b5SJeffrey Hugo }; 2556d14b15b5SJeffrey Hugo 2557d14b15b5SJeffrey Hugo static struct clk_branch vmem_ahb_clk = { 2558d14b15b5SJeffrey Hugo .halt_reg = 0xf068, 2559d14b15b5SJeffrey Hugo .clkr = { 2560d14b15b5SJeffrey Hugo .enable_reg = 0xf068, 2561d14b15b5SJeffrey Hugo .enable_mask = BIT(0), 2562d14b15b5SJeffrey Hugo .hw.init = &(struct clk_init_data){ 2563d14b15b5SJeffrey Hugo .name = "vmem_ahb_clk", 2564d14b15b5SJeffrey Hugo .parent_hws = (const struct clk_hw *[]){ &ahb_clk_src.clkr.hw }, 2565d14b15b5SJeffrey Hugo .num_parents = 1, 2566d14b15b5SJeffrey Hugo .ops = &clk_branch2_ops, 2567d14b15b5SJeffrey Hugo .flags = CLK_SET_RATE_PARENT, 2568d14b15b5SJeffrey Hugo }, 2569d14b15b5SJeffrey Hugo }, 2570d14b15b5SJeffrey Hugo }; 2571d14b15b5SJeffrey Hugo 2572d14b15b5SJeffrey Hugo static struct clk_hw *mmcc_msm8998_hws[] = { 2573d14b15b5SJeffrey Hugo &gpll0_div.hw, 2574d14b15b5SJeffrey Hugo }; 2575d14b15b5SJeffrey Hugo 2576d14b15b5SJeffrey Hugo static struct gdsc video_top_gdsc = { 2577d14b15b5SJeffrey Hugo .gdscr = 0x1024, 2578d14b15b5SJeffrey Hugo .pd = { 2579d14b15b5SJeffrey Hugo .name = "video_top", 2580d14b15b5SJeffrey Hugo }, 2581d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2582d14b15b5SJeffrey Hugo }; 2583d14b15b5SJeffrey Hugo 2584d14b15b5SJeffrey Hugo static struct gdsc video_subcore0_gdsc = { 2585d14b15b5SJeffrey Hugo .gdscr = 0x1040, 2586d14b15b5SJeffrey Hugo .pd = { 2587d14b15b5SJeffrey Hugo .name = "video_subcore0", 2588d14b15b5SJeffrey Hugo }, 2589d14b15b5SJeffrey Hugo .parent = &video_top_gdsc.pd, 2590d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2591d14b15b5SJeffrey Hugo }; 2592d14b15b5SJeffrey Hugo 2593d14b15b5SJeffrey Hugo static struct gdsc video_subcore1_gdsc = { 2594d14b15b5SJeffrey Hugo .gdscr = 0x1044, 2595d14b15b5SJeffrey Hugo .pd = { 2596d14b15b5SJeffrey Hugo .name = "video_subcore1", 2597d14b15b5SJeffrey Hugo }, 2598d14b15b5SJeffrey Hugo .parent = &video_top_gdsc.pd, 2599d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2600d14b15b5SJeffrey Hugo }; 2601d14b15b5SJeffrey Hugo 2602d14b15b5SJeffrey Hugo static struct gdsc mdss_gdsc = { 2603d14b15b5SJeffrey Hugo .gdscr = 0x2304, 2604d14b15b5SJeffrey Hugo .cxcs = (unsigned int []){ 0x2310, 0x2350, 0x231c, 0x2320 }, 2605d14b15b5SJeffrey Hugo .cxc_count = 4, 2606d14b15b5SJeffrey Hugo .pd = { 2607d14b15b5SJeffrey Hugo .name = "mdss", 2608d14b15b5SJeffrey Hugo }, 2609d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2610d14b15b5SJeffrey Hugo }; 2611d14b15b5SJeffrey Hugo 2612d14b15b5SJeffrey Hugo static struct gdsc camss_top_gdsc = { 2613d14b15b5SJeffrey Hugo .gdscr = 0x34a0, 2614d14b15b5SJeffrey Hugo .cxcs = (unsigned int []){ 0x35b8, 0x36c4, 0x3704, 0x3714, 0x3494, 2615d14b15b5SJeffrey Hugo 0x35a8, 0x3868 }, 2616d14b15b5SJeffrey Hugo .cxc_count = 7, 2617d14b15b5SJeffrey Hugo .pd = { 2618d14b15b5SJeffrey Hugo .name = "camss_top", 2619d14b15b5SJeffrey Hugo }, 2620d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2621d14b15b5SJeffrey Hugo }; 2622d14b15b5SJeffrey Hugo 2623d14b15b5SJeffrey Hugo static struct gdsc camss_vfe0_gdsc = { 2624d14b15b5SJeffrey Hugo .gdscr = 0x3664, 2625d14b15b5SJeffrey Hugo .pd = { 2626d14b15b5SJeffrey Hugo .name = "camss_vfe0", 2627d14b15b5SJeffrey Hugo }, 2628d14b15b5SJeffrey Hugo .parent = &camss_top_gdsc.pd, 2629d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2630d14b15b5SJeffrey Hugo }; 2631d14b15b5SJeffrey Hugo 2632d14b15b5SJeffrey Hugo static struct gdsc camss_vfe1_gdsc = { 2633d14b15b5SJeffrey Hugo .gdscr = 0x3674, 2634d14b15b5SJeffrey Hugo .pd = { 2635d14b15b5SJeffrey Hugo .name = "camss_vfe1_gdsc", 2636d14b15b5SJeffrey Hugo }, 2637d14b15b5SJeffrey Hugo .parent = &camss_top_gdsc.pd, 2638d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2639d14b15b5SJeffrey Hugo }; 2640d14b15b5SJeffrey Hugo 2641d14b15b5SJeffrey Hugo static struct gdsc camss_cpp_gdsc = { 2642d14b15b5SJeffrey Hugo .gdscr = 0x36d4, 2643d14b15b5SJeffrey Hugo .pd = { 2644d14b15b5SJeffrey Hugo .name = "camss_cpp", 2645d14b15b5SJeffrey Hugo }, 2646d14b15b5SJeffrey Hugo .parent = &camss_top_gdsc.pd, 2647d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 2648d14b15b5SJeffrey Hugo }; 2649d14b15b5SJeffrey Hugo 2650d14b15b5SJeffrey Hugo static struct gdsc bimc_smmu_gdsc = { 2651d14b15b5SJeffrey Hugo .gdscr = 0xe020, 2652d14b15b5SJeffrey Hugo .gds_hw_ctrl = 0xe024, 2653d14b15b5SJeffrey Hugo .pd = { 2654d14b15b5SJeffrey Hugo .name = "bimc_smmu", 2655d14b15b5SJeffrey Hugo }, 2656d14b15b5SJeffrey Hugo .pwrsts = PWRSTS_OFF_ON, 265768e1d106SAngeloGioacchino Del Regno .flags = HW_CTRL | ALWAYS_ON, 2658d14b15b5SJeffrey Hugo }; 2659d14b15b5SJeffrey Hugo 2660d14b15b5SJeffrey Hugo static struct clk_regmap *mmcc_msm8998_clocks[] = { 2661d14b15b5SJeffrey Hugo [MMPLL0] = &mmpll0.clkr, 2662d14b15b5SJeffrey Hugo [MMPLL0_OUT_EVEN] = &mmpll0_out_even.clkr, 2663d14b15b5SJeffrey Hugo [MMPLL1] = &mmpll1.clkr, 2664d14b15b5SJeffrey Hugo [MMPLL1_OUT_EVEN] = &mmpll1_out_even.clkr, 2665d14b15b5SJeffrey Hugo [MMPLL3] = &mmpll3.clkr, 2666d14b15b5SJeffrey Hugo [MMPLL3_OUT_EVEN] = &mmpll3_out_even.clkr, 2667d14b15b5SJeffrey Hugo [MMPLL4] = &mmpll4.clkr, 2668d14b15b5SJeffrey Hugo [MMPLL4_OUT_EVEN] = &mmpll4_out_even.clkr, 2669d14b15b5SJeffrey Hugo [MMPLL5] = &mmpll5.clkr, 2670d14b15b5SJeffrey Hugo [MMPLL5_OUT_EVEN] = &mmpll5_out_even.clkr, 2671d14b15b5SJeffrey Hugo [MMPLL6] = &mmpll6.clkr, 2672d14b15b5SJeffrey Hugo [MMPLL6_OUT_EVEN] = &mmpll6_out_even.clkr, 2673d14b15b5SJeffrey Hugo [MMPLL7] = &mmpll7.clkr, 2674d14b15b5SJeffrey Hugo [MMPLL7_OUT_EVEN] = &mmpll7_out_even.clkr, 2675d14b15b5SJeffrey Hugo [MMPLL10] = &mmpll10.clkr, 2676d14b15b5SJeffrey Hugo [MMPLL10_OUT_EVEN] = &mmpll10_out_even.clkr, 2677d14b15b5SJeffrey Hugo [BYTE0_CLK_SRC] = &byte0_clk_src.clkr, 2678d14b15b5SJeffrey Hugo [BYTE1_CLK_SRC] = &byte1_clk_src.clkr, 2679d14b15b5SJeffrey Hugo [CCI_CLK_SRC] = &cci_clk_src.clkr, 2680d14b15b5SJeffrey Hugo [CPP_CLK_SRC] = &cpp_clk_src.clkr, 2681d14b15b5SJeffrey Hugo [CSI0_CLK_SRC] = &csi0_clk_src.clkr, 2682d14b15b5SJeffrey Hugo [CSI1_CLK_SRC] = &csi1_clk_src.clkr, 2683d14b15b5SJeffrey Hugo [CSI2_CLK_SRC] = &csi2_clk_src.clkr, 2684d14b15b5SJeffrey Hugo [CSI3_CLK_SRC] = &csi3_clk_src.clkr, 2685d14b15b5SJeffrey Hugo [CSIPHY_CLK_SRC] = &csiphy_clk_src.clkr, 2686d14b15b5SJeffrey Hugo [CSI0PHYTIMER_CLK_SRC] = &csi0phytimer_clk_src.clkr, 2687d14b15b5SJeffrey Hugo [CSI1PHYTIMER_CLK_SRC] = &csi1phytimer_clk_src.clkr, 2688d14b15b5SJeffrey Hugo [CSI2PHYTIMER_CLK_SRC] = &csi2phytimer_clk_src.clkr, 2689d14b15b5SJeffrey Hugo [DP_AUX_CLK_SRC] = &dp_aux_clk_src.clkr, 2690d14b15b5SJeffrey Hugo [DP_CRYPTO_CLK_SRC] = &dp_crypto_clk_src.clkr, 2691d14b15b5SJeffrey Hugo [DP_LINK_CLK_SRC] = &dp_link_clk_src.clkr, 2692d14b15b5SJeffrey Hugo [DP_PIXEL_CLK_SRC] = &dp_pixel_clk_src.clkr, 2693d14b15b5SJeffrey Hugo [ESC0_CLK_SRC] = &esc0_clk_src.clkr, 2694d14b15b5SJeffrey Hugo [ESC1_CLK_SRC] = &esc1_clk_src.clkr, 2695d14b15b5SJeffrey Hugo [EXTPCLK_CLK_SRC] = &extpclk_clk_src.clkr, 2696d14b15b5SJeffrey Hugo [FD_CORE_CLK_SRC] = &fd_core_clk_src.clkr, 2697d14b15b5SJeffrey Hugo [HDMI_CLK_SRC] = &hdmi_clk_src.clkr, 2698d14b15b5SJeffrey Hugo [JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr, 2699d14b15b5SJeffrey Hugo [MAXI_CLK_SRC] = &maxi_clk_src.clkr, 2700d14b15b5SJeffrey Hugo [MCLK0_CLK_SRC] = &mclk0_clk_src.clkr, 2701d14b15b5SJeffrey Hugo [MCLK1_CLK_SRC] = &mclk1_clk_src.clkr, 2702d14b15b5SJeffrey Hugo [MCLK2_CLK_SRC] = &mclk2_clk_src.clkr, 2703d14b15b5SJeffrey Hugo [MCLK3_CLK_SRC] = &mclk3_clk_src.clkr, 2704d14b15b5SJeffrey Hugo [MDP_CLK_SRC] = &mdp_clk_src.clkr, 2705d14b15b5SJeffrey Hugo [VSYNC_CLK_SRC] = &vsync_clk_src.clkr, 2706d14b15b5SJeffrey Hugo [AHB_CLK_SRC] = &ahb_clk_src.clkr, 2707d14b15b5SJeffrey Hugo [AXI_CLK_SRC] = &axi_clk_src.clkr, 2708d14b15b5SJeffrey Hugo [PCLK0_CLK_SRC] = &pclk0_clk_src.clkr, 2709d14b15b5SJeffrey Hugo [PCLK1_CLK_SRC] = &pclk1_clk_src.clkr, 2710d14b15b5SJeffrey Hugo [ROT_CLK_SRC] = &rot_clk_src.clkr, 2711d14b15b5SJeffrey Hugo [VIDEO_CORE_CLK_SRC] = &video_core_clk_src.clkr, 2712d14b15b5SJeffrey Hugo [VIDEO_SUBCORE0_CLK_SRC] = &video_subcore0_clk_src.clkr, 2713d14b15b5SJeffrey Hugo [VIDEO_SUBCORE1_CLK_SRC] = &video_subcore1_clk_src.clkr, 2714d14b15b5SJeffrey Hugo [VFE0_CLK_SRC] = &vfe0_clk_src.clkr, 2715d14b15b5SJeffrey Hugo [VFE1_CLK_SRC] = &vfe1_clk_src.clkr, 2716d14b15b5SJeffrey Hugo [MISC_AHB_CLK] = &misc_ahb_clk.clkr, 2717d14b15b5SJeffrey Hugo [VIDEO_CORE_CLK] = &video_core_clk.clkr, 2718d14b15b5SJeffrey Hugo [VIDEO_AHB_CLK] = &video_ahb_clk.clkr, 2719d14b15b5SJeffrey Hugo [VIDEO_AXI_CLK] = &video_axi_clk.clkr, 2720d14b15b5SJeffrey Hugo [VIDEO_MAXI_CLK] = &video_maxi_clk.clkr, 2721d14b15b5SJeffrey Hugo [VIDEO_SUBCORE0_CLK] = &video_subcore0_clk.clkr, 2722d14b15b5SJeffrey Hugo [VIDEO_SUBCORE1_CLK] = &video_subcore1_clk.clkr, 2723d14b15b5SJeffrey Hugo [MDSS_AHB_CLK] = &mdss_ahb_clk.clkr, 2724d14b15b5SJeffrey Hugo [MDSS_HDMI_DP_AHB_CLK] = &mdss_hdmi_dp_ahb_clk.clkr, 2725d14b15b5SJeffrey Hugo [MDSS_AXI_CLK] = &mdss_axi_clk.clkr, 2726d14b15b5SJeffrey Hugo [MDSS_PCLK0_CLK] = &mdss_pclk0_clk.clkr, 2727d14b15b5SJeffrey Hugo [MDSS_PCLK1_CLK] = &mdss_pclk1_clk.clkr, 2728d14b15b5SJeffrey Hugo [MDSS_MDP_CLK] = &mdss_mdp_clk.clkr, 2729d14b15b5SJeffrey Hugo [MDSS_MDP_LUT_CLK] = &mdss_mdp_lut_clk.clkr, 2730d14b15b5SJeffrey Hugo [MDSS_EXTPCLK_CLK] = &mdss_extpclk_clk.clkr, 2731d14b15b5SJeffrey Hugo [MDSS_VSYNC_CLK] = &mdss_vsync_clk.clkr, 2732d14b15b5SJeffrey Hugo [MDSS_HDMI_CLK] = &mdss_hdmi_clk.clkr, 2733d14b15b5SJeffrey Hugo [MDSS_BYTE0_CLK] = &mdss_byte0_clk.clkr, 2734d14b15b5SJeffrey Hugo [MDSS_BYTE1_CLK] = &mdss_byte1_clk.clkr, 2735d14b15b5SJeffrey Hugo [MDSS_ESC0_CLK] = &mdss_esc0_clk.clkr, 2736d14b15b5SJeffrey Hugo [MDSS_ESC1_CLK] = &mdss_esc1_clk.clkr, 2737d14b15b5SJeffrey Hugo [MDSS_ROT_CLK] = &mdss_rot_clk.clkr, 2738d14b15b5SJeffrey Hugo [MDSS_DP_LINK_CLK] = &mdss_dp_link_clk.clkr, 2739d14b15b5SJeffrey Hugo [MDSS_DP_LINK_INTF_CLK] = &mdss_dp_link_intf_clk.clkr, 2740d14b15b5SJeffrey Hugo [MDSS_DP_CRYPTO_CLK] = &mdss_dp_crypto_clk.clkr, 2741d14b15b5SJeffrey Hugo [MDSS_DP_PIXEL_CLK] = &mdss_dp_pixel_clk.clkr, 2742d14b15b5SJeffrey Hugo [MDSS_DP_AUX_CLK] = &mdss_dp_aux_clk.clkr, 2743d14b15b5SJeffrey Hugo [MDSS_BYTE0_INTF_CLK] = &mdss_byte0_intf_clk.clkr, 2744d14b15b5SJeffrey Hugo [MDSS_BYTE1_INTF_CLK] = &mdss_byte1_intf_clk.clkr, 2745d14b15b5SJeffrey Hugo [CAMSS_CSI0PHYTIMER_CLK] = &camss_csi0phytimer_clk.clkr, 2746d14b15b5SJeffrey Hugo [CAMSS_CSI1PHYTIMER_CLK] = &camss_csi1phytimer_clk.clkr, 2747d14b15b5SJeffrey Hugo [CAMSS_CSI2PHYTIMER_CLK] = &camss_csi2phytimer_clk.clkr, 2748d14b15b5SJeffrey Hugo [CAMSS_CSI0_CLK] = &camss_csi0_clk.clkr, 2749d14b15b5SJeffrey Hugo [CAMSS_CSI0_AHB_CLK] = &camss_csi0_ahb_clk.clkr, 2750d14b15b5SJeffrey Hugo [CAMSS_CSI0RDI_CLK] = &camss_csi0rdi_clk.clkr, 2751d14b15b5SJeffrey Hugo [CAMSS_CSI0PIX_CLK] = &camss_csi0pix_clk.clkr, 2752d14b15b5SJeffrey Hugo [CAMSS_CSI1_CLK] = &camss_csi1_clk.clkr, 2753d14b15b5SJeffrey Hugo [CAMSS_CSI1_AHB_CLK] = &camss_csi1_ahb_clk.clkr, 2754d14b15b5SJeffrey Hugo [CAMSS_CSI1RDI_CLK] = &camss_csi1rdi_clk.clkr, 2755d14b15b5SJeffrey Hugo [CAMSS_CSI1PIX_CLK] = &camss_csi1pix_clk.clkr, 2756d14b15b5SJeffrey Hugo [CAMSS_CSI2_CLK] = &camss_csi2_clk.clkr, 2757d14b15b5SJeffrey Hugo [CAMSS_CSI2_AHB_CLK] = &camss_csi2_ahb_clk.clkr, 2758d14b15b5SJeffrey Hugo [CAMSS_CSI2RDI_CLK] = &camss_csi2rdi_clk.clkr, 2759d14b15b5SJeffrey Hugo [CAMSS_CSI2PIX_CLK] = &camss_csi2pix_clk.clkr, 2760d14b15b5SJeffrey Hugo [CAMSS_CSI3_CLK] = &camss_csi3_clk.clkr, 2761d14b15b5SJeffrey Hugo [CAMSS_CSI3_AHB_CLK] = &camss_csi3_ahb_clk.clkr, 2762d14b15b5SJeffrey Hugo [CAMSS_CSI3RDI_CLK] = &camss_csi3rdi_clk.clkr, 2763d14b15b5SJeffrey Hugo [CAMSS_CSI3PIX_CLK] = &camss_csi3pix_clk.clkr, 2764d14b15b5SJeffrey Hugo [CAMSS_ISPIF_AHB_CLK] = &camss_ispif_ahb_clk.clkr, 2765d14b15b5SJeffrey Hugo [CAMSS_CCI_CLK] = &camss_cci_clk.clkr, 2766d14b15b5SJeffrey Hugo [CAMSS_CCI_AHB_CLK] = &camss_cci_ahb_clk.clkr, 2767d14b15b5SJeffrey Hugo [CAMSS_MCLK0_CLK] = &camss_mclk0_clk.clkr, 2768d14b15b5SJeffrey Hugo [CAMSS_MCLK1_CLK] = &camss_mclk1_clk.clkr, 2769d14b15b5SJeffrey Hugo [CAMSS_MCLK2_CLK] = &camss_mclk2_clk.clkr, 2770d14b15b5SJeffrey Hugo [CAMSS_MCLK3_CLK] = &camss_mclk3_clk.clkr, 2771d14b15b5SJeffrey Hugo [CAMSS_TOP_AHB_CLK] = &camss_top_ahb_clk.clkr, 2772d14b15b5SJeffrey Hugo [CAMSS_AHB_CLK] = &camss_ahb_clk.clkr, 2773d14b15b5SJeffrey Hugo [CAMSS_MICRO_AHB_CLK] = &camss_micro_ahb_clk.clkr, 2774d14b15b5SJeffrey Hugo [CAMSS_JPEG0_CLK] = &camss_jpeg0_clk.clkr, 2775d14b15b5SJeffrey Hugo [CAMSS_JPEG_AHB_CLK] = &camss_jpeg_ahb_clk.clkr, 2776d14b15b5SJeffrey Hugo [CAMSS_JPEG_AXI_CLK] = &camss_jpeg_axi_clk.clkr, 2777d14b15b5SJeffrey Hugo [CAMSS_VFE0_AHB_CLK] = &camss_vfe0_ahb_clk.clkr, 2778d14b15b5SJeffrey Hugo [CAMSS_VFE1_AHB_CLK] = &camss_vfe1_ahb_clk.clkr, 2779d14b15b5SJeffrey Hugo [CAMSS_VFE0_CLK] = &camss_vfe0_clk.clkr, 2780d14b15b5SJeffrey Hugo [CAMSS_VFE1_CLK] = &camss_vfe1_clk.clkr, 2781d14b15b5SJeffrey Hugo [CAMSS_CPP_CLK] = &camss_cpp_clk.clkr, 2782d14b15b5SJeffrey Hugo [CAMSS_CPP_AHB_CLK] = &camss_cpp_ahb_clk.clkr, 2783d14b15b5SJeffrey Hugo [CAMSS_VFE_VBIF_AHB_CLK] = &camss_vfe_vbif_ahb_clk.clkr, 2784d14b15b5SJeffrey Hugo [CAMSS_VFE_VBIF_AXI_CLK] = &camss_vfe_vbif_axi_clk.clkr, 2785d14b15b5SJeffrey Hugo [CAMSS_CPP_AXI_CLK] = &camss_cpp_axi_clk.clkr, 2786d14b15b5SJeffrey Hugo [CAMSS_CPP_VBIF_AHB_CLK] = &camss_cpp_vbif_ahb_clk.clkr, 2787d14b15b5SJeffrey Hugo [CAMSS_CSI_VFE0_CLK] = &camss_csi_vfe0_clk.clkr, 2788d14b15b5SJeffrey Hugo [CAMSS_CSI_VFE1_CLK] = &camss_csi_vfe1_clk.clkr, 2789d14b15b5SJeffrey Hugo [CAMSS_VFE0_STREAM_CLK] = &camss_vfe0_stream_clk.clkr, 2790d14b15b5SJeffrey Hugo [CAMSS_VFE1_STREAM_CLK] = &camss_vfe1_stream_clk.clkr, 2791d14b15b5SJeffrey Hugo [CAMSS_CPHY_CSID0_CLK] = &camss_cphy_csid0_clk.clkr, 2792d14b15b5SJeffrey Hugo [CAMSS_CPHY_CSID1_CLK] = &camss_cphy_csid1_clk.clkr, 2793d14b15b5SJeffrey Hugo [CAMSS_CPHY_CSID2_CLK] = &camss_cphy_csid2_clk.clkr, 2794d14b15b5SJeffrey Hugo [CAMSS_CPHY_CSID3_CLK] = &camss_cphy_csid3_clk.clkr, 2795d14b15b5SJeffrey Hugo [CAMSS_CSIPHY0_CLK] = &camss_csiphy0_clk.clkr, 2796d14b15b5SJeffrey Hugo [CAMSS_CSIPHY1_CLK] = &camss_csiphy1_clk.clkr, 2797d14b15b5SJeffrey Hugo [CAMSS_CSIPHY2_CLK] = &camss_csiphy2_clk.clkr, 2798d14b15b5SJeffrey Hugo [FD_CORE_CLK] = &fd_core_clk.clkr, 2799d14b15b5SJeffrey Hugo [FD_CORE_UAR_CLK] = &fd_core_uar_clk.clkr, 2800d14b15b5SJeffrey Hugo [FD_AHB_CLK] = &fd_ahb_clk.clkr, 2801d14b15b5SJeffrey Hugo [MNOC_AHB_CLK] = &mnoc_ahb_clk.clkr, 2802d14b15b5SJeffrey Hugo [BIMC_SMMU_AHB_CLK] = &bimc_smmu_ahb_clk.clkr, 2803d14b15b5SJeffrey Hugo [BIMC_SMMU_AXI_CLK] = &bimc_smmu_axi_clk.clkr, 2804d14b15b5SJeffrey Hugo [MNOC_MAXI_CLK] = &mnoc_maxi_clk.clkr, 2805d14b15b5SJeffrey Hugo [VMEM_MAXI_CLK] = &vmem_maxi_clk.clkr, 2806d14b15b5SJeffrey Hugo [VMEM_AHB_CLK] = &vmem_ahb_clk.clkr, 2807d14b15b5SJeffrey Hugo }; 2808d14b15b5SJeffrey Hugo 2809d14b15b5SJeffrey Hugo static struct gdsc *mmcc_msm8998_gdscs[] = { 2810d14b15b5SJeffrey Hugo [VIDEO_TOP_GDSC] = &video_top_gdsc, 2811d14b15b5SJeffrey Hugo [VIDEO_SUBCORE0_GDSC] = &video_subcore0_gdsc, 2812d14b15b5SJeffrey Hugo [VIDEO_SUBCORE1_GDSC] = &video_subcore1_gdsc, 2813d14b15b5SJeffrey Hugo [MDSS_GDSC] = &mdss_gdsc, 2814d14b15b5SJeffrey Hugo [CAMSS_TOP_GDSC] = &camss_top_gdsc, 2815d14b15b5SJeffrey Hugo [CAMSS_VFE0_GDSC] = &camss_vfe0_gdsc, 2816d14b15b5SJeffrey Hugo [CAMSS_VFE1_GDSC] = &camss_vfe1_gdsc, 2817d14b15b5SJeffrey Hugo [CAMSS_CPP_GDSC] = &camss_cpp_gdsc, 2818d14b15b5SJeffrey Hugo [BIMC_SMMU_GDSC] = &bimc_smmu_gdsc, 2819d14b15b5SJeffrey Hugo }; 2820d14b15b5SJeffrey Hugo 2821d14b15b5SJeffrey Hugo static const struct qcom_reset_map mmcc_msm8998_resets[] = { 2822d14b15b5SJeffrey Hugo [SPDM_BCR] = { 0x200 }, 2823d14b15b5SJeffrey Hugo [SPDM_RM_BCR] = { 0x300 }, 2824d14b15b5SJeffrey Hugo [MISC_BCR] = { 0x320 }, 2825d14b15b5SJeffrey Hugo [VIDEO_TOP_BCR] = { 0x1020 }, 2826d14b15b5SJeffrey Hugo [THROTTLE_VIDEO_BCR] = { 0x1180 }, 2827d14b15b5SJeffrey Hugo [MDSS_BCR] = { 0x2300 }, 2828d14b15b5SJeffrey Hugo [THROTTLE_MDSS_BCR] = { 0x2460 }, 2829d14b15b5SJeffrey Hugo [CAMSS_PHY0_BCR] = { 0x3020 }, 2830d14b15b5SJeffrey Hugo [CAMSS_PHY1_BCR] = { 0x3050 }, 2831d14b15b5SJeffrey Hugo [CAMSS_PHY2_BCR] = { 0x3080 }, 2832d14b15b5SJeffrey Hugo [CAMSS_CSI0_BCR] = { 0x30b0 }, 2833d14b15b5SJeffrey Hugo [CAMSS_CSI0RDI_BCR] = { 0x30d0 }, 2834d14b15b5SJeffrey Hugo [CAMSS_CSI0PIX_BCR] = { 0x30e0 }, 2835d14b15b5SJeffrey Hugo [CAMSS_CSI1_BCR] = { 0x3120 }, 2836d14b15b5SJeffrey Hugo [CAMSS_CSI1RDI_BCR] = { 0x3140 }, 2837d14b15b5SJeffrey Hugo [CAMSS_CSI1PIX_BCR] = { 0x3150 }, 2838d14b15b5SJeffrey Hugo [CAMSS_CSI2_BCR] = { 0x3180 }, 2839d14b15b5SJeffrey Hugo [CAMSS_CSI2RDI_BCR] = { 0x31a0 }, 2840d14b15b5SJeffrey Hugo [CAMSS_CSI2PIX_BCR] = { 0x31b0 }, 2841d14b15b5SJeffrey Hugo [CAMSS_CSI3_BCR] = { 0x31e0 }, 2842d14b15b5SJeffrey Hugo [CAMSS_CSI3RDI_BCR] = { 0x3200 }, 2843d14b15b5SJeffrey Hugo [CAMSS_CSI3PIX_BCR] = { 0x3210 }, 2844d14b15b5SJeffrey Hugo [CAMSS_ISPIF_BCR] = { 0x3220 }, 2845d14b15b5SJeffrey Hugo [CAMSS_CCI_BCR] = { 0x3340 }, 2846d14b15b5SJeffrey Hugo [CAMSS_TOP_BCR] = { 0x3480 }, 2847d14b15b5SJeffrey Hugo [CAMSS_AHB_BCR] = { 0x3488 }, 2848d14b15b5SJeffrey Hugo [CAMSS_MICRO_BCR] = { 0x3490 }, 2849d14b15b5SJeffrey Hugo [CAMSS_JPEG_BCR] = { 0x35a0 }, 2850d14b15b5SJeffrey Hugo [CAMSS_VFE0_BCR] = { 0x3660 }, 2851d14b15b5SJeffrey Hugo [CAMSS_VFE1_BCR] = { 0x3670 }, 2852d14b15b5SJeffrey Hugo [CAMSS_VFE_VBIF_BCR] = { 0x36a0 }, 2853d14b15b5SJeffrey Hugo [CAMSS_CPP_TOP_BCR] = { 0x36c0 }, 2854d14b15b5SJeffrey Hugo [CAMSS_CPP_BCR] = { 0x36d0 }, 2855d14b15b5SJeffrey Hugo [CAMSS_CSI_VFE0_BCR] = { 0x3700 }, 2856d14b15b5SJeffrey Hugo [CAMSS_CSI_VFE1_BCR] = { 0x3710 }, 2857d14b15b5SJeffrey Hugo [CAMSS_FD_BCR] = { 0x3b60 }, 2858d14b15b5SJeffrey Hugo [THROTTLE_CAMSS_BCR] = { 0x3c30 }, 2859d14b15b5SJeffrey Hugo [MNOCAHB_BCR] = { 0x5020 }, 2860d14b15b5SJeffrey Hugo [MNOCAXI_BCR] = { 0xd020 }, 2861d14b15b5SJeffrey Hugo [BMIC_SMMU_BCR] = { 0xe000 }, 2862d14b15b5SJeffrey Hugo [MNOC_MAXI_BCR] = { 0xf000 }, 2863d14b15b5SJeffrey Hugo [VMEM_BCR] = { 0xf060 }, 2864d14b15b5SJeffrey Hugo [BTO_BCR] = { 0x10004 }, 2865d14b15b5SJeffrey Hugo }; 2866d14b15b5SJeffrey Hugo 2867d14b15b5SJeffrey Hugo static const struct regmap_config mmcc_msm8998_regmap_config = { 2868d14b15b5SJeffrey Hugo .reg_bits = 32, 2869d14b15b5SJeffrey Hugo .reg_stride = 4, 2870d14b15b5SJeffrey Hugo .val_bits = 32, 2871d14b15b5SJeffrey Hugo .max_register = 0x10004, 2872d14b15b5SJeffrey Hugo .fast_io = true, 2873d14b15b5SJeffrey Hugo }; 2874d14b15b5SJeffrey Hugo 2875d14b15b5SJeffrey Hugo static const struct qcom_cc_desc mmcc_msm8998_desc = { 2876d14b15b5SJeffrey Hugo .config = &mmcc_msm8998_regmap_config, 2877d14b15b5SJeffrey Hugo .clks = mmcc_msm8998_clocks, 2878d14b15b5SJeffrey Hugo .num_clks = ARRAY_SIZE(mmcc_msm8998_clocks), 2879d14b15b5SJeffrey Hugo .resets = mmcc_msm8998_resets, 2880d14b15b5SJeffrey Hugo .num_resets = ARRAY_SIZE(mmcc_msm8998_resets), 2881d14b15b5SJeffrey Hugo .gdscs = mmcc_msm8998_gdscs, 2882d14b15b5SJeffrey Hugo .num_gdscs = ARRAY_SIZE(mmcc_msm8998_gdscs), 2883d14b15b5SJeffrey Hugo .clk_hws = mmcc_msm8998_hws, 2884d14b15b5SJeffrey Hugo .num_clk_hws = ARRAY_SIZE(mmcc_msm8998_hws), 2885d14b15b5SJeffrey Hugo }; 2886d14b15b5SJeffrey Hugo 2887d14b15b5SJeffrey Hugo static const struct of_device_id mmcc_msm8998_match_table[] = { 2888d14b15b5SJeffrey Hugo { .compatible = "qcom,mmcc-msm8998" }, 2889d14b15b5SJeffrey Hugo { } 2890d14b15b5SJeffrey Hugo }; 2891d14b15b5SJeffrey Hugo MODULE_DEVICE_TABLE(of, mmcc_msm8998_match_table); 2892d14b15b5SJeffrey Hugo 2893d14b15b5SJeffrey Hugo static int mmcc_msm8998_probe(struct platform_device *pdev) 2894d14b15b5SJeffrey Hugo { 2895d14b15b5SJeffrey Hugo struct regmap *regmap; 2896d14b15b5SJeffrey Hugo 2897d14b15b5SJeffrey Hugo regmap = qcom_cc_map(pdev, &mmcc_msm8998_desc); 2898d14b15b5SJeffrey Hugo if (IS_ERR(regmap)) 2899d14b15b5SJeffrey Hugo return PTR_ERR(regmap); 2900d14b15b5SJeffrey Hugo 2901d14b15b5SJeffrey Hugo return qcom_cc_really_probe(pdev, &mmcc_msm8998_desc, regmap); 2902d14b15b5SJeffrey Hugo } 2903d14b15b5SJeffrey Hugo 2904d14b15b5SJeffrey Hugo static struct platform_driver mmcc_msm8998_driver = { 2905d14b15b5SJeffrey Hugo .probe = mmcc_msm8998_probe, 2906d14b15b5SJeffrey Hugo .driver = { 2907d14b15b5SJeffrey Hugo .name = "mmcc-msm8998", 2908d14b15b5SJeffrey Hugo .of_match_table = mmcc_msm8998_match_table, 2909d14b15b5SJeffrey Hugo }, 2910d14b15b5SJeffrey Hugo }; 2911d14b15b5SJeffrey Hugo module_platform_driver(mmcc_msm8998_driver); 2912d14b15b5SJeffrey Hugo 2913d14b15b5SJeffrey Hugo MODULE_DESCRIPTION("QCOM MMCC MSM8998 Driver"); 2914d14b15b5SJeffrey Hugo MODULE_LICENSE("GPL v2"); 2915