public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] board: gateworks: venice: switch to 2-bank dram config
@ 2023-06-23 16:44 Tim Harvey
  2023-06-26  0:45 ` Peng Fan
  2023-07-11 19:45 ` sbabic
  0 siblings, 2 replies; 3+ messages in thread
From: Tim Harvey @ 2023-06-23 16:44 UTC (permalink / raw)
  To: u-boot; +Cc: Stefano Babic, Fabio Estevam, Peng Fan, Tim Harvey

Switch to a 2-bank dram config to properly support 4GiB.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/venice.c | 2 +-
 include/configs/imx8mm_venice.h | 9 +++++----
 include/configs/imx8mn_venice.h | 9 +++++----
 include/configs/imx8mp_venice.h | 9 +++++----
 4 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/venice.c
index ca62f0be6d25..cb360a76a916 100644
--- a/board/gateworks/venice/venice.c
+++ b/board/gateworks/venice/venice.c
@@ -17,7 +17,7 @@ int board_phys_sdram_size(phys_size_t *size)
 	if (!size)
 		return -EINVAL;
 
-	*size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+	*size = get_ram_size((void *)PHYS_SDRAM, (long)PHYS_SDRAM_SIZE + (long)PHYS_SDRAM_2_SIZE);
 
 	return 0;
 }
diff --git a/include/configs/imx8mm_venice.h b/include/configs/imx8mm_venice.h
index 5579a05d165f..6e0cdc38536c 100644
--- a/include/configs/imx8mm_venice.h
+++ b/include/configs/imx8mm_venice.h
@@ -32,10 +32,11 @@
 #define CFG_SYS_INIT_RAM_ADDR        0x40000000
 #define CFG_SYS_INIT_RAM_SIZE        SZ_2M
 
+/* SDRAM configuration: 4GiB */
 #define CFG_SYS_SDRAM_BASE           0x40000000
-
-/* SDRAM configuration */
-#define PHYS_SDRAM                      0x40000000
-#define PHYS_SDRAM_SIZE			SZ_4G
+#define PHYS_SDRAM                   0x40000000
+#define PHYS_SDRAM_SIZE              0x80000000      /* 2 GB */
+#define PHYS_SDRAM_2                 0xC0000000
+#define PHYS_SDRAM_2_SIZE            0x80000000      /* 2 GB */
 
 #endif
diff --git a/include/configs/imx8mn_venice.h b/include/configs/imx8mn_venice.h
index 80c2df9f30ff..e9ef66b71807 100644
--- a/include/configs/imx8mn_venice.h
+++ b/include/configs/imx8mn_venice.h
@@ -26,10 +26,11 @@
 #define CFG_SYS_INIT_RAM_ADDR        0x40000000
 #define CFG_SYS_INIT_RAM_SIZE        SZ_2M
 
+/* SDRAM configuration: 4GiB */
 #define CFG_SYS_SDRAM_BASE           0x40000000
-
-/* SDRAM configuration */
-#define PHYS_SDRAM                      0x40000000
-#define PHYS_SDRAM_SIZE			SZ_4G
+#define PHYS_SDRAM                   0x40000000
+#define PHYS_SDRAM_SIZE              0x80000000      /* 2 GB */
+#define PHYS_SDRAM_2                 0xC0000000
+#define PHYS_SDRAM_2_SIZE            0x80000000      /* 2 GB */
 
 #endif
diff --git a/include/configs/imx8mp_venice.h b/include/configs/imx8mp_venice.h
index 4b32d5a77ef6..3474b7bc58e1 100644
--- a/include/configs/imx8mp_venice.h
+++ b/include/configs/imx8mp_venice.h
@@ -26,10 +26,11 @@
 #define CFG_SYS_INIT_RAM_ADDR        0x40000000
 #define CFG_SYS_INIT_RAM_SIZE        SZ_2M
 
+/* SDRAM configuration: 4GiB */
 #define CFG_SYS_SDRAM_BASE           0x40000000
-
-/* SDRAM configuration */
-#define PHYS_SDRAM                      0x40000000
-#define PHYS_SDRAM_SIZE			SZ_4G
+#define PHYS_SDRAM                   0x40000000
+#define PHYS_SDRAM_SIZE              0x80000000      /* 2 GB */
+#define PHYS_SDRAM_2                 0xC0000000
+#define PHYS_SDRAM_2_SIZE            0x80000000      /* 2 GB */
 
 #endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] board: gateworks: venice: switch to 2-bank dram config
  2023-06-23 16:44 [PATCH] board: gateworks: venice: switch to 2-bank dram config Tim Harvey
@ 2023-06-26  0:45 ` Peng Fan
  2023-07-11 19:45 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan @ 2023-06-26  0:45 UTC (permalink / raw)
  To: Tim Harvey, u-boot; +Cc: Stefano Babic, Fabio Estevam, Peng Fan



On 6/24/2023 12:44 AM, Tim Harvey wrote:
> Switch to a 2-bank dram config to properly support 4GiB.
> 
> Signed-off-by: Tim Harvey<tharvey@gateworks.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] board: gateworks: venice: switch to 2-bank dram config
  2023-06-23 16:44 [PATCH] board: gateworks: venice: switch to 2-bank dram config Tim Harvey
  2023-06-26  0:45 ` Peng Fan
@ 2023-07-11 19:45 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: sbabic @ 2023-07-11 19:45 UTC (permalink / raw)
  To: Tim Harvey, u-boot

> Switch to a 2-bank dram config to properly support 4GiB.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter  
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-11 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 16:44 [PATCH] board: gateworks: venice: switch to 2-bank dram config Tim Harvey
2023-06-26  0:45 ` Peng Fan
2023-07-11 19:45 ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox