162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2017-2018 MediaTek Inc. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Author: Sean Wang <sean.wang@mediatek.com> 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include "pinctrl-moore.h" 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define MT7622_PIN(_number, _name) \ 1262306a36Sopenharmony_ci MTK_PIN(_number, _name, 1, _number, DRV_GRP0) 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_mode_range[] = { 1562306a36Sopenharmony_ci PIN_FIELD(0, 0, 0x320, 0x10, 16, 4), 1662306a36Sopenharmony_ci PIN_FIELD(1, 4, 0x3a0, 0x10, 16, 4), 1762306a36Sopenharmony_ci PIN_FIELD(5, 5, 0x320, 0x10, 0, 4), 1862306a36Sopenharmony_ci PINS_FIELD(6, 7, 0x300, 0x10, 4, 4), 1962306a36Sopenharmony_ci PIN_FIELD(8, 9, 0x350, 0x10, 20, 4), 2062306a36Sopenharmony_ci PINS_FIELD(10, 13, 0x300, 0x10, 8, 4), 2162306a36Sopenharmony_ci PIN_FIELD(14, 15, 0x320, 0x10, 4, 4), 2262306a36Sopenharmony_ci PIN_FIELD(16, 17, 0x320, 0x10, 20, 4), 2362306a36Sopenharmony_ci PIN_FIELD(18, 21, 0x310, 0x10, 16, 4), 2462306a36Sopenharmony_ci PIN_FIELD(22, 22, 0x380, 0x10, 16, 4), 2562306a36Sopenharmony_ci PINS_FIELD(23, 24, 0x300, 0x10, 24, 4), 2662306a36Sopenharmony_ci PINS_FIELD(25, 36, 0x300, 0x10, 12, 4), 2762306a36Sopenharmony_ci PINS_FIELD(37, 50, 0x300, 0x10, 20, 4), 2862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x330, 0x10, 4, 4), 2962306a36Sopenharmony_ci PINS_FIELD(71, 72, 0x300, 0x10, 16, 4), 3062306a36Sopenharmony_ci PIN_FIELD(73, 76, 0x310, 0x10, 0, 4), 3162306a36Sopenharmony_ci PIN_FIELD(77, 77, 0x320, 0x10, 28, 4), 3262306a36Sopenharmony_ci PIN_FIELD(78, 78, 0x320, 0x10, 12, 4), 3362306a36Sopenharmony_ci PIN_FIELD(79, 82, 0x3a0, 0x10, 0, 4), 3462306a36Sopenharmony_ci PIN_FIELD(83, 83, 0x350, 0x10, 28, 4), 3562306a36Sopenharmony_ci PIN_FIELD(84, 84, 0x330, 0x10, 0, 4), 3662306a36Sopenharmony_ci PIN_FIELD(85, 90, 0x360, 0x10, 4, 4), 3762306a36Sopenharmony_ci PIN_FIELD(91, 94, 0x390, 0x10, 16, 4), 3862306a36Sopenharmony_ci PIN_FIELD(95, 97, 0x380, 0x10, 20, 4), 3962306a36Sopenharmony_ci PIN_FIELD(98, 101, 0x390, 0x10, 0, 4), 4062306a36Sopenharmony_ci PIN_FIELD(102, 102, 0x360, 0x10, 0, 4), 4162306a36Sopenharmony_ci}; 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_dir_range[] = { 4462306a36Sopenharmony_ci PIN_FIELD(0, 102, 0x0, 0x10, 0, 1), 4562306a36Sopenharmony_ci}; 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_di_range[] = { 4862306a36Sopenharmony_ci PIN_FIELD(0, 102, 0x200, 0x10, 0, 1), 4962306a36Sopenharmony_ci}; 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_do_range[] = { 5262306a36Sopenharmony_ci PIN_FIELD(0, 102, 0x100, 0x10, 0, 1), 5362306a36Sopenharmony_ci}; 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_sr_range[] = { 5662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x910, 0x10, 0, 1), 5762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa10, 0x10, 0, 1), 5862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x810, 0x10, 0, 1), 5962306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb10, 0x10, 0, 1), 6062306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb10, 0x10, 4, 1), 6162306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc10, 0x10, 0, 1), 6262306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb10, 0x10, 18, 1), 6362306a36Sopenharmony_ci}; 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_smt_range[] = { 6662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x920, 0x10, 0, 1), 6762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa20, 0x10, 0, 1), 6862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x820, 0x10, 0, 1), 6962306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb20, 0x10, 0, 1), 7062306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb20, 0x10, 4, 1), 7162306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc20, 0x10, 0, 1), 7262306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb20, 0x10, 18, 1), 7362306a36Sopenharmony_ci}; 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_pu_range[] = { 7662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x930, 0x10, 0, 1), 7762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa30, 0x10, 0, 1), 7862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x830, 0x10, 0, 1), 7962306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb30, 0x10, 0, 1), 8062306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb30, 0x10, 4, 1), 8162306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc30, 0x10, 0, 1), 8262306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb30, 0x10, 18, 1), 8362306a36Sopenharmony_ci}; 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_pd_range[] = { 8662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x940, 0x10, 0, 1), 8762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa40, 0x10, 0, 1), 8862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x840, 0x10, 0, 1), 8962306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb40, 0x10, 0, 1), 9062306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb40, 0x10, 4, 1), 9162306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc40, 0x10, 0, 1), 9262306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb40, 0x10, 18, 1), 9362306a36Sopenharmony_ci}; 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_e4_range[] = { 9662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x960, 0x10, 0, 1), 9762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa60, 0x10, 0, 1), 9862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x860, 0x10, 0, 1), 9962306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb60, 0x10, 0, 1), 10062306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb60, 0x10, 4, 1), 10162306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc60, 0x10, 0, 1), 10262306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb60, 0x10, 18, 1), 10362306a36Sopenharmony_ci}; 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_e8_range[] = { 10662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x970, 0x10, 0, 1), 10762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa70, 0x10, 0, 1), 10862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x870, 0x10, 0, 1), 10962306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb70, 0x10, 0, 1), 11062306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb70, 0x10, 4, 1), 11162306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc70, 0x10, 0, 1), 11262306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb70, 0x10, 18, 1), 11362306a36Sopenharmony_ci}; 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_tdsel_range[] = { 11662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x980, 0x4, 0, 4), 11762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa80, 0x4, 0, 4), 11862306a36Sopenharmony_ci PIN_FIELD(51, 70, 0x880, 0x4, 0, 4), 11962306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb80, 0x4, 0, 4), 12062306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb80, 0x4, 16, 4), 12162306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc80, 0x4, 0, 4), 12262306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb88, 0x4, 8, 4), 12362306a36Sopenharmony_ci}; 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_cistatic const struct mtk_pin_field_calc mt7622_pin_rdsel_range[] = { 12662306a36Sopenharmony_ci PIN_FIELD(0, 31, 0x990, 0x4, 0, 6), 12762306a36Sopenharmony_ci PIN_FIELD(32, 50, 0xa90, 0x4, 0, 6), 12862306a36Sopenharmony_ci PIN_FIELD(51, 58, 0x890, 0x4, 0, 6), 12962306a36Sopenharmony_ci PIN_FIELD(59, 60, 0x894, 0x4, 28, 6), 13062306a36Sopenharmony_ci PIN_FIELD(61, 62, 0x894, 0x4, 16, 6), 13162306a36Sopenharmony_ci PIN_FIELD(63, 66, 0x898, 0x4, 8, 6), 13262306a36Sopenharmony_ci PIN_FIELD(67, 68, 0x89c, 0x4, 12, 6), 13362306a36Sopenharmony_ci PIN_FIELD(69, 70, 0x89c, 0x4, 0, 6), 13462306a36Sopenharmony_ci PIN_FIELD(71, 72, 0xb90, 0x4, 0, 6), 13562306a36Sopenharmony_ci PIN_FIELD(73, 86, 0xb90, 0x4, 24, 6), 13662306a36Sopenharmony_ci PIN_FIELD(87, 90, 0xc90, 0x4, 0, 6), 13762306a36Sopenharmony_ci PIN_FIELD(91, 102, 0xb9c, 0x4, 12, 6), 13862306a36Sopenharmony_ci}; 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_cistatic const struct mtk_pin_reg_calc mt7622_reg_cals[PINCTRL_PIN_REG_MAX] = { 14162306a36Sopenharmony_ci [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt7622_pin_mode_range), 14262306a36Sopenharmony_ci [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt7622_pin_dir_range), 14362306a36Sopenharmony_ci [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt7622_pin_di_range), 14462306a36Sopenharmony_ci [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt7622_pin_do_range), 14562306a36Sopenharmony_ci [PINCTRL_PIN_REG_SR] = MTK_RANGE(mt7622_pin_sr_range), 14662306a36Sopenharmony_ci [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt7622_pin_smt_range), 14762306a36Sopenharmony_ci [PINCTRL_PIN_REG_PU] = MTK_RANGE(mt7622_pin_pu_range), 14862306a36Sopenharmony_ci [PINCTRL_PIN_REG_PD] = MTK_RANGE(mt7622_pin_pd_range), 14962306a36Sopenharmony_ci [PINCTRL_PIN_REG_E4] = MTK_RANGE(mt7622_pin_e4_range), 15062306a36Sopenharmony_ci [PINCTRL_PIN_REG_E8] = MTK_RANGE(mt7622_pin_e8_range), 15162306a36Sopenharmony_ci [PINCTRL_PIN_REG_TDSEL] = MTK_RANGE(mt7622_pin_tdsel_range), 15262306a36Sopenharmony_ci [PINCTRL_PIN_REG_RDSEL] = MTK_RANGE(mt7622_pin_rdsel_range), 15362306a36Sopenharmony_ci}; 15462306a36Sopenharmony_ci 15562306a36Sopenharmony_cistatic const struct mtk_pin_desc mt7622_pins[] = { 15662306a36Sopenharmony_ci MT7622_PIN(0, "GPIO_A"), 15762306a36Sopenharmony_ci MT7622_PIN(1, "I2S1_IN"), 15862306a36Sopenharmony_ci MT7622_PIN(2, "I2S1_OUT"), 15962306a36Sopenharmony_ci MT7622_PIN(3, "I2S_BCLK"), 16062306a36Sopenharmony_ci MT7622_PIN(4, "I2S_WS"), 16162306a36Sopenharmony_ci MT7622_PIN(5, "I2S_MCLK"), 16262306a36Sopenharmony_ci MT7622_PIN(6, "TXD0"), 16362306a36Sopenharmony_ci MT7622_PIN(7, "RXD0"), 16462306a36Sopenharmony_ci MT7622_PIN(8, "SPI_WP"), 16562306a36Sopenharmony_ci MT7622_PIN(9, "SPI_HOLD"), 16662306a36Sopenharmony_ci MT7622_PIN(10, "SPI_CLK"), 16762306a36Sopenharmony_ci MT7622_PIN(11, "SPI_MOSI"), 16862306a36Sopenharmony_ci MT7622_PIN(12, "SPI_MISO"), 16962306a36Sopenharmony_ci MT7622_PIN(13, "SPI_CS"), 17062306a36Sopenharmony_ci MT7622_PIN(14, "I2C_SDA"), 17162306a36Sopenharmony_ci MT7622_PIN(15, "I2C_SCL"), 17262306a36Sopenharmony_ci MT7622_PIN(16, "I2S2_IN"), 17362306a36Sopenharmony_ci MT7622_PIN(17, "I2S3_IN"), 17462306a36Sopenharmony_ci MT7622_PIN(18, "I2S4_IN"), 17562306a36Sopenharmony_ci MT7622_PIN(19, "I2S2_OUT"), 17662306a36Sopenharmony_ci MT7622_PIN(20, "I2S3_OUT"), 17762306a36Sopenharmony_ci MT7622_PIN(21, "I2S4_OUT"), 17862306a36Sopenharmony_ci MT7622_PIN(22, "GPIO_B"), 17962306a36Sopenharmony_ci MT7622_PIN(23, "MDC"), 18062306a36Sopenharmony_ci MT7622_PIN(24, "MDIO"), 18162306a36Sopenharmony_ci MT7622_PIN(25, "G2_TXD0"), 18262306a36Sopenharmony_ci MT7622_PIN(26, "G2_TXD1"), 18362306a36Sopenharmony_ci MT7622_PIN(27, "G2_TXD2"), 18462306a36Sopenharmony_ci MT7622_PIN(28, "G2_TXD3"), 18562306a36Sopenharmony_ci MT7622_PIN(29, "G2_TXEN"), 18662306a36Sopenharmony_ci MT7622_PIN(30, "G2_TXC"), 18762306a36Sopenharmony_ci MT7622_PIN(31, "G2_RXD0"), 18862306a36Sopenharmony_ci MT7622_PIN(32, "G2_RXD1"), 18962306a36Sopenharmony_ci MT7622_PIN(33, "G2_RXD2"), 19062306a36Sopenharmony_ci MT7622_PIN(34, "G2_RXD3"), 19162306a36Sopenharmony_ci MT7622_PIN(35, "G2_RXDV"), 19262306a36Sopenharmony_ci MT7622_PIN(36, "G2_RXC"), 19362306a36Sopenharmony_ci MT7622_PIN(37, "NCEB"), 19462306a36Sopenharmony_ci MT7622_PIN(38, "NWEB"), 19562306a36Sopenharmony_ci MT7622_PIN(39, "NREB"), 19662306a36Sopenharmony_ci MT7622_PIN(40, "NDL4"), 19762306a36Sopenharmony_ci MT7622_PIN(41, "NDL5"), 19862306a36Sopenharmony_ci MT7622_PIN(42, "NDL6"), 19962306a36Sopenharmony_ci MT7622_PIN(43, "NDL7"), 20062306a36Sopenharmony_ci MT7622_PIN(44, "NRB"), 20162306a36Sopenharmony_ci MT7622_PIN(45, "NCLE"), 20262306a36Sopenharmony_ci MT7622_PIN(46, "NALE"), 20362306a36Sopenharmony_ci MT7622_PIN(47, "NDL0"), 20462306a36Sopenharmony_ci MT7622_PIN(48, "NDL1"), 20562306a36Sopenharmony_ci MT7622_PIN(49, "NDL2"), 20662306a36Sopenharmony_ci MT7622_PIN(50, "NDL3"), 20762306a36Sopenharmony_ci MT7622_PIN(51, "MDI_TP_P0"), 20862306a36Sopenharmony_ci MT7622_PIN(52, "MDI_TN_P0"), 20962306a36Sopenharmony_ci MT7622_PIN(53, "MDI_RP_P0"), 21062306a36Sopenharmony_ci MT7622_PIN(54, "MDI_RN_P0"), 21162306a36Sopenharmony_ci MT7622_PIN(55, "MDI_TP_P1"), 21262306a36Sopenharmony_ci MT7622_PIN(56, "MDI_TN_P1"), 21362306a36Sopenharmony_ci MT7622_PIN(57, "MDI_RP_P1"), 21462306a36Sopenharmony_ci MT7622_PIN(58, "MDI_RN_P1"), 21562306a36Sopenharmony_ci MT7622_PIN(59, "MDI_RP_P2"), 21662306a36Sopenharmony_ci MT7622_PIN(60, "MDI_RN_P2"), 21762306a36Sopenharmony_ci MT7622_PIN(61, "MDI_TP_P2"), 21862306a36Sopenharmony_ci MT7622_PIN(62, "MDI_TN_P2"), 21962306a36Sopenharmony_ci MT7622_PIN(63, "MDI_TP_P3"), 22062306a36Sopenharmony_ci MT7622_PIN(64, "MDI_TN_P3"), 22162306a36Sopenharmony_ci MT7622_PIN(65, "MDI_RP_P3"), 22262306a36Sopenharmony_ci MT7622_PIN(66, "MDI_RN_P3"), 22362306a36Sopenharmony_ci MT7622_PIN(67, "MDI_RP_P4"), 22462306a36Sopenharmony_ci MT7622_PIN(68, "MDI_RN_P4"), 22562306a36Sopenharmony_ci MT7622_PIN(69, "MDI_TP_P4"), 22662306a36Sopenharmony_ci MT7622_PIN(70, "MDI_TN_P4"), 22762306a36Sopenharmony_ci MT7622_PIN(71, "PMIC_SCL"), 22862306a36Sopenharmony_ci MT7622_PIN(72, "PMIC_SDA"), 22962306a36Sopenharmony_ci MT7622_PIN(73, "SPIC1_CLK"), 23062306a36Sopenharmony_ci MT7622_PIN(74, "SPIC1_MOSI"), 23162306a36Sopenharmony_ci MT7622_PIN(75, "SPIC1_MISO"), 23262306a36Sopenharmony_ci MT7622_PIN(76, "SPIC1_CS"), 23362306a36Sopenharmony_ci MT7622_PIN(77, "GPIO_D"), 23462306a36Sopenharmony_ci MT7622_PIN(78, "WATCHDOG"), 23562306a36Sopenharmony_ci MT7622_PIN(79, "RTS3_N"), 23662306a36Sopenharmony_ci MT7622_PIN(80, "CTS3_N"), 23762306a36Sopenharmony_ci MT7622_PIN(81, "TXD3"), 23862306a36Sopenharmony_ci MT7622_PIN(82, "RXD3"), 23962306a36Sopenharmony_ci MT7622_PIN(83, "PERST0_N"), 24062306a36Sopenharmony_ci MT7622_PIN(84, "PERST1_N"), 24162306a36Sopenharmony_ci MT7622_PIN(85, "WLED_N"), 24262306a36Sopenharmony_ci MT7622_PIN(86, "EPHY_LED0_N"), 24362306a36Sopenharmony_ci MT7622_PIN(87, "AUXIN0"), 24462306a36Sopenharmony_ci MT7622_PIN(88, "AUXIN1"), 24562306a36Sopenharmony_ci MT7622_PIN(89, "AUXIN2"), 24662306a36Sopenharmony_ci MT7622_PIN(90, "AUXIN3"), 24762306a36Sopenharmony_ci MT7622_PIN(91, "TXD4"), 24862306a36Sopenharmony_ci MT7622_PIN(92, "RXD4"), 24962306a36Sopenharmony_ci MT7622_PIN(93, "RTS4_N"), 25062306a36Sopenharmony_ci MT7622_PIN(94, "CTS4_N"), 25162306a36Sopenharmony_ci MT7622_PIN(95, "PWM1"), 25262306a36Sopenharmony_ci MT7622_PIN(96, "PWM2"), 25362306a36Sopenharmony_ci MT7622_PIN(97, "PWM3"), 25462306a36Sopenharmony_ci MT7622_PIN(98, "PWM4"), 25562306a36Sopenharmony_ci MT7622_PIN(99, "PWM5"), 25662306a36Sopenharmony_ci MT7622_PIN(100, "PWM6"), 25762306a36Sopenharmony_ci MT7622_PIN(101, "PWM7"), 25862306a36Sopenharmony_ci MT7622_PIN(102, "GPIO_E"), 25962306a36Sopenharmony_ci}; 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci/* List all groups consisting of these pins dedicated to the enablement of 26262306a36Sopenharmony_ci * certain hardware block and the corresponding mode for all of the pins. The 26362306a36Sopenharmony_ci * hardware probably has multiple combinations of these pinouts. 26462306a36Sopenharmony_ci */ 26562306a36Sopenharmony_ci 26662306a36Sopenharmony_ci/* ANTSEL */ 26762306a36Sopenharmony_cistatic int mt7622_antsel0_pins[] = { 91, }; 26862306a36Sopenharmony_cistatic int mt7622_antsel0_funcs[] = { 5, }; 26962306a36Sopenharmony_cistatic int mt7622_antsel1_pins[] = { 92, }; 27062306a36Sopenharmony_cistatic int mt7622_antsel1_funcs[] = { 5, }; 27162306a36Sopenharmony_cistatic int mt7622_antsel2_pins[] = { 93, }; 27262306a36Sopenharmony_cistatic int mt7622_antsel2_funcs[] = { 5, }; 27362306a36Sopenharmony_cistatic int mt7622_antsel3_pins[] = { 94, }; 27462306a36Sopenharmony_cistatic int mt7622_antsel3_funcs[] = { 5, }; 27562306a36Sopenharmony_cistatic int mt7622_antsel4_pins[] = { 95, }; 27662306a36Sopenharmony_cistatic int mt7622_antsel4_funcs[] = { 5, }; 27762306a36Sopenharmony_cistatic int mt7622_antsel5_pins[] = { 96, }; 27862306a36Sopenharmony_cistatic int mt7622_antsel5_funcs[] = { 5, }; 27962306a36Sopenharmony_cistatic int mt7622_antsel6_pins[] = { 97, }; 28062306a36Sopenharmony_cistatic int mt7622_antsel6_funcs[] = { 5, }; 28162306a36Sopenharmony_cistatic int mt7622_antsel7_pins[] = { 98, }; 28262306a36Sopenharmony_cistatic int mt7622_antsel7_funcs[] = { 5, }; 28362306a36Sopenharmony_cistatic int mt7622_antsel8_pins[] = { 99, }; 28462306a36Sopenharmony_cistatic int mt7622_antsel8_funcs[] = { 5, }; 28562306a36Sopenharmony_cistatic int mt7622_antsel9_pins[] = { 100, }; 28662306a36Sopenharmony_cistatic int mt7622_antsel9_funcs[] = { 5, }; 28762306a36Sopenharmony_cistatic int mt7622_antsel10_pins[] = { 101, }; 28862306a36Sopenharmony_cistatic int mt7622_antsel10_funcs[] = { 5, }; 28962306a36Sopenharmony_cistatic int mt7622_antsel11_pins[] = { 102, }; 29062306a36Sopenharmony_cistatic int mt7622_antsel11_funcs[] = { 5, }; 29162306a36Sopenharmony_cistatic int mt7622_antsel12_pins[] = { 73, }; 29262306a36Sopenharmony_cistatic int mt7622_antsel12_funcs[] = { 5, }; 29362306a36Sopenharmony_cistatic int mt7622_antsel13_pins[] = { 74, }; 29462306a36Sopenharmony_cistatic int mt7622_antsel13_funcs[] = { 5, }; 29562306a36Sopenharmony_cistatic int mt7622_antsel14_pins[] = { 75, }; 29662306a36Sopenharmony_cistatic int mt7622_antsel14_funcs[] = { 5, }; 29762306a36Sopenharmony_cistatic int mt7622_antsel15_pins[] = { 76, }; 29862306a36Sopenharmony_cistatic int mt7622_antsel15_funcs[] = { 5, }; 29962306a36Sopenharmony_cistatic int mt7622_antsel16_pins[] = { 77, }; 30062306a36Sopenharmony_cistatic int mt7622_antsel16_funcs[] = { 5, }; 30162306a36Sopenharmony_cistatic int mt7622_antsel17_pins[] = { 22, }; 30262306a36Sopenharmony_cistatic int mt7622_antsel17_funcs[] = { 5, }; 30362306a36Sopenharmony_cistatic int mt7622_antsel18_pins[] = { 79, }; 30462306a36Sopenharmony_cistatic int mt7622_antsel18_funcs[] = { 5, }; 30562306a36Sopenharmony_cistatic int mt7622_antsel19_pins[] = { 80, }; 30662306a36Sopenharmony_cistatic int mt7622_antsel19_funcs[] = { 5, }; 30762306a36Sopenharmony_cistatic int mt7622_antsel20_pins[] = { 81, }; 30862306a36Sopenharmony_cistatic int mt7622_antsel20_funcs[] = { 5, }; 30962306a36Sopenharmony_cistatic int mt7622_antsel21_pins[] = { 82, }; 31062306a36Sopenharmony_cistatic int mt7622_antsel21_funcs[] = { 5, }; 31162306a36Sopenharmony_cistatic int mt7622_antsel22_pins[] = { 14, }; 31262306a36Sopenharmony_cistatic int mt7622_antsel22_funcs[] = { 5, }; 31362306a36Sopenharmony_cistatic int mt7622_antsel23_pins[] = { 15, }; 31462306a36Sopenharmony_cistatic int mt7622_antsel23_funcs[] = { 5, }; 31562306a36Sopenharmony_cistatic int mt7622_antsel24_pins[] = { 16, }; 31662306a36Sopenharmony_cistatic int mt7622_antsel24_funcs[] = { 5, }; 31762306a36Sopenharmony_cistatic int mt7622_antsel25_pins[] = { 17, }; 31862306a36Sopenharmony_cistatic int mt7622_antsel25_funcs[] = { 5, }; 31962306a36Sopenharmony_cistatic int mt7622_antsel26_pins[] = { 18, }; 32062306a36Sopenharmony_cistatic int mt7622_antsel26_funcs[] = { 5, }; 32162306a36Sopenharmony_cistatic int mt7622_antsel27_pins[] = { 19, }; 32262306a36Sopenharmony_cistatic int mt7622_antsel27_funcs[] = { 5, }; 32362306a36Sopenharmony_cistatic int mt7622_antsel28_pins[] = { 20, }; 32462306a36Sopenharmony_cistatic int mt7622_antsel28_funcs[] = { 5, }; 32562306a36Sopenharmony_cistatic int mt7622_antsel29_pins[] = { 21, }; 32662306a36Sopenharmony_cistatic int mt7622_antsel29_funcs[] = { 5, }; 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_ci/* EMMC */ 32962306a36Sopenharmony_cistatic int mt7622_emmc_pins[] = { 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, }; 33062306a36Sopenharmony_cistatic int mt7622_emmc_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, }; 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_cistatic int mt7622_emmc_rst_pins[] = { 37, }; 33362306a36Sopenharmony_cistatic int mt7622_emmc_rst_funcs[] = { 1, }; 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci/* LED for EPHY */ 33662306a36Sopenharmony_cistatic int mt7622_ephy_leds_pins[] = { 86, 91, 92, 93, 94, }; 33762306a36Sopenharmony_cistatic int mt7622_ephy_leds_funcs[] = { 0, 0, 0, 0, 0, }; 33862306a36Sopenharmony_cistatic int mt7622_ephy0_led_pins[] = { 86, }; 33962306a36Sopenharmony_cistatic int mt7622_ephy0_led_funcs[] = { 0, }; 34062306a36Sopenharmony_cistatic int mt7622_ephy1_led_pins[] = { 91, }; 34162306a36Sopenharmony_cistatic int mt7622_ephy1_led_funcs[] = { 2, }; 34262306a36Sopenharmony_cistatic int mt7622_ephy2_led_pins[] = { 92, }; 34362306a36Sopenharmony_cistatic int mt7622_ephy2_led_funcs[] = { 2, }; 34462306a36Sopenharmony_cistatic int mt7622_ephy3_led_pins[] = { 93, }; 34562306a36Sopenharmony_cistatic int mt7622_ephy3_led_funcs[] = { 2, }; 34662306a36Sopenharmony_cistatic int mt7622_ephy4_led_pins[] = { 94, }; 34762306a36Sopenharmony_cistatic int mt7622_ephy4_led_funcs[] = { 2, }; 34862306a36Sopenharmony_ci 34962306a36Sopenharmony_ci/* Embedded Switch */ 35062306a36Sopenharmony_cistatic int mt7622_esw_pins[] = { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 35162306a36Sopenharmony_ci 62, 63, 64, 65, 66, 67, 68, 69, 70, }; 35262306a36Sopenharmony_cistatic int mt7622_esw_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35362306a36Sopenharmony_ci 0, 0, 0, 0, 0, 0, 0, 0, 0, }; 35462306a36Sopenharmony_cistatic int mt7622_esw_p0_p1_pins[] = { 51, 52, 53, 54, 55, 56, 57, 58, }; 35562306a36Sopenharmony_cistatic int mt7622_esw_p0_p1_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, }; 35662306a36Sopenharmony_cistatic int mt7622_esw_p2_p3_p4_pins[] = { 59, 60, 61, 62, 63, 64, 65, 66, 67, 35762306a36Sopenharmony_ci 68, 69, 70, }; 35862306a36Sopenharmony_cistatic int mt7622_esw_p2_p3_p4_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 35962306a36Sopenharmony_ci 0, 0, 0, }; 36062306a36Sopenharmony_ci/* RGMII via ESW */ 36162306a36Sopenharmony_cistatic int mt7622_rgmii_via_esw_pins[] = { 59, 60, 61, 62, 63, 64, 65, 66, 36262306a36Sopenharmony_ci 67, 68, 69, 70, }; 36362306a36Sopenharmony_cistatic int mt7622_rgmii_via_esw_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36462306a36Sopenharmony_ci 0, }; 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ci/* RGMII via GMAC1 */ 36762306a36Sopenharmony_cistatic int mt7622_rgmii_via_gmac1_pins[] = { 59, 60, 61, 62, 63, 64, 65, 66, 36862306a36Sopenharmony_ci 67, 68, 69, 70, }; 36962306a36Sopenharmony_cistatic int mt7622_rgmii_via_gmac1_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 37062306a36Sopenharmony_ci 2, }; 37162306a36Sopenharmony_ci 37262306a36Sopenharmony_ci/* RGMII via GMAC2 */ 37362306a36Sopenharmony_cistatic int mt7622_rgmii_via_gmac2_pins[] = { 25, 26, 27, 28, 29, 30, 31, 32, 37462306a36Sopenharmony_ci 33, 34, 35, 36, }; 37562306a36Sopenharmony_cistatic int mt7622_rgmii_via_gmac2_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37662306a36Sopenharmony_ci 0, }; 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ci/* I2C */ 37962306a36Sopenharmony_cistatic int mt7622_i2c0_pins[] = { 14, 15, }; 38062306a36Sopenharmony_cistatic int mt7622_i2c0_funcs[] = { 0, 0, }; 38162306a36Sopenharmony_cistatic int mt7622_i2c1_0_pins[] = { 55, 56, }; 38262306a36Sopenharmony_cistatic int mt7622_i2c1_0_funcs[] = { 0, 0, }; 38362306a36Sopenharmony_cistatic int mt7622_i2c1_1_pins[] = { 73, 74, }; 38462306a36Sopenharmony_cistatic int mt7622_i2c1_1_funcs[] = { 3, 3, }; 38562306a36Sopenharmony_cistatic int mt7622_i2c1_2_pins[] = { 87, 88, }; 38662306a36Sopenharmony_cistatic int mt7622_i2c1_2_funcs[] = { 0, 0, }; 38762306a36Sopenharmony_cistatic int mt7622_i2c2_0_pins[] = { 57, 58, }; 38862306a36Sopenharmony_cistatic int mt7622_i2c2_0_funcs[] = { 0, 0, }; 38962306a36Sopenharmony_cistatic int mt7622_i2c2_1_pins[] = { 75, 76, }; 39062306a36Sopenharmony_cistatic int mt7622_i2c2_1_funcs[] = { 3, 3, }; 39162306a36Sopenharmony_cistatic int mt7622_i2c2_2_pins[] = { 89, 90, }; 39262306a36Sopenharmony_cistatic int mt7622_i2c2_2_funcs[] = { 0, 0, }; 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_ci/* I2S */ 39562306a36Sopenharmony_cistatic int mt7622_i2s_in_mclk_bclk_ws_pins[] = { 3, 4, 5, }; 39662306a36Sopenharmony_cistatic int mt7622_i2s_in_mclk_bclk_ws_funcs[] = { 3, 3, 0, }; 39762306a36Sopenharmony_cistatic int mt7622_i2s1_in_data_pins[] = { 1, }; 39862306a36Sopenharmony_cistatic int mt7622_i2s1_in_data_funcs[] = { 0, }; 39962306a36Sopenharmony_cistatic int mt7622_i2s2_in_data_pins[] = { 16, }; 40062306a36Sopenharmony_cistatic int mt7622_i2s2_in_data_funcs[] = { 0, }; 40162306a36Sopenharmony_cistatic int mt7622_i2s3_in_data_pins[] = { 17, }; 40262306a36Sopenharmony_cistatic int mt7622_i2s3_in_data_funcs[] = { 0, }; 40362306a36Sopenharmony_cistatic int mt7622_i2s4_in_data_pins[] = { 18, }; 40462306a36Sopenharmony_cistatic int mt7622_i2s4_in_data_funcs[] = { 0, }; 40562306a36Sopenharmony_cistatic int mt7622_i2s_out_mclk_bclk_ws_pins[] = { 3, 4, 5, }; 40662306a36Sopenharmony_cistatic int mt7622_i2s_out_mclk_bclk_ws_funcs[] = { 0, 0, 0, }; 40762306a36Sopenharmony_cistatic int mt7622_i2s1_out_data_pins[] = { 2, }; 40862306a36Sopenharmony_cistatic int mt7622_i2s1_out_data_funcs[] = { 0, }; 40962306a36Sopenharmony_cistatic int mt7622_i2s2_out_data_pins[] = { 19, }; 41062306a36Sopenharmony_cistatic int mt7622_i2s2_out_data_funcs[] = { 0, }; 41162306a36Sopenharmony_cistatic int mt7622_i2s3_out_data_pins[] = { 20, }; 41262306a36Sopenharmony_cistatic int mt7622_i2s3_out_data_funcs[] = { 0, }; 41362306a36Sopenharmony_cistatic int mt7622_i2s4_out_data_pins[] = { 21, }; 41462306a36Sopenharmony_cistatic int mt7622_i2s4_out_data_funcs[] = { 0, }; 41562306a36Sopenharmony_ci 41662306a36Sopenharmony_ci/* IR */ 41762306a36Sopenharmony_cistatic int mt7622_ir_0_tx_pins[] = { 16, }; 41862306a36Sopenharmony_cistatic int mt7622_ir_0_tx_funcs[] = { 4, }; 41962306a36Sopenharmony_cistatic int mt7622_ir_1_tx_pins[] = { 59, }; 42062306a36Sopenharmony_cistatic int mt7622_ir_1_tx_funcs[] = { 5, }; 42162306a36Sopenharmony_cistatic int mt7622_ir_2_tx_pins[] = { 99, }; 42262306a36Sopenharmony_cistatic int mt7622_ir_2_tx_funcs[] = { 3, }; 42362306a36Sopenharmony_cistatic int mt7622_ir_0_rx_pins[] = { 17, }; 42462306a36Sopenharmony_cistatic int mt7622_ir_0_rx_funcs[] = { 4, }; 42562306a36Sopenharmony_cistatic int mt7622_ir_1_rx_pins[] = { 60, }; 42662306a36Sopenharmony_cistatic int mt7622_ir_1_rx_funcs[] = { 5, }; 42762306a36Sopenharmony_cistatic int mt7622_ir_2_rx_pins[] = { 100, }; 42862306a36Sopenharmony_cistatic int mt7622_ir_2_rx_funcs[] = { 3, }; 42962306a36Sopenharmony_ci 43062306a36Sopenharmony_ci/* MDIO */ 43162306a36Sopenharmony_cistatic int mt7622_mdc_mdio_pins[] = { 23, 24, }; 43262306a36Sopenharmony_cistatic int mt7622_mdc_mdio_funcs[] = { 0, 0, }; 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_ci/* PCIE */ 43562306a36Sopenharmony_cistatic int mt7622_pcie0_0_waken_pins[] = { 14, }; 43662306a36Sopenharmony_cistatic int mt7622_pcie0_0_waken_funcs[] = { 2, }; 43762306a36Sopenharmony_cistatic int mt7622_pcie0_0_clkreq_pins[] = { 15, }; 43862306a36Sopenharmony_cistatic int mt7622_pcie0_0_clkreq_funcs[] = { 2, }; 43962306a36Sopenharmony_cistatic int mt7622_pcie0_1_waken_pins[] = { 79, }; 44062306a36Sopenharmony_cistatic int mt7622_pcie0_1_waken_funcs[] = { 4, }; 44162306a36Sopenharmony_cistatic int mt7622_pcie0_1_clkreq_pins[] = { 80, }; 44262306a36Sopenharmony_cistatic int mt7622_pcie0_1_clkreq_funcs[] = { 4, }; 44362306a36Sopenharmony_cistatic int mt7622_pcie1_0_waken_pins[] = { 14, }; 44462306a36Sopenharmony_cistatic int mt7622_pcie1_0_waken_funcs[] = { 3, }; 44562306a36Sopenharmony_cistatic int mt7622_pcie1_0_clkreq_pins[] = { 15, }; 44662306a36Sopenharmony_cistatic int mt7622_pcie1_0_clkreq_funcs[] = { 3, }; 44762306a36Sopenharmony_ci 44862306a36Sopenharmony_cistatic int mt7622_pcie0_pad_perst_pins[] = { 83, }; 44962306a36Sopenharmony_cistatic int mt7622_pcie0_pad_perst_funcs[] = { 0, }; 45062306a36Sopenharmony_cistatic int mt7622_pcie1_pad_perst_pins[] = { 84, }; 45162306a36Sopenharmony_cistatic int mt7622_pcie1_pad_perst_funcs[] = { 0, }; 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ci/* PMIC bus */ 45462306a36Sopenharmony_cistatic int mt7622_pmic_bus_pins[] = { 71, 72, }; 45562306a36Sopenharmony_cistatic int mt7622_pmic_bus_funcs[] = { 0, 0, }; 45662306a36Sopenharmony_ci 45762306a36Sopenharmony_ci/* Parallel NAND */ 45862306a36Sopenharmony_cistatic int mt7622_pnand_pins[] = { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 45962306a36Sopenharmony_ci 48, 49, 50, }; 46062306a36Sopenharmony_cistatic int mt7622_pnand_funcs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46162306a36Sopenharmony_ci 0, }; 46262306a36Sopenharmony_ci 46362306a36Sopenharmony_ci/* PWM */ 46462306a36Sopenharmony_cistatic int mt7622_pwm_ch1_0_pins[] = { 51, }; 46562306a36Sopenharmony_cistatic int mt7622_pwm_ch1_0_funcs[] = { 3, }; 46662306a36Sopenharmony_cistatic int mt7622_pwm_ch1_1_pins[] = { 73, }; 46762306a36Sopenharmony_cistatic int mt7622_pwm_ch1_1_funcs[] = { 4, }; 46862306a36Sopenharmony_cistatic int mt7622_pwm_ch1_2_pins[] = { 95, }; 46962306a36Sopenharmony_cistatic int mt7622_pwm_ch1_2_funcs[] = { 0, }; 47062306a36Sopenharmony_cistatic int mt7622_pwm_ch2_0_pins[] = { 52, }; 47162306a36Sopenharmony_cistatic int mt7622_pwm_ch2_0_funcs[] = { 3, }; 47262306a36Sopenharmony_cistatic int mt7622_pwm_ch2_1_pins[] = { 74, }; 47362306a36Sopenharmony_cistatic int mt7622_pwm_ch2_1_funcs[] = { 4, }; 47462306a36Sopenharmony_cistatic int mt7622_pwm_ch2_2_pins[] = { 96, }; 47562306a36Sopenharmony_cistatic int mt7622_pwm_ch2_2_funcs[] = { 0, }; 47662306a36Sopenharmony_cistatic int mt7622_pwm_ch3_0_pins[] = { 53, }; 47762306a36Sopenharmony_cistatic int mt7622_pwm_ch3_0_funcs[] = { 3, }; 47862306a36Sopenharmony_cistatic int mt7622_pwm_ch3_1_pins[] = { 75, }; 47962306a36Sopenharmony_cistatic int mt7622_pwm_ch3_1_funcs[] = { 4, }; 48062306a36Sopenharmony_cistatic int mt7622_pwm_ch3_2_pins[] = { 97, }; 48162306a36Sopenharmony_cistatic int mt7622_pwm_ch3_2_funcs[] = { 0, }; 48262306a36Sopenharmony_cistatic int mt7622_pwm_ch4_0_pins[] = { 54, }; 48362306a36Sopenharmony_cistatic int mt7622_pwm_ch4_0_funcs[] = { 3, }; 48462306a36Sopenharmony_cistatic int mt7622_pwm_ch4_1_pins[] = { 67, }; 48562306a36Sopenharmony_cistatic int mt7622_pwm_ch4_1_funcs[] = { 3, }; 48662306a36Sopenharmony_cistatic int mt7622_pwm_ch4_2_pins[] = { 76, }; 48762306a36Sopenharmony_cistatic int mt7622_pwm_ch4_2_funcs[] = { 4, }; 48862306a36Sopenharmony_cistatic int mt7622_pwm_ch4_3_pins[] = { 98, }; 48962306a36Sopenharmony_cistatic int mt7622_pwm_ch4_3_funcs[] = { 0, }; 49062306a36Sopenharmony_cistatic int mt7622_pwm_ch5_0_pins[] = { 68, }; 49162306a36Sopenharmony_cistatic int mt7622_pwm_ch5_0_funcs[] = { 3, }; 49262306a36Sopenharmony_cistatic int mt7622_pwm_ch5_1_pins[] = { 77, }; 49362306a36Sopenharmony_cistatic int mt7622_pwm_ch5_1_funcs[] = { 4, }; 49462306a36Sopenharmony_cistatic int mt7622_pwm_ch5_2_pins[] = { 99, }; 49562306a36Sopenharmony_cistatic int mt7622_pwm_ch5_2_funcs[] = { 0, }; 49662306a36Sopenharmony_cistatic int mt7622_pwm_ch6_0_pins[] = { 69, }; 49762306a36Sopenharmony_cistatic int mt7622_pwm_ch6_0_funcs[] = { 3, }; 49862306a36Sopenharmony_cistatic int mt7622_pwm_ch6_1_pins[] = { 78, }; 49962306a36Sopenharmony_cistatic int mt7622_pwm_ch6_1_funcs[] = { 4, }; 50062306a36Sopenharmony_cistatic int mt7622_pwm_ch6_2_pins[] = { 81, }; 50162306a36Sopenharmony_cistatic int mt7622_pwm_ch6_2_funcs[] = { 4, }; 50262306a36Sopenharmony_cistatic int mt7622_pwm_ch6_3_pins[] = { 100, }; 50362306a36Sopenharmony_cistatic int mt7622_pwm_ch6_3_funcs[] = { 0, }; 50462306a36Sopenharmony_ci 50562306a36Sopenharmony_ci/* SD */ 50662306a36Sopenharmony_cistatic int mt7622_sd_0_pins[] = { 16, 17, 18, 19, 20, 21, }; 50762306a36Sopenharmony_cistatic int mt7622_sd_0_funcs[] = { 2, 2, 2, 2, 2, 2, }; 50862306a36Sopenharmony_cistatic int mt7622_sd_1_pins[] = { 25, 26, 27, 28, 29, 30, }; 50962306a36Sopenharmony_cistatic int mt7622_sd_1_funcs[] = { 2, 2, 2, 2, 2, 2, }; 51062306a36Sopenharmony_ci 51162306a36Sopenharmony_ci/* Serial NAND */ 51262306a36Sopenharmony_cistatic int mt7622_snfi_pins[] = { 8, 9, 10, 11, 12, 13, }; 51362306a36Sopenharmony_cistatic int mt7622_snfi_funcs[] = { 2, 2, 2, 2, 2, 2, }; 51462306a36Sopenharmony_ci 51562306a36Sopenharmony_ci/* SPI NOR */ 51662306a36Sopenharmony_cistatic int mt7622_spi_pins[] = { 8, 9, 10, 11, 12, 13 }; 51762306a36Sopenharmony_cistatic int mt7622_spi_funcs[] = { 0, 0, 0, 0, 0, 0, }; 51862306a36Sopenharmony_ci 51962306a36Sopenharmony_ci/* SPIC */ 52062306a36Sopenharmony_cistatic int mt7622_spic0_0_pins[] = { 63, 64, 65, 66, }; 52162306a36Sopenharmony_cistatic int mt7622_spic0_0_funcs[] = { 4, 4, 4, 4, }; 52262306a36Sopenharmony_cistatic int mt7622_spic0_1_pins[] = { 79, 80, 81, 82, }; 52362306a36Sopenharmony_cistatic int mt7622_spic0_1_funcs[] = { 3, 3, 3, 3, }; 52462306a36Sopenharmony_cistatic int mt7622_spic1_0_pins[] = { 67, 68, 69, 70, }; 52562306a36Sopenharmony_cistatic int mt7622_spic1_0_funcs[] = { 4, 4, 4, 4, }; 52662306a36Sopenharmony_cistatic int mt7622_spic1_1_pins[] = { 73, 74, 75, 76, }; 52762306a36Sopenharmony_cistatic int mt7622_spic1_1_funcs[] = { 0, 0, 0, 0, }; 52862306a36Sopenharmony_cistatic int mt7622_spic2_0_pins[] = { 10, 11, 12, 13, }; 52962306a36Sopenharmony_cistatic int mt7622_spic2_0_funcs[] = { 0, 0, 0, 0, }; 53062306a36Sopenharmony_cistatic int mt7622_spic2_0_wp_hold_pins[] = { 8, 9, }; 53162306a36Sopenharmony_cistatic int mt7622_spic2_0_wp_hold_funcs[] = { 0, 0, }; 53262306a36Sopenharmony_ci 53362306a36Sopenharmony_ci/* TDM */ 53462306a36Sopenharmony_cistatic int mt7622_tdm_0_out_mclk_bclk_ws_pins[] = { 8, 9, 10, }; 53562306a36Sopenharmony_cistatic int mt7622_tdm_0_out_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 53662306a36Sopenharmony_cistatic int mt7622_tdm_0_in_mclk_bclk_ws_pins[] = { 11, 12, 13, }; 53762306a36Sopenharmony_cistatic int mt7622_tdm_0_in_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 53862306a36Sopenharmony_cistatic int mt7622_tdm_0_out_data_pins[] = { 20, }; 53962306a36Sopenharmony_cistatic int mt7622_tdm_0_out_data_funcs[] = { 3, }; 54062306a36Sopenharmony_cistatic int mt7622_tdm_0_in_data_pins[] = { 21, }; 54162306a36Sopenharmony_cistatic int mt7622_tdm_0_in_data_funcs[] = { 3, }; 54262306a36Sopenharmony_cistatic int mt7622_tdm_1_out_mclk_bclk_ws_pins[] = { 57, 58, 59, }; 54362306a36Sopenharmony_cistatic int mt7622_tdm_1_out_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 54462306a36Sopenharmony_cistatic int mt7622_tdm_1_in_mclk_bclk_ws_pins[] = { 60, 61, 62, }; 54562306a36Sopenharmony_cistatic int mt7622_tdm_1_in_mclk_bclk_ws_funcs[] = { 3, 3, 3, }; 54662306a36Sopenharmony_cistatic int mt7622_tdm_1_out_data_pins[] = { 55, }; 54762306a36Sopenharmony_cistatic int mt7622_tdm_1_out_data_funcs[] = { 3, }; 54862306a36Sopenharmony_cistatic int mt7622_tdm_1_in_data_pins[] = { 56, }; 54962306a36Sopenharmony_cistatic int mt7622_tdm_1_in_data_funcs[] = { 3, }; 55062306a36Sopenharmony_ci 55162306a36Sopenharmony_ci/* UART */ 55262306a36Sopenharmony_cistatic int mt7622_uart0_0_tx_rx_pins[] = { 6, 7, }; 55362306a36Sopenharmony_cistatic int mt7622_uart0_0_tx_rx_funcs[] = { 0, 0, }; 55462306a36Sopenharmony_cistatic int mt7622_uart1_0_tx_rx_pins[] = { 55, 56, }; 55562306a36Sopenharmony_cistatic int mt7622_uart1_0_tx_rx_funcs[] = { 2, 2, }; 55662306a36Sopenharmony_cistatic int mt7622_uart1_0_rts_cts_pins[] = { 57, 58, }; 55762306a36Sopenharmony_cistatic int mt7622_uart1_0_rts_cts_funcs[] = { 2, 2, }; 55862306a36Sopenharmony_cistatic int mt7622_uart1_1_tx_rx_pins[] = { 73, 74, }; 55962306a36Sopenharmony_cistatic int mt7622_uart1_1_tx_rx_funcs[] = { 2, 2, }; 56062306a36Sopenharmony_cistatic int mt7622_uart1_1_rts_cts_pins[] = { 75, 76, }; 56162306a36Sopenharmony_cistatic int mt7622_uart1_1_rts_cts_funcs[] = { 2, 2, }; 56262306a36Sopenharmony_cistatic int mt7622_uart2_0_tx_rx_pins[] = { 3, 4, }; 56362306a36Sopenharmony_cistatic int mt7622_uart2_0_tx_rx_funcs[] = { 2, 2, }; 56462306a36Sopenharmony_cistatic int mt7622_uart2_0_rts_cts_pins[] = { 1, 2, }; 56562306a36Sopenharmony_cistatic int mt7622_uart2_0_rts_cts_funcs[] = { 2, 2, }; 56662306a36Sopenharmony_cistatic int mt7622_uart2_1_tx_rx_pins[] = { 51, 52, }; 56762306a36Sopenharmony_cistatic int mt7622_uart2_1_tx_rx_funcs[] = { 0, 0, }; 56862306a36Sopenharmony_cistatic int mt7622_uart2_1_rts_cts_pins[] = { 53, 54, }; 56962306a36Sopenharmony_cistatic int mt7622_uart2_1_rts_cts_funcs[] = { 0, 0, }; 57062306a36Sopenharmony_cistatic int mt7622_uart2_2_tx_rx_pins[] = { 59, 60, }; 57162306a36Sopenharmony_cistatic int mt7622_uart2_2_tx_rx_funcs[] = { 4, 4, }; 57262306a36Sopenharmony_cistatic int mt7622_uart2_2_rts_cts_pins[] = { 61, 62, }; 57362306a36Sopenharmony_cistatic int mt7622_uart2_2_rts_cts_funcs[] = { 4, 4, }; 57462306a36Sopenharmony_cistatic int mt7622_uart2_3_tx_rx_pins[] = { 95, 96, }; 57562306a36Sopenharmony_cistatic int mt7622_uart2_3_tx_rx_funcs[] = { 3, 3, }; 57662306a36Sopenharmony_cistatic int mt7622_uart3_0_tx_rx_pins[] = { 57, 58, }; 57762306a36Sopenharmony_cistatic int mt7622_uart3_0_tx_rx_funcs[] = { 5, 5, }; 57862306a36Sopenharmony_cistatic int mt7622_uart3_1_tx_rx_pins[] = { 81, 82, }; 57962306a36Sopenharmony_cistatic int mt7622_uart3_1_tx_rx_funcs[] = { 0, 0, }; 58062306a36Sopenharmony_cistatic int mt7622_uart3_1_rts_cts_pins[] = { 79, 80, }; 58162306a36Sopenharmony_cistatic int mt7622_uart3_1_rts_cts_funcs[] = { 0, 0, }; 58262306a36Sopenharmony_cistatic int mt7622_uart4_0_tx_rx_pins[] = { 61, 62, }; 58362306a36Sopenharmony_cistatic int mt7622_uart4_0_tx_rx_funcs[] = { 5, 5, }; 58462306a36Sopenharmony_cistatic int mt7622_uart4_1_tx_rx_pins[] = { 91, 92, }; 58562306a36Sopenharmony_cistatic int mt7622_uart4_1_tx_rx_funcs[] = { 0, 0, }; 58662306a36Sopenharmony_cistatic int mt7622_uart4_1_rts_cts_pins[] = { 93, 94 }; 58762306a36Sopenharmony_cistatic int mt7622_uart4_1_rts_cts_funcs[] = { 0, 0, }; 58862306a36Sopenharmony_cistatic int mt7622_uart4_2_tx_rx_pins[] = { 97, 98, }; 58962306a36Sopenharmony_cistatic int mt7622_uart4_2_tx_rx_funcs[] = { 2, 2, }; 59062306a36Sopenharmony_cistatic int mt7622_uart4_2_rts_cts_pins[] = { 95, 96 }; 59162306a36Sopenharmony_cistatic int mt7622_uart4_2_rts_cts_funcs[] = { 2, 2, }; 59262306a36Sopenharmony_ci 59362306a36Sopenharmony_ci/* Watchdog */ 59462306a36Sopenharmony_cistatic int mt7622_watchdog_pins[] = { 78, }; 59562306a36Sopenharmony_cistatic int mt7622_watchdog_funcs[] = { 0, }; 59662306a36Sopenharmony_ci 59762306a36Sopenharmony_ci/* WLAN LED */ 59862306a36Sopenharmony_cistatic int mt7622_wled_pins[] = { 85, }; 59962306a36Sopenharmony_cistatic int mt7622_wled_funcs[] = { 0, }; 60062306a36Sopenharmony_ci 60162306a36Sopenharmony_cistatic const struct group_desc mt7622_groups[] = { 60262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel0", mt7622_antsel0), 60362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel1", mt7622_antsel1), 60462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel2", mt7622_antsel2), 60562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel3", mt7622_antsel3), 60662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel4", mt7622_antsel4), 60762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel5", mt7622_antsel5), 60862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel6", mt7622_antsel6), 60962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel7", mt7622_antsel7), 61062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel8", mt7622_antsel8), 61162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel9", mt7622_antsel9), 61262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel10", mt7622_antsel10), 61362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel11", mt7622_antsel11), 61462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel12", mt7622_antsel12), 61562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel13", mt7622_antsel13), 61662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel14", mt7622_antsel14), 61762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel15", mt7622_antsel15), 61862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel16", mt7622_antsel16), 61962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel17", mt7622_antsel17), 62062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel18", mt7622_antsel18), 62162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel19", mt7622_antsel19), 62262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel20", mt7622_antsel20), 62362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel21", mt7622_antsel21), 62462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel22", mt7622_antsel22), 62562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel23", mt7622_antsel23), 62662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel24", mt7622_antsel24), 62762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel25", mt7622_antsel25), 62862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel26", mt7622_antsel26), 62962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel27", mt7622_antsel27), 63062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel28", mt7622_antsel28), 63162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("antsel29", mt7622_antsel29), 63262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("emmc", mt7622_emmc), 63362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("emmc_rst", mt7622_emmc_rst), 63462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ephy_leds", mt7622_ephy_leds), 63562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ephy0_led", mt7622_ephy0_led), 63662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ephy1_led", mt7622_ephy1_led), 63762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ephy2_led", mt7622_ephy2_led), 63862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ephy3_led", mt7622_ephy3_led), 63962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ephy4_led", mt7622_ephy4_led), 64062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("esw", mt7622_esw), 64162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("esw_p0_p1", mt7622_esw_p0_p1), 64262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("esw_p2_p3_p4", mt7622_esw_p2_p3_p4), 64362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("rgmii_via_esw", mt7622_rgmii_via_esw), 64462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("rgmii_via_gmac1", mt7622_rgmii_via_gmac1), 64562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("rgmii_via_gmac2", mt7622_rgmii_via_gmac2), 64662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2c0", mt7622_i2c0), 64762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2c1_0", mt7622_i2c1_0), 64862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2c1_1", mt7622_i2c1_1), 64962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2c1_2", mt7622_i2c1_2), 65062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2c2_0", mt7622_i2c2_0), 65162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2c2_1", mt7622_i2c2_1), 65262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2c2_2", mt7622_i2c2_2), 65362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s_out_mclk_bclk_ws", mt7622_i2s_out_mclk_bclk_ws), 65462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s_in_mclk_bclk_ws", mt7622_i2s_in_mclk_bclk_ws), 65562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s1_in_data", mt7622_i2s1_in_data), 65662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s2_in_data", mt7622_i2s2_in_data), 65762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s3_in_data", mt7622_i2s3_in_data), 65862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s4_in_data", mt7622_i2s4_in_data), 65962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s1_out_data", mt7622_i2s1_out_data), 66062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s2_out_data", mt7622_i2s2_out_data), 66162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s3_out_data", mt7622_i2s3_out_data), 66262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("i2s4_out_data", mt7622_i2s4_out_data), 66362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ir_0_tx", mt7622_ir_0_tx), 66462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ir_1_tx", mt7622_ir_1_tx), 66562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ir_2_tx", mt7622_ir_2_tx), 66662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ir_0_rx", mt7622_ir_0_rx), 66762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ir_1_rx", mt7622_ir_1_rx), 66862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("ir_2_rx", mt7622_ir_2_rx), 66962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("mdc_mdio", mt7622_mdc_mdio), 67062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie0_0_waken", mt7622_pcie0_0_waken), 67162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie0_0_clkreq", mt7622_pcie0_0_clkreq), 67262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie0_1_waken", mt7622_pcie0_1_waken), 67362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie0_1_clkreq", mt7622_pcie0_1_clkreq), 67462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie1_0_waken", mt7622_pcie1_0_waken), 67562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie1_0_clkreq", mt7622_pcie1_0_clkreq), 67662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie0_pad_perst", mt7622_pcie0_pad_perst), 67762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pcie1_pad_perst", mt7622_pcie1_pad_perst), 67862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("par_nand", mt7622_pnand), 67962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pmic_bus", mt7622_pmic_bus), 68062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch1_0", mt7622_pwm_ch1_0), 68162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch1_1", mt7622_pwm_ch1_1), 68262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch1_2", mt7622_pwm_ch1_2), 68362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch2_0", mt7622_pwm_ch2_0), 68462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch2_1", mt7622_pwm_ch2_1), 68562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch2_2", mt7622_pwm_ch2_2), 68662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch3_0", mt7622_pwm_ch3_0), 68762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch3_1", mt7622_pwm_ch3_1), 68862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch3_2", mt7622_pwm_ch3_2), 68962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch4_0", mt7622_pwm_ch4_0), 69062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch4_1", mt7622_pwm_ch4_1), 69162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch4_2", mt7622_pwm_ch4_2), 69262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch4_3", mt7622_pwm_ch4_3), 69362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch5_0", mt7622_pwm_ch5_0), 69462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch5_1", mt7622_pwm_ch5_1), 69562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch5_2", mt7622_pwm_ch5_2), 69662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch6_0", mt7622_pwm_ch6_0), 69762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch6_1", mt7622_pwm_ch6_1), 69862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch6_2", mt7622_pwm_ch6_2), 69962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("pwm_ch6_3", mt7622_pwm_ch6_3), 70062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("sd_0", mt7622_sd_0), 70162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("sd_1", mt7622_sd_1), 70262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("snfi", mt7622_snfi), 70362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("spi_nor", mt7622_spi), 70462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("spic0_0", mt7622_spic0_0), 70562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("spic0_1", mt7622_spic0_1), 70662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("spic1_0", mt7622_spic1_0), 70762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("spic1_1", mt7622_spic1_1), 70862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("spic2_0", mt7622_spic2_0), 70962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("spic2_0_wp_hold", mt7622_spic2_0_wp_hold), 71062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_0_out_mclk_bclk_ws", 71162306a36Sopenharmony_ci mt7622_tdm_0_out_mclk_bclk_ws), 71262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_0_in_mclk_bclk_ws", 71362306a36Sopenharmony_ci mt7622_tdm_0_in_mclk_bclk_ws), 71462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_0_out_data", mt7622_tdm_0_out_data), 71562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_0_in_data", mt7622_tdm_0_in_data), 71662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_1_out_mclk_bclk_ws", 71762306a36Sopenharmony_ci mt7622_tdm_1_out_mclk_bclk_ws), 71862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_1_in_mclk_bclk_ws", 71962306a36Sopenharmony_ci mt7622_tdm_1_in_mclk_bclk_ws), 72062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_1_out_data", mt7622_tdm_1_out_data), 72162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("tdm_1_in_data", mt7622_tdm_1_in_data), 72262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart0_0_tx_rx", mt7622_uart0_0_tx_rx), 72362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart1_0_tx_rx", mt7622_uart1_0_tx_rx), 72462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart1_0_rts_cts", mt7622_uart1_0_rts_cts), 72562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart1_1_tx_rx", mt7622_uart1_1_tx_rx), 72662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart1_1_rts_cts", mt7622_uart1_1_rts_cts), 72762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart2_0_tx_rx", mt7622_uart2_0_tx_rx), 72862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart2_0_rts_cts", mt7622_uart2_0_rts_cts), 72962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart2_1_tx_rx", mt7622_uart2_1_tx_rx), 73062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart2_1_rts_cts", mt7622_uart2_1_rts_cts), 73162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart2_2_tx_rx", mt7622_uart2_2_tx_rx), 73262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart2_2_rts_cts", mt7622_uart2_2_rts_cts), 73362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart2_3_tx_rx", mt7622_uart2_3_tx_rx), 73462306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart3_0_tx_rx", mt7622_uart3_0_tx_rx), 73562306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart3_1_tx_rx", mt7622_uart3_1_tx_rx), 73662306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart3_1_rts_cts", mt7622_uart3_1_rts_cts), 73762306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart4_0_tx_rx", mt7622_uart4_0_tx_rx), 73862306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart4_1_tx_rx", mt7622_uart4_1_tx_rx), 73962306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart4_1_rts_cts", mt7622_uart4_1_rts_cts), 74062306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart4_2_tx_rx", mt7622_uart4_2_tx_rx), 74162306a36Sopenharmony_ci PINCTRL_PIN_GROUP("uart4_2_rts_cts", mt7622_uart4_2_rts_cts), 74262306a36Sopenharmony_ci PINCTRL_PIN_GROUP("watchdog", mt7622_watchdog), 74362306a36Sopenharmony_ci PINCTRL_PIN_GROUP("wled", mt7622_wled), 74462306a36Sopenharmony_ci}; 74562306a36Sopenharmony_ci 74662306a36Sopenharmony_ci/* Joint those groups owning the same capability in user point of view which 74762306a36Sopenharmony_ci * allows that people tend to use through the device tree. 74862306a36Sopenharmony_ci */ 74962306a36Sopenharmony_cistatic const char *mt7622_antsel_groups[] = { "antsel0", "antsel1", "antsel2", 75062306a36Sopenharmony_ci "antsel3", "antsel4", "antsel5", 75162306a36Sopenharmony_ci "antsel6", "antsel7", "antsel8", 75262306a36Sopenharmony_ci "antsel9", "antsel10", "antsel11", 75362306a36Sopenharmony_ci "antsel12", "antsel13", "antsel14", 75462306a36Sopenharmony_ci "antsel15", "antsel16", "antsel17", 75562306a36Sopenharmony_ci "antsel18", "antsel19", "antsel20", 75662306a36Sopenharmony_ci "antsel21", "antsel22", "antsel23", 75762306a36Sopenharmony_ci "antsel24", "antsel25", "antsel26", 75862306a36Sopenharmony_ci "antsel27", "antsel28", "antsel29",}; 75962306a36Sopenharmony_cistatic const char *mt7622_emmc_groups[] = { "emmc", "emmc_rst", }; 76062306a36Sopenharmony_cistatic const char *mt7622_ethernet_groups[] = { "esw", "esw_p0_p1", 76162306a36Sopenharmony_ci "esw_p2_p3_p4", "mdc_mdio", 76262306a36Sopenharmony_ci "rgmii_via_gmac1", 76362306a36Sopenharmony_ci "rgmii_via_gmac2", 76462306a36Sopenharmony_ci "rgmii_via_esw", }; 76562306a36Sopenharmony_cistatic const char *mt7622_i2c_groups[] = { "i2c0", "i2c1_0", "i2c1_1", 76662306a36Sopenharmony_ci "i2c1_2", "i2c2_0", "i2c2_1", 76762306a36Sopenharmony_ci "i2c2_2", }; 76862306a36Sopenharmony_cistatic const char *mt7622_i2s_groups[] = { "i2s_out_mclk_bclk_ws", 76962306a36Sopenharmony_ci "i2s_in_mclk_bclk_ws", 77062306a36Sopenharmony_ci "i2s1_in_data", "i2s2_in_data", 77162306a36Sopenharmony_ci "i2s3_in_data", "i2s4_in_data", 77262306a36Sopenharmony_ci "i2s1_out_data", "i2s2_out_data", 77362306a36Sopenharmony_ci "i2s3_out_data", "i2s4_out_data", }; 77462306a36Sopenharmony_cistatic const char *mt7622_ir_groups[] = { "ir_0_tx", "ir_1_tx", "ir_2_tx", 77562306a36Sopenharmony_ci "ir_0_rx", "ir_1_rx", "ir_2_rx"}; 77662306a36Sopenharmony_cistatic const char *mt7622_led_groups[] = { "ephy_leds", "ephy0_led", 77762306a36Sopenharmony_ci "ephy1_led", "ephy2_led", 77862306a36Sopenharmony_ci "ephy3_led", "ephy4_led", 77962306a36Sopenharmony_ci "wled", }; 78062306a36Sopenharmony_cistatic const char *mt7622_flash_groups[] = { "par_nand", "snfi", "spi_nor"}; 78162306a36Sopenharmony_cistatic const char *mt7622_pcie_groups[] = { "pcie0_0_waken", "pcie0_0_clkreq", 78262306a36Sopenharmony_ci "pcie0_1_waken", "pcie0_1_clkreq", 78362306a36Sopenharmony_ci "pcie1_0_waken", "pcie1_0_clkreq", 78462306a36Sopenharmony_ci "pcie0_pad_perst", 78562306a36Sopenharmony_ci "pcie1_pad_perst", }; 78662306a36Sopenharmony_cistatic const char *mt7622_pmic_bus_groups[] = { "pmic_bus", }; 78762306a36Sopenharmony_cistatic const char *mt7622_pwm_groups[] = { "pwm_ch1_0", "pwm_ch1_1", 78862306a36Sopenharmony_ci "pwm_ch1_2", "pwm_ch2_0", 78962306a36Sopenharmony_ci "pwm_ch2_1", "pwm_ch2_2", 79062306a36Sopenharmony_ci "pwm_ch3_0", "pwm_ch3_1", 79162306a36Sopenharmony_ci "pwm_ch3_2", "pwm_ch4_0", 79262306a36Sopenharmony_ci "pwm_ch4_1", "pwm_ch4_2", 79362306a36Sopenharmony_ci "pwm_ch4_3", "pwm_ch5_0", 79462306a36Sopenharmony_ci "pwm_ch5_1", "pwm_ch5_2", 79562306a36Sopenharmony_ci "pwm_ch6_0", "pwm_ch6_1", 79662306a36Sopenharmony_ci "pwm_ch6_2", "pwm_ch6_3", }; 79762306a36Sopenharmony_cistatic const char *mt7622_sd_groups[] = { "sd_0", "sd_1", }; 79862306a36Sopenharmony_cistatic const char *mt7622_spic_groups[] = { "spic0_0", "spic0_1", "spic1_0", 79962306a36Sopenharmony_ci "spic1_1", "spic2_0", 80062306a36Sopenharmony_ci "spic2_0_wp_hold", }; 80162306a36Sopenharmony_cistatic const char *mt7622_tdm_groups[] = { "tdm_0_out_mclk_bclk_ws", 80262306a36Sopenharmony_ci "tdm_0_in_mclk_bclk_ws", 80362306a36Sopenharmony_ci "tdm_0_out_data", 80462306a36Sopenharmony_ci "tdm_0_in_data", 80562306a36Sopenharmony_ci "tdm_1_out_mclk_bclk_ws", 80662306a36Sopenharmony_ci "tdm_1_in_mclk_bclk_ws", 80762306a36Sopenharmony_ci "tdm_1_out_data", 80862306a36Sopenharmony_ci "tdm_1_in_data", }; 80962306a36Sopenharmony_ci 81062306a36Sopenharmony_cistatic const char *mt7622_uart_groups[] = { "uart0_0_tx_rx", 81162306a36Sopenharmony_ci "uart1_0_tx_rx", "uart1_0_rts_cts", 81262306a36Sopenharmony_ci "uart1_1_tx_rx", "uart1_1_rts_cts", 81362306a36Sopenharmony_ci "uart2_0_tx_rx", "uart2_0_rts_cts", 81462306a36Sopenharmony_ci "uart2_1_tx_rx", "uart2_1_rts_cts", 81562306a36Sopenharmony_ci "uart2_2_tx_rx", "uart2_2_rts_cts", 81662306a36Sopenharmony_ci "uart2_3_tx_rx", 81762306a36Sopenharmony_ci "uart3_0_tx_rx", 81862306a36Sopenharmony_ci "uart3_1_tx_rx", "uart3_1_rts_cts", 81962306a36Sopenharmony_ci "uart4_0_tx_rx", 82062306a36Sopenharmony_ci "uart4_1_tx_rx", "uart4_1_rts_cts", 82162306a36Sopenharmony_ci "uart4_2_tx_rx", 82262306a36Sopenharmony_ci "uart4_2_rts_cts",}; 82362306a36Sopenharmony_cistatic const char *mt7622_wdt_groups[] = { "watchdog", }; 82462306a36Sopenharmony_ci 82562306a36Sopenharmony_cistatic const struct function_desc mt7622_functions[] = { 82662306a36Sopenharmony_ci {"antsel", mt7622_antsel_groups, ARRAY_SIZE(mt7622_antsel_groups)}, 82762306a36Sopenharmony_ci {"emmc", mt7622_emmc_groups, ARRAY_SIZE(mt7622_emmc_groups)}, 82862306a36Sopenharmony_ci {"eth", mt7622_ethernet_groups, ARRAY_SIZE(mt7622_ethernet_groups)}, 82962306a36Sopenharmony_ci {"i2c", mt7622_i2c_groups, ARRAY_SIZE(mt7622_i2c_groups)}, 83062306a36Sopenharmony_ci {"i2s", mt7622_i2s_groups, ARRAY_SIZE(mt7622_i2s_groups)}, 83162306a36Sopenharmony_ci {"ir", mt7622_ir_groups, ARRAY_SIZE(mt7622_ir_groups)}, 83262306a36Sopenharmony_ci {"led", mt7622_led_groups, ARRAY_SIZE(mt7622_led_groups)}, 83362306a36Sopenharmony_ci {"flash", mt7622_flash_groups, ARRAY_SIZE(mt7622_flash_groups)}, 83462306a36Sopenharmony_ci {"pcie", mt7622_pcie_groups, ARRAY_SIZE(mt7622_pcie_groups)}, 83562306a36Sopenharmony_ci {"pmic", mt7622_pmic_bus_groups, ARRAY_SIZE(mt7622_pmic_bus_groups)}, 83662306a36Sopenharmony_ci {"pwm", mt7622_pwm_groups, ARRAY_SIZE(mt7622_pwm_groups)}, 83762306a36Sopenharmony_ci {"sd", mt7622_sd_groups, ARRAY_SIZE(mt7622_sd_groups)}, 83862306a36Sopenharmony_ci {"spi", mt7622_spic_groups, ARRAY_SIZE(mt7622_spic_groups)}, 83962306a36Sopenharmony_ci {"tdm", mt7622_tdm_groups, ARRAY_SIZE(mt7622_tdm_groups)}, 84062306a36Sopenharmony_ci {"uart", mt7622_uart_groups, ARRAY_SIZE(mt7622_uart_groups)}, 84162306a36Sopenharmony_ci {"watchdog", mt7622_wdt_groups, ARRAY_SIZE(mt7622_wdt_groups)}, 84262306a36Sopenharmony_ci}; 84362306a36Sopenharmony_ci 84462306a36Sopenharmony_cistatic const struct mtk_eint_hw mt7622_eint_hw = { 84562306a36Sopenharmony_ci .port_mask = 7, 84662306a36Sopenharmony_ci .ports = 7, 84762306a36Sopenharmony_ci .ap_num = ARRAY_SIZE(mt7622_pins), 84862306a36Sopenharmony_ci .db_cnt = 20, 84962306a36Sopenharmony_ci .db_time = debounce_time_mt6765, 85062306a36Sopenharmony_ci}; 85162306a36Sopenharmony_ci 85262306a36Sopenharmony_cistatic const struct mtk_pin_soc mt7622_data = { 85362306a36Sopenharmony_ci .reg_cal = mt7622_reg_cals, 85462306a36Sopenharmony_ci .pins = mt7622_pins, 85562306a36Sopenharmony_ci .npins = ARRAY_SIZE(mt7622_pins), 85662306a36Sopenharmony_ci .grps = mt7622_groups, 85762306a36Sopenharmony_ci .ngrps = ARRAY_SIZE(mt7622_groups), 85862306a36Sopenharmony_ci .funcs = mt7622_functions, 85962306a36Sopenharmony_ci .nfuncs = ARRAY_SIZE(mt7622_functions), 86062306a36Sopenharmony_ci .eint_hw = &mt7622_eint_hw, 86162306a36Sopenharmony_ci .gpio_m = 1, 86262306a36Sopenharmony_ci .ies_present = false, 86362306a36Sopenharmony_ci .base_names = mtk_default_register_base_names, 86462306a36Sopenharmony_ci .nbase_names = ARRAY_SIZE(mtk_default_register_base_names), 86562306a36Sopenharmony_ci .bias_disable_set = mtk_pinconf_bias_disable_set, 86662306a36Sopenharmony_ci .bias_disable_get = mtk_pinconf_bias_disable_get, 86762306a36Sopenharmony_ci .bias_set = mtk_pinconf_bias_set, 86862306a36Sopenharmony_ci .bias_get = mtk_pinconf_bias_get, 86962306a36Sopenharmony_ci .drive_set = mtk_pinconf_drive_set, 87062306a36Sopenharmony_ci .drive_get = mtk_pinconf_drive_get, 87162306a36Sopenharmony_ci}; 87262306a36Sopenharmony_ci 87362306a36Sopenharmony_cistatic const struct of_device_id mt7622_pinctrl_of_match[] = { 87462306a36Sopenharmony_ci { .compatible = "mediatek,mt7622-pinctrl", }, 87562306a36Sopenharmony_ci { } 87662306a36Sopenharmony_ci}; 87762306a36Sopenharmony_ci 87862306a36Sopenharmony_cistatic int mt7622_pinctrl_probe(struct platform_device *pdev) 87962306a36Sopenharmony_ci{ 88062306a36Sopenharmony_ci return mtk_moore_pinctrl_probe(pdev, &mt7622_data); 88162306a36Sopenharmony_ci} 88262306a36Sopenharmony_ci 88362306a36Sopenharmony_cistatic struct platform_driver mt7622_pinctrl_driver = { 88462306a36Sopenharmony_ci .driver = { 88562306a36Sopenharmony_ci .name = "mt7622-pinctrl", 88662306a36Sopenharmony_ci .of_match_table = mt7622_pinctrl_of_match, 88762306a36Sopenharmony_ci }, 88862306a36Sopenharmony_ci .probe = mt7622_pinctrl_probe, 88962306a36Sopenharmony_ci}; 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_cistatic int __init mt7622_pinctrl_init(void) 89262306a36Sopenharmony_ci{ 89362306a36Sopenharmony_ci return platform_driver_register(&mt7622_pinctrl_driver); 89462306a36Sopenharmony_ci} 89562306a36Sopenharmony_ciarch_initcall(mt7622_pinctrl_init); 896