254-pinctrl-mediatek-mt7981-add-additional-emmc-group.patch 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From patchwork Wed Jan 17 14:55:47 2024
  2. Content-Type: text/plain; charset="utf-8"
  3. MIME-Version: 1.0
  4. Content-Transfer-Encoding: 7bit
  5. X-Patchwork-Submitter: Jean Thomas <[email protected]>
  6. X-Patchwork-Id: 13521855
  7. Return-Path:
  8. <linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org>
  9. From: Jean Thomas <[email protected]>
  10. To: [email protected],
  11. [email protected],
  12. [email protected],
  13. [email protected],
  14. [email protected],
  15. [email protected],
  16. [email protected],
  17. [email protected]
  18. Cc: Jean Thomas <[email protected]>,
  19. Daniel Golle <[email protected]>
  20. Subject: [PATCH v2 2/2] pinctrl: mediatek: mt7981: add additional emmc groups
  21. Date: Wed, 17 Jan 2024 15:55:47 +0100
  22. Message-Id: <[email protected]>
  23. List-Id: <linux-mediatek.lists.infradead.org>
  24. Add new emmc groups in the pinctrl driver for the
  25. MediaTek MT7981 SoC:
  26. * emmc reset, with pin 15.
  27. * emmc 4-bit bus-width, with pins 16 to 19, and 24 to 25.
  28. * emmc 8-bit bus-width, with pins 16 to 25.
  29. The existing emmc_45 group is kept for legacy reasons, even
  30. if this is the union of emmc_reset and emmc_8 groups.
  31. Signed-off-by: Jean Thomas <[email protected]>
  32. Reviewed-by: Daniel Golle <[email protected]>
  33. ---
  34. drivers/pinctrl/mediatek/pinctrl-mt7981.c | 17 ++++++++++++++++-
  35. 1 file changed, 16 insertions(+), 1 deletion(-)
  36. --
  37. 2.39.2
  38. --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
  39. +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
  40. @@ -700,6 +700,15 @@ static int mt7981_drv_vbus_pins[] = { 14
  41. static int mt7981_drv_vbus_funcs[] = { 1, };
  42. /* EMMC */
  43. +static int mt7981_emmc_reset_pins[] = { 15, };
  44. +static int mt7981_emmc_reset_funcs[] = { 2, };
  45. +
  46. +static int mt7981_emmc_4_pins[] = { 16, 17, 18, 19, 24, 25, };
  47. +static int mt7981_emmc_4_funcs[] = { 2, 2, 2, 2, 2, 2, };
  48. +
  49. +static int mt7981_emmc_8_pins[] = { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, };
  50. +static int mt7981_emmc_8_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, };
  51. +
  52. static int mt7981_emmc_45_pins[] = { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, };
  53. static int mt7981_emmc_45_funcs[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, };
  54. @@ -854,6 +863,12 @@ static const struct group_desc mt7981_gr
  55. PINCTRL_PIN_GROUP("udi", mt7981_udi),
  56. /* @GPIO(14) DRV_VBUS(1) */
  57. PINCTRL_PIN_GROUP("drv_vbus", mt7981_drv_vbus),
  58. + /* @GPIO(15): EMMC_RSTB(2) */
  59. + PINCTRL_PIN_GROUP("emmc_reset", mt7981_emmc_reset),
  60. + /* @GPIO(16,17,18,19,24,25): EMMC_DATx, EMMC_CLK, EMMC_CMD */
  61. + PINCTRL_PIN_GROUP("emmc_4", mt7981_emmc_4),
  62. + /* @GPIO(16,17,18,19,20,21,22,23,24,25): EMMC_DATx, EMMC_CLK, EMMC_CMD */
  63. + PINCTRL_PIN_GROUP("emmc_8", mt7981_emmc_8),
  64. /* @GPIO(15,25): EMMC(2) */
  65. PINCTRL_PIN_GROUP("emmc_45", mt7981_emmc_45),
  66. /* @GPIO(16,21): SNFI(3) */
  67. @@ -957,7 +972,7 @@ static const char *mt7981_i2c_groups[] =
  68. static const char *mt7981_pcm_groups[] = { "pcm", };
  69. static const char *mt7981_udi_groups[] = { "udi", };
  70. static const char *mt7981_usb_groups[] = { "drv_vbus", };
  71. -static const char *mt7981_flash_groups[] = { "emmc_45", "snfi", };
  72. +static const char *mt7981_flash_groups[] = { "emmc_reset", "emmc_4", "emmc_8", "emmc_45", "snfi", };
  73. static const char *mt7981_ethernet_groups[] = { "smi_mdc_mdio", "gbe_ext_mdc_mdio",
  74. "wf0_mode1", "wf0_mode3", "mt7531_int", };
  75. static const char *mt7981_ant_groups[] = { "ant_sel", };