* [PATCH v2 0/1] arm: imx8m: imx8mm-cl-iot-gate: Add support for detect memory size
@ 2021-08-24 9:44 Ying-Chun Liu
2021-08-24 9:44 ` [PATCH v2 1/1] " Ying-Chun Liu
0 siblings, 1 reply; 4+ messages in thread
From: Ying-Chun Liu @ 2021-08-24 9:44 UTC (permalink / raw)
To: u-boot; +Cc: Ying-Chun Liu (PaulLiu)
From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
When purchasing imx8mm-cl-iot-gate it is able to customize the
memory size. It could be 1GB, 2GB and 4GB. We implement
board_phys_sdram_size() to detect the memory size for usage.
This patch was trying to fix the regression on mainline U-boot for
imx8mm-cl-iot-gate. However this is not related to the regression.
But we should have this implemented anyway.
v2: use hang() instead of while(1)
Ying-Chun Liu (PaulLiu) (1):
arm: imx8m: imx8mm-cl-iot-gate: Add support for detect memory size
.../imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
--
2.32.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/1] arm: imx8m: imx8mm-cl-iot-gate: Add support for detect memory size
2021-08-24 9:44 [PATCH v2 0/1] arm: imx8m: imx8mm-cl-iot-gate: Add support for detect memory size Ying-Chun Liu
@ 2021-08-24 9:44 ` Ying-Chun Liu
2021-08-24 10:29 ` Fabio Estevam
2021-10-07 14:14 ` sbabic
0 siblings, 2 replies; 4+ messages in thread
From: Ying-Chun Liu @ 2021-08-24 9:44 UTC (permalink / raw)
To: u-boot
Cc: Ying-Chun Liu (PaulLiu), Fabio Estevam, Frieder Schrempf, uboot-imx
From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
When purchasing imx8mm-cl-iot-gate it is able to customize the
memory size. It could be 1GB, 2GB and 4GB. We implement
board_phys_sdram_size() to detect the memory size for usage.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: uboot-imx <uboot-imx@nxp.com>
---
v2: use hang() instead of while(1)
---
.../imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c b/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c
index eabcc842a4..cd15410978 100644
--- a/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c
+++ b/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <env.h>
+#include <hang.h>
#include <init.h>
#include <miiphy.h>
#include <netdev.h>
@@ -14,8 +15,32 @@
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
+#include "ddr/ddr.h"
+
DECLARE_GLOBAL_DATA_PTR;
+int board_phys_sdram_size(phys_size_t *size)
+{
+ struct lpddr4_tcm_desc *lpddr4_tcm_desc =
+ (struct lpddr4_tcm_desc *)TCM_DATA_CFG;
+
+ switch (lpddr4_tcm_desc->size) {
+ case 4096:
+ case 2048:
+ case 1024:
+ *size = (1L << 20) * lpddr4_tcm_desc->size;
+ break;
+ default:
+ printf("%s: DRAM size %uM is not supported\n",
+ __func__,
+ lpddr4_tcm_desc->size);
+ hang();
+ break;
+ };
+
+ return 0;
+}
+
static int setup_fec(void)
{
if (IS_ENABLED(CONFIG_FEC_MXC)) {
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] arm: imx8m: imx8mm-cl-iot-gate: Add support for detect memory size
2021-08-24 9:44 ` [PATCH v2 1/1] " Ying-Chun Liu
@ 2021-08-24 10:29 ` Fabio Estevam
2021-10-07 14:14 ` sbabic
1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2021-08-24 10:29 UTC (permalink / raw)
To: Ying-Chun Liu
Cc: u-boot, Ying-Chun Liu (PaulLiu), Frieder Schrempf, uboot-imx
Hi Paul,
On 24/08/2021 06:44, Ying-Chun Liu wrote:
> From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
>
> When purchasing imx8mm-cl-iot-gate it is able to customize the
> memory size. It could be 1GB, 2GB and 4GB. We implement
> board_phys_sdram_size() to detect the memory size for usage.
>
> Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
> Cc: Fabio Estevam <festevam@denx.de>
> Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
> Cc: uboot-imx <uboot-imx@nxp.com>
> ---
> v2: use hang() instead of while(1)
Thanks for fixing this:
Reviewed-by: Fabio Estevam <festevam@denx.de>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email:
festevam@denx.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/1] arm: imx8m: imx8mm-cl-iot-gate: Add support for detect memory size
2021-08-24 9:44 ` [PATCH v2 1/1] " Ying-Chun Liu
2021-08-24 10:29 ` Fabio Estevam
@ 2021-10-07 14:14 ` sbabic
1 sibling, 0 replies; 4+ messages in thread
From: sbabic @ 2021-10-07 14:14 UTC (permalink / raw)
To: Ying-Chun Liu, U-Boot
> From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
> When purchasing imx8mm-cl-iot-gate it is able to customize the
> memory size. It could be 1GB, 2GB and 4GB. We implement
> board_phys_sdram_size() to detect the memory size for usage.
> Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
> Cc: Fabio Estevam <festevam@denx.de>
> Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
> Cc: uboot-imx <uboot-imx@nxp.com>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-07 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 9:44 [PATCH v2 0/1] arm: imx8m: imx8mm-cl-iot-gate: Add support for detect memory size Ying-Chun Liu
2021-08-24 9:44 ` [PATCH v2 1/1] " Ying-Chun Liu
2021-08-24 10:29 ` Fabio Estevam
2021-10-07 14:14 ` sbabic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.