162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2014 Samsung Electronics Co., Ltd. 462306a36Sopenharmony_ci * Author: Naveen Krishna Ch <naveenkrishna.ch@gmail.com> 562306a36Sopenharmony_ci*/ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#include <linux/clk-provider.h> 862306a36Sopenharmony_ci#include <linux/of.h> 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include "clk.h" 1162306a36Sopenharmony_ci#include <dt-bindings/clock/exynos7-clk.h> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* Register Offset definitions for CMU_TOPC (0x10570000) */ 1462306a36Sopenharmony_ci#define CC_PLL_LOCK 0x0000 1562306a36Sopenharmony_ci#define BUS0_PLL_LOCK 0x0004 1662306a36Sopenharmony_ci#define BUS1_DPLL_LOCK 0x0008 1762306a36Sopenharmony_ci#define MFC_PLL_LOCK 0x000C 1862306a36Sopenharmony_ci#define AUD_PLL_LOCK 0x0010 1962306a36Sopenharmony_ci#define CC_PLL_CON0 0x0100 2062306a36Sopenharmony_ci#define BUS0_PLL_CON0 0x0110 2162306a36Sopenharmony_ci#define BUS1_DPLL_CON0 0x0120 2262306a36Sopenharmony_ci#define MFC_PLL_CON0 0x0130 2362306a36Sopenharmony_ci#define AUD_PLL_CON0 0x0140 2462306a36Sopenharmony_ci#define MUX_SEL_TOPC0 0x0200 2562306a36Sopenharmony_ci#define MUX_SEL_TOPC1 0x0204 2662306a36Sopenharmony_ci#define MUX_SEL_TOPC2 0x0208 2762306a36Sopenharmony_ci#define MUX_SEL_TOPC3 0x020C 2862306a36Sopenharmony_ci#define DIV_TOPC0 0x0600 2962306a36Sopenharmony_ci#define DIV_TOPC1 0x0604 3062306a36Sopenharmony_ci#define DIV_TOPC3 0x060C 3162306a36Sopenharmony_ci#define ENABLE_ACLK_TOPC0 0x0800 3262306a36Sopenharmony_ci#define ENABLE_ACLK_TOPC1 0x0804 3362306a36Sopenharmony_ci#define ENABLE_SCLK_TOPC1 0x0A04 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_cistatic const struct samsung_fixed_factor_clock topc_fixed_factor_clks[] __initconst = { 3662306a36Sopenharmony_ci FFACTOR(0, "ffac_topc_bus0_pll_div2", "mout_topc_bus0_pll", 1, 2, 0), 3762306a36Sopenharmony_ci FFACTOR(0, "ffac_topc_bus0_pll_div4", 3862306a36Sopenharmony_ci "ffac_topc_bus0_pll_div2", 1, 2, 0), 3962306a36Sopenharmony_ci FFACTOR(0, "ffac_topc_bus1_pll_div2", "mout_topc_bus1_pll", 1, 2, 0), 4062306a36Sopenharmony_ci FFACTOR(0, "ffac_topc_cc_pll_div2", "mout_topc_cc_pll", 1, 2, 0), 4162306a36Sopenharmony_ci FFACTOR(0, "ffac_topc_mfc_pll_div2", "mout_topc_mfc_pll", 1, 2, 0), 4262306a36Sopenharmony_ci}; 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci/* List of parent clocks for Muxes in CMU_TOPC */ 4562306a36Sopenharmony_ciPNAME(mout_topc_aud_pll_ctrl_p) = { "fin_pll", "fout_aud_pll" }; 4662306a36Sopenharmony_ciPNAME(mout_topc_bus0_pll_ctrl_p) = { "fin_pll", "fout_bus0_pll" }; 4762306a36Sopenharmony_ciPNAME(mout_topc_bus1_pll_ctrl_p) = { "fin_pll", "fout_bus1_pll" }; 4862306a36Sopenharmony_ciPNAME(mout_topc_cc_pll_ctrl_p) = { "fin_pll", "fout_cc_pll" }; 4962306a36Sopenharmony_ciPNAME(mout_topc_mfc_pll_ctrl_p) = { "fin_pll", "fout_mfc_pll" }; 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ciPNAME(mout_topc_group2) = { "mout_topc_bus0_pll_half", 5262306a36Sopenharmony_ci "mout_topc_bus1_pll_half", "mout_topc_cc_pll_half", 5362306a36Sopenharmony_ci "mout_topc_mfc_pll_half" }; 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ciPNAME(mout_topc_bus0_pll_half_p) = { "mout_topc_bus0_pll", 5662306a36Sopenharmony_ci "ffac_topc_bus0_pll_div2", "ffac_topc_bus0_pll_div4"}; 5762306a36Sopenharmony_ciPNAME(mout_topc_bus1_pll_half_p) = { "mout_topc_bus1_pll", 5862306a36Sopenharmony_ci "ffac_topc_bus1_pll_div2"}; 5962306a36Sopenharmony_ciPNAME(mout_topc_cc_pll_half_p) = { "mout_topc_cc_pll", 6062306a36Sopenharmony_ci "ffac_topc_cc_pll_div2"}; 6162306a36Sopenharmony_ciPNAME(mout_topc_mfc_pll_half_p) = { "mout_topc_mfc_pll", 6262306a36Sopenharmony_ci "ffac_topc_mfc_pll_div2"}; 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ciPNAME(mout_topc_bus0_pll_out_p) = {"mout_topc_bus0_pll", 6662306a36Sopenharmony_ci "ffac_topc_bus0_pll_div2"}; 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_cistatic const unsigned long topc_clk_regs[] __initconst = { 6962306a36Sopenharmony_ci CC_PLL_LOCK, 7062306a36Sopenharmony_ci BUS0_PLL_LOCK, 7162306a36Sopenharmony_ci BUS1_DPLL_LOCK, 7262306a36Sopenharmony_ci MFC_PLL_LOCK, 7362306a36Sopenharmony_ci AUD_PLL_LOCK, 7462306a36Sopenharmony_ci CC_PLL_CON0, 7562306a36Sopenharmony_ci BUS0_PLL_CON0, 7662306a36Sopenharmony_ci BUS1_DPLL_CON0, 7762306a36Sopenharmony_ci MFC_PLL_CON0, 7862306a36Sopenharmony_ci AUD_PLL_CON0, 7962306a36Sopenharmony_ci MUX_SEL_TOPC0, 8062306a36Sopenharmony_ci MUX_SEL_TOPC1, 8162306a36Sopenharmony_ci MUX_SEL_TOPC2, 8262306a36Sopenharmony_ci MUX_SEL_TOPC3, 8362306a36Sopenharmony_ci DIV_TOPC0, 8462306a36Sopenharmony_ci DIV_TOPC1, 8562306a36Sopenharmony_ci DIV_TOPC3, 8662306a36Sopenharmony_ci}; 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_cistatic const struct samsung_mux_clock topc_mux_clks[] __initconst = { 8962306a36Sopenharmony_ci MUX(0, "mout_topc_bus0_pll", mout_topc_bus0_pll_ctrl_p, 9062306a36Sopenharmony_ci MUX_SEL_TOPC0, 0, 1), 9162306a36Sopenharmony_ci MUX(0, "mout_topc_bus1_pll", mout_topc_bus1_pll_ctrl_p, 9262306a36Sopenharmony_ci MUX_SEL_TOPC0, 4, 1), 9362306a36Sopenharmony_ci MUX(0, "mout_topc_cc_pll", mout_topc_cc_pll_ctrl_p, 9462306a36Sopenharmony_ci MUX_SEL_TOPC0, 8, 1), 9562306a36Sopenharmony_ci MUX(0, "mout_topc_mfc_pll", mout_topc_mfc_pll_ctrl_p, 9662306a36Sopenharmony_ci MUX_SEL_TOPC0, 12, 1), 9762306a36Sopenharmony_ci MUX(0, "mout_topc_bus0_pll_half", mout_topc_bus0_pll_half_p, 9862306a36Sopenharmony_ci MUX_SEL_TOPC0, 16, 2), 9962306a36Sopenharmony_ci MUX(0, "mout_topc_bus1_pll_half", mout_topc_bus1_pll_half_p, 10062306a36Sopenharmony_ci MUX_SEL_TOPC0, 20, 1), 10162306a36Sopenharmony_ci MUX(0, "mout_topc_cc_pll_half", mout_topc_cc_pll_half_p, 10262306a36Sopenharmony_ci MUX_SEL_TOPC0, 24, 1), 10362306a36Sopenharmony_ci MUX(0, "mout_topc_mfc_pll_half", mout_topc_mfc_pll_half_p, 10462306a36Sopenharmony_ci MUX_SEL_TOPC0, 28, 1), 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci MUX(0, "mout_topc_aud_pll", mout_topc_aud_pll_ctrl_p, 10762306a36Sopenharmony_ci MUX_SEL_TOPC1, 0, 1), 10862306a36Sopenharmony_ci MUX(0, "mout_topc_bus0_pll_out", mout_topc_bus0_pll_out_p, 10962306a36Sopenharmony_ci MUX_SEL_TOPC1, 16, 1), 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci MUX(0, "mout_aclk_ccore_133", mout_topc_group2, MUX_SEL_TOPC2, 4, 2), 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci MUX(0, "mout_aclk_mscl_532", mout_topc_group2, MUX_SEL_TOPC3, 20, 2), 11462306a36Sopenharmony_ci MUX(0, "mout_aclk_peris_66", mout_topc_group2, MUX_SEL_TOPC3, 24, 2), 11562306a36Sopenharmony_ci}; 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_cistatic const struct samsung_div_clock topc_div_clks[] __initconst = { 11862306a36Sopenharmony_ci DIV(DOUT_ACLK_CCORE_133, "dout_aclk_ccore_133", "mout_aclk_ccore_133", 11962306a36Sopenharmony_ci DIV_TOPC0, 4, 4), 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci DIV(DOUT_ACLK_MSCL_532, "dout_aclk_mscl_532", "mout_aclk_mscl_532", 12262306a36Sopenharmony_ci DIV_TOPC1, 20, 4), 12362306a36Sopenharmony_ci DIV(DOUT_ACLK_PERIS, "dout_aclk_peris_66", "mout_aclk_peris_66", 12462306a36Sopenharmony_ci DIV_TOPC1, 24, 4), 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci DIV(DOUT_SCLK_BUS0_PLL, "dout_sclk_bus0_pll", "mout_topc_bus0_pll_out", 12762306a36Sopenharmony_ci DIV_TOPC3, 0, 4), 12862306a36Sopenharmony_ci DIV(DOUT_SCLK_BUS1_PLL, "dout_sclk_bus1_pll", "mout_topc_bus1_pll", 12962306a36Sopenharmony_ci DIV_TOPC3, 8, 4), 13062306a36Sopenharmony_ci DIV(DOUT_SCLK_CC_PLL, "dout_sclk_cc_pll", "mout_topc_cc_pll", 13162306a36Sopenharmony_ci DIV_TOPC3, 12, 4), 13262306a36Sopenharmony_ci DIV(DOUT_SCLK_MFC_PLL, "dout_sclk_mfc_pll", "mout_topc_mfc_pll", 13362306a36Sopenharmony_ci DIV_TOPC3, 16, 4), 13462306a36Sopenharmony_ci DIV(DOUT_SCLK_AUD_PLL, "dout_sclk_aud_pll", "mout_topc_aud_pll", 13562306a36Sopenharmony_ci DIV_TOPC3, 28, 4), 13662306a36Sopenharmony_ci}; 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_cistatic const struct samsung_pll_rate_table pll1460x_24mhz_tbl[] __initconst = { 13962306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 491519897, 20, 1, 0, 31457), 14062306a36Sopenharmony_ci {}, 14162306a36Sopenharmony_ci}; 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_cistatic const struct samsung_gate_clock topc_gate_clks[] __initconst = { 14462306a36Sopenharmony_ci GATE(ACLK_CCORE_133, "aclk_ccore_133", "dout_aclk_ccore_133", 14562306a36Sopenharmony_ci ENABLE_ACLK_TOPC0, 4, CLK_IS_CRITICAL, 0), 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci GATE(ACLK_MSCL_532, "aclk_mscl_532", "dout_aclk_mscl_532", 14862306a36Sopenharmony_ci ENABLE_ACLK_TOPC1, 20, 0, 0), 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci GATE(ACLK_PERIS_66, "aclk_peris_66", "dout_aclk_peris_66", 15162306a36Sopenharmony_ci ENABLE_ACLK_TOPC1, 24, 0, 0), 15262306a36Sopenharmony_ci 15362306a36Sopenharmony_ci GATE(SCLK_AUD_PLL, "sclk_aud_pll", "dout_sclk_aud_pll", 15462306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 20, 0, 0), 15562306a36Sopenharmony_ci GATE(SCLK_MFC_PLL_B, "sclk_mfc_pll_b", "dout_sclk_mfc_pll", 15662306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 17, 0, 0), 15762306a36Sopenharmony_ci GATE(SCLK_MFC_PLL_A, "sclk_mfc_pll_a", "dout_sclk_mfc_pll", 15862306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 16, 0, 0), 15962306a36Sopenharmony_ci GATE(SCLK_BUS1_PLL_B, "sclk_bus1_pll_b", "dout_sclk_bus1_pll", 16062306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 13, 0, 0), 16162306a36Sopenharmony_ci GATE(SCLK_BUS1_PLL_A, "sclk_bus1_pll_a", "dout_sclk_bus1_pll", 16262306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 12, 0, 0), 16362306a36Sopenharmony_ci GATE(SCLK_BUS0_PLL_B, "sclk_bus0_pll_b", "dout_sclk_bus0_pll", 16462306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 5, 0, 0), 16562306a36Sopenharmony_ci GATE(SCLK_BUS0_PLL_A, "sclk_bus0_pll_a", "dout_sclk_bus0_pll", 16662306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 4, 0, 0), 16762306a36Sopenharmony_ci GATE(SCLK_CC_PLL_B, "sclk_cc_pll_b", "dout_sclk_cc_pll", 16862306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 1, 0, 0), 16962306a36Sopenharmony_ci GATE(SCLK_CC_PLL_A, "sclk_cc_pll_a", "dout_sclk_cc_pll", 17062306a36Sopenharmony_ci ENABLE_SCLK_TOPC1, 0, 0, 0), 17162306a36Sopenharmony_ci}; 17262306a36Sopenharmony_ci 17362306a36Sopenharmony_cistatic const struct samsung_pll_clock topc_pll_clks[] __initconst = { 17462306a36Sopenharmony_ci PLL(pll_1451x, 0, "fout_bus0_pll", "fin_pll", BUS0_PLL_LOCK, 17562306a36Sopenharmony_ci BUS0_PLL_CON0, NULL), 17662306a36Sopenharmony_ci PLL(pll_1452x, 0, "fout_cc_pll", "fin_pll", CC_PLL_LOCK, 17762306a36Sopenharmony_ci CC_PLL_CON0, NULL), 17862306a36Sopenharmony_ci PLL(pll_1452x, 0, "fout_bus1_pll", "fin_pll", BUS1_DPLL_LOCK, 17962306a36Sopenharmony_ci BUS1_DPLL_CON0, NULL), 18062306a36Sopenharmony_ci PLL(pll_1452x, 0, "fout_mfc_pll", "fin_pll", MFC_PLL_LOCK, 18162306a36Sopenharmony_ci MFC_PLL_CON0, NULL), 18262306a36Sopenharmony_ci PLL(pll_1460x, FOUT_AUD_PLL, "fout_aud_pll", "fin_pll", AUD_PLL_LOCK, 18362306a36Sopenharmony_ci AUD_PLL_CON0, pll1460x_24mhz_tbl), 18462306a36Sopenharmony_ci}; 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_cistatic const struct samsung_cmu_info topc_cmu_info __initconst = { 18762306a36Sopenharmony_ci .pll_clks = topc_pll_clks, 18862306a36Sopenharmony_ci .nr_pll_clks = ARRAY_SIZE(topc_pll_clks), 18962306a36Sopenharmony_ci .mux_clks = topc_mux_clks, 19062306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(topc_mux_clks), 19162306a36Sopenharmony_ci .div_clks = topc_div_clks, 19262306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(topc_div_clks), 19362306a36Sopenharmony_ci .gate_clks = topc_gate_clks, 19462306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(topc_gate_clks), 19562306a36Sopenharmony_ci .fixed_factor_clks = topc_fixed_factor_clks, 19662306a36Sopenharmony_ci .nr_fixed_factor_clks = ARRAY_SIZE(topc_fixed_factor_clks), 19762306a36Sopenharmony_ci .nr_clk_ids = TOPC_NR_CLK, 19862306a36Sopenharmony_ci .clk_regs = topc_clk_regs, 19962306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(topc_clk_regs), 20062306a36Sopenharmony_ci}; 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_cistatic void __init exynos7_clk_topc_init(struct device_node *np) 20362306a36Sopenharmony_ci{ 20462306a36Sopenharmony_ci samsung_cmu_register_one(np, &topc_cmu_info); 20562306a36Sopenharmony_ci} 20662306a36Sopenharmony_ci 20762306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_topc, "samsung,exynos7-clock-topc", 20862306a36Sopenharmony_ci exynos7_clk_topc_init); 20962306a36Sopenharmony_ci 21062306a36Sopenharmony_ci/* Register Offset definitions for CMU_TOP0 (0x105D0000) */ 21162306a36Sopenharmony_ci#define MUX_SEL_TOP00 0x0200 21262306a36Sopenharmony_ci#define MUX_SEL_TOP01 0x0204 21362306a36Sopenharmony_ci#define MUX_SEL_TOP03 0x020C 21462306a36Sopenharmony_ci#define MUX_SEL_TOP0_PERIC0 0x0230 21562306a36Sopenharmony_ci#define MUX_SEL_TOP0_PERIC1 0x0234 21662306a36Sopenharmony_ci#define MUX_SEL_TOP0_PERIC2 0x0238 21762306a36Sopenharmony_ci#define MUX_SEL_TOP0_PERIC3 0x023C 21862306a36Sopenharmony_ci#define DIV_TOP03 0x060C 21962306a36Sopenharmony_ci#define DIV_TOP0_PERIC0 0x0630 22062306a36Sopenharmony_ci#define DIV_TOP0_PERIC1 0x0634 22162306a36Sopenharmony_ci#define DIV_TOP0_PERIC2 0x0638 22262306a36Sopenharmony_ci#define DIV_TOP0_PERIC3 0x063C 22362306a36Sopenharmony_ci#define ENABLE_ACLK_TOP03 0x080C 22462306a36Sopenharmony_ci#define ENABLE_SCLK_TOP0_PERIC0 0x0A30 22562306a36Sopenharmony_ci#define ENABLE_SCLK_TOP0_PERIC1 0x0A34 22662306a36Sopenharmony_ci#define ENABLE_SCLK_TOP0_PERIC2 0x0A38 22762306a36Sopenharmony_ci#define ENABLE_SCLK_TOP0_PERIC3 0x0A3C 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ci/* List of parent clocks for Muxes in CMU_TOP0 */ 23062306a36Sopenharmony_ciPNAME(mout_top0_bus0_pll_user_p) = { "fin_pll", "sclk_bus0_pll_a" }; 23162306a36Sopenharmony_ciPNAME(mout_top0_bus1_pll_user_p) = { "fin_pll", "sclk_bus1_pll_a" }; 23262306a36Sopenharmony_ciPNAME(mout_top0_cc_pll_user_p) = { "fin_pll", "sclk_cc_pll_a" }; 23362306a36Sopenharmony_ciPNAME(mout_top0_mfc_pll_user_p) = { "fin_pll", "sclk_mfc_pll_a" }; 23462306a36Sopenharmony_ciPNAME(mout_top0_aud_pll_user_p) = { "fin_pll", "sclk_aud_pll" }; 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_ciPNAME(mout_top0_bus0_pll_half_p) = {"mout_top0_bus0_pll_user", 23762306a36Sopenharmony_ci "ffac_top0_bus0_pll_div2"}; 23862306a36Sopenharmony_ciPNAME(mout_top0_bus1_pll_half_p) = {"mout_top0_bus1_pll_user", 23962306a36Sopenharmony_ci "ffac_top0_bus1_pll_div2"}; 24062306a36Sopenharmony_ciPNAME(mout_top0_cc_pll_half_p) = {"mout_top0_cc_pll_user", 24162306a36Sopenharmony_ci "ffac_top0_cc_pll_div2"}; 24262306a36Sopenharmony_ciPNAME(mout_top0_mfc_pll_half_p) = {"mout_top0_mfc_pll_user", 24362306a36Sopenharmony_ci "ffac_top0_mfc_pll_div2"}; 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ciPNAME(mout_top0_group1) = {"mout_top0_bus0_pll_half", 24662306a36Sopenharmony_ci "mout_top0_bus1_pll_half", "mout_top0_cc_pll_half", 24762306a36Sopenharmony_ci "mout_top0_mfc_pll_half"}; 24862306a36Sopenharmony_ciPNAME(mout_top0_group3) = {"ioclk_audiocdclk0", 24962306a36Sopenharmony_ci "ioclk_audiocdclk1", "ioclk_spdif_extclk", 25062306a36Sopenharmony_ci "mout_top0_aud_pll_user", "mout_top0_bus0_pll_half", 25162306a36Sopenharmony_ci "mout_top0_bus1_pll_half"}; 25262306a36Sopenharmony_ciPNAME(mout_top0_group4) = {"ioclk_audiocdclk1", "mout_top0_aud_pll_user", 25362306a36Sopenharmony_ci "mout_top0_bus0_pll_half", "mout_top0_bus1_pll_half"}; 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_cistatic const unsigned long top0_clk_regs[] __initconst = { 25662306a36Sopenharmony_ci MUX_SEL_TOP00, 25762306a36Sopenharmony_ci MUX_SEL_TOP01, 25862306a36Sopenharmony_ci MUX_SEL_TOP03, 25962306a36Sopenharmony_ci MUX_SEL_TOP0_PERIC0, 26062306a36Sopenharmony_ci MUX_SEL_TOP0_PERIC1, 26162306a36Sopenharmony_ci MUX_SEL_TOP0_PERIC2, 26262306a36Sopenharmony_ci MUX_SEL_TOP0_PERIC3, 26362306a36Sopenharmony_ci DIV_TOP03, 26462306a36Sopenharmony_ci DIV_TOP0_PERIC0, 26562306a36Sopenharmony_ci DIV_TOP0_PERIC1, 26662306a36Sopenharmony_ci DIV_TOP0_PERIC2, 26762306a36Sopenharmony_ci DIV_TOP0_PERIC3, 26862306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC0, 26962306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC1, 27062306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC2, 27162306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC3, 27262306a36Sopenharmony_ci}; 27362306a36Sopenharmony_ci 27462306a36Sopenharmony_cistatic const struct samsung_mux_clock top0_mux_clks[] __initconst = { 27562306a36Sopenharmony_ci MUX(0, "mout_top0_aud_pll_user", mout_top0_aud_pll_user_p, 27662306a36Sopenharmony_ci MUX_SEL_TOP00, 0, 1), 27762306a36Sopenharmony_ci MUX(0, "mout_top0_mfc_pll_user", mout_top0_mfc_pll_user_p, 27862306a36Sopenharmony_ci MUX_SEL_TOP00, 4, 1), 27962306a36Sopenharmony_ci MUX(0, "mout_top0_cc_pll_user", mout_top0_cc_pll_user_p, 28062306a36Sopenharmony_ci MUX_SEL_TOP00, 8, 1), 28162306a36Sopenharmony_ci MUX(0, "mout_top0_bus1_pll_user", mout_top0_bus1_pll_user_p, 28262306a36Sopenharmony_ci MUX_SEL_TOP00, 12, 1), 28362306a36Sopenharmony_ci MUX(0, "mout_top0_bus0_pll_user", mout_top0_bus0_pll_user_p, 28462306a36Sopenharmony_ci MUX_SEL_TOP00, 16, 1), 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci MUX(0, "mout_top0_mfc_pll_half", mout_top0_mfc_pll_half_p, 28762306a36Sopenharmony_ci MUX_SEL_TOP01, 4, 1), 28862306a36Sopenharmony_ci MUX(0, "mout_top0_cc_pll_half", mout_top0_cc_pll_half_p, 28962306a36Sopenharmony_ci MUX_SEL_TOP01, 8, 1), 29062306a36Sopenharmony_ci MUX(0, "mout_top0_bus1_pll_half", mout_top0_bus1_pll_half_p, 29162306a36Sopenharmony_ci MUX_SEL_TOP01, 12, 1), 29262306a36Sopenharmony_ci MUX(0, "mout_top0_bus0_pll_half", mout_top0_bus0_pll_half_p, 29362306a36Sopenharmony_ci MUX_SEL_TOP01, 16, 1), 29462306a36Sopenharmony_ci 29562306a36Sopenharmony_ci MUX(0, "mout_aclk_peric1_66", mout_top0_group1, MUX_SEL_TOP03, 12, 2), 29662306a36Sopenharmony_ci MUX(0, "mout_aclk_peric0_66", mout_top0_group1, MUX_SEL_TOP03, 20, 2), 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ci MUX(0, "mout_sclk_spdif", mout_top0_group3, MUX_SEL_TOP0_PERIC0, 4, 3), 29962306a36Sopenharmony_ci MUX(0, "mout_sclk_pcm1", mout_top0_group4, MUX_SEL_TOP0_PERIC0, 8, 2), 30062306a36Sopenharmony_ci MUX(0, "mout_sclk_i2s1", mout_top0_group4, MUX_SEL_TOP0_PERIC0, 20, 2), 30162306a36Sopenharmony_ci 30262306a36Sopenharmony_ci MUX(0, "mout_sclk_spi1", mout_top0_group1, MUX_SEL_TOP0_PERIC1, 8, 2), 30362306a36Sopenharmony_ci MUX(0, "mout_sclk_spi0", mout_top0_group1, MUX_SEL_TOP0_PERIC1, 20, 2), 30462306a36Sopenharmony_ci 30562306a36Sopenharmony_ci MUX(0, "mout_sclk_spi3", mout_top0_group1, MUX_SEL_TOP0_PERIC2, 8, 2), 30662306a36Sopenharmony_ci MUX(0, "mout_sclk_spi2", mout_top0_group1, MUX_SEL_TOP0_PERIC2, 20, 2), 30762306a36Sopenharmony_ci MUX(0, "mout_sclk_uart3", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 4, 2), 30862306a36Sopenharmony_ci MUX(0, "mout_sclk_uart2", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 8, 2), 30962306a36Sopenharmony_ci MUX(0, "mout_sclk_uart1", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 12, 2), 31062306a36Sopenharmony_ci MUX(0, "mout_sclk_uart0", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 16, 2), 31162306a36Sopenharmony_ci MUX(0, "mout_sclk_spi4", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 20, 2), 31262306a36Sopenharmony_ci}; 31362306a36Sopenharmony_ci 31462306a36Sopenharmony_cistatic const struct samsung_div_clock top0_div_clks[] __initconst = { 31562306a36Sopenharmony_ci DIV(DOUT_ACLK_PERIC1, "dout_aclk_peric1_66", "mout_aclk_peric1_66", 31662306a36Sopenharmony_ci DIV_TOP03, 12, 6), 31762306a36Sopenharmony_ci DIV(DOUT_ACLK_PERIC0, "dout_aclk_peric0_66", "mout_aclk_peric0_66", 31862306a36Sopenharmony_ci DIV_TOP03, 20, 6), 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_ci DIV(0, "dout_sclk_spdif", "mout_sclk_spdif", DIV_TOP0_PERIC0, 4, 4), 32162306a36Sopenharmony_ci DIV(0, "dout_sclk_pcm1", "mout_sclk_pcm1", DIV_TOP0_PERIC0, 8, 12), 32262306a36Sopenharmony_ci DIV(0, "dout_sclk_i2s1", "mout_sclk_i2s1", DIV_TOP0_PERIC0, 20, 10), 32362306a36Sopenharmony_ci 32462306a36Sopenharmony_ci DIV(0, "dout_sclk_spi1", "mout_sclk_spi1", DIV_TOP0_PERIC1, 8, 12), 32562306a36Sopenharmony_ci DIV(0, "dout_sclk_spi0", "mout_sclk_spi0", DIV_TOP0_PERIC1, 20, 12), 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ci DIV(0, "dout_sclk_spi3", "mout_sclk_spi3", DIV_TOP0_PERIC2, 8, 12), 32862306a36Sopenharmony_ci DIV(0, "dout_sclk_spi2", "mout_sclk_spi2", DIV_TOP0_PERIC2, 20, 12), 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_ci DIV(0, "dout_sclk_uart3", "mout_sclk_uart3", DIV_TOP0_PERIC3, 4, 4), 33162306a36Sopenharmony_ci DIV(0, "dout_sclk_uart2", "mout_sclk_uart2", DIV_TOP0_PERIC3, 8, 4), 33262306a36Sopenharmony_ci DIV(0, "dout_sclk_uart1", "mout_sclk_uart1", DIV_TOP0_PERIC3, 12, 4), 33362306a36Sopenharmony_ci DIV(0, "dout_sclk_uart0", "mout_sclk_uart0", DIV_TOP0_PERIC3, 16, 4), 33462306a36Sopenharmony_ci DIV(0, "dout_sclk_spi4", "mout_sclk_spi4", DIV_TOP0_PERIC3, 20, 12), 33562306a36Sopenharmony_ci}; 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_cistatic const struct samsung_gate_clock top0_gate_clks[] __initconst = { 33862306a36Sopenharmony_ci GATE(CLK_ACLK_PERIC0_66, "aclk_peric0_66", "dout_aclk_peric0_66", 33962306a36Sopenharmony_ci ENABLE_ACLK_TOP03, 20, CLK_SET_RATE_PARENT, 0), 34062306a36Sopenharmony_ci GATE(CLK_ACLK_PERIC1_66, "aclk_peric1_66", "dout_aclk_peric1_66", 34162306a36Sopenharmony_ci ENABLE_ACLK_TOP03, 12, CLK_SET_RATE_PARENT, 0), 34262306a36Sopenharmony_ci 34362306a36Sopenharmony_ci GATE(CLK_SCLK_SPDIF, "sclk_spdif", "dout_sclk_spdif", 34462306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC0, 4, CLK_SET_RATE_PARENT, 0), 34562306a36Sopenharmony_ci GATE(CLK_SCLK_PCM1, "sclk_pcm1", "dout_sclk_pcm1", 34662306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC0, 8, CLK_SET_RATE_PARENT, 0), 34762306a36Sopenharmony_ci GATE(CLK_SCLK_I2S1, "sclk_i2s1", "dout_sclk_i2s1", 34862306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC0, 20, CLK_SET_RATE_PARENT, 0), 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_ci GATE(CLK_SCLK_SPI1, "sclk_spi1", "dout_sclk_spi1", 35162306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC1, 8, CLK_SET_RATE_PARENT, 0), 35262306a36Sopenharmony_ci GATE(CLK_SCLK_SPI0, "sclk_spi0", "dout_sclk_spi0", 35362306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC1, 20, CLK_SET_RATE_PARENT, 0), 35462306a36Sopenharmony_ci 35562306a36Sopenharmony_ci GATE(CLK_SCLK_SPI3, "sclk_spi3", "dout_sclk_spi3", 35662306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC2, 8, CLK_SET_RATE_PARENT, 0), 35762306a36Sopenharmony_ci GATE(CLK_SCLK_SPI2, "sclk_spi2", "dout_sclk_spi2", 35862306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC2, 20, CLK_SET_RATE_PARENT, 0), 35962306a36Sopenharmony_ci GATE(CLK_SCLK_UART3, "sclk_uart3", "dout_sclk_uart3", 36062306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC3, 4, 0, 0), 36162306a36Sopenharmony_ci GATE(CLK_SCLK_UART2, "sclk_uart2", "dout_sclk_uart2", 36262306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC3, 8, 0, 0), 36362306a36Sopenharmony_ci GATE(CLK_SCLK_UART1, "sclk_uart1", "dout_sclk_uart1", 36462306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC3, 12, 0, 0), 36562306a36Sopenharmony_ci GATE(CLK_SCLK_UART0, "sclk_uart0", "dout_sclk_uart0", 36662306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC3, 16, 0, 0), 36762306a36Sopenharmony_ci GATE(CLK_SCLK_SPI4, "sclk_spi4", "dout_sclk_spi4", 36862306a36Sopenharmony_ci ENABLE_SCLK_TOP0_PERIC3, 20, CLK_SET_RATE_PARENT, 0), 36962306a36Sopenharmony_ci}; 37062306a36Sopenharmony_ci 37162306a36Sopenharmony_cistatic const struct samsung_fixed_factor_clock top0_fixed_factor_clks[] __initconst = { 37262306a36Sopenharmony_ci FFACTOR(0, "ffac_top0_bus0_pll_div2", "mout_top0_bus0_pll_user", 37362306a36Sopenharmony_ci 1, 2, 0), 37462306a36Sopenharmony_ci FFACTOR(0, "ffac_top0_bus1_pll_div2", "mout_top0_bus1_pll_user", 37562306a36Sopenharmony_ci 1, 2, 0), 37662306a36Sopenharmony_ci FFACTOR(0, "ffac_top0_cc_pll_div2", "mout_top0_cc_pll_user", 1, 2, 0), 37762306a36Sopenharmony_ci FFACTOR(0, "ffac_top0_mfc_pll_div2", "mout_top0_mfc_pll_user", 1, 2, 0), 37862306a36Sopenharmony_ci}; 37962306a36Sopenharmony_ci 38062306a36Sopenharmony_cistatic const struct samsung_cmu_info top0_cmu_info __initconst = { 38162306a36Sopenharmony_ci .mux_clks = top0_mux_clks, 38262306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(top0_mux_clks), 38362306a36Sopenharmony_ci .div_clks = top0_div_clks, 38462306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(top0_div_clks), 38562306a36Sopenharmony_ci .gate_clks = top0_gate_clks, 38662306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(top0_gate_clks), 38762306a36Sopenharmony_ci .fixed_factor_clks = top0_fixed_factor_clks, 38862306a36Sopenharmony_ci .nr_fixed_factor_clks = ARRAY_SIZE(top0_fixed_factor_clks), 38962306a36Sopenharmony_ci .nr_clk_ids = TOP0_NR_CLK, 39062306a36Sopenharmony_ci .clk_regs = top0_clk_regs, 39162306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(top0_clk_regs), 39262306a36Sopenharmony_ci}; 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_cistatic void __init exynos7_clk_top0_init(struct device_node *np) 39562306a36Sopenharmony_ci{ 39662306a36Sopenharmony_ci samsung_cmu_register_one(np, &top0_cmu_info); 39762306a36Sopenharmony_ci} 39862306a36Sopenharmony_ci 39962306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_top0, "samsung,exynos7-clock-top0", 40062306a36Sopenharmony_ci exynos7_clk_top0_init); 40162306a36Sopenharmony_ci 40262306a36Sopenharmony_ci/* Register Offset definitions for CMU_TOP1 (0x105E0000) */ 40362306a36Sopenharmony_ci#define MUX_SEL_TOP10 0x0200 40462306a36Sopenharmony_ci#define MUX_SEL_TOP11 0x0204 40562306a36Sopenharmony_ci#define MUX_SEL_TOP13 0x020C 40662306a36Sopenharmony_ci#define MUX_SEL_TOP1_FSYS0 0x0224 40762306a36Sopenharmony_ci#define MUX_SEL_TOP1_FSYS1 0x0228 40862306a36Sopenharmony_ci#define MUX_SEL_TOP1_FSYS11 0x022C 40962306a36Sopenharmony_ci#define DIV_TOP13 0x060C 41062306a36Sopenharmony_ci#define DIV_TOP1_FSYS0 0x0624 41162306a36Sopenharmony_ci#define DIV_TOP1_FSYS1 0x0628 41262306a36Sopenharmony_ci#define DIV_TOP1_FSYS11 0x062C 41362306a36Sopenharmony_ci#define ENABLE_ACLK_TOP13 0x080C 41462306a36Sopenharmony_ci#define ENABLE_SCLK_TOP1_FSYS0 0x0A24 41562306a36Sopenharmony_ci#define ENABLE_SCLK_TOP1_FSYS1 0x0A28 41662306a36Sopenharmony_ci#define ENABLE_SCLK_TOP1_FSYS11 0x0A2C 41762306a36Sopenharmony_ci 41862306a36Sopenharmony_ci/* List of parent clocks for Muxes in CMU_TOP1 */ 41962306a36Sopenharmony_ciPNAME(mout_top1_bus0_pll_user_p) = { "fin_pll", "sclk_bus0_pll_b" }; 42062306a36Sopenharmony_ciPNAME(mout_top1_bus1_pll_user_p) = { "fin_pll", "sclk_bus1_pll_b" }; 42162306a36Sopenharmony_ciPNAME(mout_top1_cc_pll_user_p) = { "fin_pll", "sclk_cc_pll_b" }; 42262306a36Sopenharmony_ciPNAME(mout_top1_mfc_pll_user_p) = { "fin_pll", "sclk_mfc_pll_b" }; 42362306a36Sopenharmony_ci 42462306a36Sopenharmony_ciPNAME(mout_top1_bus0_pll_half_p) = {"mout_top1_bus0_pll_user", 42562306a36Sopenharmony_ci "ffac_top1_bus0_pll_div2"}; 42662306a36Sopenharmony_ciPNAME(mout_top1_bus1_pll_half_p) = {"mout_top1_bus1_pll_user", 42762306a36Sopenharmony_ci "ffac_top1_bus1_pll_div2"}; 42862306a36Sopenharmony_ciPNAME(mout_top1_cc_pll_half_p) = {"mout_top1_cc_pll_user", 42962306a36Sopenharmony_ci "ffac_top1_cc_pll_div2"}; 43062306a36Sopenharmony_ciPNAME(mout_top1_mfc_pll_half_p) = {"mout_top1_mfc_pll_user", 43162306a36Sopenharmony_ci "ffac_top1_mfc_pll_div2"}; 43262306a36Sopenharmony_ci 43362306a36Sopenharmony_ciPNAME(mout_top1_group1) = {"mout_top1_bus0_pll_half", 43462306a36Sopenharmony_ci "mout_top1_bus1_pll_half", "mout_top1_cc_pll_half", 43562306a36Sopenharmony_ci "mout_top1_mfc_pll_half"}; 43662306a36Sopenharmony_ci 43762306a36Sopenharmony_cistatic const unsigned long top1_clk_regs[] __initconst = { 43862306a36Sopenharmony_ci MUX_SEL_TOP10, 43962306a36Sopenharmony_ci MUX_SEL_TOP11, 44062306a36Sopenharmony_ci MUX_SEL_TOP13, 44162306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS0, 44262306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS1, 44362306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS11, 44462306a36Sopenharmony_ci DIV_TOP13, 44562306a36Sopenharmony_ci DIV_TOP1_FSYS0, 44662306a36Sopenharmony_ci DIV_TOP1_FSYS1, 44762306a36Sopenharmony_ci DIV_TOP1_FSYS11, 44862306a36Sopenharmony_ci ENABLE_ACLK_TOP13, 44962306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS0, 45062306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS1, 45162306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS11, 45262306a36Sopenharmony_ci}; 45362306a36Sopenharmony_ci 45462306a36Sopenharmony_cistatic const struct samsung_mux_clock top1_mux_clks[] __initconst = { 45562306a36Sopenharmony_ci MUX(0, "mout_top1_mfc_pll_user", mout_top1_mfc_pll_user_p, 45662306a36Sopenharmony_ci MUX_SEL_TOP10, 4, 1), 45762306a36Sopenharmony_ci MUX(0, "mout_top1_cc_pll_user", mout_top1_cc_pll_user_p, 45862306a36Sopenharmony_ci MUX_SEL_TOP10, 8, 1), 45962306a36Sopenharmony_ci MUX(0, "mout_top1_bus1_pll_user", mout_top1_bus1_pll_user_p, 46062306a36Sopenharmony_ci MUX_SEL_TOP10, 12, 1), 46162306a36Sopenharmony_ci MUX(0, "mout_top1_bus0_pll_user", mout_top1_bus0_pll_user_p, 46262306a36Sopenharmony_ci MUX_SEL_TOP10, 16, 1), 46362306a36Sopenharmony_ci 46462306a36Sopenharmony_ci MUX(0, "mout_top1_mfc_pll_half", mout_top1_mfc_pll_half_p, 46562306a36Sopenharmony_ci MUX_SEL_TOP11, 4, 1), 46662306a36Sopenharmony_ci MUX(0, "mout_top1_cc_pll_half", mout_top1_cc_pll_half_p, 46762306a36Sopenharmony_ci MUX_SEL_TOP11, 8, 1), 46862306a36Sopenharmony_ci MUX(0, "mout_top1_bus1_pll_half", mout_top1_bus1_pll_half_p, 46962306a36Sopenharmony_ci MUX_SEL_TOP11, 12, 1), 47062306a36Sopenharmony_ci MUX(0, "mout_top1_bus0_pll_half", mout_top1_bus0_pll_half_p, 47162306a36Sopenharmony_ci MUX_SEL_TOP11, 16, 1), 47262306a36Sopenharmony_ci 47362306a36Sopenharmony_ci MUX(0, "mout_aclk_fsys1_200", mout_top1_group1, MUX_SEL_TOP13, 24, 2), 47462306a36Sopenharmony_ci MUX(0, "mout_aclk_fsys0_200", mout_top1_group1, MUX_SEL_TOP13, 28, 2), 47562306a36Sopenharmony_ci 47662306a36Sopenharmony_ci MUX(0, "mout_sclk_phy_fsys0_26m", mout_top1_group1, 47762306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS0, 0, 2), 47862306a36Sopenharmony_ci MUX(0, "mout_sclk_mmc2", mout_top1_group1, MUX_SEL_TOP1_FSYS0, 16, 2), 47962306a36Sopenharmony_ci MUX(0, "mout_sclk_usbdrd300", mout_top1_group1, 48062306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS0, 28, 2), 48162306a36Sopenharmony_ci 48262306a36Sopenharmony_ci MUX(0, "mout_sclk_phy_fsys1", mout_top1_group1, 48362306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS1, 0, 2), 48462306a36Sopenharmony_ci MUX(0, "mout_sclk_ufsunipro20", mout_top1_group1, 48562306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS1, 16, 2), 48662306a36Sopenharmony_ci 48762306a36Sopenharmony_ci MUX(0, "mout_sclk_mmc1", mout_top1_group1, MUX_SEL_TOP1_FSYS11, 0, 2), 48862306a36Sopenharmony_ci MUX(0, "mout_sclk_mmc0", mout_top1_group1, MUX_SEL_TOP1_FSYS11, 12, 2), 48962306a36Sopenharmony_ci MUX(0, "mout_sclk_phy_fsys1_26m", mout_top1_group1, 49062306a36Sopenharmony_ci MUX_SEL_TOP1_FSYS11, 24, 2), 49162306a36Sopenharmony_ci}; 49262306a36Sopenharmony_ci 49362306a36Sopenharmony_cistatic const struct samsung_div_clock top1_div_clks[] __initconst = { 49462306a36Sopenharmony_ci DIV(DOUT_ACLK_FSYS1_200, "dout_aclk_fsys1_200", "mout_aclk_fsys1_200", 49562306a36Sopenharmony_ci DIV_TOP13, 24, 4), 49662306a36Sopenharmony_ci DIV(DOUT_ACLK_FSYS0_200, "dout_aclk_fsys0_200", "mout_aclk_fsys0_200", 49762306a36Sopenharmony_ci DIV_TOP13, 28, 4), 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ci DIV(DOUT_SCLK_PHY_FSYS1, "dout_sclk_phy_fsys1", 50062306a36Sopenharmony_ci "mout_sclk_phy_fsys1", DIV_TOP1_FSYS1, 0, 6), 50162306a36Sopenharmony_ci 50262306a36Sopenharmony_ci DIV(DOUT_SCLK_UFSUNIPRO20, "dout_sclk_ufsunipro20", 50362306a36Sopenharmony_ci "mout_sclk_ufsunipro20", 50462306a36Sopenharmony_ci DIV_TOP1_FSYS1, 16, 6), 50562306a36Sopenharmony_ci 50662306a36Sopenharmony_ci DIV(DOUT_SCLK_MMC2, "dout_sclk_mmc2", "mout_sclk_mmc2", 50762306a36Sopenharmony_ci DIV_TOP1_FSYS0, 16, 10), 50862306a36Sopenharmony_ci DIV(0, "dout_sclk_usbdrd300", "mout_sclk_usbdrd300", 50962306a36Sopenharmony_ci DIV_TOP1_FSYS0, 28, 4), 51062306a36Sopenharmony_ci 51162306a36Sopenharmony_ci DIV(DOUT_SCLK_MMC1, "dout_sclk_mmc1", "mout_sclk_mmc1", 51262306a36Sopenharmony_ci DIV_TOP1_FSYS11, 0, 10), 51362306a36Sopenharmony_ci DIV(DOUT_SCLK_MMC0, "dout_sclk_mmc0", "mout_sclk_mmc0", 51462306a36Sopenharmony_ci DIV_TOP1_FSYS11, 12, 10), 51562306a36Sopenharmony_ci 51662306a36Sopenharmony_ci DIV(DOUT_SCLK_PHY_FSYS1_26M, "dout_sclk_phy_fsys1_26m", 51762306a36Sopenharmony_ci "mout_sclk_phy_fsys1_26m", DIV_TOP1_FSYS11, 24, 6), 51862306a36Sopenharmony_ci}; 51962306a36Sopenharmony_ci 52062306a36Sopenharmony_cistatic const struct samsung_gate_clock top1_gate_clks[] __initconst = { 52162306a36Sopenharmony_ci GATE(CLK_SCLK_MMC2, "sclk_mmc2", "dout_sclk_mmc2", 52262306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS0, 16, CLK_SET_RATE_PARENT, 0), 52362306a36Sopenharmony_ci GATE(0, "sclk_usbdrd300", "dout_sclk_usbdrd300", 52462306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS0, 28, 0, 0), 52562306a36Sopenharmony_ci 52662306a36Sopenharmony_ci GATE(CLK_SCLK_PHY_FSYS1, "sclk_phy_fsys1", "dout_sclk_phy_fsys1", 52762306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS1, 0, CLK_SET_RATE_PARENT, 0), 52862306a36Sopenharmony_ci 52962306a36Sopenharmony_ci GATE(CLK_SCLK_UFSUNIPRO20, "sclk_ufsunipro20", "dout_sclk_ufsunipro20", 53062306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS1, 16, CLK_SET_RATE_PARENT, 0), 53162306a36Sopenharmony_ci 53262306a36Sopenharmony_ci GATE(CLK_SCLK_MMC1, "sclk_mmc1", "dout_sclk_mmc1", 53362306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS11, 0, CLK_SET_RATE_PARENT, 0), 53462306a36Sopenharmony_ci GATE(CLK_SCLK_MMC0, "sclk_mmc0", "dout_sclk_mmc0", 53562306a36Sopenharmony_ci ENABLE_SCLK_TOP1_FSYS11, 12, CLK_SET_RATE_PARENT, 0), 53662306a36Sopenharmony_ci 53762306a36Sopenharmony_ci GATE(CLK_ACLK_FSYS0_200, "aclk_fsys0_200", "dout_aclk_fsys0_200", 53862306a36Sopenharmony_ci ENABLE_ACLK_TOP13, 28, CLK_SET_RATE_PARENT | 53962306a36Sopenharmony_ci CLK_IS_CRITICAL, 0), 54062306a36Sopenharmony_ci /* 54162306a36Sopenharmony_ci * This clock is required for the CMU_FSYS1 registers access, keep it 54262306a36Sopenharmony_ci * enabled permanently until proper runtime PM support is added. 54362306a36Sopenharmony_ci */ 54462306a36Sopenharmony_ci GATE(CLK_ACLK_FSYS1_200, "aclk_fsys1_200", "dout_aclk_fsys1_200", 54562306a36Sopenharmony_ci ENABLE_ACLK_TOP13, 24, CLK_SET_RATE_PARENT | 54662306a36Sopenharmony_ci CLK_IS_CRITICAL, 0), 54762306a36Sopenharmony_ci 54862306a36Sopenharmony_ci GATE(CLK_SCLK_PHY_FSYS1_26M, "sclk_phy_fsys1_26m", 54962306a36Sopenharmony_ci "dout_sclk_phy_fsys1_26m", ENABLE_SCLK_TOP1_FSYS11, 55062306a36Sopenharmony_ci 24, CLK_SET_RATE_PARENT, 0), 55162306a36Sopenharmony_ci}; 55262306a36Sopenharmony_ci 55362306a36Sopenharmony_cistatic const struct samsung_fixed_factor_clock top1_fixed_factor_clks[] __initconst = { 55462306a36Sopenharmony_ci FFACTOR(0, "ffac_top1_bus0_pll_div2", "mout_top1_bus0_pll_user", 55562306a36Sopenharmony_ci 1, 2, 0), 55662306a36Sopenharmony_ci FFACTOR(0, "ffac_top1_bus1_pll_div2", "mout_top1_bus1_pll_user", 55762306a36Sopenharmony_ci 1, 2, 0), 55862306a36Sopenharmony_ci FFACTOR(0, "ffac_top1_cc_pll_div2", "mout_top1_cc_pll_user", 1, 2, 0), 55962306a36Sopenharmony_ci FFACTOR(0, "ffac_top1_mfc_pll_div2", "mout_top1_mfc_pll_user", 1, 2, 0), 56062306a36Sopenharmony_ci}; 56162306a36Sopenharmony_ci 56262306a36Sopenharmony_cistatic const struct samsung_cmu_info top1_cmu_info __initconst = { 56362306a36Sopenharmony_ci .mux_clks = top1_mux_clks, 56462306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(top1_mux_clks), 56562306a36Sopenharmony_ci .div_clks = top1_div_clks, 56662306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(top1_div_clks), 56762306a36Sopenharmony_ci .gate_clks = top1_gate_clks, 56862306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(top1_gate_clks), 56962306a36Sopenharmony_ci .fixed_factor_clks = top1_fixed_factor_clks, 57062306a36Sopenharmony_ci .nr_fixed_factor_clks = ARRAY_SIZE(top1_fixed_factor_clks), 57162306a36Sopenharmony_ci .nr_clk_ids = TOP1_NR_CLK, 57262306a36Sopenharmony_ci .clk_regs = top1_clk_regs, 57362306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(top1_clk_regs), 57462306a36Sopenharmony_ci}; 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_cistatic void __init exynos7_clk_top1_init(struct device_node *np) 57762306a36Sopenharmony_ci{ 57862306a36Sopenharmony_ci samsung_cmu_register_one(np, &top1_cmu_info); 57962306a36Sopenharmony_ci} 58062306a36Sopenharmony_ci 58162306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_top1, "samsung,exynos7-clock-top1", 58262306a36Sopenharmony_ci exynos7_clk_top1_init); 58362306a36Sopenharmony_ci 58462306a36Sopenharmony_ci/* Register Offset definitions for CMU_CCORE (0x105B0000) */ 58562306a36Sopenharmony_ci#define MUX_SEL_CCORE 0x0200 58662306a36Sopenharmony_ci#define DIV_CCORE 0x0600 58762306a36Sopenharmony_ci#define ENABLE_ACLK_CCORE0 0x0800 58862306a36Sopenharmony_ci#define ENABLE_ACLK_CCORE1 0x0804 58962306a36Sopenharmony_ci#define ENABLE_PCLK_CCORE 0x0900 59062306a36Sopenharmony_ci 59162306a36Sopenharmony_ci/* 59262306a36Sopenharmony_ci * List of parent clocks for Muxes in CMU_CCORE 59362306a36Sopenharmony_ci */ 59462306a36Sopenharmony_ciPNAME(mout_aclk_ccore_133_user_p) = { "fin_pll", "aclk_ccore_133" }; 59562306a36Sopenharmony_ci 59662306a36Sopenharmony_cistatic const unsigned long ccore_clk_regs[] __initconst = { 59762306a36Sopenharmony_ci MUX_SEL_CCORE, 59862306a36Sopenharmony_ci ENABLE_PCLK_CCORE, 59962306a36Sopenharmony_ci}; 60062306a36Sopenharmony_ci 60162306a36Sopenharmony_cistatic const struct samsung_mux_clock ccore_mux_clks[] __initconst = { 60262306a36Sopenharmony_ci MUX(0, "mout_aclk_ccore_133_user", mout_aclk_ccore_133_user_p, 60362306a36Sopenharmony_ci MUX_SEL_CCORE, 1, 1), 60462306a36Sopenharmony_ci}; 60562306a36Sopenharmony_ci 60662306a36Sopenharmony_cistatic const struct samsung_gate_clock ccore_gate_clks[] __initconst = { 60762306a36Sopenharmony_ci GATE(PCLK_RTC, "pclk_rtc", "mout_aclk_ccore_133_user", 60862306a36Sopenharmony_ci ENABLE_PCLK_CCORE, 8, 0, 0), 60962306a36Sopenharmony_ci}; 61062306a36Sopenharmony_ci 61162306a36Sopenharmony_cistatic const struct samsung_cmu_info ccore_cmu_info __initconst = { 61262306a36Sopenharmony_ci .mux_clks = ccore_mux_clks, 61362306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(ccore_mux_clks), 61462306a36Sopenharmony_ci .gate_clks = ccore_gate_clks, 61562306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(ccore_gate_clks), 61662306a36Sopenharmony_ci .nr_clk_ids = CCORE_NR_CLK, 61762306a36Sopenharmony_ci .clk_regs = ccore_clk_regs, 61862306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(ccore_clk_regs), 61962306a36Sopenharmony_ci}; 62062306a36Sopenharmony_ci 62162306a36Sopenharmony_cistatic void __init exynos7_clk_ccore_init(struct device_node *np) 62262306a36Sopenharmony_ci{ 62362306a36Sopenharmony_ci samsung_cmu_register_one(np, &ccore_cmu_info); 62462306a36Sopenharmony_ci} 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_ccore, "samsung,exynos7-clock-ccore", 62762306a36Sopenharmony_ci exynos7_clk_ccore_init); 62862306a36Sopenharmony_ci 62962306a36Sopenharmony_ci/* Register Offset definitions for CMU_PERIC0 (0x13610000) */ 63062306a36Sopenharmony_ci#define MUX_SEL_PERIC0 0x0200 63162306a36Sopenharmony_ci#define ENABLE_PCLK_PERIC0 0x0900 63262306a36Sopenharmony_ci#define ENABLE_SCLK_PERIC0 0x0A00 63362306a36Sopenharmony_ci 63462306a36Sopenharmony_ci/* List of parent clocks for Muxes in CMU_PERIC0 */ 63562306a36Sopenharmony_ciPNAME(mout_aclk_peric0_66_user_p) = { "fin_pll", "aclk_peric0_66" }; 63662306a36Sopenharmony_ciPNAME(mout_sclk_uart0_user_p) = { "fin_pll", "sclk_uart0" }; 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_cistatic const unsigned long peric0_clk_regs[] __initconst = { 63962306a36Sopenharmony_ci MUX_SEL_PERIC0, 64062306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 64162306a36Sopenharmony_ci ENABLE_SCLK_PERIC0, 64262306a36Sopenharmony_ci}; 64362306a36Sopenharmony_ci 64462306a36Sopenharmony_cistatic const struct samsung_mux_clock peric0_mux_clks[] __initconst = { 64562306a36Sopenharmony_ci MUX(0, "mout_aclk_peric0_66_user", mout_aclk_peric0_66_user_p, 64662306a36Sopenharmony_ci MUX_SEL_PERIC0, 0, 1), 64762306a36Sopenharmony_ci MUX(0, "mout_sclk_uart0_user", mout_sclk_uart0_user_p, 64862306a36Sopenharmony_ci MUX_SEL_PERIC0, 16, 1), 64962306a36Sopenharmony_ci}; 65062306a36Sopenharmony_ci 65162306a36Sopenharmony_cistatic const struct samsung_gate_clock peric0_gate_clks[] __initconst = { 65262306a36Sopenharmony_ci GATE(PCLK_HSI2C0, "pclk_hsi2c0", "mout_aclk_peric0_66_user", 65362306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 8, 0, 0), 65462306a36Sopenharmony_ci GATE(PCLK_HSI2C1, "pclk_hsi2c1", "mout_aclk_peric0_66_user", 65562306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 9, 0, 0), 65662306a36Sopenharmony_ci GATE(PCLK_HSI2C4, "pclk_hsi2c4", "mout_aclk_peric0_66_user", 65762306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 10, 0, 0), 65862306a36Sopenharmony_ci GATE(PCLK_HSI2C5, "pclk_hsi2c5", "mout_aclk_peric0_66_user", 65962306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 11, 0, 0), 66062306a36Sopenharmony_ci GATE(PCLK_HSI2C9, "pclk_hsi2c9", "mout_aclk_peric0_66_user", 66162306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 12, 0, 0), 66262306a36Sopenharmony_ci GATE(PCLK_HSI2C10, "pclk_hsi2c10", "mout_aclk_peric0_66_user", 66362306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 13, 0, 0), 66462306a36Sopenharmony_ci GATE(PCLK_HSI2C11, "pclk_hsi2c11", "mout_aclk_peric0_66_user", 66562306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 14, 0, 0), 66662306a36Sopenharmony_ci GATE(PCLK_UART0, "pclk_uart0", "mout_aclk_peric0_66_user", 66762306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 16, 0, 0), 66862306a36Sopenharmony_ci GATE(PCLK_ADCIF, "pclk_adcif", "mout_aclk_peric0_66_user", 66962306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 20, 0, 0), 67062306a36Sopenharmony_ci GATE(PCLK_PWM, "pclk_pwm", "mout_aclk_peric0_66_user", 67162306a36Sopenharmony_ci ENABLE_PCLK_PERIC0, 21, 0, 0), 67262306a36Sopenharmony_ci 67362306a36Sopenharmony_ci GATE(SCLK_UART0, "sclk_uart0_user", "mout_sclk_uart0_user", 67462306a36Sopenharmony_ci ENABLE_SCLK_PERIC0, 16, 0, 0), 67562306a36Sopenharmony_ci GATE(SCLK_PWM, "sclk_pwm", "fin_pll", ENABLE_SCLK_PERIC0, 21, 0, 0), 67662306a36Sopenharmony_ci}; 67762306a36Sopenharmony_ci 67862306a36Sopenharmony_cistatic const struct samsung_cmu_info peric0_cmu_info __initconst = { 67962306a36Sopenharmony_ci .mux_clks = peric0_mux_clks, 68062306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(peric0_mux_clks), 68162306a36Sopenharmony_ci .gate_clks = peric0_gate_clks, 68262306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(peric0_gate_clks), 68362306a36Sopenharmony_ci .nr_clk_ids = PERIC0_NR_CLK, 68462306a36Sopenharmony_ci .clk_regs = peric0_clk_regs, 68562306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(peric0_clk_regs), 68662306a36Sopenharmony_ci}; 68762306a36Sopenharmony_ci 68862306a36Sopenharmony_cistatic void __init exynos7_clk_peric0_init(struct device_node *np) 68962306a36Sopenharmony_ci{ 69062306a36Sopenharmony_ci samsung_cmu_register_one(np, &peric0_cmu_info); 69162306a36Sopenharmony_ci} 69262306a36Sopenharmony_ci 69362306a36Sopenharmony_ci/* Register Offset definitions for CMU_PERIC1 (0x14C80000) */ 69462306a36Sopenharmony_ci#define MUX_SEL_PERIC10 0x0200 69562306a36Sopenharmony_ci#define MUX_SEL_PERIC11 0x0204 69662306a36Sopenharmony_ci#define MUX_SEL_PERIC12 0x0208 69762306a36Sopenharmony_ci#define ENABLE_PCLK_PERIC1 0x0900 69862306a36Sopenharmony_ci#define ENABLE_SCLK_PERIC10 0x0A00 69962306a36Sopenharmony_ci 70062306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_peric0, "samsung,exynos7-clock-peric0", 70162306a36Sopenharmony_ci exynos7_clk_peric0_init); 70262306a36Sopenharmony_ci 70362306a36Sopenharmony_ci/* List of parent clocks for Muxes in CMU_PERIC1 */ 70462306a36Sopenharmony_ciPNAME(mout_aclk_peric1_66_user_p) = { "fin_pll", "aclk_peric1_66" }; 70562306a36Sopenharmony_ciPNAME(mout_sclk_uart1_user_p) = { "fin_pll", "sclk_uart1" }; 70662306a36Sopenharmony_ciPNAME(mout_sclk_uart2_user_p) = { "fin_pll", "sclk_uart2" }; 70762306a36Sopenharmony_ciPNAME(mout_sclk_uart3_user_p) = { "fin_pll", "sclk_uart3" }; 70862306a36Sopenharmony_ciPNAME(mout_sclk_spi0_user_p) = { "fin_pll", "sclk_spi0" }; 70962306a36Sopenharmony_ciPNAME(mout_sclk_spi1_user_p) = { "fin_pll", "sclk_spi1" }; 71062306a36Sopenharmony_ciPNAME(mout_sclk_spi2_user_p) = { "fin_pll", "sclk_spi2" }; 71162306a36Sopenharmony_ciPNAME(mout_sclk_spi3_user_p) = { "fin_pll", "sclk_spi3" }; 71262306a36Sopenharmony_ciPNAME(mout_sclk_spi4_user_p) = { "fin_pll", "sclk_spi4" }; 71362306a36Sopenharmony_ci 71462306a36Sopenharmony_cistatic const unsigned long peric1_clk_regs[] __initconst = { 71562306a36Sopenharmony_ci MUX_SEL_PERIC10, 71662306a36Sopenharmony_ci MUX_SEL_PERIC11, 71762306a36Sopenharmony_ci MUX_SEL_PERIC12, 71862306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 71962306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 72062306a36Sopenharmony_ci}; 72162306a36Sopenharmony_ci 72262306a36Sopenharmony_cistatic const struct samsung_mux_clock peric1_mux_clks[] __initconst = { 72362306a36Sopenharmony_ci MUX(0, "mout_aclk_peric1_66_user", mout_aclk_peric1_66_user_p, 72462306a36Sopenharmony_ci MUX_SEL_PERIC10, 0, 1), 72562306a36Sopenharmony_ci 72662306a36Sopenharmony_ci MUX_F(0, "mout_sclk_spi0_user", mout_sclk_spi0_user_p, 72762306a36Sopenharmony_ci MUX_SEL_PERIC11, 0, 1, CLK_SET_RATE_PARENT, 0), 72862306a36Sopenharmony_ci MUX_F(0, "mout_sclk_spi1_user", mout_sclk_spi1_user_p, 72962306a36Sopenharmony_ci MUX_SEL_PERIC11, 4, 1, CLK_SET_RATE_PARENT, 0), 73062306a36Sopenharmony_ci MUX_F(0, "mout_sclk_spi2_user", mout_sclk_spi2_user_p, 73162306a36Sopenharmony_ci MUX_SEL_PERIC11, 8, 1, CLK_SET_RATE_PARENT, 0), 73262306a36Sopenharmony_ci MUX_F(0, "mout_sclk_spi3_user", mout_sclk_spi3_user_p, 73362306a36Sopenharmony_ci MUX_SEL_PERIC11, 12, 1, CLK_SET_RATE_PARENT, 0), 73462306a36Sopenharmony_ci MUX_F(0, "mout_sclk_spi4_user", mout_sclk_spi4_user_p, 73562306a36Sopenharmony_ci MUX_SEL_PERIC11, 16, 1, CLK_SET_RATE_PARENT, 0), 73662306a36Sopenharmony_ci MUX(0, "mout_sclk_uart1_user", mout_sclk_uart1_user_p, 73762306a36Sopenharmony_ci MUX_SEL_PERIC11, 20, 1), 73862306a36Sopenharmony_ci MUX(0, "mout_sclk_uart2_user", mout_sclk_uart2_user_p, 73962306a36Sopenharmony_ci MUX_SEL_PERIC11, 24, 1), 74062306a36Sopenharmony_ci MUX(0, "mout_sclk_uart3_user", mout_sclk_uart3_user_p, 74162306a36Sopenharmony_ci MUX_SEL_PERIC11, 28, 1), 74262306a36Sopenharmony_ci}; 74362306a36Sopenharmony_ci 74462306a36Sopenharmony_cistatic const struct samsung_gate_clock peric1_gate_clks[] __initconst = { 74562306a36Sopenharmony_ci GATE(PCLK_HSI2C2, "pclk_hsi2c2", "mout_aclk_peric1_66_user", 74662306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 4, 0, 0), 74762306a36Sopenharmony_ci GATE(PCLK_HSI2C3, "pclk_hsi2c3", "mout_aclk_peric1_66_user", 74862306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 5, 0, 0), 74962306a36Sopenharmony_ci GATE(PCLK_HSI2C6, "pclk_hsi2c6", "mout_aclk_peric1_66_user", 75062306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 6, 0, 0), 75162306a36Sopenharmony_ci GATE(PCLK_HSI2C7, "pclk_hsi2c7", "mout_aclk_peric1_66_user", 75262306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 7, 0, 0), 75362306a36Sopenharmony_ci GATE(PCLK_HSI2C8, "pclk_hsi2c8", "mout_aclk_peric1_66_user", 75462306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 8, 0, 0), 75562306a36Sopenharmony_ci GATE(PCLK_UART1, "pclk_uart1", "mout_aclk_peric1_66_user", 75662306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 9, 0, 0), 75762306a36Sopenharmony_ci GATE(PCLK_UART2, "pclk_uart2", "mout_aclk_peric1_66_user", 75862306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 10, 0, 0), 75962306a36Sopenharmony_ci GATE(PCLK_UART3, "pclk_uart3", "mout_aclk_peric1_66_user", 76062306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 11, 0, 0), 76162306a36Sopenharmony_ci GATE(PCLK_SPI0, "pclk_spi0", "mout_aclk_peric1_66_user", 76262306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 12, 0, 0), 76362306a36Sopenharmony_ci GATE(PCLK_SPI1, "pclk_spi1", "mout_aclk_peric1_66_user", 76462306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 13, 0, 0), 76562306a36Sopenharmony_ci GATE(PCLK_SPI2, "pclk_spi2", "mout_aclk_peric1_66_user", 76662306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 14, 0, 0), 76762306a36Sopenharmony_ci GATE(PCLK_SPI3, "pclk_spi3", "mout_aclk_peric1_66_user", 76862306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 15, 0, 0), 76962306a36Sopenharmony_ci GATE(PCLK_SPI4, "pclk_spi4", "mout_aclk_peric1_66_user", 77062306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 16, 0, 0), 77162306a36Sopenharmony_ci GATE(PCLK_I2S1, "pclk_i2s1", "mout_aclk_peric1_66_user", 77262306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 17, CLK_SET_RATE_PARENT, 0), 77362306a36Sopenharmony_ci GATE(PCLK_PCM1, "pclk_pcm1", "mout_aclk_peric1_66_user", 77462306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 18, 0, 0), 77562306a36Sopenharmony_ci GATE(PCLK_SPDIF, "pclk_spdif", "mout_aclk_peric1_66_user", 77662306a36Sopenharmony_ci ENABLE_PCLK_PERIC1, 19, 0, 0), 77762306a36Sopenharmony_ci 77862306a36Sopenharmony_ci GATE(SCLK_UART1, "sclk_uart1_user", "mout_sclk_uart1_user", 77962306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 9, 0, 0), 78062306a36Sopenharmony_ci GATE(SCLK_UART2, "sclk_uart2_user", "mout_sclk_uart2_user", 78162306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 10, 0, 0), 78262306a36Sopenharmony_ci GATE(SCLK_UART3, "sclk_uart3_user", "mout_sclk_uart3_user", 78362306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 11, 0, 0), 78462306a36Sopenharmony_ci GATE(SCLK_SPI0, "sclk_spi0_user", "mout_sclk_spi0_user", 78562306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 12, CLK_SET_RATE_PARENT, 0), 78662306a36Sopenharmony_ci GATE(SCLK_SPI1, "sclk_spi1_user", "mout_sclk_spi1_user", 78762306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 13, CLK_SET_RATE_PARENT, 0), 78862306a36Sopenharmony_ci GATE(SCLK_SPI2, "sclk_spi2_user", "mout_sclk_spi2_user", 78962306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 14, CLK_SET_RATE_PARENT, 0), 79062306a36Sopenharmony_ci GATE(SCLK_SPI3, "sclk_spi3_user", "mout_sclk_spi3_user", 79162306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 15, CLK_SET_RATE_PARENT, 0), 79262306a36Sopenharmony_ci GATE(SCLK_SPI4, "sclk_spi4_user", "mout_sclk_spi4_user", 79362306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 16, CLK_SET_RATE_PARENT, 0), 79462306a36Sopenharmony_ci GATE(SCLK_I2S1, "sclk_i2s1_user", "sclk_i2s1", 79562306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 17, CLK_SET_RATE_PARENT, 0), 79662306a36Sopenharmony_ci GATE(SCLK_PCM1, "sclk_pcm1_user", "sclk_pcm1", 79762306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 18, CLK_SET_RATE_PARENT, 0), 79862306a36Sopenharmony_ci GATE(SCLK_SPDIF, "sclk_spdif_user", "sclk_spdif", 79962306a36Sopenharmony_ci ENABLE_SCLK_PERIC10, 19, CLK_SET_RATE_PARENT, 0), 80062306a36Sopenharmony_ci}; 80162306a36Sopenharmony_ci 80262306a36Sopenharmony_cistatic const struct samsung_cmu_info peric1_cmu_info __initconst = { 80362306a36Sopenharmony_ci .mux_clks = peric1_mux_clks, 80462306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(peric1_mux_clks), 80562306a36Sopenharmony_ci .gate_clks = peric1_gate_clks, 80662306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(peric1_gate_clks), 80762306a36Sopenharmony_ci .nr_clk_ids = PERIC1_NR_CLK, 80862306a36Sopenharmony_ci .clk_regs = peric1_clk_regs, 80962306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(peric1_clk_regs), 81062306a36Sopenharmony_ci}; 81162306a36Sopenharmony_ci 81262306a36Sopenharmony_cistatic void __init exynos7_clk_peric1_init(struct device_node *np) 81362306a36Sopenharmony_ci{ 81462306a36Sopenharmony_ci samsung_cmu_register_one(np, &peric1_cmu_info); 81562306a36Sopenharmony_ci} 81662306a36Sopenharmony_ci 81762306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_peric1, "samsung,exynos7-clock-peric1", 81862306a36Sopenharmony_ci exynos7_clk_peric1_init); 81962306a36Sopenharmony_ci 82062306a36Sopenharmony_ci/* Register Offset definitions for CMU_PERIS (0x10040000) */ 82162306a36Sopenharmony_ci#define MUX_SEL_PERIS 0x0200 82262306a36Sopenharmony_ci#define ENABLE_PCLK_PERIS 0x0900 82362306a36Sopenharmony_ci#define ENABLE_PCLK_PERIS_SECURE_CHIPID 0x0910 82462306a36Sopenharmony_ci#define ENABLE_SCLK_PERIS 0x0A00 82562306a36Sopenharmony_ci#define ENABLE_SCLK_PERIS_SECURE_CHIPID 0x0A10 82662306a36Sopenharmony_ci 82762306a36Sopenharmony_ci/* List of parent clocks for Muxes in CMU_PERIS */ 82862306a36Sopenharmony_ciPNAME(mout_aclk_peris_66_user_p) = { "fin_pll", "aclk_peris_66" }; 82962306a36Sopenharmony_ci 83062306a36Sopenharmony_cistatic const unsigned long peris_clk_regs[] __initconst = { 83162306a36Sopenharmony_ci MUX_SEL_PERIS, 83262306a36Sopenharmony_ci ENABLE_PCLK_PERIS, 83362306a36Sopenharmony_ci ENABLE_PCLK_PERIS_SECURE_CHIPID, 83462306a36Sopenharmony_ci ENABLE_SCLK_PERIS, 83562306a36Sopenharmony_ci ENABLE_SCLK_PERIS_SECURE_CHIPID, 83662306a36Sopenharmony_ci}; 83762306a36Sopenharmony_ci 83862306a36Sopenharmony_cistatic const struct samsung_mux_clock peris_mux_clks[] __initconst = { 83962306a36Sopenharmony_ci MUX(0, "mout_aclk_peris_66_user", 84062306a36Sopenharmony_ci mout_aclk_peris_66_user_p, MUX_SEL_PERIS, 0, 1), 84162306a36Sopenharmony_ci}; 84262306a36Sopenharmony_ci 84362306a36Sopenharmony_cistatic const struct samsung_gate_clock peris_gate_clks[] __initconst = { 84462306a36Sopenharmony_ci GATE(PCLK_WDT, "pclk_wdt", "mout_aclk_peris_66_user", 84562306a36Sopenharmony_ci ENABLE_PCLK_PERIS, 6, 0, 0), 84662306a36Sopenharmony_ci GATE(PCLK_TMU, "pclk_tmu_apbif", "mout_aclk_peris_66_user", 84762306a36Sopenharmony_ci ENABLE_PCLK_PERIS, 10, 0, 0), 84862306a36Sopenharmony_ci 84962306a36Sopenharmony_ci GATE(PCLK_CHIPID, "pclk_chipid", "mout_aclk_peris_66_user", 85062306a36Sopenharmony_ci ENABLE_PCLK_PERIS_SECURE_CHIPID, 0, 0, 0), 85162306a36Sopenharmony_ci GATE(SCLK_CHIPID, "sclk_chipid", "fin_pll", 85262306a36Sopenharmony_ci ENABLE_SCLK_PERIS_SECURE_CHIPID, 0, 0, 0), 85362306a36Sopenharmony_ci 85462306a36Sopenharmony_ci GATE(SCLK_TMU, "sclk_tmu", "fin_pll", ENABLE_SCLK_PERIS, 10, 0, 0), 85562306a36Sopenharmony_ci}; 85662306a36Sopenharmony_ci 85762306a36Sopenharmony_cistatic const struct samsung_cmu_info peris_cmu_info __initconst = { 85862306a36Sopenharmony_ci .mux_clks = peris_mux_clks, 85962306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(peris_mux_clks), 86062306a36Sopenharmony_ci .gate_clks = peris_gate_clks, 86162306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(peris_gate_clks), 86262306a36Sopenharmony_ci .nr_clk_ids = PERIS_NR_CLK, 86362306a36Sopenharmony_ci .clk_regs = peris_clk_regs, 86462306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(peris_clk_regs), 86562306a36Sopenharmony_ci}; 86662306a36Sopenharmony_ci 86762306a36Sopenharmony_cistatic void __init exynos7_clk_peris_init(struct device_node *np) 86862306a36Sopenharmony_ci{ 86962306a36Sopenharmony_ci samsung_cmu_register_one(np, &peris_cmu_info); 87062306a36Sopenharmony_ci} 87162306a36Sopenharmony_ci 87262306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_peris, "samsung,exynos7-clock-peris", 87362306a36Sopenharmony_ci exynos7_clk_peris_init); 87462306a36Sopenharmony_ci 87562306a36Sopenharmony_ci/* Register Offset definitions for CMU_FSYS0 (0x10E90000) */ 87662306a36Sopenharmony_ci#define MUX_SEL_FSYS00 0x0200 87762306a36Sopenharmony_ci#define MUX_SEL_FSYS01 0x0204 87862306a36Sopenharmony_ci#define MUX_SEL_FSYS02 0x0208 87962306a36Sopenharmony_ci#define ENABLE_ACLK_FSYS00 0x0800 88062306a36Sopenharmony_ci#define ENABLE_ACLK_FSYS01 0x0804 88162306a36Sopenharmony_ci#define ENABLE_SCLK_FSYS01 0x0A04 88262306a36Sopenharmony_ci#define ENABLE_SCLK_FSYS02 0x0A08 88362306a36Sopenharmony_ci#define ENABLE_SCLK_FSYS04 0x0A10 88462306a36Sopenharmony_ci 88562306a36Sopenharmony_ci/* 88662306a36Sopenharmony_ci * List of parent clocks for Muxes in CMU_FSYS0 88762306a36Sopenharmony_ci */ 88862306a36Sopenharmony_ciPNAME(mout_aclk_fsys0_200_user_p) = { "fin_pll", "aclk_fsys0_200" }; 88962306a36Sopenharmony_ciPNAME(mout_sclk_mmc2_user_p) = { "fin_pll", "sclk_mmc2" }; 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_ciPNAME(mout_sclk_usbdrd300_user_p) = { "fin_pll", "sclk_usbdrd300" }; 89262306a36Sopenharmony_ciPNAME(mout_phyclk_usbdrd300_udrd30_phyclk_user_p) = { "fin_pll", 89362306a36Sopenharmony_ci "phyclk_usbdrd300_udrd30_phyclock" }; 89462306a36Sopenharmony_ciPNAME(mout_phyclk_usbdrd300_udrd30_pipe_pclk_user_p) = { "fin_pll", 89562306a36Sopenharmony_ci "phyclk_usbdrd300_udrd30_pipe_pclk" }; 89662306a36Sopenharmony_ci 89762306a36Sopenharmony_ci/* fixed rate clocks used in the FSYS0 block */ 89862306a36Sopenharmony_cistatic const struct samsung_fixed_rate_clock fixed_rate_clks_fsys0[] __initconst = { 89962306a36Sopenharmony_ci FRATE(0, "phyclk_usbdrd300_udrd30_phyclock", NULL, 0, 60000000), 90062306a36Sopenharmony_ci FRATE(0, "phyclk_usbdrd300_udrd30_pipe_pclk", NULL, 0, 125000000), 90162306a36Sopenharmony_ci}; 90262306a36Sopenharmony_ci 90362306a36Sopenharmony_cistatic const unsigned long fsys0_clk_regs[] __initconst = { 90462306a36Sopenharmony_ci MUX_SEL_FSYS00, 90562306a36Sopenharmony_ci MUX_SEL_FSYS01, 90662306a36Sopenharmony_ci MUX_SEL_FSYS02, 90762306a36Sopenharmony_ci ENABLE_ACLK_FSYS00, 90862306a36Sopenharmony_ci ENABLE_ACLK_FSYS01, 90962306a36Sopenharmony_ci ENABLE_SCLK_FSYS01, 91062306a36Sopenharmony_ci ENABLE_SCLK_FSYS02, 91162306a36Sopenharmony_ci ENABLE_SCLK_FSYS04, 91262306a36Sopenharmony_ci}; 91362306a36Sopenharmony_ci 91462306a36Sopenharmony_cistatic const struct samsung_mux_clock fsys0_mux_clks[] __initconst = { 91562306a36Sopenharmony_ci MUX(0, "mout_aclk_fsys0_200_user", mout_aclk_fsys0_200_user_p, 91662306a36Sopenharmony_ci MUX_SEL_FSYS00, 24, 1), 91762306a36Sopenharmony_ci 91862306a36Sopenharmony_ci MUX(0, "mout_sclk_mmc2_user", mout_sclk_mmc2_user_p, 91962306a36Sopenharmony_ci MUX_SEL_FSYS01, 24, 1), 92062306a36Sopenharmony_ci MUX(0, "mout_sclk_usbdrd300_user", mout_sclk_usbdrd300_user_p, 92162306a36Sopenharmony_ci MUX_SEL_FSYS01, 28, 1), 92262306a36Sopenharmony_ci 92362306a36Sopenharmony_ci MUX(0, "mout_phyclk_usbdrd300_udrd30_pipe_pclk_user", 92462306a36Sopenharmony_ci mout_phyclk_usbdrd300_udrd30_pipe_pclk_user_p, 92562306a36Sopenharmony_ci MUX_SEL_FSYS02, 24, 1), 92662306a36Sopenharmony_ci MUX(0, "mout_phyclk_usbdrd300_udrd30_phyclk_user", 92762306a36Sopenharmony_ci mout_phyclk_usbdrd300_udrd30_phyclk_user_p, 92862306a36Sopenharmony_ci MUX_SEL_FSYS02, 28, 1), 92962306a36Sopenharmony_ci}; 93062306a36Sopenharmony_ci 93162306a36Sopenharmony_cistatic const struct samsung_gate_clock fsys0_gate_clks[] __initconst = { 93262306a36Sopenharmony_ci GATE(ACLK_PDMA1, "aclk_pdma1", "mout_aclk_fsys0_200_user", 93362306a36Sopenharmony_ci ENABLE_ACLK_FSYS00, 3, 0, 0), 93462306a36Sopenharmony_ci GATE(ACLK_PDMA0, "aclk_pdma0", "mout_aclk_fsys0_200_user", 93562306a36Sopenharmony_ci ENABLE_ACLK_FSYS00, 4, 0, 0), 93662306a36Sopenharmony_ci GATE(ACLK_AXIUS_USBDRD30X_FSYS0X, "aclk_axius_usbdrd30x_fsys0x", 93762306a36Sopenharmony_ci "mout_aclk_fsys0_200_user", 93862306a36Sopenharmony_ci ENABLE_ACLK_FSYS00, 19, 0, 0), 93962306a36Sopenharmony_ci 94062306a36Sopenharmony_ci GATE(ACLK_USBDRD300, "aclk_usbdrd300", "mout_aclk_fsys0_200_user", 94162306a36Sopenharmony_ci ENABLE_ACLK_FSYS01, 29, 0, 0), 94262306a36Sopenharmony_ci GATE(ACLK_MMC2, "aclk_mmc2", "mout_aclk_fsys0_200_user", 94362306a36Sopenharmony_ci ENABLE_ACLK_FSYS01, 31, 0, 0), 94462306a36Sopenharmony_ci 94562306a36Sopenharmony_ci GATE(SCLK_USBDRD300_SUSPENDCLK, "sclk_usbdrd300_suspendclk", 94662306a36Sopenharmony_ci "mout_sclk_usbdrd300_user", 94762306a36Sopenharmony_ci ENABLE_SCLK_FSYS01, 4, 0, 0), 94862306a36Sopenharmony_ci GATE(SCLK_USBDRD300_REFCLK, "sclk_usbdrd300_refclk", "fin_pll", 94962306a36Sopenharmony_ci ENABLE_SCLK_FSYS01, 8, 0, 0), 95062306a36Sopenharmony_ci 95162306a36Sopenharmony_ci GATE(PHYCLK_USBDRD300_UDRD30_PIPE_PCLK_USER, 95262306a36Sopenharmony_ci "phyclk_usbdrd300_udrd30_pipe_pclk_user", 95362306a36Sopenharmony_ci "mout_phyclk_usbdrd300_udrd30_pipe_pclk_user", 95462306a36Sopenharmony_ci ENABLE_SCLK_FSYS02, 24, 0, 0), 95562306a36Sopenharmony_ci GATE(PHYCLK_USBDRD300_UDRD30_PHYCLK_USER, 95662306a36Sopenharmony_ci "phyclk_usbdrd300_udrd30_phyclk_user", 95762306a36Sopenharmony_ci "mout_phyclk_usbdrd300_udrd30_phyclk_user", 95862306a36Sopenharmony_ci ENABLE_SCLK_FSYS02, 28, 0, 0), 95962306a36Sopenharmony_ci 96062306a36Sopenharmony_ci GATE(OSCCLK_PHY_CLKOUT_USB30_PHY, "oscclk_phy_clkout_usb30_phy", 96162306a36Sopenharmony_ci "fin_pll", 96262306a36Sopenharmony_ci ENABLE_SCLK_FSYS04, 28, 0, 0), 96362306a36Sopenharmony_ci}; 96462306a36Sopenharmony_ci 96562306a36Sopenharmony_cistatic const struct samsung_cmu_info fsys0_cmu_info __initconst = { 96662306a36Sopenharmony_ci .fixed_clks = fixed_rate_clks_fsys0, 96762306a36Sopenharmony_ci .nr_fixed_clks = ARRAY_SIZE(fixed_rate_clks_fsys0), 96862306a36Sopenharmony_ci .mux_clks = fsys0_mux_clks, 96962306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(fsys0_mux_clks), 97062306a36Sopenharmony_ci .gate_clks = fsys0_gate_clks, 97162306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(fsys0_gate_clks), 97262306a36Sopenharmony_ci .nr_clk_ids = FSYS0_NR_CLK, 97362306a36Sopenharmony_ci .clk_regs = fsys0_clk_regs, 97462306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(fsys0_clk_regs), 97562306a36Sopenharmony_ci}; 97662306a36Sopenharmony_ci 97762306a36Sopenharmony_cistatic void __init exynos7_clk_fsys0_init(struct device_node *np) 97862306a36Sopenharmony_ci{ 97962306a36Sopenharmony_ci samsung_cmu_register_one(np, &fsys0_cmu_info); 98062306a36Sopenharmony_ci} 98162306a36Sopenharmony_ci 98262306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_fsys0, "samsung,exynos7-clock-fsys0", 98362306a36Sopenharmony_ci exynos7_clk_fsys0_init); 98462306a36Sopenharmony_ci 98562306a36Sopenharmony_ci/* Register Offset definitions for CMU_FSYS1 (0x156E0000) */ 98662306a36Sopenharmony_ci#define MUX_SEL_FSYS10 0x0200 98762306a36Sopenharmony_ci#define MUX_SEL_FSYS11 0x0204 98862306a36Sopenharmony_ci#define MUX_SEL_FSYS12 0x0208 98962306a36Sopenharmony_ci#define DIV_FSYS1 0x0600 99062306a36Sopenharmony_ci#define ENABLE_ACLK_FSYS1 0x0800 99162306a36Sopenharmony_ci#define ENABLE_PCLK_FSYS1 0x0900 99262306a36Sopenharmony_ci#define ENABLE_SCLK_FSYS11 0x0A04 99362306a36Sopenharmony_ci#define ENABLE_SCLK_FSYS12 0x0A08 99462306a36Sopenharmony_ci#define ENABLE_SCLK_FSYS13 0x0A0C 99562306a36Sopenharmony_ci 99662306a36Sopenharmony_ci/* 99762306a36Sopenharmony_ci * List of parent clocks for Muxes in CMU_FSYS1 99862306a36Sopenharmony_ci */ 99962306a36Sopenharmony_ciPNAME(mout_aclk_fsys1_200_user_p) = { "fin_pll", "aclk_fsys1_200" }; 100062306a36Sopenharmony_ciPNAME(mout_fsys1_group_p) = { "fin_pll", "fin_pll_26m", 100162306a36Sopenharmony_ci "sclk_phy_fsys1_26m" }; 100262306a36Sopenharmony_ciPNAME(mout_sclk_mmc0_user_p) = { "fin_pll", "sclk_mmc0" }; 100362306a36Sopenharmony_ciPNAME(mout_sclk_mmc1_user_p) = { "fin_pll", "sclk_mmc1" }; 100462306a36Sopenharmony_ciPNAME(mout_sclk_ufsunipro20_user_p) = { "fin_pll", "sclk_ufsunipro20" }; 100562306a36Sopenharmony_ciPNAME(mout_phyclk_ufs20_tx0_user_p) = { "fin_pll", "phyclk_ufs20_tx0_symbol" }; 100662306a36Sopenharmony_ciPNAME(mout_phyclk_ufs20_rx0_user_p) = { "fin_pll", "phyclk_ufs20_rx0_symbol" }; 100762306a36Sopenharmony_ciPNAME(mout_phyclk_ufs20_rx1_user_p) = { "fin_pll", "phyclk_ufs20_rx1_symbol" }; 100862306a36Sopenharmony_ci 100962306a36Sopenharmony_ci/* fixed rate clocks used in the FSYS1 block */ 101062306a36Sopenharmony_cistatic const struct samsung_fixed_rate_clock fixed_rate_clks_fsys1[] __initconst = { 101162306a36Sopenharmony_ci FRATE(PHYCLK_UFS20_TX0_SYMBOL, "phyclk_ufs20_tx0_symbol", NULL, 101262306a36Sopenharmony_ci 0, 300000000), 101362306a36Sopenharmony_ci FRATE(PHYCLK_UFS20_RX0_SYMBOL, "phyclk_ufs20_rx0_symbol", NULL, 101462306a36Sopenharmony_ci 0, 300000000), 101562306a36Sopenharmony_ci FRATE(PHYCLK_UFS20_RX1_SYMBOL, "phyclk_ufs20_rx1_symbol", NULL, 101662306a36Sopenharmony_ci 0, 300000000), 101762306a36Sopenharmony_ci}; 101862306a36Sopenharmony_ci 101962306a36Sopenharmony_cistatic const unsigned long fsys1_clk_regs[] __initconst = { 102062306a36Sopenharmony_ci MUX_SEL_FSYS10, 102162306a36Sopenharmony_ci MUX_SEL_FSYS11, 102262306a36Sopenharmony_ci MUX_SEL_FSYS12, 102362306a36Sopenharmony_ci DIV_FSYS1, 102462306a36Sopenharmony_ci ENABLE_ACLK_FSYS1, 102562306a36Sopenharmony_ci ENABLE_PCLK_FSYS1, 102662306a36Sopenharmony_ci ENABLE_SCLK_FSYS11, 102762306a36Sopenharmony_ci ENABLE_SCLK_FSYS12, 102862306a36Sopenharmony_ci ENABLE_SCLK_FSYS13, 102962306a36Sopenharmony_ci}; 103062306a36Sopenharmony_ci 103162306a36Sopenharmony_cistatic const struct samsung_mux_clock fsys1_mux_clks[] __initconst = { 103262306a36Sopenharmony_ci MUX(MOUT_FSYS1_PHYCLK_SEL1, "mout_fsys1_phyclk_sel1", 103362306a36Sopenharmony_ci mout_fsys1_group_p, MUX_SEL_FSYS10, 16, 2), 103462306a36Sopenharmony_ci MUX(0, "mout_fsys1_phyclk_sel0", mout_fsys1_group_p, 103562306a36Sopenharmony_ci MUX_SEL_FSYS10, 20, 2), 103662306a36Sopenharmony_ci MUX(0, "mout_aclk_fsys1_200_user", mout_aclk_fsys1_200_user_p, 103762306a36Sopenharmony_ci MUX_SEL_FSYS10, 28, 1), 103862306a36Sopenharmony_ci 103962306a36Sopenharmony_ci MUX(0, "mout_sclk_mmc1_user", mout_sclk_mmc1_user_p, 104062306a36Sopenharmony_ci MUX_SEL_FSYS11, 24, 1), 104162306a36Sopenharmony_ci MUX(0, "mout_sclk_mmc0_user", mout_sclk_mmc0_user_p, 104262306a36Sopenharmony_ci MUX_SEL_FSYS11, 28, 1), 104362306a36Sopenharmony_ci MUX(0, "mout_sclk_ufsunipro20_user", mout_sclk_ufsunipro20_user_p, 104462306a36Sopenharmony_ci MUX_SEL_FSYS11, 20, 1), 104562306a36Sopenharmony_ci 104662306a36Sopenharmony_ci MUX(0, "mout_phyclk_ufs20_rx1_symbol_user", 104762306a36Sopenharmony_ci mout_phyclk_ufs20_rx1_user_p, MUX_SEL_FSYS12, 16, 1), 104862306a36Sopenharmony_ci MUX(0, "mout_phyclk_ufs20_rx0_symbol_user", 104962306a36Sopenharmony_ci mout_phyclk_ufs20_rx0_user_p, MUX_SEL_FSYS12, 24, 1), 105062306a36Sopenharmony_ci MUX(0, "mout_phyclk_ufs20_tx0_symbol_user", 105162306a36Sopenharmony_ci mout_phyclk_ufs20_tx0_user_p, MUX_SEL_FSYS12, 28, 1), 105262306a36Sopenharmony_ci}; 105362306a36Sopenharmony_ci 105462306a36Sopenharmony_cistatic const struct samsung_div_clock fsys1_div_clks[] __initconst = { 105562306a36Sopenharmony_ci DIV(DOUT_PCLK_FSYS1, "dout_pclk_fsys1", "mout_aclk_fsys1_200_user", 105662306a36Sopenharmony_ci DIV_FSYS1, 0, 2), 105762306a36Sopenharmony_ci}; 105862306a36Sopenharmony_ci 105962306a36Sopenharmony_cistatic const struct samsung_gate_clock fsys1_gate_clks[] __initconst = { 106062306a36Sopenharmony_ci GATE(SCLK_UFSUNIPRO20_USER, "sclk_ufsunipro20_user", 106162306a36Sopenharmony_ci "mout_sclk_ufsunipro20_user", 106262306a36Sopenharmony_ci ENABLE_SCLK_FSYS11, 20, 0, 0), 106362306a36Sopenharmony_ci 106462306a36Sopenharmony_ci GATE(ACLK_MMC1, "aclk_mmc1", "mout_aclk_fsys1_200_user", 106562306a36Sopenharmony_ci ENABLE_ACLK_FSYS1, 29, 0, 0), 106662306a36Sopenharmony_ci GATE(ACLK_MMC0, "aclk_mmc0", "mout_aclk_fsys1_200_user", 106762306a36Sopenharmony_ci ENABLE_ACLK_FSYS1, 30, 0, 0), 106862306a36Sopenharmony_ci 106962306a36Sopenharmony_ci GATE(ACLK_UFS20_LINK, "aclk_ufs20_link", "dout_pclk_fsys1", 107062306a36Sopenharmony_ci ENABLE_ACLK_FSYS1, 31, 0, 0), 107162306a36Sopenharmony_ci GATE(PCLK_GPIO_FSYS1, "pclk_gpio_fsys1", "mout_aclk_fsys1_200_user", 107262306a36Sopenharmony_ci ENABLE_PCLK_FSYS1, 30, 0, 0), 107362306a36Sopenharmony_ci 107462306a36Sopenharmony_ci GATE(PHYCLK_UFS20_RX1_SYMBOL_USER, "phyclk_ufs20_rx1_symbol_user", 107562306a36Sopenharmony_ci "mout_phyclk_ufs20_rx1_symbol_user", 107662306a36Sopenharmony_ci ENABLE_SCLK_FSYS12, 16, 0, 0), 107762306a36Sopenharmony_ci GATE(PHYCLK_UFS20_RX0_SYMBOL_USER, "phyclk_ufs20_rx0_symbol_user", 107862306a36Sopenharmony_ci "mout_phyclk_ufs20_rx0_symbol_user", 107962306a36Sopenharmony_ci ENABLE_SCLK_FSYS12, 24, 0, 0), 108062306a36Sopenharmony_ci GATE(PHYCLK_UFS20_TX0_SYMBOL_USER, "phyclk_ufs20_tx0_symbol_user", 108162306a36Sopenharmony_ci "mout_phyclk_ufs20_tx0_symbol_user", 108262306a36Sopenharmony_ci ENABLE_SCLK_FSYS12, 28, 0, 0), 108362306a36Sopenharmony_ci 108462306a36Sopenharmony_ci GATE(OSCCLK_PHY_CLKOUT_EMBEDDED_COMBO_PHY, 108562306a36Sopenharmony_ci "oscclk_phy_clkout_embedded_combo_phy", 108662306a36Sopenharmony_ci "fin_pll", 108762306a36Sopenharmony_ci ENABLE_SCLK_FSYS12, 4, CLK_IGNORE_UNUSED, 0), 108862306a36Sopenharmony_ci 108962306a36Sopenharmony_ci GATE(SCLK_COMBO_PHY_EMBEDDED_26M, "sclk_combo_phy_embedded_26m", 109062306a36Sopenharmony_ci "mout_fsys1_phyclk_sel1", 109162306a36Sopenharmony_ci ENABLE_SCLK_FSYS13, 24, CLK_IGNORE_UNUSED, 0), 109262306a36Sopenharmony_ci}; 109362306a36Sopenharmony_ci 109462306a36Sopenharmony_cistatic const struct samsung_cmu_info fsys1_cmu_info __initconst = { 109562306a36Sopenharmony_ci .fixed_clks = fixed_rate_clks_fsys1, 109662306a36Sopenharmony_ci .nr_fixed_clks = ARRAY_SIZE(fixed_rate_clks_fsys1), 109762306a36Sopenharmony_ci .mux_clks = fsys1_mux_clks, 109862306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(fsys1_mux_clks), 109962306a36Sopenharmony_ci .div_clks = fsys1_div_clks, 110062306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(fsys1_div_clks), 110162306a36Sopenharmony_ci .gate_clks = fsys1_gate_clks, 110262306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(fsys1_gate_clks), 110362306a36Sopenharmony_ci .nr_clk_ids = FSYS1_NR_CLK, 110462306a36Sopenharmony_ci .clk_regs = fsys1_clk_regs, 110562306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(fsys1_clk_regs), 110662306a36Sopenharmony_ci}; 110762306a36Sopenharmony_ci 110862306a36Sopenharmony_cistatic void __init exynos7_clk_fsys1_init(struct device_node *np) 110962306a36Sopenharmony_ci{ 111062306a36Sopenharmony_ci samsung_cmu_register_one(np, &fsys1_cmu_info); 111162306a36Sopenharmony_ci} 111262306a36Sopenharmony_ci 111362306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_fsys1, "samsung,exynos7-clock-fsys1", 111462306a36Sopenharmony_ci exynos7_clk_fsys1_init); 111562306a36Sopenharmony_ci 111662306a36Sopenharmony_ci#define MUX_SEL_MSCL 0x0200 111762306a36Sopenharmony_ci#define DIV_MSCL 0x0600 111862306a36Sopenharmony_ci#define ENABLE_ACLK_MSCL 0x0800 111962306a36Sopenharmony_ci#define ENABLE_PCLK_MSCL 0x0900 112062306a36Sopenharmony_ci 112162306a36Sopenharmony_ci/* List of parent clocks for Muxes in CMU_MSCL */ 112262306a36Sopenharmony_ciPNAME(mout_aclk_mscl_532_user_p) = { "fin_pll", "aclk_mscl_532" }; 112362306a36Sopenharmony_ci 112462306a36Sopenharmony_cistatic const unsigned long mscl_clk_regs[] __initconst = { 112562306a36Sopenharmony_ci MUX_SEL_MSCL, 112662306a36Sopenharmony_ci DIV_MSCL, 112762306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 112862306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 112962306a36Sopenharmony_ci}; 113062306a36Sopenharmony_ci 113162306a36Sopenharmony_cistatic const struct samsung_mux_clock mscl_mux_clks[] __initconst = { 113262306a36Sopenharmony_ci MUX(USERMUX_ACLK_MSCL_532, "usermux_aclk_mscl_532", 113362306a36Sopenharmony_ci mout_aclk_mscl_532_user_p, MUX_SEL_MSCL, 0, 1), 113462306a36Sopenharmony_ci}; 113562306a36Sopenharmony_cistatic const struct samsung_div_clock mscl_div_clks[] __initconst = { 113662306a36Sopenharmony_ci DIV(DOUT_PCLK_MSCL, "dout_pclk_mscl", "usermux_aclk_mscl_532", 113762306a36Sopenharmony_ci DIV_MSCL, 0, 3), 113862306a36Sopenharmony_ci}; 113962306a36Sopenharmony_cistatic const struct samsung_gate_clock mscl_gate_clks[] __initconst = { 114062306a36Sopenharmony_ci 114162306a36Sopenharmony_ci GATE(ACLK_MSCL_0, "aclk_mscl_0", "usermux_aclk_mscl_532", 114262306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 31, 0, 0), 114362306a36Sopenharmony_ci GATE(ACLK_MSCL_1, "aclk_mscl_1", "usermux_aclk_mscl_532", 114462306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 30, 0, 0), 114562306a36Sopenharmony_ci GATE(ACLK_JPEG, "aclk_jpeg", "usermux_aclk_mscl_532", 114662306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 29, 0, 0), 114762306a36Sopenharmony_ci GATE(ACLK_G2D, "aclk_g2d", "usermux_aclk_mscl_532", 114862306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 28, 0, 0), 114962306a36Sopenharmony_ci GATE(ACLK_LH_ASYNC_SI_MSCL_0, "aclk_lh_async_si_mscl_0", 115062306a36Sopenharmony_ci "usermux_aclk_mscl_532", 115162306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 27, 0, 0), 115262306a36Sopenharmony_ci GATE(ACLK_LH_ASYNC_SI_MSCL_1, "aclk_lh_async_si_mscl_1", 115362306a36Sopenharmony_ci "usermux_aclk_mscl_532", 115462306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 26, 0, 0), 115562306a36Sopenharmony_ci GATE(ACLK_XIU_MSCLX_0, "aclk_xiu_msclx_0", "usermux_aclk_mscl_532", 115662306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 25, 0, 0), 115762306a36Sopenharmony_ci GATE(ACLK_XIU_MSCLX_1, "aclk_xiu_msclx_1", "usermux_aclk_mscl_532", 115862306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 24, 0, 0), 115962306a36Sopenharmony_ci GATE(ACLK_AXI2ACEL_BRIDGE, "aclk_axi2acel_bridge", 116062306a36Sopenharmony_ci "usermux_aclk_mscl_532", 116162306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 23, 0, 0), 116262306a36Sopenharmony_ci GATE(ACLK_QE_MSCL_0, "aclk_qe_mscl_0", "usermux_aclk_mscl_532", 116362306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 22, 0, 0), 116462306a36Sopenharmony_ci GATE(ACLK_QE_MSCL_1, "aclk_qe_mscl_1", "usermux_aclk_mscl_532", 116562306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 21, 0, 0), 116662306a36Sopenharmony_ci GATE(ACLK_QE_JPEG, "aclk_qe_jpeg", "usermux_aclk_mscl_532", 116762306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 20, 0, 0), 116862306a36Sopenharmony_ci GATE(ACLK_QE_G2D, "aclk_qe_g2d", "usermux_aclk_mscl_532", 116962306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 19, 0, 0), 117062306a36Sopenharmony_ci GATE(ACLK_PPMU_MSCL_0, "aclk_ppmu_mscl_0", "usermux_aclk_mscl_532", 117162306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 18, 0, 0), 117262306a36Sopenharmony_ci GATE(ACLK_PPMU_MSCL_1, "aclk_ppmu_mscl_1", "usermux_aclk_mscl_532", 117362306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 17, 0, 0), 117462306a36Sopenharmony_ci GATE(ACLK_MSCLNP_133, "aclk_msclnp_133", "usermux_aclk_mscl_532", 117562306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 16, 0, 0), 117662306a36Sopenharmony_ci GATE(ACLK_AHB2APB_MSCL0P, "aclk_ahb2apb_mscl0p", 117762306a36Sopenharmony_ci "usermux_aclk_mscl_532", 117862306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 15, 0, 0), 117962306a36Sopenharmony_ci GATE(ACLK_AHB2APB_MSCL1P, "aclk_ahb2apb_mscl1p", 118062306a36Sopenharmony_ci "usermux_aclk_mscl_532", 118162306a36Sopenharmony_ci ENABLE_ACLK_MSCL, 14, 0, 0), 118262306a36Sopenharmony_ci 118362306a36Sopenharmony_ci GATE(PCLK_MSCL_0, "pclk_mscl_0", "dout_pclk_mscl", 118462306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 31, 0, 0), 118562306a36Sopenharmony_ci GATE(PCLK_MSCL_1, "pclk_mscl_1", "dout_pclk_mscl", 118662306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 30, 0, 0), 118762306a36Sopenharmony_ci GATE(PCLK_JPEG, "pclk_jpeg", "dout_pclk_mscl", 118862306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 29, 0, 0), 118962306a36Sopenharmony_ci GATE(PCLK_G2D, "pclk_g2d", "dout_pclk_mscl", 119062306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 28, 0, 0), 119162306a36Sopenharmony_ci GATE(PCLK_QE_MSCL_0, "pclk_qe_mscl_0", "dout_pclk_mscl", 119262306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 27, 0, 0), 119362306a36Sopenharmony_ci GATE(PCLK_QE_MSCL_1, "pclk_qe_mscl_1", "dout_pclk_mscl", 119462306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 26, 0, 0), 119562306a36Sopenharmony_ci GATE(PCLK_QE_JPEG, "pclk_qe_jpeg", "dout_pclk_mscl", 119662306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 25, 0, 0), 119762306a36Sopenharmony_ci GATE(PCLK_QE_G2D, "pclk_qe_g2d", "dout_pclk_mscl", 119862306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 24, 0, 0), 119962306a36Sopenharmony_ci GATE(PCLK_PPMU_MSCL_0, "pclk_ppmu_mscl_0", "dout_pclk_mscl", 120062306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 23, 0, 0), 120162306a36Sopenharmony_ci GATE(PCLK_PPMU_MSCL_1, "pclk_ppmu_mscl_1", "dout_pclk_mscl", 120262306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 22, 0, 0), 120362306a36Sopenharmony_ci GATE(PCLK_AXI2ACEL_BRIDGE, "pclk_axi2acel_bridge", "dout_pclk_mscl", 120462306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 21, 0, 0), 120562306a36Sopenharmony_ci GATE(PCLK_PMU_MSCL, "pclk_pmu_mscl", "dout_pclk_mscl", 120662306a36Sopenharmony_ci ENABLE_PCLK_MSCL, 20, 0, 0), 120762306a36Sopenharmony_ci}; 120862306a36Sopenharmony_ci 120962306a36Sopenharmony_cistatic const struct samsung_cmu_info mscl_cmu_info __initconst = { 121062306a36Sopenharmony_ci .mux_clks = mscl_mux_clks, 121162306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(mscl_mux_clks), 121262306a36Sopenharmony_ci .div_clks = mscl_div_clks, 121362306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(mscl_div_clks), 121462306a36Sopenharmony_ci .gate_clks = mscl_gate_clks, 121562306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(mscl_gate_clks), 121662306a36Sopenharmony_ci .nr_clk_ids = MSCL_NR_CLK, 121762306a36Sopenharmony_ci .clk_regs = mscl_clk_regs, 121862306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(mscl_clk_regs), 121962306a36Sopenharmony_ci}; 122062306a36Sopenharmony_ci 122162306a36Sopenharmony_cistatic void __init exynos7_clk_mscl_init(struct device_node *np) 122262306a36Sopenharmony_ci{ 122362306a36Sopenharmony_ci samsung_cmu_register_one(np, &mscl_cmu_info); 122462306a36Sopenharmony_ci} 122562306a36Sopenharmony_ci 122662306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_mscl, "samsung,exynos7-clock-mscl", 122762306a36Sopenharmony_ci exynos7_clk_mscl_init); 122862306a36Sopenharmony_ci 122962306a36Sopenharmony_ci/* Register Offset definitions for CMU_AUD (0x114C0000) */ 123062306a36Sopenharmony_ci#define MUX_SEL_AUD 0x0200 123162306a36Sopenharmony_ci#define DIV_AUD0 0x0600 123262306a36Sopenharmony_ci#define DIV_AUD1 0x0604 123362306a36Sopenharmony_ci#define ENABLE_ACLK_AUD 0x0800 123462306a36Sopenharmony_ci#define ENABLE_PCLK_AUD 0x0900 123562306a36Sopenharmony_ci#define ENABLE_SCLK_AUD 0x0A00 123662306a36Sopenharmony_ci 123762306a36Sopenharmony_ci/* 123862306a36Sopenharmony_ci * List of parent clocks for Muxes in CMU_AUD 123962306a36Sopenharmony_ci */ 124062306a36Sopenharmony_ciPNAME(mout_aud_pll_user_p) = { "fin_pll", "fout_aud_pll" }; 124162306a36Sopenharmony_ciPNAME(mout_aud_group_p) = { "dout_aud_cdclk", "ioclk_audiocdclk0" }; 124262306a36Sopenharmony_ci 124362306a36Sopenharmony_cistatic const unsigned long aud_clk_regs[] __initconst = { 124462306a36Sopenharmony_ci MUX_SEL_AUD, 124562306a36Sopenharmony_ci DIV_AUD0, 124662306a36Sopenharmony_ci DIV_AUD1, 124762306a36Sopenharmony_ci ENABLE_ACLK_AUD, 124862306a36Sopenharmony_ci ENABLE_PCLK_AUD, 124962306a36Sopenharmony_ci ENABLE_SCLK_AUD, 125062306a36Sopenharmony_ci}; 125162306a36Sopenharmony_ci 125262306a36Sopenharmony_cistatic const struct samsung_mux_clock aud_mux_clks[] __initconst = { 125362306a36Sopenharmony_ci MUX(0, "mout_sclk_i2s", mout_aud_group_p, MUX_SEL_AUD, 12, 1), 125462306a36Sopenharmony_ci MUX(0, "mout_sclk_pcm", mout_aud_group_p, MUX_SEL_AUD, 16, 1), 125562306a36Sopenharmony_ci MUX(0, "mout_aud_pll_user", mout_aud_pll_user_p, MUX_SEL_AUD, 20, 1), 125662306a36Sopenharmony_ci}; 125762306a36Sopenharmony_ci 125862306a36Sopenharmony_cistatic const struct samsung_div_clock aud_div_clks[] __initconst = { 125962306a36Sopenharmony_ci DIV(0, "dout_aud_ca5", "mout_aud_pll_user", DIV_AUD0, 0, 4), 126062306a36Sopenharmony_ci DIV(0, "dout_aclk_aud", "dout_aud_ca5", DIV_AUD0, 4, 4), 126162306a36Sopenharmony_ci DIV(0, "dout_aud_pclk_dbg", "dout_aud_ca5", DIV_AUD0, 8, 4), 126262306a36Sopenharmony_ci 126362306a36Sopenharmony_ci DIV(0, "dout_sclk_i2s", "mout_sclk_i2s", DIV_AUD1, 0, 4), 126462306a36Sopenharmony_ci DIV(0, "dout_sclk_pcm", "mout_sclk_pcm", DIV_AUD1, 4, 8), 126562306a36Sopenharmony_ci DIV(0, "dout_sclk_uart", "dout_aud_cdclk", DIV_AUD1, 12, 4), 126662306a36Sopenharmony_ci DIV(0, "dout_sclk_slimbus", "dout_aud_cdclk", DIV_AUD1, 16, 5), 126762306a36Sopenharmony_ci DIV(0, "dout_aud_cdclk", "mout_aud_pll_user", DIV_AUD1, 24, 4), 126862306a36Sopenharmony_ci}; 126962306a36Sopenharmony_ci 127062306a36Sopenharmony_cistatic const struct samsung_gate_clock aud_gate_clks[] __initconst = { 127162306a36Sopenharmony_ci GATE(SCLK_PCM, "sclk_pcm", "dout_sclk_pcm", 127262306a36Sopenharmony_ci ENABLE_SCLK_AUD, 27, CLK_SET_RATE_PARENT, 0), 127362306a36Sopenharmony_ci GATE(SCLK_I2S, "sclk_i2s", "dout_sclk_i2s", 127462306a36Sopenharmony_ci ENABLE_SCLK_AUD, 28, CLK_SET_RATE_PARENT, 0), 127562306a36Sopenharmony_ci GATE(0, "sclk_uart", "dout_sclk_uart", ENABLE_SCLK_AUD, 29, 0, 0), 127662306a36Sopenharmony_ci GATE(0, "sclk_slimbus", "dout_sclk_slimbus", 127762306a36Sopenharmony_ci ENABLE_SCLK_AUD, 30, 0, 0), 127862306a36Sopenharmony_ci 127962306a36Sopenharmony_ci GATE(0, "pclk_dbg_aud", "dout_aud_pclk_dbg", ENABLE_PCLK_AUD, 19, 0, 0), 128062306a36Sopenharmony_ci GATE(0, "pclk_gpio_aud", "dout_aclk_aud", ENABLE_PCLK_AUD, 20, 0, 0), 128162306a36Sopenharmony_ci GATE(0, "pclk_wdt1", "dout_aclk_aud", ENABLE_PCLK_AUD, 22, 0, 0), 128262306a36Sopenharmony_ci GATE(0, "pclk_wdt0", "dout_aclk_aud", ENABLE_PCLK_AUD, 23, 0, 0), 128362306a36Sopenharmony_ci GATE(0, "pclk_slimbus", "dout_aclk_aud", ENABLE_PCLK_AUD, 24, 0, 0), 128462306a36Sopenharmony_ci GATE(0, "pclk_uart", "dout_aclk_aud", ENABLE_PCLK_AUD, 25, 0, 0), 128562306a36Sopenharmony_ci GATE(PCLK_PCM, "pclk_pcm", "dout_aclk_aud", 128662306a36Sopenharmony_ci ENABLE_PCLK_AUD, 26, CLK_SET_RATE_PARENT, 0), 128762306a36Sopenharmony_ci GATE(PCLK_I2S, "pclk_i2s", "dout_aclk_aud", 128862306a36Sopenharmony_ci ENABLE_PCLK_AUD, 27, CLK_SET_RATE_PARENT, 0), 128962306a36Sopenharmony_ci GATE(0, "pclk_timer", "dout_aclk_aud", ENABLE_PCLK_AUD, 28, 0, 0), 129062306a36Sopenharmony_ci GATE(0, "pclk_smmu_aud", "dout_aclk_aud", ENABLE_PCLK_AUD, 31, 0, 0), 129162306a36Sopenharmony_ci 129262306a36Sopenharmony_ci GATE(0, "aclk_smmu_aud", "dout_aclk_aud", ENABLE_ACLK_AUD, 27, 0, 0), 129362306a36Sopenharmony_ci GATE(0, "aclk_acel_lh_async_si_top", "dout_aclk_aud", 129462306a36Sopenharmony_ci ENABLE_ACLK_AUD, 28, 0, 0), 129562306a36Sopenharmony_ci GATE(ACLK_ADMA, "aclk_dmac", "dout_aclk_aud", ENABLE_ACLK_AUD, 31, 0, 0), 129662306a36Sopenharmony_ci}; 129762306a36Sopenharmony_ci 129862306a36Sopenharmony_cistatic const struct samsung_cmu_info aud_cmu_info __initconst = { 129962306a36Sopenharmony_ci .mux_clks = aud_mux_clks, 130062306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(aud_mux_clks), 130162306a36Sopenharmony_ci .div_clks = aud_div_clks, 130262306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(aud_div_clks), 130362306a36Sopenharmony_ci .gate_clks = aud_gate_clks, 130462306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(aud_gate_clks), 130562306a36Sopenharmony_ci .nr_clk_ids = AUD_NR_CLK, 130662306a36Sopenharmony_ci .clk_regs = aud_clk_regs, 130762306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(aud_clk_regs), 130862306a36Sopenharmony_ci}; 130962306a36Sopenharmony_ci 131062306a36Sopenharmony_cistatic void __init exynos7_clk_aud_init(struct device_node *np) 131162306a36Sopenharmony_ci{ 131262306a36Sopenharmony_ci samsung_cmu_register_one(np, &aud_cmu_info); 131362306a36Sopenharmony_ci} 131462306a36Sopenharmony_ci 131562306a36Sopenharmony_ciCLK_OF_DECLARE(exynos7_clk_aud, "samsung,exynos7-clock-aud", 131662306a36Sopenharmony_ci exynos7_clk_aud_init); 1317