| /* |
| * Copyright (c) 2017 Samsung Electronics Co., Ltd. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| * |
| * Common Clock Framework support for Exynos9610 SoC. |
| */ |
| |
| #include <linux/clk.h> |
| #include <linux/clkdev.h> |
| #include <linux/clk-provider.h> |
| #include <linux/of.h> |
| #include <linux/of_address.h> |
| #include <soc/samsung/cal-if.h> |
| #include <dt-bindings/clock/exynos9610.h> |
| |
| #include "../../soc/samsung/cal-if/exynos9610/cmucal-vclk.h" |
| #include "../../soc/samsung/cal-if/exynos9610/cmucal-node.h" |
| #include "../../soc/samsung/cal-if/exynos9610/cmucal-qch.h" |
| #include "../../soc/samsung/cal-if/exynos9610/clkout_exynos9610.h" |
| #include "composite.h" |
| |
| static struct samsung_clk_provider *exynos9610_clk_provider; |
| /* |
| * list of controller registers to be saved and restored during a |
| * suspend/resume cycle. |
| */ |
| /* fixed rate clocks generated outside the soc */ |
| struct samsung_fixed_rate exynos9610_fixed_rate_ext_clks[] __initdata = { |
| FRATE(OSCCLK, "fin_pll", NULL, 0, 26000000), |
| }; |
| |
| /* HWACG VCLK */ |
| struct init_vclk exynos9610_apm_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_APM_BUS, MUX_CLKCMU_APM_BUS_USER, "UMUX_CLKCMU_APM_BUS", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_GREBEINTEGRATION_QCH_GREBE, GREBEINTEGRATION_QCH_GREBE, "GATE_GREBEINTEGRATION_QCH_GREBE", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_GREBEINTEGRATION_QCH_DBG, GREBEINTEGRATION_QCH_DBG, "GATE_GREBEINTEGRATION_QCH_DBG", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_INTMEM_QCH, INTMEM_QCH, "GATE_INTMEM_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_AP2CP_QCH, MAILBOX_AP2CP_QCH, "GATE_MAILBOX_AP2CP_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_AP2CP_S_QCH, MAILBOX_AP2CP_S_QCH, "GATE_MAILBOX_AP2CP_S_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_AP2GNSS_QCH, MAILBOX_AP2GNSS_QCH, "GATE_MAILBOX_AP2GNSS_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_AP2SHUB_QCH, MAILBOX_AP2SHUB_QCH, "GATE_MAILBOX_AP2SHUB_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_AP2WLBT_QCH, MAILBOX_AP2WLBT_QCH, "GATE_MAILBOX_AP2WLBT_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_APM2AP_QCH, MAILBOX_APM2AP_QCH, "GATE_MAILBOX_APM2AP_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_APM2CP_QCH, MAILBOX_APM2CP_QCH, "GATE_MAILBOX_APM2CP_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_APM2GNSS_QCH, MAILBOX_APM2GNSS_QCH, "GATE_MAILBOX_APM2GNSS_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_APM2SHUB_QCH, MAILBOX_APM2SHUB_QCH, "GATE_MAILBOX_APM2SHUB_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_APM2WLBT_QCH, MAILBOX_APM2WLBT_QCH, "GATE_MAILBOX_APM2WLBT_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_CP2GNSS_QCH, MAILBOX_CP2GNSS_QCH, "GATE_MAILBOX_CP2GNSS_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_CP2SHUB_QCH, MAILBOX_CP2SHUB_QCH, "GATE_MAILBOX_CP2SHUB_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_CP2WLBT_QCH, MAILBOX_CP2WLBT_QCH, "GATE_MAILBOX_CP2WLBT_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_SHUB2GNSS_QCH, MAILBOX_SHUB2GNSS_QCH, "GATE_MAILBOX_SHUB2GNSS_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_SHUB2WLBT_QCH, MAILBOX_SHUB2WLBT_QCH, "GATE_MAILBOX_SHUB2WLBT_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_WLBT2ABOX_QCH, MAILBOX_WLBT2ABOX_QCH, "GATE_MAILBOX_WLBT2ABOX_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MAILBOX_WLBT2GNSS_QCH, MAILBOX_WLBT2GNSS_QCH, "GATE_MAILBOX_WLBT2GNSS_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PEM_QCH, PEM_QCH, "GATE_PEM_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SPEEDY_APM_QCH, SPEEDY_APM_QCH, "GATE_SPEEDY_APM_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SYSREG_APM_QCH, SYSREG_APM_QCH, "GATE_SYSREG_APM_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_WDT_APM_QCH, WDT_APM_QCH, "GATE_WDT_APM_QCH", "UMUX_CLKCMU_APM_BUS", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_cam_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_CAM_BUS, MUX_CLKCMU_CAM_BUS_USER, "UMUX_CLKCMU_CAM_BUS", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS0, IS6P10P0_CAM_QCH_S_CAM_CSIS0, "GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS0", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS1, IS6P10P0_CAM_QCH_S_CAM_CSIS1, "GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS1", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS2, IS6P10P0_CAM_QCH_S_CAM_CSIS2, "GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS2", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS3, IS6P10P0_CAM_QCH_S_CAM_CSIS3, "GATE_IS6P10P0_CAM_QCH_S_CAM_CSIS3", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_3AA, IS6P10P0_CAM_QCH_S_CAM_3AA, "GATE_IS6P10P0_CAM_QCH_S_CAM_3AA", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_SMMU, IS6P10P0_CAM_QCH_S_CAM_SMMU, "GATE_IS6P10P0_CAM_QCH_S_CAM_SMMU", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_PDP_CORE, IS6P10P0_CAM_QCH_S_CAM_PDP_CORE, "GATE_IS6P10P0_CAM_QCH_S_CAM_PDP_CORE", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_PDP_DMA, IS6P10P0_CAM_QCH_S_CAM_PDP_DMA, "GATE_IS6P10P0_CAM_QCH_S_CAM_PDP_DMA", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_CAM_QCH_S_CAM_RDMA, IS6P10P0_CAM_QCH_S_CAM_RDMA, "GATE_IS6P10P0_CAM_QCH_S_CAM_RDMA", "UMUX_CLKCMU_CAM_BUS", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_cmgp_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(MUX_CMGP_ADC, MUX_CLK_CMGP_ADC, "MUX_CMGP_ADC", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(MUX_CMGP_I2C, MUX_CLK_CMGP_I2C, "MUX_CMGP_I2C", NULL, 0, 0, NULL), |
| HWACG_VCLK(MUX_CMGP_USI00, MUX_CLK_CMGP_USI00, "MUX_CMGP_USI00", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(MUX_CMGP_USI01, MUX_CLK_CMGP_USI01, "MUX_CMGP_USI01", NULL, 0, 0, NULL), |
| HWACG_VCLK(MUX_CMGP_USI02, MUX_CLK_CMGP_USI02, "MUX_CMGP_USI02", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(MUX_CMGP_USI03, MUX_CLK_CMGP_USI03, "MUX_CMGP_USI03", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(MUX_CMGP_USI04, MUX_CLK_CMGP_USI04, "MUX_CMGP_USI04", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ADC_CMGP_QCH_S0, ADC_CMGP_QCH_S0, "GATE_ADC_CMGP_QCH_S0", "MUX_CMGP_ADC", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ADC_CMGP_QCH_S1, ADC_CMGP_QCH_S1, "GATE_ADC_CMGP_QCH_S1", "MUX_CMGP_ADC", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ADC_CMGP_QCH_ADC, ADC_CMGP_QCH_ADC, "GATE_ADC_CMGP_QCH_ADC", "MUX_CMGP_ADC", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_CMGP00_QCH, I2C_CMGP00_QCH, "GATE_I2C_CMGP00_QCH", "MUX_CMGP_I2C", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_CMGP01_QCH, I2C_CMGP01_QCH, "GATE_I2C_CMGP01_QCH", "MUX_CMGP_I2C", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_CMGP02_QCH, I2C_CMGP02_QCH, "GATE_I2C_CMGP02_QCH", "MUX_CMGP_I2C", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_CMGP03_QCH, I2C_CMGP03_QCH, "GATE_I2C_CMGP03_QCH", "MUX_CMGP_I2C", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_CMGP04_QCH, I2C_CMGP04_QCH, "GATE_I2C_CMGP04_QCH", "MUX_CMGP_I2C", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USI_CMGP00_QCH, USI_CMGP00_QCH, "GATE_USI_CMGP00_QCH", "MUX_CMGP_USI00", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USI_CMGP01_QCH, USI_CMGP01_QCH, "GATE_USI_CMGP01_QCH", "MUX_CMGP_USI01", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USI_CMGP02_QCH, USI_CMGP02_QCH, "GATE_USI_CMGP02_QCH", "MUX_CMGP_USI02", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USI_CMGP03_QCH, USI_CMGP03_QCH, "GATE_USI_CMGP03_QCH", "MUX_CMGP_USI03", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USI_CMGP04_QCH, USI_CMGP04_QCH, "GATE_USI_CMGP04_QCH", "MUX_CMGP_USI04", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_top_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(GATE_DFTMUX_TOP_QCH_CLK_CSIS0, DFTMUX_TOP_QCH_CLK_CSIS0, "GATE_DFTMUX_TOP_QCH_CLK_CSIS0", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_DFTMUX_TOP_QCH_CLK_CSIS1, DFTMUX_TOP_QCH_CLK_CSIS1, "GATE_DFTMUX_TOP_QCH_CLK_CSIS1", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_DFTMUX_TOP_QCH_CLK_CSIS2, DFTMUX_TOP_QCH_CLK_CSIS2, "GATE_DFTMUX_TOP_QCH_CLK_CSIS2", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_DFTMUX_TOP_QCH_CLK_CSIS3, DFTMUX_TOP_QCH_CLK_CSIS3, "GATE_DFTMUX_TOP_QCH_CLK_CSIS3", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_OTP_QCH, OTP_QCH, "GATE_OTP_QCH", NULL, 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_core_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(MUX_CORE_GIC, MUX_CLK_CORE_GIC, "MUX_CORE_GIC", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_GIC400_AIHWACG_QCH, GIC400_AIHWACG_QCH, "GATE_GIC400_AIHWACG_QCH", "MUX_CORE_GIC", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PDMA_CORE_QCH, PDMA_CORE_QCH, "GATE_PDMA_CORE_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PPFW_CORE_MEM0_QCH, PPFW_CORE_MEM0_QCH, "GATE_PPFW_CORE_MEM0_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PPFW_CORE_MEM1_QCH, PPFW_CORE_MEM1_QCH, "GATE_PPFW_CORE_MEM1_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PPFW_CORE_PERI_QCH, PPFW_CORE_PERI_QCH, "GATE_PPFW_CORE_PERI_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SIREX_QCH, SIREX_QCH, "GATE_SIREX_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SPDMA_CORE_QCH, SPDMA_CORE_QCH, "GATE_SPDMA_CORE_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_TREX_D_CORE_QCH, TREX_D_CORE_QCH, "GATE_TREX_D_CORE_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_TREX_D_NRT_QCH, TREX_D_NRT_QCH, "GATE_TREX_D_NRT_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_TREX_P_CORE_QCH, TREX_P_CORE_QCH, "GATE_TREX_P_CORE_QCH", NULL, 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_dispaud_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(MUX_AUD_FM, MUX_CLK_AUD_FM, "MUX_AUD_FM", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_DISPAUD_BUS, MUX_CLKCMU_DISPAUD_DISP_USER, "MUX_CLKCMU_DISPAUD_DISP_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_ABOX_QCH_CPU, ABOX_QCH_CPU, "GATE_ABOX_QCH_CPU", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ABOX_QCH_S_ACLK, ABOX_QCH_S_ACLK, "GATE_ABOX_QCH_S_ACLK", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ABOX_QCH_S_BCLK0, ABOX_QCH_S_BCLK0, "GATE_ABOX_QCH_S_BCLK0", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ABOX_QCH_S_BCLK2, ABOX_QCH_S_BCLK2, "GATE_ABOX_QCH_S_BCLK2", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ABOX_QCH_S_BCLK1, ABOX_QCH_S_BCLK1, "GATE_ABOX_QCH_S_BCLK1", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ABOX_QCH_FM, ABOX_QCH_FM, "GATE_ABOX_QCH_FM", "MUX_AUD_FM", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_ABOX_QCH_S_BCLK_DSIF, ABOX_QCH_S_BCLK_DSIF, "GATE_ABOX_QCH_S_BCLK_DSIF", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_DPU_QCH_S_DPP, DPU_QCH_S_DPP, "GATE_DPU_QCH_S_DPP", "MUX_CLKCMU_DISPAUD_DISP", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_DPU_QCH_S_DMA, DPU_QCH_S_DMA, "GATE_DPU_QCH_S_DMA", "MUX_CLKCMU_DISPAUD_DISP", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_DPU_QCH_S_DECON, DPU_QCH_S_DECON, "GATE_DPU_QCH_S_DECON", "MUX_CLKCMU_DISPAUD_DISP", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SMMU_ABOX_QCH, SMMU_ABOX_QCH, "GATE_SMMU_ABOX_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SMMU_DPU_QCH, SMMU_DPU_QCH, "GATE_SMMU_DPU_QCH", "MUX_CLKCMU_DISPAUD_DISP", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_WDT_AUD_QCH, WDT_AUD_QCH, "GATE_WDT_AUD_QCH", NULL, 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_fsys_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_FSYS_BUS, MUX_CLKCMU_FSYS_BUS_USER, "MUX_CLKCMU_FSYS_BUS_USER", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_FSYS_MMC_EMBD, MUX_CLKCMU_FSYS_MMC_EMBD_USER, "MUX_CLKCMU_FSYS_MMC_EMBD_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_FSYS_MMC_CARD, MUX_CLKCMU_FSYS_MMC_CARD_USER, "MUX_CLKCMU_FSYS_MMC_CARD_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_FSYS_UFS_EMBD, MUX_CLKCMU_FSYS_UFS_EMBD_USER, "MUX_CLKCMU_FSYS_UFS_EMBD_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_MMC_CARD_QCH, MMC_CARD_QCH, "GATE_MMC_CARD_QCH", "MUX_CLKCMU_FSYS_MMC_CARD_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MMC_EMBD_QCH, MMC_EMBD_QCH, "GATE_MMC_EMBD_QCH", "MUX_CLKCMU_FSYS_MMC_EMBD_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_RTIC_QCH, RTIC_QCH, "GATE_RTIC_QCH", "MUX_CLKCMU_FSYS_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SSS_QCH, SSS_QCH, "GATE_SSS_QCH", "MUX_CLKCMU_FSYS_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_UFS_EMBD_QCH_UFS, UFS_EMBD_QCH_UFS, "GATE_UFS_EMBD_QCH_UFS", "MUX_CLKCMU_FSYS_UFS_EMBD_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_UFS_EMBD_QCH_FMP, UFS_EMBD_QCH_FMP, "GATE_UFS_EMBD_QCH_FMP", "MUX_CLKCMU_FSYS_UFS_EMBD_USER", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_g2d_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_G2D_G2D, MUX_CLKCMU_G2D_G2D_USER, "MUX_CLKCMU_G2D_G2D_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_G2D_MSCL, MUX_CLKCMU_G2D_MSCL_USER, "MUX_CLKCMU_G2D_MSCL_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_G2D_QCH, G2D_QCH, "GATE_G2D_QCH", "MUX_CLKCMU_G2D_G2D_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_JPEG_QCH, JPEG_QCH, "GATE_JPEG_QCH", "MUX_CLKCMU_G2D_MSCL_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MSCL_QCH, MSCL_QCH, "GATE_MSCL_QCH", "MUX_CLKCMU_G2D_MSCL_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SYSMMU_G2D_QCH, SYSMMU_G2D_QCH, "GATE_SYSMMU_G2D_QCH", "MUX_CLKCMU_G2D_G2D_USER", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_g3d_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(GATE_G3D_QCH, G3D_QCH, "GATE_G3D_QCH", NULL, 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_isp_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_ISP_BUS, MUX_CLKCMU_ISP_BUS_USER, "MUX_CLKCMU_ISP_BUS_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_ISP_GDC, MUX_CLKCMU_ISP_GDC_USER, "MUX_CLKCMU_ISP_GDC_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_ISP_VRA, MUX_CLKCMU_ISP_VRA_USER, "MUX_CLKCMU_ISP_VRA_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_ISP_QCH_S_ISP_ISP, IS6P10P0_ISP_QCH_S_ISP_ISP, "GATE_IS6P10P0_ISP_QCH_S_ISP_ISP", "MUX_CLKCMU_ISP_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_ISP_QCH_S_ISP_MCSC, IS6P10P0_ISP_QCH_S_ISP_MCSC, "GATE_IS6P10P0_ISP_QCH_S_ISP_MCSC", "MUX_CLKCMU_ISP_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_ISP_QCH_S_ISP_VRA, IS6P10P0_ISP_QCH_S_ISP_VRA, "GATE_IS6P10P0_ISP_QCH_S_ISP_VRA", "MUX_CLKCMU_ISP_VRA_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_ISP_QCH_S_ISP_GDC, IS6P10P0_ISP_QCH_S_ISP_GDC, "GATE_IS6P10P0_ISP_QCH_S_ISP_GDC", "MUX_CLKCMU_ISP_GDC_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_ISP_QCH_S_ISP_SMMU_ISP0, IS6P10P0_ISP_QCH_S_ISP_SMMU_ISP0, "GATE_IS6P10P0_ISP_QCH_S_ISP_SMMU_ISP0", "MUX_CLKCMU_ISP_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_IS6P10P0_ISP_QCH_S_ISP_SMMU_ISP1, IS6P10P0_ISP_QCH_S_ISP_SMMU_ISP1, "GATE_IS6P10P0_ISP_QCH_S_ISP_SMMU_ISP1", "MUX_CLKCMU_ISP_BUS_USER", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_mfc_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_MFC_MFC, MUX_CLKCMU_MFC_MFC_USER, "MUX_CLKCMU_MFC_MFC_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_MFC_WFD, MUX_CLKCMU_MFC_WFD_USER, "MUX_CLKCMU_MFC_WFD_USER", "MUX_CLKCMU_MFC_MFC_USER", 0, 0, NULL), |
| HWACG_VCLK(GATE_MFC_QCH, MFC_QCH, "GATE_MFC_QCH", "MUX_CLKCMU_MFC_MFC_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SYSMMU_MFCD0_QCH, SYSMMU_MFCD0_QCH, "GATE_SYSMMU_MFCD0_QCH", "MUX_CLKCMU_MFC_MFC_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SYSMMU_MFCD1_QCH, SYSMMU_MFCD1_QCH, "GATE_SYSMMU_MFCD1_QCH", "MUX_CLKCMU_MFC_MFC_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_WFD_QCH, WFD_QCH, "GATE_WFD_QCH", "MUX_CLKCMU_MFC_WFD_USER", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_peri_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_PERI_UART, MUX_CLKCMU_PERI_UART_USER, "UMUX_CLKCMU_PERI_UART", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_PERI_BUS, MUX_CLKCMU_PERI_BUS_USER, "UMUX_CLKCMU_PERI_BUS", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_CAMI2C_0_QCH, CAMI2C_0_QCH, "GATE_CAMI2C_0_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_CAMI2C_1_QCH, CAMI2C_1_QCH, "GATE_CAMI2C_1_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_CAMI2C_2_QCH, CAMI2C_2_QCH, "GATE_CAMI2C_2_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_CAMI2C_3_QCH, CAMI2C_3_QCH, "GATE_CAMI2C_3_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_0_QCH, I2C_0_QCH, "GATE_I2C_0_QCH", "UMUX_CLKCMU_PERI_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_1_QCH, I2C_1_QCH, "GATE_I2C_1_QCH", "UMUX_CLKCMU_PERI_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_2_QCH, I2C_2_QCH, "GATE_I2C_2_QCH", "UMUX_CLKCMU_PERI_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_3_QCH, I2C_3_QCH, "GATE_I2C_3_QCH", "UMUX_CLKCMU_PERI_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_4_QCH, I2C_4_QCH, "GATE_I2C_4_QCH", "UMUX_CLKCMU_PERI_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_5_QCH, I2C_5_QCH, "GATE_I2C_5_QCH", "UMUX_CLKCMU_PERI_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_6_QCH, I2C_6_QCH, "GATE_I2C_6_QCH", "UMUX_CLKCMU_PERI_BUS", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_MCT_QCH, MCT_QCH, "GATE_MCT_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_OTP_CON_TOP_QCH, OTP_CON_TOP_QCH, "GATE_OTP_CON_TOP_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PWM_MOTOR_QCH, PWM_MOTOR_QCH, "GATE_PWM_MOTOR_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_SPI_0_QCH, SPI_0_QCH, "GATE_SPI_0_QCH", NULL, 0, VCLK_GATE, NULL), |
| #ifdef CONFIG_SENSORS_FINGERPRINT |
| HWACG_VCLK(GATE_SPI_1_QCH, SPI_1_QCH, "GATE_SPI_1_QCH", NULL, 0, VCLK_GATE, "fp-spi-pclk"), |
| #else |
| HWACG_VCLK(GATE_SPI_1_QCH, SPI_1_QCH, "GATE_SPI_1_QCH", NULL, 0, VCLK_GATE, NULL), |
| #endif |
| HWACG_VCLK(GATE_SPI_2_QCH, SPI_2_QCH, "GATE_SPI_2_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_UART_QCH, UART_QCH, "GATE_UART_QCH", "UMUX_CLKCMU_PERI_UART", 0, 0, "console-pclk0"), |
| HWACG_VCLK(GATE_USI00_I2C_QCH, USI00_I2C_QCH, "GATE_USI00_I2C_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USI00_USI_QCH, USI00_USI_QCH, "GATE_USI00_USI_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_WDT_CLUSTER0_QCH, WDT_CLUSTER0_QCH, "GATE_WDT_CLUSTER0_QCH", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_WDT_CLUSTER1_QCH, WDT_CLUSTER1_QCH, "GATE_WDT_CLUSTER1_QCH", NULL, 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_shub_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_SHUB_BUS, MUX_CLKCMU_SHUB_BUS_USER, "MUX_CLKCMU_SHUB_BUS_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(MUX_SHUB_I2C, MUX_CLK_SHUB_I2C, "MUX_SHUB_I2C", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(MUX_SHUB_USI00, MUX_CLK_SHUB_USI00, "MUX_SHUB_USI00", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(MUX_SHUB_USI01, MUX_CLK_SHUB_USI01, "MUX_SHUB_USI01", NULL, 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_CM4_SHUB_QCH, CM4_SHUB_QCH, "GATE_CM4_SHUB_QCH", "MUX_CLKCMU_SHUB_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_I2C_SHUB00_QCH, I2C_SHUB00_QCH, "GATE_I2C_SHUB00_QCH", "MUX_SHUB_I2C", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PDMA_SHUB_QCH, PDMA_SHUB_QCH, "GATE_PDMA_SHUB_QCH", "MUX_CLKCMU_SHUB_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_PWM_SHUB_QCH, PWM_SHUB_QCH, "GATE_PWM_SHUB_QCH", "MUX_CLKCMU_SHUB_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_TIMER_SHUB_QCH, TIMER_SHUB_QCH, "GATE_TIMER_SHUB_QCH", "MUX_CLKCMU_SHUB_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USI_SHUB00_QCH, USI_SHUB00_QCH, "GATE_USI_SHUB00_QCH", "MUX_SHUB_USI00", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_WDT_SHUB_QCH, WDT_SHUB_QCH, "GATE_WDT_SHUB_QCH", "MUX_CLKCMU_SHUB_BUS_USER", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_usb_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_USB_USBDRD30, MUX_CLKCMU_USB_USB30DRD, "MUX_CLKCMU_USB_USB30DRD", NULL, 0, 0, NULL), |
| HWACG_VCLK(UMUX_CLKCMU_USB_DPGTC, MUX_CLKCMU_USB_DPGTC, "MUX_CLKCMU_USB_DPGTC", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_DP_LINK_QCH_DP, DP_LINK_QCH_DP, "GATE_DP_LINK_QCH_DP", "MUX_CLKCMU_USB_DPGTC", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_DP_LINK_QCH_GTC, DP_LINK_QCH_GTC, "GATE_DP_LINK_QCH_GTC", "MUX_CLKCMU_USB_DPGTC", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USB30DRD_QCH_USB30, USB30DRD_QCH_USB30, "GATE_USB30DRD_QCH_USB30", "MUX_CLKCMU_USB_USB30DRD", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USB30DRD_QCH_USBPHY_30CTRL_0, USB30DRD_QCH_USBPHY_30CTRL_0, "GATE_USB30DRD_QCH_USBPHY_30CTRL_0", "MUX_CLKCMU_USB_USB30DRD", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USB30DRD_QCH_USBPHY_30CTRL_1, USB30DRD_QCH_USBPHY_30CTRL_1, "GATE_USB30DRD_QCH_USBPHY_30CTRL_1", "MUX_CLKCMU_USB_USB30DRD", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_USB30DRD_QCH_USBPHY_20CTRL, USB30DRD_QCH_USBPHY_20CTRL, "GATE_USB30DRD_QCH_USBPHY_20CTRL", "MUX_CLKCMU_USB_USB30DRD", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_vipx1_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_VIPX1_BUS, MUX_CLKCMU_VIPX1_BUS_USER, "MUX_CLKCMU_VIPX1_BUS_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_SMMU_D_VIPX1_QCH, SMMU_D_VIPX1_QCH, "GATE_SMMU_D_VIPX1_QCH", "MUX_CLKCMU_VIPX1_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_VIPX1_QCH, VIPX1_QCH, "GATE_VIPX1_QCH", "MUX_CLKCMU_VIPX1_BUS_USER", 0, VCLK_GATE, NULL), |
| }; |
| |
| struct init_vclk exynos9610_vipx2_hwacg_vclks[] __initdata = { |
| HWACG_VCLK(UMUX_CLKCMU_VIPX2_BUS, MUX_CLKCMU_VIPX2_BUS_USER, "MUX_CLKCMU_VIPX2_BUS_USER", NULL, 0, 0, NULL), |
| HWACG_VCLK(GATE_SMMU_D_VIPX2_QCH, SMMU_D_VIPX2_QCH, "GATE_SMMU_D_VIPX2_QCH", "MUX_CLKCMU_VIPX2_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_VIPX2_QCH, VIPX2_QCH, "GATE_VIPX2_QCH", "MUX_CLKCMU_VIPX2_BUS_USER", 0, VCLK_GATE, NULL), |
| HWACG_VCLK(GATE_VIPX2_QCH_LOCAL, VIPX2_QCH_LOCAL, "GATE_VIPX2_QCH_LOCAL", "MUX_CLKCMU_VIPX2_BUS_USER", 0, VCLK_GATE, NULL), |
| }; |
| |
| /* Special VCLK */ |
| struct init_vclk exynos9610_dispaud_vclks[] __initdata = { |
| VCLK(DOUT_CLK_AUD_ACLK, DIV_CLK_AUD_BUS, "DOUT_CLK_AUD_ACLK", 0, 0, NULL), |
| VCLK(DOUT_CLK_AUD_AUDIF, DIV_CLK_AUD_AUDIF, "DOUT_CLK_AUD_AUDIF", 0, 0, NULL), |
| VCLK(DOUT_CLK_AUD_DSIF, DIV_CLK_AUD_DSIF, "DOUT_CLK_AUD_DSIF", 0, 0, NULL), |
| VCLK(DOUT_CLK_AUD_UAIF0, DIV_CLK_AUD_UAIF0, "DOUT_CLK_AUD_UAIF0", 0, 0, NULL), |
| VCLK(DOUT_CLK_AUD_UAIF1, DIV_CLK_AUD_UAIF1, "DOUT_CLK_AUD_UAIF1", 0, 0, NULL), |
| VCLK(DOUT_CLK_AUD_UAIF2, DIV_CLK_AUD_UAIF2, "DOUT_CLK_AUD_UAIF2", 0, 0, NULL), |
| VCLK(PLL_OUT_AUD, PLL_AUD, "PLL_OUT_AUD", 0, 0, NULL), |
| VCLK(DOUT_CLK_AUD_FM, DIV_CLK_AUD_FM, "DOUT_CLK_AUD_FM", 0, 0, NULL), |
| }; |
| |
| struct init_vclk exynos9610_cmgp_vclks[] __initdata = { |
| VCLK(CMGP00_USI, DIV_CLK_CMGP_USI00, "CMGP00_USI", 0, 0, NULL), |
| VCLK(CMGP01_USI, DIV_CLK_CMGP_USI01, "CMGP01_USI", 0, 0, NULL), |
| VCLK(CMGP02_USI, DIV_CLK_CMGP_USI02, "CMGP02_USI", 0, 0, NULL), |
| VCLK(CMGP03_USI, DIV_CLK_CMGP_USI03, "CMGP03_USI", 0, 0, NULL), |
| VCLK(CMGP04_USI, DIV_CLK_CMGP_USI04, "CMGP04_USI", 0, 0, NULL), |
| VCLK(CMGP_I2C, DIV_CLK_CMGP_I2C, "CMGP_I2C", 0, 0, NULL), |
| VCLK(CMGP_ADC, DIV_CLK_CMGP_ADC, "CMGP_ADC", 0, 0, NULL), |
| }; |
| |
| struct init_vclk exynos9610_fsys_vclks[] __initdata = { |
| VCLK(MMC_EMBD, CLKCMU_FSYS_MMC_EMBD, "MMC_EMBD", 0, 0, NULL), |
| VCLK(MMC_CARD, CLKCMU_FSYS_MMC_CARD, "MMC_CARD", 0, 0, NULL), |
| VCLK(UFS_EMBD, CLKCMU_FSYS_UFS_EMBD, "UFS_EMBD", 0, 0, NULL), |
| }; |
| |
| struct init_vclk exynos9610_usb_vclks[] __initdata = { |
| VCLK(USB30DRD, VCLK_CLKCMU_USB_USB30DRD, "USB30DRD", 0, 0, NULL), |
| VCLK(DP_LINK, VCLK_CLKCMU_USB_DPGTC, "DP_LINK", 0, 0, NULL), |
| }; |
| |
| struct init_vclk exynos9610_peri_vclks[] __initdata = { |
| VCLK(UART, CLKCMU_PERI_UART, "UART", 0, 0, "console-sclk0"), |
| VCLK(I2C, DIV_CLK_PERI_I2C, "I2C", 0, 0, NULL), |
| VCLK(SPI0, DIV_CLK_PERI_SPI0, "SPI0", 0, 0, NULL), |
| #ifdef CONFIG_SENSORS_FINGERPRINT |
| VCLK(SPI1, DIV_CLK_PERI_SPI1, "SPI1", 0, 0, "fp-spi-sclk"), |
| #else |
| VCLK(SPI1, DIV_CLK_PERI_SPI1, "SPI1", 0, 0, NULL), |
| #endif |
| VCLK(SPI2, DIV_CLK_PERI_SPI2, "SPI2", 0, 0, NULL), |
| VCLK(USI_I2C, DIV_CLK_PERI_USI_I2C, "USI_I2C", 0, 0, NULL), |
| VCLK(USI_USI, DIV_CLK_PERI_USI_USI, "USI_USI", 0, 0, NULL), |
| }; |
| |
| struct init_vclk exynos9610_top_vclks[] __initdata = { |
| VCLK(CIS_CLK0, CLKCMU_CIS_CLK0, "CIS_CLK0", 0, 0, NULL), |
| VCLK(CIS_CLK1, CLKCMU_CIS_CLK1, "CIS_CLK1", 0, 0, NULL), |
| VCLK(CIS_CLK2, CLKCMU_CIS_CLK2, "CIS_CLK2", 0, 0, NULL), |
| VCLK(CIS_CLK3, CLKCMU_CIS_CLK3, "CIS_CLK3", 0, 0, NULL), |
| }; |
| |
| static struct init_vclk exynos9610_clkout_vclks[] __initdata = { |
| VCLK(OSC_NFC, VCLK_CLKOUT1, "OSC_NFC", 0, 0, NULL), |
| VCLK(OSC_AUD, VCLK_CLKOUT0, "OSC_AUD", 0, 0, NULL), |
| }; |
| |
| static __initdata struct of_device_id ext_clk_match[] = { |
| {.compatible = "samsung,exynos9610-oscclk", .data = (void *)0}, |
| {}, |
| }; |
| |
| void exynos9610_vclk_init(void) |
| { |
| cal_clk_setrate(DIV_CLK_AUD_FM, 40000); |
| cal_clk_setrate(MUX_CLK_CMGP_I2C, 24576000); |
| cal_clk_setrate(MUX_CLK_CMGP_USI01, 24576000); |
| } |
| |
| /* register exynos9610 clocks */ |
| void __init exynos9610_clk_init(struct device_node *np) |
| { |
| void __iomem *reg_base; |
| int ret; |
| |
| if (np) { |
| reg_base = of_iomap(np, 0); |
| if (!reg_base) |
| panic("%s: failed to map registers\n", __func__); |
| } else { |
| panic("%s: unable to determine soc\n", __func__); |
| } |
| |
| ret = cal_if_init(np); |
| if (ret) |
| panic("%s: unable to initialize cal-if\n", __func__); |
| |
| exynos9610_clk_provider = samsung_clk_init(np, reg_base, CLK_NR_CLKS); |
| if (!exynos9610_clk_provider) |
| panic("%s: unable to allocate context.\n", __func__); |
| |
| samsung_register_of_fixed_ext(exynos9610_clk_provider, exynos9610_fixed_rate_ext_clks, |
| ARRAY_SIZE(exynos9610_fixed_rate_ext_clks), |
| ext_clk_match); |
| /* register HWACG vclk */ |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_apm_hwacg_vclks, ARRAY_SIZE(exynos9610_apm_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_cam_hwacg_vclks, ARRAY_SIZE(exynos9610_cam_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_cmgp_hwacg_vclks, ARRAY_SIZE(exynos9610_cmgp_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_top_hwacg_vclks, ARRAY_SIZE(exynos9610_top_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_core_hwacg_vclks, ARRAY_SIZE(exynos9610_core_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_dispaud_hwacg_vclks, ARRAY_SIZE(exynos9610_dispaud_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_fsys_hwacg_vclks, ARRAY_SIZE(exynos9610_fsys_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_g2d_hwacg_vclks, ARRAY_SIZE(exynos9610_g2d_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_g3d_hwacg_vclks, ARRAY_SIZE(exynos9610_g3d_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_isp_hwacg_vclks, ARRAY_SIZE(exynos9610_isp_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_mfc_hwacg_vclks, ARRAY_SIZE(exynos9610_mfc_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_peri_hwacg_vclks, ARRAY_SIZE(exynos9610_peri_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_shub_hwacg_vclks, ARRAY_SIZE(exynos9610_shub_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_usb_hwacg_vclks, ARRAY_SIZE(exynos9610_usb_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_vipx1_hwacg_vclks, ARRAY_SIZE(exynos9610_vipx1_hwacg_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_vipx2_hwacg_vclks, ARRAY_SIZE(exynos9610_vipx2_hwacg_vclks)); |
| |
| /* register special vclk */ |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_dispaud_vclks, ARRAY_SIZE(exynos9610_dispaud_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_cmgp_vclks, ARRAY_SIZE(exynos9610_cmgp_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_fsys_vclks, ARRAY_SIZE(exynos9610_fsys_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_usb_vclks, ARRAY_SIZE(exynos9610_usb_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_peri_vclks, ARRAY_SIZE(exynos9610_peri_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_top_vclks, ARRAY_SIZE(exynos9610_top_vclks)); |
| samsung_register_vclk(exynos9610_clk_provider, exynos9610_clkout_vclks, ARRAY_SIZE(exynos9610_clkout_vclks)); |
| |
| clk_register_fixed_factor(NULL, "pwm-clock", "fin_pll", CLK_SET_RATE_PARENT, 1, 1); |
| |
| samsung_clk_of_add_provider(np, exynos9610_clk_provider); |
| |
| late_time_init = exynos9610_vclk_init; |
| |
| pr_info("EXYNOS9610: Clock setup completed\n"); |
| } |
| |
| CLK_OF_DECLARE(exynos9610_clk, "samsung,exynos9610-clock", exynos9610_clk_init); |