Skip to contentSkip to conversation

sunxi: Fix memory 2-rank initialization for a33 cpu

PATCH New Michael Trimarchi 3 participants 5 messages Oct 31, 2018 – Nov 22, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: Fix memory 2-rank initialization for a33 cpu

When we initialize the memory we need to autodetect rank and size but this can happen only if we send the proper reset to both memory module including cke signal.
For this reason we need initialize the physical on both channel because we need to presume that both are connected. This way let the CLKE to be activated at the right time with the memory reset coming from the cpu

---
 arch/arm/mach-sunxi/dram_sun8i_a33.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-sunxi/dram_sun8i_a33.c +1 -1
index d9aa0c6d7e..1da2727f98 100644
@@ -334,7 +334,7 @@ unsigned long sunxi_dram_init(void)
 	struct dram_para para = {
 		.cs1 = 0,
 		.bank = 1,
-		.rank = 1,
+		.rank = 2,
 		.rows = 15,
 		.bus_width = 16,
 		.page_size = 2048,
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 sunxi: Fix memory 2-rank initialization for a33 cpu

Hi Maxime

Quoted 9 lines · Michael Trimarchi

When we initialize the memory we need to autodetect rank and size but this can happen only if we send the proper reset to both memory module including cke signal.
For this reason we need initialize the physical on both channel because we need to presume that both are connected. This way let the CLKE to be activated at the right time with the memory reset coming from the cpu

Does enough clear?

Michael

Quoted 20 lines
---
 arch/arm/mach-sunxi/dram_sun8i_a33.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-sunxi/dram_sun8i_a33.c +1 -2
index d9aa0c6d7e..1da2727f98 100644
@@ -334,7 +334,7 @@ unsigned long sunxi_dram_init(void)
        struct dram_para para = {
                .cs1 = 0,
                .bank = 1,
-               .rank = 1,
+               .rank = 2,
                .rows = 15,
                .bus_width = 16,
                .page_size = 2048,
--

2.17.1

Signature · 4 lines
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |
#2 lore raw

PATCH 1/1 sunxi: Fix memory 2-rank initialization for a33 cpu

In reply to Michael Trimarchi
Quoted 8 lines · Michael Trimarchi

When we initialize the memory we need to autodetect rank and size but this can happen only if we send the proper reset to both memory module including cke signal.
For this reason we need initialize the physical on both channel because we need to presume that both are connected. This way let the CLKE to be activated at the right time with the memory reset coming from the cpu

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181105/0d9c58da/attachment.sig>
#3 lore raw

PATCH 1/1 sunxi: Fix memory 2-rank initialization for a33 cpu

Hi Jagan

Quoted 9 lines · Maxime Ripard
Quoted 7 lines · Michael Trimarchi

When we initialize the memory we need to autodetect rank and size but this can happen only if we send the proper reset to both memory module including cke signal.
For this reason we need initialize the physical on both channel because we need to presume that both are connected. This way let the CLKE to be activated at the right time with the memory reset coming from the cpu

Quoted 4 lines
Quoted 1 line

Can you test on a consumer board with A33? I have tested over oscilloscope on my device

Michael

Quoted 6 lines

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Signature · 4 lines
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |
#4 lore raw

PATCH 1/1 sunxi: Fix memory 2-rank initialization for a33 cpu

In reply to Michael Trimarchi
Quoted 10 lines · Michael Trimarchi

When we initialize the memory we need to autodetect rank and size but this can happen only if we send the proper reset to both memory module including cke signal.
For this reason we need initialize the physical on both channel because we need to presume that both are connected. This way let the CLKE to be activated at the right time with the memory reset coming from the cpu

---

Applied to u-boot-sunxi/master