arm: dts: an7581: set r_smpl for MMC in U-Boot
PATCH 1/1 arm: dts: an7581: set r_smpl for MMC in U-Boot
When booting from SPI, the ROM code does not initialize the MMC controller on AN7581. As a result, the first MMC initialization is performed by U-Boot.
In this case, the r_smpl bit is left uninitialized, which may cause incorrect sampling timing during early MMC access.
Set the r_smpl bit explicitly in the U-Boot device tree to ensure reliable MMC initialization.
This change is limited to the U-Boot-specific device tree. The Linux MMC driver already performs runtime delay detection and does not require a fixed r_smpl setting.
--- arch/arm/dts/an7581-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/an7581-u-boot.dtsi +1 -0
@@ -84,6 +84,7 @@ reg = <0x0 0x1fa0e000 0x0 0x1000>, <0x0 0x1fa0c000 0x0 0x60>; interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>; + r_smpl = <1>; clocks = <&scuclk EN7581_CLK_EMMC>, <&clk25m>; clock-names = "source", "hclk"; bus-width = <4>;
Signature · 1 line
2.34.1
Quoted 8 lines · Ray Liu
When booting from SPI, the ROM code does not initialize the MMC controller on AN7581. As a result, the first MMC initialization is performed by U-Boot.
In this case, the
r_smplbit is left uninitialized, which may cause incorrect sampling timing during early MMC access.[...]
Applied to u-boot/master, thanks!
[1/1] arm: dts: an7581: set r_smpl for MMC in U-Boot
commit: 7cb79f8d3d55aaadff5b131aaf29aa176828a57b
Signature · 1 line
Tom
Quoted 7 lines
reg = <0x0 0x1fa0e000 0x0 0x1000>, <0x0 0x1fa0c000 0x0 0x60>; interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;arch/arm/dts/an7581-u-boot.dtsi +1
-0+ r_smpl = <1>;clocks = <&scuclk EN7581_CLK_EMMC>, <&clk25m>; clock-names = "source", "hclk"; bus-width = <4>;
On my AN7581 board, the same change in the ATF-2.10 source code causes instability in eMMC reading. After the patch, in about 9 of 10 cases, ATF is unable to read the FIP image and load BL31 and U-Boot.
So, I am vote for reverting this change.
Regards,
Mikhail Kshevetskiy
Quoted 12 lines · Mikhail Kshevetskiy
Quoted 7 lines
reg = <0x0 0x1fa0e000 0x0 0x1000>, <0x0 0x1fa0c000 0x0 0x60>; interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;arch/arm/dts/an7581-u-boot.dtsi +1
-0+ r_smpl = <1>;clocks = <&scuclk EN7581_CLK_EMMC>, <&clk25m>; clock-names = "source", "hclk"; bus-width = <4>;On my AN7581 board, the same change in the ATF-2.10 source code causes instability in eMMC reading. After the patch, in about 9 of 10 cases, ATF is unable to read the FIP image and load BL31 and U-Boot.
Quoted 1 line
So, I am vote for reverting this change.
OK, can you please post a revert and note the instability as why? Thanks!
Signature · 1 line
Tom