mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jason Cobham <cobham.jason@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: imx53 memory detection
Date: Wed, 13 Apr 2016 21:38:35 -0700	[thread overview]
Message-ID: <CAKu_b=KQt3sA7LCUCb_-315n-=rohnyJxFUB4x41z-WthHrNWg@mail.gmail.com> (raw)
In-Reply-To: <20160413063649.GU9102@pengutronix.de>

Hi Sascha,

Thanks for the quick reply.

> So you replaced barebox_arm_entry with imx53_barebox_entry, right? What
> memory size do you have and what size gets detected then?

Yes, I used imx53_barebox_entry. I have two boards, 512MB/1G. In
further testing, I found the 512MB board was detected correctly, and
the 1G board was detected at 2G.

...

> As a first step you should remove the /memory node in
> arch/arm/dts/imx53-ccxmx53.dtsi. Since there are different possible
> memory setups for this board it is wrong anyway. Then it would be
> interesting what imx_esdctl_v4_add_mem() detects. I believe it should be
> possible to fix it if it detects the wrong memory size.

For the 1G board, I removed the memory node and looked into
imx_esdctl_v4_add_mem(). I found:
add_mem: cs0 base: 0x70000000 cs0 size: 0x40000000
add_mem: cs1 base: 0xb0000000 cs1 size: 0x40000000

Going further into it, I found in the imx_v4_sdram_size() read the
following from the esdctl registers:
ctlval:0xc4110000, esdmisc:0xc00016d0 which is set from the
appropriate flash-header file.

The ram populated on the 1G board is MT47H128M16 – 128 Meg x 16 (16
Meg x 16 x 8 banks).
Comparing the register setting against the datasheet for the ram chips
looks like there was a mistake in the row setting of the 1G
flash-header. After updating it to what I believe is correct setting:
(ctlval:0xc3110000, esdmisc:0xc00016d0), the memory is now detected
correctly.

Unless you see any Issue with my findings, I'll go with this fix.


Thanks,

Jason

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-04-14  4:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13  5:08 Jason Cobham
2016-04-13  6:36 ` Sascha Hauer
2016-04-14  4:38   ` Jason Cobham [this message]
2016-04-14  6:54     ` 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='CAKu_b=KQt3sA7LCUCb_-315n-=rohnyJxFUB4x41z-WthHrNWg@mail.gmail.com' \
    --to=cobham.jason@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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