[PATCH v2 03/13] arm64: dts: ti: k3-j721s2: Enable SDHCI nodes at the board level

From: Andrew Davis
Date: Tue Aug 08 2023 - 13:05:03 EST


SDHCI nodes defined in the top-level J721s2 SoC dtsi files are incomplete
and will not be functional unless they are extended.

As the attached SD/eMMC is only known about at the board integration level,
these nodes should only be enabled when provided with this information.

Disable the SDHCI nodes in the dtsi files and only enable the ones that
are actually pinned out on a given board.

Signed-off-by: Andrew Davis <afd@xxxxxx>
---
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts | 6 +-----
arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts | 2 ++
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 2 ++
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
index e6e4133d1e9b9..5fd06cd26b479 100644
--- a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
@@ -475,13 +475,9 @@ exp2: gpio@20 {
};
};

-&main_sdhci0 {
- /* Unused */
- status = "disabled";
-};
-
&main_sdhci1 {
/* SD card */
+ status = "okay";
pinctrl-0 = <&main_mmc1_pins_default>;
pinctrl-names = "default";
disable-wp;
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
index e81ef8a7a8a26..7794063b77c8a 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
@@ -366,6 +366,7 @@ exp2: gpio@22 {

&main_sdhci0 {
/* eMMC */
+ status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
disable-wp;
@@ -373,6 +374,7 @@ &main_sdhci0 {

&main_sdhci1 {
/* SD card */
+ status = "okay";
pinctrl-0 = <&main_mmc1_pins_default>;
pinctrl-names = "default";
disable-wp;
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index dc7920a352373..0e0092fa7b9fb 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -737,6 +737,7 @@ main_sdhci0: mmc@4f80000 {
mmc-hs200-1_8v;
mmc-hs400-1_8v;
dma-coherent;
+ status = "disabled";
};

main_sdhci1: mmc@4fb0000 {
@@ -766,6 +767,7 @@ main_sdhci1: mmc@4fb0000 {
dma-coherent;
/* Masking support for SDR104 capability */
sdhci-caps-mask = <0x00000003 0x00000000>;
+ status = "disabled";
};

main_navss: bus@30000000 {
--
2.39.2