]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: tegra: Use consistent SD/MMC aliases on Tegra234
authorThierry Reding <treding@nvidia.com>
Tue, 19 Dec 2023 17:15:23 +0000 (18:15 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 21 Feb 2024 16:12:32 +0000 (17:12 +0100)
Tegra234 boards use a mixture of aliases for the SD/MMC hardware blocks,
which can lead to confusion. A common method was to use mmc3 as the
alias for the eMMC because "SDMMC3" happens to be the name of the
corresponding controller in the reference manual. This isn't a great
choice because there is no hardware named SDMMC0, so the mmc0 alias
would never get used with that nomenclature and in fact mmc1 and mmc2
wouldn't either in many configurations, thereby creating weird
discontiguous enumeration.

Instead of trying to match the aliases to the hardware block names, use
mmc0 to denote the device's primary SD/MMC controller (typically eMMC)
and mmc1 for the secondary SD/MMC controller (typically removable SD).
In cases where eMMC is the only controller we can omit the mmc1 alias
and if a device has no eMMC, the removable SD card can be aliased to
mmc0 instead.

Co-developed-by: Russell Xiao <russellx@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm64/boot/dts/nvidia/tegra234-p3701.dtsi
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi
arch/arm64/boot/dts/nvidia/tegra234-sim-vdk.dts

index db6ef711674ab50ed58e97fb18e2facd0bdfce38..90f5adeba0f5693f8d4641716761381041b7080c 100644 (file)
@@ -3,6 +3,11 @@
 / {
        compatible = "nvidia,p3701", "nvidia,tegra234";
 
+       aliases {
+               mmc0 = "/bus@0/mmc@3460000";
+               mmc1 = "/bus@0/mmc@3400000";
+       };
+
        bus@0 {
                aconnect@2900000 {
                        status = "okay";
index ea13c4a7027c46ba5f5151947537b5376bcbad20..23b32d20a7e5c1f40cca299583de1d70d7fbc0fe 100644 (file)
@@ -12,7 +12,6 @@
        compatible = "nvidia,p3737-0000+p3701-0000", "nvidia,p3701-0000", "nvidia,tegra234";
 
        aliases {
-               mmc3 = "/bus@0/mmc@3460000";
                serial0 = &tcu;
                serial1 = &uarta;
        };
index 59c14ded5e9fac10023e76078d99efec25e00b24..bf93a32c343b204977bf824b4248bdf05f08a090 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "nvidia,p3767", "nvidia,tegra234";
 
+       aliases {
+               mmc0 = "/bus@0/mmc@3400000";
+       };
+
        bus@0 {
                i2c@3160000 {
                        status = "okay";
index 9f3e9f30c3f7073d73bcb0481821843d2aed2efd..292e28376eec7f882301236dfb5acb2fddba3cfb 100644 (file)
@@ -8,7 +8,6 @@
        compatible = "nvidia,tegra234-vdk", "nvidia,tegra234";
 
        aliases {
-               mmc3 = "/bus@0/mmc@3460000";
                serial0 = &uarta;
        };