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

Chen-Yu Tsai wens at kernel.org
Fri Nov 20 07:34:56 PST 2026


On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay
<devnull+ipfarher.gmail.com at kernel.org> wrote:
>
> 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.

For sunxi we do not add MMC aliases. You are encouraged to use UUID or
PARTUUID for specifying root devices.

> 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