Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This software is licensed under the terms of the GNU General Public |
| 5 | * License version 2, as published by the Free Software Foundation, and |
| 6 | * may be copied, distributed, and modified under those terms. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/kernel.h> |
| 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/module.h> |
| 17 | #include <linux/regmap.h> |
| 18 | #include <linux/reset-controller.h> |
| 19 | |
| 20 | #include <dt-bindings/clock/qcom,mmcc-apq8084.h> |
| 21 | #include <dt-bindings/reset/qcom,mmcc-apq8084.h> |
| 22 | |
| 23 | #include "common.h" |
| 24 | #include "clk-regmap.h" |
| 25 | #include "clk-pll.h" |
| 26 | #include "clk-rcg.h" |
| 27 | #include "clk-branch.h" |
| 28 | #include "reset.h" |
| 29 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 30 | enum { |
| 31 | P_XO, |
| 32 | P_MMPLL0, |
| 33 | P_EDPLINK, |
| 34 | P_MMPLL1, |
| 35 | P_HDMIPLL, |
| 36 | P_GPLL0, |
| 37 | P_EDPVCO, |
| 38 | P_MMPLL4, |
| 39 | P_DSI0PLL, |
| 40 | P_DSI0PLL_BYTE, |
| 41 | P_MMPLL2, |
| 42 | P_MMPLL3, |
| 43 | P_GPLL1, |
| 44 | P_DSI1PLL, |
| 45 | P_DSI1PLL_BYTE, |
| 46 | P_MMSLEEP, |
| 47 | }; |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 48 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 49 | static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map[] = { |
| 50 | { P_XO, 0 }, |
| 51 | { P_MMPLL0, 1 }, |
| 52 | { P_MMPLL1, 2 }, |
| 53 | { P_GPLL0, 5 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 54 | }; |
| 55 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 56 | static const char * const mmcc_xo_mmpll0_mmpll1_gpll0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 57 | "xo", |
| 58 | "mmpll0_vote", |
| 59 | "mmpll1_vote", |
| 60 | "mmss_gpll0_vote", |
| 61 | }; |
| 62 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 63 | static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map[] = { |
| 64 | { P_XO, 0 }, |
| 65 | { P_MMPLL0, 1 }, |
| 66 | { P_HDMIPLL, 4 }, |
| 67 | { P_GPLL0, 5 }, |
| 68 | { P_DSI0PLL, 2 }, |
| 69 | { P_DSI1PLL, 3 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 70 | }; |
| 71 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 72 | static const char * const mmcc_xo_mmpll0_dsi_hdmi_gpll0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 73 | "xo", |
| 74 | "mmpll0_vote", |
| 75 | "hdmipll", |
| 76 | "mmss_gpll0_vote", |
| 77 | "dsi0pll", |
| 78 | "dsi1pll", |
| 79 | }; |
| 80 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 81 | static const struct parent_map mmcc_xo_mmpll0_1_2_gpll0_map[] = { |
| 82 | { P_XO, 0 }, |
| 83 | { P_MMPLL0, 1 }, |
| 84 | { P_MMPLL1, 2 }, |
| 85 | { P_GPLL0, 5 }, |
| 86 | { P_MMPLL2, 3 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 87 | }; |
| 88 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 89 | static const char * const mmcc_xo_mmpll0_1_2_gpll0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 90 | "xo", |
| 91 | "mmpll0_vote", |
| 92 | "mmpll1_vote", |
| 93 | "mmss_gpll0_vote", |
| 94 | "mmpll2", |
| 95 | }; |
| 96 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 97 | static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map[] = { |
| 98 | { P_XO, 0 }, |
| 99 | { P_MMPLL0, 1 }, |
| 100 | { P_MMPLL1, 2 }, |
| 101 | { P_GPLL0, 5 }, |
| 102 | { P_MMPLL3, 3 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 103 | }; |
| 104 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 105 | static const char * const mmcc_xo_mmpll0_1_3_gpll0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 106 | "xo", |
| 107 | "mmpll0_vote", |
| 108 | "mmpll1_vote", |
| 109 | "mmss_gpll0_vote", |
| 110 | "mmpll3", |
| 111 | }; |
| 112 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 113 | static const struct parent_map mmcc_xo_dsi_hdmi_edp_map[] = { |
| 114 | { P_XO, 0 }, |
| 115 | { P_EDPLINK, 4 }, |
| 116 | { P_HDMIPLL, 3 }, |
| 117 | { P_EDPVCO, 5 }, |
| 118 | { P_DSI0PLL, 1 }, |
| 119 | { P_DSI1PLL, 2 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 120 | }; |
| 121 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 122 | static const char * const mmcc_xo_dsi_hdmi_edp[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 123 | "xo", |
| 124 | "edp_link_clk", |
| 125 | "hdmipll", |
| 126 | "edp_vco_div", |
| 127 | "dsi0pll", |
| 128 | "dsi1pll", |
| 129 | }; |
| 130 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 131 | static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map[] = { |
| 132 | { P_XO, 0 }, |
| 133 | { P_EDPLINK, 4 }, |
| 134 | { P_HDMIPLL, 3 }, |
| 135 | { P_GPLL0, 5 }, |
| 136 | { P_DSI0PLL, 1 }, |
| 137 | { P_DSI1PLL, 2 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 138 | }; |
| 139 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 140 | static const char * const mmcc_xo_dsi_hdmi_edp_gpll0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 141 | "xo", |
| 142 | "edp_link_clk", |
| 143 | "hdmipll", |
| 144 | "gpll0_vote", |
| 145 | "dsi0pll", |
| 146 | "dsi1pll", |
| 147 | }; |
| 148 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 149 | static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map[] = { |
| 150 | { P_XO, 0 }, |
| 151 | { P_EDPLINK, 4 }, |
| 152 | { P_HDMIPLL, 3 }, |
| 153 | { P_GPLL0, 5 }, |
| 154 | { P_DSI0PLL_BYTE, 1 }, |
| 155 | { P_DSI1PLL_BYTE, 2 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 156 | }; |
| 157 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 158 | static const char * const mmcc_xo_dsibyte_hdmi_edp_gpll0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 159 | "xo", |
| 160 | "edp_link_clk", |
| 161 | "hdmipll", |
| 162 | "gpll0_vote", |
| 163 | "dsi0pllbyte", |
| 164 | "dsi1pllbyte", |
| 165 | }; |
| 166 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 167 | static const struct parent_map mmcc_xo_mmpll0_1_4_gpll0_map[] = { |
| 168 | { P_XO, 0 }, |
| 169 | { P_MMPLL0, 1 }, |
| 170 | { P_MMPLL1, 2 }, |
| 171 | { P_GPLL0, 5 }, |
| 172 | { P_MMPLL4, 3 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 173 | }; |
| 174 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 175 | static const char * const mmcc_xo_mmpll0_1_4_gpll0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 176 | "xo", |
| 177 | "mmpll0", |
| 178 | "mmpll1", |
| 179 | "mmpll4", |
| 180 | "gpll0", |
| 181 | }; |
| 182 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 183 | static const struct parent_map mmcc_xo_mmpll0_1_4_gpll1_0_map[] = { |
| 184 | { P_XO, 0 }, |
| 185 | { P_MMPLL0, 1 }, |
| 186 | { P_MMPLL1, 2 }, |
| 187 | { P_MMPLL4, 3 }, |
| 188 | { P_GPLL0, 5 }, |
| 189 | { P_GPLL1, 4 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 190 | }; |
| 191 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 192 | static const char * const mmcc_xo_mmpll0_1_4_gpll1_0[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 193 | "xo", |
| 194 | "mmpll0", |
| 195 | "mmpll1", |
| 196 | "mmpll4", |
| 197 | "gpll1", |
| 198 | "gpll0", |
| 199 | }; |
| 200 | |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 201 | static const struct parent_map mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map[] = { |
| 202 | { P_XO, 0 }, |
| 203 | { P_MMPLL0, 1 }, |
| 204 | { P_MMPLL1, 2 }, |
| 205 | { P_MMPLL4, 3 }, |
| 206 | { P_GPLL0, 5 }, |
| 207 | { P_GPLL1, 4 }, |
| 208 | { P_MMSLEEP, 6 } |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 209 | }; |
| 210 | |
Georgi Djakov | adb11a4 | 2015-07-06 16:51:30 +0300 | [diff] [blame] | 211 | static const char * const mmcc_xo_mmpll0_1_4_gpll1_0_sleep[] = { |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 212 | "xo", |
| 213 | "mmpll0", |
| 214 | "mmpll1", |
| 215 | "mmpll4", |
| 216 | "gpll1", |
| 217 | "gpll0", |
| 218 | "sleep_clk_src", |
| 219 | }; |
| 220 | |
| 221 | #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) } |
| 222 | |
| 223 | static struct clk_pll mmpll0 = { |
| 224 | .l_reg = 0x0004, |
| 225 | .m_reg = 0x0008, |
| 226 | .n_reg = 0x000c, |
| 227 | .config_reg = 0x0014, |
| 228 | .mode_reg = 0x0000, |
| 229 | .status_reg = 0x001c, |
| 230 | .status_bit = 17, |
| 231 | .clkr.hw.init = &(struct clk_init_data){ |
| 232 | .name = "mmpll0", |
| 233 | .parent_names = (const char *[]){ "xo" }, |
| 234 | .num_parents = 1, |
| 235 | .ops = &clk_pll_ops, |
| 236 | }, |
| 237 | }; |
| 238 | |
| 239 | static struct clk_regmap mmpll0_vote = { |
| 240 | .enable_reg = 0x0100, |
| 241 | .enable_mask = BIT(0), |
| 242 | .hw.init = &(struct clk_init_data){ |
| 243 | .name = "mmpll0_vote", |
| 244 | .parent_names = (const char *[]){ "mmpll0" }, |
| 245 | .num_parents = 1, |
| 246 | .ops = &clk_pll_vote_ops, |
| 247 | }, |
| 248 | }; |
| 249 | |
| 250 | static struct clk_pll mmpll1 = { |
| 251 | .l_reg = 0x0044, |
| 252 | .m_reg = 0x0048, |
| 253 | .n_reg = 0x004c, |
| 254 | .config_reg = 0x0050, |
| 255 | .mode_reg = 0x0040, |
| 256 | .status_reg = 0x005c, |
| 257 | .status_bit = 17, |
| 258 | .clkr.hw.init = &(struct clk_init_data){ |
| 259 | .name = "mmpll1", |
| 260 | .parent_names = (const char *[]){ "xo" }, |
| 261 | .num_parents = 1, |
| 262 | .ops = &clk_pll_ops, |
| 263 | }, |
| 264 | }; |
| 265 | |
| 266 | static struct clk_regmap mmpll1_vote = { |
| 267 | .enable_reg = 0x0100, |
| 268 | .enable_mask = BIT(1), |
| 269 | .hw.init = &(struct clk_init_data){ |
| 270 | .name = "mmpll1_vote", |
| 271 | .parent_names = (const char *[]){ "mmpll1" }, |
| 272 | .num_parents = 1, |
| 273 | .ops = &clk_pll_vote_ops, |
| 274 | }, |
| 275 | }; |
| 276 | |
| 277 | static struct clk_pll mmpll2 = { |
| 278 | .l_reg = 0x4104, |
| 279 | .m_reg = 0x4108, |
| 280 | .n_reg = 0x410c, |
| 281 | .config_reg = 0x4110, |
| 282 | .mode_reg = 0x4100, |
| 283 | .status_reg = 0x411c, |
| 284 | .clkr.hw.init = &(struct clk_init_data){ |
| 285 | .name = "mmpll2", |
| 286 | .parent_names = (const char *[]){ "xo" }, |
| 287 | .num_parents = 1, |
| 288 | .ops = &clk_pll_ops, |
| 289 | }, |
| 290 | }; |
| 291 | |
| 292 | static struct clk_pll mmpll3 = { |
| 293 | .l_reg = 0x0084, |
| 294 | .m_reg = 0x0088, |
| 295 | .n_reg = 0x008c, |
| 296 | .config_reg = 0x0090, |
| 297 | .mode_reg = 0x0080, |
| 298 | .status_reg = 0x009c, |
| 299 | .status_bit = 17, |
| 300 | .clkr.hw.init = &(struct clk_init_data){ |
| 301 | .name = "mmpll3", |
| 302 | .parent_names = (const char *[]){ "xo" }, |
| 303 | .num_parents = 1, |
| 304 | .ops = &clk_pll_ops, |
| 305 | }, |
| 306 | }; |
| 307 | |
| 308 | static struct clk_pll mmpll4 = { |
| 309 | .l_reg = 0x00a4, |
| 310 | .m_reg = 0x00a8, |
| 311 | .n_reg = 0x00ac, |
| 312 | .config_reg = 0x00b0, |
| 313 | .mode_reg = 0x0080, |
| 314 | .status_reg = 0x00bc, |
| 315 | .clkr.hw.init = &(struct clk_init_data){ |
| 316 | .name = "mmpll4", |
| 317 | .parent_names = (const char *[]){ "xo" }, |
| 318 | .num_parents = 1, |
| 319 | .ops = &clk_pll_ops, |
| 320 | }, |
| 321 | }; |
| 322 | |
| 323 | static struct clk_rcg2 mmss_ahb_clk_src = { |
| 324 | .cmd_rcgr = 0x5000, |
| 325 | .hid_width = 5, |
| 326 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 327 | .clkr.hw.init = &(struct clk_init_data){ |
| 328 | .name = "mmss_ahb_clk_src", |
| 329 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 330 | .num_parents = 4, |
| 331 | .ops = &clk_rcg2_ops, |
| 332 | }, |
| 333 | }; |
| 334 | |
| 335 | static struct freq_tbl ftbl_mmss_axi_clk[] = { |
| 336 | F(19200000, P_XO, 1, 0, 0), |
| 337 | F(37500000, P_GPLL0, 16, 0, 0), |
| 338 | F(50000000, P_GPLL0, 12, 0, 0), |
| 339 | F(75000000, P_GPLL0, 8, 0, 0), |
| 340 | F(100000000, P_GPLL0, 6, 0, 0), |
| 341 | F(150000000, P_GPLL0, 4, 0, 0), |
| 342 | F(333430000, P_MMPLL1, 3.5, 0, 0), |
| 343 | F(400000000, P_MMPLL0, 2, 0, 0), |
| 344 | F(466800000, P_MMPLL1, 2.5, 0, 0), |
| 345 | }; |
| 346 | |
| 347 | static struct clk_rcg2 mmss_axi_clk_src = { |
| 348 | .cmd_rcgr = 0x5040, |
| 349 | .hid_width = 5, |
| 350 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 351 | .freq_tbl = ftbl_mmss_axi_clk, |
| 352 | .clkr.hw.init = &(struct clk_init_data){ |
| 353 | .name = "mmss_axi_clk_src", |
| 354 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 355 | .num_parents = 4, |
| 356 | .ops = &clk_rcg2_ops, |
| 357 | }, |
| 358 | }; |
| 359 | |
| 360 | static struct freq_tbl ftbl_ocmemnoc_clk[] = { |
| 361 | F(19200000, P_XO, 1, 0, 0), |
| 362 | F(37500000, P_GPLL0, 16, 0, 0), |
| 363 | F(50000000, P_GPLL0, 12, 0, 0), |
| 364 | F(75000000, P_GPLL0, 8, 0, 0), |
| 365 | F(109090000, P_GPLL0, 5.5, 0, 0), |
| 366 | F(150000000, P_GPLL0, 4, 0, 0), |
| 367 | F(228570000, P_MMPLL0, 3.5, 0, 0), |
| 368 | F(320000000, P_MMPLL0, 2.5, 0, 0), |
| 369 | }; |
| 370 | |
| 371 | static struct clk_rcg2 ocmemnoc_clk_src = { |
| 372 | .cmd_rcgr = 0x5090, |
| 373 | .hid_width = 5, |
| 374 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 375 | .freq_tbl = ftbl_ocmemnoc_clk, |
| 376 | .clkr.hw.init = &(struct clk_init_data){ |
| 377 | .name = "ocmemnoc_clk_src", |
| 378 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 379 | .num_parents = 4, |
| 380 | .ops = &clk_rcg2_ops, |
| 381 | }, |
| 382 | }; |
| 383 | |
| 384 | static struct freq_tbl ftbl_camss_csi0_3_clk[] = { |
| 385 | F(100000000, P_GPLL0, 6, 0, 0), |
| 386 | F(200000000, P_MMPLL0, 4, 0, 0), |
| 387 | { } |
| 388 | }; |
| 389 | |
| 390 | static struct clk_rcg2 csi0_clk_src = { |
| 391 | .cmd_rcgr = 0x3090, |
| 392 | .hid_width = 5, |
| 393 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 394 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 395 | .clkr.hw.init = &(struct clk_init_data){ |
| 396 | .name = "csi0_clk_src", |
| 397 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 398 | .num_parents = 5, |
| 399 | .ops = &clk_rcg2_ops, |
| 400 | }, |
| 401 | }; |
| 402 | |
| 403 | static struct clk_rcg2 csi1_clk_src = { |
| 404 | .cmd_rcgr = 0x3100, |
| 405 | .hid_width = 5, |
| 406 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 407 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 408 | .clkr.hw.init = &(struct clk_init_data){ |
| 409 | .name = "csi1_clk_src", |
| 410 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 411 | .num_parents = 5, |
| 412 | .ops = &clk_rcg2_ops, |
| 413 | }, |
| 414 | }; |
| 415 | |
| 416 | static struct clk_rcg2 csi2_clk_src = { |
| 417 | .cmd_rcgr = 0x3160, |
| 418 | .hid_width = 5, |
| 419 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 420 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 421 | .clkr.hw.init = &(struct clk_init_data){ |
| 422 | .name = "csi2_clk_src", |
| 423 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 424 | .num_parents = 5, |
| 425 | .ops = &clk_rcg2_ops, |
| 426 | }, |
| 427 | }; |
| 428 | |
| 429 | static struct clk_rcg2 csi3_clk_src = { |
| 430 | .cmd_rcgr = 0x31c0, |
| 431 | .hid_width = 5, |
| 432 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 433 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 434 | .clkr.hw.init = &(struct clk_init_data){ |
| 435 | .name = "csi3_clk_src", |
| 436 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 437 | .num_parents = 5, |
| 438 | .ops = &clk_rcg2_ops, |
| 439 | }, |
| 440 | }; |
| 441 | |
| 442 | static struct freq_tbl ftbl_camss_vfe_vfe0_1_clk[] = { |
| 443 | F(37500000, P_GPLL0, 16, 0, 0), |
| 444 | F(50000000, P_GPLL0, 12, 0, 0), |
| 445 | F(60000000, P_GPLL0, 10, 0, 0), |
| 446 | F(80000000, P_GPLL0, 7.5, 0, 0), |
| 447 | F(100000000, P_GPLL0, 6, 0, 0), |
| 448 | F(109090000, P_GPLL0, 5.5, 0, 0), |
| 449 | F(133330000, P_GPLL0, 4.5, 0, 0), |
| 450 | F(200000000, P_GPLL0, 3, 0, 0), |
| 451 | F(228570000, P_MMPLL0, 3.5, 0, 0), |
| 452 | F(266670000, P_MMPLL0, 3, 0, 0), |
| 453 | F(320000000, P_MMPLL0, 2.5, 0, 0), |
| 454 | F(465000000, P_MMPLL4, 2, 0, 0), |
| 455 | F(600000000, P_GPLL0, 1, 0, 0), |
| 456 | { } |
| 457 | }; |
| 458 | |
| 459 | static struct clk_rcg2 vfe0_clk_src = { |
| 460 | .cmd_rcgr = 0x3600, |
| 461 | .hid_width = 5, |
| 462 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 463 | .freq_tbl = ftbl_camss_vfe_vfe0_1_clk, |
| 464 | .clkr.hw.init = &(struct clk_init_data){ |
| 465 | .name = "vfe0_clk_src", |
| 466 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 467 | .num_parents = 5, |
| 468 | .ops = &clk_rcg2_ops, |
| 469 | }, |
| 470 | }; |
| 471 | |
| 472 | static struct clk_rcg2 vfe1_clk_src = { |
| 473 | .cmd_rcgr = 0x3620, |
| 474 | .hid_width = 5, |
| 475 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 476 | .freq_tbl = ftbl_camss_vfe_vfe0_1_clk, |
| 477 | .clkr.hw.init = &(struct clk_init_data){ |
| 478 | .name = "vfe1_clk_src", |
| 479 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 480 | .num_parents = 5, |
| 481 | .ops = &clk_rcg2_ops, |
| 482 | }, |
| 483 | }; |
| 484 | |
| 485 | static struct freq_tbl ftbl_mdss_mdp_clk[] = { |
| 486 | F(37500000, P_GPLL0, 16, 0, 0), |
| 487 | F(60000000, P_GPLL0, 10, 0, 0), |
| 488 | F(75000000, P_GPLL0, 8, 0, 0), |
| 489 | F(85710000, P_GPLL0, 7, 0, 0), |
| 490 | F(100000000, P_GPLL0, 6, 0, 0), |
| 491 | F(150000000, P_GPLL0, 4, 0, 0), |
| 492 | F(160000000, P_MMPLL0, 5, 0, 0), |
| 493 | F(200000000, P_MMPLL0, 4, 0, 0), |
| 494 | F(228570000, P_MMPLL0, 3.5, 0, 0), |
| 495 | F(300000000, P_GPLL0, 2, 0, 0), |
| 496 | F(320000000, P_MMPLL0, 2.5, 0, 0), |
| 497 | { } |
| 498 | }; |
| 499 | |
| 500 | static struct clk_rcg2 mdp_clk_src = { |
| 501 | .cmd_rcgr = 0x2040, |
| 502 | .hid_width = 5, |
| 503 | .parent_map = mmcc_xo_mmpll0_dsi_hdmi_gpll0_map, |
| 504 | .freq_tbl = ftbl_mdss_mdp_clk, |
| 505 | .clkr.hw.init = &(struct clk_init_data){ |
| 506 | .name = "mdp_clk_src", |
| 507 | .parent_names = mmcc_xo_mmpll0_dsi_hdmi_gpll0, |
| 508 | .num_parents = 6, |
| 509 | .ops = &clk_rcg2_ops, |
| 510 | }, |
| 511 | }; |
| 512 | |
| 513 | static struct clk_rcg2 gfx3d_clk_src = { |
| 514 | .cmd_rcgr = 0x4000, |
| 515 | .hid_width = 5, |
| 516 | .parent_map = mmcc_xo_mmpll0_1_2_gpll0_map, |
| 517 | .clkr.hw.init = &(struct clk_init_data){ |
| 518 | .name = "gfx3d_clk_src", |
| 519 | .parent_names = mmcc_xo_mmpll0_1_2_gpll0, |
| 520 | .num_parents = 5, |
| 521 | .ops = &clk_rcg2_ops, |
| 522 | }, |
| 523 | }; |
| 524 | |
| 525 | static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk[] = { |
| 526 | F(75000000, P_GPLL0, 8, 0, 0), |
| 527 | F(133330000, P_GPLL0, 4.5, 0, 0), |
| 528 | F(200000000, P_GPLL0, 3, 0, 0), |
| 529 | F(228570000, P_MMPLL0, 3.5, 0, 0), |
| 530 | F(266670000, P_MMPLL0, 3, 0, 0), |
| 531 | F(320000000, P_MMPLL0, 2.5, 0, 0), |
| 532 | { } |
| 533 | }; |
| 534 | |
| 535 | static struct clk_rcg2 jpeg0_clk_src = { |
| 536 | .cmd_rcgr = 0x3500, |
| 537 | .hid_width = 5, |
| 538 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 539 | .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk, |
| 540 | .clkr.hw.init = &(struct clk_init_data){ |
| 541 | .name = "jpeg0_clk_src", |
| 542 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 543 | .num_parents = 5, |
| 544 | .ops = &clk_rcg2_ops, |
| 545 | }, |
| 546 | }; |
| 547 | |
| 548 | static struct clk_rcg2 jpeg1_clk_src = { |
| 549 | .cmd_rcgr = 0x3520, |
| 550 | .hid_width = 5, |
| 551 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 552 | .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk, |
| 553 | .clkr.hw.init = &(struct clk_init_data){ |
| 554 | .name = "jpeg1_clk_src", |
| 555 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 556 | .num_parents = 5, |
| 557 | .ops = &clk_rcg2_ops, |
| 558 | }, |
| 559 | }; |
| 560 | |
| 561 | static struct clk_rcg2 jpeg2_clk_src = { |
| 562 | .cmd_rcgr = 0x3540, |
| 563 | .hid_width = 5, |
| 564 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 565 | .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk, |
| 566 | .clkr.hw.init = &(struct clk_init_data){ |
| 567 | .name = "jpeg2_clk_src", |
| 568 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 569 | .num_parents = 5, |
| 570 | .ops = &clk_rcg2_ops, |
| 571 | }, |
| 572 | }; |
| 573 | |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 574 | static struct clk_rcg2 pclk0_clk_src = { |
| 575 | .cmd_rcgr = 0x2000, |
| 576 | .mnd_width = 8, |
| 577 | .hid_width = 5, |
| 578 | .parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map, |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 579 | .clkr.hw.init = &(struct clk_init_data){ |
| 580 | .name = "pclk0_clk_src", |
| 581 | .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0, |
| 582 | .num_parents = 6, |
| 583 | .ops = &clk_pixel_ops, |
| 584 | .flags = CLK_SET_RATE_PARENT, |
| 585 | }, |
| 586 | }; |
| 587 | |
| 588 | static struct clk_rcg2 pclk1_clk_src = { |
| 589 | .cmd_rcgr = 0x2020, |
| 590 | .mnd_width = 8, |
| 591 | .hid_width = 5, |
| 592 | .parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map, |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 593 | .clkr.hw.init = &(struct clk_init_data){ |
| 594 | .name = "pclk1_clk_src", |
| 595 | .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0, |
| 596 | .num_parents = 6, |
| 597 | .ops = &clk_pixel_ops, |
| 598 | .flags = CLK_SET_RATE_PARENT, |
| 599 | }, |
| 600 | }; |
| 601 | |
| 602 | static struct freq_tbl ftbl_venus0_vcodec0_clk[] = { |
| 603 | F(50000000, P_GPLL0, 12, 0, 0), |
| 604 | F(100000000, P_GPLL0, 6, 0, 0), |
| 605 | F(133330000, P_GPLL0, 4.5, 0, 0), |
| 606 | F(200000000, P_MMPLL0, 4, 0, 0), |
| 607 | F(266670000, P_MMPLL0, 3, 0, 0), |
| 608 | F(465000000, P_MMPLL3, 2, 0, 0), |
| 609 | { } |
| 610 | }; |
| 611 | |
| 612 | static struct clk_rcg2 vcodec0_clk_src = { |
| 613 | .cmd_rcgr = 0x1000, |
| 614 | .mnd_width = 8, |
| 615 | .hid_width = 5, |
| 616 | .parent_map = mmcc_xo_mmpll0_1_3_gpll0_map, |
| 617 | .freq_tbl = ftbl_venus0_vcodec0_clk, |
| 618 | .clkr.hw.init = &(struct clk_init_data){ |
| 619 | .name = "vcodec0_clk_src", |
| 620 | .parent_names = mmcc_xo_mmpll0_1_3_gpll0, |
| 621 | .num_parents = 5, |
| 622 | .ops = &clk_rcg2_ops, |
| 623 | }, |
| 624 | }; |
| 625 | |
| 626 | static struct freq_tbl ftbl_avsync_vp_clk[] = { |
| 627 | F(150000000, P_GPLL0, 4, 0, 0), |
| 628 | F(320000000, P_MMPLL0, 2.5, 0, 0), |
| 629 | { } |
| 630 | }; |
| 631 | |
| 632 | static struct clk_rcg2 vp_clk_src = { |
| 633 | .cmd_rcgr = 0x2430, |
| 634 | .hid_width = 5, |
| 635 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 636 | .freq_tbl = ftbl_avsync_vp_clk, |
| 637 | .clkr.hw.init = &(struct clk_init_data){ |
| 638 | .name = "vp_clk_src", |
| 639 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 640 | .num_parents = 4, |
| 641 | .ops = &clk_rcg2_ops, |
| 642 | }, |
| 643 | }; |
| 644 | |
| 645 | static struct freq_tbl ftbl_camss_cci_cci_clk[] = { |
| 646 | F(19200000, P_XO, 1, 0, 0), |
| 647 | { } |
| 648 | }; |
| 649 | |
| 650 | static struct clk_rcg2 cci_clk_src = { |
| 651 | .cmd_rcgr = 0x3300, |
| 652 | .mnd_width = 8, |
| 653 | .hid_width = 5, |
| 654 | .parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map, |
| 655 | .freq_tbl = ftbl_camss_cci_cci_clk, |
| 656 | .clkr.hw.init = &(struct clk_init_data){ |
| 657 | .name = "cci_clk_src", |
| 658 | .parent_names = mmcc_xo_mmpll0_1_4_gpll1_0, |
| 659 | .num_parents = 6, |
| 660 | .ops = &clk_rcg2_ops, |
| 661 | }, |
| 662 | }; |
| 663 | |
| 664 | static struct freq_tbl ftbl_camss_gp0_1_clk[] = { |
| 665 | F(10000, P_XO, 16, 1, 120), |
| 666 | F(24000, P_XO, 16, 1, 50), |
| 667 | F(6000000, P_GPLL0, 10, 1, 10), |
| 668 | F(12000000, P_GPLL0, 10, 1, 5), |
| 669 | F(13000000, P_GPLL0, 4, 13, 150), |
| 670 | F(24000000, P_GPLL0, 5, 1, 5), |
| 671 | { } |
| 672 | }; |
| 673 | |
| 674 | static struct clk_rcg2 camss_gp0_clk_src = { |
| 675 | .cmd_rcgr = 0x3420, |
| 676 | .mnd_width = 8, |
| 677 | .hid_width = 5, |
| 678 | .parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map, |
| 679 | .freq_tbl = ftbl_camss_gp0_1_clk, |
| 680 | .clkr.hw.init = &(struct clk_init_data){ |
| 681 | .name = "camss_gp0_clk_src", |
| 682 | .parent_names = mmcc_xo_mmpll0_1_4_gpll1_0_sleep, |
| 683 | .num_parents = 7, |
| 684 | .ops = &clk_rcg2_ops, |
| 685 | }, |
| 686 | }; |
| 687 | |
| 688 | static struct clk_rcg2 camss_gp1_clk_src = { |
| 689 | .cmd_rcgr = 0x3450, |
| 690 | .mnd_width = 8, |
| 691 | .hid_width = 5, |
| 692 | .parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map, |
| 693 | .freq_tbl = ftbl_camss_gp0_1_clk, |
| 694 | .clkr.hw.init = &(struct clk_init_data){ |
| 695 | .name = "camss_gp1_clk_src", |
| 696 | .parent_names = mmcc_xo_mmpll0_1_4_gpll1_0_sleep, |
| 697 | .num_parents = 7, |
| 698 | .ops = &clk_rcg2_ops, |
| 699 | }, |
| 700 | }; |
| 701 | |
| 702 | static struct freq_tbl ftbl_camss_mclk0_3_clk[] = { |
| 703 | F(4800000, P_XO, 4, 0, 0), |
| 704 | F(6000000, P_GPLL0, 10, 1, 10), |
| 705 | F(8000000, P_GPLL0, 15, 1, 5), |
| 706 | F(9600000, P_XO, 2, 0, 0), |
| 707 | F(16000000, P_MMPLL0, 10, 1, 5), |
| 708 | F(19200000, P_XO, 1, 0, 0), |
| 709 | F(24000000, P_GPLL0, 5, 1, 5), |
| 710 | F(32000000, P_MMPLL0, 5, 1, 5), |
| 711 | F(48000000, P_GPLL0, 12.5, 0, 0), |
| 712 | F(64000000, P_MMPLL0, 12.5, 0, 0), |
| 713 | { } |
| 714 | }; |
| 715 | |
| 716 | static struct clk_rcg2 mclk0_clk_src = { |
| 717 | .cmd_rcgr = 0x3360, |
| 718 | .mnd_width = 8, |
| 719 | .hid_width = 5, |
| 720 | .parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map, |
| 721 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 722 | .clkr.hw.init = &(struct clk_init_data){ |
| 723 | .name = "mclk0_clk_src", |
| 724 | .parent_names = mmcc_xo_mmpll0_1_4_gpll1_0, |
| 725 | .num_parents = 6, |
| 726 | .ops = &clk_rcg2_ops, |
| 727 | }, |
| 728 | }; |
| 729 | |
| 730 | static struct clk_rcg2 mclk1_clk_src = { |
| 731 | .cmd_rcgr = 0x3390, |
| 732 | .mnd_width = 8, |
| 733 | .hid_width = 5, |
| 734 | .parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map, |
| 735 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 736 | .clkr.hw.init = &(struct clk_init_data){ |
| 737 | .name = "mclk1_clk_src", |
| 738 | .parent_names = mmcc_xo_mmpll0_1_4_gpll1_0, |
| 739 | .num_parents = 6, |
| 740 | .ops = &clk_rcg2_ops, |
| 741 | }, |
| 742 | }; |
| 743 | |
| 744 | static struct clk_rcg2 mclk2_clk_src = { |
| 745 | .cmd_rcgr = 0x33c0, |
| 746 | .mnd_width = 8, |
| 747 | .hid_width = 5, |
| 748 | .parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map, |
| 749 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 750 | .clkr.hw.init = &(struct clk_init_data){ |
| 751 | .name = "mclk2_clk_src", |
| 752 | .parent_names = mmcc_xo_mmpll0_1_4_gpll1_0, |
| 753 | .num_parents = 6, |
| 754 | .ops = &clk_rcg2_ops, |
| 755 | }, |
| 756 | }; |
| 757 | |
| 758 | static struct clk_rcg2 mclk3_clk_src = { |
| 759 | .cmd_rcgr = 0x33f0, |
| 760 | .mnd_width = 8, |
| 761 | .hid_width = 5, |
| 762 | .parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map, |
| 763 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 764 | .clkr.hw.init = &(struct clk_init_data){ |
| 765 | .name = "mclk3_clk_src", |
| 766 | .parent_names = mmcc_xo_mmpll0_1_4_gpll1_0, |
| 767 | .num_parents = 6, |
| 768 | .ops = &clk_rcg2_ops, |
| 769 | }, |
| 770 | }; |
| 771 | |
| 772 | static struct freq_tbl ftbl_camss_phy0_2_csi0_2phytimer_clk[] = { |
| 773 | F(100000000, P_GPLL0, 6, 0, 0), |
| 774 | F(200000000, P_MMPLL0, 4, 0, 0), |
| 775 | { } |
| 776 | }; |
| 777 | |
| 778 | static struct clk_rcg2 csi0phytimer_clk_src = { |
| 779 | .cmd_rcgr = 0x3000, |
| 780 | .hid_width = 5, |
| 781 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 782 | .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk, |
| 783 | .clkr.hw.init = &(struct clk_init_data){ |
| 784 | .name = "csi0phytimer_clk_src", |
| 785 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 786 | .num_parents = 5, |
| 787 | .ops = &clk_rcg2_ops, |
| 788 | }, |
| 789 | }; |
| 790 | |
| 791 | static struct clk_rcg2 csi1phytimer_clk_src = { |
| 792 | .cmd_rcgr = 0x3030, |
| 793 | .hid_width = 5, |
| 794 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 795 | .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk, |
| 796 | .clkr.hw.init = &(struct clk_init_data){ |
| 797 | .name = "csi1phytimer_clk_src", |
| 798 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 799 | .num_parents = 5, |
| 800 | .ops = &clk_rcg2_ops, |
| 801 | }, |
| 802 | }; |
| 803 | |
| 804 | static struct clk_rcg2 csi2phytimer_clk_src = { |
| 805 | .cmd_rcgr = 0x3060, |
| 806 | .hid_width = 5, |
| 807 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 808 | .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk, |
| 809 | .clkr.hw.init = &(struct clk_init_data){ |
| 810 | .name = "csi2phytimer_clk_src", |
| 811 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 812 | .num_parents = 5, |
| 813 | .ops = &clk_rcg2_ops, |
| 814 | }, |
| 815 | }; |
| 816 | |
| 817 | static struct freq_tbl ftbl_camss_vfe_cpp_clk[] = { |
| 818 | F(133330000, P_GPLL0, 4.5, 0, 0), |
| 819 | F(266670000, P_MMPLL0, 3, 0, 0), |
| 820 | F(320000000, P_MMPLL0, 2.5, 0, 0), |
| 821 | F(372000000, P_MMPLL4, 2.5, 0, 0), |
| 822 | F(465000000, P_MMPLL4, 2, 0, 0), |
| 823 | F(600000000, P_GPLL0, 1, 0, 0), |
| 824 | { } |
| 825 | }; |
| 826 | |
| 827 | static struct clk_rcg2 cpp_clk_src = { |
| 828 | .cmd_rcgr = 0x3640, |
| 829 | .hid_width = 5, |
| 830 | .parent_map = mmcc_xo_mmpll0_1_4_gpll0_map, |
| 831 | .freq_tbl = ftbl_camss_vfe_cpp_clk, |
| 832 | .clkr.hw.init = &(struct clk_init_data){ |
| 833 | .name = "cpp_clk_src", |
| 834 | .parent_names = mmcc_xo_mmpll0_1_4_gpll0, |
| 835 | .num_parents = 5, |
| 836 | .ops = &clk_rcg2_ops, |
| 837 | }, |
| 838 | }; |
| 839 | |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 840 | static struct clk_rcg2 byte0_clk_src = { |
| 841 | .cmd_rcgr = 0x2120, |
| 842 | .hid_width = 5, |
| 843 | .parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map, |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 844 | .clkr.hw.init = &(struct clk_init_data){ |
| 845 | .name = "byte0_clk_src", |
| 846 | .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0, |
| 847 | .num_parents = 6, |
Stephen Boyd | 8ee9c7d | 2015-04-09 23:02:02 -0700 | [diff] [blame] | 848 | .ops = &clk_byte2_ops, |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 849 | .flags = CLK_SET_RATE_PARENT, |
| 850 | }, |
| 851 | }; |
| 852 | |
| 853 | static struct clk_rcg2 byte1_clk_src = { |
| 854 | .cmd_rcgr = 0x2140, |
| 855 | .hid_width = 5, |
| 856 | .parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map, |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 857 | .clkr.hw.init = &(struct clk_init_data){ |
| 858 | .name = "byte1_clk_src", |
| 859 | .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0, |
| 860 | .num_parents = 6, |
Stephen Boyd | 8ee9c7d | 2015-04-09 23:02:02 -0700 | [diff] [blame] | 861 | .ops = &clk_byte2_ops, |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 862 | .flags = CLK_SET_RATE_PARENT, |
| 863 | }, |
| 864 | }; |
| 865 | |
| 866 | static struct freq_tbl ftbl_mdss_edpaux_clk[] = { |
| 867 | F(19200000, P_XO, 1, 0, 0), |
| 868 | { } |
| 869 | }; |
| 870 | |
| 871 | static struct clk_rcg2 edpaux_clk_src = { |
| 872 | .cmd_rcgr = 0x20e0, |
| 873 | .hid_width = 5, |
| 874 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 875 | .freq_tbl = ftbl_mdss_edpaux_clk, |
| 876 | .clkr.hw.init = &(struct clk_init_data){ |
| 877 | .name = "edpaux_clk_src", |
| 878 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 879 | .num_parents = 4, |
| 880 | .ops = &clk_rcg2_ops, |
| 881 | }, |
| 882 | }; |
| 883 | |
| 884 | static struct freq_tbl ftbl_mdss_edplink_clk[] = { |
| 885 | F(135000000, P_EDPLINK, 2, 0, 0), |
| 886 | F(270000000, P_EDPLINK, 11, 0, 0), |
| 887 | { } |
| 888 | }; |
| 889 | |
| 890 | static struct clk_rcg2 edplink_clk_src = { |
| 891 | .cmd_rcgr = 0x20c0, |
| 892 | .hid_width = 5, |
| 893 | .parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map, |
| 894 | .freq_tbl = ftbl_mdss_edplink_clk, |
| 895 | .clkr.hw.init = &(struct clk_init_data){ |
| 896 | .name = "edplink_clk_src", |
| 897 | .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0, |
| 898 | .num_parents = 6, |
| 899 | .ops = &clk_rcg2_ops, |
| 900 | .flags = CLK_SET_RATE_PARENT, |
| 901 | }, |
| 902 | }; |
| 903 | |
| 904 | static struct freq_tbl edp_pixel_freq_tbl[] = { |
| 905 | { .src = P_EDPVCO }, |
| 906 | { } |
| 907 | }; |
| 908 | |
| 909 | static struct clk_rcg2 edppixel_clk_src = { |
| 910 | .cmd_rcgr = 0x20a0, |
| 911 | .mnd_width = 8, |
| 912 | .hid_width = 5, |
| 913 | .parent_map = mmcc_xo_dsi_hdmi_edp_map, |
| 914 | .freq_tbl = edp_pixel_freq_tbl, |
| 915 | .clkr.hw.init = &(struct clk_init_data){ |
| 916 | .name = "edppixel_clk_src", |
| 917 | .parent_names = mmcc_xo_dsi_hdmi_edp, |
| 918 | .num_parents = 6, |
| 919 | .ops = &clk_edp_pixel_ops, |
| 920 | }, |
| 921 | }; |
| 922 | |
| 923 | static struct freq_tbl ftbl_mdss_esc0_1_clk[] = { |
| 924 | F(19200000, P_XO, 1, 0, 0), |
| 925 | { } |
| 926 | }; |
| 927 | |
| 928 | static struct clk_rcg2 esc0_clk_src = { |
| 929 | .cmd_rcgr = 0x2160, |
| 930 | .hid_width = 5, |
| 931 | .parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map, |
| 932 | .freq_tbl = ftbl_mdss_esc0_1_clk, |
| 933 | .clkr.hw.init = &(struct clk_init_data){ |
| 934 | .name = "esc0_clk_src", |
| 935 | .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0, |
| 936 | .num_parents = 6, |
| 937 | .ops = &clk_rcg2_ops, |
| 938 | }, |
| 939 | }; |
| 940 | |
| 941 | static struct clk_rcg2 esc1_clk_src = { |
| 942 | .cmd_rcgr = 0x2180, |
| 943 | .hid_width = 5, |
| 944 | .parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map, |
| 945 | .freq_tbl = ftbl_mdss_esc0_1_clk, |
| 946 | .clkr.hw.init = &(struct clk_init_data){ |
| 947 | .name = "esc1_clk_src", |
| 948 | .parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0, |
| 949 | .num_parents = 6, |
| 950 | .ops = &clk_rcg2_ops, |
| 951 | }, |
| 952 | }; |
| 953 | |
| 954 | static struct freq_tbl extpclk_freq_tbl[] = { |
| 955 | { .src = P_HDMIPLL }, |
| 956 | { } |
| 957 | }; |
| 958 | |
| 959 | static struct clk_rcg2 extpclk_clk_src = { |
| 960 | .cmd_rcgr = 0x2060, |
| 961 | .hid_width = 5, |
| 962 | .parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map, |
| 963 | .freq_tbl = extpclk_freq_tbl, |
| 964 | .clkr.hw.init = &(struct clk_init_data){ |
| 965 | .name = "extpclk_clk_src", |
| 966 | .parent_names = mmcc_xo_dsi_hdmi_edp_gpll0, |
| 967 | .num_parents = 6, |
| 968 | .ops = &clk_byte_ops, |
| 969 | .flags = CLK_SET_RATE_PARENT, |
| 970 | }, |
| 971 | }; |
| 972 | |
| 973 | static struct freq_tbl ftbl_mdss_hdmi_clk[] = { |
| 974 | F(19200000, P_XO, 1, 0, 0), |
| 975 | { } |
| 976 | }; |
| 977 | |
| 978 | static struct clk_rcg2 hdmi_clk_src = { |
| 979 | .cmd_rcgr = 0x2100, |
| 980 | .hid_width = 5, |
| 981 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 982 | .freq_tbl = ftbl_mdss_hdmi_clk, |
| 983 | .clkr.hw.init = &(struct clk_init_data){ |
| 984 | .name = "hdmi_clk_src", |
| 985 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 986 | .num_parents = 4, |
| 987 | .ops = &clk_rcg2_ops, |
| 988 | }, |
| 989 | }; |
| 990 | |
| 991 | static struct freq_tbl ftbl_mdss_vsync_clk[] = { |
| 992 | F(19200000, P_XO, 1, 0, 0), |
| 993 | { } |
| 994 | }; |
| 995 | |
| 996 | static struct clk_rcg2 vsync_clk_src = { |
| 997 | .cmd_rcgr = 0x2080, |
| 998 | .hid_width = 5, |
| 999 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 1000 | .freq_tbl = ftbl_mdss_vsync_clk, |
| 1001 | .clkr.hw.init = &(struct clk_init_data){ |
| 1002 | .name = "vsync_clk_src", |
| 1003 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 1004 | .num_parents = 4, |
| 1005 | .ops = &clk_rcg2_ops, |
| 1006 | }, |
| 1007 | }; |
| 1008 | |
| 1009 | static struct freq_tbl ftbl_mmss_rbcpr_clk[] = { |
| 1010 | F(50000000, P_GPLL0, 12, 0, 0), |
| 1011 | { } |
| 1012 | }; |
| 1013 | |
| 1014 | static struct clk_rcg2 rbcpr_clk_src = { |
| 1015 | .cmd_rcgr = 0x4060, |
| 1016 | .hid_width = 5, |
| 1017 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 1018 | .freq_tbl = ftbl_mmss_rbcpr_clk, |
| 1019 | .clkr.hw.init = &(struct clk_init_data){ |
| 1020 | .name = "rbcpr_clk_src", |
| 1021 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 1022 | .num_parents = 4, |
| 1023 | .ops = &clk_rcg2_ops, |
| 1024 | }, |
| 1025 | }; |
| 1026 | |
| 1027 | static struct freq_tbl ftbl_oxili_rbbmtimer_clk[] = { |
| 1028 | F(19200000, P_XO, 1, 0, 0), |
| 1029 | { } |
| 1030 | }; |
| 1031 | |
| 1032 | static struct clk_rcg2 rbbmtimer_clk_src = { |
| 1033 | .cmd_rcgr = 0x4090, |
| 1034 | .hid_width = 5, |
| 1035 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 1036 | .freq_tbl = ftbl_oxili_rbbmtimer_clk, |
| 1037 | .clkr.hw.init = &(struct clk_init_data){ |
| 1038 | .name = "rbbmtimer_clk_src", |
| 1039 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 1040 | .num_parents = 4, |
| 1041 | .ops = &clk_rcg2_ops, |
| 1042 | }, |
| 1043 | }; |
| 1044 | |
| 1045 | static struct freq_tbl ftbl_vpu_maple_clk[] = { |
| 1046 | F(50000000, P_GPLL0, 12, 0, 0), |
| 1047 | F(100000000, P_GPLL0, 6, 0, 0), |
| 1048 | F(133330000, P_GPLL0, 4.5, 0, 0), |
| 1049 | F(200000000, P_MMPLL0, 4, 0, 0), |
| 1050 | F(266670000, P_MMPLL0, 3, 0, 0), |
| 1051 | F(465000000, P_MMPLL3, 2, 0, 0), |
| 1052 | { } |
| 1053 | }; |
| 1054 | |
| 1055 | static struct clk_rcg2 maple_clk_src = { |
| 1056 | .cmd_rcgr = 0x1320, |
| 1057 | .hid_width = 5, |
| 1058 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 1059 | .freq_tbl = ftbl_vpu_maple_clk, |
| 1060 | .clkr.hw.init = &(struct clk_init_data){ |
| 1061 | .name = "maple_clk_src", |
| 1062 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 1063 | .num_parents = 4, |
| 1064 | .ops = &clk_rcg2_ops, |
| 1065 | }, |
| 1066 | }; |
| 1067 | |
| 1068 | static struct freq_tbl ftbl_vpu_vdp_clk[] = { |
| 1069 | F(50000000, P_GPLL0, 12, 0, 0), |
| 1070 | F(100000000, P_GPLL0, 6, 0, 0), |
| 1071 | F(200000000, P_MMPLL0, 4, 0, 0), |
| 1072 | F(320000000, P_MMPLL0, 2.5, 0, 0), |
| 1073 | F(400000000, P_MMPLL0, 2, 0, 0), |
| 1074 | { } |
| 1075 | }; |
| 1076 | |
| 1077 | static struct clk_rcg2 vdp_clk_src = { |
| 1078 | .cmd_rcgr = 0x1300, |
| 1079 | .hid_width = 5, |
| 1080 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 1081 | .freq_tbl = ftbl_vpu_vdp_clk, |
| 1082 | .clkr.hw.init = &(struct clk_init_data){ |
| 1083 | .name = "vdp_clk_src", |
| 1084 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 1085 | .num_parents = 4, |
| 1086 | .ops = &clk_rcg2_ops, |
| 1087 | }, |
| 1088 | }; |
| 1089 | |
| 1090 | static struct freq_tbl ftbl_vpu_bus_clk[] = { |
| 1091 | F(40000000, P_GPLL0, 15, 0, 0), |
| 1092 | F(80000000, P_MMPLL0, 10, 0, 0), |
| 1093 | { } |
| 1094 | }; |
| 1095 | |
| 1096 | static struct clk_rcg2 vpu_bus_clk_src = { |
| 1097 | .cmd_rcgr = 0x1340, |
| 1098 | .hid_width = 5, |
| 1099 | .parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map, |
| 1100 | .freq_tbl = ftbl_vpu_bus_clk, |
| 1101 | .clkr.hw.init = &(struct clk_init_data){ |
| 1102 | .name = "vpu_bus_clk_src", |
| 1103 | .parent_names = mmcc_xo_mmpll0_mmpll1_gpll0, |
| 1104 | .num_parents = 4, |
| 1105 | .ops = &clk_rcg2_ops, |
| 1106 | }, |
| 1107 | }; |
| 1108 | |
| 1109 | static struct clk_branch mmss_cxo_clk = { |
| 1110 | .halt_reg = 0x5104, |
| 1111 | .clkr = { |
| 1112 | .enable_reg = 0x5104, |
| 1113 | .enable_mask = BIT(0), |
| 1114 | .hw.init = &(struct clk_init_data){ |
| 1115 | .name = "mmss_cxo_clk", |
| 1116 | .parent_names = (const char *[]){ "xo" }, |
| 1117 | .num_parents = 1, |
| 1118 | .flags = CLK_SET_RATE_PARENT, |
| 1119 | .ops = &clk_branch2_ops, |
| 1120 | }, |
| 1121 | }, |
| 1122 | }; |
| 1123 | |
| 1124 | static struct clk_branch mmss_sleepclk_clk = { |
| 1125 | .halt_reg = 0x5100, |
| 1126 | .clkr = { |
| 1127 | .enable_reg = 0x5100, |
| 1128 | .enable_mask = BIT(0), |
| 1129 | .hw.init = &(struct clk_init_data){ |
| 1130 | .name = "mmss_sleepclk_clk", |
| 1131 | .parent_names = (const char *[]){ |
| 1132 | "sleep_clk_src", |
| 1133 | }, |
| 1134 | .num_parents = 1, |
| 1135 | .flags = CLK_SET_RATE_PARENT, |
| 1136 | .ops = &clk_branch2_ops, |
| 1137 | }, |
| 1138 | }, |
| 1139 | }; |
| 1140 | |
| 1141 | static struct clk_branch avsync_ahb_clk = { |
| 1142 | .halt_reg = 0x2414, |
| 1143 | .clkr = { |
| 1144 | .enable_reg = 0x2414, |
| 1145 | .enable_mask = BIT(0), |
| 1146 | .hw.init = &(struct clk_init_data){ |
| 1147 | .name = "avsync_ahb_clk", |
| 1148 | .parent_names = (const char *[]){ |
| 1149 | "mmss_ahb_clk_src", |
| 1150 | }, |
| 1151 | .num_parents = 1, |
| 1152 | .flags = CLK_SET_RATE_PARENT, |
| 1153 | .ops = &clk_branch2_ops, |
| 1154 | }, |
| 1155 | }, |
| 1156 | }; |
| 1157 | |
| 1158 | static struct clk_branch avsync_edppixel_clk = { |
| 1159 | .halt_reg = 0x2418, |
| 1160 | .clkr = { |
| 1161 | .enable_reg = 0x2418, |
| 1162 | .enable_mask = BIT(0), |
| 1163 | .hw.init = &(struct clk_init_data){ |
| 1164 | .name = "avsync_edppixel_clk", |
| 1165 | .parent_names = (const char *[]){ |
| 1166 | "edppixel_clk_src", |
| 1167 | }, |
| 1168 | .num_parents = 1, |
| 1169 | .flags = CLK_SET_RATE_PARENT, |
| 1170 | .ops = &clk_branch2_ops, |
| 1171 | }, |
| 1172 | }, |
| 1173 | }; |
| 1174 | |
| 1175 | static struct clk_branch avsync_extpclk_clk = { |
| 1176 | .halt_reg = 0x2410, |
| 1177 | .clkr = { |
| 1178 | .enable_reg = 0x2410, |
| 1179 | .enable_mask = BIT(0), |
| 1180 | .hw.init = &(struct clk_init_data){ |
| 1181 | .name = "avsync_extpclk_clk", |
| 1182 | .parent_names = (const char *[]){ |
| 1183 | "extpclk_clk_src", |
| 1184 | }, |
| 1185 | .num_parents = 1, |
| 1186 | .flags = CLK_SET_RATE_PARENT, |
| 1187 | .ops = &clk_branch2_ops, |
| 1188 | }, |
| 1189 | }, |
| 1190 | }; |
| 1191 | |
| 1192 | static struct clk_branch avsync_pclk0_clk = { |
| 1193 | .halt_reg = 0x241c, |
| 1194 | .clkr = { |
| 1195 | .enable_reg = 0x241c, |
| 1196 | .enable_mask = BIT(0), |
| 1197 | .hw.init = &(struct clk_init_data){ |
| 1198 | .name = "avsync_pclk0_clk", |
| 1199 | .parent_names = (const char *[]){ |
| 1200 | "pclk0_clk_src", |
| 1201 | }, |
| 1202 | .num_parents = 1, |
| 1203 | .flags = CLK_SET_RATE_PARENT, |
| 1204 | .ops = &clk_branch2_ops, |
| 1205 | }, |
| 1206 | }, |
| 1207 | }; |
| 1208 | |
| 1209 | static struct clk_branch avsync_pclk1_clk = { |
| 1210 | .halt_reg = 0x2420, |
| 1211 | .clkr = { |
| 1212 | .enable_reg = 0x2420, |
| 1213 | .enable_mask = BIT(0), |
| 1214 | .hw.init = &(struct clk_init_data){ |
| 1215 | .name = "avsync_pclk1_clk", |
| 1216 | .parent_names = (const char *[]){ |
| 1217 | "pclk1_clk_src", |
| 1218 | }, |
| 1219 | .num_parents = 1, |
| 1220 | .flags = CLK_SET_RATE_PARENT, |
| 1221 | .ops = &clk_branch2_ops, |
| 1222 | }, |
| 1223 | }, |
| 1224 | }; |
| 1225 | |
| 1226 | static struct clk_branch avsync_vp_clk = { |
| 1227 | .halt_reg = 0x2404, |
| 1228 | .clkr = { |
| 1229 | .enable_reg = 0x2404, |
| 1230 | .enable_mask = BIT(0), |
| 1231 | .hw.init = &(struct clk_init_data){ |
| 1232 | .name = "avsync_vp_clk", |
| 1233 | .parent_names = (const char *[]){ |
| 1234 | "vp_clk_src", |
| 1235 | }, |
| 1236 | .num_parents = 1, |
| 1237 | .flags = CLK_SET_RATE_PARENT, |
| 1238 | .ops = &clk_branch2_ops, |
| 1239 | }, |
| 1240 | }, |
| 1241 | }; |
| 1242 | |
| 1243 | static struct clk_branch camss_ahb_clk = { |
| 1244 | .halt_reg = 0x348c, |
| 1245 | .clkr = { |
| 1246 | .enable_reg = 0x348c, |
| 1247 | .enable_mask = BIT(0), |
| 1248 | .hw.init = &(struct clk_init_data){ |
| 1249 | .name = "camss_ahb_clk", |
| 1250 | .parent_names = (const char *[]){ |
| 1251 | "mmss_ahb_clk_src", |
| 1252 | }, |
| 1253 | .num_parents = 1, |
| 1254 | .flags = CLK_SET_RATE_PARENT, |
| 1255 | .ops = &clk_branch2_ops, |
| 1256 | }, |
| 1257 | }, |
| 1258 | }; |
| 1259 | |
| 1260 | static struct clk_branch camss_cci_cci_ahb_clk = { |
| 1261 | .halt_reg = 0x3348, |
| 1262 | .clkr = { |
| 1263 | .enable_reg = 0x3348, |
| 1264 | .enable_mask = BIT(0), |
| 1265 | .hw.init = &(struct clk_init_data){ |
| 1266 | .name = "camss_cci_cci_ahb_clk", |
| 1267 | .parent_names = (const char *[]){ |
| 1268 | "mmss_ahb_clk_src", |
| 1269 | }, |
| 1270 | .num_parents = 1, |
| 1271 | .ops = &clk_branch2_ops, |
| 1272 | }, |
| 1273 | }, |
| 1274 | }; |
| 1275 | |
| 1276 | static struct clk_branch camss_cci_cci_clk = { |
| 1277 | .halt_reg = 0x3344, |
| 1278 | .clkr = { |
| 1279 | .enable_reg = 0x3344, |
| 1280 | .enable_mask = BIT(0), |
| 1281 | .hw.init = &(struct clk_init_data){ |
| 1282 | .name = "camss_cci_cci_clk", |
| 1283 | .parent_names = (const char *[]){ |
| 1284 | "cci_clk_src", |
| 1285 | }, |
| 1286 | .num_parents = 1, |
| 1287 | .flags = CLK_SET_RATE_PARENT, |
| 1288 | .ops = &clk_branch2_ops, |
| 1289 | }, |
| 1290 | }, |
| 1291 | }; |
| 1292 | |
| 1293 | static struct clk_branch camss_csi0_ahb_clk = { |
| 1294 | .halt_reg = 0x30bc, |
| 1295 | .clkr = { |
| 1296 | .enable_reg = 0x30bc, |
| 1297 | .enable_mask = BIT(0), |
| 1298 | .hw.init = &(struct clk_init_data){ |
| 1299 | .name = "camss_csi0_ahb_clk", |
| 1300 | .parent_names = (const char *[]){ |
| 1301 | "mmss_ahb_clk_src", |
| 1302 | }, |
| 1303 | .num_parents = 1, |
| 1304 | .ops = &clk_branch2_ops, |
| 1305 | }, |
| 1306 | }, |
| 1307 | }; |
| 1308 | |
| 1309 | static struct clk_branch camss_csi0_clk = { |
| 1310 | .halt_reg = 0x30b4, |
| 1311 | .clkr = { |
| 1312 | .enable_reg = 0x30b4, |
| 1313 | .enable_mask = BIT(0), |
| 1314 | .hw.init = &(struct clk_init_data){ |
| 1315 | .name = "camss_csi0_clk", |
| 1316 | .parent_names = (const char *[]){ |
| 1317 | "csi0_clk_src", |
| 1318 | }, |
| 1319 | .num_parents = 1, |
| 1320 | .flags = CLK_SET_RATE_PARENT, |
| 1321 | .ops = &clk_branch2_ops, |
| 1322 | }, |
| 1323 | }, |
| 1324 | }; |
| 1325 | |
| 1326 | static struct clk_branch camss_csi0phy_clk = { |
| 1327 | .halt_reg = 0x30c4, |
| 1328 | .clkr = { |
| 1329 | .enable_reg = 0x30c4, |
| 1330 | .enable_mask = BIT(0), |
| 1331 | .hw.init = &(struct clk_init_data){ |
| 1332 | .name = "camss_csi0phy_clk", |
| 1333 | .parent_names = (const char *[]){ |
| 1334 | "csi0_clk_src", |
| 1335 | }, |
| 1336 | .num_parents = 1, |
| 1337 | .flags = CLK_SET_RATE_PARENT, |
| 1338 | .ops = &clk_branch2_ops, |
| 1339 | }, |
| 1340 | }, |
| 1341 | }; |
| 1342 | |
| 1343 | static struct clk_branch camss_csi0pix_clk = { |
| 1344 | .halt_reg = 0x30e4, |
| 1345 | .clkr = { |
| 1346 | .enable_reg = 0x30e4, |
| 1347 | .enable_mask = BIT(0), |
| 1348 | .hw.init = &(struct clk_init_data){ |
| 1349 | .name = "camss_csi0pix_clk", |
| 1350 | .parent_names = (const char *[]){ |
| 1351 | "csi0_clk_src", |
| 1352 | }, |
| 1353 | .num_parents = 1, |
| 1354 | .flags = CLK_SET_RATE_PARENT, |
| 1355 | .ops = &clk_branch2_ops, |
| 1356 | }, |
| 1357 | }, |
| 1358 | }; |
| 1359 | |
| 1360 | static struct clk_branch camss_csi0rdi_clk = { |
| 1361 | .halt_reg = 0x30d4, |
| 1362 | .clkr = { |
| 1363 | .enable_reg = 0x30d4, |
| 1364 | .enable_mask = BIT(0), |
| 1365 | .hw.init = &(struct clk_init_data){ |
| 1366 | .name = "camss_csi0rdi_clk", |
| 1367 | .parent_names = (const char *[]){ |
| 1368 | "csi0_clk_src", |
| 1369 | }, |
| 1370 | .num_parents = 1, |
| 1371 | .flags = CLK_SET_RATE_PARENT, |
| 1372 | .ops = &clk_branch2_ops, |
| 1373 | }, |
| 1374 | }, |
| 1375 | }; |
| 1376 | |
| 1377 | static struct clk_branch camss_csi1_ahb_clk = { |
| 1378 | .halt_reg = 0x3128, |
| 1379 | .clkr = { |
| 1380 | .enable_reg = 0x3128, |
| 1381 | .enable_mask = BIT(0), |
| 1382 | .hw.init = &(struct clk_init_data){ |
| 1383 | .name = "camss_csi1_ahb_clk", |
| 1384 | .parent_names = (const char *[]){ |
| 1385 | "mmss_ahb_clk_src", |
| 1386 | }, |
| 1387 | .num_parents = 1, |
| 1388 | .flags = CLK_SET_RATE_PARENT, |
| 1389 | .ops = &clk_branch2_ops, |
| 1390 | }, |
| 1391 | }, |
| 1392 | }; |
| 1393 | |
| 1394 | static struct clk_branch camss_csi1_clk = { |
| 1395 | .halt_reg = 0x3124, |
| 1396 | .clkr = { |
| 1397 | .enable_reg = 0x3124, |
| 1398 | .enable_mask = BIT(0), |
| 1399 | .hw.init = &(struct clk_init_data){ |
| 1400 | .name = "camss_csi1_clk", |
| 1401 | .parent_names = (const char *[]){ |
| 1402 | "csi1_clk_src", |
| 1403 | }, |
| 1404 | .num_parents = 1, |
| 1405 | .flags = CLK_SET_RATE_PARENT, |
| 1406 | .ops = &clk_branch2_ops, |
| 1407 | }, |
| 1408 | }, |
| 1409 | }; |
| 1410 | |
| 1411 | static struct clk_branch camss_csi1phy_clk = { |
| 1412 | .halt_reg = 0x3134, |
| 1413 | .clkr = { |
| 1414 | .enable_reg = 0x3134, |
| 1415 | .enable_mask = BIT(0), |
| 1416 | .hw.init = &(struct clk_init_data){ |
| 1417 | .name = "camss_csi1phy_clk", |
| 1418 | .parent_names = (const char *[]){ |
| 1419 | "csi1_clk_src", |
| 1420 | }, |
| 1421 | .num_parents = 1, |
| 1422 | .flags = CLK_SET_RATE_PARENT, |
| 1423 | .ops = &clk_branch2_ops, |
| 1424 | }, |
| 1425 | }, |
| 1426 | }; |
| 1427 | |
| 1428 | static struct clk_branch camss_csi1pix_clk = { |
| 1429 | .halt_reg = 0x3154, |
| 1430 | .clkr = { |
| 1431 | .enable_reg = 0x3154, |
| 1432 | .enable_mask = BIT(0), |
| 1433 | .hw.init = &(struct clk_init_data){ |
| 1434 | .name = "camss_csi1pix_clk", |
| 1435 | .parent_names = (const char *[]){ |
| 1436 | "csi1_clk_src", |
| 1437 | }, |
| 1438 | .num_parents = 1, |
| 1439 | .flags = CLK_SET_RATE_PARENT, |
| 1440 | .ops = &clk_branch2_ops, |
| 1441 | }, |
| 1442 | }, |
| 1443 | }; |
| 1444 | |
| 1445 | static struct clk_branch camss_csi1rdi_clk = { |
| 1446 | .halt_reg = 0x3144, |
| 1447 | .clkr = { |
| 1448 | .enable_reg = 0x3144, |
| 1449 | .enable_mask = BIT(0), |
| 1450 | .hw.init = &(struct clk_init_data){ |
| 1451 | .name = "camss_csi1rdi_clk", |
| 1452 | .parent_names = (const char *[]){ |
| 1453 | "csi1_clk_src", |
| 1454 | }, |
| 1455 | .num_parents = 1, |
| 1456 | .flags = CLK_SET_RATE_PARENT, |
| 1457 | .ops = &clk_branch2_ops, |
| 1458 | }, |
| 1459 | }, |
| 1460 | }; |
| 1461 | |
| 1462 | static struct clk_branch camss_csi2_ahb_clk = { |
| 1463 | .halt_reg = 0x3188, |
| 1464 | .clkr = { |
| 1465 | .enable_reg = 0x3188, |
| 1466 | .enable_mask = BIT(0), |
| 1467 | .hw.init = &(struct clk_init_data){ |
| 1468 | .name = "camss_csi2_ahb_clk", |
| 1469 | .parent_names = (const char *[]){ |
| 1470 | "mmss_ahb_clk_src", |
| 1471 | }, |
| 1472 | .num_parents = 1, |
| 1473 | .ops = &clk_branch2_ops, |
| 1474 | }, |
| 1475 | }, |
| 1476 | }; |
| 1477 | |
| 1478 | static struct clk_branch camss_csi2_clk = { |
| 1479 | .halt_reg = 0x3184, |
| 1480 | .clkr = { |
| 1481 | .enable_reg = 0x3184, |
| 1482 | .enable_mask = BIT(0), |
| 1483 | .hw.init = &(struct clk_init_data){ |
| 1484 | .name = "camss_csi2_clk", |
| 1485 | .parent_names = (const char *[]){ |
| 1486 | "csi2_clk_src", |
| 1487 | }, |
| 1488 | .num_parents = 1, |
| 1489 | .flags = CLK_SET_RATE_PARENT, |
| 1490 | .ops = &clk_branch2_ops, |
| 1491 | }, |
| 1492 | }, |
| 1493 | }; |
| 1494 | |
| 1495 | static struct clk_branch camss_csi2phy_clk = { |
| 1496 | .halt_reg = 0x3194, |
| 1497 | .clkr = { |
| 1498 | .enable_reg = 0x3194, |
| 1499 | .enable_mask = BIT(0), |
| 1500 | .hw.init = &(struct clk_init_data){ |
| 1501 | .name = "camss_csi2phy_clk", |
| 1502 | .parent_names = (const char *[]){ |
| 1503 | "csi2_clk_src", |
| 1504 | }, |
| 1505 | .num_parents = 1, |
| 1506 | .flags = CLK_SET_RATE_PARENT, |
| 1507 | .ops = &clk_branch2_ops, |
| 1508 | }, |
| 1509 | }, |
| 1510 | }; |
| 1511 | |
| 1512 | static struct clk_branch camss_csi2pix_clk = { |
| 1513 | .halt_reg = 0x31b4, |
| 1514 | .clkr = { |
| 1515 | .enable_reg = 0x31b4, |
| 1516 | .enable_mask = BIT(0), |
| 1517 | .hw.init = &(struct clk_init_data){ |
| 1518 | .name = "camss_csi2pix_clk", |
| 1519 | .parent_names = (const char *[]){ |
| 1520 | "csi2_clk_src", |
| 1521 | }, |
| 1522 | .num_parents = 1, |
| 1523 | .flags = CLK_SET_RATE_PARENT, |
| 1524 | .ops = &clk_branch2_ops, |
| 1525 | }, |
| 1526 | }, |
| 1527 | }; |
| 1528 | |
| 1529 | static struct clk_branch camss_csi2rdi_clk = { |
| 1530 | .halt_reg = 0x31a4, |
| 1531 | .clkr = { |
| 1532 | .enable_reg = 0x31a4, |
| 1533 | .enable_mask = BIT(0), |
| 1534 | .hw.init = &(struct clk_init_data){ |
| 1535 | .name = "camss_csi2rdi_clk", |
| 1536 | .parent_names = (const char *[]){ |
| 1537 | "csi2_clk_src", |
| 1538 | }, |
| 1539 | .num_parents = 1, |
| 1540 | .flags = CLK_SET_RATE_PARENT, |
| 1541 | .ops = &clk_branch2_ops, |
| 1542 | }, |
| 1543 | }, |
| 1544 | }; |
| 1545 | |
| 1546 | static struct clk_branch camss_csi3_ahb_clk = { |
| 1547 | .halt_reg = 0x31e8, |
| 1548 | .clkr = { |
| 1549 | .enable_reg = 0x31e8, |
| 1550 | .enable_mask = BIT(0), |
| 1551 | .hw.init = &(struct clk_init_data){ |
| 1552 | .name = "camss_csi3_ahb_clk", |
| 1553 | .parent_names = (const char *[]){ |
| 1554 | "mmss_ahb_clk_src", |
| 1555 | }, |
| 1556 | .num_parents = 1, |
| 1557 | .ops = &clk_branch2_ops, |
| 1558 | }, |
| 1559 | }, |
| 1560 | }; |
| 1561 | |
| 1562 | static struct clk_branch camss_csi3_clk = { |
| 1563 | .halt_reg = 0x31e4, |
| 1564 | .clkr = { |
| 1565 | .enable_reg = 0x31e4, |
| 1566 | .enable_mask = BIT(0), |
| 1567 | .hw.init = &(struct clk_init_data){ |
| 1568 | .name = "camss_csi3_clk", |
| 1569 | .parent_names = (const char *[]){ |
| 1570 | "csi3_clk_src", |
| 1571 | }, |
| 1572 | .num_parents = 1, |
| 1573 | .flags = CLK_SET_RATE_PARENT, |
| 1574 | .ops = &clk_branch2_ops, |
| 1575 | }, |
| 1576 | }, |
| 1577 | }; |
| 1578 | |
| 1579 | static struct clk_branch camss_csi3phy_clk = { |
| 1580 | .halt_reg = 0x31f4, |
| 1581 | .clkr = { |
| 1582 | .enable_reg = 0x31f4, |
| 1583 | .enable_mask = BIT(0), |
| 1584 | .hw.init = &(struct clk_init_data){ |
| 1585 | .name = "camss_csi3phy_clk", |
| 1586 | .parent_names = (const char *[]){ |
| 1587 | "csi3_clk_src", |
| 1588 | }, |
| 1589 | .num_parents = 1, |
| 1590 | .flags = CLK_SET_RATE_PARENT, |
| 1591 | .ops = &clk_branch2_ops, |
| 1592 | }, |
| 1593 | }, |
| 1594 | }; |
| 1595 | |
| 1596 | static struct clk_branch camss_csi3pix_clk = { |
| 1597 | .halt_reg = 0x3214, |
| 1598 | .clkr = { |
| 1599 | .enable_reg = 0x3214, |
| 1600 | .enable_mask = BIT(0), |
| 1601 | .hw.init = &(struct clk_init_data){ |
| 1602 | .name = "camss_csi3pix_clk", |
| 1603 | .parent_names = (const char *[]){ |
| 1604 | "csi3_clk_src", |
| 1605 | }, |
| 1606 | .num_parents = 1, |
| 1607 | .flags = CLK_SET_RATE_PARENT, |
| 1608 | .ops = &clk_branch2_ops, |
| 1609 | }, |
| 1610 | }, |
| 1611 | }; |
| 1612 | |
| 1613 | static struct clk_branch camss_csi3rdi_clk = { |
| 1614 | .halt_reg = 0x3204, |
| 1615 | .clkr = { |
| 1616 | .enable_reg = 0x3204, |
| 1617 | .enable_mask = BIT(0), |
| 1618 | .hw.init = &(struct clk_init_data){ |
| 1619 | .name = "camss_csi3rdi_clk", |
| 1620 | .parent_names = (const char *[]){ |
| 1621 | "csi3_clk_src", |
| 1622 | }, |
| 1623 | .num_parents = 1, |
| 1624 | .flags = CLK_SET_RATE_PARENT, |
| 1625 | .ops = &clk_branch2_ops, |
| 1626 | }, |
| 1627 | }, |
| 1628 | }; |
| 1629 | |
| 1630 | static struct clk_branch camss_csi_vfe0_clk = { |
| 1631 | .halt_reg = 0x3704, |
| 1632 | .clkr = { |
| 1633 | .enable_reg = 0x3704, |
| 1634 | .enable_mask = BIT(0), |
| 1635 | .hw.init = &(struct clk_init_data){ |
| 1636 | .name = "camss_csi_vfe0_clk", |
| 1637 | .parent_names = (const char *[]){ |
| 1638 | "vfe0_clk_src", |
| 1639 | }, |
| 1640 | .num_parents = 1, |
| 1641 | .flags = CLK_SET_RATE_PARENT, |
| 1642 | .ops = &clk_branch2_ops, |
| 1643 | }, |
| 1644 | }, |
| 1645 | }; |
| 1646 | |
| 1647 | static struct clk_branch camss_csi_vfe1_clk = { |
| 1648 | .halt_reg = 0x3714, |
| 1649 | .clkr = { |
| 1650 | .enable_reg = 0x3714, |
| 1651 | .enable_mask = BIT(0), |
| 1652 | .hw.init = &(struct clk_init_data){ |
| 1653 | .name = "camss_csi_vfe1_clk", |
| 1654 | .parent_names = (const char *[]){ |
| 1655 | "vfe1_clk_src", |
| 1656 | }, |
| 1657 | .num_parents = 1, |
| 1658 | .flags = CLK_SET_RATE_PARENT, |
| 1659 | .ops = &clk_branch2_ops, |
| 1660 | }, |
| 1661 | }, |
| 1662 | }; |
| 1663 | |
| 1664 | static struct clk_branch camss_gp0_clk = { |
| 1665 | .halt_reg = 0x3444, |
| 1666 | .clkr = { |
| 1667 | .enable_reg = 0x3444, |
| 1668 | .enable_mask = BIT(0), |
| 1669 | .hw.init = &(struct clk_init_data){ |
| 1670 | .name = "camss_gp0_clk", |
| 1671 | .parent_names = (const char *[]){ |
| 1672 | "camss_gp0_clk_src", |
| 1673 | }, |
| 1674 | .num_parents = 1, |
| 1675 | .flags = CLK_SET_RATE_PARENT, |
| 1676 | .ops = &clk_branch2_ops, |
| 1677 | }, |
| 1678 | }, |
| 1679 | }; |
| 1680 | |
| 1681 | static struct clk_branch camss_gp1_clk = { |
| 1682 | .halt_reg = 0x3474, |
| 1683 | .clkr = { |
| 1684 | .enable_reg = 0x3474, |
| 1685 | .enable_mask = BIT(0), |
| 1686 | .hw.init = &(struct clk_init_data){ |
| 1687 | .name = "camss_gp1_clk", |
| 1688 | .parent_names = (const char *[]){ |
| 1689 | "camss_gp1_clk_src", |
| 1690 | }, |
| 1691 | .num_parents = 1, |
| 1692 | .flags = CLK_SET_RATE_PARENT, |
| 1693 | .ops = &clk_branch2_ops, |
| 1694 | }, |
| 1695 | }, |
| 1696 | }; |
| 1697 | |
| 1698 | static struct clk_branch camss_ispif_ahb_clk = { |
| 1699 | .halt_reg = 0x3224, |
| 1700 | .clkr = { |
| 1701 | .enable_reg = 0x3224, |
| 1702 | .enable_mask = BIT(0), |
| 1703 | .hw.init = &(struct clk_init_data){ |
| 1704 | .name = "camss_ispif_ahb_clk", |
| 1705 | .parent_names = (const char *[]){ |
| 1706 | "mmss_ahb_clk_src", |
| 1707 | }, |
| 1708 | .num_parents = 1, |
| 1709 | .flags = CLK_SET_RATE_PARENT, |
| 1710 | .ops = &clk_branch2_ops, |
| 1711 | }, |
| 1712 | }, |
| 1713 | }; |
| 1714 | |
| 1715 | static struct clk_branch camss_jpeg_jpeg0_clk = { |
| 1716 | .halt_reg = 0x35a8, |
| 1717 | .clkr = { |
| 1718 | .enable_reg = 0x35a8, |
| 1719 | .enable_mask = BIT(0), |
| 1720 | .hw.init = &(struct clk_init_data){ |
| 1721 | .name = "camss_jpeg_jpeg0_clk", |
| 1722 | .parent_names = (const char *[]){ |
| 1723 | "jpeg0_clk_src", |
| 1724 | }, |
| 1725 | .num_parents = 1, |
| 1726 | .flags = CLK_SET_RATE_PARENT, |
| 1727 | .ops = &clk_branch2_ops, |
| 1728 | }, |
| 1729 | }, |
| 1730 | }; |
| 1731 | |
| 1732 | static struct clk_branch camss_jpeg_jpeg1_clk = { |
| 1733 | .halt_reg = 0x35ac, |
| 1734 | .clkr = { |
| 1735 | .enable_reg = 0x35ac, |
| 1736 | .enable_mask = BIT(0), |
| 1737 | .hw.init = &(struct clk_init_data){ |
| 1738 | .name = "camss_jpeg_jpeg1_clk", |
| 1739 | .parent_names = (const char *[]){ |
| 1740 | "jpeg1_clk_src", |
| 1741 | }, |
| 1742 | .num_parents = 1, |
| 1743 | .flags = CLK_SET_RATE_PARENT, |
| 1744 | .ops = &clk_branch2_ops, |
| 1745 | }, |
| 1746 | }, |
| 1747 | }; |
| 1748 | |
| 1749 | static struct clk_branch camss_jpeg_jpeg2_clk = { |
| 1750 | .halt_reg = 0x35b0, |
| 1751 | .clkr = { |
| 1752 | .enable_reg = 0x35b0, |
| 1753 | .enable_mask = BIT(0), |
| 1754 | .hw.init = &(struct clk_init_data){ |
| 1755 | .name = "camss_jpeg_jpeg2_clk", |
| 1756 | .parent_names = (const char *[]){ |
| 1757 | "jpeg2_clk_src", |
| 1758 | }, |
| 1759 | .num_parents = 1, |
| 1760 | .flags = CLK_SET_RATE_PARENT, |
| 1761 | .ops = &clk_branch2_ops, |
| 1762 | }, |
| 1763 | }, |
| 1764 | }; |
| 1765 | |
| 1766 | static struct clk_branch camss_jpeg_jpeg_ahb_clk = { |
| 1767 | .halt_reg = 0x35b4, |
| 1768 | .clkr = { |
| 1769 | .enable_reg = 0x35b4, |
| 1770 | .enable_mask = BIT(0), |
| 1771 | .hw.init = &(struct clk_init_data){ |
| 1772 | .name = "camss_jpeg_jpeg_ahb_clk", |
| 1773 | .parent_names = (const char *[]){ |
| 1774 | "mmss_ahb_clk_src", |
| 1775 | }, |
| 1776 | .num_parents = 1, |
| 1777 | .ops = &clk_branch2_ops, |
| 1778 | }, |
| 1779 | }, |
| 1780 | }; |
| 1781 | |
| 1782 | static struct clk_branch camss_jpeg_jpeg_axi_clk = { |
| 1783 | .halt_reg = 0x35b8, |
| 1784 | .clkr = { |
| 1785 | .enable_reg = 0x35b8, |
| 1786 | .enable_mask = BIT(0), |
| 1787 | .hw.init = &(struct clk_init_data){ |
| 1788 | .name = "camss_jpeg_jpeg_axi_clk", |
| 1789 | .parent_names = (const char *[]){ |
| 1790 | "mmss_axi_clk_src", |
| 1791 | }, |
| 1792 | .num_parents = 1, |
| 1793 | .ops = &clk_branch2_ops, |
| 1794 | }, |
| 1795 | }, |
| 1796 | }; |
| 1797 | |
| 1798 | static struct clk_branch camss_mclk0_clk = { |
| 1799 | .halt_reg = 0x3384, |
| 1800 | .clkr = { |
| 1801 | .enable_reg = 0x3384, |
| 1802 | .enable_mask = BIT(0), |
| 1803 | .hw.init = &(struct clk_init_data){ |
| 1804 | .name = "camss_mclk0_clk", |
| 1805 | .parent_names = (const char *[]){ |
| 1806 | "mclk0_clk_src", |
| 1807 | }, |
| 1808 | .num_parents = 1, |
| 1809 | .flags = CLK_SET_RATE_PARENT, |
| 1810 | .ops = &clk_branch2_ops, |
| 1811 | }, |
| 1812 | }, |
| 1813 | }; |
| 1814 | |
| 1815 | static struct clk_branch camss_mclk1_clk = { |
| 1816 | .halt_reg = 0x33b4, |
| 1817 | .clkr = { |
| 1818 | .enable_reg = 0x33b4, |
| 1819 | .enable_mask = BIT(0), |
| 1820 | .hw.init = &(struct clk_init_data){ |
| 1821 | .name = "camss_mclk1_clk", |
| 1822 | .parent_names = (const char *[]){ |
| 1823 | "mclk1_clk_src", |
| 1824 | }, |
| 1825 | .num_parents = 1, |
| 1826 | .flags = CLK_SET_RATE_PARENT, |
| 1827 | .ops = &clk_branch2_ops, |
| 1828 | }, |
| 1829 | }, |
| 1830 | }; |
| 1831 | |
| 1832 | static struct clk_branch camss_mclk2_clk = { |
| 1833 | .halt_reg = 0x33e4, |
| 1834 | .clkr = { |
| 1835 | .enable_reg = 0x33e4, |
| 1836 | .enable_mask = BIT(0), |
| 1837 | .hw.init = &(struct clk_init_data){ |
| 1838 | .name = "camss_mclk2_clk", |
| 1839 | .parent_names = (const char *[]){ |
| 1840 | "mclk2_clk_src", |
| 1841 | }, |
| 1842 | .num_parents = 1, |
| 1843 | .flags = CLK_SET_RATE_PARENT, |
| 1844 | .ops = &clk_branch2_ops, |
| 1845 | }, |
| 1846 | }, |
| 1847 | }; |
| 1848 | |
| 1849 | static struct clk_branch camss_mclk3_clk = { |
| 1850 | .halt_reg = 0x3414, |
| 1851 | .clkr = { |
| 1852 | .enable_reg = 0x3414, |
| 1853 | .enable_mask = BIT(0), |
| 1854 | .hw.init = &(struct clk_init_data){ |
| 1855 | .name = "camss_mclk3_clk", |
| 1856 | .parent_names = (const char *[]){ |
| 1857 | "mclk3_clk_src", |
| 1858 | }, |
| 1859 | .num_parents = 1, |
| 1860 | .flags = CLK_SET_RATE_PARENT, |
| 1861 | .ops = &clk_branch2_ops, |
| 1862 | }, |
| 1863 | }, |
| 1864 | }; |
| 1865 | |
| 1866 | static struct clk_branch camss_micro_ahb_clk = { |
| 1867 | .halt_reg = 0x3494, |
| 1868 | .clkr = { |
| 1869 | .enable_reg = 0x3494, |
| 1870 | .enable_mask = BIT(0), |
| 1871 | .hw.init = &(struct clk_init_data){ |
| 1872 | .name = "camss_micro_ahb_clk", |
| 1873 | .parent_names = (const char *[]){ |
| 1874 | "mmss_ahb_clk_src", |
| 1875 | }, |
| 1876 | .num_parents = 1, |
| 1877 | .ops = &clk_branch2_ops, |
| 1878 | }, |
| 1879 | }, |
| 1880 | }; |
| 1881 | |
| 1882 | static struct clk_branch camss_phy0_csi0phytimer_clk = { |
| 1883 | .halt_reg = 0x3024, |
| 1884 | .clkr = { |
| 1885 | .enable_reg = 0x3024, |
| 1886 | .enable_mask = BIT(0), |
| 1887 | .hw.init = &(struct clk_init_data){ |
| 1888 | .name = "camss_phy0_csi0phytimer_clk", |
| 1889 | .parent_names = (const char *[]){ |
| 1890 | "csi0phytimer_clk_src", |
| 1891 | }, |
| 1892 | .num_parents = 1, |
| 1893 | .flags = CLK_SET_RATE_PARENT, |
| 1894 | .ops = &clk_branch2_ops, |
| 1895 | }, |
| 1896 | }, |
| 1897 | }; |
| 1898 | |
| 1899 | static struct clk_branch camss_phy1_csi1phytimer_clk = { |
| 1900 | .halt_reg = 0x3054, |
| 1901 | .clkr = { |
| 1902 | .enable_reg = 0x3054, |
| 1903 | .enable_mask = BIT(0), |
| 1904 | .hw.init = &(struct clk_init_data){ |
| 1905 | .name = "camss_phy1_csi1phytimer_clk", |
| 1906 | .parent_names = (const char *[]){ |
| 1907 | "csi1phytimer_clk_src", |
| 1908 | }, |
| 1909 | .num_parents = 1, |
| 1910 | .flags = CLK_SET_RATE_PARENT, |
| 1911 | .ops = &clk_branch2_ops, |
| 1912 | }, |
| 1913 | }, |
| 1914 | }; |
| 1915 | |
| 1916 | static struct clk_branch camss_phy2_csi2phytimer_clk = { |
| 1917 | .halt_reg = 0x3084, |
| 1918 | .clkr = { |
| 1919 | .enable_reg = 0x3084, |
| 1920 | .enable_mask = BIT(0), |
| 1921 | .hw.init = &(struct clk_init_data){ |
| 1922 | .name = "camss_phy2_csi2phytimer_clk", |
| 1923 | .parent_names = (const char *[]){ |
| 1924 | "csi2phytimer_clk_src", |
| 1925 | }, |
| 1926 | .num_parents = 1, |
| 1927 | .flags = CLK_SET_RATE_PARENT, |
| 1928 | .ops = &clk_branch2_ops, |
| 1929 | }, |
| 1930 | }, |
| 1931 | }; |
| 1932 | |
| 1933 | static struct clk_branch camss_top_ahb_clk = { |
| 1934 | .halt_reg = 0x3484, |
| 1935 | .clkr = { |
| 1936 | .enable_reg = 0x3484, |
| 1937 | .enable_mask = BIT(0), |
| 1938 | .hw.init = &(struct clk_init_data){ |
| 1939 | .name = "camss_top_ahb_clk", |
| 1940 | .parent_names = (const char *[]){ |
| 1941 | "mmss_ahb_clk_src", |
| 1942 | }, |
| 1943 | .num_parents = 1, |
| 1944 | .flags = CLK_SET_RATE_PARENT, |
| 1945 | .ops = &clk_branch2_ops, |
| 1946 | }, |
| 1947 | }, |
| 1948 | }; |
| 1949 | |
| 1950 | static struct clk_branch camss_vfe_cpp_ahb_clk = { |
| 1951 | .halt_reg = 0x36b4, |
| 1952 | .clkr = { |
| 1953 | .enable_reg = 0x36b4, |
| 1954 | .enable_mask = BIT(0), |
| 1955 | .hw.init = &(struct clk_init_data){ |
| 1956 | .name = "camss_vfe_cpp_ahb_clk", |
| 1957 | .parent_names = (const char *[]){ |
| 1958 | "mmss_ahb_clk_src", |
| 1959 | }, |
| 1960 | .num_parents = 1, |
| 1961 | .flags = CLK_SET_RATE_PARENT, |
| 1962 | .ops = &clk_branch2_ops, |
| 1963 | }, |
| 1964 | }, |
| 1965 | }; |
| 1966 | |
| 1967 | static struct clk_branch camss_vfe_cpp_clk = { |
| 1968 | .halt_reg = 0x36b0, |
| 1969 | .clkr = { |
| 1970 | .enable_reg = 0x36b0, |
| 1971 | .enable_mask = BIT(0), |
| 1972 | .hw.init = &(struct clk_init_data){ |
| 1973 | .name = "camss_vfe_cpp_clk", |
| 1974 | .parent_names = (const char *[]){ |
| 1975 | "cpp_clk_src", |
| 1976 | }, |
| 1977 | .num_parents = 1, |
| 1978 | .flags = CLK_SET_RATE_PARENT, |
| 1979 | .ops = &clk_branch2_ops, |
| 1980 | }, |
| 1981 | }, |
| 1982 | }; |
| 1983 | |
| 1984 | static struct clk_branch camss_vfe_vfe0_clk = { |
| 1985 | .halt_reg = 0x36a8, |
| 1986 | .clkr = { |
| 1987 | .enable_reg = 0x36a8, |
| 1988 | .enable_mask = BIT(0), |
| 1989 | .hw.init = &(struct clk_init_data){ |
| 1990 | .name = "camss_vfe_vfe0_clk", |
| 1991 | .parent_names = (const char *[]){ |
| 1992 | "vfe0_clk_src", |
| 1993 | }, |
| 1994 | .num_parents = 1, |
| 1995 | .flags = CLK_SET_RATE_PARENT, |
| 1996 | .ops = &clk_branch2_ops, |
| 1997 | }, |
| 1998 | }, |
| 1999 | }; |
| 2000 | |
| 2001 | static struct clk_branch camss_vfe_vfe1_clk = { |
| 2002 | .halt_reg = 0x36ac, |
| 2003 | .clkr = { |
| 2004 | .enable_reg = 0x36ac, |
| 2005 | .enable_mask = BIT(0), |
| 2006 | .hw.init = &(struct clk_init_data){ |
| 2007 | .name = "camss_vfe_vfe1_clk", |
| 2008 | .parent_names = (const char *[]){ |
| 2009 | "vfe1_clk_src", |
| 2010 | }, |
| 2011 | .num_parents = 1, |
| 2012 | .flags = CLK_SET_RATE_PARENT, |
| 2013 | .ops = &clk_branch2_ops, |
| 2014 | }, |
| 2015 | }, |
| 2016 | }; |
| 2017 | |
| 2018 | static struct clk_branch camss_vfe_vfe_ahb_clk = { |
| 2019 | .halt_reg = 0x36b8, |
| 2020 | .clkr = { |
| 2021 | .enable_reg = 0x36b8, |
| 2022 | .enable_mask = BIT(0), |
| 2023 | .hw.init = &(struct clk_init_data){ |
| 2024 | .name = "camss_vfe_vfe_ahb_clk", |
| 2025 | .parent_names = (const char *[]){ |
| 2026 | "mmss_ahb_clk_src", |
| 2027 | }, |
| 2028 | .num_parents = 1, |
| 2029 | .flags = CLK_SET_RATE_PARENT, |
| 2030 | .ops = &clk_branch2_ops, |
| 2031 | }, |
| 2032 | }, |
| 2033 | }; |
| 2034 | |
| 2035 | static struct clk_branch camss_vfe_vfe_axi_clk = { |
| 2036 | .halt_reg = 0x36bc, |
| 2037 | .clkr = { |
| 2038 | .enable_reg = 0x36bc, |
| 2039 | .enable_mask = BIT(0), |
| 2040 | .hw.init = &(struct clk_init_data){ |
| 2041 | .name = "camss_vfe_vfe_axi_clk", |
| 2042 | .parent_names = (const char *[]){ |
| 2043 | "mmss_axi_clk_src", |
| 2044 | }, |
| 2045 | .num_parents = 1, |
| 2046 | .flags = CLK_SET_RATE_PARENT, |
| 2047 | .ops = &clk_branch2_ops, |
| 2048 | }, |
| 2049 | }, |
| 2050 | }; |
| 2051 | |
| 2052 | static struct clk_branch mdss_ahb_clk = { |
| 2053 | .halt_reg = 0x2308, |
| 2054 | .clkr = { |
| 2055 | .enable_reg = 0x2308, |
| 2056 | .enable_mask = BIT(0), |
| 2057 | .hw.init = &(struct clk_init_data){ |
| 2058 | .name = "mdss_ahb_clk", |
| 2059 | .parent_names = (const char *[]){ |
| 2060 | "mmss_ahb_clk_src", |
| 2061 | }, |
| 2062 | .num_parents = 1, |
| 2063 | .flags = CLK_SET_RATE_PARENT, |
| 2064 | .ops = &clk_branch2_ops, |
| 2065 | }, |
| 2066 | }, |
| 2067 | }; |
| 2068 | |
| 2069 | static struct clk_branch mdss_axi_clk = { |
| 2070 | .halt_reg = 0x2310, |
| 2071 | .clkr = { |
| 2072 | .enable_reg = 0x2310, |
| 2073 | .enable_mask = BIT(0), |
| 2074 | .hw.init = &(struct clk_init_data){ |
| 2075 | .name = "mdss_axi_clk", |
| 2076 | .parent_names = (const char *[]){ |
| 2077 | "mmss_axi_clk_src", |
| 2078 | }, |
| 2079 | .num_parents = 1, |
| 2080 | .flags = CLK_SET_RATE_PARENT, |
| 2081 | .ops = &clk_branch2_ops, |
| 2082 | }, |
| 2083 | }, |
| 2084 | }; |
| 2085 | |
| 2086 | static struct clk_branch mdss_byte0_clk = { |
| 2087 | .halt_reg = 0x233c, |
| 2088 | .clkr = { |
| 2089 | .enable_reg = 0x233c, |
| 2090 | .enable_mask = BIT(0), |
| 2091 | .hw.init = &(struct clk_init_data){ |
| 2092 | .name = "mdss_byte0_clk", |
| 2093 | .parent_names = (const char *[]){ |
| 2094 | "byte0_clk_src", |
| 2095 | }, |
| 2096 | .num_parents = 1, |
| 2097 | .flags = CLK_SET_RATE_PARENT, |
| 2098 | .ops = &clk_branch2_ops, |
| 2099 | }, |
| 2100 | }, |
| 2101 | }; |
| 2102 | |
| 2103 | static struct clk_branch mdss_byte1_clk = { |
| 2104 | .halt_reg = 0x2340, |
| 2105 | .clkr = { |
| 2106 | .enable_reg = 0x2340, |
| 2107 | .enable_mask = BIT(0), |
| 2108 | .hw.init = &(struct clk_init_data){ |
| 2109 | .name = "mdss_byte1_clk", |
| 2110 | .parent_names = (const char *[]){ |
| 2111 | "byte1_clk_src", |
| 2112 | }, |
| 2113 | .num_parents = 1, |
| 2114 | .flags = CLK_SET_RATE_PARENT, |
| 2115 | .ops = &clk_branch2_ops, |
| 2116 | }, |
| 2117 | }, |
| 2118 | }; |
| 2119 | |
| 2120 | static struct clk_branch mdss_edpaux_clk = { |
| 2121 | .halt_reg = 0x2334, |
| 2122 | .clkr = { |
| 2123 | .enable_reg = 0x2334, |
| 2124 | .enable_mask = BIT(0), |
| 2125 | .hw.init = &(struct clk_init_data){ |
| 2126 | .name = "mdss_edpaux_clk", |
| 2127 | .parent_names = (const char *[]){ |
| 2128 | "edpaux_clk_src", |
| 2129 | }, |
| 2130 | .num_parents = 1, |
| 2131 | .flags = CLK_SET_RATE_PARENT, |
| 2132 | .ops = &clk_branch2_ops, |
| 2133 | }, |
| 2134 | }, |
| 2135 | }; |
| 2136 | |
| 2137 | static struct clk_branch mdss_edplink_clk = { |
| 2138 | .halt_reg = 0x2330, |
| 2139 | .clkr = { |
| 2140 | .enable_reg = 0x2330, |
| 2141 | .enable_mask = BIT(0), |
| 2142 | .hw.init = &(struct clk_init_data){ |
| 2143 | .name = "mdss_edplink_clk", |
| 2144 | .parent_names = (const char *[]){ |
| 2145 | "edplink_clk_src", |
| 2146 | }, |
| 2147 | .num_parents = 1, |
| 2148 | .flags = CLK_SET_RATE_PARENT, |
| 2149 | .ops = &clk_branch2_ops, |
| 2150 | }, |
| 2151 | }, |
| 2152 | }; |
| 2153 | |
| 2154 | static struct clk_branch mdss_edppixel_clk = { |
| 2155 | .halt_reg = 0x232c, |
| 2156 | .clkr = { |
| 2157 | .enable_reg = 0x232c, |
| 2158 | .enable_mask = BIT(0), |
| 2159 | .hw.init = &(struct clk_init_data){ |
| 2160 | .name = "mdss_edppixel_clk", |
| 2161 | .parent_names = (const char *[]){ |
| 2162 | "edppixel_clk_src", |
| 2163 | }, |
| 2164 | .num_parents = 1, |
| 2165 | .flags = CLK_SET_RATE_PARENT, |
| 2166 | .ops = &clk_branch2_ops, |
| 2167 | }, |
| 2168 | }, |
| 2169 | }; |
| 2170 | |
| 2171 | static struct clk_branch mdss_esc0_clk = { |
| 2172 | .halt_reg = 0x2344, |
| 2173 | .clkr = { |
| 2174 | .enable_reg = 0x2344, |
| 2175 | .enable_mask = BIT(0), |
| 2176 | .hw.init = &(struct clk_init_data){ |
| 2177 | .name = "mdss_esc0_clk", |
| 2178 | .parent_names = (const char *[]){ |
| 2179 | "esc0_clk_src", |
| 2180 | }, |
| 2181 | .num_parents = 1, |
| 2182 | .flags = CLK_SET_RATE_PARENT, |
| 2183 | .ops = &clk_branch2_ops, |
| 2184 | }, |
| 2185 | }, |
| 2186 | }; |
| 2187 | |
| 2188 | static struct clk_branch mdss_esc1_clk = { |
| 2189 | .halt_reg = 0x2348, |
| 2190 | .clkr = { |
| 2191 | .enable_reg = 0x2348, |
| 2192 | .enable_mask = BIT(0), |
| 2193 | .hw.init = &(struct clk_init_data){ |
| 2194 | .name = "mdss_esc1_clk", |
| 2195 | .parent_names = (const char *[]){ |
| 2196 | "esc1_clk_src", |
| 2197 | }, |
| 2198 | .num_parents = 1, |
| 2199 | .flags = CLK_SET_RATE_PARENT, |
| 2200 | .ops = &clk_branch2_ops, |
| 2201 | }, |
| 2202 | }, |
| 2203 | }; |
| 2204 | |
| 2205 | static struct clk_branch mdss_extpclk_clk = { |
| 2206 | .halt_reg = 0x2324, |
| 2207 | .clkr = { |
| 2208 | .enable_reg = 0x2324, |
| 2209 | .enable_mask = BIT(0), |
| 2210 | .hw.init = &(struct clk_init_data){ |
| 2211 | .name = "mdss_extpclk_clk", |
| 2212 | .parent_names = (const char *[]){ |
| 2213 | "extpclk_clk_src", |
| 2214 | }, |
| 2215 | .num_parents = 1, |
| 2216 | .flags = CLK_SET_RATE_PARENT, |
| 2217 | .ops = &clk_branch2_ops, |
| 2218 | }, |
| 2219 | }, |
| 2220 | }; |
| 2221 | |
| 2222 | static struct clk_branch mdss_hdmi_ahb_clk = { |
| 2223 | .halt_reg = 0x230c, |
| 2224 | .clkr = { |
| 2225 | .enable_reg = 0x230c, |
| 2226 | .enable_mask = BIT(0), |
| 2227 | .hw.init = &(struct clk_init_data){ |
| 2228 | .name = "mdss_hdmi_ahb_clk", |
| 2229 | .parent_names = (const char *[]){ |
| 2230 | "mmss_ahb_clk_src", |
| 2231 | }, |
| 2232 | .num_parents = 1, |
| 2233 | .flags = CLK_SET_RATE_PARENT, |
| 2234 | .ops = &clk_branch2_ops, |
| 2235 | }, |
| 2236 | }, |
| 2237 | }; |
| 2238 | |
| 2239 | static struct clk_branch mdss_hdmi_clk = { |
| 2240 | .halt_reg = 0x2338, |
| 2241 | .clkr = { |
| 2242 | .enable_reg = 0x2338, |
| 2243 | .enable_mask = BIT(0), |
| 2244 | .hw.init = &(struct clk_init_data){ |
| 2245 | .name = "mdss_hdmi_clk", |
| 2246 | .parent_names = (const char *[]){ |
| 2247 | "hdmi_clk_src", |
| 2248 | }, |
| 2249 | .num_parents = 1, |
| 2250 | .flags = CLK_SET_RATE_PARENT, |
| 2251 | .ops = &clk_branch2_ops, |
| 2252 | }, |
| 2253 | }, |
| 2254 | }; |
| 2255 | |
| 2256 | static struct clk_branch mdss_mdp_clk = { |
| 2257 | .halt_reg = 0x231c, |
| 2258 | .clkr = { |
| 2259 | .enable_reg = 0x231c, |
| 2260 | .enable_mask = BIT(0), |
| 2261 | .hw.init = &(struct clk_init_data){ |
| 2262 | .name = "mdss_mdp_clk", |
| 2263 | .parent_names = (const char *[]){ |
| 2264 | "mdp_clk_src", |
| 2265 | }, |
| 2266 | .num_parents = 1, |
| 2267 | .flags = CLK_SET_RATE_PARENT, |
| 2268 | .ops = &clk_branch2_ops, |
| 2269 | }, |
| 2270 | }, |
| 2271 | }; |
| 2272 | |
| 2273 | static struct clk_branch mdss_mdp_lut_clk = { |
| 2274 | .halt_reg = 0x2320, |
| 2275 | .clkr = { |
| 2276 | .enable_reg = 0x2320, |
| 2277 | .enable_mask = BIT(0), |
| 2278 | .hw.init = &(struct clk_init_data){ |
| 2279 | .name = "mdss_mdp_lut_clk", |
| 2280 | .parent_names = (const char *[]){ |
| 2281 | "mdp_clk_src", |
| 2282 | }, |
| 2283 | .num_parents = 1, |
| 2284 | .flags = CLK_SET_RATE_PARENT, |
| 2285 | .ops = &clk_branch2_ops, |
| 2286 | }, |
| 2287 | }, |
| 2288 | }; |
| 2289 | |
| 2290 | static struct clk_branch mdss_pclk0_clk = { |
| 2291 | .halt_reg = 0x2314, |
| 2292 | .clkr = { |
| 2293 | .enable_reg = 0x2314, |
| 2294 | .enable_mask = BIT(0), |
| 2295 | .hw.init = &(struct clk_init_data){ |
| 2296 | .name = "mdss_pclk0_clk", |
| 2297 | .parent_names = (const char *[]){ |
| 2298 | "pclk0_clk_src", |
| 2299 | }, |
| 2300 | .num_parents = 1, |
| 2301 | .flags = CLK_SET_RATE_PARENT, |
| 2302 | .ops = &clk_branch2_ops, |
| 2303 | }, |
| 2304 | }, |
| 2305 | }; |
| 2306 | |
| 2307 | static struct clk_branch mdss_pclk1_clk = { |
| 2308 | .halt_reg = 0x2318, |
| 2309 | .clkr = { |
| 2310 | .enable_reg = 0x2318, |
| 2311 | .enable_mask = BIT(0), |
| 2312 | .hw.init = &(struct clk_init_data){ |
| 2313 | .name = "mdss_pclk1_clk", |
| 2314 | .parent_names = (const char *[]){ |
| 2315 | "pclk1_clk_src", |
| 2316 | }, |
| 2317 | .num_parents = 1, |
| 2318 | .flags = CLK_SET_RATE_PARENT, |
| 2319 | .ops = &clk_branch2_ops, |
| 2320 | }, |
| 2321 | }, |
| 2322 | }; |
| 2323 | |
| 2324 | static struct clk_branch mdss_vsync_clk = { |
| 2325 | .halt_reg = 0x2328, |
| 2326 | .clkr = { |
| 2327 | .enable_reg = 0x2328, |
| 2328 | .enable_mask = BIT(0), |
| 2329 | .hw.init = &(struct clk_init_data){ |
| 2330 | .name = "mdss_vsync_clk", |
| 2331 | .parent_names = (const char *[]){ |
| 2332 | "vsync_clk_src", |
| 2333 | }, |
| 2334 | .num_parents = 1, |
| 2335 | .flags = CLK_SET_RATE_PARENT, |
| 2336 | .ops = &clk_branch2_ops, |
| 2337 | }, |
| 2338 | }, |
| 2339 | }; |
| 2340 | |
| 2341 | static struct clk_branch mmss_rbcpr_ahb_clk = { |
| 2342 | .halt_reg = 0x4088, |
| 2343 | .clkr = { |
| 2344 | .enable_reg = 0x4088, |
| 2345 | .enable_mask = BIT(0), |
| 2346 | .hw.init = &(struct clk_init_data){ |
| 2347 | .name = "mmss_rbcpr_ahb_clk", |
| 2348 | .parent_names = (const char *[]){ |
| 2349 | "mmss_ahb_clk_src", |
| 2350 | }, |
| 2351 | .num_parents = 1, |
| 2352 | .flags = CLK_SET_RATE_PARENT, |
| 2353 | .ops = &clk_branch2_ops, |
| 2354 | }, |
| 2355 | }, |
| 2356 | }; |
| 2357 | |
| 2358 | static struct clk_branch mmss_rbcpr_clk = { |
| 2359 | .halt_reg = 0x4084, |
| 2360 | .clkr = { |
| 2361 | .enable_reg = 0x4084, |
| 2362 | .enable_mask = BIT(0), |
| 2363 | .hw.init = &(struct clk_init_data){ |
| 2364 | .name = "mmss_rbcpr_clk", |
| 2365 | .parent_names = (const char *[]){ |
| 2366 | "rbcpr_clk_src", |
| 2367 | }, |
| 2368 | .num_parents = 1, |
| 2369 | .flags = CLK_SET_RATE_PARENT, |
| 2370 | .ops = &clk_branch2_ops, |
| 2371 | }, |
| 2372 | }, |
| 2373 | }; |
| 2374 | |
| 2375 | static struct clk_branch mmss_spdm_ahb_clk = { |
| 2376 | .halt_reg = 0x0230, |
| 2377 | .clkr = { |
| 2378 | .enable_reg = 0x0230, |
| 2379 | .enable_mask = BIT(0), |
| 2380 | .hw.init = &(struct clk_init_data){ |
| 2381 | .name = "mmss_spdm_ahb_clk", |
| 2382 | .parent_names = (const char *[]){ |
| 2383 | "mmss_spdm_ahb_div_clk", |
| 2384 | }, |
| 2385 | .num_parents = 1, |
| 2386 | .flags = CLK_SET_RATE_PARENT, |
| 2387 | .ops = &clk_branch2_ops, |
| 2388 | }, |
| 2389 | }, |
| 2390 | }; |
| 2391 | |
| 2392 | static struct clk_branch mmss_spdm_axi_clk = { |
| 2393 | .halt_reg = 0x0210, |
| 2394 | .clkr = { |
| 2395 | .enable_reg = 0x0210, |
| 2396 | .enable_mask = BIT(0), |
| 2397 | .hw.init = &(struct clk_init_data){ |
| 2398 | .name = "mmss_spdm_axi_clk", |
| 2399 | .parent_names = (const char *[]){ |
| 2400 | "mmss_spdm_axi_div_clk", |
| 2401 | }, |
| 2402 | .num_parents = 1, |
| 2403 | .flags = CLK_SET_RATE_PARENT, |
| 2404 | .ops = &clk_branch2_ops, |
| 2405 | }, |
| 2406 | }, |
| 2407 | }; |
| 2408 | |
| 2409 | static struct clk_branch mmss_spdm_csi0_clk = { |
| 2410 | .halt_reg = 0x023c, |
| 2411 | .clkr = { |
| 2412 | .enable_reg = 0x023c, |
| 2413 | .enable_mask = BIT(0), |
| 2414 | .hw.init = &(struct clk_init_data){ |
| 2415 | .name = "mmss_spdm_csi0_clk", |
| 2416 | .parent_names = (const char *[]){ |
| 2417 | "mmss_spdm_csi0_div_clk", |
| 2418 | }, |
| 2419 | .num_parents = 1, |
| 2420 | .flags = CLK_SET_RATE_PARENT, |
| 2421 | .ops = &clk_branch2_ops, |
| 2422 | }, |
| 2423 | }, |
| 2424 | }; |
| 2425 | |
| 2426 | static struct clk_branch mmss_spdm_gfx3d_clk = { |
| 2427 | .halt_reg = 0x022c, |
| 2428 | .clkr = { |
| 2429 | .enable_reg = 0x022c, |
| 2430 | .enable_mask = BIT(0), |
| 2431 | .hw.init = &(struct clk_init_data){ |
| 2432 | .name = "mmss_spdm_gfx3d_clk", |
| 2433 | .parent_names = (const char *[]){ |
| 2434 | "mmss_spdm_gfx3d_div_clk", |
| 2435 | }, |
| 2436 | .num_parents = 1, |
| 2437 | .flags = CLK_SET_RATE_PARENT, |
| 2438 | .ops = &clk_branch2_ops, |
| 2439 | }, |
| 2440 | }, |
| 2441 | }; |
| 2442 | |
| 2443 | static struct clk_branch mmss_spdm_jpeg0_clk = { |
| 2444 | .halt_reg = 0x0204, |
| 2445 | .clkr = { |
| 2446 | .enable_reg = 0x0204, |
| 2447 | .enable_mask = BIT(0), |
| 2448 | .hw.init = &(struct clk_init_data){ |
| 2449 | .name = "mmss_spdm_jpeg0_clk", |
| 2450 | .parent_names = (const char *[]){ |
| 2451 | "mmss_spdm_jpeg0_div_clk", |
| 2452 | }, |
| 2453 | .num_parents = 1, |
| 2454 | .flags = CLK_SET_RATE_PARENT, |
| 2455 | .ops = &clk_branch2_ops, |
| 2456 | }, |
| 2457 | }, |
| 2458 | }; |
| 2459 | |
| 2460 | static struct clk_branch mmss_spdm_jpeg1_clk = { |
| 2461 | .halt_reg = 0x0208, |
| 2462 | .clkr = { |
| 2463 | .enable_reg = 0x0208, |
| 2464 | .enable_mask = BIT(0), |
| 2465 | .hw.init = &(struct clk_init_data){ |
| 2466 | .name = "mmss_spdm_jpeg1_clk", |
| 2467 | .parent_names = (const char *[]){ |
| 2468 | "mmss_spdm_jpeg1_div_clk", |
| 2469 | }, |
| 2470 | .num_parents = 1, |
| 2471 | .flags = CLK_SET_RATE_PARENT, |
| 2472 | .ops = &clk_branch2_ops, |
| 2473 | }, |
| 2474 | }, |
| 2475 | }; |
| 2476 | |
| 2477 | static struct clk_branch mmss_spdm_jpeg2_clk = { |
| 2478 | .halt_reg = 0x0224, |
| 2479 | .clkr = { |
| 2480 | .enable_reg = 0x0224, |
| 2481 | .enable_mask = BIT(0), |
| 2482 | .hw.init = &(struct clk_init_data){ |
| 2483 | .name = "mmss_spdm_jpeg2_clk", |
| 2484 | .parent_names = (const char *[]){ |
| 2485 | "mmss_spdm_jpeg2_div_clk", |
| 2486 | }, |
| 2487 | .num_parents = 1, |
| 2488 | .flags = CLK_SET_RATE_PARENT, |
| 2489 | .ops = &clk_branch2_ops, |
| 2490 | }, |
| 2491 | }, |
| 2492 | }; |
| 2493 | |
| 2494 | static struct clk_branch mmss_spdm_mdp_clk = { |
| 2495 | .halt_reg = 0x020c, |
| 2496 | .clkr = { |
| 2497 | .enable_reg = 0x020c, |
| 2498 | .enable_mask = BIT(0), |
| 2499 | .hw.init = &(struct clk_init_data){ |
| 2500 | .name = "mmss_spdm_mdp_clk", |
| 2501 | .parent_names = (const char *[]){ |
| 2502 | "mmss_spdm_mdp_div_clk", |
| 2503 | }, |
| 2504 | .num_parents = 1, |
| 2505 | .flags = CLK_SET_RATE_PARENT, |
| 2506 | .ops = &clk_branch2_ops, |
| 2507 | }, |
| 2508 | }, |
| 2509 | }; |
| 2510 | |
| 2511 | static struct clk_branch mmss_spdm_pclk0_clk = { |
| 2512 | .halt_reg = 0x0234, |
| 2513 | .clkr = { |
| 2514 | .enable_reg = 0x0234, |
| 2515 | .enable_mask = BIT(0), |
| 2516 | .hw.init = &(struct clk_init_data){ |
| 2517 | .name = "mmss_spdm_pclk0_clk", |
| 2518 | .parent_names = (const char *[]){ |
| 2519 | "mmss_spdm_pclk0_div_clk", |
| 2520 | }, |
| 2521 | .num_parents = 1, |
| 2522 | .flags = CLK_SET_RATE_PARENT, |
| 2523 | .ops = &clk_branch2_ops, |
| 2524 | }, |
| 2525 | }, |
| 2526 | }; |
| 2527 | |
| 2528 | static struct clk_branch mmss_spdm_pclk1_clk = { |
| 2529 | .halt_reg = 0x0228, |
| 2530 | .clkr = { |
| 2531 | .enable_reg = 0x0228, |
| 2532 | .enable_mask = BIT(0), |
| 2533 | .hw.init = &(struct clk_init_data){ |
| 2534 | .name = "mmss_spdm_pclk1_clk", |
| 2535 | .parent_names = (const char *[]){ |
| 2536 | "mmss_spdm_pclk1_div_clk", |
| 2537 | }, |
| 2538 | .num_parents = 1, |
| 2539 | .flags = CLK_SET_RATE_PARENT, |
| 2540 | .ops = &clk_branch2_ops, |
| 2541 | }, |
| 2542 | }, |
| 2543 | }; |
| 2544 | |
| 2545 | static struct clk_branch mmss_spdm_vcodec0_clk = { |
| 2546 | .halt_reg = 0x0214, |
| 2547 | .clkr = { |
| 2548 | .enable_reg = 0x0214, |
| 2549 | .enable_mask = BIT(0), |
| 2550 | .hw.init = &(struct clk_init_data){ |
| 2551 | .name = "mmss_spdm_vcodec0_clk", |
| 2552 | .parent_names = (const char *[]){ |
| 2553 | "mmss_spdm_vcodec0_div_clk", |
| 2554 | }, |
| 2555 | .num_parents = 1, |
| 2556 | .flags = CLK_SET_RATE_PARENT, |
| 2557 | .ops = &clk_branch2_ops, |
| 2558 | }, |
| 2559 | }, |
| 2560 | }; |
| 2561 | |
| 2562 | static struct clk_branch mmss_spdm_vfe0_clk = { |
| 2563 | .halt_reg = 0x0218, |
| 2564 | .clkr = { |
| 2565 | .enable_reg = 0x0218, |
| 2566 | .enable_mask = BIT(0), |
| 2567 | .hw.init = &(struct clk_init_data){ |
| 2568 | .name = "mmss_spdm_vfe0_clk", |
| 2569 | .parent_names = (const char *[]){ |
| 2570 | "mmss_spdm_vfe0_div_clk", |
| 2571 | }, |
| 2572 | .num_parents = 1, |
| 2573 | .flags = CLK_SET_RATE_PARENT, |
| 2574 | .ops = &clk_branch2_ops, |
| 2575 | }, |
| 2576 | }, |
| 2577 | }; |
| 2578 | |
| 2579 | static struct clk_branch mmss_spdm_vfe1_clk = { |
| 2580 | .halt_reg = 0x021c, |
| 2581 | .clkr = { |
| 2582 | .enable_reg = 0x021c, |
| 2583 | .enable_mask = BIT(0), |
| 2584 | .hw.init = &(struct clk_init_data){ |
| 2585 | .name = "mmss_spdm_vfe1_clk", |
| 2586 | .parent_names = (const char *[]){ |
| 2587 | "mmss_spdm_vfe1_div_clk", |
| 2588 | }, |
| 2589 | .num_parents = 1, |
| 2590 | .flags = CLK_SET_RATE_PARENT, |
| 2591 | .ops = &clk_branch2_ops, |
| 2592 | }, |
| 2593 | }, |
| 2594 | }; |
| 2595 | |
| 2596 | static struct clk_branch mmss_spdm_rm_axi_clk = { |
| 2597 | .halt_reg = 0x0304, |
| 2598 | .clkr = { |
| 2599 | .enable_reg = 0x0304, |
| 2600 | .enable_mask = BIT(0), |
| 2601 | .hw.init = &(struct clk_init_data){ |
| 2602 | .name = "mmss_spdm_rm_axi_clk", |
| 2603 | .parent_names = (const char *[]){ |
| 2604 | "mmss_axi_clk_src", |
| 2605 | }, |
| 2606 | .num_parents = 1, |
| 2607 | .flags = CLK_SET_RATE_PARENT, |
| 2608 | .ops = &clk_branch2_ops, |
| 2609 | }, |
| 2610 | }, |
| 2611 | }; |
| 2612 | |
| 2613 | static struct clk_branch mmss_spdm_rm_ocmemnoc_clk = { |
| 2614 | .halt_reg = 0x0308, |
| 2615 | .clkr = { |
| 2616 | .enable_reg = 0x0308, |
| 2617 | .enable_mask = BIT(0), |
| 2618 | .hw.init = &(struct clk_init_data){ |
| 2619 | .name = "mmss_spdm_rm_ocmemnoc_clk", |
| 2620 | .parent_names = (const char *[]){ |
| 2621 | "ocmemnoc_clk_src", |
| 2622 | }, |
| 2623 | .num_parents = 1, |
| 2624 | .flags = CLK_SET_RATE_PARENT, |
| 2625 | .ops = &clk_branch2_ops, |
| 2626 | }, |
| 2627 | }, |
| 2628 | }; |
| 2629 | |
| 2630 | |
| 2631 | static struct clk_branch mmss_misc_ahb_clk = { |
| 2632 | .halt_reg = 0x502c, |
| 2633 | .clkr = { |
| 2634 | .enable_reg = 0x502c, |
| 2635 | .enable_mask = BIT(0), |
| 2636 | .hw.init = &(struct clk_init_data){ |
| 2637 | .name = "mmss_misc_ahb_clk", |
| 2638 | .parent_names = (const char *[]){ |
| 2639 | "mmss_ahb_clk_src", |
| 2640 | }, |
| 2641 | .num_parents = 1, |
| 2642 | .flags = CLK_SET_RATE_PARENT, |
| 2643 | .ops = &clk_branch2_ops, |
| 2644 | }, |
| 2645 | }, |
| 2646 | }; |
| 2647 | |
| 2648 | static struct clk_branch mmss_mmssnoc_ahb_clk = { |
| 2649 | .halt_reg = 0x5024, |
| 2650 | .clkr = { |
| 2651 | .enable_reg = 0x5024, |
| 2652 | .enable_mask = BIT(0), |
| 2653 | .hw.init = &(struct clk_init_data){ |
| 2654 | .name = "mmss_mmssnoc_ahb_clk", |
| 2655 | .parent_names = (const char *[]){ |
| 2656 | "mmss_ahb_clk_src", |
| 2657 | }, |
| 2658 | .num_parents = 1, |
| 2659 | .ops = &clk_branch2_ops, |
| 2660 | .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, |
| 2661 | }, |
| 2662 | }, |
| 2663 | }; |
| 2664 | |
| 2665 | static struct clk_branch mmss_mmssnoc_bto_ahb_clk = { |
| 2666 | .halt_reg = 0x5028, |
| 2667 | .clkr = { |
| 2668 | .enable_reg = 0x5028, |
| 2669 | .enable_mask = BIT(0), |
| 2670 | .hw.init = &(struct clk_init_data){ |
| 2671 | .name = "mmss_mmssnoc_bto_ahb_clk", |
| 2672 | .parent_names = (const char *[]){ |
| 2673 | "mmss_ahb_clk_src", |
| 2674 | }, |
| 2675 | .num_parents = 1, |
| 2676 | .ops = &clk_branch2_ops, |
| 2677 | .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, |
| 2678 | }, |
| 2679 | }, |
| 2680 | }; |
| 2681 | |
| 2682 | static struct clk_branch mmss_mmssnoc_axi_clk = { |
| 2683 | .halt_reg = 0x506c, |
| 2684 | .clkr = { |
| 2685 | .enable_reg = 0x506c, |
| 2686 | .enable_mask = BIT(0), |
| 2687 | .hw.init = &(struct clk_init_data){ |
| 2688 | .name = "mmss_mmssnoc_axi_clk", |
| 2689 | .parent_names = (const char *[]){ |
| 2690 | "mmss_axi_clk_src", |
| 2691 | }, |
| 2692 | .num_parents = 1, |
| 2693 | .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, |
| 2694 | .ops = &clk_branch2_ops, |
| 2695 | }, |
| 2696 | }, |
| 2697 | }; |
| 2698 | |
| 2699 | static struct clk_branch mmss_s0_axi_clk = { |
| 2700 | .halt_reg = 0x5064, |
| 2701 | .clkr = { |
| 2702 | .enable_reg = 0x5064, |
| 2703 | .enable_mask = BIT(0), |
| 2704 | .hw.init = &(struct clk_init_data){ |
| 2705 | .name = "mmss_s0_axi_clk", |
| 2706 | .parent_names = (const char *[]){ |
| 2707 | "mmss_axi_clk_src", |
| 2708 | }, |
| 2709 | .num_parents = 1, |
| 2710 | .ops = &clk_branch2_ops, |
| 2711 | .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, |
| 2712 | }, |
| 2713 | }, |
| 2714 | }; |
| 2715 | |
| 2716 | static struct clk_branch ocmemcx_ahb_clk = { |
| 2717 | .halt_reg = 0x405c, |
| 2718 | .clkr = { |
| 2719 | .enable_reg = 0x405c, |
| 2720 | .enable_mask = BIT(0), |
| 2721 | .hw.init = &(struct clk_init_data){ |
| 2722 | .name = "ocmemcx_ahb_clk", |
| 2723 | .parent_names = (const char *[]){ |
| 2724 | "mmss_ahb_clk_src", |
| 2725 | }, |
| 2726 | .num_parents = 1, |
| 2727 | .flags = CLK_SET_RATE_PARENT, |
| 2728 | .ops = &clk_branch2_ops, |
| 2729 | }, |
| 2730 | }, |
| 2731 | }; |
| 2732 | |
| 2733 | static struct clk_branch ocmemcx_ocmemnoc_clk = { |
| 2734 | .halt_reg = 0x4058, |
| 2735 | .clkr = { |
| 2736 | .enable_reg = 0x4058, |
| 2737 | .enable_mask = BIT(0), |
| 2738 | .hw.init = &(struct clk_init_data){ |
| 2739 | .name = "ocmemcx_ocmemnoc_clk", |
| 2740 | .parent_names = (const char *[]){ |
| 2741 | "ocmemnoc_clk_src", |
| 2742 | }, |
| 2743 | .num_parents = 1, |
| 2744 | .flags = CLK_SET_RATE_PARENT, |
| 2745 | .ops = &clk_branch2_ops, |
| 2746 | }, |
| 2747 | }, |
| 2748 | }; |
| 2749 | |
| 2750 | static struct clk_branch oxili_ocmemgx_clk = { |
| 2751 | .halt_reg = 0x402c, |
| 2752 | .clkr = { |
| 2753 | .enable_reg = 0x402c, |
| 2754 | .enable_mask = BIT(0), |
| 2755 | .hw.init = &(struct clk_init_data){ |
| 2756 | .name = "oxili_ocmemgx_clk", |
| 2757 | .parent_names = (const char *[]){ |
| 2758 | "gfx3d_clk_src", |
| 2759 | }, |
| 2760 | .num_parents = 1, |
| 2761 | .flags = CLK_SET_RATE_PARENT, |
| 2762 | .ops = &clk_branch2_ops, |
| 2763 | }, |
| 2764 | }, |
| 2765 | }; |
| 2766 | |
| 2767 | static struct clk_branch oxili_gfx3d_clk = { |
| 2768 | .halt_reg = 0x4028, |
| 2769 | .clkr = { |
| 2770 | .enable_reg = 0x4028, |
| 2771 | .enable_mask = BIT(0), |
| 2772 | .hw.init = &(struct clk_init_data){ |
| 2773 | .name = "oxili_gfx3d_clk", |
| 2774 | .parent_names = (const char *[]){ |
| 2775 | "gfx3d_clk_src", |
| 2776 | }, |
| 2777 | .num_parents = 1, |
| 2778 | .flags = CLK_SET_RATE_PARENT, |
| 2779 | .ops = &clk_branch2_ops, |
| 2780 | }, |
| 2781 | }, |
| 2782 | }; |
| 2783 | |
| 2784 | static struct clk_branch oxili_rbbmtimer_clk = { |
| 2785 | .halt_reg = 0x40b0, |
| 2786 | .clkr = { |
| 2787 | .enable_reg = 0x40b0, |
| 2788 | .enable_mask = BIT(0), |
| 2789 | .hw.init = &(struct clk_init_data){ |
| 2790 | .name = "oxili_rbbmtimer_clk", |
| 2791 | .parent_names = (const char *[]){ |
| 2792 | "rbbmtimer_clk_src", |
| 2793 | }, |
| 2794 | .num_parents = 1, |
| 2795 | .flags = CLK_SET_RATE_PARENT, |
| 2796 | .ops = &clk_branch2_ops, |
| 2797 | }, |
| 2798 | }, |
| 2799 | }; |
| 2800 | |
| 2801 | static struct clk_branch oxilicx_ahb_clk = { |
| 2802 | .halt_reg = 0x403c, |
| 2803 | .clkr = { |
| 2804 | .enable_reg = 0x403c, |
| 2805 | .enable_mask = BIT(0), |
| 2806 | .hw.init = &(struct clk_init_data){ |
| 2807 | .name = "oxilicx_ahb_clk", |
| 2808 | .parent_names = (const char *[]){ |
| 2809 | "mmss_ahb_clk_src", |
| 2810 | }, |
| 2811 | .num_parents = 1, |
| 2812 | .flags = CLK_SET_RATE_PARENT, |
| 2813 | .ops = &clk_branch2_ops, |
| 2814 | }, |
| 2815 | }, |
| 2816 | }; |
| 2817 | |
| 2818 | static struct clk_branch venus0_ahb_clk = { |
| 2819 | .halt_reg = 0x1030, |
| 2820 | .clkr = { |
| 2821 | .enable_reg = 0x1030, |
| 2822 | .enable_mask = BIT(0), |
| 2823 | .hw.init = &(struct clk_init_data){ |
| 2824 | .name = "venus0_ahb_clk", |
| 2825 | .parent_names = (const char *[]){ |
| 2826 | "mmss_ahb_clk_src", |
| 2827 | }, |
| 2828 | .num_parents = 1, |
| 2829 | .flags = CLK_SET_RATE_PARENT, |
| 2830 | .ops = &clk_branch2_ops, |
| 2831 | }, |
| 2832 | }, |
| 2833 | }; |
| 2834 | |
| 2835 | static struct clk_branch venus0_axi_clk = { |
| 2836 | .halt_reg = 0x1034, |
| 2837 | .clkr = { |
| 2838 | .enable_reg = 0x1034, |
| 2839 | .enable_mask = BIT(0), |
| 2840 | .hw.init = &(struct clk_init_data){ |
| 2841 | .name = "venus0_axi_clk", |
| 2842 | .parent_names = (const char *[]){ |
| 2843 | "mmss_axi_clk_src", |
| 2844 | }, |
| 2845 | .num_parents = 1, |
| 2846 | .flags = CLK_SET_RATE_PARENT, |
| 2847 | .ops = &clk_branch2_ops, |
| 2848 | }, |
| 2849 | }, |
| 2850 | }; |
| 2851 | |
| 2852 | static struct clk_branch venus0_core0_vcodec_clk = { |
| 2853 | .halt_reg = 0x1048, |
| 2854 | .clkr = { |
| 2855 | .enable_reg = 0x1048, |
| 2856 | .enable_mask = BIT(0), |
| 2857 | .hw.init = &(struct clk_init_data){ |
| 2858 | .name = "venus0_core0_vcodec_clk", |
| 2859 | .parent_names = (const char *[]){ |
| 2860 | "vcodec0_clk_src", |
| 2861 | }, |
| 2862 | .num_parents = 1, |
| 2863 | .flags = CLK_SET_RATE_PARENT, |
| 2864 | .ops = &clk_branch2_ops, |
| 2865 | }, |
| 2866 | }, |
| 2867 | }; |
| 2868 | |
| 2869 | static struct clk_branch venus0_core1_vcodec_clk = { |
| 2870 | .halt_reg = 0x104c, |
| 2871 | .clkr = { |
| 2872 | .enable_reg = 0x104c, |
| 2873 | .enable_mask = BIT(0), |
| 2874 | .hw.init = &(struct clk_init_data){ |
| 2875 | .name = "venus0_core1_vcodec_clk", |
| 2876 | .parent_names = (const char *[]){ |
| 2877 | "vcodec0_clk_src", |
| 2878 | }, |
| 2879 | .num_parents = 1, |
| 2880 | .flags = CLK_SET_RATE_PARENT, |
| 2881 | .ops = &clk_branch2_ops, |
| 2882 | }, |
| 2883 | }, |
| 2884 | }; |
| 2885 | |
| 2886 | static struct clk_branch venus0_ocmemnoc_clk = { |
| 2887 | .halt_reg = 0x1038, |
| 2888 | .clkr = { |
| 2889 | .enable_reg = 0x1038, |
| 2890 | .enable_mask = BIT(0), |
| 2891 | .hw.init = &(struct clk_init_data){ |
| 2892 | .name = "venus0_ocmemnoc_clk", |
| 2893 | .parent_names = (const char *[]){ |
| 2894 | "ocmemnoc_clk_src", |
| 2895 | }, |
| 2896 | .num_parents = 1, |
| 2897 | .flags = CLK_SET_RATE_PARENT, |
| 2898 | .ops = &clk_branch2_ops, |
| 2899 | }, |
| 2900 | }, |
| 2901 | }; |
| 2902 | |
| 2903 | static struct clk_branch venus0_vcodec0_clk = { |
| 2904 | .halt_reg = 0x1028, |
| 2905 | .clkr = { |
| 2906 | .enable_reg = 0x1028, |
| 2907 | .enable_mask = BIT(0), |
| 2908 | .hw.init = &(struct clk_init_data){ |
| 2909 | .name = "venus0_vcodec0_clk", |
| 2910 | .parent_names = (const char *[]){ |
| 2911 | "vcodec0_clk_src", |
| 2912 | }, |
| 2913 | .num_parents = 1, |
| 2914 | .flags = CLK_SET_RATE_PARENT, |
| 2915 | .ops = &clk_branch2_ops, |
| 2916 | }, |
| 2917 | }, |
| 2918 | }; |
| 2919 | |
| 2920 | static struct clk_branch vpu_ahb_clk = { |
| 2921 | .halt_reg = 0x1430, |
| 2922 | .clkr = { |
| 2923 | .enable_reg = 0x1430, |
| 2924 | .enable_mask = BIT(0), |
| 2925 | .hw.init = &(struct clk_init_data){ |
| 2926 | .name = "vpu_ahb_clk", |
| 2927 | .parent_names = (const char *[]){ |
| 2928 | "mmss_ahb_clk_src", |
| 2929 | }, |
| 2930 | .num_parents = 1, |
| 2931 | .flags = CLK_SET_RATE_PARENT, |
| 2932 | .ops = &clk_branch2_ops, |
| 2933 | }, |
| 2934 | }, |
| 2935 | }; |
| 2936 | |
| 2937 | static struct clk_branch vpu_axi_clk = { |
| 2938 | .halt_reg = 0x143c, |
| 2939 | .clkr = { |
| 2940 | .enable_reg = 0x143c, |
| 2941 | .enable_mask = BIT(0), |
| 2942 | .hw.init = &(struct clk_init_data){ |
| 2943 | .name = "vpu_axi_clk", |
| 2944 | .parent_names = (const char *[]){ |
| 2945 | "mmss_axi_clk_src", |
| 2946 | }, |
| 2947 | .num_parents = 1, |
| 2948 | .flags = CLK_SET_RATE_PARENT, |
| 2949 | .ops = &clk_branch2_ops, |
| 2950 | }, |
| 2951 | }, |
| 2952 | }; |
| 2953 | |
| 2954 | static struct clk_branch vpu_bus_clk = { |
| 2955 | .halt_reg = 0x1440, |
| 2956 | .clkr = { |
| 2957 | .enable_reg = 0x1440, |
| 2958 | .enable_mask = BIT(0), |
| 2959 | .hw.init = &(struct clk_init_data){ |
| 2960 | .name = "vpu_bus_clk", |
| 2961 | .parent_names = (const char *[]){ |
| 2962 | "vpu_bus_clk_src", |
| 2963 | }, |
| 2964 | .num_parents = 1, |
| 2965 | .flags = CLK_SET_RATE_PARENT, |
| 2966 | .ops = &clk_branch2_ops, |
| 2967 | }, |
| 2968 | }, |
| 2969 | }; |
| 2970 | |
| 2971 | static struct clk_branch vpu_cxo_clk = { |
| 2972 | .halt_reg = 0x1434, |
| 2973 | .clkr = { |
| 2974 | .enable_reg = 0x1434, |
| 2975 | .enable_mask = BIT(0), |
| 2976 | .hw.init = &(struct clk_init_data){ |
| 2977 | .name = "vpu_cxo_clk", |
| 2978 | .parent_names = (const char *[]){ "xo" }, |
| 2979 | .num_parents = 1, |
| 2980 | .flags = CLK_SET_RATE_PARENT, |
| 2981 | .ops = &clk_branch2_ops, |
| 2982 | }, |
| 2983 | }, |
| 2984 | }; |
| 2985 | |
| 2986 | static struct clk_branch vpu_maple_clk = { |
| 2987 | .halt_reg = 0x142c, |
| 2988 | .clkr = { |
| 2989 | .enable_reg = 0x142c, |
| 2990 | .enable_mask = BIT(0), |
| 2991 | .hw.init = &(struct clk_init_data){ |
| 2992 | .name = "vpu_maple_clk", |
| 2993 | .parent_names = (const char *[]){ |
| 2994 | "maple_clk_src", |
| 2995 | }, |
| 2996 | .num_parents = 1, |
| 2997 | .flags = CLK_SET_RATE_PARENT, |
| 2998 | .ops = &clk_branch2_ops, |
| 2999 | }, |
| 3000 | }, |
| 3001 | }; |
| 3002 | |
| 3003 | static struct clk_branch vpu_sleep_clk = { |
| 3004 | .halt_reg = 0x1438, |
| 3005 | .clkr = { |
| 3006 | .enable_reg = 0x1438, |
| 3007 | .enable_mask = BIT(0), |
| 3008 | .hw.init = &(struct clk_init_data){ |
| 3009 | .name = "vpu_sleep_clk", |
| 3010 | .parent_names = (const char *[]){ |
| 3011 | "sleep_clk_src", |
| 3012 | }, |
| 3013 | .num_parents = 1, |
| 3014 | .flags = CLK_SET_RATE_PARENT, |
| 3015 | .ops = &clk_branch2_ops, |
| 3016 | }, |
| 3017 | }, |
| 3018 | }; |
| 3019 | |
| 3020 | static struct clk_branch vpu_vdp_clk = { |
| 3021 | .halt_reg = 0x1428, |
| 3022 | .clkr = { |
| 3023 | .enable_reg = 0x1428, |
| 3024 | .enable_mask = BIT(0), |
| 3025 | .hw.init = &(struct clk_init_data){ |
| 3026 | .name = "vpu_vdp_clk", |
| 3027 | .parent_names = (const char *[]){ |
| 3028 | "vdp_clk_src", |
| 3029 | }, |
| 3030 | .num_parents = 1, |
| 3031 | .flags = CLK_SET_RATE_PARENT, |
| 3032 | .ops = &clk_branch2_ops, |
| 3033 | }, |
| 3034 | }, |
| 3035 | }; |
| 3036 | |
| 3037 | static const struct pll_config mmpll1_config = { |
| 3038 | .l = 60, |
| 3039 | .m = 25, |
| 3040 | .n = 32, |
| 3041 | .vco_val = 0x0, |
| 3042 | .vco_mask = 0x3 << 20, |
| 3043 | .pre_div_val = 0x0, |
| 3044 | .pre_div_mask = 0x7 << 12, |
| 3045 | .post_div_val = 0x0, |
| 3046 | .post_div_mask = 0x3 << 8, |
| 3047 | .mn_ena_mask = BIT(24), |
| 3048 | .main_output_mask = BIT(0), |
| 3049 | }; |
| 3050 | |
| 3051 | static const struct pll_config mmpll3_config = { |
| 3052 | .l = 48, |
| 3053 | .m = 7, |
| 3054 | .n = 16, |
| 3055 | .vco_val = 0x0, |
| 3056 | .vco_mask = 0x3 << 20, |
| 3057 | .pre_div_val = 0x0, |
| 3058 | .pre_div_mask = 0x7 << 12, |
| 3059 | .post_div_val = 0x0, |
| 3060 | .post_div_mask = 0x3 << 8, |
| 3061 | .mn_ena_mask = BIT(24), |
| 3062 | .main_output_mask = BIT(0), |
| 3063 | .aux_output_mask = BIT(1), |
| 3064 | }; |
| 3065 | |
| 3066 | static struct clk_regmap *mmcc_apq8084_clocks[] = { |
| 3067 | [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, |
| 3068 | [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, |
| 3069 | [MMPLL0] = &mmpll0.clkr, |
| 3070 | [MMPLL0_VOTE] = &mmpll0_vote, |
| 3071 | [MMPLL1] = &mmpll1.clkr, |
| 3072 | [MMPLL1_VOTE] = &mmpll1_vote, |
| 3073 | [MMPLL2] = &mmpll2.clkr, |
| 3074 | [MMPLL3] = &mmpll3.clkr, |
| 3075 | [MMPLL4] = &mmpll4.clkr, |
| 3076 | [CSI0_CLK_SRC] = &csi0_clk_src.clkr, |
| 3077 | [CSI1_CLK_SRC] = &csi1_clk_src.clkr, |
| 3078 | [CSI2_CLK_SRC] = &csi2_clk_src.clkr, |
| 3079 | [CSI3_CLK_SRC] = &csi3_clk_src.clkr, |
| 3080 | [VCODEC0_CLK_SRC] = &vcodec0_clk_src.clkr, |
| 3081 | [VFE0_CLK_SRC] = &vfe0_clk_src.clkr, |
| 3082 | [VFE1_CLK_SRC] = &vfe1_clk_src.clkr, |
| 3083 | [MDP_CLK_SRC] = &mdp_clk_src.clkr, |
| 3084 | [PCLK0_CLK_SRC] = &pclk0_clk_src.clkr, |
| 3085 | [PCLK1_CLK_SRC] = &pclk1_clk_src.clkr, |
| 3086 | [OCMEMNOC_CLK_SRC] = &ocmemnoc_clk_src.clkr, |
| 3087 | [GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr, |
| 3088 | [JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr, |
| 3089 | [JPEG1_CLK_SRC] = &jpeg1_clk_src.clkr, |
| 3090 | [JPEG2_CLK_SRC] = &jpeg2_clk_src.clkr, |
| 3091 | [EDPPIXEL_CLK_SRC] = &edppixel_clk_src.clkr, |
| 3092 | [EXTPCLK_CLK_SRC] = &extpclk_clk_src.clkr, |
| 3093 | [VP_CLK_SRC] = &vp_clk_src.clkr, |
| 3094 | [CCI_CLK_SRC] = &cci_clk_src.clkr, |
| 3095 | [CAMSS_GP0_CLK_SRC] = &camss_gp0_clk_src.clkr, |
| 3096 | [CAMSS_GP1_CLK_SRC] = &camss_gp1_clk_src.clkr, |
| 3097 | [MCLK0_CLK_SRC] = &mclk0_clk_src.clkr, |
| 3098 | [MCLK1_CLK_SRC] = &mclk1_clk_src.clkr, |
| 3099 | [MCLK2_CLK_SRC] = &mclk2_clk_src.clkr, |
| 3100 | [MCLK3_CLK_SRC] = &mclk3_clk_src.clkr, |
| 3101 | [CSI0PHYTIMER_CLK_SRC] = &csi0phytimer_clk_src.clkr, |
| 3102 | [CSI1PHYTIMER_CLK_SRC] = &csi1phytimer_clk_src.clkr, |
| 3103 | [CSI2PHYTIMER_CLK_SRC] = &csi2phytimer_clk_src.clkr, |
| 3104 | [CPP_CLK_SRC] = &cpp_clk_src.clkr, |
| 3105 | [BYTE0_CLK_SRC] = &byte0_clk_src.clkr, |
| 3106 | [BYTE1_CLK_SRC] = &byte1_clk_src.clkr, |
| 3107 | [EDPAUX_CLK_SRC] = &edpaux_clk_src.clkr, |
| 3108 | [EDPLINK_CLK_SRC] = &edplink_clk_src.clkr, |
| 3109 | [ESC0_CLK_SRC] = &esc0_clk_src.clkr, |
| 3110 | [ESC1_CLK_SRC] = &esc1_clk_src.clkr, |
| 3111 | [HDMI_CLK_SRC] = &hdmi_clk_src.clkr, |
| 3112 | [VSYNC_CLK_SRC] = &vsync_clk_src.clkr, |
Georgi Djakov | 9a6cb70 | 2014-10-10 16:57:24 +0300 | [diff] [blame] | 3113 | [MMSS_RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr, |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 3114 | [RBBMTIMER_CLK_SRC] = &rbbmtimer_clk_src.clkr, |
| 3115 | [MAPLE_CLK_SRC] = &maple_clk_src.clkr, |
| 3116 | [VDP_CLK_SRC] = &vdp_clk_src.clkr, |
| 3117 | [VPU_BUS_CLK_SRC] = &vpu_bus_clk_src.clkr, |
| 3118 | [MMSS_CXO_CLK] = &mmss_cxo_clk.clkr, |
| 3119 | [MMSS_SLEEPCLK_CLK] = &mmss_sleepclk_clk.clkr, |
| 3120 | [AVSYNC_AHB_CLK] = &avsync_ahb_clk.clkr, |
| 3121 | [AVSYNC_EDPPIXEL_CLK] = &avsync_edppixel_clk.clkr, |
| 3122 | [AVSYNC_EXTPCLK_CLK] = &avsync_extpclk_clk.clkr, |
| 3123 | [AVSYNC_PCLK0_CLK] = &avsync_pclk0_clk.clkr, |
| 3124 | [AVSYNC_PCLK1_CLK] = &avsync_pclk1_clk.clkr, |
| 3125 | [AVSYNC_VP_CLK] = &avsync_vp_clk.clkr, |
| 3126 | [CAMSS_AHB_CLK] = &camss_ahb_clk.clkr, |
| 3127 | [CAMSS_CCI_CCI_AHB_CLK] = &camss_cci_cci_ahb_clk.clkr, |
| 3128 | [CAMSS_CCI_CCI_CLK] = &camss_cci_cci_clk.clkr, |
| 3129 | [CAMSS_CSI0_AHB_CLK] = &camss_csi0_ahb_clk.clkr, |
| 3130 | [CAMSS_CSI0_CLK] = &camss_csi0_clk.clkr, |
| 3131 | [CAMSS_CSI0PHY_CLK] = &camss_csi0phy_clk.clkr, |
| 3132 | [CAMSS_CSI0PIX_CLK] = &camss_csi0pix_clk.clkr, |
| 3133 | [CAMSS_CSI0RDI_CLK] = &camss_csi0rdi_clk.clkr, |
| 3134 | [CAMSS_CSI1_AHB_CLK] = &camss_csi1_ahb_clk.clkr, |
| 3135 | [CAMSS_CSI1_CLK] = &camss_csi1_clk.clkr, |
| 3136 | [CAMSS_CSI1PHY_CLK] = &camss_csi1phy_clk.clkr, |
| 3137 | [CAMSS_CSI1PIX_CLK] = &camss_csi1pix_clk.clkr, |
| 3138 | [CAMSS_CSI1RDI_CLK] = &camss_csi1rdi_clk.clkr, |
| 3139 | [CAMSS_CSI2_AHB_CLK] = &camss_csi2_ahb_clk.clkr, |
| 3140 | [CAMSS_CSI2_CLK] = &camss_csi2_clk.clkr, |
| 3141 | [CAMSS_CSI2PHY_CLK] = &camss_csi2phy_clk.clkr, |
| 3142 | [CAMSS_CSI2PIX_CLK] = &camss_csi2pix_clk.clkr, |
| 3143 | [CAMSS_CSI2RDI_CLK] = &camss_csi2rdi_clk.clkr, |
| 3144 | [CAMSS_CSI3_AHB_CLK] = &camss_csi3_ahb_clk.clkr, |
| 3145 | [CAMSS_CSI3_CLK] = &camss_csi3_clk.clkr, |
| 3146 | [CAMSS_CSI3PHY_CLK] = &camss_csi3phy_clk.clkr, |
| 3147 | [CAMSS_CSI3PIX_CLK] = &camss_csi3pix_clk.clkr, |
| 3148 | [CAMSS_CSI3RDI_CLK] = &camss_csi3rdi_clk.clkr, |
| 3149 | [CAMSS_CSI_VFE0_CLK] = &camss_csi_vfe0_clk.clkr, |
| 3150 | [CAMSS_CSI_VFE1_CLK] = &camss_csi_vfe1_clk.clkr, |
| 3151 | [CAMSS_GP0_CLK] = &camss_gp0_clk.clkr, |
| 3152 | [CAMSS_GP1_CLK] = &camss_gp1_clk.clkr, |
| 3153 | [CAMSS_ISPIF_AHB_CLK] = &camss_ispif_ahb_clk.clkr, |
| 3154 | [CAMSS_JPEG_JPEG0_CLK] = &camss_jpeg_jpeg0_clk.clkr, |
| 3155 | [CAMSS_JPEG_JPEG1_CLK] = &camss_jpeg_jpeg1_clk.clkr, |
| 3156 | [CAMSS_JPEG_JPEG2_CLK] = &camss_jpeg_jpeg2_clk.clkr, |
| 3157 | [CAMSS_JPEG_JPEG_AHB_CLK] = &camss_jpeg_jpeg_ahb_clk.clkr, |
| 3158 | [CAMSS_JPEG_JPEG_AXI_CLK] = &camss_jpeg_jpeg_axi_clk.clkr, |
| 3159 | [CAMSS_MCLK0_CLK] = &camss_mclk0_clk.clkr, |
| 3160 | [CAMSS_MCLK1_CLK] = &camss_mclk1_clk.clkr, |
| 3161 | [CAMSS_MCLK2_CLK] = &camss_mclk2_clk.clkr, |
| 3162 | [CAMSS_MCLK3_CLK] = &camss_mclk3_clk.clkr, |
| 3163 | [CAMSS_MICRO_AHB_CLK] = &camss_micro_ahb_clk.clkr, |
| 3164 | [CAMSS_PHY0_CSI0PHYTIMER_CLK] = &camss_phy0_csi0phytimer_clk.clkr, |
| 3165 | [CAMSS_PHY1_CSI1PHYTIMER_CLK] = &camss_phy1_csi1phytimer_clk.clkr, |
| 3166 | [CAMSS_PHY2_CSI2PHYTIMER_CLK] = &camss_phy2_csi2phytimer_clk.clkr, |
| 3167 | [CAMSS_TOP_AHB_CLK] = &camss_top_ahb_clk.clkr, |
| 3168 | [CAMSS_VFE_CPP_AHB_CLK] = &camss_vfe_cpp_ahb_clk.clkr, |
| 3169 | [CAMSS_VFE_CPP_CLK] = &camss_vfe_cpp_clk.clkr, |
| 3170 | [CAMSS_VFE_VFE0_CLK] = &camss_vfe_vfe0_clk.clkr, |
| 3171 | [CAMSS_VFE_VFE1_CLK] = &camss_vfe_vfe1_clk.clkr, |
| 3172 | [CAMSS_VFE_VFE_AHB_CLK] = &camss_vfe_vfe_ahb_clk.clkr, |
| 3173 | [CAMSS_VFE_VFE_AXI_CLK] = &camss_vfe_vfe_axi_clk.clkr, |
| 3174 | [MDSS_AHB_CLK] = &mdss_ahb_clk.clkr, |
| 3175 | [MDSS_AXI_CLK] = &mdss_axi_clk.clkr, |
| 3176 | [MDSS_BYTE0_CLK] = &mdss_byte0_clk.clkr, |
| 3177 | [MDSS_BYTE1_CLK] = &mdss_byte1_clk.clkr, |
| 3178 | [MDSS_EDPAUX_CLK] = &mdss_edpaux_clk.clkr, |
| 3179 | [MDSS_EDPLINK_CLK] = &mdss_edplink_clk.clkr, |
| 3180 | [MDSS_EDPPIXEL_CLK] = &mdss_edppixel_clk.clkr, |
| 3181 | [MDSS_ESC0_CLK] = &mdss_esc0_clk.clkr, |
| 3182 | [MDSS_ESC1_CLK] = &mdss_esc1_clk.clkr, |
| 3183 | [MDSS_EXTPCLK_CLK] = &mdss_extpclk_clk.clkr, |
| 3184 | [MDSS_HDMI_AHB_CLK] = &mdss_hdmi_ahb_clk.clkr, |
| 3185 | [MDSS_HDMI_CLK] = &mdss_hdmi_clk.clkr, |
| 3186 | [MDSS_MDP_CLK] = &mdss_mdp_clk.clkr, |
| 3187 | [MDSS_MDP_LUT_CLK] = &mdss_mdp_lut_clk.clkr, |
| 3188 | [MDSS_PCLK0_CLK] = &mdss_pclk0_clk.clkr, |
| 3189 | [MDSS_PCLK1_CLK] = &mdss_pclk1_clk.clkr, |
| 3190 | [MDSS_VSYNC_CLK] = &mdss_vsync_clk.clkr, |
| 3191 | [MMSS_RBCPR_AHB_CLK] = &mmss_rbcpr_ahb_clk.clkr, |
| 3192 | [MMSS_RBCPR_CLK] = &mmss_rbcpr_clk.clkr, |
| 3193 | [MMSS_SPDM_AHB_CLK] = &mmss_spdm_ahb_clk.clkr, |
| 3194 | [MMSS_SPDM_AXI_CLK] = &mmss_spdm_axi_clk.clkr, |
| 3195 | [MMSS_SPDM_CSI0_CLK] = &mmss_spdm_csi0_clk.clkr, |
| 3196 | [MMSS_SPDM_GFX3D_CLK] = &mmss_spdm_gfx3d_clk.clkr, |
| 3197 | [MMSS_SPDM_JPEG0_CLK] = &mmss_spdm_jpeg0_clk.clkr, |
| 3198 | [MMSS_SPDM_JPEG1_CLK] = &mmss_spdm_jpeg1_clk.clkr, |
| 3199 | [MMSS_SPDM_JPEG2_CLK] = &mmss_spdm_jpeg2_clk.clkr, |
| 3200 | [MMSS_SPDM_MDP_CLK] = &mmss_spdm_mdp_clk.clkr, |
| 3201 | [MMSS_SPDM_PCLK0_CLK] = &mmss_spdm_pclk0_clk.clkr, |
| 3202 | [MMSS_SPDM_PCLK1_CLK] = &mmss_spdm_pclk1_clk.clkr, |
| 3203 | [MMSS_SPDM_VCODEC0_CLK] = &mmss_spdm_vcodec0_clk.clkr, |
| 3204 | [MMSS_SPDM_VFE0_CLK] = &mmss_spdm_vfe0_clk.clkr, |
| 3205 | [MMSS_SPDM_VFE1_CLK] = &mmss_spdm_vfe1_clk.clkr, |
| 3206 | [MMSS_SPDM_RM_AXI_CLK] = &mmss_spdm_rm_axi_clk.clkr, |
| 3207 | [MMSS_SPDM_RM_OCMEMNOC_CLK] = &mmss_spdm_rm_ocmemnoc_clk.clkr, |
| 3208 | [MMSS_MISC_AHB_CLK] = &mmss_misc_ahb_clk.clkr, |
| 3209 | [MMSS_MMSSNOC_AHB_CLK] = &mmss_mmssnoc_ahb_clk.clkr, |
| 3210 | [MMSS_MMSSNOC_BTO_AHB_CLK] = &mmss_mmssnoc_bto_ahb_clk.clkr, |
| 3211 | [MMSS_MMSSNOC_AXI_CLK] = &mmss_mmssnoc_axi_clk.clkr, |
| 3212 | [MMSS_S0_AXI_CLK] = &mmss_s0_axi_clk.clkr, |
| 3213 | [OCMEMCX_AHB_CLK] = &ocmemcx_ahb_clk.clkr, |
| 3214 | [OCMEMCX_OCMEMNOC_CLK] = &ocmemcx_ocmemnoc_clk.clkr, |
| 3215 | [OXILI_OCMEMGX_CLK] = &oxili_ocmemgx_clk.clkr, |
| 3216 | [OXILI_GFX3D_CLK] = &oxili_gfx3d_clk.clkr, |
| 3217 | [OXILI_RBBMTIMER_CLK] = &oxili_rbbmtimer_clk.clkr, |
| 3218 | [OXILICX_AHB_CLK] = &oxilicx_ahb_clk.clkr, |
| 3219 | [VENUS0_AHB_CLK] = &venus0_ahb_clk.clkr, |
| 3220 | [VENUS0_AXI_CLK] = &venus0_axi_clk.clkr, |
| 3221 | [VENUS0_CORE0_VCODEC_CLK] = &venus0_core0_vcodec_clk.clkr, |
| 3222 | [VENUS0_CORE1_VCODEC_CLK] = &venus0_core1_vcodec_clk.clkr, |
| 3223 | [VENUS0_OCMEMNOC_CLK] = &venus0_ocmemnoc_clk.clkr, |
| 3224 | [VENUS0_VCODEC0_CLK] = &venus0_vcodec0_clk.clkr, |
| 3225 | [VPU_AHB_CLK] = &vpu_ahb_clk.clkr, |
| 3226 | [VPU_AXI_CLK] = &vpu_axi_clk.clkr, |
| 3227 | [VPU_BUS_CLK] = &vpu_bus_clk.clkr, |
| 3228 | [VPU_CXO_CLK] = &vpu_cxo_clk.clkr, |
| 3229 | [VPU_MAPLE_CLK] = &vpu_maple_clk.clkr, |
| 3230 | [VPU_SLEEP_CLK] = &vpu_sleep_clk.clkr, |
| 3231 | [VPU_VDP_CLK] = &vpu_vdp_clk.clkr, |
| 3232 | }; |
| 3233 | |
| 3234 | static const struct qcom_reset_map mmcc_apq8084_resets[] = { |
| 3235 | [MMSS_SPDM_RESET] = { 0x0200 }, |
| 3236 | [MMSS_SPDM_RM_RESET] = { 0x0300 }, |
| 3237 | [VENUS0_RESET] = { 0x1020 }, |
| 3238 | [VPU_RESET] = { 0x1400 }, |
| 3239 | [MDSS_RESET] = { 0x2300 }, |
| 3240 | [AVSYNC_RESET] = { 0x2400 }, |
| 3241 | [CAMSS_PHY0_RESET] = { 0x3020 }, |
| 3242 | [CAMSS_PHY1_RESET] = { 0x3050 }, |
| 3243 | [CAMSS_PHY2_RESET] = { 0x3080 }, |
| 3244 | [CAMSS_CSI0_RESET] = { 0x30b0 }, |
| 3245 | [CAMSS_CSI0PHY_RESET] = { 0x30c0 }, |
| 3246 | [CAMSS_CSI0RDI_RESET] = { 0x30d0 }, |
| 3247 | [CAMSS_CSI0PIX_RESET] = { 0x30e0 }, |
| 3248 | [CAMSS_CSI1_RESET] = { 0x3120 }, |
| 3249 | [CAMSS_CSI1PHY_RESET] = { 0x3130 }, |
| 3250 | [CAMSS_CSI1RDI_RESET] = { 0x3140 }, |
| 3251 | [CAMSS_CSI1PIX_RESET] = { 0x3150 }, |
| 3252 | [CAMSS_CSI2_RESET] = { 0x3180 }, |
| 3253 | [CAMSS_CSI2PHY_RESET] = { 0x3190 }, |
| 3254 | [CAMSS_CSI2RDI_RESET] = { 0x31a0 }, |
| 3255 | [CAMSS_CSI2PIX_RESET] = { 0x31b0 }, |
| 3256 | [CAMSS_CSI3_RESET] = { 0x31e0 }, |
| 3257 | [CAMSS_CSI3PHY_RESET] = { 0x31f0 }, |
| 3258 | [CAMSS_CSI3RDI_RESET] = { 0x3200 }, |
| 3259 | [CAMSS_CSI3PIX_RESET] = { 0x3210 }, |
| 3260 | [CAMSS_ISPIF_RESET] = { 0x3220 }, |
| 3261 | [CAMSS_CCI_RESET] = { 0x3340 }, |
| 3262 | [CAMSS_MCLK0_RESET] = { 0x3380 }, |
| 3263 | [CAMSS_MCLK1_RESET] = { 0x33b0 }, |
| 3264 | [CAMSS_MCLK2_RESET] = { 0x33e0 }, |
| 3265 | [CAMSS_MCLK3_RESET] = { 0x3410 }, |
| 3266 | [CAMSS_GP0_RESET] = { 0x3440 }, |
| 3267 | [CAMSS_GP1_RESET] = { 0x3470 }, |
| 3268 | [CAMSS_TOP_RESET] = { 0x3480 }, |
| 3269 | [CAMSS_AHB_RESET] = { 0x3488 }, |
| 3270 | [CAMSS_MICRO_RESET] = { 0x3490 }, |
| 3271 | [CAMSS_JPEG_RESET] = { 0x35a0 }, |
| 3272 | [CAMSS_VFE_RESET] = { 0x36a0 }, |
| 3273 | [CAMSS_CSI_VFE0_RESET] = { 0x3700 }, |
| 3274 | [CAMSS_CSI_VFE1_RESET] = { 0x3710 }, |
| 3275 | [OXILI_RESET] = { 0x4020 }, |
| 3276 | [OXILICX_RESET] = { 0x4030 }, |
| 3277 | [OCMEMCX_RESET] = { 0x4050 }, |
| 3278 | [MMSS_RBCRP_RESET] = { 0x4080 }, |
| 3279 | [MMSSNOCAHB_RESET] = { 0x5020 }, |
| 3280 | [MMSSNOCAXI_RESET] = { 0x5060 }, |
| 3281 | }; |
| 3282 | |
| 3283 | static const struct regmap_config mmcc_apq8084_regmap_config = { |
| 3284 | .reg_bits = 32, |
| 3285 | .reg_stride = 4, |
| 3286 | .val_bits = 32, |
| 3287 | .max_register = 0x5104, |
| 3288 | .fast_io = true, |
| 3289 | }; |
| 3290 | |
| 3291 | static const struct qcom_cc_desc mmcc_apq8084_desc = { |
| 3292 | .config = &mmcc_apq8084_regmap_config, |
| 3293 | .clks = mmcc_apq8084_clocks, |
| 3294 | .num_clks = ARRAY_SIZE(mmcc_apq8084_clocks), |
| 3295 | .resets = mmcc_apq8084_resets, |
| 3296 | .num_resets = ARRAY_SIZE(mmcc_apq8084_resets), |
| 3297 | }; |
| 3298 | |
| 3299 | static const struct of_device_id mmcc_apq8084_match_table[] = { |
| 3300 | { .compatible = "qcom,mmcc-apq8084" }, |
| 3301 | { } |
| 3302 | }; |
| 3303 | MODULE_DEVICE_TABLE(of, mmcc_apq8084_match_table); |
| 3304 | |
| 3305 | static int mmcc_apq8084_probe(struct platform_device *pdev) |
| 3306 | { |
| 3307 | int ret; |
| 3308 | struct regmap *regmap; |
| 3309 | |
| 3310 | ret = qcom_cc_probe(pdev, &mmcc_apq8084_desc); |
| 3311 | if (ret) |
| 3312 | return ret; |
| 3313 | |
| 3314 | regmap = dev_get_regmap(&pdev->dev, NULL); |
| 3315 | clk_pll_configure_sr_hpm_lp(&mmpll1, regmap, &mmpll1_config, true); |
| 3316 | clk_pll_configure_sr_hpm_lp(&mmpll3, regmap, &mmpll3_config, false); |
| 3317 | |
| 3318 | return 0; |
| 3319 | } |
| 3320 | |
| 3321 | static int mmcc_apq8084_remove(struct platform_device *pdev) |
| 3322 | { |
| 3323 | qcom_cc_remove(pdev); |
| 3324 | return 0; |
| 3325 | } |
| 3326 | |
| 3327 | static struct platform_driver mmcc_apq8084_driver = { |
| 3328 | .probe = mmcc_apq8084_probe, |
| 3329 | .remove = mmcc_apq8084_remove, |
| 3330 | .driver = { |
| 3331 | .name = "mmcc-apq8084", |
Georgi Djakov | 2b46cd2 | 2014-06-12 19:41:42 +0300 | [diff] [blame] | 3332 | .of_match_table = mmcc_apq8084_match_table, |
| 3333 | }, |
| 3334 | }; |
| 3335 | module_platform_driver(mmcc_apq8084_driver); |
| 3336 | |
| 3337 | MODULE_DESCRIPTION("QCOM MMCC APQ8084 Driver"); |
| 3338 | MODULE_LICENSE("GPL v2"); |
| 3339 | MODULE_ALIAS("platform:mmcc-apq8084"); |