162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2014 Samsung Electronics Co., Ltd. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Common Clock Framework support for Exynos3250 SoC. 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#include <linux/clk-provider.h> 962306a36Sopenharmony_ci#include <linux/io.h> 1062306a36Sopenharmony_ci#include <linux/of.h> 1162306a36Sopenharmony_ci#include <linux/of_address.h> 1262306a36Sopenharmony_ci#include <linux/platform_device.h> 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#include <dt-bindings/clock/exynos3250.h> 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#include "clk.h" 1762306a36Sopenharmony_ci#include "clk-cpu.h" 1862306a36Sopenharmony_ci#include "clk-pll.h" 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#define SRC_LEFTBUS 0x4200 2162306a36Sopenharmony_ci#define DIV_LEFTBUS 0x4500 2262306a36Sopenharmony_ci#define GATE_IP_LEFTBUS 0x4800 2362306a36Sopenharmony_ci#define SRC_RIGHTBUS 0x8200 2462306a36Sopenharmony_ci#define DIV_RIGHTBUS 0x8500 2562306a36Sopenharmony_ci#define GATE_IP_RIGHTBUS 0x8800 2662306a36Sopenharmony_ci#define GATE_IP_PERIR 0x8960 2762306a36Sopenharmony_ci#define MPLL_LOCK 0xc010 2862306a36Sopenharmony_ci#define MPLL_CON0 0xc110 2962306a36Sopenharmony_ci#define VPLL_LOCK 0xc020 3062306a36Sopenharmony_ci#define VPLL_CON0 0xc120 3162306a36Sopenharmony_ci#define UPLL_LOCK 0xc030 3262306a36Sopenharmony_ci#define UPLL_CON0 0xc130 3362306a36Sopenharmony_ci#define SRC_TOP0 0xc210 3462306a36Sopenharmony_ci#define SRC_TOP1 0xc214 3562306a36Sopenharmony_ci#define SRC_CAM 0xc220 3662306a36Sopenharmony_ci#define SRC_MFC 0xc228 3762306a36Sopenharmony_ci#define SRC_G3D 0xc22c 3862306a36Sopenharmony_ci#define SRC_LCD 0xc234 3962306a36Sopenharmony_ci#define SRC_ISP 0xc238 4062306a36Sopenharmony_ci#define SRC_FSYS 0xc240 4162306a36Sopenharmony_ci#define SRC_PERIL0 0xc250 4262306a36Sopenharmony_ci#define SRC_PERIL1 0xc254 4362306a36Sopenharmony_ci#define SRC_MASK_TOP 0xc310 4462306a36Sopenharmony_ci#define SRC_MASK_CAM 0xc320 4562306a36Sopenharmony_ci#define SRC_MASK_LCD 0xc334 4662306a36Sopenharmony_ci#define SRC_MASK_ISP 0xc338 4762306a36Sopenharmony_ci#define SRC_MASK_FSYS 0xc340 4862306a36Sopenharmony_ci#define SRC_MASK_PERIL0 0xc350 4962306a36Sopenharmony_ci#define SRC_MASK_PERIL1 0xc354 5062306a36Sopenharmony_ci#define DIV_TOP 0xc510 5162306a36Sopenharmony_ci#define DIV_CAM 0xc520 5262306a36Sopenharmony_ci#define DIV_MFC 0xc528 5362306a36Sopenharmony_ci#define DIV_G3D 0xc52c 5462306a36Sopenharmony_ci#define DIV_LCD 0xc534 5562306a36Sopenharmony_ci#define DIV_ISP 0xc538 5662306a36Sopenharmony_ci#define DIV_FSYS0 0xc540 5762306a36Sopenharmony_ci#define DIV_FSYS1 0xc544 5862306a36Sopenharmony_ci#define DIV_FSYS2 0xc548 5962306a36Sopenharmony_ci#define DIV_PERIL0 0xc550 6062306a36Sopenharmony_ci#define DIV_PERIL1 0xc554 6162306a36Sopenharmony_ci#define DIV_PERIL3 0xc55c 6262306a36Sopenharmony_ci#define DIV_PERIL4 0xc560 6362306a36Sopenharmony_ci#define DIV_PERIL5 0xc564 6462306a36Sopenharmony_ci#define DIV_CAM1 0xc568 6562306a36Sopenharmony_ci#define CLKDIV2_RATIO 0xc580 6662306a36Sopenharmony_ci#define GATE_SCLK_CAM 0xc820 6762306a36Sopenharmony_ci#define GATE_SCLK_MFC 0xc828 6862306a36Sopenharmony_ci#define GATE_SCLK_G3D 0xc82c 6962306a36Sopenharmony_ci#define GATE_SCLK_LCD 0xc834 7062306a36Sopenharmony_ci#define GATE_SCLK_ISP_TOP 0xc838 7162306a36Sopenharmony_ci#define GATE_SCLK_FSYS 0xc840 7262306a36Sopenharmony_ci#define GATE_SCLK_PERIL 0xc850 7362306a36Sopenharmony_ci#define GATE_IP_CAM 0xc920 7462306a36Sopenharmony_ci#define GATE_IP_MFC 0xc928 7562306a36Sopenharmony_ci#define GATE_IP_G3D 0xc92c 7662306a36Sopenharmony_ci#define GATE_IP_LCD 0xc934 7762306a36Sopenharmony_ci#define GATE_IP_ISP 0xc938 7862306a36Sopenharmony_ci#define GATE_IP_FSYS 0xc940 7962306a36Sopenharmony_ci#define GATE_IP_PERIL 0xc950 8062306a36Sopenharmony_ci#define GATE_BLOCK 0xc970 8162306a36Sopenharmony_ci#define APLL_LOCK 0x14000 8262306a36Sopenharmony_ci#define APLL_CON0 0x14100 8362306a36Sopenharmony_ci#define SRC_CPU 0x14200 8462306a36Sopenharmony_ci#define DIV_CPU0 0x14500 8562306a36Sopenharmony_ci#define DIV_CPU1 0x14504 8662306a36Sopenharmony_ci#define PWR_CTRL1 0x15020 8762306a36Sopenharmony_ci#define PWR_CTRL2 0x15024 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci/* Below definitions are used for PWR_CTRL settings */ 9062306a36Sopenharmony_ci#define PWR_CTRL1_CORE2_DOWN_RATIO(x) (((x) & 0x7) << 28) 9162306a36Sopenharmony_ci#define PWR_CTRL1_CORE1_DOWN_RATIO(x) (((x) & 0x7) << 16) 9262306a36Sopenharmony_ci#define PWR_CTRL1_DIV2_DOWN_EN (1 << 9) 9362306a36Sopenharmony_ci#define PWR_CTRL1_DIV1_DOWN_EN (1 << 8) 9462306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE3_WFE (1 << 7) 9562306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE2_WFE (1 << 6) 9662306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE1_WFE (1 << 5) 9762306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE0_WFE (1 << 4) 9862306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE3_WFI (1 << 3) 9962306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE2_WFI (1 << 2) 10062306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE1_WFI (1 << 1) 10162306a36Sopenharmony_ci#define PWR_CTRL1_USE_CORE0_WFI (1 << 0) 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci/* NOTE: Must be equal to the last clock ID increased by one */ 10462306a36Sopenharmony_ci#define CLKS_NR_MAIN (CLK_SCLK_MMC2 + 1) 10562306a36Sopenharmony_ci#define CLKS_NR_DMC (CLK_DIV_DMCD + 1) 10662306a36Sopenharmony_ci#define CLKS_NR_ISP (CLK_SCLK_MPWM_ISP + 1) 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_cistatic const unsigned long exynos3250_cmu_clk_regs[] __initconst = { 10962306a36Sopenharmony_ci SRC_LEFTBUS, 11062306a36Sopenharmony_ci DIV_LEFTBUS, 11162306a36Sopenharmony_ci GATE_IP_LEFTBUS, 11262306a36Sopenharmony_ci SRC_RIGHTBUS, 11362306a36Sopenharmony_ci DIV_RIGHTBUS, 11462306a36Sopenharmony_ci GATE_IP_RIGHTBUS, 11562306a36Sopenharmony_ci GATE_IP_PERIR, 11662306a36Sopenharmony_ci MPLL_LOCK, 11762306a36Sopenharmony_ci MPLL_CON0, 11862306a36Sopenharmony_ci VPLL_LOCK, 11962306a36Sopenharmony_ci VPLL_CON0, 12062306a36Sopenharmony_ci UPLL_LOCK, 12162306a36Sopenharmony_ci UPLL_CON0, 12262306a36Sopenharmony_ci SRC_TOP0, 12362306a36Sopenharmony_ci SRC_TOP1, 12462306a36Sopenharmony_ci SRC_CAM, 12562306a36Sopenharmony_ci SRC_MFC, 12662306a36Sopenharmony_ci SRC_G3D, 12762306a36Sopenharmony_ci SRC_LCD, 12862306a36Sopenharmony_ci SRC_ISP, 12962306a36Sopenharmony_ci SRC_FSYS, 13062306a36Sopenharmony_ci SRC_PERIL0, 13162306a36Sopenharmony_ci SRC_PERIL1, 13262306a36Sopenharmony_ci SRC_MASK_TOP, 13362306a36Sopenharmony_ci SRC_MASK_CAM, 13462306a36Sopenharmony_ci SRC_MASK_LCD, 13562306a36Sopenharmony_ci SRC_MASK_ISP, 13662306a36Sopenharmony_ci SRC_MASK_FSYS, 13762306a36Sopenharmony_ci SRC_MASK_PERIL0, 13862306a36Sopenharmony_ci SRC_MASK_PERIL1, 13962306a36Sopenharmony_ci DIV_TOP, 14062306a36Sopenharmony_ci DIV_CAM, 14162306a36Sopenharmony_ci DIV_MFC, 14262306a36Sopenharmony_ci DIV_G3D, 14362306a36Sopenharmony_ci DIV_LCD, 14462306a36Sopenharmony_ci DIV_ISP, 14562306a36Sopenharmony_ci DIV_FSYS0, 14662306a36Sopenharmony_ci DIV_FSYS1, 14762306a36Sopenharmony_ci DIV_FSYS2, 14862306a36Sopenharmony_ci DIV_PERIL0, 14962306a36Sopenharmony_ci DIV_PERIL1, 15062306a36Sopenharmony_ci DIV_PERIL3, 15162306a36Sopenharmony_ci DIV_PERIL4, 15262306a36Sopenharmony_ci DIV_PERIL5, 15362306a36Sopenharmony_ci DIV_CAM1, 15462306a36Sopenharmony_ci CLKDIV2_RATIO, 15562306a36Sopenharmony_ci GATE_SCLK_CAM, 15662306a36Sopenharmony_ci GATE_SCLK_MFC, 15762306a36Sopenharmony_ci GATE_SCLK_G3D, 15862306a36Sopenharmony_ci GATE_SCLK_LCD, 15962306a36Sopenharmony_ci GATE_SCLK_ISP_TOP, 16062306a36Sopenharmony_ci GATE_SCLK_FSYS, 16162306a36Sopenharmony_ci GATE_SCLK_PERIL, 16262306a36Sopenharmony_ci GATE_IP_CAM, 16362306a36Sopenharmony_ci GATE_IP_MFC, 16462306a36Sopenharmony_ci GATE_IP_G3D, 16562306a36Sopenharmony_ci GATE_IP_LCD, 16662306a36Sopenharmony_ci GATE_IP_ISP, 16762306a36Sopenharmony_ci GATE_IP_FSYS, 16862306a36Sopenharmony_ci GATE_IP_PERIL, 16962306a36Sopenharmony_ci GATE_BLOCK, 17062306a36Sopenharmony_ci APLL_LOCK, 17162306a36Sopenharmony_ci SRC_CPU, 17262306a36Sopenharmony_ci DIV_CPU0, 17362306a36Sopenharmony_ci DIV_CPU1, 17462306a36Sopenharmony_ci PWR_CTRL1, 17562306a36Sopenharmony_ci PWR_CTRL2, 17662306a36Sopenharmony_ci}; 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ci/* list of all parent clock list */ 17962306a36Sopenharmony_ciPNAME(mout_vpllsrc_p) = { "fin_pll", }; 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ciPNAME(mout_apll_p) = { "fin_pll", "fout_apll", }; 18262306a36Sopenharmony_ciPNAME(mout_mpll_p) = { "fin_pll", "fout_mpll", }; 18362306a36Sopenharmony_ciPNAME(mout_vpll_p) = { "fin_pll", "fout_vpll", }; 18462306a36Sopenharmony_ciPNAME(mout_upll_p) = { "fin_pll", "fout_upll", }; 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ciPNAME(mout_mpll_user_p) = { "fin_pll", "div_mpll_pre", }; 18762306a36Sopenharmony_ciPNAME(mout_epll_user_p) = { "fin_pll", "mout_epll", }; 18862306a36Sopenharmony_ciPNAME(mout_core_p) = { "mout_apll", "mout_mpll_user_c", }; 18962306a36Sopenharmony_ciPNAME(mout_hpm_p) = { "mout_apll", "mout_mpll_user_c", }; 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ciPNAME(mout_ebi_p) = { "div_aclk_200", "div_aclk_160", }; 19262306a36Sopenharmony_ciPNAME(mout_ebi_1_p) = { "mout_ebi", "mout_vpll", }; 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ciPNAME(mout_gdl_p) = { "mout_mpll_user_l", }; 19562306a36Sopenharmony_ciPNAME(mout_gdr_p) = { "mout_mpll_user_r", }; 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ciPNAME(mout_aclk_400_mcuisp_sub_p) 19862306a36Sopenharmony_ci = { "fin_pll", "div_aclk_400_mcuisp", }; 19962306a36Sopenharmony_ciPNAME(mout_aclk_266_0_p) = { "div_mpll_pre", "mout_vpll", }; 20062306a36Sopenharmony_ciPNAME(mout_aclk_266_1_p) = { "mout_epll_user", }; 20162306a36Sopenharmony_ciPNAME(mout_aclk_266_p) = { "mout_aclk_266_0", "mout_aclk_266_1", }; 20262306a36Sopenharmony_ciPNAME(mout_aclk_266_sub_p) = { "fin_pll", "div_aclk_266", }; 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ciPNAME(group_div_mpll_pre_p) = { "div_mpll_pre", }; 20562306a36Sopenharmony_ciPNAME(group_epll_vpll_p) = { "mout_epll_user", "mout_vpll" }; 20662306a36Sopenharmony_ciPNAME(group_sclk_p) = { "xxti", "xusbxti", 20762306a36Sopenharmony_ci "none", "none", 20862306a36Sopenharmony_ci "none", "none", "div_mpll_pre", 20962306a36Sopenharmony_ci "mout_epll_user", "mout_vpll", }; 21062306a36Sopenharmony_ciPNAME(group_sclk_audio_p) = { "audiocdclk", "none", 21162306a36Sopenharmony_ci "none", "none", 21262306a36Sopenharmony_ci "xxti", "xusbxti", 21362306a36Sopenharmony_ci "div_mpll_pre", "mout_epll_user", 21462306a36Sopenharmony_ci "mout_vpll", }; 21562306a36Sopenharmony_ciPNAME(group_sclk_cam_blk_p) = { "xxti", "xusbxti", 21662306a36Sopenharmony_ci "none", "none", "none", 21762306a36Sopenharmony_ci "none", "div_mpll_pre", 21862306a36Sopenharmony_ci "mout_epll_user", "mout_vpll", 21962306a36Sopenharmony_ci "none", "none", "none", 22062306a36Sopenharmony_ci "div_cam_blk_320", }; 22162306a36Sopenharmony_ciPNAME(group_sclk_fimd0_p) = { "xxti", "xusbxti", 22262306a36Sopenharmony_ci "m_bitclkhsdiv4_2l", "none", 22362306a36Sopenharmony_ci "none", "none", "div_mpll_pre", 22462306a36Sopenharmony_ci "mout_epll_user", "mout_vpll", 22562306a36Sopenharmony_ci "none", "none", "none", 22662306a36Sopenharmony_ci "div_lcd_blk_145", }; 22762306a36Sopenharmony_ci 22862306a36Sopenharmony_ciPNAME(mout_mfc_p) = { "mout_mfc_0", "mout_mfc_1" }; 22962306a36Sopenharmony_ciPNAME(mout_g3d_p) = { "mout_g3d_0", "mout_g3d_1" }; 23062306a36Sopenharmony_ci 23162306a36Sopenharmony_cistatic const struct samsung_fixed_factor_clock fixed_factor_clks[] __initconst = { 23262306a36Sopenharmony_ci FFACTOR(0, "sclk_mpll_1600", "mout_mpll", 1, 1, 0), 23362306a36Sopenharmony_ci FFACTOR(0, "sclk_mpll_mif", "mout_mpll", 1, 2, 0), 23462306a36Sopenharmony_ci FFACTOR(0, "sclk_bpll", "fout_bpll", 1, 2, 0), 23562306a36Sopenharmony_ci FFACTOR(0, "div_cam_blk_320", "sclk_mpll_1600", 1, 5, 0), 23662306a36Sopenharmony_ci FFACTOR(0, "div_lcd_blk_145", "sclk_mpll_1600", 1, 11, 0), 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ci /* HACK: fin_pll hardcoded to xusbxti until detection is implemented. */ 23962306a36Sopenharmony_ci FFACTOR(CLK_FIN_PLL, "fin_pll", "xusbxti", 1, 1, 0), 24062306a36Sopenharmony_ci}; 24162306a36Sopenharmony_ci 24262306a36Sopenharmony_cistatic const struct samsung_mux_clock mux_clks[] __initconst = { 24362306a36Sopenharmony_ci /* 24462306a36Sopenharmony_ci * NOTE: Following table is sorted by register address in ascending 24562306a36Sopenharmony_ci * order and then bitfield shift in descending order, as it is done 24662306a36Sopenharmony_ci * in the User's Manual. When adding new entries, please make sure 24762306a36Sopenharmony_ci * that the order is preserved, to avoid merge conflicts and make 24862306a36Sopenharmony_ci * further work with defined data easier. 24962306a36Sopenharmony_ci */ 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ci /* SRC_LEFTBUS */ 25262306a36Sopenharmony_ci MUX(CLK_MOUT_MPLL_USER_L, "mout_mpll_user_l", mout_mpll_user_p, 25362306a36Sopenharmony_ci SRC_LEFTBUS, 4, 1), 25462306a36Sopenharmony_ci MUX(CLK_MOUT_GDL, "mout_gdl", mout_gdl_p, SRC_LEFTBUS, 0, 1), 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ci /* SRC_RIGHTBUS */ 25762306a36Sopenharmony_ci MUX(CLK_MOUT_MPLL_USER_R, "mout_mpll_user_r", mout_mpll_user_p, 25862306a36Sopenharmony_ci SRC_RIGHTBUS, 4, 1), 25962306a36Sopenharmony_ci MUX(CLK_MOUT_GDR, "mout_gdr", mout_gdr_p, SRC_RIGHTBUS, 0, 1), 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci /* SRC_TOP0 */ 26262306a36Sopenharmony_ci MUX(CLK_MOUT_EBI, "mout_ebi", mout_ebi_p, SRC_TOP0, 28, 1), 26362306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_200, "mout_aclk_200", group_div_mpll_pre_p,SRC_TOP0, 24, 1), 26462306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_160, "mout_aclk_160", group_div_mpll_pre_p, SRC_TOP0, 20, 1), 26562306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_100, "mout_aclk_100", group_div_mpll_pre_p, SRC_TOP0, 16, 1), 26662306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_266_1, "mout_aclk_266_1", mout_aclk_266_1_p, SRC_TOP0, 14, 1), 26762306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_266_0, "mout_aclk_266_0", mout_aclk_266_0_p, SRC_TOP0, 13, 1), 26862306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_266, "mout_aclk_266", mout_aclk_266_p, SRC_TOP0, 12, 1), 26962306a36Sopenharmony_ci MUX(CLK_MOUT_VPLL, "mout_vpll", mout_vpll_p, SRC_TOP0, 8, 1), 27062306a36Sopenharmony_ci MUX(CLK_MOUT_EPLL_USER, "mout_epll_user", mout_epll_user_p, SRC_TOP0, 4, 1), 27162306a36Sopenharmony_ci MUX(CLK_MOUT_EBI_1, "mout_ebi_1", mout_ebi_1_p, SRC_TOP0, 0, 1), 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ci /* SRC_TOP1 */ 27462306a36Sopenharmony_ci MUX(CLK_MOUT_UPLL, "mout_upll", mout_upll_p, SRC_TOP1, 28, 1), 27562306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_400_MCUISP_SUB, "mout_aclk_400_mcuisp_sub", mout_aclk_400_mcuisp_sub_p, 27662306a36Sopenharmony_ci SRC_TOP1, 24, 1), 27762306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_266_SUB, "mout_aclk_266_sub", mout_aclk_266_sub_p, SRC_TOP1, 20, 1), 27862306a36Sopenharmony_ci MUX(CLK_MOUT_MPLL, "mout_mpll", mout_mpll_p, SRC_TOP1, 12, 1), 27962306a36Sopenharmony_ci MUX(CLK_MOUT_ACLK_400_MCUISP, "mout_aclk_400_mcuisp", group_div_mpll_pre_p, SRC_TOP1, 8, 1), 28062306a36Sopenharmony_ci MUX(CLK_MOUT_VPLLSRC, "mout_vpllsrc", mout_vpllsrc_p, SRC_TOP1, 0, 1), 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ci /* SRC_CAM */ 28362306a36Sopenharmony_ci MUX(CLK_MOUT_CAM1, "mout_cam1", group_sclk_p, SRC_CAM, 20, 4), 28462306a36Sopenharmony_ci MUX(CLK_MOUT_CAM_BLK, "mout_cam_blk", group_sclk_cam_blk_p, SRC_CAM, 0, 4), 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci /* SRC_MFC */ 28762306a36Sopenharmony_ci MUX(CLK_MOUT_MFC, "mout_mfc", mout_mfc_p, SRC_MFC, 8, 1), 28862306a36Sopenharmony_ci MUX(CLK_MOUT_MFC_1, "mout_mfc_1", group_epll_vpll_p, SRC_MFC, 4, 1), 28962306a36Sopenharmony_ci MUX(CLK_MOUT_MFC_0, "mout_mfc_0", group_div_mpll_pre_p, SRC_MFC, 0, 1), 29062306a36Sopenharmony_ci 29162306a36Sopenharmony_ci /* SRC_G3D */ 29262306a36Sopenharmony_ci MUX(CLK_MOUT_G3D, "mout_g3d", mout_g3d_p, SRC_G3D, 8, 1), 29362306a36Sopenharmony_ci MUX(CLK_MOUT_G3D_1, "mout_g3d_1", group_epll_vpll_p, SRC_G3D, 4, 1), 29462306a36Sopenharmony_ci MUX(CLK_MOUT_G3D_0, "mout_g3d_0", group_div_mpll_pre_p, SRC_G3D, 0, 1), 29562306a36Sopenharmony_ci 29662306a36Sopenharmony_ci /* SRC_LCD */ 29762306a36Sopenharmony_ci MUX(CLK_MOUT_MIPI0, "mout_mipi0", group_sclk_p, SRC_LCD, 12, 4), 29862306a36Sopenharmony_ci MUX(CLK_MOUT_FIMD0, "mout_fimd0", group_sclk_fimd0_p, SRC_LCD, 0, 4), 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci /* SRC_ISP */ 30162306a36Sopenharmony_ci MUX(CLK_MOUT_UART_ISP, "mout_uart_isp", group_sclk_p, SRC_ISP, 12, 4), 30262306a36Sopenharmony_ci MUX(CLK_MOUT_SPI1_ISP, "mout_spi1_isp", group_sclk_p, SRC_ISP, 8, 4), 30362306a36Sopenharmony_ci MUX(CLK_MOUT_SPI0_ISP, "mout_spi0_isp", group_sclk_p, SRC_ISP, 4, 4), 30462306a36Sopenharmony_ci 30562306a36Sopenharmony_ci /* SRC_FSYS */ 30662306a36Sopenharmony_ci MUX(CLK_MOUT_TSADC, "mout_tsadc", group_sclk_p, SRC_FSYS, 28, 4), 30762306a36Sopenharmony_ci MUX(CLK_MOUT_MMC2, "mout_mmc2", group_sclk_p, SRC_FSYS, 8, 4), 30862306a36Sopenharmony_ci MUX(CLK_MOUT_MMC1, "mout_mmc1", group_sclk_p, SRC_FSYS, 4, 4), 30962306a36Sopenharmony_ci MUX(CLK_MOUT_MMC0, "mout_mmc0", group_sclk_p, SRC_FSYS, 0, 4), 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ci /* SRC_PERIL0 */ 31262306a36Sopenharmony_ci MUX(CLK_MOUT_UART2, "mout_uart2", group_sclk_p, SRC_PERIL0, 8, 4), 31362306a36Sopenharmony_ci MUX(CLK_MOUT_UART1, "mout_uart1", group_sclk_p, SRC_PERIL0, 4, 4), 31462306a36Sopenharmony_ci MUX(CLK_MOUT_UART0, "mout_uart0", group_sclk_p, SRC_PERIL0, 0, 4), 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_ci /* SRC_PERIL1 */ 31762306a36Sopenharmony_ci MUX(CLK_MOUT_SPI1, "mout_spi1", group_sclk_p, SRC_PERIL1, 20, 4), 31862306a36Sopenharmony_ci MUX(CLK_MOUT_SPI0, "mout_spi0", group_sclk_p, SRC_PERIL1, 16, 4), 31962306a36Sopenharmony_ci MUX(CLK_MOUT_AUDIO, "mout_audio", group_sclk_audio_p, SRC_PERIL1, 4, 4), 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci /* SRC_CPU */ 32262306a36Sopenharmony_ci MUX(CLK_MOUT_MPLL_USER_C, "mout_mpll_user_c", mout_mpll_user_p, 32362306a36Sopenharmony_ci SRC_CPU, 24, 1), 32462306a36Sopenharmony_ci MUX(CLK_MOUT_HPM, "mout_hpm", mout_hpm_p, SRC_CPU, 20, 1), 32562306a36Sopenharmony_ci MUX_F(CLK_MOUT_CORE, "mout_core", mout_core_p, SRC_CPU, 16, 1, 32662306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 32762306a36Sopenharmony_ci MUX_F(CLK_MOUT_APLL, "mout_apll", mout_apll_p, SRC_CPU, 0, 1, 32862306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 32962306a36Sopenharmony_ci}; 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_cistatic const struct samsung_div_clock div_clks[] __initconst = { 33262306a36Sopenharmony_ci /* 33362306a36Sopenharmony_ci * NOTE: Following table is sorted by register address in ascending 33462306a36Sopenharmony_ci * order and then bitfield shift in descending order, as it is done 33562306a36Sopenharmony_ci * in the User's Manual. When adding new entries, please make sure 33662306a36Sopenharmony_ci * that the order is preserved, to avoid merge conflicts and make 33762306a36Sopenharmony_ci * further work with defined data easier. 33862306a36Sopenharmony_ci */ 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci /* DIV_LEFTBUS */ 34162306a36Sopenharmony_ci DIV(CLK_DIV_GPL, "div_gpl", "div_gdl", DIV_LEFTBUS, 4, 3), 34262306a36Sopenharmony_ci DIV(CLK_DIV_GDL, "div_gdl", "mout_gdl", DIV_LEFTBUS, 0, 4), 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_ci /* DIV_RIGHTBUS */ 34562306a36Sopenharmony_ci DIV(CLK_DIV_GPR, "div_gpr", "div_gdr", DIV_RIGHTBUS, 4, 3), 34662306a36Sopenharmony_ci DIV(CLK_DIV_GDR, "div_gdr", "mout_gdr", DIV_RIGHTBUS, 0, 4), 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_ci /* DIV_TOP */ 34962306a36Sopenharmony_ci DIV(CLK_DIV_MPLL_PRE, "div_mpll_pre", "sclk_mpll_mif", DIV_TOP, 28, 2), 35062306a36Sopenharmony_ci DIV(CLK_DIV_ACLK_400_MCUISP, "div_aclk_400_mcuisp", 35162306a36Sopenharmony_ci "mout_aclk_400_mcuisp", DIV_TOP, 24, 3), 35262306a36Sopenharmony_ci DIV(CLK_DIV_EBI, "div_ebi", "mout_ebi_1", DIV_TOP, 16, 3), 35362306a36Sopenharmony_ci DIV(CLK_DIV_ACLK_200, "div_aclk_200", "mout_aclk_200", DIV_TOP, 12, 3), 35462306a36Sopenharmony_ci DIV(CLK_DIV_ACLK_160, "div_aclk_160", "mout_aclk_160", DIV_TOP, 8, 3), 35562306a36Sopenharmony_ci DIV(CLK_DIV_ACLK_100, "div_aclk_100", "mout_aclk_100", DIV_TOP, 4, 4), 35662306a36Sopenharmony_ci DIV(CLK_DIV_ACLK_266, "div_aclk_266", "mout_aclk_266", DIV_TOP, 0, 3), 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci /* DIV_CAM */ 35962306a36Sopenharmony_ci DIV(CLK_DIV_CAM1, "div_cam1", "mout_cam1", DIV_CAM, 20, 4), 36062306a36Sopenharmony_ci DIV(CLK_DIV_CAM_BLK, "div_cam_blk", "mout_cam_blk", DIV_CAM, 0, 4), 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_ci /* DIV_MFC */ 36362306a36Sopenharmony_ci DIV(CLK_DIV_MFC, "div_mfc", "mout_mfc", DIV_MFC, 0, 4), 36462306a36Sopenharmony_ci 36562306a36Sopenharmony_ci /* DIV_G3D */ 36662306a36Sopenharmony_ci DIV(CLK_DIV_G3D, "div_g3d", "mout_g3d", DIV_G3D, 0, 4), 36762306a36Sopenharmony_ci 36862306a36Sopenharmony_ci /* DIV_LCD */ 36962306a36Sopenharmony_ci DIV_F(CLK_DIV_MIPI0_PRE, "div_mipi0_pre", "div_mipi0", DIV_LCD, 20, 4, 37062306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 37162306a36Sopenharmony_ci DIV(CLK_DIV_MIPI0, "div_mipi0", "mout_mipi0", DIV_LCD, 16, 4), 37262306a36Sopenharmony_ci DIV(CLK_DIV_FIMD0, "div_fimd0", "mout_fimd0", DIV_LCD, 0, 4), 37362306a36Sopenharmony_ci 37462306a36Sopenharmony_ci /* DIV_ISP */ 37562306a36Sopenharmony_ci DIV(CLK_DIV_UART_ISP, "div_uart_isp", "mout_uart_isp", DIV_ISP, 28, 4), 37662306a36Sopenharmony_ci DIV_F(CLK_DIV_SPI1_ISP_PRE, "div_spi1_isp_pre", "div_spi1_isp", 37762306a36Sopenharmony_ci DIV_ISP, 20, 8, CLK_SET_RATE_PARENT, 0), 37862306a36Sopenharmony_ci DIV(CLK_DIV_SPI1_ISP, "div_spi1_isp", "mout_spi1_isp", DIV_ISP, 16, 4), 37962306a36Sopenharmony_ci DIV_F(CLK_DIV_SPI0_ISP_PRE, "div_spi0_isp_pre", "div_spi0_isp", 38062306a36Sopenharmony_ci DIV_ISP, 8, 8, CLK_SET_RATE_PARENT, 0), 38162306a36Sopenharmony_ci DIV(CLK_DIV_SPI0_ISP, "div_spi0_isp", "mout_spi0_isp", DIV_ISP, 4, 4), 38262306a36Sopenharmony_ci 38362306a36Sopenharmony_ci /* DIV_FSYS0 */ 38462306a36Sopenharmony_ci DIV_F(CLK_DIV_TSADC_PRE, "div_tsadc_pre", "div_tsadc", DIV_FSYS0, 8, 8, 38562306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 38662306a36Sopenharmony_ci DIV(CLK_DIV_TSADC, "div_tsadc", "mout_tsadc", DIV_FSYS0, 0, 4), 38762306a36Sopenharmony_ci 38862306a36Sopenharmony_ci /* DIV_FSYS1 */ 38962306a36Sopenharmony_ci DIV_F(CLK_DIV_MMC1_PRE, "div_mmc1_pre", "div_mmc1", DIV_FSYS1, 24, 8, 39062306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 39162306a36Sopenharmony_ci DIV(CLK_DIV_MMC1, "div_mmc1", "mout_mmc1", DIV_FSYS1, 16, 4), 39262306a36Sopenharmony_ci DIV_F(CLK_DIV_MMC0_PRE, "div_mmc0_pre", "div_mmc0", DIV_FSYS1, 8, 8, 39362306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 39462306a36Sopenharmony_ci DIV(CLK_DIV_MMC0, "div_mmc0", "mout_mmc0", DIV_FSYS1, 0, 4), 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_ci /* DIV_FSYS2 */ 39762306a36Sopenharmony_ci DIV_F(CLK_DIV_MMC2_PRE, "div_mmc2_pre", "div_mmc2", DIV_FSYS2, 8, 8, 39862306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 39962306a36Sopenharmony_ci DIV(CLK_DIV_MMC2, "div_mmc2", "mout_mmc2", DIV_FSYS2, 0, 4), 40062306a36Sopenharmony_ci 40162306a36Sopenharmony_ci /* DIV_PERIL0 */ 40262306a36Sopenharmony_ci DIV(CLK_DIV_UART2, "div_uart2", "mout_uart2", DIV_PERIL0, 8, 4), 40362306a36Sopenharmony_ci DIV(CLK_DIV_UART1, "div_uart1", "mout_uart1", DIV_PERIL0, 4, 4), 40462306a36Sopenharmony_ci DIV(CLK_DIV_UART0, "div_uart0", "mout_uart0", DIV_PERIL0, 0, 4), 40562306a36Sopenharmony_ci 40662306a36Sopenharmony_ci /* DIV_PERIL1 */ 40762306a36Sopenharmony_ci DIV_F(CLK_DIV_SPI1_PRE, "div_spi1_pre", "div_spi1", DIV_PERIL1, 24, 8, 40862306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 40962306a36Sopenharmony_ci DIV(CLK_DIV_SPI1, "div_spi1", "mout_spi1", DIV_PERIL1, 16, 4), 41062306a36Sopenharmony_ci DIV_F(CLK_DIV_SPI0_PRE, "div_spi0_pre", "div_spi0", DIV_PERIL1, 8, 8, 41162306a36Sopenharmony_ci CLK_SET_RATE_PARENT, 0), 41262306a36Sopenharmony_ci DIV(CLK_DIV_SPI0, "div_spi0", "mout_spi0", DIV_PERIL1, 0, 4), 41362306a36Sopenharmony_ci 41462306a36Sopenharmony_ci /* DIV_PERIL4 */ 41562306a36Sopenharmony_ci DIV(CLK_DIV_PCM, "div_pcm", "div_audio", DIV_PERIL4, 20, 8), 41662306a36Sopenharmony_ci DIV(CLK_DIV_AUDIO, "div_audio", "mout_audio", DIV_PERIL4, 16, 4), 41762306a36Sopenharmony_ci 41862306a36Sopenharmony_ci /* DIV_PERIL5 */ 41962306a36Sopenharmony_ci DIV(CLK_DIV_I2S, "div_i2s", "div_audio", DIV_PERIL5, 8, 6), 42062306a36Sopenharmony_ci 42162306a36Sopenharmony_ci /* DIV_CPU0 */ 42262306a36Sopenharmony_ci DIV(CLK_DIV_CORE2, "div_core2", "div_core", DIV_CPU0, 28, 3), 42362306a36Sopenharmony_ci DIV(CLK_DIV_APLL, "div_apll", "mout_apll", DIV_CPU0, 24, 3), 42462306a36Sopenharmony_ci DIV(CLK_DIV_PCLK_DBG, "div_pclk_dbg", "div_core2", DIV_CPU0, 20, 3), 42562306a36Sopenharmony_ci DIV(CLK_DIV_ATB, "div_atb", "div_core2", DIV_CPU0, 16, 3), 42662306a36Sopenharmony_ci DIV(CLK_DIV_COREM, "div_corem", "div_core2", DIV_CPU0, 4, 3), 42762306a36Sopenharmony_ci DIV(CLK_DIV_CORE, "div_core", "mout_core", DIV_CPU0, 0, 3), 42862306a36Sopenharmony_ci 42962306a36Sopenharmony_ci /* DIV_CPU1 */ 43062306a36Sopenharmony_ci DIV(CLK_DIV_HPM, "div_hpm", "div_copy", DIV_CPU1, 4, 3), 43162306a36Sopenharmony_ci DIV(CLK_DIV_COPY, "div_copy", "mout_hpm", DIV_CPU1, 0, 3), 43262306a36Sopenharmony_ci}; 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_cistatic const struct samsung_gate_clock gate_clks[] __initconst = { 43562306a36Sopenharmony_ci /* 43662306a36Sopenharmony_ci * NOTE: Following table is sorted by register address in ascending 43762306a36Sopenharmony_ci * order and then bitfield shift in descending order, as it is done 43862306a36Sopenharmony_ci * in the User's Manual. When adding new entries, please make sure 43962306a36Sopenharmony_ci * that the order is preserved, to avoid merge conflicts and make 44062306a36Sopenharmony_ci * further work with defined data easier. 44162306a36Sopenharmony_ci */ 44262306a36Sopenharmony_ci 44362306a36Sopenharmony_ci /* GATE_IP_LEFTBUS */ 44462306a36Sopenharmony_ci GATE(CLK_ASYNC_G3D, "async_g3d", "div_aclk_100", GATE_IP_LEFTBUS, 6, 44562306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 44662306a36Sopenharmony_ci GATE(CLK_ASYNC_MFCL, "async_mfcl", "div_aclk_100", GATE_IP_LEFTBUS, 4, 44762306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 44862306a36Sopenharmony_ci GATE(CLK_PPMULEFT, "ppmuleft", "div_aclk_100", GATE_IP_LEFTBUS, 1, 44962306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 45062306a36Sopenharmony_ci GATE(CLK_GPIO_LEFT, "gpio_left", "div_aclk_100", GATE_IP_LEFTBUS, 0, 45162306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ci /* GATE_IP_RIGHTBUS */ 45462306a36Sopenharmony_ci GATE(CLK_ASYNC_ISPMX, "async_ispmx", "div_aclk_100", 45562306a36Sopenharmony_ci GATE_IP_RIGHTBUS, 9, CLK_IGNORE_UNUSED, 0), 45662306a36Sopenharmony_ci GATE(CLK_ASYNC_FSYSD, "async_fsysd", "div_aclk_100", 45762306a36Sopenharmony_ci GATE_IP_RIGHTBUS, 5, CLK_IGNORE_UNUSED, 0), 45862306a36Sopenharmony_ci GATE(CLK_ASYNC_LCD0X, "async_lcd0x", "div_aclk_100", 45962306a36Sopenharmony_ci GATE_IP_RIGHTBUS, 3, CLK_IGNORE_UNUSED, 0), 46062306a36Sopenharmony_ci GATE(CLK_ASYNC_CAMX, "async_camx", "div_aclk_100", GATE_IP_RIGHTBUS, 2, 46162306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 46262306a36Sopenharmony_ci GATE(CLK_PPMURIGHT, "ppmuright", "div_aclk_100", GATE_IP_RIGHTBUS, 1, 46362306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 46462306a36Sopenharmony_ci GATE(CLK_GPIO_RIGHT, "gpio_right", "div_aclk_100", GATE_IP_RIGHTBUS, 0, 46562306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 46662306a36Sopenharmony_ci 46762306a36Sopenharmony_ci /* GATE_IP_PERIR */ 46862306a36Sopenharmony_ci GATE(CLK_MONOCNT, "monocnt", "div_aclk_100", GATE_IP_PERIR, 22, 46962306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 47062306a36Sopenharmony_ci GATE(CLK_TZPC6, "tzpc6", "div_aclk_100", GATE_IP_PERIR, 21, 47162306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 47262306a36Sopenharmony_ci GATE(CLK_PROVISIONKEY1, "provisionkey1", "div_aclk_100", 47362306a36Sopenharmony_ci GATE_IP_PERIR, 20, CLK_IGNORE_UNUSED, 0), 47462306a36Sopenharmony_ci GATE(CLK_PROVISIONKEY0, "provisionkey0", "div_aclk_100", 47562306a36Sopenharmony_ci GATE_IP_PERIR, 19, CLK_IGNORE_UNUSED, 0), 47662306a36Sopenharmony_ci GATE(CLK_CMU_ISPPART, "cmu_isppart", "div_aclk_100", GATE_IP_PERIR, 18, 47762306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 47862306a36Sopenharmony_ci GATE(CLK_TMU_APBIF, "tmu_apbif", "div_aclk_100", 47962306a36Sopenharmony_ci GATE_IP_PERIR, 17, 0, 0), 48062306a36Sopenharmony_ci GATE(CLK_KEYIF, "keyif", "div_aclk_100", GATE_IP_PERIR, 16, 0, 0), 48162306a36Sopenharmony_ci GATE(CLK_RTC, "rtc", "div_aclk_100", GATE_IP_PERIR, 15, 0, 0), 48262306a36Sopenharmony_ci GATE(CLK_WDT, "wdt", "div_aclk_100", GATE_IP_PERIR, 14, 0, 0), 48362306a36Sopenharmony_ci GATE(CLK_MCT, "mct", "div_aclk_100", GATE_IP_PERIR, 13, 0, 0), 48462306a36Sopenharmony_ci GATE(CLK_SECKEY, "seckey", "div_aclk_100", GATE_IP_PERIR, 12, 48562306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 48662306a36Sopenharmony_ci GATE(CLK_TZPC5, "tzpc5", "div_aclk_100", GATE_IP_PERIR, 10, 48762306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 48862306a36Sopenharmony_ci GATE(CLK_TZPC4, "tzpc4", "div_aclk_100", GATE_IP_PERIR, 9, 48962306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 49062306a36Sopenharmony_ci GATE(CLK_TZPC3, "tzpc3", "div_aclk_100", GATE_IP_PERIR, 8, 49162306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 49262306a36Sopenharmony_ci GATE(CLK_TZPC2, "tzpc2", "div_aclk_100", GATE_IP_PERIR, 7, 49362306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 49462306a36Sopenharmony_ci GATE(CLK_TZPC1, "tzpc1", "div_aclk_100", GATE_IP_PERIR, 6, 49562306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 49662306a36Sopenharmony_ci GATE(CLK_TZPC0, "tzpc0", "div_aclk_100", GATE_IP_PERIR, 5, 49762306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 49862306a36Sopenharmony_ci GATE(CLK_CMU_COREPART, "cmu_corepart", "div_aclk_100", GATE_IP_PERIR, 4, 49962306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 50062306a36Sopenharmony_ci GATE(CLK_CMU_TOPPART, "cmu_toppart", "div_aclk_100", GATE_IP_PERIR, 3, 50162306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 50262306a36Sopenharmony_ci GATE(CLK_PMU_APBIF, "pmu_apbif", "div_aclk_100", GATE_IP_PERIR, 2, 50362306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 50462306a36Sopenharmony_ci GATE(CLK_SYSREG, "sysreg", "div_aclk_100", GATE_IP_PERIR, 1, 50562306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 50662306a36Sopenharmony_ci GATE(CLK_CHIP_ID, "chip_id", "div_aclk_100", GATE_IP_PERIR, 0, 50762306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 50862306a36Sopenharmony_ci 50962306a36Sopenharmony_ci /* GATE_SCLK_CAM */ 51062306a36Sopenharmony_ci GATE(CLK_SCLK_JPEG, "sclk_jpeg", "div_cam_blk", 51162306a36Sopenharmony_ci GATE_SCLK_CAM, 8, CLK_SET_RATE_PARENT, 0), 51262306a36Sopenharmony_ci GATE(CLK_SCLK_M2MSCALER, "sclk_m2mscaler", "div_cam_blk", 51362306a36Sopenharmony_ci GATE_SCLK_CAM, 2, CLK_SET_RATE_PARENT, 0), 51462306a36Sopenharmony_ci GATE(CLK_SCLK_GSCALER1, "sclk_gscaler1", "div_cam_blk", 51562306a36Sopenharmony_ci GATE_SCLK_CAM, 1, CLK_SET_RATE_PARENT, 0), 51662306a36Sopenharmony_ci GATE(CLK_SCLK_GSCALER0, "sclk_gscaler0", "div_cam_blk", 51762306a36Sopenharmony_ci GATE_SCLK_CAM, 0, CLK_SET_RATE_PARENT, 0), 51862306a36Sopenharmony_ci 51962306a36Sopenharmony_ci /* GATE_SCLK_MFC */ 52062306a36Sopenharmony_ci GATE(CLK_SCLK_MFC, "sclk_mfc", "div_mfc", 52162306a36Sopenharmony_ci GATE_SCLK_MFC, 0, CLK_SET_RATE_PARENT, 0), 52262306a36Sopenharmony_ci 52362306a36Sopenharmony_ci /* GATE_SCLK_G3D */ 52462306a36Sopenharmony_ci GATE(CLK_SCLK_G3D, "sclk_g3d", "div_g3d", 52562306a36Sopenharmony_ci GATE_SCLK_G3D, 0, CLK_SET_RATE_PARENT, 0), 52662306a36Sopenharmony_ci 52762306a36Sopenharmony_ci /* GATE_SCLK_LCD */ 52862306a36Sopenharmony_ci GATE(CLK_SCLK_MIPIDPHY2L, "sclk_mipidphy2l", "div_mipi0", 52962306a36Sopenharmony_ci GATE_SCLK_LCD, 4, CLK_SET_RATE_PARENT, 0), 53062306a36Sopenharmony_ci GATE(CLK_SCLK_MIPI0, "sclk_mipi0", "div_mipi0_pre", 53162306a36Sopenharmony_ci GATE_SCLK_LCD, 3, CLK_SET_RATE_PARENT, 0), 53262306a36Sopenharmony_ci GATE(CLK_SCLK_FIMD0, "sclk_fimd0", "div_fimd0", 53362306a36Sopenharmony_ci GATE_SCLK_LCD, 0, CLK_SET_RATE_PARENT, 0), 53462306a36Sopenharmony_ci 53562306a36Sopenharmony_ci /* GATE_SCLK_ISP_TOP */ 53662306a36Sopenharmony_ci GATE(CLK_SCLK_CAM1, "sclk_cam1", "div_cam1", 53762306a36Sopenharmony_ci GATE_SCLK_ISP_TOP, 4, CLK_SET_RATE_PARENT, 0), 53862306a36Sopenharmony_ci GATE(CLK_SCLK_UART_ISP, "sclk_uart_isp", "div_uart_isp", 53962306a36Sopenharmony_ci GATE_SCLK_ISP_TOP, 3, CLK_SET_RATE_PARENT, 0), 54062306a36Sopenharmony_ci GATE(CLK_SCLK_SPI1_ISP, "sclk_spi1_isp", "div_spi1_isp", 54162306a36Sopenharmony_ci GATE_SCLK_ISP_TOP, 2, CLK_SET_RATE_PARENT, 0), 54262306a36Sopenharmony_ci GATE(CLK_SCLK_SPI0_ISP, "sclk_spi0_isp", "div_spi0_isp", 54362306a36Sopenharmony_ci GATE_SCLK_ISP_TOP, 1, CLK_SET_RATE_PARENT, 0), 54462306a36Sopenharmony_ci 54562306a36Sopenharmony_ci /* GATE_SCLK_FSYS */ 54662306a36Sopenharmony_ci GATE(CLK_SCLK_UPLL, "sclk_upll", "mout_upll", GATE_SCLK_FSYS, 10, 0, 0), 54762306a36Sopenharmony_ci GATE(CLK_SCLK_TSADC, "sclk_tsadc", "div_tsadc_pre", 54862306a36Sopenharmony_ci GATE_SCLK_FSYS, 9, CLK_SET_RATE_PARENT, 0), 54962306a36Sopenharmony_ci GATE(CLK_SCLK_EBI, "sclk_ebi", "div_ebi", 55062306a36Sopenharmony_ci GATE_SCLK_FSYS, 6, CLK_SET_RATE_PARENT, 0), 55162306a36Sopenharmony_ci GATE(CLK_SCLK_MMC2, "sclk_mmc2", "div_mmc2_pre", 55262306a36Sopenharmony_ci GATE_SCLK_FSYS, 2, CLK_SET_RATE_PARENT, 0), 55362306a36Sopenharmony_ci GATE(CLK_SCLK_MMC1, "sclk_mmc1", "div_mmc1_pre", 55462306a36Sopenharmony_ci GATE_SCLK_FSYS, 1, CLK_SET_RATE_PARENT, 0), 55562306a36Sopenharmony_ci GATE(CLK_SCLK_MMC0, "sclk_mmc0", "div_mmc0_pre", 55662306a36Sopenharmony_ci GATE_SCLK_FSYS, 0, CLK_SET_RATE_PARENT, 0), 55762306a36Sopenharmony_ci 55862306a36Sopenharmony_ci /* GATE_SCLK_PERIL */ 55962306a36Sopenharmony_ci GATE(CLK_SCLK_I2S, "sclk_i2s", "div_i2s", 56062306a36Sopenharmony_ci GATE_SCLK_PERIL, 18, CLK_SET_RATE_PARENT, 0), 56162306a36Sopenharmony_ci GATE(CLK_SCLK_PCM, "sclk_pcm", "div_pcm", 56262306a36Sopenharmony_ci GATE_SCLK_PERIL, 16, CLK_SET_RATE_PARENT, 0), 56362306a36Sopenharmony_ci GATE(CLK_SCLK_SPI1, "sclk_spi1", "div_spi1_pre", 56462306a36Sopenharmony_ci GATE_SCLK_PERIL, 7, CLK_SET_RATE_PARENT, 0), 56562306a36Sopenharmony_ci GATE(CLK_SCLK_SPI0, "sclk_spi0", "div_spi0_pre", 56662306a36Sopenharmony_ci GATE_SCLK_PERIL, 6, CLK_SET_RATE_PARENT, 0), 56762306a36Sopenharmony_ci 56862306a36Sopenharmony_ci GATE(CLK_SCLK_UART2, "sclk_uart2", "div_uart2", 56962306a36Sopenharmony_ci GATE_SCLK_PERIL, 2, CLK_SET_RATE_PARENT, 0), 57062306a36Sopenharmony_ci GATE(CLK_SCLK_UART1, "sclk_uart1", "div_uart1", 57162306a36Sopenharmony_ci GATE_SCLK_PERIL, 1, CLK_SET_RATE_PARENT, 0), 57262306a36Sopenharmony_ci GATE(CLK_SCLK_UART0, "sclk_uart0", "div_uart0", 57362306a36Sopenharmony_ci GATE_SCLK_PERIL, 0, CLK_SET_RATE_PARENT, 0), 57462306a36Sopenharmony_ci 57562306a36Sopenharmony_ci /* GATE_IP_CAM */ 57662306a36Sopenharmony_ci GATE(CLK_QEJPEG, "qejpeg", "div_cam_blk_320", GATE_IP_CAM, 19, 57762306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 57862306a36Sopenharmony_ci GATE(CLK_PIXELASYNCM1, "pixelasyncm1", "div_cam_blk_320", 57962306a36Sopenharmony_ci GATE_IP_CAM, 18, CLK_IGNORE_UNUSED, 0), 58062306a36Sopenharmony_ci GATE(CLK_PIXELASYNCM0, "pixelasyncm0", "div_cam_blk_320", 58162306a36Sopenharmony_ci GATE_IP_CAM, 17, CLK_IGNORE_UNUSED, 0), 58262306a36Sopenharmony_ci GATE(CLK_PPMUCAMIF, "ppmucamif", "div_cam_blk_320", 58362306a36Sopenharmony_ci GATE_IP_CAM, 16, CLK_IGNORE_UNUSED, 0), 58462306a36Sopenharmony_ci GATE(CLK_QEM2MSCALER, "qem2mscaler", "div_cam_blk_320", 58562306a36Sopenharmony_ci GATE_IP_CAM, 14, CLK_IGNORE_UNUSED, 0), 58662306a36Sopenharmony_ci GATE(CLK_QEGSCALER1, "qegscaler1", "div_cam_blk_320", 58762306a36Sopenharmony_ci GATE_IP_CAM, 13, CLK_IGNORE_UNUSED, 0), 58862306a36Sopenharmony_ci GATE(CLK_QEGSCALER0, "qegscaler0", "div_cam_blk_320", 58962306a36Sopenharmony_ci GATE_IP_CAM, 12, CLK_IGNORE_UNUSED, 0), 59062306a36Sopenharmony_ci GATE(CLK_SMMUJPEG, "smmujpeg", "div_cam_blk_320", 59162306a36Sopenharmony_ci GATE_IP_CAM, 11, 0, 0), 59262306a36Sopenharmony_ci GATE(CLK_SMMUM2M2SCALER, "smmum2m2scaler", "div_cam_blk_320", 59362306a36Sopenharmony_ci GATE_IP_CAM, 9, 0, 0), 59462306a36Sopenharmony_ci GATE(CLK_SMMUGSCALER1, "smmugscaler1", "div_cam_blk_320", 59562306a36Sopenharmony_ci GATE_IP_CAM, 8, 0, 0), 59662306a36Sopenharmony_ci GATE(CLK_SMMUGSCALER0, "smmugscaler0", "div_cam_blk_320", 59762306a36Sopenharmony_ci GATE_IP_CAM, 7, 0, 0), 59862306a36Sopenharmony_ci GATE(CLK_JPEG, "jpeg", "div_cam_blk_320", GATE_IP_CAM, 6, 0, 0), 59962306a36Sopenharmony_ci GATE(CLK_M2MSCALER, "m2mscaler", "div_cam_blk_320", 60062306a36Sopenharmony_ci GATE_IP_CAM, 2, 0, 0), 60162306a36Sopenharmony_ci GATE(CLK_GSCALER1, "gscaler1", "div_cam_blk_320", GATE_IP_CAM, 1, 0, 0), 60262306a36Sopenharmony_ci GATE(CLK_GSCALER0, "gscaler0", "div_cam_blk_320", GATE_IP_CAM, 0, 0, 0), 60362306a36Sopenharmony_ci 60462306a36Sopenharmony_ci /* GATE_IP_MFC */ 60562306a36Sopenharmony_ci GATE(CLK_QEMFC, "qemfc", "div_aclk_200", GATE_IP_MFC, 5, 60662306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 60762306a36Sopenharmony_ci GATE(CLK_PPMUMFC_L, "ppmumfc_l", "div_aclk_200", GATE_IP_MFC, 3, 60862306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 60962306a36Sopenharmony_ci GATE(CLK_SMMUMFC_L, "smmumfc_l", "div_aclk_200", GATE_IP_MFC, 1, 0, 0), 61062306a36Sopenharmony_ci GATE(CLK_MFC, "mfc", "div_aclk_200", GATE_IP_MFC, 0, 0, 0), 61162306a36Sopenharmony_ci 61262306a36Sopenharmony_ci /* GATE_IP_G3D */ 61362306a36Sopenharmony_ci GATE(CLK_SMMUG3D, "smmug3d", "div_aclk_200", GATE_IP_G3D, 3, 0, 0), 61462306a36Sopenharmony_ci GATE(CLK_QEG3D, "qeg3d", "div_aclk_200", GATE_IP_G3D, 2, 61562306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 61662306a36Sopenharmony_ci GATE(CLK_PPMUG3D, "ppmug3d", "div_aclk_200", GATE_IP_G3D, 1, 61762306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 61862306a36Sopenharmony_ci GATE(CLK_G3D, "g3d", "div_aclk_200", GATE_IP_G3D, 0, 0, 0), 61962306a36Sopenharmony_ci 62062306a36Sopenharmony_ci /* GATE_IP_LCD */ 62162306a36Sopenharmony_ci GATE(CLK_QE_CH1_LCD, "qe_ch1_lcd", "div_aclk_160", GATE_IP_LCD, 7, 62262306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 62362306a36Sopenharmony_ci GATE(CLK_QE_CH0_LCD, "qe_ch0_lcd", "div_aclk_160", GATE_IP_LCD, 6, 62462306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 62562306a36Sopenharmony_ci GATE(CLK_PPMULCD0, "ppmulcd0", "div_aclk_160", GATE_IP_LCD, 5, 62662306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 62762306a36Sopenharmony_ci GATE(CLK_SMMUFIMD0, "smmufimd0", "div_aclk_160", GATE_IP_LCD, 4, 0, 0), 62862306a36Sopenharmony_ci GATE(CLK_DSIM0, "dsim0", "div_aclk_160", GATE_IP_LCD, 3, 0, 0), 62962306a36Sopenharmony_ci GATE(CLK_SMIES, "smies", "div_aclk_160", GATE_IP_LCD, 2, 0, 0), 63062306a36Sopenharmony_ci GATE(CLK_FIMD0, "fimd0", "div_aclk_160", GATE_IP_LCD, 0, 0, 0), 63162306a36Sopenharmony_ci 63262306a36Sopenharmony_ci /* GATE_IP_ISP */ 63362306a36Sopenharmony_ci GATE(CLK_CAM1, "cam1", "mout_aclk_266_sub", GATE_IP_ISP, 5, 0, 0), 63462306a36Sopenharmony_ci GATE(CLK_UART_ISP_TOP, "uart_isp_top", "mout_aclk_266_sub", 63562306a36Sopenharmony_ci GATE_IP_ISP, 3, 0, 0), 63662306a36Sopenharmony_ci GATE(CLK_SPI1_ISP_TOP, "spi1_isp_top", "mout_aclk_266_sub", 63762306a36Sopenharmony_ci GATE_IP_ISP, 2, 0, 0), 63862306a36Sopenharmony_ci GATE(CLK_SPI0_ISP_TOP, "spi0_isp_top", "mout_aclk_266_sub", 63962306a36Sopenharmony_ci GATE_IP_ISP, 1, 0, 0), 64062306a36Sopenharmony_ci 64162306a36Sopenharmony_ci /* GATE_IP_FSYS */ 64262306a36Sopenharmony_ci GATE(CLK_TSADC, "tsadc", "div_aclk_200", GATE_IP_FSYS, 20, 0, 0), 64362306a36Sopenharmony_ci GATE(CLK_PPMUFILE, "ppmufile", "div_aclk_200", GATE_IP_FSYS, 17, 64462306a36Sopenharmony_ci CLK_IGNORE_UNUSED, 0), 64562306a36Sopenharmony_ci GATE(CLK_USBOTG, "usbotg", "div_aclk_200", GATE_IP_FSYS, 13, 0, 0), 64662306a36Sopenharmony_ci GATE(CLK_USBHOST, "usbhost", "div_aclk_200", GATE_IP_FSYS, 12, 0, 0), 64762306a36Sopenharmony_ci GATE(CLK_SROMC, "sromc", "div_aclk_200", GATE_IP_FSYS, 11, 0, 0), 64862306a36Sopenharmony_ci GATE(CLK_SDMMC2, "sdmmc2", "div_aclk_200", GATE_IP_FSYS, 7, 0, 0), 64962306a36Sopenharmony_ci GATE(CLK_SDMMC1, "sdmmc1", "div_aclk_200", GATE_IP_FSYS, 6, 0, 0), 65062306a36Sopenharmony_ci GATE(CLK_SDMMC0, "sdmmc0", "div_aclk_200", GATE_IP_FSYS, 5, 0, 0), 65162306a36Sopenharmony_ci GATE(CLK_PDMA1, "pdma1", "div_aclk_200", GATE_IP_FSYS, 1, 0, 0), 65262306a36Sopenharmony_ci GATE(CLK_PDMA0, "pdma0", "div_aclk_200", GATE_IP_FSYS, 0, 0, 0), 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_ci /* GATE_IP_PERIL */ 65562306a36Sopenharmony_ci GATE(CLK_PWM, "pwm", "div_aclk_100", GATE_IP_PERIL, 24, 0, 0), 65662306a36Sopenharmony_ci GATE(CLK_PCM, "pcm", "div_aclk_100", GATE_IP_PERIL, 23, 0, 0), 65762306a36Sopenharmony_ci GATE(CLK_I2S, "i2s", "div_aclk_100", GATE_IP_PERIL, 21, 0, 0), 65862306a36Sopenharmony_ci GATE(CLK_SPI1, "spi1", "div_aclk_100", GATE_IP_PERIL, 17, 0, 0), 65962306a36Sopenharmony_ci GATE(CLK_SPI0, "spi0", "div_aclk_100", GATE_IP_PERIL, 16, 0, 0), 66062306a36Sopenharmony_ci GATE(CLK_I2C7, "i2c7", "div_aclk_100", GATE_IP_PERIL, 13, 0, 0), 66162306a36Sopenharmony_ci GATE(CLK_I2C6, "i2c6", "div_aclk_100", GATE_IP_PERIL, 12, 0, 0), 66262306a36Sopenharmony_ci GATE(CLK_I2C5, "i2c5", "div_aclk_100", GATE_IP_PERIL, 11, 0, 0), 66362306a36Sopenharmony_ci GATE(CLK_I2C4, "i2c4", "div_aclk_100", GATE_IP_PERIL, 10, 0, 0), 66462306a36Sopenharmony_ci GATE(CLK_I2C3, "i2c3", "div_aclk_100", GATE_IP_PERIL, 9, 0, 0), 66562306a36Sopenharmony_ci GATE(CLK_I2C2, "i2c2", "div_aclk_100", GATE_IP_PERIL, 8, 0, 0), 66662306a36Sopenharmony_ci GATE(CLK_I2C1, "i2c1", "div_aclk_100", GATE_IP_PERIL, 7, 0, 0), 66762306a36Sopenharmony_ci GATE(CLK_I2C0, "i2c0", "div_aclk_100", GATE_IP_PERIL, 6, 0, 0), 66862306a36Sopenharmony_ci GATE(CLK_UART2, "uart2", "div_aclk_100", GATE_IP_PERIL, 2, 0, 0), 66962306a36Sopenharmony_ci GATE(CLK_UART1, "uart1", "div_aclk_100", GATE_IP_PERIL, 1, 0, 0), 67062306a36Sopenharmony_ci GATE(CLK_UART0, "uart0", "div_aclk_100", GATE_IP_PERIL, 0, 0, 0), 67162306a36Sopenharmony_ci}; 67262306a36Sopenharmony_ci 67362306a36Sopenharmony_ci/* APLL & MPLL & BPLL & UPLL */ 67462306a36Sopenharmony_cistatic const struct samsung_pll_rate_table exynos3250_pll_rates[] __initconst = { 67562306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1200000000, 400, 4, 1), 67662306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1100000000, 275, 3, 1), 67762306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1066000000, 533, 6, 1), 67862306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 1000000000, 250, 3, 1), 67962306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 960000000, 320, 4, 1), 68062306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 900000000, 300, 4, 1), 68162306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 850000000, 425, 6, 1), 68262306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 800000000, 200, 3, 1), 68362306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 700000000, 175, 3, 1), 68462306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 667000000, 667, 12, 1), 68562306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 600000000, 400, 4, 2), 68662306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 533000000, 533, 6, 2), 68762306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 520000000, 260, 3, 2), 68862306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 500000000, 250, 3, 2), 68962306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 400000000, 200, 3, 2), 69062306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 200000000, 200, 3, 3), 69162306a36Sopenharmony_ci PLL_35XX_RATE(24 * MHZ, 100000000, 200, 3, 4), 69262306a36Sopenharmony_ci { /* sentinel */ } 69362306a36Sopenharmony_ci}; 69462306a36Sopenharmony_ci 69562306a36Sopenharmony_ci/* EPLL */ 69662306a36Sopenharmony_cistatic const struct samsung_pll_rate_table exynos3250_epll_rates[] __initconst = { 69762306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 800000000, 200, 3, 1, 0), 69862306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 288000000, 96, 2, 2, 0), 69962306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 192000000, 128, 2, 3, 0), 70062306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 144000000, 96, 2, 3, 0), 70162306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 96000000, 128, 2, 4, 0), 70262306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 84000000, 112, 2, 4, 0), 70362306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 80000003, 106, 2, 4, 43691), 70462306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 73728000, 98, 2, 4, 19923), 70562306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 67737598, 270, 3, 5, 62285), 70662306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 65535999, 174, 2, 5, 49982), 70762306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 50000000, 200, 3, 5, 0), 70862306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 49152002, 131, 2, 5, 4719), 70962306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 48000000, 128, 2, 5, 0), 71062306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 45158401, 180, 3, 5, 41524), 71162306a36Sopenharmony_ci { /* sentinel */ } 71262306a36Sopenharmony_ci}; 71362306a36Sopenharmony_ci 71462306a36Sopenharmony_ci/* VPLL */ 71562306a36Sopenharmony_cistatic const struct samsung_pll_rate_table exynos3250_vpll_rates[] __initconst = { 71662306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 600000000, 100, 2, 1, 0), 71762306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 533000000, 266, 3, 2, 32768), 71862306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 519230987, 173, 2, 2, 5046), 71962306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 500000000, 250, 3, 2, 0), 72062306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 445500000, 148, 2, 2, 32768), 72162306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 445055007, 148, 2, 2, 23047), 72262306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 400000000, 200, 3, 2, 0), 72362306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 371250000, 123, 2, 2, 49152), 72462306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 370878997, 185, 3, 2, 28803), 72562306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 340000000, 170, 3, 2, 0), 72662306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 335000015, 111, 2, 2, 43691), 72762306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 333000000, 111, 2, 2, 0), 72862306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 330000000, 110, 2, 2, 0), 72962306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 320000015, 106, 2, 2, 43691), 73062306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 300000000, 100, 2, 2, 0), 73162306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 275000000, 275, 3, 3, 0), 73262306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 222750000, 148, 2, 3, 32768), 73362306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 222528007, 148, 2, 3, 23069), 73462306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 160000000, 160, 3, 3, 0), 73562306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 148500000, 99, 2, 3, 0), 73662306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 148352005, 98, 2, 3, 59070), 73762306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 108000000, 144, 2, 4, 0), 73862306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 74250000, 99, 2, 4, 0), 73962306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 74176002, 98, 2, 4, 59070), 74062306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 54054000, 216, 3, 5, 14156), 74162306a36Sopenharmony_ci PLL_36XX_RATE(24 * MHZ, 54000000, 144, 2, 5, 0), 74262306a36Sopenharmony_ci { /* sentinel */ } 74362306a36Sopenharmony_ci}; 74462306a36Sopenharmony_ci 74562306a36Sopenharmony_cistatic const struct samsung_pll_clock exynos3250_plls[] __initconst = { 74662306a36Sopenharmony_ci PLL(pll_35xx, CLK_FOUT_APLL, "fout_apll", "fin_pll", 74762306a36Sopenharmony_ci APLL_LOCK, APLL_CON0, exynos3250_pll_rates), 74862306a36Sopenharmony_ci PLL(pll_35xx, CLK_FOUT_MPLL, "fout_mpll", "fin_pll", 74962306a36Sopenharmony_ci MPLL_LOCK, MPLL_CON0, exynos3250_pll_rates), 75062306a36Sopenharmony_ci PLL(pll_36xx, CLK_FOUT_VPLL, "fout_vpll", "fin_pll", 75162306a36Sopenharmony_ci VPLL_LOCK, VPLL_CON0, exynos3250_vpll_rates), 75262306a36Sopenharmony_ci PLL(pll_35xx, CLK_FOUT_UPLL, "fout_upll", "fin_pll", 75362306a36Sopenharmony_ci UPLL_LOCK, UPLL_CON0, exynos3250_pll_rates), 75462306a36Sopenharmony_ci}; 75562306a36Sopenharmony_ci 75662306a36Sopenharmony_ci#define E3250_CPU_DIV0(apll, pclk_dbg, atb, corem) \ 75762306a36Sopenharmony_ci (((apll) << 24) | ((pclk_dbg) << 20) | ((atb) << 16) | \ 75862306a36Sopenharmony_ci ((corem) << 4)) 75962306a36Sopenharmony_ci#define E3250_CPU_DIV1(hpm, copy) \ 76062306a36Sopenharmony_ci (((hpm) << 4) | ((copy) << 0)) 76162306a36Sopenharmony_ci 76262306a36Sopenharmony_cistatic const struct exynos_cpuclk_cfg_data e3250_armclk_d[] __initconst = { 76362306a36Sopenharmony_ci { 1000000, E3250_CPU_DIV0(1, 7, 4, 1), E3250_CPU_DIV1(7, 7), }, 76462306a36Sopenharmony_ci { 900000, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), }, 76562306a36Sopenharmony_ci { 800000, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), }, 76662306a36Sopenharmony_ci { 700000, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), }, 76762306a36Sopenharmony_ci { 600000, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), }, 76862306a36Sopenharmony_ci { 500000, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), }, 76962306a36Sopenharmony_ci { 400000, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), }, 77062306a36Sopenharmony_ci { 300000, E3250_CPU_DIV0(1, 5, 3, 1), E3250_CPU_DIV1(7, 7), }, 77162306a36Sopenharmony_ci { 200000, E3250_CPU_DIV0(1, 3, 3, 1), E3250_CPU_DIV1(7, 7), }, 77262306a36Sopenharmony_ci { 100000, E3250_CPU_DIV0(1, 1, 1, 1), E3250_CPU_DIV1(7, 7), }, 77362306a36Sopenharmony_ci { 0 }, 77462306a36Sopenharmony_ci}; 77562306a36Sopenharmony_ci 77662306a36Sopenharmony_cistatic const struct samsung_cpu_clock exynos3250_cpu_clks[] __initconst = { 77762306a36Sopenharmony_ci CPU_CLK(CLK_ARM_CLK, "armclk", CLK_MOUT_APLL, CLK_MOUT_MPLL_USER_C, 77862306a36Sopenharmony_ci CLK_CPU_HAS_DIV1, 0x14200, e3250_armclk_d), 77962306a36Sopenharmony_ci}; 78062306a36Sopenharmony_ci 78162306a36Sopenharmony_cistatic void __init exynos3_core_down_clock(void __iomem *reg_base) 78262306a36Sopenharmony_ci{ 78362306a36Sopenharmony_ci unsigned int tmp; 78462306a36Sopenharmony_ci 78562306a36Sopenharmony_ci /* 78662306a36Sopenharmony_ci * Enable arm clock down (in idle) and set arm divider 78762306a36Sopenharmony_ci * ratios in WFI/WFE state. 78862306a36Sopenharmony_ci */ 78962306a36Sopenharmony_ci tmp = (PWR_CTRL1_CORE2_DOWN_RATIO(7) | PWR_CTRL1_CORE1_DOWN_RATIO(7) | 79062306a36Sopenharmony_ci PWR_CTRL1_DIV2_DOWN_EN | PWR_CTRL1_DIV1_DOWN_EN | 79162306a36Sopenharmony_ci PWR_CTRL1_USE_CORE1_WFE | PWR_CTRL1_USE_CORE0_WFE | 79262306a36Sopenharmony_ci PWR_CTRL1_USE_CORE1_WFI | PWR_CTRL1_USE_CORE0_WFI); 79362306a36Sopenharmony_ci __raw_writel(tmp, reg_base + PWR_CTRL1); 79462306a36Sopenharmony_ci 79562306a36Sopenharmony_ci /* 79662306a36Sopenharmony_ci * Disable the clock up feature on Exynos4x12, in case it was 79762306a36Sopenharmony_ci * enabled by bootloader. 79862306a36Sopenharmony_ci */ 79962306a36Sopenharmony_ci __raw_writel(0x0, reg_base + PWR_CTRL2); 80062306a36Sopenharmony_ci} 80162306a36Sopenharmony_ci 80262306a36Sopenharmony_cistatic const struct samsung_cmu_info cmu_info __initconst = { 80362306a36Sopenharmony_ci .pll_clks = exynos3250_plls, 80462306a36Sopenharmony_ci .nr_pll_clks = ARRAY_SIZE(exynos3250_plls), 80562306a36Sopenharmony_ci .mux_clks = mux_clks, 80662306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(mux_clks), 80762306a36Sopenharmony_ci .div_clks = div_clks, 80862306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(div_clks), 80962306a36Sopenharmony_ci .gate_clks = gate_clks, 81062306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(gate_clks), 81162306a36Sopenharmony_ci .fixed_factor_clks = fixed_factor_clks, 81262306a36Sopenharmony_ci .nr_fixed_factor_clks = ARRAY_SIZE(fixed_factor_clks), 81362306a36Sopenharmony_ci .cpu_clks = exynos3250_cpu_clks, 81462306a36Sopenharmony_ci .nr_cpu_clks = ARRAY_SIZE(exynos3250_cpu_clks), 81562306a36Sopenharmony_ci .nr_clk_ids = CLKS_NR_MAIN, 81662306a36Sopenharmony_ci .clk_regs = exynos3250_cmu_clk_regs, 81762306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(exynos3250_cmu_clk_regs), 81862306a36Sopenharmony_ci}; 81962306a36Sopenharmony_ci 82062306a36Sopenharmony_cistatic void __init exynos3250_cmu_init(struct device_node *np) 82162306a36Sopenharmony_ci{ 82262306a36Sopenharmony_ci struct samsung_clk_provider *ctx; 82362306a36Sopenharmony_ci 82462306a36Sopenharmony_ci ctx = samsung_cmu_register_one(np, &cmu_info); 82562306a36Sopenharmony_ci if (!ctx) 82662306a36Sopenharmony_ci return; 82762306a36Sopenharmony_ci 82862306a36Sopenharmony_ci exynos3_core_down_clock(ctx->reg_base); 82962306a36Sopenharmony_ci} 83062306a36Sopenharmony_ciCLK_OF_DECLARE(exynos3250_cmu, "samsung,exynos3250-cmu", exynos3250_cmu_init); 83162306a36Sopenharmony_ci 83262306a36Sopenharmony_ci/* 83362306a36Sopenharmony_ci * CMU DMC 83462306a36Sopenharmony_ci */ 83562306a36Sopenharmony_ci 83662306a36Sopenharmony_ci#define BPLL_LOCK 0x0118 83762306a36Sopenharmony_ci#define BPLL_CON0 0x0218 83862306a36Sopenharmony_ci#define BPLL_CON1 0x021c 83962306a36Sopenharmony_ci#define BPLL_CON2 0x0220 84062306a36Sopenharmony_ci#define SRC_DMC 0x0300 84162306a36Sopenharmony_ci#define DIV_DMC1 0x0504 84262306a36Sopenharmony_ci#define GATE_BUS_DMC0 0x0700 84362306a36Sopenharmony_ci#define GATE_BUS_DMC1 0x0704 84462306a36Sopenharmony_ci#define GATE_BUS_DMC2 0x0708 84562306a36Sopenharmony_ci#define GATE_BUS_DMC3 0x070c 84662306a36Sopenharmony_ci#define GATE_SCLK_DMC 0x0800 84762306a36Sopenharmony_ci#define GATE_IP_DMC0 0x0900 84862306a36Sopenharmony_ci#define GATE_IP_DMC1 0x0904 84962306a36Sopenharmony_ci#define EPLL_LOCK 0x1110 85062306a36Sopenharmony_ci#define EPLL_CON0 0x1114 85162306a36Sopenharmony_ci#define EPLL_CON1 0x1118 85262306a36Sopenharmony_ci#define EPLL_CON2 0x111c 85362306a36Sopenharmony_ci#define SRC_EPLL 0x1120 85462306a36Sopenharmony_ci 85562306a36Sopenharmony_cistatic const unsigned long exynos3250_cmu_dmc_clk_regs[] __initconst = { 85662306a36Sopenharmony_ci BPLL_LOCK, 85762306a36Sopenharmony_ci BPLL_CON0, 85862306a36Sopenharmony_ci BPLL_CON1, 85962306a36Sopenharmony_ci BPLL_CON2, 86062306a36Sopenharmony_ci SRC_DMC, 86162306a36Sopenharmony_ci DIV_DMC1, 86262306a36Sopenharmony_ci GATE_BUS_DMC0, 86362306a36Sopenharmony_ci GATE_BUS_DMC1, 86462306a36Sopenharmony_ci GATE_BUS_DMC2, 86562306a36Sopenharmony_ci GATE_BUS_DMC3, 86662306a36Sopenharmony_ci GATE_SCLK_DMC, 86762306a36Sopenharmony_ci GATE_IP_DMC0, 86862306a36Sopenharmony_ci GATE_IP_DMC1, 86962306a36Sopenharmony_ci EPLL_LOCK, 87062306a36Sopenharmony_ci EPLL_CON0, 87162306a36Sopenharmony_ci EPLL_CON1, 87262306a36Sopenharmony_ci EPLL_CON2, 87362306a36Sopenharmony_ci SRC_EPLL, 87462306a36Sopenharmony_ci}; 87562306a36Sopenharmony_ci 87662306a36Sopenharmony_ciPNAME(mout_epll_p) = { "fin_pll", "fout_epll", }; 87762306a36Sopenharmony_ciPNAME(mout_bpll_p) = { "fin_pll", "fout_bpll", }; 87862306a36Sopenharmony_ciPNAME(mout_mpll_mif_p) = { "fin_pll", "sclk_mpll_mif", }; 87962306a36Sopenharmony_ciPNAME(mout_dphy_p) = { "mout_mpll_mif", "mout_bpll", }; 88062306a36Sopenharmony_ci 88162306a36Sopenharmony_cistatic const struct samsung_mux_clock dmc_mux_clks[] __initconst = { 88262306a36Sopenharmony_ci /* 88362306a36Sopenharmony_ci * NOTE: Following table is sorted by register address in ascending 88462306a36Sopenharmony_ci * order and then bitfield shift in descending order, as it is done 88562306a36Sopenharmony_ci * in the User's Manual. When adding new entries, please make sure 88662306a36Sopenharmony_ci * that the order is preserved, to avoid merge conflicts and make 88762306a36Sopenharmony_ci * further work with defined data easier. 88862306a36Sopenharmony_ci */ 88962306a36Sopenharmony_ci 89062306a36Sopenharmony_ci /* SRC_DMC */ 89162306a36Sopenharmony_ci MUX(CLK_MOUT_MPLL_MIF, "mout_mpll_mif", mout_mpll_mif_p, SRC_DMC, 12, 1), 89262306a36Sopenharmony_ci MUX(CLK_MOUT_BPLL, "mout_bpll", mout_bpll_p, SRC_DMC, 10, 1), 89362306a36Sopenharmony_ci MUX(CLK_MOUT_DPHY, "mout_dphy", mout_dphy_p, SRC_DMC, 8, 1), 89462306a36Sopenharmony_ci MUX(CLK_MOUT_DMC_BUS, "mout_dmc_bus", mout_dphy_p, SRC_DMC, 4, 1), 89562306a36Sopenharmony_ci 89662306a36Sopenharmony_ci /* SRC_EPLL */ 89762306a36Sopenharmony_ci MUX(CLK_MOUT_EPLL, "mout_epll", mout_epll_p, SRC_EPLL, 4, 1), 89862306a36Sopenharmony_ci}; 89962306a36Sopenharmony_ci 90062306a36Sopenharmony_cistatic const struct samsung_div_clock dmc_div_clks[] __initconst = { 90162306a36Sopenharmony_ci /* 90262306a36Sopenharmony_ci * NOTE: Following table is sorted by register address in ascending 90362306a36Sopenharmony_ci * order and then bitfield shift in descending order, as it is done 90462306a36Sopenharmony_ci * in the User's Manual. When adding new entries, please make sure 90562306a36Sopenharmony_ci * that the order is preserved, to avoid merge conflicts and make 90662306a36Sopenharmony_ci * further work with defined data easier. 90762306a36Sopenharmony_ci */ 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_ci /* DIV_DMC1 */ 91062306a36Sopenharmony_ci DIV(CLK_DIV_DMC, "div_dmc", "div_dmc_pre", DIV_DMC1, 27, 3), 91162306a36Sopenharmony_ci DIV(CLK_DIV_DPHY, "div_dphy", "mout_dphy", DIV_DMC1, 23, 3), 91262306a36Sopenharmony_ci DIV(CLK_DIV_DMC_PRE, "div_dmc_pre", "mout_dmc_bus", DIV_DMC1, 19, 2), 91362306a36Sopenharmony_ci DIV(CLK_DIV_DMCP, "div_dmcp", "div_dmcd", DIV_DMC1, 15, 3), 91462306a36Sopenharmony_ci DIV(CLK_DIV_DMCD, "div_dmcd", "div_dmc", DIV_DMC1, 11, 3), 91562306a36Sopenharmony_ci}; 91662306a36Sopenharmony_ci 91762306a36Sopenharmony_cistatic const struct samsung_pll_clock exynos3250_dmc_plls[] __initconst = { 91862306a36Sopenharmony_ci PLL(pll_35xx, CLK_FOUT_BPLL, "fout_bpll", "fin_pll", 91962306a36Sopenharmony_ci BPLL_LOCK, BPLL_CON0, exynos3250_pll_rates), 92062306a36Sopenharmony_ci PLL(pll_36xx, CLK_FOUT_EPLL, "fout_epll", "fin_pll", 92162306a36Sopenharmony_ci EPLL_LOCK, EPLL_CON0, exynos3250_epll_rates), 92262306a36Sopenharmony_ci}; 92362306a36Sopenharmony_ci 92462306a36Sopenharmony_cistatic const struct samsung_cmu_info dmc_cmu_info __initconst = { 92562306a36Sopenharmony_ci .pll_clks = exynos3250_dmc_plls, 92662306a36Sopenharmony_ci .nr_pll_clks = ARRAY_SIZE(exynos3250_dmc_plls), 92762306a36Sopenharmony_ci .mux_clks = dmc_mux_clks, 92862306a36Sopenharmony_ci .nr_mux_clks = ARRAY_SIZE(dmc_mux_clks), 92962306a36Sopenharmony_ci .div_clks = dmc_div_clks, 93062306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(dmc_div_clks), 93162306a36Sopenharmony_ci .nr_clk_ids = CLKS_NR_DMC, 93262306a36Sopenharmony_ci .clk_regs = exynos3250_cmu_dmc_clk_regs, 93362306a36Sopenharmony_ci .nr_clk_regs = ARRAY_SIZE(exynos3250_cmu_dmc_clk_regs), 93462306a36Sopenharmony_ci}; 93562306a36Sopenharmony_ci 93662306a36Sopenharmony_cistatic void __init exynos3250_cmu_dmc_init(struct device_node *np) 93762306a36Sopenharmony_ci{ 93862306a36Sopenharmony_ci samsung_cmu_register_one(np, &dmc_cmu_info); 93962306a36Sopenharmony_ci} 94062306a36Sopenharmony_ciCLK_OF_DECLARE(exynos3250_cmu_dmc, "samsung,exynos3250-cmu-dmc", 94162306a36Sopenharmony_ci exynos3250_cmu_dmc_init); 94262306a36Sopenharmony_ci 94362306a36Sopenharmony_ci 94462306a36Sopenharmony_ci/* 94562306a36Sopenharmony_ci * CMU ISP 94662306a36Sopenharmony_ci */ 94762306a36Sopenharmony_ci 94862306a36Sopenharmony_ci#define DIV_ISP0 0x300 94962306a36Sopenharmony_ci#define DIV_ISP1 0x304 95062306a36Sopenharmony_ci#define GATE_IP_ISP0 0x800 95162306a36Sopenharmony_ci#define GATE_IP_ISP1 0x804 95262306a36Sopenharmony_ci#define GATE_SCLK_ISP 0x900 95362306a36Sopenharmony_ci 95462306a36Sopenharmony_cistatic const struct samsung_div_clock isp_div_clks[] __initconst = { 95562306a36Sopenharmony_ci /* 95662306a36Sopenharmony_ci * NOTE: Following table is sorted by register address in ascending 95762306a36Sopenharmony_ci * order and then bitfield shift in descending order, as it is done 95862306a36Sopenharmony_ci * in the User's Manual. When adding new entries, please make sure 95962306a36Sopenharmony_ci * that the order is preserved, to avoid merge conflicts and make 96062306a36Sopenharmony_ci * further work with defined data easier. 96162306a36Sopenharmony_ci */ 96262306a36Sopenharmony_ci /* DIV_ISP0 */ 96362306a36Sopenharmony_ci DIV(CLK_DIV_ISP1, "div_isp1", "mout_aclk_266_sub", DIV_ISP0, 4, 3), 96462306a36Sopenharmony_ci DIV(CLK_DIV_ISP0, "div_isp0", "mout_aclk_266_sub", DIV_ISP0, 0, 3), 96562306a36Sopenharmony_ci 96662306a36Sopenharmony_ci /* DIV_ISP1 */ 96762306a36Sopenharmony_ci DIV(CLK_DIV_MCUISP1, "div_mcuisp1", "mout_aclk_400_mcuisp_sub", 96862306a36Sopenharmony_ci DIV_ISP1, 8, 3), 96962306a36Sopenharmony_ci DIV(CLK_DIV_MCUISP0, "div_mcuisp0", "mout_aclk_400_mcuisp_sub", 97062306a36Sopenharmony_ci DIV_ISP1, 4, 3), 97162306a36Sopenharmony_ci DIV(CLK_DIV_MPWM, "div_mpwm", "div_isp1", DIV_ISP1, 0, 3), 97262306a36Sopenharmony_ci}; 97362306a36Sopenharmony_ci 97462306a36Sopenharmony_cistatic const struct samsung_gate_clock isp_gate_clks[] __initconst = { 97562306a36Sopenharmony_ci /* 97662306a36Sopenharmony_ci * NOTE: Following table is sorted by register address in ascending 97762306a36Sopenharmony_ci * order and then bitfield shift in descending order, as it is done 97862306a36Sopenharmony_ci * in the User's Manual. When adding new entries, please make sure 97962306a36Sopenharmony_ci * that the order is preserved, to avoid merge conflicts and make 98062306a36Sopenharmony_ci * further work with defined data easier. 98162306a36Sopenharmony_ci */ 98262306a36Sopenharmony_ci 98362306a36Sopenharmony_ci /* GATE_IP_ISP0 */ 98462306a36Sopenharmony_ci GATE(CLK_UART_ISP, "uart_isp", "uart_isp_top", 98562306a36Sopenharmony_ci GATE_IP_ISP0, 31, CLK_IGNORE_UNUSED, 0), 98662306a36Sopenharmony_ci GATE(CLK_WDT_ISP, "wdt_isp", "mout_aclk_266_sub", 98762306a36Sopenharmony_ci GATE_IP_ISP0, 30, CLK_IGNORE_UNUSED, 0), 98862306a36Sopenharmony_ci GATE(CLK_PWM_ISP, "pwm_isp", "mout_aclk_266_sub", 98962306a36Sopenharmony_ci GATE_IP_ISP0, 28, CLK_IGNORE_UNUSED, 0), 99062306a36Sopenharmony_ci GATE(CLK_I2C1_ISP, "i2c1_isp", "mout_aclk_266_sub", 99162306a36Sopenharmony_ci GATE_IP_ISP0, 26, CLK_IGNORE_UNUSED, 0), 99262306a36Sopenharmony_ci GATE(CLK_I2C0_ISP, "i2c0_isp", "mout_aclk_266_sub", 99362306a36Sopenharmony_ci GATE_IP_ISP0, 25, CLK_IGNORE_UNUSED, 0), 99462306a36Sopenharmony_ci GATE(CLK_MPWM_ISP, "mpwm_isp", "mout_aclk_266_sub", 99562306a36Sopenharmony_ci GATE_IP_ISP0, 24, CLK_IGNORE_UNUSED, 0), 99662306a36Sopenharmony_ci GATE(CLK_MCUCTL_ISP, "mcuctl_isp", "mout_aclk_266_sub", 99762306a36Sopenharmony_ci GATE_IP_ISP0, 23, CLK_IGNORE_UNUSED, 0), 99862306a36Sopenharmony_ci GATE(CLK_PPMUISPX, "ppmuispx", "mout_aclk_266_sub", 99962306a36Sopenharmony_ci GATE_IP_ISP0, 21, CLK_IGNORE_UNUSED, 0), 100062306a36Sopenharmony_ci GATE(CLK_PPMUISPMX, "ppmuispmx", "mout_aclk_266_sub", 100162306a36Sopenharmony_ci GATE_IP_ISP0, 20, CLK_IGNORE_UNUSED, 0), 100262306a36Sopenharmony_ci GATE(CLK_QE_LITE1, "qe_lite1", "mout_aclk_266_sub", 100362306a36Sopenharmony_ci GATE_IP_ISP0, 18, CLK_IGNORE_UNUSED, 0), 100462306a36Sopenharmony_ci GATE(CLK_QE_LITE0, "qe_lite0", "mout_aclk_266_sub", 100562306a36Sopenharmony_ci GATE_IP_ISP0, 17, CLK_IGNORE_UNUSED, 0), 100662306a36Sopenharmony_ci GATE(CLK_QE_FD, "qe_fd", "mout_aclk_266_sub", 100762306a36Sopenharmony_ci GATE_IP_ISP0, 16, CLK_IGNORE_UNUSED, 0), 100862306a36Sopenharmony_ci GATE(CLK_QE_DRC, "qe_drc", "mout_aclk_266_sub", 100962306a36Sopenharmony_ci GATE_IP_ISP0, 15, CLK_IGNORE_UNUSED, 0), 101062306a36Sopenharmony_ci GATE(CLK_QE_ISP, "qe_isp", "mout_aclk_266_sub", 101162306a36Sopenharmony_ci GATE_IP_ISP0, 14, CLK_IGNORE_UNUSED, 0), 101262306a36Sopenharmony_ci GATE(CLK_CSIS1, "csis1", "mout_aclk_266_sub", 101362306a36Sopenharmony_ci GATE_IP_ISP0, 13, CLK_IGNORE_UNUSED, 0), 101462306a36Sopenharmony_ci GATE(CLK_SMMU_LITE1, "smmu_lite1", "mout_aclk_266_sub", 101562306a36Sopenharmony_ci GATE_IP_ISP0, 12, CLK_IGNORE_UNUSED, 0), 101662306a36Sopenharmony_ci GATE(CLK_SMMU_LITE0, "smmu_lite0", "mout_aclk_266_sub", 101762306a36Sopenharmony_ci GATE_IP_ISP0, 11, CLK_IGNORE_UNUSED, 0), 101862306a36Sopenharmony_ci GATE(CLK_SMMU_FD, "smmu_fd", "mout_aclk_266_sub", 101962306a36Sopenharmony_ci GATE_IP_ISP0, 10, CLK_IGNORE_UNUSED, 0), 102062306a36Sopenharmony_ci GATE(CLK_SMMU_DRC, "smmu_drc", "mout_aclk_266_sub", 102162306a36Sopenharmony_ci GATE_IP_ISP0, 9, CLK_IGNORE_UNUSED, 0), 102262306a36Sopenharmony_ci GATE(CLK_SMMU_ISP, "smmu_isp", "mout_aclk_266_sub", 102362306a36Sopenharmony_ci GATE_IP_ISP0, 8, CLK_IGNORE_UNUSED, 0), 102462306a36Sopenharmony_ci GATE(CLK_GICISP, "gicisp", "mout_aclk_266_sub", 102562306a36Sopenharmony_ci GATE_IP_ISP0, 7, CLK_IGNORE_UNUSED, 0), 102662306a36Sopenharmony_ci GATE(CLK_CSIS0, "csis0", "mout_aclk_266_sub", 102762306a36Sopenharmony_ci GATE_IP_ISP0, 6, CLK_IGNORE_UNUSED, 0), 102862306a36Sopenharmony_ci GATE(CLK_MCUISP, "mcuisp", "mout_aclk_266_sub", 102962306a36Sopenharmony_ci GATE_IP_ISP0, 5, CLK_IGNORE_UNUSED, 0), 103062306a36Sopenharmony_ci GATE(CLK_LITE1, "lite1", "mout_aclk_266_sub", 103162306a36Sopenharmony_ci GATE_IP_ISP0, 4, CLK_IGNORE_UNUSED, 0), 103262306a36Sopenharmony_ci GATE(CLK_LITE0, "lite0", "mout_aclk_266_sub", 103362306a36Sopenharmony_ci GATE_IP_ISP0, 3, CLK_IGNORE_UNUSED, 0), 103462306a36Sopenharmony_ci GATE(CLK_FD, "fd", "mout_aclk_266_sub", 103562306a36Sopenharmony_ci GATE_IP_ISP0, 2, CLK_IGNORE_UNUSED, 0), 103662306a36Sopenharmony_ci GATE(CLK_DRC, "drc", "mout_aclk_266_sub", 103762306a36Sopenharmony_ci GATE_IP_ISP0, 1, CLK_IGNORE_UNUSED, 0), 103862306a36Sopenharmony_ci GATE(CLK_ISP, "isp", "mout_aclk_266_sub", 103962306a36Sopenharmony_ci GATE_IP_ISP0, 0, CLK_IGNORE_UNUSED, 0), 104062306a36Sopenharmony_ci 104162306a36Sopenharmony_ci /* GATE_IP_ISP1 */ 104262306a36Sopenharmony_ci GATE(CLK_QE_ISPCX, "qe_ispcx", "uart_isp_top", 104362306a36Sopenharmony_ci GATE_IP_ISP0, 21, CLK_IGNORE_UNUSED, 0), 104462306a36Sopenharmony_ci GATE(CLK_QE_SCALERP, "qe_scalerp", "uart_isp_top", 104562306a36Sopenharmony_ci GATE_IP_ISP0, 20, CLK_IGNORE_UNUSED, 0), 104662306a36Sopenharmony_ci GATE(CLK_QE_SCALERC, "qe_scalerc", "uart_isp_top", 104762306a36Sopenharmony_ci GATE_IP_ISP0, 19, CLK_IGNORE_UNUSED, 0), 104862306a36Sopenharmony_ci GATE(CLK_SMMU_SCALERP, "smmu_scalerp", "uart_isp_top", 104962306a36Sopenharmony_ci GATE_IP_ISP0, 18, CLK_IGNORE_UNUSED, 0), 105062306a36Sopenharmony_ci GATE(CLK_SMMU_SCALERC, "smmu_scalerc", "uart_isp_top", 105162306a36Sopenharmony_ci GATE_IP_ISP0, 17, CLK_IGNORE_UNUSED, 0), 105262306a36Sopenharmony_ci GATE(CLK_SCALERP, "scalerp", "uart_isp_top", 105362306a36Sopenharmony_ci GATE_IP_ISP0, 16, CLK_IGNORE_UNUSED, 0), 105462306a36Sopenharmony_ci GATE(CLK_SCALERC, "scalerc", "uart_isp_top", 105562306a36Sopenharmony_ci GATE_IP_ISP0, 15, CLK_IGNORE_UNUSED, 0), 105662306a36Sopenharmony_ci GATE(CLK_SPI1_ISP, "spi1_isp", "uart_isp_top", 105762306a36Sopenharmony_ci GATE_IP_ISP0, 13, CLK_IGNORE_UNUSED, 0), 105862306a36Sopenharmony_ci GATE(CLK_SPI0_ISP, "spi0_isp", "uart_isp_top", 105962306a36Sopenharmony_ci GATE_IP_ISP0, 12, CLK_IGNORE_UNUSED, 0), 106062306a36Sopenharmony_ci GATE(CLK_SMMU_ISPCX, "smmu_ispcx", "uart_isp_top", 106162306a36Sopenharmony_ci GATE_IP_ISP0, 4, CLK_IGNORE_UNUSED, 0), 106262306a36Sopenharmony_ci GATE(CLK_ASYNCAXIM, "asyncaxim", "uart_isp_top", 106362306a36Sopenharmony_ci GATE_IP_ISP0, 0, CLK_IGNORE_UNUSED, 0), 106462306a36Sopenharmony_ci 106562306a36Sopenharmony_ci /* GATE_SCLK_ISP */ 106662306a36Sopenharmony_ci GATE(CLK_SCLK_MPWM_ISP, "sclk_mpwm_isp", "div_mpwm", 106762306a36Sopenharmony_ci GATE_SCLK_ISP, 0, CLK_IGNORE_UNUSED, 0), 106862306a36Sopenharmony_ci}; 106962306a36Sopenharmony_ci 107062306a36Sopenharmony_cistatic const struct samsung_cmu_info isp_cmu_info __initconst = { 107162306a36Sopenharmony_ci .div_clks = isp_div_clks, 107262306a36Sopenharmony_ci .nr_div_clks = ARRAY_SIZE(isp_div_clks), 107362306a36Sopenharmony_ci .gate_clks = isp_gate_clks, 107462306a36Sopenharmony_ci .nr_gate_clks = ARRAY_SIZE(isp_gate_clks), 107562306a36Sopenharmony_ci .nr_clk_ids = CLKS_NR_ISP, 107662306a36Sopenharmony_ci}; 107762306a36Sopenharmony_ci 107862306a36Sopenharmony_cistatic int __init exynos3250_cmu_isp_probe(struct platform_device *pdev) 107962306a36Sopenharmony_ci{ 108062306a36Sopenharmony_ci struct device_node *np = pdev->dev.of_node; 108162306a36Sopenharmony_ci 108262306a36Sopenharmony_ci samsung_cmu_register_one(np, &isp_cmu_info); 108362306a36Sopenharmony_ci return 0; 108462306a36Sopenharmony_ci} 108562306a36Sopenharmony_ci 108662306a36Sopenharmony_cistatic const struct of_device_id exynos3250_cmu_isp_of_match[] __initconst = { 108762306a36Sopenharmony_ci { .compatible = "samsung,exynos3250-cmu-isp", }, 108862306a36Sopenharmony_ci { /* sentinel */ } 108962306a36Sopenharmony_ci}; 109062306a36Sopenharmony_ci 109162306a36Sopenharmony_cistatic struct platform_driver exynos3250_cmu_isp_driver __initdata = { 109262306a36Sopenharmony_ci .driver = { 109362306a36Sopenharmony_ci .name = "exynos3250-cmu-isp", 109462306a36Sopenharmony_ci .suppress_bind_attrs = true, 109562306a36Sopenharmony_ci .of_match_table = exynos3250_cmu_isp_of_match, 109662306a36Sopenharmony_ci }, 109762306a36Sopenharmony_ci}; 109862306a36Sopenharmony_ci 109962306a36Sopenharmony_cistatic int __init exynos3250_cmu_platform_init(void) 110062306a36Sopenharmony_ci{ 110162306a36Sopenharmony_ci return platform_driver_probe(&exynos3250_cmu_isp_driver, 110262306a36Sopenharmony_ci exynos3250_cmu_isp_probe); 110362306a36Sopenharmony_ci} 110462306a36Sopenharmony_cisubsys_initcall(exynos3250_cmu_platform_init); 110562306a36Sopenharmony_ci 1106