[openwrt/openwrt] mediatek: mt7981: pinctrl: add additional emmc groups
LEDE Commits
lede-commits at lists.infradead.org
Wed Mar 13 13:48:57 PDT 2024
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e1831321de15ba4a8401cbf8c2c713939de968c1
commit e1831321de15ba4a8401cbf8c2c713939de968c1
Author: Jean Thomas <jean.thomas at wifirst.fr>
AuthorDate: Thu Dec 7 16:18:02 2023 +0100
mediatek: mt7981: pinctrl: add additional emmc groups
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 <jean.thomas at wifirst.fr>
---
...mediatek-mt7981-add-additional-emmc-group.patch | 82 ++++++++++++++++++++++
...mediatek-mt7981-add-additional-emmc-group.patch | 82 ++++++++++++++++++++++
2 files changed, 164 insertions(+)
diff --git a/target/linux/mediatek/patches-6.1/254-pinctrl-mediatek-mt7981-add-additional-emmc-group.patch b/target/linux/mediatek/patches-6.1/254-pinctrl-mediatek-mt7981-add-additional-emmc-group.patch
new file mode 100644
index 0000000000..df4d82c9d9
--- /dev/null
+++ b/target/linux/mediatek/patches-6.1/254-pinctrl-mediatek-mt7981-add-additional-emmc-group.patch
@@ -0,0 +1,82 @@
+From patchwork Wed Jan 17 14:55:47 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Jean Thomas <jean.thomas at wifirst.fr>
+X-Patchwork-Id: 13521855
+Return-Path:
+ <linux-mediatek-bounces+linux-mediatek=archiver.kernel.org at lists.infradead.org>
+From: Jean Thomas <jean.thomas at wifirst.fr>
+To: sean.wang at kernel.org,
+ linus.walleij at linaro.org,
+ matthias.bgg at gmail.com,
+ angelogioacchino.delregno at collabora.com,
+ linux-mediatek at lists.infradead.org,
+ linux-gpio at vger.kernel.org,
+ linux-kernel at vger.kernel.org,
+ linux-arm-kernel at lists.infradead.org
+Cc: Jean Thomas <jean.thomas at wifirst.fr>,
+ Daniel Golle <daniel at makrotopia.org>
+Subject: [PATCH v2 2/2] pinctrl: mediatek: mt7981: add additional emmc groups
+Date: Wed, 17 Jan 2024 15:55:47 +0100
+Message-Id: <20240117145547.3354242-1-jean.thomas at wifirst.fr>
+List-Id: <linux-mediatek.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 <jean.thomas at wifirst.fr>
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+---
+ drivers/pinctrl/mediatek/pinctrl-mt7981.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+--
+2.39.2
+
+--- 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_gr
+ 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[] =
+ 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", };
diff --git a/target/linux/mediatek/patches-6.6/254-pinctrl-mediatek-mt7981-add-additional-emmc-group.patch b/target/linux/mediatek/patches-6.6/254-pinctrl-mediatek-mt7981-add-additional-emmc-group.patch
new file mode 100644
index 0000000000..df4d82c9d9
--- /dev/null
+++ b/target/linux/mediatek/patches-6.6/254-pinctrl-mediatek-mt7981-add-additional-emmc-group.patch
@@ -0,0 +1,82 @@
+From patchwork Wed Jan 17 14:55:47 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Jean Thomas <jean.thomas at wifirst.fr>
+X-Patchwork-Id: 13521855
+Return-Path:
+ <linux-mediatek-bounces+linux-mediatek=archiver.kernel.org at lists.infradead.org>
+From: Jean Thomas <jean.thomas at wifirst.fr>
+To: sean.wang at kernel.org,
+ linus.walleij at linaro.org,
+ matthias.bgg at gmail.com,
+ angelogioacchino.delregno at collabora.com,
+ linux-mediatek at lists.infradead.org,
+ linux-gpio at vger.kernel.org,
+ linux-kernel at vger.kernel.org,
+ linux-arm-kernel at lists.infradead.org
+Cc: Jean Thomas <jean.thomas at wifirst.fr>,
+ Daniel Golle <daniel at makrotopia.org>
+Subject: [PATCH v2 2/2] pinctrl: mediatek: mt7981: add additional emmc groups
+Date: Wed, 17 Jan 2024 15:55:47 +0100
+Message-Id: <20240117145547.3354242-1-jean.thomas at wifirst.fr>
+List-Id: <linux-mediatek.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 <jean.thomas at wifirst.fr>
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+---
+ drivers/pinctrl/mediatek/pinctrl-mt7981.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+--
+2.39.2
+
+--- 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_gr
+ 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[] =
+ 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", };
More information about the lede-commits
mailing list