From b72f483520848443e67244521f64a83a77263486 Mon Sep 17 00:00:00 2001 From: Russell Xiao Date: Wed, 8 Nov 2023 15:27:26 +0800 Subject: [PATCH] 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 Signed-off-by: Thierry Reding Link: https://lore.kernel.org/linux-tegra/20231219171523.557928-1-thierry.reding@gmail.com/ Signed-off-by: Russell Xiao Change-Id: I67fed6013346031ab56422b1dab804a67645cae1 Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/3012675 Reviewed-by: Jonathan Hunter Reviewed-by: Wei Ni Reviewed-by: Brad Griffis Reviewed-by: Bibek Basu GVS: Gerrit_Virtual_Submit --- tegra234-p3701.dtsi | 5 +++++ tegra234-p3737-0000+p3701-0000.dts | 1 - tegra234-p3767.dtsi | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tegra234-p3701.dtsi b/tegra234-p3701.dtsi index 5e7797d..fb9c890 100644 --- a/tegra234-p3701.dtsi +++ b/tegra234-p3701.dtsi @@ -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"; diff --git a/tegra234-p3737-0000+p3701-0000.dts b/tegra234-p3737-0000+p3701-0000.dts index 722fa21..a3d17bf 100644 --- a/tegra234-p3737-0000+p3701-0000.dts +++ b/tegra234-p3737-0000+p3701-0000.dts @@ -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; }; diff --git a/tegra234-p3767.dtsi b/tegra234-p3767.dtsi index 024efe4..805de3c 100644 --- a/tegra234-p3767.dtsi +++ b/tegra234-p3767.dtsi @@ -5,6 +5,10 @@ / { compatible = "nvidia,p3767", "nvidia,tegra234"; + aliases { + mmc0 = "/bus@0/mmc@3400000"; + }; + sound { compatible = "nvidia,tegra186-audio-graph-card"; status = "okay";