Skip to contentSkip to conversation

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

PATCH New Marek Vasut 2 participants 10 messages Dec 1, 2020 – Dec 9, 2020 4 messages not in the archive

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

PATCH 1/4 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 Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcom.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/dts/stm32mp15xx-dhcom.dtsi +14 -0
index f022d8395c..9049245c5b 100644
@@ -339,6 +339,20 @@
 	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";
 	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/4 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 Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcom.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/dts/stm32mp15xx-dhcom.dtsi +0 -1
index 9049245c5b..dafcce4323 100644
@@ -333,7 +333,6 @@
 	disable-wp;
 	st,sig-dir;
 	st,neg-edge;
-	st,use-ckin;
 	bus-width = <4>;
 	vmmc-supply = <&vdd_sd>;
 	status = "okay";
Signature · 1 line
2.29.2

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

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

Hi Marek,

Quoted 25 lines

From: Marek Vasut <[email protected]>
Sent: mardi 1 d?cembre 2020 11:29

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 Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  arch/arm/dts/stm32mp15xx-dhcom.dtsi | 1 -
  1 file changed, 1 deletion(-)
arch/arm/dts/stm32mp15xx-dhcom.dtsi +0 -2
index 9049245c5b..dafcce4323 100644
@@ -333,7 +333,6 @@
  	disable-wp;
  	st,sig-dir;
  	st,neg-edge;
-	st,use-ckin;
  	bus-width = <4>;
  	vmmc-supply = <&vdd_sd>;
  	status = "okay";
--
Quoted 2 lines

2.29.2

Thanks

Patrick

#4 lore raw

PATCH 3/4 ARM: dts: stm32: Enable SDMMC3 on DH DRC02

In reply to Marek Vasut

The DH DRC02 board has an on-board microSD slot, add DT properties to enable the slot.

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

---
NOTE: Large part of this should be in the DHCOM SoM DT, however
a DT sync should only happen after Linux 5.10.y and U-Boot 2021.01 are out.

---
 arch/arm/dts/stm32mp15xx-dhcom-drc02.dts | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
arch/arm/dts/stm32mp15xx-dhcom-drc02.dts +11 -2
index 5a237a3b7b..e8508aa4d5 100644
@@ -105,9 +105,18 @@
 	 * On DRC02, the SoM does not have SDIO WiFi. The pins
 	 * are used for on-board microSD slot instead.
 	 */
-	/delete-property/broken-cd;
-	cd-gpios = <&gpioi 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc3_b4_pins_a>;
+	pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
+	pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
+	cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>;
 	disable-wp;
+	st,neg-edge;
+	bus-width = <4>;
+	vmmc-supply = <&v3v3>;
+	vqmmc-supply = <&v3v3>;
+	mmc-ddr-3_3v;
+	status = "okay";
 };
 
 &spi1 {
Signature · 1 line
2.29.2

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

PATCH 3/4 ARM: dts: stm32: Enable SDMMC3 on DH DRC02

Hi Marek,

Quoted 47 lines

From: Marek Vasut <[email protected]>
Sent: mardi 1 d?cembre 2020 11:29

The DH DRC02 board has an on-board microSD slot, add DT properties to enable the slot.

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

---
NOTE: Large part of this should be in the DHCOM SoM DT, however
a DT sync should only happen after Linux 5.10.y and U-Boot 2021.01 are out.

---
  arch/arm/dts/stm32mp15xx-dhcom-drc02.dts | 13 +++++++++++--
  1 file changed, 11 insertions(+), 2 deletions(-)
arch/arm/dts/stm32mp15xx-dhcom-drc02.dts +7 -2
index 5a237a3b7b..e8508aa4d5 100644
@@ -105,9 +105,18 @@
  	 * On DRC02, the SoM does not have SDIO WiFi. The pins
  	 * are used for on-board microSD slot instead.
  	 */
-	/delete-property/broken-cd;
-	cd-gpios = <&gpioi 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc3_b4_pins_a>;
+	pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
+	pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
+	cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>;
  	disable-wp;
+	st,neg-edge;
+	bus-width = <4>;To: u-boot at lists.denx.de

Cc: Marek Vasut <[email protected]>; Patrice CHOTARD <[email protected]>; Patrick DELAUNAY <[email protected]>
Subject: [PATCH 2/4] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock
Importance: High

arch/arm/dts/stm32mp15xx-dhcom-drc02.dts +4 -1
+	vmmc-supply = <&v3v3>;
+	vqmmc-supply = <&v3v3>;
+	mmc-ddr-3_3v;
+	status = "okay";
  };
 
  &spi1 {
--
Quoted 2 lines

2.29.2

Thanks

Patrick

#7 lore raw

PATCH 4/4 ARM: dts: stm32: Add USB OTG ID pin on DH AV96

In reply to Marek Vasut

Add USB OTG ID pin mux and switch the USB OTG port from peripheral to OTG mode.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts +2 -1
index 88f25d89b2..9b5dda318e 100644
@@ -192,7 +192,8 @@
 };
 
 &usbotg_hs {
-	dr_mode = "peripheral";
+	pinctrl-0 = <&usbotg_hs_pins_a>;
+	pinctrl-names = "default";
 	phys = <&usbphyc_port1 0>;
 	phy-names = "usb2-phy";
 	status = "okay";
Signature · 1 line
2.29.2

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

PATCH 4/4 ARM: dts: stm32: Add USB OTG ID pin on DH AV96

Hi Marek,

Quoted 27 lines

From: Marek Vasut <[email protected]>
Sent: mardi 1 d?cembre 2020 11:29

Add USB OTG ID pin mux and switch the USB OTG port from peripheral to OTG mode.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts +2 -2
index 88f25d89b2..9b5dda318e 100644
@@ -192,7 +192,8 @@
  };
 
  &usbotg_hs {
-	dr_mode = "peripheral";
+	pinctrl-0 = <&usbotg_hs_pins_a>;
+	pinctrl-names = "default";
  	phys = <&usbphyc_port1 0>;
  	phy-names = "usb2-phy";
  	status = "okay";
--
Quoted 2 lines

2.29.2

Thanks

Patrick

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

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

Hi Marek,

From: Marek Vasut <[email protected]>

Quoted 37 lines

Sent: mardi 1 d?cembre 2020 11:29

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 Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  arch/arm/dts/stm32mp15xx-dhcom.dtsi | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
arch/arm/dts/stm32mp15xx-dhcom.dtsi +14 -1
index f022d8395c..9049245c5b 100644
@@ -339,6 +339,20 @@
  	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";
  	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
--
Quoted 2 lines

2.29.2

For the serie:? the target is next or it is a bugfix for master / v2021.01 ?

Thanks

Patrick

#12 lore raw

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

Quoted 1 line · Patrick DELAUNAY

Hi Marek,

Hi,

[...]

Quoted 2 lines

For the serie:? the target is next or it is a bugfix for master / v2021.01 ?

This is for 2021.01 , it corrects a couple of random things here and there.

#13 lore raw

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

Hi Marek,

Quoted 5 lines · Marek Vasut
Quoted 1 line · Patrick DELAUNAY

Hi Marek,

Hi,

Quoted 7 lines

[...]

Quoted 2 lines

For the serie:? the target is next or it is a bugfix for master / v2021.01 ?

This is for 2021.01 , it corrects a couple of random things here and there.

For the serie:

Applied to u-boot-stm/master.

Thanks

Patrick