UPSTREAM: arm64: tegra: Use consistent SD/MMC aliases on Tegra234

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.

Bug 4182005

Co-developed-by: Russell Xiao <russellx@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/linux-tegra/20231219171523.557928-1-thierry.reding@gmail.com/
Signed-off-by: Russell Xiao <russellx@nvidia.com>
Change-Id: I67fed6013346031ab56422b1dab804a67645cae1
Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/3012675
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Wei Ni <wni@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Russell Xiao
2023-11-08 15:27:26 +08:00
committed by mobile promotions
parent 5767db6887
commit b72f483520
3 changed files with 9 additions and 1 deletions

View 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";