From patchwork Sat Aug 26 20:44:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 136964 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp2547269vqm; Sat, 26 Aug 2023 13:53:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqarQiCY01TyJPvIQwyBSVijn1A6NC8L0Aj9SInFB4bSJ42bs6uLuCRfGT5EBC+/ujPJJF X-Received: by 2002:a54:4e8e:0:b0:3a7:56a5:4251 with SMTP id c14-20020a544e8e000000b003a756a54251mr6651473oiy.16.1693083236849; Sat, 26 Aug 2023 13:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693083236; cv=none; d=google.com; s=arc-20160816; b=RITPcIbqCRTTUhrRldVp/qgxWmEGBUSnGX1oHIlXeZxy43FgOgAyJG3ry8UYywpNpd cs010/0wk/DsVG76bJQU+Dse/n8pOLUAeoobHo55FkiRIidIe28nRRtHhsp0o/JkYW6V 8wAHGgF04pknBDVziRuGxIYn1gwwYO7w3rlQq6vXTap1/2pIUZskIbK70n9Z+E+fFigV LsnYqf4mHz7X2ncrGzgZndmuAbXLI0Lw5qIwfT8YZcGHkN88giy6tVZj+AgvrlaksOQR FXEPlYW3EOkaFHM8a4OPySL7sY5DpmamOW69Cev4T3+dosBBhwpCKlHyZ/ZsLgQJeQ7w iDvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=tSQl0qidGsKfBylr7BZSO7Stx54RSZyMoElMCxG7bng=; fh=1kxB9A7hQDbphPOs8EShyT/1Pmy8c5WydczVH66VfFk=; b=CGJKF0TtkhVsfhk8JhAZGT+3P3Yt9+E+8/Au2oke22oCxMSCQhZi8JcCv+L/AutD0j Mvg5jyZ4PhHCxk0+putZ/o9kknf0xOxSt1Kjh0+n4kA+F4w78fTt/sjTxHuFLx9dvAOl DFg+5VYbY6VXGIyYbURu7ylNwC0X9xkbCSQOnpWQmViSdRIDAFtRftBRwRnnORWqJpYb +7ya19FsaUNTHUW9vzDNytUlZYEN9ZQY40mL7AUYrf14ijWIBJhK3xyc4aSkn7c1iTwK Kiek2iXwRL11pgk2PYbHmUgfSvuuLZfEsdE8qCSwJjYtiED+5NAKKI9zXuYkfabpSGOu 2+Dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a63dc01000000b0053f265b0eecsi4264360pgg.133.2023.08.26.13.53.23; Sat, 26 Aug 2023 13:53:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbjHZUpL (ORCPT + 99 others); Sat, 26 Aug 2023 16:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjHZUpB (ORCPT ); Sat, 26 Aug 2023 16:45:01 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B178DBA; Sat, 26 Aug 2023 13:44:58 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qa09K-0004GO-0C; Sat, 26 Aug 2023 20:44:50 +0000 Date: Sat, 26 Aug 2023 21:44:31 +0100 From: Daniel Golle To: Sean Wang , Linus Walleij , Matthias Brugger , AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] pinctrl: mediatek: mt7981: add additional uart groups Message-ID: <11db447f257231e08065989100311df57b7f1f1c.1693082594.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775326447842536641 X-GMAIL-MSGID: 1775326447842536641 Add uart2_0_tx_rx (pin 4, 5) and uart1_2 (pins 9, 10) groups to the pinctrl driver for the MediaTek MT7981 SoC. Signed-off-by: Daniel Golle --- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c b/drivers/pinctrl/mediatek/pinctrl-mt7981.c index 0fd2c0c451f95..7e59a44078590 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c @@ -611,6 +611,9 @@ static int mt7981_wo0_jtag_1_funcs[] = { 5, 5, 5, 5, 5, }; static int mt7981_uart2_0_pins[] = { 4, 5, 6, 7, }; static int mt7981_uart2_0_funcs[] = { 3, 3, 3, 3, }; +static int mt7981_uart2_0_tx_rx_pins[] = { 4, 5, }; +static int mt7981_uart2_0_tx_rx_funcs[] = { 3, 3, }; + /* GBE_LED0 */ static int mt7981_gbe_led0_pins[] = { 8, }; static int mt7981_gbe_led0_funcs[] = { 3, }; @@ -731,6 +734,9 @@ static int mt7981_uart1_0_funcs[] = { 4, 4, 4, 4, }; static int mt7981_uart1_1_pins[] = { 26, 27, 28, 29, }; static int mt7981_uart1_1_funcs[] = { 2, 2, 2, 2, }; +static int mt7981_uart1_2_pins[] = { 9, 10, }; +static int mt7981_uart1_2_funcs[] = { 2, 2, }; + /* UART2 */ static int mt7981_uart2_1_pins[] = { 22, 23, 24, 25, }; static int mt7981_uart2_1_funcs[] = { 3, 3, 3, 3, }; @@ -805,6 +811,8 @@ static const struct group_desc mt7981_groups[] = { PINCTRL_PIN_GROUP("wo0_jtag_0", mt7981_wo0_jtag_0), /* @GPIO(4,7) WM_JTAG(3) */ PINCTRL_PIN_GROUP("uart2_0", mt7981_uart2_0), + /* @GPIO(4,5) WM_JTAG(4) */ + PINCTRL_PIN_GROUP("uart2_0_tx_rx", mt7981_uart2_0_tx_rx), /* @GPIO(8) GBE_LED0(3) */ PINCTRL_PIN_GROUP("gbe_led0", mt7981_gbe_led0), /* @GPIO(4,6) PTA_EXT(4) */ @@ -861,6 +869,8 @@ static const struct group_desc mt7981_groups[] = { PINCTRL_PIN_GROUP("uart1_0", mt7981_uart1_0), /* @GPIO(26,29): UART1(2) */ PINCTRL_PIN_GROUP("uart1_1", mt7981_uart1_1), + /* @GPIO(9,10): UART1(2) */ + PINCTRL_PIN_GROUP("uart1_2", mt7981_uart1_2), /* @GPIO(22,25): UART1(3) */ PINCTRL_PIN_GROUP("uart2_1", mt7981_uart2_1), /* @GPIO(22,24) PTA_EXT(4) */ @@ -922,9 +932,9 @@ static const struct group_desc mt7981_groups[] = { */ static const char *mt7981_wa_aice_groups[] = { "wa_aice1", "wa_aice2", "wm_aice1_1", "wa_aice3", "wm_aice1_2", }; -static const char *mt7981_uart_groups[] = { "wm_uart_0", "uart2_0", - "net_wo0_uart_txd_0", "net_wo0_uart_txd_1", "net_wo0_uart_txd_2", - "uart1_0", "uart1_1", "uart2_1", "wm_aurt_1", "wm_aurt_2", "uart0", }; +static const char *mt7981_uart_groups[] = { "net_wo0_uart_txd_0", "net_wo0_uart_txd_1", + "net_wo0_uart_txd_2", "uart0", "uart1_0", "uart1_1", "uart1_2", "uart2_0", + "uart2_0_tx_rx", "uart2_1", "wm_uart_0", "wm_aurt_1", "wm_aurt_2", }; static const char *mt7981_dfd_groups[] = { "dfd", "dfd_ntrst", }; static const char *mt7981_wdt_groups[] = { "watchdog", "watchdog1", }; static const char *mt7981_pcie_groups[] = { "pcie_pereset", "pcie_clk", "pcie_wake", };