public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kurt Miller <lists@intricatesoftware.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected
Date: Wed, 13 Nov 2019 13:44:44 -0500	[thread overview]
Message-ID: <1573670684.7665.76.camel@intricatesoftware.com> (raw)
In-Reply-To: <1568736133.7229.185.camel@intricatesoftware.com>

On Tue, 2019-09-17 at 12:02 -0400, Kurt Miller wrote:
> On Tue, 2019-09-17 at 10:57 +0800, Kever Yang wrote:
> > 
> > Hi Kurt,
> > 
> >      Could you try with below update:
> > 
> > 
> > diff --git a/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi 
> > b/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi
> > index 4a4414a960..dc9db047cb 100644
> > --- a/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi
> > +++ b/arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi
> > @@ -13,8 +13,8 @@
> >                  0x2
> >                  0x1
> >                  0x0
> > -               0xf
> > -               0xf
> > +               0x10
> > +               0x10
> >                  1
> >                  0x80241d22
> >                  0x15050f08
> > @@ -28,8 +28,8 @@
> >                  0x2
> >                  0x1
> >                  0x0
> > -               0xf
> > -               0xf
> > +               0x10
> > +               0x10
> >                  1
> >                  0x80241d22
> >                  0x15050f08
> > 
> > Thanks,
> > - Kever
> Hi Kever,
> 
> Yes, that diff does correct the memory size detection
> for my board:
> 
> U-Boot TPL 2019.10-rc3-00332-ga314ec1bfd-dirty (Sep 17 2019 - 11:55:26)
> con reg        
> cru , cic , grf , sgrf , pmucru , pmu 
> Starting SDRAM initialization...
> sdram_init: data trained for rank 1, ch 0
> sdram_init: data trained for rank 1, ch 1
> Channel 0: LPDDR4, 50MHz
> BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
> Channel 1: LPDDR4, 50MHz
> BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
> 256B stride
> lpddr4_set_ctl: channel 0 training pass
> lpddr4_set_ctl: channel 1 training pass
> lpddr4_set_rate: change freq to 400 mhz 0, 1
> lpddr4_set_ctl: channel 0 training pass
> lpddr4_set_ctl: channel 1 training pass
> lpddr4_set_rate: change freq to 800 mhz 1, 0
> Finish SDRAM initialization...
> Trying to boot from BOOTROM
> Returning to boot ROM...

Hi Kever,

Following up on this issue. I retested 2020.01-rc2 to see if
memory size detection has been fixed yet. Without your diff above
applied, 2020.01-rc2 still detects 2G memory instead of 4G:

U-Boot TPL 2020.01-rc2-dirty (Nov 13 2019 - 13:18:40)
con reg ffa80000 ffa80800 ffa82000 ffa84000 ffa88000 ffa88800 ffa8a000 ffa8c000
cru ff760000, cic ff620000, grf ff320000, sgrf ff330000, pmucru ff750000, pmu ff310000
Starting SDRAM initialization...
sdram_init: data trained for rank 1, ch 0
sdram_init: data trained for rank 1, ch 1
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS=1 Die BW=16 Size=1024MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS=1 Die BW=16 Size=1024MB
256B stride
lpddr4_set_ctl: channel 0 training pass
lpddr4_set_ctl: channel 1 training pass
lpddr4_set_rate: change freq to 400 mhz 0, 1
lpddr4_set_ctl: channel 0 training pass
lpddr4_set_ctl: channel 1 training pass
lpddr4_set_rate: change freq to 800 mhz 1, 0
Finish SDRAM initialization...
Trying to boot from BOOTROM
Returning to boot ROM...

With your diff above applied I get 4G correctly:

U-Boot TPL 2020.01-rc2-dirty (Nov 13 2019 - 13:23:22)
con reg ffa80000 ffa80800 ffa82000 ffa84000 ffa88000 ffa88800 ffa8a000 ffa8c000
cru ff760000, cic ff620000, grf ff320000, sgrf ff330000, pmucru ff750000, pmu ff310000
Starting SDRAM initialization...
sdram_init: data trained for rank 1, ch 0
sdram_init: data trained for rank 1, ch 1
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
256B stride
lpddr4_set_ctl: channel 0 training pass
lpddr4_set_ctl: channel 1 training pass
lpddr4_set_rate: change freq to 400 mhz 0, 1
lpddr4_set_ctl: channel 0 training pass
lpddr4_set_ctl: channel 1 training pass
lpddr4_set_rate: change freq to 800 mhz 1, 0
Finish SDRAM initialization...
Trying to boot from BOOTROM
Returning to boot ROM...

Regards,
-Kurt

  reply	other threads:[~2019-11-13 18:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 21:45 [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected Kurt Miller
2019-09-13 22:02 ` Kurt Miller
2019-09-17  2:57   ` [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected【请注意,邮件由u-boot-bounces@lists.denx.de代发】 detected Kever Yang
2019-09-17 16:02     ` [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected Kurt Miller
2019-11-13 18:44       ` Kurt Miller [this message]
2019-11-18  3:05         ` [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected【请注意,邮件由lists.intricate@gmail.com代发】 Kever Yang
2019-11-18 16:04           ` Kurt Miller
2019-09-17  9:25 ` [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected Jagan Teki
2019-09-18  3:38   ` [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected【请注意,邮件由u-boot-bounces@lists.denx.de代发】 detected Kever Yang
2019-09-18  5:01     ` Jagan Teki
2019-09-19  5:33       ` Jagan Teki
2019-09-26 12:53         ` Kurt Miller
2019-09-17  9:32 ` [U-Boot] rockchip: rk3399: TPL: rockpro64: Wrong memory size detected Jagan Teki

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=1573670684.7665.76.camel@intricatesoftware.com \
    --to=lists@intricatesoftware.com \
    --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