18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2013 Samsung Electronics Co., Ltd. 48c2ecf20Sopenharmony_ci * Authors: Thomas Abraham <thomas.ab@samsung.com> 58c2ecf20Sopenharmony_ci * Chander Kashyap <k.chander@samsung.com> 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Common Clock Framework support for Exynos5420 SoC. 88c2ecf20Sopenharmony_ci*/ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <dt-bindings/clock/exynos5420.h> 118c2ecf20Sopenharmony_ci#include <linux/slab.h> 128c2ecf20Sopenharmony_ci#include <linux/clk-provider.h> 138c2ecf20Sopenharmony_ci#include <linux/of.h> 148c2ecf20Sopenharmony_ci#include <linux/of_address.h> 158c2ecf20Sopenharmony_ci#include <linux/clk.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#include "clk.h" 188c2ecf20Sopenharmony_ci#include "clk-cpu.h" 198c2ecf20Sopenharmony_ci#include "clk-exynos5-subcmu.h" 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define APLL_LOCK 0x0 228c2ecf20Sopenharmony_ci#define APLL_CON0 0x100 238c2ecf20Sopenharmony_ci#define SRC_CPU 0x200 248c2ecf20Sopenharmony_ci#define DIV_CPU0 0x500 258c2ecf20Sopenharmony_ci#define DIV_CPU1 0x504 268c2ecf20Sopenharmony_ci#define GATE_BUS_CPU 0x700 278c2ecf20Sopenharmony_ci#define GATE_SCLK_CPU 0x800 288c2ecf20Sopenharmony_ci#define CLKOUT_CMU_CPU 0xa00 298c2ecf20Sopenharmony_ci#define SRC_MASK_CPERI 0x4300 308c2ecf20Sopenharmony_ci#define GATE_IP_G2D 0x8800 318c2ecf20Sopenharmony_ci#define CPLL_LOCK 0x10020 328c2ecf20Sopenharmony_ci#define DPLL_LOCK 0x10030 338c2ecf20Sopenharmony_ci#define EPLL_LOCK 0x10040 348c2ecf20Sopenharmony_ci#define RPLL_LOCK 0x10050 358c2ecf20Sopenharmony_ci#define IPLL_LOCK 0x10060 368c2ecf20Sopenharmony_ci#define SPLL_LOCK 0x10070 378c2ecf20Sopenharmony_ci#define VPLL_LOCK 0x10080 388c2ecf20Sopenharmony_ci#define MPLL_LOCK 0x10090 398c2ecf20Sopenharmony_ci#define CPLL_CON0 0x10120 408c2ecf20Sopenharmony_ci#define DPLL_CON0 0x10128 418c2ecf20Sopenharmony_ci#define EPLL_CON0 0x10130 428c2ecf20Sopenharmony_ci#define EPLL_CON1 0x10134 438c2ecf20Sopenharmony_ci#define EPLL_CON2 0x10138 448c2ecf20Sopenharmony_ci#define RPLL_CON0 0x10140 458c2ecf20Sopenharmony_ci#define RPLL_CON1 0x10144 468c2ecf20Sopenharmony_ci#define RPLL_CON2 0x10148 478c2ecf20Sopenharmony_ci#define IPLL_CON0 0x10150 488c2ecf20Sopenharmony_ci#define SPLL_CON0 0x10160 498c2ecf20Sopenharmony_ci#define VPLL_CON0 0x10170 508c2ecf20Sopenharmony_ci#define MPLL_CON0 0x10180 518c2ecf20Sopenharmony_ci#define SRC_TOP0 0x10200 528c2ecf20Sopenharmony_ci#define SRC_TOP1 0x10204 538c2ecf20Sopenharmony_ci#define SRC_TOP2 0x10208 548c2ecf20Sopenharmony_ci#define SRC_TOP3 0x1020c 558c2ecf20Sopenharmony_ci#define SRC_TOP4 0x10210 568c2ecf20Sopenharmony_ci#define SRC_TOP5 0x10214 578c2ecf20Sopenharmony_ci#define SRC_TOP6 0x10218 588c2ecf20Sopenharmony_ci#define SRC_TOP7 0x1021c 598c2ecf20Sopenharmony_ci#define SRC_TOP8 0x10220 /* 5800 specific */ 608c2ecf20Sopenharmony_ci#define SRC_TOP9 0x10224 /* 5800 specific */ 618c2ecf20Sopenharmony_ci#define SRC_DISP10 0x1022c 628c2ecf20Sopenharmony_ci#define SRC_MAU 0x10240 638c2ecf20Sopenharmony_ci#define SRC_FSYS 0x10244 648c2ecf20Sopenharmony_ci#define SRC_PERIC0 0x10250 658c2ecf20Sopenharmony_ci#define SRC_PERIC1 0x10254 668c2ecf20Sopenharmony_ci#define SRC_ISP 0x10270 678c2ecf20Sopenharmony_ci#define SRC_CAM 0x10274 /* 5800 specific */ 688c2ecf20Sopenharmony_ci#define SRC_TOP10 0x10280 698c2ecf20Sopenharmony_ci#define SRC_TOP11 0x10284 708c2ecf20Sopenharmony_ci#define SRC_TOP12 0x10288 718c2ecf20Sopenharmony_ci#define SRC_TOP13 0x1028c /* 5800 specific */ 728c2ecf20Sopenharmony_ci#define SRC_MASK_TOP0 0x10300 738c2ecf20Sopenharmony_ci#define SRC_MASK_TOP1 0x10304 748c2ecf20Sopenharmony_ci#define SRC_MASK_TOP2 0x10308 758c2ecf20Sopenharmony_ci#define SRC_MASK_TOP7 0x1031c 768c2ecf20Sopenharmony_ci#define SRC_MASK_DISP10 0x1032c 778c2ecf20Sopenharmony_ci#define SRC_MASK_MAU 0x10334 788c2ecf20Sopenharmony_ci#define SRC_MASK_FSYS 0x10340 798c2ecf20Sopenharmony_ci#define SRC_MASK_PERIC0 0x10350 808c2ecf20Sopenharmony_ci#define SRC_MASK_PERIC1 0x10354 818c2ecf20Sopenharmony_ci#define SRC_MASK_ISP 0x10370 828c2ecf20Sopenharmony_ci#define DIV_TOP0 0x10500 838c2ecf20Sopenharmony_ci#define DIV_TOP1 0x10504 848c2ecf20Sopenharmony_ci#define DIV_TOP2 0x10508 858c2ecf20Sopenharmony_ci#define DIV_TOP8 0x10520 /* 5800 specific */ 868c2ecf20Sopenharmony_ci#define DIV_TOP9 0x10524 /* 5800 specific */ 878c2ecf20Sopenharmony_ci#define DIV_DISP10 0x1052c 888c2ecf20Sopenharmony_ci#define DIV_MAU 0x10544 898c2ecf20Sopenharmony_ci#define DIV_FSYS0 0x10548 908c2ecf20Sopenharmony_ci#define DIV_FSYS1 0x1054c 918c2ecf20Sopenharmony_ci#define DIV_FSYS2 0x10550 928c2ecf20Sopenharmony_ci#define DIV_PERIC0 0x10558 938c2ecf20Sopenharmony_ci#define DIV_PERIC1 0x1055c 948c2ecf20Sopenharmony_ci#define DIV_PERIC2 0x10560 958c2ecf20Sopenharmony_ci#define DIV_PERIC3 0x10564 968c2ecf20Sopenharmony_ci#define DIV_PERIC4 0x10568 978c2ecf20Sopenharmony_ci#define DIV_CAM 0x10574 /* 5800 specific */ 988c2ecf20Sopenharmony_ci#define SCLK_DIV_ISP0 0x10580 998c2ecf20Sopenharmony_ci#define SCLK_DIV_ISP1 0x10584 1008c2ecf20Sopenharmony_ci#define DIV2_RATIO0 0x10590 1018c2ecf20Sopenharmony_ci#define DIV4_RATIO 0x105a0 1028c2ecf20Sopenharmony_ci#define GATE_BUS_TOP 0x10700 1038c2ecf20Sopenharmony_ci#define GATE_BUS_DISP1 0x10728 1048c2ecf20Sopenharmony_ci#define GATE_BUS_GEN 0x1073c 1058c2ecf20Sopenharmony_ci#define GATE_BUS_FSYS0 0x10740 1068c2ecf20Sopenharmony_ci#define GATE_BUS_FSYS2 0x10748 1078c2ecf20Sopenharmony_ci#define GATE_BUS_PERIC 0x10750 1088c2ecf20Sopenharmony_ci#define GATE_BUS_PERIC1 0x10754 1098c2ecf20Sopenharmony_ci#define GATE_BUS_PERIS0 0x10760 1108c2ecf20Sopenharmony_ci#define GATE_BUS_PERIS1 0x10764 1118c2ecf20Sopenharmony_ci#define GATE_BUS_NOC 0x10770 1128c2ecf20Sopenharmony_ci#define GATE_TOP_SCLK_ISP 0x10870 1138c2ecf20Sopenharmony_ci#define GATE_IP_GSCL0 0x10910 1148c2ecf20Sopenharmony_ci#define GATE_IP_GSCL1 0x10920 1158c2ecf20Sopenharmony_ci#define GATE_IP_CAM 0x10924 /* 5800 specific */ 1168c2ecf20Sopenharmony_ci#define GATE_IP_MFC 0x1092c 1178c2ecf20Sopenharmony_ci#define GATE_IP_DISP1 0x10928 1188c2ecf20Sopenharmony_ci#define GATE_IP_G3D 0x10930 1198c2ecf20Sopenharmony_ci#define GATE_IP_GEN 0x10934 1208c2ecf20Sopenharmony_ci#define GATE_IP_FSYS 0x10944 1218c2ecf20Sopenharmony_ci#define GATE_IP_PERIC 0x10950 1228c2ecf20Sopenharmony_ci#define GATE_IP_PERIS 0x10960 1238c2ecf20Sopenharmony_ci#define GATE_IP_MSCL 0x10970 1248c2ecf20Sopenharmony_ci#define GATE_TOP_SCLK_GSCL 0x10820 1258c2ecf20Sopenharmony_ci#define GATE_TOP_SCLK_DISP1 0x10828 1268c2ecf20Sopenharmony_ci#define GATE_TOP_SCLK_MAU 0x1083c 1278c2ecf20Sopenharmony_ci#define GATE_TOP_SCLK_FSYS 0x10840 1288c2ecf20Sopenharmony_ci#define GATE_TOP_SCLK_PERIC 0x10850 1298c2ecf20Sopenharmony_ci#define TOP_SPARE2 0x10b08 1308c2ecf20Sopenharmony_ci#define BPLL_LOCK 0x20010 1318c2ecf20Sopenharmony_ci#define BPLL_CON0 0x20110 1328c2ecf20Sopenharmony_ci#define SRC_CDREX 0x20200 1338c2ecf20Sopenharmony_ci#define DIV_CDREX0 0x20500 1348c2ecf20Sopenharmony_ci#define DIV_CDREX1 0x20504 1358c2ecf20Sopenharmony_ci#define GATE_BUS_CDREX0 0x20700 1368c2ecf20Sopenharmony_ci#define GATE_BUS_CDREX1 0x20704 1378c2ecf20Sopenharmony_ci#define KPLL_LOCK 0x28000 1388c2ecf20Sopenharmony_ci#define KPLL_CON0 0x28100 1398c2ecf20Sopenharmony_ci#define SRC_KFC 0x28200 1408c2ecf20Sopenharmony_ci#define DIV_KFC0 0x28500 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci/* Exynos5x SoC type */ 1438c2ecf20Sopenharmony_cienum exynos5x_soc { 1448c2ecf20Sopenharmony_ci EXYNOS5420, 1458c2ecf20Sopenharmony_ci EXYNOS5800, 1468c2ecf20Sopenharmony_ci}; 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci/* list of PLLs */ 1498c2ecf20Sopenharmony_cienum exynos5x_plls { 1508c2ecf20Sopenharmony_ci apll, cpll, dpll, epll, rpll, ipll, spll, vpll, mpll, 1518c2ecf20Sopenharmony_ci bpll, kpll, 1528c2ecf20Sopenharmony_ci nr_plls /* number of PLLs */ 1538c2ecf20Sopenharmony_ci}; 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_cistatic void __iomem *reg_base; 1568c2ecf20Sopenharmony_cistatic enum exynos5x_soc exynos5x_soc; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci/* 1598c2ecf20Sopenharmony_ci * list of controller registers to be saved and restored during a 1608c2ecf20Sopenharmony_ci * suspend/resume cycle. 1618c2ecf20Sopenharmony_ci */ 1628c2ecf20Sopenharmony_cistatic const unsigned long exynos5x_clk_regs[] __initconst = { 1638c2ecf20Sopenharmony_ci SRC_CPU, 1648c2ecf20Sopenharmony_ci DIV_CPU0, 1658c2ecf20Sopenharmony_ci DIV_CPU1, 1668c2ecf20Sopenharmony_ci GATE_BUS_CPU, 1678c2ecf20Sopenharmony_ci GATE_SCLK_CPU, 1688c2ecf20Sopenharmony_ci CLKOUT_CMU_CPU, 1698c2ecf20Sopenharmony_ci APLL_CON0, 1708c2ecf20Sopenharmony_ci KPLL_CON0, 1718c2ecf20Sopenharmony_ci CPLL_CON0, 1728c2ecf20Sopenharmony_ci DPLL_CON0, 1738c2ecf20Sopenharmony_ci EPLL_CON0, 1748c2ecf20Sopenharmony_ci EPLL_CON1, 1758c2ecf20Sopenharmony_ci EPLL_CON2, 1768c2ecf20Sopenharmony_ci RPLL_CON0, 1778c2ecf20Sopenharmony_ci RPLL_CON1, 1788c2ecf20Sopenharmony_ci RPLL_CON2, 1798c2ecf20Sopenharmony_ci IPLL_CON0, 1808c2ecf20Sopenharmony_ci SPLL_CON0, 1818c2ecf20Sopenharmony_ci VPLL_CON0, 1828c2ecf20Sopenharmony_ci MPLL_CON0, 1838c2ecf20Sopenharmony_ci SRC_TOP0, 1848c2ecf20Sopenharmony_ci SRC_TOP1, 1858c2ecf20Sopenharmony_ci SRC_TOP2, 1868c2ecf20Sopenharmony_ci SRC_TOP3, 1878c2ecf20Sopenharmony_ci SRC_TOP4, 1888c2ecf20Sopenharmony_ci SRC_TOP5, 1898c2ecf20Sopenharmony_ci SRC_TOP6, 1908c2ecf20Sopenharmony_ci SRC_TOP7, 1918c2ecf20Sopenharmony_ci SRC_DISP10, 1928c2ecf20Sopenharmony_ci SRC_MAU, 1938c2ecf20Sopenharmony_ci SRC_FSYS, 1948c2ecf20Sopenharmony_ci SRC_PERIC0, 1958c2ecf20Sopenharmony_ci SRC_PERIC1, 1968c2ecf20Sopenharmony_ci SRC_TOP10, 1978c2ecf20Sopenharmony_ci SRC_TOP11, 1988c2ecf20Sopenharmony_ci SRC_TOP12, 1998c2ecf20Sopenharmony_ci SRC_MASK_TOP2, 2008c2ecf20Sopenharmony_ci SRC_MASK_TOP7, 2018c2ecf20Sopenharmony_ci SRC_MASK_DISP10, 2028c2ecf20Sopenharmony_ci SRC_MASK_FSYS, 2038c2ecf20Sopenharmony_ci SRC_MASK_PERIC0, 2048c2ecf20Sopenharmony_ci SRC_MASK_PERIC1, 2058c2ecf20Sopenharmony_ci SRC_MASK_TOP0, 2068c2ecf20Sopenharmony_ci SRC_MASK_TOP1, 2078c2ecf20Sopenharmony_ci SRC_MASK_MAU, 2088c2ecf20Sopenharmony_ci SRC_MASK_ISP, 2098c2ecf20Sopenharmony_ci SRC_ISP, 2108c2ecf20Sopenharmony_ci DIV_TOP0, 2118c2ecf20Sopenharmony_ci DIV_TOP1, 2128c2ecf20Sopenharmony_ci DIV_TOP2, 2138c2ecf20Sopenharmony_ci DIV_DISP10, 2148c2ecf20Sopenharmony_ci DIV_MAU, 2158c2ecf20Sopenharmony_ci DIV_FSYS0, 2168c2ecf20Sopenharmony_ci DIV_FSYS1, 2178c2ecf20Sopenharmony_ci DIV_FSYS2, 2188c2ecf20Sopenharmony_ci DIV_PERIC0, 2198c2ecf20Sopenharmony_ci DIV_PERIC1, 2208c2ecf20Sopenharmony_ci DIV_PERIC2, 2218c2ecf20Sopenharmony_ci DIV_PERIC3, 2228c2ecf20Sopenharmony_ci DIV_PERIC4, 2238c2ecf20Sopenharmony_ci SCLK_DIV_ISP0, 2248c2ecf20Sopenharmony_ci SCLK_DIV_ISP1, 2258c2ecf20Sopenharmony_ci DIV2_RATIO0, 2268c2ecf20Sopenharmony_ci DIV4_RATIO, 2278c2ecf20Sopenharmony_ci GATE_BUS_DISP1, 2288c2ecf20Sopenharmony_ci GATE_BUS_TOP, 2298c2ecf20Sopenharmony_ci GATE_BUS_GEN, 2308c2ecf20Sopenharmony_ci GATE_BUS_FSYS0, 2318c2ecf20Sopenharmony_ci GATE_BUS_FSYS2, 2328c2ecf20Sopenharmony_ci GATE_BUS_PERIC, 2338c2ecf20Sopenharmony_ci GATE_BUS_PERIC1, 2348c2ecf20Sopenharmony_ci GATE_BUS_PERIS0, 2358c2ecf20Sopenharmony_ci GATE_BUS_PERIS1, 2368c2ecf20Sopenharmony_ci GATE_BUS_NOC, 2378c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 2388c2ecf20Sopenharmony_ci GATE_IP_GSCL0, 2398c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 2408c2ecf20Sopenharmony_ci GATE_IP_MFC, 2418c2ecf20Sopenharmony_ci GATE_IP_DISP1, 2428c2ecf20Sopenharmony_ci GATE_IP_G3D, 2438c2ecf20Sopenharmony_ci GATE_IP_GEN, 2448c2ecf20Sopenharmony_ci GATE_IP_FSYS, 2458c2ecf20Sopenharmony_ci GATE_IP_PERIC, 2468c2ecf20Sopenharmony_ci GATE_IP_PERIS, 2478c2ecf20Sopenharmony_ci GATE_IP_MSCL, 2488c2ecf20Sopenharmony_ci GATE_TOP_SCLK_GSCL, 2498c2ecf20Sopenharmony_ci GATE_TOP_SCLK_DISP1, 2508c2ecf20Sopenharmony_ci GATE_TOP_SCLK_MAU, 2518c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 2528c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 2538c2ecf20Sopenharmony_ci TOP_SPARE2, 2548c2ecf20Sopenharmony_ci SRC_CDREX, 2558c2ecf20Sopenharmony_ci DIV_CDREX0, 2568c2ecf20Sopenharmony_ci DIV_CDREX1, 2578c2ecf20Sopenharmony_ci SRC_KFC, 2588c2ecf20Sopenharmony_ci DIV_KFC0, 2598c2ecf20Sopenharmony_ci GATE_BUS_CDREX0, 2608c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 2618c2ecf20Sopenharmony_ci}; 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_cistatic const unsigned long exynos5800_clk_regs[] __initconst = { 2648c2ecf20Sopenharmony_ci SRC_TOP8, 2658c2ecf20Sopenharmony_ci SRC_TOP9, 2668c2ecf20Sopenharmony_ci SRC_CAM, 2678c2ecf20Sopenharmony_ci SRC_TOP1, 2688c2ecf20Sopenharmony_ci DIV_TOP8, 2698c2ecf20Sopenharmony_ci DIV_TOP9, 2708c2ecf20Sopenharmony_ci DIV_CAM, 2718c2ecf20Sopenharmony_ci GATE_IP_CAM, 2728c2ecf20Sopenharmony_ci}; 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_cistatic const struct samsung_clk_reg_dump exynos5420_set_clksrc[] = { 2758c2ecf20Sopenharmony_ci { .offset = SRC_MASK_CPERI, .value = 0xffffffff, }, 2768c2ecf20Sopenharmony_ci { .offset = SRC_MASK_TOP0, .value = 0x11111111, }, 2778c2ecf20Sopenharmony_ci { .offset = SRC_MASK_TOP1, .value = 0x11101111, }, 2788c2ecf20Sopenharmony_ci { .offset = SRC_MASK_TOP2, .value = 0x11111110, }, 2798c2ecf20Sopenharmony_ci { .offset = SRC_MASK_TOP7, .value = 0x00111100, }, 2808c2ecf20Sopenharmony_ci { .offset = SRC_MASK_DISP10, .value = 0x11111110, }, 2818c2ecf20Sopenharmony_ci { .offset = SRC_MASK_MAU, .value = 0x10000000, }, 2828c2ecf20Sopenharmony_ci { .offset = SRC_MASK_FSYS, .value = 0x11111110, }, 2838c2ecf20Sopenharmony_ci { .offset = SRC_MASK_PERIC0, .value = 0x11111110, }, 2848c2ecf20Sopenharmony_ci { .offset = SRC_MASK_PERIC1, .value = 0x11111100, }, 2858c2ecf20Sopenharmony_ci { .offset = SRC_MASK_ISP, .value = 0x11111000, }, 2868c2ecf20Sopenharmony_ci { .offset = GATE_BUS_TOP, .value = 0xffffffff, }, 2878c2ecf20Sopenharmony_ci { .offset = GATE_BUS_DISP1, .value = 0xffffffff, }, 2888c2ecf20Sopenharmony_ci { .offset = GATE_IP_PERIC, .value = 0xffffffff, }, 2898c2ecf20Sopenharmony_ci { .offset = GATE_IP_PERIS, .value = 0xffffffff, }, 2908c2ecf20Sopenharmony_ci}; 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci/* list of all parent clocks */ 2938c2ecf20Sopenharmony_ciPNAME(mout_mspll_cpu_p) = {"mout_sclk_cpll", "mout_sclk_dpll", 2948c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll"}; 2958c2ecf20Sopenharmony_ciPNAME(mout_cpu_p) = {"mout_apll" , "mout_mspll_cpu"}; 2968c2ecf20Sopenharmony_ciPNAME(mout_kfc_p) = {"mout_kpll" , "mout_mspll_kfc"}; 2978c2ecf20Sopenharmony_ciPNAME(mout_apll_p) = {"fin_pll", "fout_apll"}; 2988c2ecf20Sopenharmony_ciPNAME(mout_bpll_p) = {"fin_pll", "fout_bpll"}; 2998c2ecf20Sopenharmony_ciPNAME(mout_cpll_p) = {"fin_pll", "fout_cpll"}; 3008c2ecf20Sopenharmony_ciPNAME(mout_dpll_p) = {"fin_pll", "fout_dpll"}; 3018c2ecf20Sopenharmony_ciPNAME(mout_epll_p) = {"fin_pll", "fout_epll"}; 3028c2ecf20Sopenharmony_ciPNAME(mout_ipll_p) = {"fin_pll", "fout_ipll"}; 3038c2ecf20Sopenharmony_ciPNAME(mout_kpll_p) = {"fin_pll", "fout_kpll"}; 3048c2ecf20Sopenharmony_ciPNAME(mout_mpll_p) = {"fin_pll", "fout_mpll"}; 3058c2ecf20Sopenharmony_ciPNAME(mout_rpll_p) = {"fin_pll", "fout_rpll"}; 3068c2ecf20Sopenharmony_ciPNAME(mout_spll_p) = {"fin_pll", "fout_spll"}; 3078c2ecf20Sopenharmony_ciPNAME(mout_vpll_p) = {"fin_pll", "fout_vpll"}; 3088c2ecf20Sopenharmony_ci 3098c2ecf20Sopenharmony_ciPNAME(mout_group1_p) = {"mout_sclk_cpll", "mout_sclk_dpll", 3108c2ecf20Sopenharmony_ci "mout_sclk_mpll"}; 3118c2ecf20Sopenharmony_ciPNAME(mout_group2_p) = {"fin_pll", "mout_sclk_cpll", 3128c2ecf20Sopenharmony_ci "mout_sclk_dpll", "mout_sclk_mpll", "mout_sclk_spll", 3138c2ecf20Sopenharmony_ci "mout_sclk_ipll", "mout_sclk_epll", "mout_sclk_rpll"}; 3148c2ecf20Sopenharmony_ciPNAME(mout_group3_p) = {"mout_sclk_rpll", "mout_sclk_spll"}; 3158c2ecf20Sopenharmony_ciPNAME(mout_group4_p) = {"mout_sclk_ipll", "mout_sclk_dpll", "mout_sclk_mpll"}; 3168c2ecf20Sopenharmony_ciPNAME(mout_group5_p) = {"mout_sclk_vpll", "mout_sclk_dpll"}; 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_ciPNAME(mout_fimd1_final_p) = {"mout_fimd1", "mout_fimd1_opt"}; 3198c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk66_p) = {"dout_aclk66", "mout_sclk_spll"}; 3208c2ecf20Sopenharmony_ciPNAME(mout_user_aclk66_peric_p) = { "fin_pll", "mout_sw_aclk66"}; 3218c2ecf20Sopenharmony_ciPNAME(mout_user_pclk66_gpio_p) = {"mout_sw_aclk66", "ff_sw_aclk66"}; 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk200_fsys_p) = {"dout_aclk200_fsys", "mout_sclk_spll"}; 3248c2ecf20Sopenharmony_ciPNAME(mout_sw_pclk200_fsys_p) = {"dout_pclk200_fsys", "mout_sclk_spll"}; 3258c2ecf20Sopenharmony_ciPNAME(mout_user_pclk200_fsys_p) = {"fin_pll", "mout_sw_pclk200_fsys"}; 3268c2ecf20Sopenharmony_ciPNAME(mout_user_aclk200_fsys_p) = {"fin_pll", "mout_sw_aclk200_fsys"}; 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk200_fsys2_p) = {"dout_aclk200_fsys2", "mout_sclk_spll"}; 3298c2ecf20Sopenharmony_ciPNAME(mout_user_aclk200_fsys2_p) = {"fin_pll", "mout_sw_aclk200_fsys2"}; 3308c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk100_noc_p) = {"dout_aclk100_noc", "mout_sclk_spll"}; 3318c2ecf20Sopenharmony_ciPNAME(mout_user_aclk100_noc_p) = {"fin_pll", "mout_sw_aclk100_noc"}; 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk400_wcore_p) = {"dout_aclk400_wcore", "mout_sclk_spll"}; 3348c2ecf20Sopenharmony_ciPNAME(mout_aclk400_wcore_bpll_p) = {"mout_aclk400_wcore", "sclk_bpll"}; 3358c2ecf20Sopenharmony_ciPNAME(mout_user_aclk400_wcore_p) = {"fin_pll", "mout_sw_aclk400_wcore"}; 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk400_isp_p) = {"dout_aclk400_isp", "mout_sclk_spll"}; 3388c2ecf20Sopenharmony_ciPNAME(mout_user_aclk400_isp_p) = {"fin_pll", "mout_sw_aclk400_isp"}; 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk333_432_isp0_p) = {"dout_aclk333_432_isp0", 3418c2ecf20Sopenharmony_ci "mout_sclk_spll"}; 3428c2ecf20Sopenharmony_ciPNAME(mout_user_aclk333_432_isp0_p) = {"fin_pll", "mout_sw_aclk333_432_isp0"}; 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk333_432_isp_p) = {"dout_aclk333_432_isp", "mout_sclk_spll"}; 3458c2ecf20Sopenharmony_ciPNAME(mout_user_aclk333_432_isp_p) = {"fin_pll", "mout_sw_aclk333_432_isp"}; 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk200_p) = {"dout_aclk200", "mout_sclk_spll"}; 3488c2ecf20Sopenharmony_ciPNAME(mout_user_aclk200_disp1_p) = {"fin_pll", "mout_sw_aclk200"}; 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk400_mscl_p) = {"dout_aclk400_mscl", "mout_sclk_spll"}; 3518c2ecf20Sopenharmony_ciPNAME(mout_user_aclk400_mscl_p) = {"fin_pll", "mout_sw_aclk400_mscl"}; 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk333_p) = {"dout_aclk333", "mout_sclk_spll"}; 3548c2ecf20Sopenharmony_ciPNAME(mout_user_aclk333_p) = {"fin_pll", "mout_sw_aclk333"}; 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk166_p) = {"dout_aclk166", "mout_sclk_spll"}; 3578c2ecf20Sopenharmony_ciPNAME(mout_user_aclk166_p) = {"fin_pll", "mout_sw_aclk166"}; 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk266_p) = {"dout_aclk266", "mout_sclk_spll"}; 3608c2ecf20Sopenharmony_ciPNAME(mout_user_aclk266_p) = {"fin_pll", "mout_sw_aclk266"}; 3618c2ecf20Sopenharmony_ciPNAME(mout_user_aclk266_isp_p) = {"fin_pll", "mout_sw_aclk266"}; 3628c2ecf20Sopenharmony_ci 3638c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk333_432_gscl_p) = {"dout_aclk333_432_gscl", "mout_sclk_spll"}; 3648c2ecf20Sopenharmony_ciPNAME(mout_user_aclk333_432_gscl_p) = {"fin_pll", "mout_sw_aclk333_432_gscl"}; 3658c2ecf20Sopenharmony_ci 3668c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk300_gscl_p) = {"dout_aclk300_gscl", "mout_sclk_spll"}; 3678c2ecf20Sopenharmony_ciPNAME(mout_user_aclk300_gscl_p) = {"fin_pll", "mout_sw_aclk300_gscl"}; 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk300_disp1_p) = {"dout_aclk300_disp1", "mout_sclk_spll"}; 3708c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk400_disp1_p) = {"dout_aclk400_disp1", "mout_sclk_spll"}; 3718c2ecf20Sopenharmony_ciPNAME(mout_user_aclk300_disp1_p) = {"fin_pll", "mout_sw_aclk300_disp1"}; 3728c2ecf20Sopenharmony_ciPNAME(mout_user_aclk400_disp1_p) = {"fin_pll", "mout_sw_aclk400_disp1"}; 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk300_jpeg_p) = {"dout_aclk300_jpeg", "mout_sclk_spll"}; 3758c2ecf20Sopenharmony_ciPNAME(mout_user_aclk300_jpeg_p) = {"fin_pll", "mout_sw_aclk300_jpeg"}; 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk_g3d_p) = {"dout_aclk_g3d", "mout_sclk_spll"}; 3788c2ecf20Sopenharmony_ciPNAME(mout_user_aclk_g3d_p) = {"fin_pll", "mout_sw_aclk_g3d"}; 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk266_g2d_p) = {"dout_aclk266_g2d", "mout_sclk_spll"}; 3818c2ecf20Sopenharmony_ciPNAME(mout_user_aclk266_g2d_p) = {"fin_pll", "mout_sw_aclk266_g2d"}; 3828c2ecf20Sopenharmony_ci 3838c2ecf20Sopenharmony_ciPNAME(mout_sw_aclk333_g2d_p) = {"dout_aclk333_g2d", "mout_sclk_spll"}; 3848c2ecf20Sopenharmony_ciPNAME(mout_user_aclk333_g2d_p) = {"fin_pll", "mout_sw_aclk333_g2d"}; 3858c2ecf20Sopenharmony_ci 3868c2ecf20Sopenharmony_ciPNAME(mout_audio0_p) = {"fin_pll", "cdclk0", "mout_sclk_dpll", 3878c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll", "mout_sclk_ipll", 3888c2ecf20Sopenharmony_ci "mout_sclk_epll", "mout_sclk_rpll"}; 3898c2ecf20Sopenharmony_ciPNAME(mout_audio1_p) = {"fin_pll", "cdclk1", "mout_sclk_dpll", 3908c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll", "mout_sclk_ipll", 3918c2ecf20Sopenharmony_ci "mout_sclk_epll", "mout_sclk_rpll"}; 3928c2ecf20Sopenharmony_ciPNAME(mout_audio2_p) = {"fin_pll", "cdclk2", "mout_sclk_dpll", 3938c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll", "mout_sclk_ipll", 3948c2ecf20Sopenharmony_ci "mout_sclk_epll", "mout_sclk_rpll"}; 3958c2ecf20Sopenharmony_ciPNAME(mout_spdif_p) = {"fin_pll", "dout_audio0", "dout_audio1", 3968c2ecf20Sopenharmony_ci "dout_audio2", "spdif_extclk", "mout_sclk_ipll", 3978c2ecf20Sopenharmony_ci "mout_sclk_epll", "mout_sclk_rpll"}; 3988c2ecf20Sopenharmony_ciPNAME(mout_hdmi_p) = {"dout_hdmi_pixel", "sclk_hdmiphy"}; 3998c2ecf20Sopenharmony_ciPNAME(mout_maudio0_p) = {"fin_pll", "maudio_clk", "mout_sclk_dpll", 4008c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll", "mout_sclk_ipll", 4018c2ecf20Sopenharmony_ci "mout_sclk_epll", "mout_sclk_rpll"}; 4028c2ecf20Sopenharmony_ciPNAME(mout_mau_epll_clk_p) = {"mout_sclk_epll", "mout_sclk_dpll", 4038c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll"}; 4048c2ecf20Sopenharmony_ciPNAME(mout_mclk_cdrex_p) = {"mout_bpll", "mout_mx_mspll_ccore"}; 4058c2ecf20Sopenharmony_ci 4068c2ecf20Sopenharmony_ci/* List of parents specific to exynos5800 */ 4078c2ecf20Sopenharmony_ciPNAME(mout_epll2_5800_p) = { "mout_sclk_epll", "ff_dout_epll2" }; 4088c2ecf20Sopenharmony_ciPNAME(mout_group1_5800_p) = { "mout_sclk_cpll", "mout_sclk_dpll", 4098c2ecf20Sopenharmony_ci "mout_sclk_mpll", "ff_dout_spll2" }; 4108c2ecf20Sopenharmony_ciPNAME(mout_group2_5800_p) = { "mout_sclk_cpll", "mout_sclk_dpll", 4118c2ecf20Sopenharmony_ci "mout_sclk_mpll", "ff_dout_spll2", 4128c2ecf20Sopenharmony_ci "mout_epll2", "mout_sclk_ipll" }; 4138c2ecf20Sopenharmony_ciPNAME(mout_group3_5800_p) = { "mout_sclk_cpll", "mout_sclk_dpll", 4148c2ecf20Sopenharmony_ci "mout_sclk_mpll", "ff_dout_spll2", 4158c2ecf20Sopenharmony_ci "mout_epll2" }; 4168c2ecf20Sopenharmony_ciPNAME(mout_group5_5800_p) = { "mout_sclk_cpll", "mout_sclk_dpll", 4178c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll" }; 4188c2ecf20Sopenharmony_ciPNAME(mout_group6_5800_p) = { "mout_sclk_ipll", "mout_sclk_dpll", 4198c2ecf20Sopenharmony_ci "mout_sclk_mpll", "ff_dout_spll2" }; 4208c2ecf20Sopenharmony_ciPNAME(mout_group7_5800_p) = { "mout_sclk_cpll", "mout_sclk_dpll", 4218c2ecf20Sopenharmony_ci "mout_sclk_mpll", "mout_sclk_spll", 4228c2ecf20Sopenharmony_ci "mout_epll2", "mout_sclk_ipll" }; 4238c2ecf20Sopenharmony_ciPNAME(mout_mx_mspll_ccore_p) = {"sclk_bpll", "mout_sclk_dpll", 4248c2ecf20Sopenharmony_ci "mout_sclk_mpll", "ff_dout_spll2", 4258c2ecf20Sopenharmony_ci "mout_sclk_spll", "mout_sclk_epll"}; 4268c2ecf20Sopenharmony_ciPNAME(mout_mau_epll_clk_5800_p) = { "mout_sclk_epll", "mout_sclk_dpll", 4278c2ecf20Sopenharmony_ci "mout_sclk_mpll", 4288c2ecf20Sopenharmony_ci "ff_dout_spll2" }; 4298c2ecf20Sopenharmony_ciPNAME(mout_group8_5800_p) = { "dout_aclk432_scaler", "dout_sclk_sw" }; 4308c2ecf20Sopenharmony_ciPNAME(mout_group9_5800_p) = { "dout_osc_div", "mout_sw_aclk432_scaler" }; 4318c2ecf20Sopenharmony_ciPNAME(mout_group10_5800_p) = { "dout_aclk432_cam", "dout_sclk_sw" }; 4328c2ecf20Sopenharmony_ciPNAME(mout_group11_5800_p) = { "dout_osc_div", "mout_sw_aclk432_cam" }; 4338c2ecf20Sopenharmony_ciPNAME(mout_group12_5800_p) = { "dout_aclkfl1_550_cam", "dout_sclk_sw" }; 4348c2ecf20Sopenharmony_ciPNAME(mout_group13_5800_p) = { "dout_osc_div", "mout_sw_aclkfl1_550_cam" }; 4358c2ecf20Sopenharmony_ciPNAME(mout_group14_5800_p) = { "dout_aclk550_cam", "dout_sclk_sw" }; 4368c2ecf20Sopenharmony_ciPNAME(mout_group15_5800_p) = { "dout_osc_div", "mout_sw_aclk550_cam" }; 4378c2ecf20Sopenharmony_ciPNAME(mout_group16_5800_p) = { "dout_osc_div", "mout_mau_epll_clk" }; 4388c2ecf20Sopenharmony_ciPNAME(mout_mx_mspll_ccore_phy_p) = { "sclk_bpll", "mout_sclk_dpll", 4398c2ecf20Sopenharmony_ci "mout_sclk_mpll", "ff_dout_spll2", 4408c2ecf20Sopenharmony_ci "mout_sclk_spll", "mout_sclk_epll"}; 4418c2ecf20Sopenharmony_ci 4428c2ecf20Sopenharmony_ci/* fixed rate clocks generated outside the soc */ 4438c2ecf20Sopenharmony_cistatic struct samsung_fixed_rate_clock 4448c2ecf20Sopenharmony_ci exynos5x_fixed_rate_ext_clks[] __initdata = { 4458c2ecf20Sopenharmony_ci FRATE(CLK_FIN_PLL, "fin_pll", NULL, 0, 0), 4468c2ecf20Sopenharmony_ci}; 4478c2ecf20Sopenharmony_ci 4488c2ecf20Sopenharmony_ci/* fixed rate clocks generated inside the soc */ 4498c2ecf20Sopenharmony_cistatic const struct samsung_fixed_rate_clock exynos5x_fixed_rate_clks[] __initconst = { 4508c2ecf20Sopenharmony_ci FRATE(CLK_SCLK_HDMIPHY, "sclk_hdmiphy", NULL, 0, 24000000), 4518c2ecf20Sopenharmony_ci FRATE(0, "sclk_pwi", NULL, 0, 24000000), 4528c2ecf20Sopenharmony_ci FRATE(0, "sclk_usbh20", NULL, 0, 48000000), 4538c2ecf20Sopenharmony_ci FRATE(0, "mphy_refclk_ixtal24", NULL, 0, 48000000), 4548c2ecf20Sopenharmony_ci FRATE(0, "sclk_usbh20_scan_clk", NULL, 0, 480000000), 4558c2ecf20Sopenharmony_ci}; 4568c2ecf20Sopenharmony_ci 4578c2ecf20Sopenharmony_cistatic const struct samsung_fixed_factor_clock 4588c2ecf20Sopenharmony_ci exynos5x_fixed_factor_clks[] __initconst = { 4598c2ecf20Sopenharmony_ci FFACTOR(0, "ff_hsic_12m", "fin_pll", 1, 2, 0), 4608c2ecf20Sopenharmony_ci FFACTOR(0, "ff_sw_aclk66", "mout_sw_aclk66", 1, 2, 0), 4618c2ecf20Sopenharmony_ci}; 4628c2ecf20Sopenharmony_ci 4638c2ecf20Sopenharmony_cistatic const struct samsung_fixed_factor_clock 4648c2ecf20Sopenharmony_ci exynos5800_fixed_factor_clks[] __initconst = { 4658c2ecf20Sopenharmony_ci FFACTOR(0, "ff_dout_epll2", "mout_sclk_epll", 1, 2, 0), 4668c2ecf20Sopenharmony_ci FFACTOR(CLK_FF_DOUT_SPLL2, "ff_dout_spll2", "mout_sclk_spll", 1, 2, 0), 4678c2ecf20Sopenharmony_ci}; 4688c2ecf20Sopenharmony_ci 4698c2ecf20Sopenharmony_cistatic const struct samsung_mux_clock exynos5800_mux_clks[] __initconst = { 4708c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_isp", mout_group3_5800_p, SRC_TOP0, 0, 3), 4718c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_mscl", mout_group3_5800_p, SRC_TOP0, 4, 3), 4728c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_wcore", mout_group2_5800_p, SRC_TOP0, 16, 3), 4738c2ecf20Sopenharmony_ci MUX(0, "mout_aclk100_noc", mout_group1_5800_p, SRC_TOP0, 20, 2), 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_432_gscl", mout_group6_5800_p, SRC_TOP1, 0, 2), 4768c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_432_isp", mout_group6_5800_p, SRC_TOP1, 4, 2), 4778c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_432_isp0", mout_group6_5800_p, SRC_TOP1, 12, 2), 4788c2ecf20Sopenharmony_ci MUX(0, "mout_aclk266", mout_group5_5800_p, SRC_TOP1, 20, 2), 4798c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333", mout_group1_5800_p, SRC_TOP1, 28, 2), 4808c2ecf20Sopenharmony_ci 4818c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_disp1", mout_group7_5800_p, SRC_TOP2, 4, 3), 4828c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_g2d", mout_group5_5800_p, SRC_TOP2, 8, 2), 4838c2ecf20Sopenharmony_ci MUX(0, "mout_aclk266_g2d", mout_group5_5800_p, SRC_TOP2, 12, 2), 4848c2ecf20Sopenharmony_ci MUX(0, "mout_aclk300_jpeg", mout_group5_5800_p, SRC_TOP2, 20, 2), 4858c2ecf20Sopenharmony_ci MUX(0, "mout_aclk300_disp1", mout_group5_5800_p, SRC_TOP2, 24, 2), 4868c2ecf20Sopenharmony_ci MUX(0, "mout_aclk300_gscl", mout_group5_5800_p, SRC_TOP2, 28, 2), 4878c2ecf20Sopenharmony_ci 4888c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MX_MSPLL_CCORE_PHY, "mout_mx_mspll_ccore_phy", 4898c2ecf20Sopenharmony_ci mout_mx_mspll_ccore_phy_p, SRC_TOP7, 0, 3), 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MX_MSPLL_CCORE, "mout_mx_mspll_ccore", 4928c2ecf20Sopenharmony_ci mout_mx_mspll_ccore_p, SRC_TOP7, 16, 3), 4938c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_MAU_EPLL, "mout_mau_epll_clk", mout_mau_epll_clk_5800_p, 4948c2ecf20Sopenharmony_ci SRC_TOP7, 20, 2, CLK_SET_RATE_PARENT, 0), 4958c2ecf20Sopenharmony_ci MUX(CLK_SCLK_BPLL, "sclk_bpll", mout_bpll_p, SRC_TOP7, 24, 1), 4968c2ecf20Sopenharmony_ci MUX(0, "mout_epll2", mout_epll2_5800_p, SRC_TOP7, 28, 1), 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_ci MUX(0, "mout_aclk550_cam", mout_group3_5800_p, SRC_TOP8, 16, 3), 4998c2ecf20Sopenharmony_ci MUX(0, "mout_aclkfl1_550_cam", mout_group3_5800_p, SRC_TOP8, 20, 3), 5008c2ecf20Sopenharmony_ci MUX(0, "mout_aclk432_cam", mout_group6_5800_p, SRC_TOP8, 24, 2), 5018c2ecf20Sopenharmony_ci MUX(0, "mout_aclk432_scaler", mout_group6_5800_p, SRC_TOP8, 28, 2), 5028c2ecf20Sopenharmony_ci 5038c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_USER_MAU_EPLL, "mout_user_mau_epll", mout_group16_5800_p, 5048c2ecf20Sopenharmony_ci SRC_TOP9, 8, 1, CLK_SET_RATE_PARENT, 0), 5058c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk550_cam", mout_group15_5800_p, 5068c2ecf20Sopenharmony_ci SRC_TOP9, 16, 1), 5078c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclkfl1_550_cam", mout_group13_5800_p, 5088c2ecf20Sopenharmony_ci SRC_TOP9, 20, 1), 5098c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk432_cam", mout_group11_5800_p, 5108c2ecf20Sopenharmony_ci SRC_TOP9, 24, 1), 5118c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk432_scaler", mout_group9_5800_p, 5128c2ecf20Sopenharmony_ci SRC_TOP9, 28, 1), 5138c2ecf20Sopenharmony_ci 5148c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk550_cam", mout_group14_5800_p, SRC_TOP13, 16, 1), 5158c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclkfl1_550_cam", mout_group12_5800_p, 5168c2ecf20Sopenharmony_ci SRC_TOP13, 20, 1), 5178c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk432_cam", mout_group10_5800_p, 5188c2ecf20Sopenharmony_ci SRC_TOP13, 24, 1), 5198c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk432_scaler", mout_group8_5800_p, 5208c2ecf20Sopenharmony_ci SRC_TOP13, 28, 1), 5218c2ecf20Sopenharmony_ci 5228c2ecf20Sopenharmony_ci MUX(0, "mout_fimd1", mout_group2_p, SRC_DISP10, 4, 3), 5238c2ecf20Sopenharmony_ci}; 5248c2ecf20Sopenharmony_ci 5258c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos5800_div_clks[] __initconst = { 5268c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK400_WCORE, "dout_aclk400_wcore", 5278c2ecf20Sopenharmony_ci "mout_aclk400_wcore", DIV_TOP0, 16, 3), 5288c2ecf20Sopenharmony_ci DIV(0, "dout_aclk550_cam", "mout_aclk550_cam", 5298c2ecf20Sopenharmony_ci DIV_TOP8, 16, 3), 5308c2ecf20Sopenharmony_ci DIV(0, "dout_aclkfl1_550_cam", "mout_aclkfl1_550_cam", 5318c2ecf20Sopenharmony_ci DIV_TOP8, 20, 3), 5328c2ecf20Sopenharmony_ci DIV(0, "dout_aclk432_cam", "mout_aclk432_cam", 5338c2ecf20Sopenharmony_ci DIV_TOP8, 24, 3), 5348c2ecf20Sopenharmony_ci DIV(0, "dout_aclk432_scaler", "mout_aclk432_scaler", 5358c2ecf20Sopenharmony_ci DIV_TOP8, 28, 3), 5368c2ecf20Sopenharmony_ci 5378c2ecf20Sopenharmony_ci DIV(0, "dout_osc_div", "fin_pll", DIV_TOP9, 20, 3), 5388c2ecf20Sopenharmony_ci DIV(0, "dout_sclk_sw", "sclk_spll", DIV_TOP9, 24, 6), 5398c2ecf20Sopenharmony_ci}; 5408c2ecf20Sopenharmony_ci 5418c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5800_gate_clks[] __initconst = { 5428c2ecf20Sopenharmony_ci GATE(CLK_ACLK550_CAM, "aclk550_cam", "mout_user_aclk550_cam", 5438c2ecf20Sopenharmony_ci GATE_BUS_TOP, 24, CLK_IS_CRITICAL, 0), 5448c2ecf20Sopenharmony_ci GATE(CLK_ACLK432_SCALER, "aclk432_scaler", "mout_user_aclk432_scaler", 5458c2ecf20Sopenharmony_ci GATE_BUS_TOP, 27, CLK_IS_CRITICAL, 0), 5468c2ecf20Sopenharmony_ci}; 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_cistatic const struct samsung_mux_clock exynos5420_mux_clks[] __initconst = { 5498c2ecf20Sopenharmony_ci MUX(0, "sclk_bpll", mout_bpll_p, TOP_SPARE2, 0, 1), 5508c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_wcore_bpll", mout_aclk400_wcore_bpll_p, 5518c2ecf20Sopenharmony_ci TOP_SPARE2, 4, 1), 5528c2ecf20Sopenharmony_ci 5538c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_isp", mout_group1_p, SRC_TOP0, 0, 2), 5548c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_mscl", mout_group1_p, SRC_TOP0, 4, 2), 5558c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_wcore", mout_group1_p, SRC_TOP0, 16, 2), 5568c2ecf20Sopenharmony_ci MUX(0, "mout_aclk100_noc", mout_group1_p, SRC_TOP0, 20, 2), 5578c2ecf20Sopenharmony_ci 5588c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_432_gscl", mout_group4_p, SRC_TOP1, 0, 2), 5598c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_432_isp", mout_group4_p, 5608c2ecf20Sopenharmony_ci SRC_TOP1, 4, 2), 5618c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_432_isp0", mout_group4_p, SRC_TOP1, 12, 2), 5628c2ecf20Sopenharmony_ci MUX(0, "mout_aclk266", mout_group1_p, SRC_TOP1, 20, 2), 5638c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333", mout_group1_p, SRC_TOP1, 28, 2), 5648c2ecf20Sopenharmony_ci 5658c2ecf20Sopenharmony_ci MUX(0, "mout_aclk400_disp1", mout_group1_p, SRC_TOP2, 4, 2), 5668c2ecf20Sopenharmony_ci MUX(0, "mout_aclk333_g2d", mout_group1_p, SRC_TOP2, 8, 2), 5678c2ecf20Sopenharmony_ci MUX(0, "mout_aclk266_g2d", mout_group1_p, SRC_TOP2, 12, 2), 5688c2ecf20Sopenharmony_ci MUX(0, "mout_aclk300_jpeg", mout_group1_p, SRC_TOP2, 20, 2), 5698c2ecf20Sopenharmony_ci MUX(0, "mout_aclk300_disp1", mout_group1_p, SRC_TOP2, 24, 2), 5708c2ecf20Sopenharmony_ci MUX(0, "mout_aclk300_gscl", mout_group1_p, SRC_TOP2, 28, 2), 5718c2ecf20Sopenharmony_ci 5728c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MX_MSPLL_CCORE, "mout_mx_mspll_ccore", 5738c2ecf20Sopenharmony_ci mout_group5_5800_p, SRC_TOP7, 16, 2), 5748c2ecf20Sopenharmony_ci MUX_F(0, "mout_mau_epll_clk", mout_mau_epll_clk_p, SRC_TOP7, 20, 2, 5758c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 5768c2ecf20Sopenharmony_ci 5778c2ecf20Sopenharmony_ci MUX(0, "mout_fimd1", mout_group3_p, SRC_DISP10, 4, 1), 5788c2ecf20Sopenharmony_ci}; 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos5420_div_clks[] __initconst = { 5818c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK400_WCORE, "dout_aclk400_wcore", 5828c2ecf20Sopenharmony_ci "mout_aclk400_wcore_bpll", DIV_TOP0, 16, 3), 5838c2ecf20Sopenharmony_ci}; 5848c2ecf20Sopenharmony_ci 5858c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5420_gate_clks[] __initconst = { 5868c2ecf20Sopenharmony_ci GATE(CLK_SECKEY, "seckey", "aclk66_psgen", GATE_BUS_PERIS1, 1, 0, 0), 5878c2ecf20Sopenharmony_ci /* Maudio Block */ 5888c2ecf20Sopenharmony_ci GATE(CLK_MAU_EPLL, "mau_epll", "mout_mau_epll_clk", 5898c2ecf20Sopenharmony_ci SRC_MASK_TOP7, 20, CLK_SET_RATE_PARENT, 0), 5908c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MAUDIO0, "sclk_maudio0", "dout_maudio0", 5918c2ecf20Sopenharmony_ci GATE_TOP_SCLK_MAU, 0, CLK_SET_RATE_PARENT, 0), 5928c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MAUPCM0, "sclk_maupcm0", "dout_maupcm0", 5938c2ecf20Sopenharmony_ci GATE_TOP_SCLK_MAU, 1, CLK_SET_RATE_PARENT, 0), 5948c2ecf20Sopenharmony_ci}; 5958c2ecf20Sopenharmony_ci 5968c2ecf20Sopenharmony_cistatic const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = { 5978c2ecf20Sopenharmony_ci MUX(0, "mout_user_pclk66_gpio", mout_user_pclk66_gpio_p, 5988c2ecf20Sopenharmony_ci SRC_TOP7, 4, 1), 5998c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MSPLL_KFC, "mout_mspll_kfc", mout_mspll_cpu_p, 6008c2ecf20Sopenharmony_ci SRC_TOP7, 8, 2), 6018c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MSPLL_CPU, "mout_mspll_cpu", mout_mspll_cpu_p, 6028c2ecf20Sopenharmony_ci SRC_TOP7, 12, 2), 6038c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_APLL, "mout_apll", mout_apll_p, SRC_CPU, 0, 1, 6048c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT | CLK_RECALC_NEW_RATES, 0), 6058c2ecf20Sopenharmony_ci MUX(0, "mout_cpu", mout_cpu_p, SRC_CPU, 16, 1), 6068c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_KPLL, "mout_kpll", mout_kpll_p, SRC_KFC, 0, 1, 6078c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT | CLK_RECALC_NEW_RATES, 0), 6088c2ecf20Sopenharmony_ci MUX(0, "mout_kfc", mout_kfc_p, SRC_KFC, 16, 1), 6098c2ecf20Sopenharmony_ci 6108c2ecf20Sopenharmony_ci MUX(0, "mout_aclk200", mout_group1_p, SRC_TOP0, 8, 2), 6118c2ecf20Sopenharmony_ci MUX(0, "mout_aclk200_fsys2", mout_group1_p, SRC_TOP0, 12, 2), 6128c2ecf20Sopenharmony_ci MUX(0, "mout_pclk200_fsys", mout_group1_p, SRC_TOP0, 24, 2), 6138c2ecf20Sopenharmony_ci MUX(0, "mout_aclk200_fsys", mout_group1_p, SRC_TOP0, 28, 2), 6148c2ecf20Sopenharmony_ci 6158c2ecf20Sopenharmony_ci MUX(0, "mout_aclk66", mout_group1_p, SRC_TOP1, 8, 2), 6168c2ecf20Sopenharmony_ci MUX(0, "mout_aclk166", mout_group1_p, SRC_TOP1, 24, 2), 6178c2ecf20Sopenharmony_ci 6188c2ecf20Sopenharmony_ci MUX_F(0, "mout_aclk_g3d", mout_group5_p, SRC_TOP2, 16, 1, 6198c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6208c2ecf20Sopenharmony_ci 6218c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk400_isp", mout_user_aclk400_isp_p, 6228c2ecf20Sopenharmony_ci SRC_TOP3, 0, 1), 6238c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk400_mscl", mout_user_aclk400_mscl_p, 6248c2ecf20Sopenharmony_ci SRC_TOP3, 4, 1), 6258c2ecf20Sopenharmony_ci MUX(CLK_MOUT_USER_ACLK200_DISP1, "mout_user_aclk200_disp1", 6268c2ecf20Sopenharmony_ci mout_user_aclk200_disp1_p, SRC_TOP3, 8, 1), 6278c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk200_fsys2", mout_user_aclk200_fsys2_p, 6288c2ecf20Sopenharmony_ci SRC_TOP3, 12, 1), 6298c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk400_wcore", mout_user_aclk400_wcore_p, 6308c2ecf20Sopenharmony_ci SRC_TOP3, 16, 1), 6318c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk100_noc", mout_user_aclk100_noc_p, 6328c2ecf20Sopenharmony_ci SRC_TOP3, 20, 1), 6338c2ecf20Sopenharmony_ci MUX(0, "mout_user_pclk200_fsys", mout_user_pclk200_fsys_p, 6348c2ecf20Sopenharmony_ci SRC_TOP3, 24, 1), 6358c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk200_fsys", mout_user_aclk200_fsys_p, 6368c2ecf20Sopenharmony_ci SRC_TOP3, 28, 1), 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk333_432_gscl", mout_user_aclk333_432_gscl_p, 6398c2ecf20Sopenharmony_ci SRC_TOP4, 0, 1), 6408c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk333_432_isp", mout_user_aclk333_432_isp_p, 6418c2ecf20Sopenharmony_ci SRC_TOP4, 4, 1), 6428c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk66_peric", mout_user_aclk66_peric_p, 6438c2ecf20Sopenharmony_ci SRC_TOP4, 8, 1), 6448c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk333_432_isp0", mout_user_aclk333_432_isp0_p, 6458c2ecf20Sopenharmony_ci SRC_TOP4, 12, 1), 6468c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk266_isp", mout_user_aclk266_isp_p, 6478c2ecf20Sopenharmony_ci SRC_TOP4, 16, 1), 6488c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk266", mout_user_aclk266_p, SRC_TOP4, 20, 1), 6498c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk166", mout_user_aclk166_p, SRC_TOP4, 24, 1), 6508c2ecf20Sopenharmony_ci MUX(CLK_MOUT_USER_ACLK333, "mout_user_aclk333", mout_user_aclk333_p, 6518c2ecf20Sopenharmony_ci SRC_TOP4, 28, 1), 6528c2ecf20Sopenharmony_ci 6538c2ecf20Sopenharmony_ci MUX(CLK_MOUT_USER_ACLK400_DISP1, "mout_user_aclk400_disp1", 6548c2ecf20Sopenharmony_ci mout_user_aclk400_disp1_p, SRC_TOP5, 0, 1), 6558c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk66_psgen", mout_user_aclk66_peric_p, 6568c2ecf20Sopenharmony_ci SRC_TOP5, 4, 1), 6578c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk333_g2d", mout_user_aclk333_g2d_p, 6588c2ecf20Sopenharmony_ci SRC_TOP5, 8, 1), 6598c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk266_g2d", mout_user_aclk266_g2d_p, 6608c2ecf20Sopenharmony_ci SRC_TOP5, 12, 1), 6618c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_G3D, "mout_user_aclk_g3d", mout_user_aclk_g3d_p, 6628c2ecf20Sopenharmony_ci SRC_TOP5, 16, 1, CLK_SET_RATE_PARENT, 0), 6638c2ecf20Sopenharmony_ci MUX(0, "mout_user_aclk300_jpeg", mout_user_aclk300_jpeg_p, 6648c2ecf20Sopenharmony_ci SRC_TOP5, 20, 1), 6658c2ecf20Sopenharmony_ci MUX(CLK_MOUT_USER_ACLK300_DISP1, "mout_user_aclk300_disp1", 6668c2ecf20Sopenharmony_ci mout_user_aclk300_disp1_p, SRC_TOP5, 24, 1), 6678c2ecf20Sopenharmony_ci MUX(CLK_MOUT_USER_ACLK300_GSCL, "mout_user_aclk300_gscl", 6688c2ecf20Sopenharmony_ci mout_user_aclk300_gscl_p, SRC_TOP5, 28, 1), 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_ci MUX(0, "mout_sclk_mpll", mout_mpll_p, SRC_TOP6, 0, 1), 6718c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_VPLL, "mout_sclk_vpll", mout_vpll_p, SRC_TOP6, 4, 1, 6728c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6738c2ecf20Sopenharmony_ci MUX(CLK_MOUT_SCLK_SPLL, "mout_sclk_spll", mout_spll_p, SRC_TOP6, 8, 1), 6748c2ecf20Sopenharmony_ci MUX(0, "mout_sclk_ipll", mout_ipll_p, SRC_TOP6, 12, 1), 6758c2ecf20Sopenharmony_ci MUX(0, "mout_sclk_rpll", mout_rpll_p, SRC_TOP6, 16, 1), 6768c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_EPLL, "mout_sclk_epll", mout_epll_p, SRC_TOP6, 20, 1, 6778c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 6788c2ecf20Sopenharmony_ci MUX(0, "mout_sclk_dpll", mout_dpll_p, SRC_TOP6, 24, 1), 6798c2ecf20Sopenharmony_ci MUX(0, "mout_sclk_cpll", mout_cpll_p, SRC_TOP6, 28, 1), 6808c2ecf20Sopenharmony_ci 6818c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk400_isp", mout_sw_aclk400_isp_p, 6828c2ecf20Sopenharmony_ci SRC_TOP10, 0, 1), 6838c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk400_mscl", mout_sw_aclk400_mscl_p, 6848c2ecf20Sopenharmony_ci SRC_TOP10, 4, 1), 6858c2ecf20Sopenharmony_ci MUX(CLK_MOUT_SW_ACLK200, "mout_sw_aclk200", mout_sw_aclk200_p, 6868c2ecf20Sopenharmony_ci SRC_TOP10, 8, 1), 6878c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk200_fsys2", mout_sw_aclk200_fsys2_p, 6888c2ecf20Sopenharmony_ci SRC_TOP10, 12, 1), 6898c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk400_wcore", mout_sw_aclk400_wcore_p, 6908c2ecf20Sopenharmony_ci SRC_TOP10, 16, 1), 6918c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk100_noc", mout_sw_aclk100_noc_p, 6928c2ecf20Sopenharmony_ci SRC_TOP10, 20, 1), 6938c2ecf20Sopenharmony_ci MUX(0, "mout_sw_pclk200_fsys", mout_sw_pclk200_fsys_p, 6948c2ecf20Sopenharmony_ci SRC_TOP10, 24, 1), 6958c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk200_fsys", mout_sw_aclk200_fsys_p, 6968c2ecf20Sopenharmony_ci SRC_TOP10, 28, 1), 6978c2ecf20Sopenharmony_ci 6988c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk333_432_gscl", mout_sw_aclk333_432_gscl_p, 6998c2ecf20Sopenharmony_ci SRC_TOP11, 0, 1), 7008c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk333_432_isp", mout_sw_aclk333_432_isp_p, 7018c2ecf20Sopenharmony_ci SRC_TOP11, 4, 1), 7028c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk66", mout_sw_aclk66_p, SRC_TOP11, 8, 1), 7038c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk333_432_isp0", mout_sw_aclk333_432_isp0_p, 7048c2ecf20Sopenharmony_ci SRC_TOP11, 12, 1), 7058c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk266", mout_sw_aclk266_p, SRC_TOP11, 20, 1), 7068c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk166", mout_sw_aclk166_p, SRC_TOP11, 24, 1), 7078c2ecf20Sopenharmony_ci MUX(CLK_MOUT_SW_ACLK333, "mout_sw_aclk333", mout_sw_aclk333_p, 7088c2ecf20Sopenharmony_ci SRC_TOP11, 28, 1), 7098c2ecf20Sopenharmony_ci 7108c2ecf20Sopenharmony_ci MUX(CLK_MOUT_SW_ACLK400, "mout_sw_aclk400_disp1", 7118c2ecf20Sopenharmony_ci mout_sw_aclk400_disp1_p, SRC_TOP12, 4, 1), 7128c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk333_g2d", mout_sw_aclk333_g2d_p, 7138c2ecf20Sopenharmony_ci SRC_TOP12, 8, 1), 7148c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk266_g2d", mout_sw_aclk266_g2d_p, 7158c2ecf20Sopenharmony_ci SRC_TOP12, 12, 1), 7168c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_SW_ACLK_G3D, "mout_sw_aclk_g3d", mout_sw_aclk_g3d_p, 7178c2ecf20Sopenharmony_ci SRC_TOP12, 16, 1, CLK_SET_RATE_PARENT, 0), 7188c2ecf20Sopenharmony_ci MUX(0, "mout_sw_aclk300_jpeg", mout_sw_aclk300_jpeg_p, 7198c2ecf20Sopenharmony_ci SRC_TOP12, 20, 1), 7208c2ecf20Sopenharmony_ci MUX(CLK_MOUT_SW_ACLK300, "mout_sw_aclk300_disp1", 7218c2ecf20Sopenharmony_ci mout_sw_aclk300_disp1_p, SRC_TOP12, 24, 1), 7228c2ecf20Sopenharmony_ci MUX(CLK_MOUT_SW_ACLK300_GSCL, "mout_sw_aclk300_gscl", 7238c2ecf20Sopenharmony_ci mout_sw_aclk300_gscl_p, SRC_TOP12, 28, 1), 7248c2ecf20Sopenharmony_ci 7258c2ecf20Sopenharmony_ci /* DISP1 Block */ 7268c2ecf20Sopenharmony_ci MUX(0, "mout_mipi1", mout_group2_p, SRC_DISP10, 16, 3), 7278c2ecf20Sopenharmony_ci MUX(0, "mout_dp1", mout_group2_p, SRC_DISP10, 20, 3), 7288c2ecf20Sopenharmony_ci MUX(0, "mout_pixel", mout_group2_p, SRC_DISP10, 24, 3), 7298c2ecf20Sopenharmony_ci MUX(CLK_MOUT_HDMI, "mout_hdmi", mout_hdmi_p, SRC_DISP10, 28, 1), 7308c2ecf20Sopenharmony_ci MUX(0, "mout_fimd1_opt", mout_group2_p, SRC_DISP10, 8, 3), 7318c2ecf20Sopenharmony_ci 7328c2ecf20Sopenharmony_ci MUX(0, "mout_fimd1_final", mout_fimd1_final_p, TOP_SPARE2, 8, 1), 7338c2ecf20Sopenharmony_ci 7348c2ecf20Sopenharmony_ci /* CDREX block */ 7358c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_MCLK_CDREX, "mout_mclk_cdrex", mout_mclk_cdrex_p, 7368c2ecf20Sopenharmony_ci SRC_CDREX, 4, 1, CLK_SET_RATE_PARENT, 0), 7378c2ecf20Sopenharmony_ci MUX_F(CLK_MOUT_BPLL, "mout_bpll", mout_bpll_p, SRC_CDREX, 0, 1, 7388c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 7398c2ecf20Sopenharmony_ci 7408c2ecf20Sopenharmony_ci /* MAU Block */ 7418c2ecf20Sopenharmony_ci MUX(CLK_MOUT_MAUDIO0, "mout_maudio0", mout_maudio0_p, SRC_MAU, 28, 3), 7428c2ecf20Sopenharmony_ci 7438c2ecf20Sopenharmony_ci /* FSYS Block */ 7448c2ecf20Sopenharmony_ci MUX(0, "mout_usbd301", mout_group2_p, SRC_FSYS, 4, 3), 7458c2ecf20Sopenharmony_ci MUX(0, "mout_mmc0", mout_group2_p, SRC_FSYS, 8, 3), 7468c2ecf20Sopenharmony_ci MUX(0, "mout_mmc1", mout_group2_p, SRC_FSYS, 12, 3), 7478c2ecf20Sopenharmony_ci MUX(0, "mout_mmc2", mout_group2_p, SRC_FSYS, 16, 3), 7488c2ecf20Sopenharmony_ci MUX(0, "mout_usbd300", mout_group2_p, SRC_FSYS, 20, 3), 7498c2ecf20Sopenharmony_ci MUX(0, "mout_unipro", mout_group2_p, SRC_FSYS, 24, 3), 7508c2ecf20Sopenharmony_ci MUX(0, "mout_mphy_refclk", mout_group2_p, SRC_FSYS, 28, 3), 7518c2ecf20Sopenharmony_ci 7528c2ecf20Sopenharmony_ci /* PERIC Block */ 7538c2ecf20Sopenharmony_ci MUX(0, "mout_uart0", mout_group2_p, SRC_PERIC0, 4, 3), 7548c2ecf20Sopenharmony_ci MUX(0, "mout_uart1", mout_group2_p, SRC_PERIC0, 8, 3), 7558c2ecf20Sopenharmony_ci MUX(0, "mout_uart2", mout_group2_p, SRC_PERIC0, 12, 3), 7568c2ecf20Sopenharmony_ci MUX(0, "mout_uart3", mout_group2_p, SRC_PERIC0, 16, 3), 7578c2ecf20Sopenharmony_ci MUX(0, "mout_pwm", mout_group2_p, SRC_PERIC0, 24, 3), 7588c2ecf20Sopenharmony_ci MUX(0, "mout_spdif", mout_spdif_p, SRC_PERIC0, 28, 3), 7598c2ecf20Sopenharmony_ci MUX(0, "mout_audio0", mout_audio0_p, SRC_PERIC1, 8, 3), 7608c2ecf20Sopenharmony_ci MUX(0, "mout_audio1", mout_audio1_p, SRC_PERIC1, 12, 3), 7618c2ecf20Sopenharmony_ci MUX(0, "mout_audio2", mout_audio2_p, SRC_PERIC1, 16, 3), 7628c2ecf20Sopenharmony_ci MUX(0, "mout_spi0", mout_group2_p, SRC_PERIC1, 20, 3), 7638c2ecf20Sopenharmony_ci MUX(0, "mout_spi1", mout_group2_p, SRC_PERIC1, 24, 3), 7648c2ecf20Sopenharmony_ci MUX(0, "mout_spi2", mout_group2_p, SRC_PERIC1, 28, 3), 7658c2ecf20Sopenharmony_ci 7668c2ecf20Sopenharmony_ci /* ISP Block */ 7678c2ecf20Sopenharmony_ci MUX(0, "mout_pwm_isp", mout_group2_p, SRC_ISP, 24, 3), 7688c2ecf20Sopenharmony_ci MUX(0, "mout_uart_isp", mout_group2_p, SRC_ISP, 20, 3), 7698c2ecf20Sopenharmony_ci MUX(0, "mout_spi0_isp", mout_group2_p, SRC_ISP, 12, 3), 7708c2ecf20Sopenharmony_ci MUX(0, "mout_spi1_isp", mout_group2_p, SRC_ISP, 16, 3), 7718c2ecf20Sopenharmony_ci MUX(0, "mout_isp_sensor", mout_group2_p, SRC_ISP, 28, 3), 7728c2ecf20Sopenharmony_ci}; 7738c2ecf20Sopenharmony_ci 7748c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos5x_div_clks[] __initconst = { 7758c2ecf20Sopenharmony_ci DIV(0, "div_arm", "mout_cpu", DIV_CPU0, 0, 3), 7768c2ecf20Sopenharmony_ci DIV(0, "sclk_apll", "mout_apll", DIV_CPU0, 24, 3), 7778c2ecf20Sopenharmony_ci DIV(0, "armclk2", "div_arm", DIV_CPU0, 28, 3), 7788c2ecf20Sopenharmony_ci DIV(0, "div_kfc", "mout_kfc", DIV_KFC0, 0, 3), 7798c2ecf20Sopenharmony_ci DIV(0, "sclk_kpll", "mout_kpll", DIV_KFC0, 24, 3), 7808c2ecf20Sopenharmony_ci 7818c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK400_ISP, "dout_aclk400_isp", "mout_aclk400_isp", 7828c2ecf20Sopenharmony_ci DIV_TOP0, 0, 3), 7838c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK400_MSCL, "dout_aclk400_mscl", "mout_aclk400_mscl", 7848c2ecf20Sopenharmony_ci DIV_TOP0, 4, 3), 7858c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK200, "dout_aclk200", "mout_aclk200", 7868c2ecf20Sopenharmony_ci DIV_TOP0, 8, 3), 7878c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK200_FSYS2, "dout_aclk200_fsys2", "mout_aclk200_fsys2", 7888c2ecf20Sopenharmony_ci DIV_TOP0, 12, 3), 7898c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK100_NOC, "dout_aclk100_noc", "mout_aclk100_noc", 7908c2ecf20Sopenharmony_ci DIV_TOP0, 20, 3), 7918c2ecf20Sopenharmony_ci DIV(CLK_DOUT_PCLK200_FSYS, "dout_pclk200_fsys", "mout_pclk200_fsys", 7928c2ecf20Sopenharmony_ci DIV_TOP0, 24, 3), 7938c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK200_FSYS, "dout_aclk200_fsys", "mout_aclk200_fsys", 7948c2ecf20Sopenharmony_ci DIV_TOP0, 28, 3), 7958c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK333_432_GSCL, "dout_aclk333_432_gscl", 7968c2ecf20Sopenharmony_ci "mout_aclk333_432_gscl", DIV_TOP1, 0, 3), 7978c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK333_432_ISP, "dout_aclk333_432_isp", 7988c2ecf20Sopenharmony_ci "mout_aclk333_432_isp", DIV_TOP1, 4, 3), 7998c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK66, "dout_aclk66", "mout_aclk66", 8008c2ecf20Sopenharmony_ci DIV_TOP1, 8, 6), 8018c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK333_432_ISP0, "dout_aclk333_432_isp0", 8028c2ecf20Sopenharmony_ci "mout_aclk333_432_isp0", DIV_TOP1, 16, 3), 8038c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK266, "dout_aclk266", "mout_aclk266", 8048c2ecf20Sopenharmony_ci DIV_TOP1, 20, 3), 8058c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK166, "dout_aclk166", "mout_aclk166", 8068c2ecf20Sopenharmony_ci DIV_TOP1, 24, 3), 8078c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK333, "dout_aclk333", "mout_aclk333", 8088c2ecf20Sopenharmony_ci DIV_TOP1, 28, 3), 8098c2ecf20Sopenharmony_ci 8108c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK333_G2D, "dout_aclk333_g2d", "mout_aclk333_g2d", 8118c2ecf20Sopenharmony_ci DIV_TOP2, 8, 3), 8128c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK266_G2D, "dout_aclk266_g2d", "mout_aclk266_g2d", 8138c2ecf20Sopenharmony_ci DIV_TOP2, 12, 3), 8148c2ecf20Sopenharmony_ci DIV_F(CLK_DOUT_ACLK_G3D, "dout_aclk_g3d", "mout_aclk_g3d", DIV_TOP2, 8158c2ecf20Sopenharmony_ci 16, 3, CLK_SET_RATE_PARENT, 0), 8168c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK300_JPEG, "dout_aclk300_jpeg", "mout_aclk300_jpeg", 8178c2ecf20Sopenharmony_ci DIV_TOP2, 20, 3), 8188c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK300_DISP1, "dout_aclk300_disp1", 8198c2ecf20Sopenharmony_ci "mout_aclk300_disp1", DIV_TOP2, 24, 3), 8208c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK300_GSCL, "dout_aclk300_gscl", "mout_aclk300_gscl", 8218c2ecf20Sopenharmony_ci DIV_TOP2, 28, 3), 8228c2ecf20Sopenharmony_ci 8238c2ecf20Sopenharmony_ci /* DISP1 Block */ 8248c2ecf20Sopenharmony_ci DIV(0, "dout_fimd1", "mout_fimd1_final", DIV_DISP10, 0, 4), 8258c2ecf20Sopenharmony_ci DIV(0, "dout_mipi1", "mout_mipi1", DIV_DISP10, 16, 8), 8268c2ecf20Sopenharmony_ci DIV(0, "dout_dp1", "mout_dp1", DIV_DISP10, 24, 4), 8278c2ecf20Sopenharmony_ci DIV(CLK_DOUT_PIXEL, "dout_hdmi_pixel", "mout_pixel", DIV_DISP10, 28, 4), 8288c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK400_DISP1, "dout_aclk400_disp1", 8298c2ecf20Sopenharmony_ci "mout_aclk400_disp1", DIV_TOP2, 4, 3), 8308c2ecf20Sopenharmony_ci 8318c2ecf20Sopenharmony_ci /* CDREX Block */ 8328c2ecf20Sopenharmony_ci /* 8338c2ecf20Sopenharmony_ci * The three clocks below are controlled using the same register and 8348c2ecf20Sopenharmony_ci * bits. They are put into one because there is a need of 8358c2ecf20Sopenharmony_ci * synchronization between the BUS and DREXs (two external memory 8368c2ecf20Sopenharmony_ci * interfaces). 8378c2ecf20Sopenharmony_ci * They are put here to show this HW assumption and for clock 8388c2ecf20Sopenharmony_ci * information summary completeness. 8398c2ecf20Sopenharmony_ci */ 8408c2ecf20Sopenharmony_ci DIV_F(CLK_DOUT_PCLK_CDREX, "dout_pclk_cdrex", "dout_aclk_cdrex1", 8418c2ecf20Sopenharmony_ci DIV_CDREX0, 28, 3, CLK_GET_RATE_NOCACHE, 0), 8428c2ecf20Sopenharmony_ci DIV_F(CLK_DOUT_PCLK_DREX0, "dout_pclk_drex0", "dout_cclk_drex0", 8438c2ecf20Sopenharmony_ci DIV_CDREX0, 28, 3, CLK_GET_RATE_NOCACHE, 0), 8448c2ecf20Sopenharmony_ci DIV_F(CLK_DOUT_PCLK_DREX1, "dout_pclk_drex1", "dout_cclk_drex0", 8458c2ecf20Sopenharmony_ci DIV_CDREX0, 28, 3, CLK_GET_RATE_NOCACHE, 0), 8468c2ecf20Sopenharmony_ci 8478c2ecf20Sopenharmony_ci DIV_F(CLK_DOUT_SCLK_CDREX, "dout_sclk_cdrex", "mout_mclk_cdrex", 8488c2ecf20Sopenharmony_ci DIV_CDREX0, 24, 3, CLK_SET_RATE_PARENT, 0), 8498c2ecf20Sopenharmony_ci DIV(CLK_DOUT_ACLK_CDREX1, "dout_aclk_cdrex1", "dout_clk2x_phy0", 8508c2ecf20Sopenharmony_ci DIV_CDREX0, 16, 3), 8518c2ecf20Sopenharmony_ci DIV(CLK_DOUT_CCLK_DREX0, "dout_cclk_drex0", "dout_clk2x_phy0", 8528c2ecf20Sopenharmony_ci DIV_CDREX0, 8, 3), 8538c2ecf20Sopenharmony_ci DIV(CLK_DOUT_CLK2X_PHY0, "dout_clk2x_phy0", "dout_sclk_cdrex", 8548c2ecf20Sopenharmony_ci DIV_CDREX0, 3, 5), 8558c2ecf20Sopenharmony_ci 8568c2ecf20Sopenharmony_ci DIV(CLK_DOUT_PCLK_CORE_MEM, "dout_pclk_core_mem", "mout_mclk_cdrex", 8578c2ecf20Sopenharmony_ci DIV_CDREX1, 8, 3), 8588c2ecf20Sopenharmony_ci 8598c2ecf20Sopenharmony_ci /* Audio Block */ 8608c2ecf20Sopenharmony_ci DIV(0, "dout_maudio0", "mout_maudio0", DIV_MAU, 20, 4), 8618c2ecf20Sopenharmony_ci DIV(0, "dout_maupcm0", "dout_maudio0", DIV_MAU, 24, 8), 8628c2ecf20Sopenharmony_ci 8638c2ecf20Sopenharmony_ci /* USB3.0 */ 8648c2ecf20Sopenharmony_ci DIV(0, "dout_usbphy301", "mout_usbd301", DIV_FSYS0, 12, 4), 8658c2ecf20Sopenharmony_ci DIV(0, "dout_usbphy300", "mout_usbd300", DIV_FSYS0, 16, 4), 8668c2ecf20Sopenharmony_ci DIV(0, "dout_usbd301", "mout_usbd301", DIV_FSYS0, 20, 4), 8678c2ecf20Sopenharmony_ci DIV(0, "dout_usbd300", "mout_usbd300", DIV_FSYS0, 24, 4), 8688c2ecf20Sopenharmony_ci 8698c2ecf20Sopenharmony_ci /* MMC */ 8708c2ecf20Sopenharmony_ci DIV(0, "dout_mmc0", "mout_mmc0", DIV_FSYS1, 0, 10), 8718c2ecf20Sopenharmony_ci DIV(0, "dout_mmc1", "mout_mmc1", DIV_FSYS1, 10, 10), 8728c2ecf20Sopenharmony_ci DIV(0, "dout_mmc2", "mout_mmc2", DIV_FSYS1, 20, 10), 8738c2ecf20Sopenharmony_ci 8748c2ecf20Sopenharmony_ci DIV(0, "dout_unipro", "mout_unipro", DIV_FSYS2, 24, 8), 8758c2ecf20Sopenharmony_ci DIV(0, "dout_mphy_refclk", "mout_mphy_refclk", DIV_FSYS2, 16, 8), 8768c2ecf20Sopenharmony_ci 8778c2ecf20Sopenharmony_ci /* UART and PWM */ 8788c2ecf20Sopenharmony_ci DIV(0, "dout_uart0", "mout_uart0", DIV_PERIC0, 8, 4), 8798c2ecf20Sopenharmony_ci DIV(0, "dout_uart1", "mout_uart1", DIV_PERIC0, 12, 4), 8808c2ecf20Sopenharmony_ci DIV(0, "dout_uart2", "mout_uart2", DIV_PERIC0, 16, 4), 8818c2ecf20Sopenharmony_ci DIV(0, "dout_uart3", "mout_uart3", DIV_PERIC0, 20, 4), 8828c2ecf20Sopenharmony_ci DIV(0, "dout_pwm", "mout_pwm", DIV_PERIC0, 28, 4), 8838c2ecf20Sopenharmony_ci 8848c2ecf20Sopenharmony_ci /* SPI */ 8858c2ecf20Sopenharmony_ci DIV(0, "dout_spi0", "mout_spi0", DIV_PERIC1, 20, 4), 8868c2ecf20Sopenharmony_ci DIV(0, "dout_spi1", "mout_spi1", DIV_PERIC1, 24, 4), 8878c2ecf20Sopenharmony_ci DIV(0, "dout_spi2", "mout_spi2", DIV_PERIC1, 28, 4), 8888c2ecf20Sopenharmony_ci 8898c2ecf20Sopenharmony_ci 8908c2ecf20Sopenharmony_ci /* PCM */ 8918c2ecf20Sopenharmony_ci DIV(0, "dout_pcm1", "dout_audio1", DIV_PERIC2, 16, 8), 8928c2ecf20Sopenharmony_ci DIV(0, "dout_pcm2", "dout_audio2", DIV_PERIC2, 24, 8), 8938c2ecf20Sopenharmony_ci 8948c2ecf20Sopenharmony_ci /* Audio - I2S */ 8958c2ecf20Sopenharmony_ci DIV(0, "dout_i2s1", "dout_audio1", DIV_PERIC3, 6, 6), 8968c2ecf20Sopenharmony_ci DIV(0, "dout_i2s2", "dout_audio2", DIV_PERIC3, 12, 6), 8978c2ecf20Sopenharmony_ci DIV(0, "dout_audio0", "mout_audio0", DIV_PERIC3, 20, 4), 8988c2ecf20Sopenharmony_ci DIV(0, "dout_audio1", "mout_audio1", DIV_PERIC3, 24, 4), 8998c2ecf20Sopenharmony_ci DIV(0, "dout_audio2", "mout_audio2", DIV_PERIC3, 28, 4), 9008c2ecf20Sopenharmony_ci 9018c2ecf20Sopenharmony_ci /* SPI Pre-Ratio */ 9028c2ecf20Sopenharmony_ci DIV(0, "dout_spi0_pre", "dout_spi0", DIV_PERIC4, 8, 8), 9038c2ecf20Sopenharmony_ci DIV(0, "dout_spi1_pre", "dout_spi1", DIV_PERIC4, 16, 8), 9048c2ecf20Sopenharmony_ci DIV(0, "dout_spi2_pre", "dout_spi2", DIV_PERIC4, 24, 8), 9058c2ecf20Sopenharmony_ci 9068c2ecf20Sopenharmony_ci /* GSCL Block */ 9078c2ecf20Sopenharmony_ci DIV(0, "dout_gscl_blk_333", "aclk333_432_gscl", DIV2_RATIO0, 6, 2), 9088c2ecf20Sopenharmony_ci 9098c2ecf20Sopenharmony_ci /* PSGEN */ 9108c2ecf20Sopenharmony_ci DIV(0, "dout_gen_blk", "mout_user_aclk266", DIV2_RATIO0, 8, 1), 9118c2ecf20Sopenharmony_ci DIV(0, "dout_jpg_blk", "aclk166", DIV2_RATIO0, 20, 1), 9128c2ecf20Sopenharmony_ci 9138c2ecf20Sopenharmony_ci /* ISP Block */ 9148c2ecf20Sopenharmony_ci DIV(0, "dout_isp_sensor0", "mout_isp_sensor", SCLK_DIV_ISP0, 8, 8), 9158c2ecf20Sopenharmony_ci DIV(0, "dout_isp_sensor1", "mout_isp_sensor", SCLK_DIV_ISP0, 16, 8), 9168c2ecf20Sopenharmony_ci DIV(0, "dout_isp_sensor2", "mout_isp_sensor", SCLK_DIV_ISP0, 24, 8), 9178c2ecf20Sopenharmony_ci DIV(0, "dout_pwm_isp", "mout_pwm_isp", SCLK_DIV_ISP1, 28, 4), 9188c2ecf20Sopenharmony_ci DIV(0, "dout_uart_isp", "mout_uart_isp", SCLK_DIV_ISP1, 24, 4), 9198c2ecf20Sopenharmony_ci DIV(0, "dout_spi0_isp", "mout_spi0_isp", SCLK_DIV_ISP1, 16, 4), 9208c2ecf20Sopenharmony_ci DIV(0, "dout_spi1_isp", "mout_spi1_isp", SCLK_DIV_ISP1, 20, 4), 9218c2ecf20Sopenharmony_ci DIV_F(0, "dout_spi0_isp_pre", "dout_spi0_isp", SCLK_DIV_ISP1, 0, 8, 9228c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 9238c2ecf20Sopenharmony_ci DIV_F(0, "dout_spi1_isp_pre", "dout_spi1_isp", SCLK_DIV_ISP1, 8, 8, 9248c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 9258c2ecf20Sopenharmony_ci}; 9268c2ecf20Sopenharmony_ci 9278c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = { 9288c2ecf20Sopenharmony_ci /* G2D */ 9298c2ecf20Sopenharmony_ci GATE(CLK_MDMA0, "mdma0", "aclk266_g2d", GATE_IP_G2D, 1, 0, 0), 9308c2ecf20Sopenharmony_ci GATE(CLK_SSS, "sss", "aclk266_g2d", GATE_IP_G2D, 2, 0, 0), 9318c2ecf20Sopenharmony_ci GATE(CLK_G2D, "g2d", "aclk333_g2d", GATE_IP_G2D, 3, 0, 0), 9328c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MDMA0, "smmu_mdma0", "aclk266_g2d", GATE_IP_G2D, 5, 0, 0), 9338c2ecf20Sopenharmony_ci GATE(CLK_SMMU_G2D, "smmu_g2d", "aclk333_g2d", GATE_IP_G2D, 7, 0, 0), 9348c2ecf20Sopenharmony_ci 9358c2ecf20Sopenharmony_ci GATE(0, "aclk200_fsys", "mout_user_aclk200_fsys", 9368c2ecf20Sopenharmony_ci GATE_BUS_FSYS0, 9, CLK_IS_CRITICAL, 0), 9378c2ecf20Sopenharmony_ci GATE(0, "aclk200_fsys2", "mout_user_aclk200_fsys2", 9388c2ecf20Sopenharmony_ci GATE_BUS_FSYS0, 10, CLK_IGNORE_UNUSED, 0), 9398c2ecf20Sopenharmony_ci 9408c2ecf20Sopenharmony_ci GATE(0, "aclk333_g2d", "mout_user_aclk333_g2d", 9418c2ecf20Sopenharmony_ci GATE_BUS_TOP, 0, CLK_IGNORE_UNUSED, 0), 9428c2ecf20Sopenharmony_ci GATE(0, "aclk266_g2d", "mout_user_aclk266_g2d", 9438c2ecf20Sopenharmony_ci GATE_BUS_TOP, 1, CLK_IS_CRITICAL, 0), 9448c2ecf20Sopenharmony_ci GATE(0, "aclk300_jpeg", "mout_user_aclk300_jpeg", 9458c2ecf20Sopenharmony_ci GATE_BUS_TOP, 4, CLK_IGNORE_UNUSED, 0), 9468c2ecf20Sopenharmony_ci GATE(0, "aclk333_432_isp0", "mout_user_aclk333_432_isp0", 9478c2ecf20Sopenharmony_ci GATE_BUS_TOP, 5, CLK_IS_CRITICAL, 0), 9488c2ecf20Sopenharmony_ci GATE(0, "aclk300_gscl", "mout_user_aclk300_gscl", 9498c2ecf20Sopenharmony_ci GATE_BUS_TOP, 6, CLK_IS_CRITICAL, 0), 9508c2ecf20Sopenharmony_ci GATE(0, "aclk333_432_gscl", "mout_user_aclk333_432_gscl", 9518c2ecf20Sopenharmony_ci GATE_BUS_TOP, 7, CLK_IGNORE_UNUSED, 0), 9528c2ecf20Sopenharmony_ci GATE(0, "aclk333_432_isp", "mout_user_aclk333_432_isp", 9538c2ecf20Sopenharmony_ci GATE_BUS_TOP, 8, CLK_IS_CRITICAL, 0), 9548c2ecf20Sopenharmony_ci GATE(CLK_PCLK66_GPIO, "pclk66_gpio", "mout_user_pclk66_gpio", 9558c2ecf20Sopenharmony_ci GATE_BUS_TOP, 9, CLK_IGNORE_UNUSED, 0), 9568c2ecf20Sopenharmony_ci GATE(0, "aclk66_psgen", "mout_user_aclk66_psgen", 9578c2ecf20Sopenharmony_ci GATE_BUS_TOP, 10, CLK_IGNORE_UNUSED, 0), 9588c2ecf20Sopenharmony_ci GATE(0, "aclk266_isp", "mout_user_aclk266_isp", 9598c2ecf20Sopenharmony_ci GATE_BUS_TOP, 13, CLK_IS_CRITICAL, 0), 9608c2ecf20Sopenharmony_ci GATE(0, "aclk166", "mout_user_aclk166", 9618c2ecf20Sopenharmony_ci GATE_BUS_TOP, 14, CLK_IGNORE_UNUSED, 0), 9628c2ecf20Sopenharmony_ci GATE(CLK_ACLK333, "aclk333", "mout_user_aclk333", 9638c2ecf20Sopenharmony_ci GATE_BUS_TOP, 15, CLK_IS_CRITICAL, 0), 9648c2ecf20Sopenharmony_ci GATE(0, "aclk400_isp", "mout_user_aclk400_isp", 9658c2ecf20Sopenharmony_ci GATE_BUS_TOP, 16, CLK_IS_CRITICAL, 0), 9668c2ecf20Sopenharmony_ci GATE(0, "aclk400_mscl", "mout_user_aclk400_mscl", 9678c2ecf20Sopenharmony_ci GATE_BUS_TOP, 17, CLK_IS_CRITICAL, 0), 9688c2ecf20Sopenharmony_ci GATE(0, "aclk200_disp1", "mout_user_aclk200_disp1", 9698c2ecf20Sopenharmony_ci GATE_BUS_TOP, 18, CLK_IS_CRITICAL, 0), 9708c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MPHY_IXTAL24, "sclk_mphy_ixtal24", "mphy_refclk_ixtal24", 9718c2ecf20Sopenharmony_ci GATE_BUS_TOP, 28, 0, 0), 9728c2ecf20Sopenharmony_ci GATE(CLK_SCLK_HSIC_12M, "sclk_hsic_12m", "ff_hsic_12m", 9738c2ecf20Sopenharmony_ci GATE_BUS_TOP, 29, 0, 0), 9748c2ecf20Sopenharmony_ci 9758c2ecf20Sopenharmony_ci GATE(0, "aclk300_disp1", "mout_user_aclk300_disp1", 9768c2ecf20Sopenharmony_ci SRC_MASK_TOP2, 24, CLK_IS_CRITICAL, 0), 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_ci /* sclk */ 9798c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART0, "sclk_uart0", "dout_uart0", 9808c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 0, CLK_SET_RATE_PARENT, 0), 9818c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART1, "sclk_uart1", "dout_uart1", 9828c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 1, CLK_SET_RATE_PARENT, 0), 9838c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART2, "sclk_uart2", "dout_uart2", 9848c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 2, CLK_SET_RATE_PARENT, 0), 9858c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART3, "sclk_uart3", "dout_uart3", 9868c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 3, CLK_SET_RATE_PARENT, 0), 9878c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI0, "sclk_spi0", "dout_spi0_pre", 9888c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 6, CLK_SET_RATE_PARENT, 0), 9898c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI1, "sclk_spi1", "dout_spi1_pre", 9908c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 7, CLK_SET_RATE_PARENT, 0), 9918c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI2, "sclk_spi2", "dout_spi2_pre", 9928c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 8, CLK_SET_RATE_PARENT, 0), 9938c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPDIF, "sclk_spdif", "mout_spdif", 9948c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 9, CLK_SET_RATE_PARENT, 0), 9958c2ecf20Sopenharmony_ci GATE(CLK_SCLK_PWM, "sclk_pwm", "dout_pwm", 9968c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 11, CLK_SET_RATE_PARENT, 0), 9978c2ecf20Sopenharmony_ci GATE(CLK_SCLK_PCM1, "sclk_pcm1", "dout_pcm1", 9988c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 15, CLK_SET_RATE_PARENT, 0), 9998c2ecf20Sopenharmony_ci GATE(CLK_SCLK_PCM2, "sclk_pcm2", "dout_pcm2", 10008c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 16, CLK_SET_RATE_PARENT, 0), 10018c2ecf20Sopenharmony_ci GATE(CLK_SCLK_I2S1, "sclk_i2s1", "dout_i2s1", 10028c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 17, CLK_SET_RATE_PARENT, 0), 10038c2ecf20Sopenharmony_ci GATE(CLK_SCLK_I2S2, "sclk_i2s2", "dout_i2s2", 10048c2ecf20Sopenharmony_ci GATE_TOP_SCLK_PERIC, 18, CLK_SET_RATE_PARENT, 0), 10058c2ecf20Sopenharmony_ci 10068c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC0, "sclk_mmc0", "dout_mmc0", 10078c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 0, CLK_SET_RATE_PARENT, 0), 10088c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC1, "sclk_mmc1", "dout_mmc1", 10098c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 1, CLK_SET_RATE_PARENT, 0), 10108c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MMC2, "sclk_mmc2", "dout_mmc2", 10118c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 2, CLK_SET_RATE_PARENT, 0), 10128c2ecf20Sopenharmony_ci GATE(CLK_SCLK_USBPHY301, "sclk_usbphy301", "dout_usbphy301", 10138c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 7, CLK_SET_RATE_PARENT, 0), 10148c2ecf20Sopenharmony_ci GATE(CLK_SCLK_USBPHY300, "sclk_usbphy300", "dout_usbphy300", 10158c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 8, CLK_SET_RATE_PARENT, 0), 10168c2ecf20Sopenharmony_ci GATE(CLK_SCLK_USBD300, "sclk_usbd300", "dout_usbd300", 10178c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 9, CLK_SET_RATE_PARENT, 0), 10188c2ecf20Sopenharmony_ci GATE(CLK_SCLK_USBD301, "sclk_usbd301", "dout_usbd301", 10198c2ecf20Sopenharmony_ci GATE_TOP_SCLK_FSYS, 10, CLK_SET_RATE_PARENT, 0), 10208c2ecf20Sopenharmony_ci 10218c2ecf20Sopenharmony_ci /* Display */ 10228c2ecf20Sopenharmony_ci GATE(CLK_SCLK_FIMD1, "sclk_fimd1", "dout_fimd1", 10238c2ecf20Sopenharmony_ci GATE_TOP_SCLK_DISP1, 0, CLK_SET_RATE_PARENT, 0), 10248c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MIPI1, "sclk_mipi1", "dout_mipi1", 10258c2ecf20Sopenharmony_ci GATE_TOP_SCLK_DISP1, 3, CLK_SET_RATE_PARENT, 0), 10268c2ecf20Sopenharmony_ci GATE(CLK_SCLK_HDMI, "sclk_hdmi", "mout_hdmi", 10278c2ecf20Sopenharmony_ci GATE_TOP_SCLK_DISP1, 9, 0, 0), 10288c2ecf20Sopenharmony_ci GATE(CLK_SCLK_PIXEL, "sclk_pixel", "dout_hdmi_pixel", 10298c2ecf20Sopenharmony_ci GATE_TOP_SCLK_DISP1, 10, CLK_SET_RATE_PARENT, 0), 10308c2ecf20Sopenharmony_ci GATE(CLK_SCLK_DP1, "sclk_dp1", "dout_dp1", 10318c2ecf20Sopenharmony_ci GATE_TOP_SCLK_DISP1, 20, CLK_SET_RATE_PARENT, 0), 10328c2ecf20Sopenharmony_ci 10338c2ecf20Sopenharmony_ci /* FSYS Block */ 10348c2ecf20Sopenharmony_ci GATE(CLK_TSI, "tsi", "aclk200_fsys", GATE_BUS_FSYS0, 0, 0, 0), 10358c2ecf20Sopenharmony_ci GATE(CLK_PDMA0, "pdma0", "aclk200_fsys", GATE_BUS_FSYS0, 1, 0, 0), 10368c2ecf20Sopenharmony_ci GATE(CLK_PDMA1, "pdma1", "aclk200_fsys", GATE_BUS_FSYS0, 2, 0, 0), 10378c2ecf20Sopenharmony_ci GATE(CLK_UFS, "ufs", "aclk200_fsys2", GATE_BUS_FSYS0, 3, 0, 0), 10388c2ecf20Sopenharmony_ci GATE(CLK_RTIC, "rtic", "aclk200_fsys", GATE_IP_FSYS, 9, 0, 0), 10398c2ecf20Sopenharmony_ci GATE(CLK_MMC0, "mmc0", "aclk200_fsys2", GATE_IP_FSYS, 12, 0, 0), 10408c2ecf20Sopenharmony_ci GATE(CLK_MMC1, "mmc1", "aclk200_fsys2", GATE_IP_FSYS, 13, 0, 0), 10418c2ecf20Sopenharmony_ci GATE(CLK_MMC2, "mmc2", "aclk200_fsys2", GATE_IP_FSYS, 14, 0, 0), 10428c2ecf20Sopenharmony_ci GATE(CLK_SROMC, "sromc", "aclk200_fsys2", 10438c2ecf20Sopenharmony_ci GATE_IP_FSYS, 17, CLK_IGNORE_UNUSED, 0), 10448c2ecf20Sopenharmony_ci GATE(CLK_USBH20, "usbh20", "aclk200_fsys", GATE_IP_FSYS, 18, 0, 0), 10458c2ecf20Sopenharmony_ci GATE(CLK_USBD300, "usbd300", "aclk200_fsys", GATE_IP_FSYS, 19, 0, 0), 10468c2ecf20Sopenharmony_ci GATE(CLK_USBD301, "usbd301", "aclk200_fsys", GATE_IP_FSYS, 20, 0, 0), 10478c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UNIPRO, "sclk_unipro", "dout_unipro", 10488c2ecf20Sopenharmony_ci SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), 10498c2ecf20Sopenharmony_ci 10508c2ecf20Sopenharmony_ci /* PERIC Block */ 10518c2ecf20Sopenharmony_ci GATE(CLK_UART0, "uart0", "mout_user_aclk66_peric", 10528c2ecf20Sopenharmony_ci GATE_IP_PERIC, 0, 0, 0), 10538c2ecf20Sopenharmony_ci GATE(CLK_UART1, "uart1", "mout_user_aclk66_peric", 10548c2ecf20Sopenharmony_ci GATE_IP_PERIC, 1, 0, 0), 10558c2ecf20Sopenharmony_ci GATE(CLK_UART2, "uart2", "mout_user_aclk66_peric", 10568c2ecf20Sopenharmony_ci GATE_IP_PERIC, 2, 0, 0), 10578c2ecf20Sopenharmony_ci GATE(CLK_UART3, "uart3", "mout_user_aclk66_peric", 10588c2ecf20Sopenharmony_ci GATE_IP_PERIC, 3, 0, 0), 10598c2ecf20Sopenharmony_ci GATE(CLK_I2C0, "i2c0", "mout_user_aclk66_peric", 10608c2ecf20Sopenharmony_ci GATE_IP_PERIC, 6, 0, 0), 10618c2ecf20Sopenharmony_ci GATE(CLK_I2C1, "i2c1", "mout_user_aclk66_peric", 10628c2ecf20Sopenharmony_ci GATE_IP_PERIC, 7, 0, 0), 10638c2ecf20Sopenharmony_ci GATE(CLK_I2C2, "i2c2", "mout_user_aclk66_peric", 10648c2ecf20Sopenharmony_ci GATE_IP_PERIC, 8, 0, 0), 10658c2ecf20Sopenharmony_ci GATE(CLK_I2C3, "i2c3", "mout_user_aclk66_peric", 10668c2ecf20Sopenharmony_ci GATE_IP_PERIC, 9, 0, 0), 10678c2ecf20Sopenharmony_ci GATE(CLK_USI0, "usi0", "mout_user_aclk66_peric", 10688c2ecf20Sopenharmony_ci GATE_IP_PERIC, 10, 0, 0), 10698c2ecf20Sopenharmony_ci GATE(CLK_USI1, "usi1", "mout_user_aclk66_peric", 10708c2ecf20Sopenharmony_ci GATE_IP_PERIC, 11, 0, 0), 10718c2ecf20Sopenharmony_ci GATE(CLK_USI2, "usi2", "mout_user_aclk66_peric", 10728c2ecf20Sopenharmony_ci GATE_IP_PERIC, 12, 0, 0), 10738c2ecf20Sopenharmony_ci GATE(CLK_USI3, "usi3", "mout_user_aclk66_peric", 10748c2ecf20Sopenharmony_ci GATE_IP_PERIC, 13, 0, 0), 10758c2ecf20Sopenharmony_ci GATE(CLK_I2C_HDMI, "i2c_hdmi", "mout_user_aclk66_peric", 10768c2ecf20Sopenharmony_ci GATE_IP_PERIC, 14, 0, 0), 10778c2ecf20Sopenharmony_ci GATE(CLK_TSADC, "tsadc", "mout_user_aclk66_peric", 10788c2ecf20Sopenharmony_ci GATE_IP_PERIC, 15, 0, 0), 10798c2ecf20Sopenharmony_ci GATE(CLK_SPI0, "spi0", "mout_user_aclk66_peric", 10808c2ecf20Sopenharmony_ci GATE_IP_PERIC, 16, 0, 0), 10818c2ecf20Sopenharmony_ci GATE(CLK_SPI1, "spi1", "mout_user_aclk66_peric", 10828c2ecf20Sopenharmony_ci GATE_IP_PERIC, 17, 0, 0), 10838c2ecf20Sopenharmony_ci GATE(CLK_SPI2, "spi2", "mout_user_aclk66_peric", 10848c2ecf20Sopenharmony_ci GATE_IP_PERIC, 18, 0, 0), 10858c2ecf20Sopenharmony_ci GATE(CLK_I2S1, "i2s1", "mout_user_aclk66_peric", 10868c2ecf20Sopenharmony_ci GATE_IP_PERIC, 20, 0, 0), 10878c2ecf20Sopenharmony_ci GATE(CLK_I2S2, "i2s2", "mout_user_aclk66_peric", 10888c2ecf20Sopenharmony_ci GATE_IP_PERIC, 21, 0, 0), 10898c2ecf20Sopenharmony_ci GATE(CLK_PCM1, "pcm1", "mout_user_aclk66_peric", 10908c2ecf20Sopenharmony_ci GATE_IP_PERIC, 22, 0, 0), 10918c2ecf20Sopenharmony_ci GATE(CLK_PCM2, "pcm2", "mout_user_aclk66_peric", 10928c2ecf20Sopenharmony_ci GATE_IP_PERIC, 23, 0, 0), 10938c2ecf20Sopenharmony_ci GATE(CLK_PWM, "pwm", "mout_user_aclk66_peric", 10948c2ecf20Sopenharmony_ci GATE_IP_PERIC, 24, 0, 0), 10958c2ecf20Sopenharmony_ci GATE(CLK_SPDIF, "spdif", "mout_user_aclk66_peric", 10968c2ecf20Sopenharmony_ci GATE_IP_PERIC, 26, 0, 0), 10978c2ecf20Sopenharmony_ci GATE(CLK_USI4, "usi4", "mout_user_aclk66_peric", 10988c2ecf20Sopenharmony_ci GATE_IP_PERIC, 28, 0, 0), 10998c2ecf20Sopenharmony_ci GATE(CLK_USI5, "usi5", "mout_user_aclk66_peric", 11008c2ecf20Sopenharmony_ci GATE_IP_PERIC, 30, 0, 0), 11018c2ecf20Sopenharmony_ci GATE(CLK_USI6, "usi6", "mout_user_aclk66_peric", 11028c2ecf20Sopenharmony_ci GATE_IP_PERIC, 31, 0, 0), 11038c2ecf20Sopenharmony_ci 11048c2ecf20Sopenharmony_ci GATE(CLK_KEYIF, "keyif", "mout_user_aclk66_peric", 11058c2ecf20Sopenharmony_ci GATE_BUS_PERIC, 22, 0, 0), 11068c2ecf20Sopenharmony_ci 11078c2ecf20Sopenharmony_ci /* PERIS Block */ 11088c2ecf20Sopenharmony_ci GATE(CLK_CHIPID, "chipid", "aclk66_psgen", 11098c2ecf20Sopenharmony_ci GATE_IP_PERIS, 0, CLK_IGNORE_UNUSED, 0), 11108c2ecf20Sopenharmony_ci GATE(CLK_SYSREG, "sysreg", "aclk66_psgen", 11118c2ecf20Sopenharmony_ci GATE_IP_PERIS, 1, CLK_IGNORE_UNUSED, 0), 11128c2ecf20Sopenharmony_ci GATE(CLK_TZPC0, "tzpc0", "aclk66_psgen", GATE_IP_PERIS, 6, 0, 0), 11138c2ecf20Sopenharmony_ci GATE(CLK_TZPC1, "tzpc1", "aclk66_psgen", GATE_IP_PERIS, 7, 0, 0), 11148c2ecf20Sopenharmony_ci GATE(CLK_TZPC2, "tzpc2", "aclk66_psgen", GATE_IP_PERIS, 8, 0, 0), 11158c2ecf20Sopenharmony_ci GATE(CLK_TZPC3, "tzpc3", "aclk66_psgen", GATE_IP_PERIS, 9, 0, 0), 11168c2ecf20Sopenharmony_ci GATE(CLK_TZPC4, "tzpc4", "aclk66_psgen", GATE_IP_PERIS, 10, 0, 0), 11178c2ecf20Sopenharmony_ci GATE(CLK_TZPC5, "tzpc5", "aclk66_psgen", GATE_IP_PERIS, 11, 0, 0), 11188c2ecf20Sopenharmony_ci GATE(CLK_TZPC6, "tzpc6", "aclk66_psgen", GATE_IP_PERIS, 12, 0, 0), 11198c2ecf20Sopenharmony_ci GATE(CLK_TZPC7, "tzpc7", "aclk66_psgen", GATE_IP_PERIS, 13, 0, 0), 11208c2ecf20Sopenharmony_ci GATE(CLK_TZPC8, "tzpc8", "aclk66_psgen", GATE_IP_PERIS, 14, 0, 0), 11218c2ecf20Sopenharmony_ci GATE(CLK_TZPC9, "tzpc9", "aclk66_psgen", GATE_IP_PERIS, 15, 0, 0), 11228c2ecf20Sopenharmony_ci GATE(CLK_HDMI_CEC, "hdmi_cec", "aclk66_psgen", GATE_IP_PERIS, 16, 0, 0), 11238c2ecf20Sopenharmony_ci GATE(CLK_MCT, "mct", "aclk66_psgen", GATE_IP_PERIS, 18, 0, 0), 11248c2ecf20Sopenharmony_ci GATE(CLK_WDT, "wdt", "aclk66_psgen", GATE_IP_PERIS, 19, 0, 0), 11258c2ecf20Sopenharmony_ci GATE(CLK_RTC, "rtc", "aclk66_psgen", GATE_IP_PERIS, 20, 0, 0), 11268c2ecf20Sopenharmony_ci GATE(CLK_TMU, "tmu", "aclk66_psgen", GATE_IP_PERIS, 21, 0, 0), 11278c2ecf20Sopenharmony_ci GATE(CLK_TMU_GPU, "tmu_gpu", "aclk66_psgen", GATE_IP_PERIS, 22, 0, 0), 11288c2ecf20Sopenharmony_ci 11298c2ecf20Sopenharmony_ci /* GEN Block */ 11308c2ecf20Sopenharmony_ci GATE(CLK_ROTATOR, "rotator", "mout_user_aclk266", GATE_IP_GEN, 1, 0, 0), 11318c2ecf20Sopenharmony_ci GATE(CLK_JPEG, "jpeg", "aclk300_jpeg", GATE_IP_GEN, 2, 0, 0), 11328c2ecf20Sopenharmony_ci GATE(CLK_JPEG2, "jpeg2", "aclk300_jpeg", GATE_IP_GEN, 3, 0, 0), 11338c2ecf20Sopenharmony_ci GATE(CLK_MDMA1, "mdma1", "mout_user_aclk266", GATE_IP_GEN, 4, 0, 0), 11348c2ecf20Sopenharmony_ci GATE(CLK_TOP_RTC, "top_rtc", "aclk66_psgen", GATE_IP_GEN, 5, 0, 0), 11358c2ecf20Sopenharmony_ci GATE(CLK_SMMU_ROTATOR, "smmu_rotator", "dout_gen_blk", 11368c2ecf20Sopenharmony_ci GATE_IP_GEN, 6, 0, 0), 11378c2ecf20Sopenharmony_ci GATE(CLK_SMMU_JPEG, "smmu_jpeg", "dout_jpg_blk", GATE_IP_GEN, 7, 0, 0), 11388c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MDMA1, "smmu_mdma1", "dout_gen_blk", 11398c2ecf20Sopenharmony_ci GATE_IP_GEN, 9, 0, 0), 11408c2ecf20Sopenharmony_ci 11418c2ecf20Sopenharmony_ci /* GATE_IP_GEN doesn't list gates for smmu_jpeg2 and mc */ 11428c2ecf20Sopenharmony_ci GATE(CLK_SMMU_JPEG2, "smmu_jpeg2", "dout_jpg_blk", 11438c2ecf20Sopenharmony_ci GATE_BUS_GEN, 28, 0, 0), 11448c2ecf20Sopenharmony_ci GATE(CLK_MC, "mc", "aclk66_psgen", GATE_BUS_GEN, 12, 0, 0), 11458c2ecf20Sopenharmony_ci 11468c2ecf20Sopenharmony_ci /* GSCL Block */ 11478c2ecf20Sopenharmony_ci GATE(CLK_SCLK_GSCL_WA, "sclk_gscl_wa", "mout_user_aclk333_432_gscl", 11488c2ecf20Sopenharmony_ci GATE_TOP_SCLK_GSCL, 6, 0, 0), 11498c2ecf20Sopenharmony_ci GATE(CLK_SCLK_GSCL_WB, "sclk_gscl_wb", "mout_user_aclk333_432_gscl", 11508c2ecf20Sopenharmony_ci GATE_TOP_SCLK_GSCL, 7, 0, 0), 11518c2ecf20Sopenharmony_ci 11528c2ecf20Sopenharmony_ci GATE(CLK_FIMC_3AA, "fimc_3aa", "aclk333_432_gscl", 11538c2ecf20Sopenharmony_ci GATE_IP_GSCL0, 4, 0, 0), 11548c2ecf20Sopenharmony_ci GATE(CLK_FIMC_LITE0, "fimc_lite0", "aclk333_432_gscl", 11558c2ecf20Sopenharmony_ci GATE_IP_GSCL0, 5, 0, 0), 11568c2ecf20Sopenharmony_ci GATE(CLK_FIMC_LITE1, "fimc_lite1", "aclk333_432_gscl", 11578c2ecf20Sopenharmony_ci GATE_IP_GSCL0, 6, 0, 0), 11588c2ecf20Sopenharmony_ci 11598c2ecf20Sopenharmony_ci GATE(CLK_SMMU_3AA, "smmu_3aa", "dout_gscl_blk_333", 11608c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 2, 0, 0), 11618c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMCL0, "smmu_fimcl0", "dout_gscl_blk_333", 11628c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 3, 0, 0), 11638c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMCL1, "smmu_fimcl1", "dout_gscl_blk_333", 11648c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 4, 0, 0), 11658c2ecf20Sopenharmony_ci GATE(CLK_GSCL_WA, "gscl_wa", "sclk_gscl_wa", GATE_IP_GSCL1, 12, 11668c2ecf20Sopenharmony_ci CLK_IS_CRITICAL, 0), 11678c2ecf20Sopenharmony_ci GATE(CLK_GSCL_WB, "gscl_wb", "sclk_gscl_wb", GATE_IP_GSCL1, 13, 11688c2ecf20Sopenharmony_ci CLK_IS_CRITICAL, 0), 11698c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMCL3, "smmu_fimcl3", "dout_gscl_blk_333", 11708c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 16, 0, 0), 11718c2ecf20Sopenharmony_ci GATE(CLK_FIMC_LITE3, "fimc_lite3", "aclk333_432_gscl", 11728c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 17, 0, 0), 11738c2ecf20Sopenharmony_ci 11748c2ecf20Sopenharmony_ci /* ISP */ 11758c2ecf20Sopenharmony_ci GATE(CLK_SCLK_UART_ISP, "sclk_uart_isp", "dout_uart_isp", 11768c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 0, CLK_SET_RATE_PARENT, 0), 11778c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI0_ISP, "sclk_spi0_isp", "dout_spi0_isp_pre", 11788c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 1, CLK_SET_RATE_PARENT, 0), 11798c2ecf20Sopenharmony_ci GATE(CLK_SCLK_SPI1_ISP, "sclk_spi1_isp", "dout_spi1_isp_pre", 11808c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 2, CLK_SET_RATE_PARENT, 0), 11818c2ecf20Sopenharmony_ci GATE(CLK_SCLK_PWM_ISP, "sclk_pwm_isp", "dout_pwm_isp", 11828c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 3, CLK_SET_RATE_PARENT, 0), 11838c2ecf20Sopenharmony_ci GATE(CLK_SCLK_ISP_SENSOR0, "sclk_isp_sensor0", "dout_isp_sensor0", 11848c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 4, CLK_SET_RATE_PARENT, 0), 11858c2ecf20Sopenharmony_ci GATE(CLK_SCLK_ISP_SENSOR1, "sclk_isp_sensor1", "dout_isp_sensor1", 11868c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 8, CLK_SET_RATE_PARENT, 0), 11878c2ecf20Sopenharmony_ci GATE(CLK_SCLK_ISP_SENSOR2, "sclk_isp_sensor2", "dout_isp_sensor2", 11888c2ecf20Sopenharmony_ci GATE_TOP_SCLK_ISP, 12, CLK_SET_RATE_PARENT, 0), 11898c2ecf20Sopenharmony_ci 11908c2ecf20Sopenharmony_ci /* CDREX */ 11918c2ecf20Sopenharmony_ci GATE(CLK_CLKM_PHY0, "clkm_phy0", "dout_sclk_cdrex", 11928c2ecf20Sopenharmony_ci GATE_BUS_CDREX0, 0, 0, 0), 11938c2ecf20Sopenharmony_ci GATE(CLK_CLKM_PHY1, "clkm_phy1", "dout_sclk_cdrex", 11948c2ecf20Sopenharmony_ci GATE_BUS_CDREX0, 1, 0, 0), 11958c2ecf20Sopenharmony_ci GATE(0, "mx_mspll_ccore_phy", "mout_mx_mspll_ccore_phy", 11968c2ecf20Sopenharmony_ci SRC_MASK_TOP7, 0, CLK_IGNORE_UNUSED, 0), 11978c2ecf20Sopenharmony_ci 11988c2ecf20Sopenharmony_ci GATE(CLK_ACLK_PPMU_DREX1_1, "aclk_ppmu_drex1_1", "dout_aclk_cdrex1", 11998c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 12, CLK_IGNORE_UNUSED, 0), 12008c2ecf20Sopenharmony_ci GATE(CLK_ACLK_PPMU_DREX1_0, "aclk_ppmu_drex1_0", "dout_aclk_cdrex1", 12018c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 13, CLK_IGNORE_UNUSED, 0), 12028c2ecf20Sopenharmony_ci GATE(CLK_ACLK_PPMU_DREX0_1, "aclk_ppmu_drex0_1", "dout_aclk_cdrex1", 12038c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 14, CLK_IGNORE_UNUSED, 0), 12048c2ecf20Sopenharmony_ci GATE(CLK_ACLK_PPMU_DREX0_0, "aclk_ppmu_drex0_0", "dout_aclk_cdrex1", 12058c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 15, CLK_IGNORE_UNUSED, 0), 12068c2ecf20Sopenharmony_ci 12078c2ecf20Sopenharmony_ci GATE(CLK_PCLK_PPMU_DREX1_1, "pclk_ppmu_drex1_1", "dout_pclk_cdrex", 12088c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 26, CLK_IGNORE_UNUSED, 0), 12098c2ecf20Sopenharmony_ci GATE(CLK_PCLK_PPMU_DREX1_0, "pclk_ppmu_drex1_0", "dout_pclk_cdrex", 12108c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 27, CLK_IGNORE_UNUSED, 0), 12118c2ecf20Sopenharmony_ci GATE(CLK_PCLK_PPMU_DREX0_1, "pclk_ppmu_drex0_1", "dout_pclk_cdrex", 12128c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 28, CLK_IGNORE_UNUSED, 0), 12138c2ecf20Sopenharmony_ci GATE(CLK_PCLK_PPMU_DREX0_0, "pclk_ppmu_drex0_0", "dout_pclk_cdrex", 12148c2ecf20Sopenharmony_ci GATE_BUS_CDREX1, 29, CLK_IGNORE_UNUSED, 0), 12158c2ecf20Sopenharmony_ci}; 12168c2ecf20Sopenharmony_ci 12178c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos5x_disp_div_clks[] __initconst = { 12188c2ecf20Sopenharmony_ci DIV(0, "dout_disp1_blk", "aclk200_disp1", DIV2_RATIO0, 16, 2), 12198c2ecf20Sopenharmony_ci}; 12208c2ecf20Sopenharmony_ci 12218c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5x_disp_gate_clks[] __initconst = { 12228c2ecf20Sopenharmony_ci GATE(CLK_FIMD1, "fimd1", "aclk300_disp1", GATE_IP_DISP1, 0, 0, 0), 12238c2ecf20Sopenharmony_ci GATE(CLK_DSIM1, "dsim1", "aclk200_disp1", GATE_IP_DISP1, 3, 0, 0), 12248c2ecf20Sopenharmony_ci GATE(CLK_DP1, "dp1", "aclk200_disp1", GATE_IP_DISP1, 4, 0, 0), 12258c2ecf20Sopenharmony_ci GATE(CLK_MIXER, "mixer", "aclk200_disp1", GATE_IP_DISP1, 5, 0, 0), 12268c2ecf20Sopenharmony_ci GATE(CLK_HDMI, "hdmi", "aclk200_disp1", GATE_IP_DISP1, 6, 0, 0), 12278c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMD1M0, "smmu_fimd1m0", "dout_disp1_blk", 12288c2ecf20Sopenharmony_ci GATE_IP_DISP1, 7, 0, 0), 12298c2ecf20Sopenharmony_ci GATE(CLK_SMMU_FIMD1M1, "smmu_fimd1m1", "dout_disp1_blk", 12308c2ecf20Sopenharmony_ci GATE_IP_DISP1, 8, 0, 0), 12318c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MIXER, "smmu_mixer", "aclk200_disp1", 12328c2ecf20Sopenharmony_ci GATE_IP_DISP1, 9, 0, 0), 12338c2ecf20Sopenharmony_ci}; 12348c2ecf20Sopenharmony_ci 12358c2ecf20Sopenharmony_cistatic struct exynos5_subcmu_reg_dump exynos5x_disp_suspend_regs[] = { 12368c2ecf20Sopenharmony_ci { GATE_IP_DISP1, 0xffffffff, 0xffffffff }, /* DISP1 gates */ 12378c2ecf20Sopenharmony_ci { SRC_TOP5, 0, BIT(0) }, /* MUX mout_user_aclk400_disp1 */ 12388c2ecf20Sopenharmony_ci { SRC_TOP5, 0, BIT(24) }, /* MUX mout_user_aclk300_disp1 */ 12398c2ecf20Sopenharmony_ci { SRC_TOP3, 0, BIT(8) }, /* MUX mout_user_aclk200_disp1 */ 12408c2ecf20Sopenharmony_ci { DIV2_RATIO0, 0, 0x30000 }, /* DIV dout_disp1_blk */ 12418c2ecf20Sopenharmony_ci}; 12428c2ecf20Sopenharmony_ci 12438c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos5x_gsc_div_clks[] __initconst = { 12448c2ecf20Sopenharmony_ci DIV(0, "dout_gscl_blk_300", "mout_user_aclk300_gscl", 12458c2ecf20Sopenharmony_ci DIV2_RATIO0, 4, 2), 12468c2ecf20Sopenharmony_ci}; 12478c2ecf20Sopenharmony_ci 12488c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5x_gsc_gate_clks[] __initconst = { 12498c2ecf20Sopenharmony_ci GATE(CLK_GSCL0, "gscl0", "aclk300_gscl", GATE_IP_GSCL0, 0, 0, 0), 12508c2ecf20Sopenharmony_ci GATE(CLK_GSCL1, "gscl1", "aclk300_gscl", GATE_IP_GSCL0, 1, 0, 0), 12518c2ecf20Sopenharmony_ci GATE(CLK_SMMU_GSCL0, "smmu_gscl0", "dout_gscl_blk_300", 12528c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 6, 0, 0), 12538c2ecf20Sopenharmony_ci GATE(CLK_SMMU_GSCL1, "smmu_gscl1", "dout_gscl_blk_300", 12548c2ecf20Sopenharmony_ci GATE_IP_GSCL1, 7, 0, 0), 12558c2ecf20Sopenharmony_ci}; 12568c2ecf20Sopenharmony_ci 12578c2ecf20Sopenharmony_cistatic struct exynos5_subcmu_reg_dump exynos5x_gsc_suspend_regs[] = { 12588c2ecf20Sopenharmony_ci { GATE_IP_GSCL0, 0x3, 0x3 }, /* GSC gates */ 12598c2ecf20Sopenharmony_ci { GATE_IP_GSCL1, 0xc0, 0xc0 }, /* GSC gates */ 12608c2ecf20Sopenharmony_ci { SRC_TOP5, 0, BIT(28) }, /* MUX mout_user_aclk300_gscl */ 12618c2ecf20Sopenharmony_ci { DIV2_RATIO0, 0, 0x30 }, /* DIV dout_gscl_blk_300 */ 12628c2ecf20Sopenharmony_ci}; 12638c2ecf20Sopenharmony_ci 12648c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5x_g3d_gate_clks[] __initconst = { 12658c2ecf20Sopenharmony_ci GATE(CLK_G3D, "g3d", "mout_user_aclk_g3d", GATE_IP_G3D, 9, 12668c2ecf20Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 12678c2ecf20Sopenharmony_ci}; 12688c2ecf20Sopenharmony_ci 12698c2ecf20Sopenharmony_cistatic struct exynos5_subcmu_reg_dump exynos5x_g3d_suspend_regs[] = { 12708c2ecf20Sopenharmony_ci { GATE_IP_G3D, 0x3ff, 0x3ff }, /* G3D gates */ 12718c2ecf20Sopenharmony_ci { SRC_TOP5, 0, BIT(16) }, /* MUX mout_user_aclk_g3d */ 12728c2ecf20Sopenharmony_ci}; 12738c2ecf20Sopenharmony_ci 12748c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos5x_mfc_div_clks[] __initconst = { 12758c2ecf20Sopenharmony_ci DIV(0, "dout_mfc_blk", "mout_user_aclk333", DIV4_RATIO, 0, 2), 12768c2ecf20Sopenharmony_ci}; 12778c2ecf20Sopenharmony_ci 12788c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5x_mfc_gate_clks[] __initconst = { 12798c2ecf20Sopenharmony_ci GATE(CLK_MFC, "mfc", "aclk333", GATE_IP_MFC, 0, 0, 0), 12808c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MFCL, "smmu_mfcl", "dout_mfc_blk", GATE_IP_MFC, 1, 0, 0), 12818c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MFCR, "smmu_mfcr", "dout_mfc_blk", GATE_IP_MFC, 2, 0, 0), 12828c2ecf20Sopenharmony_ci}; 12838c2ecf20Sopenharmony_ci 12848c2ecf20Sopenharmony_cistatic struct exynos5_subcmu_reg_dump exynos5x_mfc_suspend_regs[] = { 12858c2ecf20Sopenharmony_ci { GATE_IP_MFC, 0xffffffff, 0xffffffff }, /* MFC gates */ 12868c2ecf20Sopenharmony_ci { SRC_TOP4, 0, BIT(28) }, /* MUX mout_user_aclk333 */ 12878c2ecf20Sopenharmony_ci { DIV4_RATIO, 0, 0x3 }, /* DIV dout_mfc_blk */ 12888c2ecf20Sopenharmony_ci}; 12898c2ecf20Sopenharmony_ci 12908c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5x_mscl_gate_clks[] __initconst = { 12918c2ecf20Sopenharmony_ci /* MSCL Block */ 12928c2ecf20Sopenharmony_ci GATE(CLK_MSCL0, "mscl0", "aclk400_mscl", GATE_IP_MSCL, 0, 0, 0), 12938c2ecf20Sopenharmony_ci GATE(CLK_MSCL1, "mscl1", "aclk400_mscl", GATE_IP_MSCL, 1, 0, 0), 12948c2ecf20Sopenharmony_ci GATE(CLK_MSCL2, "mscl2", "aclk400_mscl", GATE_IP_MSCL, 2, 0, 0), 12958c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MSCL0, "smmu_mscl0", "dout_mscl_blk", 12968c2ecf20Sopenharmony_ci GATE_IP_MSCL, 8, 0, 0), 12978c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MSCL1, "smmu_mscl1", "dout_mscl_blk", 12988c2ecf20Sopenharmony_ci GATE_IP_MSCL, 9, 0, 0), 12998c2ecf20Sopenharmony_ci GATE(CLK_SMMU_MSCL2, "smmu_mscl2", "dout_mscl_blk", 13008c2ecf20Sopenharmony_ci GATE_IP_MSCL, 10, 0, 0), 13018c2ecf20Sopenharmony_ci}; 13028c2ecf20Sopenharmony_ci 13038c2ecf20Sopenharmony_cistatic const struct samsung_div_clock exynos5x_mscl_div_clks[] __initconst = { 13048c2ecf20Sopenharmony_ci DIV(0, "dout_mscl_blk", "aclk400_mscl", DIV2_RATIO0, 28, 2), 13058c2ecf20Sopenharmony_ci}; 13068c2ecf20Sopenharmony_ci 13078c2ecf20Sopenharmony_cistatic struct exynos5_subcmu_reg_dump exynos5x_mscl_suspend_regs[] = { 13088c2ecf20Sopenharmony_ci { GATE_IP_MSCL, 0xffffffff, 0xffffffff }, /* MSCL gates */ 13098c2ecf20Sopenharmony_ci { SRC_TOP3, 0, BIT(4) }, /* MUX mout_user_aclk400_mscl */ 13108c2ecf20Sopenharmony_ci { DIV2_RATIO0, 0, 0x30000000 }, /* DIV dout_mscl_blk */ 13118c2ecf20Sopenharmony_ci}; 13128c2ecf20Sopenharmony_ci 13138c2ecf20Sopenharmony_cistatic const struct samsung_gate_clock exynos5800_mau_gate_clks[] __initconst = { 13148c2ecf20Sopenharmony_ci GATE(CLK_MAU_EPLL, "mau_epll", "mout_user_mau_epll", 13158c2ecf20Sopenharmony_ci SRC_MASK_TOP7, 20, CLK_SET_RATE_PARENT, 0), 13168c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MAUDIO0, "sclk_maudio0", "dout_maudio0", 13178c2ecf20Sopenharmony_ci GATE_TOP_SCLK_MAU, 0, CLK_SET_RATE_PARENT, 0), 13188c2ecf20Sopenharmony_ci GATE(CLK_SCLK_MAUPCM0, "sclk_maupcm0", "dout_maupcm0", 13198c2ecf20Sopenharmony_ci GATE_TOP_SCLK_MAU, 1, CLK_SET_RATE_PARENT, 0), 13208c2ecf20Sopenharmony_ci}; 13218c2ecf20Sopenharmony_ci 13228c2ecf20Sopenharmony_cistatic struct exynos5_subcmu_reg_dump exynos5800_mau_suspend_regs[] = { 13238c2ecf20Sopenharmony_ci { SRC_TOP9, 0, BIT(8) }, /* MUX mout_user_mau_epll */ 13248c2ecf20Sopenharmony_ci}; 13258c2ecf20Sopenharmony_ci 13268c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info exynos5x_disp_subcmu = { 13278c2ecf20Sopenharmony_ci .div_clks = exynos5x_disp_div_clks, 13288c2ecf20Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(exynos5x_disp_div_clks), 13298c2ecf20Sopenharmony_ci .gate_clks = exynos5x_disp_gate_clks, 13308c2ecf20Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(exynos5x_disp_gate_clks), 13318c2ecf20Sopenharmony_ci .suspend_regs = exynos5x_disp_suspend_regs, 13328c2ecf20Sopenharmony_ci .nr_suspend_regs = ARRAY_SIZE(exynos5x_disp_suspend_regs), 13338c2ecf20Sopenharmony_ci .pd_name = "DISP", 13348c2ecf20Sopenharmony_ci}; 13358c2ecf20Sopenharmony_ci 13368c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info exynos5x_gsc_subcmu = { 13378c2ecf20Sopenharmony_ci .div_clks = exynos5x_gsc_div_clks, 13388c2ecf20Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(exynos5x_gsc_div_clks), 13398c2ecf20Sopenharmony_ci .gate_clks = exynos5x_gsc_gate_clks, 13408c2ecf20Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(exynos5x_gsc_gate_clks), 13418c2ecf20Sopenharmony_ci .suspend_regs = exynos5x_gsc_suspend_regs, 13428c2ecf20Sopenharmony_ci .nr_suspend_regs = ARRAY_SIZE(exynos5x_gsc_suspend_regs), 13438c2ecf20Sopenharmony_ci .pd_name = "GSC", 13448c2ecf20Sopenharmony_ci}; 13458c2ecf20Sopenharmony_ci 13468c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info exynos5x_g3d_subcmu = { 13478c2ecf20Sopenharmony_ci .gate_clks = exynos5x_g3d_gate_clks, 13488c2ecf20Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(exynos5x_g3d_gate_clks), 13498c2ecf20Sopenharmony_ci .suspend_regs = exynos5x_g3d_suspend_regs, 13508c2ecf20Sopenharmony_ci .nr_suspend_regs = ARRAY_SIZE(exynos5x_g3d_suspend_regs), 13518c2ecf20Sopenharmony_ci .pd_name = "G3D", 13528c2ecf20Sopenharmony_ci}; 13538c2ecf20Sopenharmony_ci 13548c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info exynos5x_mfc_subcmu = { 13558c2ecf20Sopenharmony_ci .div_clks = exynos5x_mfc_div_clks, 13568c2ecf20Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(exynos5x_mfc_div_clks), 13578c2ecf20Sopenharmony_ci .gate_clks = exynos5x_mfc_gate_clks, 13588c2ecf20Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(exynos5x_mfc_gate_clks), 13598c2ecf20Sopenharmony_ci .suspend_regs = exynos5x_mfc_suspend_regs, 13608c2ecf20Sopenharmony_ci .nr_suspend_regs = ARRAY_SIZE(exynos5x_mfc_suspend_regs), 13618c2ecf20Sopenharmony_ci .pd_name = "MFC", 13628c2ecf20Sopenharmony_ci}; 13638c2ecf20Sopenharmony_ci 13648c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info exynos5x_mscl_subcmu = { 13658c2ecf20Sopenharmony_ci .div_clks = exynos5x_mscl_div_clks, 13668c2ecf20Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(exynos5x_mscl_div_clks), 13678c2ecf20Sopenharmony_ci .gate_clks = exynos5x_mscl_gate_clks, 13688c2ecf20Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(exynos5x_mscl_gate_clks), 13698c2ecf20Sopenharmony_ci .suspend_regs = exynos5x_mscl_suspend_regs, 13708c2ecf20Sopenharmony_ci .nr_suspend_regs = ARRAY_SIZE(exynos5x_mscl_suspend_regs), 13718c2ecf20Sopenharmony_ci .pd_name = "MSC", 13728c2ecf20Sopenharmony_ci}; 13738c2ecf20Sopenharmony_ci 13748c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info exynos5800_mau_subcmu = { 13758c2ecf20Sopenharmony_ci .gate_clks = exynos5800_mau_gate_clks, 13768c2ecf20Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(exynos5800_mau_gate_clks), 13778c2ecf20Sopenharmony_ci .suspend_regs = exynos5800_mau_suspend_regs, 13788c2ecf20Sopenharmony_ci .nr_suspend_regs = ARRAY_SIZE(exynos5800_mau_suspend_regs), 13798c2ecf20Sopenharmony_ci .pd_name = "MAU", 13808c2ecf20Sopenharmony_ci}; 13818c2ecf20Sopenharmony_ci 13828c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info *exynos5x_subcmus[] = { 13838c2ecf20Sopenharmony_ci &exynos5x_disp_subcmu, 13848c2ecf20Sopenharmony_ci &exynos5x_gsc_subcmu, 13858c2ecf20Sopenharmony_ci &exynos5x_g3d_subcmu, 13868c2ecf20Sopenharmony_ci &exynos5x_mfc_subcmu, 13878c2ecf20Sopenharmony_ci &exynos5x_mscl_subcmu, 13888c2ecf20Sopenharmony_ci}; 13898c2ecf20Sopenharmony_ci 13908c2ecf20Sopenharmony_cistatic const struct exynos5_subcmu_info *exynos5800_subcmus[] = { 13918c2ecf20Sopenharmony_ci &exynos5x_disp_subcmu, 13928c2ecf20Sopenharmony_ci &exynos5x_gsc_subcmu, 13938c2ecf20Sopenharmony_ci &exynos5x_g3d_subcmu, 13948c2ecf20Sopenharmony_ci &exynos5x_mfc_subcmu, 13958c2ecf20Sopenharmony_ci &exynos5x_mscl_subcmu, 13968c2ecf20Sopenharmony_ci &exynos5800_mau_subcmu, 13978c2ecf20Sopenharmony_ci}; 13988c2ecf20Sopenharmony_ci 13998c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos5420_pll2550x_24mhz_tbl[] __initconst = { 14008c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 2000000000, 250, 3, 0), 14018c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1900000000, 475, 6, 0), 14028c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1800000000, 225, 3, 0), 14038c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1700000000, 425, 6, 0), 14048c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1600000000, 200, 3, 0), 14058c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1500000000, 250, 4, 0), 14068c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1400000000, 175, 3, 0), 14078c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1300000000, 325, 6, 0), 14088c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1200000000, 200, 2, 1), 14098c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1100000000, 275, 3, 1), 14108c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1000000000, 250, 3, 1), 14118c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 900000000, 150, 2, 1), 14128c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 800000000, 200, 3, 1), 14138c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 700000000, 175, 3, 1), 14148c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 600000000, 200, 2, 2), 14158c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 500000000, 250, 3, 2), 14168c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 400000000, 200, 3, 2), 14178c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 300000000, 200, 2, 3), 14188c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 200000000, 200, 3, 3), 14198c2ecf20Sopenharmony_ci}; 14208c2ecf20Sopenharmony_ci 14218c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos5422_bpll_rate_table[] = { 14228c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 825000000, 275, 4, 1), 14238c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 728000000, 182, 3, 1), 14248c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 633000000, 211, 4, 1), 14258c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 543000000, 181, 2, 2), 14268c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 413000000, 413, 6, 2), 14278c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 275000000, 275, 3, 3), 14288c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 206000000, 206, 3, 3), 14298c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 165000000, 110, 2, 3), 14308c2ecf20Sopenharmony_ci}; 14318c2ecf20Sopenharmony_ci 14328c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos5420_epll_24mhz_tbl[] = { 14338c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 600000000U, 100, 2, 1, 0), 14348c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 400000000U, 200, 3, 2, 0), 14358c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 393216003U, 197, 3, 2, -25690), 14368c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 361267218U, 301, 5, 2, 3671), 14378c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 200000000U, 200, 3, 3, 0), 14388c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 196608001U, 197, 3, 3, -25690), 14398c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 180633609U, 301, 5, 3, 3671), 14408c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 131072006U, 131, 3, 3, 4719), 14418c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 100000000U, 200, 3, 4, 0), 14428c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 73728000U, 98, 2, 4, 19923), 14438c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 67737602U, 90, 2, 4, 20762), 14448c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 65536003U, 131, 3, 4, 4719), 14458c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 49152000U, 197, 3, 5, -25690), 14468c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 45158401U, 90, 3, 4, 20762), 14478c2ecf20Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 32768001U, 131, 3, 5, 4719), 14488c2ecf20Sopenharmony_ci}; 14498c2ecf20Sopenharmony_ci 14508c2ecf20Sopenharmony_cistatic const struct samsung_pll_rate_table exynos5420_vpll_24mhz_tbl[] = { 14518c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 600000000U, 200, 2, 2), 14528c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 543000000U, 181, 2, 2), 14538c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 480000000U, 160, 2, 2), 14548c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 420000000U, 140, 2, 2), 14558c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 350000000U, 175, 3, 2), 14568c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 266000000U, 266, 3, 3), 14578c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 177000000U, 118, 2, 3), 14588c2ecf20Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 100000000U, 200, 3, 4), 14598c2ecf20Sopenharmony_ci}; 14608c2ecf20Sopenharmony_ci 14618c2ecf20Sopenharmony_cistatic struct samsung_pll_clock exynos5x_plls[nr_plls] __initdata = { 14628c2ecf20Sopenharmony_ci [apll] = PLL(pll_2550, CLK_FOUT_APLL, "fout_apll", "fin_pll", APLL_LOCK, 14638c2ecf20Sopenharmony_ci APLL_CON0, NULL), 14648c2ecf20Sopenharmony_ci [cpll] = PLL(pll_2550, CLK_FOUT_CPLL, "fout_cpll", "fin_pll", CPLL_LOCK, 14658c2ecf20Sopenharmony_ci CPLL_CON0, NULL), 14668c2ecf20Sopenharmony_ci [dpll] = PLL(pll_2550, CLK_FOUT_DPLL, "fout_dpll", "fin_pll", DPLL_LOCK, 14678c2ecf20Sopenharmony_ci DPLL_CON0, NULL), 14688c2ecf20Sopenharmony_ci [epll] = PLL(pll_36xx, CLK_FOUT_EPLL, "fout_epll", "fin_pll", EPLL_LOCK, 14698c2ecf20Sopenharmony_ci EPLL_CON0, NULL), 14708c2ecf20Sopenharmony_ci [rpll] = PLL(pll_2650, CLK_FOUT_RPLL, "fout_rpll", "fin_pll", RPLL_LOCK, 14718c2ecf20Sopenharmony_ci RPLL_CON0, NULL), 14728c2ecf20Sopenharmony_ci [ipll] = PLL(pll_2550, CLK_FOUT_IPLL, "fout_ipll", "fin_pll", IPLL_LOCK, 14738c2ecf20Sopenharmony_ci IPLL_CON0, NULL), 14748c2ecf20Sopenharmony_ci [spll] = PLL(pll_2550, CLK_FOUT_SPLL, "fout_spll", "fin_pll", SPLL_LOCK, 14758c2ecf20Sopenharmony_ci SPLL_CON0, NULL), 14768c2ecf20Sopenharmony_ci [vpll] = PLL(pll_2550, CLK_FOUT_VPLL, "fout_vpll", "fin_pll", VPLL_LOCK, 14778c2ecf20Sopenharmony_ci VPLL_CON0, NULL), 14788c2ecf20Sopenharmony_ci [mpll] = PLL(pll_2550, CLK_FOUT_MPLL, "fout_mpll", "fin_pll", MPLL_LOCK, 14798c2ecf20Sopenharmony_ci MPLL_CON0, NULL), 14808c2ecf20Sopenharmony_ci [bpll] = PLL(pll_2550, CLK_FOUT_BPLL, "fout_bpll", "fin_pll", BPLL_LOCK, 14818c2ecf20Sopenharmony_ci BPLL_CON0, NULL), 14828c2ecf20Sopenharmony_ci [kpll] = PLL(pll_2550, CLK_FOUT_KPLL, "fout_kpll", "fin_pll", KPLL_LOCK, 14838c2ecf20Sopenharmony_ci KPLL_CON0, NULL), 14848c2ecf20Sopenharmony_ci}; 14858c2ecf20Sopenharmony_ci 14868c2ecf20Sopenharmony_ci#define E5420_EGL_DIV0(apll, pclk_dbg, atb, cpud) \ 14878c2ecf20Sopenharmony_ci ((((apll) << 24) | ((pclk_dbg) << 20) | ((atb) << 16) | \ 14888c2ecf20Sopenharmony_ci ((cpud) << 4))) 14898c2ecf20Sopenharmony_ci 14908c2ecf20Sopenharmony_cistatic const struct exynos_cpuclk_cfg_data exynos5420_eglclk_d[] __initconst = { 14918c2ecf20Sopenharmony_ci { 1800000, E5420_EGL_DIV0(3, 7, 7, 4), }, 14928c2ecf20Sopenharmony_ci { 1700000, E5420_EGL_DIV0(3, 7, 7, 3), }, 14938c2ecf20Sopenharmony_ci { 1600000, E5420_EGL_DIV0(3, 7, 7, 3), }, 14948c2ecf20Sopenharmony_ci { 1500000, E5420_EGL_DIV0(3, 7, 7, 3), }, 14958c2ecf20Sopenharmony_ci { 1400000, E5420_EGL_DIV0(3, 7, 7, 3), }, 14968c2ecf20Sopenharmony_ci { 1300000, E5420_EGL_DIV0(3, 7, 7, 2), }, 14978c2ecf20Sopenharmony_ci { 1200000, E5420_EGL_DIV0(3, 7, 7, 2), }, 14988c2ecf20Sopenharmony_ci { 1100000, E5420_EGL_DIV0(3, 7, 7, 2), }, 14998c2ecf20Sopenharmony_ci { 1000000, E5420_EGL_DIV0(3, 6, 6, 2), }, 15008c2ecf20Sopenharmony_ci { 900000, E5420_EGL_DIV0(3, 6, 6, 2), }, 15018c2ecf20Sopenharmony_ci { 800000, E5420_EGL_DIV0(3, 5, 5, 2), }, 15028c2ecf20Sopenharmony_ci { 700000, E5420_EGL_DIV0(3, 5, 5, 2), }, 15038c2ecf20Sopenharmony_ci { 600000, E5420_EGL_DIV0(3, 4, 4, 2), }, 15048c2ecf20Sopenharmony_ci { 500000, E5420_EGL_DIV0(3, 3, 3, 2), }, 15058c2ecf20Sopenharmony_ci { 400000, E5420_EGL_DIV0(3, 3, 3, 2), }, 15068c2ecf20Sopenharmony_ci { 300000, E5420_EGL_DIV0(3, 3, 3, 2), }, 15078c2ecf20Sopenharmony_ci { 200000, E5420_EGL_DIV0(3, 3, 3, 2), }, 15088c2ecf20Sopenharmony_ci { 0 }, 15098c2ecf20Sopenharmony_ci}; 15108c2ecf20Sopenharmony_ci 15118c2ecf20Sopenharmony_cistatic const struct exynos_cpuclk_cfg_data exynos5800_eglclk_d[] __initconst = { 15128c2ecf20Sopenharmony_ci { 2000000, E5420_EGL_DIV0(3, 7, 7, 4), }, 15138c2ecf20Sopenharmony_ci { 1900000, E5420_EGL_DIV0(3, 7, 7, 4), }, 15148c2ecf20Sopenharmony_ci { 1800000, E5420_EGL_DIV0(3, 7, 7, 4), }, 15158c2ecf20Sopenharmony_ci { 1700000, E5420_EGL_DIV0(3, 7, 7, 3), }, 15168c2ecf20Sopenharmony_ci { 1600000, E5420_EGL_DIV0(3, 7, 7, 3), }, 15178c2ecf20Sopenharmony_ci { 1500000, E5420_EGL_DIV0(3, 7, 7, 3), }, 15188c2ecf20Sopenharmony_ci { 1400000, E5420_EGL_DIV0(3, 7, 7, 3), }, 15198c2ecf20Sopenharmony_ci { 1300000, E5420_EGL_DIV0(3, 7, 7, 2), }, 15208c2ecf20Sopenharmony_ci { 1200000, E5420_EGL_DIV0(3, 7, 7, 2), }, 15218c2ecf20Sopenharmony_ci { 1100000, E5420_EGL_DIV0(3, 7, 7, 2), }, 15228c2ecf20Sopenharmony_ci { 1000000, E5420_EGL_DIV0(3, 7, 6, 2), }, 15238c2ecf20Sopenharmony_ci { 900000, E5420_EGL_DIV0(3, 7, 6, 2), }, 15248c2ecf20Sopenharmony_ci { 800000, E5420_EGL_DIV0(3, 7, 5, 2), }, 15258c2ecf20Sopenharmony_ci { 700000, E5420_EGL_DIV0(3, 7, 5, 2), }, 15268c2ecf20Sopenharmony_ci { 600000, E5420_EGL_DIV0(3, 7, 4, 2), }, 15278c2ecf20Sopenharmony_ci { 500000, E5420_EGL_DIV0(3, 7, 3, 2), }, 15288c2ecf20Sopenharmony_ci { 400000, E5420_EGL_DIV0(3, 7, 3, 2), }, 15298c2ecf20Sopenharmony_ci { 300000, E5420_EGL_DIV0(3, 7, 3, 2), }, 15308c2ecf20Sopenharmony_ci { 200000, E5420_EGL_DIV0(3, 7, 3, 2), }, 15318c2ecf20Sopenharmony_ci { 0 }, 15328c2ecf20Sopenharmony_ci}; 15338c2ecf20Sopenharmony_ci 15348c2ecf20Sopenharmony_ci#define E5420_KFC_DIV(kpll, pclk, aclk) \ 15358c2ecf20Sopenharmony_ci ((((kpll) << 24) | ((pclk) << 20) | ((aclk) << 4))) 15368c2ecf20Sopenharmony_ci 15378c2ecf20Sopenharmony_cistatic const struct exynos_cpuclk_cfg_data exynos5420_kfcclk_d[] __initconst = { 15388c2ecf20Sopenharmony_ci { 1400000, E5420_KFC_DIV(3, 5, 3), }, /* for Exynos5800 */ 15398c2ecf20Sopenharmony_ci { 1300000, E5420_KFC_DIV(3, 5, 2), }, 15408c2ecf20Sopenharmony_ci { 1200000, E5420_KFC_DIV(3, 5, 2), }, 15418c2ecf20Sopenharmony_ci { 1100000, E5420_KFC_DIV(3, 5, 2), }, 15428c2ecf20Sopenharmony_ci { 1000000, E5420_KFC_DIV(3, 5, 2), }, 15438c2ecf20Sopenharmony_ci { 900000, E5420_KFC_DIV(3, 5, 2), }, 15448c2ecf20Sopenharmony_ci { 800000, E5420_KFC_DIV(3, 5, 2), }, 15458c2ecf20Sopenharmony_ci { 700000, E5420_KFC_DIV(3, 4, 2), }, 15468c2ecf20Sopenharmony_ci { 600000, E5420_KFC_DIV(3, 4, 2), }, 15478c2ecf20Sopenharmony_ci { 500000, E5420_KFC_DIV(3, 4, 2), }, 15488c2ecf20Sopenharmony_ci { 400000, E5420_KFC_DIV(3, 3, 2), }, 15498c2ecf20Sopenharmony_ci { 300000, E5420_KFC_DIV(3, 3, 2), }, 15508c2ecf20Sopenharmony_ci { 200000, E5420_KFC_DIV(3, 3, 2), }, 15518c2ecf20Sopenharmony_ci { 0 }, 15528c2ecf20Sopenharmony_ci}; 15538c2ecf20Sopenharmony_ci 15548c2ecf20Sopenharmony_cistatic const struct of_device_id ext_clk_match[] __initconst = { 15558c2ecf20Sopenharmony_ci { .compatible = "samsung,exynos5420-oscclk", .data = (void *)0, }, 15568c2ecf20Sopenharmony_ci { }, 15578c2ecf20Sopenharmony_ci}; 15588c2ecf20Sopenharmony_ci 15598c2ecf20Sopenharmony_ci/* register exynos5420 clocks */ 15608c2ecf20Sopenharmony_cistatic void __init exynos5x_clk_init(struct device_node *np, 15618c2ecf20Sopenharmony_ci enum exynos5x_soc soc) 15628c2ecf20Sopenharmony_ci{ 15638c2ecf20Sopenharmony_ci struct samsung_clk_provider *ctx; 15648c2ecf20Sopenharmony_ci struct clk_hw **hws; 15658c2ecf20Sopenharmony_ci 15668c2ecf20Sopenharmony_ci if (np) { 15678c2ecf20Sopenharmony_ci reg_base = of_iomap(np, 0); 15688c2ecf20Sopenharmony_ci if (!reg_base) 15698c2ecf20Sopenharmony_ci panic("%s: failed to map registers\n", __func__); 15708c2ecf20Sopenharmony_ci } else { 15718c2ecf20Sopenharmony_ci panic("%s: unable to determine soc\n", __func__); 15728c2ecf20Sopenharmony_ci } 15738c2ecf20Sopenharmony_ci 15748c2ecf20Sopenharmony_ci exynos5x_soc = soc; 15758c2ecf20Sopenharmony_ci 15768c2ecf20Sopenharmony_ci ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS); 15778c2ecf20Sopenharmony_ci hws = ctx->clk_data.hws; 15788c2ecf20Sopenharmony_ci 15798c2ecf20Sopenharmony_ci samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks, 15808c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5x_fixed_rate_ext_clks), 15818c2ecf20Sopenharmony_ci ext_clk_match); 15828c2ecf20Sopenharmony_ci 15838c2ecf20Sopenharmony_ci if (_get_rate("fin_pll") == 24 * MHZ) { 15848c2ecf20Sopenharmony_ci exynos5x_plls[apll].rate_table = exynos5420_pll2550x_24mhz_tbl; 15858c2ecf20Sopenharmony_ci exynos5x_plls[epll].rate_table = exynos5420_epll_24mhz_tbl; 15868c2ecf20Sopenharmony_ci exynos5x_plls[kpll].rate_table = exynos5420_pll2550x_24mhz_tbl; 15878c2ecf20Sopenharmony_ci exynos5x_plls[vpll].rate_table = exynos5420_vpll_24mhz_tbl; 15888c2ecf20Sopenharmony_ci } 15898c2ecf20Sopenharmony_ci 15908c2ecf20Sopenharmony_ci if (soc == EXYNOS5420) 15918c2ecf20Sopenharmony_ci exynos5x_plls[bpll].rate_table = exynos5420_pll2550x_24mhz_tbl; 15928c2ecf20Sopenharmony_ci else 15938c2ecf20Sopenharmony_ci exynos5x_plls[bpll].rate_table = exynos5422_bpll_rate_table; 15948c2ecf20Sopenharmony_ci 15958c2ecf20Sopenharmony_ci samsung_clk_register_pll(ctx, exynos5x_plls, ARRAY_SIZE(exynos5x_plls), 15968c2ecf20Sopenharmony_ci reg_base); 15978c2ecf20Sopenharmony_ci samsung_clk_register_fixed_rate(ctx, exynos5x_fixed_rate_clks, 15988c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5x_fixed_rate_clks)); 15998c2ecf20Sopenharmony_ci samsung_clk_register_fixed_factor(ctx, exynos5x_fixed_factor_clks, 16008c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5x_fixed_factor_clks)); 16018c2ecf20Sopenharmony_ci samsung_clk_register_mux(ctx, exynos5x_mux_clks, 16028c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5x_mux_clks)); 16038c2ecf20Sopenharmony_ci samsung_clk_register_div(ctx, exynos5x_div_clks, 16048c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5x_div_clks)); 16058c2ecf20Sopenharmony_ci samsung_clk_register_gate(ctx, exynos5x_gate_clks, 16068c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5x_gate_clks)); 16078c2ecf20Sopenharmony_ci 16088c2ecf20Sopenharmony_ci if (soc == EXYNOS5420) { 16098c2ecf20Sopenharmony_ci samsung_clk_register_mux(ctx, exynos5420_mux_clks, 16108c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5420_mux_clks)); 16118c2ecf20Sopenharmony_ci samsung_clk_register_div(ctx, exynos5420_div_clks, 16128c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5420_div_clks)); 16138c2ecf20Sopenharmony_ci samsung_clk_register_gate(ctx, exynos5420_gate_clks, 16148c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5420_gate_clks)); 16158c2ecf20Sopenharmony_ci } else { 16168c2ecf20Sopenharmony_ci samsung_clk_register_fixed_factor( 16178c2ecf20Sopenharmony_ci ctx, exynos5800_fixed_factor_clks, 16188c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5800_fixed_factor_clks)); 16198c2ecf20Sopenharmony_ci samsung_clk_register_mux(ctx, exynos5800_mux_clks, 16208c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5800_mux_clks)); 16218c2ecf20Sopenharmony_ci samsung_clk_register_div(ctx, exynos5800_div_clks, 16228c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5800_div_clks)); 16238c2ecf20Sopenharmony_ci samsung_clk_register_gate(ctx, exynos5800_gate_clks, 16248c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5800_gate_clks)); 16258c2ecf20Sopenharmony_ci } 16268c2ecf20Sopenharmony_ci 16278c2ecf20Sopenharmony_ci if (soc == EXYNOS5420) { 16288c2ecf20Sopenharmony_ci exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk", 16298c2ecf20Sopenharmony_ci hws[CLK_MOUT_APLL], hws[CLK_MOUT_MSPLL_CPU], 0x200, 16308c2ecf20Sopenharmony_ci exynos5420_eglclk_d, ARRAY_SIZE(exynos5420_eglclk_d), 0); 16318c2ecf20Sopenharmony_ci } else { 16328c2ecf20Sopenharmony_ci exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk", 16338c2ecf20Sopenharmony_ci hws[CLK_MOUT_APLL], hws[CLK_MOUT_MSPLL_CPU], 0x200, 16348c2ecf20Sopenharmony_ci exynos5800_eglclk_d, ARRAY_SIZE(exynos5800_eglclk_d), 0); 16358c2ecf20Sopenharmony_ci } 16368c2ecf20Sopenharmony_ci exynos_register_cpu_clock(ctx, CLK_KFC_CLK, "kfcclk", 16378c2ecf20Sopenharmony_ci hws[CLK_MOUT_KPLL], hws[CLK_MOUT_MSPLL_KFC], 0x28200, 16388c2ecf20Sopenharmony_ci exynos5420_kfcclk_d, ARRAY_SIZE(exynos5420_kfcclk_d), 0); 16398c2ecf20Sopenharmony_ci 16408c2ecf20Sopenharmony_ci samsung_clk_extended_sleep_init(reg_base, 16418c2ecf20Sopenharmony_ci exynos5x_clk_regs, ARRAY_SIZE(exynos5x_clk_regs), 16428c2ecf20Sopenharmony_ci exynos5420_set_clksrc, ARRAY_SIZE(exynos5420_set_clksrc)); 16438c2ecf20Sopenharmony_ci 16448c2ecf20Sopenharmony_ci if (soc == EXYNOS5800) { 16458c2ecf20Sopenharmony_ci samsung_clk_sleep_init(reg_base, exynos5800_clk_regs, 16468c2ecf20Sopenharmony_ci ARRAY_SIZE(exynos5800_clk_regs)); 16478c2ecf20Sopenharmony_ci 16488c2ecf20Sopenharmony_ci exynos5_subcmus_init(ctx, ARRAY_SIZE(exynos5800_subcmus), 16498c2ecf20Sopenharmony_ci exynos5800_subcmus); 16508c2ecf20Sopenharmony_ci } else { 16518c2ecf20Sopenharmony_ci exynos5_subcmus_init(ctx, ARRAY_SIZE(exynos5x_subcmus), 16528c2ecf20Sopenharmony_ci exynos5x_subcmus); 16538c2ecf20Sopenharmony_ci } 16548c2ecf20Sopenharmony_ci 16558c2ecf20Sopenharmony_ci /* 16568c2ecf20Sopenharmony_ci * Keep top part of G3D clock path enabled permanently to ensure 16578c2ecf20Sopenharmony_ci * that the internal busses get their clock regardless of the 16588c2ecf20Sopenharmony_ci * main G3D clock enablement status. 16598c2ecf20Sopenharmony_ci */ 16608c2ecf20Sopenharmony_ci clk_prepare_enable(hws[CLK_MOUT_SW_ACLK_G3D]->clk); 16618c2ecf20Sopenharmony_ci /* 16628c2ecf20Sopenharmony_ci * Keep top BPLL mux enabled permanently to ensure that DRAM operates 16638c2ecf20Sopenharmony_ci * properly. 16648c2ecf20Sopenharmony_ci */ 16658c2ecf20Sopenharmony_ci clk_prepare_enable(hws[CLK_MOUT_BPLL]->clk); 16668c2ecf20Sopenharmony_ci 16678c2ecf20Sopenharmony_ci samsung_clk_of_add_provider(np, ctx); 16688c2ecf20Sopenharmony_ci} 16698c2ecf20Sopenharmony_ci 16708c2ecf20Sopenharmony_cistatic void __init exynos5420_clk_init(struct device_node *np) 16718c2ecf20Sopenharmony_ci{ 16728c2ecf20Sopenharmony_ci exynos5x_clk_init(np, EXYNOS5420); 16738c2ecf20Sopenharmony_ci} 16748c2ecf20Sopenharmony_ciCLK_OF_DECLARE_DRIVER(exynos5420_clk, "samsung,exynos5420-clock", 16758c2ecf20Sopenharmony_ci exynos5420_clk_init); 16768c2ecf20Sopenharmony_ci 16778c2ecf20Sopenharmony_cistatic void __init exynos5800_clk_init(struct device_node *np) 16788c2ecf20Sopenharmony_ci{ 16798c2ecf20Sopenharmony_ci exynos5x_clk_init(np, EXYNOS5800); 16808c2ecf20Sopenharmony_ci} 16818c2ecf20Sopenharmony_ciCLK_OF_DECLARE_DRIVER(exynos5800_clk, "samsung,exynos5800-clock", 16828c2ecf20Sopenharmony_ci exynos5800_clk_init); 1683