Skip to contentSkip to conversation

imx6: Re-add mmc aliases

PATCH In review Detlev Casanova 4 participants 7 messages Dec 8, 2022 – Jan 31, 2023

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

PATCH v2 1/1 imx6: Re-add mmc aliases

In commit d0399a46e7cda63c07e3eb8558bef84cfb068028, the device tree was synchronized from linux and the aliases were dropped.

They need to be kept so that the mmc cards are in the right order. Without the aliases, u-boot reports:
MMC: FSL_SDHC: 2, FSL_SDHC: 3

With the aliases, u-boot reports:
MMC: FSL_SDHC: 0, FSL_SDHC: 1

The upstream linux device tree does not contain the same aliases than u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3). Because this board has been using different aliases in u-boot and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be automatically included in imx6q-sabrelite.dts.

This way, linux and u-boot each keep their own aliases and there is no breakage on current installations.

This should never be done for new boards as we want to keep linux and u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

Gbp-Pq: Topic apertis/imx6
Gbp-Pq: Name 0010-imx6-Re-add-mmc-aliases.patch

---
 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi
arch/arm/dts/imx6q-sabrelite-u-boot.dtsi new file +15 -0
new file mode 100644
index 0000000000..706ec9ba25
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2022 Collabora
+ */
+
+#include "imx6qdl-u-boot.dtsi"
+
+/ {
+	aliases {
+		mmc0 = &usdhc3;
+		mmc1 = &usdhc4;
+		pwm_lcd = &pwm1;
+		pwm_lvds = &pwm4;
+	};
+};
Signature · 1 line
2.38.1
reviewer
#1 lore raw

Hi Detlev,

[Please keep Troy on Cc as he is the board maintainer]

Subject should be:

imx6q-sabrelite: Re-add mmc aliases

Quoted 20 lines · Detlev Casanova

In commit d0399a46e7cda63c07e3eb8558bef84cfb068028, the device tree was synchronized from linux and the aliases were dropped.

They need to be kept so that the mmc cards are in the right order. Without the aliases, u-boot reports:
MMC: FSL_SDHC: 2, FSL_SDHC: 3

With the aliases, u-boot reports:
MMC: FSL_SDHC: 0, FSL_SDHC: 1

The upstream linux device tree does not contain the same aliases than u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3). Because this board has been using different aliases in u-boot and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be automatically included in imx6q-sabrelite.dts.

This way, linux and u-boot each keep their own aliases and there is no breakage on current installations.

Quoted 8 lines

This should never be done for new boards as we want to keep linux and u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

Gbp-Pq: Topic apertis/imx6
Gbp-Pq: Name 0010-imx6-Re-add-mmc-aliases.patch

These two lines should be removed.

arch/arm/dts/imx6q-sabrelite-u-boot.dtsi line 13

Quoted 6 lines
arch/arm/dts/imx6q-sabrelite-u-boot.dtsi new file +6 -0
+/ {
+       aliases {
+               mmc0 = &usdhc3;
+               mmc1 = &usdhc4;
+               pwm_lcd = &pwm1;
+               pwm_lvds = &pwm4;

Please only add the mmc alias, not the pwm ones.

#2 lore raw

PATCH v3 1/1 imx6q-sabrelite: Re-add mmc aliases

In commit d0399a46e7cda63c07e3eb8558bef84cfb068028, the device tree was synchronized from linux and the aliases were dropped.

They need to be kept so that the mmc cards are in the right order. Without the aliases, u-boot reports:
MMC: FSL_SDHC: 2, FSL_SDHC: 3

With the aliases, u-boot reports:
MMC: FSL_SDHC: 0, FSL_SDHC: 1

The upstream linux device tree does not contain the same aliases than u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3). Because this board has been using different aliases in u-boot and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be automatically included in imx6q-sabrelite.dts.

This way, linux and u-boot each keep their own aliases and there is no breakage on current installations.

This should never be done for new boards as we want to keep linux and u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

---
 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi
arch/arm/dts/imx6q-sabrelite-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000000..9eb1c34b20
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2022 Collabora
+ */
+
+#include "imx6qdl-u-boot.dtsi"
+
+/ {
+	aliases {
+		mmc0 = &usdhc3;
+		mmc1 = &usdhc4;
+	};
+};
Signature · 1 line
2.38.1
reviewer Reviewed-by on v3 1/1
#3 lore raw

Re: [PATCH v3] imx6q-sabrelite: Re-add mmc aliases

Quoted 17 lines · Detlev Casanova

In commit d0399a46e7cda63c07e3eb8558bef84cfb068028, the device tree was synchronized from linux and the aliases were dropped.

They need to be kept so that the mmc cards are in the right order. Without the aliases, u-boot reports:
MMC: FSL_SDHC: 2, FSL_SDHC: 3

With the aliases, u-boot reports:
MMC: FSL_SDHC: 0, FSL_SDHC: 1

The upstream linux device tree does not contain the same aliases than u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3). Because this board has been using different aliases in u-boot and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be automatically included in imx6q-sabrelite.dts.

