Skip to contentSkip to conversation

ARM: dts: exynos: Assign a fixed index to mmc devices on exynos4412 based ODROID boards

PATCH In review Markus Reichl 4 participants 10 messages Nov 4, 2020 – Nov 5, 2020

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

PATCH 1/1 ARM: dts: exynos: Assign a fixed index to mmc devices on exynos4412 based ODROID boards

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +5 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644
@@ -13,6 +13,11 @@
 #include "exynos-mfc-reserved-memory.dtsi"
 
 / {
+	aliases {
+		mmc0 = &sdhci_2;
+		mmc1 = &mshc_0;
+	};
+
 	chosen {
 		stdout-path = &serial_1;
 	};
Signature · 1 line
2.20.1
#1 lore raw

Hi Markus,

Quoted 17 lines · Markus Reichl

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 18

Quoted 6 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
@@ -13,6 +13,11 @@
  #include "exynos-mfc-reserved-memory.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdhci_2;
+		mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 23

Quoted 5 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +2 -0
+	};
+
  	chosen {
  		stdout-path = &serial_1;
  	};

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#2 lore raw

Hi Marek,

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 22 lines

Hi Markus,

Quoted 19 lines · Markus Reichl

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644
@@ -13,6 +13,11 @@
  #include "exynos-mfc-reserved-memory.dtsi"
 
Quoted 7 lines

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 18

