public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: sbabic@denx.de
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,u-boot@lists.denx.de
Subject: [PATCH] imx8m: fix reading of DDR4 MR registers
Date: Fri, 20 May 2022 15:41:15 +0200 (CEST)	[thread overview]
Message-ID: <20220520134120.C7B6783608@phobos.denx.de> (raw)
In-Reply-To: <20220425142248.235807-1-rasmus.villemoes@prevas.dk>

> I was trying to employ lpddr4_mr_read() to something similar to what
> the imx8mm-cl-iot-gate board is doing for auto-detecting the RAM
> type. However, the version in drivers/ddr/imx/imx8m/ddrphy_utils.c
> differs from the private one used by that board in how it extracts the
> byte value, and I was only getting zeroes. Adding a bit of debug
> printf'ing gives me
>  tmp = 0x00ffff00
>  tmp = 0x00070700
>  tmp = 0x00000000
>  tmp = 0x00101000
> and indeed I was expecting a (combined) value of 0xff070010 (0xff
> being Manufacturer ID for Micron). I can't find any documentation that
> says how the values are supposed to be read, but clearly the iot-gate
> definition is the right one, both for its use case as well as my
> imx8mp-based board.
> So lift the private definition of lpddr4_mr_read() from the
> imx8mm-cl-iot-gate board code to ddrphy_utils.c, and add a declaration
> in the ddr.h header where e.g. get_trained_CDD() is already declared.
> This has only been compile-tested for the imx8mm-cl-iot-gate
> board (since I don't have the hardware), but since I've merely moved
> its definition of lpddr4_mr_read(), I'd be surprised if it changed
> anything for that board.
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> Tested-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

      parent reply	other threads:[~2022-05-20 13:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 14:22 [PATCH] imx8m: fix reading of DDR4 MR registers Rasmus Villemoes
2022-04-26 12:59 ` Fabio Estevam
2022-04-27  6:48   ` Paul Liu
2022-04-27 10:17     ` Fabio Estevam
2022-05-20 13:41 ` sbabic [this message]

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=20220520134120.C7B6783608@phobos.denx.de \
    --to=sbabic@denx.de \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=u-boot@lists.denx.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