Skip to contentSkip to conversation

ARM: dts: bcm2711-rpi-4-b: Use aliases to set custom MMC device index

PATCH In review Ariel D'Alessandro 4 participants 5 messages Jun 8, 2022 – Jun 14, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: bcm2711-rpi-4-b: Use aliases to set custom MMC device index

Add MMC aliases to ensure that the /dev/mmcblk ID for SD card won't change depending on the probe order of the MMC drivers.

---
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm2711-rpi-4-b.dts +4 -0
index 4432412044de..780812542bad 100644
@@ -14,6 +14,10 @@ chosen {
 		stdout-path = "serial1:115200n8";
 	};
 
+	aliases {
+		mmc0 = &emmc2;	/* mmcblk0 for SD */
+	};
+
 	leds {
 		led-act {
 			gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Ariel D'Alessandro

Add MMC aliases to ensure that the /dev/mmcblk ID for SD card won't change depending on the probe order of the MMC drivers.

Is the bcm2711-rpi.dtsi a better place for it given there's other aliases there and it will be consistent across variations?

Quoted 28 lines
---
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm2711-rpi-4-b.dts +4 -1
index 4432412044de..780812542bad 100644
@@ -14,6 +14,10 @@ chosen {
                stdout-path = "serial1:115200n8";
        };
 
+       aliases {
+               mmc0 = &emmc2;  /* mmcblk0 for SD */
+       };
+
        leds {
                led-act {
                        gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
--

2.34.1

_______________________________________________
linux-rpi-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

#2 lore raw

Hi Peter,

Quoted 8 lines · Peter Robinson
Quoted 3 lines · Ariel D'Alessandro

Add MMC aliases to ensure that the /dev/mmcblk ID for SD card won't change depending on the probe order of the MMC drivers.

Is the bcm2711-rpi.dtsi a better place for it given there's other aliases there and it will be consistent across variations?

Yes, indeed, it makes sense moving it to bcm2711-rpi.dtsi

The other board what will be affected by this alias is the Raspberry Pi Compute Module 4 IO Board, on which emmc2 is the eMMC. However, the alias makes sense, to have that as the first mmc device.

Maybe we can add the alias as follows?

    mmc0 = &emmc2;  /* mmcblk0 for eMMC/SD */

Regards,
Ariel

Quoted 25 lines
Quoted 25 lines
---
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/bcm2711-rpi-4-b.dts +4 -1
index 4432412044de..780812542bad 100644
@@ -14,6 +14,10 @@ chosen {
                stdout-path = "serial1:115200n8";
        };
 
+       aliases {
+               mmc0 = &emmc2;  /* mmcblk0 for SD */
+       };
+
        leds {
                led-act {
                        gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
--

2.34.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
linux-rpi-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw
Quoted 14 lines · Ariel D'Alessandro

Hi Peter,

Quoted 8 lines · Peter Robinson
Quoted 3 lines · Ariel D'Alessandro

Add MMC aliases to ensure that the /dev/mmcblk ID for SD card won't change depending on the probe order of the MMC drivers.

Is the bcm2711-rpi.dtsi a better place for it given there's other aliases there and it will be consistent across variations?

Yes, indeed, it makes sense moving it to bcm2711-rpi.dtsi

Quoted 7 lines

The other board what will be affected by this alias is the Raspberry Pi Compute Module 4 IO Board, on which emmc2 is the eMMC. However, the alias makes sense, to have that as the first mmc device.

Maybe we can add the alias as follows?

     mmc0 = &emmc2;  /* mmcblk0 for eMMC/SD */

You have made a typo on the bcm-kernel-feedback-list meaning that this won't reach the patchwork instance I use to manage and apply patches, can you please fix that up for your v2? Thanks!

Signature · 1 line
Florian
#4 lore raw

Am 14.06.22 um 01:34 schrieb Florian Fainelli:

Quoted 19 lines · Ariel D'Alessandro
Quoted 18 lines

Hi Peter,

Quoted 8 lines · Peter Robinson
Quoted 3 lines · Ariel D'Alessandro

Add MMC aliases to ensure that the /dev/mmcblk ID for SD card won't change depending on the probe order of the MMC drivers.

Is  the bcm2711-rpi.dtsi a better place for it given there's other aliases there and it will be consistent across variations?

Yes, indeed, it makes sense moving it to bcm2711-rpi.dtsi

The other board what will be affected by this alias is the Raspberry Pi Compute Module 4 IO Board, on which emmc2 is the eMMC. However, the alias makes sense, to have that as the first mmc device.

Quoted 5 lines
Quoted 3 lines

Maybe we can add the alias as follows?

     mmc0 = &emmc2;  /* mmcblk0 for eMMC/SD */

You have made a typo on the bcm-kernel-feedback-list meaning that this won't reach the patchwork instance I use to manage and apply patches, can you please fix that up for your v2? Thanks!

Not just the bcm-kernel-feedback-list is affected, also the address of Krzysztof, Rob and Nicolas has a g prepended.