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

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
 * Copyright (c) 2023 The Linux Foundation. All rights reserved.
 */

#include <linux/clk-provider.h>
#include <linux/interconnect-clk.h>
#include <linux/interconnect-provider.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,ipq9574-gcc.h>
#include <dt-bindings/reset/qcom,ipq9574-gcc.h>
#include <dt-bindings/interconnect/qcom,ipq9574.h>

#include "clk-alpha-pll.h"
#include "clk-branch.h"
#include "clk-rcg.h"
#include "clk-regmap.h"
#include "clk-regmap-divider.h"
#include "clk-regmap-mux.h"
#include "clk-regmap-phy-mux.h"
#include "common.h"
#include "reset.h"

/* Need to match the order of clocks in DT binding */
enum {};

enum {};

static const struct parent_map gcc_xo_map[] =;

static const struct clk_parent_data gcc_xo_data[] =;

static const struct clk_parent_data gcc_sleep_clk_data[] =;

static struct clk_alpha_pll gpll0_main =;

static struct clk_fixed_factor gpll0_out_main_div2 =;

static struct clk_alpha_pll_postdiv gpll0 =;

static struct clk_alpha_pll gpll4_main =;

static struct clk_alpha_pll_postdiv gpll4 =;

static struct clk_alpha_pll gpll2_main =;

static struct clk_alpha_pll_postdiv gpll2 =;

static struct clk_branch gcc_sleep_clk_src =;

static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2[] =;

static const struct parent_map gcc_xo_gpll0_gpll0_out_main_div2_map[] =;

static const struct clk_parent_data gcc_xo_gpll0[] =;

static const struct parent_map gcc_xo_gpll0_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll4[] =;

static const struct parent_map gcc_xo_gpll0_gpll4_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll0_div2_gpll0[] =;

static const struct parent_map gcc_xo_gpll0_gpll0_div2_gpll0_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll0_sleep_clk[] =;

static const struct parent_map gcc_xo_gpll0_gpll0_sleep_clk_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_core_pi_sleep_clk[] =;

static const struct parent_map gcc_xo_gpll0_core_pi_sleep_clk_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk[] =;

static const struct parent_map gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk_map[] =;

static const struct clk_parent_data
			gcc_xo_gpll0_gpll0_aux_core_pi_sleep_clk[] =;

static const struct parent_map
			gcc_xo_gpll0_gpll0_aux_core_pi_sleep_clk_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_out_main_div2_gpll0[] =;

static const struct parent_map gcc_xo_gpll0_out_main_div2_gpll0_map[] =;

static const struct clk_parent_data
			gcc_xo_gpll4_gpll0_gpll0_out_main_div2[] =;

static const struct parent_map gcc_xo_gpll4_gpll0_gpll0_out_main_div2_map[] =;

static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] =;

static const struct parent_map gcc_usb3phy_0_cc_pipe_clk_xo_map[] =;

static const struct clk_parent_data
			gcc_xo_gpll0_gpll2_gpll0_out_main_div2[] =;

static const struct parent_map gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll4_gpll0_div2[] =;

static const struct parent_map gcc_xo_gpll0_gpll4_gpll0_div2_map[] =;

static const struct clk_parent_data gcc_xo_gpll4_gpll0_gpll0_div2[] =;

static const struct parent_map gcc_xo_gpll4_gpll0_gpll0_div2_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll2[] =;

static const struct parent_map gcc_xo_gpll0_gpll2_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll2_gpll4_pi_sleep[] =;

static const struct parent_map gcc_xo_gpll0_gpll2_gpll4_pi_sleep_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_gpll0_aux_gpll2[] =;

static const struct parent_map gcc_xo_gpll0_gpll0_aux_gpll2_map[] =;

static const struct freq_tbl ftbl_apss_ahb_clk_src[] =;

static struct clk_rcg2 apss_ahb_clk_src =;

static const struct freq_tbl ftbl_apss_axi_clk_src[] =;

