mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: sun7i: a20: fix MMC index enumeration
Date: Wed, 14 Jan 2026 18:50:00 +0100	[thread overview]
Message-ID: <40e45abf-7640-49a6-814b-9924510395c1@benettiengineering.com> (raw)
In-Reply-To: <20260114140653.05365221@orionap.fritz.box>

On 1/14/26 15:06, Andre Przywara wrote:
> On Wed, 14 Jan 2026 11:50:04 +0100
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
> Hi Giulio,
> 
>> Currently, the OLinuXino-A20-Micro experiences non-deterministic MMC
>> enumeration during boot. When both an SDIO WiFi module (MMC1) and
>> an SD card (MMC0) are present, the kernel may swap their indices.
>>
>> Explicitly define mmc* aliases to ensure consistent device naming
>> and prevent mapping conflicts.
> 
> So this comes up every now and then, but for sunxi it was decided to not
> support this. The enumeration of devices in the kernel is never guaranteed
> to follow some order, and this is widely accepted for SCSI (/dev/sda) and
> NVMe. Distros are coping with this forever since, using more sustainable
> designations like UUIDs or labels.

I see,

> If you don't want to change the way you communicate the root device to the
> kernel, you can actually use U-Boot's DTs, which adds the indicies for its
> own purposes, and can pass this on to the kernel. Just don't load a DT
> from storage (which you shouldn't be doing anyways), and just use
> $fdtcontroladdr as the DT address when booting the kernel.

Thanks for pointing, let's see if Buildroot Maintainers accept this
patch as is, otherwise I'll probably go with UUID.

Thank you for taking care and explaining.

Best regards
Giulio

> Cheers,
> Andre
> 
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   arch/arm/boot/dts/allwinner/sun7i-a20.dtsi | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/allwinner/sun7i-a20.dtsi b/arch/arm/boot/dts/allwinner/sun7i-a20.dtsi
>> index 5f44f09c5545..a958400bcd7c 100644
>> --- a/arch/arm/boot/dts/allwinner/sun7i-a20.dtsi
>> +++ b/arch/arm/boot/dts/allwinner/sun7i-a20.dtsi
>> @@ -55,6 +55,10 @@ / {
>>   	#size-cells = <1>;
>>   
>>   	aliases {
>> +		mmc0 = &mmc0;
>> +		mmc1 = &mmc1;
>> +		mmc2 = &mmc2;
>> +		mmc3 = &mmc3;
>>   		ethernet0 = &gmac;
>>   	};
>>   
> 



  reply	other threads:[~2026-01-14 17:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 10:50 Giulio Benetti
2026-01-14 14:06 ` Andre Przywara
2026-01-14 17:50   ` Giulio Benetti [this message]
2026-01-14 14:07 ` Chen-Yu Tsai
2026-01-14 17:50   ` Giulio Benetti

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=40e45abf-7640-49a6-814b-9924510395c1@benettiengineering.com \
    --to=giulio.benetti@benettiengineering.com \
    --cc=andre.przywara@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.org \
    /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

all inboxes | Powered by JetHome®