[PATCH v2 01/13] imx9: scmi: Get DDR size through SM SCMI API
Peng Fan
peng.fan at oss.nxp.com
Sat Feb 28 12:28:33 CET 2026
On Sat, Feb 28, 2026 at 08:22:19AM +0800, alice.guo at oss.nxp.com wrote:
>From: Ye Li <ye.li at nxp.com>
>
>System Manager(SM) has implemented the MISC protocol to retrieve DDR
>information. Using this API, U-Boot can obtain the DDR size dynamically
>instead of relying on static configuration macros.
>
>This change addresses the DDR ECC enabled case, where 1/8 of the total
>DDR size is reserved for ECC data. The scmi_misc_ddrinfo() returns the
>DDR size with EEC overhead already deducted.
>
>Implementation details:
>- Query the DDR size via scmi_misc_ddrinfo()
>- Replace direct REG_DDR_CS[0,1]_BNDS register reads with SCMI call
>- Switch from PHYS_SDRAM[x]_SIZE macros to runtime detection
>- Secure memory size is set to 2GB (0x80000000)
Nit:
I misunderstood in V1, it is 256MB. Drop this line.
>- For backward compatibility with older SM firmware, fall back to
> static PHYS_SDRAM[x]_SIZE configuration if the SCMI call fails
>
>Signed-off-by: Ye Li <ye.li at nxp.com>
>Signed-off-by: Alice Guo <alice.guo at nxp.com>
Otherwise:
Reviewed-by: Peng Fan <peng.fan at nxp.com>
More information about the U-Boot
mailing list