static struct clk_rcg2 apss_axi_clk_src =;

static const struct freq_tbl ftbl_blsp1_qup_i2c_apps_clk_src[] =;

static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src =;

static const struct freq_tbl ftbl_blsp1_qup_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 struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src =;

static const struct freq_tbl ftbl_blsp1_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 blsp1_uart3_apps_clk_src =;

static struct clk_rcg2 blsp1_uart4_apps_clk_src =;

static struct clk_rcg2 blsp1_uart5_apps_clk_src =;

static struct clk_rcg2 blsp1_uart6_apps_clk_src =;

static const struct freq_tbl ftbl_gcc_crypto_clk_src[] =;

static struct clk_rcg2 gcc_crypto_clk_src =;

static struct clk_branch gcc_crypto_clk =;

static struct clk_branch gcc_apss_ahb_clk =;

static struct clk_branch gcc_apss_axi_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_qup5_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup5_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup6_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_blsp1_uart3_apps_clk =;

static struct clk_branch gcc_blsp1_uart4_apps_clk =;

static struct clk_branch gcc_blsp1_uart5_apps_clk =;

static struct clk_branch gcc_blsp1_uart6_apps_clk =;

static const struct freq_tbl ftbl_pcie0_axi_m_clk_src[] =;

static struct clk_rcg2 pcie0_axi_m_clk_src =;

static struct clk_branch gcc_pcie0_axi_m_clk =;

static struct clk_branch gcc_anoc_pcie0_1lane_m_clk =;

static struct clk_rcg2 pcie1_axi_m_clk_src =;

static struct clk_branch gcc_pcie1_axi_m_clk =;

static struct clk_branch gcc_anoc_pcie1_1lane_m_clk =;

static const struct freq_tbl ftbl_pcie2_axi_m_clk_src[] =;

static struct clk_rcg2 pcie2_axi_m_clk_src =;

static struct clk_branch gcc_pcie2_axi_m_clk =;

static struct clk_branch gcc_anoc_pcie2_2lane_m_clk =;

static struct clk_rcg2 pcie3_axi_m_clk_src =;

static struct clk_branch gcc_pcie3_axi_m_clk =;

static struct clk_branch gcc_anoc_pcie3_2lane_m_clk =;

static struct clk_rcg2 pcie0_axi_s_clk_src =;

static struct clk_branch gcc_pcie0_axi_s_clk =;

static struct clk_branch gcc_pcie0_axi_s_bridge_clk =;

static struct clk_branch gcc_snoc_pcie0_1lane_s_clk =;

static struct clk_rcg2 pcie1_axi_s_clk_src =;

static struct clk_branch gcc_pcie1_axi_s_clk =;

static struct clk_branch gcc_pcie1_axi_s_bridge_clk =;

static struct clk_branch gcc_snoc_pcie1_1lane_s_clk =;

static struct clk_rcg2 pcie2_axi_s_clk_src =;

static struct clk_branch gcc_pcie2_axi_s_clk =;

static struct clk_branch gcc_pcie2_axi_s_bridge_clk =;

static struct clk_branch gcc_snoc_pcie2_2lane_s_clk =;

static struct clk_rcg2 pcie3_axi_s_clk_src =;

static struct clk_branch gcc_pcie3_axi_s_clk =;

static struct clk_branch gcc_pcie3_axi_s_bridge_clk =;

static struct clk_branch gcc_snoc_pcie3_2lane_s_clk =;

static struct clk_regmap_phy_mux pcie0_pipe_clk_src =;

static struct clk_branch gcc_pcie0_pipe_clk =;

static struct clk_regmap_phy_mux pcie1_pipe_clk_src =;

static struct clk_branch gcc_pcie1_pipe_clk =;

static struct clk_regmap_phy_mux pcie2_pipe_clk_src =;

static struct clk_branch gcc_pcie2_pipe_clk =;

static struct clk_regmap_phy_mux pcie3_pipe_clk_src =;

