[PATCH V2 37/53] ddr: imx: Add i.MX9 DDR controller driver
Frieder Schrempf
frieder.schrempf at kontron.de
Mon Nov 7 12:59:15 CET 2022
Hi Peng, Marcel,
On 26.07.22 10:41, Peng Fan (OSS) wrote:
> From: Ye Li <ye.li at nxp.com>
>
> Since i.MX9 uses same DDR PHY with i.MX8M, split the DDRPHY to a common
> directory under imx, then use dedicated ddr controller driver for each
> iMX9 and iMX8M.
>
> The DDRPHY registers are space compressed, so it needs conversion to
> access the DDRPHY address. Introduce a common PHY address remap function
> for both iMX8M and iMX9 for all PHY registers accessing.
>
> Signed-off-by: Ye Li <ye.li at nxp.com>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
[...]
> +int wait_ddrphy_training_complete(void)
> +{
> + unsigned int mail;
> +
> + while (1) {
> + mail = get_mail();
> + decode_major_message(mail);
> + if (mail == 0x08) {
> + decode_streaming_message();
> + } else if (mail == 0x07) {
> + debug("Training PASS\n");
> + return 0;
> + } else if (mail == 0xff) {
> + printf("Training FAILED\n");
Our SPL for "kontron-sl-mx8mm" calls ddr_init() multiple times as it
tries multiple configurations and it is expected that it sometimes fails
and falls back to another config: [1].
Other boards like "verdin-mx8mp" seem to have a similar approach: [2].
With this change in v2022.10 we now get "Training FAILED" printed to the
console on our boards with 1GB DDR, even if the training of the fallback
configuration afterwards succeeded. This is kind of misleading for the user.
Do you have any idea what would be a good way to suppress this message
in our case? Passing a parameter like "fail_expected" all the way from
the boards spl_dram_init() down to wait_ddrphy_training_complete()
doesn't seem optimal, but removing the message in
wait_ddrphy_training_complete() and duplicating it in each
spl_dram_init() doesn't seem like a good option either.
Maybe you have some idea how to handle this!?
Thanks
Frieder
[1]
https://source.denx.de/u-boot/u-boot/-/blob/master/board/kontron/sl-mx8mm/spl.c#L79
[2]
https://source.denx.de/u-boot/u-boot/-/blob/master/board/toradex/verdin-imx8mp/spl.c#L40
More information about the U-Boot
mailing list