linux/drivers/clk/qcom/gcc-msm8976.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Qualcomm Global Clock Controller driver for MSM8956/76
 *
 * Copyright (c) 2016-2021, AngeloGioacchino Del Regno
 *                     <[email protected]>
 *
 * Driver cleanup and modernization
 * Copyright (c) 2021, Konrad Dybcio <[email protected]>
 *                     Marijn Suijten <[email protected]>
 *
 */

#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#include <dt-bindings/clock/qcom,gcc-msm8976.h>

#include "clk-pll.h"
#include "clk-branch.h"
#include "clk-rcg.h"
#include "common.h"
#include "gdsc.h"
#include "reset.h"

enum {};

static struct clk_pll gpll0 =;

static struct clk_regmap gpll0_vote =;

static struct clk_pll gpll2 =;

static struct clk_regmap gpll2_vote =;

static const struct pll_freq_tbl gpll3_freq_tbl[] =;

static struct clk_pll gpll3 =;

static struct clk_regmap gpll3_vote =;

/* GPLL3 at 1100MHz, main output enabled. */
static const struct pll_config gpll3_config =;

static struct clk_pll gpll4 =;

static struct clk_regmap gpll4_vote =;

static struct clk_pll gpll6 =;

static struct clk_regmap gpll6_vote =;

static const struct parent_map gcc_parent_map_1[] =;

static const struct clk_parent_data gcc_parent_data_1[] =;

static const struct parent_map gcc_parent_map_v1_1[] =;

static const struct clk_parent_data gcc_parent_data_v1_1[] =;

static const struct parent_map gcc_parent_map_2[] =;

static const struct clk_parent_data gcc_parent_data_2[] =;

static const struct parent_map gcc_parent_map_3[] =;

static const struct clk_parent_data gcc_parent_data_3[] =;

static const struct parent_map gcc_parent_map_4[] =;

static const struct parent_map gcc_parent_map_4_fs[] =;

static const struct parent_map gcc_parent_map_5[] =;

static const struct clk_parent_data gcc_parent_data_5[] =;

static const struct parent_map gcc_parent_map_6[] =;

static const struct clk_parent_data gcc_parent_data_6[] =;

static const struct parent_map gcc_parent_map_7_mdp[] =;

static const struct clk_parent_data gcc_parent_data_7_mdp[] =;

static const struct parent_map gcc_parent_map_7[] =;

static const struct clk_hw * gcc_parent_hws_7[] =;

static const struct parent_map gcc_parent_map_8[] =;

static const struct clk_parent_data gcc_parent_data_4_8[] =;

static const struct parent_map gcc_parent_map_8_a[] =;

static const struct clk_parent_data gcc_parent_data_8_a[] =;

static const struct parent_map gcc_parent_map_8_gp[] =;

static const struct clk_hw *gcc_parent_hws_8_gp[] =;

static const struct parent_map gcc_parent_map_9[] =;

static const struct clk_parent_data gcc_parent_data_9[] =;

static const struct parent_map gcc_parent_map_10[] =;

static const struct clk_parent_data gcc_parent_data_10[] =;

static const struct parent_map gcc_parent_map_sdcc_ice[] =;

static const struct parent_map gcc_parent_map_cci[] =;

static const struct parent_map gcc_parent_map_cpp[] =;

static const struct parent_map gcc_parent_map_mdss_pix0[] =;

static const struct clk_parent_data gcc_parent_data_mdss_pix0[] =;

static const struct parent_map gcc_parent_map_mdss_pix1[] =;

static const struct clk_parent_data gcc_parent_data_mdss_pix1[] =;

static const struct parent_map gcc_parent_map_mdss_byte0[] =;

static const struct clk_parent_data gcc_parent_data_mdss_byte0[] =;

static const struct parent_map gcc_parent_map_mdss_byte1[] =;

static const struct clk_parent_data gcc_parent_data_mdss_byte1[] =;

static const struct parent_map gcc_parent_map_gfx3d[] =;

static const struct clk_parent_data gcc_parent_data_gfx3d[] =;

static const struct freq_tbl ftbl_aps_0_clk_src[] =;

static struct clk_rcg2 aps_0_clk_src =;

static const struct freq_tbl ftbl_aps_1_clk_src[] =;

static struct clk_rcg2 aps_1_clk_src =;

static const struct freq_tbl ftbl_apss_ahb_clk_src[] =;

static struct clk_rcg2 apss_ahb_clk_src =;

static const struct freq_tbl ftbl_blsp_i2c_apps_clk_src[] =;

static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src =;

static const struct freq_tbl ftbl_blsp_spi_apps_clk_src[] =;

static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src =;

static const struct freq_tbl ftbl_blsp_uart_apps_clk_src[] =;

static struct clk_rcg2 blsp1_uart1_apps_clk_src =;

static struct clk_rcg2 blsp1_uart2_apps_clk_src =;

static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src =;

static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src =;

static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src =;

static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src =;

static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src =;

static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src =;

static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src =;

static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src =;

static struct clk_rcg2 blsp2_uart1_apps_clk_src =;

static struct clk_rcg2 blsp2_uart2_apps_clk_src =;

static const struct freq_tbl ftbl_cci_clk_src[] =;

static struct clk_rcg2 cci_clk_src =;

static const struct freq_tbl ftbl_cpp_clk_src[] =;

static struct clk_rcg2 cpp_clk_src =;

static const struct freq_tbl ftbl_csi0_clk_src[] =;

static struct clk_rcg2 csi0_clk_src =;

static const struct freq_tbl ftbl_csi1_clk_src[] =;

static struct clk_rcg2 csi1_clk_src =;

static const struct freq_tbl ftbl_csi2_clk_src[] =;

static struct clk_rcg2 csi2_clk_src =;

static const struct freq_tbl ftbl_camss_gp0_clk_src[] =;

static struct clk_rcg2 camss_gp0_clk_src =;

static const struct freq_tbl ftbl_camss_gp1_clk_src[] =;

static struct clk_rcg2 camss_gp1_clk_src =;

static const struct freq_tbl ftbl_jpeg0_clk_src[] =;

static struct clk_rcg2 jpeg0_clk_src =;

static const struct freq_tbl ftbl_mclk_clk_src[] =;

static struct clk_rcg2 mclk0_clk_src =;

static struct clk_rcg2 mclk1_clk_src =;

static struct clk_rcg2 mclk2_clk_src =;

static const struct freq_tbl ftbl_csi0phytimer_clk_src[] =;

static struct clk_rcg2 csi0phytimer_clk_src =;

static const struct freq_tbl ftbl_csi1phytimer_clk_src[] =;

static struct clk_rcg2 csi1phytimer_clk_src =;

static const struct freq_tbl ftbl_camss_top_ahb_clk_src[] =;

static struct clk_rcg2 camss_top_ahb_clk_src =;

static const struct freq_tbl ftbl_vfe0_clk_src[] =;

static struct clk_rcg2 vfe0_clk_src =;

static const struct freq_tbl ftbl_vfe1_clk_src[] =;

static struct clk_rcg2 vfe1_clk_src =;

static const struct freq_tbl ftbl_crypto_clk_src[] =;

static struct clk_rcg2 crypto_clk_src =;

static const struct freq_tbl ftbl_gp1_clk_src[] =;

static struct clk_rcg2 gp1_clk_src =;

static const struct freq_tbl ftbl_gp2_clk_src[] =;

static struct clk_rcg2 gp2_clk_src =;

static const struct freq_tbl ftbl_gp3_clk_src[] =;

static struct clk_rcg2 gp3_clk_src =;

static struct clk_rcg2 byte0_clk_src =;

static struct clk_rcg2 byte1_clk_src =;

