2
0

008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. From c1744e9e75a6a8abc7c893f349bcbf725b9c0d74 Mon Sep 17 00:00:00 2001
  2. From: Sam Shih <[email protected]>
  3. Date: Fri, 6 Jan 2023 16:28:43 +0100
  4. Subject: [PATCH 08/19] arm64: dts: mt7986: add mmc related device nodes
  5. This patch adds mmc support for MT7986.
  6. Signed-off-by: Sam Shih <[email protected]>
  7. Signed-off-by: Frank Wunderlich <[email protected]>
  8. Link: https://lore.kernel.org/r/[email protected]
  9. Signed-off-by: Matthias Brugger <[email protected]>
  10. ---
  11. arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 96 ++++++++++++++++++++
  12. arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 15 +++
  13. 2 files changed, 111 insertions(+)
  14. --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
  15. +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts
  16. @@ -5,6 +5,8 @@
  17. */
  18. /dts-v1/;
  19. +#include <dt-bindings/pinctrl/mt65xx.h>
  20. +
  21. #include "mt7986a.dtsi"
  22. / {
  23. @@ -23,6 +25,24 @@
  24. device_type = "memory";
  25. reg = <0 0x40000000 0 0x40000000>;
  26. };
  27. +
  28. + reg_1p8v: regulator-1p8v {
  29. + compatible = "regulator-fixed";
  30. + regulator-name = "fixed-1.8V";
  31. + regulator-min-microvolt = <1800000>;
  32. + regulator-max-microvolt = <1800000>;
  33. + regulator-boot-on;
  34. + regulator-always-on;
  35. + };
  36. +
  37. + reg_3p3v: regulator-3p3v {
  38. + compatible = "regulator-fixed";
  39. + regulator-name = "fixed-3.3V";
  40. + regulator-min-microvolt = <3300000>;
  41. + regulator-max-microvolt = <3300000>;
  42. + regulator-boot-on;
  43. + regulator-always-on;
  44. + };
  45. };
  46. &crypto {
  47. @@ -58,7 +78,83 @@
  48. };
  49. };
  50. +&mmc0 {
  51. + pinctrl-names = "default", "state_uhs";
  52. + pinctrl-0 = <&mmc0_pins_default>;
  53. + pinctrl-1 = <&mmc0_pins_uhs>;
  54. + bus-width = <8>;
  55. + max-frequency = <200000000>;
  56. + cap-mmc-highspeed;
  57. + mmc-hs200-1_8v;
  58. + mmc-hs400-1_8v;
  59. + hs400-ds-delay = <0x14014>;
  60. + vmmc-supply = <&reg_3p3v>;
  61. + vqmmc-supply = <&reg_1p8v>;
  62. + non-removable;
  63. + no-sd;
  64. + no-sdio;
  65. + status = "okay";
  66. +};
  67. +
  68. &pio {
  69. + mmc0_pins_default: mmc0-pins {
  70. + mux {
  71. + function = "emmc";
  72. + groups = "emmc_51";
  73. + };
  74. + conf-cmd-dat {
  75. + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
  76. + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
  77. + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
  78. + input-enable;
  79. + drive-strength = <4>;
  80. + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
  81. + };
  82. + conf-clk {
  83. + pins = "EMMC_CK";
  84. + drive-strength = <6>;
  85. + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
  86. + };
  87. + conf-ds {
  88. + pins = "EMMC_DSL";
  89. + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
  90. + };
  91. + conf-rst {
  92. + pins = "EMMC_RSTB";
  93. + drive-strength = <4>;
  94. + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
  95. + };
  96. + };
  97. +
  98. + mmc0_pins_uhs: mmc0-uhs-pins {
  99. + mux {
  100. + function = "emmc";
  101. + groups = "emmc_51";
  102. + };
  103. + conf-cmd-dat {
  104. + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
  105. + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
  106. + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
  107. + input-enable;
  108. + drive-strength = <4>;
  109. + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
  110. + };
  111. + conf-clk {
  112. + pins = "EMMC_CK";
  113. + drive-strength = <6>;
  114. + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
  115. + };
  116. + conf-ds {
  117. + pins = "EMMC_DSL";
  118. + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
  119. + };
  120. + conf-rst {
  121. + pins = "EMMC_RSTB";
  122. + drive-strength = <4>;
  123. + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
  124. + };
  125. + };
  126. +
  127. spi_flash_pins: spi-flash-pins {
  128. mux {
  129. function = "spi";
  130. --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
  131. +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
  132. @@ -345,6 +345,21 @@
  133. status = "disabled";
  134. };
  135. + mmc0: mmc@11230000 {
  136. + compatible = "mediatek,mt7986-mmc";
  137. + reg = <0 0x11230000 0 0x1000>,
  138. + <0 0x11c20000 0 0x1000>;
  139. + interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
  140. + clocks = <&topckgen CLK_TOP_EMMC_416M_SEL>,
  141. + <&infracfg CLK_INFRA_MSDC_HCK_CK>,
  142. + <&infracfg CLK_INFRA_MSDC_CK>,
  143. + <&infracfg CLK_INFRA_MSDC_133M_CK>,
  144. + <&infracfg CLK_INFRA_MSDC_66M_CK>;
  145. + clock-names = "source", "hclk", "source_cg", "bus_clk",
  146. + "sys_cg";
  147. + status = "disabled";
  148. + };
  149. +
  150. usb_phy: t-phy@11e10000 {
  151. compatible = "mediatek,mt7986-tphy",
  152. "mediatek,generic-tphy-v2";