[PATCH 4/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Add MMC aliases

Ivan Pfarher via B4 Relay devnull+ipfarher.gmail.com at kernel.org
Fri Nov 20 03:40:48 PST 2026


From: Ivan Pfarher <ipfarher at gmail.com>

sunxi-mmc probes asynchronously, so without aliases the microSD card,
the SDIO WiFi and the eMMC get their mmc numbers in probe order. A boot
script using root=/dev/mmcblk0p2 for the microSD card can then end up
on the eMMC instead.

Add aliases so that the microSD card is always mmc0 and the eMMC mmc1,
matching the numbering U-Boot uses on this board, with the SDIO WiFi
as mmc2.

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this
change applied: the microSD card is mmcblk0 and the eMMC mmcblk1,
booting from either. Build-tested only against current mainline.

This problem was investigated, and the patch drafted, in an interactive
session with an AI coding assistant (Claude by Anthropic). The submitter
reviewed the change and ran the tests described above.

Signed-off-by: Ivan Pfarher <ipfarher at gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index 892723b46..4a26863e8 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -13,6 +13,9 @@
 	compatible = "xunlong,orangepi-zero-plus2", "allwinner,sun50i-h5";
 
 	aliases {
+		mmc0 = &mmc0;
+		mmc1 = &mmc2;
+		mmc2 = &mmc1;
 		serial0 = &uart0;
 	};
 

-- 
2.43.0





More information about the linux-arm-kernel mailing list