Skip to contentSkip to conversation

ARM: imx: Update DDR frequency on i.MX8M Plus DHCOM

PATCH In review Marek Vasut 3 participants 3 messages Aug 19, 2022 – Sep 18, 2022 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: Update DDR frequency on i.MX8M Plus DHCOM

Commit 99c7cc58e12 ("ddr: imx: Add i.MX9 DDR controller driver") contains an inobvious side-effect which renders all systems using DRAM controller at 3732 MT/s unbootable. The change is located in ddrphy_init_set_dfi_clk(), where the switch case statement entry 3732 changed to entry 3733, so any board with DDR calibration data for 3732 MT/s operations needs to be updated to 3733 MT/s to match the change.

Since there is currently only one such board, update the board instead of handling both 3732 and 3733 options in the driver. It is likely the NXP MX8MP RPA update will follow and use the later value too.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>
---
 board/dhelectronics/dh_imx8mp/lpddr4_timing_4G_32.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
board/dhelectronics/dh_imx8mp/lpddr4_timing_4G_32.c +5 -5
index 2eda4a59569..a4c1b121c27 100644
@@ -1799,8 +1799,8 @@ static struct dram_cfg_param ddr_phy_pie[] = {
 
 static struct dram_fsp_msg ddr_dram_fsp_msg[] = {
 	{
-		/* P0 3732mts 1D */
-		.drate = 3732,
+		/* P0 3733mts 1D */
+		.drate = 3733,
 		.fw_type = FW_1D_IMAGE,
 		.fsp_cfg = ddr_fsp0_cfg,
 		.fsp_cfg_num = ARRAY_SIZE(ddr_fsp0_cfg),
@@ -1820,8 +1820,8 @@ static struct dram_fsp_msg ddr_dram_fsp_msg[] = {
 		.fsp_cfg_num = ARRAY_SIZE(ddr_fsp2_cfg),
 	},
 	{
-		/* P0 3732mts 2D */
-		.drate = 3732,
+		/* P0 3733mts 2D */
+		.drate = 3733,
 		.fw_type = FW_2D_IMAGE,
 		.fsp_cfg = ddr_fsp0_2d_cfg,
 		.fsp_cfg_num = ARRAY_SIZE(ddr_fsp0_2d_cfg),
@@ -1840,5 +1840,5 @@ struct dram_timing_info dh_imx8mp_dhcom_dram_timing_32g_x32 = {
 	.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 = { 3732, 400, 100, },
+	.fsp_table = { 3733, 400, 100, },
 };
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Marek Vasut

Commit 99c7cc58e12 ("ddr: imx: Add i.MX9 DDR controller driver") contains an inobvious side-effect which renders all systems using DRAM controller at 3732 MT/s unbootable. The change is located in ddrphy_init_set_dfi_clk(), where the switch case statement entry 3732 changed to entry 3733, so any board with DDR calibration data for 3732 MT/s operations needs to be updated to 3733 MT/s to match the change.

Since there is currently only one such board, update the board instead of handling both 3732 and 3733 options in the driver. It is likely the NXP MX8MP RPA update will follow and use the later value too.

Quoted 6 lines
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>
#2 lore raw

PATCH 1/1 ARM: imx: Update DDR frequency on i.MX8M Plus DHCOM

In reply to Marek Vasut
Quoted 10 lines

Commit 99c7cc58e12 ("ddr: imx: Add i.MX9 DDR controller driver") contains an inobvious side-effect which renders all systems using DRAM controller at 3732 MT/s unbootable. The change is located in ddrphy_init_set_dfi_clk(), where the switch case statement entry 3732 changed to entry 3733, so any board with DDR calibration data for 3732 MT/s operations needs to be updated to 3733 MT/s to match the change.
Since there is currently only one such board, update the board instead of handling both 3732 and 3733 options in the driver. It is likely the NXP MX8MP RPA update will follow and use the later value too.

Quoted 7 lines
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc uboot-imx <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================