[PATCH 3/5] ARM: nxp-imx93-frdm: adapt the 2CS DDR timings for barebox
Freimut Diener
f.diener at pengutronix.de
Fri Nov 27 01:42:01 PST 2026
Use the barebox i.MX9 DDR header and give the imported timing data a
board-specific symbol so the FRDM board code can select it separately
from the existing 1CS timings.
Follow the 1CS configuration by training only at 3733 MT/s, with both
1D and 2D training. Drop the 1866 and 625 MT/s training messages and
remove those rates from the advertised frequency table so it only
lists the operating point that was trained.
Signed-off-by: Freimut Diener <f.diener at pengutronix.de>
---
.../boards/nxp-imx93-frdm/lpddr4x_2cs_2gb_timing.c | 96 ++--------------------
1 file changed, 5 insertions(+), 91 deletions(-)
diff --git a/arch/arm/boards/nxp-imx93-frdm/lpddr4x_2cs_2gb_timing.c b/arch/arm/boards/nxp-imx93-frdm/lpddr4x_2cs_2gb_timing.c
index 6dfa637a1c..4aaadf5bcc 100644
--- a/arch/arm/boards/nxp-imx93-frdm/lpddr4x_2cs_2gb_timing.c
+++ b/arch/arm/boards/nxp-imx93-frdm/lpddr4x_2cs_2gb_timing.c
@@ -8,8 +8,10 @@
* Align with uboot version:
* imx_v2022 and above version
*/
+
#include <linux/kernel.h>
-#include <asm/arch/ddr.h>
+#include <common.h>
+#include <soc/imx9/ddr.h>
static struct dram_cfg_param ddr_ddrc_cfg[] = {
/** Initialize DDRC registers **/
@@ -1280,80 +1282,6 @@ static struct dram_cfg_param ddr_fsp0_cfg[] = {
{ 0xd0000, 0x1},
};
-static struct dram_cfg_param ddr_fsp1_cfg[] = {
- { 0xd0000, 0x0},
- { 0x54002, 0x1},
- { 0x54003, 0x74a},
- { 0x54004, 0x4},
- { 0x54006, 0x15},
- { 0x54008, 0x121f},
- { 0x54009, 0xc8},
- { 0x5400b, 0x4},
- { 0x5400d, 0x100},
- { 0x5400f, 0x100},
- { 0x54012, 0x310},
- { 0x54019, 0x1bb4},
- { 0x5401a, 0x32},
- { 0x5401b, 0x1126},
- { 0x5401c, 0x1108},
- { 0x5401e, 0x4},
- { 0x5401f, 0x1bb4},
- { 0x54020, 0x32},
- { 0x54021, 0x1126},
- { 0x54022, 0x1108},
- { 0x54024, 0x4},
- { 0x54032, 0xb400},
- { 0x54033, 0x321b},
- { 0x54034, 0x2600},
- { 0x54035, 0x811},
- { 0x54036, 0x11},
- { 0x54037, 0x400},
- { 0x54038, 0xb400},
- { 0x54039, 0x321b},
- { 0x5403a, 0x2600},
- { 0x5403b, 0x811},
- { 0x5403c, 0x11},
- { 0x5403d, 0x400},
- { 0xd0000, 0x1},
-};
-
-static struct dram_cfg_param ddr_fsp2_cfg[] = {
- { 0xd0000, 0x0},
- { 0x54002, 0x102},
- { 0x54003, 0x270},
- { 0x54004, 0x4},
- { 0x54006, 0x15},
- { 0x54008, 0x121f},
- { 0x54009, 0xc8},
- { 0x5400b, 0x4},
- { 0x5400d, 0x100},
- { 0x5400f, 0x100},
- { 0x54012, 0x310},
- { 0x54019, 0x994},
- { 0x5401a, 0x32},
- { 0x5401b, 0x1126},
- { 0x5401c, 0x1100},
- { 0x5401e, 0x4},
- { 0x5401f, 0x994},
- { 0x54020, 0x32},
- { 0x54021, 0x1126},
- { 0x54022, 0x1100},
- { 0x54024, 0x4},
- { 0x54032, 0x9400},
- { 0x54033, 0x3209},
- { 0x54034, 0x2600},
- { 0x54035, 0x11},
- { 0x54036, 0x11},
- { 0x54037, 0x400},
- { 0x54038, 0x9400},
- { 0x54039, 0x3209},
- { 0x5403a, 0x2600},
- { 0x5403b, 0x11},
- { 0x5403c, 0x11},
- { 0x5403d, 0x400},
- { 0xd0000, 0x1},
-};
-
static struct dram_cfg_param ddr_fsp0_2d_cfg[] = {
{ 0xd0000, 0x0},
{ 0x54003, 0xe94},
@@ -1967,20 +1895,6 @@ static struct dram_fsp_msg ddr_dram_fsp_msg[] = {
.fsp_cfg = ddr_fsp0_cfg,
.fsp_cfg_num = ARRAY_SIZE(ddr_fsp0_cfg),
},
- {
- /* P1 1866mts 1D */
- .drate = 1866,
- .fw_type = FW_1D_IMAGE,
- .fsp_cfg = ddr_fsp1_cfg,
- .fsp_cfg_num = ARRAY_SIZE(ddr_fsp1_cfg),
- },
- {
- /* P2 625mts 1D */
- .drate = 625,
- .fw_type = FW_1D_IMAGE,
- .fsp_cfg = ddr_fsp2_cfg,
- .fsp_cfg_num = ARRAY_SIZE(ddr_fsp2_cfg),
- },
{
/* P0 3733mts 2D */
.drate = 3733,
@@ -1991,7 +1905,7 @@ static struct dram_fsp_msg ddr_dram_fsp_msg[] = {
};
/* ddr timing config params */
-struct dram_timing_info dram_timing_2CS_2GB = {
+struct dram_timing_info frdm_imx93_dram_timing_2cs = {
.ddrc_cfg = ddr_ddrc_cfg,
.ddrc_cfg_num = ARRAY_SIZE(ddr_ddrc_cfg),
.ddrphy_cfg = ddr_ddrphy_cfg,
@@ -2002,7 +1916,7 @@ struct dram_timing_info dram_timing_2CS_2GB = {
.ddrphy_trained_csr_num = ARRAY_SIZE(ddr_ddrphy_trained_csr),
.ddrphy_pie = ddr_phy_pie,
.ddrphy_pie_num = ARRAY_SIZE(ddr_phy_pie),
- .fsp_table = { 3733, 1866, 625, },
+ .fsp_table = { 3733, },
.fsp_cfg = ddr_dram_fsp_cfg,
.fsp_cfg_num = ARRAY_SIZE(ddr_dram_fsp_cfg),
};
--
2.56.0
More information about the barebox
mailing list