[PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Assign a fixed index to mmc devices

Subsystems: arm/amlogic meson soc support, the rest

STALE1764d

10 messages, 3 authors, 2021-10-02 · open the first message on its own page

[PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Assign a fixed index to mmc devices

From: Alexander Stein <hidden>
Date: 2021-01-27 23:15:06

Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.")

Signed-off-by: Alexander Stein <redacted>
---
I was wondering which order I should use. Depending in your booting
medium (SD card or eMMC) you 'want' one or the other as mmc0.
In the end I ordered them according to the names.

 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 050862cd0996..2faa4da917c1 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -13,6 +13,8 @@ / {
 	aliases {
 		serial0 = &uart_AO;
 		ethernet0 = &ethmac;
+		mmc0 = &sd_emmc_b;
+		mmc1 = &sd_emmc_c;
 	};
 
 	dioo2133: audio-amplifier-0 {
-- 
2.30.0

[PATCH v2 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Alexander Stein <hidden>
Date: 2021-02-02 17:07:32

Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.")

The unconventional order (B, C, A) is due to the fact that sd_emmc_a is
(according to the comments) only used for SDIO.

AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of
them enabled. So the alias order should match the previous non-async order
for all of them.

Signed-off-by: Alexander Stein <redacted>
---
Just for the records, I only tested this on my ODROID-N2 (G12 based) board.

 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi         | 6 ++++++
 2 files changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 9c90d562ada1..15525f3aa4a6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -17,6 +17,12 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc0 = &sd_emmc_b;
+		mmc1 = &sd_emmc_c;
+		mmc2 = &sd_emmc_a;
+	};
+
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 726b91d3a905..769d7e8fda13 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -21,6 +21,12 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc0 = &sd_emmc_b;
+		mmc1 = &sd_emmc_c;
+		mmc2 = &sd_emmc_a;
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;
-- 
2.30.0

Re: [PATCH v2 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Kevin Hilman <khilman@baylibre.com>
Date: 2021-02-03 19:21:22

Alexander Stein [off-list ref] writes:
quoted hunk
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.")

The unconventional order (B, C, A) is due to the fact that sd_emmc_a is
(according to the comments) only used for SDIO.

AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of
them enabled. So the alias order should match the previous non-async order
for all of them.

Signed-off-by: Alexander Stein <redacted>
---
Just for the records, I only tested this on my ODROID-N2 (G12 based) board.

 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi         | 6 ++++++
 2 files changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 9c90d562ada1..15525f3aa4a6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -17,6 +17,12 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc0 = &sd_emmc_b;
+		mmc1 = &sd_emmc_c;
+		mmc2 = &sd_emmc_a;
+	};
+
Thanks for updating this.

minor nit: as I suggested earlier, could you add comments here showing the
intention that mmc0 -> SD, mmc1 -> eMMC, mmc2 -> SDIO

Kevin

[PATCH v3 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Alexander Stein <hidden>
Date: 2021-02-03 19:30:03

Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.")

The unconventional order (B, C, A) is due to the fact that sd_emmc_a is
(according to the comments) only used for SDIO.

AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of
them enabled. So the alias order should match the previous non-async order
for all of them.

Signed-off-by: Alexander Stein <redacted>
---
Changes in v3:
* Added comment on intented ordering

 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi         | 6 ++++++
 2 files changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index 9c90d562ada1..f9a42f45ac52 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -17,6 +17,12 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc0 = &sd_emmc_b; /* SD card */
+		mmc1 = &sd_emmc_c; /* eMMC */
+		mmc2 = &sd_emmc_a; /* SDIO */
+	};
+
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 726b91d3a905..59d11f65c7b3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -21,6 +21,12 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	aliases {
+		mmc0 = &sd_emmc_b; /* SD card */
+		mmc1 = &sd_emmc_c; /* eMMC */
+		mmc2 = &sd_emmc_a; /* SDIO */
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;
-- 
2.30.0

Re: [PATCH v3 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Alexander Stein <hidden>
Date: 2021-02-18 18:24:26

Am Mittwoch, 3. Februar 2021, 20:28:24 CET schrieb Alexander Stein:
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign
a fixed index to mmc devices on rk3399 boards.")

The unconventional order (B, C, A) is due to the fact that sd_emmc_a is
(according to the comments) only used for SDIO.

AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of
them enabled. So the alias order should match the previous non-async order
for all of them.

Signed-off-by: Alexander Stein <redacted>
Any feedback on this?

Best regards,
Alexander

Re: [PATCH v3 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Kevin Hilman <khilman@baylibre.com>
Date: 2021-03-08 17:44:24

Alexander Stein [off-list ref] writes:
Am Mittwoch, 3. Februar 2021, 20:28:24 CET schrieb Alexander Stein:
quoted
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign
a fixed index to mmc devices on rk3399 boards.")

The unconventional order (B, C, A) is due to the fact that sd_emmc_a is
(according to the comments) only used for SDIO.

AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of
them enabled. So the alias order should match the previous non-async order
for all of them.

Signed-off-by: Alexander Stein <redacted>
Any feedback on this?
Sorry for the delay.

I somehow missed this v3 at the end of the v5.12 cycle, but I've queued
it up for v5.13 now so it should get broader testing in linux-next now.

Kevin

Re: [PATCH v3 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Alexander Stein <hidden>
Date: 2021-10-02 06:56:57

Hello Kevin,

Am Montag, 8. März 2021, 18:43:35 CEST schrieb Kevin Hilman:
[...]
Sorry for the delay.

I somehow missed this v3 at the end of the v5.12 cycle, but I've queued
it up for v5.13 now so it should get broader testing in linux-next now.
Was this patch [1] missed again by mistake? I can't find it in linux-next or 
anywhere else. [2] also shows that this commit is not referenced from any 
branch.

Best regards,
Alexander

[1] https://patchwork.kernel.org/project/linux-amlogic/patch/
20210203192824.854491-1-alexander.stein@mailbox.org/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?
id=7827db7f6141fda9af4b07864cab0c10398affff

Re: [PATCH v3 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Neil Armstrong <hidden>
Date: 2021-10-02 08:49:51

Hi Alexander,

Le 02/10/2021 à 08:56, Alexander Stein a écrit :
Hello Kevin,

Am Montag, 8. März 2021, 18:43:35 CEST schrieb Kevin Hilman:
quoted
[...]
Sorry for the delay.

I somehow missed this v3 at the end of the v5.12 cycle, but I've queued
it up for v5.13 now so it should get broader testing in linux-next now.
Was this patch [1] missed again by mistake? I can't find it in linux-next or 
anywhere else. [2] also shows that this commit is not referenced from any 
branch.
Look at https://github.com/torvalds/linux/blame/53d5fc89d66a778577295020dc57bb3ccec84354/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi#L21

The commit https://github.com/torvalds/linux/commit/ab547c4fb39fe145b39e3013633258a5ff475d88 is upstream since v5.13-rc1

Neil
Best regards,
Alexander

[1] https://patchwork.kernel.org/project/linux-amlogic/patch/
20210203192824.854491-1-alexander.stein@mailbox.org/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?
id=7827db7f6141fda9af4b07864cab0c10398affff

Re: [PATCH v3 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Alexander Stein <hidden>
Date: 2021-10-02 08:54:37

Hello Neil,

Am Samstag, 2. Oktober 2021, 10:49:46 CEST schrieb Neil Armstrong:
Look at
https://github.com/torvalds/linux/blame/53d5fc89d66a778577295020dc57bb3ccec
84354/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi#L21

The commit
https://github.com/torvalds/linux/commit/ab547c4fb39fe145b39e3013633258a5ff
475d88 is upstream since v5.13-rc1
Ah, the SHA1 changed. Dunno why I didn't see it in mainline though.
Thanks for the update and sorry for the noise.

Best regards,
Alexander


Re: [PATCH v3 1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices

From: Kevin Hilman <khilman@baylibre.com>
Date: 2021-03-08 17:40:09

On Wed, 3 Feb 2021 20:28:24 +0100, Alexander Stein wrote:
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs
are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/

Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.")

[...]
Applied, thanks!

[1/1] arm64: dts: amlogic: Assign a fixed index to mmc devices
      commit: 7827db7f6141fda9af4b07864cab0c10398affff

Best regards,
-- 
Kevin Hilman [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help