From: Sylvain LE FLOCH via B4 Relay <devnull+vantom.protonmail.ch@kernel.org>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Jonas Karlman <jonas@kwiboo.se>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org,
Sylvain LE FLOCH <vantom@protonmail.ch>
Subject: [PATCH 2/2] arm64: dts: rockchip: Fix the microSD's default sample phase on NanoPi Zero2
Date: Sat, 05 Dec 2026 22:45:35 +0100 [thread overview]
Message-ID: <20261205-zero2-dts-v1-2-eb08c4eb5ab3@protonmail.ch> (raw)
In-Reply-To: <20261205-zero2-dts-v1-0-eb08c4eb5ab3@protonmail.ch>
From: Sylvain LE FLOCH <vantom@protonmail.ch>
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@protonmail.ch>
---
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
next prev parent reply other threads:[~2026-12-05 21:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 21:45 [PATCH 0/2] arm64: dts: rockchip: NanoPi Zero2: enable PCIe, fix the microSD sample phase Sylvain LE FLOCH via B4 Relay
2026-12-05 21:45 ` [PATCH 1/2] arm64: dts: rockchip: Enable PCIe for the M.2 slot on NanoPi Zero2 Sylvain LE FLOCH via B4 Relay
2026-12-05 22:00 ` sashiko-bot
2026-12-05 21:45 ` Sylvain LE FLOCH via B4 Relay [this message]
2026-12-05 22:05 ` [PATCH 2/2] arm64: dts: rockchip: Fix the microSD's default sample phase " sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261205-zero2-dts-v1-2-eb08c4eb5ab3@protonmail.ch \
--to=devnull+vantom.protonmail.ch@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jonas@kwiboo.se \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
--cc=vantom@protonmail.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox