Skip to contentSkip to conversation

arm: dts: adi: Add dts overlays for the sc598

PATCH Superseded Caleb Ethridge 2 participants 5 messages Jul 13 – Aug 14 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: adi: Add dts overlays for the sc598

From: Caleb Ethridge <[email protected]>

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.

---
 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
arch/arm/dts/Makefile +5 -0
index 25234697e6a..fb8a91f324f 100644
@@ -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
arch/arm/dts/sc598-som-emmc.dtso new file +27 -0
new file mode 100644
index 00000000000..67007e1efb2
@@ -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;
+	};
+};
arch/arm/dts/sc598-som-ezlite.dts +18 -0
index 40cabd1db0d..3424a967caa 100644
@@ -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@30 {
 		compatible = "adi,adp5588";
arch/arm/dts/sc598-som-revD.dtsi +0 -16
index 06d550b8532..0eaadc25c90 100644
@@ -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;
-		};
 	};
 };
 
arch/arm/dts/sc598-som-revE.dtsi +0 -14
index 1f48d52109b..212e8334fd9 100644
@@ -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>;
arch/arm/dts/sc598-som-sd.dtso new file +33 -0
new file mode 100644
index 00000000000..afe9181474b
@@ -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;
+};
board/adi/sc598-som-ezkit/Kconfig +1 -1
index 9abecbe1dde..e8298b1a7ab 100644
@@ -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"
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/1 arm: dts: Add SD dts for the sc598 EZKIT

From: Caleb Ethridge <[email protected]>

The eMMC and SD card on the sc598 share pins, so they cannot be used at the same time. Previously, this was managed with a patch applied by the relevant build system, but patches are brittle and have to be maintained. Instead, they have been replaced with two separate device trees , one for eMMC and one for SD card, which inherit a shared base dtsi. The build system can then select between the default device tree which enabled eMMC or the other device tree which enables SD card support.

---
Changes in v2:
- Changed implementation from dt overlays to inherited dtsi files, and set the default dts to select eMMC

---
 arch/arm/dts/Makefile               |   2 +-
 arch/arm/dts/sc598-som-ezkit-sd.dts |  32 +++++
 arch/arm/dts/sc598-som-ezkit.dts    | 179 ++--------------------------
 arch/arm/dts/sc598-som-ezkit.dtsi   | 179 ++++++++++++++++++++++++++++
 arch/arm/dts/sc598-som-ezlite.dts   |  18 +++
 arch/arm/dts/sc598-som-revD.dtsi    |  16 ---
 arch/arm/dts/sc598-som-revE.dtsi    |  14 ---
 7 files changed, 243 insertions(+), 197 deletions(-)
 create mode 100644 arch/arm/dts/sc598-som-ezkit-sd.dts
 create mode 100644 arch/arm/dts/sc598-som-ezkit.dtsi
arch/arm/dts/Makefile +1 -1
index 25234697e6a..dada5f9eba2 100644
@@ -1154,7 +1154,7 @@ dtb-$(CONFIG_TARGET_SC589_MINI) += sc589-mini.dtb
 dtb-$(CONFIG_TARGET_SC589_EZKIT) += sc589-ezkit.dtb
 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_EZKIT) += sc598-som-ezkit.dtb sc598-som-ezkit-sd.dtb
 dtb-$(CONFIG_TARGET_SC598_SOM_EZLITE) += sc598-som-ezlite.dtb
 
 ifneq ($(CONFIG_TARGET_IMX8MP_RSB3720A1_4G)$(CONFIG_TARGET_IMX8MP_RSB3720A1_6G),)
arch/arm/dts/sc598-som-ezkit-sd.dts new file +32 -0
new file mode 100644
index 00000000000..9b5f60192d5
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * (C) Copyright 2026 - Analog Devices, Inc.
+ */
+
+/dts-v1/;
+
+#include "sc598-som-ezkit.dtsi"
+
+&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;
+};
arch/arm/dts/sc598-som-ezkit.dts +13 -166

192 lines not on this page · raw message

arch/arm/dts/sc598-som-ezkit.dtsi new file +179 -0

179 lines not on this page · raw message

arch/arm/dts/sc598-som-ezlite.dts +18 -0
index 40cabd1db0d..3424a967caa 100644
@@ -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@30 {
 		compatible = "adi,adp5588";
arch/arm/dts/sc598-som-revD.dtsi +0 -16
index 06d550b8532..0eaadc25c90 100644
@@ -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;
-		};
 	};
 };
 
arch/arm/dts/sc598-som-revE.dtsi +0 -14
index 1f48d52109b..212e8334fd9 100644
@@ -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>;
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH v2] arm: dts: Add SD dts for the sc598 EZKIT

Quoted 9 lines · Caleb Ethridge

The eMMC and SD card on the sc598 share pins, so they cannot be used at the same time. Previously, this was managed with a patch applied by the relevant build system, but patches are brittle and have to be maintained. Instead, they have been replaced with two separate device trees , one for eMMC and one for SD card, which inherit a shared base dtsi. The build system can then select between the default device tree which enabled eMMC or the other device tree which enables SD card support.

[...]

Applied to u-boot/main, thanks!

[1/1] arm: dts: Add SD dts for the sc598 EZKIT

      commit: 1a86b8764f8fc13599faf247b4d2f78b4fc6cd3d
Signature · 1 line
Tom
#3 lore raw

Re: [PATCH v2] arm: dts: Add SD dts for the sc598 EZKIT

In reply to Caleb Ethridge
Quoted 9 lines · Caleb Ethridge

The eMMC and SD card on the sc598 share pins, so they cannot be used at the same time. Previously, this was managed with a patch applied by the relevant build system, but patches are brittle and have to be maintained. Instead, they have been replaced with two separate device trees , one for eMMC and one for SD card, which inherit a shared base dtsi. The build system can then select between the default device tree which enabled eMMC or the other device tree which enables SD card support.

[...]

Applied to u-boot/main, thanks!

[1/1] arm: dts: Add SD dts for the sc598 EZKIT

      commit: 1a86b8764f8fc13599faf247b4d2f78b4fc6cd3d
Signature · 1 line
Tom
#4 lore raw

Re: [PATCH v2] arm: dts: Add SD dts for the sc598 EZKIT

In reply to Caleb Ethridge
Quoted 9 lines · Caleb Ethridge

The eMMC and SD card on the sc598 share pins, so they cannot be used at the same time. Previously, this was managed with a patch applied by the relevant build system, but patches are brittle and have to be maintained. Instead, they have been replaced with two separate device trees , one for eMMC and one for SD card, which inherit a shared base dtsi. The build system can then select between the default device tree which enabled eMMC or the other device tree which enables SD card support.

[...]

Applied to u-boot/next, thanks!

[1/1] arm: dts: Add SD dts for the sc598 EZKIT
(no commit info)

Signature · 1 line
Tom