linux/drivers/pinctrl/mediatek/pinctrl-mt7986.c

// SPDX-License-Identifier: GPL-2.0
/*
 * The MT7986 driver based on Linux generic pinctrl binding.
 *
 * Copyright (C) 2021 MediaTek Inc.
 * Author: Sam Shih <[email protected]>
 */

#include "pinctrl-moore.h"

#define MT7986_PIN(_number, _name)
#define MT7986_NOT_BALLOUT_PIN(_number)

#define PIN_FIELD_BASE(_s_pin, _e_pin, _i_base, _s_addr, _x_addrs, _s_bit,	\
			_x_bits)

/*
 * enum - Locking variants of the iocfg bases
 *
 * MT7986 have multiple bases to program pin configuration listed as the below:
 * iocfg_rt:0x11c30000, iocfg_rb:0x11c40000, iocfg_lt:0x11e20000,
 * iocfg_lb:0x11e30000, iocfg_tr:0x11f00000, iocfg_tl:0x11f10000,
 * _i_based could be used to indicate what base the pin should be mapped into.
 *
 * Each iocfg register base control different group of pads on the SoC
 *
 *
 *  chip carrier
 *
 *      A  B  C  D  E  F  G  H
 *    +------------------------+
 *  8 | o  o  o  o  o  o  o  o |
 *  7 | o  o  o  o  o  o  o  o |
 *  6 | o  o  o  o  o  o  o  o |
 *  5 | o  o  o  o  o  o  o  o |
 *  4 | o  o  o  o  o  o  o  o |
 *  3 | o  o  o  o  o  o  o  o |
 *  2 | o  o  o  o  o  o  o  o |
 *  1 | o  o  o  o  o  o  o  o |
 *    +------------------------+
 *
 *  inside Chip carrier
 *
 *      A  B  C  D  E  F  G  H
 *    +------------------------+
 *  8 |                        |
 *  7 |        TL  TR          |
 *  6 |      +---------+       |
 *  5 |   LT |         | RT    |
 *  4 |      |         |       |
 *  3 |   LB |         | RB    |
 *  2 |      +---------+       |
 *  1 |                        |
 *    +------------------------+
 *
 */

enum {};

static const char *const mt7986_pinctrl_register_base_names[] =;

static const struct mtk_pin_field_calc mt7986_pin_mode_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_dir_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_di_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_do_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_ies_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_smt_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_pu_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_pd_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_drv_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_pupd_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_r0_range[] =;

static const struct mtk_pin_field_calc mt7986_pin_r1_range[] =;

static const unsigned int mt7986_pull_type[] =;

static const struct mtk_pin_reg_calc mt7986_reg_cals[] =;

static const struct mtk_pin_desc mt7986a_pins[] =;

static const struct mtk_pin_desc mt7986b_pins[] =;

/* List all groups consisting of these pins dedicated to the enablement of
 * certain hardware block and the corresponding mode for all of the pins.
 * The hardware probably has multiple combinations of these pinouts.
 */

static int mt7986_watchdog_pins[] =;
static int mt7986_watchdog_funcs[] =;

static int mt7986_wifi_led_pins[] =;
static int mt7986_wifi_led_funcs[] =;

static int mt7986_i2c_pins[] =;
static int mt7986_i2c_funcs[] =;

static int mt7986_uart1_0_pins[] =;
static int mt7986_uart1_0_funcs[] =;

static int mt7986_spi1_0_pins[] =;
static int mt7986_spi1_0_funcs[] =;

static int mt7986_pwm1_1_pins[] =;
static int mt7986_pwm1_1_funcs[] =;

static int mt7986_pwm0_pins[] =;
static int mt7986_pwm0_funcs[] =;

static int mt7986_pwm1_0_pins[] =;
static int mt7986_pwm1_0_funcs[] =;

static int mt7986_emmc_45_pins[] =;
static int mt7986_emmc_45_funcs[] =;

static int mt7986_snfi_pins[] =;
static int mt7986_snfi_funcs[] =;

static int mt7986_spi1_1_pins[] =;
static int mt7986_spi1_1_funcs[] =;

static int mt7986_uart1_1_pins[] =;
static int mt7986_uart1_1_funcs[] =;

static int mt7986_spi1_2_pins[] =;
static int mt7986_spi1_2_funcs[] =;

static int mt7986_uart1_2_rx_tx_pins[] =;
static int mt7986_uart1_2_rx_tx_funcs[] =;

