arm: dts: adi: Add dts overlays for the sc598
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
Re: [PATCH v2] arm: dts: Add SD dts for the sc598 EZKIT
In reply to Caleb EthridgeQuoted 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
Re: [PATCH v2] arm: dts: Add SD dts for the sc598 EZKIT
In reply to Caleb EthridgeQuoted 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