162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2013 Samsung Electronics Co., Ltd. 462306a36Sopenharmony_ci * Author: Tarek Dakhran <t.dakhran@samsung.com> 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Common Clock Framework support for Exynos5410 SoC. 762306a36Sopenharmony_ci*/ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include <dt-bindings/clock/exynos5410.h> 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#include <linux/clk-provider.h> 1262306a36Sopenharmony_ci#include <linux/of.h> 1362306a36Sopenharmony_ci#include <linux/of_address.h> 1462306a36Sopenharmony_ci#include <linux/clk.h> 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#include "clk.h" 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci#define APLL_LOCK 0x0 1962306a36Sopenharmony_ci#define APLL_CON0 0x100 2062306a36Sopenharmony_ci#define CPLL_LOCK 0x10020 2162306a36Sopenharmony_ci#define CPLL_CON0 0x10120 2262306a36Sopenharmony_ci#define EPLL_LOCK 0x10040 2362306a36Sopenharmony_ci#define EPLL_CON0 0x10130 2462306a36Sopenharmony_ci#define MPLL_LOCK 0x4000 2562306a36Sopenharmony_ci#define MPLL_CON0 0x4100 2662306a36Sopenharmony_ci#define BPLL_LOCK 0x20010 2762306a36Sopenharmony_ci#define BPLL_CON0 0x20110 2862306a36Sopenharmony_ci#define KPLL_LOCK 0x28000 2962306a36Sopenharmony_ci#define KPLL_CON0 0x28100 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#define SRC_CPU 0x200 3262306a36Sopenharmony_ci#define DIV_CPU0 0x500 3362306a36Sopenharmony_ci#define SRC_CPERI1 0x4204 3462306a36Sopenharmony_ci#define GATE_IP_G2D 0x8800 3562306a36Sopenharmony_ci#define DIV_TOP0 0x10510 3662306a36Sopenharmony_ci#define DIV_TOP1 0x10514 3762306a36Sopenharmony_ci#define DIV_FSYS0 0x10548 3862306a36Sopenharmony_ci#define DIV_FSYS1 0x1054c 3962306a36Sopenharmony_ci#define DIV_FSYS2 0x10550 4062306a36Sopenharmony_ci#define DIV_PERIC0 0x10558 4162306a36Sopenharmony_ci#define DIV_PERIC3 0x10564 4262306a36Sopenharmony_ci#define SRC_TOP0 0x10210 4362306a36Sopenharmony_ci#define SRC_TOP1 0x10214 4462306a36Sopenharmony_ci#define SRC_TOP2 0x10218 4562306a36Sopenharmony_ci#define SRC_FSYS 0x10244 4662306a36Sopenharmony_ci#define SRC_PERIC0 0x10250 4762306a36Sopenharmony_ci#define SRC_MASK_FSYS 0x10340 4862306a36Sopenharmony_ci#define SRC_MASK_PERIC0 0x10350 4962306a36Sopenharmony_ci#define GATE_BUS_FSYS0 0x10740 5062306a36Sopenharmony_ci#define GATE_TOP_SCLK_FSYS 0x10840 5162306a36Sopenharmony_ci#define GATE_TOP_SCLK_PERIC 0x10850 5262306a36Sopenharmony_ci#define GATE_IP_FSYS 0x10944 5362306a36Sopenharmony_ci#define GATE_IP_PERIC 0x10950 5462306a36Sopenharmony_ci#define GATE_IP_PERIS 0x10960 5562306a36Sopenharmony_ci#define SRC_CDREX 0x20200 5662306a36Sopenharmony_ci#define SRC_KFC 0x28200 5762306a36Sopenharmony_ci#define DIV_KFC0 0x28500 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci/* NOTE: Must be equal to the last clock ID increased by one */ 6062306a36Sopenharmony_ci#define CLKS_NR 512 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci/* list of PLLs */ 6362306a36Sopenharmony_cienum exynos5410_plls { 6462306a36Sopenharmony_ci apll, cpll, epll, mpll, 6562306a36Sopenharmony_ci bpll, kpll, 6662306a36Sopenharmony_ci nr_plls /* number of PLLs */ 6762306a36Sopenharmony_ci}; 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci/* list of all parent clocks */ 7062306a36Sopenharmony_ciPNAME(apll_p) = { "fin_pll", "fout_apll", }; 7162306a36Sopenharmony_ciPNAME(bpll_p) = { "fin_pll", "fout_bpll", }; 7262306a36Sopenharmony_ciPNAME(cpll_p) = { "fin_pll", "fout_cpll" }; 7362306a36Sopenharmony_ciPNAME(epll_p) = { "fin_pll", "fout_epll" }; 7462306a36Sopenharmony_ciPNAME(mpll_p) = { "fin_pll", "fout_mpll", }; 7562306a36Sopenharmony_ciPNAME(kpll_p) = { "fin_pll", "fout_kpll", }; 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ciPNAME(mout_cpu_p) = { "mout_apll", "sclk_mpll", }; 7862306a36Sopenharmony_ciPNAME(mout_kfc_p) = { "mout_kpll", "sclk_mpll", }; 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ciPNAME(mpll_user_p) = { "fin_pll", "sclk_mpll", }; 8162306a36Sopenharmony_ciPNAME(bpll_user_p) = { "fin_pll", "sclk_bpll", }; 8262306a36Sopenharmony_ciPNAME(mpll_bpll_p) = { "sclk_mpll_muxed", "sclk_bpll_muxed", }; 8362306a36Sopenharmony_ciPNAME(sclk_mpll_bpll_p) = { "sclk_mpll_bpll", "fin_pll", }; 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ciPNAME(group2_p) = { "fin_pll", "fin_pll", "none", "none", 8662306a36Sopenharmony_ci "none", "none", "sclk_mpll_bpll", 8762306a36Sopenharmony_ci "none", "none", "sclk_cpll" }; 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_cistatic const struct samsung_mux_clock exynos5410_mux_clks[] __initconst = { 9062306a36Sopenharmony_ci MUX(0, "mout_apll", apll_p, SRC_CPU, 0, 1), 9162306a36Sopenharmony_ci MUX(0, "mout_cpu", mout_cpu_p, SRC_CPU, 16, 1), 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci MUX(0, "mout_kpll", kpll_p, SRC_KFC, 0, 1), 9462306a36Sopenharmony_ci MUX(0, "mout_kfc", mout_kfc_p, SRC_KFC, 16, 1), 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci MUX(0, "sclk_mpll", mpll_p, SRC_CPERI1, 8, 1), 9762306a36Sopenharmony_ci MUX(0, "sclk_mpll_muxed", mpll_user_p, SRC_TOP2, 20, 1), 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci MUX(0, "sclk_bpll", bpll_p, SRC_CDREX, 0, 1), 10062306a36Sopenharmony_ci MUX(0, "sclk_bpll_muxed", bpll_user_p, SRC_TOP2, 24, 1), 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci MUX(0, "sclk_epll", epll_p, SRC_TOP2, 12, 1), 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci MUX(0, "sclk_cpll", cpll_p, SRC_TOP2, 8, 1), 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci MUX(0, "sclk_mpll_bpll", mpll_bpll_p, SRC_TOP1, 20, 1), 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci MUX(0, "mout_mmc0", group2_p, SRC_FSYS, 0, 4), 10962306a36Sopenharmony_ci MUX(0, "mout_mmc1", group2_p, SRC_FSYS, 4, 4), 11062306a36Sopenharmony_ci MUX(0, "mout_mmc2", group2_p, SRC_FSYS, 8, 4), 11162306a36Sopenharmony_ci MUX(0, "mout_usbd300", sclk_mpll_bpll_p, SRC_FSYS, 28, 1), 11262306a36Sopenharmony_ci MUX(0, "mout_usbd301", sclk_mpll_bpll_p, SRC_FSYS, 29, 1), 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci MUX(0, "mout_uart0", group2_p, SRC_PERIC0, 0, 4), 11562306a36Sopenharmony_ci MUX(0, "mout_uart1", group2_p, SRC_PERIC0, 4, 4), 11662306a36Sopenharmony_ci MUX(0, "mout_uart2", group2_p, SRC_PERIC0, 8, 4), 11762306a36Sopenharmony_ci MUX(0, "mout_uart3", group2_p, SRC_PERIC0, 12, 4), 11862306a36Sopenharmony_ci MUX(0, "mout_pwm", group2_p, SRC_PERIC0, 24, 4), 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci MUX(0, "mout_aclk200", mpll_bpll_p, SRC_TOP0, 12, 1), 12162306a36Sopenharmony_ci MUX(0, "mout_aclk400", mpll_bpll_p, SRC_TOP0, 20, 1), 12262306a36Sopenharmony_ci}; 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_cistatic const struct samsung_div_clock exynos5410_div_clks[] __initconst = { 12562306a36Sopenharmony_ci DIV(0, "div_arm", "mout_cpu", DIV_CPU0, 0, 3), 12662306a36Sopenharmony_ci DIV(0, "div_arm2", "div_arm", DIV_CPU0, 28, 3), 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci DIV(0, "div_acp", "div_arm2", DIV_CPU0, 8, 3), 12962306a36Sopenharmony_ci DIV(0, "div_cpud", "div_arm2", DIV_CPU0, 4, 3), 13062306a36Sopenharmony_ci DIV(0, "div_atb", "div_arm2", DIV_CPU0, 16, 3), 13162306a36Sopenharmony_ci DIV(0, "pclk_dbg", "div_arm2", DIV_CPU0, 20, 3), 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci DIV(0, "div_kfc", "mout_kfc", DIV_KFC0, 0, 3), 13462306a36Sopenharmony_ci DIV(0, "div_aclk", "div_kfc", DIV_KFC0, 4, 3), 13562306a36Sopenharmony_ci DIV(0, "div_pclk", "div_kfc", DIV_KFC0, 20, 3), 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci DIV(0, "aclk66_pre", "sclk_mpll_muxed", DIV_TOP1, 24, 3), 13862306a36Sopenharmony_ci DIV(0, "aclk66", "aclk66_pre", DIV_TOP0, 0, 3), 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ci DIV(0, "dout_usbphy300", "mout_usbd300", DIV_FSYS0, 16, 4), 14162306a36Sopenharmony_ci DIV(0, "dout_usbphy301", "mout_usbd301", DIV_FSYS0, 20, 4), 14262306a36Sopenharmony_ci DIV(0, "dout_usbd300", "mout_usbd300", DIV_FSYS0, 24, 4), 14362306a36Sopenharmony_ci DIV(0, "dout_usbd301", "mout_usbd301", DIV_FSYS0, 28, 4), 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci DIV(0, "div_mmc0", "mout_mmc0", DIV_FSYS1, 0, 4), 14662306a36Sopenharmony_ci DIV(0, "div_mmc1", "mout_mmc1", DIV_FSYS1, 16, 4), 14762306a36Sopenharmony_ci DIV(0, "div_mmc2", "mout_mmc2", DIV_FSYS2, 0, 4), 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ci DIV_F(0, "div_mmc_pre0", "div_mmc0", 15062306a36Sopenharmony_ci DIV_FSYS1, 8, 8, CLK_SET_RATE_PARENT, 0), 15162306a36Sopenharmony_ci DIV_F(0, "div_mmc_pre1", "div_mmc1", 15262306a36Sopenharmony_ci DIV_FSYS1, 24, 8, CLK_SET_RATE_PARENT, 0), 15362306a36Sopenharmony_ci DIV_F(0, "div_mmc_pre2", "div_mmc2", 15462306a36Sopenharmony_ci DIV_FSYS2, 8, 8, CLK_SET_RATE_PARENT, 0), 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci DIV(0, "div_uart0", "mout_uart0", DIV_PERIC0, 0, 4), 15762306a36Sopenharmony_ci DIV(0, "div_uart1", "mout_uart1", DIV_PERIC0, 4, 4), 15862306a36Sopenharmony_ci DIV(0, "div_uart2", "mout_uart2", DIV_PERIC0, 8, 4), 15962306a36Sopenharmony_ci DIV(0, "div_uart3", "mout_uart3", DIV_PERIC0, 12, 4), 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci DIV(0, "dout_pwm", "mout_pwm", DIV_PERIC3, 0, 4), 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ci DIV(0, "aclk200", "mout_aclk200", DIV_TOP0, 12, 3), 16462306a36Sopenharmony_ci DIV(0, "aclk266", "mpll_user_p", DIV_TOP0, 16, 3), 16562306a36Sopenharmony_ci DIV(0, "aclk400", "mout_aclk400", DIV_TOP0, 24, 3), 16662306a36Sopenharmony_ci}; 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_cistatic const struct samsung_gate_clock exynos5410_gate_clks[] __initconst = { 16962306a36Sopenharmony_ci GATE(CLK_SSS, "sss", "aclk266", GATE_IP_G2D, 2, 0, 0), 17062306a36Sopenharmony_ci GATE(CLK_MCT, "mct", "aclk66", GATE_IP_PERIS, 18, 0, 0), 17162306a36Sopenharmony_ci GATE(CLK_WDT, "wdt", "aclk66", GATE_IP_PERIS, 19, 0, 0), 17262306a36Sopenharmony_ci GATE(CLK_RTC, "rtc", "aclk66", GATE_IP_PERIS, 20, 0, 0), 17362306a36Sopenharmony_ci GATE(CLK_TMU, "tmu", "aclk66", GATE_IP_PERIS, 21, 0, 0), 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci GATE(CLK_SCLK_MMC0, "sclk_mmc0", "div_mmc_pre0", 17662306a36Sopenharmony_ci SRC_MASK_FSYS, 0, CLK_SET_RATE_PARENT, 0), 17762306a36Sopenharmony_ci GATE(CLK_SCLK_MMC1, "sclk_mmc1", "div_mmc_pre1", 17862306a36Sopenharmony_ci SRC_MASK_FSYS, 4, CLK_SET_RATE_PARENT, 0), 17962306a36Sopenharmony_ci GATE(CLK_SCLK_MMC2, "sclk_mmc2", "div_mmc_pre2", 18062306a36Sopenharmony_ci SRC_MASK_FSYS, 8, CLK_SET_RATE_PARENT, 0), 18162306a36Sopenharmony_ci 18262306a36Sopenharmony_ci GATE(CLK_MMC0, "sdmmc0", "aclk200", GATE_BUS_FSYS0, 12, 0, 0), 18362306a36Sopenharmony_ci GATE(CLK_MMC1, "sdmmc1", "aclk200", GATE_BUS_FSYS0, 13, 0, 0), 18462306a36Sopenharmony_ci GATE(CLK_MMC2, "sdmmc2", "aclk200", GATE_BUS_FSYS0, 14, 0, 0), 18562306a36Sopenharmony_ci GATE(CLK_PDMA1, "pdma1", "aclk200", GATE_BUS_FSYS0, 2, 0, 0), 18662306a36Sopenharmony_ci GATE(CLK_PDMA0, "pdma0", "aclk200", GATE_BUS_FSYS0, 1, 0, 0), 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci GATE(CLK_SCLK_USBPHY301, "sclk_usbphy301", "dout_usbphy301", 18962306a36Sopenharmony_ci GATE_TOP_SCLK_FSYS, 7, CLK_SET_RATE_PARENT, 0), 19062306a36Sopenharmony_ci GATE(CLK_SCLK_USBPHY300, "sclk_usbphy300", "dout_usbphy300", 19162306a36Sopenharmony_ci GATE_TOP_SCLK_FSYS, 8, CLK_SET_RATE_PARENT, 0), 19262306a36Sopenharmony_ci GATE(CLK_SCLK_USBD300, "sclk_usbd300", "dout_usbd300", 19362306a36Sopenharmony_ci GATE_TOP_SCLK_FSYS, 9, CLK_SET_RATE_PARENT, 0), 19462306a36Sopenharmony_ci GATE(CLK_SCLK_USBD301, "sclk_usbd301", "dout_usbd301", 19562306a36Sopenharmony_ci GATE_TOP_SCLK_FSYS, 10, CLK_SET_RATE_PARENT, 0), 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ci GATE(CLK_SCLK_PWM, "sclk_pwm", "dout_pwm", 19862306a36Sopenharmony_ci GATE_TOP_SCLK_PERIC, 11, CLK_SET_RATE_PARENT, 0), 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci GATE(CLK_UART0, "uart0", "aclk66", GATE_IP_PERIC, 0, 0, 0), 20162306a36Sopenharmony_ci GATE(CLK_UART1, "uart1", "aclk66", GATE_IP_PERIC, 1, 0, 0), 20262306a36Sopenharmony_ci GATE(CLK_UART2, "uart2", "aclk66", GATE_IP_PERIC, 2, 0, 0), 20362306a36Sopenharmony_ci GATE(CLK_UART3, "uart3", "aclk66", GATE_IP_PERIC, 3, 0, 0), 20462306a36Sopenharmony_ci GATE(CLK_I2C0, "i2c0", "aclk66", GATE_IP_PERIC, 6, 0, 0), 20562306a36Sopenharmony_ci GATE(CLK_I2C1, "i2c1", "aclk66", GATE_IP_PERIC, 7, 0, 0), 20662306a36Sopenharmony_ci GATE(CLK_I2C2, "i2c2", "aclk66", GATE_IP_PERIC, 8, 0, 0), 20762306a36Sopenharmony_ci GATE(CLK_I2C3, "i2c3", "aclk66", GATE_IP_PERIC, 9, 0, 0), 20862306a36Sopenharmony_ci GATE(CLK_USI0, "usi0", "aclk66", GATE_IP_PERIC, 10, 0, 0), 20962306a36Sopenharmony_ci GATE(CLK_USI1, "usi1", "aclk66", GATE_IP_PERIC, 11, 0, 0), 21062306a36Sopenharmony_ci GATE(CLK_USI2, "usi2", "aclk66", GATE_IP_PERIC, 12, 0, 0), 21162306a36Sopenharmony_ci GATE(CLK_USI3, "usi3", "aclk66", GATE_IP_PERIC, 13, 0, 0), 21262306a36Sopenharmony_ci GATE(CLK_TSADC, "tsadc", "aclk66", GATE_IP_PERIC, 15, 0, 0), 21362306a36Sopenharmony_ci GATE(CLK_PWM, "pwm", "aclk66", GATE_IP_PERIC, 24, 0, 0), 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci GATE(CLK_SCLK_UART0, "sclk_uart0", "div_uart0", 21662306a36Sopenharmony_ci SRC_MASK_PERIC0, 0, CLK_SET_RATE_PARENT, 0), 21762306a36Sopenharmony_ci GATE(CLK_SCLK_UART1, "sclk_uart1", "div_uart1", 21862306a36Sopenharmony_ci SRC_MASK_PERIC0, 4, CLK_SET_RATE_PARENT, 0), 21962306a36Sopenharmony_ci GATE(CLK_SCLK_UART2, "sclk_uart2", "div_uart2", 22062306a36Sopenharmony_ci SRC_MASK_PERIC0, 8, CLK_SET_RATE_PARENT, 0), 22162306a36Sopenharmony_ci GATE(CLK_SCLK_UART3, "sclk_uart3", "div_uart3", 22262306a36Sopenharmony_ci SRC_MASK_PERIC0, 12, CLK_SET_RATE_PARENT, 0), 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci GATE(CLK_USBH20, "usbh20", "aclk200_fsys", GATE_IP_FSYS, 18, 0, 0), 22562306a36Sopenharmony_ci GATE(CLK_USBD300, "usbd300", "aclk200_fsys", GATE_IP_FSYS, 19, 0, 0), 22662306a36Sopenharmony_ci GATE(CLK_USBD301, "usbd301", "aclk200_fsys", GATE_IP_FSYS, 20, 0, 0), 22762306a36Sopenharmony_ci}; 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_cistatic const struct samsung_pll_rate_table exynos5410_pll2550x_24mhz_tbl[] __initconst = { 23062306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 400000000U, 200, 3, 2, 0), 23162306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 333000000U, 111, 2, 2, 0), 23262306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 300000000U, 100, 2, 2, 0), 23362306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 266000000U, 266, 3, 3, 0), 23462306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 200000000U, 200, 3, 3, 0), 23562306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 192000000U, 192, 3, 3, 0), 23662306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 166000000U, 166, 3, 3, 0), 23762306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 133000000U, 266, 3, 4, 0), 23862306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 100000000U, 200, 3, 4, 0), 23962306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 66000000U, 176, 2, 5, 0), 24062306a36Sopenharmony_ci}; 24162306a36Sopenharmony_ci 24262306a36Sopenharmony_cistatic struct samsung_pll_clock exynos5410_plls[nr_plls] __initdata = { 24362306a36Sopenharmony_ci [apll] = PLL(pll_35xx, CLK_FOUT_APLL, "fout_apll", "fin_pll", APLL_LOCK, 24462306a36Sopenharmony_ci APLL_CON0, NULL), 24562306a36Sopenharmony_ci [cpll] = PLL(pll_35xx, CLK_FOUT_CPLL, "fout_cpll", "fin_pll", CPLL_LOCK, 24662306a36Sopenharmony_ci CPLL_CON0, NULL), 24762306a36Sopenharmony_ci [epll] = PLL(pll_2650x, CLK_FOUT_EPLL, "fout_epll", "fin_pll", EPLL_LOCK, 24862306a36Sopenharmony_ci EPLL_CON0, NULL), 24962306a36Sopenharmony_ci [mpll] = PLL(pll_35xx, CLK_FOUT_MPLL, "fout_mpll", "fin_pll", MPLL_LOCK, 25062306a36Sopenharmony_ci MPLL_CON0, NULL), 25162306a36Sopenharmony_ci [bpll] = PLL(pll_35xx, CLK_FOUT_BPLL, "fout_bpll", "fin_pll", BPLL_LOCK, 25262306a36Sopenharmony_ci BPLL_CON0, NULL), 25362306a36Sopenharmony_ci [kpll] = PLL(pll_35xx, CLK_FOUT_KPLL, "fout_kpll", "fin_pll", KPLL_LOCK, 25462306a36Sopenharmony_ci KPLL_CON0, NULL), 25562306a36Sopenharmony_ci}; 25662306a36Sopenharmony_ci 25762306a36Sopenharmony_cistatic const struct samsung_cmu_info cmu __initconst = { 25862306a36Sopenharmony_ci .pll_clks = exynos5410_plls, 25962306a36Sopenharmony_ci .nr_pll_clks = ARRAY_SIZE(exynos5410_plls), 26062306a36Sopenharmony_ci .mux_clks = exynos5410_mux_clks, 26162306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(exynos5410_mux_clks), 26262306a36Sopenharmony_ci .div_clks = exynos5410_div_clks, 26362306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(exynos5410_div_clks), 26462306a36Sopenharmony_ci .gate_clks = exynos5410_gate_clks, 26562306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(exynos5410_gate_clks), 26662306a36Sopenharmony_ci .nr_clk_ids = CLKS_NR, 26762306a36Sopenharmony_ci}; 26862306a36Sopenharmony_ci 26962306a36Sopenharmony_ci/* register exynos5410 clocks */ 27062306a36Sopenharmony_cistatic void __init exynos5410_clk_init(struct device_node *np) 27162306a36Sopenharmony_ci{ 27262306a36Sopenharmony_ci struct clk *xxti = of_clk_get(np, 0); 27362306a36Sopenharmony_ci 27462306a36Sopenharmony_ci if (!IS_ERR(xxti) && clk_get_rate(xxti) == 24 * MHZ) 27562306a36Sopenharmony_ci exynos5410_plls[epll].rate_table = exynos5410_pll2550x_24mhz_tbl; 27662306a36Sopenharmony_ci 27762306a36Sopenharmony_ci samsung_cmu_register_one(np, &cmu); 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci pr_debug("Exynos5410: clock setup completed.\n"); 28062306a36Sopenharmony_ci} 28162306a36Sopenharmony_ciCLK_OF_DECLARE(exynos5410_clk, "samsung,exynos5410-clock", exynos5410_clk_init); 282