static int mt7986_uart1_2_cts_rts_pins[] =;
static int mt7986_uart1_2_cts_rts_funcs[] =;

static int mt7986_uart2_0_rx_tx_pins[] =;
static int mt7986_uart2_0_rx_tx_funcs[] =;

static int mt7986_uart2_0_cts_rts_pins[] =;
static int mt7986_uart2_0_cts_rts_funcs[] =;

static int mt7986_spi0_pins[] =;
static int mt7986_spi0_funcs[] =;

static int mt7986_spi0_wp_hold_pins[] =;
static int mt7986_spi0_wp_hold_funcs[] =;

static int mt7986_uart2_1_pins[] =;
static int mt7986_uart2_1_funcs[] =;

static int mt7986_uart1_3_rx_tx_pins[] =;
static int mt7986_uart1_3_rx_tx_funcs[] =;

static int mt7986_uart1_3_cts_rts_pins[] =;
static int mt7986_uart1_3_cts_rts_funcs[] =;

static int mt7986_spi1_3_pins[] =;
static int mt7986_spi1_3_funcs[] =;

static int mt7986_uart0_pins[] =;
static int mt7986_uart0_funcs[] =;

static int mt7986_pcie_reset_pins[] =;
static int mt7986_pcie_reset_funcs[] =;

static int mt7986_uart1_pins[] =;
static int mt7986_uart1_funcs[] =;

static int mt7986_uart1_rx_tx_pins[] =;
static int mt7986_uart1_rx_tx_funcs[] =;

static int mt7986_uart1_cts_rts_pins[] =;
static int mt7986_uart1_cts_rts_funcs[] =;

static int mt7986_uart2_pins[] =;
static int mt7986_uart2_funcs[] =;

static int mt7986_emmc_51_pins[] =;
static int mt7986_emmc_51_funcs[] =;

static int mt7986_pcm_pins[] =;
static int mt7986_pcm_funcs[] =;

static int mt7986_i2s_pins[] =;
static int mt7986_i2s_funcs[] =;

static int mt7986_switch_int_pins[] =;
static int mt7986_switch_int_funcs[] =;

static int mt7986_mdc_mdio_pins[] =;
static int mt7986_mdc_mdio_funcs[] =;

static int mt7986_wf_2g_pins[] =;
static int mt7986_wf_2g_funcs[] =;

static int mt7986_wf_5g_pins[] =;
static int mt7986_wf_5g_funcs[] =;

static int mt7986_wf_dbdc_pins[] =;
static int mt7986_wf_dbdc_funcs[] =;

static int mt7986_pcie_clk_pins[] =;
static int mt7986_pcie_clk_funcs[] =;

static int mt7986_pcie_wake_pins[] =;
static int mt7986_pcie_wake_funcs[] =;

static const struct group_desc mt7986_groups[] =;

/* Joint those groups owning the same capability in user point of view which
 * allows that people tend to use through the device tree.
 */

static const char *mt7986_audio_groups[] =;
static const char *mt7986_emmc_groups[] =;
static const char *mt7986_ethernet_groups[] =;
static const char *mt7986_i2c_groups[] =;
static const char *mt7986_led_groups[] =;
static const char *mt7986_flash_groups[] =;
static const char *mt7986_pcie_groups[] =;
static const char *mt7986_pwm_groups[] =;
static const char *mt7986_spi_groups[] =;
static const char *mt7986_uart_groups[] =;
static const char *mt7986_wdt_groups[] =;
static const char *mt7986_wf_groups[] =;

static const struct function_desc mt7986_functions[] =;

static const struct mtk_eint_hw mt7986a_eint_hw =;

static const struct mtk_eint_hw mt7986b_eint_hw =;

static struct mtk_pin_soc mt7986a_data =;

static struct mtk_pin_soc mt7986b_data =;

static const struct of_device_id mt7986a_pinctrl_of_match[] =;

static const struct of_device_id mt7986b_pinctrl_of_match[] =;

static int mt7986a_pinctrl_probe(struct platform_device *pdev)
{}

static int mt7986b_pinctrl_probe(struct platform_device *pdev)
{}

static struct platform_driver mt7986a_pinctrl_driver =;

static struct platform_driver mt7986b_pinctrl_driver =;

static int __init mt7986a_pinctrl_init(void)
{}

static int __init mt7986b_pinctrl_init(void)
{}

arch_initcall(mt7986a_pinctrl_init);
arch_initcall(mt7986b_pinctrl_init);