From: Freimut Diener <f.diener@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
"open list:BAREBOX" <barebox@lists.infradead.org>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
Freimut Diener <f.diener@pengutronix.de>
Subject: [PATCH 3/5] ARM: nxp-imx93-frdm: adapt the 2CS DDR timings for barebox
Date: Fri, 27 Nov 2026 10:42:01 +0100 [thread overview]
Message-ID: <20261127-imx93-frdm-2cs-ddr-v1-3-64f5a99b3e4b@pengutronix.de> (raw)
In-Reply-To: <20261127-imx93-frdm-2cs-ddr-v1-0-64f5a99b3e4b@pengutronix.de>
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@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
next prev parent reply other threads:[~2026-11-27 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 9:41 [PATCH 0/5] ARM: nxp-imx93-frdm: support both 2 GiB LPDDR4 Freimut Diener
2026-11-27 9:41 ` [PATCH 1/5] ARM: nxp-imx93-frdm: name the existing DDR timings for 1CS Freimut Diener
2026-11-27 10:37 ` Ahmad Fatoum
2026-11-27 9:42 ` [PATCH 2/5] ARM: nxp-imx93-frdm: import 2CS DDR timings from U-Boot Freimut Diener
2026-11-27 9:42 ` Freimut Diener [this message]
2026-11-27 9:42 ` [PATCH 4/5] ddr: imx9: allow DDR PHY training errors to propagate Freimut Diener
2026-11-27 9:42 ` [PATCH 5/5] ARM: nxp-imx93-frdm: select DDR timings at boot Freimut Diener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127-imx93-frdm-2cs-ddr-v1-3-64f5a99b3e4b@pengutronix.de \
--to=f.diener@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox