I am trying to set up a Single Rank DRAM (MT53E512M32D1ZW) in a custom S32G3 based board. It is failing the ddr initialization in the Arm Trusted Firmware (AT-F) here.
I have identified a few places in the code base where some logical changes should be made (below) but cannot get the device to initialize. I am also seeing some PLL registers that are being written to that I cannot find in the S32G3 Reference Manual or in the ARM Reference Manual.
Changes made to the AT-F in this file,
diff --git a/drivers/nxp/s32/ddr/s32g3/ddrc_cfg.c b/drivers/nxp/s32/ddr/s32g3/ddrc_cfg.c
index e8a511816..d833a5f33 100644
--- a/drivers/nxp/s32/ddr/s32g3/ddrc_cfg.c
+++ b/drivers/nxp/s32/ddr/s32g3/ddrc_cfg.c
@@ -31,8 +31,10 @@
#include "ddr_init.h"
struct regconf ddrc_cfg[] = {
- {0x403c0000, 0x83080020U},
- {0x403c0010, 0x00000030U},
+ /* {0x403c0000, 0x83080020U}, // MSTR reg 2 rank */
+ {0x403c0000, 0x81080020U}, // MSTR reg 1 rank
+ /* {0x403c0010, 0x00000030U}, // MRCTRL0 reg 2 rank */
+ {0x403c0010, 0x00000010U}, // MRCTRL0 reg 1 rank
{0x403c0014, 0x00000000U},
{0x403c001c, 0x00000000U},
{0x403c0020, 0x00001203U},
Additionally the PLL is being configured here and here and I cannot find references to the registers being used anywhere.
I am still going through the DDRC register set to see if there is anything else to identify but would like to know if anyone here may know what specifically needs to change to configure this.