mediatek: copy patches-6.1 to patches-6.6
[openwrt/staging/stintel.git] / target / linux / mediatek / patches-6.6 / 218-pinctrl-mediatek-mt7981-add-additional-uart-groups.patch
1 From 11db447f257231e08065989100311df57b7f1f1c Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Sat, 26 Aug 2023 21:06:14 +0100
4 Subject: [PATCH] pinctrl: mediatek: mt7981: add additional uart groups
5
6 Add uart2_0_tx_rx (pin 4, 5) and uart1_2 (pins 9, 10) groups.
7
8 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 ---
10 drivers/pinctrl/mediatek/pinctrl-mt7981.c | 16 +++++++++++++---
11 1 file changed, 13 insertions(+), 3 deletions(-)
12
13 --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
14 +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
15 @@ -611,6 +611,9 @@ static int mt7981_wo0_jtag_1_funcs[] = {
16 static int mt7981_uart2_0_pins[] = { 4, 5, 6, 7, };
17 static int mt7981_uart2_0_funcs[] = { 3, 3, 3, 3, };
18
19 +static int mt7981_uart2_0_tx_rx_pins[] = { 4, 5, };
20 +static int mt7981_uart2_0_tx_rx_funcs[] = { 3, 3, };
21 +
22 /* GBE_LED0 */
23 static int mt7981_gbe_led0_pins[] = { 8, };
24 static int mt7981_gbe_led0_funcs[] = { 3, };
25 @@ -731,6 +734,9 @@ static int mt7981_uart1_0_funcs[] = { 4,
26 static int mt7981_uart1_1_pins[] = { 26, 27, 28, 29, };
27 static int mt7981_uart1_1_funcs[] = { 2, 2, 2, 2, };
28
29 +static int mt7981_uart1_2_pins[] = { 9, 10, };
30 +static int mt7981_uart1_2_funcs[] = { 2, 2, };
31 +
32 /* UART2 */
33 static int mt7981_uart2_1_pins[] = { 22, 23, 24, 25, };
34 static int mt7981_uart2_1_funcs[] = { 3, 3, 3, 3, };
35 @@ -805,6 +811,8 @@ static const struct group_desc mt7981_gr
36 PINCTRL_PIN_GROUP("wo0_jtag_0", mt7981_wo0_jtag_0),
37 /* @GPIO(4,7) WM_JTAG(3) */
38 PINCTRL_PIN_GROUP("uart2_0", mt7981_uart2_0),
39 + /* @GPIO(4,5) WM_JTAG(4) */
40 + PINCTRL_PIN_GROUP("uart2_0_tx_rx", mt7981_uart2_0_tx_rx),
41 /* @GPIO(8) GBE_LED0(3) */
42 PINCTRL_PIN_GROUP("gbe_led0", mt7981_gbe_led0),
43 /* @GPIO(4,6) PTA_EXT(4) */
44 @@ -861,6 +869,8 @@ static const struct group_desc mt7981_gr
45 PINCTRL_PIN_GROUP("uart1_0", mt7981_uart1_0),
46 /* @GPIO(26,29): UART1(2) */
47 PINCTRL_PIN_GROUP("uart1_1", mt7981_uart1_1),
48 + /* @GPIO(9,10): UART1(2) */
49 + PINCTRL_PIN_GROUP("uart1_2", mt7981_uart1_2),
50 /* @GPIO(22,25): UART1(3) */
51 PINCTRL_PIN_GROUP("uart2_1", mt7981_uart2_1),
52 /* @GPIO(22,24) PTA_EXT(4) */
53 @@ -922,9 +932,9 @@ static const struct group_desc mt7981_gr
54 */
55 static const char *mt7981_wa_aice_groups[] = { "wa_aice1", "wa_aice2", "wm_aice1_1",
56 "wa_aice3", "wm_aice1_2", };
57 -static const char *mt7981_uart_groups[] = { "wm_uart_0", "uart2_0",
58 - "net_wo0_uart_txd_0", "net_wo0_uart_txd_1", "net_wo0_uart_txd_2",
59 - "uart1_0", "uart1_1", "uart2_1", "wm_aurt_1", "wm_aurt_2", "uart0", };
60 +static const char *mt7981_uart_groups[] = { "net_wo0_uart_txd_0", "net_wo0_uart_txd_1",
61 + "net_wo0_uart_txd_2", "uart0", "uart1_0", "uart1_1", "uart1_2", "uart2_0",
62 + "uart2_0_tx_rx", "uart2_1", "wm_uart_0", "wm_aurt_1", "wm_aurt_2", };
63 static const char *mt7981_dfd_groups[] = { "dfd", "dfd_ntrst", };
64 static const char *mt7981_wdt_groups[] = { "watchdog", "watchdog1", };
65 static const char *mt7981_pcie_groups[] = { "pcie_pereset", "pcie_clk", "pcie_wake", };