linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases
@ 2022-10-28 14:18 Detlev Casanova
  2022-11-11  2:52 ` Shawn Guo
  2022-11-14  8:25 ` Shawn Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Detlev Casanova @ 2022-10-28 14:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Detlev Casanova

If not specified, the mmc0 and mmc1 devices will be the devices
mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6
Sabrelite devices.

The actual SD card reader devices are the ones at mmc@2198000 and
mmc@219c000.

Set aliases to use the correct mmc devices order.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
index 22f8e2783cdf..12573e1f917c 100644
--- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
@@ -14,6 +14,11 @@ chosen {
 		stdout-path = &uart2;
 	};
 
+	aliases {
+		mmc0 = &usdhc3;
+		mmc1 = &usdhc4;
+	};
+
 	memory@10000000 {
 		device_type = "memory";
 		reg = <0x10000000 0x40000000>;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases
  2022-10-28 14:18 [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases Detlev Casanova
@ 2022-11-11  2:52 ` Shawn Guo
  2022-11-11 19:35   ` Detlev Casanova
  2022-11-14  8:25 ` Shawn Guo
  1 sibling, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2022-11-11  2:52 UTC (permalink / raw)
  To: Detlev Casanova
  Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote:
> If not specified, the mmc0 and mmc1 devices will be the devices
> mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6
> Sabrelite devices.
> 
> The actual SD card reader devices are the ones at mmc@2198000 and
> mmc@219c000.
> 
> Set aliases to use the correct mmc devices order.

Is this something never worked or a regression?  For the latter, we may
need a Fixes tag?

Shawn

> 
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
>  arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
> index 22f8e2783cdf..12573e1f917c 100644
> --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
> @@ -14,6 +14,11 @@ chosen {
>  		stdout-path = &uart2;
>  	};
>  
> +	aliases {
> +		mmc0 = &usdhc3;
> +		mmc1 = &usdhc4;
> +	};
> +
>  	memory@10000000 {
>  		device_type = "memory";
>  		reg = <0x10000000 0x40000000>;
> -- 
> 2.38.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases
  2022-11-11  2:52 ` Shawn Guo
@ 2022-11-11 19:35   ` Detlev Casanova
  2022-11-28  8:42     ` Ahmad Fatoum
  0 siblings, 1 reply; 5+ messages in thread
From: Detlev Casanova @ 2022-11-11 19:35 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thursday, November 10, 2022 9:52:32 P.M. EST Shawn Guo wrote:
> On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote:
> > If not specified, the mmc0 and mmc1 devices will be the devices
> > mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6
> > Sabrelite devices.
> > 
> > The actual SD card reader devices are the ones at mmc@2198000 and
> > mmc@219c000.
> > 
> > Set aliases to use the correct mmc devices order.
> 
> Is this something never worked or a regression?  For the latter, we may
> need a Fixes tag?

These were apparently never set in the kernel device-tree and added manually 
in u-boot when dts are synced.

Because most distributions use UUIDs in fstab, it is not a big problem in 
Linux, just that the SD card is called /dev/mmcblk2. I would say that this has 
always been an issue in Linux.

> Shawn
> 
> > Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> > ---
> > 
> >  arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
> > b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index
> > 22f8e2783cdf..12573e1f917c 100644
> > --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
> > +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
> > @@ -14,6 +14,11 @@ chosen {
> > 
> >  		stdout-path = &uart2;
> >  	
> >  	};
> > 
> > +	aliases {
> > +		mmc0 = &usdhc3;
> > +		mmc1 = &usdhc4;
> > +	};
> > +
> > 
> >  	memory@10000000 {
> >  	
> >  		device_type = "memory";
> >  		reg = <0x10000000 0x40000000>;





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases
  2022-10-28 14:18 [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases Detlev Casanova
  2022-11-11  2:52 ` Shawn Guo
@ 2022-11-14  8:25 ` Shawn Guo
  1 sibling, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2022-11-14  8:25 UTC (permalink / raw)
  To: Detlev Casanova
  Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote:
> If not specified, the mmc0 and mmc1 devices will be the devices
> mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6
> Sabrelite devices.
> 
> The actual SD card reader devices are the ones at mmc@2198000 and
> mmc@219c000.
> 
> Set aliases to use the correct mmc devices order.
> 
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases
  2022-11-11 19:35   ` Detlev Casanova
@ 2022-11-28  8:42     ` Ahmad Fatoum
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2022-11-28  8:42 UTC (permalink / raw)
  To: Detlev Casanova, Shawn Guo
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Krzysztof Kozlowski, Sascha Hauer, linux-kernel, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, Fabio Estevam,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hello Detlev,
Hello Shawn,

On 11.11.22 20:35, Detlev Casanova wrote:
> On Thursday, November 10, 2022 9:52:32 P.M. EST Shawn Guo wrote:
>> On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote:
>>> If not specified, the mmc0 and mmc1 devices will be the devices
>>> mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6
>>> Sabrelite devices.
>>>
>>> The actual SD card reader devices are the ones at mmc@2198000 and
>>> mmc@219c000.
>>>
>>> Set aliases to use the correct mmc devices order.
>>
>> Is this something never worked or a regression?  For the latter, we may
>> need a Fixes tag?
> 
> These were apparently never set in the kernel device-tree and added manually 
> in u-boot when dts are synced.
> 
> Because most distributions use UUIDs in fstab, it is not a big problem in 
> Linux, just that the SD card is called /dev/mmcblk2. I would say that this has 
> always been an issue in Linux.

We already have aliases in imx6qdl.dtsi. Existing Installations that hardcode
root=mmcblk2 _will_ be broken by this change. Installations that are fixed
by this change have never worked properly, because prior to commit fa2d0aa96941
("mmc: core: Allow setting slot index via device tree alias"), it depended
on probe order and/or whether a card was present.

Whether SD/eMMC comes first or if they start at 0 or 2 is just cosmetic.
The alias order corresponds with the order in the data sheet and that's a
good default and I see no reason to change this here and risk breakage.

I thus don't think this patch should go mainline.

Thanks,
Ahmad

> 
>> Shawn
>>
>>> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
>>> ---
>>>
>>>  arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
>>> b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index
>>> 22f8e2783cdf..12573e1f917c 100644
>>> --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
>>> +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
>>> @@ -14,6 +14,11 @@ chosen {
>>>
>>>  		stdout-path = &uart2;
>>>  	
>>>  	};
>>>
>>> +	aliases {
>>> +		mmc0 = &usdhc3;
>>> +		mmc1 = &usdhc4;
>>> +	};
>>> +
>>>
>>>  	memory@10000000 {
>>>  	
>>>  		device_type = "memory";
>>>  		reg = <0x10000000 0x40000000>;
> 
> 
> 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-28  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 14:18 [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases Detlev Casanova
2022-11-11  2:52 ` Shawn Guo
2022-11-11 19:35   ` Detlev Casanova
2022-11-28  8:42     ` Ahmad Fatoum
2022-11-14  8:25 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).