Add support for full 4Gb boards

U-boot can only run within 32Gb. This change lets u-boot run
within the 32 Gb limit, but passes the full memory to the
kernel

Change-Id: Ie6c33f7caa7fbfb0fcecf7a908dd0083a302eee1
diff --git a/board/freescale/imx8mq_phanbell/board_id.c b/board/freescale/imx8mq_phanbell/board_id.c
index 8860fa3..32242ff 100644
--- a/board/freescale/imx8mq_phanbell/board_id.c
+++ b/board/freescale/imx8mq_phanbell/board_id.c
@@ -152,7 +152,7 @@
 		// Todo(pnordstrom) Board id 0 should be 4 Gb but currently
 		// only 3Gb works due to 32 bit checks all over u-boot and SDRAM
 		// starting at 1 Gb
-			ram_size = k3Gb;
+			ram_size = k4Gb;
 			break;
 		case 1:
 		case 2:
diff --git a/board/freescale/imx8mq_phanbell/imx8mq_phanbell.c b/board/freescale/imx8mq_phanbell/imx8mq_phanbell.c
index 4c3ca0b..5423bfd 100644
--- a/board/freescale/imx8mq_phanbell/imx8mq_phanbell.c
+++ b/board/freescale/imx8mq_phanbell/imx8mq_phanbell.c
@@ -107,6 +107,15 @@
 }
 #endif
 
+/* Get the top of usable RAM */
+ulong board_get_usable_ram_top(ulong total_size)
+{
+	if(gd->ram_top > 0x100000000)
+	    gd->ram_top = 0x100000000;
+
+	return gd->ram_top;
+}
+
 #ifdef CONFIG_FEC_MXC
 #define FEC_RST_PAD IMX_GPIO_NR(1, 9)
 static iomux_v3_cfg_t const fec1_rst_pads[] = {
diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index 305ec0e..6a18750 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -206,7 +206,7 @@
  */
 #define CONFIG_SYS_SDRAM_BASE           0x40000000
 #define PHYS_SDRAM                      0x40000000
-#define PHYS_SDRAM_SIZE                 0xC0000000
+#define PHYS_SDRAM_SIZE                 0x100000000
 
 #define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + \