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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2021, Konrad Dybcio <[email protected]>
 */

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

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

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

enum {};

static struct clk_alpha_pll gpll0_out_early =;

static struct clk_fixed_factor gpll0_out_aux2 =;

static struct clk_fixed_factor gpll0_out_main =;

static struct clk_alpha_pll gpll3_out_early =;

static struct clk_alpha_pll gpll4_out_main =;

static struct clk_alpha_pll gpll5_out_main =;

static struct clk_alpha_pll gpll6_out_early =;

static struct clk_fixed_factor gpll6_out_main =;

static struct clk_alpha_pll gpll7_out_early =;

static struct clk_fixed_factor gpll7_out_main =;

static struct clk_alpha_pll gpll8_out_early =;

static struct clk_fixed_factor gpll8_out_main =;

static struct clk_alpha_pll gpll9_out_early =;

static struct clk_fixed_factor gpll9_out_main =;

static const struct parent_map gcc_parent_map_0[] =;

static const struct clk_parent_data gcc_parent_data_0[] =;

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_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 clk_parent_data gcc_parent_data_4[] =;

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[] =;

static const struct clk_parent_data gcc_parent_data_7[] =;

static const struct parent_map gcc_parent_map_8[] =;

static const struct clk_parent_data gcc_parent_data_8[] =;

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_11[] =;

static const struct clk_parent_data gcc_parent_data_11[] =;

static const struct parent_map gcc_parent_map_12[] =;

static const struct clk_parent_data gcc_parent_data_12[] =;

static const struct parent_map gcc_parent_map_13[] =;

static const struct clk_parent_data gcc_parent_data_13[] =;

static const struct parent_map gcc_parent_map_14[] =;

static const struct clk_parent_data gcc_parent_data_14[] =;

static const struct freq_tbl ftbl_gcc_camss_ahb_clk_src[] =;

static struct clk_rcg2 gcc_camss_ahb_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_cci_clk_src[] =;

static struct clk_rcg2 gcc_camss_cci_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_cpp_clk_src[] =;

static struct clk_rcg2 gcc_camss_cpp_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_csi0_clk_src[] =;

static struct clk_rcg2 gcc_camss_csi0_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_csi0phytimer_clk_src[] =;

static struct clk_rcg2 gcc_camss_csi0phytimer_clk_src =;

static struct clk_rcg2 gcc_camss_csi1_clk_src =;

static struct clk_rcg2 gcc_camss_csi1phytimer_clk_src =;

static struct clk_rcg2 gcc_camss_csi2_clk_src =;

static struct clk_rcg2 gcc_camss_csi2phytimer_clk_src =;

static struct clk_rcg2 gcc_camss_csi3_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_csiphy_clk_src[] =;

static struct clk_rcg2 gcc_camss_csiphy_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_gp0_clk_src[] =;

static struct clk_rcg2 gcc_camss_gp0_clk_src =;

static struct clk_rcg2 gcc_camss_gp1_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_jpeg_clk_src[] =;

static struct clk_rcg2 gcc_camss_jpeg_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_mclk0_clk_src[] =;

static struct clk_rcg2 gcc_camss_mclk0_clk_src =;

static struct clk_rcg2 gcc_camss_mclk1_clk_src =;

static struct clk_rcg2 gcc_camss_mclk2_clk_src =;

static struct clk_rcg2 gcc_camss_mclk3_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_vfe0_clk_src[] =;

static struct clk_rcg2 gcc_camss_vfe0_clk_src =;

static struct clk_rcg2 gcc_camss_vfe1_clk_src =;

static const struct freq_tbl ftbl_gcc_gp1_clk_src[] =;

static struct clk_rcg2 gcc_gp1_clk_src =;

static struct clk_rcg2 gcc_gp2_clk_src =;

static struct clk_rcg2 gcc_gp3_clk_src =;

static const struct freq_tbl ftbl_gcc_pdm2_clk_src[] =;

static struct clk_rcg2 gcc_pdm2_clk_src =;

static const struct freq_tbl ftbl_gcc_qupv3_wrap0_s0_clk_src[] =;

static struct clk_init_data gcc_qupv3_wrap0_s0_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src =;

static struct clk_init_data gcc_qupv3_wrap0_s1_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src =;

static struct clk_init_data gcc_qupv3_wrap0_s2_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src =;

static struct clk_init_data gcc_qupv3_wrap0_s3_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src =;

static struct clk_init_data gcc_qupv3_wrap0_s4_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src =;

static struct clk_init_data gcc_qupv3_wrap0_s5_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src =;

static struct clk_init_data gcc_qupv3_wrap1_s0_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src =;

static struct clk_init_data gcc_qupv3_wrap1_s1_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src =;

static struct clk_init_data gcc_qupv3_wrap1_s2_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src =;

static struct clk_init_data gcc_qupv3_wrap1_s3_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src =;

static struct clk_init_data gcc_qupv3_wrap1_s4_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src =;

static struct clk_init_data gcc_qupv3_wrap1_s5_clk_src_init =;

static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src =;

static const struct freq_tbl ftbl_gcc_sdcc1_apps_clk_src[] =;

static struct clk_rcg2 gcc_sdcc1_apps_clk_src =;

static const struct freq_tbl ftbl_gcc_sdcc1_ice_core_clk_src[] =;

static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src =;

static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src[] =;

static struct clk_rcg2 gcc_sdcc2_apps_clk_src =;

static const struct freq_tbl ftbl_gcc_ufs_phy_axi_clk_src[] =;

static struct clk_rcg2 gcc_ufs_phy_axi_clk_src =;

static const struct freq_tbl ftbl_gcc_ufs_phy_ice_core_clk_src[] =;

static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src =;

static const struct freq_tbl ftbl_gcc_ufs_phy_phy_aux_clk_src[] =;

static struct clk_rcg2 gcc_ufs_phy_phy_aux_clk_src =;

static const struct freq_tbl ftbl_gcc_ufs_phy_unipro_core_clk_src[] =;

static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src =;

static const struct freq_tbl ftbl_gcc_usb30_prim_master_clk_src[] =;

static struct clk_rcg2 gcc_usb30_prim_master_clk_src =;

static const struct freq_tbl ftbl_gcc_usb30_prim_mock_utmi_clk_src[] =;

static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src =;

static const struct freq_tbl ftbl_gcc_usb3_prim_phy_aux_clk_src[] =;

static struct clk_rcg2 gcc_usb3_prim_phy_aux_clk_src =;

static struct clk_rcg2 gcc_vs_ctrl_clk_src =;

static const struct freq_tbl ftbl_gcc_vsensor_clk_src[] =;

static struct clk_rcg2 gcc_vsensor_clk_src =;

static struct clk_branch gcc_ahb2phy_csi_clk =;

static struct clk_branch gcc_ahb2phy_usb_clk =;

static struct clk_branch gcc_apc_vs_clk =;

static struct clk_branch gcc_bimc_gpu_axi_clk =;

static struct clk_branch gcc_boot_rom_ahb_clk =;

static struct clk_branch gcc_camera_ahb_clk =;

static struct clk_branch gcc_camera_xo_clk =;

static struct clk_branch gcc_camss_cci_ahb_clk =;

static struct clk_branch gcc_camss_cci_clk =;

static struct clk_branch gcc_camss_cphy_csid0_clk =;

static struct clk_branch gcc_camss_cphy_csid1_clk =;

static struct clk_branch gcc_camss_cphy_csid2_clk =;

static struct clk_branch gcc_camss_cphy_csid3_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_cpp_vbif_ahb_clk =;

static struct clk_branch gcc_camss_csi0_ahb_clk =;

static struct clk_branch gcc_camss_csi0_clk =;

static struct clk_branch gcc_camss_csi0phytimer_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_csi1phytimer_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_csi2phytimer_clk =;

static struct clk_branch gcc_camss_csi2pix_clk =;

static struct clk_branch gcc_camss_csi2rdi_clk =;

static struct clk_branch gcc_camss_csi3_ahb_clk =;

static struct clk_branch gcc_camss_csi3_clk =;

