Skip to contentSkip to conversation

ram: rk3399: add missing high row detection

PATCH In review Jonathan Liu 2 participants 2 messages Mar 23, 2023 – Apr 14, 2023 Arm Rockchip

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ram: rk3399: add missing high row detection

For 2 GB LPDDR4 single-rank RAM with 16 rows, the Rockchip ddr init bin prints:
"Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB"

U-Boot TPL prints:
"BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB"

Add missing high row detection so that U-Boot TPL prints Row=16, same as the Rockchip ddr init bin:
"BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB"

---
 drivers/ram/rockchip/sdram_rk3399.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/ram/rockchip/sdram_rk3399.c +2 -0
index b1fea04e84..b597448203 100644
@@ -2749,6 +2749,8 @@ static u64 dram_detect_cap(struct dram_info *dram,
 	/* detect cs1 row */
 	sdram_detect_cs1_row(cap_info, params->base.dramtype);
 
+	sdram_detect_high_row(cap_info);
+
 	/* detect die bw */
 	sdram_detect_dbw(cap_info, params->base.dramtype);
 
Signature · 1 line
2.40.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jonathan Liu

For 2 GB LPDDR4 single-rank RAM with 16 rows, the Rockchip ddr init bin prints:
"Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB"

Quoted 8 lines

U-Boot TPL prints:
"BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB"

Add missing high row detection so that U-Boot TPL prints Row=16, same as the Rockchip ddr init bin:
"BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB"

Thanks,
- Kever

Quoted 17 lines
---
  drivers/ram/rockchip/sdram_rk3399.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/ram/rockchip/sdram_rk3399.c +2 -0
index b1fea04e84..b597448203 100644
@@ -2749,6 +2749,8 @@ static u64 dram_detect_cap(struct dram_info *dram,
  	/* detect cs1 row */
  	sdram_detect_cs1_row(cap_info, params->base.dramtype);
 
+	sdram_detect_high_row(cap_info);
+
  	/* detect die bw */
  	sdram_detect_dbw(cap_info, params->base.dramtype);