static struct clk_branch gcc_pcie3_pipe_clk =;

static const struct freq_tbl ftbl_pcie_rchng_clk_src[] =;

static struct clk_rcg2 pcie0_rchng_clk_src =;

static struct clk_branch gcc_pcie0_rchng_clk =;

static struct clk_rcg2 pcie1_rchng_clk_src =;

static struct clk_branch gcc_pcie1_rchng_clk =;

static struct clk_rcg2 pcie2_rchng_clk_src =;

static struct clk_branch gcc_pcie2_rchng_clk =;

static struct clk_rcg2 pcie3_rchng_clk_src =;

static struct clk_branch gcc_pcie3_rchng_clk =;

static const struct freq_tbl ftbl_pcie_aux_clk_src[] =;

static struct clk_rcg2 pcie_aux_clk_src =;

static struct clk_branch gcc_pcie0_aux_clk =;

static struct clk_branch gcc_pcie1_aux_clk =;

static struct clk_branch gcc_pcie2_aux_clk =;

static struct clk_branch gcc_pcie3_aux_clk =;

static const struct freq_tbl ftbl_usb_aux_clk_src[] =;

static struct clk_rcg2 usb0_aux_clk_src =;

static struct clk_branch gcc_usb0_aux_clk =;

static const struct freq_tbl ftbl_usb0_master_clk_src[] =;

static struct clk_rcg2 usb0_master_clk_src =;

static struct clk_branch gcc_usb0_master_clk =;

static struct clk_branch gcc_snoc_usb_clk =;

static struct clk_branch gcc_anoc_usb_axi_clk =;

static const struct freq_tbl ftbl_usb0_mock_utmi_clk_src[] =;

static struct clk_rcg2 usb0_mock_utmi_clk_src =;

static struct clk_regmap_div usb0_mock_utmi_div_clk_src =;

static struct clk_branch gcc_usb0_mock_utmi_clk =;

static struct clk_regmap_mux usb0_pipe_clk_src =;

static struct clk_branch gcc_usb0_pipe_clk =;

static struct clk_branch gcc_usb0_sleep_clk =;

static const struct freq_tbl ftbl_sdcc_apps_clk_src[] =;

static struct clk_rcg2 sdcc1_apps_clk_src =;

static struct clk_branch gcc_sdcc1_apps_clk =;

static const struct freq_tbl ftbl_sdcc_ice_core_clk_src[] =;

static struct clk_rcg2 sdcc1_ice_core_clk_src =;

static struct clk_branch gcc_sdcc1_ice_core_clk =;

static const struct freq_tbl ftbl_pcnoc_bfdcd_clk_src[] =;

static struct clk_rcg2 pcnoc_bfdcd_clk_src =;

static struct clk_branch gcc_crypto_axi_clk =;

static struct clk_branch gcc_crypto_ahb_clk =;

static struct clk_branch gcc_nsscfg_clk =;

static struct clk_branch gcc_nssnoc_nsscc_clk =;

static struct clk_branch gcc_nsscc_clk =;

static struct clk_branch gcc_nssnoc_pcnoc_1_clk =;

static struct clk_branch gcc_qdss_dap_ahb_clk =;

static struct clk_branch gcc_qdss_cfg_ahb_clk =;

static struct clk_branch gcc_qpic_ahb_clk =;

static struct clk_branch gcc_qpic_clk =;

static struct clk_branch gcc_blsp1_ahb_clk =;

static struct clk_branch gcc_mdio_ahb_clk =;

static struct clk_branch gcc_prng_ahb_clk =;

static struct clk_branch gcc_uniphy0_ahb_clk =;

static struct clk_branch gcc_uniphy1_ahb_clk =;

static struct clk_branch gcc_uniphy2_ahb_clk =;

static struct clk_branch gcc_cmn_12gpll_ahb_clk =;

static struct clk_branch gcc_cmn_12gpll_apu_clk =;

static struct clk_branch gcc_pcie0_ahb_clk =;