Quoted 8 lines

This way, linux and u-boot each keep their own aliases and there is no breakage on current installations.

This should never be done for new boards as we want to keep linux and u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

#4 lore raw

PATCH v3 1/1 imx6q-sabrelite: Re-add mmc aliases

In reply to Detlev Casanova
Quoted 17 lines

In commit d0399a46e7cda63c07e3eb8558bef84cfb068028, the device tree was synchronized from linux and the aliases were dropped.
They need to be kept so that the mmc cards are in the right order. Without the aliases, u-boot reports:
MMC: FSL_SDHC: 2, FSL_SDHC: 3
With the aliases, u-boot reports:
MMC: FSL_SDHC: 0, FSL_SDHC: 1
The upstream linux device tree does not contain the same aliases than u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3). Because this board has been using different aliases in u-boot and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be automatically included in imx6q-sabrelite.dts.
This way, linux and u-boot each keep their own aliases and there is no breakage on current installations.
This should never be done for new boards as we want to keep linux and u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

Quoted 2 lines

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter  
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#5 lore raw
In reply to Detlev Casanova
Quoted 3 lines · Detlev Casanova

In commit d0399a46e7cda63c07e3eb8558bef84cfb068028, the device tree was synchronized from linux and the aliases were dropped.

Is there a reason not to get this change upstreamed in to Linux and then this wouldn't be a problem moving forward?

Quoted 53 lines

They need to be kept so that the mmc cards are in the right order. Without the aliases, u-boot reports:
MMC: FSL_SDHC: 2, FSL_SDHC: 3

With the aliases, u-boot reports:
MMC: FSL_SDHC: 0, FSL_SDHC: 1

The upstream linux device tree does not contain the same aliases than u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3). Because this board has been using different aliases in u-boot and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be automatically included in imx6q-sabrelite.dts.

This way, linux and u-boot each keep their own aliases and there is no breakage on current installations.

This should never be done for new boards as we want to keep linux and u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

Gbp-Pq: Topic apertis/imx6
Gbp-Pq: Name 0010-imx6-Re-add-mmc-aliases.patch

---
 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi
arch/arm/dts/imx6q-sabrelite-u-boot.dtsi new file +15 -1
new file mode 100644
index 0000000000..706ec9ba25
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2022 Collabora
+ */
+
+#include "imx6qdl-u-boot.dtsi"
+
+/ {
+       aliases {
+               mmc0 = &usdhc3;
+               mmc1 = &usdhc4;
+               pwm_lcd = &pwm1;
+               pwm_lvds = &pwm4;
+       };
+};
--

2.38.1

#6 lore raw
Quoted 8 lines · On Friday, December 9, 2022 6:01:13 A.M. EST Peter Robinson wrote:

On Thu, Dec 8, 2022 at 3:23 PM Detlev Casanova

Quoted 2 lines · <[email protected]> wrote:

In commit d0399a46e7cda63c07e3eb8558bef84cfb068028, the device tree was synchronized from linux and the aliases were dropped.

Is there a reason not to get this change upstreamed in to Linux and then this wouldn't be a problem moving forward?

Yes, please check this conversation: http://patchwork.ozlabs.org/comment/3016037/[1]

Quoted 45 lines
Quoted 45 lines

They need to be kept so that the mmc cards are in the right order. Without the aliases, u-boot reports:
MMC: FSL_SDHC: 2, FSL_SDHC: 3

With the aliases, u-boot reports:
MMC: FSL_SDHC: 0, FSL_SDHC: 1

The upstream linux device tree does not contain the same aliases than u-boot (It keeps the devices order with /dev/mmcblk2 and /dev/mmcblk3). Because this board has been using different aliases in u-boot and linux, a imx6q-sabrelite-u-boot.dtsi file is added to be automatically included in imx6q-sabrelite.dts.

This way, linux and u-boot each keep their own aliases and there is no breakage on current installations.

This should never be done for new boards as we want to keep linux and u-boot with the same aliases as much as possible.
This patch is only necessary to avoid breaking existing setups.

Gbp-Pq: Topic apertis/imx6
Gbp-Pq: Name 0010-imx6-Re-add-mmc-aliases.patch
---

 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 arch/arm/dts/imx6q-sabrelite-u-boot.dtsi
(quoted diff) +0 -0

b/arch/arm/dts/imx6q-sabrelite-u-boot.dtsi new file mode 100644 index 0000000000..706ec9ba25

arch/arm/dts/imx6q-sabrelite-u-boot.dtsi new file +9 -0
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2022 Collabora
+ */
+
+#include "imx6qdl-u-boot.dtsi"
+
+/ {
+       aliases {
Quoted 8 lines
Quoted 8 lines
arch/arm/dts/imx6q-sabrelite-u-boot.dtsi new file +6 -1
+               mmc0 = &usdhc3;
+               mmc1 = &usdhc4;
+               pwm_lcd = &pwm1;
+               pwm_lvds = &pwm4;
+       };
+};
--

2.38.1

--------
[1] http://patchwork.ozlabs.org/comment/3016037/