From: Joacim Zetterling <joacim.zetterling@westermo.com>
To: barebox@lists.infradead.org
Cc: a.fatoum@pengutronix.de
Subject: [PATCH 0/4] ARM: imx: Fix problem with imx8 SDRAM size calculation
Date: Fri, 25 Feb 2022 15:47:47 +0100 [thread overview]
Message-ID: <20220225144751.4160843-1-joacim.zetterling@westermo.com> (raw)
There is some issues with the imx8 ddrc sdram size calculation.
If we compare the imx8mn DDR4 evk against the LPDDR4 variant in
code and in the datasheets, we see the following:
DDR4 LPDDR4
========================
Bus width 16 16
Rank 1 1
Ranks 1 1
Banks 4 8
Banks grps 2 1
Rows 17 15
Col 10 10
This gives us the following problems:
1. Bus width problem.
Does not support 16 bit SDRAM bus mode, only 32 bit supported
2. Row size problem.
Only up to 16 bit row size support.
3. Bank groups support.
Only support of 1 bank group.
4. Bit count problem.
The imx_ddrc_count_bits function does not do a correct count.
Found out during test of the 1-3 part fixes.
The fact that the code only handled a 32 bit bus width, compensated
the problems with rows, banks and rank.
This have been tested on the NXP IMX8MN-EVK with 2GB DDR4 SDRAM as
well as on a custom board with 512MB LPDDR4 SDRAM.
Joacim Zetterling (4):
ARM: imx: Add imx8 support for 18 bit SDRAM row size handle
ARM: imx: Add imx8 support for SDRAM with two or more bank groups
ARM: imx: Correct mem size calculation for 4/8/16/32 bit bus width
ARM: imx: Correct bit count function
arch/arm/mach-imx/esdctl.c | 61 +++++++++++++++++++++++++-------------
1 file changed, 41 insertions(+), 20 deletions(-)
--
2.25.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2022-02-25 14:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 14:47 Joacim Zetterling [this message]
2022-02-25 14:47 ` [PATCH 1/4] ARM: imx: Add imx8 support for 18 bit SDRAM row size handle Joacim Zetterling
2022-02-25 14:47 ` [PATCH 2/4] ARM: imx: Add imx8 support for SDRAM with two or more bank groups Joacim Zetterling
2022-02-25 14:47 ` [PATCH 3/4] ARM: imx: Correct mem size calculation for 4/8/16/32 bit bus width Joacim Zetterling
2022-02-25 14:47 ` [PATCH 4/4] ARM: imx: Correct bit count function Joacim Zetterling
2022-02-28 9:46 ` [PATCH 0/4] ARM: imx: Fix problem with imx8 SDRAM size calculation Sascha Hauer
2022-02-28 10:06 ` Sascha Hauer
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=20220225144751.4160843-1-joacim.zetterling@westermo.com \
--to=joacim.zetterling@westermo.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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