static const struct freq_tbl ftbl_esc0_1_clk_src[] =;

static struct clk_rcg2 esc0_clk_src =;

static struct clk_rcg2 esc1_clk_src =;

static const struct freq_tbl ftbl_mdp_clk_src[] =;

static struct clk_rcg2 mdp_clk_src =;

static struct clk_rcg2 pclk0_clk_src =;

static struct clk_rcg2 pclk1_clk_src =;

static const struct freq_tbl ftbl_vsync_clk_src[] =;

static struct clk_rcg2 vsync_clk_src =;

static const struct freq_tbl ftbl_gfx3d_clk_src[] =;

static const struct clk_init_data gfx3d_clk_params =;

static struct clk_rcg2 gfx3d_clk_src =;

static const struct freq_tbl ftbl_pdm2_clk_src[] =;

static struct clk_rcg2 pdm2_clk_src =;

static const struct freq_tbl ftbl_rbcpr_gfx_clk_src[] =;

static struct clk_rcg2 rbcpr_gfx_clk_src =;

static const struct freq_tbl ftbl_sdcc1_apps_clk_src[] =;

static const struct freq_tbl ftbl_sdcc1_8976_v1_1_apps_clk_src[] =;

static const struct clk_init_data sdcc1_apps_clk_src_8976v1_1_init =;

static struct clk_rcg2 sdcc1_apps_clk_src =;

static const struct freq_tbl ftbl_sdcc1_ice_core_clk_src[] =;

static struct clk_rcg2 sdcc1_ice_core_clk_src =;

static const struct freq_tbl ftbl_sdcc2_4_apps_clk_src[] =;

static struct clk_rcg2 sdcc2_apps_clk_src =;

static struct clk_rcg2 sdcc3_apps_clk_src =;

static const struct freq_tbl ftbl_usb_fs_ic_clk_src[] =;

static struct clk_rcg2 usb_fs_ic_clk_src =;

static const struct freq_tbl ftbl_usb_fs_system_clk_src[] =;

static struct clk_rcg2 usb_fs_system_clk_src =;

static const struct freq_tbl ftbl_usb_hs_system_clk_src[] =;

static struct clk_rcg2 usb_hs_system_clk_src =;

static const struct freq_tbl ftbl_vcodec0_clk_src[] =;

static struct clk_rcg2 vcodec0_clk_src =;

static struct clk_branch gcc_aps_0_clk =;

static struct clk_branch gcc_aps_1_clk =;

static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup1_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup2_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup3_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup4_spi_apps_clk =;

static struct clk_branch gcc_blsp1_uart1_apps_clk =;

static struct clk_branch gcc_blsp1_uart2_apps_clk =;

static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk =;

static struct clk_branch gcc_blsp2_qup1_spi_apps_clk =;

static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk =;

static struct clk_branch gcc_blsp2_qup2_spi_apps_clk =;

static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk =;

static struct clk_branch gcc_blsp2_qup3_spi_apps_clk =;

static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk =;

static struct clk_branch gcc_blsp2_qup4_spi_apps_clk =;

static struct clk_branch gcc_blsp2_uart1_apps_clk =;

static struct clk_branch gcc_blsp2_uart2_apps_clk =;

static struct clk_branch gcc_camss_cci_ahb_clk =;

static struct clk_branch gcc_camss_cci_clk =;

static struct clk_branch gcc_camss_cpp_ahb_clk =;

static struct clk_branch gcc_camss_cpp_axi_clk =;

static struct clk_branch gcc_camss_cpp_clk =;

static struct clk_branch gcc_camss_csi0_ahb_clk =;

static struct clk_branch gcc_camss_csi0_clk =;

static struct clk_branch gcc_camss_csi0phy_clk =;

static struct clk_branch gcc_camss_csi0pix_clk =;

static struct clk_branch gcc_camss_csi0rdi_clk =;

static struct clk_branch gcc_camss_csi1_ahb_clk =;

