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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2022 Kernkonzept GmbH.
 *
 * Based on gcc-msm8916.c:
 *   Copyright 2015 Linaro Limited
 * adapted with data from clock-gcc-8909.c in Qualcomm's msm-3.18 release:
 *   Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 */

#include <linux/bitops.h>
#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 <linux/reset-controller.h>

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

#include "clk-alpha-pll.h"
#include "clk-branch.h"
#include "clk-pll.h"
#include "clk-rcg.h"
#include "clk-regmap.h"
#include "common.h"
#include "gdsc.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_early =;

static struct clk_alpha_pll_postdiv gpll0 =;

static struct clk_pll gpll1 =;

static struct clk_regmap gpll1_vote =;

static struct clk_alpha_pll gpll2_early =;

static struct clk_alpha_pll_postdiv gpll2 =;

static struct clk_alpha_pll bimc_pll_early =;

static struct clk_alpha_pll_postdiv bimc_pll =;

static const struct parent_map gcc_xo_gpll0_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_data[] =;

static const struct parent_map gcc_xo_gpll0_bimc_map[] =;

static const struct clk_parent_data gcc_xo_gpll0_bimc_data[] =;

static const struct freq_tbl ftbl_apss_ahb_clk_src[] =;

static struct clk_rcg2 apss_ahb_clk_src =;

static struct clk_rcg2 bimc_ddr_clk_src =;

static struct clk_rcg2 bimc_gpu_clk_src =;

static const struct freq_tbl ftbl_blsp_i2c_apps_clk_src[] =;

static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src =;

static struct clk_rcg2 blsp1_qup6_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_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src =;

static struct clk_rcg2 blsp1_qup6_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 const struct parent_map gcc_byte0_map[] =;

static const struct clk_parent_data gcc_byte_data[] =;

static struct clk_rcg2 byte0_clk_src =;

static const struct freq_tbl ftbl_camss_gp_clk_src[] =;

static struct clk_rcg2 camss_gp0_clk_src =;

static struct clk_rcg2 camss_gp1_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_crypto_clk_src[] =;

static struct clk_rcg2 crypto_clk_src =;

static const struct freq_tbl ftbl_csi_clk_src[] =;

static struct clk_rcg2 csi0_clk_src =;

static struct clk_rcg2 csi1_clk_src =;

static const struct freq_tbl ftbl_csi_phytimer_clk_src[] =;

static struct clk_rcg2 csi0phytimer_clk_src =;

static const struct freq_tbl ftbl_esc0_clk_src[] =;

static struct clk_rcg2 esc0_clk_src =;

static const struct parent_map gcc_gfx3d_map[] =;

static const struct clk_parent_data gcc_gfx3d_data[] =;

static const struct freq_tbl ftbl_gfx3d_clk_src[] =;

static struct clk_rcg2 gfx3d_clk_src =;

static const struct freq_tbl ftbl_gp_clk_src[] =;

static struct clk_rcg2 gp1_clk_src =;

static struct clk_rcg2 gp2_clk_src =;

static struct clk_rcg2 gp3_clk_src =;

static const struct parent_map gcc_mclk_map[] =;

static const struct clk_parent_data gcc_mclk_data[] =;

static const struct freq_tbl ftbl_mclk_clk_src[] =;

static struct clk_rcg2 mclk0_clk_src =;

static struct clk_rcg2 mclk1_clk_src =;

static const struct parent_map gcc_mdp_map[] =;

static const struct clk_parent_data gcc_mdp_data[] =;

static const struct freq_tbl ftbl_mdp_clk_src[] =;

static struct clk_rcg2 mdp_clk_src =;

static const struct parent_map gcc_pclk0_map[] =;

static const struct clk_parent_data gcc_pclk_data[] =;

static struct clk_rcg2 pclk0_clk_src =;

static struct clk_rcg2 pcnoc_bfdcd_clk_src =;

static const struct freq_tbl ftbl_pdm2_clk_src[] =;

static struct clk_rcg2 pdm2_clk_src =;

static const struct freq_tbl ftbl_gcc_sdcc1_2_apps_clk[] =;

