[PATCH 2/2] arm64: dts: rockchip: Fix the microSD's default sample phase on NanoPi Zero2

From: Sylvain LE FLOCH via B4 Relay

Date: Sat Dec 05 2026 - 16:48:47 EST


From: Sylvain LE FLOCH <vantom@xxxxxxxxxxxxx>

In SDR104 at 148.5 MHz, some cards pass the tuning block at every sample
phase. dw_mmc-rockchip then reports "All phases work" and uses
rockchip,default-sample-phase, which rk3528.dtsi sets to 90 degrees. On
the NanoPi Zero2 that phase is outside the window where data reads
work: with a SanDisk Extreme 32 GB card, reads fail, the card is
re-tuned and re-initialised over and over, and reading 1 GiB of it
gives up after 8 MiB.

With the same card, default phases of 180, 225, 270 and 315 degrees
each read 1 GiB without an error, at 56 to 69 MB/s. When tuning does
find failing phases, the windows it finds are centred at 241 to 281
degrees (281 with that card, 241 and 247 with a Samsung EVO Plus).

Use 270 degrees on this board, a multiple of 90 that needs no fine
delay element. With this change, on two boards, the SanDisk card reads
1 GiB in SDR104 at 55 to 68 MB/s (seven boots, five of them on the
default phase) and in SDR50 at 43 to 47 MB/s (four boots), without an
error, a re-tuning or a re-initialisation. The Samsung card, whose
tuning finds failing phases, is not affected: it still picks its own
phase (242 and 245 degrees) and reads 1 GiB at 58 to 60 MB/s.

Fixes: b944112abef4 ("arm64: dts: rockchip: Add FriendlyElec NanoPi Zero2")
Signed-off-by: Sylvain LE FLOCH <vantom@xxxxxxxxxxxxx>
---
arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts b/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts
index 2e43f1f4c2f3..eea46b07368e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3528-nanopi-zero2.dts
@@ -71,6 +71,10 @@ usb20_host1_pwren: usb20-host1-pwren {
};
};

+&sdmmc {
+ rockchip,default-sample-phase = <270>;
+};
+
&usb_host0_ehci {
status = "okay";
};

--
2.53.0