static struct clk_branch gcc_camss_csi1_clk =;

static struct clk_branch gcc_camss_csi1phy_clk =;

static struct clk_branch gcc_camss_csi1pix_clk =;

static struct clk_branch gcc_camss_csi1rdi_clk =;

static struct clk_branch gcc_camss_csi2_ahb_clk =;

static struct clk_branch gcc_camss_csi2_clk =;

static struct clk_branch gcc_camss_csi2phy_clk =;

static struct clk_branch gcc_camss_csi2pix_clk =;

static struct clk_branch gcc_camss_csi2rdi_clk =;

static struct clk_branch gcc_camss_csi_vfe0_clk =;

static struct clk_branch gcc_camss_csi_vfe1_clk =;

static struct clk_branch gcc_camss_gp0_clk =;

static struct clk_branch gcc_camss_gp1_clk =;

static struct clk_branch gcc_camss_ispif_ahb_clk =;

static struct clk_branch gcc_camss_jpeg0_clk =;

static struct clk_branch gcc_camss_jpeg_ahb_clk =;

static struct clk_branch gcc_camss_jpeg_axi_clk =;

static struct clk_branch gcc_camss_mclk0_clk =;

static struct clk_branch gcc_camss_mclk1_clk =;

static struct clk_branch gcc_camss_mclk2_clk =;

static struct clk_branch gcc_camss_micro_ahb_clk =;

static struct clk_branch gcc_camss_csi0phytimer_clk =;

static struct clk_branch gcc_camss_csi1phytimer_clk =;

static struct clk_branch gcc_camss_ahb_clk =;

static struct clk_branch gcc_camss_top_ahb_clk =;

static struct clk_branch gcc_camss_vfe0_clk =;

static struct clk_branch gcc_camss_vfe_ahb_clk =;

static struct clk_branch gcc_camss_vfe_axi_clk =;

static struct clk_branch gcc_camss_vfe1_ahb_clk =;

static struct clk_branch gcc_camss_vfe1_axi_clk =;

static struct clk_branch gcc_camss_vfe1_clk =;

static struct clk_branch gcc_dcc_clk =;

static struct clk_branch gcc_oxili_gmem_clk =;

static struct clk_branch gcc_gp1_clk =;

static struct clk_branch gcc_gp2_clk =;

static struct clk_branch gcc_gp3_clk =;

static struct clk_branch gcc_mdss_ahb_clk =;

static struct clk_branch gcc_mdss_axi_clk =;

static struct clk_branch gcc_mdss_byte0_clk =;

static struct clk_branch gcc_mdss_byte1_clk =;

static struct clk_branch gcc_mdss_esc0_clk =;

static struct clk_branch gcc_mdss_esc1_clk =;

static struct clk_branch gcc_mdss_mdp_clk =;

static struct clk_branch gcc_mdss_pclk0_clk =;

static struct clk_branch gcc_mdss_pclk1_clk =;

static struct clk_branch gcc_mdss_vsync_clk =;

static struct clk_branch gcc_mss_cfg_ahb_clk =;

static struct clk_branch gcc_mss_q6_bimc_axi_clk =;

static struct clk_branch gcc_bimc_gfx_clk =;

static struct clk_branch gcc_oxili_ahb_clk =;

static struct clk_branch gcc_oxili_aon_clk =;

static struct clk_branch gcc_oxili_gfx3d_clk =;

static struct clk_branch gcc_oxili_timer_clk =;

static struct clk_branch gcc_pdm2_clk =;

static struct clk_branch gcc_pdm_ahb_clk =;

static struct clk_branch gcc_rbcpr_gfx_ahb_clk =;

static struct clk_branch gcc_rbcpr_gfx_clk =;

static struct clk_branch gcc_sdcc1_ahb_clk =;

static struct clk_branch gcc_sdcc1_apps_clk =;

static struct clk_branch gcc_sdcc1_ice_core_clk =;

static struct clk_branch gcc_sdcc2_ahb_clk =;

static struct clk_branch gcc_sdcc2_apps_clk =;

static struct clk_branch gcc_sdcc3_ahb_clk =;

static struct clk_branch gcc_sdcc3_apps_clk =;

static struct clk_branch gcc_usb2a_phy_sleep_clk =;

static struct clk_branch gcc_usb_hs_phy_cfg_ahb_clk =;

static struct clk_branch gcc_usb_fs_ahb_clk =;

static struct clk_branch gcc_usb_fs_ic_clk =;

static struct clk_branch gcc_usb_fs_system_clk =;

static struct clk_branch gcc_usb_hs_ahb_clk =;

static struct clk_branch gcc_usb_hs_system_clk =;

static struct clk_branch gcc_venus0_ahb_clk =;

static struct clk_branch gcc_venus0_axi_clk =;

static struct clk_branch gcc_venus0_core0_vcodec0_clk =;

static struct clk_branch gcc_venus0_core1_vcodec0_clk =;

static struct clk_branch gcc_venus0_vcodec0_clk =;

/* Vote clocks */
static struct clk_branch gcc_apss_ahb_clk =;

static struct clk_branch gcc_apss_axi_clk =;

static struct clk_branch gcc_blsp1_ahb_clk =;

static struct clk_branch gcc_blsp2_ahb_clk =;

static struct clk_branch gcc_prng_ahb_clk =;

static struct clk_branch gcc_boot_rom_ahb_clk =;

static struct clk_branch gcc_crypto_ahb_clk =;

static struct clk_branch gcc_crypto_axi_clk =;

static struct clk_branch gcc_crypto_clk =;

static struct clk_branch gcc_cpp_tbu_clk =;

static struct clk_branch gcc_gfx_1_tbu_clk =;

static struct clk_branch gcc_gfx_tbu_clk =;

static struct clk_branch gcc_gfx_tcu_clk =;

static struct clk_branch gcc_apss_tcu_clk =;

static struct clk_branch gcc_gtcu_ahb_clk =;

static struct clk_branch gcc_jpeg_tbu_clk =;

static struct clk_branch gcc_mdp_rt_tbu_clk =;

static struct clk_branch gcc_mdp_tbu_clk =;

static struct clk_branch gcc_smmu_cfg_clk =;

static struct clk_branch gcc_venus_1_tbu_clk =;

static struct clk_branch gcc_venus_tbu_clk =;

static struct clk_branch gcc_vfe1_tbu_clk =;

static struct clk_branch gcc_vfe_tbu_clk =;

static struct gdsc venus_gdsc =;

static struct gdsc venus_core0_gdsc =;

static struct gdsc venus_core1_gdsc =;

static struct gdsc mdss_gdsc =;

static struct gdsc jpeg_gdsc =;

static struct gdsc vfe0_gdsc =;

static struct gdsc vfe1_gdsc =;

static struct gdsc cpp_gdsc =;

static struct gdsc oxili_cx_gdsc =;

static struct gdsc oxili_gx_gdsc =;

static struct clk_regmap *gcc_msm8976_clocks[] =;

static const struct qcom_reset_map gcc_msm8976_resets[] =;

static struct gdsc *gcc_msm8976_gdscs[] =;

static const struct regmap_config gcc_msm8976_regmap_config =;

static const struct qcom_cc_desc gcc_msm8976_desc =;

static const struct of_device_id gcc_msm8976_match_table[] =;
MODULE_DEVICE_TABLE(of, gcc_msm8976_match_table);

static int gcc_msm8976_probe(struct platform_device *pdev)
{}

static struct platform_driver gcc_msm8976_driver =;

static int __init gcc_msm8976_init(void)
{}
core_initcall(gcc_msm8976_init);

static void __exit gcc_msm8976_exit(void)
{}
module_exit(gcc_msm8976_exit);

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();