18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2013 Samsung Electronics Co., Ltd. 48c2ecf20Sopenharmony_ci * Copyright (c) 2013 Linaro Ltd. 58c2ecf20Sopenharmony_ci * Author: Thomas Abraham <thomas.ab@samsung.com> 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Common Clock Framework support for all Exynos4 SoCs. 88c2ecf20Sopenharmony_ci*/ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <dt-bindings/clock/exynos4.h> 118c2ecf20Sopenharmony_ci#include <linux/slab.h> 128c2ecf20Sopenharmony_ci#include <linux/clk.h> 138c2ecf20Sopenharmony_ci#include <linux/clk-provider.h> 148c2ecf20Sopenharmony_ci#include <linux/io.h> 158c2ecf20Sopenharmony_ci#include <linux/of.h> 168c2ecf20Sopenharmony_ci#include <linux/of_address.h> 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#include "clk.h" 198c2ecf20Sopenharmony_ci#include "clk-cpu.h" 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* Exynos4 clock controller register offsets */ 228c2ecf20Sopenharmony_ci#define SRC_LEFTBUS 0x4200 238c2ecf20Sopenharmony_ci#define DIV_LEFTBUS 0x4500 248c2ecf20Sopenharmony_ci#define GATE_IP_LEFTBUS 0x4800 258c2ecf20Sopenharmony_ci#define E4X12_GATE_IP_IMAGE 0x4930 268c2ecf20Sopenharmony_ci#define CLKOUT_CMU_LEFTBUS 0x4a00 278c2ecf20Sopenharmony_ci#define SRC_RIGHTBUS 0x8200 288c2ecf20Sopenharmony_ci#define DIV_RIGHTBUS 0x8500 298c2ecf20Sopenharmony_ci#define GATE_IP_RIGHTBUS 0x8800 308c2ecf20Sopenharmony_ci#define E4X12_GATE_IP_PERIR 0x8960 318c2ecf20Sopenharmony_ci#define CLKOUT_CMU_RIGHTBUS 0x8a00 328c2ecf20Sopenharmony_ci#define EPLL_LOCK 0xc010 338c2ecf20Sopenharmony_ci#define VPLL_LOCK 0xc020 348c2ecf20Sopenharmony_ci#define EPLL_CON0 0xc110 358c2ecf20Sopenharmony_ci#define EPLL_CON1 0xc114 368c2ecf20Sopenharmony_ci#define EPLL_CON2 0xc118 378c2ecf20Sopenharmony_ci#define VPLL_CON0 0xc120 388c2ecf20Sopenharmony_ci#define VPLL_CON1 0xc124 398c2ecf20Sopenharmony_ci#define VPLL_CON2 0xc128 408c2ecf20Sopenharmony_ci#define SRC_TOP0 0xc210 418c2ecf20Sopenharmony_ci#define SRC_TOP1 0xc214 428c2ecf20Sopenharmony_ci#define SRC_CAM 0xc220 438c2ecf20Sopenharmony_ci#define SRC_TV 0xc224 448c2ecf20Sopenharmony_ci#define SRC_MFC 0xc228 458c2ecf20Sopenharmony_ci#define SRC_G3D 0xc22c 468c2ecf20Sopenharmony_ci#define E4210_SRC_IMAGE 0xc230 478c2ecf20Sopenharmony_ci#define SRC_LCD0 0xc234 488c2ecf20Sopenharmony_ci#define E4210_SRC_LCD1 0xc238 498c2ecf20Sopenharmony_ci#define E4X12_SRC_ISP 0xc238 508c2ecf20Sopenharmony_ci#define SRC_MAUDIO 0xc23c 518c2ecf20Sopenharmony_ci#define SRC_FSYS 0xc240 528c2ecf20Sopenharmony_ci#define SRC_PERIL0 0xc250 538c2ecf20Sopenharmony_ci#define SRC_PERIL1 0xc254 548c2ecf20Sopenharmony_ci#define E4X12_SRC_CAM1 0xc258 558c2ecf20Sopenharmony_ci#define SRC_MASK_TOP 0xc310 568c2ecf20Sopenharmony_ci#define SRC_MASK_CAM 0xc320 578c2ecf20Sopenharmony_ci#define SRC_MASK_TV 0xc324 588c2ecf20Sopenharmony_ci#define SRC_MASK_LCD0 0xc334 598c2ecf20Sopenharmony_ci#define E4210_SRC_MASK_LCD1 0xc338 608c2ecf20Sopenharmony_ci#define E4X12_SRC_MASK_ISP 0xc338 618c2ecf20Sopenharmony_ci#define SRC_MASK_MAUDIO 0xc33c 628c2ecf20Sopenharmony_ci#define SRC_MASK_FSYS 0xc340 638c2ecf20Sopenharmony_ci#define SRC_MASK_PERIL0 0xc350 648c2ecf20Sopenharmony_ci#define SRC_MASK_PERIL1 0xc354 658c2ecf20Sopenharmony_ci#define DIV_TOP 0xc510 668c2ecf20Sopenharmony_ci#define DIV_CAM 0xc520 678c2ecf20Sopenharmony_ci#define DIV_TV 0xc524 688c2ecf20Sopenharmony_ci#define DIV_MFC 0xc528 698c2ecf20Sopenharmony_ci#define DIV_G3D 0xc52c 708c2ecf20Sopenharmony_ci#define DIV_IMAGE 0xc530 718c2ecf20Sopenharmony_ci#define DIV_LCD0 0xc534 728c2ecf20Sopenharmony_ci#define E4210_DIV_LCD1 0xc538 738c2ecf20Sopenharmony_ci#define E4X12_DIV_ISP 0xc538 748c2ecf20Sopenharmony_ci#define DIV_MAUDIO 0xc53c 758c2ecf20Sopenharmony_ci#define DIV_FSYS0 0xc540 768c2ecf20Sopenharmony_ci#define DIV_FSYS1 0xc544 778c2ecf20Sopenharmony_ci#define DIV_FSYS2 0xc548 788c2ecf20Sopenharmony_ci#define DIV_FSYS3 0xc54c 798c2ecf20Sopenharmony_ci#define DIV_PERIL0 0xc550 808c2ecf20Sopenharmony_ci#define DIV_PERIL1 0xc554 818c2ecf20Sopenharmony_ci#define DIV_PERIL2 0xc558 828c2ecf20Sopenharmony_ci#define DIV_PERIL3 0xc55c 838c2ecf20Sopenharmony_ci#define DIV_PERIL4 0xc560 848c2ecf20Sopenharmony_ci#define DIV_PERIL5 0xc564 858c2ecf20Sopenharmony_ci#define E4X12_DIV_CAM1 0xc568 868c2ecf20Sopenharmony_ci#define E4X12_GATE_BUS_FSYS1 0xc744 878c2ecf20Sopenharmony_ci#define GATE_SCLK_CAM 0xc820 888c2ecf20Sopenharmony_ci#define GATE_IP_CAM 0xc920 898c2ecf20Sopenharmony_ci#define GATE_IP_TV 0xc924 908c2ecf20Sopenharmony_ci#define GATE_IP_MFC 0xc928 918c2ecf20Sopenharmony_ci#define GATE_IP_G3D 0xc92c 928c2ecf20Sopenharmony_ci#define E4210_GATE_IP_IMAGE 0xc930 938c2ecf20Sopenharmony_ci#define GATE_IP_LCD0 0xc934 948c2ecf20Sopenharmony_ci#define E4210_GATE_IP_LCD1 0xc938 958c2ecf20Sopenharmony_ci#define E4X12_GATE_IP_ISP 0xc938 968c2ecf20Sopenharmony_ci#define E4X12_GATE_IP_MAUDIO 0xc93c 978c2ecf20Sopenharmony_ci#define GATE_IP_FSYS 0xc940 988c2ecf20Sopenharmony_ci#define GATE_IP_GPS 0xc94c 998c2ecf20Sopenharmony_ci#define GATE_IP_PERIL 0xc950 1008c2ecf20Sopenharmony_ci#define E4210_GATE_IP_PERIR 0xc960 1018c2ecf20Sopenharmony_ci#define GATE_BLOCK 0xc970 1028c2ecf20Sopenharmony_ci#define CLKOUT_CMU_TOP 0xca00 1038c2ecf20Sopenharmony_ci#define E4X12_MPLL_LOCK 0x10008 1048c2ecf20Sopenharmony_ci#define E4X12_MPLL_CON0 0x10108 1058c2ecf20Sopenharmony_ci#define SRC_DMC 0x10200 1068c2ecf20Sopenharmony_ci#define SRC_MASK_DMC 0x10300 1078c2ecf20Sopenharmony_ci#define DIV_DMC0 0x10500 1088c2ecf20Sopenharmony_ci#define DIV_DMC1 0x10504 1098c2ecf20Sopenharmony_ci#define GATE_IP_DMC 0x10900 1108c2ecf20Sopenharmony_ci#define CLKOUT_CMU_DMC 0x10a00 1118c2ecf20Sopenharmony_ci#define APLL_LOCK 0x14000 1128c2ecf20Sopenharmony_ci#define E4210_MPLL_LOCK 0x14008 1138c2ecf20Sopenharmony_ci#define APLL_CON0 0x14100 1148c2ecf20Sopenharmony_ci#define E4210_MPLL_CON0 0x14108 1158c2ecf20Sopenharmony_ci#define SRC_CPU 0x14200 1168c2ecf20Sopenharmony_ci#define DIV_CPU0 0x14500 1178c2ecf20Sopenharmony_ci#define DIV_CPU1 0x14504 1188c2ecf20Sopenharmony_ci#define GATE_SCLK_CPU 0x14800 1198c2ecf20Sopenharmony_ci#define GATE_IP_CPU 0x14900 1208c2ecf20Sopenharmony_ci#define CLKOUT_CMU_CPU 0x14a00 1218c2ecf20Sopenharmony_ci#define PWR_CTRL1 0x15020 1228c2ecf20Sopenharmony_ci#define E4X12_PWR_CTRL2 0x15024 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci/* Below definitions are used for PWR_CTRL settings */ 1258c2ecf20Sopenharmony_ci#define PWR_CTRL1_CORE2_DOWN_RATIO(x) (((x) & 0x7) << 28) 1268c2ecf20Sopenharmony_ci#define PWR_CTRL1_CORE1_DOWN_RATIO(x) (((x) & 0x7) << 16) 1278c2ecf20Sopenharmony_ci#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9) 1288c2ecf20Sopenharmony_ci#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8) 1298c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE3_WFE (1 << 7) 1308c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE2_WFE (1 << 6) 1318c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE1_WFE (1 << 5) 1328c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE0_WFE (1 << 4) 1338c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE3_WFI (1 << 3) 1348c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE2_WFI (1 << 2) 1358c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE1_WFI (1 << 1) 1368c2ecf20Sopenharmony_ci#define PWR_CTRL1_USE_CORE0_WFI (1 << 0) 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci/* the exynos4 soc type */ 1398c2ecf20Sopenharmony_cienum exynos4_soc { 1408c2ecf20Sopenharmony_ci EXYNOS4210, 1418c2ecf20Sopenharmony_ci EXYNOS4X12, 1428c2ecf20Sopenharmony_ci}; 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci/* list of PLLs to be registered */ 1458c2ecf20Sopenharmony_cienum exynos4_plls { 1468c2ecf20Sopenharmony_ci apll, mpll, epll, vpll, 1478c2ecf20Sopenharmony_ci nr_plls /* number of PLLs */ 1488c2ecf20Sopenharmony_ci}; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_cistatic void __iomem *reg_base; 1518c2ecf20Sopenharmony_cistatic enum exynos4_soc exynos4_soc; 1528c2ecf20Sopenharmony_ci 1538c2ecf20Sopenharmony_ci/* 1548c2ecf20Sopenharmony_ci * list of controller registers to be saved and restored during a 1558c2ecf20Sopenharmony_ci * suspend/resume cycle. 1568c2ecf20Sopenharmony_ci */ 1578c2ecf20Sopenharmony_cistatic const unsigned long exynos4210_clk_save[] __initconst = { 1588c2ecf20Sopenharmony_ci E4210_SRC_IMAGE, 1598c2ecf20Sopenharmony_ci E4210_SRC_LCD1, 1608c2ecf20Sopenharmony_ci E4210_SRC_MASK_LCD1, 1618c2ecf20Sopenharmony_ci E4210_DIV_LCD1, 1628c2ecf20Sopenharmony_ci E4210_GATE_IP_IMAGE, 1638c2ecf20Sopenharmony_ci E4210_GATE_IP_LCD1, 1648c2ecf20Sopenharmony_ci E4210_GATE_IP_PERIR, 1658c2ecf20Sopenharmony_ci E4210_MPLL_CON0, 1668c2ecf20Sopenharmony_ci PWR_CTRL1, 1678c2ecf20Sopenharmony_ci}; 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_cistatic const unsigned long exynos4x12_clk_save[] __initconst = { 1708c2ecf20Sopenharmony_ci E4X12_GATE_IP_IMAGE, 1718c2ecf20Sopenharmony_ci E4X12_GATE_IP_PERIR, 1728c2ecf20Sopenharmony_ci E4X12_SRC_CAM1, 1738c2ecf20Sopenharmony_ci E4X12_DIV_ISP, 1748c2ecf20Sopenharmony_ci E4X12_DIV_CAM1, 1758c2ecf20Sopenharmony_ci E4X12_MPLL_CON0, 1768c2ecf20Sopenharmony_ci PWR_CTRL1, 1778c2ecf20Sopenharmony_ci E4X12_PWR_CTRL2, 1788c2ecf20Sopenharmony_ci}; 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_cistatic const unsigned long exynos4_clk_regs[] __initconst = { 1818c2ecf20Sopenharmony_ci EPLL_LOCK, 1828c2ecf20Sopenharmony_ci VPLL_LOCK, 1838c2ecf20Sopenharmony_ci EPLL_CON0, 1848c2ecf20Sopenharmony_ci EPLL_CON1, 1858c2ecf20Sopenharmony_ci EPLL_CON2, 1868c2ecf20Sopenharmony_ci VPLL_CON0, 1878c2ecf20Sopenharmony_ci VPLL_CON1, 1888c2ecf20Sopenharmony_ci VPLL_CON2, 1898c2ecf20Sopenharmony_ci SRC_LEFTBUS, 1908c2ecf20Sopenharmony_ci DIV_LEFTBUS, 1918c2ecf20Sopenharmony_ci GATE_IP_LEFTBUS, 1928c2ecf20Sopenharmony_ci SRC_RIGHTBUS, 1938c2ecf20Sopenharmony_ci DIV_RIGHTBUS, 1948c2ecf20Sopenharmony_ci GATE_IP_RIGHTBUS, 1958c2ecf20Sopenharmony_ci SRC_TOP0, 1968c2ecf20Sopenharmony_ci SRC_TOP1, 1978c2ecf20Sopenharmony_ci SRC_CAM, 1988c2ecf20Sopenharmony_ci SRC_TV, 1998c2ecf20Sopenharmony_ci SRC_MFC, 2008c2ecf20Sopenharmony_ci SRC_G3D, 2018c2ecf20Sopenharmony_ci SRC_LCD0, 2028c2ecf20Sopenharmony_ci SRC_MAUDIO, 2038c2ecf20Sopenharmony_ci SRC_FSYS, 2048c2ecf20Sopenharmony_ci SRC_PERIL0, 2058c2ecf20Sopenharmony_ci SRC_PERIL1, 2068c2ecf20Sopenharmony_ci SRC_MASK_TOP, 2078c2ecf20Sopenharmony_ci SRC_MASK_CAM, 2088c2ecf20Sopenharmony_ci SRC_MASK_TV, 2098c2ecf20Sopenharmony_ci SRC_MASK_LCD0, 2108c2ecf20Sopenharmony_ci SRC_MASK_MAUDIO, 2118c2ecf20Sopenharmony_ci SRC_MASK_FSYS, 2128c2ecf20Sopenharmony_ci SRC_MASK_PERIL0, 2138c2ecf20Sopenharmony_ci SRC_MASK_PERIL1, 2148c2ecf20Sopenharmony_ci DIV_TOP, 2158c2ecf20Sopenharmony_ci DIV_CAM, 2168c2ecf20Sopenharmony_ci DIV_TV, 2178c2ecf20Sopenharmony_ci DIV_MFC, 2188c2ecf20Sopenharmony_ci DIV_G3D, 2198c2ecf20Sopenharmony_ci DIV_IMAGE, 2208c2ecf20Sopenharmony_ci DIV_LCD0, 2218c2ecf20Sopenharmony_ci DIV_MAUDIO, 2228c2ecf20Sopenharmony_ci DIV_FSYS0, 2238c2ecf20Sopenharmony_ci DIV_FSYS1, 2248c2ecf20Sopenharmony_ci DIV_FSYS2, 2258c2ecf20Sopenharmony_ci DIV_FSYS3, 2268c2ecf20Sopenharmony_ci DIV_PERIL0, 2278c2ecf20Sopenharmony_ci DIV_PERIL1, 2288c2ecf20Sopenharmony_ci DIV_PERIL2, 2298c2ecf20Sopenharmony_ci DIV_PERIL3, 2308c2ecf20Sopenharmony_ci DIV_PERIL4, 2318c2ecf20Sopenharmony_ci DIV_PERIL5, 2328c2ecf20Sopenharmony_ci GATE_SCLK_CAM, 2338c2ecf20Sopenharmony_ci GATE_IP_CAM, 2348c2ecf20Sopenharmony_ci GATE_IP_TV, 2358c2ecf20Sopenharmony_ci GATE_IP_MFC, 2368c2ecf20Sopenharmony_ci GATE_IP_G3D, 2378c2ecf20Sopenharmony_ci GATE_IP_LCD0, 2388c2ecf20Sopenharmony_ci GATE_IP_FSYS, 2398c2ecf20Sopenharmony_ci GATE_IP_GPS, 2408c2ecf20Sopenharmony_ci GATE_IP_PERIL, 2418c2ecf20Sopenharmony_ci GATE_BLOCK, 2428c2ecf20Sopenharmony_ci SRC_MASK_DMC, 2438c2ecf20Sopenharmony_ci SRC_DMC, 2448c2ecf20Sopenharmony_ci DIV_DMC0, 2458c2ecf20Sopenharmony_ci DIV_DMC1, 2468c2ecf20Sopenharmony_ci GATE_IP_DMC, 2478c2ecf20Sopenharmony_ci APLL_CON0, 2488c2ecf20Sopenharmony_ci SRC_CPU, 2498c2ecf20Sopenharmony_ci DIV_CPU0, 2508c2ecf20Sopenharmony_ci DIV_CPU1, 2518c2ecf20Sopenharmony_ci GATE_SCLK_CPU, 2528c2ecf20Sopenharmony_ci GATE_IP_CPU, 2538c2ecf20Sopenharmony_ci CLKOUT_CMU_LEFTBUS, 2548c2ecf20Sopenharmony_ci CLKOUT_CMU_RIGHTBUS, 2558c2ecf20Sopenharmony_ci CLKOUT_CMU_TOP, 2568c2ecf20Sopenharmony_ci CLKOUT_CMU_DMC, 2578c2ecf20Sopenharmony_ci CLKOUT_CMU_CPU, 2588c2ecf20Sopenharmony_ci}; 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_cistatic const struct samsung_clk_reg_dump src_mask_suspend[] = { 2618c2ecf20Sopenharmony_ci { .offset = VPLL_CON0, .value = 0x80600302, }, 2628c2ecf20Sopenharmony_ci { .offset = EPLL_CON0, .value = 0x806F0302, }, 2638c2ecf20Sopenharmony_ci { .offset = SRC_MASK_TOP, .value = 0x00000001, }, 2648c2ecf20Sopenharmony_ci { .offset = SRC_MASK_CAM, .value = 0x11111111, }, 2658c2ecf20Sopenharmony_ci { .offset = SRC_MASK_TV, .value = 0x00000111, }, 2668c2ecf20Sopenharmony_ci { .offset = SRC_MASK_LCD0, .value = 0x00001111, }, 2678c2ecf20Sopenharmony_ci { .offset = SRC_MASK_MAUDIO, .value = 0x00000001, }, 2688c2ecf20Sopenharmony_ci { .offset = SRC_MASK_FSYS, .value = 0x01011111, }, 2698c2ecf20Sopenharmony_ci { .offset = SRC_MASK_PERIL0, .value = 0x01111111, }, 2708c2ecf20Sopenharmony_ci { .offset = SRC_MASK_PERIL1, .value = 0x01110111, }, 2718c2ecf20Sopenharmony_ci { .offset = SRC_MASK_DMC, .value = 0x00010000, }, 2728c2ecf20Sopenharmony_ci}; 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_cistatic const struct samsung_clk_reg_dump src_mask_suspend_e4210[] = { 2758c2ecf20Sopenharmony_ci { .offset = E4210_SRC_MASK_LCD1, .value = 0x00001111, }, 2768c2ecf20Sopenharmony_ci}; 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci/* list of all parent clock list */ 2798c2ecf20Sopenharmony_ciPNAME(mout_apll_p) = { "fin_pll", "fout_apll", }; 2808c2ecf20Sopenharmony_ciPNAME(mout_mpll_p) = { "fin_pll", "fout_mpll", }; 2818c2ecf20Sopenharmony_ciPNAME(mout_epll_p) = { "fin_pll", "fout_epll", }; 2828c2ecf20Sopenharmony_ciPNAME(mout_vpllsrc_p) = { "fin_pll", "sclk_hdmi24m", }; 2838c2ecf20Sopenharmony_ciPNAME(mout_vpll_p) = { "fin_pll", "fout_vpll", }; 2848c2ecf20Sopenharmony_ciPNAME(sclk_evpll_p) = { "sclk_epll", "sclk_vpll", }; 2858c2ecf20Sopenharmony_ciPNAME(mout_mfc_p) = { "mout_mfc0", "mout_mfc1", }; 2868c2ecf20Sopenharmony_ciPNAME(mout_g3d_p) = { "mout_g3d0", "mout_g3d1", }; 2878c2ecf20Sopenharmony_ciPNAME(mout_g2d_p) = { "mout_g2d0", "mout_g2d1", }; 2888c2ecf20Sopenharmony_ciPNAME(mout_hdmi_p) = { "sclk_pixel", "sclk_hdmiphy", }; 2898c2ecf20Sopenharmony_ciPNAME(mout_jpeg_p) = { "mout_jpeg0", "mout_jpeg1", }; 2908c2ecf20Sopenharmony_ciPNAME(mout_spdif_p) = { "sclk_audio0", "sclk_audio1", "sclk_audio2", 2918c2ecf20Sopenharmony_ci "spdif_extclk", }; 2928c2ecf20Sopenharmony_ciPNAME(mout_onenand_p) = {"aclk133", "aclk160", }; 2938c2ecf20Sopenharmony_ciPNAME(mout_onenand1_p) = {"mout_onenand", "sclk_vpll", }; 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci/* Exynos 4210-specific parent groups */ 2968c2ecf20Sopenharmony_ciPNAME(sclk_vpll_p4210) = { "mout_vpllsrc", "fout_vpll", }; 2978c2ecf20Sopenharmony_ciPNAME(mout_core_p4210) = { "mout_apll", "sclk_mpll", }; 2988c2ecf20Sopenharmony_ciPNAME(sclk_ampll_p4210) = { "sclk_mpll", "sclk_apll", }; 2998c2ecf20Sopenharmony_ciPNAME(group1_p4210) = { "xxti", "xusbxti", "sclk_hdmi24m", 3008c2ecf20Sopenharmony_ci "sclk_usbphy0", "none", "sclk_hdmiphy", 3018c2ecf20Sopenharmony_ci "sclk_mpll", "sclk_epll", "sclk_vpll", }; 3028c2ecf20Sopenharmony_ciPNAME(mout_audio0_p4210) = { "cdclk0", "none", "sclk_hdmi24m", 3038c2ecf20Sopenharmony_ci "sclk_usbphy0", "xxti", "xusbxti", "sclk_mpll", 3048c2ecf20Sopenharmony_ci "sclk_epll", "sclk_vpll" }; 3058c2ecf20Sopenharmony_ciPNAME(mout_audio1_p4210) = { "cdclk1", "none", "sclk_hdmi24m", 3068c2ecf20Sopenharmony_ci "sclk_usbphy0", "xxti", "xusbxti", "sclk_mpll", 3078c2ecf20Sopenharmony_ci "sclk_epll", "sclk_vpll", }; 3088c2ecf20Sopenharmony_ciPNAME(mout_audio2_p4210) = { "cdclk2", "none", "sclk_hdmi24m", 3098c2ecf20Sopenharmony_ci "sclk_usbphy0", "xxti", "xusbxti", "sclk_mpll", 3108c2ecf20Sopenharmony_ci "sclk_epll", "sclk_vpll", }; 3118c2ecf20Sopenharmony_ciPNAME(mout_mixer_p4210) = { "sclk_dac", "sclk_hdmi", }; 3128c2ecf20Sopenharmony_ciPNAME(mout_dac_p4210) = { "sclk_vpll", "sclk_hdmiphy", }; 3138c2ecf20Sopenharmony_ciPNAME(mout_pwi_p4210) = { "xxti", "xusbxti", "sclk_hdmi24m", "sclk_usbphy0", 3148c2ecf20Sopenharmony_ci "sclk_usbphy1", "sclk_hdmiphy", "none", 3158c2ecf20Sopenharmony_ci "sclk_epll", "sclk_vpll" }; 3168c2ecf20Sopenharmony_ciPNAME(clkout_left_p4210) = { "sclk_mpll_div_2", "sclk_apll_div_2", 3178c2ecf20Sopenharmony_ci "div_gdl", "div_gpl" }; 3188c2ecf20Sopenharmony_ciPNAME(clkout_right_p4210) = { "sclk_mpll_div_2", "sclk_apll_div_2", 3198c2ecf20Sopenharmony_ci "div_gdr", "div_gpr" }; 3208c2ecf20Sopenharmony_ciPNAME(clkout_top_p4210) = { "fout_epll", "fout_vpll", "sclk_hdmi24m", 3218c2ecf20Sopenharmony_ci "sclk_usbphy0", "sclk_usbphy1", "sclk_hdmiphy", 3228c2ecf20Sopenharmony_ci "cdclk0", "cdclk1", "cdclk2", "spdif_extclk", 3238c2ecf20Sopenharmony_ci "aclk160", "aclk133", "aclk200", "aclk100", 3248c2ecf20Sopenharmony_ci "sclk_mfc", "sclk_g3d", "sclk_g2d", 3258c2ecf20Sopenharmony_ci "cam_a_pclk", "cam_b_pclk", "s_rxbyteclkhs0_2l", 3268c2ecf20Sopenharmony_ci "s_rxbyteclkhs0_4l" }; 3278c2ecf20Sopenharmony_ciPNAME(clkout_dmc_p4210) = { "div_dmcd", "div_dmcp", "div_acp_pclk", "div_dmc", 3288c2ecf20Sopenharmony_ci "div_dphy", "none", "div_pwi" }; 3298c2ecf20Sopenharmony_ciPNAME(clkout_cpu_p4210) = { "fout_apll_div_2", "none", "fout_mpll_div_2", 3308c2ecf20Sopenharmony_ci "none", "arm_clk_div_2", "div_corem0", 3318c2ecf20Sopenharmony_ci "div_corem1", "div_corem0", "div_atb", 3328c2ecf20Sopenharmony_ci "div_periph", "div_pclk_dbg", "div_hpm" }; 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci/* Exynos 4x12-specific parent groups */ 3358c2ecf20Sopenharmony_ciPNAME(mout_mpll_user_p4x12) = { "fin_pll", "sclk_mpll", }; 3368c2ecf20Sopenharmony_ciPNAME(mout_core_p4x12) = { "mout_apll", "mout_mpll_user_c", }; 3378c2ecf20Sopenharmony_ciPNAME(mout_gdl_p4x12) = { "mout_mpll_user_l", "sclk_apll", }; 3388c2ecf20Sopenharmony_ciPNAME(mout_gdr_p4x12) = { "mout_mpll_user_r", "sclk_apll", }; 3398c2ecf20Sopenharmony_ciPNAME(sclk_ampll_p4x12) = { "mout_mpll_user_t", "sclk_apll", }; 3408c2ecf20Sopenharmony_ciPNAME(group1_p4x12) = { "xxti", "xusbxti", "sclk_hdmi24m", "sclk_usbphy0", 3418c2ecf20Sopenharmony_ci "none", "sclk_hdmiphy", "mout_mpll_user_t", 3428c2ecf20Sopenharmony_ci "sclk_epll", "sclk_vpll", }; 3438c2ecf20Sopenharmony_ciPNAME(mout_audio0_p4x12) = { "cdclk0", "none", "sclk_hdmi24m", 3448c2ecf20Sopenharmony_ci "sclk_usbphy0", "xxti", "xusbxti", 3458c2ecf20Sopenharmony_ci "mout_mpll_user_t", "sclk_epll", "sclk_vpll" }; 3468c2ecf20Sopenharmony_ciPNAME(mout_audio1_p4x12) = { "cdclk1", "none", "sclk_hdmi24m", 3478c2ecf20Sopenharmony_ci "sclk_usbphy0", "xxti", "xusbxti", 3488c2ecf20Sopenharmony_ci "mout_mpll_user_t", "sclk_epll", "sclk_vpll", }; 3498c2ecf20Sopenharmony_ciPNAME(mout_audio2_p4x12) = { "cdclk2", "none", "sclk_hdmi24m", 3508c2ecf20Sopenharmony_ci "sclk_usbphy0", "xxti", "xusbxti", 3518c2ecf20Sopenharmony_ci "mout_mpll_user_t", "sclk_epll", "sclk_vpll", }; 3528c2ecf20Sopenharmony_ciPNAME(aclk_p4412) = { "mout_mpll_user_t", "sclk_apll", }; 3538c2ecf20Sopenharmony_ciPNAME(mout_user_aclk400_mcuisp_p4x12) = {"fin_pll", "div_aclk400_mcuisp", }; 3548c2ecf20Sopenharmony_ciPNAME(mout_user_aclk200_p4x12) = {"fin_pll", "div_aclk200", }; 3558c2ecf20Sopenharmony_ciPNAME(mout_user_aclk266_gps_p4x12) = {"fin_pll", "div_aclk266_gps", }; 3568c2ecf20Sopenharmony_ciPNAME(mout_pwi_p4x12) = { "xxti", "xusbxti", "sclk_hdmi24m", "sclk_usbphy0", 3578c2ecf20Sopenharmony_ci "none", "sclk_hdmiphy", "sclk_mpll", 3588c2ecf20Sopenharmony_ci "sclk_epll", "sclk_vpll" }; 3598c2ecf20Sopenharmony_ciPNAME(clkout_left_p4x12) = { "sclk_mpll_user_l_div_2", "sclk_apll_div_2", 3608c2ecf20Sopenharmony_ci "div_gdl", "div_gpl" }; 3618c2ecf20Sopenharmony_ciPNAME(clkout_right_p4x12) = { "sclk_mpll_user_r_div_2", "sclk_apll_div_2", 3628c2ecf20Sopenharmony_ci "div_gdr", "div_gpr" }; 3638c2ecf20Sopenharmony_ciPNAME(clkout_top_p4x12) = { "fout_epll", "fout_vpll", "sclk_hdmi24m", 3648c2ecf20Sopenharmony_ci "sclk_usbphy0", "none", "sclk_hdmiphy", 3658c2ecf20Sopenharmony_ci "cdclk0", "cdclk1", "cdclk2", "spdif_extclk", 3668c2ecf20Sopenharmony_ci "aclk160", "aclk133", "aclk200", "aclk100", 3678c2ecf20Sopenharmony_ci "sclk_mfc", "sclk_g3d", "aclk400_mcuisp", 3688c2ecf20Sopenharmony_ci "cam_a_pclk", "cam_b_pclk", "s_rxbyteclkhs0_2l", 3698c2ecf20Sopenharmony_ci "s_rxbyteclkhs0_4l", "rx_half_byte_clk_csis0", 3708c2ecf20Sopenharmony_ci "rx_half_byte_clk_csis1", "div_jpeg", 3718c2ecf20Sopenharmony_ci "sclk_pwm_isp", "sclk_spi0_isp", 3728c2ecf20Sopenharmony_ci "sclk_spi1_isp", "sclk_uart_isp", 3738c2ecf20Sopenharmony_ci "sclk_mipihsi", "sclk_hdmi", "sclk_fimd0", 3748c2ecf20Sopenharmony_ci "sclk_pcm0" }; 3758c2ecf20Sopenharmony_ciPNAME(clkout_dmc_p4x12) = { "div_dmcd", "div_dmcp", "aclk_acp", "div_acp_pclk", 3768c2ecf20Sopenharmony_ci "div_dmc", "div_dphy", "fout_mpll_div_2", 3778c2ecf20Sopenharmony_ci "div_pwi", "none", "div_c2c", "div_c2c_aclk" }; 3788c2ecf20Sopenharmony_ciPNAME(clkout_cpu_p4x12) = { "fout_apll_div_2", "none", "none", "none", 3798c2ecf20Sopenharmony_ci "arm_clk_div_2", "div_corem0", "div_corem1", 3808c2ecf20Sopenharmony_ci "div_cores", "div_atb", "div_periph", 3818c2ecf20Sopenharmony_ci "div_pclk_dbg", "div_hpm" }; 3828c2ecf20Sopenharmony_ci 3838c2ecf20Sopenharmony_ci/* fixed rate clocks generated outside the soc */ 3848c2ecf20Sopenharmony_cistatic struct samsung_fixed_rate_clock exynos4_fixed_rate_ext_clks[] __initdata = { 3858c2ecf20Sopenharmony_ci FRATE(CLK_XXTI, "xxti", NULL, 0, 0), 3868c2ecf20Sopenharmony_ci FRATE(CLK_XUSBXTI, "xusbxti", NULL, 0, 0), 3878c2ecf20Sopenharmony_ci}; 3888c2ecf20Sopenharmony_ci 3898c2ecf20Sopenharmony_ci/* fixed rate clocks generated inside the soc */ 3908c2ecf20Sopenharmony_cistatic const struct samsung_fixed_rate_clock exynos4_fixed_rate_clks[] __initconst = { 3918c2ecf20Sopenharmony_ci FRATE(0, "sclk_hdmi24m", NULL, 0, 24000000), 3928c2ecf20Sopenharmony_ci FRATE(CLK_SCLK_HDMIPHY, "sclk_hdmiphy", "hdmi", 0, 27000000), 3938c2ecf20Sopenharmony_ci FRATE(0, "sclk_usbphy0", NULL, 0, 48000000), 3948c2ecf20Sopenharmony_ci}; 3958c2ecf20Sopenharmony_ci 3968c2ecf20Sopenharmony_cistatic const struct samsung_fixed_rate_clock exynos4210_fixed_rate_clks[] __initconst = { 3978c2ecf20Sopenharmony_ci FRATE(0, "sclk_usbphy1", NULL, 0, 48000000), 3988c2ecf20Sopenharmony_ci}; 3998c2ecf20Sopenharmony_ci 4008c2ecf20Sopenharmony_cistatic const struct samsung_fixed_factor_clock exynos4_fixed_factor_clks[] __initconst = { 4018c2ecf20Sopenharmony_ci FFACTOR(0, "sclk_apll_div_2", "sclk_apll", 1, 2, 0), 4028c2ecf20Sopenharmony_ci FFACTOR(0, "fout_mpll_div_2", "fout_mpll", 1, 2, 0), 4038c2ecf20Sopenharmony_ci FFACTOR(0, "fout_apll_div_2", "fout_apll", 1, 2, 0), 4048c2ecf20Sopenharmony_ci FFACTOR(0, "arm_clk_div_2", "div_core2", 1, 2, 0), 4058c2ecf20Sopenharmony_ci}; 4068c2ecf20Sopenharmony_ci 4078c2ecf20Sopenharmony_cistatic const struct samsung_fixed_factor_clock exynos4210_fixed_factor_clks[] __initconst = { 4088c2ecf20Sopenharmony_ci FFACTOR(0, "sclk_mpll_div_2", "sclk_mpll", 1, 2, 0), 4098c2ecf20Sopenharmony_ci}; 4108c2ecf20Sopenharmony_ci 4118c2ecf20Sopenharmony_cistatic const struct samsung_fixed_factor_clock exynos4x12_fixed_factor_clks[] __initconst = { 4128c2ecf20Sopenharmony_ci FFACTOR(0, "sclk_mpll_user_l_div_2", "mout_mpll_user_l", 1, 2, 0), 4138c2ecf20Sopenharmony_ci FFACTOR(0, "sclk_mpll_user_r_div_2", "mout_mpll_user_r", 1, 2, 0), 4148c2ecf20Sopenharmony_ci FFACTOR(0, "sclk_mpll_user_t_div_2", "mout_mpll_user_t", 1, 2, 0), 4158c2ecf20Sopenharmony_ci FFACTOR(0, "sclk_mpll_user_c_div_2", "mout_mpll_user_c", 1, 2, 0), 4168c2ecf20Sopenharmony_ci}; 4178c2ecf20Sopenharmony_ci 4188c2ecf20Sopenharmony_ci/* list of mux clocks supported in all exynos4 soc's */ 4198c2ecf20Sopenharmony_cistatic const struct samsung_mux_clock exynos4_mux_clks[] __initconst = { 4208c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_APLL, "mout_apll", mout_apll_p, SRC_CPU, 0, 1, 4218c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT | CLK_RECALC_NEW_RATES, 0), 4228c2ecf20Sopenharmony_ci MUX(CLK_MOUT_HDMI, "mout_hdmi", mout_hdmi_p, SRC_TV, 0, 1), 4238c2ecf20Sopenharmony_ci MUX(0, "mout_mfc1", sclk_evpll_p, SRC_MFC, 4, 1), 4248c2ecf20Sopenharmony_ci MUX(0, "mout_mfc", mout_mfc_p, SRC_MFC, 8, 1), 4258c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_G3D1, "mout_g3d1", sclk_evpll_p, SRC_G3D, 4, 1, 4268c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 4278c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_G3D, "mout_g3d", mout_g3d_p, SRC_G3D, 8, 1, 4288c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 4298c2ecf20Sopenharmony_ci MUX(0, "mout_spdif", mout_spdif_p, SRC_PERIL1, 8, 2), 4308c2ecf20Sopenharmony_ci MUX(0, "mout_onenand1", mout_onenand1_p, SRC_TOP0, 0, 1), 4318c2ecf20Sopenharmony_ci MUX(CLK_SCLK_EPLL, "sclk_epll", mout_epll_p, SRC_TOP0, 4, 1), 4328c2ecf20Sopenharmony_ci MUX(0, "mout_onenand", mout_onenand_p, SRC_TOP0, 28, 1), 4338c2ecf20Sopenharmony_ci 4348c2ecf20Sopenharmony_ci MUX(0, "mout_dmc_bus", sclk_ampll_p4210, SRC_DMC, 4, 1), 4358c2ecf20Sopenharmony_ci MUX(0, "mout_dphy", sclk_ampll_p4210, SRC_DMC, 8, 1), 4368c2ecf20Sopenharmony_ci}; 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_ci/* list of mux clocks supported in exynos4210 soc */ 4398c2ecf20Sopenharmony_cistatic const struct samsung_mux_clock exynos4210_mux_early[] __initconst = { 4408c2ecf20Sopenharmony_ci MUX(0, "mout_vpllsrc", mout_vpllsrc_p, SRC_TOP1, 0, 1), 4418c2ecf20Sopenharmony_ci}; 4428c2ecf20Sopenharmony_ci 4438c2ecf20Sopenharmony_cistatic const struct samsung_mux_clock exynos4210_mux_clks[] __initconst = { 4448c2ecf20Sopenharmony_ci MUX(0, "mout_gdl", sclk_ampll_p4210, SRC_LEFTBUS, 0, 1), 4458c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_leftbus", clkout_left_p4210, 4468c2ecf20Sopenharmony_ci CLKOUT_CMU_LEFTBUS, 0, 5), 4478c2ecf20Sopenharmony_ci 4488c2ecf20Sopenharmony_ci MUX(0, "mout_gdr", sclk_ampll_p4210, SRC_RIGHTBUS, 0, 1), 4498c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_rightbus", clkout_right_p4210, 4508c2ecf20Sopenharmony_ci CLKOUT_CMU_RIGHTBUS, 0, 5), 4518c2ecf20Sopenharmony_ci 4528c2ecf20Sopenharmony_ci MUX(0, "mout_aclk200", sclk_ampll_p4210, SRC_TOP0, 12, 1), 4538c2ecf20Sopenharmony_ci MUX(0, "mout_aclk100", sclk_ampll_p4210, SRC_TOP0, 16, 1), 4548c2ecf20Sopenharmony_ci MUX(0, "mout_aclk160", sclk_ampll_p4210, SRC_TOP0, 20, 1), 4558c2ecf20Sopenharmony_ci MUX(0, "mout_aclk133", sclk_ampll_p4210, SRC_TOP0, 24, 1), 4568c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MIXER, "mout_mixer", mout_mixer_p4210, SRC_TV, 4, 1), 4578c2ecf20Sopenharmony_ci MUX(0, "mout_dac", mout_dac_p4210, SRC_TV, 8, 1), 4588c2ecf20Sopenharmony_ci MUX(0, "mout_g2d0", sclk_ampll_p4210, E4210_SRC_IMAGE, 0, 1), 4598c2ecf20Sopenharmony_ci MUX(0, "mout_g2d1", sclk_evpll_p, E4210_SRC_IMAGE, 4, 1), 4608c2ecf20Sopenharmony_ci MUX(0, "mout_g2d", mout_g2d_p, E4210_SRC_IMAGE, 8, 1), 4618c2ecf20Sopenharmony_ci MUX(0, "mout_fimd1", group1_p4210, E4210_SRC_LCD1, 0, 4), 4628c2ecf20Sopenharmony_ci MUX(0, "mout_mipi1", group1_p4210, E4210_SRC_LCD1, 12, 4), 4638c2ecf20Sopenharmony_ci MUX(CLK_SCLK_MPLL, "sclk_mpll", mout_mpll_p, SRC_CPU, 8, 1), 4648c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CORE, "mout_core", mout_core_p4210, SRC_CPU, 16, 1), 4658c2ecf20Sopenharmony_ci MUX(0, "mout_hpm", mout_core_p4210, SRC_CPU, 20, 1), 4668c2ecf20Sopenharmony_ci MUX(CLK_SCLK_VPLL, "sclk_vpll", sclk_vpll_p4210, SRC_TOP0, 8, 1), 4678c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC0, "mout_fimc0", group1_p4210, SRC_CAM, 0, 4), 4688c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC1, "mout_fimc1", group1_p4210, SRC_CAM, 4, 4), 4698c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC2, "mout_fimc2", group1_p4210, SRC_CAM, 8, 4), 4708c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC3, "mout_fimc3", group1_p4210, SRC_CAM, 12, 4), 4718c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CAM0, "mout_cam0", group1_p4210, SRC_CAM, 16, 4), 4728c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CAM1, "mout_cam1", group1_p4210, SRC_CAM, 20, 4), 4738c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CSIS0, "mout_csis0", group1_p4210, SRC_CAM, 24, 4), 4748c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CSIS1, "mout_csis1", group1_p4210, SRC_CAM, 28, 4), 4758c2ecf20Sopenharmony_ci MUX(0, "mout_mfc0", sclk_ampll_p4210, SRC_MFC, 0, 1), 4768c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_G3D0, "mout_g3d0", sclk_ampll_p4210, SRC_G3D, 0, 1, 4778c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 4788c2ecf20Sopenharmony_ci MUX(0, "mout_fimd0", group1_p4210, SRC_LCD0, 0, 4), 4798c2ecf20Sopenharmony_ci MUX(0, "mout_mipi0", group1_p4210, SRC_LCD0, 12, 4), 4808c2ecf20Sopenharmony_ci MUX(0, "mout_audio0", mout_audio0_p4210, SRC_MAUDIO, 0, 4), 4818c2ecf20Sopenharmony_ci MUX(0, "mout_mmc0", group1_p4210, SRC_FSYS, 0, 4), 4828c2ecf20Sopenharmony_ci MUX(0, "mout_mmc1", group1_p4210, SRC_FSYS, 4, 4), 4838c2ecf20Sopenharmony_ci MUX(0, "mout_mmc2", group1_p4210, SRC_FSYS, 8, 4), 4848c2ecf20Sopenharmony_ci MUX(0, "mout_mmc3", group1_p4210, SRC_FSYS, 12, 4), 4858c2ecf20Sopenharmony_ci MUX(0, "mout_mmc4", group1_p4210, SRC_FSYS, 16, 4), 4868c2ecf20Sopenharmony_ci MUX(0, "mout_sata", sclk_ampll_p4210, SRC_FSYS, 24, 1), 4878c2ecf20Sopenharmony_ci MUX(0, "mout_uart0", group1_p4210, SRC_PERIL0, 0, 4), 4888c2ecf20Sopenharmony_ci MUX(0, "mout_uart1", group1_p4210, SRC_PERIL0, 4, 4), 4898c2ecf20Sopenharmony_ci MUX(0, "mout_uart2", group1_p4210, SRC_PERIL0, 8, 4), 4908c2ecf20Sopenharmony_ci MUX(0, "mout_uart3", group1_p4210, SRC_PERIL0, 12, 4), 4918c2ecf20Sopenharmony_ci MUX(0, "mout_uart4", group1_p4210, SRC_PERIL0, 16, 4), 4928c2ecf20Sopenharmony_ci MUX(0, "mout_audio1", mout_audio1_p4210, SRC_PERIL1, 0, 4), 4938c2ecf20Sopenharmony_ci MUX(0, "mout_audio2", mout_audio2_p4210, SRC_PERIL1, 4, 4), 4948c2ecf20Sopenharmony_ci MUX(0, "mout_spi0", group1_p4210, SRC_PERIL1, 16, 4), 4958c2ecf20Sopenharmony_ci MUX(0, "mout_spi1", group1_p4210, SRC_PERIL1, 20, 4), 4968c2ecf20Sopenharmony_ci MUX(0, "mout_spi2", group1_p4210, SRC_PERIL1, 24, 4), 4978c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_top", clkout_top_p4210, CLKOUT_CMU_TOP, 0, 5), 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_ci MUX(0, "mout_pwi", mout_pwi_p4210, SRC_DMC, 16, 4), 5008c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_dmc", clkout_dmc_p4210, CLKOUT_CMU_DMC, 0, 5), 5018c2ecf20Sopenharmony_ci 5028c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_cpu", clkout_cpu_p4210, CLKOUT_CMU_CPU, 0, 5), 5038c2ecf20Sopenharmony_ci}; 5048c2ecf20Sopenharmony_ci 5058c2ecf20Sopenharmony_ci/* list of mux clocks supported in exynos4x12 soc */ 5068c2ecf20Sopenharmony_cistatic const struct samsung_mux_clock exynos4x12_mux_clks[] __initconst = { 5078c2ecf20Sopenharmony_ci MUX(0, "mout_mpll_user_l", mout_mpll_p, SRC_LEFTBUS, 4, 1), 5088c2ecf20Sopenharmony_ci MUX(0, "mout_gdl", mout_gdl_p4x12, SRC_LEFTBUS, 0, 1), 5098c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_leftbus", clkout_left_p4x12, 5108c2ecf20Sopenharmony_ci CLKOUT_CMU_LEFTBUS, 0, 5), 5118c2ecf20Sopenharmony_ci 5128c2ecf20Sopenharmony_ci MUX(0, "mout_mpll_user_r", mout_mpll_p, SRC_RIGHTBUS, 4, 1), 5138c2ecf20Sopenharmony_ci MUX(0, "mout_gdr", mout_gdr_p4x12, SRC_RIGHTBUS, 0, 1), 5148c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_rightbus", clkout_right_p4x12, 5158c2ecf20Sopenharmony_ci CLKOUT_CMU_RIGHTBUS, 0, 5), 5168c2ecf20Sopenharmony_ci 5178c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MPLL_USER_C, "mout_mpll_user_c", mout_mpll_user_p4x12, 5188c2ecf20Sopenharmony_ci SRC_CPU, 24, 1), 5198c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_cpu", clkout_cpu_p4x12, CLKOUT_CMU_CPU, 0, 5), 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci MUX(0, "mout_aclk266_gps", aclk_p4412, SRC_TOP1, 4, 1), 5228c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_mcuisp", aclk_p4412, SRC_TOP1, 8, 1), 5238c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MPLL_USER_T, "mout_mpll_user_t", mout_mpll_user_p4x12, 5248c2ecf20Sopenharmony_ci SRC_TOP1, 12, 1), 5258c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk266_gps", mout_user_aclk266_gps_p4x12, 5268c2ecf20Sopenharmony_ci SRC_TOP1, 16, 1), 5278c2ecf20Sopenharmony_ci MUX(CLK_ACLK200, "aclk200", mout_user_aclk200_p4x12, SRC_TOP1, 20, 1), 5288c2ecf20Sopenharmony_ci MUX(CLK_ACLK400_MCUISP, "aclk400_mcuisp", 5298c2ecf20Sopenharmony_ci mout_user_aclk400_mcuisp_p4x12, SRC_TOP1, 24, 1), 5308c2ecf20Sopenharmony_ci MUX(0, "mout_aclk200", aclk_p4412, SRC_TOP0, 12, 1), 5318c2ecf20Sopenharmony_ci MUX(0, "mout_aclk100", aclk_p4412, SRC_TOP0, 16, 1), 5328c2ecf20Sopenharmony_ci MUX(0, "mout_aclk160", aclk_p4412, SRC_TOP0, 20, 1), 5338c2ecf20Sopenharmony_ci MUX(0, "mout_aclk133", aclk_p4412, SRC_TOP0, 24, 1), 5348c2ecf20Sopenharmony_ci MUX(0, "mout_mdnie0", group1_p4x12, SRC_LCD0, 4, 4), 5358c2ecf20Sopenharmony_ci MUX(0, "mout_mdnie_pwm0", group1_p4x12, SRC_LCD0, 8, 4), 5368c2ecf20Sopenharmony_ci MUX(0, "mout_sata", sclk_ampll_p4x12, SRC_FSYS, 24, 1), 5378c2ecf20Sopenharmony_ci MUX(0, "mout_jpeg0", sclk_ampll_p4x12, E4X12_SRC_CAM1, 0, 1), 5388c2ecf20Sopenharmony_ci MUX(0, "mout_jpeg1", sclk_evpll_p, E4X12_SRC_CAM1, 4, 1), 5398c2ecf20Sopenharmony_ci MUX(0, "mout_jpeg", mout_jpeg_p, E4X12_SRC_CAM1, 8, 1), 5408c2ecf20Sopenharmony_ci MUX(CLK_SCLK_MPLL, "sclk_mpll", mout_mpll_p, SRC_DMC, 12, 1), 5418c2ecf20Sopenharmony_ci MUX(CLK_SCLK_VPLL, "sclk_vpll", mout_vpll_p, SRC_TOP0, 8, 1), 5428c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CORE, "mout_core", mout_core_p4x12, SRC_CPU, 16, 1), 5438c2ecf20Sopenharmony_ci MUX(0, "mout_hpm", mout_core_p4x12, SRC_CPU, 20, 1), 5448c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC0, "mout_fimc0", group1_p4x12, SRC_CAM, 0, 4), 5458c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC1, "mout_fimc1", group1_p4x12, SRC_CAM, 4, 4), 5468c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC2, "mout_fimc2", group1_p4x12, SRC_CAM, 8, 4), 5478c2ecf20Sopenharmony_ci MUX(CLK_MOUT_FIMC3, "mout_fimc3", group1_p4x12, SRC_CAM, 12, 4), 5488c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CAM0, "mout_cam0", group1_p4x12, SRC_CAM, 16, 4), 5498c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CAM1, "mout_cam1", group1_p4x12, SRC_CAM, 20, 4), 5508c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CSIS0, "mout_csis0", group1_p4x12, SRC_CAM, 24, 4), 5518c2ecf20Sopenharmony_ci MUX(CLK_MOUT_CSIS1, "mout_csis1", group1_p4x12, SRC_CAM, 28, 4), 5528c2ecf20Sopenharmony_ci MUX(0, "mout_mfc0", sclk_ampll_p4x12, SRC_MFC, 0, 1), 5538c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_G3D0, "mout_g3d0", sclk_ampll_p4x12, SRC_G3D, 0, 1, 5548c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 5558c2ecf20Sopenharmony_ci MUX(0, "mout_fimd0", group1_p4x12, SRC_LCD0, 0, 4), 5568c2ecf20Sopenharmony_ci MUX(0, "mout_mipi0", group1_p4x12, SRC_LCD0, 12, 4), 5578c2ecf20Sopenharmony_ci MUX(0, "mout_audio0", mout_audio0_p4x12, SRC_MAUDIO, 0, 4), 5588c2ecf20Sopenharmony_ci MUX(0, "mout_mmc0", group1_p4x12, SRC_FSYS, 0, 4), 5598c2ecf20Sopenharmony_ci MUX(0, "mout_mmc1", group1_p4x12, SRC_FSYS, 4, 4), 5608c2ecf20Sopenharmony_ci MUX(0, "mout_mmc2", group1_p4x12, SRC_FSYS, 8, 4), 5618c2ecf20Sopenharmony_ci MUX(0, "mout_mmc3", group1_p4x12, SRC_FSYS, 12, 4), 5628c2ecf20Sopenharmony_ci MUX(0, "mout_mmc4", group1_p4x12, SRC_FSYS, 16, 4), 5638c2ecf20Sopenharmony_ci MUX(0, "mout_mipihsi", aclk_p4412, SRC_FSYS, 24, 1), 5648c2ecf20Sopenharmony_ci MUX(0, "mout_uart0", group1_p4x12, SRC_PERIL0, 0, 4), 5658c2ecf20Sopenharmony_ci MUX(0, "mout_uart1", group1_p4x12, SRC_PERIL0, 4, 4), 5668c2ecf20Sopenharmony_ci MUX(0, "mout_uart2", group1_p4x12, SRC_PERIL0, 8, 4), 5678c2ecf20Sopenharmony_ci MUX(0, "mout_uart3", group1_p4x12, SRC_PERIL0, 12, 4), 5688c2ecf20Sopenharmony_ci MUX(0, "mout_uart4", group1_p4x12, SRC_PERIL0, 16, 4), 5698c2ecf20Sopenharmony_ci MUX(0, "mout_audio1", mout_audio1_p4x12, SRC_PERIL1, 0, 4), 5708c2ecf20Sopenharmony_ci MUX(0, "mout_audio2", mout_audio2_p4x12, SRC_PERIL1, 4, 4), 5718c2ecf20Sopenharmony_ci MUX(0, "mout_spi0", group1_p4x12, SRC_PERIL1, 16, 4), 5728c2ecf20Sopenharmony_ci MUX(0, "mout_spi1", group1_p4x12, SRC_PERIL1, 20, 4), 5738c2ecf20Sopenharmony_ci MUX(0, "mout_spi2", group1_p4x12, SRC_PERIL1, 24, 4), 5748c2ecf20Sopenharmony_ci MUX(0, "mout_pwm_isp", group1_p4x12, E4X12_SRC_ISP, 0, 4), 5758c2ecf20Sopenharmony_ci MUX(0, "mout_spi0_isp", group1_p4x12, E4X12_SRC_ISP, 4, 4), 5768c2ecf20Sopenharmony_ci MUX(0, "mout_spi1_isp", group1_p4x12, E4X12_SRC_ISP, 8, 4), 5778c2ecf20Sopenharmony_ci MUX(0, "mout_uart_isp", group1_p4x12, E4X12_SRC_ISP, 12, 4), 5788c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_top", clkout_top_p4x12, CLKOUT_CMU_TOP, 0, 5), 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_ci MUX(0, "mout_c2c", sclk_ampll_p4210, SRC_DMC, 0, 1), 5818c2ecf20Sopenharmony_ci MUX(0, "mout_pwi", mout_pwi_p4x12, SRC_DMC, 16, 4), 5828c2ecf20Sopenharmony_ci MUX(0, "mout_g2d0", sclk_ampll_p4210, SRC_DMC, 20, 1), 5838c2ecf20Sopenharmony_ci MUX(0, "mout_g2d1", sclk_evpll_p, SRC_DMC, 24, 1), 5848c2ecf20Sopenharmony_ci MUX(0, "mout_g2d", mout_g2d_p, SRC_DMC, 28, 1), 5858c2ecf20Sopenharmony_ci MUX(0, "mout_clkout_dmc", clkout_dmc_p4x12, CLKOUT_CMU_DMC, 0, 5), 5868c2ecf20Sopenharmony_ci}; 5878c2ecf20Sopenharmony_ci 5888c2ecf20Sopenharmony_ci/* list of divider clocks supported in all exynos4 soc's */ 5898c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos4_div_clks[] __initconst = { 5908c2ecf20Sopenharmony_ci DIV(CLK_DIV_GDL, "div_gdl", "mout_gdl", DIV_LEFTBUS, 0, 3), 5918c2ecf20Sopenharmony_ci DIV(0, "div_gpl", "div_gdl", DIV_LEFTBUS, 4, 3), 5928c2ecf20Sopenharmony_ci DIV(0, "div_clkout_leftbus", "mout_clkout_leftbus", 5938c2ecf20Sopenharmony_ci CLKOUT_CMU_LEFTBUS, 8, 6), 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_ci DIV(CLK_DIV_GDR, "div_gdr", "mout_gdr", DIV_RIGHTBUS, 0, 3), 5968c2ecf20Sopenharmony_ci DIV(0, "div_gpr", "div_gdr", DIV_RIGHTBUS, 4, 3), 5978c2ecf20Sopenharmony_ci DIV(0, "div_clkout_rightbus", "mout_clkout_rightbus", 5988c2ecf20Sopenharmony_ci CLKOUT_CMU_RIGHTBUS, 8, 6), 5998c2ecf20Sopenharmony_ci 6008c2ecf20Sopenharmony_ci DIV(0, "div_core", "mout_core", DIV_CPU0, 0, 3), 6018c2ecf20Sopenharmony_ci DIV(0, "div_corem0", "div_core2", DIV_CPU0, 4, 3), 6028c2ecf20Sopenharmony_ci DIV(0, "div_corem1", "div_core2", DIV_CPU0, 8, 3), 6038c2ecf20Sopenharmony_ci DIV(0, "div_periph", "div_core2", DIV_CPU0, 12, 3), 6048c2ecf20Sopenharmony_ci DIV(0, "div_atb", "mout_core", DIV_CPU0, 16, 3), 6058c2ecf20Sopenharmony_ci DIV(0, "div_pclk_dbg", "div_atb", DIV_CPU0, 20, 3), 6068c2ecf20Sopenharmony_ci DIV(0, "div_core2", "div_core", DIV_CPU0, 28, 3), 6078c2ecf20Sopenharmony_ci DIV(0, "div_copy", "mout_hpm", DIV_CPU1, 0, 3), 6088c2ecf20Sopenharmony_ci DIV(0, "div_hpm", "div_copy", DIV_CPU1, 4, 3), 6098c2ecf20Sopenharmony_ci DIV(0, "div_clkout_cpu", "mout_clkout_cpu", CLKOUT_CMU_CPU, 8, 6), 6108c2ecf20Sopenharmony_ci 6118c2ecf20Sopenharmony_ci DIV(0, "div_fimc0", "mout_fimc0", DIV_CAM, 0, 4), 6128c2ecf20Sopenharmony_ci DIV(0, "div_fimc1", "mout_fimc1", DIV_CAM, 4, 4), 6138c2ecf20Sopenharmony_ci DIV(0, "div_fimc2", "mout_fimc2", DIV_CAM, 8, 4), 6148c2ecf20Sopenharmony_ci DIV(0, "div_fimc3", "mout_fimc3", DIV_CAM, 12, 4), 6158c2ecf20Sopenharmony_ci DIV(0, "div_cam0", "mout_cam0", DIV_CAM, 16, 4), 6168c2ecf20Sopenharmony_ci DIV(0, "div_cam1", "mout_cam1", DIV_CAM, 20, 4), 6178c2ecf20Sopenharmony_ci DIV(0, "div_csis0", "mout_csis0", DIV_CAM, 24, 4), 6188c2ecf20Sopenharmony_ci DIV(0, "div_csis1", "mout_csis1", DIV_CAM, 28, 4), 6198c2ecf20Sopenharmony_ci DIV(CLK_SCLK_MFC, "sclk_mfc", "mout_mfc", DIV_MFC, 0, 4), 6208c2ecf20Sopenharmony_ci DIV(CLK_SCLK_G3D, "sclk_g3d", "mout_g3d", DIV_G3D, 0, 4), 6218c2ecf20Sopenharmony_ci DIV(0, "div_fimd0", "mout_fimd0", DIV_LCD0, 0, 4), 6228c2ecf20Sopenharmony_ci DIV(0, "div_mipi0", "mout_mipi0", DIV_LCD0, 16, 4), 6238c2ecf20Sopenharmony_ci DIV(0, "div_audio0", "mout_audio0", DIV_MAUDIO, 0, 4), 6248c2ecf20Sopenharmony_ci DIV(CLK_SCLK_PCM0, "sclk_pcm0", "sclk_audio0", DIV_MAUDIO, 4, 8), 6258c2ecf20Sopenharmony_ci DIV(0, "div_mmc0", "mout_mmc0", DIV_FSYS1, 0, 4), 6268c2ecf20Sopenharmony_ci DIV(0, "div_mmc1", "mout_mmc1", DIV_FSYS1, 16, 4), 6278c2ecf20Sopenharmony_ci DIV(0, "div_mmc2", "mout_mmc2", DIV_FSYS2, 0, 4), 6288c2ecf20Sopenharmony_ci DIV(0, "div_mmc3", "mout_mmc3", DIV_FSYS2, 16, 4), 6298c2ecf20Sopenharmony_ci DIV(CLK_SCLK_PIXEL, "sclk_pixel", "sclk_vpll", DIV_TV, 0, 4), 6308c2ecf20Sopenharmony_ci DIV(CLK_ACLK100, "aclk100", "mout_aclk100", DIV_TOP, 4, 4), 6318c2ecf20Sopenharmony_ci DIV(CLK_ACLK160, "aclk160", "mout_aclk160", DIV_TOP, 8, 3), 6328c2ecf20Sopenharmony_ci DIV(CLK_ACLK133, "aclk133", "mout_aclk133", DIV_TOP, 12, 3), 6338c2ecf20Sopenharmony_ci DIV(0, "div_onenand", "mout_onenand1", DIV_TOP, 16, 3), 6348c2ecf20Sopenharmony_ci DIV(CLK_SCLK_SLIMBUS, "sclk_slimbus", "sclk_epll", DIV_PERIL3, 4, 4), 6358c2ecf20Sopenharmony_ci DIV(CLK_SCLK_PCM1, "sclk_pcm1", "sclk_audio1", DIV_PERIL4, 4, 8), 6368c2ecf20Sopenharmony_ci DIV(CLK_SCLK_PCM2, "sclk_pcm2", "sclk_audio2", DIV_PERIL4, 20, 8), 6378c2ecf20Sopenharmony_ci DIV(CLK_SCLK_I2S1, "sclk_i2s1", "sclk_audio1", DIV_PERIL5, 0, 6), 6388c2ecf20Sopenharmony_ci DIV(CLK_SCLK_I2S2, "sclk_i2s2", "sclk_audio2", DIV_PERIL5, 8, 6), 6398c2ecf20Sopenharmony_ci DIV(0, "div_mmc4", "mout_mmc4", DIV_FSYS3, 0, 4), 6408c2ecf20Sopenharmony_ci DIV_F(0, "div_mmc_pre4", "div_mmc4", DIV_FSYS3, 8, 8, 6418c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6428c2ecf20Sopenharmony_ci DIV(0, "div_uart0", "mout_uart0", DIV_PERIL0, 0, 4), 6438c2ecf20Sopenharmony_ci DIV(0, "div_uart1", "mout_uart1", DIV_PERIL0, 4, 4), 6448c2ecf20Sopenharmony_ci DIV(0, "div_uart2", "mout_uart2", DIV_PERIL0, 8, 4), 6458c2ecf20Sopenharmony_ci DIV(0, "div_uart3", "mout_uart3", DIV_PERIL0, 12, 4), 6468c2ecf20Sopenharmony_ci DIV(0, "div_uart4", "mout_uart4", DIV_PERIL0, 16, 4), 6478c2ecf20Sopenharmony_ci DIV(0, "div_spi0", "mout_spi0", DIV_PERIL1, 0, 4), 6488c2ecf20Sopenharmony_ci DIV(0, "div_spi_pre0", "div_spi0", DIV_PERIL1, 8, 8), 6498c2ecf20Sopenharmony_ci DIV(0, "div_spi1", "mout_spi1", DIV_PERIL1, 16, 4), 6508c2ecf20Sopenharmony_ci DIV(0, "div_spi_pre1", "div_spi1", DIV_PERIL1, 24, 8), 6518c2ecf20Sopenharmony_ci DIV(0, "div_spi2", "mout_spi2", DIV_PERIL2, 0, 4), 6528c2ecf20Sopenharmony_ci DIV(0, "div_spi_pre2", "div_spi2", DIV_PERIL2, 8, 8), 6538c2ecf20Sopenharmony_ci DIV(0, "div_audio1", "mout_audio1", DIV_PERIL4, 0, 4), 6548c2ecf20Sopenharmony_ci DIV(0, "div_audio2", "mout_audio2", DIV_PERIL4, 16, 4), 6558c2ecf20Sopenharmony_ci DIV(CLK_SCLK_APLL, "sclk_apll", "mout_apll", DIV_CPU0, 24, 3), 6568c2ecf20Sopenharmony_ci DIV_F(0, "div_mipi_pre0", "div_mipi0", DIV_LCD0, 20, 4, 6578c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6588c2ecf20Sopenharmony_ci DIV_F(0, "div_mmc_pre0", "div_mmc0", DIV_FSYS1, 8, 8, 6598c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6608c2ecf20Sopenharmony_ci DIV_F(0, "div_mmc_pre1", "div_mmc1", DIV_FSYS1, 24, 8, 6618c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6628c2ecf20Sopenharmony_ci DIV_F(0, "div_mmc_pre2", "div_mmc2", DIV_FSYS2, 8, 8, 6638c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6648c2ecf20Sopenharmony_ci DIV_F(0, "div_mmc_pre3", "div_mmc3", DIV_FSYS2, 24, 8, 6658c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6668c2ecf20Sopenharmony_ci DIV(0, "div_clkout_top", "mout_clkout_top", CLKOUT_CMU_TOP, 8, 6), 6678c2ecf20Sopenharmony_ci 6688c2ecf20Sopenharmony_ci DIV(CLK_DIV_ACP, "div_acp", "mout_dmc_bus", DIV_DMC0, 0, 3), 6698c2ecf20Sopenharmony_ci DIV(0, "div_acp_pclk", "div_acp", DIV_DMC0, 4, 3), 6708c2ecf20Sopenharmony_ci DIV(0, "div_dphy", "mout_dphy", DIV_DMC0, 8, 3), 6718c2ecf20Sopenharmony_ci DIV(CLK_DIV_DMC, "div_dmc", "mout_dmc_bus", DIV_DMC0, 12, 3), 6728c2ecf20Sopenharmony_ci DIV(0, "div_dmcd", "div_dmc", DIV_DMC0, 16, 3), 6738c2ecf20Sopenharmony_ci DIV(0, "div_dmcp", "div_dmcd", DIV_DMC0, 20, 3), 6748c2ecf20Sopenharmony_ci DIV(0, "div_pwi", "mout_pwi", DIV_DMC1, 8, 4), 6758c2ecf20Sopenharmony_ci DIV(0, "div_clkout_dmc", "mout_clkout_dmc", CLKOUT_CMU_DMC, 8, 6), 6768c2ecf20Sopenharmony_ci}; 6778c2ecf20Sopenharmony_ci 6788c2ecf20Sopenharmony_ci/* list of divider clocks supported in exynos4210 soc */ 6798c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos4210_div_clks[] __initconst = { 6808c2ecf20Sopenharmony_ci DIV(CLK_ACLK200, "aclk200", "mout_aclk200", DIV_TOP, 0, 3), 6818c2ecf20Sopenharmony_ci DIV(CLK_SCLK_FIMG2D, "sclk_fimg2d", "mout_g2d", DIV_IMAGE, 0, 4), 6828c2ecf20Sopenharmony_ci DIV(0, "div_fimd1", "mout_fimd1", E4210_DIV_LCD1, 0, 4), 6838c2ecf20Sopenharmony_ci DIV(0, "div_mipi1", "mout_mipi1", E4210_DIV_LCD1, 16, 4), 6848c2ecf20Sopenharmony_ci DIV(0, "div_sata", "mout_sata", DIV_FSYS0, 20, 4), 6858c2ecf20Sopenharmony_ci DIV_F(0, "div_mipi_pre1", "div_mipi1", E4210_DIV_LCD1, 20, 4, 6868c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6878c2ecf20Sopenharmony_ci}; 6888c2ecf20Sopenharmony_ci 6898c2ecf20Sopenharmony_ci/* list of divider clocks supported in exynos4x12 soc */ 6908c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos4x12_div_clks[] __initconst = { 6918c2ecf20Sopenharmony_ci DIV(0, "div_mdnie0", "mout_mdnie0", DIV_LCD0, 4, 4), 6928c2ecf20Sopenharmony_ci DIV(0, "div_mdnie_pwm0", "mout_mdnie_pwm0", DIV_LCD0, 8, 4), 6938c2ecf20Sopenharmony_ci DIV(0, "div_mdnie_pwm_pre0", "div_mdnie_pwm0", DIV_LCD0, 12, 4), 6948c2ecf20Sopenharmony_ci DIV(0, "div_mipihsi", "mout_mipihsi", DIV_FSYS0, 20, 4), 6958c2ecf20Sopenharmony_ci DIV(0, "div_jpeg", "mout_jpeg", E4X12_DIV_CAM1, 0, 4), 6968c2ecf20Sopenharmony_ci DIV(CLK_DIV_ACLK200, "div_aclk200", "mout_aclk200", DIV_TOP, 0, 3), 6978c2ecf20Sopenharmony_ci DIV(0, "div_aclk266_gps", "mout_aclk266_gps", DIV_TOP, 20, 3), 6988c2ecf20Sopenharmony_ci DIV(CLK_DIV_ACLK400_MCUISP, "div_aclk400_mcuisp", "mout_aclk400_mcuisp", 6998c2ecf20Sopenharmony_ci DIV_TOP, 24, 3), 7008c2ecf20Sopenharmony_ci DIV(0, "div_pwm_isp", "mout_pwm_isp", E4X12_DIV_ISP, 0, 4), 7018c2ecf20Sopenharmony_ci DIV(0, "div_spi0_isp", "mout_spi0_isp", E4X12_DIV_ISP, 4, 4), 7028c2ecf20Sopenharmony_ci DIV(0, "div_spi0_isp_pre", "div_spi0_isp", E4X12_DIV_ISP, 8, 8), 7038c2ecf20Sopenharmony_ci DIV(0, "div_spi1_isp", "mout_spi1_isp", E4X12_DIV_ISP, 16, 4), 7048c2ecf20Sopenharmony_ci DIV(0, "div_spi1_isp_pre", "div_spi1_isp", E4X12_DIV_ISP, 20, 8), 7058c2ecf20Sopenharmony_ci DIV(0, "div_uart_isp", "mout_uart_isp", E4X12_DIV_ISP, 28, 4), 7068c2ecf20Sopenharmony_ci DIV(CLK_SCLK_FIMG2D, "sclk_fimg2d", "mout_g2d", DIV_DMC1, 0, 4), 7078c2ecf20Sopenharmony_ci DIV(CLK_DIV_C2C, "div_c2c", "mout_c2c", DIV_DMC1, 4, 3), 7088c2ecf20Sopenharmony_ci DIV(0, "div_c2c_aclk", "div_c2c", DIV_DMC1, 12, 3), 7098c2ecf20Sopenharmony_ci}; 7108c2ecf20Sopenharmony_ci 7118c2ecf20Sopenharmony_ci/* list of gate clocks supported in all exynos4 soc's */ 7128c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos4_gate_clks[] __initconst = { 7138c2ecf20Sopenharmony_ci GATE(CLK_PPMULEFT, "ppmuleft", "aclk200", GATE_IP_LEFTBUS, 1, 0, 0), 7148c2ecf20Sopenharmony_ci GATE(CLK_PPMURIGHT, "ppmuright", "aclk200", GATE_IP_RIGHTBUS, 1, 0, 0), 7158c2ecf20Sopenharmony_ci GATE(CLK_SCLK_HDMI, "sclk_hdmi", "mout_hdmi", SRC_MASK_TV, 0, 0, 0), 7168c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPDIF, "sclk_spdif", "mout_spdif", SRC_MASK_PERIL1, 8, 0, 7178c2ecf20Sopenharmony_ci 0), 7188c2ecf20Sopenharmony_ci GATE(CLK_JPEG, "jpeg", "aclk160", GATE_IP_CAM, 6, 0, 0), 7198c2ecf20Sopenharmony_ci GATE(CLK_MIE0, "mie0", "aclk160", GATE_IP_LCD0, 1, 0, 0), 7208c2ecf20Sopenharmony_ci GATE(CLK_DSIM0, "dsim0", "aclk160", GATE_IP_LCD0, 3, 0, 0), 7218c2ecf20Sopenharmony_ci GATE(CLK_FIMD1, "fimd1", "aclk160", E4210_GATE_IP_LCD1, 0, 0, 0), 7228c2ecf20Sopenharmony_ci GATE(CLK_MIE1, "mie1", "aclk160", E4210_GATE_IP_LCD1, 1, 0, 0), 7238c2ecf20Sopenharmony_ci GATE(CLK_DSIM1, "dsim1", "aclk160", E4210_GATE_IP_LCD1, 3, 0, 0), 7248c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMD1, "smmu_fimd1", "aclk160", E4210_GATE_IP_LCD1, 4, 0, 7258c2ecf20Sopenharmony_ci 0), 7268c2ecf20Sopenharmony_ci GATE(CLK_TSI, "tsi", "aclk133", GATE_IP_FSYS, 4, 0, 0), 7278c2ecf20Sopenharmony_ci GATE(CLK_SROMC, "sromc", "aclk133", GATE_IP_FSYS, 11, 0, 0), 7288c2ecf20Sopenharmony_ci GATE(CLK_G3D, "g3d", "aclk200", GATE_IP_G3D, 0, 0, 0), 7298c2ecf20Sopenharmony_ci GATE(CLK_PPMUG3D, "ppmug3d", "aclk200", GATE_IP_G3D, 1, 0, 0), 7308c2ecf20Sopenharmony_ci GATE(CLK_USB_DEVICE, "usb_device", "aclk133", GATE_IP_FSYS, 13, 0, 0), 7318c2ecf20Sopenharmony_ci GATE(CLK_ONENAND, "onenand", "aclk133", GATE_IP_FSYS, 15, 0, 0), 7328c2ecf20Sopenharmony_ci GATE(CLK_NFCON, "nfcon", "aclk133", GATE_IP_FSYS, 16, 0, 0), 7338c2ecf20Sopenharmony_ci GATE(CLK_GPS, "gps", "aclk133", GATE_IP_GPS, 0, 0, 0), 7348c2ecf20Sopenharmony_ci GATE(CLK_SMMU_GPS, "smmu_gps", "aclk133", GATE_IP_GPS, 1, 0, 0), 7358c2ecf20Sopenharmony_ci GATE(CLK_PPMUGPS, "ppmugps", "aclk200", GATE_IP_GPS, 2, 0, 0), 7368c2ecf20Sopenharmony_ci GATE(CLK_SLIMBUS, "slimbus", "aclk100", GATE_IP_PERIL, 25, 0, 0), 7378c2ecf20Sopenharmony_ci GATE(CLK_SCLK_CAM0, "sclk_cam0", "div_cam0", GATE_SCLK_CAM, 4, 7388c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7398c2ecf20Sopenharmony_ci GATE(CLK_SCLK_CAM1, "sclk_cam1", "div_cam1", GATE_SCLK_CAM, 5, 7408c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7418c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MIPI0, "sclk_mipi0", "div_mipi_pre0", 7428c2ecf20Sopenharmony_ci SRC_MASK_LCD0, 12, CLK_SET_RATE_PARENT, 0), 7438c2ecf20Sopenharmony_ci GATE(CLK_SCLK_AUDIO0, "sclk_audio0", "div_audio0", SRC_MASK_MAUDIO, 0, 7448c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7458c2ecf20Sopenharmony_ci GATE(CLK_SCLK_AUDIO1, "sclk_audio1", "div_audio1", SRC_MASK_PERIL1, 0, 7468c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7478c2ecf20Sopenharmony_ci GATE(CLK_VP, "vp", "aclk160", GATE_IP_TV, 0, 0, 0), 7488c2ecf20Sopenharmony_ci GATE(CLK_MIXER, "mixer", "aclk160", GATE_IP_TV, 1, 0, 0), 7498c2ecf20Sopenharmony_ci GATE(CLK_HDMI, "hdmi", "aclk160", GATE_IP_TV, 3, 0, 0), 7508c2ecf20Sopenharmony_ci GATE(CLK_PWM, "pwm", "aclk100", GATE_IP_PERIL, 24, 0, 0), 7518c2ecf20Sopenharmony_ci GATE(CLK_SDMMC4, "sdmmc4", "aclk133", GATE_IP_FSYS, 9, 0, 0), 7528c2ecf20Sopenharmony_ci GATE(CLK_USB_HOST, "usb_host", "aclk133", GATE_IP_FSYS, 12, 0, 0), 7538c2ecf20Sopenharmony_ci GATE(CLK_SCLK_FIMC0, "sclk_fimc0", "div_fimc0", SRC_MASK_CAM, 0, 7548c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7558c2ecf20Sopenharmony_ci GATE(CLK_SCLK_FIMC1, "sclk_fimc1", "div_fimc1", SRC_MASK_CAM, 4, 7568c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7578c2ecf20Sopenharmony_ci GATE(CLK_SCLK_FIMC2, "sclk_fimc2", "div_fimc2", SRC_MASK_CAM, 8, 7588c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7598c2ecf20Sopenharmony_ci GATE(CLK_SCLK_FIMC3, "sclk_fimc3", "div_fimc3", SRC_MASK_CAM, 12, 7608c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7618c2ecf20Sopenharmony_ci GATE(CLK_SCLK_CSIS0, "sclk_csis0", "div_csis0", SRC_MASK_CAM, 24, 7628c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7638c2ecf20Sopenharmony_ci GATE(CLK_SCLK_CSIS1, "sclk_csis1", "div_csis1", SRC_MASK_CAM, 28, 7648c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7658c2ecf20Sopenharmony_ci GATE(CLK_SCLK_FIMD0, "sclk_fimd0", "div_fimd0", SRC_MASK_LCD0, 0, 7668c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7678c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC0, "sclk_mmc0", "div_mmc_pre0", SRC_MASK_FSYS, 0, 7688c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7698c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC1, "sclk_mmc1", "div_mmc_pre1", SRC_MASK_FSYS, 4, 7708c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7718c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC2, "sclk_mmc2", "div_mmc_pre2", SRC_MASK_FSYS, 8, 7728c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7738c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC3, "sclk_mmc3", "div_mmc_pre3", SRC_MASK_FSYS, 12, 7748c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7758c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC4, "sclk_mmc4", "div_mmc_pre4", SRC_MASK_FSYS, 16, 7768c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7778c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART0, "uclk0", "div_uart0", SRC_MASK_PERIL0, 0, 7788c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7798c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART1, "uclk1", "div_uart1", SRC_MASK_PERIL0, 4, 7808c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7818c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART2, "uclk2", "div_uart2", SRC_MASK_PERIL0, 8, 7828c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7838c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART3, "uclk3", "div_uart3", SRC_MASK_PERIL0, 12, 7848c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7858c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART4, "uclk4", "div_uart4", SRC_MASK_PERIL0, 16, 7868c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7878c2ecf20Sopenharmony_ci GATE(CLK_SCLK_AUDIO2, "sclk_audio2", "div_audio2", SRC_MASK_PERIL1, 4, 7888c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7898c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI0, "sclk_spi0", "div_spi_pre0", SRC_MASK_PERIL1, 16, 7908c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7918c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI1, "sclk_spi1", "div_spi_pre1", SRC_MASK_PERIL1, 20, 7928c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7938c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI2, "sclk_spi2", "div_spi_pre2", SRC_MASK_PERIL1, 24, 7948c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7958c2ecf20Sopenharmony_ci GATE(CLK_FIMC0, "fimc0", "aclk160", GATE_IP_CAM, 0, 7968c2ecf20Sopenharmony_ci 0, 0), 7978c2ecf20Sopenharmony_ci GATE(CLK_FIMC1, "fimc1", "aclk160", GATE_IP_CAM, 1, 7988c2ecf20Sopenharmony_ci 0, 0), 7998c2ecf20Sopenharmony_ci GATE(CLK_FIMC2, "fimc2", "aclk160", GATE_IP_CAM, 2, 8008c2ecf20Sopenharmony_ci 0, 0), 8018c2ecf20Sopenharmony_ci GATE(CLK_FIMC3, "fimc3", "aclk160", GATE_IP_CAM, 3, 8028c2ecf20Sopenharmony_ci 0, 0), 8038c2ecf20Sopenharmony_ci GATE(CLK_CSIS0, "csis0", "aclk160", GATE_IP_CAM, 4, 8048c2ecf20Sopenharmony_ci 0, 0), 8058c2ecf20Sopenharmony_ci GATE(CLK_CSIS1, "csis1", "aclk160", GATE_IP_CAM, 5, 8068c2ecf20Sopenharmony_ci 0, 0), 8078c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMC0, "smmu_fimc0", "aclk160", GATE_IP_CAM, 7, 8088c2ecf20Sopenharmony_ci 0, 0), 8098c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMC1, "smmu_fimc1", "aclk160", GATE_IP_CAM, 8, 8108c2ecf20Sopenharmony_ci 0, 0), 8118c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMC2, "smmu_fimc2", "aclk160", GATE_IP_CAM, 9, 8128c2ecf20Sopenharmony_ci 0, 0), 8138c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMC3, "smmu_fimc3", "aclk160", GATE_IP_CAM, 10, 8148c2ecf20Sopenharmony_ci 0, 0), 8158c2ecf20Sopenharmony_ci GATE(CLK_SMMU_JPEG, "smmu_jpeg", "aclk160", GATE_IP_CAM, 11, 8168c2ecf20Sopenharmony_ci 0, 0), 8178c2ecf20Sopenharmony_ci GATE(CLK_PPMUCAMIF, "ppmucamif", "aclk160", GATE_IP_CAM, 16, 0, 0), 8188c2ecf20Sopenharmony_ci GATE(CLK_PIXELASYNCM0, "pxl_async0", "aclk160", GATE_IP_CAM, 17, 0, 0), 8198c2ecf20Sopenharmony_ci GATE(CLK_PIXELASYNCM1, "pxl_async1", "aclk160", GATE_IP_CAM, 18, 0, 0), 8208c2ecf20Sopenharmony_ci GATE(CLK_SMMU_TV, "smmu_tv", "aclk160", GATE_IP_TV, 4, 8218c2ecf20Sopenharmony_ci 0, 0), 8228c2ecf20Sopenharmony_ci GATE(CLK_PPMUTV, "ppmutv", "aclk160", GATE_IP_TV, 5, 0, 0), 8238c2ecf20Sopenharmony_ci GATE(CLK_MFC, "mfc", "aclk100", GATE_IP_MFC, 0, 0, 0), 8248c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MFCL, "smmu_mfcl", "aclk100", GATE_IP_MFC, 1, 8258c2ecf20Sopenharmony_ci 0, 0), 8268c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MFCR, "smmu_mfcr", "aclk100", GATE_IP_MFC, 2, 8278c2ecf20Sopenharmony_ci 0, 0), 8288c2ecf20Sopenharmony_ci GATE(CLK_PPMUMFC_L, "ppmumfc_l", "aclk100", GATE_IP_MFC, 3, 0, 0), 8298c2ecf20Sopenharmony_ci GATE(CLK_PPMUMFC_R, "ppmumfc_r", "aclk100", GATE_IP_MFC, 4, 0, 0), 8308c2ecf20Sopenharmony_ci GATE(CLK_FIMD0, "fimd0", "aclk160", GATE_IP_LCD0, 0, 8318c2ecf20Sopenharmony_ci 0, 0), 8328c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMD0, "smmu_fimd0", "aclk160", GATE_IP_LCD0, 4, 8338c2ecf20Sopenharmony_ci 0, 0), 8348c2ecf20Sopenharmony_ci GATE(CLK_PPMULCD0, "ppmulcd0", "aclk160", GATE_IP_LCD0, 5, 0, 0), 8358c2ecf20Sopenharmony_ci GATE(CLK_PDMA0, "pdma0", "aclk133", GATE_IP_FSYS, 0, 8368c2ecf20Sopenharmony_ci 0, 0), 8378c2ecf20Sopenharmony_ci GATE(CLK_PDMA1, "pdma1", "aclk133", GATE_IP_FSYS, 1, 8388c2ecf20Sopenharmony_ci 0, 0), 8398c2ecf20Sopenharmony_ci GATE(CLK_SDMMC0, "sdmmc0", "aclk133", GATE_IP_FSYS, 5, 8408c2ecf20Sopenharmony_ci 0, 0), 8418c2ecf20Sopenharmony_ci GATE(CLK_SDMMC1, "sdmmc1", "aclk133", GATE_IP_FSYS, 6, 8428c2ecf20Sopenharmony_ci 0, 0), 8438c2ecf20Sopenharmony_ci GATE(CLK_SDMMC2, "sdmmc2", "aclk133", GATE_IP_FSYS, 7, 8448c2ecf20Sopenharmony_ci 0, 0), 8458c2ecf20Sopenharmony_ci GATE(CLK_SDMMC3, "sdmmc3", "aclk133", GATE_IP_FSYS, 8, 8468c2ecf20Sopenharmony_ci 0, 0), 8478c2ecf20Sopenharmony_ci GATE(CLK_PPMUFILE, "ppmufile", "aclk133", GATE_IP_FSYS, 17, 0, 0), 8488c2ecf20Sopenharmony_ci GATE(CLK_UART0, "uart0", "aclk100", GATE_IP_PERIL, 0, 8498c2ecf20Sopenharmony_ci 0, 0), 8508c2ecf20Sopenharmony_ci GATE(CLK_UART1, "uart1", "aclk100", GATE_IP_PERIL, 1, 8518c2ecf20Sopenharmony_ci 0, 0), 8528c2ecf20Sopenharmony_ci GATE(CLK_UART2, "uart2", "aclk100", GATE_IP_PERIL, 2, 8538c2ecf20Sopenharmony_ci 0, 0), 8548c2ecf20Sopenharmony_ci GATE(CLK_UART3, "uart3", "aclk100", GATE_IP_PERIL, 3, 8558c2ecf20Sopenharmony_ci 0, 0), 8568c2ecf20Sopenharmony_ci GATE(CLK_UART4, "uart4", "aclk100", GATE_IP_PERIL, 4, 8578c2ecf20Sopenharmony_ci 0, 0), 8588c2ecf20Sopenharmony_ci GATE(CLK_I2C0, "i2c0", "aclk100", GATE_IP_PERIL, 6, 8598c2ecf20Sopenharmony_ci 0, 0), 8608c2ecf20Sopenharmony_ci GATE(CLK_I2C1, "i2c1", "aclk100", GATE_IP_PERIL, 7, 8618c2ecf20Sopenharmony_ci 0, 0), 8628c2ecf20Sopenharmony_ci GATE(CLK_I2C2, "i2c2", "aclk100", GATE_IP_PERIL, 8, 8638c2ecf20Sopenharmony_ci 0, 0), 8648c2ecf20Sopenharmony_ci GATE(CLK_I2C3, "i2c3", "aclk100", GATE_IP_PERIL, 9, 8658c2ecf20Sopenharmony_ci 0, 0), 8668c2ecf20Sopenharmony_ci GATE(CLK_I2C4, "i2c4", "aclk100", GATE_IP_PERIL, 10, 8678c2ecf20Sopenharmony_ci 0, 0), 8688c2ecf20Sopenharmony_ci GATE(CLK_I2C5, "i2c5", "aclk100", GATE_IP_PERIL, 11, 8698c2ecf20Sopenharmony_ci 0, 0), 8708c2ecf20Sopenharmony_ci GATE(CLK_I2C6, "i2c6", "aclk100", GATE_IP_PERIL, 12, 8718c2ecf20Sopenharmony_ci 0, 0), 8728c2ecf20Sopenharmony_ci GATE(CLK_I2C7, "i2c7", "aclk100", GATE_IP_PERIL, 13, 8738c2ecf20Sopenharmony_ci 0, 0), 8748c2ecf20Sopenharmony_ci GATE(CLK_I2C_HDMI, "i2c-hdmi", "aclk100", GATE_IP_PERIL, 14, 8758c2ecf20Sopenharmony_ci 0, 0), 8768c2ecf20Sopenharmony_ci GATE(CLK_SPI0, "spi0", "aclk100", GATE_IP_PERIL, 16, 8778c2ecf20Sopenharmony_ci 0, 0), 8788c2ecf20Sopenharmony_ci GATE(CLK_SPI1, "spi1", "aclk100", GATE_IP_PERIL, 17, 8798c2ecf20Sopenharmony_ci 0, 0), 8808c2ecf20Sopenharmony_ci GATE(CLK_SPI2, "spi2", "aclk100", GATE_IP_PERIL, 18, 8818c2ecf20Sopenharmony_ci 0, 0), 8828c2ecf20Sopenharmony_ci GATE(CLK_I2S1, "i2s1", "aclk100", GATE_IP_PERIL, 20, 8838c2ecf20Sopenharmony_ci 0, 0), 8848c2ecf20Sopenharmony_ci GATE(CLK_I2S2, "i2s2", "aclk100", GATE_IP_PERIL, 21, 8858c2ecf20Sopenharmony_ci 0, 0), 8868c2ecf20Sopenharmony_ci GATE(CLK_PCM1, "pcm1", "aclk100", GATE_IP_PERIL, 22, 8878c2ecf20Sopenharmony_ci 0, 0), 8888c2ecf20Sopenharmony_ci GATE(CLK_PCM2, "pcm2", "aclk100", GATE_IP_PERIL, 23, 8898c2ecf20Sopenharmony_ci 0, 0), 8908c2ecf20Sopenharmony_ci GATE(CLK_SPDIF, "spdif", "aclk100", GATE_IP_PERIL, 26, 8918c2ecf20Sopenharmony_ci 0, 0), 8928c2ecf20Sopenharmony_ci GATE(CLK_AC97, "ac97", "aclk100", GATE_IP_PERIL, 27, 8938c2ecf20Sopenharmony_ci 0, 0), 8948c2ecf20Sopenharmony_ci GATE(CLK_SSS, "sss", "aclk133", GATE_IP_DMC, 4, 0, 0), 8958c2ecf20Sopenharmony_ci GATE(CLK_PPMUDMC0, "ppmudmc0", "aclk133", GATE_IP_DMC, 8, 0, 0), 8968c2ecf20Sopenharmony_ci GATE(CLK_PPMUDMC1, "ppmudmc1", "aclk133", GATE_IP_DMC, 9, 0, 0), 8978c2ecf20Sopenharmony_ci GATE(CLK_PPMUCPU, "ppmucpu", "aclk133", GATE_IP_DMC, 10, 0, 0), 8988c2ecf20Sopenharmony_ci GATE(CLK_PPMUACP, "ppmuacp", "aclk133", GATE_IP_DMC, 16, 0, 0), 8998c2ecf20Sopenharmony_ci 9008c2ecf20Sopenharmony_ci GATE(CLK_OUT_LEFTBUS, "clkout_leftbus", "div_clkout_leftbus", 9018c2ecf20Sopenharmony_ci CLKOUT_CMU_LEFTBUS, 16, CLK_SET_RATE_PARENT, 0), 9028c2ecf20Sopenharmony_ci GATE(CLK_OUT_RIGHTBUS, "clkout_rightbus", "div_clkout_rightbus", 9038c2ecf20Sopenharmony_ci CLKOUT_CMU_RIGHTBUS, 16, CLK_SET_RATE_PARENT, 0), 9048c2ecf20Sopenharmony_ci GATE(CLK_OUT_TOP, "clkout_top", "div_clkout_top", 9058c2ecf20Sopenharmony_ci CLKOUT_CMU_TOP, 16, CLK_SET_RATE_PARENT, 0), 9068c2ecf20Sopenharmony_ci GATE(CLK_OUT_DMC, "clkout_dmc", "div_clkout_dmc", 9078c2ecf20Sopenharmony_ci CLKOUT_CMU_DMC, 16, CLK_SET_RATE_PARENT, 0), 9088c2ecf20Sopenharmony_ci GATE(CLK_OUT_CPU, "clkout_cpu", "div_clkout_cpu", 9098c2ecf20Sopenharmony_ci CLKOUT_CMU_CPU, 16, CLK_SET_RATE_PARENT, 0), 9108c2ecf20Sopenharmony_ci}; 9118c2ecf20Sopenharmony_ci 9128c2ecf20Sopenharmony_ci/* list of gate clocks supported in exynos4210 soc */ 9138c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos4210_gate_clks[] __initconst = { 9148c2ecf20Sopenharmony_ci GATE(CLK_TVENC, "tvenc", "aclk160", GATE_IP_TV, 2, 0, 0), 9158c2ecf20Sopenharmony_ci GATE(CLK_G2D, "g2d", "aclk200", E4210_GATE_IP_IMAGE, 0, 0, 0), 9168c2ecf20Sopenharmony_ci GATE(CLK_ROTATOR, "rotator", "aclk200", E4210_GATE_IP_IMAGE, 1, 0, 0), 9178c2ecf20Sopenharmony_ci GATE(CLK_MDMA, "mdma", "aclk200", E4210_GATE_IP_IMAGE, 2, 0, 0), 9188c2ecf20Sopenharmony_ci GATE(CLK_SMMU_G2D, "smmu_g2d", "aclk200", E4210_GATE_IP_IMAGE, 3, 0, 0), 9198c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MDMA, "smmu_mdma", "aclk200", E4210_GATE_IP_IMAGE, 5, 0, 9208c2ecf20Sopenharmony_ci 0), 9218c2ecf20Sopenharmony_ci GATE(CLK_PPMUIMAGE, "ppmuimage", "aclk200", E4210_GATE_IP_IMAGE, 9, 0, 9228c2ecf20Sopenharmony_ci 0), 9238c2ecf20Sopenharmony_ci GATE(CLK_PPMULCD1, "ppmulcd1", "aclk160", E4210_GATE_IP_LCD1, 5, 0, 0), 9248c2ecf20Sopenharmony_ci GATE(CLK_PCIE_PHY, "pcie_phy", "aclk133", GATE_IP_FSYS, 2, 0, 0), 9258c2ecf20Sopenharmony_ci GATE(CLK_SATA_PHY, "sata_phy", "aclk133", GATE_IP_FSYS, 3, 0, 0), 9268c2ecf20Sopenharmony_ci GATE(CLK_SATA, "sata", "aclk133", GATE_IP_FSYS, 10, 0, 0), 9278c2ecf20Sopenharmony_ci GATE(CLK_PCIE, "pcie", "aclk133", GATE_IP_FSYS, 14, 0, 0), 9288c2ecf20Sopenharmony_ci GATE(CLK_SMMU_PCIE, "smmu_pcie", "aclk133", GATE_IP_FSYS, 18, 0, 0), 9298c2ecf20Sopenharmony_ci GATE(CLK_MODEMIF, "modemif", "aclk100", GATE_IP_PERIL, 28, 0, 0), 9308c2ecf20Sopenharmony_ci GATE(CLK_CHIPID, "chipid", "aclk100", E4210_GATE_IP_PERIR, 0, CLK_IGNORE_UNUSED, 0), 9318c2ecf20Sopenharmony_ci GATE(CLK_SYSREG, "sysreg", "aclk100", E4210_GATE_IP_PERIR, 0, 9328c2ecf20Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 9338c2ecf20Sopenharmony_ci GATE(CLK_HDMI_CEC, "hdmi_cec", "aclk100", E4210_GATE_IP_PERIR, 11, 0, 9348c2ecf20Sopenharmony_ci 0), 9358c2ecf20Sopenharmony_ci GATE(CLK_SMMU_ROTATOR, "smmu_rotator", "aclk200", 9368c2ecf20Sopenharmony_ci E4210_GATE_IP_IMAGE, 4, 0, 0), 9378c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MIPI1, "sclk_mipi1", "div_mipi_pre1", 9388c2ecf20Sopenharmony_ci E4210_SRC_MASK_LCD1, 12, CLK_SET_RATE_PARENT, 0), 9398c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SATA, "sclk_sata", "div_sata", 9408c2ecf20Sopenharmony_ci SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), 9418c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MIXER, "sclk_mixer", "mout_mixer", SRC_MASK_TV, 4, 0, 0), 9428c2ecf20Sopenharmony_ci GATE(CLK_SCLK_DAC, "sclk_dac", "mout_dac", SRC_MASK_TV, 8, 0, 0), 9438c2ecf20Sopenharmony_ci GATE(CLK_TSADC, "tsadc", "aclk100", GATE_IP_PERIL, 15, 9448c2ecf20Sopenharmony_ci 0, 0), 9458c2ecf20Sopenharmony_ci GATE(CLK_MCT, "mct", "aclk100", E4210_GATE_IP_PERIR, 13, 9468c2ecf20Sopenharmony_ci 0, 0), 9478c2ecf20Sopenharmony_ci GATE(CLK_WDT, "watchdog", "aclk100", E4210_GATE_IP_PERIR, 14, 9488c2ecf20Sopenharmony_ci 0, 0), 9498c2ecf20Sopenharmony_ci GATE(CLK_RTC, "rtc", "aclk100", E4210_GATE_IP_PERIR, 15, 9508c2ecf20Sopenharmony_ci 0, 0), 9518c2ecf20Sopenharmony_ci GATE(CLK_KEYIF, "keyif", "aclk100", E4210_GATE_IP_PERIR, 16, 9528c2ecf20Sopenharmony_ci 0, 0), 9538c2ecf20Sopenharmony_ci GATE(CLK_SCLK_FIMD1, "sclk_fimd1", "div_fimd1", E4210_SRC_MASK_LCD1, 0, 9548c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 9558c2ecf20Sopenharmony_ci GATE(CLK_TMU_APBIF, "tmu_apbif", "aclk100", E4210_GATE_IP_PERIR, 17, 0, 9568c2ecf20Sopenharmony_ci 0), 9578c2ecf20Sopenharmony_ci}; 9588c2ecf20Sopenharmony_ci 9598c2ecf20Sopenharmony_ci/* list of gate clocks supported in exynos4x12 soc */ 9608c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos4x12_gate_clks[] __initconst = { 9618c2ecf20Sopenharmony_ci GATE(CLK_ASYNC_G3D, "async_g3d", "aclk200", GATE_IP_LEFTBUS, 6, 0, 0), 9628c2ecf20Sopenharmony_ci GATE(CLK_AUDSS, "audss", "sclk_epll", E4X12_GATE_IP_MAUDIO, 0, 0, 0), 9638c2ecf20Sopenharmony_ci GATE(CLK_MDNIE0, "mdnie0", "aclk160", GATE_IP_LCD0, 2, 0, 0), 9648c2ecf20Sopenharmony_ci GATE(CLK_ROTATOR, "rotator", "aclk200", E4X12_GATE_IP_IMAGE, 1, 0, 0), 9658c2ecf20Sopenharmony_ci GATE(CLK_MDMA, "mdma", "aclk200", E4X12_GATE_IP_IMAGE, 2, 0, 0), 9668c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MDMA, "smmu_mdma", "aclk200", E4X12_GATE_IP_IMAGE, 5, 0, 9678c2ecf20Sopenharmony_ci 0), 9688c2ecf20Sopenharmony_ci GATE(CLK_PPMUIMAGE, "ppmuimage", "aclk200", E4X12_GATE_IP_IMAGE, 9, 0, 9698c2ecf20Sopenharmony_ci 0), 9708c2ecf20Sopenharmony_ci GATE(CLK_TSADC, "tsadc", "aclk133", E4X12_GATE_BUS_FSYS1, 16, 0, 0), 9718c2ecf20Sopenharmony_ci GATE(CLK_MIPI_HSI, "mipi_hsi", "aclk133", GATE_IP_FSYS, 10, 0, 0), 9728c2ecf20Sopenharmony_ci GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, CLK_IGNORE_UNUSED, 0), 9738c2ecf20Sopenharmony_ci GATE(CLK_SYSREG, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1, 9748c2ecf20Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 9758c2ecf20Sopenharmony_ci GATE(CLK_HDMI_CEC, "hdmi_cec", "aclk100", E4X12_GATE_IP_PERIR, 11, 0, 9768c2ecf20Sopenharmony_ci 0), 9778c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MDNIE0, "sclk_mdnie0", "div_mdnie0", 9788c2ecf20Sopenharmony_ci SRC_MASK_LCD0, 4, CLK_SET_RATE_PARENT, 0), 9798c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MDNIE_PWM0, "sclk_mdnie_pwm0", "div_mdnie_pwm_pre0", 9808c2ecf20Sopenharmony_ci SRC_MASK_LCD0, 8, CLK_SET_RATE_PARENT, 0), 9818c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MIPIHSI, "sclk_mipihsi", "div_mipihsi", 9828c2ecf20Sopenharmony_ci SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), 9838c2ecf20Sopenharmony_ci GATE(CLK_SMMU_ROTATOR, "smmu_rotator", "aclk200", 9848c2ecf20Sopenharmony_ci E4X12_GATE_IP_IMAGE, 4, 0, 0), 9858c2ecf20Sopenharmony_ci GATE(CLK_MCT, "mct", "aclk100", E4X12_GATE_IP_PERIR, 13, 9868c2ecf20Sopenharmony_ci 0, 0), 9878c2ecf20Sopenharmony_ci GATE(CLK_RTC, "rtc", "aclk100", E4X12_GATE_IP_PERIR, 15, 9888c2ecf20Sopenharmony_ci 0, 0), 9898c2ecf20Sopenharmony_ci GATE(CLK_KEYIF, "keyif", "aclk100", E4X12_GATE_IP_PERIR, 16, 0, 0), 9908c2ecf20Sopenharmony_ci GATE(CLK_PWM_ISP_SCLK, "pwm_isp_sclk", "div_pwm_isp", 9918c2ecf20Sopenharmony_ci E4X12_GATE_IP_ISP, 0, 0, 0), 9928c2ecf20Sopenharmony_ci GATE(CLK_SPI0_ISP_SCLK, "spi0_isp_sclk", "div_spi0_isp_pre", 9938c2ecf20Sopenharmony_ci E4X12_GATE_IP_ISP, 1, 0, 0), 9948c2ecf20Sopenharmony_ci GATE(CLK_SPI1_ISP_SCLK, "spi1_isp_sclk", "div_spi1_isp_pre", 9958c2ecf20Sopenharmony_ci E4X12_GATE_IP_ISP, 2, 0, 0), 9968c2ecf20Sopenharmony_ci GATE(CLK_UART_ISP_SCLK, "uart_isp_sclk", "div_uart_isp", 9978c2ecf20Sopenharmony_ci E4X12_GATE_IP_ISP, 3, 0, 0), 9988c2ecf20Sopenharmony_ci GATE(CLK_WDT, "watchdog", "aclk100", E4X12_GATE_IP_PERIR, 14, 0, 0), 9998c2ecf20Sopenharmony_ci GATE(CLK_PCM0, "pcm0", "aclk100", E4X12_GATE_IP_MAUDIO, 2, 10008c2ecf20Sopenharmony_ci 0, 0), 10018c2ecf20Sopenharmony_ci GATE(CLK_I2S0, "i2s0", "aclk100", E4X12_GATE_IP_MAUDIO, 3, 10028c2ecf20Sopenharmony_ci 0, 0), 10038c2ecf20Sopenharmony_ci GATE(CLK_G2D, "g2d", "aclk200", GATE_IP_DMC, 23, 0, 0), 10048c2ecf20Sopenharmony_ci GATE(CLK_SMMU_G2D, "smmu_g2d", "aclk200", GATE_IP_DMC, 24, 0, 0), 10058c2ecf20Sopenharmony_ci GATE(CLK_TMU_APBIF, "tmu_apbif", "aclk100", E4X12_GATE_IP_PERIR, 17, 0, 10068c2ecf20Sopenharmony_ci 0), 10078c2ecf20Sopenharmony_ci}; 10088c2ecf20Sopenharmony_ci 10098c2ecf20Sopenharmony_ci/* 10108c2ecf20Sopenharmony_ci * The parent of the fin_pll clock is selected by the XOM[0] bit. This bit 10118c2ecf20Sopenharmony_ci * resides in chipid register space, outside of the clock controller memory 10128c2ecf20Sopenharmony_ci * mapped space. So to determine the parent of fin_pll clock, the chipid 10138c2ecf20Sopenharmony_ci * controller is first remapped and the value of XOM[0] bit is read to 10148c2ecf20Sopenharmony_ci * determine the parent clock. 10158c2ecf20Sopenharmony_ci */ 10168c2ecf20Sopenharmony_cistatic unsigned long __init exynos4_get_xom(void) 10178c2ecf20Sopenharmony_ci{ 10188c2ecf20Sopenharmony_ci unsigned long xom = 0; 10198c2ecf20Sopenharmony_ci void __iomem *chipid_base; 10208c2ecf20Sopenharmony_ci struct device_node *np; 10218c2ecf20Sopenharmony_ci 10228c2ecf20Sopenharmony_ci np = of_find_compatible_node(NULL, NULL, "samsung,exynos4210-chipid"); 10238c2ecf20Sopenharmony_ci if (np) { 10248c2ecf20Sopenharmony_ci chipid_base = of_iomap(np, 0); 10258c2ecf20Sopenharmony_ci 10268c2ecf20Sopenharmony_ci if (chipid_base) 10278c2ecf20Sopenharmony_ci xom = readl(chipid_base + 8); 10288c2ecf20Sopenharmony_ci 10298c2ecf20Sopenharmony_ci iounmap(chipid_base); 10308c2ecf20Sopenharmony_ci of_node_put(np); 10318c2ecf20Sopenharmony_ci } 10328c2ecf20Sopenharmony_ci 10338c2ecf20Sopenharmony_ci return xom; 10348c2ecf20Sopenharmony_ci} 10358c2ecf20Sopenharmony_ci 10368c2ecf20Sopenharmony_cistatic void __init exynos4_clk_register_finpll(struct samsung_clk_provider *ctx) 10378c2ecf20Sopenharmony_ci{ 10388c2ecf20Sopenharmony_ci struct samsung_fixed_rate_clock fclk; 10398c2ecf20Sopenharmony_ci struct clk *clk; 10408c2ecf20Sopenharmony_ci unsigned long finpll_f = 24000000; 10418c2ecf20Sopenharmony_ci char *parent_name; 10428c2ecf20Sopenharmony_ci unsigned int xom = exynos4_get_xom(); 10438c2ecf20Sopenharmony_ci 10448c2ecf20Sopenharmony_ci parent_name = xom & 1 ? "xusbxti" : "xxti"; 10458c2ecf20Sopenharmony_ci clk = clk_get(NULL, parent_name); 10468c2ecf20Sopenharmony_ci if (IS_ERR(clk)) { 10478c2ecf20Sopenharmony_ci pr_err("%s: failed to lookup parent clock %s, assuming " 10488c2ecf20Sopenharmony_ci "fin_pll clock frequency is 24MHz\n", __func__, 10498c2ecf20Sopenharmony_ci parent_name); 10508c2ecf20Sopenharmony_ci } else { 10518c2ecf20Sopenharmony_ci finpll_f = clk_get_rate(clk); 10528c2ecf20Sopenharmony_ci } 10538c2ecf20Sopenharmony_ci 10548c2ecf20Sopenharmony_ci fclk.id = CLK_FIN_PLL; 10558c2ecf20Sopenharmony_ci fclk.name = "fin_pll"; 10568c2ecf20Sopenharmony_ci fclk.parent_name = NULL; 10578c2ecf20Sopenharmony_ci fclk.flags = 0; 10588c2ecf20Sopenharmony_ci fclk.fixed_rate = finpll_f; 10598c2ecf20Sopenharmony_ci samsung_clk_register_fixed_rate(ctx, &fclk, 1); 10608c2ecf20Sopenharmony_ci 10618c2ecf20Sopenharmony_ci} 10628c2ecf20Sopenharmony_ci 10638c2ecf20Sopenharmony_cistatic const struct of_device_id ext_clk_match[] __initconst = { 10648c2ecf20Sopenharmony_ci { .compatible = "samsung,clock-xxti", .data = (void *)0, }, 10658c2ecf20Sopenharmony_ci { .compatible = "samsung,clock-xusbxti", .data = (void *)1, }, 10668c2ecf20Sopenharmony_ci {}, 10678c2ecf20Sopenharmony_ci}; 10688c2ecf20Sopenharmony_ci 10698c2ecf20Sopenharmony_ci/* PLLs PMS values */ 10708c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos4210_apll_rates[] __initconst = { 10718c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 1200000000, 150, 3, 1, 28), 10728c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 1000000000, 250, 6, 1, 28), 10738c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 800000000, 200, 6, 1, 28), 10748c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 666857142, 389, 14, 1, 13), 10758c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 600000000, 100, 4, 1, 13), 10768c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 533000000, 533, 24, 1, 5), 10778c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 500000000, 250, 6, 2, 28), 10788c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 400000000, 200, 6, 2, 28), 10798c2ecf20Sopenharmony_ci PLL_4508_RATE(24 * MHZ, 200000000, 200, 6, 3, 28), 10808c2ecf20Sopenharmony_ci { /* sentinel */ } 10818c2ecf20Sopenharmony_ci}; 10828c2ecf20Sopenharmony_ci 10838c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos4210_epll_rates[] __initconst = { 10848c2ecf20Sopenharmony_ci PLL_4600_RATE(24 * MHZ, 192000000, 48, 3, 1, 0, 0), 10858c2ecf20Sopenharmony_ci PLL_4600_RATE(24 * MHZ, 180633605, 45, 3, 1, 10381, 0), 10868c2ecf20Sopenharmony_ci PLL_4600_RATE(24 * MHZ, 180000000, 45, 3, 1, 0, 0), 10878c2ecf20Sopenharmony_ci PLL_4600_RATE(24 * MHZ, 73727996, 73, 3, 3, 47710, 1), 10888c2ecf20Sopenharmony_ci PLL_4600_RATE(24 * MHZ, 67737602, 90, 4, 3, 20762, 1), 10898c2ecf20Sopenharmony_ci PLL_4600_RATE(24 * MHZ, 49151992, 49, 3, 3, 9961, 0), 10908c2ecf20Sopenharmony_ci PLL_4600_RATE(24 * MHZ, 45158401, 45, 3, 3, 10381, 0), 10918c2ecf20Sopenharmony_ci { /* sentinel */ } 10928c2ecf20Sopenharmony_ci}; 10938c2ecf20Sopenharmony_ci 10948c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos4210_vpll_rates[] __initconst = { 10958c2ecf20Sopenharmony_ci PLL_4650_RATE(24 * MHZ, 360000000, 44, 3, 0, 1024, 0, 14, 0), 10968c2ecf20Sopenharmony_ci PLL_4650_RATE(24 * MHZ, 324000000, 53, 2, 1, 1024, 1, 1, 1), 10978c2ecf20Sopenharmony_ci PLL_4650_RATE(24 * MHZ, 259617187, 63, 3, 1, 1950, 0, 20, 1), 10988c2ecf20Sopenharmony_ci PLL_4650_RATE(24 * MHZ, 110000000, 53, 3, 2, 2048, 0, 17, 0), 10998c2ecf20Sopenharmony_ci PLL_4650_RATE(24 * MHZ, 55360351, 53, 3, 3, 2417, 0, 17, 0), 11008c2ecf20Sopenharmony_ci { /* sentinel */ } 11018c2ecf20Sopenharmony_ci}; 11028c2ecf20Sopenharmony_ci 11038c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos4x12_apll_rates[] __initconst = { 11048c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1704000000, 213, 3, 0), 11058c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1600000000, 200, 3, 0), 11068c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1500000000, 250, 4, 0), 11078c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1400000000, 175, 3, 0), 11088c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1300000000, 325, 6, 0), 11098c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1200000000, 200, 4, 0), 11108c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1100000000, 275, 6, 0), 11118c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1000000000, 125, 3, 0), 11128c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 900000000, 150, 4, 0), 11138c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 800000000, 100, 3, 0), 11148c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 700000000, 175, 3, 1), 11158c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 600000000, 200, 4, 1), 11168c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 500000000, 125, 3, 1), 11178c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 400000000, 100, 3, 1), 11188c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 300000000, 200, 4, 2), 11198c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 200000000, 100, 3, 2), 11208c2ecf20Sopenharmony_ci { /* sentinel */ } 11218c2ecf20Sopenharmony_ci}; 11228c2ecf20Sopenharmony_ci 11238c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos4x12_epll_rates[] __initconst = { 11248c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 196608001, 197, 3, 3, -25690), 11258c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 192000000, 48, 3, 1, 0), 11268c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 180633605, 45, 3, 1, 10381), 11278c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 180000000, 45, 3, 1, 0), 11288c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 73727996, 73, 3, 3, 47710), 11298c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 67737602, 90, 4, 3, 20762), 11308c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 49151992, 49, 3, 3, 9961), 11318c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 45158401, 45, 3, 3, 10381), 11328c2ecf20Sopenharmony_ci { /* sentinel */ } 11338c2ecf20Sopenharmony_ci}; 11348c2ecf20Sopenharmony_ci 11358c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos4x12_vpll_rates[] __initconst = { 11368c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 533000000, 133, 3, 1, 16384), 11378c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 440000000, 110, 3, 1, 0), 11388c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 350000000, 175, 3, 2, 0), 11398c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 266000000, 133, 3, 2, 0), 11408c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 160000000, 160, 3, 3, 0), 11418c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 106031250, 53, 3, 2, 1024), 11428c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 53015625, 53, 3, 3, 1024), 11438c2ecf20Sopenharmony_ci { /* sentinel */ } 11448c2ecf20Sopenharmony_ci}; 11458c2ecf20Sopenharmony_ci 11468c2ecf20Sopenharmony_cistatic struct samsung_pll_clock exynos4210_plls[nr_plls] __initdata = { 11478c2ecf20Sopenharmony_ci [apll] = PLL(pll_4508, CLK_FOUT_APLL, "fout_apll", "fin_pll", 11488c2ecf20Sopenharmony_ci APLL_LOCK, APLL_CON0, NULL), 11498c2ecf20Sopenharmony_ci [mpll] = PLL(pll_4508, CLK_FOUT_MPLL, "fout_mpll", "fin_pll", 11508c2ecf20Sopenharmony_ci E4210_MPLL_LOCK, E4210_MPLL_CON0, NULL), 11518c2ecf20Sopenharmony_ci [epll] = PLL(pll_4600, CLK_FOUT_EPLL, "fout_epll", "fin_pll", 11528c2ecf20Sopenharmony_ci EPLL_LOCK, EPLL_CON0, NULL), 11538c2ecf20Sopenharmony_ci [vpll] = PLL(pll_4650c, CLK_FOUT_VPLL, "fout_vpll", "mout_vpllsrc", 11548c2ecf20Sopenharmony_ci VPLL_LOCK, VPLL_CON0, NULL), 11558c2ecf20Sopenharmony_ci}; 11568c2ecf20Sopenharmony_ci 11578c2ecf20Sopenharmony_cistatic struct samsung_pll_clock exynos4x12_plls[nr_plls] __initdata = { 11588c2ecf20Sopenharmony_ci [apll] = PLL(pll_35xx, CLK_FOUT_APLL, "fout_apll", "fin_pll", 11598c2ecf20Sopenharmony_ci APLL_LOCK, APLL_CON0, NULL), 11608c2ecf20Sopenharmony_ci [mpll] = PLL(pll_35xx, CLK_FOUT_MPLL, "fout_mpll", "fin_pll", 11618c2ecf20Sopenharmony_ci E4X12_MPLL_LOCK, E4X12_MPLL_CON0, NULL), 11628c2ecf20Sopenharmony_ci [epll] = PLL(pll_36xx, CLK_FOUT_EPLL, "fout_epll", "fin_pll", 11638c2ecf20Sopenharmony_ci EPLL_LOCK, EPLL_CON0, NULL), 11648c2ecf20Sopenharmony_ci [vpll] = PLL(pll_36xx, CLK_FOUT_VPLL, "fout_vpll", "fin_pll", 11658c2ecf20Sopenharmony_ci VPLL_LOCK, VPLL_CON0, NULL), 11668c2ecf20Sopenharmony_ci}; 11678c2ecf20Sopenharmony_ci 11688c2ecf20Sopenharmony_cistatic void __init exynos4x12_core_down_clock(void) 11698c2ecf20Sopenharmony_ci{ 11708c2ecf20Sopenharmony_ci unsigned int tmp; 11718c2ecf20Sopenharmony_ci 11728c2ecf20Sopenharmony_ci /* 11738c2ecf20Sopenharmony_ci * Enable arm clock down (in idle) and set arm divider 11748c2ecf20Sopenharmony_ci * ratios in WFI/WFE state. 11758c2ecf20Sopenharmony_ci */ 11768c2ecf20Sopenharmony_ci tmp = (PWR_CTRL1_CORE2_DOWN_RATIO(7) | PWR_CTRL1_CORE1_DOWN_RATIO(7) | 11778c2ecf20Sopenharmony_ci PWR_CTRL1_DIV2_DOWN_EN | PWR_CTRL1_DIV1_DOWN_EN | 11788c2ecf20Sopenharmony_ci PWR_CTRL1_USE_CORE1_WFE | PWR_CTRL1_USE_CORE0_WFE | 11798c2ecf20Sopenharmony_ci PWR_CTRL1_USE_CORE1_WFI | PWR_CTRL1_USE_CORE0_WFI); 11808c2ecf20Sopenharmony_ci /* On Exynos4412 enable it also on core 2 and 3 */ 11818c2ecf20Sopenharmony_ci if (num_possible_cpus() == 4) 11828c2ecf20Sopenharmony_ci tmp |= PWR_CTRL1_USE_CORE3_WFE | PWR_CTRL1_USE_CORE2_WFE | 11838c2ecf20Sopenharmony_ci PWR_CTRL1_USE_CORE3_WFI | PWR_CTRL1_USE_CORE2_WFI; 11848c2ecf20Sopenharmony_ci writel_relaxed(tmp, reg_base + PWR_CTRL1); 11858c2ecf20Sopenharmony_ci 11868c2ecf20Sopenharmony_ci /* 11878c2ecf20Sopenharmony_ci * Disable the clock up feature in case it was enabled by bootloader. 11888c2ecf20Sopenharmony_ci */ 11898c2ecf20Sopenharmony_ci writel_relaxed(0x0, reg_base + E4X12_PWR_CTRL2); 11908c2ecf20Sopenharmony_ci} 11918c2ecf20Sopenharmony_ci 11928c2ecf20Sopenharmony_ci#define E4210_CPU_DIV0(apll, pclk_dbg, atb, periph, corem1, corem0) \ 11938c2ecf20Sopenharmony_ci (((apll) << 24) | ((pclk_dbg) << 20) | ((atb) << 16) | \ 11948c2ecf20Sopenharmony_ci ((periph) << 12) | ((corem1) << 8) | ((corem0) << 4)) 11958c2ecf20Sopenharmony_ci#define E4210_CPU_DIV1(hpm, copy) \ 11968c2ecf20Sopenharmony_ci (((hpm) << 4) | ((copy) << 0)) 11978c2ecf20Sopenharmony_ci 11988c2ecf20Sopenharmony_cistatic const struct exynos_cpuclk_cfg_data e4210_armclk_d[] __initconst = { 11998c2ecf20Sopenharmony_ci { 1200000, E4210_CPU_DIV0(7, 1, 4, 3, 7, 3), E4210_CPU_DIV1(0, 5), }, 12008c2ecf20Sopenharmony_ci { 1000000, E4210_CPU_DIV0(7, 1, 4, 3, 7, 3), E4210_CPU_DIV1(0, 4), }, 12018c2ecf20Sopenharmony_ci { 800000, E4210_CPU_DIV0(7, 1, 3, 3, 7, 3), E4210_CPU_DIV1(0, 3), }, 12028c2ecf20Sopenharmony_ci { 500000, E4210_CPU_DIV0(7, 1, 3, 3, 7, 3), E4210_CPU_DIV1(0, 3), }, 12038c2ecf20Sopenharmony_ci { 400000, E4210_CPU_DIV0(7, 1, 3, 3, 7, 3), E4210_CPU_DIV1(0, 3), }, 12048c2ecf20Sopenharmony_ci { 200000, E4210_CPU_DIV0(0, 1, 1, 1, 3, 1), E4210_CPU_DIV1(0, 3), }, 12058c2ecf20Sopenharmony_ci { 0 }, 12068c2ecf20Sopenharmony_ci}; 12078c2ecf20Sopenharmony_ci 12088c2ecf20Sopenharmony_ci#define E4412_CPU_DIV1(cores, hpm, copy) \ 12098c2ecf20Sopenharmony_ci (((cores) << 8) | ((hpm) << 4) | ((copy) << 0)) 12108c2ecf20Sopenharmony_ci 12118c2ecf20Sopenharmony_cistatic const struct exynos_cpuclk_cfg_data e4412_armclk_d[] __initconst = { 12128c2ecf20Sopenharmony_ci { 1704000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(7, 0, 7), }, 12138c2ecf20Sopenharmony_ci { 1600000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(7, 0, 6), }, 12148c2ecf20Sopenharmony_ci { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(7, 0, 6), }, 12158c2ecf20Sopenharmony_ci { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(6, 0, 6), }, 12168c2ecf20Sopenharmony_ci { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(6, 0, 5), }, 12178c2ecf20Sopenharmony_ci { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(5, 0, 5), }, 12188c2ecf20Sopenharmony_ci { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4412_CPU_DIV1(5, 0, 4), }, 12198c2ecf20Sopenharmony_ci { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4412_CPU_DIV1(4, 0, 4), }, 12208c2ecf20Sopenharmony_ci { 900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(4, 0, 3), }, 12218c2ecf20Sopenharmony_ci { 800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(3, 0, 3), }, 12228c2ecf20Sopenharmony_ci { 700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(3, 0, 3), }, 12238c2ecf20Sopenharmony_ci { 600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0, 3), }, 12248c2ecf20Sopenharmony_ci { 500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0, 3), }, 12258c2ecf20Sopenharmony_ci { 400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(1, 0, 3), }, 12268c2ecf20Sopenharmony_ci { 300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4412_CPU_DIV1(1, 0, 3), }, 12278c2ecf20Sopenharmony_ci { 200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4412_CPU_DIV1(0, 0, 3), }, 12288c2ecf20Sopenharmony_ci { 0 }, 12298c2ecf20Sopenharmony_ci}; 12308c2ecf20Sopenharmony_ci 12318c2ecf20Sopenharmony_ci/* register exynos4 clocks */ 12328c2ecf20Sopenharmony_cistatic void __init exynos4_clk_init(struct device_node *np, 12338c2ecf20Sopenharmony_ci enum exynos4_soc soc) 12348c2ecf20Sopenharmony_ci{ 12358c2ecf20Sopenharmony_ci struct samsung_clk_provider *ctx; 12368c2ecf20Sopenharmony_ci struct clk_hw **hws; 12378c2ecf20Sopenharmony_ci 12388c2ecf20Sopenharmony_ci exynos4_soc = soc; 12398c2ecf20Sopenharmony_ci 12408c2ecf20Sopenharmony_ci reg_base = of_iomap(np, 0); 12418c2ecf20Sopenharmony_ci if (!reg_base) 12428c2ecf20Sopenharmony_ci panic("%s: failed to map registers\n", __func__); 12438c2ecf20Sopenharmony_ci 12448c2ecf20Sopenharmony_ci ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS); 12458c2ecf20Sopenharmony_ci hws = ctx->clk_data.hws; 12468c2ecf20Sopenharmony_ci 12478c2ecf20Sopenharmony_ci samsung_clk_of_register_fixed_ext(ctx, exynos4_fixed_rate_ext_clks, 12488c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4_fixed_rate_ext_clks), 12498c2ecf20Sopenharmony_ci ext_clk_match); 12508c2ecf20Sopenharmony_ci 12518c2ecf20Sopenharmony_ci exynos4_clk_register_finpll(ctx); 12528c2ecf20Sopenharmony_ci 12538c2ecf20Sopenharmony_ci if (exynos4_soc == EXYNOS4210) { 12548c2ecf20Sopenharmony_ci samsung_clk_register_mux(ctx, exynos4210_mux_early, 12558c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4210_mux_early)); 12568c2ecf20Sopenharmony_ci 12578c2ecf20Sopenharmony_ci if (_get_rate("fin_pll") == 24000000) { 12588c2ecf20Sopenharmony_ci exynos4210_plls[apll].rate_table = 12598c2ecf20Sopenharmony_ci exynos4210_apll_rates; 12608c2ecf20Sopenharmony_ci exynos4210_plls[epll].rate_table = 12618c2ecf20Sopenharmony_ci exynos4210_epll_rates; 12628c2ecf20Sopenharmony_ci } 12638c2ecf20Sopenharmony_ci 12648c2ecf20Sopenharmony_ci if (_get_rate("mout_vpllsrc") == 24000000) 12658c2ecf20Sopenharmony_ci exynos4210_plls[vpll].rate_table = 12668c2ecf20Sopenharmony_ci exynos4210_vpll_rates; 12678c2ecf20Sopenharmony_ci 12688c2ecf20Sopenharmony_ci samsung_clk_register_pll(ctx, exynos4210_plls, 12698c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4210_plls), reg_base); 12708c2ecf20Sopenharmony_ci } else { 12718c2ecf20Sopenharmony_ci if (_get_rate("fin_pll") == 24000000) { 12728c2ecf20Sopenharmony_ci exynos4x12_plls[apll].rate_table = 12738c2ecf20Sopenharmony_ci exynos4x12_apll_rates; 12748c2ecf20Sopenharmony_ci exynos4x12_plls[epll].rate_table = 12758c2ecf20Sopenharmony_ci exynos4x12_epll_rates; 12768c2ecf20Sopenharmony_ci exynos4x12_plls[vpll].rate_table = 12778c2ecf20Sopenharmony_ci exynos4x12_vpll_rates; 12788c2ecf20Sopenharmony_ci } 12798c2ecf20Sopenharmony_ci 12808c2ecf20Sopenharmony_ci samsung_clk_register_pll(ctx, exynos4x12_plls, 12818c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4x12_plls), reg_base); 12828c2ecf20Sopenharmony_ci } 12838c2ecf20Sopenharmony_ci 12848c2ecf20Sopenharmony_ci samsung_clk_register_fixed_rate(ctx, exynos4_fixed_rate_clks, 12858c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4_fixed_rate_clks)); 12868c2ecf20Sopenharmony_ci samsung_clk_register_mux(ctx, exynos4_mux_clks, 12878c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4_mux_clks)); 12888c2ecf20Sopenharmony_ci samsung_clk_register_div(ctx, exynos4_div_clks, 12898c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4_div_clks)); 12908c2ecf20Sopenharmony_ci samsung_clk_register_gate(ctx, exynos4_gate_clks, 12918c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4_gate_clks)); 12928c2ecf20Sopenharmony_ci samsung_clk_register_fixed_factor(ctx, exynos4_fixed_factor_clks, 12938c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4_fixed_factor_clks)); 12948c2ecf20Sopenharmony_ci 12958c2ecf20Sopenharmony_ci if (exynos4_soc == EXYNOS4210) { 12968c2ecf20Sopenharmony_ci samsung_clk_register_fixed_rate(ctx, exynos4210_fixed_rate_clks, 12978c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4210_fixed_rate_clks)); 12988c2ecf20Sopenharmony_ci samsung_clk_register_mux(ctx, exynos4210_mux_clks, 12998c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4210_mux_clks)); 13008c2ecf20Sopenharmony_ci samsung_clk_register_div(ctx, exynos4210_div_clks, 13018c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4210_div_clks)); 13028c2ecf20Sopenharmony_ci samsung_clk_register_gate(ctx, exynos4210_gate_clks, 13038c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4210_gate_clks)); 13048c2ecf20Sopenharmony_ci samsung_clk_register_fixed_factor(ctx, 13058c2ecf20Sopenharmony_ci exynos4210_fixed_factor_clks, 13068c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4210_fixed_factor_clks)); 13078c2ecf20Sopenharmony_ci exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk", 13088c2ecf20Sopenharmony_ci hws[CLK_MOUT_APLL], hws[CLK_SCLK_MPLL], 0x14200, 13098c2ecf20Sopenharmony_ci e4210_armclk_d, ARRAY_SIZE(e4210_armclk_d), 13108c2ecf20Sopenharmony_ci CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1); 13118c2ecf20Sopenharmony_ci } else { 13128c2ecf20Sopenharmony_ci samsung_clk_register_mux(ctx, exynos4x12_mux_clks, 13138c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4x12_mux_clks)); 13148c2ecf20Sopenharmony_ci samsung_clk_register_div(ctx, exynos4x12_div_clks, 13158c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4x12_div_clks)); 13168c2ecf20Sopenharmony_ci samsung_clk_register_gate(ctx, exynos4x12_gate_clks, 13178c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4x12_gate_clks)); 13188c2ecf20Sopenharmony_ci samsung_clk_register_fixed_factor(ctx, 13198c2ecf20Sopenharmony_ci exynos4x12_fixed_factor_clks, 13208c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4x12_fixed_factor_clks)); 13218c2ecf20Sopenharmony_ci 13228c2ecf20Sopenharmony_ci exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk", 13238c2ecf20Sopenharmony_ci hws[CLK_MOUT_APLL], hws[CLK_MOUT_MPLL_USER_C], 0x14200, 13248c2ecf20Sopenharmony_ci e4412_armclk_d, ARRAY_SIZE(e4412_armclk_d), 13258c2ecf20Sopenharmony_ci CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1); 13268c2ecf20Sopenharmony_ci } 13278c2ecf20Sopenharmony_ci 13288c2ecf20Sopenharmony_ci if (soc == EXYNOS4X12) 13298c2ecf20Sopenharmony_ci exynos4x12_core_down_clock(); 13308c2ecf20Sopenharmony_ci 13318c2ecf20Sopenharmony_ci samsung_clk_extended_sleep_init(reg_base, 13328c2ecf20Sopenharmony_ci exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs), 13338c2ecf20Sopenharmony_ci src_mask_suspend, ARRAY_SIZE(src_mask_suspend)); 13348c2ecf20Sopenharmony_ci if (exynos4_soc == EXYNOS4210) 13358c2ecf20Sopenharmony_ci samsung_clk_extended_sleep_init(reg_base, 13368c2ecf20Sopenharmony_ci exynos4210_clk_save, ARRAY_SIZE(exynos4210_clk_save), 13378c2ecf20Sopenharmony_ci src_mask_suspend_e4210, ARRAY_SIZE(src_mask_suspend_e4210)); 13388c2ecf20Sopenharmony_ci else 13398c2ecf20Sopenharmony_ci samsung_clk_sleep_init(reg_base, exynos4x12_clk_save, 13408c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos4x12_clk_save)); 13418c2ecf20Sopenharmony_ci 13428c2ecf20Sopenharmony_ci samsung_clk_of_add_provider(np, ctx); 13438c2ecf20Sopenharmony_ci 13448c2ecf20Sopenharmony_ci pr_info("%s clocks: sclk_apll = %ld, sclk_mpll = %ld\n" 13458c2ecf20Sopenharmony_ci "\tsclk_epll = %ld, sclk_vpll = %ld, arm_clk = %ld\n", 13468c2ecf20Sopenharmony_ci exynos4_soc == EXYNOS4210 ? "Exynos4210" : "Exynos4x12", 13478c2ecf20Sopenharmony_ci _get_rate("sclk_apll"), _get_rate("sclk_mpll"), 13488c2ecf20Sopenharmony_ci _get_rate("sclk_epll"), _get_rate("sclk_vpll"), 13498c2ecf20Sopenharmony_ci _get_rate("div_core2")); 13508c2ecf20Sopenharmony_ci} 13518c2ecf20Sopenharmony_ci 13528c2ecf20Sopenharmony_ci 13538c2ecf20Sopenharmony_cistatic void __init exynos4210_clk_init(struct device_node *np) 13548c2ecf20Sopenharmony_ci{ 13558c2ecf20Sopenharmony_ci exynos4_clk_init(np, EXYNOS4210); 13568c2ecf20Sopenharmony_ci} 13578c2ecf20Sopenharmony_ciCLK_OF_DECLARE(exynos4210_clk, "samsung,exynos4210-clock", exynos4210_clk_init); 13588c2ecf20Sopenharmony_ci 13598c2ecf20Sopenharmony_cistatic void __init exynos4412_clk_init(struct device_node *np) 13608c2ecf20Sopenharmony_ci{ 13618c2ecf20Sopenharmony_ci exynos4_clk_init(np, EXYNOS4X12); 13628c2ecf20Sopenharmony_ci} 13638c2ecf20Sopenharmony_ciCLK_OF_DECLARE(exynos4412_clk, "samsung,exynos4412-clock", exynos4412_clk_init); 1364