mediatek: sync pinctrl-mt7981 and pinctrl-mt7986 drivers
Now that new pinconf features have been backported sync pinctrl-mt7981 and pinctrl-m7986 with bleeding-edge upstream versions. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
3cb2fddd30
commit
f4f8c0e8de
|
@ -436,6 +436,60 @@ static const struct mtk_pin_field_calc mt7981_pin_r1_range[] = {
|
|||
PIN_FIELD_BASE(39, 39, 3, 0x40, 0x10, 1, 1),
|
||||
};
|
||||
|
||||
static const unsigned int mt7981_pull_type[] = {
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*0*/ MTK_PULL_PUPD_R1R0_TYPE,/*1*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*2*/ MTK_PULL_PUPD_R1R0_TYPE,/*3*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*4*/ MTK_PULL_PUPD_R1R0_TYPE,/*5*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*6*/ MTK_PULL_PUPD_R1R0_TYPE,/*7*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*8*/ MTK_PULL_PUPD_R1R0_TYPE,/*9*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*10*/ MTK_PULL_PUPD_R1R0_TYPE,/*11*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*12*/ MTK_PULL_PUPD_R1R0_TYPE,/*13*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*14*/ MTK_PULL_PUPD_R1R0_TYPE,/*15*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*16*/ MTK_PULL_PUPD_R1R0_TYPE,/*17*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*18*/ MTK_PULL_PUPD_R1R0_TYPE,/*19*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*20*/ MTK_PULL_PUPD_R1R0_TYPE,/*21*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*22*/ MTK_PULL_PUPD_R1R0_T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TK_PULL_PUPD_R1R0_TYPE,/*56*/ MTK_PULL_PUPD_R1R0_TYPE,/*57*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*58*/ MTK_PULL_PUPD_R1R0_TYPE,/*59*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*60*/ MTK_PULL_PUPD_R1R0_TYPE,/*61*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*62*/ MTK_PULL_PUPD_R1R0_TYPE,/*63*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*64*/ MTK_PULL_PUPD_R1R0_TYPE,/*65*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*66*/ MTK_PULL_PUPD_R1R0_TYPE,/*67*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*68*/ MTK_PULL_PU_PD_TYPE,/*69*/
|
||||
MTK_PULL_PU_PD_TYPE,/*70*/ MTK_PULL_PU_PD_TYPE,/*71*/
|
||||
MTK_PULL_PU_PD_TYPE,/*72*/ MTK_PULL_PU_PD_TYPE,/*73*/
|
||||
MTK_PULL_PU_PD_TYPE,/*74*/ MTK_PULL_PU_PD_TYPE,/*75*/
|
||||
MTK_PULL_PU_PD_TYPE,/*76*/ MTK_PULL_PU_PD_TYPE,/*77*/
|
||||
MTK_PULL_PU_PD_TYPE,/*78*/ MTK_PULL_PU_PD_TYPE,/*79*/
|
||||
MTK_PULL_PU_PD_TYPE,/*80*/ MTK_PULL_PU_PD_TYPE,/*81*/
|
||||
MTK_PULL_PU_PD_TYPE,/*82*/ MTK_PULL_PU_PD_TYPE,/*83*/
|
||||
MTK_PULL_PU_PD_TYPE,/*84*/ MTK_PULL_PU_PD_TYPE,/*85*/
|
||||
MTK_PULL_PU_PD_TYPE,/*86*/ MTK_PULL_PU_PD_TYPE,/*87*/
|
||||
MTK_PULL_PU_PD_TYPE,/*88*/ MTK_PULL_PU_PD_TYPE,/*89*/
|
||||
MTK_PULL_PU_PD_TYPE,/*90*/ MTK_PULL_PU_PD_TYPE,/*91*/
|
||||
MTK_PULL_PU_PD_TYPE,/*92*/ MTK_PULL_PU_PD_TYPE,/*93*/
|
||||
MTK_PULL_PU_PD_TYPE,/*94*/ MTK_PULL_PU_PD_TYPE,/*95*/
|
||||
MTK_PULL_PU_PD_TYPE,/*96*/ MTK_PULL_PU_PD_TYPE,/*97*/
|
||||
MTK_PULL_PU_PD_TYPE,/*98*/ MTK_PULL_PU_PD_TYPE,/*99*/
|
||||
MTK_PULL_PU_PD_TYPE,/*100*/
|
||||
};
|
||||
|
||||
static const struct mtk_pin_reg_calc mt7981_reg_cals[] = {
|
||||
[PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt7981_pin_mode_range),
|
||||
[PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt7981_pin_dir_range),
|
||||
|
@ -960,6 +1014,7 @@ static struct mtk_pin_soc mt7981_data = {
|
|||
.ies_present = false,
|
||||
.base_names = mt7981_pinctrl_register_base_names,
|
||||
.nbase_names = ARRAY_SIZE(mt7981_pinctrl_register_base_names),
|
||||
.pull_type = mt7981_pull_type,
|
||||
.bias_set_combo = mtk_pinconf_bias_set_combo,
|
||||
.bias_get_combo = mtk_pinconf_bias_get_combo,
|
||||
.drive_set = mtk_pinconf_drive_set_rev1,
|
||||
|
|
|
@ -316,10 +316,10 @@ static const struct mtk_pin_field_calc mt7986_pin_pupd_range[] = {
|
|||
PIN_FIELD_BASE(38, 38, IOCFG_LT_BASE, 0x30, 0x10, 9, 1),
|
||||
PIN_FIELD_BASE(39, 40, IOCFG_RB_BASE, 0x60, 0x10, 18, 1),
|
||||
PIN_FIELD_BASE(41, 41, IOCFG_RB_BASE, 0x60, 0x10, 12, 1),
|
||||
PIN_FIELD_BASE(42, 43, IOCFG_RB_BASE, 0x60, 0x10, 22, 1),
|
||||
PIN_FIELD_BASE(44, 45, IOCFG_RB_BASE, 0x60, 0x10, 20, 1),
|
||||
PIN_FIELD_BASE(46, 47, IOCFG_RB_BASE, 0x60, 0x10, 26, 1),
|
||||
PIN_FIELD_BASE(48, 49, IOCFG_RB_BASE, 0x60, 0x10, 24, 1),
|
||||
PIN_FIELD_BASE(42, 43, IOCFG_RB_BASE, 0x60, 0x10, 23, 1),
|
||||
PIN_FIELD_BASE(44, 45, IOCFG_RB_BASE, 0x60, 0x10, 21, 1),
|
||||
PIN_FIELD_BASE(46, 47, IOCFG_RB_BASE, 0x60, 0x10, 27, 1),
|
||||
PIN_FIELD_BASE(48, 49, IOCFG_RB_BASE, 0x60, 0x10, 25, 1),
|
||||
PIN_FIELD_BASE(50, 57, IOCFG_RT_BASE, 0x40, 0x10, 2, 1),
|
||||
PIN_FIELD_BASE(58, 58, IOCFG_RT_BASE, 0x40, 0x10, 1, 1),
|
||||
PIN_FIELD_BASE(59, 59, IOCFG_RT_BASE, 0x40, 0x10, 0, 1),
|
||||
|
@ -354,10 +354,10 @@ static const struct mtk_pin_field_calc mt7986_pin_r0_range[] = {
|
|||
PIN_FIELD_BASE(38, 38, IOCFG_LT_BASE, 0x40, 0x10, 9, 1),
|
||||
PIN_FIELD_BASE(39, 40, IOCFG_RB_BASE, 0x70, 0x10, 18, 1),
|
||||
PIN_FIELD_BASE(41, 41, IOCFG_RB_BASE, 0x70, 0x10, 12, 1),
|
||||
PIN_FIELD_BASE(42, 43, IOCFG_RB_BASE, 0x70, 0x10, 22, 1),
|
||||
PIN_FIELD_BASE(44, 45, IOCFG_RB_BASE, 0x70, 0x10, 20, 1),
|
||||
PIN_FIELD_BASE(46, 47, IOCFG_RB_BASE, 0x70, 0x10, 26, 1),
|
||||
PIN_FIELD_BASE(48, 49, IOCFG_RB_BASE, 0x70, 0x10, 24, 1),
|
||||
PIN_FIELD_BASE(42, 43, IOCFG_RB_BASE, 0x70, 0x10, 23, 1),
|
||||
PIN_FIELD_BASE(44, 45, IOCFG_RB_BASE, 0x70, 0x10, 21, 1),
|
||||
PIN_FIELD_BASE(46, 47, IOCFG_RB_BASE, 0x70, 0x10, 27, 1),
|
||||
PIN_FIELD_BASE(48, 49, IOCFG_RB_BASE, 0x70, 0x10, 25, 1),
|
||||
PIN_FIELD_BASE(50, 57, IOCFG_RT_BASE, 0x50, 0x10, 2, 1),
|
||||
PIN_FIELD_BASE(58, 58, IOCFG_RT_BASE, 0x50, 0x10, 1, 1),
|
||||
PIN_FIELD_BASE(59, 59, IOCFG_RT_BASE, 0x50, 0x10, 0, 1),
|
||||
|
@ -392,10 +392,10 @@ static const struct mtk_pin_field_calc mt7986_pin_r1_range[] = {
|
|||
PIN_FIELD_BASE(38, 38, IOCFG_LT_BASE, 0x50, 0x10, 9, 1),
|
||||
PIN_FIELD_BASE(39, 40, IOCFG_RB_BASE, 0x80, 0x10, 18, 1),
|
||||
PIN_FIELD_BASE(41, 41, IOCFG_RB_BASE, 0x80, 0x10, 12, 1),
|
||||
PIN_FIELD_BASE(42, 43, IOCFG_RB_BASE, 0x80, 0x10, 22, 1),
|
||||
PIN_FIELD_BASE(44, 45, IOCFG_RB_BASE, 0x80, 0x10, 20, 1),
|
||||
PIN_FIELD_BASE(46, 47, IOCFG_RB_BASE, 0x80, 0x10, 26, 1),
|
||||
PIN_FIELD_BASE(48, 49, IOCFG_RB_BASE, 0x80, 0x10, 24, 1),
|
||||
PIN_FIELD_BASE(42, 43, IOCFG_RB_BASE, 0x80, 0x10, 23, 1),
|
||||
PIN_FIELD_BASE(44, 45, IOCFG_RB_BASE, 0x80, 0x10, 21, 1),
|
||||
PIN_FIELD_BASE(46, 47, IOCFG_RB_BASE, 0x80, 0x10, 27, 1),
|
||||
PIN_FIELD_BASE(48, 49, IOCFG_RB_BASE, 0x80, 0x10, 25, 1),
|
||||
PIN_FIELD_BASE(50, 57, IOCFG_RT_BASE, 0x60, 0x10, 2, 1),
|
||||
PIN_FIELD_BASE(58, 58, IOCFG_RT_BASE, 0x60, 0x10, 1, 1),
|
||||
PIN_FIELD_BASE(59, 59, IOCFG_RT_BASE, 0x60, 0x10, 0, 1),
|
||||
|
@ -407,6 +407,60 @@ static const struct mtk_pin_field_calc mt7986_pin_r1_range[] = {
|
|||
PIN_FIELD_BASE(66, 68, IOCFG_LB_BASE, 0x60, 0x10, 2, 1),
|
||||
};
|
||||
|
||||
static const unsigned int mt7986_pull_type[] = {
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*0*/ MTK_PULL_PUPD_R1R0_TYPE,/*1*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*2*/ MTK_PULL_PUPD_R1R0_TYPE,/*3*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*4*/ MTK_PULL_PUPD_R1R0_TYPE,/*5*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*6*/ MTK_PULL_PUPD_R1R0_TYPE,/*7*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*8*/ MTK_PULL_PUPD_R1R0_TYPE,/*9*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*10*/ MTK_PULL_PUPD_R1R0_TYPE,/*11*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*12*/ MTK_PULL_PUPD_R1R0_TYPE,/*13*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*14*/ MTK_PULL_PUPD_R1R0_TYPE,/*15*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*16*/ MTK_PULL_PUPD_R1R0_TYPE,/*17*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*18*/ MTK_PULL_PUPD_R1R0_TYPE,/*19*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*20*/ MTK_PULL_PUPD_R1R0_TYPE,/*21*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*22*/ MTK_PULL_PUPD_R1R0_TYPE,/*23*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*24*/ MTK_PULL_PUPD_R1R0_TYPE,/*25*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*26*/ MTK_PULL_PUPD_R1R0_TYPE,/*27*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE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UPD_R1R0_TYPE,/*61*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*62*/ MTK_PULL_PUPD_R1R0_TYPE,/*63*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*64*/ MTK_PULL_PUPD_R1R0_TYPE,/*65*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*66*/ MTK_PULL_PUPD_R1R0_TYPE,/*67*/
|
||||
MTK_PULL_PUPD_R1R0_TYPE,/*68*/ MTK_PULL_PU_PD_TYPE,/*69*/
|
||||
MTK_PULL_PU_PD_TYPE,/*70*/ MTK_PULL_PU_PD_TYPE,/*71*/
|
||||
MTK_PULL_PU_PD_TYPE,/*72*/ MTK_PULL_PU_PD_TYPE,/*73*/
|
||||
MTK_PULL_PU_PD_TYPE,/*74*/ MTK_PULL_PU_PD_TYPE,/*75*/
|
||||
MTK_PULL_PU_PD_TYPE,/*76*/ MTK_PULL_PU_PD_TYPE,/*77*/
|
||||
MTK_PULL_PU_PD_TYPE,/*78*/ MTK_PULL_PU_PD_TYPE,/*79*/
|
||||
MTK_PULL_PU_PD_TYPE,/*80*/ MTK_PULL_PU_PD_TYPE,/*81*/
|
||||
MTK_PULL_PU_PD_TYPE,/*82*/ MTK_PULL_PU_PD_TYPE,/*83*/
|
||||
MTK_PULL_PU_PD_TYPE,/*84*/ MTK_PULL_PU_PD_TYPE,/*85*/
|
||||
MTK_PULL_PU_PD_TYPE,/*86*/ MTK_PULL_PU_PD_TYPE,/*87*/
|
||||
MTK_PULL_PU_PD_TYPE,/*88*/ MTK_PULL_PU_PD_TYPE,/*89*/
|
||||
MTK_PULL_PU_PD_TYPE,/*90*/ MTK_PULL_PU_PD_TYPE,/*91*/
|
||||
MTK_PULL_PU_PD_TYPE,/*92*/ MTK_PULL_PU_PD_TYPE,/*93*/
|
||||
MTK_PULL_PU_PD_TYPE,/*94*/ MTK_PULL_PU_PD_TYPE,/*95*/
|
||||
MTK_PULL_PU_PD_TYPE,/*96*/ MTK_PULL_PU_PD_TYPE,/*97*/
|
||||
MTK_PULL_PU_PD_TYPE,/*98*/ MTK_PULL_PU_PD_TYPE,/*99*/
|
||||
MTK_PULL_PU_PD_TYPE,/*100*/
|
||||
};
|
||||
|
||||
static const struct mtk_pin_reg_calc mt7986_reg_cals[] = {
|
||||
[PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt7986_pin_mode_range),
|
||||
[PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt7986_pin_dir_range),
|
||||
|
@ -675,11 +729,17 @@ static int mt7986_uart1_1_funcs[] = { 4, 4, 4, 4, };
|
|||
static int mt7986_spi1_2_pins[] = { 29, 30, 31, 32, };
|
||||
static int mt7986_spi1_2_funcs[] = { 1, 1, 1, 1, };
|
||||
|
||||
static int mt7986_uart1_2_pins[] = { 29, 30, 31, 32, };
|
||||
static int mt7986_uart1_2_funcs[] = { 3, 3, 3, 3, };
|
||||
static int mt7986_uart1_2_rx_tx_pins[] = { 29, 30, };
|
||||
static int mt7986_uart1_2_rx_tx_funcs[] = { 3, 3, };
|
||||
|
||||
static int mt7986_uart2_0_pins[] = { 29, 30, 31, 32, };
|
||||
static int mt7986_uart2_0_funcs[] = { 4, 4, 4, 4, };
|
||||
static int mt7986_uart1_2_cts_rts_pins[] = { 31, 32, };
|
||||
static int mt7986_uart1_2_cts_rts_funcs[] = { 3, 3, };
|
||||
|
||||
static int mt7986_uart2_0_rx_tx_pins[] = { 29, 30, };
|
||||
static int mt7986_uart2_0_rx_tx_funcs[] = { 4, 4, };
|
||||
|
||||
static int mt7986_uart2_0_cts_rts_pins[] = { 31, 32, };
|
||||
static int mt7986_uart2_0_cts_rts_funcs[] = { 4, 4, };
|
||||
|
||||
static int mt7986_spi0_pins[] = { 33, 34, 35, 36, };
|
||||
static int mt7986_spi0_funcs[] = { 1, 1, 1, 1, };
|
||||
|
@ -708,6 +768,12 @@ static int mt7986_pcie_reset_funcs[] = { 1, };
|
|||
static int mt7986_uart1_pins[] = { 42, 43, 44, 45, };
|
||||
static int mt7986_uart1_funcs[] = { 1, 1, 1, 1, };
|
||||
|
||||
static int mt7986_uart1_rx_tx_pins[] = { 42, 43, };
|
||||
static int mt7986_uart1_rx_tx_funcs[] = { 1, 1, };
|
||||
|
||||
static int mt7986_uart1_cts_rts_pins[] = { 44, 45, };
|
||||
static int mt7986_uart1_cts_rts_funcs[] = { 1, 1, };
|
||||
|
||||
static int mt7986_uart2_pins[] = { 46, 47, 48, 49, };
|
||||
static int mt7986_uart2_funcs[] = { 1, 1, 1, 1, };
|
||||
|
||||
|
@ -744,14 +810,13 @@ static int mt7986_pcie_clk_funcs[] = { 1, };
|
|||
static int mt7986_pcie_wake_pins[] = { 10, };
|
||||
static int mt7986_pcie_wake_funcs[] = { 1, };
|
||||
|
||||
static int mt7986_jtag_pins[] = { 11, 12, 13, 14, 15};
|
||||
static int mt7986_jtag_funcs[] = { 1, 1, 1, 1, 1};
|
||||
|
||||
static const struct group_desc mt7986_groups[] = {
|
||||
PINCTRL_PIN_GROUP("watchdog", mt7986_watchdog),
|
||||
PINCTRL_PIN_GROUP("wifi_led", mt7986_wifi_led),
|
||||
PINCTRL_PIN_GROUP("i2c", mt7986_i2c),
|
||||
PINCTRL_PIN_GROUP("uart1_0", mt7986_uart1_0),
|
||||
PINCTRL_PIN_GROUP("uart1_rx_tx", mt7986_uart1_rx_tx),
|
||||
PINCTRL_PIN_GROUP("uart1_cts_rts", mt7986_uart1_cts_rts),
|
||||
PINCTRL_PIN_GROUP("pcie_clk", mt7986_pcie_clk),
|
||||
PINCTRL_PIN_GROUP("pcie_wake", mt7986_pcie_wake),
|
||||
PINCTRL_PIN_GROUP("spi1_0", mt7986_spi1_0),
|
||||
|
@ -763,8 +828,10 @@ static const struct group_desc mt7986_groups[] = {
|
|||
PINCTRL_PIN_GROUP("spi1_1", mt7986_spi1_1),
|
||||
PINCTRL_PIN_GROUP("uart1_1", mt7986_uart1_1),
|
||||
PINCTRL_PIN_GROUP("spi1_2", mt7986_spi1_2),
|
||||
PINCTRL_PIN_GROUP("uart1_2", mt7986_uart1_2),
|
||||
PINCTRL_PIN_GROUP("uart2_0", mt7986_uart2_0),
|
||||
PINCTRL_PIN_GROUP("uart1_2_rx_tx", mt7986_uart1_2_rx_tx),
|
||||
PINCTRL_PIN_GROUP("uart1_2_cts_rts", mt7986_uart1_2_cts_rts),
|
||||
PINCTRL_PIN_GROUP("uart2_0_rx_tx", mt7986_uart2_0_rx_tx),
|
||||
PINCTRL_PIN_GROUP("uart2_0_cts_rts", mt7986_uart2_0_cts_rts),
|
||||
PINCTRL_PIN_GROUP("spi0", mt7986_spi0),
|
||||
PINCTRL_PIN_GROUP("spi0_wp_hold", mt7986_spi0_wp_hold),
|
||||
PINCTRL_PIN_GROUP("uart2_1", mt7986_uart2_1),
|
||||
|
@ -783,7 +850,6 @@ static const struct group_desc mt7986_groups[] = {
|
|||
PINCTRL_PIN_GROUP("wf_2g", mt7986_wf_2g),
|
||||
PINCTRL_PIN_GROUP("wf_5g", mt7986_wf_5g),
|
||||
PINCTRL_PIN_GROUP("wf_dbdc", mt7986_wf_dbdc),
|
||||
PINCTRL_PIN_GROUP("jtag", mt7986_jtag),
|
||||
};
|
||||
|
||||
/* Joint those groups owning the same capability in user point of view which
|
||||
|
@ -804,12 +870,13 @@ static const char *mt7986_pwm_groups[] = { "pwm0", "pwm1_0", "pwm1_1", };
|
|||
static const char *mt7986_spi_groups[] = {
|
||||
"spi0", "spi0_wp_hold", "spi1_0", "spi1_1", "spi1_2", "spi1_3", };
|
||||
static const char *mt7986_uart_groups[] = {
|
||||
"uart1_0", "uart1_1", "uart1_2", "uart1_3_rx_tx", "uart1_3_cts_rts",
|
||||
"uart1_0", "uart1_1", "uart1_rx_tx", "uart1_cts_rts",
|
||||
"uart1_2_rx_tx", "uart1_2_cts_rts",
|
||||
"uart1_3_rx_tx", "uart1_3_cts_rts", "uart2_0_rx_tx", "uart2_0_cts_rts",
|
||||
"uart2_0", "uart2_1", "uart0", "uart1", "uart2",
|
||||
};
|
||||
static const char *mt7986_wdt_groups[] = { "watchdog", };
|
||||
static const char *mt7986_wf_groups[] = { "wf_2g", "wf_5g", "wf_dbdc", };
|
||||
static const char *mt7986_jtag_groups[] = { "jtag", };
|
||||
|
||||
static const struct function_desc mt7986_functions[] = {
|
||||
{"audio", mt7986_audio_groups, ARRAY_SIZE(mt7986_audio_groups)},
|
||||
|
@ -824,7 +891,6 @@ static const struct function_desc mt7986_functions[] = {
|
|||
{"uart", mt7986_uart_groups, ARRAY_SIZE(mt7986_uart_groups)},
|
||||
{"watchdog", mt7986_wdt_groups, ARRAY_SIZE(mt7986_wdt_groups)},
|
||||
{"wifi", mt7986_wf_groups, ARRAY_SIZE(mt7986_wf_groups)},
|
||||
{"jtag", mt7986_jtag_groups, ARRAY_SIZE(mt7986_jtag_groups)},
|
||||
};
|
||||
|
||||
static const struct mtk_eint_hw mt7986a_eint_hw = {
|
||||
|
@ -832,6 +898,7 @@ static const struct mtk_eint_hw mt7986a_eint_hw = {
|
|||
.ports = 7,
|
||||
.ap_num = ARRAY_SIZE(mt7986a_pins),
|
||||
.db_cnt = 16,
|
||||
.db_time = debounce_time_mt6765,
|
||||
};
|
||||
|
||||
static const struct mtk_eint_hw mt7986b_eint_hw = {
|
||||
|
@ -839,6 +906,7 @@ static const struct mtk_eint_hw mt7986b_eint_hw = {
|
|||
.ports = 7,
|
||||
.ap_num = ARRAY_SIZE(mt7986b_pins),
|
||||
.db_cnt = 16,
|
||||
.db_time = debounce_time_mt6765,
|
||||
};
|
||||
|
||||
static struct mtk_pin_soc mt7986a_data = {
|
||||
|
@ -854,6 +922,7 @@ static struct mtk_pin_soc mt7986a_data = {
|
|||
.ies_present = false,
|
||||
.base_names = mt7986_pinctrl_register_base_names,
|
||||
.nbase_names = ARRAY_SIZE(mt7986_pinctrl_register_base_names),
|
||||
.pull_type = mt7986_pull_type,
|
||||
.bias_set_combo = mtk_pinconf_bias_set_combo,
|
||||
.bias_get_combo = mtk_pinconf_bias_get_combo,
|
||||
.drive_set = mtk_pinconf_drive_set_rev1,
|
||||
|
@ -875,6 +944,7 @@ static struct mtk_pin_soc mt7986b_data = {
|
|||
.ies_present = false,
|
||||
.base_names = mt7986_pinctrl_register_base_names,
|
||||
.nbase_names = ARRAY_SIZE(mt7986_pinctrl_register_base_names),
|
||||
.pull_type = mt7986_pull_type,
|
||||
.bias_set_combo = mtk_pinconf_bias_set_combo,
|
||||
.bias_get_combo = mtk_pinconf_bias_get_combo,
|
||||
.drive_set = mtk_pinconf_drive_set_rev1,
|
||||
|
|
Loading…
Reference in New Issue