[PATCH] arm: dts: adi: Add dts overlays for the sc598
Caleb Ethridge
Caleb.Ethridge at analog.com
Mon Jul 13 19:47:26 CEST 2026
From: Caleb Ethridge <caleb.ethridge at analog.com>
The eMMC and SD card on the sc598 share pins, so they cannot both be
active at the same time.
Previously, this was managed with a patch applied by the relevant build
system. This patch replaces the build system patch with dt overlays
which will create two separate device trees, one for eMMC and one for
the SD card, which can then be selected by the build system.
Signed-off-by: Caleb Ethridge <caleb.ethridge at analog.com>
---
arch/arm/dts/Makefile | 5 +++++
arch/arm/dts/sc598-som-emmc.dtso | 27 +++++++++++++++++++++++++
arch/arm/dts/sc598-som-ezlite.dts | 18 +++++++++++++++++
arch/arm/dts/sc598-som-revD.dtsi | 16 ---------------
arch/arm/dts/sc598-som-revE.dtsi | 14 -------------
arch/arm/dts/sc598-som-sd.dtso | 33 +++++++++++++++++++++++++++++++
board/adi/sc598-som-ezkit/Kconfig | 2 +-
7 files changed, 84 insertions(+), 31 deletions(-)
create mode 100644 arch/arm/dts/sc598-som-emmc.dtso
create mode 100644 arch/arm/dts/sc598-som-sd.dtso
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 25234697e6a..fb8a91f324f 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1156,6 +1156,11 @@ dtb-$(CONFIG_TARGET_SC594_SOM_EZKIT) += sc594-som-ezkit.dtb
dtb-$(CONFIG_TARGET_SC594_SOM_EZLITE) += sc594-som-ezlite.dtb
dtb-$(CONFIG_TARGET_SC598_SOM_EZKIT) += sc598-som-ezkit.dtb
dtb-$(CONFIG_TARGET_SC598_SOM_EZLITE) += sc598-som-ezlite.dtb
+dtb-$(CONFIG_TARGET_SC598_SOM_EZKIT) += sc598-som-emmc.dtbo sc598-som-sd.dtbo \
+ sc598-som-ezkit-emmc.dtb sc598-som-ezkit-sd.dtb
+
+sc598-som-ezkit-emmc-dtbs := sc598-som-ezkit.dtb sc598-som-emmc.dtbo
+sc598-som-ezkit-sd-dtbs := sc598-som-ezkit.dtb sc598-som-sd.dtbo
ifneq ($(CONFIG_TARGET_IMX8MP_RSB3720A1_4G)$(CONFIG_TARGET_IMX8MP_RSB3720A1_6G),)
dtb-y += imx8mp-rsb3720-a1.dtb
diff --git a/arch/arm/dts/sc598-som-emmc.dtso b/arch/arm/dts/sc598-som-emmc.dtso
new file mode 100644
index 00000000000..67007e1efb2
--- /dev/null
+++ b/arch/arm/dts/sc598-som-emmc.dtso
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * (C) Copyright 2026 - Analog Devices, Inc.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&som_gpio_expander {
+ som-emmc {
+ gpio-hog;
+ gpios = <8 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "som-emmc-en";
+ bootph-pre-ram;
+ };
+
+ crr-sdcard {
+ gpio-hog;
+ gpios = <9 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "crr-sdcard-en";
+ bootph-pre-ram;
+ };
+};
diff --git a/arch/arm/dts/sc598-som-ezlite.dts b/arch/arm/dts/sc598-som-ezlite.dts
index 40cabd1db0d..3424a967caa 100644
--- a/arch/arm/dts/sc598-som-ezlite.dts
+++ b/arch/arm/dts/sc598-som-ezlite.dts
@@ -12,6 +12,24 @@
compatible = "adi,sc598-som-ezlite", "adi,sc59x-64";
};
+&som_gpio_expander {
+ som-emmc {
+ gpio-hog;
+ gpios = <8 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "som-emmc-en";
+ bootph-pre-ram;
+ };
+
+ crr-sdcard {
+ gpio-hog;
+ gpios = <9 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "crr-sdcard-en";
+ bootph-pre-ram;
+ };
+};
+
&i2c2 {
crr_gpio_expander: adp5588 at 30 {
compatible = "adi,adp5588";
diff --git a/arch/arm/dts/sc598-som-revD.dtsi b/arch/arm/dts/sc598-som-revD.dtsi
index 06d550b8532..0eaadc25c90 100644
--- a/arch/arm/dts/sc598-som-revD.dtsi
+++ b/arch/arm/dts/sc598-som-revD.dtsi
@@ -73,22 +73,6 @@
line-name = "uart0-flow-en";
bootph-pre-ram;
};
-
- som-emmc {
- gpio-hog;
- gpios = <8 GPIO_ACTIVE_LOW>;
- output-high;
- line-name = "som-emmc-en";
- bootph-pre-ram;
- };
-
- crr-sdcard {
- gpio-hog;
- gpios = <9 GPIO_ACTIVE_LOW>;
- output-low;
- line-name = "crr-sdcard-en";
- bootph-pre-ram;
- };
};
};
diff --git a/arch/arm/dts/sc598-som-revE.dtsi b/arch/arm/dts/sc598-som-revE.dtsi
index 1f48d52109b..212e8334fd9 100644
--- a/arch/arm/dts/sc598-som-revE.dtsi
+++ b/arch/arm/dts/sc598-som-revE.dtsi
@@ -47,20 +47,6 @@
line-name = "som-flash-cs-en";
};
- som-emmc {
- gpio-hog;
- gpios = <8 GPIO_ACTIVE_LOW>;
- output-high;
- line-name = "som-emmc-en";
- };
-
- crr-sdcard {
- gpio-hog;
- gpios = <9 GPIO_ACTIVE_LOW>;
- output-low;
- line-name = "crr-sdcard-en";
- };
-
led-ds3 {
gpio-hog;
gpios = <15 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm/dts/sc598-som-sd.dtso b/arch/arm/dts/sc598-som-sd.dtso
new file mode 100644
index 00000000000..afe9181474b
--- /dev/null
+++ b/arch/arm/dts/sc598-som-sd.dtso
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * (C) Copyright 2026 - Analog Devices, Inc.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+&som_gpio_expander {
+ som-emmc {
+ gpio-hog;
+ gpios = <8 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "som-emmc-en";
+ bootph-pre-ram;
+ };
+
+ crr-sdcard {
+ gpio-hog;
+ gpios = <9 GPIO_ACTIVE_LOW>;
+ output-high;
+ line-name = "crr-sdcard-en";
+ bootph-pre-ram;
+ };
+};
+
+&mmc0 {
+ max-frequency = <44000000>;
+ bus-width = <4>;
+ no-1-8-v;
+};
diff --git a/board/adi/sc598-som-ezkit/Kconfig b/board/adi/sc598-som-ezkit/Kconfig
index 9abecbe1dde..e8298b1a7ab 100644
--- a/board/adi/sc598-som-ezkit/Kconfig
+++ b/board/adi/sc598-som-ezkit/Kconfig
@@ -14,7 +14,7 @@ config SYS_CONFIG_NAME
default "sc598-som"
config DEFAULT_DEVICE_TREE
- default "sc598-som-ezkit"
+ default "sc598-som-ezkit-emmc"
config ADI_IMAGE
default "minimal"
--
2.43.0
More information about the U-Boot
mailing list