Skip to contentSkip to conversation

ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM

PATCH In review Marek Vasut 2 participants 4 messages Dec 1, 2020 – Jan 14, 2021

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

PATCH 1/2 ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM

The default state of SD bus and clock line is logical HI. SD card IO is open-drain and pulls the bus lines LO. Always enable the SD bus pull ups to guarantee this behavior on DHCOM SoM. Note that on SoMs with SD bus voltage level shifter, the pull ups are built into the level shifter, however that has no negative impact.

Cc Alexandre Torgue <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

To: [email protected]

---
 arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +14 -0
index daff5318f301..97c6e0cd582c 100644
@@ -400,6 +400,20 @@ &sdmmc1 {
 	status = "okay";
 };
 
+&sdmmc1_b4_pins_a {
+	/*
+	 * SD bus pull-up resistors:
+	 * - optional on SoMs with SD voltage translator
+	 * - mandatory on SoMs without SD voltage translator
+	 */
+	pins1 {
+		bias-pull-up;
+	};
+	pins2 {
+		bias-pull-up;
+	};
+};
+
 &sdmmc2 {
 	pinctrl-names = "default", "opendrain", "sleep";
 	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 2/2 ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock

The STM32MP1 DHCOM SoM can be built with either bus voltage level shifter or without one on the SDMMC1 interface. Because the SDMMC1 interface is limited to 50 MHz and hence SD high-speed anyway, disable the SD feedback clock to permit operation of the same U-Boot image on both SoM with and without voltage level shifter.

Cc Alexandre Torgue <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

To: [email protected]

---
 arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +0 -1
index 97c6e0cd582c..2a20818c91e4 100644
@@ -394,7 +394,6 @@ &sdmmc1 {
 	disable-wp;
 	st,sig-dir;
 	st,neg-edge;
-	st,use-ckin;
 	bus-width = <4>;
 	vmmc-supply = <&vdd_sd>;
 	status = "okay";
Signature · 7 lines
2.29.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#2 lore raw

Re: [PATCH 2/2] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock

Hi Marek

Quoted 23 lines · Marek Vasut

The STM32MP1 DHCOM SoM can be built with either bus voltage level shifter or without one on the SDMMC1 interface. Because the SDMMC1 interface is limited to 50 MHz and hence SD high-speed anyway, disable the SD feedback clock to permit operation of the same U-Boot image on both SoM with and without voltage level shifter.

Cc Alexandre Torgue <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

To: [email protected]

---
  arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 1 -
  1 file changed, 1 deletion(-)
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +0 -0
index 97c6e0cd582c..2a20818c91e4 100644

arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi &sdmmc1 { · line 399

Quoted 7 lines
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +0 -1
@@ -394,7 +394,6 @@ &sdmmc1 {
  	disable-wp;
  	st,sig-dir;
  	st,neg-edge;
-	st,use-ckin;
  	bus-width = <4>;
  	vmmc-supply = <&vdd_sd>;
  	status = "okay";

Applied on stm32-next.

Thanks.
Alex

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#3 lore raw
In reply to Marek Vasut

Hi Marek

Quoted 33 lines · Marek Vasut

The default state of SD bus and clock line is logical HI. SD card IO is open-drain and pulls the bus lines LO. Always enable the SD bus pull ups to guarantee this behavior on DHCOM SoM. Note that on SoMs with SD bus voltage level shifter, the pull ups are built into the level shifter, however that has no negative impact.

Cc Alexandre Torgue <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

To: [email protected]

---
  arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +7 -0
index daff5318f301..97c6e0cd582c 100644
@@ -400,6 +400,20 @@ &sdmmc1 {
  	status = "okay";
  };
 
+&sdmmc1_b4_pins_a {
+	/*
+	 * SD bus pull-up resistors:
+	 * - optional on SoMs with SD voltage translator
+	 * - mandatory on SoMs without SD voltage translator
+	 */
+	pins1 {

arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi &sdmmc1 { · line 419

Quoted 10 lines
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +7 -0
+		bias-pull-up;
+	};
+	pins2 {
+		bias-pull-up;
+	};
+};
+
  &sdmmc2 {
  	pinctrl-names = "default", "opendrain", "sleep";
  	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;

Applied on stm32-next.

Thanks.
Alex

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel