14f346005SAlim Akhtar // SPDX-License-Identifier: GPL-2.0-only
24f346005SAlim Akhtar /*
34f346005SAlim Akhtar * Copyright (c) 2017-2022 Samsung Electronics Co., Ltd.
44f346005SAlim Akhtar * https://www.samsung.com
54f346005SAlim Akhtar * Copyright (c) 2017-2022 Tesla, Inc.
64f346005SAlim Akhtar * https://www.tesla.com
74f346005SAlim Akhtar *
84f346005SAlim Akhtar * Common Clock Framework support for FSD SoC.
94f346005SAlim Akhtar */
104f346005SAlim Akhtar
11e3f3dc38SAlim Akhtar #include <linux/clk.h>
124f346005SAlim Akhtar #include <linux/clk-provider.h>
134f346005SAlim Akhtar #include <linux/init.h>
144f346005SAlim Akhtar #include <linux/kernel.h>
154f346005SAlim Akhtar #include <linux/of.h>
16e3f3dc38SAlim Akhtar #include <linux/platform_device.h>
174f346005SAlim Akhtar
184f346005SAlim Akhtar #include <dt-bindings/clock/fsd-clk.h>
194f346005SAlim Akhtar
204f346005SAlim Akhtar #include "clk.h"
21e3f3dc38SAlim Akhtar #include "clk-exynos-arm64.h"
224f346005SAlim Akhtar
234f346005SAlim Akhtar /* Register Offset definitions for CMU_CMU (0x11c10000) */
244f346005SAlim Akhtar #define PLL_LOCKTIME_PLL_SHARED0 0x0
254f346005SAlim Akhtar #define PLL_LOCKTIME_PLL_SHARED1 0x4
264f346005SAlim Akhtar #define PLL_LOCKTIME_PLL_SHARED2 0x8
274f346005SAlim Akhtar #define PLL_LOCKTIME_PLL_SHARED3 0xc
284f346005SAlim Akhtar #define PLL_CON0_PLL_SHARED0 0x100
294f346005SAlim Akhtar #define PLL_CON0_PLL_SHARED1 0x120
304f346005SAlim Akhtar #define PLL_CON0_PLL_SHARED2 0x140
314f346005SAlim Akhtar #define PLL_CON0_PLL_SHARED3 0x160
324f346005SAlim Akhtar #define MUX_CMU_CIS0_CLKMUX 0x1000
334f346005SAlim Akhtar #define MUX_CMU_CIS1_CLKMUX 0x1004
344f346005SAlim Akhtar #define MUX_CMU_CIS2_CLKMUX 0x1008
354f346005SAlim Akhtar #define MUX_CMU_CPUCL_SWITCHMUX 0x100c
364f346005SAlim Akhtar #define MUX_CMU_FSYS1_ACLK_MUX 0x1014
374f346005SAlim Akhtar #define MUX_PLL_SHARED0_MUX 0x1020
384f346005SAlim Akhtar #define MUX_PLL_SHARED1_MUX 0x1024
394f346005SAlim Akhtar #define DIV_CMU_CIS0_CLK 0x1800
404f346005SAlim Akhtar #define DIV_CMU_CIS1_CLK 0x1804
414f346005SAlim Akhtar #define DIV_CMU_CIS2_CLK 0x1808
424f346005SAlim Akhtar #define DIV_CMU_CMU_ACLK 0x180c
434f346005SAlim Akhtar #define DIV_CMU_CPUCL_SWITCH 0x1810
444f346005SAlim Akhtar #define DIV_CMU_FSYS0_SHARED0DIV4 0x181c
454f346005SAlim Akhtar #define DIV_CMU_FSYS0_SHARED1DIV3 0x1820
464f346005SAlim Akhtar #define DIV_CMU_FSYS0_SHARED1DIV4 0x1824
474f346005SAlim Akhtar #define DIV_CMU_FSYS1_SHARED0DIV4 0x1828
484f346005SAlim Akhtar #define DIV_CMU_FSYS1_SHARED0DIV8 0x182c
494f346005SAlim Akhtar #define DIV_CMU_IMEM_ACLK 0x1834
504f346005SAlim Akhtar #define DIV_CMU_IMEM_DMACLK 0x1838
514f346005SAlim Akhtar #define DIV_CMU_IMEM_TCUCLK 0x183c
524f346005SAlim Akhtar #define DIV_CMU_PERIC_SHARED0DIV20 0x1844
534f346005SAlim Akhtar #define DIV_CMU_PERIC_SHARED0DIV3_TBUCLK 0x1848
544f346005SAlim Akhtar #define DIV_CMU_PERIC_SHARED1DIV36 0x184c
554f346005SAlim Akhtar #define DIV_CMU_PERIC_SHARED1DIV4_DMACLK 0x1850
564f346005SAlim Akhtar #define DIV_PLL_SHARED0_DIV2 0x1858
574f346005SAlim Akhtar #define DIV_PLL_SHARED0_DIV3 0x185c
584f346005SAlim Akhtar #define DIV_PLL_SHARED0_DIV4 0x1860
594f346005SAlim Akhtar #define DIV_PLL_SHARED0_DIV6 0x1864
604f346005SAlim Akhtar #define DIV_PLL_SHARED1_DIV3 0x1868
614f346005SAlim Akhtar #define DIV_PLL_SHARED1_DIV36 0x186c
624f346005SAlim Akhtar #define DIV_PLL_SHARED1_DIV4 0x1870
634f346005SAlim Akhtar #define DIV_PLL_SHARED1_DIV9 0x1874
644f346005SAlim Akhtar #define GAT_CMU_CIS0_CLKGATE 0x2000
654f346005SAlim Akhtar #define GAT_CMU_CIS1_CLKGATE 0x2004
664f346005SAlim Akhtar #define GAT_CMU_CIS2_CLKGATE 0x2008
674f346005SAlim Akhtar #define GAT_CMU_CPUCL_SWITCH_GATE 0x200c
684f346005SAlim Akhtar #define GAT_CMU_FSYS0_SHARED0DIV4_GATE 0x2018
694f346005SAlim Akhtar #define GAT_CMU_FSYS0_SHARED1DIV4_CLK 0x201c
704f346005SAlim Akhtar #define GAT_CMU_FSYS0_SHARED1DIV4_GATE 0x2020
714f346005SAlim Akhtar #define GAT_CMU_FSYS1_SHARED0DIV4_GATE 0x2024
724f346005SAlim Akhtar #define GAT_CMU_FSYS1_SHARED1DIV4_GATE 0x2028
734f346005SAlim Akhtar #define GAT_CMU_IMEM_ACLK_GATE 0x2030
744f346005SAlim Akhtar #define GAT_CMU_IMEM_DMACLK_GATE 0x2034
754f346005SAlim Akhtar #define GAT_CMU_IMEM_TCUCLK_GATE 0x2038
764f346005SAlim Akhtar #define GAT_CMU_PERIC_SHARED0DIVE3_TBUCLK_GATE 0x2040
774f346005SAlim Akhtar #define GAT_CMU_PERIC_SHARED0DIVE4_GATE 0x2044
784f346005SAlim Akhtar #define GAT_CMU_PERIC_SHARED1DIV4_DMACLK_GATE 0x2048
794f346005SAlim Akhtar #define GAT_CMU_PERIC_SHARED1DIVE4_GATE 0x204c
804f346005SAlim Akhtar #define GAT_CMU_CMU_CMU_IPCLKPORT_PCLK 0x2054
814f346005SAlim Akhtar #define GAT_CMU_AXI2APB_CMU_IPCLKPORT_ACLK 0x2058
824f346005SAlim Akhtar #define GAT_CMU_NS_BRDG_CMU_IPCLKPORT_CLK__PSOC_CMU__CLK_CMU 0x205c
834f346005SAlim Akhtar #define GAT_CMU_SYSREG_CMU_IPCLKPORT_PCLK 0x2060
844f346005SAlim Akhtar
854f346005SAlim Akhtar static const unsigned long cmu_clk_regs[] __initconst = {
864f346005SAlim Akhtar PLL_LOCKTIME_PLL_SHARED0,
874f346005SAlim Akhtar PLL_LOCKTIME_PLL_SHARED1,
884f346005SAlim Akhtar PLL_LOCKTIME_PLL_SHARED2,
894f346005SAlim Akhtar PLL_LOCKTIME_PLL_SHARED3,
904f346005SAlim Akhtar PLL_CON0_PLL_SHARED0,
914f346005SAlim Akhtar PLL_CON0_PLL_SHARED1,
924f346005SAlim Akhtar PLL_CON0_PLL_SHARED2,
934f346005SAlim Akhtar PLL_CON0_PLL_SHARED3,
944f346005SAlim Akhtar MUX_CMU_CIS0_CLKMUX,
954f346005SAlim Akhtar MUX_CMU_CIS1_CLKMUX,
964f346005SAlim Akhtar MUX_CMU_CIS2_CLKMUX,
974f346005SAlim Akhtar MUX_CMU_CPUCL_SWITCHMUX,
984f346005SAlim Akhtar MUX_CMU_FSYS1_ACLK_MUX,
994f346005SAlim Akhtar MUX_PLL_SHARED0_MUX,
1004f346005SAlim Akhtar MUX_PLL_SHARED1_MUX,
1014f346005SAlim Akhtar DIV_CMU_CIS0_CLK,
1024f346005SAlim Akhtar DIV_CMU_CIS1_CLK,
1034f346005SAlim Akhtar DIV_CMU_CIS2_CLK,
1044f346005SAlim Akhtar DIV_CMU_CMU_ACLK,
1054f346005SAlim Akhtar DIV_CMU_CPUCL_SWITCH,
1064f346005SAlim Akhtar DIV_CMU_FSYS0_SHARED0DIV4,
1074f346005SAlim Akhtar DIV_CMU_FSYS0_SHARED1DIV3,
1084f346005SAlim Akhtar DIV_CMU_FSYS0_SHARED1DIV4,
1094f346005SAlim Akhtar DIV_CMU_FSYS1_SHARED0DIV4,
1104f346005SAlim Akhtar DIV_CMU_FSYS1_SHARED0DIV8,
1114f346005SAlim Akhtar DIV_CMU_IMEM_ACLK,
1124f346005SAlim Akhtar DIV_CMU_IMEM_DMACLK,
1134f346005SAlim Akhtar DIV_CMU_IMEM_TCUCLK,
1144f346005SAlim Akhtar DIV_CMU_PERIC_SHARED0DIV20,
1154f346005SAlim Akhtar DIV_CMU_PERIC_SHARED0DIV3_TBUCLK,
1164f346005SAlim Akhtar DIV_CMU_PERIC_SHARED1DIV36,
1174f346005SAlim Akhtar DIV_CMU_PERIC_SHARED1DIV4_DMACLK,
1184f346005SAlim Akhtar DIV_PLL_SHARED0_DIV2,
1194f346005SAlim Akhtar DIV_PLL_SHARED0_DIV3,
1204f346005SAlim Akhtar DIV_PLL_SHARED0_DIV4,
1214f346005SAlim Akhtar DIV_PLL_SHARED0_DIV6,
1224f346005SAlim Akhtar DIV_PLL_SHARED1_DIV3,
1234f346005SAlim Akhtar DIV_PLL_SHARED1_DIV36,
1244f346005SAlim Akhtar DIV_PLL_SHARED1_DIV4,
1254f346005SAlim Akhtar DIV_PLL_SHARED1_DIV9,
1264f346005SAlim Akhtar GAT_CMU_CIS0_CLKGATE,
1274f346005SAlim Akhtar GAT_CMU_CIS1_CLKGATE,
1284f346005SAlim Akhtar GAT_CMU_CIS2_CLKGATE,
1294f346005SAlim Akhtar GAT_CMU_CPUCL_SWITCH_GATE,
1304f346005SAlim Akhtar GAT_CMU_FSYS0_SHARED0DIV4_GATE,
1314f346005SAlim Akhtar GAT_CMU_FSYS0_SHARED1DIV4_CLK,
1324f346005SAlim Akhtar GAT_CMU_FSYS0_SHARED1DIV4_GATE,
1334f346005SAlim Akhtar GAT_CMU_FSYS1_SHARED0DIV4_GATE,
1344f346005SAlim Akhtar GAT_CMU_FSYS1_SHARED1DIV4_GATE,
1354f346005SAlim Akhtar GAT_CMU_IMEM_ACLK_GATE,
1364f346005SAlim Akhtar GAT_CMU_IMEM_DMACLK_GATE,
1374f346005SAlim Akhtar GAT_CMU_IMEM_TCUCLK_GATE,
1384f346005SAlim Akhtar GAT_CMU_PERIC_SHARED0DIVE3_TBUCLK_GATE,
1394f346005SAlim Akhtar GAT_CMU_PERIC_SHARED0DIVE4_GATE,
1404f346005SAlim Akhtar GAT_CMU_PERIC_SHARED1DIV4_DMACLK_GATE,
1414f346005SAlim Akhtar GAT_CMU_PERIC_SHARED1DIVE4_GATE,
1424f346005SAlim Akhtar GAT_CMU_CMU_CMU_IPCLKPORT_PCLK,
1434f346005SAlim Akhtar GAT_CMU_AXI2APB_CMU_IPCLKPORT_ACLK,
1444f346005SAlim Akhtar GAT_CMU_NS_BRDG_CMU_IPCLKPORT_CLK__PSOC_CMU__CLK_CMU,
1454f346005SAlim Akhtar GAT_CMU_SYSREG_CMU_IPCLKPORT_PCLK,
1464f346005SAlim Akhtar };
1474f346005SAlim Akhtar
1484f346005SAlim Akhtar static const struct samsung_pll_rate_table pll_shared0_rate_table[] __initconst = {
1494f346005SAlim Akhtar PLL_35XX_RATE(24 * MHZ, 2000000000U, 250, 3, 0),
1504f346005SAlim Akhtar };
1514f346005SAlim Akhtar
1524f346005SAlim Akhtar static const struct samsung_pll_rate_table pll_shared1_rate_table[] __initconst = {
1534f346005SAlim Akhtar PLL_35XX_RATE(24 * MHZ, 2400000000U, 200, 2, 0),
1544f346005SAlim Akhtar };
1554f346005SAlim Akhtar
1564f346005SAlim Akhtar static const struct samsung_pll_rate_table pll_shared2_rate_table[] __initconst = {
1574f346005SAlim Akhtar PLL_35XX_RATE(24 * MHZ, 2400000000U, 200, 2, 0),
1584f346005SAlim Akhtar };
1594f346005SAlim Akhtar
1604f346005SAlim Akhtar static const struct samsung_pll_rate_table pll_shared3_rate_table[] __initconst = {
1614f346005SAlim Akhtar PLL_35XX_RATE(24 * MHZ, 1800000000U, 150, 2, 0),
1624f346005SAlim Akhtar };
1634f346005SAlim Akhtar
1644f346005SAlim Akhtar static const struct samsung_pll_clock cmu_pll_clks[] __initconst = {
1654f346005SAlim Akhtar PLL(pll_142xx, 0, "fout_pll_shared0", "fin_pll", PLL_LOCKTIME_PLL_SHARED0,
1664f346005SAlim Akhtar PLL_CON0_PLL_SHARED0, pll_shared0_rate_table),
1674f346005SAlim Akhtar PLL(pll_142xx, 0, "fout_pll_shared1", "fin_pll", PLL_LOCKTIME_PLL_SHARED1,
1684f346005SAlim Akhtar PLL_CON0_PLL_SHARED1, pll_shared1_rate_table),
1694f346005SAlim Akhtar PLL(pll_142xx, 0, "fout_pll_shared2", "fin_pll", PLL_LOCKTIME_PLL_SHARED2,
1704f346005SAlim Akhtar PLL_CON0_PLL_SHARED2, pll_shared2_rate_table),
1714f346005SAlim Akhtar PLL(pll_142xx, 0, "fout_pll_shared3", "fin_pll", PLL_LOCKTIME_PLL_SHARED3,
1724f346005SAlim Akhtar PLL_CON0_PLL_SHARED3, pll_shared3_rate_table),
1734f346005SAlim Akhtar };
1744f346005SAlim Akhtar
1754f346005SAlim Akhtar /* List of parent clocks for Muxes in CMU_CMU */
1764f346005SAlim Akhtar PNAME(mout_cmu_shared0_pll_p) = { "fin_pll", "fout_pll_shared0" };
1774f346005SAlim Akhtar PNAME(mout_cmu_shared1_pll_p) = { "fin_pll", "fout_pll_shared1" };
1784f346005SAlim Akhtar PNAME(mout_cmu_shared2_pll_p) = { "fin_pll", "fout_pll_shared2" };
1794f346005SAlim Akhtar PNAME(mout_cmu_shared3_pll_p) = { "fin_pll", "fout_pll_shared3" };
1804f346005SAlim Akhtar PNAME(mout_cmu_cis0_clkmux_p) = { "fin_pll", "dout_cmu_pll_shared0_div4" };
1814f346005SAlim Akhtar PNAME(mout_cmu_cis1_clkmux_p) = { "fin_pll", "dout_cmu_pll_shared0_div4" };
1824f346005SAlim Akhtar PNAME(mout_cmu_cis2_clkmux_p) = { "fin_pll", "dout_cmu_pll_shared0_div4" };
1834f346005SAlim Akhtar PNAME(mout_cmu_cpucl_switchmux_p) = { "mout_cmu_pll_shared2", "mout_cmu_pll_shared0_mux" };
1844f346005SAlim Akhtar PNAME(mout_cmu_fsys1_aclk_mux_p) = { "dout_cmu_pll_shared0_div4", "fin_pll" };
1854f346005SAlim Akhtar PNAME(mout_cmu_pll_shared0_mux_p) = { "fin_pll", "mout_cmu_pll_shared0" };
1864f346005SAlim Akhtar PNAME(mout_cmu_pll_shared1_mux_p) = { "fin_pll", "mout_cmu_pll_shared1" };
1874f346005SAlim Akhtar
1884f346005SAlim Akhtar static const struct samsung_mux_clock cmu_mux_clks[] __initconst = {
1894f346005SAlim Akhtar MUX(0, "mout_cmu_pll_shared0", mout_cmu_shared0_pll_p, PLL_CON0_PLL_SHARED0, 4, 1),
1904f346005SAlim Akhtar MUX(0, "mout_cmu_pll_shared1", mout_cmu_shared1_pll_p, PLL_CON0_PLL_SHARED1, 4, 1),
1914f346005SAlim Akhtar MUX(0, "mout_cmu_pll_shared2", mout_cmu_shared2_pll_p, PLL_CON0_PLL_SHARED2, 4, 1),
1924f346005SAlim Akhtar MUX(0, "mout_cmu_pll_shared3", mout_cmu_shared3_pll_p, PLL_CON0_PLL_SHARED3, 4, 1),
1934f346005SAlim Akhtar MUX(0, "mout_cmu_cis0_clkmux", mout_cmu_cis0_clkmux_p, MUX_CMU_CIS0_CLKMUX, 0, 1),
1944f346005SAlim Akhtar MUX(0, "mout_cmu_cis1_clkmux", mout_cmu_cis1_clkmux_p, MUX_CMU_CIS1_CLKMUX, 0, 1),
1954f346005SAlim Akhtar MUX(0, "mout_cmu_cis2_clkmux", mout_cmu_cis2_clkmux_p, MUX_CMU_CIS2_CLKMUX, 0, 1),
1964f346005SAlim Akhtar MUX(0, "mout_cmu_cpucl_switchmux", mout_cmu_cpucl_switchmux_p,
1974f346005SAlim Akhtar MUX_CMU_CPUCL_SWITCHMUX, 0, 1),
1984f346005SAlim Akhtar MUX(0, "mout_cmu_fsys1_aclk_mux", mout_cmu_fsys1_aclk_mux_p, MUX_CMU_FSYS1_ACLK_MUX, 0, 1),
1994f346005SAlim Akhtar MUX(0, "mout_cmu_pll_shared0_mux", mout_cmu_pll_shared0_mux_p, MUX_PLL_SHARED0_MUX, 0, 1),
2004f346005SAlim Akhtar MUX(0, "mout_cmu_pll_shared1_mux", mout_cmu_pll_shared1_mux_p, MUX_PLL_SHARED1_MUX, 0, 1),
2014f346005SAlim Akhtar };
2024f346005SAlim Akhtar
2034f346005SAlim Akhtar static const struct samsung_div_clock cmu_div_clks[] __initconst = {
2044f346005SAlim Akhtar DIV(0, "dout_cmu_cis0_clk", "cmu_cis0_clkgate", DIV_CMU_CIS0_CLK, 0, 4),
2054f346005SAlim Akhtar DIV(0, "dout_cmu_cis1_clk", "cmu_cis1_clkgate", DIV_CMU_CIS1_CLK, 0, 4),
2064f346005SAlim Akhtar DIV(0, "dout_cmu_cis2_clk", "cmu_cis2_clkgate", DIV_CMU_CIS2_CLK, 0, 4),
2074f346005SAlim Akhtar DIV(0, "dout_cmu_cmu_aclk", "dout_cmu_pll_shared1_div9", DIV_CMU_CMU_ACLK, 0, 4),
2084f346005SAlim Akhtar DIV(0, "dout_cmu_cpucl_switch", "cmu_cpucl_switch_gate", DIV_CMU_CPUCL_SWITCH, 0, 4),
2094f346005SAlim Akhtar DIV(DOUT_CMU_FSYS0_SHARED0DIV4, "dout_cmu_fsys0_shared0div4", "cmu_fsys0_shared0div4_gate",
2104f346005SAlim Akhtar DIV_CMU_FSYS0_SHARED0DIV4, 0, 4),
2114f346005SAlim Akhtar DIV(0, "dout_cmu_fsys0_shared1div3", "cmu_fsys0_shared1div4_clk",
2124f346005SAlim Akhtar DIV_CMU_FSYS0_SHARED1DIV3, 0, 4),
2134f346005SAlim Akhtar DIV(DOUT_CMU_FSYS0_SHARED1DIV4, "dout_cmu_fsys0_shared1div4", "cmu_fsys0_shared1div4_gate",
2144f346005SAlim Akhtar DIV_CMU_FSYS0_SHARED1DIV4, 0, 4),
2154f346005SAlim Akhtar DIV(DOUT_CMU_FSYS1_SHARED0DIV4, "dout_cmu_fsys1_shared0div4", "cmu_fsys1_shared0div4_gate",
2164f346005SAlim Akhtar DIV_CMU_FSYS1_SHARED0DIV4, 0, 4),
2174f346005SAlim Akhtar DIV(DOUT_CMU_FSYS1_SHARED0DIV8, "dout_cmu_fsys1_shared0div8", "cmu_fsys1_shared1div4_gate",
2184f346005SAlim Akhtar DIV_CMU_FSYS1_SHARED0DIV8, 0, 4),
2194f346005SAlim Akhtar DIV(DOUT_CMU_IMEM_ACLK, "dout_cmu_imem_aclk", "cmu_imem_aclk_gate",
2204f346005SAlim Akhtar DIV_CMU_IMEM_ACLK, 0, 4),
2214f346005SAlim Akhtar DIV(DOUT_CMU_IMEM_DMACLK, "dout_cmu_imem_dmaclk", "cmu_imem_dmaclk_gate",
2224f346005SAlim Akhtar DIV_CMU_IMEM_DMACLK, 0, 4),
2234f346005SAlim Akhtar DIV(DOUT_CMU_IMEM_TCUCLK, "dout_cmu_imem_tcuclk", "cmu_imem_tcuclk_gate",
2244f346005SAlim Akhtar DIV_CMU_IMEM_TCUCLK, 0, 4),
2254f346005SAlim Akhtar DIV(DOUT_CMU_PERIC_SHARED0DIV20, "dout_cmu_peric_shared0div20",
2264f346005SAlim Akhtar "cmu_peric_shared0dive4_gate", DIV_CMU_PERIC_SHARED0DIV20, 0, 4),
2274f346005SAlim Akhtar DIV(DOUT_CMU_PERIC_SHARED0DIV3_TBUCLK, "dout_cmu_peric_shared0div3_tbuclk",
2284f346005SAlim Akhtar "cmu_peric_shared0dive3_tbuclk_gate", DIV_CMU_PERIC_SHARED0DIV3_TBUCLK, 0, 4),
2294f346005SAlim Akhtar DIV(DOUT_CMU_PERIC_SHARED1DIV36, "dout_cmu_peric_shared1div36",
2304f346005SAlim Akhtar "cmu_peric_shared1dive4_gate", DIV_CMU_PERIC_SHARED1DIV36, 0, 4),
2314f346005SAlim Akhtar DIV(DOUT_CMU_PERIC_SHARED1DIV4_DMACLK, "dout_cmu_peric_shared1div4_dmaclk",
2324f346005SAlim Akhtar "cmu_peric_shared1div4_dmaclk_gate", DIV_CMU_PERIC_SHARED1DIV4_DMACLK, 0, 4),
2334f346005SAlim Akhtar DIV(0, "dout_cmu_pll_shared0_div2", "mout_cmu_pll_shared0_mux",
2344f346005SAlim Akhtar DIV_PLL_SHARED0_DIV2, 0, 4),
2354f346005SAlim Akhtar DIV(0, "dout_cmu_pll_shared0_div3", "mout_cmu_pll_shared0_mux",
2364f346005SAlim Akhtar DIV_PLL_SHARED0_DIV3, 0, 4),
2374f346005SAlim Akhtar DIV(DOUT_CMU_PLL_SHARED0_DIV4, "dout_cmu_pll_shared0_div4", "dout_cmu_pll_shared0_div2",
2384f346005SAlim Akhtar DIV_PLL_SHARED0_DIV4, 0, 4),
2394f346005SAlim Akhtar DIV(DOUT_CMU_PLL_SHARED0_DIV6, "dout_cmu_pll_shared0_div6", "dout_cmu_pll_shared0_div3",
2404f346005SAlim Akhtar DIV_PLL_SHARED0_DIV6, 0, 4),
2414f346005SAlim Akhtar DIV(0, "dout_cmu_pll_shared1_div3", "mout_cmu_pll_shared1_mux",
2424f346005SAlim Akhtar DIV_PLL_SHARED1_DIV3, 0, 4),
2434f346005SAlim Akhtar DIV(0, "dout_cmu_pll_shared1_div36", "dout_cmu_pll_shared1_div9",
2444f346005SAlim Akhtar DIV_PLL_SHARED1_DIV36, 0, 4),
2454f346005SAlim Akhtar DIV(0, "dout_cmu_pll_shared1_div4", "mout_cmu_pll_shared1_mux",
2464f346005SAlim Akhtar DIV_PLL_SHARED1_DIV4, 0, 4),
2474f346005SAlim Akhtar DIV(0, "dout_cmu_pll_shared1_div9", "dout_cmu_pll_shared1_div3",
2484f346005SAlim Akhtar DIV_PLL_SHARED1_DIV9, 0, 4),
2494f346005SAlim Akhtar };
2504f346005SAlim Akhtar
2514f346005SAlim Akhtar static const struct samsung_gate_clock cmu_gate_clks[] __initconst = {
2524f346005SAlim Akhtar GATE(0, "cmu_cis0_clkgate", "mout_cmu_cis0_clkmux", GAT_CMU_CIS0_CLKGATE, 21,
2534f346005SAlim Akhtar CLK_IGNORE_UNUSED, 0),
2544f346005SAlim Akhtar GATE(0, "cmu_cis1_clkgate", "mout_cmu_cis1_clkmux", GAT_CMU_CIS1_CLKGATE, 21,
2554f346005SAlim Akhtar CLK_IGNORE_UNUSED, 0),
2564f346005SAlim Akhtar GATE(0, "cmu_cis2_clkgate", "mout_cmu_cis2_clkmux", GAT_CMU_CIS2_CLKGATE, 21,
2574f346005SAlim Akhtar CLK_IGNORE_UNUSED, 0),
2584f346005SAlim Akhtar GATE(CMU_CPUCL_SWITCH_GATE, "cmu_cpucl_switch_gate", "mout_cmu_cpucl_switchmux",
2594f346005SAlim Akhtar GAT_CMU_CPUCL_SWITCH_GATE, 21, CLK_IGNORE_UNUSED, 0),
2604f346005SAlim Akhtar GATE(GAT_CMU_FSYS0_SHARED0DIV4, "cmu_fsys0_shared0div4_gate", "dout_cmu_pll_shared0_div4",
2614f346005SAlim Akhtar GAT_CMU_FSYS0_SHARED0DIV4_GATE, 21, CLK_IGNORE_UNUSED, 0),
2624f346005SAlim Akhtar GATE(0, "cmu_fsys0_shared1div4_clk", "dout_cmu_pll_shared1_div3",
2634f346005SAlim Akhtar GAT_CMU_FSYS0_SHARED1DIV4_CLK, 21, CLK_IGNORE_UNUSED, 0),
2644f346005SAlim Akhtar GATE(0, "cmu_fsys0_shared1div4_gate", "dout_cmu_pll_shared1_div4",
2654f346005SAlim Akhtar GAT_CMU_FSYS0_SHARED1DIV4_GATE, 21, CLK_IGNORE_UNUSED, 0),
2664f346005SAlim Akhtar GATE(0, "cmu_fsys1_shared0div4_gate", "mout_cmu_fsys1_aclk_mux",
2674f346005SAlim Akhtar GAT_CMU_FSYS1_SHARED0DIV4_GATE, 21, CLK_IGNORE_UNUSED, 0),
2684f346005SAlim Akhtar GATE(0, "cmu_fsys1_shared1div4_gate", "dout_cmu_fsys1_shared0div4",
2694f346005SAlim Akhtar GAT_CMU_FSYS1_SHARED1DIV4_GATE, 21, CLK_IGNORE_UNUSED, 0),
2704f346005SAlim Akhtar GATE(0, "cmu_imem_aclk_gate", "dout_cmu_pll_shared1_div9", GAT_CMU_IMEM_ACLK_GATE, 21,
2714f346005SAlim Akhtar CLK_IGNORE_UNUSED, 0),
2724f346005SAlim Akhtar GATE(0, "cmu_imem_dmaclk_gate", "mout_cmu_pll_shared1_mux", GAT_CMU_IMEM_DMACLK_GATE, 21,
2734f346005SAlim Akhtar CLK_IGNORE_UNUSED, 0),
2744f346005SAlim Akhtar GATE(0, "cmu_imem_tcuclk_gate", "dout_cmu_pll_shared0_div3", GAT_CMU_IMEM_TCUCLK_GATE, 21,
2754f346005SAlim Akhtar CLK_IGNORE_UNUSED, 0),
2764f346005SAlim Akhtar GATE(0, "cmu_peric_shared0dive3_tbuclk_gate", "dout_cmu_pll_shared0_div3",
2774f346005SAlim Akhtar GAT_CMU_PERIC_SHARED0DIVE3_TBUCLK_GATE, 21, CLK_IGNORE_UNUSED, 0),
2784f346005SAlim Akhtar GATE(0, "cmu_peric_shared0dive4_gate", "dout_cmu_pll_shared0_div4",
2794f346005SAlim Akhtar GAT_CMU_PERIC_SHARED0DIVE4_GATE, 21, CLK_IGNORE_UNUSED, 0),
2804f346005SAlim Akhtar GATE(0, "cmu_peric_shared1div4_dmaclk_gate", "dout_cmu_pll_shared1_div4",
2814f346005SAlim Akhtar GAT_CMU_PERIC_SHARED1DIV4_DMACLK_GATE, 21, CLK_IGNORE_UNUSED, 0),
2824f346005SAlim Akhtar GATE(0, "cmu_peric_shared1dive4_gate", "dout_cmu_pll_shared1_div36",
2834f346005SAlim Akhtar GAT_CMU_PERIC_SHARED1DIVE4_GATE, 21, CLK_IGNORE_UNUSED, 0),
2844f346005SAlim Akhtar GATE(0, "cmu_uid_cmu_cmu_cmu_ipclkport_pclk", "dout_cmu_cmu_aclk",
2854f346005SAlim Akhtar GAT_CMU_CMU_CMU_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
2864f346005SAlim Akhtar GATE(0, "cmu_uid_axi2apb_cmu_ipclkport_aclk", "dout_cmu_cmu_aclk",
2874f346005SAlim Akhtar GAT_CMU_AXI2APB_CMU_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
2884f346005SAlim Akhtar GATE(0, "cmu_uid_ns_brdg_cmu_ipclkport_clk__psoc_cmu__clk_cmu", "dout_cmu_cmu_aclk",
2894f346005SAlim Akhtar GAT_CMU_NS_BRDG_CMU_IPCLKPORT_CLK__PSOC_CMU__CLK_CMU, 21, CLK_IGNORE_UNUSED, 0),
2904f346005SAlim Akhtar GATE(0, "cmu_uid_sysreg_cmu_ipclkport_pclk", "dout_cmu_cmu_aclk",
2914f346005SAlim Akhtar GAT_CMU_SYSREG_CMU_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
2924f346005SAlim Akhtar };
2934f346005SAlim Akhtar
2944f346005SAlim Akhtar static const struct samsung_cmu_info cmu_cmu_info __initconst = {
2954f346005SAlim Akhtar .pll_clks = cmu_pll_clks,
2964f346005SAlim Akhtar .nr_pll_clks = ARRAY_SIZE(cmu_pll_clks),
2974f346005SAlim Akhtar .mux_clks = cmu_mux_clks,
2984f346005SAlim Akhtar .nr_mux_clks = ARRAY_SIZE(cmu_mux_clks),
2994f346005SAlim Akhtar .div_clks = cmu_div_clks,
3004f346005SAlim Akhtar .nr_div_clks = ARRAY_SIZE(cmu_div_clks),
3014f346005SAlim Akhtar .gate_clks = cmu_gate_clks,
3024f346005SAlim Akhtar .nr_gate_clks = ARRAY_SIZE(cmu_gate_clks),
3034f346005SAlim Akhtar .nr_clk_ids = CMU_NR_CLK,
3044f346005SAlim Akhtar .clk_regs = cmu_clk_regs,
3054f346005SAlim Akhtar .nr_clk_regs = ARRAY_SIZE(cmu_clk_regs),
3064f346005SAlim Akhtar };
3074f346005SAlim Akhtar
fsd_clk_cmu_init(struct device_node * np)3084f346005SAlim Akhtar static void __init fsd_clk_cmu_init(struct device_node *np)
3094f346005SAlim Akhtar {
3104f346005SAlim Akhtar samsung_cmu_register_one(np, &cmu_cmu_info);
3114f346005SAlim Akhtar }
3124f346005SAlim Akhtar
3134f346005SAlim Akhtar CLK_OF_DECLARE(fsd_clk_cmu, "tesla,fsd-clock-cmu", fsd_clk_cmu_init);
314e3f3dc38SAlim Akhtar
315e3f3dc38SAlim Akhtar /* Register Offset definitions for CMU_PERIC (0x14010000) */
316e3f3dc38SAlim Akhtar #define PLL_CON0_PERIC_DMACLK_MUX 0x100
317e3f3dc38SAlim Akhtar #define PLL_CON0_PERIC_EQOS_BUSCLK_MUX 0x120
318e3f3dc38SAlim Akhtar #define PLL_CON0_PERIC_PCLK_MUX 0x140
319e3f3dc38SAlim Akhtar #define PLL_CON0_PERIC_TBUCLK_MUX 0x160
320e3f3dc38SAlim Akhtar #define PLL_CON0_SPI_CLK 0x180
321e3f3dc38SAlim Akhtar #define PLL_CON0_SPI_PCLK 0x1a0
322e3f3dc38SAlim Akhtar #define PLL_CON0_UART_CLK 0x1c0
323e3f3dc38SAlim Akhtar #define PLL_CON0_UART_PCLK 0x1e0
324e3f3dc38SAlim Akhtar #define MUX_PERIC_EQOS_PHYRXCLK 0x1000
325e3f3dc38SAlim Akhtar #define DIV_EQOS_BUSCLK 0x1800
326e3f3dc38SAlim Akhtar #define DIV_PERIC_MCAN_CLK 0x1804
327e3f3dc38SAlim Akhtar #define DIV_RGMII_CLK 0x1808
328e3f3dc38SAlim Akhtar #define DIV_RII_CLK 0x180c
329e3f3dc38SAlim Akhtar #define DIV_RMII_CLK 0x1810
330e3f3dc38SAlim Akhtar #define DIV_SPI_CLK 0x1814
331e3f3dc38SAlim Akhtar #define DIV_UART_CLK 0x1818
332e3f3dc38SAlim Akhtar #define GAT_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I 0x2000
333e3f3dc38SAlim Akhtar #define GAT_GPIO_PERIC_IPCLKPORT_OSCCLK 0x2004
334e3f3dc38SAlim Akhtar #define GAT_PERIC_ADC0_IPCLKPORT_I_OSCCLK 0x2008
335e3f3dc38SAlim Akhtar #define GAT_PERIC_CMU_PERIC_IPCLKPORT_PCLK 0x200c
336e3f3dc38SAlim Akhtar #define GAT_PERIC_PWM0_IPCLKPORT_I_OSCCLK 0x2010
337e3f3dc38SAlim Akhtar #define GAT_PERIC_PWM1_IPCLKPORT_I_OSCCLK 0x2014
338e3f3dc38SAlim Akhtar #define GAT_ASYNC_APB_DMA0_IPCLKPORT_PCLKM 0x2018
339e3f3dc38SAlim Akhtar #define GAT_ASYNC_APB_DMA0_IPCLKPORT_PCLKS 0x201c
340e3f3dc38SAlim Akhtar #define GAT_ASYNC_APB_DMA1_IPCLKPORT_PCLKM 0x2020
341e3f3dc38SAlim Akhtar #define GAT_ASYNC_APB_DMA1_IPCLKPORT_PCLKS 0x2024
342e3f3dc38SAlim Akhtar #define GAT_AXI2APB_PERIC0_IPCLKPORT_ACLK 0x2028
343e3f3dc38SAlim Akhtar #define GAT_AXI2APB_PERIC1_IPCLKPORT_ACLK 0x202c
344e3f3dc38SAlim Akhtar #define GAT_AXI2APB_PERIC2_IPCLKPORT_ACLK 0x2030
345e3f3dc38SAlim Akhtar #define GAT_BUS_D_PERIC_IPCLKPORT_DMACLK 0x2034
346e3f3dc38SAlim Akhtar #define GAT_BUS_D_PERIC_IPCLKPORT_EQOSCLK 0x2038
347e3f3dc38SAlim Akhtar #define GAT_BUS_D_PERIC_IPCLKPORT_MAINCLK 0x203c
348e3f3dc38SAlim Akhtar #define GAT_BUS_P_PERIC_IPCLKPORT_EQOSCLK 0x2040
349e3f3dc38SAlim Akhtar #define GAT_BUS_P_PERIC_IPCLKPORT_MAINCLK 0x2044
350e3f3dc38SAlim Akhtar #define GAT_BUS_P_PERIC_IPCLKPORT_SMMUCLK 0x2048
351e3f3dc38SAlim Akhtar #define GAT_EQOS_TOP_IPCLKPORT_ACLK_I 0x204c
352e3f3dc38SAlim Akhtar #define GAT_EQOS_TOP_IPCLKPORT_CLK_RX_I 0x2050
353e3f3dc38SAlim Akhtar #define GAT_EQOS_TOP_IPCLKPORT_HCLK_I 0x2054
354e3f3dc38SAlim Akhtar #define GAT_EQOS_TOP_IPCLKPORT_RGMII_CLK_I 0x2058
355e3f3dc38SAlim Akhtar #define GAT_EQOS_TOP_IPCLKPORT_RII_CLK_I 0x205c
356e3f3dc38SAlim Akhtar #define GAT_EQOS_TOP_IPCLKPORT_RMII_CLK_I 0x2060
357e3f3dc38SAlim Akhtar #define GAT_GPIO_PERIC_IPCLKPORT_PCLK 0x2064
358e3f3dc38SAlim Akhtar #define GAT_NS_BRDG_PERIC_IPCLKPORT_CLK__PSOC_PERIC__CLK_PERIC_D 0x2068
359e3f3dc38SAlim Akhtar #define GAT_NS_BRDG_PERIC_IPCLKPORT_CLK__PSOC_PERIC__CLK_PERIC_P 0x206c
360e3f3dc38SAlim Akhtar #define GAT_PERIC_ADC0_IPCLKPORT_PCLK_S0 0x2070
361e3f3dc38SAlim Akhtar #define GAT_PERIC_DMA0_IPCLKPORT_ACLK 0x2074
362e3f3dc38SAlim Akhtar #define GAT_PERIC_DMA1_IPCLKPORT_ACLK 0x2078
363e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C0_IPCLKPORT_I_PCLK 0x207c
364e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C1_IPCLKPORT_I_PCLK 0x2080
365e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C2_IPCLKPORT_I_PCLK 0x2084
366e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C3_IPCLKPORT_I_PCLK 0x2088
367e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C4_IPCLKPORT_I_PCLK 0x208c
368e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C5_IPCLKPORT_I_PCLK 0x2090
369e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C6_IPCLKPORT_I_PCLK 0x2094
370e3f3dc38SAlim Akhtar #define GAT_PERIC_I2C7_IPCLKPORT_I_PCLK 0x2098
371e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN0_IPCLKPORT_CCLK 0x209c
372e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN0_IPCLKPORT_PCLK 0x20a0
373e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN1_IPCLKPORT_CCLK 0x20a4
374e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN1_IPCLKPORT_PCLK 0x20a8
375e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN2_IPCLKPORT_CCLK 0x20ac
376e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN2_IPCLKPORT_PCLK 0x20b0
377e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN3_IPCLKPORT_CCLK 0x20b4
378e3f3dc38SAlim Akhtar #define GAT_PERIC_MCAN3_IPCLKPORT_PCLK 0x20b8
379e3f3dc38SAlim Akhtar #define GAT_PERIC_PWM0_IPCLKPORT_I_PCLK_S0 0x20bc
380e3f3dc38SAlim Akhtar #define GAT_PERIC_PWM1_IPCLKPORT_I_PCLK_S0 0x20c0
381e3f3dc38SAlim Akhtar #define GAT_PERIC_SMMU_IPCLKPORT_CCLK 0x20c4
382e3f3dc38SAlim Akhtar #define GAT_PERIC_SMMU_IPCLKPORT_PERIC_BCLK 0x20c8
383e3f3dc38SAlim Akhtar #define GAT_PERIC_SPI0_IPCLKPORT_I_PCLK 0x20cc
384e3f3dc38SAlim Akhtar #define GAT_PERIC_SPI0_IPCLKPORT_I_SCLK_SPI 0x20d0
385e3f3dc38SAlim Akhtar #define GAT_PERIC_SPI1_IPCLKPORT_I_PCLK 0x20d4
386e3f3dc38SAlim Akhtar #define GAT_PERIC_SPI1_IPCLKPORT_I_SCLK_SPI 0x20d8
387e3f3dc38SAlim Akhtar #define GAT_PERIC_SPI2_IPCLKPORT_I_PCLK 0x20dc
388e3f3dc38SAlim Akhtar #define GAT_PERIC_SPI2_IPCLKPORT_I_SCLK_SPI 0x20e0
389e3f3dc38SAlim Akhtar #define GAT_PERIC_TDM0_IPCLKPORT_HCLK_M 0x20e4
390e3f3dc38SAlim Akhtar #define GAT_PERIC_TDM0_IPCLKPORT_PCLK 0x20e8
391e3f3dc38SAlim Akhtar #define GAT_PERIC_TDM1_IPCLKPORT_HCLK_M 0x20ec
392e3f3dc38SAlim Akhtar #define GAT_PERIC_TDM1_IPCLKPORT_PCLK 0x20f0
393e3f3dc38SAlim Akhtar #define GAT_PERIC_UART0_IPCLKPORT_I_SCLK_UART 0x20f4
394e3f3dc38SAlim Akhtar #define GAT_PERIC_UART0_IPCLKPORT_PCLK 0x20f8
395e3f3dc38SAlim Akhtar #define GAT_PERIC_UART1_IPCLKPORT_I_SCLK_UART 0x20fc
396e3f3dc38SAlim Akhtar #define GAT_PERIC_UART1_IPCLKPORT_PCLK 0x2100
397e3f3dc38SAlim Akhtar #define GAT_SYSREG_PERI_IPCLKPORT_PCLK 0x2104
398e3f3dc38SAlim Akhtar
399e3f3dc38SAlim Akhtar static const unsigned long peric_clk_regs[] __initconst = {
400e3f3dc38SAlim Akhtar PLL_CON0_PERIC_DMACLK_MUX,
401e3f3dc38SAlim Akhtar PLL_CON0_PERIC_EQOS_BUSCLK_MUX,
402e3f3dc38SAlim Akhtar PLL_CON0_PERIC_PCLK_MUX,
403e3f3dc38SAlim Akhtar PLL_CON0_PERIC_TBUCLK_MUX,
404e3f3dc38SAlim Akhtar PLL_CON0_SPI_CLK,
405e3f3dc38SAlim Akhtar PLL_CON0_SPI_PCLK,
406e3f3dc38SAlim Akhtar PLL_CON0_UART_CLK,
407e3f3dc38SAlim Akhtar PLL_CON0_UART_PCLK,
408e3f3dc38SAlim Akhtar MUX_PERIC_EQOS_PHYRXCLK,
409e3f3dc38SAlim Akhtar DIV_EQOS_BUSCLK,
410e3f3dc38SAlim Akhtar DIV_PERIC_MCAN_CLK,
411e3f3dc38SAlim Akhtar DIV_RGMII_CLK,
412e3f3dc38SAlim Akhtar DIV_RII_CLK,
413e3f3dc38SAlim Akhtar DIV_RMII_CLK,
414e3f3dc38SAlim Akhtar DIV_SPI_CLK,
415e3f3dc38SAlim Akhtar DIV_UART_CLK,
416e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I,
417e3f3dc38SAlim Akhtar GAT_GPIO_PERIC_IPCLKPORT_OSCCLK,
418e3f3dc38SAlim Akhtar GAT_PERIC_ADC0_IPCLKPORT_I_OSCCLK,
419e3f3dc38SAlim Akhtar GAT_PERIC_CMU_PERIC_IPCLKPORT_PCLK,
420e3f3dc38SAlim Akhtar GAT_PERIC_PWM0_IPCLKPORT_I_OSCCLK,
421e3f3dc38SAlim Akhtar GAT_PERIC_PWM1_IPCLKPORT_I_OSCCLK,
422e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA0_IPCLKPORT_PCLKM,
423e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA0_IPCLKPORT_PCLKS,
424e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA1_IPCLKPORT_PCLKM,
425e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA1_IPCLKPORT_PCLKS,
426e3f3dc38SAlim Akhtar GAT_AXI2APB_PERIC0_IPCLKPORT_ACLK,
427e3f3dc38SAlim Akhtar GAT_AXI2APB_PERIC1_IPCLKPORT_ACLK,
428e3f3dc38SAlim Akhtar GAT_AXI2APB_PERIC2_IPCLKPORT_ACLK,
429e3f3dc38SAlim Akhtar GAT_BUS_D_PERIC_IPCLKPORT_DMACLK,
430e3f3dc38SAlim Akhtar GAT_BUS_D_PERIC_IPCLKPORT_EQOSCLK,
431e3f3dc38SAlim Akhtar GAT_BUS_D_PERIC_IPCLKPORT_MAINCLK,
432e3f3dc38SAlim Akhtar GAT_BUS_P_PERIC_IPCLKPORT_EQOSCLK,
433e3f3dc38SAlim Akhtar GAT_BUS_P_PERIC_IPCLKPORT_MAINCLK,
434e3f3dc38SAlim Akhtar GAT_BUS_P_PERIC_IPCLKPORT_SMMUCLK,
435e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_ACLK_I,
436e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_CLK_RX_I,
437e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_HCLK_I,
438e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_RGMII_CLK_I,
439e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_RII_CLK_I,
440e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_RMII_CLK_I,
441e3f3dc38SAlim Akhtar GAT_GPIO_PERIC_IPCLKPORT_PCLK,
442e3f3dc38SAlim Akhtar GAT_NS_BRDG_PERIC_IPCLKPORT_CLK__PSOC_PERIC__CLK_PERIC_D,
443e3f3dc38SAlim Akhtar GAT_NS_BRDG_PERIC_IPCLKPORT_CLK__PSOC_PERIC__CLK_PERIC_P,
444e3f3dc38SAlim Akhtar GAT_PERIC_ADC0_IPCLKPORT_PCLK_S0,
445e3f3dc38SAlim Akhtar GAT_PERIC_DMA0_IPCLKPORT_ACLK,
446e3f3dc38SAlim Akhtar GAT_PERIC_DMA1_IPCLKPORT_ACLK,
447e3f3dc38SAlim Akhtar GAT_PERIC_I2C0_IPCLKPORT_I_PCLK,
448e3f3dc38SAlim Akhtar GAT_PERIC_I2C1_IPCLKPORT_I_PCLK,
449e3f3dc38SAlim Akhtar GAT_PERIC_I2C2_IPCLKPORT_I_PCLK,
450e3f3dc38SAlim Akhtar GAT_PERIC_I2C3_IPCLKPORT_I_PCLK,
451e3f3dc38SAlim Akhtar GAT_PERIC_I2C4_IPCLKPORT_I_PCLK,
452e3f3dc38SAlim Akhtar GAT_PERIC_I2C5_IPCLKPORT_I_PCLK,
453e3f3dc38SAlim Akhtar GAT_PERIC_I2C6_IPCLKPORT_I_PCLK,
454e3f3dc38SAlim Akhtar GAT_PERIC_I2C7_IPCLKPORT_I_PCLK,
455e3f3dc38SAlim Akhtar GAT_PERIC_MCAN0_IPCLKPORT_CCLK,
456e3f3dc38SAlim Akhtar GAT_PERIC_MCAN0_IPCLKPORT_PCLK,
457e3f3dc38SAlim Akhtar GAT_PERIC_MCAN1_IPCLKPORT_CCLK,
458e3f3dc38SAlim Akhtar GAT_PERIC_MCAN1_IPCLKPORT_PCLK,
459e3f3dc38SAlim Akhtar GAT_PERIC_MCAN2_IPCLKPORT_CCLK,
460e3f3dc38SAlim Akhtar GAT_PERIC_MCAN2_IPCLKPORT_PCLK,
461e3f3dc38SAlim Akhtar GAT_PERIC_MCAN3_IPCLKPORT_CCLK,
462e3f3dc38SAlim Akhtar GAT_PERIC_MCAN3_IPCLKPORT_PCLK,
463e3f3dc38SAlim Akhtar GAT_PERIC_PWM0_IPCLKPORT_I_PCLK_S0,
464e3f3dc38SAlim Akhtar GAT_PERIC_PWM1_IPCLKPORT_I_PCLK_S0,
465e3f3dc38SAlim Akhtar GAT_PERIC_SMMU_IPCLKPORT_CCLK,
466e3f3dc38SAlim Akhtar GAT_PERIC_SMMU_IPCLKPORT_PERIC_BCLK,
467e3f3dc38SAlim Akhtar GAT_PERIC_SPI0_IPCLKPORT_I_PCLK,
468e3f3dc38SAlim Akhtar GAT_PERIC_SPI0_IPCLKPORT_I_SCLK_SPI,
469e3f3dc38SAlim Akhtar GAT_PERIC_SPI1_IPCLKPORT_I_PCLK,
470e3f3dc38SAlim Akhtar GAT_PERIC_SPI1_IPCLKPORT_I_SCLK_SPI,
471e3f3dc38SAlim Akhtar GAT_PERIC_SPI2_IPCLKPORT_I_PCLK,
472e3f3dc38SAlim Akhtar GAT_PERIC_SPI2_IPCLKPORT_I_SCLK_SPI,
473e3f3dc38SAlim Akhtar GAT_PERIC_TDM0_IPCLKPORT_HCLK_M,
474e3f3dc38SAlim Akhtar GAT_PERIC_TDM0_IPCLKPORT_PCLK,
475e3f3dc38SAlim Akhtar GAT_PERIC_TDM1_IPCLKPORT_HCLK_M,
476e3f3dc38SAlim Akhtar GAT_PERIC_TDM1_IPCLKPORT_PCLK,
477e3f3dc38SAlim Akhtar GAT_PERIC_UART0_IPCLKPORT_I_SCLK_UART,
478e3f3dc38SAlim Akhtar GAT_PERIC_UART0_IPCLKPORT_PCLK,
479e3f3dc38SAlim Akhtar GAT_PERIC_UART1_IPCLKPORT_I_SCLK_UART,
480e3f3dc38SAlim Akhtar GAT_PERIC_UART1_IPCLKPORT_PCLK,
481e3f3dc38SAlim Akhtar GAT_SYSREG_PERI_IPCLKPORT_PCLK,
482e3f3dc38SAlim Akhtar };
483e3f3dc38SAlim Akhtar
484e3f3dc38SAlim Akhtar static const struct samsung_fixed_rate_clock peric_fixed_clks[] __initconst = {
485e3f3dc38SAlim Akhtar FRATE(PERIC_EQOS_PHYRXCLK, "eqos_phyrxclk", NULL, 0, 125000000),
486e3f3dc38SAlim Akhtar };
487e3f3dc38SAlim Akhtar
488e3f3dc38SAlim Akhtar /* List of parent clocks for Muxes in CMU_PERIC */
489e3f3dc38SAlim Akhtar PNAME(mout_peric_dmaclk_p) = { "fin_pll", "cmu_peric_shared1div4_dmaclk_gate" };
490e3f3dc38SAlim Akhtar PNAME(mout_peric_eqos_busclk_p) = { "fin_pll", "dout_cmu_pll_shared0_div4" };
491e3f3dc38SAlim Akhtar PNAME(mout_peric_pclk_p) = { "fin_pll", "dout_cmu_peric_shared1div36" };
492e3f3dc38SAlim Akhtar PNAME(mout_peric_tbuclk_p) = { "fin_pll", "dout_cmu_peric_shared0div3_tbuclk" };
493e3f3dc38SAlim Akhtar PNAME(mout_peric_spi_clk_p) = { "fin_pll", "dout_cmu_peric_shared0div20" };
494e3f3dc38SAlim Akhtar PNAME(mout_peric_spi_pclk_p) = { "fin_pll", "dout_cmu_peric_shared1div36" };
495e3f3dc38SAlim Akhtar PNAME(mout_peric_uart_clk_p) = { "fin_pll", "dout_cmu_peric_shared1div4_dmaclk" };
496e3f3dc38SAlim Akhtar PNAME(mout_peric_uart_pclk_p) = { "fin_pll", "dout_cmu_peric_shared1div36" };
497e3f3dc38SAlim Akhtar PNAME(mout_peric_eqos_phyrxclk_p) = { "dout_peric_rgmii_clk", "eqos_phyrxclk" };
498e3f3dc38SAlim Akhtar
499e3f3dc38SAlim Akhtar static const struct samsung_mux_clock peric_mux_clks[] __initconst = {
500e3f3dc38SAlim Akhtar MUX(0, "mout_peric_dmaclk", mout_peric_dmaclk_p, PLL_CON0_PERIC_DMACLK_MUX, 4, 1),
501e3f3dc38SAlim Akhtar MUX(0, "mout_peric_eqos_busclk", mout_peric_eqos_busclk_p,
502e3f3dc38SAlim Akhtar PLL_CON0_PERIC_EQOS_BUSCLK_MUX, 4, 1),
503e3f3dc38SAlim Akhtar MUX(0, "mout_peric_pclk", mout_peric_pclk_p, PLL_CON0_PERIC_PCLK_MUX, 4, 1),
504e3f3dc38SAlim Akhtar MUX(0, "mout_peric_tbuclk", mout_peric_tbuclk_p, PLL_CON0_PERIC_TBUCLK_MUX, 4, 1),
505e3f3dc38SAlim Akhtar MUX(0, "mout_peric_spi_clk", mout_peric_spi_clk_p, PLL_CON0_SPI_CLK, 4, 1),
506e3f3dc38SAlim Akhtar MUX(0, "mout_peric_spi_pclk", mout_peric_spi_pclk_p, PLL_CON0_SPI_PCLK, 4, 1),
507e3f3dc38SAlim Akhtar MUX(0, "mout_peric_uart_clk", mout_peric_uart_clk_p, PLL_CON0_UART_CLK, 4, 1),
508e3f3dc38SAlim Akhtar MUX(0, "mout_peric_uart_pclk", mout_peric_uart_pclk_p, PLL_CON0_UART_PCLK, 4, 1),
509e3f3dc38SAlim Akhtar MUX(PERIC_EQOS_PHYRXCLK_MUX, "mout_peric_eqos_phyrxclk", mout_peric_eqos_phyrxclk_p,
510e3f3dc38SAlim Akhtar MUX_PERIC_EQOS_PHYRXCLK, 0, 1),
511e3f3dc38SAlim Akhtar };
512e3f3dc38SAlim Akhtar
513e3f3dc38SAlim Akhtar static const struct samsung_div_clock peric_div_clks[] __initconst = {
514e3f3dc38SAlim Akhtar DIV(0, "dout_peric_eqos_busclk", "mout_peric_eqos_busclk", DIV_EQOS_BUSCLK, 0, 4),
515e3f3dc38SAlim Akhtar DIV(0, "dout_peric_mcan_clk", "mout_peric_dmaclk", DIV_PERIC_MCAN_CLK, 0, 4),
516e3f3dc38SAlim Akhtar DIV(PERIC_DOUT_RGMII_CLK, "dout_peric_rgmii_clk", "mout_peric_eqos_busclk",
517e3f3dc38SAlim Akhtar DIV_RGMII_CLK, 0, 4),
518e3f3dc38SAlim Akhtar DIV(0, "dout_peric_rii_clk", "dout_peric_rmii_clk", DIV_RII_CLK, 0, 4),
519e3f3dc38SAlim Akhtar DIV(0, "dout_peric_rmii_clk", "dout_peric_rgmii_clk", DIV_RMII_CLK, 0, 4),
520e3f3dc38SAlim Akhtar DIV(0, "dout_peric_spi_clk", "mout_peric_spi_clk", DIV_SPI_CLK, 0, 6),
521e3f3dc38SAlim Akhtar DIV(0, "dout_peric_uart_clk", "mout_peric_uart_clk", DIV_UART_CLK, 0, 6),
522e3f3dc38SAlim Akhtar };
523e3f3dc38SAlim Akhtar
524e3f3dc38SAlim Akhtar static const struct samsung_gate_clock peric_gate_clks[] __initconst = {
525e3f3dc38SAlim Akhtar GATE(PERIC_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I, "peric_eqos_top_ipclkport_clk_ptp_ref_i",
526e3f3dc38SAlim Akhtar "fin_pll", GAT_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I, 21, CLK_IGNORE_UNUSED, 0),
527e3f3dc38SAlim Akhtar GATE(0, "peric_gpio_peric_ipclkport_oscclk", "fin_pll", GAT_GPIO_PERIC_IPCLKPORT_OSCCLK,
528e3f3dc38SAlim Akhtar 21, CLK_IGNORE_UNUSED, 0),
529e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_ADCIF, "peric_adc0_ipclkport_i_oscclk", "fin_pll",
530e3f3dc38SAlim Akhtar GAT_PERIC_ADC0_IPCLKPORT_I_OSCCLK, 21, CLK_IGNORE_UNUSED, 0),
531e3f3dc38SAlim Akhtar GATE(0, "peric_cmu_peric_ipclkport_pclk", "mout_peric_pclk",
532e3f3dc38SAlim Akhtar GAT_PERIC_CMU_PERIC_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
533e3f3dc38SAlim Akhtar GATE(0, "peric_pwm0_ipclkport_i_oscclk", "fin_pll", GAT_PERIC_PWM0_IPCLKPORT_I_OSCCLK, 21,
534e3f3dc38SAlim Akhtar CLK_IGNORE_UNUSED, 0),
535e3f3dc38SAlim Akhtar GATE(0, "peric_pwm1_ipclkport_i_oscclk", "fin_pll", GAT_PERIC_PWM1_IPCLKPORT_I_OSCCLK, 21,
536e3f3dc38SAlim Akhtar CLK_IGNORE_UNUSED, 0),
537e3f3dc38SAlim Akhtar GATE(0, "peric_async_apb_dma0_ipclkport_pclkm", "mout_peric_dmaclk",
538e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA0_IPCLKPORT_PCLKM, 21, CLK_IGNORE_UNUSED, 0),
539e3f3dc38SAlim Akhtar GATE(0, "peric_async_apb_dma0_ipclkport_pclks", "mout_peric_pclk",
540e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA0_IPCLKPORT_PCLKS, 21, CLK_IGNORE_UNUSED, 0),
541e3f3dc38SAlim Akhtar GATE(0, "peric_async_apb_dma1_ipclkport_pclkm", "mout_peric_dmaclk",
542e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA1_IPCLKPORT_PCLKM, 21, CLK_IGNORE_UNUSED, 0),
543e3f3dc38SAlim Akhtar GATE(0, "peric_async_apb_dma1_ipclkport_pclks", "mout_peric_pclk",
544e3f3dc38SAlim Akhtar GAT_ASYNC_APB_DMA1_IPCLKPORT_PCLKS, 21, CLK_IGNORE_UNUSED, 0),
545e3f3dc38SAlim Akhtar GATE(0, "peric_axi2apb_peric0_ipclkport_aclk", "mout_peric_pclk",
546e3f3dc38SAlim Akhtar GAT_AXI2APB_PERIC0_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
547e3f3dc38SAlim Akhtar GATE(0, "peric_axi2apb_peric1_ipclkport_aclk", "mout_peric_pclk",
548e3f3dc38SAlim Akhtar GAT_AXI2APB_PERIC1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
549e3f3dc38SAlim Akhtar GATE(0, "peric_axi2apb_peric2_ipclkport_aclk", "mout_peric_pclk",
550e3f3dc38SAlim Akhtar GAT_AXI2APB_PERIC2_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
551e3f3dc38SAlim Akhtar GATE(0, "peric_bus_d_peric_ipclkport_dmaclk", "mout_peric_dmaclk",
552e3f3dc38SAlim Akhtar GAT_BUS_D_PERIC_IPCLKPORT_DMACLK, 21, CLK_IGNORE_UNUSED, 0),
553e3f3dc38SAlim Akhtar GATE(PERIC_BUS_D_PERIC_IPCLKPORT_EQOSCLK, "peric_bus_d_peric_ipclkport_eqosclk",
554e3f3dc38SAlim Akhtar "dout_peric_eqos_busclk", GAT_BUS_D_PERIC_IPCLKPORT_EQOSCLK, 21, CLK_IGNORE_UNUSED, 0),
555e3f3dc38SAlim Akhtar GATE(0, "peric_bus_d_peric_ipclkport_mainclk", "mout_peric_tbuclk",
556e3f3dc38SAlim Akhtar GAT_BUS_D_PERIC_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
557e3f3dc38SAlim Akhtar GATE(PERIC_BUS_P_PERIC_IPCLKPORT_EQOSCLK, "peric_bus_p_peric_ipclkport_eqosclk",
558e3f3dc38SAlim Akhtar "dout_peric_eqos_busclk", GAT_BUS_P_PERIC_IPCLKPORT_EQOSCLK, 21, CLK_IGNORE_UNUSED, 0),
559e3f3dc38SAlim Akhtar GATE(0, "peric_bus_p_peric_ipclkport_mainclk", "mout_peric_pclk",
560e3f3dc38SAlim Akhtar GAT_BUS_P_PERIC_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
561e3f3dc38SAlim Akhtar GATE(0, "peric_bus_p_peric_ipclkport_smmuclk", "mout_peric_tbuclk",
562e3f3dc38SAlim Akhtar GAT_BUS_P_PERIC_IPCLKPORT_SMMUCLK, 21, CLK_IGNORE_UNUSED, 0),
563e3f3dc38SAlim Akhtar GATE(PERIC_EQOS_TOP_IPCLKPORT_ACLK_I, "peric_eqos_top_ipclkport_aclk_i",
564e3f3dc38SAlim Akhtar "dout_peric_eqos_busclk", GAT_EQOS_TOP_IPCLKPORT_ACLK_I, 21, CLK_IGNORE_UNUSED, 0),
565e3f3dc38SAlim Akhtar GATE(PERIC_EQOS_TOP_IPCLKPORT_CLK_RX_I, "peric_eqos_top_ipclkport_clk_rx_i",
566e3f3dc38SAlim Akhtar "mout_peric_eqos_phyrxclk", GAT_EQOS_TOP_IPCLKPORT_CLK_RX_I, 21, CLK_IGNORE_UNUSED, 0),
567e3f3dc38SAlim Akhtar GATE(PERIC_EQOS_TOP_IPCLKPORT_HCLK_I, "peric_eqos_top_ipclkport_hclk_i",
568e3f3dc38SAlim Akhtar "dout_peric_eqos_busclk", GAT_EQOS_TOP_IPCLKPORT_HCLK_I, 21, CLK_IGNORE_UNUSED, 0),
569e3f3dc38SAlim Akhtar GATE(PERIC_EQOS_TOP_IPCLKPORT_RGMII_CLK_I, "peric_eqos_top_ipclkport_rgmii_clk_i",
570e3f3dc38SAlim Akhtar "dout_peric_rgmii_clk", GAT_EQOS_TOP_IPCLKPORT_RGMII_CLK_I, 21, CLK_IGNORE_UNUSED, 0),
571e3f3dc38SAlim Akhtar GATE(0, "peric_eqos_top_ipclkport_rii_clk_i", "dout_peric_rii_clk",
572e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_RII_CLK_I, 21, CLK_IGNORE_UNUSED, 0),
573e3f3dc38SAlim Akhtar GATE(0, "peric_eqos_top_ipclkport_rmii_clk_i", "dout_peric_rmii_clk",
574e3f3dc38SAlim Akhtar GAT_EQOS_TOP_IPCLKPORT_RMII_CLK_I, 21, CLK_IGNORE_UNUSED, 0),
575e3f3dc38SAlim Akhtar GATE(0, "peric_gpio_peric_ipclkport_pclk", "mout_peric_pclk",
576e3f3dc38SAlim Akhtar GAT_GPIO_PERIC_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
577e3f3dc38SAlim Akhtar GATE(0, "peric_ns_brdg_peric_ipclkport_clk__psoc_peric__clk_peric_d", "mout_peric_tbuclk",
578e3f3dc38SAlim Akhtar GAT_NS_BRDG_PERIC_IPCLKPORT_CLK__PSOC_PERIC__CLK_PERIC_D, 21, CLK_IGNORE_UNUSED, 0),
579e3f3dc38SAlim Akhtar GATE(0, "peric_ns_brdg_peric_ipclkport_clk__psoc_peric__clk_peric_p", "mout_peric_pclk",
580e3f3dc38SAlim Akhtar GAT_NS_BRDG_PERIC_IPCLKPORT_CLK__PSOC_PERIC__CLK_PERIC_P, 21, CLK_IGNORE_UNUSED, 0),
581e3f3dc38SAlim Akhtar GATE(0, "peric_adc0_ipclkport_pclk_s0", "mout_peric_pclk",
582e3f3dc38SAlim Akhtar GAT_PERIC_ADC0_IPCLKPORT_PCLK_S0, 21, CLK_IGNORE_UNUSED, 0),
583e3f3dc38SAlim Akhtar GATE(PERIC_DMA0_IPCLKPORT_ACLK, "peric_dma0_ipclkport_aclk", "mout_peric_dmaclk",
584e3f3dc38SAlim Akhtar GAT_PERIC_DMA0_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
585e3f3dc38SAlim Akhtar GATE(PERIC_DMA1_IPCLKPORT_ACLK, "peric_dma1_ipclkport_aclk", "mout_peric_dmaclk",
586e3f3dc38SAlim Akhtar GAT_PERIC_DMA1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
587e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C0, "peric_i2c0_ipclkport_i_pclk", "mout_peric_pclk",
588e3f3dc38SAlim Akhtar GAT_PERIC_I2C0_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
589e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C1, "peric_i2c1_ipclkport_i_pclk", "mout_peric_pclk",
590e3f3dc38SAlim Akhtar GAT_PERIC_I2C1_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
591e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C2, "peric_i2c2_ipclkport_i_pclk", "mout_peric_pclk",
592e3f3dc38SAlim Akhtar GAT_PERIC_I2C2_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
593e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C3, "peric_i2c3_ipclkport_i_pclk", "mout_peric_pclk",
594e3f3dc38SAlim Akhtar GAT_PERIC_I2C3_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
595e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C4, "peric_i2c4_ipclkport_i_pclk", "mout_peric_pclk",
596e3f3dc38SAlim Akhtar GAT_PERIC_I2C4_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
597e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C5, "peric_i2c5_ipclkport_i_pclk", "mout_peric_pclk",
598e3f3dc38SAlim Akhtar GAT_PERIC_I2C5_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
599e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C6, "peric_i2c6_ipclkport_i_pclk", "mout_peric_pclk",
600e3f3dc38SAlim Akhtar GAT_PERIC_I2C6_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
601e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_HSI2C7, "peric_i2c7_ipclkport_i_pclk", "mout_peric_pclk",
602e3f3dc38SAlim Akhtar GAT_PERIC_I2C7_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
603e3f3dc38SAlim Akhtar GATE(PERIC_MCAN0_IPCLKPORT_CCLK, "peric_mcan0_ipclkport_cclk", "dout_peric_mcan_clk",
604e3f3dc38SAlim Akhtar GAT_PERIC_MCAN0_IPCLKPORT_CCLK, 21, CLK_IGNORE_UNUSED, 0),
605e3f3dc38SAlim Akhtar GATE(PERIC_MCAN0_IPCLKPORT_PCLK, "peric_mcan0_ipclkport_pclk", "mout_peric_pclk",
606e3f3dc38SAlim Akhtar GAT_PERIC_MCAN0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
607e3f3dc38SAlim Akhtar GATE(PERIC_MCAN1_IPCLKPORT_CCLK, "peric_mcan1_ipclkport_cclk", "dout_peric_mcan_clk",
608e3f3dc38SAlim Akhtar GAT_PERIC_MCAN1_IPCLKPORT_CCLK, 21, CLK_IGNORE_UNUSED, 0),
609e3f3dc38SAlim Akhtar GATE(PERIC_MCAN1_IPCLKPORT_PCLK, "peric_mcan1_ipclkport_pclk", "mout_peric_pclk",
610e3f3dc38SAlim Akhtar GAT_PERIC_MCAN1_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
611e3f3dc38SAlim Akhtar GATE(PERIC_MCAN2_IPCLKPORT_CCLK, "peric_mcan2_ipclkport_cclk", "dout_peric_mcan_clk",
612e3f3dc38SAlim Akhtar GAT_PERIC_MCAN2_IPCLKPORT_CCLK, 21, CLK_IGNORE_UNUSED, 0),
613e3f3dc38SAlim Akhtar GATE(PERIC_MCAN2_IPCLKPORT_PCLK, "peric_mcan2_ipclkport_pclk", "mout_peric_pclk",
614e3f3dc38SAlim Akhtar GAT_PERIC_MCAN2_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
615e3f3dc38SAlim Akhtar GATE(PERIC_MCAN3_IPCLKPORT_CCLK, "peric_mcan3_ipclkport_cclk", "dout_peric_mcan_clk",
616e3f3dc38SAlim Akhtar GAT_PERIC_MCAN3_IPCLKPORT_CCLK, 21, CLK_IGNORE_UNUSED, 0),
617e3f3dc38SAlim Akhtar GATE(PERIC_MCAN3_IPCLKPORT_PCLK, "peric_mcan3_ipclkport_pclk", "mout_peric_pclk",
618e3f3dc38SAlim Akhtar GAT_PERIC_MCAN3_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
619e3f3dc38SAlim Akhtar GATE(PERIC_PWM0_IPCLKPORT_I_PCLK_S0, "peric_pwm0_ipclkport_i_pclk_s0", "mout_peric_pclk",
620e3f3dc38SAlim Akhtar GAT_PERIC_PWM0_IPCLKPORT_I_PCLK_S0, 21, CLK_IGNORE_UNUSED, 0),
621e3f3dc38SAlim Akhtar GATE(PERIC_PWM1_IPCLKPORT_I_PCLK_S0, "peric_pwm1_ipclkport_i_pclk_s0", "mout_peric_pclk",
622e3f3dc38SAlim Akhtar GAT_PERIC_PWM1_IPCLKPORT_I_PCLK_S0, 21, CLK_IGNORE_UNUSED, 0),
623e3f3dc38SAlim Akhtar GATE(0, "peric_smmu_ipclkport_cclk", "mout_peric_tbuclk",
624e3f3dc38SAlim Akhtar GAT_PERIC_SMMU_IPCLKPORT_CCLK, 21, CLK_IGNORE_UNUSED, 0),
625e3f3dc38SAlim Akhtar GATE(0, "peric_smmu_ipclkport_peric_bclk", "mout_peric_tbuclk",
626e3f3dc38SAlim Akhtar GAT_PERIC_SMMU_IPCLKPORT_PERIC_BCLK, 21, CLK_IGNORE_UNUSED, 0),
627e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_SPI0, "peric_spi0_ipclkport_i_pclk", "mout_peric_spi_pclk",
628e3f3dc38SAlim Akhtar GAT_PERIC_SPI0_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
629e3f3dc38SAlim Akhtar GATE(PERIC_SCLK_SPI0, "peric_spi0_ipclkport_i_sclk_spi", "dout_peric_spi_clk",
630e3f3dc38SAlim Akhtar GAT_PERIC_SPI0_IPCLKPORT_I_SCLK_SPI, 21, CLK_IGNORE_UNUSED, 0),
631e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_SPI1, "peric_spi1_ipclkport_i_pclk", "mout_peric_spi_pclk",
632e3f3dc38SAlim Akhtar GAT_PERIC_SPI1_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
633e3f3dc38SAlim Akhtar GATE(PERIC_SCLK_SPI1, "peric_spi1_ipclkport_i_sclk_spi", "dout_peric_spi_clk",
634e3f3dc38SAlim Akhtar GAT_PERIC_SPI1_IPCLKPORT_I_SCLK_SPI, 21, CLK_IGNORE_UNUSED, 0),
635e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_SPI2, "peric_spi2_ipclkport_i_pclk", "mout_peric_spi_pclk",
636e3f3dc38SAlim Akhtar GAT_PERIC_SPI2_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
637e3f3dc38SAlim Akhtar GATE(PERIC_SCLK_SPI2, "peric_spi2_ipclkport_i_sclk_spi", "dout_peric_spi_clk",
638e3f3dc38SAlim Akhtar GAT_PERIC_SPI2_IPCLKPORT_I_SCLK_SPI, 21, CLK_IGNORE_UNUSED, 0),
639e3f3dc38SAlim Akhtar GATE(PERIC_HCLK_TDM0, "peric_tdm0_ipclkport_hclk_m", "mout_peric_pclk",
640e3f3dc38SAlim Akhtar GAT_PERIC_TDM0_IPCLKPORT_HCLK_M, 21, CLK_IGNORE_UNUSED, 0),
641e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_TDM0, "peric_tdm0_ipclkport_pclk", "mout_peric_pclk",
642e3f3dc38SAlim Akhtar GAT_PERIC_TDM0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
643e3f3dc38SAlim Akhtar GATE(PERIC_HCLK_TDM1, "peric_tdm1_ipclkport_hclk_m", "mout_peric_pclk",
644e3f3dc38SAlim Akhtar GAT_PERIC_TDM1_IPCLKPORT_HCLK_M, 21, CLK_IGNORE_UNUSED, 0),
645e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_TDM1, "peric_tdm1_ipclkport_pclk", "mout_peric_pclk",
646e3f3dc38SAlim Akhtar GAT_PERIC_TDM1_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
647e3f3dc38SAlim Akhtar GATE(PERIC_SCLK_UART0, "peric_uart0_ipclkport_i_sclk_uart", "dout_peric_uart_clk",
648e3f3dc38SAlim Akhtar GAT_PERIC_UART0_IPCLKPORT_I_SCLK_UART, 21, CLK_IGNORE_UNUSED, 0),
649e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_UART0, "peric_uart0_ipclkport_pclk", "mout_peric_uart_pclk",
650e3f3dc38SAlim Akhtar GAT_PERIC_UART0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
651e3f3dc38SAlim Akhtar GATE(PERIC_SCLK_UART1, "peric_uart1_ipclkport_i_sclk_uart", "dout_peric_uart_clk",
652e3f3dc38SAlim Akhtar GAT_PERIC_UART1_IPCLKPORT_I_SCLK_UART, 21, CLK_IGNORE_UNUSED, 0),
653e3f3dc38SAlim Akhtar GATE(PERIC_PCLK_UART1, "peric_uart1_ipclkport_pclk", "mout_peric_uart_pclk",
654e3f3dc38SAlim Akhtar GAT_PERIC_UART1_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
655e3f3dc38SAlim Akhtar GATE(0, "peric_sysreg_peri_ipclkport_pclk", "mout_peric_pclk",
656e3f3dc38SAlim Akhtar GAT_SYSREG_PERI_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
657e3f3dc38SAlim Akhtar };
658e3f3dc38SAlim Akhtar
659e3f3dc38SAlim Akhtar static const struct samsung_cmu_info peric_cmu_info __initconst = {
660e3f3dc38SAlim Akhtar .mux_clks = peric_mux_clks,
661e3f3dc38SAlim Akhtar .nr_mux_clks = ARRAY_SIZE(peric_mux_clks),
662e3f3dc38SAlim Akhtar .div_clks = peric_div_clks,
663e3f3dc38SAlim Akhtar .nr_div_clks = ARRAY_SIZE(peric_div_clks),
664e3f3dc38SAlim Akhtar .gate_clks = peric_gate_clks,
665e3f3dc38SAlim Akhtar .nr_gate_clks = ARRAY_SIZE(peric_gate_clks),
666e3f3dc38SAlim Akhtar .fixed_clks = peric_fixed_clks,
667e3f3dc38SAlim Akhtar .nr_fixed_clks = ARRAY_SIZE(peric_fixed_clks),
668e3f3dc38SAlim Akhtar .nr_clk_ids = PERIC_NR_CLK,
669e3f3dc38SAlim Akhtar .clk_regs = peric_clk_regs,
670e3f3dc38SAlim Akhtar .nr_clk_regs = ARRAY_SIZE(peric_clk_regs),
671e3f3dc38SAlim Akhtar .clk_name = "dout_cmu_pll_shared0_div4",
672e3f3dc38SAlim Akhtar };
673e3f3dc38SAlim Akhtar
674a15e367bSAlim Akhtar /* Register Offset definitions for CMU_FSYS0 (0x15010000) */
675a15e367bSAlim Akhtar #define PLL_CON0_CLKCMU_FSYS0_UNIPRO 0x100
676a15e367bSAlim Akhtar #define PLL_CON0_CLK_FSYS0_SLAVEBUSCLK 0x140
677a15e367bSAlim Akhtar #define PLL_CON0_EQOS_RGMII_125_MUX1 0x160
678a15e367bSAlim Akhtar #define DIV_CLK_UNIPRO 0x1800
679a15e367bSAlim Akhtar #define DIV_EQS_RGMII_CLK_125 0x1804
680a15e367bSAlim Akhtar #define DIV_PERIBUS_GRP 0x1808
681a15e367bSAlim Akhtar #define DIV_EQOS_RII_CLK2O5 0x180c
682a15e367bSAlim Akhtar #define DIV_EQOS_RMIICLK_25 0x1810
683a15e367bSAlim Akhtar #define DIV_PCIE_PHY_OSCCLK 0x1814
684a15e367bSAlim Akhtar #define GAT_FSYS0_EQOS_TOP0_IPCLKPORT_CLK_PTP_REF_I 0x2004
685a15e367bSAlim Akhtar #define GAT_FSYS0_EQOS_TOP0_IPCLKPORT_CLK_RX_I 0x2008
686a15e367bSAlim Akhtar #define GAT_FSYS0_FSYS0_CMU_FSYS0_IPCLKPORT_PCLK 0x200c
687a15e367bSAlim Akhtar #define GAT_FSYS0_GPIO_FSYS0_IPCLKPORT_OSCCLK 0x2010
688a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_PLL_REFCLK_FROM_XO 0x2014
689a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_PIPE_PAL_INST_0_I_IMMORTAL_CLK 0x2018
690a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_AUX_CLK_SOC 0x201c
691a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_MPHY_REFCLK_IXTAL24 0x2020
692a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_MPHY_REFCLK_IXTAL26 0x2024
693a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_MPHY_REFCLK_IXTAL24 0x2028
694a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_MPHY_REFCLK_IXTAL26 0x202c
695a15e367bSAlim Akhtar #define GAT_FSYS0_AHBBR_FSYS0_IPCLKPORT_HCLK 0x2038
696a15e367bSAlim Akhtar #define GAT_FSYS0_AXI2APB_FSYS0_IPCLKPORT_ACLK 0x203c
697a15e367bSAlim Akhtar #define GAT_FSYS0_BUS_D_FSYS0_IPCLKPORT_MAINCLK 0x2040
698a15e367bSAlim Akhtar #define GAT_FSYS0_BUS_D_FSYS0_IPCLKPORT_PERICLK 0x2044
699a15e367bSAlim Akhtar #define GAT_FSYS0_BUS_P_FSYS0_IPCLKPORT_MAINCLK 0x2048
700a15e367bSAlim Akhtar #define GAT_FSYS0_BUS_P_FSYS0_IPCLKPORT_TCUCLK 0x204c
701a15e367bSAlim Akhtar #define GAT_FSYS0_CPE425_IPCLKPORT_ACLK 0x2050
702a15e367bSAlim Akhtar #define GAT_FSYS0_EQOS_TOP0_IPCLKPORT_ACLK_I 0x2054
703a15e367bSAlim Akhtar #define GAT_FSYS0_EQOS_TOP0_IPCLKPORT_HCLK_I 0x2058
704a15e367bSAlim Akhtar #define GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RGMII_CLK_I 0x205c
705a15e367bSAlim Akhtar #define GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RII_CLK_I 0x2060
706a15e367bSAlim Akhtar #define GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RMII_CLK_I 0x2064
707a15e367bSAlim Akhtar #define GAT_FSYS0_GPIO_FSYS0_IPCLKPORT_PCLK 0x2068
708a15e367bSAlim Akhtar #define GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_D 0x206c
709a15e367bSAlim Akhtar #define GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_D1 0x2070
710a15e367bSAlim Akhtar #define GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_P 0x2074
711a15e367bSAlim Akhtar #define GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_S 0x2078
712a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_I_APB_PCLK 0x207c
713a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_PLL_REFCLK_FROM_SYSPLL 0x2080
714a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_PIPE_PAL_INST_0_I_APB_PCLK_0 0x2084
715a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_DBI_ACLK_SOC 0x2088
716a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_I_DRIVER_APB_CLK 0x208c
717a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_MSTR_ACLK_SOC 0x2090
718a15e367bSAlim Akhtar #define GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_SLV_ACLK_SOC 0x2094
719a15e367bSAlim Akhtar #define GAT_FSYS0_SMMU_FSYS0_IPCLKPORT_CCLK 0x2098
720a15e367bSAlim Akhtar #define GAT_FSYS0_SMMU_FSYS0_IPCLKPORT_FSYS0_BCLK 0x209c
721a15e367bSAlim Akhtar #define GAT_FSYS0_SYSREG_FSYS0_IPCLKPORT_PCLK 0x20a0
722a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP0_IPCLKPORT_HCLK_BUS 0x20a4
723a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_ACLK 0x20a8
724a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_CLK_UNIPRO 0x20ac
725a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_FMP_CLK 0x20b0
726a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP1_IPCLKPORT_HCLK_BUS 0x20b4
727a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_ACLK 0x20b8
728a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_CLK_UNIPRO 0x20bc
729a15e367bSAlim Akhtar #define GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_FMP_CLK 0x20c0
730a15e367bSAlim Akhtar #define GAT_FSYS0_RII_CLK_DIVGATE 0x20d4
731a15e367bSAlim Akhtar
732a15e367bSAlim Akhtar static const unsigned long fsys0_clk_regs[] __initconst = {
733a15e367bSAlim Akhtar PLL_CON0_CLKCMU_FSYS0_UNIPRO,
734a15e367bSAlim Akhtar PLL_CON0_CLK_FSYS0_SLAVEBUSCLK,
735a15e367bSAlim Akhtar PLL_CON0_EQOS_RGMII_125_MUX1,
736a15e367bSAlim Akhtar DIV_CLK_UNIPRO,
737a15e367bSAlim Akhtar DIV_EQS_RGMII_CLK_125,
738a15e367bSAlim Akhtar DIV_PERIBUS_GRP,
739a15e367bSAlim Akhtar DIV_EQOS_RII_CLK2O5,
740a15e367bSAlim Akhtar DIV_EQOS_RMIICLK_25,
741a15e367bSAlim Akhtar DIV_PCIE_PHY_OSCCLK,
742a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_CLK_PTP_REF_I,
743a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_CLK_RX_I,
744a15e367bSAlim Akhtar GAT_FSYS0_FSYS0_CMU_FSYS0_IPCLKPORT_PCLK,
745a15e367bSAlim Akhtar GAT_FSYS0_GPIO_FSYS0_IPCLKPORT_OSCCLK,
746a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_PLL_REFCLK_FROM_XO,
747a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PIPE_PAL_INST_0_I_IMMORTAL_CLK,
748a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_AUX_CLK_SOC,
749a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_MPHY_REFCLK_IXTAL24,
750a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_MPHY_REFCLK_IXTAL26,
751a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_MPHY_REFCLK_IXTAL24,
752a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_MPHY_REFCLK_IXTAL26,
753a15e367bSAlim Akhtar GAT_FSYS0_AHBBR_FSYS0_IPCLKPORT_HCLK,
754a15e367bSAlim Akhtar GAT_FSYS0_AXI2APB_FSYS0_IPCLKPORT_ACLK,
755a15e367bSAlim Akhtar GAT_FSYS0_BUS_D_FSYS0_IPCLKPORT_MAINCLK,
756a15e367bSAlim Akhtar GAT_FSYS0_BUS_D_FSYS0_IPCLKPORT_PERICLK,
757a15e367bSAlim Akhtar GAT_FSYS0_BUS_P_FSYS0_IPCLKPORT_MAINCLK,
758a15e367bSAlim Akhtar GAT_FSYS0_BUS_P_FSYS0_IPCLKPORT_TCUCLK,
759a15e367bSAlim Akhtar GAT_FSYS0_CPE425_IPCLKPORT_ACLK,
760a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_ACLK_I,
761a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_HCLK_I,
762a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RGMII_CLK_I,
763a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RII_CLK_I,
764a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RMII_CLK_I,
765a15e367bSAlim Akhtar GAT_FSYS0_GPIO_FSYS0_IPCLKPORT_PCLK,
766a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_D,
767a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_D1,
768a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_P,
769a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_S,
770a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_I_APB_PCLK,
771a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_PLL_REFCLK_FROM_SYSPLL,
772a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PIPE_PAL_INST_0_I_APB_PCLK_0,
773a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_DBI_ACLK_SOC,
774a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_I_DRIVER_APB_CLK,
775a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_MSTR_ACLK_SOC,
776a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_SLV_ACLK_SOC,
777a15e367bSAlim Akhtar GAT_FSYS0_SMMU_FSYS0_IPCLKPORT_CCLK,
778a15e367bSAlim Akhtar GAT_FSYS0_SMMU_FSYS0_IPCLKPORT_FSYS0_BCLK,
779a15e367bSAlim Akhtar GAT_FSYS0_SYSREG_FSYS0_IPCLKPORT_PCLK,
780a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_HCLK_BUS,
781a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_ACLK,
782a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_CLK_UNIPRO,
783a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_FMP_CLK,
784a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_HCLK_BUS,
785a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_ACLK,
786a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_CLK_UNIPRO,
787a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_FMP_CLK,
788a15e367bSAlim Akhtar GAT_FSYS0_RII_CLK_DIVGATE,
789a15e367bSAlim Akhtar };
790a15e367bSAlim Akhtar
791a15e367bSAlim Akhtar static const struct samsung_fixed_rate_clock fsys0_fixed_clks[] __initconst = {
792a15e367bSAlim Akhtar FRATE(0, "pad_eqos0_phyrxclk", NULL, 0, 125000000),
793a15e367bSAlim Akhtar FRATE(0, "i_mphy_refclk_ixtal26", NULL, 0, 26000000),
794a15e367bSAlim Akhtar FRATE(0, "xtal_clk_pcie_phy", NULL, 0, 100000000),
795a15e367bSAlim Akhtar };
796a15e367bSAlim Akhtar
797a15e367bSAlim Akhtar /* List of parent clocks for Muxes in CMU_FSYS0 */
798a15e367bSAlim Akhtar PNAME(mout_fsys0_clkcmu_fsys0_unipro_p) = { "fin_pll", "dout_cmu_pll_shared0_div6" };
799a15e367bSAlim Akhtar PNAME(mout_fsys0_clk_fsys0_slavebusclk_p) = { "fin_pll", "dout_cmu_fsys0_shared1div4" };
800a15e367bSAlim Akhtar PNAME(mout_fsys0_eqos_rgmii_125_mux1_p) = { "fin_pll", "dout_cmu_fsys0_shared0div4" };
801a15e367bSAlim Akhtar
802a15e367bSAlim Akhtar static const struct samsung_mux_clock fsys0_mux_clks[] __initconst = {
803a15e367bSAlim Akhtar MUX(0, "mout_fsys0_clkcmu_fsys0_unipro", mout_fsys0_clkcmu_fsys0_unipro_p,
804a15e367bSAlim Akhtar PLL_CON0_CLKCMU_FSYS0_UNIPRO, 4, 1),
805a15e367bSAlim Akhtar MUX(0, "mout_fsys0_clk_fsys0_slavebusclk", mout_fsys0_clk_fsys0_slavebusclk_p,
806a15e367bSAlim Akhtar PLL_CON0_CLK_FSYS0_SLAVEBUSCLK, 4, 1),
807a15e367bSAlim Akhtar MUX(0, "mout_fsys0_eqos_rgmii_125_mux1", mout_fsys0_eqos_rgmii_125_mux1_p,
808a15e367bSAlim Akhtar PLL_CON0_EQOS_RGMII_125_MUX1, 4, 1),
809a15e367bSAlim Akhtar };
810a15e367bSAlim Akhtar
811a15e367bSAlim Akhtar static const struct samsung_div_clock fsys0_div_clks[] __initconst = {
812a15e367bSAlim Akhtar DIV(0, "dout_fsys0_clk_unipro", "mout_fsys0_clkcmu_fsys0_unipro", DIV_CLK_UNIPRO, 0, 4),
813a15e367bSAlim Akhtar DIV(0, "dout_fsys0_eqs_rgmii_clk_125", "mout_fsys0_eqos_rgmii_125_mux1",
814a15e367bSAlim Akhtar DIV_EQS_RGMII_CLK_125, 0, 4),
815a15e367bSAlim Akhtar DIV(FSYS0_DOUT_FSYS0_PERIBUS_GRP, "dout_fsys0_peribus_grp",
816a15e367bSAlim Akhtar "mout_fsys0_clk_fsys0_slavebusclk", DIV_PERIBUS_GRP, 0, 4),
817a15e367bSAlim Akhtar DIV(0, "dout_fsys0_eqos_rii_clk2o5", "fsys0_rii_clk_divgate", DIV_EQOS_RII_CLK2O5, 0, 4),
818a15e367bSAlim Akhtar DIV(0, "dout_fsys0_eqos_rmiiclk_25", "mout_fsys0_eqos_rgmii_125_mux1",
819a15e367bSAlim Akhtar DIV_EQOS_RMIICLK_25, 0, 5),
820a15e367bSAlim Akhtar DIV(0, "dout_fsys0_pcie_phy_oscclk", "mout_fsys0_eqos_rgmii_125_mux1",
821a15e367bSAlim Akhtar DIV_PCIE_PHY_OSCCLK, 0, 4),
822a15e367bSAlim Akhtar };
823a15e367bSAlim Akhtar
824a15e367bSAlim Akhtar static const struct samsung_gate_clock fsys0_gate_clks[] __initconst = {
825a15e367bSAlim Akhtar GATE(FSYS0_EQOS_TOP0_IPCLKPORT_CLK_RX_I, "fsys0_eqos_top0_ipclkport_clk_rx_i",
826a15e367bSAlim Akhtar "pad_eqos0_phyrxclk", GAT_FSYS0_EQOS_TOP0_IPCLKPORT_CLK_RX_I, 21,
827a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
828a15e367bSAlim Akhtar GATE(PCIE_SUBCTRL_INST0_AUX_CLK_SOC,
829a15e367bSAlim Akhtar "fsys0_pcie_top_ipclkport_fsd_pcie_sub_ctrl_inst_0_aux_clk_soc", "fin_pll",
830a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_AUX_CLK_SOC, 21,
831a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
832a15e367bSAlim Akhtar GATE(0, "fsys0_fsys0_cmu_fsys0_ipclkport_pclk", "dout_fsys0_peribus_grp",
833a15e367bSAlim Akhtar GAT_FSYS0_FSYS0_CMU_FSYS0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
834a15e367bSAlim Akhtar GATE(0,
835a15e367bSAlim Akhtar "fsys0_pcie_top_ipclkport_pcieg3_phy_x4_inst_0_pll_refclk_from_xo",
836a15e367bSAlim Akhtar "xtal_clk_pcie_phy",
837a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_PLL_REFCLK_FROM_XO, 21,
838a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
839a15e367bSAlim Akhtar GATE(UFS0_MPHY_REFCLK_IXTAL24, "fsys0_ufs_top0_ipclkport_i_mphy_refclk_ixtal24",
840a15e367bSAlim Akhtar "i_mphy_refclk_ixtal26", GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_MPHY_REFCLK_IXTAL24, 21,
841a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
842a15e367bSAlim Akhtar GATE(UFS0_MPHY_REFCLK_IXTAL26, "fsys0_ufs_top0_ipclkport_i_mphy_refclk_ixtal26",
843a15e367bSAlim Akhtar "i_mphy_refclk_ixtal26", GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_MPHY_REFCLK_IXTAL26, 21,
844a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
845a15e367bSAlim Akhtar GATE(UFS1_MPHY_REFCLK_IXTAL24, "fsys0_ufs_top1_ipclkport_i_mphy_refclk_ixtal24",
846a15e367bSAlim Akhtar "i_mphy_refclk_ixtal26", GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_MPHY_REFCLK_IXTAL24, 21,
847a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
848a15e367bSAlim Akhtar GATE(UFS1_MPHY_REFCLK_IXTAL26, "fsys0_ufs_top1_ipclkport_i_mphy_refclk_ixtal26",
849a15e367bSAlim Akhtar "i_mphy_refclk_ixtal26", GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_MPHY_REFCLK_IXTAL26, 21,
850a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
851a15e367bSAlim Akhtar GATE(0, "fsys0_ahbbr_fsys0_ipclkport_hclk", "dout_fsys0_peribus_grp",
852a15e367bSAlim Akhtar GAT_FSYS0_AHBBR_FSYS0_IPCLKPORT_HCLK, 21, CLK_IGNORE_UNUSED, 0),
853a15e367bSAlim Akhtar GATE(0, "fsys0_axi2apb_fsys0_ipclkport_aclk", "dout_fsys0_peribus_grp",
854a15e367bSAlim Akhtar GAT_FSYS0_AXI2APB_FSYS0_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
855a15e367bSAlim Akhtar GATE(0, "fsys0_bus_d_fsys0_ipclkport_mainclk", "mout_fsys0_clk_fsys0_slavebusclk",
856a15e367bSAlim Akhtar GAT_FSYS0_BUS_D_FSYS0_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
857a15e367bSAlim Akhtar GATE(0, "fsys0_bus_d_fsys0_ipclkport_periclk", "dout_fsys0_peribus_grp",
858a15e367bSAlim Akhtar GAT_FSYS0_BUS_D_FSYS0_IPCLKPORT_PERICLK, 21, CLK_IGNORE_UNUSED, 0),
859a15e367bSAlim Akhtar GATE(0, "fsys0_bus_p_fsys0_ipclkport_mainclk", "dout_fsys0_peribus_grp",
860a15e367bSAlim Akhtar GAT_FSYS0_BUS_P_FSYS0_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
861a15e367bSAlim Akhtar GATE(0, "fsys0_bus_p_fsys0_ipclkport_tcuclk", "mout_fsys0_eqos_rgmii_125_mux1",
862a15e367bSAlim Akhtar GAT_FSYS0_BUS_P_FSYS0_IPCLKPORT_TCUCLK, 21, CLK_IGNORE_UNUSED, 0),
863a15e367bSAlim Akhtar GATE(0, "fsys0_cpe425_ipclkport_aclk", "mout_fsys0_clk_fsys0_slavebusclk",
864a15e367bSAlim Akhtar GAT_FSYS0_CPE425_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
865a15e367bSAlim Akhtar GATE(FSYS0_EQOS_TOP0_IPCLKPORT_ACLK_I, "fsys0_eqos_top0_ipclkport_aclk_i",
866a15e367bSAlim Akhtar "dout_fsys0_peribus_grp", GAT_FSYS0_EQOS_TOP0_IPCLKPORT_ACLK_I, 21,
867a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
868a15e367bSAlim Akhtar GATE(FSYS0_EQOS_TOP0_IPCLKPORT_HCLK_I, "fsys0_eqos_top0_ipclkport_hclk_i",
869a15e367bSAlim Akhtar "dout_fsys0_peribus_grp", GAT_FSYS0_EQOS_TOP0_IPCLKPORT_HCLK_I, 21,
870a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
871a15e367bSAlim Akhtar GATE(FSYS0_EQOS_TOP0_IPCLKPORT_RGMII_CLK_I, "fsys0_eqos_top0_ipclkport_rgmii_clk_i",
872a15e367bSAlim Akhtar "dout_fsys0_eqs_rgmii_clk_125", GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RGMII_CLK_I, 21,
873a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
874a15e367bSAlim Akhtar GATE(0, "fsys0_eqos_top0_ipclkport_rii_clk_i", "dout_fsys0_eqos_rii_clk2o5",
875a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RII_CLK_I, 21, CLK_IGNORE_UNUSED, 0),
876a15e367bSAlim Akhtar GATE(0, "fsys0_eqos_top0_ipclkport_rmii_clk_i", "dout_fsys0_eqos_rmiiclk_25",
877a15e367bSAlim Akhtar GAT_FSYS0_EQOS_TOP0_IPCLKPORT_RMII_CLK_I, 21, CLK_IGNORE_UNUSED, 0),
878a15e367bSAlim Akhtar GATE(0, "fsys0_gpio_fsys0_ipclkport_pclk", "dout_fsys0_peribus_grp",
879a15e367bSAlim Akhtar GAT_FSYS0_GPIO_FSYS0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
880a15e367bSAlim Akhtar GATE(0, "fsys0_gpio_fsys0_ipclkport_oscclk", "fin_pll",
881a15e367bSAlim Akhtar GAT_FSYS0_GPIO_FSYS0_IPCLKPORT_OSCCLK, 21, CLK_IGNORE_UNUSED, 0),
882a15e367bSAlim Akhtar GATE(0, "fsys0_ns_brdg_fsys0_ipclkport_clk__psoc_fsys0__clk_fsys0_d",
883a15e367bSAlim Akhtar "mout_fsys0_clk_fsys0_slavebusclk",
884a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_D, 21,
885a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
886a15e367bSAlim Akhtar GATE(0, "fsys0_ns_brdg_fsys0_ipclkport_clk__psoc_fsys0__clk_fsys0_d1",
887a15e367bSAlim Akhtar "mout_fsys0_eqos_rgmii_125_mux1",
888a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_D1, 21,
889a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
890a15e367bSAlim Akhtar GATE(0, "fsys0_ns_brdg_fsys0_ipclkport_clk__psoc_fsys0__clk_fsys0_p",
891a15e367bSAlim Akhtar "dout_fsys0_peribus_grp",
892a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_P, 21,
893a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
894a15e367bSAlim Akhtar GATE(0, "fsys0_ns_brdg_fsys0_ipclkport_clk__psoc_fsys0__clk_fsys0_s",
895a15e367bSAlim Akhtar "mout_fsys0_clk_fsys0_slavebusclk",
896a15e367bSAlim Akhtar GAT_FSYS0_NS_BRDG_FSYS0_IPCLKPORT_CLK__PSOC_FSYS0__CLK_FSYS0_S, 21,
897a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
898a15e367bSAlim Akhtar GATE(0, "fsys0_pcie_top_ipclkport_pcieg3_phy_x4_inst_0_i_apb_pclk",
899a15e367bSAlim Akhtar "dout_fsys0_peribus_grp",
900a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_I_APB_PCLK, 21,
901a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
902a15e367bSAlim Akhtar GATE(0,
903a15e367bSAlim Akhtar "fsys0_pcie_top_ipclkport_pcieg3_phy_x4_inst_0_pll_refclk_from_syspll",
904a15e367bSAlim Akhtar "dout_fsys0_pcie_phy_oscclk",
905a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PCIEG3_PHY_X4_INST_0_PLL_REFCLK_FROM_SYSPLL,
906a15e367bSAlim Akhtar 21, CLK_IGNORE_UNUSED, 0),
907a15e367bSAlim Akhtar GATE(0, "fsys0_pcie_top_ipclkport_pipe_pal_inst_0_i_apb_pclk_0", "dout_fsys0_peribus_grp",
908a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PIPE_PAL_INST_0_I_APB_PCLK_0, 21, CLK_IGNORE_UNUSED, 0),
909a15e367bSAlim Akhtar GATE(0, "fsys0_pcie_top_ipclkport_pipe_pal_inst_0_i_immortal_clk", "fin_pll",
910a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_PIPE_PAL_INST_0_I_IMMORTAL_CLK, 21, CLK_IGNORE_UNUSED, 0),
911a15e367bSAlim Akhtar GATE(PCIE_SUBCTRL_INST0_DBI_ACLK_SOC,
912a15e367bSAlim Akhtar "fsys0_pcie_top_ipclkport_fsd_pcie_sub_ctrl_inst_0_dbi_aclk_soc",
913a15e367bSAlim Akhtar "dout_fsys0_peribus_grp",
914a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_DBI_ACLK_SOC, 21,
915a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
916a15e367bSAlim Akhtar GATE(0, "fsys0_pcie_top_ipclkport_fsd_pcie_sub_ctrl_inst_0_i_driver_apb_clk",
917a15e367bSAlim Akhtar "dout_fsys0_peribus_grp",
918a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_I_DRIVER_APB_CLK, 21,
919a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
920a15e367bSAlim Akhtar GATE(PCIE_SUBCTRL_INST0_MSTR_ACLK_SOC,
921a15e367bSAlim Akhtar "fsys0_pcie_top_ipclkport_fsd_pcie_sub_ctrl_inst_0_mstr_aclk_soc",
922a15e367bSAlim Akhtar "mout_fsys0_clk_fsys0_slavebusclk",
923a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_MSTR_ACLK_SOC, 21,
924a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
925a15e367bSAlim Akhtar GATE(PCIE_SUBCTRL_INST0_SLV_ACLK_SOC,
926a15e367bSAlim Akhtar "fsys0_pcie_top_ipclkport_fsd_pcie_sub_ctrl_inst_0_slv_aclk_soc",
927a15e367bSAlim Akhtar "mout_fsys0_clk_fsys0_slavebusclk",
928a15e367bSAlim Akhtar GAT_FSYS0_PCIE_TOP_IPCLKPORT_FSD_PCIE_SUB_CTRL_INST_0_SLV_ACLK_SOC, 21,
929a15e367bSAlim Akhtar CLK_IGNORE_UNUSED, 0),
930a15e367bSAlim Akhtar GATE(0, "fsys0_smmu_fsys0_ipclkport_cclk", "mout_fsys0_eqos_rgmii_125_mux1",
931a15e367bSAlim Akhtar GAT_FSYS0_SMMU_FSYS0_IPCLKPORT_CCLK, 21, CLK_IGNORE_UNUSED, 0),
932a15e367bSAlim Akhtar GATE(0, "fsys0_smmu_fsys0_ipclkport_fsys0_bclk", "mout_fsys0_clk_fsys0_slavebusclk",
933a15e367bSAlim Akhtar GAT_FSYS0_SMMU_FSYS0_IPCLKPORT_FSYS0_BCLK, 21, CLK_IGNORE_UNUSED, 0),
934a15e367bSAlim Akhtar GATE(0, "fsys0_sysreg_fsys0_ipclkport_pclk", "dout_fsys0_peribus_grp",
935a15e367bSAlim Akhtar GAT_FSYS0_SYSREG_FSYS0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
936a15e367bSAlim Akhtar GATE(UFS0_TOP0_HCLK_BUS, "fsys0_ufs_top0_ipclkport_hclk_bus", "dout_fsys0_peribus_grp",
937a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_HCLK_BUS, 21, CLK_IGNORE_UNUSED, 0),
938a15e367bSAlim Akhtar GATE(UFS0_TOP0_ACLK, "fsys0_ufs_top0_ipclkport_i_aclk", "dout_fsys0_peribus_grp",
939a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
940a15e367bSAlim Akhtar GATE(UFS0_TOP0_CLK_UNIPRO, "fsys0_ufs_top0_ipclkport_i_clk_unipro", "dout_fsys0_clk_unipro",
941a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_CLK_UNIPRO, 21, CLK_IGNORE_UNUSED, 0),
942a15e367bSAlim Akhtar GATE(UFS0_TOP0_FMP_CLK, "fsys0_ufs_top0_ipclkport_i_fmp_clk", "dout_fsys0_peribus_grp",
943a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP0_IPCLKPORT_I_FMP_CLK, 21, CLK_IGNORE_UNUSED, 0),
944a15e367bSAlim Akhtar GATE(UFS1_TOP1_HCLK_BUS, "fsys0_ufs_top1_ipclkport_hclk_bus", "dout_fsys0_peribus_grp",
945a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_HCLK_BUS, 21, CLK_IGNORE_UNUSED, 0),
946a15e367bSAlim Akhtar GATE(UFS1_TOP1_ACLK, "fsys0_ufs_top1_ipclkport_i_aclk", "dout_fsys0_peribus_grp",
947a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
948a15e367bSAlim Akhtar GATE(UFS1_TOP1_CLK_UNIPRO, "fsys0_ufs_top1_ipclkport_i_clk_unipro", "dout_fsys0_clk_unipro",
949a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_CLK_UNIPRO, 21, CLK_IGNORE_UNUSED, 0),
950a15e367bSAlim Akhtar GATE(UFS1_TOP1_FMP_CLK, "fsys0_ufs_top1_ipclkport_i_fmp_clk", "dout_fsys0_peribus_grp",
951a15e367bSAlim Akhtar GAT_FSYS0_UFS_TOP1_IPCLKPORT_I_FMP_CLK, 21, CLK_IGNORE_UNUSED, 0),
952a15e367bSAlim Akhtar GATE(0, "fsys0_rii_clk_divgate", "dout_fsys0_eqos_rmiiclk_25", GAT_FSYS0_RII_CLK_DIVGATE,
953a15e367bSAlim Akhtar 21, CLK_IGNORE_UNUSED, 0),
954a15e367bSAlim Akhtar GATE(FSYS0_EQOS_TOP0_IPCLKPORT_CLK_PTP_REF_I, "fsys0_eqos_top0_ipclkport_clk_ptp_ref_i",
955a15e367bSAlim Akhtar "fin_pll", GAT_FSYS0_EQOS_TOP0_IPCLKPORT_CLK_PTP_REF_I, 21, CLK_IGNORE_UNUSED, 0),
956a15e367bSAlim Akhtar };
957a15e367bSAlim Akhtar
958a15e367bSAlim Akhtar static const struct samsung_cmu_info fsys0_cmu_info __initconst = {
959a15e367bSAlim Akhtar .mux_clks = fsys0_mux_clks,
960a15e367bSAlim Akhtar .nr_mux_clks = ARRAY_SIZE(fsys0_mux_clks),
961a15e367bSAlim Akhtar .div_clks = fsys0_div_clks,
962a15e367bSAlim Akhtar .nr_div_clks = ARRAY_SIZE(fsys0_div_clks),
963a15e367bSAlim Akhtar .gate_clks = fsys0_gate_clks,
964a15e367bSAlim Akhtar .nr_gate_clks = ARRAY_SIZE(fsys0_gate_clks),
965a15e367bSAlim Akhtar .fixed_clks = fsys0_fixed_clks,
966a15e367bSAlim Akhtar .nr_fixed_clks = ARRAY_SIZE(fsys0_fixed_clks),
967a15e367bSAlim Akhtar .nr_clk_ids = FSYS0_NR_CLK,
968a15e367bSAlim Akhtar .clk_regs = fsys0_clk_regs,
969a15e367bSAlim Akhtar .nr_clk_regs = ARRAY_SIZE(fsys0_clk_regs),
970a15e367bSAlim Akhtar .clk_name = "dout_cmu_fsys0_shared1div4",
971a15e367bSAlim Akhtar };
972a15e367bSAlim Akhtar
973bfbce52eSAlim Akhtar /* Register Offset definitions for CMU_FSYS1 (0x16810000) */
974bfbce52eSAlim Akhtar #define PLL_CON0_ACLK_FSYS1_BUSP_MUX 0x100
975bfbce52eSAlim Akhtar #define PLL_CON0_PCLKL_FSYS1_BUSP_MUX 0x180
976bfbce52eSAlim Akhtar #define DIV_CLK_FSYS1_PHY0_OSCCLK 0x1800
977bfbce52eSAlim Akhtar #define DIV_CLK_FSYS1_PHY1_OSCCLK 0x1804
978bfbce52eSAlim Akhtar #define GAT_FSYS1_CMU_FSYS1_IPCLKPORT_PCLK 0x2000
979bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK0_IPCLKPORT_AUXCLK 0x2004
980bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_SOC_REF_CLK 0x2008
981bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK1_IPCLKPORT_AUXCLK 0x200c
982bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_REF_XTAL 0x202c
983bfbce52eSAlim Akhtar #define GAT_FSYS1_PHY0_OSCCLLK 0x2034
984bfbce52eSAlim Akhtar #define GAT_FSYS1_PHY1_OSCCLK 0x2038
985bfbce52eSAlim Akhtar #define GAT_FSYS1_AXI2APB_FSYS1_IPCLKPORT_ACLK 0x203c
986bfbce52eSAlim Akhtar #define GAT_FSYS1_BUS_D0_FSYS1_IPCLKPORT_MAINCLK 0x2040
987bfbce52eSAlim Akhtar #define GAT_FSYS1_BUS_S0_FSYS1_IPCLKPORT_M250CLK 0x2048
988bfbce52eSAlim Akhtar #define GAT_FSYS1_BUS_S0_FSYS1_IPCLKPORT_MAINCLK 0x204c
989bfbce52eSAlim Akhtar #define GAT_FSYS1_CPE425_0_FSYS1_IPCLKPORT_ACLK 0x2054
990bfbce52eSAlim Akhtar #define GAT_FSYS1_NS_BRDG_FSYS1_IPCLKPORT_CLK__PSOC_FSYS1__CLK_FSYS1_D0 0x205c
991bfbce52eSAlim Akhtar #define GAT_FSYS1_NS_BRDG_FSYS1_IPCLKPORT_CLK__PSOC_FSYS1__CLK_FSYS1_S0 0x2064
992bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK0_IPCLKPORT_DBI_ACLK 0x206c
993bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_APB_CLK 0x2070
994bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_DRIVER_APB_CLK 0x2074
995bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK0_IPCLKPORT_MSTR_ACLK 0x2078
996bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK0_IPCLKPORT_SLV_ACLK 0x207c
997bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK1_IPCLKPORT_DBI_ACLK 0x2080
998bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK1_IPCLKPORT_I_DRIVER_APB_CLK 0x2084
999bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK1_IPCLKPORT_MSTR_ACLK 0x2088
1000bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_LINK1_IPCLKPORT_SLV_ACLK 0x208c
1001bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_APB_CLK 0x20a4
1002bfbce52eSAlim Akhtar #define GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_REF_SOC_PLL 0x20a8
1003bfbce52eSAlim Akhtar #define GAT_FSYS1_SYSREG_FSYS1_IPCLKPORT_PCLK 0x20b4
1004bfbce52eSAlim Akhtar #define GAT_FSYS1_TBU0_FSYS1_IPCLKPORT_ACLK 0x20b8
1005bfbce52eSAlim Akhtar
1006bfbce52eSAlim Akhtar static const unsigned long fsys1_clk_regs[] __initconst = {
1007bfbce52eSAlim Akhtar PLL_CON0_ACLK_FSYS1_BUSP_MUX,
1008bfbce52eSAlim Akhtar PLL_CON0_PCLKL_FSYS1_BUSP_MUX,
1009bfbce52eSAlim Akhtar DIV_CLK_FSYS1_PHY0_OSCCLK,
1010bfbce52eSAlim Akhtar DIV_CLK_FSYS1_PHY1_OSCCLK,
1011bfbce52eSAlim Akhtar GAT_FSYS1_CMU_FSYS1_IPCLKPORT_PCLK,
1012bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_AUXCLK,
1013bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_SOC_REF_CLK,
1014bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK1_IPCLKPORT_AUXCLK,
1015bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_REF_XTAL,
1016bfbce52eSAlim Akhtar GAT_FSYS1_PHY0_OSCCLLK,
1017bfbce52eSAlim Akhtar GAT_FSYS1_PHY1_OSCCLK,
1018bfbce52eSAlim Akhtar GAT_FSYS1_AXI2APB_FSYS1_IPCLKPORT_ACLK,
1019bfbce52eSAlim Akhtar GAT_FSYS1_BUS_D0_FSYS1_IPCLKPORT_MAINCLK,
1020bfbce52eSAlim Akhtar GAT_FSYS1_BUS_S0_FSYS1_IPCLKPORT_M250CLK,
1021bfbce52eSAlim Akhtar GAT_FSYS1_BUS_S0_FSYS1_IPCLKPORT_MAINCLK,
1022bfbce52eSAlim Akhtar GAT_FSYS1_CPE425_0_FSYS1_IPCLKPORT_ACLK,
1023bfbce52eSAlim Akhtar GAT_FSYS1_NS_BRDG_FSYS1_IPCLKPORT_CLK__PSOC_FSYS1__CLK_FSYS1_D0,
1024bfbce52eSAlim Akhtar GAT_FSYS1_NS_BRDG_FSYS1_IPCLKPORT_CLK__PSOC_FSYS1__CLK_FSYS1_S0,
1025bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_DBI_ACLK,
1026bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_APB_CLK,
1027bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_DRIVER_APB_CLK,
1028bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_MSTR_ACLK,
1029bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_SLV_ACLK,
1030bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK1_IPCLKPORT_DBI_ACLK,
1031bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK1_IPCLKPORT_I_DRIVER_APB_CLK,
1032bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK1_IPCLKPORT_MSTR_ACLK,
1033bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK1_IPCLKPORT_SLV_ACLK,
1034bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_APB_CLK,
1035bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_REF_SOC_PLL,
1036bfbce52eSAlim Akhtar GAT_FSYS1_SYSREG_FSYS1_IPCLKPORT_PCLK,
1037bfbce52eSAlim Akhtar GAT_FSYS1_TBU0_FSYS1_IPCLKPORT_ACLK,
1038bfbce52eSAlim Akhtar };
1039bfbce52eSAlim Akhtar
1040bfbce52eSAlim Akhtar static const struct samsung_fixed_rate_clock fsys1_fixed_clks[] __initconst = {
1041bfbce52eSAlim Akhtar FRATE(0, "clk_fsys1_phy0_ref", NULL, 0, 100000000),
1042bfbce52eSAlim Akhtar FRATE(0, "clk_fsys1_phy1_ref", NULL, 0, 100000000),
1043bfbce52eSAlim Akhtar };
1044bfbce52eSAlim Akhtar
1045bfbce52eSAlim Akhtar /* List of parent clocks for Muxes in CMU_FSYS1 */
1046bfbce52eSAlim Akhtar PNAME(mout_fsys1_pclkl_fsys1_busp_mux_p) = { "fin_pll", "dout_cmu_fsys1_shared0div8" };
1047bfbce52eSAlim Akhtar PNAME(mout_fsys1_aclk_fsys1_busp_mux_p) = { "fin_pll", "dout_cmu_fsys1_shared0div4" };
1048bfbce52eSAlim Akhtar
1049bfbce52eSAlim Akhtar static const struct samsung_mux_clock fsys1_mux_clks[] __initconst = {
1050bfbce52eSAlim Akhtar MUX(0, "mout_fsys1_pclkl_fsys1_busp_mux", mout_fsys1_pclkl_fsys1_busp_mux_p,
1051bfbce52eSAlim Akhtar PLL_CON0_PCLKL_FSYS1_BUSP_MUX, 4, 1),
1052bfbce52eSAlim Akhtar MUX(0, "mout_fsys1_aclk_fsys1_busp_mux", mout_fsys1_aclk_fsys1_busp_mux_p,
1053bfbce52eSAlim Akhtar PLL_CON0_ACLK_FSYS1_BUSP_MUX, 4, 1),
1054bfbce52eSAlim Akhtar };
1055bfbce52eSAlim Akhtar
1056bfbce52eSAlim Akhtar static const struct samsung_div_clock fsys1_div_clks[] __initconst = {
1057bfbce52eSAlim Akhtar DIV(0, "dout_fsys1_clk_fsys1_phy0_oscclk", "fsys1_phy0_osccllk",
1058bfbce52eSAlim Akhtar DIV_CLK_FSYS1_PHY0_OSCCLK, 0, 4),
1059bfbce52eSAlim Akhtar DIV(0, "dout_fsys1_clk_fsys1_phy1_oscclk", "fsys1_phy1_oscclk",
1060bfbce52eSAlim Akhtar DIV_CLK_FSYS1_PHY1_OSCCLK, 0, 4),
1061bfbce52eSAlim Akhtar };
1062bfbce52eSAlim Akhtar
1063bfbce52eSAlim Akhtar static const struct samsung_gate_clock fsys1_gate_clks[] __initconst = {
1064bfbce52eSAlim Akhtar GATE(0, "fsys1_cmu_fsys1_ipclkport_pclk", "mout_fsys1_pclkl_fsys1_busp_mux",
1065bfbce52eSAlim Akhtar GAT_FSYS1_CMU_FSYS1_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1066bfbce52eSAlim Akhtar GATE(0, "fsys1_pcie_phy0_ipclkport_i_ref_xtal", "clk_fsys1_phy0_ref",
1067bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_REF_XTAL, 21, CLK_IGNORE_UNUSED, 0),
1068bfbce52eSAlim Akhtar GATE(0, "fsys1_phy0_osccllk", "mout_fsys1_aclk_fsys1_busp_mux",
1069bfbce52eSAlim Akhtar GAT_FSYS1_PHY0_OSCCLLK, 21, CLK_IGNORE_UNUSED, 0),
1070bfbce52eSAlim Akhtar GATE(0, "fsys1_phy1_oscclk", "mout_fsys1_aclk_fsys1_busp_mux",
1071bfbce52eSAlim Akhtar GAT_FSYS1_PHY1_OSCCLK, 21, CLK_IGNORE_UNUSED, 0),
1072bfbce52eSAlim Akhtar GATE(0, "fsys1_axi2apb_fsys1_ipclkport_aclk", "mout_fsys1_pclkl_fsys1_busp_mux",
1073bfbce52eSAlim Akhtar GAT_FSYS1_AXI2APB_FSYS1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1074bfbce52eSAlim Akhtar GATE(0, "fsys1_bus_d0_fsys1_ipclkport_mainclk", "mout_fsys1_aclk_fsys1_busp_mux",
1075bfbce52eSAlim Akhtar GAT_FSYS1_BUS_D0_FSYS1_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
1076bfbce52eSAlim Akhtar GATE(0, "fsys1_bus_s0_fsys1_ipclkport_m250clk", "mout_fsys1_pclkl_fsys1_busp_mux",
1077bfbce52eSAlim Akhtar GAT_FSYS1_BUS_S0_FSYS1_IPCLKPORT_M250CLK, 21, CLK_IGNORE_UNUSED, 0),
1078bfbce52eSAlim Akhtar GATE(0, "fsys1_bus_s0_fsys1_ipclkport_mainclk", "mout_fsys1_aclk_fsys1_busp_mux",
1079bfbce52eSAlim Akhtar GAT_FSYS1_BUS_S0_FSYS1_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
1080bfbce52eSAlim Akhtar GATE(0, "fsys1_cpe425_0_fsys1_ipclkport_aclk", "mout_fsys1_aclk_fsys1_busp_mux",
1081bfbce52eSAlim Akhtar GAT_FSYS1_CPE425_0_FSYS1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1082bfbce52eSAlim Akhtar GATE(0, "fsys1_ns_brdg_fsys1_ipclkport_clk__psoc_fsys1__clk_fsys1_d0",
1083bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux",
1084bfbce52eSAlim Akhtar GAT_FSYS1_NS_BRDG_FSYS1_IPCLKPORT_CLK__PSOC_FSYS1__CLK_FSYS1_D0, 21,
1085bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1086bfbce52eSAlim Akhtar GATE(0, "fsys1_ns_brdg_fsys1_ipclkport_clk__psoc_fsys1__clk_fsys1_s0",
1087bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux",
1088bfbce52eSAlim Akhtar GAT_FSYS1_NS_BRDG_FSYS1_IPCLKPORT_CLK__PSOC_FSYS1__CLK_FSYS1_S0, 21,
1089bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1090bfbce52eSAlim Akhtar GATE(PCIE_LINK0_IPCLKPORT_DBI_ACLK, "fsys1_pcie_link0_ipclkport_dbi_aclk",
1091bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux", GAT_FSYS1_PCIE_LINK0_IPCLKPORT_DBI_ACLK, 21,
1092bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1093bfbce52eSAlim Akhtar GATE(0, "fsys1_pcie_link0_ipclkport_i_apb_clk", "mout_fsys1_pclkl_fsys1_busp_mux",
1094bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_APB_CLK, 21, CLK_IGNORE_UNUSED, 0),
1095bfbce52eSAlim Akhtar GATE(0, "fsys1_pcie_link0_ipclkport_i_soc_ref_clk", "fin_pll",
1096bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_SOC_REF_CLK, 21, CLK_IGNORE_UNUSED, 0),
1097bfbce52eSAlim Akhtar GATE(0, "fsys1_pcie_link0_ipclkport_i_driver_apb_clk", "mout_fsys1_pclkl_fsys1_busp_mux",
1098bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_I_DRIVER_APB_CLK, 21, CLK_IGNORE_UNUSED, 0),
1099bfbce52eSAlim Akhtar GATE(PCIE_LINK0_IPCLKPORT_MSTR_ACLK, "fsys1_pcie_link0_ipclkport_mstr_aclk",
1100bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux", GAT_FSYS1_PCIE_LINK0_IPCLKPORT_MSTR_ACLK, 21,
1101bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1102bfbce52eSAlim Akhtar GATE(PCIE_LINK0_IPCLKPORT_SLV_ACLK, "fsys1_pcie_link0_ipclkport_slv_aclk",
1103bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux", GAT_FSYS1_PCIE_LINK0_IPCLKPORT_SLV_ACLK, 21,
1104bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1105bfbce52eSAlim Akhtar GATE(PCIE_LINK1_IPCLKPORT_DBI_ACLK, "fsys1_pcie_link1_ipclkport_dbi_aclk",
1106bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux", GAT_FSYS1_PCIE_LINK1_IPCLKPORT_DBI_ACLK, 21,
1107bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1108bfbce52eSAlim Akhtar GATE(0, "fsys1_pcie_link1_ipclkport_i_driver_apb_clk", "mout_fsys1_pclkl_fsys1_busp_mux",
1109bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK1_IPCLKPORT_I_DRIVER_APB_CLK, 21, CLK_IGNORE_UNUSED, 0),
1110bfbce52eSAlim Akhtar GATE(PCIE_LINK1_IPCLKPORT_MSTR_ACLK, "fsys1_pcie_link1_ipclkport_mstr_aclk",
1111bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux", GAT_FSYS1_PCIE_LINK1_IPCLKPORT_MSTR_ACLK, 21,
1112bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1113bfbce52eSAlim Akhtar GATE(PCIE_LINK1_IPCLKPORT_SLV_ACLK, "fsys1_pcie_link1_ipclkport_slv_aclk",
1114bfbce52eSAlim Akhtar "mout_fsys1_aclk_fsys1_busp_mux", GAT_FSYS1_PCIE_LINK1_IPCLKPORT_SLV_ACLK, 21,
1115bfbce52eSAlim Akhtar CLK_IGNORE_UNUSED, 0),
1116bfbce52eSAlim Akhtar GATE(0, "fsys1_pcie_phy0_ipclkport_i_apb_clk", "mout_fsys1_pclkl_fsys1_busp_mux",
1117bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_APB_CLK, 21, CLK_IGNORE_UNUSED, 0),
1118bfbce52eSAlim Akhtar GATE(PCIE_LINK0_IPCLKPORT_AUX_ACLK, "fsys1_pcie_link0_ipclkport_auxclk", "fin_pll",
1119bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK0_IPCLKPORT_AUXCLK, 21, CLK_IGNORE_UNUSED, 0),
1120bfbce52eSAlim Akhtar GATE(PCIE_LINK1_IPCLKPORT_AUX_ACLK, "fsys1_pcie_link1_ipclkport_auxclk", "fin_pll",
1121bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_LINK1_IPCLKPORT_AUXCLK, 21, CLK_IGNORE_UNUSED, 0),
1122bfbce52eSAlim Akhtar GATE(0, "fsys1_pcie_phy0_ipclkport_i_ref_soc_pll", "dout_fsys1_clk_fsys1_phy0_oscclk",
1123bfbce52eSAlim Akhtar GAT_FSYS1_PCIE_PHY0_IPCLKPORT_I_REF_SOC_PLL, 21, CLK_IGNORE_UNUSED, 0),
1124bfbce52eSAlim Akhtar GATE(0, "fsys1_sysreg_fsys1_ipclkport_pclk", "mout_fsys1_pclkl_fsys1_busp_mux",
1125bfbce52eSAlim Akhtar GAT_FSYS1_SYSREG_FSYS1_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1126bfbce52eSAlim Akhtar GATE(0, "fsys1_tbu0_fsys1_ipclkport_aclk", "mout_fsys1_aclk_fsys1_busp_mux",
1127bfbce52eSAlim Akhtar GAT_FSYS1_TBU0_FSYS1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1128bfbce52eSAlim Akhtar };
1129bfbce52eSAlim Akhtar
1130bfbce52eSAlim Akhtar static const struct samsung_cmu_info fsys1_cmu_info __initconst = {
1131bfbce52eSAlim Akhtar .mux_clks = fsys1_mux_clks,
1132bfbce52eSAlim Akhtar .nr_mux_clks = ARRAY_SIZE(fsys1_mux_clks),
1133bfbce52eSAlim Akhtar .div_clks = fsys1_div_clks,
1134bfbce52eSAlim Akhtar .nr_div_clks = ARRAY_SIZE(fsys1_div_clks),
1135bfbce52eSAlim Akhtar .gate_clks = fsys1_gate_clks,
1136bfbce52eSAlim Akhtar .nr_gate_clks = ARRAY_SIZE(fsys1_gate_clks),
1137bfbce52eSAlim Akhtar .fixed_clks = fsys1_fixed_clks,
1138bfbce52eSAlim Akhtar .nr_fixed_clks = ARRAY_SIZE(fsys1_fixed_clks),
1139bfbce52eSAlim Akhtar .nr_clk_ids = FSYS1_NR_CLK,
1140bfbce52eSAlim Akhtar .clk_regs = fsys1_clk_regs,
1141bfbce52eSAlim Akhtar .nr_clk_regs = ARRAY_SIZE(fsys1_clk_regs),
1142bfbce52eSAlim Akhtar .clk_name = "dout_cmu_fsys1_shared0div4",
1143bfbce52eSAlim Akhtar };
1144bfbce52eSAlim Akhtar
1145ca0fdfd1SAlim Akhtar /* Register Offset definitions for CMU_IMEM (0x10010000) */
1146ca0fdfd1SAlim Akhtar #define PLL_CON0_CLK_IMEM_ACLK 0x100
1147ca0fdfd1SAlim Akhtar #define PLL_CON0_CLK_IMEM_INTMEMCLK 0x120
1148ca0fdfd1SAlim Akhtar #define PLL_CON0_CLK_IMEM_TCUCLK 0x140
1149ca0fdfd1SAlim Akhtar #define DIV_OSCCLK_IMEM_TMUTSCLK 0x1800
1150ca0fdfd1SAlim Akhtar #define GAT_IMEM_IMEM_CMU_IMEM_IPCLKPORT_PCLK 0x2000
1151ca0fdfd1SAlim Akhtar #define GAT_IMEM_MCT_IPCLKPORT_OSCCLK__ALO 0x2004
1152ca0fdfd1SAlim Akhtar #define GAT_IMEM_OTP_CON_TOP_IPCLKPORT_I_OSCCLK 0x2008
1153ca0fdfd1SAlim Akhtar #define GAT_IMEM_RSTNSYNC_OSCCLK_IPCLKPORT_CLK 0x200c
1154ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_CPU0_IPCLKPORT_I_CLK 0x2010
1155ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_CPU0_IPCLKPORT_I_CLK_TS 0x2014
1156ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_CPU2_IPCLKPORT_I_CLK 0x2018
1157ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_CPU2_IPCLKPORT_I_CLK_TS 0x201c
1158ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_GPU_IPCLKPORT_I_CLK 0x2020
1159ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_GPU_IPCLKPORT_I_CLK_TS 0x2024
1160ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_GT_IPCLKPORT_I_CLK 0x2028
1161ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_GT_IPCLKPORT_I_CLK_TS 0x202c
1162ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_TOP_IPCLKPORT_I_CLK 0x2030
1163ca0fdfd1SAlim Akhtar #define GAT_IMEM_TMU_TOP_IPCLKPORT_I_CLK_TS 0x2034
1164ca0fdfd1SAlim Akhtar #define GAT_IMEM_WDT0_IPCLKPORT_CLK 0x2038
1165ca0fdfd1SAlim Akhtar #define GAT_IMEM_WDT1_IPCLKPORT_CLK 0x203c
1166ca0fdfd1SAlim Akhtar #define GAT_IMEM_WDT2_IPCLKPORT_CLK 0x2040
1167ca0fdfd1SAlim Akhtar #define GAT_IMEM_ADM_AXI4ST_I0_IMEM_IPCLKPORT_ACLKM 0x2044
1168ca0fdfd1SAlim Akhtar #define GAT_IMEM_ADM_AXI4ST_I1_IMEM_IPCLKPORT_ACLKM 0x2048
1169ca0fdfd1SAlim Akhtar #define GAT_IMEM_ADM_AXI4ST_I2_IMEM_IPCLKPORT_ACLKM 0x204c
1170ca0fdfd1SAlim Akhtar #define GAT_IMEM_ADS_AXI4ST_I0_IMEM_IPCLKPORT_ACLKS 0x2050
1171ca0fdfd1SAlim Akhtar #define GAT_IMEM_ADS_AXI4ST_I1_IMEM_IPCLKPORT_ACLKS 0x2054
1172ca0fdfd1SAlim Akhtar #define GAT_IMEM_ADS_AXI4ST_I2_IMEM_IPCLKPORT_ACLKS 0x2058
1173ca0fdfd1SAlim Akhtar #define GAT_IMEM_ASYNC_DMA0_IPCLKPORT_PCLKM 0x205c
1174ca0fdfd1SAlim Akhtar #define GAT_IMEM_ASYNC_DMA0_IPCLKPORT_PCLKS 0x2060
1175ca0fdfd1SAlim Akhtar #define GAT_IMEM_ASYNC_DMA1_IPCLKPORT_PCLKM 0x2064
1176ca0fdfd1SAlim Akhtar #define GAT_IMEM_ASYNC_DMA1_IPCLKPORT_PCLKS 0x2068
1177ca0fdfd1SAlim Akhtar #define GAT_IMEM_AXI2APB_IMEMP0_IPCLKPORT_ACLK 0x206c
1178ca0fdfd1SAlim Akhtar #define GAT_IMEM_AXI2APB_IMEMP1_IPCLKPORT_ACLK 0x2070
1179ca0fdfd1SAlim Akhtar #define GAT_IMEM_BUS_D_IMEM_IPCLKPORT_MAINCLK 0x2074
1180ca0fdfd1SAlim Akhtar #define GAT_IMEM_BUS_P_IMEM_IPCLKPORT_MAINCLK 0x2078
1181ca0fdfd1SAlim Akhtar #define GAT_IMEM_BUS_P_IMEM_IPCLKPORT_PERICLK 0x207c
1182ca0fdfd1SAlim Akhtar #define GAT_IMEM_BUS_P_IMEM_IPCLKPORT_TCUCLK 0x2080
1183ca0fdfd1SAlim Akhtar #define GAT_IMEM_DMA0_IPCLKPORT_ACLK 0x2084
1184ca0fdfd1SAlim Akhtar #define GAT_IMEM_DMA1_IPCLKPORT_ACLK 0x2088
1185ca0fdfd1SAlim Akhtar #define GAT_IMEM_GIC500_INPUT_SYNC_IPCLKPORT_CLK 0x208c
1186ca0fdfd1SAlim Akhtar #define GAT_IMEM_GIC_IPCLKPORT_CLK 0x2090
1187ca0fdfd1SAlim Akhtar #define GAT_IMEM_INTMEM_IPCLKPORT_ACLK 0x2094
1188ca0fdfd1SAlim Akhtar #define GAT_IMEM_MAILBOX_SCS_CA72_IPCLKPORT_PCLK 0x2098
1189ca0fdfd1SAlim Akhtar #define GAT_IMEM_MAILBOX_SMS_CA72_IPCLKPORT_PCLK 0x209c
1190ca0fdfd1SAlim Akhtar #define GAT_IMEM_MCT_IPCLKPORT_PCLK 0x20a0
1191ca0fdfd1SAlim Akhtar #define GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSCO_IMEM__CLK_IMEM_D 0x20a4
1192ca0fdfd1SAlim Akhtar #define GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSCO_IMEM__CLK_IMEM_TCU 0x20a8
1193ca0fdfd1SAlim Akhtar #define GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSOC_IMEM__CLK_IMEM_P 0x20ac
1194ca0fdfd1SAlim Akhtar #define GAT_IMEM_OTP_CON_TOP_IPCLKPORT_PCLK 0x20b0
1195ca0fdfd1SAlim Akhtar #define GAT_IMEM_RSTNSYNC_ACLK_IPCLKPORT_CLK 0x20b4
1196ca0fdfd1SAlim Akhtar #define GAT_IMEM_RSTNSYNC_INTMEMCLK_IPCLKPORT_CLK 0x20b8
1197ca0fdfd1SAlim Akhtar #define GAT_IMEM_RSTNSYNC_TCUCLK_IPCLKPORT_CLK 0x20bc
1198ca0fdfd1SAlim Akhtar #define GAT_IMEM_SFRIF_TMU0_IMEM_IPCLKPORT_PCLK 0x20c0
1199ca0fdfd1SAlim Akhtar #define GAT_IMEM_SFRIF_TMU1_IMEM_IPCLKPORT_PCLK 0x20c4
1200ca0fdfd1SAlim Akhtar #define GAT_IMEM_SYSREG_IMEM_IPCLKPORT_PCLK 0x20c8
1201ca0fdfd1SAlim Akhtar #define GAT_IMEM_TBU_IMEM_IPCLKPORT_ACLK 0x20cc
1202ca0fdfd1SAlim Akhtar #define GAT_IMEM_TCU_IPCLKPORT_ACLK 0x20d0
1203ca0fdfd1SAlim Akhtar #define GAT_IMEM_WDT0_IPCLKPORT_PCLK 0x20d4
1204ca0fdfd1SAlim Akhtar #define GAT_IMEM_WDT1_IPCLKPORT_PCLK 0x20d8
1205ca0fdfd1SAlim Akhtar #define GAT_IMEM_WDT2_IPCLKPORT_PCLK 0x20dc
1206ca0fdfd1SAlim Akhtar
1207ca0fdfd1SAlim Akhtar static const unsigned long imem_clk_regs[] __initconst = {
1208ca0fdfd1SAlim Akhtar PLL_CON0_CLK_IMEM_ACLK,
1209ca0fdfd1SAlim Akhtar PLL_CON0_CLK_IMEM_INTMEMCLK,
1210ca0fdfd1SAlim Akhtar PLL_CON0_CLK_IMEM_TCUCLK,
1211ca0fdfd1SAlim Akhtar DIV_OSCCLK_IMEM_TMUTSCLK,
1212ca0fdfd1SAlim Akhtar GAT_IMEM_IMEM_CMU_IMEM_IPCLKPORT_PCLK,
1213ca0fdfd1SAlim Akhtar GAT_IMEM_MCT_IPCLKPORT_OSCCLK__ALO,
1214ca0fdfd1SAlim Akhtar GAT_IMEM_OTP_CON_TOP_IPCLKPORT_I_OSCCLK,
1215ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_OSCCLK_IPCLKPORT_CLK,
1216ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU0_IPCLKPORT_I_CLK,
1217ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU0_IPCLKPORT_I_CLK_TS,
1218ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU2_IPCLKPORT_I_CLK,
1219ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU2_IPCLKPORT_I_CLK_TS,
1220ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GPU_IPCLKPORT_I_CLK,
1221ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GPU_IPCLKPORT_I_CLK_TS,
1222ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GT_IPCLKPORT_I_CLK,
1223ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GT_IPCLKPORT_I_CLK_TS,
1224ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_TOP_IPCLKPORT_I_CLK,
1225ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_TOP_IPCLKPORT_I_CLK_TS,
1226ca0fdfd1SAlim Akhtar GAT_IMEM_WDT0_IPCLKPORT_CLK,
1227ca0fdfd1SAlim Akhtar GAT_IMEM_WDT1_IPCLKPORT_CLK,
1228ca0fdfd1SAlim Akhtar GAT_IMEM_WDT2_IPCLKPORT_CLK,
1229ca0fdfd1SAlim Akhtar GAT_IMEM_ADM_AXI4ST_I0_IMEM_IPCLKPORT_ACLKM,
1230ca0fdfd1SAlim Akhtar GAT_IMEM_ADM_AXI4ST_I1_IMEM_IPCLKPORT_ACLKM,
1231ca0fdfd1SAlim Akhtar GAT_IMEM_ADM_AXI4ST_I2_IMEM_IPCLKPORT_ACLKM,
1232ca0fdfd1SAlim Akhtar GAT_IMEM_ADS_AXI4ST_I0_IMEM_IPCLKPORT_ACLKS,
1233ca0fdfd1SAlim Akhtar GAT_IMEM_ADS_AXI4ST_I1_IMEM_IPCLKPORT_ACLKS,
1234ca0fdfd1SAlim Akhtar GAT_IMEM_ADS_AXI4ST_I2_IMEM_IPCLKPORT_ACLKS,
1235ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA0_IPCLKPORT_PCLKM,
1236ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA0_IPCLKPORT_PCLKS,
1237ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA1_IPCLKPORT_PCLKM,
1238ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA1_IPCLKPORT_PCLKS,
1239ca0fdfd1SAlim Akhtar GAT_IMEM_AXI2APB_IMEMP0_IPCLKPORT_ACLK,
1240ca0fdfd1SAlim Akhtar GAT_IMEM_AXI2APB_IMEMP1_IPCLKPORT_ACLK,
1241ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_D_IMEM_IPCLKPORT_MAINCLK,
1242ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_P_IMEM_IPCLKPORT_MAINCLK,
1243ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_P_IMEM_IPCLKPORT_PERICLK,
1244ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_P_IMEM_IPCLKPORT_TCUCLK,
1245ca0fdfd1SAlim Akhtar GAT_IMEM_DMA0_IPCLKPORT_ACLK,
1246ca0fdfd1SAlim Akhtar GAT_IMEM_DMA1_IPCLKPORT_ACLK,
1247ca0fdfd1SAlim Akhtar GAT_IMEM_GIC500_INPUT_SYNC_IPCLKPORT_CLK,
1248ca0fdfd1SAlim Akhtar GAT_IMEM_GIC_IPCLKPORT_CLK,
1249ca0fdfd1SAlim Akhtar GAT_IMEM_INTMEM_IPCLKPORT_ACLK,
1250ca0fdfd1SAlim Akhtar GAT_IMEM_MAILBOX_SCS_CA72_IPCLKPORT_PCLK,
1251ca0fdfd1SAlim Akhtar GAT_IMEM_MAILBOX_SMS_CA72_IPCLKPORT_PCLK,
1252ca0fdfd1SAlim Akhtar GAT_IMEM_MCT_IPCLKPORT_PCLK,
1253ca0fdfd1SAlim Akhtar GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSCO_IMEM__CLK_IMEM_D,
1254ca0fdfd1SAlim Akhtar GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSCO_IMEM__CLK_IMEM_TCU,
1255ca0fdfd1SAlim Akhtar GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSOC_IMEM__CLK_IMEM_P,
1256ca0fdfd1SAlim Akhtar GAT_IMEM_OTP_CON_TOP_IPCLKPORT_PCLK,
1257ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_ACLK_IPCLKPORT_CLK,
1258ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_INTMEMCLK_IPCLKPORT_CLK,
1259ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_TCUCLK_IPCLKPORT_CLK,
1260ca0fdfd1SAlim Akhtar GAT_IMEM_SFRIF_TMU0_IMEM_IPCLKPORT_PCLK,
1261ca0fdfd1SAlim Akhtar GAT_IMEM_SFRIF_TMU1_IMEM_IPCLKPORT_PCLK,
1262ca0fdfd1SAlim Akhtar GAT_IMEM_SYSREG_IMEM_IPCLKPORT_PCLK,
1263ca0fdfd1SAlim Akhtar GAT_IMEM_TBU_IMEM_IPCLKPORT_ACLK,
1264ca0fdfd1SAlim Akhtar GAT_IMEM_TCU_IPCLKPORT_ACLK,
1265ca0fdfd1SAlim Akhtar GAT_IMEM_WDT0_IPCLKPORT_PCLK,
1266ca0fdfd1SAlim Akhtar GAT_IMEM_WDT1_IPCLKPORT_PCLK,
1267ca0fdfd1SAlim Akhtar GAT_IMEM_WDT2_IPCLKPORT_PCLK,
1268ca0fdfd1SAlim Akhtar };
1269ca0fdfd1SAlim Akhtar
1270ca0fdfd1SAlim Akhtar PNAME(mout_imem_clk_imem_tcuclk_p) = { "fin_pll", "dout_cmu_imem_tcuclk" };
1271ca0fdfd1SAlim Akhtar PNAME(mout_imem_clk_imem_aclk_p) = { "fin_pll", "dout_cmu_imem_aclk" };
1272ca0fdfd1SAlim Akhtar PNAME(mout_imem_clk_imem_intmemclk_p) = { "fin_pll", "dout_cmu_imem_dmaclk" };
1273ca0fdfd1SAlim Akhtar
1274ca0fdfd1SAlim Akhtar static const struct samsung_mux_clock imem_mux_clks[] __initconst = {
1275ca0fdfd1SAlim Akhtar MUX(0, "mout_imem_clk_imem_tcuclk", mout_imem_clk_imem_tcuclk_p,
1276ca0fdfd1SAlim Akhtar PLL_CON0_CLK_IMEM_TCUCLK, 4, 1),
1277ca0fdfd1SAlim Akhtar MUX(0, "mout_imem_clk_imem_aclk", mout_imem_clk_imem_aclk_p, PLL_CON0_CLK_IMEM_ACLK, 4, 1),
1278ca0fdfd1SAlim Akhtar MUX(0, "mout_imem_clk_imem_intmemclk", mout_imem_clk_imem_intmemclk_p,
1279ca0fdfd1SAlim Akhtar PLL_CON0_CLK_IMEM_INTMEMCLK, 4, 1),
1280ca0fdfd1SAlim Akhtar };
1281ca0fdfd1SAlim Akhtar
1282ca0fdfd1SAlim Akhtar static const struct samsung_div_clock imem_div_clks[] __initconst = {
1283ca0fdfd1SAlim Akhtar DIV(0, "dout_imem_oscclk_imem_tmutsclk", "fin_pll", DIV_OSCCLK_IMEM_TMUTSCLK, 0, 4),
1284ca0fdfd1SAlim Akhtar };
1285ca0fdfd1SAlim Akhtar
1286ca0fdfd1SAlim Akhtar static const struct samsung_gate_clock imem_gate_clks[] __initconst = {
1287ca0fdfd1SAlim Akhtar GATE(0, "imem_imem_cmu_imem_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1288ca0fdfd1SAlim Akhtar GAT_IMEM_IMEM_CMU_IMEM_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1289ca0fdfd1SAlim Akhtar GATE(0, "imem_otp_con_top_ipclkport_i_oscclk", "fin_pll",
1290ca0fdfd1SAlim Akhtar GAT_IMEM_OTP_CON_TOP_IPCLKPORT_I_OSCCLK, 21, CLK_IGNORE_UNUSED, 0),
1291ca0fdfd1SAlim Akhtar GATE(0, "imem_tmu_top_ipclkport_i_clk", "fin_pll",
1292ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_TOP_IPCLKPORT_I_CLK, 21, CLK_IGNORE_UNUSED, 0),
1293ca0fdfd1SAlim Akhtar GATE(0, "imem_tmu_gt_ipclkport_i_clk", "fin_pll",
1294ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GT_IPCLKPORT_I_CLK, 21, CLK_IGNORE_UNUSED, 0),
1295ca0fdfd1SAlim Akhtar GATE(0, "imem_tmu_cpu0_ipclkport_i_clk", "fin_pll",
1296ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU0_IPCLKPORT_I_CLK, 21, CLK_IGNORE_UNUSED, 0),
1297ca0fdfd1SAlim Akhtar GATE(0, "imem_tmu_gpu_ipclkport_i_clk", "fin_pll",
1298ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GPU_IPCLKPORT_I_CLK, 21, CLK_IGNORE_UNUSED, 0),
1299ca0fdfd1SAlim Akhtar GATE(0, "imem_mct_ipclkport_oscclk__alo", "fin_pll",
1300ca0fdfd1SAlim Akhtar GAT_IMEM_MCT_IPCLKPORT_OSCCLK__ALO, 21, CLK_IGNORE_UNUSED, 0),
1301ca0fdfd1SAlim Akhtar GATE(0, "imem_wdt0_ipclkport_clk", "fin_pll",
1302ca0fdfd1SAlim Akhtar GAT_IMEM_WDT0_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1303ca0fdfd1SAlim Akhtar GATE(0, "imem_wdt1_ipclkport_clk", "fin_pll",
1304ca0fdfd1SAlim Akhtar GAT_IMEM_WDT1_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1305ca0fdfd1SAlim Akhtar GATE(0, "imem_wdt2_ipclkport_clk", "fin_pll",
1306ca0fdfd1SAlim Akhtar GAT_IMEM_WDT2_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1307ca0fdfd1SAlim Akhtar GATE(IMEM_TMU_CPU0_IPCLKPORT_I_CLK_TS, "imem_tmu_cpu0_ipclkport_i_clk_ts",
1308ca0fdfd1SAlim Akhtar "dout_imem_oscclk_imem_tmutsclk",
1309ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU0_IPCLKPORT_I_CLK_TS, 21, CLK_IGNORE_UNUSED, 0),
1310ca0fdfd1SAlim Akhtar GATE(IMEM_TMU_CPU2_IPCLKPORT_I_CLK_TS, "imem_tmu_cpu2_ipclkport_i_clk_ts",
1311ca0fdfd1SAlim Akhtar "dout_imem_oscclk_imem_tmutsclk",
1312ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU2_IPCLKPORT_I_CLK_TS, 21, CLK_IGNORE_UNUSED, 0),
1313ca0fdfd1SAlim Akhtar GATE(IMEM_TMU_GPU_IPCLKPORT_I_CLK_TS, "imem_tmu_gpu_ipclkport_i_clk_ts",
1314ca0fdfd1SAlim Akhtar "dout_imem_oscclk_imem_tmutsclk",
1315ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GPU_IPCLKPORT_I_CLK_TS, 21, CLK_IGNORE_UNUSED, 0),
1316ca0fdfd1SAlim Akhtar GATE(IMEM_TMU_GT_IPCLKPORT_I_CLK_TS, "imem_tmu_gt_ipclkport_i_clk_ts",
1317ca0fdfd1SAlim Akhtar "dout_imem_oscclk_imem_tmutsclk",
1318ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_GT_IPCLKPORT_I_CLK_TS, 21, CLK_IGNORE_UNUSED, 0),
1319ca0fdfd1SAlim Akhtar GATE(IMEM_TMU_TOP_IPCLKPORT_I_CLK_TS, "imem_tmu_top_ipclkport_i_clk_ts",
1320ca0fdfd1SAlim Akhtar "dout_imem_oscclk_imem_tmutsclk",
1321ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_TOP_IPCLKPORT_I_CLK_TS, 21, CLK_IGNORE_UNUSED, 0),
1322ca0fdfd1SAlim Akhtar GATE(0, "imem_adm_axi4st_i0_imem_ipclkport_aclkm", "mout_imem_clk_imem_aclk",
1323ca0fdfd1SAlim Akhtar GAT_IMEM_ADM_AXI4ST_I0_IMEM_IPCLKPORT_ACLKM, 21, CLK_IGNORE_UNUSED, 0),
1324ca0fdfd1SAlim Akhtar GATE(0, "imem_adm_axi4st_i1_imem_ipclkport_aclkm", "mout_imem_clk_imem_aclk",
1325ca0fdfd1SAlim Akhtar GAT_IMEM_ADM_AXI4ST_I1_IMEM_IPCLKPORT_ACLKM, 21, CLK_IGNORE_UNUSED, 0),
1326ca0fdfd1SAlim Akhtar GATE(0, "imem_adm_axi4st_i2_imem_ipclkport_aclkm", "mout_imem_clk_imem_aclk",
1327ca0fdfd1SAlim Akhtar GAT_IMEM_ADM_AXI4ST_I2_IMEM_IPCLKPORT_ACLKM, 21, CLK_IGNORE_UNUSED, 0),
1328ca0fdfd1SAlim Akhtar GATE(0, "imem_ads_axi4st_i0_imem_ipclkport_aclks", "mout_imem_clk_imem_aclk",
1329ca0fdfd1SAlim Akhtar GAT_IMEM_ADS_AXI4ST_I0_IMEM_IPCLKPORT_ACLKS, 21, CLK_IGNORE_UNUSED, 0),
1330ca0fdfd1SAlim Akhtar GATE(0, "imem_ads_axi4st_i1_imem_ipclkport_aclks", "mout_imem_clk_imem_aclk",
1331ca0fdfd1SAlim Akhtar GAT_IMEM_ADS_AXI4ST_I1_IMEM_IPCLKPORT_ACLKS, 21, CLK_IGNORE_UNUSED, 0),
1332ca0fdfd1SAlim Akhtar GATE(0, "imem_ads_axi4st_i2_imem_ipclkport_aclks", "mout_imem_clk_imem_aclk",
1333ca0fdfd1SAlim Akhtar GAT_IMEM_ADS_AXI4ST_I2_IMEM_IPCLKPORT_ACLKS, 21, CLK_IGNORE_UNUSED, 0),
1334ca0fdfd1SAlim Akhtar GATE(0, "imem_async_dma0_ipclkport_pclkm", "mout_imem_clk_imem_tcuclk",
1335ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA0_IPCLKPORT_PCLKM, 21, CLK_IGNORE_UNUSED, 0),
1336ca0fdfd1SAlim Akhtar GATE(0, "imem_async_dma0_ipclkport_pclks", "mout_imem_clk_imem_aclk",
1337ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA0_IPCLKPORT_PCLKS, 21, CLK_IGNORE_UNUSED, 0),
1338ca0fdfd1SAlim Akhtar GATE(0, "imem_async_dma1_ipclkport_pclkm", "mout_imem_clk_imem_tcuclk",
1339ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA1_IPCLKPORT_PCLKM, 21, CLK_IGNORE_UNUSED, 0),
1340ca0fdfd1SAlim Akhtar GATE(0, "imem_async_dma1_ipclkport_pclks", "mout_imem_clk_imem_aclk",
1341ca0fdfd1SAlim Akhtar GAT_IMEM_ASYNC_DMA1_IPCLKPORT_PCLKS, 21, CLK_IGNORE_UNUSED, 0),
1342ca0fdfd1SAlim Akhtar GATE(0, "imem_axi2apb_imemp0_ipclkport_aclk", "mout_imem_clk_imem_aclk",
1343ca0fdfd1SAlim Akhtar GAT_IMEM_AXI2APB_IMEMP0_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1344ca0fdfd1SAlim Akhtar GATE(0, "imem_axi2apb_imemp1_ipclkport_aclk", "mout_imem_clk_imem_aclk",
1345ca0fdfd1SAlim Akhtar GAT_IMEM_AXI2APB_IMEMP1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1346ca0fdfd1SAlim Akhtar GATE(0, "imem_bus_d_imem_ipclkport_mainclk", "mout_imem_clk_imem_tcuclk",
1347ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_D_IMEM_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
1348ca0fdfd1SAlim Akhtar GATE(0, "imem_bus_p_imem_ipclkport_mainclk", "mout_imem_clk_imem_aclk",
1349ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_P_IMEM_IPCLKPORT_MAINCLK, 21, CLK_IGNORE_UNUSED, 0),
1350ca0fdfd1SAlim Akhtar GATE(0, "imem_bus_p_imem_ipclkport_pericclk", "mout_imem_clk_imem_aclk",
1351ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_P_IMEM_IPCLKPORT_PERICLK, 21, CLK_IGNORE_UNUSED, 0),
1352ca0fdfd1SAlim Akhtar GATE(0, "imem_bus_p_imem_ipclkport_tcuclk", "mout_imem_clk_imem_tcuclk",
1353ca0fdfd1SAlim Akhtar GAT_IMEM_BUS_P_IMEM_IPCLKPORT_TCUCLK, 21, CLK_IGNORE_UNUSED, 0),
1354ca0fdfd1SAlim Akhtar GATE(IMEM_DMA0_IPCLKPORT_ACLK, "imem_dma0_ipclkport_aclk", "mout_imem_clk_imem_tcuclk",
1355ca0fdfd1SAlim Akhtar GAT_IMEM_DMA0_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED | CLK_IS_CRITICAL, 0),
1356ca0fdfd1SAlim Akhtar GATE(IMEM_DMA1_IPCLKPORT_ACLK, "imem_dma1_ipclkport_aclk", "mout_imem_clk_imem_tcuclk",
1357ca0fdfd1SAlim Akhtar GAT_IMEM_DMA1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED | CLK_IS_CRITICAL, 0),
1358ca0fdfd1SAlim Akhtar GATE(0, "imem_gic500_input_sync_ipclkport_clk", "mout_imem_clk_imem_aclk",
1359ca0fdfd1SAlim Akhtar GAT_IMEM_GIC500_INPUT_SYNC_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1360ca0fdfd1SAlim Akhtar GATE(0, "imem_gic_ipclkport_clk", "mout_imem_clk_imem_aclk",
1361ca0fdfd1SAlim Akhtar GAT_IMEM_GIC_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1362ca0fdfd1SAlim Akhtar GATE(0, "imem_intmem_ipclkport_aclk", "mout_imem_clk_imem_intmemclk",
1363ca0fdfd1SAlim Akhtar GAT_IMEM_INTMEM_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1364ca0fdfd1SAlim Akhtar GATE(0, "imem_mailbox_scs_ca72_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1365ca0fdfd1SAlim Akhtar GAT_IMEM_MAILBOX_SCS_CA72_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1366ca0fdfd1SAlim Akhtar GATE(0, "imem_mailbox_sms_ca72_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1367ca0fdfd1SAlim Akhtar GAT_IMEM_MAILBOX_SMS_CA72_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1368ca0fdfd1SAlim Akhtar GATE(IMEM_MCT_PCLK, "imem_mct_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1369ca0fdfd1SAlim Akhtar GAT_IMEM_MCT_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1370ca0fdfd1SAlim Akhtar GATE(0, "imem_ns_brdg_imem_ipclkport_clk__psco_imem__clk_imem_d",
1371ca0fdfd1SAlim Akhtar "mout_imem_clk_imem_tcuclk",
1372ca0fdfd1SAlim Akhtar GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSCO_IMEM__CLK_IMEM_D, 21, CLK_IGNORE_UNUSED, 0),
1373ca0fdfd1SAlim Akhtar GATE(0, "imem_ns_brdg_imem_ipclkport_clk__psco_imem__clk_imem_tcu",
1374ca0fdfd1SAlim Akhtar "mout_imem_clk_imem_tcuclk",
1375ca0fdfd1SAlim Akhtar GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSCO_IMEM__CLK_IMEM_TCU, 21,
1376ca0fdfd1SAlim Akhtar CLK_IGNORE_UNUSED, 0),
1377ca0fdfd1SAlim Akhtar GATE(0, "imem_ns_brdg_imem_ipclkport_clk__psoc_imem__clk_imem_p", "mout_imem_clk_imem_aclk",
1378ca0fdfd1SAlim Akhtar GAT_IMEM_NS_BRDG_IMEM_IPCLKPORT_CLK__PSOC_IMEM__CLK_IMEM_P, 21, CLK_IGNORE_UNUSED, 0),
1379ca0fdfd1SAlim Akhtar GATE(0, "imem_otp_con_top_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1380ca0fdfd1SAlim Akhtar GAT_IMEM_OTP_CON_TOP_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1381ca0fdfd1SAlim Akhtar GATE(0, "imem_rstnsync_aclk_ipclkport_clk", "mout_imem_clk_imem_aclk",
1382ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_ACLK_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1383ca0fdfd1SAlim Akhtar GATE(0, "imem_rstnsync_oscclk_ipclkport_clk", "fin_pll",
1384ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_OSCCLK_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1385ca0fdfd1SAlim Akhtar GATE(0, "imem_rstnsync_intmemclk_ipclkport_clk", "mout_imem_clk_imem_intmemclk",
1386ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_INTMEMCLK_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1387ca0fdfd1SAlim Akhtar GATE(0, "imem_rstnsync_tcuclk_ipclkport_clk", "mout_imem_clk_imem_tcuclk",
1388ca0fdfd1SAlim Akhtar GAT_IMEM_RSTNSYNC_TCUCLK_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
1389ca0fdfd1SAlim Akhtar GATE(0, "imem_sfrif_tmu0_imem_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1390ca0fdfd1SAlim Akhtar GAT_IMEM_SFRIF_TMU0_IMEM_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1391ca0fdfd1SAlim Akhtar GATE(0, "imem_sfrif_tmu1_imem_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1392ca0fdfd1SAlim Akhtar GAT_IMEM_SFRIF_TMU1_IMEM_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1393ca0fdfd1SAlim Akhtar GATE(0, "imem_tmu_cpu2_ipclkport_i_clk", "fin_pll",
1394ca0fdfd1SAlim Akhtar GAT_IMEM_TMU_CPU2_IPCLKPORT_I_CLK, 21, CLK_IGNORE_UNUSED, 0),
1395ca0fdfd1SAlim Akhtar GATE(0, "imem_sysreg_imem_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1396ca0fdfd1SAlim Akhtar GAT_IMEM_SYSREG_IMEM_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1397ca0fdfd1SAlim Akhtar GATE(0, "imem_tbu_imem_ipclkport_aclk", "mout_imem_clk_imem_tcuclk",
1398ca0fdfd1SAlim Akhtar GAT_IMEM_TBU_IMEM_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1399ca0fdfd1SAlim Akhtar GATE(0, "imem_tcu_ipclkport_aclk", "mout_imem_clk_imem_tcuclk",
1400ca0fdfd1SAlim Akhtar GAT_IMEM_TCU_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1401ca0fdfd1SAlim Akhtar GATE(IMEM_WDT0_IPCLKPORT_PCLK, "imem_wdt0_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1402ca0fdfd1SAlim Akhtar GAT_IMEM_WDT0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1403ca0fdfd1SAlim Akhtar GATE(IMEM_WDT1_IPCLKPORT_PCLK, "imem_wdt1_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1404ca0fdfd1SAlim Akhtar GAT_IMEM_WDT1_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1405ca0fdfd1SAlim Akhtar GATE(IMEM_WDT2_IPCLKPORT_PCLK, "imem_wdt2_ipclkport_pclk", "mout_imem_clk_imem_aclk",
1406ca0fdfd1SAlim Akhtar GAT_IMEM_WDT2_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1407ca0fdfd1SAlim Akhtar };
1408ca0fdfd1SAlim Akhtar
1409ca0fdfd1SAlim Akhtar static const struct samsung_cmu_info imem_cmu_info __initconst = {
1410ca0fdfd1SAlim Akhtar .mux_clks = imem_mux_clks,
1411ca0fdfd1SAlim Akhtar .nr_mux_clks = ARRAY_SIZE(imem_mux_clks),
1412ca0fdfd1SAlim Akhtar .div_clks = imem_div_clks,
1413ca0fdfd1SAlim Akhtar .nr_div_clks = ARRAY_SIZE(imem_div_clks),
1414ca0fdfd1SAlim Akhtar .gate_clks = imem_gate_clks,
1415ca0fdfd1SAlim Akhtar .nr_gate_clks = ARRAY_SIZE(imem_gate_clks),
1416ca0fdfd1SAlim Akhtar .nr_clk_ids = IMEM_NR_CLK,
1417ca0fdfd1SAlim Akhtar .clk_regs = imem_clk_regs,
1418ca0fdfd1SAlim Akhtar .nr_clk_regs = ARRAY_SIZE(imem_clk_regs),
1419ca0fdfd1SAlim Akhtar };
1420ca0fdfd1SAlim Akhtar
fsd_clk_imem_init(struct device_node * np)1421ca0fdfd1SAlim Akhtar static void __init fsd_clk_imem_init(struct device_node *np)
1422ca0fdfd1SAlim Akhtar {
1423ca0fdfd1SAlim Akhtar samsung_cmu_register_one(np, &imem_cmu_info);
1424ca0fdfd1SAlim Akhtar }
1425ca0fdfd1SAlim Akhtar
1426ca0fdfd1SAlim Akhtar CLK_OF_DECLARE(fsd_clk_imem, "tesla,fsd-clock-imem", fsd_clk_imem_init);
1427ca0fdfd1SAlim Akhtar
142875c50afaSAlim Akhtar /* Register Offset definitions for CMU_MFC (0x12810000) */
142975c50afaSAlim Akhtar #define PLL_LOCKTIME_PLL_MFC 0x0
143075c50afaSAlim Akhtar #define PLL_CON0_PLL_MFC 0x100
143175c50afaSAlim Akhtar #define MUX_MFC_BUSD 0x1000
143275c50afaSAlim Akhtar #define MUX_MFC_BUSP 0x1008
143375c50afaSAlim Akhtar #define DIV_MFC_BUSD_DIV4 0x1800
143475c50afaSAlim Akhtar #define GAT_MFC_CMU_MFC_IPCLKPORT_PCLK 0x2000
143575c50afaSAlim Akhtar #define GAT_MFC_AS_P_MFC_IPCLKPORT_PCLKM 0x2004
143675c50afaSAlim Akhtar #define GAT_MFC_AS_P_MFC_IPCLKPORT_PCLKS 0x2008
143775c50afaSAlim Akhtar #define GAT_MFC_AXI2APB_MFC_IPCLKPORT_ACLK 0x200c
143875c50afaSAlim Akhtar #define GAT_MFC_MFC_IPCLKPORT_ACLK 0x2010
143975c50afaSAlim Akhtar #define GAT_MFC_NS_BRDG_MFC_IPCLKPORT_CLK__PMFC__CLK_MFC_D 0x2018
144075c50afaSAlim Akhtar #define GAT_MFC_NS_BRDG_MFC_IPCLKPORT_CLK__PMFC__CLK_MFC_P 0x201c
144175c50afaSAlim Akhtar #define GAT_MFC_PPMU_MFCD0_IPCLKPORT_ACLK 0x2028
144275c50afaSAlim Akhtar #define GAT_MFC_PPMU_MFCD0_IPCLKPORT_PCLK 0x202c
144375c50afaSAlim Akhtar #define GAT_MFC_PPMU_MFCD1_IPCLKPORT_ACLK 0x2030
144475c50afaSAlim Akhtar #define GAT_MFC_PPMU_MFCD1_IPCLKPORT_PCLK 0x2034
144575c50afaSAlim Akhtar #define GAT_MFC_SYSREG_MFC_IPCLKPORT_PCLK 0x2038
144675c50afaSAlim Akhtar #define GAT_MFC_TBU_MFCD0_IPCLKPORT_CLK 0x203c
144775c50afaSAlim Akhtar #define GAT_MFC_TBU_MFCD1_IPCLKPORT_CLK 0x2040
144875c50afaSAlim Akhtar #define GAT_MFC_BUSD_DIV4_GATE 0x2044
144975c50afaSAlim Akhtar #define GAT_MFC_BUSD_GATE 0x2048
145075c50afaSAlim Akhtar
145175c50afaSAlim Akhtar static const unsigned long mfc_clk_regs[] __initconst = {
145275c50afaSAlim Akhtar PLL_LOCKTIME_PLL_MFC,
145375c50afaSAlim Akhtar PLL_CON0_PLL_MFC,
145475c50afaSAlim Akhtar MUX_MFC_BUSD,
145575c50afaSAlim Akhtar MUX_MFC_BUSP,
145675c50afaSAlim Akhtar DIV_MFC_BUSD_DIV4,
145775c50afaSAlim Akhtar GAT_MFC_CMU_MFC_IPCLKPORT_PCLK,
145875c50afaSAlim Akhtar GAT_MFC_AS_P_MFC_IPCLKPORT_PCLKM,
145975c50afaSAlim Akhtar GAT_MFC_AS_P_MFC_IPCLKPORT_PCLKS,
146075c50afaSAlim Akhtar GAT_MFC_AXI2APB_MFC_IPCLKPORT_ACLK,
146175c50afaSAlim Akhtar GAT_MFC_MFC_IPCLKPORT_ACLK,
146275c50afaSAlim Akhtar GAT_MFC_NS_BRDG_MFC_IPCLKPORT_CLK__PMFC__CLK_MFC_D,
146375c50afaSAlim Akhtar GAT_MFC_NS_BRDG_MFC_IPCLKPORT_CLK__PMFC__CLK_MFC_P,
146475c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD0_IPCLKPORT_ACLK,
146575c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD0_IPCLKPORT_PCLK,
146675c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD1_IPCLKPORT_ACLK,
146775c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD1_IPCLKPORT_PCLK,
146875c50afaSAlim Akhtar GAT_MFC_SYSREG_MFC_IPCLKPORT_PCLK,
146975c50afaSAlim Akhtar GAT_MFC_TBU_MFCD0_IPCLKPORT_CLK,
147075c50afaSAlim Akhtar GAT_MFC_TBU_MFCD1_IPCLKPORT_CLK,
147175c50afaSAlim Akhtar GAT_MFC_BUSD_DIV4_GATE,
147275c50afaSAlim Akhtar GAT_MFC_BUSD_GATE,
147375c50afaSAlim Akhtar };
147475c50afaSAlim Akhtar
147575c50afaSAlim Akhtar static const struct samsung_pll_rate_table pll_mfc_rate_table[] __initconst = {
147675c50afaSAlim Akhtar PLL_35XX_RATE(24 * MHZ, 666000000U, 111, 4, 0),
147775c50afaSAlim Akhtar };
147875c50afaSAlim Akhtar
147975c50afaSAlim Akhtar static const struct samsung_pll_clock mfc_pll_clks[] __initconst = {
148075c50afaSAlim Akhtar PLL(pll_142xx, 0, "fout_pll_mfc", "fin_pll",
148175c50afaSAlim Akhtar PLL_LOCKTIME_PLL_MFC, PLL_CON0_PLL_MFC, pll_mfc_rate_table),
148275c50afaSAlim Akhtar };
148375c50afaSAlim Akhtar
148475c50afaSAlim Akhtar PNAME(mout_mfc_pll_p) = { "fin_pll", "fout_pll_mfc" };
148575c50afaSAlim Akhtar PNAME(mout_mfc_busp_p) = { "fin_pll", "dout_mfc_busd_div4" };
148675c50afaSAlim Akhtar PNAME(mout_mfc_busd_p) = { "fin_pll", "mfc_busd_gate" };
148775c50afaSAlim Akhtar
148875c50afaSAlim Akhtar static const struct samsung_mux_clock mfc_mux_clks[] __initconst = {
148975c50afaSAlim Akhtar MUX(0, "mout_mfc_pll", mout_mfc_pll_p, PLL_CON0_PLL_MFC, 4, 1),
149075c50afaSAlim Akhtar MUX(0, "mout_mfc_busp", mout_mfc_busp_p, MUX_MFC_BUSP, 0, 1),
149175c50afaSAlim Akhtar MUX(0, "mout_mfc_busd", mout_mfc_busd_p, MUX_MFC_BUSD, 0, 1),
149275c50afaSAlim Akhtar };
149375c50afaSAlim Akhtar
149475c50afaSAlim Akhtar static const struct samsung_div_clock mfc_div_clks[] __initconst = {
149575c50afaSAlim Akhtar DIV(0, "dout_mfc_busd_div4", "mfc_busd_div4_gate", DIV_MFC_BUSD_DIV4, 0, 4),
149675c50afaSAlim Akhtar };
149775c50afaSAlim Akhtar
149875c50afaSAlim Akhtar static const struct samsung_gate_clock mfc_gate_clks[] __initconst = {
149975c50afaSAlim Akhtar GATE(0, "mfc_cmu_mfc_ipclkport_pclk", "mout_mfc_busp",
150075c50afaSAlim Akhtar GAT_MFC_CMU_MFC_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
150175c50afaSAlim Akhtar GATE(0, "mfc_as_p_mfc_ipclkport_pclkm", "mout_mfc_busd",
150275c50afaSAlim Akhtar GAT_MFC_AS_P_MFC_IPCLKPORT_PCLKM, 21, CLK_IGNORE_UNUSED, 0),
150375c50afaSAlim Akhtar GATE(0, "mfc_as_p_mfc_ipclkport_pclks", "mout_mfc_busp",
150475c50afaSAlim Akhtar GAT_MFC_AS_P_MFC_IPCLKPORT_PCLKS, 21, CLK_IGNORE_UNUSED, 0),
150575c50afaSAlim Akhtar GATE(0, "mfc_axi2apb_mfc_ipclkport_aclk", "mout_mfc_busp",
150675c50afaSAlim Akhtar GAT_MFC_AXI2APB_MFC_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
150775c50afaSAlim Akhtar GATE(MFC_MFC_IPCLKPORT_ACLK, "mfc_mfc_ipclkport_aclk", "mout_mfc_busd",
150875c50afaSAlim Akhtar GAT_MFC_MFC_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
150975c50afaSAlim Akhtar GATE(0, "mfc_ns_brdg_mfc_ipclkport_clk__pmfc__clk_mfc_d", "mout_mfc_busd",
151075c50afaSAlim Akhtar GAT_MFC_NS_BRDG_MFC_IPCLKPORT_CLK__PMFC__CLK_MFC_D, 21, CLK_IGNORE_UNUSED, 0),
151175c50afaSAlim Akhtar GATE(0, "mfc_ns_brdg_mfc_ipclkport_clk__pmfc__clk_mfc_p", "mout_mfc_busp",
151275c50afaSAlim Akhtar GAT_MFC_NS_BRDG_MFC_IPCLKPORT_CLK__PMFC__CLK_MFC_P, 21, CLK_IGNORE_UNUSED, 0),
151375c50afaSAlim Akhtar GATE(0, "mfc_ppmu_mfcd0_ipclkport_aclk", "mout_mfc_busd",
151475c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD0_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
151575c50afaSAlim Akhtar GATE(0, "mfc_ppmu_mfcd0_ipclkport_pclk", "mout_mfc_busp",
151675c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD0_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
151775c50afaSAlim Akhtar GATE(0, "mfc_ppmu_mfcd1_ipclkport_aclk", "mout_mfc_busd",
151875c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD1_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
151975c50afaSAlim Akhtar GATE(0, "mfc_ppmu_mfcd1_ipclkport_pclk", "mout_mfc_busp",
152075c50afaSAlim Akhtar GAT_MFC_PPMU_MFCD1_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
152175c50afaSAlim Akhtar GATE(0, "mfc_sysreg_mfc_ipclkport_pclk", "mout_mfc_busp",
152275c50afaSAlim Akhtar GAT_MFC_SYSREG_MFC_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
152375c50afaSAlim Akhtar GATE(0, "mfc_tbu_mfcd0_ipclkport_clk", "mout_mfc_busd",
152475c50afaSAlim Akhtar GAT_MFC_TBU_MFCD0_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
152575c50afaSAlim Akhtar GATE(0, "mfc_tbu_mfcd1_ipclkport_clk", "mout_mfc_busd",
152675c50afaSAlim Akhtar GAT_MFC_TBU_MFCD1_IPCLKPORT_CLK, 21, CLK_IGNORE_UNUSED, 0),
152775c50afaSAlim Akhtar GATE(0, "mfc_busd_div4_gate", "mout_mfc_pll",
152875c50afaSAlim Akhtar GAT_MFC_BUSD_DIV4_GATE, 21, CLK_IGNORE_UNUSED, 0),
152975c50afaSAlim Akhtar GATE(0, "mfc_busd_gate", "mout_mfc_pll", GAT_MFC_BUSD_GATE, 21, CLK_IS_CRITICAL, 0),
153075c50afaSAlim Akhtar };
153175c50afaSAlim Akhtar
153275c50afaSAlim Akhtar static const struct samsung_cmu_info mfc_cmu_info __initconst = {
153375c50afaSAlim Akhtar .pll_clks = mfc_pll_clks,
153475c50afaSAlim Akhtar .nr_pll_clks = ARRAY_SIZE(mfc_pll_clks),
153575c50afaSAlim Akhtar .mux_clks = mfc_mux_clks,
153675c50afaSAlim Akhtar .nr_mux_clks = ARRAY_SIZE(mfc_mux_clks),
153775c50afaSAlim Akhtar .div_clks = mfc_div_clks,
153875c50afaSAlim Akhtar .nr_div_clks = ARRAY_SIZE(mfc_div_clks),
153975c50afaSAlim Akhtar .gate_clks = mfc_gate_clks,
154075c50afaSAlim Akhtar .nr_gate_clks = ARRAY_SIZE(mfc_gate_clks),
154175c50afaSAlim Akhtar .nr_clk_ids = MFC_NR_CLK,
154275c50afaSAlim Akhtar .clk_regs = mfc_clk_regs,
154375c50afaSAlim Akhtar .nr_clk_regs = ARRAY_SIZE(mfc_clk_regs),
154475c50afaSAlim Akhtar };
154575c50afaSAlim Akhtar
1546*b826c3e4SAlim Akhtar /* Register Offset definitions for CMU_CAM_CSI (0x12610000) */
1547*b826c3e4SAlim Akhtar #define PLL_LOCKTIME_PLL_CAM_CSI 0x0
1548*b826c3e4SAlim Akhtar #define PLL_CON0_PLL_CAM_CSI 0x100
1549*b826c3e4SAlim Akhtar #define DIV_CAM_CSI0_ACLK 0x1800
1550*b826c3e4SAlim Akhtar #define DIV_CAM_CSI1_ACLK 0x1804
1551*b826c3e4SAlim Akhtar #define DIV_CAM_CSI2_ACLK 0x1808
1552*b826c3e4SAlim Akhtar #define DIV_CAM_CSI_BUSD 0x180c
1553*b826c3e4SAlim Akhtar #define DIV_CAM_CSI_BUSP 0x1810
1554*b826c3e4SAlim Akhtar #define GAT_CAM_CSI_CMU_CAM_CSI_IPCLKPORT_PCLK 0x2000
1555*b826c3e4SAlim Akhtar #define GAT_CAM_AXI2APB_CAM_CSI_IPCLKPORT_ACLK 0x2004
1556*b826c3e4SAlim Akhtar #define GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI0 0x2008
1557*b826c3e4SAlim Akhtar #define GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI1 0x200c
1558*b826c3e4SAlim Akhtar #define GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI2 0x2010
1559*b826c3e4SAlim Akhtar #define GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_SOC_NOC 0x2014
1560*b826c3e4SAlim Akhtar #define GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__NOC 0x2018
1561*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_0_IPCLKPORT_I_ACLK 0x201c
1562*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_0_IPCLKPORT_I_PCLK 0x2020
1563*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_1_IPCLKPORT_I_ACLK 0x2024
1564*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_1_IPCLKPORT_I_PCLK 0x2028
1565*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_2_IPCLKPORT_I_ACLK 0x202c
1566*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_2_IPCLKPORT_I_PCLK 0x2030
1567*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_3_IPCLKPORT_I_ACLK 0x2034
1568*b826c3e4SAlim Akhtar #define GAT_CAM_CSI0_3_IPCLKPORT_I_PCLK 0x2038
1569*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_0_IPCLKPORT_I_ACLK 0x203c
1570*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_0_IPCLKPORT_I_PCLK 0x2040
1571*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_1_IPCLKPORT_I_ACLK 0x2044
1572*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_1_IPCLKPORT_I_PCLK 0x2048
1573*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_2_IPCLKPORT_I_ACLK 0x204c
1574*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_2_IPCLKPORT_I_PCLK 0x2050
1575*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_3_IPCLKPORT_I_ACLK 0x2054
1576*b826c3e4SAlim Akhtar #define GAT_CAM_CSI1_3_IPCLKPORT_I_PCLK 0x2058
1577*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_0_IPCLKPORT_I_ACLK 0x205c
1578*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_0_IPCLKPORT_I_PCLK 0x2060
1579*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_1_IPCLKPORT_I_ACLK 0x2064
1580*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_1_IPCLKPORT_I_PCLK 0x2068
1581*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_2_IPCLKPORT_I_ACLK 0x206c
1582*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_2_IPCLKPORT_I_PCLK 0x2070
1583*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_3_IPCLKPORT_I_ACLK 0x2074
1584*b826c3e4SAlim Akhtar #define GAT_CAM_CSI2_3_IPCLKPORT_I_PCLK 0x2078
1585*b826c3e4SAlim Akhtar #define GAT_CAM_NS_BRDG_CAM_CSI_IPCLKPORT_CLK__PSOC_CAM_CSI__CLK_CAM_CSI_D 0x207c
1586*b826c3e4SAlim Akhtar #define GAT_CAM_NS_BRDG_CAM_CSI_IPCLKPORT_CLK__PSOC_CAM_CSI__CLK_CAM_CSI_P 0x2080
1587*b826c3e4SAlim Akhtar #define GAT_CAM_SYSREG_CAM_CSI_IPCLKPORT_PCLK 0x2084
1588*b826c3e4SAlim Akhtar #define GAT_CAM_TBU_CAM_CSI_IPCLKPORT_ACLK 0x2088
1589*b826c3e4SAlim Akhtar
1590*b826c3e4SAlim Akhtar static const unsigned long cam_csi_clk_regs[] __initconst = {
1591*b826c3e4SAlim Akhtar PLL_LOCKTIME_PLL_CAM_CSI,
1592*b826c3e4SAlim Akhtar PLL_CON0_PLL_CAM_CSI,
1593*b826c3e4SAlim Akhtar DIV_CAM_CSI0_ACLK,
1594*b826c3e4SAlim Akhtar DIV_CAM_CSI1_ACLK,
1595*b826c3e4SAlim Akhtar DIV_CAM_CSI2_ACLK,
1596*b826c3e4SAlim Akhtar DIV_CAM_CSI_BUSD,
1597*b826c3e4SAlim Akhtar DIV_CAM_CSI_BUSP,
1598*b826c3e4SAlim Akhtar GAT_CAM_CSI_CMU_CAM_CSI_IPCLKPORT_PCLK,
1599*b826c3e4SAlim Akhtar GAT_CAM_AXI2APB_CAM_CSI_IPCLKPORT_ACLK,
1600*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI0,
1601*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI1,
1602*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI2,
1603*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_SOC_NOC,
1604*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__NOC,
1605*b826c3e4SAlim Akhtar GAT_CAM_CSI0_0_IPCLKPORT_I_ACLK,
1606*b826c3e4SAlim Akhtar GAT_CAM_CSI0_0_IPCLKPORT_I_PCLK,
1607*b826c3e4SAlim Akhtar GAT_CAM_CSI0_1_IPCLKPORT_I_ACLK,
1608*b826c3e4SAlim Akhtar GAT_CAM_CSI0_1_IPCLKPORT_I_PCLK,
1609*b826c3e4SAlim Akhtar GAT_CAM_CSI0_2_IPCLKPORT_I_ACLK,
1610*b826c3e4SAlim Akhtar GAT_CAM_CSI0_2_IPCLKPORT_I_PCLK,
1611*b826c3e4SAlim Akhtar GAT_CAM_CSI0_3_IPCLKPORT_I_ACLK,
1612*b826c3e4SAlim Akhtar GAT_CAM_CSI0_3_IPCLKPORT_I_PCLK,
1613*b826c3e4SAlim Akhtar GAT_CAM_CSI1_0_IPCLKPORT_I_ACLK,
1614*b826c3e4SAlim Akhtar GAT_CAM_CSI1_0_IPCLKPORT_I_PCLK,
1615*b826c3e4SAlim Akhtar GAT_CAM_CSI1_1_IPCLKPORT_I_ACLK,
1616*b826c3e4SAlim Akhtar GAT_CAM_CSI1_1_IPCLKPORT_I_PCLK,
1617*b826c3e4SAlim Akhtar GAT_CAM_CSI1_2_IPCLKPORT_I_ACLK,
1618*b826c3e4SAlim Akhtar GAT_CAM_CSI1_2_IPCLKPORT_I_PCLK,
1619*b826c3e4SAlim Akhtar GAT_CAM_CSI1_3_IPCLKPORT_I_ACLK,
1620*b826c3e4SAlim Akhtar GAT_CAM_CSI1_3_IPCLKPORT_I_PCLK,
1621*b826c3e4SAlim Akhtar GAT_CAM_CSI2_0_IPCLKPORT_I_ACLK,
1622*b826c3e4SAlim Akhtar GAT_CAM_CSI2_0_IPCLKPORT_I_PCLK,
1623*b826c3e4SAlim Akhtar GAT_CAM_CSI2_1_IPCLKPORT_I_ACLK,
1624*b826c3e4SAlim Akhtar GAT_CAM_CSI2_1_IPCLKPORT_I_PCLK,
1625*b826c3e4SAlim Akhtar GAT_CAM_CSI2_2_IPCLKPORT_I_ACLK,
1626*b826c3e4SAlim Akhtar GAT_CAM_CSI2_2_IPCLKPORT_I_PCLK,
1627*b826c3e4SAlim Akhtar GAT_CAM_CSI2_3_IPCLKPORT_I_ACLK,
1628*b826c3e4SAlim Akhtar GAT_CAM_CSI2_3_IPCLKPORT_I_PCLK,
1629*b826c3e4SAlim Akhtar GAT_CAM_NS_BRDG_CAM_CSI_IPCLKPORT_CLK__PSOC_CAM_CSI__CLK_CAM_CSI_D,
1630*b826c3e4SAlim Akhtar GAT_CAM_NS_BRDG_CAM_CSI_IPCLKPORT_CLK__PSOC_CAM_CSI__CLK_CAM_CSI_P,
1631*b826c3e4SAlim Akhtar GAT_CAM_SYSREG_CAM_CSI_IPCLKPORT_PCLK,
1632*b826c3e4SAlim Akhtar GAT_CAM_TBU_CAM_CSI_IPCLKPORT_ACLK,
1633*b826c3e4SAlim Akhtar };
1634*b826c3e4SAlim Akhtar
1635*b826c3e4SAlim Akhtar static const struct samsung_pll_rate_table pll_cam_csi_rate_table[] __initconst = {
1636*b826c3e4SAlim Akhtar PLL_35XX_RATE(24 * MHZ, 1066000000U, 533, 12, 0),
1637*b826c3e4SAlim Akhtar };
1638*b826c3e4SAlim Akhtar
1639*b826c3e4SAlim Akhtar static const struct samsung_pll_clock cam_csi_pll_clks[] __initconst = {
1640*b826c3e4SAlim Akhtar PLL(pll_142xx, 0, "fout_pll_cam_csi", "fin_pll",
1641*b826c3e4SAlim Akhtar PLL_LOCKTIME_PLL_CAM_CSI, PLL_CON0_PLL_CAM_CSI, pll_cam_csi_rate_table),
1642*b826c3e4SAlim Akhtar };
1643*b826c3e4SAlim Akhtar
1644*b826c3e4SAlim Akhtar PNAME(mout_cam_csi_pll_p) = { "fin_pll", "fout_pll_cam_csi" };
1645*b826c3e4SAlim Akhtar
1646*b826c3e4SAlim Akhtar static const struct samsung_mux_clock cam_csi_mux_clks[] __initconst = {
1647*b826c3e4SAlim Akhtar MUX(0, "mout_cam_csi_pll", mout_cam_csi_pll_p, PLL_CON0_PLL_CAM_CSI, 4, 1),
1648*b826c3e4SAlim Akhtar };
1649*b826c3e4SAlim Akhtar
1650*b826c3e4SAlim Akhtar static const struct samsung_div_clock cam_csi_div_clks[] __initconst = {
1651*b826c3e4SAlim Akhtar DIV(0, "dout_cam_csi0_aclk", "mout_cam_csi_pll", DIV_CAM_CSI0_ACLK, 0, 4),
1652*b826c3e4SAlim Akhtar DIV(0, "dout_cam_csi1_aclk", "mout_cam_csi_pll", DIV_CAM_CSI1_ACLK, 0, 4),
1653*b826c3e4SAlim Akhtar DIV(0, "dout_cam_csi2_aclk", "mout_cam_csi_pll", DIV_CAM_CSI2_ACLK, 0, 4),
1654*b826c3e4SAlim Akhtar DIV(0, "dout_cam_csi_busd", "mout_cam_csi_pll", DIV_CAM_CSI_BUSD, 0, 4),
1655*b826c3e4SAlim Akhtar DIV(0, "dout_cam_csi_busp", "mout_cam_csi_pll", DIV_CAM_CSI_BUSP, 0, 4),
1656*b826c3e4SAlim Akhtar };
1657*b826c3e4SAlim Akhtar
1658*b826c3e4SAlim Akhtar static const struct samsung_gate_clock cam_csi_gate_clks[] __initconst = {
1659*b826c3e4SAlim Akhtar GATE(0, "cam_csi_cmu_cam_csi_ipclkport_pclk", "dout_cam_csi_busp",
1660*b826c3e4SAlim Akhtar GAT_CAM_CSI_CMU_CAM_CSI_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1661*b826c3e4SAlim Akhtar GATE(0, "cam_axi2apb_cam_csi_ipclkport_aclk", "dout_cam_csi_busp",
1662*b826c3e4SAlim Akhtar GAT_CAM_AXI2APB_CAM_CSI_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1663*b826c3e4SAlim Akhtar GATE(0, "cam_csi_bus_d_cam_csi_ipclkport_clk__system__clk_csi0", "dout_cam_csi0_aclk",
1664*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI0, 21, CLK_IGNORE_UNUSED, 0),
1665*b826c3e4SAlim Akhtar GATE(0, "cam_csi_bus_d_cam_csi_ipclkport_clk__system__clk_csi1", "dout_cam_csi1_aclk",
1666*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI1, 21, CLK_IGNORE_UNUSED, 0),
1667*b826c3e4SAlim Akhtar GATE(0, "cam_csi_bus_d_cam_csi_ipclkport_clk__system__clk_csi2", "dout_cam_csi2_aclk",
1668*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_CSI2, 21, CLK_IGNORE_UNUSED, 0),
1669*b826c3e4SAlim Akhtar GATE(0, "cam_csi_bus_d_cam_csi_ipclkport_clk__system__clk_soc_noc", "dout_cam_csi_busd",
1670*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__CLK_SOC_NOC, 21,
1671*b826c3e4SAlim Akhtar CLK_IGNORE_UNUSED, 0),
1672*b826c3e4SAlim Akhtar GATE(0, "cam_csi_bus_d_cam_csi_ipclkport_clk__system__noc", "dout_cam_csi_busd",
1673*b826c3e4SAlim Akhtar GAT_CAM_CSI_BUS_D_CAM_CSI_IPCLKPORT_CLK__SYSTEM__NOC, 21, CLK_IGNORE_UNUSED, 0),
1674*b826c3e4SAlim Akhtar GATE(CAM_CSI0_0_IPCLKPORT_I_ACLK, "cam_csi0_0_ipclkport_i_aclk", "dout_cam_csi0_aclk",
1675*b826c3e4SAlim Akhtar GAT_CAM_CSI0_0_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1676*b826c3e4SAlim Akhtar GATE(0, "cam_csi0_0_ipclkport_i_pclk", "dout_cam_csi_busp",
1677*b826c3e4SAlim Akhtar GAT_CAM_CSI0_0_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1678*b826c3e4SAlim Akhtar GATE(CAM_CSI0_1_IPCLKPORT_I_ACLK, "cam_csi0_1_ipclkport_i_aclk", "dout_cam_csi0_aclk",
1679*b826c3e4SAlim Akhtar GAT_CAM_CSI0_1_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1680*b826c3e4SAlim Akhtar GATE(0, "cam_csi0_1_ipclkport_i_pclk", "dout_cam_csi_busp",
1681*b826c3e4SAlim Akhtar GAT_CAM_CSI0_1_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1682*b826c3e4SAlim Akhtar GATE(CAM_CSI0_2_IPCLKPORT_I_ACLK, "cam_csi0_2_ipclkport_i_aclk", "dout_cam_csi0_aclk",
1683*b826c3e4SAlim Akhtar GAT_CAM_CSI0_2_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1684*b826c3e4SAlim Akhtar GATE(0, "cam_csi0_2_ipclkport_i_pclk", "dout_cam_csi_busp",
1685*b826c3e4SAlim Akhtar GAT_CAM_CSI0_2_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1686*b826c3e4SAlim Akhtar GATE(CAM_CSI0_3_IPCLKPORT_I_ACLK, "cam_csi0_3_ipclkport_i_aclk", "dout_cam_csi0_aclk",
1687*b826c3e4SAlim Akhtar GAT_CAM_CSI0_3_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1688*b826c3e4SAlim Akhtar GATE(0, "cam_csi0_3_ipclkport_i_pclk", "dout_cam_csi_busp",
1689*b826c3e4SAlim Akhtar GAT_CAM_CSI0_3_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1690*b826c3e4SAlim Akhtar GATE(CAM_CSI1_0_IPCLKPORT_I_ACLK, "cam_csi1_0_ipclkport_i_aclk", "dout_cam_csi1_aclk",
1691*b826c3e4SAlim Akhtar GAT_CAM_CSI1_0_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1692*b826c3e4SAlim Akhtar GATE(0, "cam_csi1_0_ipclkport_i_pclk", "dout_cam_csi_busp",
1693*b826c3e4SAlim Akhtar GAT_CAM_CSI1_0_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1694*b826c3e4SAlim Akhtar GATE(CAM_CSI1_1_IPCLKPORT_I_ACLK, "cam_csi1_1_ipclkport_i_aclk", "dout_cam_csi1_aclk",
1695*b826c3e4SAlim Akhtar GAT_CAM_CSI1_1_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1696*b826c3e4SAlim Akhtar GATE(0, "cam_csi1_1_ipclkport_i_pclk", "dout_cam_csi_busp",
1697*b826c3e4SAlim Akhtar GAT_CAM_CSI1_1_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1698*b826c3e4SAlim Akhtar GATE(CAM_CSI1_2_IPCLKPORT_I_ACLK, "cam_csi1_2_ipclkport_i_aclk", "dout_cam_csi1_aclk",
1699*b826c3e4SAlim Akhtar GAT_CAM_CSI1_2_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1700*b826c3e4SAlim Akhtar GATE(0, "cam_csi1_2_ipclkport_i_pclk", "dout_cam_csi_busp",
1701*b826c3e4SAlim Akhtar GAT_CAM_CSI1_2_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1702*b826c3e4SAlim Akhtar GATE(CAM_CSI1_3_IPCLKPORT_I_ACLK, "cam_csi1_3_ipclkport_i_aclk", "dout_cam_csi1_aclk",
1703*b826c3e4SAlim Akhtar GAT_CAM_CSI1_3_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1704*b826c3e4SAlim Akhtar GATE(0, "cam_csi1_3_ipclkport_i_pclk", "dout_cam_csi_busp",
1705*b826c3e4SAlim Akhtar GAT_CAM_CSI1_3_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1706*b826c3e4SAlim Akhtar GATE(CAM_CSI2_0_IPCLKPORT_I_ACLK, "cam_csi2_0_ipclkport_i_aclk", "dout_cam_csi2_aclk",
1707*b826c3e4SAlim Akhtar GAT_CAM_CSI2_0_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1708*b826c3e4SAlim Akhtar GATE(0, "cam_csi2_0_ipclkport_i_pclk", "dout_cam_csi_busp",
1709*b826c3e4SAlim Akhtar GAT_CAM_CSI2_0_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1710*b826c3e4SAlim Akhtar GATE(CAM_CSI2_1_IPCLKPORT_I_ACLK, "cam_csi2_1_ipclkport_i_aclk", "dout_cam_csi2_aclk",
1711*b826c3e4SAlim Akhtar GAT_CAM_CSI2_1_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1712*b826c3e4SAlim Akhtar GATE(0, "cam_csi2_1_ipclkport_i_pclk", "dout_cam_csi_busp",
1713*b826c3e4SAlim Akhtar GAT_CAM_CSI2_1_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1714*b826c3e4SAlim Akhtar GATE(CAM_CSI2_2_IPCLKPORT_I_ACLK, "cam_csi2_2_ipclkport_i_aclk", "dout_cam_csi2_aclk",
1715*b826c3e4SAlim Akhtar GAT_CAM_CSI2_2_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1716*b826c3e4SAlim Akhtar GATE(0, "cam_csi2_2_ipclkport_i_pclk", "dout_cam_csi_busp",
1717*b826c3e4SAlim Akhtar GAT_CAM_CSI2_2_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1718*b826c3e4SAlim Akhtar GATE(CAM_CSI2_3_IPCLKPORT_I_ACLK, "cam_csi2_3_ipclkport_i_aclk", "dout_cam_csi2_aclk",
1719*b826c3e4SAlim Akhtar GAT_CAM_CSI2_3_IPCLKPORT_I_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1720*b826c3e4SAlim Akhtar GATE(0, "cam_csi2_3_ipclkport_i_pclk", "dout_cam_csi_busp",
1721*b826c3e4SAlim Akhtar GAT_CAM_CSI2_3_IPCLKPORT_I_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1722*b826c3e4SAlim Akhtar GATE(0, "cam_ns_brdg_cam_csi_ipclkport_clk__psoc_cam_csi__clk_cam_csi_d",
1723*b826c3e4SAlim Akhtar "dout_cam_csi_busd",
1724*b826c3e4SAlim Akhtar GAT_CAM_NS_BRDG_CAM_CSI_IPCLKPORT_CLK__PSOC_CAM_CSI__CLK_CAM_CSI_D, 21,
1725*b826c3e4SAlim Akhtar CLK_IGNORE_UNUSED, 0),
1726*b826c3e4SAlim Akhtar GATE(0, "cam_ns_brdg_cam_csi_ipclkport_clk__psoc_cam_csi__clk_cam_csi_p",
1727*b826c3e4SAlim Akhtar "dout_cam_csi_busp",
1728*b826c3e4SAlim Akhtar GAT_CAM_NS_BRDG_CAM_CSI_IPCLKPORT_CLK__PSOC_CAM_CSI__CLK_CAM_CSI_P, 21,
1729*b826c3e4SAlim Akhtar CLK_IGNORE_UNUSED, 0),
1730*b826c3e4SAlim Akhtar GATE(0, "cam_sysreg_cam_csi_ipclkport_pclk", "dout_cam_csi_busp",
1731*b826c3e4SAlim Akhtar GAT_CAM_SYSREG_CAM_CSI_IPCLKPORT_PCLK, 21, CLK_IGNORE_UNUSED, 0),
1732*b826c3e4SAlim Akhtar GATE(0, "cam_tbu_cam_csi_ipclkport_aclk", "dout_cam_csi_busd",
1733*b826c3e4SAlim Akhtar GAT_CAM_TBU_CAM_CSI_IPCLKPORT_ACLK, 21, CLK_IGNORE_UNUSED, 0),
1734*b826c3e4SAlim Akhtar };
1735*b826c3e4SAlim Akhtar
1736*b826c3e4SAlim Akhtar static const struct samsung_cmu_info cam_csi_cmu_info __initconst = {
1737*b826c3e4SAlim Akhtar .pll_clks = cam_csi_pll_clks,
1738*b826c3e4SAlim Akhtar .nr_pll_clks = ARRAY_SIZE(cam_csi_pll_clks),
1739*b826c3e4SAlim Akhtar .mux_clks = cam_csi_mux_clks,
1740*b826c3e4SAlim Akhtar .nr_mux_clks = ARRAY_SIZE(cam_csi_mux_clks),
1741*b826c3e4SAlim Akhtar .div_clks = cam_csi_div_clks,
1742*b826c3e4SAlim Akhtar .nr_div_clks = ARRAY_SIZE(cam_csi_div_clks),
1743*b826c3e4SAlim Akhtar .gate_clks = cam_csi_gate_clks,
1744*b826c3e4SAlim Akhtar .nr_gate_clks = ARRAY_SIZE(cam_csi_gate_clks),
1745*b826c3e4SAlim Akhtar .nr_clk_ids = CAM_CSI_NR_CLK,
1746*b826c3e4SAlim Akhtar .clk_regs = cam_csi_clk_regs,
1747*b826c3e4SAlim Akhtar .nr_clk_regs = ARRAY_SIZE(cam_csi_clk_regs),
1748*b826c3e4SAlim Akhtar };
1749*b826c3e4SAlim Akhtar
1750e3f3dc38SAlim Akhtar /**
1751e3f3dc38SAlim Akhtar * fsd_cmu_probe - Probe function for FSD platform clocks
1752e3f3dc38SAlim Akhtar * @pdev: Pointer to platform device
1753e3f3dc38SAlim Akhtar *
1754e3f3dc38SAlim Akhtar * Configure clock hierarchy for clock domains of FSD platform
1755e3f3dc38SAlim Akhtar */
fsd_cmu_probe(struct platform_device * pdev)1756e3f3dc38SAlim Akhtar static int __init fsd_cmu_probe(struct platform_device *pdev)
1757e3f3dc38SAlim Akhtar {
1758e3f3dc38SAlim Akhtar const struct samsung_cmu_info *info;
1759e3f3dc38SAlim Akhtar struct device *dev = &pdev->dev;
1760e3f3dc38SAlim Akhtar
1761e3f3dc38SAlim Akhtar info = of_device_get_match_data(dev);
1762e3f3dc38SAlim Akhtar exynos_arm64_register_cmu(dev, dev->of_node, info);
1763e3f3dc38SAlim Akhtar
1764e3f3dc38SAlim Akhtar return 0;
1765e3f3dc38SAlim Akhtar }
1766e3f3dc38SAlim Akhtar
1767e3f3dc38SAlim Akhtar /* CMUs which belong to Power Domains and need runtime PM to be implemented */
1768e3f3dc38SAlim Akhtar static const struct of_device_id fsd_cmu_of_match[] = {
1769e3f3dc38SAlim Akhtar {
1770e3f3dc38SAlim Akhtar .compatible = "tesla,fsd-clock-peric",
1771e3f3dc38SAlim Akhtar .data = &peric_cmu_info,
1772e3f3dc38SAlim Akhtar }, {
1773a15e367bSAlim Akhtar .compatible = "tesla,fsd-clock-fsys0",
1774a15e367bSAlim Akhtar .data = &fsys0_cmu_info,
1775a15e367bSAlim Akhtar }, {
1776bfbce52eSAlim Akhtar .compatible = "tesla,fsd-clock-fsys1",
1777bfbce52eSAlim Akhtar .data = &fsys1_cmu_info,
1778bfbce52eSAlim Akhtar }, {
177975c50afaSAlim Akhtar .compatible = "tesla,fsd-clock-mfc",
178075c50afaSAlim Akhtar .data = &mfc_cmu_info,
178175c50afaSAlim Akhtar }, {
1782*b826c3e4SAlim Akhtar .compatible = "tesla,fsd-clock-cam_csi",
1783*b826c3e4SAlim Akhtar .data = &cam_csi_cmu_info,
1784*b826c3e4SAlim Akhtar }, {
1785e3f3dc38SAlim Akhtar },
1786e3f3dc38SAlim Akhtar };
1787e3f3dc38SAlim Akhtar
1788e3f3dc38SAlim Akhtar static struct platform_driver fsd_cmu_driver __refdata = {
1789e3f3dc38SAlim Akhtar .driver = {
1790e3f3dc38SAlim Akhtar .name = "fsd-cmu",
1791e3f3dc38SAlim Akhtar .of_match_table = fsd_cmu_of_match,
1792e3f3dc38SAlim Akhtar .suppress_bind_attrs = true,
1793e3f3dc38SAlim Akhtar },
1794e3f3dc38SAlim Akhtar .probe = fsd_cmu_probe,
1795e3f3dc38SAlim Akhtar };
1796e3f3dc38SAlim Akhtar
fsd_cmu_init(void)1797e3f3dc38SAlim Akhtar static int __init fsd_cmu_init(void)
1798e3f3dc38SAlim Akhtar {
1799e3f3dc38SAlim Akhtar return platform_driver_register(&fsd_cmu_driver);
1800e3f3dc38SAlim Akhtar }
1801e3f3dc38SAlim Akhtar core_initcall(fsd_cmu_init);
1802