xref: /openbmc/linux/drivers/clk/samsung/clk-exynos5260.c (revision 22842d244af353a66fa4e6d1978d3f4c39ee4d20)
1d39e55e0SRahul Sharma /*
2d39e55e0SRahul Sharma  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3d39e55e0SRahul Sharma  * Author: Rahul Sharma <rahul.sharma@samsung.com>
4d39e55e0SRahul Sharma  *
5d39e55e0SRahul Sharma  * This program is free software; you can redistribute it and/or modify
6d39e55e0SRahul Sharma  * it under the terms of the GNU General Public License version 2 as
7d39e55e0SRahul Sharma  * published by the Free Software Foundation.
8d39e55e0SRahul Sharma  *
9d39e55e0SRahul Sharma  * Common Clock Framework support for Exynos5260 SoC.
10d39e55e0SRahul Sharma  */
11d39e55e0SRahul Sharma 
12d39e55e0SRahul Sharma #include <linux/clk.h>
13d39e55e0SRahul Sharma #include <linux/clkdev.h>
14d39e55e0SRahul Sharma #include <linux/clk-provider.h>
15d39e55e0SRahul Sharma #include <linux/of.h>
16d39e55e0SRahul Sharma #include <linux/of_address.h>
17d39e55e0SRahul Sharma #include <linux/syscore_ops.h>
18d39e55e0SRahul Sharma 
19d39e55e0SRahul Sharma #include "clk-exynos5260.h"
20d39e55e0SRahul Sharma #include "clk.h"
21d39e55e0SRahul Sharma #include "clk-pll.h"
22d39e55e0SRahul Sharma 
23d39e55e0SRahul Sharma #include <dt-bindings/clock/exynos5260-clk.h>
24d39e55e0SRahul Sharma 
25d39e55e0SRahul Sharma static LIST_HEAD(clock_reg_cache_list);
26d39e55e0SRahul Sharma 
27d39e55e0SRahul Sharma struct exynos5260_clock_reg_cache {
28d39e55e0SRahul Sharma 	struct list_head node;
29d39e55e0SRahul Sharma 	void __iomem *reg_base;
30d39e55e0SRahul Sharma 	struct samsung_clk_reg_dump *rdump;
31d39e55e0SRahul Sharma 	unsigned int rd_num;
32d39e55e0SRahul Sharma };
33d39e55e0SRahul Sharma 
34d39e55e0SRahul Sharma struct exynos5260_cmu_info {
35d39e55e0SRahul Sharma 	/* list of pll clocks and respective count */
36d39e55e0SRahul Sharma 	struct samsung_pll_clock *pll_clks;
37d39e55e0SRahul Sharma 	unsigned int nr_pll_clks;
38d39e55e0SRahul Sharma 	/* list of mux clocks and respective count */
39d39e55e0SRahul Sharma 	struct samsung_mux_clock *mux_clks;
40d39e55e0SRahul Sharma 	unsigned int nr_mux_clks;
41d39e55e0SRahul Sharma 	/* list of div clocks and respective count */
42d39e55e0SRahul Sharma 	struct samsung_div_clock *div_clks;
43d39e55e0SRahul Sharma 	unsigned int nr_div_clks;
44d39e55e0SRahul Sharma 	/* list of gate clocks and respective count */
45d39e55e0SRahul Sharma 	struct samsung_gate_clock *gate_clks;
46d39e55e0SRahul Sharma 	unsigned int nr_gate_clks;
47d39e55e0SRahul Sharma 	/* list of fixed clocks and respective count */
48d39e55e0SRahul Sharma 	struct samsung_fixed_rate_clock *fixed_clks;
49d39e55e0SRahul Sharma 	unsigned int nr_fixed_clks;
50d39e55e0SRahul Sharma 	/* total number of clocks with IDs assigned*/
51d39e55e0SRahul Sharma 	unsigned int nr_clk_ids;
52d39e55e0SRahul Sharma 
53d39e55e0SRahul Sharma 	/* list and number of clocks registers */
54d39e55e0SRahul Sharma 	unsigned long *clk_regs;
55d39e55e0SRahul Sharma 	unsigned int nr_clk_regs;
56d39e55e0SRahul Sharma };
57d39e55e0SRahul Sharma 
58d39e55e0SRahul Sharma /*
59d39e55e0SRahul Sharma  * Applicable for all 2550 Type PLLS for Exynos5260, listed below
60d39e55e0SRahul Sharma  * DISP_PLL, EGL_PLL, KFC_PLL, MEM_PLL, BUS_PLL, MEDIA_PLL, G3D_PLL.
61d39e55e0SRahul Sharma  */
62d39e55e0SRahul Sharma static struct samsung_pll_rate_table pll2550_24mhz_tbl[] __initdata = {
63d39e55e0SRahul Sharma 	PLL_35XX_RATE(1700000000, 425, 6, 0),
64d39e55e0SRahul Sharma 	PLL_35XX_RATE(1600000000, 200, 3, 0),
65d39e55e0SRahul Sharma 	PLL_35XX_RATE(1500000000, 250, 4, 0),
66d39e55e0SRahul Sharma 	PLL_35XX_RATE(1400000000, 175, 3, 0),
67d39e55e0SRahul Sharma 	PLL_35XX_RATE(1300000000, 325, 6, 0),
68d39e55e0SRahul Sharma 	PLL_35XX_RATE(1200000000, 400, 4, 1),
69d39e55e0SRahul Sharma 	PLL_35XX_RATE(1100000000, 275, 3, 1),
70d39e55e0SRahul Sharma 	PLL_35XX_RATE(1000000000, 250, 3, 1),
71d39e55e0SRahul Sharma 	PLL_35XX_RATE(933000000, 311, 4, 1),
72d39e55e0SRahul Sharma 	PLL_35XX_RATE(900000000, 300, 4, 1),
73d39e55e0SRahul Sharma 	PLL_35XX_RATE(800000000, 200, 3, 1),
74d39e55e0SRahul Sharma 	PLL_35XX_RATE(733000000, 733, 12, 1),
75d39e55e0SRahul Sharma 	PLL_35XX_RATE(700000000, 175, 3, 1),
76d39e55e0SRahul Sharma 	PLL_35XX_RATE(667000000, 667, 12, 1),
77d39e55e0SRahul Sharma 	PLL_35XX_RATE(633000000, 211, 4, 1),
78d39e55e0SRahul Sharma 	PLL_35XX_RATE(620000000, 310, 3, 2),
79d39e55e0SRahul Sharma 	PLL_35XX_RATE(600000000, 400, 4, 2),
80d39e55e0SRahul Sharma 	PLL_35XX_RATE(543000000, 362, 4, 2),
81d39e55e0SRahul Sharma 	PLL_35XX_RATE(533000000, 533, 6, 2),
82d39e55e0SRahul Sharma 	PLL_35XX_RATE(500000000, 250, 3, 2),
83d39e55e0SRahul Sharma 	PLL_35XX_RATE(450000000, 300, 4, 2),
84d39e55e0SRahul Sharma 	PLL_35XX_RATE(400000000, 200, 3, 2),
85d39e55e0SRahul Sharma 	PLL_35XX_RATE(350000000, 175, 3, 2),
86d39e55e0SRahul Sharma 	PLL_35XX_RATE(300000000, 400, 4, 3),
87d39e55e0SRahul Sharma 	PLL_35XX_RATE(266000000, 266, 3, 3),
88d39e55e0SRahul Sharma 	PLL_35XX_RATE(200000000, 200, 3, 3),
89d39e55e0SRahul Sharma 	PLL_35XX_RATE(160000000, 160, 3, 3),
90d39e55e0SRahul Sharma };
91d39e55e0SRahul Sharma 
92d39e55e0SRahul Sharma /*
93d39e55e0SRahul Sharma  * Applicable for 2650 Type PLL for AUD_PLL.
94d39e55e0SRahul Sharma  */
95d39e55e0SRahul Sharma static struct samsung_pll_rate_table pll2650_24mhz_tbl[] __initdata = {
96d39e55e0SRahul Sharma 	PLL_36XX_RATE(1600000000, 200, 3, 0, 0),
97d39e55e0SRahul Sharma 	PLL_36XX_RATE(1200000000, 100, 2, 0, 0),
98d39e55e0SRahul Sharma 	PLL_36XX_RATE(1000000000, 250, 3, 1, 0),
99d39e55e0SRahul Sharma 	PLL_36XX_RATE(800000000, 200, 3, 1, 0),
100d39e55e0SRahul Sharma 	PLL_36XX_RATE(600000000, 100, 2, 1, 0),
101d39e55e0SRahul Sharma 	PLL_36XX_RATE(532000000, 266, 3, 2, 0),
102d39e55e0SRahul Sharma 	PLL_36XX_RATE(480000000, 160, 2, 2, 0),
103d39e55e0SRahul Sharma 	PLL_36XX_RATE(432000000, 144, 2, 2, 0),
104d39e55e0SRahul Sharma 	PLL_36XX_RATE(400000000, 200, 3, 2, 0),
105d39e55e0SRahul Sharma 	PLL_36XX_RATE(394073130, 459, 7, 2, 49282),
106d39e55e0SRahul Sharma 	PLL_36XX_RATE(333000000, 111, 2, 2, 0),
107d39e55e0SRahul Sharma 	PLL_36XX_RATE(300000000, 100, 2, 2, 0),
108d39e55e0SRahul Sharma 	PLL_36XX_RATE(266000000, 266, 3, 3, 0),
109d39e55e0SRahul Sharma 	PLL_36XX_RATE(200000000, 200, 3, 3, 0),
110d39e55e0SRahul Sharma 	PLL_36XX_RATE(166000000, 166, 3, 3, 0),
111d39e55e0SRahul Sharma 	PLL_36XX_RATE(133000000, 266, 3, 4, 0),
112d39e55e0SRahul Sharma 	PLL_36XX_RATE(100000000, 200, 3, 4, 0),
113d39e55e0SRahul Sharma 	PLL_36XX_RATE(66000000, 176, 2, 5, 0),
114d39e55e0SRahul Sharma };
115d39e55e0SRahul Sharma 
116d39e55e0SRahul Sharma #ifdef CONFIG_PM_SLEEP
117d39e55e0SRahul Sharma 
118d39e55e0SRahul Sharma static int exynos5260_clk_suspend(void)
119d39e55e0SRahul Sharma {
120d39e55e0SRahul Sharma 	struct exynos5260_clock_reg_cache *cache;
121d39e55e0SRahul Sharma 
122d39e55e0SRahul Sharma 	list_for_each_entry(cache, &clock_reg_cache_list, node)
123d39e55e0SRahul Sharma 		samsung_clk_save(cache->reg_base, cache->rdump,
124d39e55e0SRahul Sharma 				cache->rd_num);
125d39e55e0SRahul Sharma 
126d39e55e0SRahul Sharma 	return 0;
127d39e55e0SRahul Sharma }
128d39e55e0SRahul Sharma 
129d39e55e0SRahul Sharma static void exynos5260_clk_resume(void)
130d39e55e0SRahul Sharma {
131d39e55e0SRahul Sharma 	struct exynos5260_clock_reg_cache *cache;
132d39e55e0SRahul Sharma 
133d39e55e0SRahul Sharma 	list_for_each_entry(cache, &clock_reg_cache_list, node)
134d39e55e0SRahul Sharma 		samsung_clk_restore(cache->reg_base, cache->rdump,
135d39e55e0SRahul Sharma 				cache->rd_num);
136d39e55e0SRahul Sharma }
137d39e55e0SRahul Sharma 
138d39e55e0SRahul Sharma static struct syscore_ops exynos5260_clk_syscore_ops = {
139d39e55e0SRahul Sharma 	.suspend = exynos5260_clk_suspend,
140d39e55e0SRahul Sharma 	.resume = exynos5260_clk_resume,
141d39e55e0SRahul Sharma };
142d39e55e0SRahul Sharma 
143d39e55e0SRahul Sharma static void exynos5260_clk_sleep_init(void __iomem *reg_base,
144d39e55e0SRahul Sharma 			unsigned long *rdump,
145d39e55e0SRahul Sharma 			unsigned long nr_rdump)
146d39e55e0SRahul Sharma {
147d39e55e0SRahul Sharma 	struct exynos5260_clock_reg_cache *reg_cache;
148d39e55e0SRahul Sharma 
149d39e55e0SRahul Sharma 	reg_cache = kzalloc(sizeof(struct exynos5260_clock_reg_cache),
150d39e55e0SRahul Sharma 			GFP_KERNEL);
151d39e55e0SRahul Sharma 	if (!reg_cache)
152d39e55e0SRahul Sharma 		panic("could not allocate register cache.\n");
153d39e55e0SRahul Sharma 
154d39e55e0SRahul Sharma 	reg_cache->rdump = samsung_clk_alloc_reg_dump(rdump, nr_rdump);
155d39e55e0SRahul Sharma 
156d39e55e0SRahul Sharma 	if (!reg_cache->rdump)
157d39e55e0SRahul Sharma 		panic("could not allocate register dump storage.\n");
158d39e55e0SRahul Sharma 
159d39e55e0SRahul Sharma 	if (list_empty(&clock_reg_cache_list))
160d39e55e0SRahul Sharma 		register_syscore_ops(&exynos5260_clk_syscore_ops);
161d39e55e0SRahul Sharma 
162d39e55e0SRahul Sharma 	reg_cache->rd_num = nr_rdump;
163d39e55e0SRahul Sharma 	reg_cache->reg_base = reg_base;
164d39e55e0SRahul Sharma 	list_add_tail(&reg_cache->node, &clock_reg_cache_list);
165d39e55e0SRahul Sharma }
166d39e55e0SRahul Sharma 
167d39e55e0SRahul Sharma #else
168d39e55e0SRahul Sharma static void exynos5260_clk_sleep_init(void __iomem *reg_base,
169d39e55e0SRahul Sharma 			unsigned long *rdump,
170d39e55e0SRahul Sharma 			unsigned long nr_rdump){}
171d39e55e0SRahul Sharma #endif
172d39e55e0SRahul Sharma 
173d39e55e0SRahul Sharma /*
174d39e55e0SRahul Sharma  * Common function which registers plls, muxes, dividers and gates
175d39e55e0SRahul Sharma  * for each CMU. It also add CMU register list to register cache.
176d39e55e0SRahul Sharma  */
177d39e55e0SRahul Sharma 
178d39e55e0SRahul Sharma void __init exynos5260_cmu_register_one(struct device_node *np,
179d39e55e0SRahul Sharma 			struct exynos5260_cmu_info *cmu)
180d39e55e0SRahul Sharma {
181d39e55e0SRahul Sharma 	void __iomem *reg_base;
182d39e55e0SRahul Sharma 	struct samsung_clk_provider *ctx;
183d39e55e0SRahul Sharma 
184d39e55e0SRahul Sharma 	reg_base = of_iomap(np, 0);
185d39e55e0SRahul Sharma 	if (!reg_base)
186d39e55e0SRahul Sharma 		panic("%s: failed to map registers\n", __func__);
187d39e55e0SRahul Sharma 
188d39e55e0SRahul Sharma 	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
189d39e55e0SRahul Sharma 	if (!ctx)
190d39e55e0SRahul Sharma 		panic("%s: unable to alllocate ctx\n", __func__);
191d39e55e0SRahul Sharma 
192d39e55e0SRahul Sharma 	if (cmu->pll_clks)
193d39e55e0SRahul Sharma 		samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
194d39e55e0SRahul Sharma 			reg_base);
195d39e55e0SRahul Sharma 	if (cmu->mux_clks)
196d39e55e0SRahul Sharma 		samsung_clk_register_mux(ctx,  cmu->mux_clks,
197d39e55e0SRahul Sharma 			cmu->nr_mux_clks);
198d39e55e0SRahul Sharma 	if (cmu->div_clks)
199d39e55e0SRahul Sharma 		samsung_clk_register_div(ctx, cmu->div_clks, cmu->nr_div_clks);
200d39e55e0SRahul Sharma 	if (cmu->gate_clks)
201d39e55e0SRahul Sharma 		samsung_clk_register_gate(ctx, cmu->gate_clks,
202d39e55e0SRahul Sharma 			cmu->nr_gate_clks);
203d39e55e0SRahul Sharma 	if (cmu->fixed_clks)
204d39e55e0SRahul Sharma 		samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
205d39e55e0SRahul Sharma 			cmu->nr_fixed_clks);
206d39e55e0SRahul Sharma 	if (cmu->clk_regs)
207d39e55e0SRahul Sharma 		exynos5260_clk_sleep_init(reg_base, cmu->clk_regs,
208d39e55e0SRahul Sharma 			cmu->nr_clk_regs);
209d5e136a2SSylwester Nawrocki 
210d5e136a2SSylwester Nawrocki 	samsung_clk_of_add_provider(np, ctx);
211d39e55e0SRahul Sharma }
212d39e55e0SRahul Sharma 
213d39e55e0SRahul Sharma 
214d39e55e0SRahul Sharma /* CMU_AUD */
215d39e55e0SRahul Sharma 
216d39e55e0SRahul Sharma static unsigned long aud_clk_regs[] __initdata = {
217d39e55e0SRahul Sharma 	MUX_SEL_AUD,
218d39e55e0SRahul Sharma 	DIV_AUD0,
219d39e55e0SRahul Sharma 	DIV_AUD1,
220d39e55e0SRahul Sharma 	EN_ACLK_AUD,
221d39e55e0SRahul Sharma 	EN_PCLK_AUD,
222d39e55e0SRahul Sharma 	EN_SCLK_AUD,
223d39e55e0SRahul Sharma 	EN_IP_AUD,
224d39e55e0SRahul Sharma };
225d39e55e0SRahul Sharma 
226d39e55e0SRahul Sharma PNAME(mout_aud_pll_user_p) = {"fin_pll", "fout_aud_pll"};
227d39e55e0SRahul Sharma PNAME(mout_sclk_aud_i2s_p) = {"mout_aud_pll_user", "ioclk_i2s_cdclk"};
228d39e55e0SRahul Sharma PNAME(mout_sclk_aud_pcm_p) = {"mout_aud_pll_user", "ioclk_pcm_extclk"};
229d39e55e0SRahul Sharma 
230d39e55e0SRahul Sharma struct samsung_mux_clock aud_mux_clks[] __initdata = {
231d39e55e0SRahul Sharma 	MUX(AUD_MOUT_AUD_PLL_USER, "mout_aud_pll_user", mout_aud_pll_user_p,
232d39e55e0SRahul Sharma 			MUX_SEL_AUD, 0, 1),
233d39e55e0SRahul Sharma 	MUX(AUD_MOUT_SCLK_AUD_I2S, "mout_sclk_aud_i2s", mout_sclk_aud_i2s_p,
234d39e55e0SRahul Sharma 			MUX_SEL_AUD, 4, 1),
235d39e55e0SRahul Sharma 	MUX(AUD_MOUT_SCLK_AUD_PCM, "mout_sclk_aud_pcm", mout_sclk_aud_pcm_p,
236d39e55e0SRahul Sharma 			MUX_SEL_AUD, 8, 1),
237d39e55e0SRahul Sharma };
238d39e55e0SRahul Sharma 
239d39e55e0SRahul Sharma struct samsung_div_clock aud_div_clks[] __initdata = {
240d39e55e0SRahul Sharma 	DIV(AUD_DOUT_ACLK_AUD_131, "dout_aclk_aud_131", "mout_aud_pll_user",
241d39e55e0SRahul Sharma 			DIV_AUD0, 0, 4),
242d39e55e0SRahul Sharma 
243d39e55e0SRahul Sharma 	DIV(AUD_DOUT_SCLK_AUD_I2S, "dout_sclk_aud_i2s", "mout_sclk_aud_i2s",
244d39e55e0SRahul Sharma 			DIV_AUD1, 0, 4),
245d39e55e0SRahul Sharma 	DIV(AUD_DOUT_SCLK_AUD_PCM, "dout_sclk_aud_pcm", "mout_sclk_aud_pcm",
246d39e55e0SRahul Sharma 			DIV_AUD1, 4, 8),
247d39e55e0SRahul Sharma 	DIV(AUD_DOUT_SCLK_AUD_UART, "dout_sclk_aud_uart", "mout_aud_pll_user",
248d39e55e0SRahul Sharma 			DIV_AUD1, 12, 4),
249d39e55e0SRahul Sharma };
250d39e55e0SRahul Sharma 
251d39e55e0SRahul Sharma struct samsung_gate_clock aud_gate_clks[] __initdata = {
252d39e55e0SRahul Sharma 	GATE(AUD_SCLK_I2S, "sclk_aud_i2s", "dout_sclk_aud_i2s",
253d39e55e0SRahul Sharma 			EN_SCLK_AUD, 0, CLK_SET_RATE_PARENT, 0),
254d39e55e0SRahul Sharma 	GATE(AUD_SCLK_PCM, "sclk_aud_pcm", "dout_sclk_aud_pcm",
255d39e55e0SRahul Sharma 			EN_SCLK_AUD, 1, CLK_SET_RATE_PARENT, 0),
256d39e55e0SRahul Sharma 	GATE(AUD_SCLK_AUD_UART, "sclk_aud_uart", "dout_sclk_aud_uart",
257d39e55e0SRahul Sharma 			EN_SCLK_AUD, 2, CLK_SET_RATE_PARENT, 0),
258d39e55e0SRahul Sharma 
259d39e55e0SRahul Sharma 	GATE(AUD_CLK_SRAMC, "clk_sramc", "dout_aclk_aud_131", EN_IP_AUD,
260d39e55e0SRahul Sharma 			0, 0, 0),
261d39e55e0SRahul Sharma 	GATE(AUD_CLK_DMAC, "clk_dmac", "dout_aclk_aud_131",
262d39e55e0SRahul Sharma 			EN_IP_AUD, 1, 0, 0),
263d39e55e0SRahul Sharma 	GATE(AUD_CLK_I2S, "clk_i2s", "dout_aclk_aud_131", EN_IP_AUD, 2, 0, 0),
264d39e55e0SRahul Sharma 	GATE(AUD_CLK_PCM, "clk_pcm", "dout_aclk_aud_131", EN_IP_AUD, 3, 0, 0),
265d39e55e0SRahul Sharma 	GATE(AUD_CLK_AUD_UART, "clk_aud_uart", "dout_aclk_aud_131",
266d39e55e0SRahul Sharma 			EN_IP_AUD, 4, 0, 0),
267d39e55e0SRahul Sharma };
268d39e55e0SRahul Sharma 
269d39e55e0SRahul Sharma static void __init exynos5260_clk_aud_init(struct device_node *np)
270d39e55e0SRahul Sharma {
271d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
272d39e55e0SRahul Sharma 
273d39e55e0SRahul Sharma 	cmu.mux_clks = aud_mux_clks;
274d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(aud_mux_clks);
275d39e55e0SRahul Sharma 	cmu.div_clks = aud_div_clks;
276d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(aud_div_clks);
277d39e55e0SRahul Sharma 	cmu.gate_clks = aud_gate_clks;
278d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(aud_gate_clks);
279d39e55e0SRahul Sharma 	cmu.nr_clk_ids = AUD_NR_CLK;
280d39e55e0SRahul Sharma 	cmu.clk_regs = aud_clk_regs;
281d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(aud_clk_regs);
282d39e55e0SRahul Sharma 
283d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
284d39e55e0SRahul Sharma }
285d39e55e0SRahul Sharma 
286d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_aud, "samsung,exynos5260-clock-aud",
287d39e55e0SRahul Sharma 		exynos5260_clk_aud_init);
288d39e55e0SRahul Sharma 
289d39e55e0SRahul Sharma 
290d39e55e0SRahul Sharma /* CMU_DISP */
291d39e55e0SRahul Sharma 
292d39e55e0SRahul Sharma static unsigned long disp_clk_regs[] __initdata = {
293d39e55e0SRahul Sharma 	MUX_SEL_DISP0,
294d39e55e0SRahul Sharma 	MUX_SEL_DISP1,
295d39e55e0SRahul Sharma 	MUX_SEL_DISP2,
296d39e55e0SRahul Sharma 	MUX_SEL_DISP3,
297d39e55e0SRahul Sharma 	MUX_SEL_DISP4,
298d39e55e0SRahul Sharma 	DIV_DISP,
299d39e55e0SRahul Sharma 	EN_ACLK_DISP,
300d39e55e0SRahul Sharma 	EN_PCLK_DISP,
301d39e55e0SRahul Sharma 	EN_SCLK_DISP0,
302d39e55e0SRahul Sharma 	EN_SCLK_DISP1,
303d39e55e0SRahul Sharma 	EN_IP_DISP,
304d39e55e0SRahul Sharma 	EN_IP_DISP_BUS,
305d39e55e0SRahul Sharma };
306d39e55e0SRahul Sharma 
307d39e55e0SRahul Sharma PNAME(mout_phyclk_dptx_phy_ch3_txd_clk_user_p) = {"fin_pll",
308d39e55e0SRahul Sharma 			"phyclk_dptx_phy_ch3_txd_clk"};
309d39e55e0SRahul Sharma PNAME(mout_phyclk_dptx_phy_ch2_txd_clk_user_p) = {"fin_pll",
310d39e55e0SRahul Sharma 			"phyclk_dptx_phy_ch2_txd_clk"};
311d39e55e0SRahul Sharma PNAME(mout_phyclk_dptx_phy_ch1_txd_clk_user_p) = {"fin_pll",
312d39e55e0SRahul Sharma 			"phyclk_dptx_phy_ch1_txd_clk"};
313d39e55e0SRahul Sharma PNAME(mout_phyclk_dptx_phy_ch0_txd_clk_user_p) = {"fin_pll",
314d39e55e0SRahul Sharma 			"phyclk_dptx_phy_ch0_txd_clk"};
315d39e55e0SRahul Sharma PNAME(mout_aclk_disp_222_user_p) = {"fin_pll", "dout_aclk_disp_222"};
316d39e55e0SRahul Sharma PNAME(mout_sclk_disp_pixel_user_p) = {"fin_pll", "dout_sclk_disp_pixel"};
317d39e55e0SRahul Sharma PNAME(mout_aclk_disp_333_user_p) = {"fin_pll", "dout_aclk_disp_333"};
318d39e55e0SRahul Sharma PNAME(mout_phyclk_hdmi_phy_tmds_clko_user_p) = {"fin_pll",
319d39e55e0SRahul Sharma 			"phyclk_hdmi_phy_tmds_clko"};
320d39e55e0SRahul Sharma PNAME(mout_phyclk_hdmi_phy_ref_clko_user_p) = {"fin_pll",
321d39e55e0SRahul Sharma 			"phyclk_hdmi_phy_ref_clko"};
322d39e55e0SRahul Sharma PNAME(mout_phyclk_hdmi_phy_pixel_clko_user_p) = {"fin_pll",
323d39e55e0SRahul Sharma 			"phyclk_hdmi_phy_pixel_clko"};
324d39e55e0SRahul Sharma PNAME(mout_phyclk_hdmi_link_o_tmds_clkhi_user_p) = {"fin_pll",
325d39e55e0SRahul Sharma 			"phyclk_hdmi_link_o_tmds_clkhi"};
326d39e55e0SRahul Sharma PNAME(mout_phyclk_mipi_dphy_4l_m_txbyte_clkhs_p) = {"fin_pll",
327d39e55e0SRahul Sharma 			"phyclk_mipi_dphy_4l_m_txbyte_clkhs"};
328d39e55e0SRahul Sharma PNAME(mout_phyclk_dptx_phy_o_ref_clk_24m_user_p) = {"fin_pll",
329d39e55e0SRahul Sharma 			"phyclk_dptx_phy_o_ref_clk_24m"};
330d39e55e0SRahul Sharma PNAME(mout_phyclk_dptx_phy_clk_div2_user_p) = {"fin_pll",
331d39e55e0SRahul Sharma 			"phyclk_dptx_phy_clk_div2"};
332d39e55e0SRahul Sharma PNAME(mout_sclk_hdmi_pixel_p) = {"mout_sclk_disp_pixel_user",
333d39e55e0SRahul Sharma 			"mout_aclk_disp_222_user"};
334d39e55e0SRahul Sharma PNAME(mout_phyclk_mipi_dphy_4lmrxclk_esc0_user_p) = {"fin_pll",
335d39e55e0SRahul Sharma 			"phyclk_mipi_dphy_4l_m_rxclkesc0"};
336d39e55e0SRahul Sharma PNAME(mout_sclk_hdmi_spdif_p) = {"fin_pll", "ioclk_spdif_extclk",
337d39e55e0SRahul Sharma 			"dout_aclk_peri_aud", "phyclk_hdmi_phy_ref_cko"};
338d39e55e0SRahul Sharma 
339d39e55e0SRahul Sharma struct samsung_mux_clock disp_mux_clks[] __initdata = {
340d39e55e0SRahul Sharma 	MUX(DISP_MOUT_ACLK_DISP_333_USER, "mout_aclk_disp_333_user",
341d39e55e0SRahul Sharma 			mout_aclk_disp_333_user_p,
342d39e55e0SRahul Sharma 			MUX_SEL_DISP0, 0, 1),
343d39e55e0SRahul Sharma 	MUX(DISP_MOUT_SCLK_DISP_PIXEL_USER, "mout_sclk_disp_pixel_user",
344d39e55e0SRahul Sharma 			mout_sclk_disp_pixel_user_p,
345d39e55e0SRahul Sharma 			MUX_SEL_DISP0, 4, 1),
346d39e55e0SRahul Sharma 	MUX(DISP_MOUT_ACLK_DISP_222_USER, "mout_aclk_disp_222_user",
347d39e55e0SRahul Sharma 			mout_aclk_disp_222_user_p,
348d39e55e0SRahul Sharma 			MUX_SEL_DISP0, 8, 1),
349d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_DPTX_PHY_CH0_TXD_CLK_USER,
350d39e55e0SRahul Sharma 			"mout_phyclk_dptx_phy_ch0_txd_clk_user",
351d39e55e0SRahul Sharma 			mout_phyclk_dptx_phy_ch0_txd_clk_user_p,
352d39e55e0SRahul Sharma 			MUX_SEL_DISP0, 16, 1),
353d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_DPTX_PHY_CH1_TXD_CLK_USER,
354d39e55e0SRahul Sharma 			"mout_phyclk_dptx_phy_ch1_txd_clk_user",
355d39e55e0SRahul Sharma 			mout_phyclk_dptx_phy_ch1_txd_clk_user_p,
356d39e55e0SRahul Sharma 			MUX_SEL_DISP0, 20, 1),
357d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_DPTX_PHY_CH2_TXD_CLK_USER,
358d39e55e0SRahul Sharma 			"mout_phyclk_dptx_phy_ch2_txd_clk_user",
359d39e55e0SRahul Sharma 			mout_phyclk_dptx_phy_ch2_txd_clk_user_p,
360d39e55e0SRahul Sharma 			MUX_SEL_DISP0, 24, 1),
361d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_DPTX_PHY_CH3_TXD_CLK_USER,
362d39e55e0SRahul Sharma 			"mout_phyclk_dptx_phy_ch3_txd_clk_user",
363d39e55e0SRahul Sharma 			mout_phyclk_dptx_phy_ch3_txd_clk_user_p,
364d39e55e0SRahul Sharma 			MUX_SEL_DISP0, 28, 1),
365d39e55e0SRahul Sharma 
366d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_DPTX_PHY_CLK_DIV2_USER,
367d39e55e0SRahul Sharma 			"mout_phyclk_dptx_phy_clk_div2_user",
368d39e55e0SRahul Sharma 			mout_phyclk_dptx_phy_clk_div2_user_p,
369d39e55e0SRahul Sharma 			MUX_SEL_DISP1, 0, 1),
370d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_DPTX_PHY_O_REF_CLK_24M_USER,
371d39e55e0SRahul Sharma 			"mout_phyclk_dptx_phy_o_ref_clk_24m_user",
372d39e55e0SRahul Sharma 			mout_phyclk_dptx_phy_o_ref_clk_24m_user_p,
373d39e55e0SRahul Sharma 			MUX_SEL_DISP1, 4, 1),
374d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_MIPI_DPHY_4L_M_TXBYTE_CLKHS,
375d39e55e0SRahul Sharma 			"mout_phyclk_mipi_dphy_4l_m_txbyte_clkhs",
376d39e55e0SRahul Sharma 			mout_phyclk_mipi_dphy_4l_m_txbyte_clkhs_p,
377d39e55e0SRahul Sharma 			MUX_SEL_DISP1, 8, 1),
378d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_HDMI_LINK_O_TMDS_CLKHI_USER,
379d39e55e0SRahul Sharma 			"mout_phyclk_hdmi_link_o_tmds_clkhi_user",
380d39e55e0SRahul Sharma 			mout_phyclk_hdmi_link_o_tmds_clkhi_user_p,
381d39e55e0SRahul Sharma 			MUX_SEL_DISP1, 16, 1),
382d39e55e0SRahul Sharma 	MUX(DISP_MOUT_HDMI_PHY_PIXEL,
383d39e55e0SRahul Sharma 			"mout_phyclk_hdmi_phy_pixel_clko_user",
384d39e55e0SRahul Sharma 			mout_phyclk_hdmi_phy_pixel_clko_user_p,
385d39e55e0SRahul Sharma 			MUX_SEL_DISP1, 20, 1),
386d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_HDMI_PHY_REF_CLKO_USER,
387d39e55e0SRahul Sharma 			"mout_phyclk_hdmi_phy_ref_clko_user",
388d39e55e0SRahul Sharma 			mout_phyclk_hdmi_phy_ref_clko_user_p,
389d39e55e0SRahul Sharma 			MUX_SEL_DISP1, 24, 1),
390d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_HDMI_PHY_TMDS_CLKO_USER,
391d39e55e0SRahul Sharma 			"mout_phyclk_hdmi_phy_tmds_clko_user",
392d39e55e0SRahul Sharma 			mout_phyclk_hdmi_phy_tmds_clko_user_p,
393d39e55e0SRahul Sharma 			MUX_SEL_DISP1, 28, 1),
394d39e55e0SRahul Sharma 
395d39e55e0SRahul Sharma 	MUX(DISP_MOUT_PHYCLK_MIPI_DPHY_4LMRXCLK_ESC0_USER,
396d39e55e0SRahul Sharma 			"mout_phyclk_mipi_dphy_4lmrxclk_esc0_user",
397d39e55e0SRahul Sharma 			mout_phyclk_mipi_dphy_4lmrxclk_esc0_user_p,
398d39e55e0SRahul Sharma 			MUX_SEL_DISP2, 0, 1),
399d39e55e0SRahul Sharma 	MUX(DISP_MOUT_SCLK_HDMI_PIXEL, "mout_sclk_hdmi_pixel",
400d39e55e0SRahul Sharma 			mout_sclk_hdmi_pixel_p,
401d39e55e0SRahul Sharma 			MUX_SEL_DISP2, 4, 1),
402d39e55e0SRahul Sharma 
403d39e55e0SRahul Sharma 	MUX(DISP_MOUT_SCLK_HDMI_SPDIF, "mout_sclk_hdmi_spdif",
404d39e55e0SRahul Sharma 			mout_sclk_hdmi_spdif_p,
405d39e55e0SRahul Sharma 			MUX_SEL_DISP4, 4, 2),
406d39e55e0SRahul Sharma };
407d39e55e0SRahul Sharma 
408d39e55e0SRahul Sharma struct samsung_div_clock disp_div_clks[] __initdata = {
409d39e55e0SRahul Sharma 	DIV(DISP_DOUT_PCLK_DISP_111, "dout_pclk_disp_111",
410d39e55e0SRahul Sharma 			"mout_aclk_disp_222_user",
411d39e55e0SRahul Sharma 			DIV_DISP, 8, 4),
412d39e55e0SRahul Sharma 	DIV(DISP_DOUT_SCLK_FIMD1_EXTCLKPLL, "dout_sclk_fimd1_extclkpll",
413d39e55e0SRahul Sharma 			"mout_sclk_disp_pixel_user",
414d39e55e0SRahul Sharma 			DIV_DISP, 12, 4),
415d39e55e0SRahul Sharma 	DIV(DISP_DOUT_SCLK_HDMI_PHY_PIXEL_CLKI,
416d39e55e0SRahul Sharma 			"dout_sclk_hdmi_phy_pixel_clki",
417d39e55e0SRahul Sharma 			"mout_sclk_hdmi_pixel",
418d39e55e0SRahul Sharma 			DIV_DISP, 16, 4),
419d39e55e0SRahul Sharma };
420d39e55e0SRahul Sharma 
421d39e55e0SRahul Sharma struct samsung_gate_clock disp_gate_clks[] __initdata = {
422d39e55e0SRahul Sharma 	GATE(DISP_MOUT_HDMI_PHY_PIXEL_USER, "sclk_hdmi_link_i_pixel",
423d39e55e0SRahul Sharma 			"mout_phyclk_hdmi_phy_pixel_clko_user",
424d39e55e0SRahul Sharma 			EN_SCLK_DISP0, 26, CLK_SET_RATE_PARENT, 0),
425d39e55e0SRahul Sharma 	GATE(DISP_SCLK_PIXEL, "sclk_hdmi_phy_pixel_clki",
426d39e55e0SRahul Sharma 			"dout_sclk_hdmi_phy_pixel_clki",
427d39e55e0SRahul Sharma 			EN_SCLK_DISP0, 29, CLK_SET_RATE_PARENT, 0),
428d39e55e0SRahul Sharma 
429d39e55e0SRahul Sharma 	GATE(DISP_CLK_DP, "clk_dptx_link", "mout_aclk_disp_222_user",
430d39e55e0SRahul Sharma 			EN_IP_DISP, 4, 0, 0),
431d39e55e0SRahul Sharma 	GATE(DISP_CLK_DPPHY, "clk_dptx_phy", "mout_aclk_disp_222_user",
432d39e55e0SRahul Sharma 			EN_IP_DISP, 5, 0, 0),
433d39e55e0SRahul Sharma 	GATE(DISP_CLK_DSIM1, "clk_dsim1", "mout_aclk_disp_222_user",
434d39e55e0SRahul Sharma 			EN_IP_DISP, 6, 0, 0),
435d39e55e0SRahul Sharma 	GATE(DISP_CLK_FIMD1, "clk_fimd1", "mout_aclk_disp_222_user",
436d39e55e0SRahul Sharma 			EN_IP_DISP, 7, 0, 0),
437d39e55e0SRahul Sharma 	GATE(DISP_CLK_HDMI, "clk_hdmi", "mout_aclk_disp_222_user",
438d39e55e0SRahul Sharma 			EN_IP_DISP, 8, 0, 0),
439d39e55e0SRahul Sharma 	GATE(DISP_CLK_HDMIPHY, "clk_hdmiphy", "mout_aclk_disp_222_user",
440d39e55e0SRahul Sharma 			EN_IP_DISP, 9, 0, 0),
441d39e55e0SRahul Sharma 	GATE(DISP_CLK_MIPIPHY, "clk_mipi_dphy", "mout_aclk_disp_222_user",
442d39e55e0SRahul Sharma 			EN_IP_DISP, 10, 0, 0),
443d39e55e0SRahul Sharma 	GATE(DISP_CLK_MIXER, "clk_mixer", "mout_aclk_disp_222_user",
444d39e55e0SRahul Sharma 			EN_IP_DISP, 11, 0, 0),
445d39e55e0SRahul Sharma 	GATE(DISP_CLK_PIXEL_DISP, "clk_pixel_disp", "mout_aclk_disp_222_user",
446d39e55e0SRahul Sharma 			EN_IP_DISP, 12, CLK_IGNORE_UNUSED, 0),
447d39e55e0SRahul Sharma 	GATE(DISP_CLK_PIXEL_MIXER, "clk_pixel_mixer", "mout_aclk_disp_222_user",
448d39e55e0SRahul Sharma 			EN_IP_DISP, 13, CLK_IGNORE_UNUSED, 0),
449d39e55e0SRahul Sharma 	GATE(DISP_CLK_SMMU_FIMD1M0, "clk_smmu3_fimd1m0",
450d39e55e0SRahul Sharma 			"mout_aclk_disp_222_user",
451d39e55e0SRahul Sharma 			EN_IP_DISP, 22, 0, 0),
452d39e55e0SRahul Sharma 	GATE(DISP_CLK_SMMU_FIMD1M1, "clk_smmu3_fimd1m1",
453d39e55e0SRahul Sharma 			"mout_aclk_disp_222_user",
454d39e55e0SRahul Sharma 			EN_IP_DISP, 23, 0, 0),
455d39e55e0SRahul Sharma 	GATE(DISP_CLK_SMMU_TV, "clk_smmu3_tv", "mout_aclk_disp_222_user",
456d39e55e0SRahul Sharma 			EN_IP_DISP, 25, 0, 0),
457d39e55e0SRahul Sharma };
458d39e55e0SRahul Sharma 
459d39e55e0SRahul Sharma static void __init exynos5260_clk_disp_init(struct device_node *np)
460d39e55e0SRahul Sharma {
461d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
462d39e55e0SRahul Sharma 
463d39e55e0SRahul Sharma 	cmu.mux_clks = disp_mux_clks;
464d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(disp_mux_clks);
465d39e55e0SRahul Sharma 	cmu.div_clks = disp_div_clks;
466d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(disp_div_clks);
467d39e55e0SRahul Sharma 	cmu.gate_clks = disp_gate_clks;
468d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(disp_gate_clks);
469d39e55e0SRahul Sharma 	cmu.nr_clk_ids = DISP_NR_CLK;
470d39e55e0SRahul Sharma 	cmu.clk_regs = disp_clk_regs;
471d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(disp_clk_regs);
472d39e55e0SRahul Sharma 
473d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
474d39e55e0SRahul Sharma }
475d39e55e0SRahul Sharma 
476d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_disp, "samsung,exynos5260-clock-disp",
477d39e55e0SRahul Sharma 		exynos5260_clk_disp_init);
478d39e55e0SRahul Sharma 
479d39e55e0SRahul Sharma 
480d39e55e0SRahul Sharma /* CMU_EGL */
481d39e55e0SRahul Sharma 
482d39e55e0SRahul Sharma static unsigned long egl_clk_regs[] __initdata = {
483d39e55e0SRahul Sharma 	EGL_PLL_LOCK,
484d39e55e0SRahul Sharma 	EGL_PLL_CON0,
485d39e55e0SRahul Sharma 	EGL_PLL_CON1,
486d39e55e0SRahul Sharma 	EGL_PLL_FREQ_DET,
487d39e55e0SRahul Sharma 	MUX_SEL_EGL,
488d39e55e0SRahul Sharma 	MUX_ENABLE_EGL,
489d39e55e0SRahul Sharma 	DIV_EGL,
490d39e55e0SRahul Sharma 	DIV_EGL_PLL_FDET,
491d39e55e0SRahul Sharma 	EN_ACLK_EGL,
492d39e55e0SRahul Sharma 	EN_PCLK_EGL,
493d39e55e0SRahul Sharma 	EN_SCLK_EGL,
494d39e55e0SRahul Sharma };
495d39e55e0SRahul Sharma 
496d39e55e0SRahul Sharma PNAME(mout_egl_b_p) = {"mout_egl_pll", "dout_bus_pll"};
497d39e55e0SRahul Sharma PNAME(mout_egl_pll_p) = {"fin_pll", "fout_egl_pll"};
498d39e55e0SRahul Sharma 
499d39e55e0SRahul Sharma struct samsung_mux_clock egl_mux_clks[] __initdata = {
500d39e55e0SRahul Sharma 	MUX(EGL_MOUT_EGL_PLL, "mout_egl_pll", mout_egl_pll_p,
501d39e55e0SRahul Sharma 			MUX_SEL_EGL, 4, 1),
502d39e55e0SRahul Sharma 	MUX(EGL_MOUT_EGL_B, "mout_egl_b", mout_egl_b_p, MUX_SEL_EGL, 16, 1),
503d39e55e0SRahul Sharma };
504d39e55e0SRahul Sharma 
505d39e55e0SRahul Sharma struct samsung_div_clock egl_div_clks[] __initdata = {
506d39e55e0SRahul Sharma 	DIV(EGL_DOUT_EGL1, "dout_egl1", "mout_egl_b", DIV_EGL, 0, 3),
507d39e55e0SRahul Sharma 	DIV(EGL_DOUT_EGL2, "dout_egl2", "dout_egl1", DIV_EGL, 4, 3),
508d39e55e0SRahul Sharma 	DIV(EGL_DOUT_ACLK_EGL, "dout_aclk_egl", "dout_egl2", DIV_EGL, 8, 3),
509d39e55e0SRahul Sharma 	DIV(EGL_DOUT_PCLK_EGL, "dout_pclk_egl", "dout_egl_atclk",
510d39e55e0SRahul Sharma 			DIV_EGL, 12, 3),
511d39e55e0SRahul Sharma 	DIV(EGL_DOUT_EGL_ATCLK, "dout_egl_atclk", "dout_egl2", DIV_EGL, 16, 3),
512d39e55e0SRahul Sharma 	DIV(EGL_DOUT_EGL_PCLK_DBG, "dout_egl_pclk_dbg", "dout_egl_atclk",
513d39e55e0SRahul Sharma 			DIV_EGL, 20, 3),
514d39e55e0SRahul Sharma 	DIV(EGL_DOUT_EGL_PLL, "dout_egl_pll", "mout_egl_b", DIV_EGL, 24, 3),
515d39e55e0SRahul Sharma };
516d39e55e0SRahul Sharma 
517d39e55e0SRahul Sharma static struct samsung_pll_clock egl_pll_clks[] __initdata = {
518d39e55e0SRahul Sharma 	PLL(pll_2550xx, EGL_FOUT_EGL_PLL, "fout_egl_pll", "fin_pll",
519d39e55e0SRahul Sharma 		EGL_PLL_LOCK, EGL_PLL_CON0,
520d39e55e0SRahul Sharma 		pll2550_24mhz_tbl),
521d39e55e0SRahul Sharma };
522d39e55e0SRahul Sharma 
523d39e55e0SRahul Sharma static void __init exynos5260_clk_egl_init(struct device_node *np)
524d39e55e0SRahul Sharma {
525d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
526d39e55e0SRahul Sharma 
527d39e55e0SRahul Sharma 	cmu.pll_clks = egl_pll_clks;
528d39e55e0SRahul Sharma 	cmu.nr_pll_clks =  ARRAY_SIZE(egl_pll_clks);
529d39e55e0SRahul Sharma 	cmu.mux_clks = egl_mux_clks;
530d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(egl_mux_clks);
531d39e55e0SRahul Sharma 	cmu.div_clks = egl_div_clks;
532d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(egl_div_clks);
533d39e55e0SRahul Sharma 	cmu.nr_clk_ids = EGL_NR_CLK;
534d39e55e0SRahul Sharma 	cmu.clk_regs = egl_clk_regs;
535d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(egl_clk_regs);
536d39e55e0SRahul Sharma 
537d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
538d39e55e0SRahul Sharma }
539d39e55e0SRahul Sharma 
540d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_egl, "samsung,exynos5260-clock-egl",
541d39e55e0SRahul Sharma 		exynos5260_clk_egl_init);
542d39e55e0SRahul Sharma 
543d39e55e0SRahul Sharma 
544d39e55e0SRahul Sharma /* CMU_FSYS */
545d39e55e0SRahul Sharma 
546d39e55e0SRahul Sharma static unsigned long fsys_clk_regs[] __initdata = {
547d39e55e0SRahul Sharma 	MUX_SEL_FSYS0,
548d39e55e0SRahul Sharma 	MUX_SEL_FSYS1,
549d39e55e0SRahul Sharma 	EN_ACLK_FSYS,
550d39e55e0SRahul Sharma 	EN_ACLK_FSYS_SECURE_RTIC,
551d39e55e0SRahul Sharma 	EN_ACLK_FSYS_SECURE_SMMU_RTIC,
552d39e55e0SRahul Sharma 	EN_SCLK_FSYS,
553d39e55e0SRahul Sharma 	EN_IP_FSYS,
554d39e55e0SRahul Sharma 	EN_IP_FSYS_SECURE_RTIC,
555d39e55e0SRahul Sharma 	EN_IP_FSYS_SECURE_SMMU_RTIC,
556d39e55e0SRahul Sharma };
557d39e55e0SRahul Sharma 
558d39e55e0SRahul Sharma PNAME(mout_phyclk_usbhost20_phyclk_user_p) = {"fin_pll",
559d39e55e0SRahul Sharma 			"phyclk_usbhost20_phy_phyclock"};
560d39e55e0SRahul Sharma PNAME(mout_phyclk_usbhost20_freeclk_user_p) = {"fin_pll",
561d39e55e0SRahul Sharma 			"phyclk_usbhost20_phy_freeclk"};
562d39e55e0SRahul Sharma PNAME(mout_phyclk_usbhost20_clk48mohci_user_p) = {"fin_pll",
563d39e55e0SRahul Sharma 			"phyclk_usbhost20_phy_clk48mohci"};
564d39e55e0SRahul Sharma PNAME(mout_phyclk_usbdrd30_pipe_pclk_user_p) = {"fin_pll",
565d39e55e0SRahul Sharma 			"phyclk_usbdrd30_udrd30_pipe_pclk"};
566d39e55e0SRahul Sharma PNAME(mout_phyclk_usbdrd30_phyclock_user_p) = {"fin_pll",
567d39e55e0SRahul Sharma 			"phyclk_usbdrd30_udrd30_phyclock"};
568d39e55e0SRahul Sharma 
569d39e55e0SRahul Sharma struct samsung_mux_clock fsys_mux_clks[] __initdata = {
570d39e55e0SRahul Sharma 	MUX(FSYS_MOUT_PHYCLK_USBDRD30_PHYCLOCK_USER,
571d39e55e0SRahul Sharma 			"mout_phyclk_usbdrd30_phyclock_user",
572d39e55e0SRahul Sharma 			mout_phyclk_usbdrd30_phyclock_user_p,
573d39e55e0SRahul Sharma 			MUX_SEL_FSYS1, 0, 1),
574d39e55e0SRahul Sharma 	MUX(FSYS_MOUT_PHYCLK_USBDRD30_PIPE_PCLK_USER,
575d39e55e0SRahul Sharma 			"mout_phyclk_usbdrd30_pipe_pclk_user",
576d39e55e0SRahul Sharma 			mout_phyclk_usbdrd30_pipe_pclk_user_p,
577d39e55e0SRahul Sharma 			MUX_SEL_FSYS1, 4, 1),
578d39e55e0SRahul Sharma 	MUX(FSYS_MOUT_PHYCLK_USBHOST20_CLK48MOHCI_USER,
579d39e55e0SRahul Sharma 			"mout_phyclk_usbhost20_clk48mohci_user",
580d39e55e0SRahul Sharma 			mout_phyclk_usbhost20_clk48mohci_user_p,
581d39e55e0SRahul Sharma 			MUX_SEL_FSYS1, 8, 1),
582d39e55e0SRahul Sharma 	MUX(FSYS_MOUT_PHYCLK_USBHOST20_FREECLK_USER,
583d39e55e0SRahul Sharma 			"mout_phyclk_usbhost20_freeclk_user",
584d39e55e0SRahul Sharma 			mout_phyclk_usbhost20_freeclk_user_p,
585d39e55e0SRahul Sharma 			MUX_SEL_FSYS1, 12, 1),
586d39e55e0SRahul Sharma 	MUX(FSYS_MOUT_PHYCLK_USBHOST20_PHYCLK_USER,
587d39e55e0SRahul Sharma 			"mout_phyclk_usbhost20_phyclk_user",
588d39e55e0SRahul Sharma 			mout_phyclk_usbhost20_phyclk_user_p,
589d39e55e0SRahul Sharma 			MUX_SEL_FSYS1, 16, 1),
590d39e55e0SRahul Sharma };
591d39e55e0SRahul Sharma 
592d39e55e0SRahul Sharma struct samsung_gate_clock fsys_gate_clks[] __initdata = {
593d39e55e0SRahul Sharma 	GATE(FSYS_PHYCLK_USBHOST20, "phyclk_usbhost20_phyclock",
594d39e55e0SRahul Sharma 			"mout_phyclk_usbdrd30_phyclock_user",
595d39e55e0SRahul Sharma 			EN_SCLK_FSYS, 1, 0, 0),
596d39e55e0SRahul Sharma 	GATE(FSYS_PHYCLK_USBDRD30, "phyclk_usbdrd30_udrd30_phyclock_g",
597d39e55e0SRahul Sharma 			"mout_phyclk_usbdrd30_phyclock_user",
598d39e55e0SRahul Sharma 			EN_SCLK_FSYS, 7, 0, 0),
599d39e55e0SRahul Sharma 
600d39e55e0SRahul Sharma 	GATE(FSYS_CLK_MMC0, "clk_mmc0", "dout_aclk_fsys_200",
601d39e55e0SRahul Sharma 			EN_IP_FSYS, 6, 0, 0),
602d39e55e0SRahul Sharma 	GATE(FSYS_CLK_MMC1, "clk_mmc1", "dout_aclk_fsys_200",
603d39e55e0SRahul Sharma 			EN_IP_FSYS, 7, 0, 0),
604d39e55e0SRahul Sharma 	GATE(FSYS_CLK_MMC2, "clk_mmc2", "dout_aclk_fsys_200",
605d39e55e0SRahul Sharma 			EN_IP_FSYS, 8, 0, 0),
606d39e55e0SRahul Sharma 	GATE(FSYS_CLK_PDMA, "clk_pdma", "dout_aclk_fsys_200",
607d39e55e0SRahul Sharma 			EN_IP_FSYS, 9, 0, 0),
608d39e55e0SRahul Sharma 	GATE(FSYS_CLK_SROMC, "clk_sromc", "dout_aclk_fsys_200",
609d39e55e0SRahul Sharma 			EN_IP_FSYS, 13, 0, 0),
610d39e55e0SRahul Sharma 	GATE(FSYS_CLK_USBDRD30, "clk_usbdrd30", "dout_aclk_fsys_200",
611d39e55e0SRahul Sharma 			EN_IP_FSYS, 14, 0, 0),
612d39e55e0SRahul Sharma 	GATE(FSYS_CLK_USBHOST20, "clk_usbhost20", "dout_aclk_fsys_200",
613d39e55e0SRahul Sharma 			EN_IP_FSYS, 15, 0, 0),
614d39e55e0SRahul Sharma 	GATE(FSYS_CLK_USBLINK, "clk_usblink", "dout_aclk_fsys_200",
615d39e55e0SRahul Sharma 			EN_IP_FSYS, 18, 0, 0),
616d39e55e0SRahul Sharma 	GATE(FSYS_CLK_TSI, "clk_tsi", "dout_aclk_fsys_200",
617d39e55e0SRahul Sharma 			EN_IP_FSYS, 20, 0, 0),
618d39e55e0SRahul Sharma 
619d39e55e0SRahul Sharma 	GATE(FSYS_CLK_RTIC, "clk_rtic", "dout_aclk_fsys_200",
620d39e55e0SRahul Sharma 			EN_IP_FSYS_SECURE_RTIC, 11, 0, 0),
621d39e55e0SRahul Sharma 	GATE(FSYS_CLK_SMMU_RTIC, "clk_smmu_rtic", "dout_aclk_fsys_200",
622d39e55e0SRahul Sharma 			EN_IP_FSYS_SECURE_SMMU_RTIC, 12, 0, 0),
623d39e55e0SRahul Sharma };
624d39e55e0SRahul Sharma 
625d39e55e0SRahul Sharma static void __init exynos5260_clk_fsys_init(struct device_node *np)
626d39e55e0SRahul Sharma {
627d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
628d39e55e0SRahul Sharma 
629d39e55e0SRahul Sharma 	cmu.mux_clks = fsys_mux_clks;
630d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(fsys_mux_clks);
631d39e55e0SRahul Sharma 	cmu.gate_clks = fsys_gate_clks;
632d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(fsys_gate_clks);
633d39e55e0SRahul Sharma 	cmu.nr_clk_ids = FSYS_NR_CLK;
634d39e55e0SRahul Sharma 	cmu.clk_regs = fsys_clk_regs;
635d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(fsys_clk_regs);
636d39e55e0SRahul Sharma 
637d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
638d39e55e0SRahul Sharma }
639d39e55e0SRahul Sharma 
640d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_fsys, "samsung,exynos5260-clock-fsys",
641d39e55e0SRahul Sharma 		exynos5260_clk_fsys_init);
642d39e55e0SRahul Sharma 
643d39e55e0SRahul Sharma 
644d39e55e0SRahul Sharma /* CMU_G2D */
645d39e55e0SRahul Sharma 
646d39e55e0SRahul Sharma static unsigned long g2d_clk_regs[] __initdata = {
647d39e55e0SRahul Sharma 	MUX_SEL_G2D,
648d39e55e0SRahul Sharma 	MUX_STAT_G2D,
649d39e55e0SRahul Sharma 	DIV_G2D,
650d39e55e0SRahul Sharma 	EN_ACLK_G2D,
651d39e55e0SRahul Sharma 	EN_ACLK_G2D_SECURE_SSS,
652d39e55e0SRahul Sharma 	EN_ACLK_G2D_SECURE_SLIM_SSS,
653d39e55e0SRahul Sharma 	EN_ACLK_G2D_SECURE_SMMU_SLIM_SSS,
654d39e55e0SRahul Sharma 	EN_ACLK_G2D_SECURE_SMMU_SSS,
655d39e55e0SRahul Sharma 	EN_ACLK_G2D_SECURE_SMMU_MDMA,
656d39e55e0SRahul Sharma 	EN_ACLK_G2D_SECURE_SMMU_G2D,
657d39e55e0SRahul Sharma 	EN_PCLK_G2D,
658d39e55e0SRahul Sharma 	EN_PCLK_G2D_SECURE_SMMU_SLIM_SSS,
659d39e55e0SRahul Sharma 	EN_PCLK_G2D_SECURE_SMMU_SSS,
660d39e55e0SRahul Sharma 	EN_PCLK_G2D_SECURE_SMMU_MDMA,
661d39e55e0SRahul Sharma 	EN_PCLK_G2D_SECURE_SMMU_G2D,
662d39e55e0SRahul Sharma 	EN_IP_G2D,
663d39e55e0SRahul Sharma 	EN_IP_G2D_SECURE_SSS,
664d39e55e0SRahul Sharma 	EN_IP_G2D_SECURE_SLIM_SSS,
665d39e55e0SRahul Sharma 	EN_IP_G2D_SECURE_SMMU_SLIM_SSS,
666d39e55e0SRahul Sharma 	EN_IP_G2D_SECURE_SMMU_SSS,
667d39e55e0SRahul Sharma 	EN_IP_G2D_SECURE_SMMU_MDMA,
668d39e55e0SRahul Sharma 	EN_IP_G2D_SECURE_SMMU_G2D,
669d39e55e0SRahul Sharma };
670d39e55e0SRahul Sharma 
671d39e55e0SRahul Sharma PNAME(mout_aclk_g2d_333_user_p) = {"fin_pll", "dout_aclk_g2d_333"};
672d39e55e0SRahul Sharma 
673d39e55e0SRahul Sharma struct samsung_mux_clock g2d_mux_clks[] __initdata = {
674d39e55e0SRahul Sharma 	MUX(G2D_MOUT_ACLK_G2D_333_USER, "mout_aclk_g2d_333_user",
675d39e55e0SRahul Sharma 			mout_aclk_g2d_333_user_p,
676d39e55e0SRahul Sharma 			MUX_SEL_G2D, 0, 1),
677d39e55e0SRahul Sharma };
678d39e55e0SRahul Sharma 
679d39e55e0SRahul Sharma struct samsung_div_clock g2d_div_clks[] __initdata = {
680d39e55e0SRahul Sharma 	DIV(G2D_DOUT_PCLK_G2D_83, "dout_pclk_g2d_83", "mout_aclk_g2d_333_user",
681d39e55e0SRahul Sharma 			DIV_G2D, 0, 3),
682d39e55e0SRahul Sharma };
683d39e55e0SRahul Sharma 
684d39e55e0SRahul Sharma struct samsung_gate_clock g2d_gate_clks[] __initdata = {
685d39e55e0SRahul Sharma 	GATE(G2D_CLK_G2D, "clk_g2d", "mout_aclk_g2d_333_user",
686d39e55e0SRahul Sharma 			EN_IP_G2D, 4, 0, 0),
687d39e55e0SRahul Sharma 	GATE(G2D_CLK_JPEG, "clk_jpeg", "mout_aclk_g2d_333_user",
688d39e55e0SRahul Sharma 			EN_IP_G2D, 5, 0, 0),
689d39e55e0SRahul Sharma 	GATE(G2D_CLK_MDMA, "clk_mdma", "mout_aclk_g2d_333_user",
690d39e55e0SRahul Sharma 			EN_IP_G2D, 6, 0, 0),
691d39e55e0SRahul Sharma 	GATE(G2D_CLK_SMMU3_JPEG, "clk_smmu3_jpeg", "mout_aclk_g2d_333_user",
692d39e55e0SRahul Sharma 			EN_IP_G2D, 16, 0, 0),
693d39e55e0SRahul Sharma 
694d39e55e0SRahul Sharma 	GATE(G2D_CLK_SSS, "clk_sss", "mout_aclk_g2d_333_user",
695d39e55e0SRahul Sharma 			EN_IP_G2D_SECURE_SSS, 17, 0, 0),
696d39e55e0SRahul Sharma 
697d39e55e0SRahul Sharma 	GATE(G2D_CLK_SLIM_SSS, "clk_slim_sss", "mout_aclk_g2d_333_user",
698d39e55e0SRahul Sharma 			EN_IP_G2D_SECURE_SLIM_SSS, 11, 0, 0),
699d39e55e0SRahul Sharma 
700d39e55e0SRahul Sharma 	GATE(G2D_CLK_SMMU_SLIM_SSS, "clk_smmu_slim_sss",
701d39e55e0SRahul Sharma 			"mout_aclk_g2d_333_user",
702d39e55e0SRahul Sharma 			EN_IP_G2D_SECURE_SMMU_SLIM_SSS, 13, 0, 0),
703d39e55e0SRahul Sharma 
704d39e55e0SRahul Sharma 	GATE(G2D_CLK_SMMU_SSS, "clk_smmu_sss", "mout_aclk_g2d_333_user",
705d39e55e0SRahul Sharma 			EN_IP_G2D_SECURE_SMMU_SSS, 14, 0, 0),
706d39e55e0SRahul Sharma 
707d39e55e0SRahul Sharma 	GATE(G2D_CLK_SMMU_MDMA, "clk_smmu_mdma", "mout_aclk_g2d_333_user",
708d39e55e0SRahul Sharma 			EN_IP_G2D_SECURE_SMMU_MDMA, 12, 0, 0),
709d39e55e0SRahul Sharma 
710d39e55e0SRahul Sharma 	GATE(G2D_CLK_SMMU3_G2D, "clk_smmu3_g2d", "mout_aclk_g2d_333_user",
711d39e55e0SRahul Sharma 			EN_IP_G2D_SECURE_SMMU_G2D, 15, 0, 0),
712d39e55e0SRahul Sharma };
713d39e55e0SRahul Sharma 
714d39e55e0SRahul Sharma static void __init exynos5260_clk_g2d_init(struct device_node *np)
715d39e55e0SRahul Sharma {
716d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
717d39e55e0SRahul Sharma 
718d39e55e0SRahul Sharma 	cmu.mux_clks = g2d_mux_clks;
719d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(g2d_mux_clks);
720d39e55e0SRahul Sharma 	cmu.div_clks = g2d_div_clks;
721d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(g2d_div_clks);
722d39e55e0SRahul Sharma 	cmu.gate_clks = g2d_gate_clks;
723d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(g2d_gate_clks);
724d39e55e0SRahul Sharma 	cmu.nr_clk_ids = G2D_NR_CLK;
725d39e55e0SRahul Sharma 	cmu.clk_regs = g2d_clk_regs;
726d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(g2d_clk_regs);
727d39e55e0SRahul Sharma 
728d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
729d39e55e0SRahul Sharma }
730d39e55e0SRahul Sharma 
731d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_g2d, "samsung,exynos5260-clock-g2d",
732d39e55e0SRahul Sharma 		exynos5260_clk_g2d_init);
733d39e55e0SRahul Sharma 
734d39e55e0SRahul Sharma 
735d39e55e0SRahul Sharma /* CMU_G3D */
736d39e55e0SRahul Sharma 
737d39e55e0SRahul Sharma static unsigned long g3d_clk_regs[] __initdata = {
738d39e55e0SRahul Sharma 	G3D_PLL_LOCK,
739d39e55e0SRahul Sharma 	G3D_PLL_CON0,
740d39e55e0SRahul Sharma 	G3D_PLL_CON1,
741d39e55e0SRahul Sharma 	G3D_PLL_FDET,
742d39e55e0SRahul Sharma 	MUX_SEL_G3D,
743d39e55e0SRahul Sharma 	DIV_G3D,
744d39e55e0SRahul Sharma 	DIV_G3D_PLL_FDET,
745d39e55e0SRahul Sharma 	EN_ACLK_G3D,
746d39e55e0SRahul Sharma 	EN_PCLK_G3D,
747d39e55e0SRahul Sharma 	EN_SCLK_G3D,
748d39e55e0SRahul Sharma 	EN_IP_G3D,
749d39e55e0SRahul Sharma };
750d39e55e0SRahul Sharma 
751d39e55e0SRahul Sharma PNAME(mout_g3d_pll_p) = {"fin_pll", "fout_g3d_pll"};
752d39e55e0SRahul Sharma 
753d39e55e0SRahul Sharma struct samsung_mux_clock g3d_mux_clks[] __initdata = {
754d39e55e0SRahul Sharma 	MUX(G3D_MOUT_G3D_PLL, "mout_g3d_pll", mout_g3d_pll_p,
755d39e55e0SRahul Sharma 			MUX_SEL_G3D, 0, 1),
756d39e55e0SRahul Sharma };
757d39e55e0SRahul Sharma 
758d39e55e0SRahul Sharma struct samsung_div_clock g3d_div_clks[] __initdata = {
759d39e55e0SRahul Sharma 	DIV(G3D_DOUT_PCLK_G3D, "dout_pclk_g3d", "dout_aclk_g3d", DIV_G3D, 0, 3),
760d39e55e0SRahul Sharma 	DIV(G3D_DOUT_ACLK_G3D, "dout_aclk_g3d", "mout_g3d_pll", DIV_G3D, 4, 3),
761d39e55e0SRahul Sharma };
762d39e55e0SRahul Sharma 
763d39e55e0SRahul Sharma struct samsung_gate_clock g3d_gate_clks[] __initdata = {
764d39e55e0SRahul Sharma 	GATE(G3D_CLK_G3D, "clk_g3d", "dout_aclk_g3d", EN_IP_G3D, 2, 0, 0),
765d39e55e0SRahul Sharma 	GATE(G3D_CLK_G3D_HPM, "clk_g3d_hpm", "dout_aclk_g3d",
766d39e55e0SRahul Sharma 			EN_IP_G3D, 3, 0, 0),
767d39e55e0SRahul Sharma };
768d39e55e0SRahul Sharma 
769d39e55e0SRahul Sharma static struct samsung_pll_clock g3d_pll_clks[] __initdata = {
770d39e55e0SRahul Sharma 	PLL(pll_2550, G3D_FOUT_G3D_PLL, "fout_g3d_pll", "fin_pll",
771d39e55e0SRahul Sharma 		G3D_PLL_LOCK, G3D_PLL_CON0,
772d39e55e0SRahul Sharma 		pll2550_24mhz_tbl),
773d39e55e0SRahul Sharma };
774d39e55e0SRahul Sharma 
775d39e55e0SRahul Sharma static void __init exynos5260_clk_g3d_init(struct device_node *np)
776d39e55e0SRahul Sharma {
777d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
778d39e55e0SRahul Sharma 
779d39e55e0SRahul Sharma 	cmu.pll_clks = g3d_pll_clks;
780d39e55e0SRahul Sharma 	cmu.nr_pll_clks =  ARRAY_SIZE(g3d_pll_clks);
781d39e55e0SRahul Sharma 	cmu.mux_clks = g3d_mux_clks;
782d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(g3d_mux_clks);
783d39e55e0SRahul Sharma 	cmu.div_clks = g3d_div_clks;
784d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(g3d_div_clks);
785d39e55e0SRahul Sharma 	cmu.gate_clks = g3d_gate_clks;
786d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(g3d_gate_clks);
787d39e55e0SRahul Sharma 	cmu.nr_clk_ids = G3D_NR_CLK;
788d39e55e0SRahul Sharma 	cmu.clk_regs = g3d_clk_regs;
789d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(g3d_clk_regs);
790d39e55e0SRahul Sharma 
791d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
792d39e55e0SRahul Sharma }
793d39e55e0SRahul Sharma 
794d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_g3d, "samsung,exynos5260-clock-g3d",
795d39e55e0SRahul Sharma 		exynos5260_clk_g3d_init);
796d39e55e0SRahul Sharma 
797d39e55e0SRahul Sharma 
798d39e55e0SRahul Sharma /* CMU_GSCL */
799d39e55e0SRahul Sharma 
800d39e55e0SRahul Sharma static unsigned long gscl_clk_regs[] __initdata = {
801d39e55e0SRahul Sharma 	MUX_SEL_GSCL,
802d39e55e0SRahul Sharma 	DIV_GSCL,
803d39e55e0SRahul Sharma 	EN_ACLK_GSCL,
804d39e55e0SRahul Sharma 	EN_ACLK_GSCL_FIMC,
805d39e55e0SRahul Sharma 	EN_ACLK_GSCL_SECURE_SMMU_GSCL0,
806d39e55e0SRahul Sharma 	EN_ACLK_GSCL_SECURE_SMMU_GSCL1,
807d39e55e0SRahul Sharma 	EN_ACLK_GSCL_SECURE_SMMU_MSCL0,
808d39e55e0SRahul Sharma 	EN_ACLK_GSCL_SECURE_SMMU_MSCL1,
809d39e55e0SRahul Sharma 	EN_PCLK_GSCL,
810d39e55e0SRahul Sharma 	EN_PCLK_GSCL_FIMC,
811d39e55e0SRahul Sharma 	EN_PCLK_GSCL_SECURE_SMMU_GSCL0,
812d39e55e0SRahul Sharma 	EN_PCLK_GSCL_SECURE_SMMU_GSCL1,
813d39e55e0SRahul Sharma 	EN_PCLK_GSCL_SECURE_SMMU_MSCL0,
814d39e55e0SRahul Sharma 	EN_PCLK_GSCL_SECURE_SMMU_MSCL1,
815d39e55e0SRahul Sharma 	EN_SCLK_GSCL,
816d39e55e0SRahul Sharma 	EN_SCLK_GSCL_FIMC,
817d39e55e0SRahul Sharma 	EN_IP_GSCL,
818d39e55e0SRahul Sharma 	EN_IP_GSCL_FIMC,
819d39e55e0SRahul Sharma 	EN_IP_GSCL_SECURE_SMMU_GSCL0,
820d39e55e0SRahul Sharma 	EN_IP_GSCL_SECURE_SMMU_GSCL1,
821d39e55e0SRahul Sharma 	EN_IP_GSCL_SECURE_SMMU_MSCL0,
822d39e55e0SRahul Sharma 	EN_IP_GSCL_SECURE_SMMU_MSCL1,
823d39e55e0SRahul Sharma };
824d39e55e0SRahul Sharma 
825d39e55e0SRahul Sharma PNAME(mout_aclk_gscl_333_user_p) = {"fin_pll", "dout_aclk_gscl_333"};
826d39e55e0SRahul Sharma PNAME(mout_aclk_m2m_400_user_p) = {"fin_pll", "dout_aclk_gscl_400"};
827d39e55e0SRahul Sharma PNAME(mout_aclk_gscl_fimc_user_p) = {"fin_pll", "dout_aclk_gscl_400"};
828d39e55e0SRahul Sharma PNAME(mout_aclk_csis_p) = {"dout_aclk_csis_200", "mout_aclk_gscl_fimc_user"};
829d39e55e0SRahul Sharma 
830d39e55e0SRahul Sharma struct samsung_mux_clock gscl_mux_clks[] __initdata = {
831d39e55e0SRahul Sharma 	MUX(GSCL_MOUT_ACLK_GSCL_333_USER, "mout_aclk_gscl_333_user",
832d39e55e0SRahul Sharma 			mout_aclk_gscl_333_user_p,
833d39e55e0SRahul Sharma 			MUX_SEL_GSCL, 0, 1),
834d39e55e0SRahul Sharma 	MUX(GSCL_MOUT_ACLK_M2M_400_USER, "mout_aclk_m2m_400_user",
835d39e55e0SRahul Sharma 			mout_aclk_m2m_400_user_p,
836d39e55e0SRahul Sharma 			MUX_SEL_GSCL, 4, 1),
837d39e55e0SRahul Sharma 	MUX(GSCL_MOUT_ACLK_GSCL_FIMC_USER, "mout_aclk_gscl_fimc_user",
838d39e55e0SRahul Sharma 			mout_aclk_gscl_fimc_user_p,
839d39e55e0SRahul Sharma 			MUX_SEL_GSCL, 8, 1),
840d39e55e0SRahul Sharma 	MUX(GSCL_MOUT_ACLK_CSIS, "mout_aclk_csis", mout_aclk_csis_p,
841d39e55e0SRahul Sharma 			MUX_SEL_GSCL, 24, 1),
842d39e55e0SRahul Sharma };
843d39e55e0SRahul Sharma 
844d39e55e0SRahul Sharma struct samsung_div_clock gscl_div_clks[] __initdata = {
845d39e55e0SRahul Sharma 	DIV(GSCL_DOUT_PCLK_M2M_100, "dout_pclk_m2m_100",
846d39e55e0SRahul Sharma 			"mout_aclk_m2m_400_user",
847d39e55e0SRahul Sharma 			DIV_GSCL, 0, 3),
848d39e55e0SRahul Sharma 	DIV(GSCL_DOUT_ACLK_CSIS_200, "dout_aclk_csis_200",
849d39e55e0SRahul Sharma 			"mout_aclk_m2m_400_user",
850d39e55e0SRahul Sharma 			DIV_GSCL, 4, 3),
851d39e55e0SRahul Sharma };
852d39e55e0SRahul Sharma 
853d39e55e0SRahul Sharma struct samsung_gate_clock gscl_gate_clks[] __initdata = {
854d39e55e0SRahul Sharma 	GATE(GSCL_SCLK_CSIS0_WRAP, "sclk_csis0_wrap", "dout_aclk_csis_200",
855d39e55e0SRahul Sharma 			EN_SCLK_GSCL_FIMC, 0, CLK_SET_RATE_PARENT, 0),
856d39e55e0SRahul Sharma 	GATE(GSCL_SCLK_CSIS1_WRAP, "sclk_csis1_wrap", "dout_aclk_csis_200",
857d39e55e0SRahul Sharma 			EN_SCLK_GSCL_FIMC, 1, CLK_SET_RATE_PARENT, 0),
858d39e55e0SRahul Sharma 
859d39e55e0SRahul Sharma 	GATE(GSCL_CLK_GSCL0, "clk_gscl0", "mout_aclk_gscl_333_user",
860d39e55e0SRahul Sharma 			EN_IP_GSCL, 2, 0, 0),
861d39e55e0SRahul Sharma 	GATE(GSCL_CLK_GSCL1, "clk_gscl1", "mout_aclk_gscl_333_user",
862d39e55e0SRahul Sharma 			EN_IP_GSCL, 3, 0, 0),
863d39e55e0SRahul Sharma 	GATE(GSCL_CLK_MSCL0, "clk_mscl0", "mout_aclk_gscl_333_user",
864d39e55e0SRahul Sharma 			EN_IP_GSCL, 4, 0, 0),
865d39e55e0SRahul Sharma 	GATE(GSCL_CLK_MSCL1, "clk_mscl1", "mout_aclk_gscl_333_user",
866d39e55e0SRahul Sharma 			EN_IP_GSCL, 5, 0, 0),
867d39e55e0SRahul Sharma 	GATE(GSCL_CLK_PIXEL_GSCL0, "clk_pixel_gscl0",
868d39e55e0SRahul Sharma 			"mout_aclk_gscl_333_user",
869d39e55e0SRahul Sharma 			EN_IP_GSCL, 8, 0, 0),
870d39e55e0SRahul Sharma 	GATE(GSCL_CLK_PIXEL_GSCL1, "clk_pixel_gscl1",
871d39e55e0SRahul Sharma 			"mout_aclk_gscl_333_user",
872d39e55e0SRahul Sharma 			EN_IP_GSCL, 9, 0, 0),
873d39e55e0SRahul Sharma 
874d39e55e0SRahul Sharma 	GATE(GSCL_CLK_SMMU3_LITE_A, "clk_smmu3_lite_a",
875d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc_user",
876d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 5, 0, 0),
877d39e55e0SRahul Sharma 	GATE(GSCL_CLK_SMMU3_LITE_B, "clk_smmu3_lite_b",
878d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc_user",
879d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 6, 0, 0),
880d39e55e0SRahul Sharma 	GATE(GSCL_CLK_SMMU3_LITE_D, "clk_smmu3_lite_d",
881d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc_user",
882d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 7, 0, 0),
883d39e55e0SRahul Sharma 	GATE(GSCL_CLK_CSIS0, "clk_csis0", "mout_aclk_gscl_fimc_user",
884d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 8, 0, 0),
885d39e55e0SRahul Sharma 	GATE(GSCL_CLK_CSIS1, "clk_csis1", "mout_aclk_gscl_fimc_user",
886d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 9, 0, 0),
887d39e55e0SRahul Sharma 	GATE(GSCL_CLK_FIMC_LITE_A, "clk_fimc_lite_a",
888d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc_user",
889d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 10, 0, 0),
890d39e55e0SRahul Sharma 	GATE(GSCL_CLK_FIMC_LITE_B, "clk_fimc_lite_b",
891d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc_user",
892d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 11, 0, 0),
893d39e55e0SRahul Sharma 	GATE(GSCL_CLK_FIMC_LITE_D, "clk_fimc_lite_d",
894d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc_user",
895d39e55e0SRahul Sharma 			EN_IP_GSCL_FIMC, 12, 0, 0),
896d39e55e0SRahul Sharma 
897d39e55e0SRahul Sharma 	GATE(GSCL_CLK_SMMU3_GSCL0, "clk_smmu3_gscl0",
898d39e55e0SRahul Sharma 			"mout_aclk_gscl_333_user",
899d39e55e0SRahul Sharma 			EN_IP_GSCL_SECURE_SMMU_GSCL0, 17, 0, 0),
900d39e55e0SRahul Sharma 	GATE(GSCL_CLK_SMMU3_GSCL1, "clk_smmu3_gscl1", "mout_aclk_gscl_333_user",
901d39e55e0SRahul Sharma 			EN_IP_GSCL_SECURE_SMMU_GSCL1, 18, 0, 0),
902d39e55e0SRahul Sharma 	GATE(GSCL_CLK_SMMU3_MSCL0, "clk_smmu3_mscl0",
903d39e55e0SRahul Sharma 			"mout_aclk_m2m_400_user",
904d39e55e0SRahul Sharma 			EN_IP_GSCL_SECURE_SMMU_MSCL0, 19, 0, 0),
905d39e55e0SRahul Sharma 	GATE(GSCL_CLK_SMMU3_MSCL1, "clk_smmu3_mscl1",
906d39e55e0SRahul Sharma 			"mout_aclk_m2m_400_user",
907d39e55e0SRahul Sharma 			EN_IP_GSCL_SECURE_SMMU_MSCL1, 20, 0, 0),
908d39e55e0SRahul Sharma };
909d39e55e0SRahul Sharma 
910d39e55e0SRahul Sharma static void __init exynos5260_clk_gscl_init(struct device_node *np)
911d39e55e0SRahul Sharma {
912d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
913d39e55e0SRahul Sharma 
914d39e55e0SRahul Sharma 	cmu.mux_clks = gscl_mux_clks;
915d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(gscl_mux_clks);
916d39e55e0SRahul Sharma 	cmu.div_clks = gscl_div_clks;
917d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(gscl_div_clks);
918d39e55e0SRahul Sharma 	cmu.gate_clks = gscl_gate_clks;
919d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(gscl_gate_clks);
920d39e55e0SRahul Sharma 	cmu.nr_clk_ids = GSCL_NR_CLK;
921d39e55e0SRahul Sharma 	cmu.clk_regs = gscl_clk_regs;
922d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(gscl_clk_regs);
923d39e55e0SRahul Sharma 
924d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
925d39e55e0SRahul Sharma }
926d39e55e0SRahul Sharma 
927d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_gscl, "samsung,exynos5260-clock-gscl",
928d39e55e0SRahul Sharma 		exynos5260_clk_gscl_init);
929d39e55e0SRahul Sharma 
930d39e55e0SRahul Sharma 
931d39e55e0SRahul Sharma /* CMU_ISP */
932d39e55e0SRahul Sharma 
933d39e55e0SRahul Sharma static unsigned long isp_clk_regs[] __initdata = {
934d39e55e0SRahul Sharma 	MUX_SEL_ISP0,
935d39e55e0SRahul Sharma 	MUX_SEL_ISP1,
936d39e55e0SRahul Sharma 	DIV_ISP,
937d39e55e0SRahul Sharma 	EN_ACLK_ISP0,
938d39e55e0SRahul Sharma 	EN_ACLK_ISP1,
939d39e55e0SRahul Sharma 	EN_PCLK_ISP0,
940d39e55e0SRahul Sharma 	EN_PCLK_ISP1,
941d39e55e0SRahul Sharma 	EN_SCLK_ISP,
942d39e55e0SRahul Sharma 	EN_IP_ISP0,
943d39e55e0SRahul Sharma 	EN_IP_ISP1,
944d39e55e0SRahul Sharma };
945d39e55e0SRahul Sharma 
946d39e55e0SRahul Sharma PNAME(mout_isp_400_user_p) = {"fin_pll", "dout_aclk_isp1_400"};
947d39e55e0SRahul Sharma PNAME(mout_isp_266_user_p)	 = {"fin_pll", "dout_aclk_isp1_266"};
948d39e55e0SRahul Sharma 
949d39e55e0SRahul Sharma struct samsung_mux_clock isp_mux_clks[] __initdata = {
950d39e55e0SRahul Sharma 	MUX(ISP_MOUT_ISP_266_USER, "mout_isp_266_user", mout_isp_266_user_p,
951d39e55e0SRahul Sharma 			MUX_SEL_ISP0, 0, 1),
952d39e55e0SRahul Sharma 	MUX(ISP_MOUT_ISP_400_USER, "mout_isp_400_user", mout_isp_400_user_p,
953d39e55e0SRahul Sharma 			MUX_SEL_ISP0, 4, 1),
954d39e55e0SRahul Sharma };
955d39e55e0SRahul Sharma 
956d39e55e0SRahul Sharma struct samsung_div_clock isp_div_clks[] __initdata = {
957d39e55e0SRahul Sharma 	DIV(ISP_DOUT_PCLK_ISP_66, "dout_pclk_isp_66", "mout_kfc",
958d39e55e0SRahul Sharma 			DIV_ISP, 0, 3),
959d39e55e0SRahul Sharma 	DIV(ISP_DOUT_PCLK_ISP_133, "dout_pclk_isp_133", "mout_kfc",
960d39e55e0SRahul Sharma 			DIV_ISP, 4, 4),
961d39e55e0SRahul Sharma 	DIV(ISP_DOUT_CA5_ATCLKIN, "dout_ca5_atclkin", "mout_kfc",
962d39e55e0SRahul Sharma 			DIV_ISP, 12, 3),
963d39e55e0SRahul Sharma 	DIV(ISP_DOUT_CA5_PCLKDBG, "dout_ca5_pclkdbg", "mout_kfc",
964d39e55e0SRahul Sharma 			DIV_ISP, 16, 4),
965d39e55e0SRahul Sharma 	DIV(ISP_DOUT_SCLK_MPWM, "dout_sclk_mpwm", "mout_kfc", DIV_ISP, 20, 2),
966d39e55e0SRahul Sharma };
967d39e55e0SRahul Sharma 
968d39e55e0SRahul Sharma struct samsung_gate_clock isp_gate_clks[] __initdata = {
969d39e55e0SRahul Sharma 	GATE(ISP_CLK_GIC, "clk_isp_gic", "mout_aclk_isp1_266",
970d39e55e0SRahul Sharma 			EN_IP_ISP0, 15, 0, 0),
971d39e55e0SRahul Sharma 
972d39e55e0SRahul Sharma 	GATE(ISP_CLK_CA5, "clk_isp_ca5", "mout_aclk_isp1_266",
973d39e55e0SRahul Sharma 			EN_IP_ISP1, 1, 0, 0),
974d39e55e0SRahul Sharma 	GATE(ISP_CLK_FIMC_DRC, "clk_isp_fimc_drc", "mout_aclk_isp1_266",
975d39e55e0SRahul Sharma 			EN_IP_ISP1, 2, 0, 0),
976d39e55e0SRahul Sharma 	GATE(ISP_CLK_FIMC_FD, "clk_isp_fimc_fd", "mout_aclk_isp1_266",
977d39e55e0SRahul Sharma 			EN_IP_ISP1, 3, 0, 0),
978d39e55e0SRahul Sharma 	GATE(ISP_CLK_FIMC, "clk_isp_fimc", "mout_aclk_isp1_266",
979d39e55e0SRahul Sharma 			EN_IP_ISP1, 4, 0, 0),
980d39e55e0SRahul Sharma 	GATE(ISP_CLK_FIMC_SCALERC, "clk_isp_fimc_scalerc",
981d39e55e0SRahul Sharma 			"mout_aclk_isp1_266",
982d39e55e0SRahul Sharma 			EN_IP_ISP1, 5, 0, 0),
983d39e55e0SRahul Sharma 	GATE(ISP_CLK_FIMC_SCALERP, "clk_isp_fimc_scalerp",
984d39e55e0SRahul Sharma 			"mout_aclk_isp1_266",
985d39e55e0SRahul Sharma 			EN_IP_ISP1, 6, 0, 0),
986d39e55e0SRahul Sharma 	GATE(ISP_CLK_I2C0, "clk_isp_i2c0", "mout_aclk_isp1_266",
987d39e55e0SRahul Sharma 			EN_IP_ISP1, 7, 0, 0),
988d39e55e0SRahul Sharma 	GATE(ISP_CLK_I2C1, "clk_isp_i2c1", "mout_aclk_isp1_266",
989d39e55e0SRahul Sharma 			EN_IP_ISP1, 8, 0, 0),
990d39e55e0SRahul Sharma 	GATE(ISP_CLK_MCUCTL, "clk_isp_mcuctl", "mout_aclk_isp1_266",
991d39e55e0SRahul Sharma 			EN_IP_ISP1, 9, 0, 0),
992d39e55e0SRahul Sharma 	GATE(ISP_CLK_MPWM, "clk_isp_mpwm", "mout_aclk_isp1_266",
993d39e55e0SRahul Sharma 			EN_IP_ISP1, 10, 0, 0),
994d39e55e0SRahul Sharma 	GATE(ISP_CLK_MTCADC, "clk_isp_mtcadc", "mout_aclk_isp1_266",
995d39e55e0SRahul Sharma 			EN_IP_ISP1, 11, 0, 0),
996d39e55e0SRahul Sharma 	GATE(ISP_CLK_PWM, "clk_isp_pwm", "mout_aclk_isp1_266",
997d39e55e0SRahul Sharma 			EN_IP_ISP1, 14, 0, 0),
998d39e55e0SRahul Sharma 	GATE(ISP_CLK_SMMU_DRC, "clk_smmu_drc", "mout_aclk_isp1_266",
999d39e55e0SRahul Sharma 			EN_IP_ISP1, 21, 0, 0),
1000d39e55e0SRahul Sharma 	GATE(ISP_CLK_SMMU_FD, "clk_smmu_fd", "mout_aclk_isp1_266",
1001d39e55e0SRahul Sharma 			EN_IP_ISP1, 22, 0, 0),
1002d39e55e0SRahul Sharma 	GATE(ISP_CLK_SMMU_ISP, "clk_smmu_isp", "mout_aclk_isp1_266",
1003d39e55e0SRahul Sharma 			EN_IP_ISP1, 23, 0, 0),
1004d39e55e0SRahul Sharma 	GATE(ISP_CLK_SMMU_ISPCX, "clk_smmu_ispcx", "mout_aclk_isp1_266",
1005d39e55e0SRahul Sharma 			EN_IP_ISP1, 24, 0, 0),
1006d39e55e0SRahul Sharma 	GATE(ISP_CLK_SMMU_SCALERC, "clk_isp_smmu_scalerc",
1007d39e55e0SRahul Sharma 			"mout_aclk_isp1_266",
1008d39e55e0SRahul Sharma 			EN_IP_ISP1, 25, 0, 0),
1009d39e55e0SRahul Sharma 	GATE(ISP_CLK_SMMU_SCALERP, "clk_isp_smmu_scalerp",
1010d39e55e0SRahul Sharma 			"mout_aclk_isp1_266",
1011d39e55e0SRahul Sharma 			EN_IP_ISP1, 26, 0, 0),
1012d39e55e0SRahul Sharma 	GATE(ISP_CLK_SPI0, "clk_isp_spi0", "mout_aclk_isp1_266",
1013d39e55e0SRahul Sharma 			EN_IP_ISP1, 27, 0, 0),
1014d39e55e0SRahul Sharma 	GATE(ISP_CLK_SPI1, "clk_isp_spi1", "mout_aclk_isp1_266",
1015d39e55e0SRahul Sharma 			EN_IP_ISP1, 28, 0, 0),
1016d39e55e0SRahul Sharma 	GATE(ISP_CLK_WDT, "clk_isp_wdt", "mout_aclk_isp1_266",
1017d39e55e0SRahul Sharma 			EN_IP_ISP1, 31, 0, 0),
1018d39e55e0SRahul Sharma 	GATE(ISP_CLK_UART, "clk_isp_uart", "mout_aclk_isp1_266",
1019d39e55e0SRahul Sharma 			EN_IP_ISP1, 30, 0, 0),
1020d39e55e0SRahul Sharma 
1021d39e55e0SRahul Sharma 	GATE(ISP_SCLK_UART_EXT, "sclk_isp_uart_ext", "fin_pll",
1022d39e55e0SRahul Sharma 			EN_SCLK_ISP, 7, CLK_SET_RATE_PARENT, 0),
1023d39e55e0SRahul Sharma 	GATE(ISP_SCLK_SPI1_EXT, "sclk_isp_spi1_ext", "fin_pll",
1024d39e55e0SRahul Sharma 			EN_SCLK_ISP, 8, CLK_SET_RATE_PARENT, 0),
1025d39e55e0SRahul Sharma 	GATE(ISP_SCLK_SPI0_EXT, "sclk_isp_spi0_ext", "fin_pll",
1026d39e55e0SRahul Sharma 			EN_SCLK_ISP, 9, CLK_SET_RATE_PARENT, 0),
1027d39e55e0SRahul Sharma };
1028d39e55e0SRahul Sharma 
1029d39e55e0SRahul Sharma static void __init exynos5260_clk_isp_init(struct device_node *np)
1030d39e55e0SRahul Sharma {
1031d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
1032d39e55e0SRahul Sharma 
1033d39e55e0SRahul Sharma 	cmu.mux_clks = isp_mux_clks;
1034d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(isp_mux_clks);
1035d39e55e0SRahul Sharma 	cmu.div_clks = isp_div_clks;
1036d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(isp_div_clks);
1037d39e55e0SRahul Sharma 	cmu.gate_clks = isp_gate_clks;
1038d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(isp_gate_clks);
1039d39e55e0SRahul Sharma 	cmu.nr_clk_ids = ISP_NR_CLK;
1040d39e55e0SRahul Sharma 	cmu.clk_regs = isp_clk_regs;
1041d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(isp_clk_regs);
1042d39e55e0SRahul Sharma 
1043d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
1044d39e55e0SRahul Sharma }
1045d39e55e0SRahul Sharma 
1046d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_isp, "samsung,exynos5260-clock-isp",
1047d39e55e0SRahul Sharma 		exynos5260_clk_isp_init);
1048d39e55e0SRahul Sharma 
1049d39e55e0SRahul Sharma 
1050d39e55e0SRahul Sharma /* CMU_KFC */
1051d39e55e0SRahul Sharma 
1052d39e55e0SRahul Sharma static unsigned long kfc_clk_regs[] __initdata = {
1053d39e55e0SRahul Sharma 	KFC_PLL_LOCK,
1054d39e55e0SRahul Sharma 	KFC_PLL_CON0,
1055d39e55e0SRahul Sharma 	KFC_PLL_CON1,
1056d39e55e0SRahul Sharma 	KFC_PLL_FDET,
1057d39e55e0SRahul Sharma 	MUX_SEL_KFC0,
1058d39e55e0SRahul Sharma 	MUX_SEL_KFC2,
1059d39e55e0SRahul Sharma 	DIV_KFC,
1060d39e55e0SRahul Sharma 	DIV_KFC_PLL_FDET,
1061d39e55e0SRahul Sharma 	EN_ACLK_KFC,
1062d39e55e0SRahul Sharma 	EN_PCLK_KFC,
1063d39e55e0SRahul Sharma 	EN_SCLK_KFC,
1064d39e55e0SRahul Sharma 	EN_IP_KFC,
1065d39e55e0SRahul Sharma };
1066d39e55e0SRahul Sharma 
1067d39e55e0SRahul Sharma PNAME(mout_kfc_pll_p) = {"fin_pll", "fout_kfc_pll"};
1068d39e55e0SRahul Sharma PNAME(mout_kfc_p)	 = {"mout_kfc_pll", "dout_media_pll"};
1069d39e55e0SRahul Sharma 
1070d39e55e0SRahul Sharma struct samsung_mux_clock kfc_mux_clks[] __initdata = {
1071d39e55e0SRahul Sharma 	MUX(KFC_MOUT_KFC_PLL, "mout_kfc_pll", mout_kfc_pll_p,
1072d39e55e0SRahul Sharma 			MUX_SEL_KFC0, 0, 1),
1073d39e55e0SRahul Sharma 	MUX(KFC_MOUT_KFC, "mout_kfc", mout_kfc_p, MUX_SEL_KFC2, 0, 1),
1074d39e55e0SRahul Sharma };
1075d39e55e0SRahul Sharma 
1076d39e55e0SRahul Sharma struct samsung_div_clock kfc_div_clks[] __initdata = {
1077d39e55e0SRahul Sharma 	DIV(KFC_DOUT_KFC1, "dout_kfc1", "mout_kfc", DIV_KFC, 0, 3),
1078d39e55e0SRahul Sharma 	DIV(KFC_DOUT_KFC2, "dout_kfc2", "dout_kfc1", DIV_KFC, 4, 3),
1079d39e55e0SRahul Sharma 	DIV(KFC_DOUT_KFC_ATCLK, "dout_kfc_atclk", "dout_kfc2", DIV_KFC, 8, 3),
1080d39e55e0SRahul Sharma 	DIV(KFC_DOUT_KFC_PCLK_DBG, "dout_kfc_pclk_dbg", "dout_kfc2",
1081d39e55e0SRahul Sharma 			DIV_KFC, 12, 3),
1082d39e55e0SRahul Sharma 	DIV(KFC_DOUT_ACLK_KFC, "dout_aclk_kfc", "dout_kfc2", DIV_KFC, 16, 3),
1083d39e55e0SRahul Sharma 	DIV(KFC_DOUT_PCLK_KFC, "dout_pclk_kfc", "dout_kfc2", DIV_KFC, 20, 3),
1084d39e55e0SRahul Sharma 	DIV(KFC_DOUT_KFC_PLL, "dout_kfc_pll", "mout_kfc", DIV_KFC, 24, 3),
1085d39e55e0SRahul Sharma };
1086d39e55e0SRahul Sharma 
1087d39e55e0SRahul Sharma static struct samsung_pll_clock kfc_pll_clks[] __initdata = {
1088d39e55e0SRahul Sharma 	PLL(pll_2550xx, KFC_FOUT_KFC_PLL, "fout_kfc_pll", "fin_pll",
1089d39e55e0SRahul Sharma 		KFC_PLL_LOCK, KFC_PLL_CON0,
1090d39e55e0SRahul Sharma 		pll2550_24mhz_tbl),
1091d39e55e0SRahul Sharma };
1092d39e55e0SRahul Sharma 
1093d39e55e0SRahul Sharma static void __init exynos5260_clk_kfc_init(struct device_node *np)
1094d39e55e0SRahul Sharma {
1095d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
1096d39e55e0SRahul Sharma 
1097d39e55e0SRahul Sharma 	cmu.pll_clks = kfc_pll_clks;
1098d39e55e0SRahul Sharma 	cmu.nr_pll_clks =  ARRAY_SIZE(kfc_pll_clks);
1099d39e55e0SRahul Sharma 	cmu.mux_clks = kfc_mux_clks;
1100d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(kfc_mux_clks);
1101d39e55e0SRahul Sharma 	cmu.div_clks = kfc_div_clks;
1102d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(kfc_div_clks);
1103d39e55e0SRahul Sharma 	cmu.nr_clk_ids = KFC_NR_CLK;
1104d39e55e0SRahul Sharma 	cmu.clk_regs = kfc_clk_regs;
1105d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(kfc_clk_regs);
1106d39e55e0SRahul Sharma 
1107d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
1108d39e55e0SRahul Sharma }
1109d39e55e0SRahul Sharma 
1110d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_kfc, "samsung,exynos5260-clock-kfc",
1111d39e55e0SRahul Sharma 		exynos5260_clk_kfc_init);
1112d39e55e0SRahul Sharma 
1113d39e55e0SRahul Sharma 
1114d39e55e0SRahul Sharma /* CMU_MFC */
1115d39e55e0SRahul Sharma 
1116d39e55e0SRahul Sharma static unsigned long mfc_clk_regs[] __initdata = {
1117d39e55e0SRahul Sharma 	MUX_SEL_MFC,
1118d39e55e0SRahul Sharma 	DIV_MFC,
1119d39e55e0SRahul Sharma 	EN_ACLK_MFC,
1120d39e55e0SRahul Sharma 	EN_ACLK_SECURE_SMMU2_MFC,
1121d39e55e0SRahul Sharma 	EN_PCLK_MFC,
1122d39e55e0SRahul Sharma 	EN_PCLK_SECURE_SMMU2_MFC,
1123d39e55e0SRahul Sharma 	EN_IP_MFC,
1124d39e55e0SRahul Sharma 	EN_IP_MFC_SECURE_SMMU2_MFC,
1125d39e55e0SRahul Sharma };
1126d39e55e0SRahul Sharma 
1127d39e55e0SRahul Sharma PNAME(mout_aclk_mfc_333_user_p) = {"fin_pll", "dout_aclk_mfc_333"};
1128d39e55e0SRahul Sharma 
1129d39e55e0SRahul Sharma struct samsung_mux_clock mfc_mux_clks[] __initdata = {
1130d39e55e0SRahul Sharma 	MUX(MFC_MOUT_ACLK_MFC_333_USER, "mout_aclk_mfc_333_user",
1131d39e55e0SRahul Sharma 			mout_aclk_mfc_333_user_p,
1132d39e55e0SRahul Sharma 			MUX_SEL_MFC, 0, 1),
1133d39e55e0SRahul Sharma };
1134d39e55e0SRahul Sharma 
1135d39e55e0SRahul Sharma struct samsung_div_clock mfc_div_clks[] __initdata = {
1136d39e55e0SRahul Sharma 	DIV(MFC_DOUT_PCLK_MFC_83, "dout_pclk_mfc_83", "mout_aclk_mfc_333_user",
1137d39e55e0SRahul Sharma 			DIV_MFC, 0, 3),
1138d39e55e0SRahul Sharma };
1139d39e55e0SRahul Sharma 
1140d39e55e0SRahul Sharma struct samsung_gate_clock mfc_gate_clks[] __initdata = {
1141d39e55e0SRahul Sharma 	GATE(MFC_CLK_MFC, "clk_mfc", "mout_aclk_mfc_333_user",
1142d39e55e0SRahul Sharma 			EN_IP_MFC, 1, 0, 0),
1143d39e55e0SRahul Sharma 	GATE(MFC_CLK_SMMU2_MFCM0, "clk_smmu2_mfcm0", "mout_aclk_mfc_333_user",
1144d39e55e0SRahul Sharma 			EN_IP_MFC_SECURE_SMMU2_MFC, 6, 0, 0),
1145d39e55e0SRahul Sharma 	GATE(MFC_CLK_SMMU2_MFCM1, "clk_smmu2_mfcm1", "mout_aclk_mfc_333_user",
1146d39e55e0SRahul Sharma 			EN_IP_MFC_SECURE_SMMU2_MFC, 7, 0, 0),
1147d39e55e0SRahul Sharma };
1148d39e55e0SRahul Sharma 
1149d39e55e0SRahul Sharma static void __init exynos5260_clk_mfc_init(struct device_node *np)
1150d39e55e0SRahul Sharma {
1151d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
1152d39e55e0SRahul Sharma 
1153d39e55e0SRahul Sharma 	cmu.mux_clks = mfc_mux_clks;
1154d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(mfc_mux_clks);
1155d39e55e0SRahul Sharma 	cmu.div_clks = mfc_div_clks;
1156d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(mfc_div_clks);
1157d39e55e0SRahul Sharma 	cmu.gate_clks = mfc_gate_clks;
1158d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(mfc_gate_clks);
1159d39e55e0SRahul Sharma 	cmu.nr_clk_ids = MFC_NR_CLK;
1160d39e55e0SRahul Sharma 	cmu.clk_regs = mfc_clk_regs;
1161d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(mfc_clk_regs);
1162d39e55e0SRahul Sharma 
1163d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
1164d39e55e0SRahul Sharma }
1165d39e55e0SRahul Sharma 
1166d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_mfc, "samsung,exynos5260-clock-mfc",
1167d39e55e0SRahul Sharma 		exynos5260_clk_mfc_init);
1168d39e55e0SRahul Sharma 
1169d39e55e0SRahul Sharma 
1170d39e55e0SRahul Sharma /* CMU_MIF */
1171d39e55e0SRahul Sharma 
1172d39e55e0SRahul Sharma static unsigned long mif_clk_regs[] __initdata = {
1173d39e55e0SRahul Sharma 	MEM_PLL_LOCK,
1174d39e55e0SRahul Sharma 	BUS_PLL_LOCK,
1175d39e55e0SRahul Sharma 	MEDIA_PLL_LOCK,
1176d39e55e0SRahul Sharma 	MEM_PLL_CON0,
1177d39e55e0SRahul Sharma 	MEM_PLL_CON1,
1178d39e55e0SRahul Sharma 	MEM_PLL_FDET,
1179d39e55e0SRahul Sharma 	BUS_PLL_CON0,
1180d39e55e0SRahul Sharma 	BUS_PLL_CON1,
1181d39e55e0SRahul Sharma 	BUS_PLL_FDET,
1182d39e55e0SRahul Sharma 	MEDIA_PLL_CON0,
1183d39e55e0SRahul Sharma 	MEDIA_PLL_CON1,
1184d39e55e0SRahul Sharma 	MEDIA_PLL_FDET,
1185d39e55e0SRahul Sharma 	MUX_SEL_MIF,
1186d39e55e0SRahul Sharma 	DIV_MIF,
1187d39e55e0SRahul Sharma 	DIV_MIF_PLL_FDET,
1188d39e55e0SRahul Sharma 	EN_ACLK_MIF,
1189d39e55e0SRahul Sharma 	EN_ACLK_MIF_SECURE_DREX1_TZ,
1190d39e55e0SRahul Sharma 	EN_ACLK_MIF_SECURE_DREX0_TZ,
1191d39e55e0SRahul Sharma 	EN_ACLK_MIF_SECURE_INTMEM,
1192d39e55e0SRahul Sharma 	EN_PCLK_MIF,
1193d39e55e0SRahul Sharma 	EN_PCLK_MIF_SECURE_MONOCNT,
1194d39e55e0SRahul Sharma 	EN_PCLK_MIF_SECURE_RTC_APBIF,
1195d39e55e0SRahul Sharma 	EN_PCLK_MIF_SECURE_DREX1_TZ,
1196d39e55e0SRahul Sharma 	EN_PCLK_MIF_SECURE_DREX0_TZ,
1197d39e55e0SRahul Sharma 	EN_SCLK_MIF,
1198d39e55e0SRahul Sharma 	EN_IP_MIF,
1199d39e55e0SRahul Sharma 	EN_IP_MIF_SECURE_MONOCNT,
1200d39e55e0SRahul Sharma 	EN_IP_MIF_SECURE_RTC_APBIF,
1201d39e55e0SRahul Sharma 	EN_IP_MIF_SECURE_DREX1_TZ,
1202d39e55e0SRahul Sharma 	EN_IP_MIF_SECURE_DREX0_TZ,
1203d39e55e0SRahul Sharma 	EN_IP_MIF_SECURE_INTEMEM,
1204d39e55e0SRahul Sharma };
1205d39e55e0SRahul Sharma 
1206d39e55e0SRahul Sharma PNAME(mout_mem_pll_p) = {"fin_pll", "fout_mem_pll"};
1207d39e55e0SRahul Sharma PNAME(mout_bus_pll_p) = {"fin_pll", "fout_bus_pll"};
1208d39e55e0SRahul Sharma PNAME(mout_media_pll_p) = {"fin_pll", "fout_media_pll"};
1209d39e55e0SRahul Sharma PNAME(mout_mif_drex_p) = {"dout_mem_pll", "dout_bus_pll"};
1210d39e55e0SRahul Sharma PNAME(mout_mif_drex2x_p) = {"dout_mem_pll", "dout_bus_pll"};
1211d39e55e0SRahul Sharma PNAME(mout_clkm_phy_p) = {"mout_mif_drex", "dout_media_pll"};
1212d39e55e0SRahul Sharma PNAME(mout_clk2x_phy_p) = {"mout_mif_drex2x", "dout_media_pll"};
1213d39e55e0SRahul Sharma 
1214d39e55e0SRahul Sharma struct samsung_mux_clock mif_mux_clks[] __initdata = {
1215d39e55e0SRahul Sharma 	MUX(MIF_MOUT_MEM_PLL, "mout_mem_pll", mout_mem_pll_p,
1216d39e55e0SRahul Sharma 			MUX_SEL_MIF, 0, 1),
1217d39e55e0SRahul Sharma 	MUX(MIF_MOUT_BUS_PLL, "mout_bus_pll", mout_bus_pll_p,
1218d39e55e0SRahul Sharma 			MUX_SEL_MIF, 4, 1),
1219d39e55e0SRahul Sharma 	MUX(MIF_MOUT_MEDIA_PLL, "mout_media_pll", mout_media_pll_p,
1220d39e55e0SRahul Sharma 			MUX_SEL_MIF, 8, 1),
1221d39e55e0SRahul Sharma 	MUX(MIF_MOUT_MIF_DREX, "mout_mif_drex", mout_mif_drex_p,
1222d39e55e0SRahul Sharma 			MUX_SEL_MIF, 12, 1),
1223d39e55e0SRahul Sharma 	MUX(MIF_MOUT_CLKM_PHY, "mout_clkm_phy", mout_clkm_phy_p,
1224d39e55e0SRahul Sharma 			MUX_SEL_MIF, 16, 1),
1225d39e55e0SRahul Sharma 	MUX(MIF_MOUT_MIF_DREX2X, "mout_mif_drex2x", mout_mif_drex2x_p,
1226d39e55e0SRahul Sharma 			MUX_SEL_MIF, 20, 1),
1227d39e55e0SRahul Sharma 	MUX(MIF_MOUT_CLK2X_PHY, "mout_clk2x_phy", mout_clk2x_phy_p,
1228d39e55e0SRahul Sharma 			MUX_SEL_MIF, 24, 1),
1229d39e55e0SRahul Sharma };
1230d39e55e0SRahul Sharma 
1231d39e55e0SRahul Sharma struct samsung_div_clock mif_div_clks[] __initdata = {
1232d39e55e0SRahul Sharma 	DIV(MIF_DOUT_MEDIA_PLL, "dout_media_pll", "mout_media_pll",
1233d39e55e0SRahul Sharma 			DIV_MIF, 0, 3),
1234d39e55e0SRahul Sharma 	DIV(MIF_DOUT_MEM_PLL, "dout_mem_pll", "mout_mem_pll",
1235d39e55e0SRahul Sharma 			DIV_MIF, 4, 3),
1236d39e55e0SRahul Sharma 	DIV(MIF_DOUT_BUS_PLL, "dout_bus_pll", "mout_bus_pll",
1237d39e55e0SRahul Sharma 			DIV_MIF, 8, 3),
1238d39e55e0SRahul Sharma 	DIV(MIF_DOUT_CLKM_PHY, "dout_clkm_phy", "mout_clkm_phy",
1239d39e55e0SRahul Sharma 			DIV_MIF, 12, 3),
1240d39e55e0SRahul Sharma 	DIV(MIF_DOUT_CLK2X_PHY, "dout_clk2x_phy", "mout_clk2x_phy",
1241d39e55e0SRahul Sharma 			DIV_MIF, 16, 4),
1242d39e55e0SRahul Sharma 	DIV(MIF_DOUT_ACLK_MIF_466, "dout_aclk_mif_466", "dout_clk2x_phy",
1243d39e55e0SRahul Sharma 			DIV_MIF, 20, 3),
1244d39e55e0SRahul Sharma 	DIV(MIF_DOUT_ACLK_BUS_200, "dout_aclk_bus_200", "dout_bus_pll",
1245d39e55e0SRahul Sharma 			DIV_MIF, 24, 3),
1246d39e55e0SRahul Sharma 	DIV(MIF_DOUT_ACLK_BUS_100, "dout_aclk_bus_100", "dout_bus_pll",
1247d39e55e0SRahul Sharma 			DIV_MIF, 28, 4),
1248d39e55e0SRahul Sharma };
1249d39e55e0SRahul Sharma 
1250d39e55e0SRahul Sharma struct samsung_gate_clock mif_gate_clks[] __initdata = {
1251d39e55e0SRahul Sharma 	GATE(MIF_CLK_LPDDR3PHY_WRAP0, "clk_lpddr3phy_wrap0", "dout_clk2x_phy",
1252d39e55e0SRahul Sharma 			EN_IP_MIF, 12, CLK_IGNORE_UNUSED, 0),
1253d39e55e0SRahul Sharma 	GATE(MIF_CLK_LPDDR3PHY_WRAP1, "clk_lpddr3phy_wrap1", "dout_clk2x_phy",
1254d39e55e0SRahul Sharma 			EN_IP_MIF, 13, CLK_IGNORE_UNUSED, 0),
1255d39e55e0SRahul Sharma 
1256d39e55e0SRahul Sharma 	GATE(MIF_CLK_MONOCNT, "clk_monocnt", "dout_aclk_bus_100",
1257d39e55e0SRahul Sharma 			EN_IP_MIF_SECURE_MONOCNT, 22,
1258d39e55e0SRahul Sharma 			CLK_IGNORE_UNUSED, 0),
1259d39e55e0SRahul Sharma 
1260d39e55e0SRahul Sharma 	GATE(MIF_CLK_MIF_RTC, "clk_mif_rtc", "dout_aclk_bus_100",
1261d39e55e0SRahul Sharma 			EN_IP_MIF_SECURE_RTC_APBIF, 23,
1262d39e55e0SRahul Sharma 			CLK_IGNORE_UNUSED, 0),
1263d39e55e0SRahul Sharma 
1264d39e55e0SRahul Sharma 	GATE(MIF_CLK_DREX1, "clk_drex1", "dout_aclk_mif_466",
1265d39e55e0SRahul Sharma 			EN_IP_MIF_SECURE_DREX1_TZ, 9,
1266d39e55e0SRahul Sharma 			CLK_IGNORE_UNUSED, 0),
1267d39e55e0SRahul Sharma 
1268d39e55e0SRahul Sharma 	GATE(MIF_CLK_DREX0, "clk_drex0", "dout_aclk_mif_466",
1269d39e55e0SRahul Sharma 			EN_IP_MIF_SECURE_DREX0_TZ, 9,
1270d39e55e0SRahul Sharma 			CLK_IGNORE_UNUSED, 0),
1271d39e55e0SRahul Sharma 
1272d39e55e0SRahul Sharma 	GATE(MIF_CLK_INTMEM, "clk_intmem", "dout_aclk_bus_200",
1273d39e55e0SRahul Sharma 			EN_IP_MIF_SECURE_INTEMEM, 11,
1274d39e55e0SRahul Sharma 			CLK_IGNORE_UNUSED, 0),
1275d39e55e0SRahul Sharma 
1276d39e55e0SRahul Sharma 	GATE(MIF_SCLK_LPDDR3PHY_WRAP_U0, "sclk_lpddr3phy_wrap_u0",
1277d39e55e0SRahul Sharma 			"dout_clkm_phy", EN_SCLK_MIF, 0,
1278d39e55e0SRahul Sharma 			CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0),
1279d39e55e0SRahul Sharma 	GATE(MIF_SCLK_LPDDR3PHY_WRAP_U1, "sclk_lpddr3phy_wrap_u1",
1280d39e55e0SRahul Sharma 			"dout_clkm_phy", EN_SCLK_MIF, 1,
1281d39e55e0SRahul Sharma 			CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0),
1282d39e55e0SRahul Sharma };
1283d39e55e0SRahul Sharma 
1284d39e55e0SRahul Sharma static struct samsung_pll_clock mif_pll_clks[] __initdata = {
1285d39e55e0SRahul Sharma 	PLL(pll_2550xx, MIF_FOUT_MEM_PLL, "fout_mem_pll", "fin_pll",
1286d39e55e0SRahul Sharma 		MEM_PLL_LOCK, MEM_PLL_CON0,
1287d39e55e0SRahul Sharma 		pll2550_24mhz_tbl),
1288d39e55e0SRahul Sharma 	PLL(pll_2550xx, MIF_FOUT_BUS_PLL, "fout_bus_pll", "fin_pll",
1289d39e55e0SRahul Sharma 		BUS_PLL_LOCK, BUS_PLL_CON0,
1290d39e55e0SRahul Sharma 		pll2550_24mhz_tbl),
1291d39e55e0SRahul Sharma 	PLL(pll_2550xx, MIF_FOUT_MEDIA_PLL, "fout_media_pll", "fin_pll",
1292d39e55e0SRahul Sharma 		MEDIA_PLL_LOCK, MEDIA_PLL_CON0,
1293d39e55e0SRahul Sharma 		pll2550_24mhz_tbl),
1294d39e55e0SRahul Sharma };
1295d39e55e0SRahul Sharma 
1296d39e55e0SRahul Sharma static void __init exynos5260_clk_mif_init(struct device_node *np)
1297d39e55e0SRahul Sharma {
1298d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
1299d39e55e0SRahul Sharma 
1300d39e55e0SRahul Sharma 	cmu.pll_clks = mif_pll_clks;
1301d39e55e0SRahul Sharma 	cmu.nr_pll_clks =  ARRAY_SIZE(mif_pll_clks);
1302d39e55e0SRahul Sharma 	cmu.mux_clks = mif_mux_clks;
1303d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(mif_mux_clks);
1304d39e55e0SRahul Sharma 	cmu.div_clks = mif_div_clks;
1305d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(mif_div_clks);
1306d39e55e0SRahul Sharma 	cmu.gate_clks = mif_gate_clks;
1307d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(mif_gate_clks);
1308d39e55e0SRahul Sharma 	cmu.nr_clk_ids = MIF_NR_CLK;
1309d39e55e0SRahul Sharma 	cmu.clk_regs = mif_clk_regs;
1310d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(mif_clk_regs);
1311d39e55e0SRahul Sharma 
1312d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
1313d39e55e0SRahul Sharma }
1314d39e55e0SRahul Sharma 
1315d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_mif, "samsung,exynos5260-clock-mif",
1316d39e55e0SRahul Sharma 		exynos5260_clk_mif_init);
1317d39e55e0SRahul Sharma 
1318d39e55e0SRahul Sharma 
1319d39e55e0SRahul Sharma /* CMU_PERI */
1320d39e55e0SRahul Sharma 
1321d39e55e0SRahul Sharma static unsigned long peri_clk_regs[] __initdata = {
1322d39e55e0SRahul Sharma 	MUX_SEL_PERI,
1323d39e55e0SRahul Sharma 	MUX_SEL_PERI1,
1324d39e55e0SRahul Sharma 	DIV_PERI,
1325d39e55e0SRahul Sharma 	EN_PCLK_PERI0,
1326d39e55e0SRahul Sharma 	EN_PCLK_PERI1,
1327d39e55e0SRahul Sharma 	EN_PCLK_PERI2,
1328d39e55e0SRahul Sharma 	EN_PCLK_PERI3,
1329d39e55e0SRahul Sharma 	EN_PCLK_PERI_SECURE_CHIPID,
1330d39e55e0SRahul Sharma 	EN_PCLK_PERI_SECURE_PROVKEY0,
1331d39e55e0SRahul Sharma 	EN_PCLK_PERI_SECURE_PROVKEY1,
1332d39e55e0SRahul Sharma 	EN_PCLK_PERI_SECURE_SECKEY,
1333d39e55e0SRahul Sharma 	EN_PCLK_PERI_SECURE_ANTIRBKCNT,
1334d39e55e0SRahul Sharma 	EN_PCLK_PERI_SECURE_TOP_RTC,
1335d39e55e0SRahul Sharma 	EN_PCLK_PERI_SECURE_TZPC,
1336d39e55e0SRahul Sharma 	EN_SCLK_PERI,
1337d39e55e0SRahul Sharma 	EN_SCLK_PERI_SECURE_TOP_RTC,
1338d39e55e0SRahul Sharma 	EN_IP_PERI0,
1339d39e55e0SRahul Sharma 	EN_IP_PERI1,
1340d39e55e0SRahul Sharma 	EN_IP_PERI2,
1341d39e55e0SRahul Sharma 	EN_IP_PERI_SECURE_CHIPID,
1342d39e55e0SRahul Sharma 	EN_IP_PERI_SECURE_PROVKEY0,
1343d39e55e0SRahul Sharma 	EN_IP_PERI_SECURE_PROVKEY1,
1344d39e55e0SRahul Sharma 	EN_IP_PERI_SECURE_SECKEY,
1345d39e55e0SRahul Sharma 	EN_IP_PERI_SECURE_ANTIRBKCNT,
1346d39e55e0SRahul Sharma 	EN_IP_PERI_SECURE_TOP_RTC,
1347d39e55e0SRahul Sharma 	EN_IP_PERI_SECURE_TZPC,
1348d39e55e0SRahul Sharma };
1349d39e55e0SRahul Sharma 
1350d39e55e0SRahul Sharma PNAME(mout_sclk_pcm_p) = {"ioclk_pcm_extclk", "fin_pll", "dout_aclk_peri_aud",
1351d39e55e0SRahul Sharma 			"phyclk_hdmi_phy_ref_cko"};
1352d39e55e0SRahul Sharma PNAME(mout_sclk_i2scod_p) = {"ioclk_i2s_cdclk", "fin_pll", "dout_aclk_peri_aud",
1353d39e55e0SRahul Sharma 			"phyclk_hdmi_phy_ref_cko"};
1354d39e55e0SRahul Sharma PNAME(mout_sclk_spdif_p) = {"ioclk_spdif_extclk", "fin_pll",
1355d39e55e0SRahul Sharma 			"dout_aclk_peri_aud", "phyclk_hdmi_phy_ref_cko"};
1356d39e55e0SRahul Sharma 
1357d39e55e0SRahul Sharma struct samsung_mux_clock peri_mux_clks[] __initdata = {
1358d39e55e0SRahul Sharma 	MUX(PERI_MOUT_SCLK_PCM, "mout_sclk_pcm", mout_sclk_pcm_p,
1359d39e55e0SRahul Sharma 			MUX_SEL_PERI1, 4, 2),
1360d39e55e0SRahul Sharma 	MUX(PERI_MOUT_SCLK_I2SCOD, "mout_sclk_i2scod", mout_sclk_i2scod_p,
1361d39e55e0SRahul Sharma 			MUX_SEL_PERI1, 12, 2),
1362d39e55e0SRahul Sharma 	MUX(PERI_MOUT_SCLK_SPDIF, "mout_sclk_spdif", mout_sclk_spdif_p,
1363d39e55e0SRahul Sharma 			MUX_SEL_PERI1, 20, 2),
1364d39e55e0SRahul Sharma };
1365d39e55e0SRahul Sharma 
1366d39e55e0SRahul Sharma struct samsung_div_clock peri_div_clks[] __initdata = {
1367d39e55e0SRahul Sharma 	DIV(PERI_DOUT_PCM, "dout_pcm", "mout_sclk_pcm", DIV_PERI, 0, 8),
1368d39e55e0SRahul Sharma 	DIV(PERI_DOUT_I2S, "dout_i2s", "mout_sclk_i2scod", DIV_PERI, 8, 6),
1369d39e55e0SRahul Sharma };
1370d39e55e0SRahul Sharma 
1371d39e55e0SRahul Sharma struct samsung_gate_clock peri_gate_clks[] __initdata = {
1372d39e55e0SRahul Sharma 	GATE(PERI_SCLK_PCM1, "sclk_pcm1", "dout_pcm", EN_SCLK_PERI, 0,
1373d39e55e0SRahul Sharma 			CLK_SET_RATE_PARENT, 0),
1374d39e55e0SRahul Sharma 	GATE(PERI_SCLK_I2S, "sclk_i2s", "dout_i2s", EN_SCLK_PERI, 1,
1375d39e55e0SRahul Sharma 			CLK_SET_RATE_PARENT, 0),
1376d39e55e0SRahul Sharma 	GATE(PERI_SCLK_SPDIF, "sclk_spdif", "dout_sclk_peri_spi0_b",
1377d39e55e0SRahul Sharma 			EN_SCLK_PERI, 2, CLK_SET_RATE_PARENT, 0),
1378d39e55e0SRahul Sharma 	GATE(PERI_SCLK_SPI0, "sclk_spi0", "dout_sclk_peri_spi0_b",
1379d39e55e0SRahul Sharma 			EN_SCLK_PERI, 7, CLK_SET_RATE_PARENT, 0),
1380d39e55e0SRahul Sharma 	GATE(PERI_SCLK_SPI1, "sclk_spi1", "dout_sclk_peri_spi1_b",
1381d39e55e0SRahul Sharma 			EN_SCLK_PERI, 8, CLK_SET_RATE_PARENT, 0),
1382d39e55e0SRahul Sharma 	GATE(PERI_SCLK_SPI2, "sclk_spi2", "dout_sclk_peri_spi2_b",
1383d39e55e0SRahul Sharma 			EN_SCLK_PERI, 9, CLK_SET_RATE_PARENT, 0),
1384d39e55e0SRahul Sharma 	GATE(PERI_SCLK_UART0, "sclk_uart0", "dout_sclk_peri_uart0",
1385d39e55e0SRahul Sharma 			EN_SCLK_PERI, 10, CLK_SET_RATE_PARENT, 0),
1386d39e55e0SRahul Sharma 	GATE(PERI_SCLK_UART1, "sclk_uart1", "dout_sclk_peri_uart1",
1387d39e55e0SRahul Sharma 			EN_SCLK_PERI, 11, CLK_SET_RATE_PARENT, 0),
1388d39e55e0SRahul Sharma 	GATE(PERI_SCLK_UART2, "sclk_uart2", "dout_sclk_peri_uart2",
1389d39e55e0SRahul Sharma 			EN_SCLK_PERI, 12, CLK_SET_RATE_PARENT, 0),
1390d39e55e0SRahul Sharma 
1391d39e55e0SRahul Sharma 	GATE(PERI_CLK_ABB, "clk_abb", "dout_aclk_peri_66",
1392d39e55e0SRahul Sharma 		EN_IP_PERI0, 1, 0, 0),
1393d39e55e0SRahul Sharma 	GATE(PERI_CLK_EFUSE_WRITER, "clk_efuse_writer", "dout_aclk_peri_66",
1394d39e55e0SRahul Sharma 		EN_IP_PERI0, 5, 0, 0),
1395d39e55e0SRahul Sharma 	GATE(PERI_CLK_HDMICEC, "clk_hdmicec", "dout_aclk_peri_66",
1396d39e55e0SRahul Sharma 		EN_IP_PERI0, 6, 0, 0),
1397d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C10, "clk_i2c10", "dout_aclk_peri_66",
1398d39e55e0SRahul Sharma 		EN_IP_PERI0, 7, 0, 0),
1399d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C11, "clk_i2c11", "dout_aclk_peri_66",
1400d39e55e0SRahul Sharma 		EN_IP_PERI0, 8, 0, 0),
1401d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C8, "clk_i2c8", "dout_aclk_peri_66",
1402d39e55e0SRahul Sharma 		EN_IP_PERI0, 9, 0, 0),
1403d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C9, "clk_i2c9", "dout_aclk_peri_66",
1404d39e55e0SRahul Sharma 		EN_IP_PERI0, 10, 0, 0),
1405d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C4, "clk_i2c4", "dout_aclk_peri_66",
1406d39e55e0SRahul Sharma 		EN_IP_PERI0, 11, 0, 0),
1407d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C5, "clk_i2c5", "dout_aclk_peri_66",
1408d39e55e0SRahul Sharma 		EN_IP_PERI0, 12, 0, 0),
1409d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C6, "clk_i2c6", "dout_aclk_peri_66",
1410d39e55e0SRahul Sharma 		EN_IP_PERI0, 13, 0, 0),
1411d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2C7, "clk_i2c7", "dout_aclk_peri_66",
1412d39e55e0SRahul Sharma 		EN_IP_PERI0, 14, 0, 0),
1413d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2CHDMI, "clk_i2chdmi", "dout_aclk_peri_66",
1414d39e55e0SRahul Sharma 		EN_IP_PERI0, 15, 0, 0),
1415d39e55e0SRahul Sharma 	GATE(PERI_CLK_I2S, "clk_peri_i2s", "dout_aclk_peri_66",
1416d39e55e0SRahul Sharma 		EN_IP_PERI0, 16, 0, 0),
1417d39e55e0SRahul Sharma 	GATE(PERI_CLK_MCT, "clk_mct", "dout_aclk_peri_66",
1418d39e55e0SRahul Sharma 		EN_IP_PERI0, 17, 0, 0),
1419d39e55e0SRahul Sharma 	GATE(PERI_CLK_PCM, "clk_peri_pcm", "dout_aclk_peri_66",
1420d39e55e0SRahul Sharma 		EN_IP_PERI0, 18, 0, 0),
1421d39e55e0SRahul Sharma 	GATE(PERI_CLK_HSIC0, "clk_hsic0", "dout_aclk_peri_66",
1422d39e55e0SRahul Sharma 		EN_IP_PERI0, 20, 0, 0),
1423d39e55e0SRahul Sharma 	GATE(PERI_CLK_HSIC1, "clk_hsic1", "dout_aclk_peri_66",
1424d39e55e0SRahul Sharma 		EN_IP_PERI0, 21, 0, 0),
1425d39e55e0SRahul Sharma 	GATE(PERI_CLK_HSIC2, "clk_hsic2", "dout_aclk_peri_66",
1426d39e55e0SRahul Sharma 		EN_IP_PERI0, 22, 0, 0),
1427d39e55e0SRahul Sharma 	GATE(PERI_CLK_HSIC3, "clk_hsic3", "dout_aclk_peri_66",
1428d39e55e0SRahul Sharma 		EN_IP_PERI0, 23, 0, 0),
1429d39e55e0SRahul Sharma 	GATE(PERI_CLK_WDT_EGL, "clk_wdt_egl", "dout_aclk_peri_66",
1430d39e55e0SRahul Sharma 		EN_IP_PERI0, 24, 0, 0),
1431d39e55e0SRahul Sharma 	GATE(PERI_CLK_WDT_KFC, "clk_wdt_kfc", "dout_aclk_peri_66",
1432d39e55e0SRahul Sharma 		EN_IP_PERI0, 25, 0, 0),
1433d39e55e0SRahul Sharma 
1434d39e55e0SRahul Sharma 	GATE(PERI_CLK_UART4, "clk_uart4", "dout_aclk_peri_66",
1435d39e55e0SRahul Sharma 		EN_IP_PERI2, 0, 0, 0),
1436d39e55e0SRahul Sharma 	GATE(PERI_CLK_PWM, "clk_pwm", "dout_aclk_peri_66",
1437d39e55e0SRahul Sharma 		EN_IP_PERI2, 3, 0, 0),
1438d39e55e0SRahul Sharma 	GATE(PERI_CLK_SPDIF, "clk_spdif", "dout_aclk_peri_66",
1439d39e55e0SRahul Sharma 		EN_IP_PERI2, 6, 0, 0),
1440d39e55e0SRahul Sharma 	GATE(PERI_CLK_SPI0, "clk_spi0", "dout_aclk_peri_66",
1441d39e55e0SRahul Sharma 		EN_IP_PERI2, 7, 0, 0),
1442d39e55e0SRahul Sharma 	GATE(PERI_CLK_SPI1, "clk_spi1", "dout_aclk_peri_66",
1443d39e55e0SRahul Sharma 		EN_IP_PERI2, 8, 0, 0),
1444d39e55e0SRahul Sharma 	GATE(PERI_CLK_SPI2, "clk_spi2", "dout_aclk_peri_66",
1445d39e55e0SRahul Sharma 		EN_IP_PERI2, 9, 0, 0),
1446d39e55e0SRahul Sharma 	GATE(PERI_CLK_TMU0, "clk_tmu0", "dout_aclk_peri_66",
1447d39e55e0SRahul Sharma 		EN_IP_PERI2, 10, 0, 0),
1448d39e55e0SRahul Sharma 	GATE(PERI_CLK_TMU1, "clk_tmu1", "dout_aclk_peri_66",
1449d39e55e0SRahul Sharma 		EN_IP_PERI2, 11, 0, 0),
1450d39e55e0SRahul Sharma 	GATE(PERI_CLK_TMU2, "clk_tmu2", "dout_aclk_peri_66",
1451d39e55e0SRahul Sharma 		EN_IP_PERI2, 12, 0, 0),
1452d39e55e0SRahul Sharma 	GATE(PERI_CLK_TMU3, "clk_tmu3", "dout_aclk_peri_66",
1453d39e55e0SRahul Sharma 		EN_IP_PERI2, 13, 0, 0),
1454d39e55e0SRahul Sharma 	GATE(PERI_CLK_TMU4, "clk_tmu4", "dout_aclk_peri_66",
1455d39e55e0SRahul Sharma 		EN_IP_PERI2, 14, 0, 0),
1456d39e55e0SRahul Sharma 	GATE(PERI_CLK_ADC, "clk_adc", "dout_aclk_peri_66",
1457d39e55e0SRahul Sharma 		EN_IP_PERI2, 18, 0, 0),
1458d39e55e0SRahul Sharma 	GATE(PERI_CLK_UART0, "clk_uart0", "dout_aclk_peri_66",
1459d39e55e0SRahul Sharma 		EN_IP_PERI2, 19, 0, 0),
1460d39e55e0SRahul Sharma 	GATE(PERI_CLK_UART1, "clk_uart1", "dout_aclk_peri_66",
1461d39e55e0SRahul Sharma 		EN_IP_PERI2, 20, 0, 0),
1462d39e55e0SRahul Sharma 	GATE(PERI_CLK_UART2, "clk_uart2", "dout_aclk_peri_66",
1463d39e55e0SRahul Sharma 		EN_IP_PERI2, 21, 0, 0),
1464d39e55e0SRahul Sharma 
1465d39e55e0SRahul Sharma 	GATE(PERI_CLK_CHIPID, "clk_chipid", "dout_aclk_peri_66",
1466d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_CHIPID, 2, 0, 0),
1467d39e55e0SRahul Sharma 
1468d39e55e0SRahul Sharma 	GATE(PERI_CLK_PROVKEY0, "clk_provkey0", "dout_aclk_peri_66",
1469d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_PROVKEY0, 1, 0, 0),
1470d39e55e0SRahul Sharma 
1471d39e55e0SRahul Sharma 	GATE(PERI_CLK_PROVKEY1, "clk_provkey1", "dout_aclk_peri_66",
1472d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_PROVKEY1, 2, 0, 0),
1473d39e55e0SRahul Sharma 
1474d39e55e0SRahul Sharma 	GATE(PERI_CLK_SECKEY, "clk_seckey", "dout_aclk_peri_66",
1475d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_SECKEY, 5, 0, 0),
1476d39e55e0SRahul Sharma 
1477d39e55e0SRahul Sharma 	GATE(PERI_CLK_TOP_RTC, "clk_top_rtc", "dout_aclk_peri_66",
1478d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TOP_RTC, 5, 0, 0),
1479d39e55e0SRahul Sharma 
1480d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC0, "clk_tzpc0", "dout_aclk_peri_66",
1481d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 10, 0, 0),
1482d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC1, "clk_tzpc1", "dout_aclk_peri_66",
1483d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 11, 0, 0),
1484d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC2, "clk_tzpc2", "dout_aclk_peri_66",
1485d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 12, 0, 0),
1486d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC3, "clk_tzpc3", "dout_aclk_peri_66",
1487d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 13, 0, 0),
1488d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC4, "clk_tzpc4", "dout_aclk_peri_66",
1489d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 14, 0, 0),
1490d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC5, "clk_tzpc5", "dout_aclk_peri_66",
1491d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 15, 0, 0),
1492d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC6, "clk_tzpc6", "dout_aclk_peri_66",
1493d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 16, 0, 0),
1494d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC7, "clk_tzpc7", "dout_aclk_peri_66",
1495d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 17, 0, 0),
1496d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC8, "clk_tzpc8", "dout_aclk_peri_66",
1497d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 18, 0, 0),
1498d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC9, "clk_tzpc9", "dout_aclk_peri_66",
1499d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 19, 0, 0),
1500d39e55e0SRahul Sharma 	GATE(PERI_CLK_TZPC10, "clk_tzpc10", "dout_aclk_peri_66",
1501d39e55e0SRahul Sharma 		EN_IP_PERI_SECURE_TZPC, 20, 0, 0),
1502d39e55e0SRahul Sharma };
1503d39e55e0SRahul Sharma 
1504d39e55e0SRahul Sharma static void __init exynos5260_clk_peri_init(struct device_node *np)
1505d39e55e0SRahul Sharma {
1506d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
1507d39e55e0SRahul Sharma 
1508d39e55e0SRahul Sharma 	cmu.mux_clks = peri_mux_clks;
1509d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(peri_mux_clks);
1510d39e55e0SRahul Sharma 	cmu.div_clks = peri_div_clks;
1511d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(peri_div_clks);
1512d39e55e0SRahul Sharma 	cmu.gate_clks = peri_gate_clks;
1513d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(peri_gate_clks);
1514d39e55e0SRahul Sharma 	cmu.nr_clk_ids = PERI_NR_CLK;
1515d39e55e0SRahul Sharma 	cmu.clk_regs = peri_clk_regs;
1516d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(peri_clk_regs);
1517d39e55e0SRahul Sharma 
1518d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
1519d39e55e0SRahul Sharma }
1520d39e55e0SRahul Sharma 
1521d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_peri, "samsung,exynos5260-clock-peri",
1522d39e55e0SRahul Sharma 		exynos5260_clk_peri_init);
1523d39e55e0SRahul Sharma 
1524d39e55e0SRahul Sharma 
1525d39e55e0SRahul Sharma /* CMU_TOP */
1526d39e55e0SRahul Sharma 
1527d39e55e0SRahul Sharma static unsigned long top_clk_regs[] __initdata = {
1528d39e55e0SRahul Sharma 	DISP_PLL_LOCK,
1529d39e55e0SRahul Sharma 	AUD_PLL_LOCK,
1530d39e55e0SRahul Sharma 	DISP_PLL_CON0,
1531d39e55e0SRahul Sharma 	DISP_PLL_CON1,
1532d39e55e0SRahul Sharma 	DISP_PLL_FDET,
1533d39e55e0SRahul Sharma 	AUD_PLL_CON0,
1534d39e55e0SRahul Sharma 	AUD_PLL_CON1,
1535d39e55e0SRahul Sharma 	AUD_PLL_CON2,
1536d39e55e0SRahul Sharma 	AUD_PLL_FDET,
1537d39e55e0SRahul Sharma 	MUX_SEL_TOP_PLL0,
1538d39e55e0SRahul Sharma 	MUX_SEL_TOP_MFC,
1539d39e55e0SRahul Sharma 	MUX_SEL_TOP_G2D,
1540d39e55e0SRahul Sharma 	MUX_SEL_TOP_GSCL,
1541d39e55e0SRahul Sharma 	MUX_SEL_TOP_ISP10,
1542d39e55e0SRahul Sharma 	MUX_SEL_TOP_ISP11,
1543d39e55e0SRahul Sharma 	MUX_SEL_TOP_DISP0,
1544d39e55e0SRahul Sharma 	MUX_SEL_TOP_DISP1,
1545d39e55e0SRahul Sharma 	MUX_SEL_TOP_BUS,
1546d39e55e0SRahul Sharma 	MUX_SEL_TOP_PERI0,
1547d39e55e0SRahul Sharma 	MUX_SEL_TOP_PERI1,
1548d39e55e0SRahul Sharma 	MUX_SEL_TOP_FSYS,
1549d39e55e0SRahul Sharma 	DIV_TOP_G2D_MFC,
1550d39e55e0SRahul Sharma 	DIV_TOP_GSCL_ISP0,
1551d39e55e0SRahul Sharma 	DIV_TOP_ISP10,
1552d39e55e0SRahul Sharma 	DIV_TOP_ISP11,
1553d39e55e0SRahul Sharma 	DIV_TOP_DISP,
1554d39e55e0SRahul Sharma 	DIV_TOP_BUS,
1555d39e55e0SRahul Sharma 	DIV_TOP_PERI0,
1556d39e55e0SRahul Sharma 	DIV_TOP_PERI1,
1557d39e55e0SRahul Sharma 	DIV_TOP_PERI2,
1558d39e55e0SRahul Sharma 	DIV_TOP_FSYS0,
1559d39e55e0SRahul Sharma 	DIV_TOP_FSYS1,
1560d39e55e0SRahul Sharma 	DIV_TOP_HPM,
1561d39e55e0SRahul Sharma 	DIV_TOP_PLL_FDET,
1562d39e55e0SRahul Sharma 	EN_ACLK_TOP,
1563d39e55e0SRahul Sharma 	EN_SCLK_TOP,
1564d39e55e0SRahul Sharma 	EN_IP_TOP,
1565d39e55e0SRahul Sharma };
1566d39e55e0SRahul Sharma 
1567d39e55e0SRahul Sharma /* fixed rate clocks generated inside the soc */
1568d39e55e0SRahul Sharma struct samsung_fixed_rate_clock fixed_rate_clks[] __initdata = {
1569d39e55e0SRahul Sharma 	FRATE(PHYCLK_DPTX_PHY_CH3_TXD_CLK, "phyclk_dptx_phy_ch3_txd_clk", NULL,
1570d39e55e0SRahul Sharma 			CLK_IS_ROOT, 270000000),
1571d39e55e0SRahul Sharma 	FRATE(PHYCLK_DPTX_PHY_CH2_TXD_CLK, "phyclk_dptx_phy_ch2_txd_clk", NULL,
1572d39e55e0SRahul Sharma 			CLK_IS_ROOT, 270000000),
1573d39e55e0SRahul Sharma 	FRATE(PHYCLK_DPTX_PHY_CH1_TXD_CLK, "phyclk_dptx_phy_ch1_txd_clk", NULL,
1574d39e55e0SRahul Sharma 			CLK_IS_ROOT, 270000000),
1575d39e55e0SRahul Sharma 	FRATE(PHYCLK_DPTX_PHY_CH0_TXD_CLK, "phyclk_dptx_phy_ch0_txd_clk", NULL,
1576d39e55e0SRahul Sharma 			CLK_IS_ROOT, 270000000),
1577d39e55e0SRahul Sharma 	FRATE(phyclk_hdmi_phy_tmds_clko, "phyclk_hdmi_phy_tmds_clko", NULL,
1578d39e55e0SRahul Sharma 			CLK_IS_ROOT, 250000000),
1579d39e55e0SRahul Sharma 	FRATE(PHYCLK_HDMI_PHY_PIXEL_CLKO, "phyclk_hdmi_phy_pixel_clko", NULL,
1580d39e55e0SRahul Sharma 			CLK_IS_ROOT, 1660000000),
1581d39e55e0SRahul Sharma 	FRATE(PHYCLK_HDMI_LINK_O_TMDS_CLKHI, "phyclk_hdmi_link_o_tmds_clkhi",
1582d39e55e0SRahul Sharma 			NULL, CLK_IS_ROOT, 125000000),
1583d39e55e0SRahul Sharma 	FRATE(PHYCLK_MIPI_DPHY_4L_M_TXBYTECLKHS,
1584*22842d24SChander Kashyap 			"phyclk_mipi_dphy_4l_m_txbyte_clkhs" , NULL,
1585d39e55e0SRahul Sharma 			CLK_IS_ROOT, 187500000),
1586d39e55e0SRahul Sharma 	FRATE(PHYCLK_DPTX_PHY_O_REF_CLK_24M, "phyclk_dptx_phy_o_ref_clk_24m",
1587d39e55e0SRahul Sharma 			NULL, CLK_IS_ROOT, 24000000),
1588d39e55e0SRahul Sharma 	FRATE(PHYCLK_DPTX_PHY_CLK_DIV2, "phyclk_dptx_phy_clk_div2", NULL,
1589d39e55e0SRahul Sharma 			CLK_IS_ROOT, 135000000),
1590d39e55e0SRahul Sharma 	FRATE(PHYCLK_MIPI_DPHY_4L_M_RXCLKESC0,
1591d39e55e0SRahul Sharma 			"phyclk_mipi_dphy_4l_m_rxclkesc0", NULL,
1592d39e55e0SRahul Sharma 			CLK_IS_ROOT, 20000000),
1593d39e55e0SRahul Sharma 	FRATE(PHYCLK_USBHOST20_PHY_PHYCLOCK, "phyclk_usbhost20_phy_phyclock",
1594d39e55e0SRahul Sharma 			NULL, CLK_IS_ROOT, 60000000),
1595d39e55e0SRahul Sharma 	FRATE(PHYCLK_USBHOST20_PHY_FREECLK, "phyclk_usbhost20_phy_freeclk",
1596d39e55e0SRahul Sharma 			NULL, CLK_IS_ROOT, 60000000),
1597d39e55e0SRahul Sharma 	FRATE(PHYCLK_USBHOST20_PHY_CLK48MOHCI,
1598d39e55e0SRahul Sharma 			"phyclk_usbhost20_phy_clk48mohci",
1599d39e55e0SRahul Sharma 			NULL, CLK_IS_ROOT, 48000000),
1600d39e55e0SRahul Sharma 	FRATE(PHYCLK_USBDRD30_UDRD30_PIPE_PCLK,
1601d39e55e0SRahul Sharma 			"phyclk_usbdrd30_udrd30_pipe_pclk", NULL,
1602d39e55e0SRahul Sharma 			CLK_IS_ROOT, 125000000),
1603d39e55e0SRahul Sharma 	FRATE(PHYCLK_USBDRD30_UDRD30_PHYCLOCK,
1604d39e55e0SRahul Sharma 			"phyclk_usbdrd30_udrd30_phyclock", NULL,
1605d39e55e0SRahul Sharma 			CLK_IS_ROOT, 60000000),
1606d39e55e0SRahul Sharma };
1607d39e55e0SRahul Sharma 
1608d39e55e0SRahul Sharma PNAME(mout_memtop_pll_user_p) = {"fin_pll", "dout_mem_pll"};
1609d39e55e0SRahul Sharma PNAME(mout_bustop_pll_user_p) = {"fin_pll", "dout_bus_pll"};
1610d39e55e0SRahul Sharma PNAME(mout_mediatop_pll_user_p) = {"fin_pll", "dout_media_pll"};
1611d39e55e0SRahul Sharma PNAME(mout_audtop_pll_user_p) = {"fin_pll", "mout_aud_pll"};
1612d39e55e0SRahul Sharma PNAME(mout_aud_pll_p) = {"fin_pll", "fout_aud_pll"};
1613d39e55e0SRahul Sharma PNAME(mout_disp_pll_p) = {"fin_pll", "fout_disp_pll"};
1614d39e55e0SRahul Sharma PNAME(mout_mfc_bustop_333_p) = {"mout_bustop_pll_user", "mout_disp_pll"};
1615d39e55e0SRahul Sharma PNAME(mout_aclk_mfc_333_p) = {"mout_mediatop_pll_user", "mout_mfc_bustop_333"};
1616d39e55e0SRahul Sharma PNAME(mout_g2d_bustop_333_p) = {"mout_bustop_pll_user", "mout_disp_pll"};
1617d39e55e0SRahul Sharma PNAME(mout_aclk_g2d_333_p) = {"mout_mediatop_pll_user", "mout_g2d_bustop_333"};
1618d39e55e0SRahul Sharma PNAME(mout_gscl_bustop_333_p) = {"mout_bustop_pll_user", "mout_disp_pll"};
1619d39e55e0SRahul Sharma PNAME(mout_aclk_gscl_333_p) = {"mout_mediatop_pll_user",
1620d39e55e0SRahul Sharma 			"mout_gscl_bustop_333"};
1621d39e55e0SRahul Sharma PNAME(mout_m2m_mediatop_400_p) = {"mout_mediatop_pll_user", "mout_disp_pll"};
1622d39e55e0SRahul Sharma PNAME(mout_aclk_gscl_400_p) = {"mout_bustop_pll_user",
1623d39e55e0SRahul Sharma 			"mout_m2m_mediatop_400"};
1624d39e55e0SRahul Sharma PNAME(mout_gscl_bustop_fimc_p) = {"mout_bustop_pll_user", "mout_disp_pll"};
1625d39e55e0SRahul Sharma PNAME(mout_aclk_gscl_fimc_p) = {"mout_mediatop_pll_user",
1626d39e55e0SRahul Sharma 			"mout_gscl_bustop_fimc"};
1627d39e55e0SRahul Sharma PNAME(mout_isp1_media_266_p) = {"mout_mediatop_pll_user",
1628d39e55e0SRahul Sharma 			"mout_memtop_pll_user"};
1629d39e55e0SRahul Sharma PNAME(mout_aclk_isp1_266_p) = {"mout_bustop_pll_user", "mout_isp1_media_266"};
1630d39e55e0SRahul Sharma PNAME(mout_isp1_media_400_p) = {"mout_mediatop_pll_user", "mout_disp_pll"};
1631d39e55e0SRahul Sharma PNAME(mout_aclk_isp1_400_p) = {"mout_bustop_pll_user", "mout_isp1_media_400"};
1632d39e55e0SRahul Sharma PNAME(mout_sclk_isp_spi_p) = {"fin_pll", "mout_bustop_pll_user"};
1633d39e55e0SRahul Sharma PNAME(mout_sclk_isp_uart_p) = {"fin_pll", "mout_bustop_pll_user"};
1634d39e55e0SRahul Sharma PNAME(mout_sclk_isp_sensor_p) = {"fin_pll", "mout_bustop_pll_user"};
1635d39e55e0SRahul Sharma PNAME(mout_disp_disp_333_p) = {"mout_disp_pll", "mout_bustop_pll_user"};
1636d39e55e0SRahul Sharma PNAME(mout_aclk_disp_333_p) = {"mout_mediatop_pll_user", "mout_disp_disp_333"};
1637d39e55e0SRahul Sharma PNAME(mout_disp_disp_222_p) = {"mout_disp_pll", "mout_bustop_pll_user"};
1638d39e55e0SRahul Sharma PNAME(mout_aclk_disp_222_p) = {"mout_mediatop_pll_user", "mout_disp_disp_222"};
1639d39e55e0SRahul Sharma PNAME(mout_disp_media_pixel_p) = {"mout_mediatop_pll_user",
1640d39e55e0SRahul Sharma 			"mout_bustop_pll_user"};
1641d39e55e0SRahul Sharma PNAME(mout_sclk_disp_pixel_p) = {"mout_disp_pll", "mout_disp_media_pixel"};
1642d39e55e0SRahul Sharma PNAME(mout_bus_bustop_400_p) = {"mout_bustop_pll_user", "mout_memtop_pll_user"};
1643d39e55e0SRahul Sharma PNAME(mout_bus_bustop_100_p) = {"mout_bustop_pll_user", "mout_memtop_pll_user"};
1644d39e55e0SRahul Sharma PNAME(mout_sclk_peri_spi_clk_p) = {"fin_pll", "mout_bustop_pll_user"};
1645d39e55e0SRahul Sharma PNAME(mout_sclk_peri_uart_uclk_p) = {"fin_pll", "mout_bustop_pll_user"};
1646d39e55e0SRahul Sharma PNAME(mout_sclk_fsys_usb_p) = {"fin_pll", "mout_bustop_pll_user"};
1647d39e55e0SRahul Sharma PNAME(mout_sclk_fsys_mmc_sdclkin_a_p) = {"fin_pll", "mout_bustop_pll_user"};
1648d39e55e0SRahul Sharma PNAME(mout_sclk_fsys_mmc0_sdclkin_b_p) = {"mout_sclk_fsys_mmc0_sdclkin_a",
1649d39e55e0SRahul Sharma 			"mout_mediatop_pll_user"};
1650d39e55e0SRahul Sharma PNAME(mout_sclk_fsys_mmc1_sdclkin_b_p) = {"mout_sclk_fsys_mmc1_sdclkin_a",
1651d39e55e0SRahul Sharma 			"mout_mediatop_pll_user"};
1652d39e55e0SRahul Sharma PNAME(mout_sclk_fsys_mmc2_sdclkin_b_p) = {"mout_sclk_fsys_mmc2_sdclkin_a",
1653d39e55e0SRahul Sharma 			"mout_mediatop_pll_user"};
1654d39e55e0SRahul Sharma 
1655d39e55e0SRahul Sharma struct samsung_mux_clock top_mux_clks[] __initdata = {
1656d39e55e0SRahul Sharma 	MUX(TOP_MOUT_MEDIATOP_PLL_USER, "mout_mediatop_pll_user",
1657d39e55e0SRahul Sharma 			mout_mediatop_pll_user_p,
1658d39e55e0SRahul Sharma 			MUX_SEL_TOP_PLL0, 0, 1),
1659d39e55e0SRahul Sharma 	MUX(TOP_MOUT_MEMTOP_PLL_USER, "mout_memtop_pll_user",
1660d39e55e0SRahul Sharma 			mout_memtop_pll_user_p,
1661d39e55e0SRahul Sharma 			MUX_SEL_TOP_PLL0, 4, 1),
1662d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUSTOP_PLL_USER, "mout_bustop_pll_user",
1663d39e55e0SRahul Sharma 			mout_bustop_pll_user_p,
1664d39e55e0SRahul Sharma 			MUX_SEL_TOP_PLL0, 8, 1),
1665d39e55e0SRahul Sharma 	MUX(TOP_MOUT_DISP_PLL, "mout_disp_pll", mout_disp_pll_p,
1666d39e55e0SRahul Sharma 			MUX_SEL_TOP_PLL0, 12, 1),
1667d39e55e0SRahul Sharma 	MUX(TOP_MOUT_AUD_PLL, "mout_aud_pll", mout_aud_pll_p,
1668d39e55e0SRahul Sharma 			MUX_SEL_TOP_PLL0, 16, 1),
1669d39e55e0SRahul Sharma 	MUX(TOP_MOUT_AUDTOP_PLL_USER, "mout_audtop_pll_user",
1670d39e55e0SRahul Sharma 			mout_audtop_pll_user_p,
1671d39e55e0SRahul Sharma 			MUX_SEL_TOP_PLL0, 24, 1),
1672d39e55e0SRahul Sharma 
1673d39e55e0SRahul Sharma 	MUX(TOP_MOUT_DISP_DISP_333, "mout_disp_disp_333", mout_disp_disp_333_p,
1674d39e55e0SRahul Sharma 			MUX_SEL_TOP_DISP0, 0, 1),
1675d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_DISP_333, "mout_aclk_disp_333", mout_aclk_disp_333_p,
1676d39e55e0SRahul Sharma 			MUX_SEL_TOP_DISP0, 8, 1),
1677d39e55e0SRahul Sharma 	MUX(TOP_MOUT_DISP_DISP_222, "mout_disp_disp_222", mout_disp_disp_222_p,
1678d39e55e0SRahul Sharma 			MUX_SEL_TOP_DISP0, 12, 1),
1679d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_DISP_222, "mout_aclk_disp_222", mout_aclk_disp_222_p,
1680d39e55e0SRahul Sharma 			MUX_SEL_TOP_DISP0, 20, 1),
1681d39e55e0SRahul Sharma 
1682d39e55e0SRahul Sharma 	MUX(TOP_MOUT_FIMD1, "mout_sclk_disp_pixel", mout_sclk_disp_pixel_p,
1683d39e55e0SRahul Sharma 			MUX_SEL_TOP_DISP1, 0, 1),
1684d39e55e0SRahul Sharma 	MUX(TOP_MOUT_DISP_MEDIA_PIXEL, "mout_disp_media_pixel",
1685d39e55e0SRahul Sharma 			mout_disp_media_pixel_p,
1686d39e55e0SRahul Sharma 			MUX_SEL_TOP_DISP1, 8, 1),
1687d39e55e0SRahul Sharma 
1688d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_PERI_SPI2_CLK, "mout_sclk_peri_spi2_clk",
1689d39e55e0SRahul Sharma 			mout_sclk_peri_spi_clk_p,
1690d39e55e0SRahul Sharma 			MUX_SEL_TOP_PERI1, 0, 1),
1691d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_PERI_SPI1_CLK, "mout_sclk_peri_spi1_clk",
1692d39e55e0SRahul Sharma 			mout_sclk_peri_spi_clk_p,
1693d39e55e0SRahul Sharma 			MUX_SEL_TOP_PERI1, 4, 1),
1694d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_PERI_SPI0_CLK, "mout_sclk_peri_spi0_clk",
1695d39e55e0SRahul Sharma 			mout_sclk_peri_spi_clk_p,
1696d39e55e0SRahul Sharma 			MUX_SEL_TOP_PERI1, 8, 1),
1697d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_PERI_UART1_UCLK, "mout_sclk_peri_uart1_uclk",
1698d39e55e0SRahul Sharma 			mout_sclk_peri_uart_uclk_p,
1699d39e55e0SRahul Sharma 			MUX_SEL_TOP_PERI1, 12, 1),
1700d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_PERI_UART2_UCLK, "mout_sclk_peri_uart2_uclk",
1701d39e55e0SRahul Sharma 			mout_sclk_peri_uart_uclk_p,
1702d39e55e0SRahul Sharma 			MUX_SEL_TOP_PERI1, 16, 1),
1703d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_PERI_UART0_UCLK, "mout_sclk_peri_uart0_uclk",
1704d39e55e0SRahul Sharma 			mout_sclk_peri_uart_uclk_p,
1705d39e55e0SRahul Sharma 			MUX_SEL_TOP_PERI1, 20, 1),
1706d39e55e0SRahul Sharma 
1707d39e55e0SRahul Sharma 
1708d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS1_BUSTOP_400, "mout_bus1_bustop_400",
1709d39e55e0SRahul Sharma 			mout_bus_bustop_400_p,
1710d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 0, 1),
1711d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS1_BUSTOP_100, "mout_bus1_bustop_100",
1712d39e55e0SRahul Sharma 			mout_bus_bustop_100_p,
1713d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 4, 1),
1714d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS2_BUSTOP_100, "mout_bus2_bustop_100",
1715d39e55e0SRahul Sharma 			mout_bus_bustop_100_p,
1716d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 8, 1),
1717d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS2_BUSTOP_400, "mout_bus2_bustop_400",
1718d39e55e0SRahul Sharma 			mout_bus_bustop_400_p,
1719d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 12, 1),
1720d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS3_BUSTOP_400, "mout_bus3_bustop_400",
1721d39e55e0SRahul Sharma 			mout_bus_bustop_400_p,
1722d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 16, 1),
1723d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS3_BUSTOP_100, "mout_bus3_bustop_100",
1724d39e55e0SRahul Sharma 			mout_bus_bustop_100_p,
1725d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 20, 1),
1726d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS4_BUSTOP_400, "mout_bus4_bustop_400",
1727d39e55e0SRahul Sharma 			mout_bus_bustop_400_p,
1728d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 24, 1),
1729d39e55e0SRahul Sharma 	MUX(TOP_MOUT_BUS4_BUSTOP_100, "mout_bus4_bustop_100",
1730d39e55e0SRahul Sharma 			mout_bus_bustop_100_p,
1731d39e55e0SRahul Sharma 			MUX_SEL_TOP_BUS, 28, 1),
1732d39e55e0SRahul Sharma 
1733d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_FSYS_USB, "mout_sclk_fsys_usb",
1734d39e55e0SRahul Sharma 			mout_sclk_fsys_usb_p,
1735d39e55e0SRahul Sharma 			MUX_SEL_TOP_FSYS, 0, 1),
1736d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_FSYS_MMC2_SDCLKIN_A, "mout_sclk_fsys_mmc2_sdclkin_a",
1737d39e55e0SRahul Sharma 			mout_sclk_fsys_mmc_sdclkin_a_p,
1738d39e55e0SRahul Sharma 			MUX_SEL_TOP_FSYS, 4, 1),
1739d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_FSYS_MMC2_SDCLKIN_B, "mout_sclk_fsys_mmc2_sdclkin_b",
1740d39e55e0SRahul Sharma 			mout_sclk_fsys_mmc2_sdclkin_b_p,
1741d39e55e0SRahul Sharma 			MUX_SEL_TOP_FSYS, 8, 1),
1742d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_FSYS_MMC1_SDCLKIN_A, "mout_sclk_fsys_mmc1_sdclkin_a",
1743d39e55e0SRahul Sharma 			mout_sclk_fsys_mmc_sdclkin_a_p,
1744d39e55e0SRahul Sharma 			MUX_SEL_TOP_FSYS, 12, 1),
1745d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_FSYS_MMC1_SDCLKIN_B, "mout_sclk_fsys_mmc1_sdclkin_b",
1746d39e55e0SRahul Sharma 			mout_sclk_fsys_mmc1_sdclkin_b_p,
1747d39e55e0SRahul Sharma 			MUX_SEL_TOP_FSYS, 16, 1),
1748d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_FSYS_MMC0_SDCLKIN_A, "mout_sclk_fsys_mmc0_sdclkin_a",
1749d39e55e0SRahul Sharma 			mout_sclk_fsys_mmc_sdclkin_a_p,
1750d39e55e0SRahul Sharma 			MUX_SEL_TOP_FSYS, 20, 1),
1751d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_FSYS_MMC0_SDCLKIN_B, "mout_sclk_fsys_mmc0_sdclkin_b",
1752d39e55e0SRahul Sharma 			mout_sclk_fsys_mmc0_sdclkin_b_p,
1753d39e55e0SRahul Sharma 			MUX_SEL_TOP_FSYS, 24, 1),
1754d39e55e0SRahul Sharma 
1755d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ISP1_MEDIA_400, "mout_isp1_media_400",
1756d39e55e0SRahul Sharma 			mout_isp1_media_400_p,
1757d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP10, 4, 1),
1758d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_ISP1_400, "mout_aclk_isp1_400", mout_aclk_isp1_400_p,
1759d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP10, 8 , 1),
1760d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ISP1_MEDIA_266, "mout_isp1_media_266",
1761d39e55e0SRahul Sharma 			mout_isp1_media_266_p,
1762d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP10, 16, 1),
1763d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_ISP1_266, "mout_aclk_isp1_266", mout_aclk_isp1_266_p,
1764d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP10, 20, 1),
1765d39e55e0SRahul Sharma 
1766d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_ISP1_SPI0, "mout_sclk_isp1_spi0", mout_sclk_isp_spi_p,
1767d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP11, 4, 1),
1768d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_ISP1_SPI1, "mout_sclk_isp1_spi1", mout_sclk_isp_spi_p,
1769d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP11, 8, 1),
1770d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_ISP1_UART, "mout_sclk_isp1_uart",
1771d39e55e0SRahul Sharma 			mout_sclk_isp_uart_p,
1772d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP11, 12, 1),
1773d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_ISP1_SENSOR0, "mout_sclk_isp1_sensor0",
1774d39e55e0SRahul Sharma 			mout_sclk_isp_sensor_p,
1775d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP11, 16, 1),
1776d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_ISP1_SENSOR1, "mout_sclk_isp1_sensor1",
1777d39e55e0SRahul Sharma 			mout_sclk_isp_sensor_p,
1778d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP11, 20, 1),
1779d39e55e0SRahul Sharma 	MUX(TOP_MOUT_SCLK_ISP1_SENSOR2, "mout_sclk_isp1_sensor2",
1780d39e55e0SRahul Sharma 			mout_sclk_isp_sensor_p,
1781d39e55e0SRahul Sharma 			MUX_SEL_TOP_ISP11, 24, 1),
1782d39e55e0SRahul Sharma 
1783d39e55e0SRahul Sharma 	MUX(TOP_MOUT_MFC_BUSTOP_333, "mout_mfc_bustop_333",
1784d39e55e0SRahul Sharma 			mout_mfc_bustop_333_p,
1785d39e55e0SRahul Sharma 			MUX_SEL_TOP_MFC, 4, 1),
1786d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_MFC_333, "mout_aclk_mfc_333", mout_aclk_mfc_333_p,
1787d39e55e0SRahul Sharma 			MUX_SEL_TOP_MFC, 8, 1),
1788d39e55e0SRahul Sharma 
1789d39e55e0SRahul Sharma 	MUX(TOP_MOUT_G2D_BUSTOP_333, "mout_g2d_bustop_333",
1790d39e55e0SRahul Sharma 			mout_g2d_bustop_333_p,
1791d39e55e0SRahul Sharma 			MUX_SEL_TOP_G2D, 4, 1),
1792d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_G2D_333, "mout_aclk_g2d_333", mout_aclk_g2d_333_p,
1793d39e55e0SRahul Sharma 			MUX_SEL_TOP_G2D, 8, 1),
1794d39e55e0SRahul Sharma 
1795d39e55e0SRahul Sharma 	MUX(TOP_MOUT_M2M_MEDIATOP_400, "mout_m2m_mediatop_400",
1796d39e55e0SRahul Sharma 			mout_m2m_mediatop_400_p,
1797d39e55e0SRahul Sharma 			MUX_SEL_TOP_GSCL, 0, 1),
1798d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_GSCL_400, "mout_aclk_gscl_400",
1799d39e55e0SRahul Sharma 			mout_aclk_gscl_400_p,
1800d39e55e0SRahul Sharma 			MUX_SEL_TOP_GSCL, 4, 1),
1801d39e55e0SRahul Sharma 	MUX(TOP_MOUT_GSCL_BUSTOP_333, "mout_gscl_bustop_333",
1802d39e55e0SRahul Sharma 			mout_gscl_bustop_333_p,
1803d39e55e0SRahul Sharma 			MUX_SEL_TOP_GSCL, 8, 1),
1804d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_GSCL_333, "mout_aclk_gscl_333",
1805d39e55e0SRahul Sharma 			mout_aclk_gscl_333_p,
1806d39e55e0SRahul Sharma 			MUX_SEL_TOP_GSCL, 12, 1),
1807d39e55e0SRahul Sharma 	MUX(TOP_MOUT_GSCL_BUSTOP_FIMC, "mout_gscl_bustop_fimc",
1808d39e55e0SRahul Sharma 			mout_gscl_bustop_fimc_p,
1809d39e55e0SRahul Sharma 			MUX_SEL_TOP_GSCL, 16, 1),
1810d39e55e0SRahul Sharma 	MUX(TOP_MOUT_ACLK_GSCL_FIMC, "mout_aclk_gscl_fimc",
1811d39e55e0SRahul Sharma 			mout_aclk_gscl_fimc_p,
1812d39e55e0SRahul Sharma 			MUX_SEL_TOP_GSCL, 20, 1),
1813d39e55e0SRahul Sharma };
1814d39e55e0SRahul Sharma 
1815d39e55e0SRahul Sharma struct samsung_div_clock top_div_clks[] __initdata = {
1816d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_G2D_333, "dout_aclk_g2d_333", "mout_aclk_g2d_333",
1817d39e55e0SRahul Sharma 			DIV_TOP_G2D_MFC, 0, 3),
1818d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_MFC_333, "dout_aclk_mfc_333", "mout_aclk_mfc_333",
1819d39e55e0SRahul Sharma 			DIV_TOP_G2D_MFC, 4, 3),
1820d39e55e0SRahul Sharma 
1821d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_GSCL_333, "dout_aclk_gscl_333", "mout_aclk_gscl_333",
1822d39e55e0SRahul Sharma 			DIV_TOP_GSCL_ISP0, 0, 3),
1823d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_GSCL_400, "dout_aclk_gscl_400", "mout_aclk_gscl_400",
1824d39e55e0SRahul Sharma 			DIV_TOP_GSCL_ISP0, 4, 3),
1825d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_GSCL_FIMC, "dout_aclk_gscl_fimc",
1826d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc", DIV_TOP_GSCL_ISP0, 8, 3),
1827d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SENSOR0_A, "dout_sclk_isp1_sensor0_a",
1828d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc", DIV_TOP_GSCL_ISP0, 16, 4),
1829d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SENSOR1_A, "dout_sclk_isp1_sensor1_a",
1830d39e55e0SRahul Sharma 			"mout_aclk_gscl_400", DIV_TOP_GSCL_ISP0, 20, 4),
1831d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SENSOR2_A, "dout_sclk_isp1_sensor2_a",
1832d39e55e0SRahul Sharma 			"mout_aclk_gscl_fimc", DIV_TOP_GSCL_ISP0, 24, 4),
1833d39e55e0SRahul Sharma 
1834d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_ISP1_266, "dout_aclk_isp1_266", "mout_aclk_isp1_266",
1835d39e55e0SRahul Sharma 			DIV_TOP_ISP10, 0, 3),
1836d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_ISP1_400, "dout_aclk_isp1_400", "mout_aclk_isp1_400",
1837d39e55e0SRahul Sharma 			DIV_TOP_ISP10, 4, 3),
1838d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SPI0_A, "dout_sclk_isp1_spi0_a",
1839d39e55e0SRahul Sharma 			"mout_sclk_isp1_spi0", DIV_TOP_ISP10, 12, 4),
1840d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SPI0_B, "dout_sclk_isp1_spi0_b",
1841d39e55e0SRahul Sharma 			"dout_sclk_isp1_spi0_a", DIV_TOP_ISP10, 16, 8),
1842d39e55e0SRahul Sharma 
1843d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SPI1_A, "dout_sclk_isp1_spi1_a",
1844d39e55e0SRahul Sharma 			"mout_sclk_isp1_spi1", DIV_TOP_ISP11, 0, 4),
1845d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SPI1_B, "dout_sclk_isp1_spi1_b",
1846d39e55e0SRahul Sharma 			"dout_sclk_isp1_spi1_a", DIV_TOP_ISP11, 4, 8),
1847d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_UART, "dout_sclk_isp1_uart",
1848d39e55e0SRahul Sharma 			"mout_sclk_isp1_uart", DIV_TOP_ISP11, 12, 4),
1849d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SENSOR0_B, "dout_sclk_isp1_sensor0_b",
1850d39e55e0SRahul Sharma 			"dout_sclk_isp1_sensor0_a", DIV_TOP_ISP11, 16, 4),
1851d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SENSOR1_B, "dout_sclk_isp1_sensor1_b",
1852d39e55e0SRahul Sharma 			"dout_sclk_isp1_sensor1_a", DIV_TOP_ISP11, 20, 4),
1853d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_ISP1_SENSOR2_B, "dout_sclk_isp1_sensor2_b",
1854d39e55e0SRahul Sharma 			"dout_sclk_isp1_sensor2_a", DIV_TOP_ISP11, 24, 4),
1855d39e55e0SRahul Sharma 
1856d39e55e0SRahul Sharma 	DIV(TOP_DOUTTOP__SCLK_HPM_TARGETCLK, "dout_sclk_hpm_targetclk",
1857d39e55e0SRahul Sharma 			"mout_bustop_pll_user", DIV_TOP_HPM, 0, 3),
1858d39e55e0SRahul Sharma 
1859d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_DISP_333, "dout_aclk_disp_333", "mout_aclk_disp_333",
1860d39e55e0SRahul Sharma 			DIV_TOP_DISP, 0, 3),
1861d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_DISP_222, "dout_aclk_disp_222", "mout_aclk_disp_222",
1862d39e55e0SRahul Sharma 			DIV_TOP_DISP, 4, 3),
1863d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_DISP_PIXEL, "dout_sclk_disp_pixel",
1864d39e55e0SRahul Sharma 			"mout_sclk_disp_pixel",	DIV_TOP_DISP, 8, 3),
1865d39e55e0SRahul Sharma 
1866d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS1_400, "dout_aclk_bus1_400",
1867d39e55e0SRahul Sharma 			"mout_bus1_bustop_400",	DIV_TOP_BUS, 0, 3),
1868d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS1_100, "dout_aclk_bus1_100",
1869d39e55e0SRahul Sharma 			"mout_bus1_bustop_100",	DIV_TOP_BUS, 4, 4),
1870d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS2_400, "dout_aclk_bus2_400",
1871d39e55e0SRahul Sharma 			"mout_bus2_bustop_400",	DIV_TOP_BUS, 8, 3),
1872d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS2_100, "dout_aclk_bus2_100",
1873d39e55e0SRahul Sharma 			"mout_bus2_bustop_100",	DIV_TOP_BUS, 12, 4),
1874d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS3_400, "dout_aclk_bus3_400",
1875d39e55e0SRahul Sharma 			"mout_bus3_bustop_400", DIV_TOP_BUS, 16, 3),
1876d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS3_100, "dout_aclk_bus3_100",
1877d39e55e0SRahul Sharma 			"mout_bus3_bustop_100",	DIV_TOP_BUS, 20, 4),
1878d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS4_400, "dout_aclk_bus4_400",
1879d39e55e0SRahul Sharma 			"mout_bus4_bustop_400",	DIV_TOP_BUS, 24, 3),
1880d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_BUS4_100, "dout_aclk_bus4_100",
1881d39e55e0SRahul Sharma 			"mout_bus4_bustop_100",	DIV_TOP_BUS, 28, 4),
1882d39e55e0SRahul Sharma 
1883d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_SPI0_A, "dout_sclk_peri_spi0_a",
1884d39e55e0SRahul Sharma 			"mout_sclk_peri_spi0_clk", DIV_TOP_PERI0, 4, 4),
1885d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_SPI0_B, "dout_sclk_peri_spi0_b",
1886d39e55e0SRahul Sharma 			"dout_sclk_peri_spi0_a", DIV_TOP_PERI0, 8, 8),
1887d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_SPI1_A, "dout_sclk_peri_spi1_a",
1888d39e55e0SRahul Sharma 			"mout_sclk_peri_spi1_clk", DIV_TOP_PERI0, 16, 4),
1889d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_SPI1_B, "dout_sclk_peri_spi1_b",
1890d39e55e0SRahul Sharma 			"dout_sclk_peri_spi1_a", DIV_TOP_PERI0, 20, 8),
1891d39e55e0SRahul Sharma 
1892d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_SPI2_A, "dout_sclk_peri_spi2_a",
1893d39e55e0SRahul Sharma 			"mout_sclk_peri_spi2_clk", DIV_TOP_PERI1, 0, 4),
1894d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_SPI2_B, "dout_sclk_peri_spi2_b",
1895d39e55e0SRahul Sharma 			"dout_sclk_peri_spi2_a", DIV_TOP_PERI1, 4, 8),
1896d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_UART1, "dout_sclk_peri_uart1",
1897d39e55e0SRahul Sharma 			"mout_sclk_peri_uart1_uclk", DIV_TOP_PERI1, 16, 4),
1898d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_UART2, "dout_sclk_peri_uart2",
1899d39e55e0SRahul Sharma 			"mout_sclk_peri_uart2_uclk", DIV_TOP_PERI1, 20, 4),
1900d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_PERI_UART0, "dout_sclk_peri_uart0",
1901d39e55e0SRahul Sharma 			"mout_sclk_peri_uart0_uclk", DIV_TOP_PERI1, 24, 4),
1902d39e55e0SRahul Sharma 
1903d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_PERI_66, "dout_aclk_peri_66", "mout_bustop_pll_user",
1904d39e55e0SRahul Sharma 			DIV_TOP_PERI2, 20, 4),
1905d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_PERI_AUD, "dout_aclk_peri_aud",
1906d39e55e0SRahul Sharma 			"mout_audtop_pll_user", DIV_TOP_PERI2, 24, 3),
1907d39e55e0SRahul Sharma 
1908d39e55e0SRahul Sharma 	DIV(TOP_DOUT_ACLK_FSYS_200, "dout_aclk_fsys_200",
1909d39e55e0SRahul Sharma 			"mout_bustop_pll_user", DIV_TOP_FSYS0, 0, 3),
1910d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_FSYS_USBDRD30_SUSPEND_CLK,
1911d39e55e0SRahul Sharma 			"dout_sclk_fsys_usbdrd30_suspend_clk",
1912d39e55e0SRahul Sharma 			"mout_sclk_fsys_usb", DIV_TOP_FSYS0, 4, 4),
1913d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_FSYS_MMC0_SDCLKIN_A, "dout_sclk_fsys_mmc0_sdclkin_a",
1914d39e55e0SRahul Sharma 			"mout_sclk_fsys_mmc0_sdclkin_b",
1915d39e55e0SRahul Sharma 			DIV_TOP_FSYS0, 12, 4),
1916d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_FSYS_MMC0_SDCLKIN_B, "dout_sclk_fsys_mmc0_sdclkin_b",
1917d39e55e0SRahul Sharma 			"dout_sclk_fsys_mmc0_sdclkin_a",
1918d39e55e0SRahul Sharma 			DIV_TOP_FSYS0, 16, 8),
1919d39e55e0SRahul Sharma 
1920d39e55e0SRahul Sharma 
1921d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_FSYS_MMC1_SDCLKIN_A, "dout_sclk_fsys_mmc1_sdclkin_a",
1922d39e55e0SRahul Sharma 			"mout_sclk_fsys_mmc1_sdclkin_b",
1923d39e55e0SRahul Sharma 			DIV_TOP_FSYS1, 0, 4),
1924d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_FSYS_MMC1_SDCLKIN_B, "dout_sclk_fsys_mmc1_sdclkin_b",
1925d39e55e0SRahul Sharma 			"dout_sclk_fsys_mmc1_sdclkin_a",
1926d39e55e0SRahul Sharma 			DIV_TOP_FSYS1, 4, 8),
1927d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_FSYS_MMC2_SDCLKIN_A, "dout_sclk_fsys_mmc2_sdclkin_a",
1928d39e55e0SRahul Sharma 			"mout_sclk_fsys_mmc2_sdclkin_b",
1929d39e55e0SRahul Sharma 			DIV_TOP_FSYS1, 12, 4),
1930d39e55e0SRahul Sharma 	DIV(TOP_DOUT_SCLK_FSYS_MMC2_SDCLKIN_B, "dout_sclk_fsys_mmc2_sdclkin_b",
1931d39e55e0SRahul Sharma 			"dout_sclk_fsys_mmc2_sdclkin_a",
1932d39e55e0SRahul Sharma 			DIV_TOP_FSYS1, 16, 8),
1933d39e55e0SRahul Sharma 
1934d39e55e0SRahul Sharma };
1935d39e55e0SRahul Sharma 
1936d39e55e0SRahul Sharma struct samsung_gate_clock top_gate_clks[] __initdata = {
1937d39e55e0SRahul Sharma 	GATE(TOP_SCLK_MMC0, "sclk_fsys_mmc0_sdclkin",
1938d39e55e0SRahul Sharma 			"dout_sclk_fsys_mmc0_sdclkin_b",
1939d39e55e0SRahul Sharma 			EN_SCLK_TOP, 7, CLK_SET_RATE_PARENT, 0),
1940d39e55e0SRahul Sharma 	GATE(TOP_SCLK_MMC1, "sclk_fsys_mmc1_sdclkin",
1941d39e55e0SRahul Sharma 			"dout_sclk_fsys_mmc1_sdclkin_b",
1942d39e55e0SRahul Sharma 			EN_SCLK_TOP, 8, CLK_SET_RATE_PARENT, 0),
1943d39e55e0SRahul Sharma 	GATE(TOP_SCLK_MMC2, "sclk_fsys_mmc2_sdclkin",
1944d39e55e0SRahul Sharma 			"dout_sclk_fsys_mmc2_sdclkin_b",
1945d39e55e0SRahul Sharma 			EN_SCLK_TOP, 9, CLK_SET_RATE_PARENT, 0),
1946d39e55e0SRahul Sharma 	GATE(TOP_SCLK_FIMD1, "sclk_disp_pixel", "dout_sclk_disp_pixel",
1947d39e55e0SRahul Sharma 			EN_ACLK_TOP, 10, CLK_IGNORE_UNUSED |
1948d39e55e0SRahul Sharma 			CLK_SET_RATE_PARENT, 0),
1949d39e55e0SRahul Sharma };
1950d39e55e0SRahul Sharma 
1951d39e55e0SRahul Sharma static struct samsung_pll_clock top_pll_clks[] __initdata = {
1952d39e55e0SRahul Sharma 	PLL(pll_2550xx, TOP_FOUT_DISP_PLL, "fout_disp_pll", "fin_pll",
1953d39e55e0SRahul Sharma 		DISP_PLL_LOCK, DISP_PLL_CON0,
1954d39e55e0SRahul Sharma 		pll2550_24mhz_tbl),
1955d39e55e0SRahul Sharma 	PLL(pll_2650xx, TOP_FOUT_AUD_PLL, "fout_aud_pll", "fin_pll",
1956d39e55e0SRahul Sharma 		AUD_PLL_LOCK, AUD_PLL_CON0,
1957d39e55e0SRahul Sharma 		pll2650_24mhz_tbl),
1958d39e55e0SRahul Sharma };
1959d39e55e0SRahul Sharma 
1960d39e55e0SRahul Sharma static void __init exynos5260_clk_top_init(struct device_node *np)
1961d39e55e0SRahul Sharma {
1962d39e55e0SRahul Sharma 	struct exynos5260_cmu_info cmu = {0};
1963d39e55e0SRahul Sharma 
1964d39e55e0SRahul Sharma 	cmu.pll_clks = top_pll_clks;
1965d39e55e0SRahul Sharma 	cmu.nr_pll_clks =  ARRAY_SIZE(top_pll_clks);
1966d39e55e0SRahul Sharma 	cmu.mux_clks = top_mux_clks;
1967d39e55e0SRahul Sharma 	cmu.nr_mux_clks = ARRAY_SIZE(top_mux_clks);
1968d39e55e0SRahul Sharma 	cmu.div_clks = top_div_clks;
1969d39e55e0SRahul Sharma 	cmu.nr_div_clks = ARRAY_SIZE(top_div_clks);
1970d39e55e0SRahul Sharma 	cmu.gate_clks = top_gate_clks;
1971d39e55e0SRahul Sharma 	cmu.nr_gate_clks = ARRAY_SIZE(top_gate_clks);
1972d39e55e0SRahul Sharma 	cmu.fixed_clks = fixed_rate_clks;
1973d39e55e0SRahul Sharma 	cmu.nr_fixed_clks = ARRAY_SIZE(fixed_rate_clks);
1974d39e55e0SRahul Sharma 	cmu.nr_clk_ids = TOP_NR_CLK;
1975d39e55e0SRahul Sharma 	cmu.clk_regs = top_clk_regs;
1976d39e55e0SRahul Sharma 	cmu.nr_clk_regs = ARRAY_SIZE(top_clk_regs);
1977d39e55e0SRahul Sharma 
1978d39e55e0SRahul Sharma 	exynos5260_cmu_register_one(np, &cmu);
1979d39e55e0SRahul Sharma }
1980d39e55e0SRahul Sharma 
1981d39e55e0SRahul Sharma CLK_OF_DECLARE(exynos5260_clk_top, "samsung,exynos5260-clock-top",
1982d39e55e0SRahul Sharma 		exynos5260_clk_top_init);
1983