static struct clk_branch gcc_camss_csi3pix_clk =;

static struct clk_branch gcc_camss_csi3rdi_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_csiphy0_clk =;

static struct clk_branch gcc_camss_csiphy1_clk =;

static struct clk_branch gcc_camss_csiphy2_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_jpeg_ahb_clk =;

static struct clk_branch gcc_camss_jpeg_axi_clk =;

static struct clk_branch gcc_camss_jpeg_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_mclk3_clk =;

static struct clk_branch gcc_camss_micro_ahb_clk =;

static struct clk_branch gcc_camss_throttle_nrt_axi_clk =;

static struct clk_branch gcc_camss_throttle_rt_axi_clk =;

static struct clk_branch gcc_camss_top_ahb_clk =;

static struct clk_branch gcc_camss_vfe0_ahb_clk =;

static struct clk_branch gcc_camss_vfe0_clk =;

static struct clk_branch gcc_camss_vfe0_stream_clk =;

static struct clk_branch gcc_camss_vfe1_ahb_clk =;

static struct clk_branch gcc_camss_vfe1_clk =;

static struct clk_branch gcc_camss_vfe1_stream_clk =;

static struct clk_branch gcc_camss_vfe_tsctr_clk =;

static struct clk_branch gcc_camss_vfe_vbif_ahb_clk =;

static struct clk_branch gcc_camss_vfe_vbif_axi_clk =;

static struct clk_branch gcc_ce1_ahb_clk =;

static struct clk_branch gcc_ce1_axi_clk =;

static struct clk_branch gcc_ce1_clk =;

static struct clk_branch gcc_cfg_noc_usb3_prim_axi_clk =;

static struct clk_branch gcc_cpuss_gnoc_clk =;

static struct clk_branch gcc_disp_ahb_clk =;

static struct clk_branch gcc_disp_gpll0_div_clk_src =;

static struct clk_branch gcc_disp_hf_axi_clk =;

static struct clk_branch gcc_disp_throttle_core_clk =;

static struct clk_branch gcc_disp_xo_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_gpu_cfg_ahb_clk =;

static struct clk_branch gcc_gpu_gpll0_clk_src =;

static struct clk_branch gcc_gpu_gpll0_div_clk_src =;

static struct clk_branch gcc_gpu_memnoc_gfx_clk =;

static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk =;

static struct clk_branch gcc_gpu_throttle_core_clk =;

static struct clk_branch gcc_gpu_throttle_xo_clk =;

static struct clk_branch gcc_mss_vs_clk =;

static struct clk_branch gcc_pdm2_clk =;

static struct clk_branch gcc_pdm_ahb_clk =;

static struct clk_branch gcc_pdm_xo4_clk =;

static struct clk_branch gcc_prng_ahb_clk =;

static struct clk_branch gcc_qmip_camera_nrt_ahb_clk =;

static struct clk_branch gcc_qmip_camera_rt_ahb_clk =;

static struct clk_branch gcc_qmip_disp_ahb_clk =;

static struct clk_branch gcc_qmip_gpu_cfg_ahb_clk =;

static struct clk_branch gcc_qmip_video_vcodec_ahb_clk =;

static struct clk_branch gcc_qupv3_wrap0_core_2x_clk =;

static struct clk_branch gcc_qupv3_wrap0_core_clk =;

static struct clk_branch gcc_qupv3_wrap0_s0_clk =;

static struct clk_branch gcc_qupv3_wrap0_s1_clk =;

static struct clk_branch gcc_qupv3_wrap0_s2_clk =;

static struct clk_branch gcc_qupv3_wrap0_s3_clk =;

static struct clk_branch gcc_qupv3_wrap0_s4_clk =;

static struct clk_branch gcc_qupv3_wrap0_s5_clk =;

static struct clk_branch gcc_qupv3_wrap1_core_2x_clk =;

static struct clk_branch gcc_qupv3_wrap1_core_clk =;

static struct clk_branch gcc_qupv3_wrap1_s0_clk =;

static struct clk_branch gcc_qupv3_wrap1_s1_clk =;