static struct clk_branch gcc_pcie1_ahb_clk =;

static struct clk_branch gcc_pcie2_ahb_clk =;

static struct clk_branch gcc_pcie3_ahb_clk =;

static struct clk_branch gcc_usb0_phy_cfg_ahb_clk =;

static struct clk_branch gcc_sdcc1_ahb_clk =;

static const struct freq_tbl ftbl_system_noc_bfdcd_clk_src[] =;

static struct clk_rcg2 system_noc_bfdcd_clk_src =;

static struct clk_branch gcc_q6ss_boot_clk =;

static struct clk_branch gcc_nssnoc_snoc_clk =;

static struct clk_branch gcc_nssnoc_snoc_1_clk =;

static struct clk_branch gcc_qdss_etr_usb_clk =;

static const struct freq_tbl ftbl_wcss_ahb_clk_src[] =;

static struct clk_rcg2 wcss_ahb_clk_src =;

static struct clk_branch gcc_q6_ahb_clk =;

static struct clk_branch gcc_q6_ahb_s_clk =;

static struct clk_branch gcc_wcss_ecahb_clk =;

static struct clk_branch gcc_wcss_acmt_clk =;

static struct clk_branch gcc_sys_noc_wcss_ahb_clk =;

static const struct freq_tbl ftbl_wcss_axi_m_clk_src[] =;

static struct clk_rcg2 wcss_axi_m_clk_src =;

static struct clk_branch gcc_anoc_wcss_axi_m_clk =;

static const struct freq_tbl ftbl_qdss_at_clk_src[] =;

static struct clk_rcg2 qdss_at_clk_src =;

static struct clk_branch gcc_q6ss_atbm_clk =;

static struct clk_branch gcc_wcss_dbg_ifc_atb_clk =;

static struct clk_branch gcc_nssnoc_atb_clk =;

static struct clk_branch gcc_qdss_at_clk =;

static struct clk_branch gcc_sys_noc_at_clk =;

static struct clk_branch gcc_pcnoc_at_clk =;

static struct clk_fixed_factor gcc_eud_at_div_clk_src =;

static struct clk_branch gcc_usb0_eud_at_clk =;

static struct clk_branch gcc_qdss_eud_at_clk =;

static const struct freq_tbl ftbl_qdss_stm_clk_src[] =;

static struct clk_rcg2 qdss_stm_clk_src =;

static struct clk_branch gcc_qdss_stm_clk =;

static struct clk_branch gcc_sys_noc_qdss_stm_axi_clk =;

static const struct freq_tbl ftbl_qdss_traceclkin_clk_src[] =;

static struct clk_rcg2 qdss_traceclkin_clk_src =;

static struct clk_branch gcc_qdss_traceclkin_clk =;

static const struct freq_tbl ftbl_qdss_tsctr_clk_src[] =;

static struct clk_rcg2 qdss_tsctr_clk_src =;

static struct clk_fixed_factor qdss_tsctr_div2_clk_src =;

static struct clk_branch gcc_q6_tsctr_1to2_clk =;

static struct clk_branch gcc_wcss_dbg_ifc_nts_clk =;

static struct clk_branch gcc_qdss_tsctr_div2_clk =;

static const struct freq_tbl ftbl_uniphy_sys_clk_src[] =;

static struct clk_rcg2 uniphy_sys_clk_src =;

static struct clk_rcg2 nss_ts_clk_src =;

static struct clk_branch gcc_qdss_ts_clk =;

static struct clk_fixed_factor qdss_dap_sync_clk_src =;

static struct clk_branch gcc_qdss_tsctr_div4_clk =;

static struct clk_fixed_factor qdss_tsctr_div8_clk_src =;

static struct clk_branch gcc_nss_ts_clk =;

static struct clk_branch gcc_qdss_tsctr_div8_clk =;

static struct clk_fixed_factor qdss_tsctr_div16_clk_src =;

static struct clk_branch gcc_qdss_tsctr_div16_clk =;

