linux/drivers/pinctrl/qcom/pinctrl-sdm670.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022, Richard Acayan. All rights reserved.
 */

#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include "pinctrl-msm.h"

#define NORTH
#define SOUTH
#define WEST

#define REG_SIZE
#define PINGROUP(id, base, f1, f2, f3, f4, f5, f6, f7, f8, f9)

/*
 * A dummy pingroup is a pin group that cannot be assigned a function and has
 * no registers to control or monitor it.
 */
#define PINGROUP_DUMMY(id)

#define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)

#define UFS_RESET(pg_name, offset)

static const struct pinctrl_pin_desc sdm670_pins[] =;

#define DECLARE_MSM_GPIO_PINS(pin)
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();
DECLARE_MSM_GPIO_PINS();

static const unsigned int ufs_reset_pins[] =;
static const unsigned int sdc1_rclk_pins[] =;
static const unsigned int sdc1_clk_pins[] =;
static const unsigned int sdc1_cmd_pins[] =;
static const unsigned int sdc1_data_pins[] =;
static const unsigned int sdc2_clk_pins[] =;
static const unsigned int sdc2_cmd_pins[] =;
static const unsigned int sdc2_data_pins[] =;

enum sdm670_functions {};

static const char * const gpio_groups[] =;
static const char * const qup0_groups[] =;
static const char * const qup9_groups[] =;
static const char * const qdss_cti_groups[] =;
static const char * const ddr_pxi0_groups[] =;
static const char * const ddr_bist_groups[] =;
static const char * const atest_tsens2_groups[] =;
static const char * const vsense_trigger_groups[] =;
static const char * const atest_usb1_groups[] =;
static const char * const qup_l4_groups[] =;
static const char * const gp_pdm1_groups[] =;
static const char * const qup_l5_groups[] =;
static const char * const mdp_vsync_groups[] =;
static const char * const qup_l6_groups[] =;
static const char * const wlan2_adc1_groups[] =;
static const char * const atest_usb11_groups[] =;
static const char * const ddr_pxi2_groups[] =;
static const char * const edp_lcd_groups[] =;
static const char * const dbg_out_groups[] =;
static const char * const wlan2_adc0_groups[] =;
static const char * const atest_usb10_groups[] =;
static const char * const m_voc_groups[] =;
static const char * const tsif1_sync_groups[] =;
static const char * const ddr_pxi3_groups[] =;
static const char * const cam_mclk_groups[] =;
static const char * const pll_bypassnl_groups[] =;
static const char * const qdss_groups[] =;
static const char * const pll_reset_groups[] =;
static const char * const cci_i2c_groups[] =;
static const char * const qup1_groups[] =;
static const char * const cci_timer0_groups[] =;
static const char * const gcc_gp2_groups[] =;
static const char * const cci_timer1_groups[] =;
static const char * const gcc_gp3_groups[] =;
static const char * const cci_timer2_groups[] =;
static const char * const cci_timer3_groups[] =;
static const char * const cci_async_groups[] =;
static const char * const cci_timer4_groups[] =;
static const char * const jitter_bist_groups[] =;
static const char * const qup2_groups[] =;
static const char * const pll_bist_groups[] =;
static const char * const agera_pll_groups[] =;
static const char * const atest_tsens_groups[] =;
static const char * const phase_flag_groups[] =;
static const char * const qup11_groups[] =;
static const char * const qup14_groups[] =;
static const char * const pci_e0_groups[] =;
static const char * const usb_phy_groups[] =;
static const char * const lpass_slimbus_groups[] =;
static const char * const sd_write_groups[] =;
static const char * const tsif1_error_groups[] =;
static const char * const qup3_groups[] =;
static const char * const qup6_groups[] =;
static const char * const qup12_groups[] =;
static const char * const qup10_groups[] =;
static const char * const gp_pdm0_groups[] =;
static const char * const wlan1_adc1_groups[] =;
static const char * const atest_usb13_groups[] =;
static const char * const ddr_pxi1_groups[] =;
static const char * const wlan1_adc0_groups[] =;
static const char * const atest_usb12_groups[] =;
static const char * const qua_mi2s_groups[] =;
static const char * const gcc_gp1_groups[] =;
static const char * const pri_mi2s_groups[] =;
static const char * const qup8_groups[] =;
static const char * const wsa_clk_groups[] =;
static const char * const pri_mi2s_ws_groups[] =;
static const char * const wsa_data_groups[] =;
static const char * const atest_usb2_groups[] =;
static const char * const atest_usb23_groups[] =;
static const char * const ter_mi2s_groups[] =;
static const char * const atest_usb22_groups[] =;
static const char * const atest_usb21_groups[] =;
static const char * const atest_usb20_groups[] =;
static const char * const sec_mi2s_groups[] =;
static const char * const gp_pdm2_groups[] =;
static const char * const qup15_groups[] =;
static const char * const qup5_groups[] =;
static const char * const copy_gp_groups[] =;
static const char * const tsif1_clk_groups[] =;
static const char * const qup4_groups[] =;
static const char * const tgu_ch3_groups[] =;
static const char * const tsif1_en_groups[] =;
static const char * const mdp_vsync0_groups[] =;
static const char * const mdp_vsync1_groups[] =;
static const char * const mdp_vsync2_groups[] =;
static const char * const mdp_vsync3_groups[] =;
static const char * const tgu_ch0_groups[] =;
static const char * const tsif1_data_groups[] =;
static const char * const sdc4_cmd_groups[] =;
static const char * const tgu_ch1_groups[] =;
static const char * const tsif2_error_groups[] =;
static const char * const vfr_1_groups[] =;
static const char * const tgu_ch2_groups[] =;
static const char * const sdc4_data_groups[] =;
static const char * const tsif2_clk_groups[] =;
static const char * const sdc4_clk_groups[] =;
static const char * const qup7_groups[] =;
static const char * const tsif2_en_groups[] =;
static const char * const tsif2_data_groups[] =;
static const char * const tsif2_sync_groups[] =;
static const char * const ldo_en_groups[] =;
static const char * const ldo_update_groups[] =;
static const char * const prng_rosc_groups[] =;
static const char * const pci_e1_groups[] =;
static const char * const copy_phase_groups[] =;
static const char * const uim2_data_groups[] =;
static const char * const qup13_groups[] =;
static const char * const uim2_clk_groups[] =;
static const char * const uim2_reset_groups[] =;
static const char * const uim2_present_groups[] =;
static const char * const uim1_data_groups[] =;
static const char * const uim1_clk_groups[] =;
static const char * const uim1_reset_groups[] =;
static const char * const uim1_present_groups[] =;
static const char * const uim_batt_groups[] =;
static const char * const edp_hot_groups[] =;
static const char * const nav_pps_groups[] =;
static const char * const gps_tx_groups[] =;
static const char * const atest_char_groups[] =;
static const char * const adsp_ext_groups[] =;
static const char * const qlink_request_groups[] =;
static const char * const qlink_enable_groups[] =;
static const char * const pa_indicator_groups[] =;
static const char * const mss_lte_groups[] =;

static const struct pinfunction sdm670_functions[] =;

/*
 * Each pin is individually controlled by its own group and gpios that cannot
 * be requested are represented by the PINGROUP_DUMMY macro so that the group
 * numbers and names correspond to their respective gpio. These dummy pins do
 * not have a valid set of pinfuncs or a valid ctl_reg and should not be
 * requested.
 */
static const struct msm_pingroup sdm670_groups[] =;

static const int sdm670_reserved_gpios[] =;

static const struct msm_gpio_wakeirq_map sdm670_pdc_map[] =;

static const struct msm_pinctrl_soc_data sdm670_pinctrl =;

static int sdm670_pinctrl_probe(struct platform_device *pdev)
{}

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

static struct platform_driver sdm670_pinctrl_driver =;

static int __init sdm670_pinctrl_init(void)
{}
arch_initcall(sdm670_pinctrl_init);

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

MODULE_DESCRIPTION();
MODULE_LICENSE();