Skip to contentSkip to conversation

arm: dts: socfpga: agilex5: Improve MMC/SD device tree organization

PATCH In review [email protected] 2 participants 5 messages Apr 28 – May 6 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

v2 cover arm: dts: socfpga: agilex5: Improve MMC/SD device tree organization

From: Tze Yee Ng <[email protected]>

This patch series refactors the MMC/SD device tree configuration for Agilex5 SOCDK to improve maintainability and correctness.

The first patch reorganizes the configuration by moving board-specific MMC properties from the common u-boot.dtsi to the board-specific dts file, keeping only truly common configurations in the shared dtsi.

The second patch addresses a configuration issue where the eMMC device tree was incorrectly inheriting SD card-specific properties. It removes the SD UHS speed mode properties (sd-uhs-sdr50, sd-uhs-sdr104) that are not applicable to eMMC and properly configures the capabilities mask to enable 8-bit embedded device support.

Changes in v2:
- Fix commit title and description in both patch 1 and patch 2.
- Remove the SD UHS speed mode properties (sd-uhs-sdr50, sd-uhs-sdr104) that are not applicable to eMMC from dtsi.

tzeyeeng (2):
arm: dts: socfpga: agilex5: Move board-specific mmc properties to
socdk dts
arm: dts: socfpga: Enable 8-bit embedded device support in Agilex5
eMMC device tree

 arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi | 3 ---
 arch/arm/dts/socfpga_agilex5_socdk.dts         | 6 ++++++
 arch/arm/dts/socfpga_agilex5_socdk_emmc.dts    | 5 ++---
 3 files changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.7
#2 lore raw

PATCH v2 2/2 arm: dts: socfpga: Enable 8-bit embedded device support in Agilex5 eMMC device tree

From: tzeyeeng <[email protected]>

The eMMC device tree inherits the configuration from socfpga_agilex5_socdk.dts.

Changes:
- Set SDHCI Capabilities bit18 to enable 8-bit embedded device support.

---
Changes in v2:
- Remove /delete-property/ sd-uhs-sdr50 and /delete-property/ sd-uhs-sdr104 from mmc node
- Fix wording in commit message
- Update commit title

---
 arch/arm/dts/socfpga_agilex5_socdk_emmc.dts | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/dts/socfpga_agilex5_socdk_emmc.dts +2 -3
index 92ff8b4acf2..52aa92e4292 100644
@@ -18,7 +18,6 @@
 };
 
 &mmc {
-	/delete-property/ sd-uhs-sdr104;
 	status = "okay";
 
 	no-sd;
@@ -32,8 +31,8 @@
 	vmmc-supply = <&sd_emmc_power>;
 	vqmmc-supply = <&emmc_io_1v8_reg>;
 	max-frequency = <200000000>;
-	sdhci-caps-mask = <0x00000000 0x00040000>;
-	sdhci-caps = <0x0 0x040000>;	/* SDHCI_CAN_DO_8BIT */
+	sdhci-caps = <0x00000000 0x0004c800>;	/* SDHCI_CAN_DO_8BIT */
+	sdhci-caps-mask = <0x00000000 0x0004ff00>;
 
 	/* eMMC legacy mode timing configuration */
 	cdns,phy-dqs-timing-delay-sd-ds = <0x00780000>;
Signature · 1 line
2.43.7
#1 lore raw

PATCH v2 1/2 arm: dts: socfpga: agilex5: Move board-specific mmc properties to socdk dts

In reply to [email protected]

From: tzeyeeng <[email protected]>

The purpose of this change is to keep common configuration in socfpga_agilex5_socdk-u-boot.dtsi and move differing properties to socfpga_agilex5_socdk.dts.

---
Changes in v2:
- Remove both sd-uhs-sdr50 and sd-uhs-sdr104 from dtsi.
- Fix commit title and commit message grammar.

---
 arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi | 3 ---
 arch/arm/dts/socfpga_agilex5_socdk.dts         | 6 ++++++
 2 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi +0 -3
index c03f78b2fdf..7300a54b223 100644
@@ -112,13 +112,10 @@
 	no-mmc;
 	disable-wp;
 	cap-sd-highspeed;
-	sd-uhs-sdr50;
-	sd-uhs-sdr104;
 	vmmc-supply = <&sd_emmc_power>;
 	vqmmc-supply = <&sd_io_1v8_reg>;
 	max-frequency = <200000000>;
 	sdhci-caps = <0x00000000 0x0000c800>;
-	sdhci-caps-mask = <0x00002000 0x0000ff00>;
 
 	/* SD card default speed (DS) and UHS-I SDR12 mode timing configuration */
 	cdns,phy-dqs-timing-delay-sd-ds = <0x00780000>;
arch/arm/dts/socfpga_agilex5_socdk.dts +6 -0
index 886cc89fdb6..cbb2bfbe3b4 100644
@@ -74,6 +74,12 @@
 	status = "okay";
 };
 
+&mmc {
+	sd-uhs-sdr50;
+	sd-uhs-sdr104;
+	sdhci-caps-mask = <0x00002000 0x0000ff00>;
+};
+
 &uart0 {
 	status = "okay";
 };
Signature · 1 line
2.43.7
#3 lore raw

Re: [PATCH v2 2/2] arm: dts: socfpga: Enable 8-bit embedded device support in Agilex5 eMMC device tree

In reply to [email protected]

Hi Tze Yee,

Quoted 25 lines · On 28/4/2026 10:53 am, [email protected] wrote:

From: tzeyeeng <[email protected]>

The eMMC device tree inherits the configuration from socfpga_agilex5_socdk.dts.

Changes:
- Set SDHCI Capabilities bit18 to enable 8-bit embedded device support.