static struct clk_rcg2 sdcc1_apps_clk_src =;

static struct clk_rcg2 sdcc2_apps_clk_src =;

static struct clk_rcg2 system_noc_bfdcd_clk_src =;

static const struct freq_tbl ftbl_gcc_usb_hs_system_clk[] =;

static struct clk_rcg2 usb_hs_system_clk_src =;

static const struct parent_map gcc_vcodec0_map[] =;

static const struct clk_parent_data gcc_vcodec0_data[] =;

static const struct freq_tbl ftbl_vcodec0_clk_src[] =;

static struct clk_rcg2 vcodec0_clk_src =;

static const struct freq_tbl ftbl_gcc_camss_vfe0_clk[] =;

static struct clk_rcg2 vfe0_clk_src =;

static const struct freq_tbl ftbl_vsync_clk_src[] =;

static struct clk_rcg2 vsync_clk_src =;

static struct clk_branch gcc_apss_tcu_clk =;

static struct clk_branch gcc_blsp1_ahb_clk =;

static struct clk_branch gcc_blsp1_sleep_clk =;

static struct clk_branch gcc_boot_rom_ahb_clk =;

static struct clk_branch gcc_crypto_clk =;

static struct clk_branch gcc_crypto_ahb_clk =;

static struct clk_branch gcc_crypto_axi_clk =;

static struct clk_branch gcc_gfx_tbu_clk =;

static struct clk_branch gcc_gfx_tcu_clk =;

static struct clk_branch gcc_gtcu_ahb_clk =;

static struct clk_branch gcc_mdp_tbu_clk =;

static struct clk_branch gcc_prng_ahb_clk =;

static struct clk_branch gcc_smmu_cfg_clk =;

static struct clk_branch gcc_venus_tbu_clk =;

static struct clk_branch gcc_vfe_tbu_clk =;

static struct clk_branch gcc_bimc_gfx_clk =;

static struct clk_branch gcc_bimc_gpu_clk =;

static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk =;

static struct clk_branch gcc_blsp1_qup1_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup2_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup3_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup4_spi_apps_clk =;

static struct clk_branch gcc_blsp1_qup5_spi_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_camss_ahb_clk =;

static struct clk_branch gcc_camss_csi0_clk =;

static struct clk_branch gcc_camss_csi0_ahb_clk =;

static struct clk_branch gcc_camss_csi0phy_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_clk =;

static struct clk_branch gcc_camss_csi1_ahb_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_csi_vfe0_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_mclk0_clk =;

static struct clk_branch gcc_camss_mclk1_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_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_esc0_clk =;

static struct clk_branch gcc_mdss_mdp_clk =;

static struct clk_branch gcc_mdss_pclk0_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_oxili_ahb_clk =;

static struct clk_branch gcc_oxili_gfx3d_clk =;

static struct clk_branch gcc_pdm2_clk =;

static struct clk_branch gcc_pdm_ahb_clk =;

static struct clk_branch gcc_sdcc1_ahb_clk =;

static struct clk_branch gcc_sdcc1_apps_clk =;

static struct clk_branch gcc_sdcc2_ahb_clk =;

static struct clk_branch gcc_sdcc2_apps_clk =;

static struct clk_branch gcc_usb2a_phy_sleep_clk =;

static struct clk_branch gcc_usb_hs_ahb_clk =;

static struct clk_branch gcc_usb_hs_phy_cfg_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_vcodec0_clk =;

static struct gdsc mdss_gdsc =;

static struct gdsc oxili_gdsc =;

static struct gdsc venus_gdsc =;

static struct gdsc venus_core0_gdsc =;

static struct gdsc vfe_gdsc =;

static struct clk_regmap *gcc_msm8909_clocks[] =;

static struct gdsc *gcc_msm8909_gdscs[] =;

static const struct qcom_reset_map gcc_msm8909_resets[] =;

static const struct regmap_config gcc_msm8909_regmap_config =;

static const struct qcom_cc_desc gcc_msm8909_desc =;

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

static int gcc_msm8909_probe(struct platform_device *pdev)
{}

static struct platform_driver gcc_msm8909_driver =;

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

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

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();