Quoted 4 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
  / {
+	aliases {
+		mmc0 = &sdhci_2;
+		mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

This would break present and long standing boot ordering in mainline, which is mmcblk0 = SD-card and
mmcblk1 = eMMC

Still desired?

Quoted 9 lines

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 23

Quoted 6 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +2 -0
+	};
+
  	chosen {
  		stdout-path = &serial_1;
  	};

Best regards

Gruß,

Signature · 1 line
Markus Reichl
#3 lore raw
In reply to Marek Szyprowski

Hi Marek,

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 22 lines

Hi Markus,

Quoted 19 lines · Markus Reichl

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical. Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644
@@ -13,6 +13,11 @@
  #include "exynos-mfc-reserved-memory.dtsi"
 
Quoted 7 lines

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 18

Quoted 4 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
  / {
+	aliases {
+		mmc0 = &sdhci_2;
+		mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

How to deal then with sdhci_0 (from exynos4.dtsi) vc. mshc_0 (from exynos4412.dts)?

Quoted 9 lines

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 23

Quoted 6 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +2 -0
+	};
+
  	chosen {
  		stdout-path = &serial_1;
  	};

Best regards

Gruß,

Signature · 1 line
Markus Reichl
#4 lore raw

Hi Markus,

Quoted 30 lines · Markus Reichl

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 14 lines · Markus Reichl
Quoted 13 lines

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical.
Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++

  1 file changed, 5 insertions(+)
Quoted 14 lines

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 17

Quoted 11 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644
@@ -13,6 +13,11 @@
   #include "exynos-mfc-reserved-memory.dtsi"
     / {
+    aliases {
+        mmc0 = &sdhci_2;
+        mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

Quoted 2 lines

How to deal then with sdhci_0 (from exynos4.dtsi) vc. mshc_0 (from exynos4412.dts)?

sdhci_0 and mshc_0 both operate on the same physical MMC0 bus, so this is not an issue. They cannot be used simultaneously. The latter is just faster, the first one has been left there mainly for the software compatibility.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#5 lore raw
Quoted 29 lines · Marek Szyprowski
Quoted 28 lines · Markus Reichl

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 27 lines · Markus Reichl
Quoted 19 lines

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical.
Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
   arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
   1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 17

Quoted 5 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
@@ -13,6 +13,11 @@
   #include "exynos-mfc-reserved-memory.dtsi"
     / {
+    aliases {
+        mmc0 = &sdhci_2;
+        mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

Quoted 6 lines
Quoted 2 lines

How to deal then with sdhci_0 (from exynos4.dtsi) vc. mshc_0 (from exynos4412.dts)?

sdhci_0 and mshc_0 both operate on the same physical MMC0 bus, so this is not an issue. They cannot be used simultaneously. The latter is just faster, the first one has been left there mainly for the software compatibility.

I've thought a bit more on this and I would simply prefer to add generic MMC aliases to the top-level Exynos dtsi files (3250, 4210, 4412, 5250, 5410, 5420) to keep Linux logical MMC bus numbers in sync with the HW bus numbers on all boards.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#6 lore raw

Hi Marek,

Am 04.11.20 um 14:44 schrieb Marek Szyprowski:

Quoted 37 lines · Marek Szyprowski
Quoted 29 lines · Markus Reichl
Quoted 28 lines

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 27 lines · Markus Reichl
Quoted 19 lines

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical.
Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
   arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
   1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 17

Quoted 5 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
@@ -13,6 +13,11 @@
   #include "exynos-mfc-reserved-memory.dtsi"
     / {
+    aliases {
+        mmc0 = &sdhci_2;
+        mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

Quoted 6 lines
Quoted 2 lines

How to deal then with sdhci_0 (from exynos4.dtsi) vc. mshc_0 (from exynos4412.dts)?

sdhci_0 and mshc_0 both operate on the same physical MMC0 bus, so this is not an issue. They cannot be used simultaneously. The latter is just faster, the first one has been left there mainly for the software compatibility.

Quoted 4 lines

I've thought a bit more on this and I would simply prefer to add generic MMC aliases to the top-level Exynos dtsi files (3250, 4210, 4412, 5250, 5410, 5420) to keep Linux logical MMC bus numbers in sync with the HW bus numbers on all boards.

Ok, fine with me.
As this is beyond my knowledge I would like leave this task with you.

Quoted 3 lines

Best regards

Gruß,

Signature · 1 line
Markus Reichl
#7 lore raw
In reply to Marek Szyprowski
Quoted 37 lines · Marek Szyprowski
Quoted 29 lines · Marek Szyprowski
Quoted 28 lines · Markus Reichl

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 27 lines · Markus Reichl
Quoted 19 lines

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical.
Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
   arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
   1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 17

Quoted 5 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
@@ -13,6 +13,11 @@
   #include "exynos-mfc-reserved-memory.dtsi"
     / {
+    aliases {
+        mmc0 = &sdhci_2;
+        mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

Quoted 6 lines
Quoted 2 lines

How to deal then with sdhci_0 (from exynos4.dtsi) vc. mshc_0 (from exynos4412.dts)?

sdhci_0 and mshc_0 both operate on the same physical MMC0 bus, so this is not an issue. They cannot be used simultaneously. The latter is just faster, the first one has been left there mainly for the software compatibility.

Quoted 4 lines

I've thought a bit more on this and I would simply prefer to add generic MMC aliases to the top-level Exynos dtsi files (3250, 4210, 4412, 5250, 5410, 5420) to keep Linux logical MMC bus numbers in sync with the HW bus numbers on all boards.

I like this approach - I don't see much benefit of having different numbering between boards of the same SoC.

Let's match old U-Boot behavior (I assume that people switch to PARTUUID around the v4.0 mixup, so they should not be affected).

Best regards,
Krzysztof

#8 lore raw
In reply to Marek Szyprowski

Hi Marek,

on rk3399 the proposed ordering [1] is according to base address in DT.

[1]
https://patchwork.kernel.org/patch/11881427

Am 04.11.20 um 14:44 schrieb Marek Szyprowski:

Quoted 37 lines · Marek Szyprowski
Quoted 29 lines · Markus Reichl
Quoted 28 lines

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 27 lines · Markus Reichl
Quoted 19 lines

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical.
Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
   arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++
   1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 17

Quoted 5 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
@@ -13,6 +13,11 @@
   #include "exynos-mfc-reserved-memory.dtsi"
     / {
+    aliases {
+        mmc0 = &sdhci_2;
+        mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

Quoted 6 lines
Quoted 2 lines

How to deal then with sdhci_0 (from exynos4.dtsi) vc. mshc_0 (from exynos4412.dts)?

sdhci_0 and mshc_0 both operate on the same physical MMC0 bus, so this is not an issue. They cannot be used simultaneously. The latter is just faster, the first one has been left there mainly for the software compatibility.

Quoted 7 lines

I've thought a bit more on this and I would simply prefer to add generic MMC aliases to the top-level Exynos dtsi files (3250, 4210, 4412, 5250, 5410, 5420) to keep Linux logical MMC bus numbers in sync with the HW bus numbers on all boards.

Best regards

Gruß,

Signature · 1 line
Markus Reichl
#9 lore raw
Quoted 3 lines · Markus Reichl

Hi Marek,

on rk3399 the proposed ordering [1] is according to base address in DT.

FWIW, note that in RK3399's case the SoC itself provides no logical numbering to follow - the pin groups are named "EMMC", "SDIO0" and "SDMMC0" in the datasheet, while the TRM uses "emmc", "sdio" and "sdmmc" in signal and register names.

If the SoC *does* have an inherent notion of numbered interfaces, I would agree that following that numbering is the most logical thing to do.

Robin.

Quoted 57 lines

[1]
https://patchwork.kernel.org/patch/11881427

Am 04.11.20 um 14:44 schrieb Marek Szyprowski:

Quoted 37 lines · Marek Szyprowski
Quoted 29 lines · Markus Reichl
Quoted 28 lines

Am 04.11.20 um 13:25 schrieb Marek Szyprowski:

Quoted 27 lines · Markus Reichl
Quoted 19 lines

Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in evironments where UUIDs ar not practical.
Use newly introduced aliases for mmcblk devices from [1].

[1]
https://patchwork.kernel.org/patch/11747669/

---
   arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 +++++

   1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -0
index a5c1ce1e396c..aa10d5bc7e1c 100644

arch/arm/boot/dts/exynos4412-odroid-common.dtsi line 17

Quoted 5 lines
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +3 -0
@@ -13,6 +13,11 @@
    #include "exynos-mfc-reserved-memory.dtsi"
      / {
+    aliases {
+        mmc0 = &sdhci_2;
+        mmc1 = &mshc_0;

Like in the OdroidXU3-family patch, I would use 0 for the eMMC (mshc_0) and 2 for the SD-card (sdhci_2).

Quoted 6 lines
Quoted 2 lines

How to deal then with sdhci_0 (from exynos4.dtsi) vc. mshc_0 (from exynos4412.dts)?

sdhci_0 and mshc_0 both operate on the same physical MMC0 bus, so this is not an issue. They cannot be used simultaneously. The latter is just faster, the first one has been left there mainly for the software compatibility.

Quoted 7 lines

I've thought a bit more on this and I would simply prefer to add generic MMC aliases to the top-level Exynos dtsi files (3250, 4210, 4412, 5250, 5410, 5420) to keep Linux logical MMC bus numbers in sync with the HW bus numbers on all boards.

Best regards

Gruß,

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