linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM
@ 2020-12-01 11:14 Marek Vasut
  2020-12-01 11:14 ` [PATCH 2/2] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock Marek Vasut
  2021-01-14 14:54 ` [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM Alexandre TORGUE
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Vasut @ 2020-12-01 11:14 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marek Vasut, Alexandre Torgue, Patrice Chotard, Patrick Delaunay,
	Maxime Coquelin, linux-stm32

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.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
---
 arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
index daff5318f301..97c6e0cd582c 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
@@ -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>;
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock
  2020-12-01 11:14 [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM Marek Vasut
@ 2020-12-01 11:14 ` Marek Vasut
  2021-01-14 14:54   ` Alexandre TORGUE
  2021-01-14 14:54 ` [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM Alexandre TORGUE
  1 sibling, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2020-12-01 11:14 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marek Vasut, Alexandre Torgue, Patrice Chotard, Patrick Delaunay,
	Maxime Coquelin, linux-stm32

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.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
---
 arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
index 97c6e0cd582c..2a20818c91e4 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
@@ -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";
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM
  2020-12-01 11:14 [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM Marek Vasut
  2020-12-01 11:14 ` [PATCH 2/2] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock Marek Vasut
@ 2021-01-14 14:54 ` Alexandre TORGUE
  1 sibling, 0 replies; 4+ messages in thread
From: Alexandre TORGUE @ 2021-01-14 14:54 UTC (permalink / raw)
  To: Marek Vasut, linux-arm-kernel
  Cc: Maxime Coquelin, linux-stm32, Alexandre Torgue, Patrick Delaunay,
	Patrice Chotard

Hi Marek

On 12/1/20 12:14 PM, Marek Vasut wrote:
> 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.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: linux-stm32@st-md-mailman.stormreply.com
> To: linux-arm-kernel@lists.infradead.org
> ---
>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> index daff5318f301..97c6e0cd582c 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> @@ -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>;
> 

Applied on stm32-next.

Thanks.
Alex

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock
  2020-12-01 11:14 ` [PATCH 2/2] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock Marek Vasut
@ 2021-01-14 14:54   ` Alexandre TORGUE
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre TORGUE @ 2021-01-14 14:54 UTC (permalink / raw)
  To: Marek Vasut, linux-arm-kernel
  Cc: Maxime Coquelin, linux-stm32, Alexandre Torgue, Patrick Delaunay,
	Patrice Chotard

Hi Marek

On 12/1/20 12:14 PM, Marek Vasut wrote:
> 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.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: linux-stm32@st-md-mailman.stormreply.com
> To: linux-arm-kernel@lists.infradead.org
> ---
>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> index 97c6e0cd582c..2a20818c91e4 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
> @@ -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
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-14 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 11:14 [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM Marek Vasut
2020-12-01 11:14 ` [PATCH 2/2] ARM: dts: stm32: Disable SDMMC1 CKIN feedback clock Marek Vasut
2021-01-14 14:54   ` Alexandre TORGUE
2021-01-14 14:54 ` [PATCH 1/2] ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM Alexandre TORGUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).