From patchwork Wed Jan 17 12:42:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Thomas X-Patchwork-Id: 13521684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52D64C47258 for ; Wed, 17 Jan 2024 12:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=YZX4PRuq+gZbqqxGMlrv11UdE6njb00wcptZKdcLqQs=; b=j2dc4RL3mRlQ0V 0ivbYFOSlYIxhohD0+H+qSqlIzxvqjBlT+Ni+y5ZKBZzR5kJVdDOThA/XccNiUuGxBNJ5rypak50R 4nH9ygMj0GG0VsRvScSufmeu614RkPp0P9YH3+iWZJjjDvv0ki8mQBLkxItlpxWRrb2jWM0BjHIb8 O528kyjRjNyxUNhjdfRjrkAC99N5Pi+af8+SnXDYlxjyRmhmBbbu5pMPvXMGa8anzaRn+9XGsvnxV OFGNr4PrgncT1V5y+eWGsfFuoDUssv4c094AlzFB+pvPy5r8T47DzYk/JhftsvpYkB4aozRcX2wxY 7qRI39BdasOZKY6OzxLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ5GI-00G3kc-2F; Wed, 17 Jan 2024 12:43:18 +0000 Received: from smtp6-g21.free.fr ([212.27.42.6]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ5GE-00G3ej-1g; Wed, 17 Jan 2024 12:43:16 +0000 Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:aa1:d2f0:f6b3:db6:44c:eeef]) (Authenticated sender: isaias57@free.fr) by smtp6-g21.free.fr (Postfix) with ESMTPSA id B2AF778034D; Wed, 17 Jan 2024 13:42:57 +0100 (CET) From: Jean Thomas To: sean.wang@kernel.org, linus.walleij@linaro.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Jean Thomas Subject: [PATCH 1/2] pinctrl: mediatek: mt7981: add additional uart group Date: Wed, 17 Jan 2024 13:42:33 +0100 Message-Id: <20240117124234.3137050-1-jean.thomas@wifirst.fr> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_044314_724149_03FF089A X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add uart1_3 (pins 26, 27) group to the pinctrl driver for the MediaTek MT7981 SoC. Signed-off-by: Jean Thomas --- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c b/drivers/pinctrl/mediatek/pinctrl-mt7981.c index 7e59a4407859..ca667ed25a4d 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c @@ -737,6 +737,9 @@ 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, }; +static int mt7981_uart1_3_pins[] = { 26, 27, }; +static int mt7981_uart1_3_funcs[] = { 2, 2, }; + /* UART2 */ static int mt7981_uart2_1_pins[] = { 22, 23, 24, 25, }; static int mt7981_uart2_1_funcs[] = { 3, 3, 3, 3, }; @@ -871,6 +874,8 @@ static const struct group_desc mt7981_groups[] = { PINCTRL_PIN_GROUP("uart1_1", mt7981_uart1_1), /* @GPIO(9,10): UART1(2) */ PINCTRL_PIN_GROUP("uart1_2", mt7981_uart1_2), + /* @GPIO(26,27): UART1(2) */ + PINCTRL_PIN_GROUP("uart1_3", mt7981_uart1_3), /* @GPIO(22,25): UART1(3) */ PINCTRL_PIN_GROUP("uart2_1", mt7981_uart2_1), /* @GPIO(22,24) PTA_EXT(4) */ @@ -933,7 +938,7 @@ 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[] = { "net_wo0_uart_txd_0", "net_wo0_uart_txd_1", - "net_wo0_uart_txd_2", "uart0", "uart1_0", "uart1_1", "uart1_2", "uart2_0", + "net_wo0_uart_txd_2", "uart0", "uart1_0", "uart1_1", "uart1_2", "uart1_3", "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", }; From patchwork Wed Jan 17 12:42:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Thomas X-Patchwork-Id: 13521685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89D37C47DA2 for ; Wed, 17 Jan 2024 12:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XJ58NfozHlxMywgkiIgJVV0H/+zFSkclRnpw0E5KmOk=; b=BZRoi6IeSFFPgS 42gMRMQ6v8BXVv7or/rSixWbyO6/00Y6AU5WtUY1NObg9do2uoowSkxINKrTvhUl+W+zJcaszNkY4 3aVbgpgrTRReJXQtlr+wVLHdaDJTWlXSIH1rw73SteKQzOcVB6uDhXuOoPhoFNSrPRGirEzW+CPBt mQTHkvxgRQ3DmloVP/V+jop6rpvi8Qzadj0qoaIq3NfaMqrlAH5vUM6kJbvImB+Eqj8lXtcLx/ERM LyfI03cp8cqgfyv2QvWSsSUN9SjoB9VR391bUGCT2/hRWZt0A5yml5/wdq6/QupsyZA/4tAbtG5De RjK7ecqqGnwOIaeKv+uQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ5GX-00G3r2-1F; Wed, 17 Jan 2024 12:43:33 +0000 Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ5GR-00G3mm-3B; Wed, 17 Jan 2024 12:43:31 +0000 Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:aa1:d2f0:f6b3:db6:44c:eeef]) (Authenticated sender: isaias57@free.fr) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 40712780395; Wed, 17 Jan 2024 13:43:13 +0100 (CET) From: Jean Thomas To: sean.wang@kernel.org, linus.walleij@linaro.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Jean Thomas Subject: [PATCH 2/2] pinctrl: mediatek: mt7981: add additional emmc groups Date: Wed, 17 Jan 2024 13:42:34 +0100 Message-Id: <20240117124234.3137050-2-jean.thomas@wifirst.fr> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240117124234.3137050-1-jean.thomas@wifirst.fr> References: <20240117124234.3137050-1-jean.thomas@wifirst.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_044329_637383_AFE8AF15 X-CRM114-Status: GOOD ( 10.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add new emmc groups in the pinctrl driver for the MediaTek MT7981 SoC: * emmc reset, with pin 15. * emmc 4-bit bus-width, with pins 16 to 19, and 24 to 25. * emmc 8-bit bus-width, with pins 16 to 25. The existing emmc_45 group is kept for legacy reasons, even if this is the union of emmc_reset and emmc_8 groups. Signed-off-by: Jean Thomas Reviewed-by: Daniel Golle --- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c b/drivers/pinctrl/mediatek/pinctrl-mt7981.c index ca667ed25a4d..ef6123765885 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c @@ -700,6 +700,15 @@ static int mt7981_drv_vbus_pins[] = { 14, }; static int mt7981_drv_vbus_funcs[] = { 1, }; /* EMMC */ +static int mt7981_emmc_reset_pins[] = { 15, }; +static int mt7981_emmc_reset_funcs[] = { 2, }; + +static int mt7981_emmc_4_pins[] = { 16, 17, 18, 19, 24, 25, }; +static int mt7981_emmc_4_funcs[] = { 2, 2, 2, 2, 2, 2, }; + +static int mt7981_emmc_8_pins[] = { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, }; +static int mt7981_emmc_8_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, }; + static int mt7981_emmc_45_pins[] = { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, }; static int mt7981_emmc_45_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, }; @@ -854,6 +863,12 @@ static const struct group_desc mt7981_groups[] = { PINCTRL_PIN_GROUP("udi", mt7981_udi), /* @GPIO(14) DRV_VBUS(1) */ PINCTRL_PIN_GROUP("drv_vbus", mt7981_drv_vbus), + /* @GPIO(15): EMMC_RSTB(2) */ + PINCTRL_PIN_GROUP("emmc_reset", mt7981_emmc_reset), + /* @GPIO(16,17,18,19,24,25): EMMC_DATx, EMMC_CLK, EMMC_CMD */ + PINCTRL_PIN_GROUP("emmc_4", mt7981_emmc_4), + /* @GPIO(16,17,18,19,20,21,22,23,24,25): EMMC_DATx, EMMC_CLK, EMMC_CMD */ + PINCTRL_PIN_GROUP("emmc_8", mt7981_emmc_8), /* @GPIO(15,25): EMMC(2) */ PINCTRL_PIN_GROUP("emmc_45", mt7981_emmc_45), /* @GPIO(16,21): SNFI(3) */ @@ -957,7 +972,7 @@ static const char *mt7981_i2c_groups[] = { "i2c0_0", "i2c0_1", "u2_phy_i2c", static const char *mt7981_pcm_groups[] = { "pcm", }; static const char *mt7981_udi_groups[] = { "udi", }; static const char *mt7981_usb_groups[] = { "drv_vbus", }; -static const char *mt7981_flash_groups[] = { "emmc_45", "snfi", }; +static const char *mt7981_flash_groups[] = { "emmc_reset", "emmc_4", "emmc_8", "emmc_45", "snfi", }; static const char *mt7981_ethernet_groups[] = { "smi_mdc_mdio", "gbe_ext_mdc_mdio", "wf0_mode1", "wf0_mode3", "mt7531_int", }; static const char *mt7981_ant_groups[] = { "ant_sel", };