linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: allwinner: t527: orangepi-4a: Limit eMMC clock to 75 MHz
@ 2025-08-21 13:29 Chen-Yu Tsai
  2025-08-27 13:09 ` Andre Przywara
  0 siblings, 1 reply; 3+ messages in thread
From: Chen-Yu Tsai @ 2025-08-21 13:29 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: linux-sunxi, Andre Przywara, linux-arm-kernel, devicetree,
	linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The eMMC on the Orange Pi 4A doesn't function correctly at full speed
of 150 MHz under HS200 mode. Either the traces on the board or module
aren't great, or the SoC's internal delays are incorrect. Tuning the
pin drive strength did not help.

After some experimenting, 75 MHz was found to be stable enough. Use this
as the maximum frequency for now.

Fixes: de713ccb9934 ("arm64: dts: allwinner: t527: Add OrangePi 4A board")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
index c52d09cf0888..fb5311a46c2e 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
@@ -160,6 +160,7 @@ &mmc2 {
 	mmc-ddr-1_8v;
 	mmc-hs200-1_8v;
 	non-removable;
+	max-frequency = <75000000>;
 	vmmc-supply = <&reg_cldo3>;
 	vqmmc-supply = <&reg_cldo1>;
 	status = "okay";
-- 
2.39.5


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

* Re: [PATCH] arm64: dts: allwinner: t527: orangepi-4a: Limit eMMC clock to 75 MHz
  2025-08-27 13:09 ` Andre Przywara
@ 2025-08-27 13:09   ` Andre Przywara
  0 siblings, 0 replies; 3+ messages in thread
From: Andre Przywara @ 2025-08-27 13:09 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, linux-sunxi,
	linux-arm-kernel, devicetree, linux-kernel, Mikhail Kalashnikov

On Thu, 21 Aug 2025 21:29:35 +0800
Chen-Yu Tsai <wens@kernel.org> wrote:

Hi Chen-Yu,

> From: Chen-Yu Tsai <wens@csie.org>
> 
> The eMMC on the Orange Pi 4A doesn't function correctly at full speed
> of 150 MHz under HS200 mode. Either the traces on the board or module
> aren't great, or the SoC's internal delays are incorrect. Tuning the
> pin drive strength did not help.
> 
> After some experimenting, 75 MHz was found to be stable enough. Use this
> as the maximum frequency for now.
> 
> Fixes: de713ccb9934 ("arm64: dts: allwinner: t527: Add OrangePi 4A board")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> index c52d09cf0888..fb5311a46c2e 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> @@ -160,6 +160,7 @@ &mmc2 {
>  	mmc-ddr-1_8v;
>  	mmc-hs200-1_8v;
>  	non-removable;
> +	max-frequency = <75000000>;

I am not a big fan of this change, as it looks like we are papering over
something. I think the BSP runs it as a higher frequency just fine, can
you check that? Traditionally the BSP uses HS400, IIRC, maybe we should
finally bite the bullet and enable that?

Mikhail has some other assorted changes to beat his WalnutPi into
submission, among others a slight increase of the voltage, both I/O (1.9V)
and supply (3.4V). Also he increased the pins driving capability to 40mA,
did you try that?

On my boards I tried to lower the frequency as well, but didn't get
consistent results, though there was *some* improvement (at least probed
the block device and read the partition table). And I needed to go much
lower (40 MHz), so I wonder if this is all related to some bigger
underlying issue.

Cheers,
Andre

>  	vmmc-supply = <&reg_cldo3>;
>  	vqmmc-supply = <&reg_cldo1>;
>  	status = "okay";


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

* Re: [PATCH] arm64: dts: allwinner: t527: orangepi-4a: Limit eMMC clock to 75 MHz
  2025-08-21 13:29 [PATCH] arm64: dts: allwinner: t527: orangepi-4a: Limit eMMC clock to 75 MHz Chen-Yu Tsai
@ 2025-08-27 13:09 ` Andre Przywara
  2025-08-27 13:09   ` Andre Przywara
  0 siblings, 1 reply; 3+ messages in thread
From: Andre Przywara @ 2025-08-27 13:09 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, linux-sunxi,
	linux-arm-kernel, devicetree, linux-kernel, Mikhail Kalashnikov

On Thu, 21 Aug 2025 21:29:35 +0800
Chen-Yu Tsai <wens@kernel.org> wrote:

Hi Chen-Yu,

> From: Chen-Yu Tsai <wens@csie.org>
> 
> The eMMC on the Orange Pi 4A doesn't function correctly at full speed
> of 150 MHz under HS200 mode. Either the traces on the board or module
> aren't great, or the SoC's internal delays are incorrect. Tuning the
> pin drive strength did not help.
> 
> After some experimenting, 75 MHz was found to be stable enough. Use this
> as the maximum frequency for now.
> 
> Fixes: de713ccb9934 ("arm64: dts: allwinner: t527: Add OrangePi 4A board")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> index c52d09cf0888..fb5311a46c2e 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> @@ -160,6 +160,7 @@ &mmc2 {
>  	mmc-ddr-1_8v;
>  	mmc-hs200-1_8v;
>  	non-removable;
> +	max-frequency = <75000000>;

I am not a big fan of this change, as it looks like we are papering over
something. I think the BSP runs it as a higher frequency just fine, can
you check that? Traditionally the BSP uses HS400, IIRC, maybe we should
finally bite the bullet and enable that?

Mikhail has some other assorted changes to beat his WalnutPi into
submission, among others a slight increase of the voltage, both I/O (1.9V)
and supply (3.4V). Also he increased the pins driving capability to 40mA,
did you try that?

On my boards I tried to lower the frequency as well, but didn't get
consistent results, though there was *some* improvement (at least probed
the block device and read the partition table). And I needed to go much
lower (40 MHz), so I wonder if this is all related to some bigger
underlying issue.

Cheers,
Andre

>  	vmmc-supply = <&reg_cldo3>;
>  	vqmmc-supply = <&reg_cldo1>;
>  	status = "okay";


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

end of thread, other threads:[~2025-08-27 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 13:29 [PATCH] arm64: dts: allwinner: t527: orangepi-4a: Limit eMMC clock to 75 MHz Chen-Yu Tsai
2025-08-27 13:09 ` Andre Przywara
2025-08-27 13:09   ` Andre Przywara

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).