static struct clk_branch gcc_qupv3_wrap1_s2_clk =;

static struct clk_branch gcc_qupv3_wrap1_s3_clk =;

static struct clk_branch gcc_qupv3_wrap1_s4_clk =;

static struct clk_branch gcc_qupv3_wrap1_s5_clk =;

static struct clk_branch gcc_qupv3_wrap_0_m_ahb_clk =;

static struct clk_branch gcc_qupv3_wrap_0_s_ahb_clk =;

static struct clk_branch gcc_qupv3_wrap_1_m_ahb_clk =;

static struct clk_branch gcc_qupv3_wrap_1_s_ahb_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_sys_noc_compute_sf_axi_clk =;

static struct clk_branch gcc_sys_noc_cpuss_ahb_clk =;

static struct clk_branch gcc_sys_noc_ufs_phy_axi_clk =;

static struct clk_branch gcc_sys_noc_usb3_prim_axi_clk =;

static struct clk_branch gcc_ufs_mem_clkref_clk =;

static struct clk_branch gcc_ufs_phy_ahb_clk =;

static struct clk_branch gcc_ufs_phy_axi_clk =;

static struct clk_branch gcc_ufs_phy_ice_core_clk =;

static struct clk_branch gcc_ufs_phy_phy_aux_clk =;

static struct clk_branch gcc_ufs_phy_rx_symbol_0_clk =;

static struct clk_branch gcc_ufs_phy_tx_symbol_0_clk =;

static struct clk_branch gcc_ufs_phy_unipro_core_clk =;

static struct clk_branch gcc_usb30_prim_master_clk =;

static struct clk_branch gcc_usb30_prim_mock_utmi_clk =;

static struct clk_branch gcc_usb30_prim_sleep_clk =;

static struct clk_branch gcc_usb3_prim_clkref_clk =;

static struct clk_branch gcc_usb3_prim_phy_com_aux_clk =;

static struct clk_branch gcc_usb3_prim_phy_pipe_clk =;

static struct clk_branch gcc_vdda_vs_clk =;

static struct clk_branch gcc_vddcx_vs_clk =;

static struct clk_branch gcc_vddmx_vs_clk =;

static struct clk_branch gcc_video_ahb_clk =;

static struct clk_branch gcc_video_axi0_clk =;

static struct clk_branch gcc_video_throttle_core_clk =;

static struct clk_branch gcc_video_xo_clk =;

static struct clk_branch gcc_vs_ctrl_ahb_clk =;

static struct clk_branch gcc_vs_ctrl_clk =;

static struct clk_branch gcc_wcss_vs_clk =;

static struct gdsc usb30_prim_gdsc =;

static struct gdsc ufs_phy_gdsc =;

static struct gdsc camss_vfe0_gdsc =;

static struct gdsc camss_vfe1_gdsc =;

static struct gdsc camss_top_gdsc =;

static struct gdsc cam_cpp_gdsc =;

static struct gdsc hlos1_vote_turing_mmu_tbu1_gdsc =;

static struct gdsc hlos1_vote_mm_snoc_mmu_tbu_rt_gdsc =;

static struct gdsc hlos1_vote_mm_snoc_mmu_tbu_nrt_gdsc =;


static struct gdsc hlos1_vote_turing_mmu_tbu0_gdsc =;

static struct gdsc *gcc_sm6125_gdscs[] =;

static struct clk_hw *gcc_sm6125_hws[] =;

static struct clk_regmap *gcc_sm6125_clocks[] =;

static const struct qcom_reset_map gcc_sm6125_resets[] =;

static struct clk_rcg_dfs_data gcc_dfs_clocks[] =;

static const struct regmap_config gcc_sm6125_regmap_config =;

static const struct qcom_cc_desc gcc_sm6125_desc =;

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

static int gcc_sm6125_probe(struct platform_device *pdev)
{}

static struct platform_driver gcc_sm6125_driver =;

static int __init gcc_sm6125_init(void)
{}
subsys_initcall(gcc_sm6125_init);

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

MODULE_DESCRIPTION();
MODULE_LICENSE();