static struct clk_branch gcc_q6ss_pclkdbg_clk =;

static struct clk_branch gcc_q6ss_trig_clk =;

static struct clk_branch gcc_wcss_dbg_ifc_apb_clk =;

static struct clk_branch gcc_wcss_dbg_ifc_dapbus_clk =;

static struct clk_branch gcc_qdss_dap_clk =;

static struct clk_branch gcc_qdss_apb2jtag_clk =;

static struct clk_fixed_factor qdss_tsctr_div3_clk_src =;

static struct clk_branch gcc_qdss_tsctr_div3_clk =;

static const struct freq_tbl ftbl_qpic_io_macro_clk_src[] =;

static struct clk_rcg2 qpic_io_macro_clk_src =;

static struct clk_branch gcc_qpic_io_macro_clk =;

static const struct freq_tbl ftbl_q6_axi_clk_src[] =;

static struct clk_rcg2 q6_axi_clk_src =;

static struct clk_branch gcc_q6_axim_clk =;

static struct clk_branch gcc_wcss_q6_tbu_clk =;

static struct clk_branch gcc_mem_noc_q6_axi_clk =;

static const struct freq_tbl ftbl_q6_axim2_clk_src[] =;

static const struct parent_map gcc_xo_gpll0_gpll4_bias_pll_ubinc_clk_map[] =;

static struct clk_rcg2 q6_axim2_clk_src =;

static const struct freq_tbl ftbl_nssnoc_memnoc_bfdcd_clk_src[] =;

static struct clk_rcg2 nssnoc_memnoc_bfdcd_clk_src =;

static struct clk_branch gcc_nssnoc_memnoc_clk =;

static struct clk_branch gcc_nssnoc_mem_noc_1_clk =;

static struct clk_branch gcc_nss_tbu_clk =;

static struct clk_branch gcc_mem_noc_nssnoc_clk =;

static const struct freq_tbl ftbl_lpass_axim_clk_src[] =;

static struct clk_rcg2 lpass_axim_clk_src =;

static struct clk_rcg2 lpass_sway_clk_src =;

static const struct freq_tbl ftbl_adss_pwm_clk_src[] =;

static struct clk_rcg2 adss_pwm_clk_src =;

static struct clk_branch gcc_adss_pwm_clk =;

static const struct freq_tbl ftbl_gp1_clk_src[] =;

static struct clk_rcg2 gp1_clk_src =;

static struct clk_rcg2 gp2_clk_src =;

static struct clk_rcg2 gp3_clk_src =;

static struct clk_branch gcc_xo_clk_src =;

static struct clk_branch gcc_nssnoc_xo_dcd_clk =;

static struct clk_branch gcc_xo_clk =;

static struct clk_branch gcc_uniphy0_sys_clk =;

static struct clk_branch gcc_uniphy1_sys_clk =;

static struct clk_branch gcc_uniphy2_sys_clk =;

static struct clk_branch gcc_cmn_12gpll_sys_clk =;

static struct clk_fixed_factor gcc_xo_div4_clk_src =;

static struct clk_branch gcc_nssnoc_qosgen_ref_clk =;

static struct clk_branch gcc_nssnoc_timeout_ref_clk =;

static struct clk_branch gcc_xo_div4_clk =;

static struct clk_hw *gcc_ipq9574_hws[] =;

static struct clk_regmap *gcc_ipq9574_clks[] =;

static const struct qcom_reset_map gcc_ipq9574_resets[] =;

#define IPQ_APPS_ID

static struct qcom_icc_hws_data icc_ipq9574_hws[] =;

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

static const struct regmap_config gcc_ipq9574_regmap_config =;

static const struct qcom_cc_desc gcc_ipq9574_desc =;

static int gcc_ipq9574_probe(struct platform_device *pdev)
{}

static struct platform_driver gcc_ipq9574_driver =;

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

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

MODULE_DESCRIPTION();
MODULE_LICENSE();