---
Changes in v2:
- Remove /delete-property/ sd-uhs-sdr50 and /delete-property/ sd-uhs-sdr104 from mmc node
- Fix wording in commit message
- Update commit title

---
  arch/arm/dts/socfpga_agilex5_socdk_emmc.dts | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/dts/socfpga_agilex5_socdk_emmc.dts +0 -0
index 92ff8b4acf2..52aa92e4292 100644

arch/arm/dts/socfpga_agilex5_socdk_emmc.dts line 21

Quoted 4 lines
arch/arm/dts/socfpga_agilex5_socdk_emmc.dts +0 -1
@@ -18,7 +18,6 @@
  };
 
  &mmc {
-	/delete-property/ sd-uhs-sdr104;

I have a concern regarding the v2 patch series that I would like you to verify.

In v2, patch 1/2 moves sd-uhs-sdr50 and sd-uhs-sdr104 from socfpga_agilex5_socdk-u-boot.dtsi into socfpga_agilex5_socdk.dts as a new &mmc node.

Since socfpga_agilex5_socdk_emmc.dts uses #include "socfpga_agilex5_socdk.dts" as a C preprocessor paste,

these SD UHS properties would be compiled into the eMMC DT, which is incorrect.

In v1, those properties lived only in the dtsi, which is not applied to the eMMC build since the eMMC build uses its own separate socfpga_agilex5_socdk_emmc-u-boot.dtsi.

This means the eMMC compiled DT was clean in v1.

To verify this, please perform the following test:

1. Revert socfpga_agilex5_socdk_emmc.dts back to its v1 state.

2. Remove the /delete-property/ lines for both sd-uhs-sdr50 and sd-uhs-sdr104 from socfpga_agilex5_socdk_emmc.dts.

3. Build the eMMC DT and inspect the compiled .dtb (e.g. via dtc -I dtb -O dts).

4. Confirm whether sd-uhs-sdr50 and sd-uhs-sdr104 are absent from the eMMC compiled DT.

If they are absent, it confirms that the /delete-property/ lines in the eMMC DTS were always no-ops.

In that case, the correct fix is simply to remove those no-op /delete-property/ lines that were introduced in v1 patch 2/2,

without moving any properties out of the dtsi into the base DTS.

Best regards,

Tien Fong

#4 lore raw

Re: [PATCH v2 2/2] arm: dts: socfpga: Enable 8-bit embedded device support in Agilex5 eMMC device tree

Quoted 73 lines · Tien Fong

Hi Tze Yee,

Quoted 26 lines · On 28/4/2026 10:53 am, [email protected] wrote:

From: tzeyeeng <[email protected]>

The eMMC device tree inherits the configuration from socfpga_agilex5_socdk.dts.

Changes:
- Set SDHCI Capabilities bit18 to enable 8-bit embedded device support.

---
Changes in v2:
- Remove /delete-property/ sd-uhs-sdr50 and /delete-property/ sd-uhs-sdr104 from mmc node
- Fix wording in commit message
- Update commit title
---
  arch/arm/dts/socfpga_agilex5_socdk_emmc.dts | 5 ++---

  1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/ renamed from arch/arm/dts/socfpga_agilex5_socdk_emmc.dts +0 -0

dts/socfpga_agilex5_socdk_emmc.dts
index 92ff8b4acf2..52aa92e4292 100644

arch/arm/dts/socfpga_agilex5_socdk_emmc.dts line 20

Quoted 3 lines
arch/arm/dts/socfpga_agilex5_socdk_emmc.dts +0 -1
@@ -18,7 +18,6 @@
   };
   &mmc {
-    /delete-property/ sd-uhs-sdr104;

I have a concern regarding the v2 patch series that I would like you to verify.

In v2, patch 1/2 moves sd-uhs-sdr50 and sd-uhs-sdr104 from socfpga_agilex5_socdk-u-boot.dtsi into socfpga_agilex5_socdk.dts as a new &mmc node.

Since socfpga_agilex5_socdk_emmc.dts uses #include "socfpga_agilex5_socdk.dts" as a C preprocessor paste,

these SD UHS properties would be compiled into the eMMC DT, which is incorrect.

In v1, those properties lived only in the dtsi, which is not applied to the eMMC build since the eMMC build uses its own separate socfpga_agilex5_socdk_emmc-u-boot.dtsi.

This means the eMMC compiled DT was clean in v1.

To verify this, please perform the following test:

1. Revert socfpga_agilex5_socdk_emmc.dts back to its v1 state.

2. Remove the /delete-property/ lines for both sd-uhs-sdr50 and sd-uhs- sdr104 from socfpga_agilex5_socdk_emmc.dts.

3. Build the eMMC DT and inspect the compiled .dtb (e.g. via dtc -I dtb -O dts).

4. Confirm whether sd-uhs-sdr50 and sd-uhs-sdr104 are absent from the eMMC compiled DT.

If they are absent, it confirms that the /delete-property/ lines in the eMMC DTS were always no-ops.

In that case, the correct fix is simply to remove those no-op /delete- property/ lines that were introduced in v1 patch 2/2,

Quoted 7 lines

without moving any properties out of the dtsi into the base DTS.

Best regards,

Tien Fong

Hi Tien Fong,

Thanks for the detailed guidance.

I followed your suggested verification steps to revert everything and the SD UHS properties were absent from eMMC compiled DT, confirming that the /delete-property/ lines were indeed no-ops. Accordingly, I’ve dropped patch 1 from v2 and submitted v3 with only the removal of the /delete-property/ SDR properties, without moving any properties from the dtsi into the base DTS.

Appreciate your review and the clarification.

Best regards,
Tze Yee