mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Remmet <T.Remmet@phytec.de>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	"a.fatoum@pengutronix.de" <a.fatoum@pengutronix.de>,
	"lst@pengutronix.de" <lst@pengutronix.de>
Cc: "upstream@phytec.de" <upstream@phytec.de>,
	"joacim.zetterling@westermo.com" <joacim.zetterling@westermo.com>
Subject: Re: [PATCH] arm: imx: mmdc_size: Increase row_max for imx8m
Date: Tue, 21 Jun 2022 12:59:51 +0000	[thread overview]
Message-ID: <f144f65143790f26e241669f152b9ad360fa2d1d.camel@phytec.de> (raw)
In-Reply-To: <e8dfb72b-3a12-eef5-13ff-894f60a90159@pengutronix.de>

Hi!

Am Montag, dem 20.06.2022 um 15:19 +0200 schrieb Ahmad Fatoum:
> Hi,
> 
> On 20.06.22 14:47, Teresa Remmet wrote:
> > Am Montag, dem 20.06.2022 um 14:38 +0200 schrieb Ahmad Fatoum:
> > > On 20.06.22 14:27, Teresa Remmet wrote:
> > > > I have set the DDRC_ADDRMAP7 register manually in the RAM
> > > > configuration
> > > > in such a case. As I don't see a solution that fits for all.
> > > > But
> > > > would
> > > > be happy for one. :)
> > > 
> > > What would the 'neutral' value to write into this register be?
> > > zero
> > > seems to not be it.
> > 
> > it's 
> > 
> > 0xf0f for ADDRMAP7.
> > 
> > Reference Manual says: "If set to 15, row address bit X is set to
> > 0"
> 
> Do newer spreadsheets always generate ADDRMAP7 writes even if the
> value is zero? If so, we could perhaps initialize it to 0xf0f before
> running ddr_cfg_umctl2(). The DDRC seems to be in reset while the
> registers are being written, so this might just work.

this is not so easy to figure out because the spread sheet does 
not generate the c headers directly. 
But it is true for other ADDRMAP registers where the reset value is also zero.
So I would give it a try.

> 
> As 0 is a valid value, I am wondering if this snippet introduced with
> 42d45ef380c5 ("ARM: imx: Add imx8 support for SDRAM with two or more
> bank groups")
> is correct:
> 
> if (addrmap[8]) {
>         if (FIELD_GET(DDRC_ADDRMAP8_BG_B0, addrmap[8]) != 0b11111)
>                 banks++;
>         if (FIELD_GET(DDRC_ADDRMAP8_BG_B1, addrmap[8]) != 0b111111)
>                 banks++;
> }

yes, this is wrong. LPDDR4 is no problem at the moment as the
spreadsheet does not set the value and the reset value here is zero.
But DDR4 uses it and there could be a "real" zero set which is then
ignored.

Regards,
Teresa

> 
> Thanks,
> Ahmad
> 
> > Regards,
> > Teresa
> > 
> > 
> > > Thanks,
> > > Ahmad
> > > 
> > > > Regards,
> > > > Teresa
> > > > 
> > > > > > ---
> > > > > >  arch/arm/mach-imx/esdctl.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > 
> > > > > > diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-
> > > > > > imx/esdctl.c
> > > > > > index 8dd0ddbbc965..b070ebc62a45 100644
> > > > > > --- a/arch/arm/mach-imx/esdctl.c
> > > > > > +++ b/arch/arm/mach-imx/esdctl.c
> > > > > > @@ -488,7 +488,7 @@ static resource_size_t
> > > > > > imx8m_ddrc_sdram_size(void __iomem *ddrc)
> > > > > >  
> > > > > >  	return imx_ddrc_sdram_size(ddrc, addrmap,
> > > > > >  				   12, ARRAY_AND_SIZE(col_b),
> > > > > > -				   16, ARRAY_AND_SIZE(row_b),
> > > > > > +				   18, ARRAY_AND_SIZE(row_b),
> > > > > >  				   reduced_adress_space, true);
> > > > > >  }
> > > > > >  
> 
> 
-- 
PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany

Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber |
Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE
149059855

      reply	other threads:[~2022-06-21 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 14:23 Teresa Remmet
2022-05-24  7:10 ` Sascha Hauer
2022-06-20 12:02 ` Ahmad Fatoum
2022-06-20 12:27   ` Teresa Remmet
2022-06-20 12:38     ` Ahmad Fatoum
2022-06-20 12:47       ` Teresa Remmet
2022-06-20 13:19         ` Ahmad Fatoum
2022-06-21 12:59           ` Teresa Remmet [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=f144f65143790f26e241669f152b9ad360fa2d1d.camel@phytec.de \
    --to=t.remmet@phytec.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=joacim.zetterling@westermo.com \
    --cc=lst@pengutronix.de \
    --cc=upstream@phytec.de \
    --subject='Re: [PATCH] arm: imx: mmdc_size: Increase row_max for imx8m' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox