Skip to content

ram: rk3399: Fix LPDDR4 tRFCab for high-density devices

Shigeaki Asai u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ram: rk3399: Use the maximum LPDDR4 tRFCab as the defaultarch/arm/dts/rk3399-sdram-lpddr4-100.dtsi+10 -100 replies
2/2ram: rk3399: Select LPDDR4 tRFCab from MR8 densitydrivers/ram/rockchip/sdram_rk3399.c+64 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RESEND PATCH 0/2] ram: rk3399: Fix LPDDR4 tRFCab for high-density devices

From: Shigeaki Asai <[email protected]>

Resending, as the original posting was rejected by the mailing list (the sender's mail server was blocked by Spamhaus). No changes.

Some ROCK 4C+ boards fail to boot with mainline U-Boot. TPL completes, but SPL never starts:

U-Boot TPL 2027.01-rc1-00126-g3401e006432a
...
Channel 0: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB Channel 1: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB 256B stride
lpddr4_set_rate: change freq to 800MHz 1, 0 Trying to boot from BOOTROM
Returning to boot ROM...
[SPL does not start]

The cause is tRFCab in rk3399-sdram-lpddr4-100.dtsi, which is 180ns. JEDEC requires 280ns for 8Gb per channel devices, which this board uses.

This dtsi is shared by other RK3399 boards. Boards that boot today may still be out of spec: the ROCK 4SE boots with 180ns, but it reports MR8=0x10 (8Gb per channel), so it also needs 280ns.

Patch 1 sets the default tRFCab to 380ns, which is valid for all densities. This alone fixes the ROCK 4C+.
Patch 2 reads MR8 after DRAM init and selects the JEDEC value for the density, so smaller devices do not pay for the longer tRFCab.

Tested on main (2027.01-rc1):
- ROCK 4C+ (MT53E512M32D2NP): fails without the series, boots with patch 1 alone and with both patches.
- ROCK 4SE (MT53E512M32D4NQ): boots with and without the series.

I could not test devices of 4Gb per channel or less, where patch 2 selects 180ns. Testing on such boards would be appreciated.

Shigeaki Asai (2):
ram: rk3399: Use the maximum LPDDR4 tRFCab as the default
ram: rk3399: Select LPDDR4 tRFCab from MR8 density

 arch/arm/dts/rk3399-sdram-lpddr4-100.dtsi | 20 +++----
 drivers/ram/rockchip/sdram_rk3399.c       | 64 +++++++++++++++++++++++
 2 files changed, 74 insertions(+), 10 deletions(-)
Signature · 1 line
2.43.0