Re: [U-Boot] [PATCH 03/22] imx8m: add image cfg for i.MX8MM lpddr4

2019-08-14 Thread Peng Fan
Hi,
> Subject: Re: [PATCH 03/22] imx8m: add image cfg for i.MX8MM lpddr4
> 
> On 09.08.19 06:14, Peng Fan wrote:
> > There is no HDMI on i.MX8MM, so we need to remove HDMI entry, then we
> > could not reuse imximage.cfg, so create a new one.
> >
> > Signed-off-by: Peng Fan 
> > ---
> >   arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg | 16
> 
> >   1 file changed, 16 insertions(+)
> >   create mode 100644
> arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> >
> > diff --git a/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > b/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > new file mode 100644
> > index 00..1a2e43e671
> > --- /dev/null
> > +++ b/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> > @@ -0,0 +1,16 @@
> > +/* SPDX-License-Identifier: GPL-2.0+ */
> > +/*
> > + * Copyright 2019 NXP
> > + */
> > +
> > +#define __ASSEMBLY__
> > +
> > +FIT
> > +BOOT_FROM  sd
> > +LOADER spl/u-boot-spl-ddr.bin  0x7E1000
> > +SECOND_LOADER  u-boot.itb  0x4020 0x6
> 
> What's the reason behind putting the u-boot.itb inside the imx image? I think
> it would be better to have an imx image that contains only the SPL and can be
> put on MMC, flash or loaded via serial loader. The raw u-boot.itb can easily 
> be
> put to the correct location in MMC, flash or RAM by itself, without being
> included in the imx image.

The goal is to generate a file named flash.bin which could be written into
sd/emmc once including itb.

This patch is to prepare a common file that could shared when itb needed,
such as i.MX8MM EVK.

If other boards no need itb, another cfg could be added into board directory
or soc directory.
> 
> My current implementation for my custom board uses a custom imximage.cfg
> with the SECOND_LOADER entry removed to achieve this.
> 
> > +
> > +DDR_FW lpddr4_pmu_train_1d_imem.bin
> > +DDR_FW lpddr4_pmu_train_1d_dmem.bin
> > +DDR_FW lpddr4_pmu_train_2d_imem.bin
> > +DDR_FW lpddr4_pmu_train_2d_dmem.bin
> 
> What's the reason for specifying the firmware files here? As far as I can see,
> the DDR_FW entries are not handled by imx8mimage.c in any way.

These files are just to let tools/imx8m_image.sh check whether these files
exist.

Regards,
Peng.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 03/22] imx8m: add image cfg for i.MX8MM lpddr4

2019-08-14 Thread Schrempf Frieder
On 09.08.19 06:14, Peng Fan wrote:
> There is no HDMI on i.MX8MM, so we need to remove HDMI entry, then
> we could not reuse imximage.cfg, so create a new one.
> 
> Signed-off-by: Peng Fan 
> ---
>   arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg | 16 
>   1 file changed, 16 insertions(+)
>   create mode 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> 
> diff --git a/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg 
> b/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> new file mode 100644
> index 00..1a2e43e671
> --- /dev/null
> +++ b/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2019 NXP
> + */
> +
> +#define __ASSEMBLY__
> +
> +FIT
> +BOOT_FROMsd
> +LOADER   spl/u-boot-spl-ddr.bin  0x7E1000
> +SECOND_LOADERu-boot.itb  0x4020 0x6

What's the reason behind putting the u-boot.itb inside the imx image? I 
think it would be better to have an imx image that contains only the SPL 
and can be put on MMC, flash or loaded via serial loader. The raw 
u-boot.itb can easily be put to the correct location in MMC, flash or 
RAM by itself, without being included in the imx image.

My current implementation for my custom board uses a custom imximage.cfg 
with the SECOND_LOADER entry removed to achieve this.

> +
> +DDR_FW lpddr4_pmu_train_1d_imem.bin
> +DDR_FW lpddr4_pmu_train_1d_dmem.bin
> +DDR_FW lpddr4_pmu_train_2d_imem.bin
> +DDR_FW lpddr4_pmu_train_2d_dmem.bin

What's the reason for specifying the firmware files here? As far as I 
can see, the DDR_FW entries are not handled by imx8mimage.c in any way.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 03/22] imx8m: add image cfg for i.MX8MM lpddr4

2019-08-08 Thread Peng Fan
There is no HDMI on i.MX8MM, so we need to remove HDMI entry, then
we could not reuse imximage.cfg, so create a new one.

Signed-off-by: Peng Fan 
---
 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg | 16 
 1 file changed, 16 insertions(+)
 create mode 100644 arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg

diff --git a/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg 
b/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
new file mode 100644
index 00..1a2e43e671
--- /dev/null
+++ b/arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 NXP
+ */
+
+#define __ASSEMBLY__
+
+FIT
+BOOT_FROM  sd
+LOADER spl/u-boot-spl-ddr.bin  0x7E1000
+SECOND_LOADER  u-boot.itb  0x4020 0x6
+
+DDR_FW lpddr4_pmu_train_1d_imem.bin
+DDR_FW lpddr4_pmu_train_1d_dmem.bin
+DDR_FW lpddr4_pmu_train_2d_imem.bin
+DDR_FW lpddr4_pmu_train_2d_dmem.bin
-- 
2.16.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot