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