Skip to contentSkip to conversation

ARM: dts: stm32: Add alternate pinmux for SDMMC2 pins 4-7

PATCH New Marek Vasut 1 participant 2 messages Mar 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 ARM: dts: stm32: Add alternate pinmux for SDMMC2 pins 4-7

Add another mux option for SDMMC2 pins 4..7, this is used on AV96 board.

Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>

---
V2: Use correct pin AFs

---
 arch/arm/dts/stm32mp157-pinctrl.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/dts/stm32mp157-pinctrl.dtsi +21 -0
index 81a363d93d..1d0aac973c 100644
@@ -907,6 +907,27 @@
 				};
 			};
 
+			sdmmc2_d47_pins_b: sdmmc2-d47-1 {
+				pins {
+					pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
+						 <STM32_PINMUX('A', 15, AF9)>, /* SDMMC2_D5 */
+						 <STM32_PINMUX('C', 6, AF10)>, /* SDMMC2_D6 */
+						 <STM32_PINMUX('C', 7, AF10)>; /* SDMMC2_D7 */
+					slew-rate = <1>;
+					drive-push-pull;
+					bias-pull-up;
+				};
+			};
+
+			sdmmc2_d47_sleep_pins_b: sdmmc2-d47-sleep-1 {
+				pins {
+					pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
+						 <STM32_PINMUX('A', 15, ANALOG)>, /* SDMMC2_D5 */
+						 <STM32_PINMUX('C', 6, ANALOG)>, /* SDMMC2_D6 */
+						 <STM32_PINMUX('C', 7, ANALOG)>; /* SDMMC2_D7 */
+				};
+			};
+
 			spdifrx_pins_a: spdifrx-0 {
 				pins {
 					pinmux = <STM32_PINMUX('G', 12, AF8)>; /* SPDIF_IN1 */
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 2/2 ARM: dts: stm32: Repair SDMMC2 operation

The eMMC uses different pinmux for the top four data lines, use such a pinmux, otherwise it takes a very long time until the test for 8bit operation times out. And this is the correct pinmux per schematic too.

Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>

---
V2: No change

---
 arch/arm/dts/stm32mp157a-avenger96.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/stm32mp157a-avenger96.dts +1 -1
index 3065593bf2..e7505c7596 100644
@@ -310,7 +310,7 @@
 
 &sdmmc2 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
+	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
 	non-removable;
 	no-sd;
 	no-sdio;
Signature · 1 line
2.25.1