* [PATCH v1 0/2] verdin-am62: add u-boot update wrappers and fix check for minimum memory size
@ 2023-08-24 8:08 Emanuele Ghidoli
2023-08-24 8:08 ` [PATCH v1 1/2] verdin-am62: add u-boot update wrappers Emanuele Ghidoli
2023-08-24 8:08 ` [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size Emanuele Ghidoli
0 siblings, 2 replies; 15+ messages in thread
From: Emanuele Ghidoli @ 2023-08-24 8:08 UTC (permalink / raw)
To: u-boot
Cc: Emanuele Ghidoli, Neha Malcom Francis, Nishanth Menon,
Bryan Brattlof, Marcel Ziswiler
From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
This series add boot update wrappers to Toradex Verdin AM62 SoM and
fix the minimum memory size warning.
These wrappes allow flash all U-Boot binaries:
R5 SPL, A53 SPL and A53 U-Boot proper.
Emanuele Ghidoli (2):
verdin-am62: add u-boot update wrappers
board: verdin-am62: fix check for minimum memory size
board/toradex/verdin-am62/verdin-am62.c | 4 ++--
include/configs/verdin-am62.h | 12 +++++++++++-
2 files changed, 13 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v1 1/2] verdin-am62: add u-boot update wrappers
2023-08-24 8:08 [PATCH v1 0/2] verdin-am62: add u-boot update wrappers and fix check for minimum memory size Emanuele Ghidoli
@ 2023-08-24 8:08 ` Emanuele Ghidoli
2023-08-24 11:19 ` Francesco Dolcini
2023-09-09 13:30 ` Tom Rini
2023-08-24 8:08 ` [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size Emanuele Ghidoli
1 sibling, 2 replies; 15+ messages in thread
From: Emanuele Ghidoli @ 2023-08-24 8:08 UTC (permalink / raw)
To: u-boot
Cc: Emanuele Ghidoli, Neha Malcom Francis, Nishanth Menon,
Bryan Brattlof, Marcel Ziswiler
From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Add update_tiboot3, update_tispl and update_uboot wrappers to update
R5 SPL, A53 SPL and A53 U-boot respectively.
Usage example:
> tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin
> run update_tiboot3
> tftpboot ${loadaddr} tispl.bin
> run update_tispl
> tftpboot ${loadaddr} u-boot.img
> run update_uboot
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
---
include/configs/verdin-am62.h | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/configs/verdin-am62.h b/include/configs/verdin-am62.h
index 7990ea831022..91fc0f03a81a 100644
--- a/include/configs/verdin-am62.h
+++ b/include/configs/verdin-am62.h
@@ -46,10 +46,20 @@
"fdt_board=dev\0" \
"setup=setenv setupargs console=tty1 console=${console},${baudrate} " \
"consoleblank=0 earlycon=ns16550a,mmio32,0x02800000\0" \
- "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \
+ "update_tiboot3=askenv confirm Did you load tiboot3.bin (y/N)?; " \
"if test \"$confirm\" = \"y\"; then " \
"setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
"${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \
+ "${blkcnt}; fi\0" \
+ "update_tispl=askenv confirm Did you load tispl.bin (y/N)?; " \
+ "if test \"$confirm\" = \"y\"; then " \
+ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
+ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x400 " \
+ "${blkcnt}; fi\0" \
+ "update_uboot=askenv confirm Did you load u-boot.img (y/N)?; " \
+ "if test \"$confirm\" = \"y\"; then " \
+ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \
+ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x1400 " \
"${blkcnt}; fi\0"
#endif /* __VERDIN_AM62_H */
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 8:08 [PATCH v1 0/2] verdin-am62: add u-boot update wrappers and fix check for minimum memory size Emanuele Ghidoli
2023-08-24 8:08 ` [PATCH v1 1/2] verdin-am62: add u-boot update wrappers Emanuele Ghidoli
@ 2023-08-24 8:08 ` Emanuele Ghidoli
2023-08-24 11:20 ` Francesco Dolcini
` (2 more replies)
1 sibling, 3 replies; 15+ messages in thread
From: Emanuele Ghidoli @ 2023-08-24 8:08 UTC (permalink / raw)
To: u-boot
Cc: Emanuele Ghidoli, Neha Malcom Francis, Nishanth Menon,
Bryan Brattlof, Marcel Ziswiler
From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
verdin am62 SKUs comes in multiple memory configuration, check that
the detected memory is at least 512MB since we have some
reserved memory just before this threshold and therefore
the module cannot work with less memory.
Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
---
board/toradex/verdin-am62/verdin-am62.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
index a3d1d07a0cbf..d09dda5bccc9 100644
--- a/board/toradex/verdin-am62/verdin-am62.c
+++ b/board/toradex/verdin-am62/verdin-am62.c
@@ -28,8 +28,8 @@ int dram_init(void)
{
gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, CFG_SYS_SDRAM_SIZE);
- if (gd->ram_size < SZ_64M)
- puts("## WARNING: Less than 64MB RAM detected\n");
+ if (gd->ram_size < SZ_512M)
+ puts("## WARNING: Less than 512MB RAM detected\n");
return 0;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v1 1/2] verdin-am62: add u-boot update wrappers
2023-08-24 8:08 ` [PATCH v1 1/2] verdin-am62: add u-boot update wrappers Emanuele Ghidoli
@ 2023-08-24 11:19 ` Francesco Dolcini
2023-08-24 12:10 ` Nishanth Menon
2023-09-09 13:30 ` Tom Rini
1 sibling, 1 reply; 15+ messages in thread
From: Francesco Dolcini @ 2023-08-24 11:19 UTC (permalink / raw)
To: Emanuele Ghidoli
Cc: u-boot, Emanuele Ghidoli, Neha Malcom Francis, Nishanth Menon,
Bryan Brattlof, Marcel Ziswiler
On Thu, Aug 24, 2023 at 10:08:49AM +0200, Emanuele Ghidoli wrote:
> From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>
> Add update_tiboot3, update_tispl and update_uboot wrappers to update
> R5 SPL, A53 SPL and A53 U-boot respectively.
>
> Usage example:
> > tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin
> > run update_tiboot3
>
> > tftpboot ${loadaddr} tispl.bin
> > run update_tispl
>
> > tftpboot ${loadaddr} u-boot.img
> > run update_uboot
>
> Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 8:08 ` [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size Emanuele Ghidoli
@ 2023-08-24 11:20 ` Francesco Dolcini
2023-08-24 12:14 ` Nishanth Menon
2023-09-09 13:30 ` Tom Rini
2 siblings, 0 replies; 15+ messages in thread
From: Francesco Dolcini @ 2023-08-24 11:20 UTC (permalink / raw)
To: Emanuele Ghidoli
Cc: u-boot, Emanuele Ghidoli, Neha Malcom Francis, Nishanth Menon,
Bryan Brattlof, Marcel Ziswiler
On Thu, Aug 24, 2023 at 10:08:50AM +0200, Emanuele Ghidoli wrote:
> From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>
> verdin am62 SKUs comes in multiple memory configuration, check that
> the detected memory is at least 512MB since we have some
> reserved memory just before this threshold and therefore
> the module cannot work with less memory.
>
> Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
> Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 1/2] verdin-am62: add u-boot update wrappers
2023-08-24 11:19 ` Francesco Dolcini
@ 2023-08-24 12:10 ` Nishanth Menon
2023-08-24 14:42 ` Francesco Dolcini
0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2023-08-24 12:10 UTC (permalink / raw)
To: Francesco Dolcini
Cc: Emanuele Ghidoli, u-boot, Emanuele Ghidoli, Neha Malcom Francis,
Bryan Brattlof, Marcel Ziswiler
On 13:19-20230824, Francesco Dolcini wrote:
> On Thu, Aug 24, 2023 at 10:08:49AM +0200, Emanuele Ghidoli wrote:
> > From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> >
> > Add update_tiboot3, update_tispl and update_uboot wrappers to update
> > R5 SPL, A53 SPL and A53 U-boot respectively.
> >
> > Usage example:
> > > tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin
> > > run update_tiboot3
> >
> > > tftpboot ${loadaddr} tispl.bin
> > > run update_tispl
> >
> > > tftpboot ${loadaddr} u-boot.img
> > > run update_uboot
> >
> > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>
> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Should you update documentation to indicate the usage?
Currently the documentation says:
Flash to eMMC
-------------
.. code-block:: bash
=> mmc dev 0 1
=> fatload mmc 1 ${loadaddr} tiboot3.bin
=> mmc write ${loadaddr} 0x0 0x400
=> fatload mmc 1 ${loadaddr} tispl.bin
=> mmc write ${loadaddr} 0x400 0x1000
=> fatload mmc 1 ${loadaddr} u-boot.img
=> mmc write ${loadaddr} 0x1400 0x2000
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 8:08 ` [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size Emanuele Ghidoli
2023-08-24 11:20 ` Francesco Dolcini
@ 2023-08-24 12:14 ` Nishanth Menon
2023-08-24 14:37 ` Francesco Dolcini
2023-09-09 13:30 ` Tom Rini
2 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2023-08-24 12:14 UTC (permalink / raw)
To: Emanuele Ghidoli
Cc: u-boot, Emanuele Ghidoli, Neha Malcom Francis, Bryan Brattlof,
Marcel Ziswiler
On 10:08-20230824, Emanuele Ghidoli wrote:
> From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>
> verdin am62 SKUs comes in multiple memory configuration, check that
> the detected memory is at least 512MB since we have some
> reserved memory just before this threshold and therefore
> the module cannot work with less memory.
>
> Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
> Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> ---
> board/toradex/verdin-am62/verdin-am62.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
> index a3d1d07a0cbf..d09dda5bccc9 100644
> --- a/board/toradex/verdin-am62/verdin-am62.c
> +++ b/board/toradex/verdin-am62/verdin-am62.c
> @@ -28,8 +28,8 @@ int dram_init(void)
> {
> gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, CFG_SYS_SDRAM_SIZE);
>
> - if (gd->ram_size < SZ_64M)
> - puts("## WARNING: Less than 64MB RAM detected\n");
> + if (gd->ram_size < SZ_512M)
> + puts("## WARNING: Less than 512MB RAM detected\n");
Have you considered fdtdec_setup_mem_size_base
fdtdec_setup_memory_banksize - in which case the reserved memory
regions can be changed in dt (will need corresponding custom binaries
ofcourse)..
>
> return 0;
> }
> --
> 2.34.1
>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 12:14 ` Nishanth Menon
@ 2023-08-24 14:37 ` Francesco Dolcini
2023-08-24 14:58 ` Nishanth Menon
0 siblings, 1 reply; 15+ messages in thread
From: Francesco Dolcini @ 2023-08-24 14:37 UTC (permalink / raw)
To: Nishanth Menon
Cc: Emanuele Ghidoli, u-boot, Emanuele Ghidoli, Neha Malcom Francis,
Bryan Brattlof, Marcel Ziswiler
Hello Nishanth,
On Thu, Aug 24, 2023 at 07:14:12AM -0500, Nishanth Menon wrote:
> On 10:08-20230824, Emanuele Ghidoli wrote:
> > From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> >
> > verdin am62 SKUs comes in multiple memory configuration, check that
> > the detected memory is at least 512MB since we have some
> > reserved memory just before this threshold and therefore
> > the module cannot work with less memory.
> >
> > Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
> > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > ---
> > board/toradex/verdin-am62/verdin-am62.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
> > index a3d1d07a0cbf..d09dda5bccc9 100644
> > --- a/board/toradex/verdin-am62/verdin-am62.c
> > +++ b/board/toradex/verdin-am62/verdin-am62.c
> > @@ -28,8 +28,8 @@ int dram_init(void)
> > {
> > gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, CFG_SYS_SDRAM_SIZE);
> >
> > - if (gd->ram_size < SZ_64M)
> > - puts("## WARNING: Less than 64MB RAM detected\n");
> > + if (gd->ram_size < SZ_512M)
> > + puts("## WARNING: Less than 512MB RAM detected\n");
>
> Have you considered fdtdec_setup_mem_size_base
> fdtdec_setup_memory_banksize - in which case the reserved memory
> regions can be changed in dt (will need corresponding custom binaries
> ofcourse)..
I would say that custom binaries is not something we want. Our goal is
to rely on whatever TI is providing and to not deviate from it unless
required. Luckily enough for the moment it works since our
minimum memory size is 512MB.
Francesco
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 1/2] verdin-am62: add u-boot update wrappers
2023-08-24 12:10 ` Nishanth Menon
@ 2023-08-24 14:42 ` Francesco Dolcini
2023-08-28 22:11 ` Marcel Ziswiler
0 siblings, 1 reply; 15+ messages in thread
From: Francesco Dolcini @ 2023-08-24 14:42 UTC (permalink / raw)
To: Nishanth Menon
Cc: Francesco Dolcini, Emanuele Ghidoli, u-boot, Emanuele Ghidoli,
Neha Malcom Francis, Bryan Brattlof, Marcel Ziswiler
Hello Nishanth,
On Thu, Aug 24, 2023 at 07:10:57AM -0500, Nishanth Menon wrote:
> On 13:19-20230824, Francesco Dolcini wrote:
> > On Thu, Aug 24, 2023 at 10:08:49AM +0200, Emanuele Ghidoli wrote:
> > > From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > >
> > > Add update_tiboot3, update_tispl and update_uboot wrappers to update
> > > R5 SPL, A53 SPL and A53 U-boot respectively.
> > >
> > > Usage example:
> > > > tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin
> > > > run update_tiboot3
> > >
> > > > tftpboot ${loadaddr} tispl.bin
> > > > run update_tispl
> > >
> > > > tftpboot ${loadaddr} u-boot.img
> > > > run update_uboot
> > >
> > > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> >
> > Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
>
> Should you update documentation to indicate the usage?
Yeah, probably we could add it. I would not remove the existing direct
command usage since this is adding just env variables that could be
removed from the env even at runtime.
In general the reason for these commands is that our users are
accustomed to have a "guided" way to update u-boot without having to dig
into the documentation. They are just convenient.
Marcel: what do you think?
Francesco
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 14:37 ` Francesco Dolcini
@ 2023-08-24 14:58 ` Nishanth Menon
2023-08-24 15:52 ` Francesco Dolcini
0 siblings, 1 reply; 15+ messages in thread
From: Nishanth Menon @ 2023-08-24 14:58 UTC (permalink / raw)
To: Francesco Dolcini
Cc: Emanuele Ghidoli, u-boot, Emanuele Ghidoli, Neha Malcom Francis,
Bryan Brattlof, Marcel Ziswiler
On 16:37-20230824, Francesco Dolcini wrote:
> Hello Nishanth,
>
> On Thu, Aug 24, 2023 at 07:14:12AM -0500, Nishanth Menon wrote:
> > On 10:08-20230824, Emanuele Ghidoli wrote:
> > > From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > >
> > > verdin am62 SKUs comes in multiple memory configuration, check that
> > > the detected memory is at least 512MB since we have some
> > > reserved memory just before this threshold and therefore
> > > the module cannot work with less memory.
> > >
> > > Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
> > > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > > ---
> > > board/toradex/verdin-am62/verdin-am62.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
> > > index a3d1d07a0cbf..d09dda5bccc9 100644
> > > --- a/board/toradex/verdin-am62/verdin-am62.c
> > > +++ b/board/toradex/verdin-am62/verdin-am62.c
> > > @@ -28,8 +28,8 @@ int dram_init(void)
> > > {
> > > gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, CFG_SYS_SDRAM_SIZE);
> > >
> > > - if (gd->ram_size < SZ_64M)
> > > - puts("## WARNING: Less than 64MB RAM detected\n");
> > > + if (gd->ram_size < SZ_512M)
> > > + puts("## WARNING: Less than 512MB RAM detected\n");
> >
> > Have you considered fdtdec_setup_mem_size_base
> > fdtdec_setup_memory_banksize - in which case the reserved memory
> > regions can be changed in dt (will need corresponding custom binaries
> > ofcourse)..
>
> I would say that custom binaries is not something we want. Our goal is
> to rely on whatever TI is providing and to not deviate from it unless
> required. Luckily enough for the moment it works since our
> minimum memory size is 512MB.
Sure - you will still benefit using fdtdec_setup_mem_size_base and
fdtdec_setup_memory_banksize, but really, your call.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 14:58 ` Nishanth Menon
@ 2023-08-24 15:52 ` Francesco Dolcini
2023-08-24 16:18 ` Nishanth Menon
0 siblings, 1 reply; 15+ messages in thread
From: Francesco Dolcini @ 2023-08-24 15:52 UTC (permalink / raw)
To: Nishanth Menon
Cc: Francesco Dolcini, Emanuele Ghidoli, u-boot, Emanuele Ghidoli,
Neha Malcom Francis, Bryan Brattlof, Marcel Ziswiler
On Thu, Aug 24, 2023 at 09:58:56AM -0500, Nishanth Menon wrote:
> On 16:37-20230824, Francesco Dolcini wrote:
> > Hello Nishanth,
> >
> > On Thu, Aug 24, 2023 at 07:14:12AM -0500, Nishanth Menon wrote:
> > > On 10:08-20230824, Emanuele Ghidoli wrote:
> > > > From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > > >
> > > > verdin am62 SKUs comes in multiple memory configuration, check that
> > > > the detected memory is at least 512MB since we have some
> > > > reserved memory just before this threshold and therefore
> > > > the module cannot work with less memory.
> > > >
> > > > Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
> > > > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > > > ---
> > > > board/toradex/verdin-am62/verdin-am62.c | 4 ++--
> > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
> > > > index a3d1d07a0cbf..d09dda5bccc9 100644
> > > > --- a/board/toradex/verdin-am62/verdin-am62.c
> > > > +++ b/board/toradex/verdin-am62/verdin-am62.c
> > > > @@ -28,8 +28,8 @@ int dram_init(void)
> > > > {
> > > > gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, CFG_SYS_SDRAM_SIZE);
> > > >
> > > > - if (gd->ram_size < SZ_64M)
> > > > - puts("## WARNING: Less than 64MB RAM detected\n");
> > > > + if (gd->ram_size < SZ_512M)
> > > > + puts("## WARNING: Less than 512MB RAM detected\n");
> > >
> > > Have you considered fdtdec_setup_mem_size_base
> > > fdtdec_setup_memory_banksize - in which case the reserved memory
> > > regions can be changed in dt (will need corresponding custom binaries
> > > ofcourse)..
> >
> > I would say that custom binaries is not something we want. Our goal is
> > to rely on whatever TI is providing and to not deviate from it unless
> > required. Luckily enough for the moment it works since our
> > minimum memory size is 512MB.
>
> Sure - you will still benefit using fdtdec_setup_mem_size_base and
> fdtdec_setup_memory_banksize, but really, your call.
What would be the actual benefit? Never used it and looking at the code
I do not think it works for us.
We have a range of SKUs with different memory sizes (512MB to 2GB), we
do have a single device tree and a single U-Boot binary for all of the
variants, the memory node in the source dts file is just a default.
The DT memory node is updated dynamically by U-Boot, and the actual memory
size is detected by U-Boot using get_ram_size().
(and all of that just works fine).
Francesco
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 15:52 ` Francesco Dolcini
@ 2023-08-24 16:18 ` Nishanth Menon
0 siblings, 0 replies; 15+ messages in thread
From: Nishanth Menon @ 2023-08-24 16:18 UTC (permalink / raw)
To: Francesco Dolcini
Cc: Emanuele Ghidoli, u-boot, Emanuele Ghidoli, Neha Malcom Francis,
Bryan Brattlof, Marcel Ziswiler
On 17:52-20230824, Francesco Dolcini wrote:
> On Thu, Aug 24, 2023 at 09:58:56AM -0500, Nishanth Menon wrote:
> > On 16:37-20230824, Francesco Dolcini wrote:
> > > Hello Nishanth,
> > >
> > > On Thu, Aug 24, 2023 at 07:14:12AM -0500, Nishanth Menon wrote:
> > > > On 10:08-20230824, Emanuele Ghidoli wrote:
> > > > > From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > > > >
> > > > > verdin am62 SKUs comes in multiple memory configuration, check that
> > > > > the detected memory is at least 512MB since we have some
> > > > > reserved memory just before this threshold and therefore
> > > > > the module cannot work with less memory.
> > > > >
> > > > > Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
> > > > > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > > > > ---
> > > > > board/toradex/verdin-am62/verdin-am62.c | 4 ++--
> > > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
> > > > > index a3d1d07a0cbf..d09dda5bccc9 100644
> > > > > --- a/board/toradex/verdin-am62/verdin-am62.c
> > > > > +++ b/board/toradex/verdin-am62/verdin-am62.c
> > > > > @@ -28,8 +28,8 @@ int dram_init(void)
> > > > > {
> > > > > gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, CFG_SYS_SDRAM_SIZE);
> > > > >
> > > > > - if (gd->ram_size < SZ_64M)
> > > > > - puts("## WARNING: Less than 64MB RAM detected\n");
> > > > > + if (gd->ram_size < SZ_512M)
> > > > > + puts("## WARNING: Less than 512MB RAM detected\n");
> > > >
> > > > Have you considered fdtdec_setup_mem_size_base
> > > > fdtdec_setup_memory_banksize - in which case the reserved memory
> > > > regions can be changed in dt (will need corresponding custom binaries
> > > > ofcourse)..
> > >
> > > I would say that custom binaries is not something we want. Our goal is
> > > to rely on whatever TI is providing and to not deviate from it unless
> > > required. Luckily enough for the moment it works since our
> > > minimum memory size is 512MB.
> >
> > Sure - you will still benefit using fdtdec_setup_mem_size_base and
> > fdtdec_setup_memory_banksize, but really, your call.
>
> What would be the actual benefit? Never used it and looking at the code
> I do not think it works for us.
>
> We have a range of SKUs with different memory sizes (512MB to 2GB), we
> do have a single device tree and a single U-Boot binary for all of the
> variants, the memory node in the source dts file is just a default.
>
> The DT memory node is updated dynamically by U-Boot, and the actual memory
> size is detected by U-Boot using get_ram_size().
>
> (and all of that just works fine).
Understood - we just use dt to determine the DDR sizes.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 1/2] verdin-am62: add u-boot update wrappers
2023-08-24 14:42 ` Francesco Dolcini
@ 2023-08-28 22:11 ` Marcel Ziswiler
0 siblings, 0 replies; 15+ messages in thread
From: Marcel Ziswiler @ 2023-08-28 22:11 UTC (permalink / raw)
To: francesco@dolcini.it, nm@ti.com
Cc: n-francis@ti.com, u-boot@lists.denx.de, ghidoliemanuele@gmail.com,
Emanuele Ghidoli, bb@ti.com
On Thu, 2023-08-24 at 16:42 +0200, Francesco Dolcini wrote:
> Hello Nishanth,
>
> On Thu, Aug 24, 2023 at 07:10:57AM -0500, Nishanth Menon wrote:
> > On 13:19-20230824, Francesco Dolcini wrote:
> > > On Thu, Aug 24, 2023 at 10:08:49AM +0200, Emanuele Ghidoli wrote:
> > > > From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > > >
> > > > Add update_tiboot3, update_tispl and update_uboot wrappers to update
> > > > R5 SPL, A53 SPL and A53 U-boot respectively.
> > > >
> > > > Usage example:
> > > > > tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin
> > > > > run update_tiboot3
> > > >
> > > > > tftpboot ${loadaddr} tispl.bin
> > > > > run update_tispl
> > > >
> > > > > tftpboot ${loadaddr} u-boot.img
> > > > > run update_uboot
> > > >
> > > > Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> > >
> > > Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> >
> > Should you update documentation to indicate the usage?
>
> Yeah, probably we could add it. I would not remove the existing direct
> command usage since this is adding just env variables that could be
> removed from the env even at runtime.
>
> In general the reason for these commands is that our users are
> accustomed to have a "guided" way to update u-boot without having to dig
> into the documentation. They are just convenient.
>
> Marcel: what do you think?
Sure, we took care of it here:
https://lore.kernel.org/all/20230828220154.483362-1-marcel@ziswiler.com
> Francesco
Cheers
Marcel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 1/2] verdin-am62: add u-boot update wrappers
2023-08-24 8:08 ` [PATCH v1 1/2] verdin-am62: add u-boot update wrappers Emanuele Ghidoli
2023-08-24 11:19 ` Francesco Dolcini
@ 2023-09-09 13:30 ` Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2023-09-09 13:30 UTC (permalink / raw)
To: Emanuele Ghidoli
Cc: u-boot, Emanuele Ghidoli, Neha Malcom Francis, Nishanth Menon,
Bryan Brattlof, Marcel Ziswiler
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
On Thu, Aug 24, 2023 at 10:08:49AM +0200, Emanuele Ghidoli wrote:
> From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>
> Add update_tiboot3, update_tispl and update_uboot wrappers to update
> R5 SPL, A53 SPL and A53 U-boot respectively.
>
> Usage example:
> > tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin
> > run update_tiboot3
>
> > tftpboot ${loadaddr} tispl.bin
> > run update_tispl
>
> > tftpboot ${loadaddr} u-boot.img
> > run update_uboot
>
> Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size
2023-08-24 8:08 ` [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size Emanuele Ghidoli
2023-08-24 11:20 ` Francesco Dolcini
2023-08-24 12:14 ` Nishanth Menon
@ 2023-09-09 13:30 ` Tom Rini
2 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2023-09-09 13:30 UTC (permalink / raw)
To: Emanuele Ghidoli
Cc: u-boot, Emanuele Ghidoli, Neha Malcom Francis, Nishanth Menon,
Bryan Brattlof, Marcel Ziswiler
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
On Thu, Aug 24, 2023 at 10:08:50AM +0200, Emanuele Ghidoli wrote:
> From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
>
> verdin am62 SKUs comes in multiple memory configuration, check that
> the detected memory is at least 512MB since we have some
> reserved memory just before this threshold and therefore
> the module cannot work with less memory.
>
> Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
> Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-09-09 13:31 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 8:08 [PATCH v1 0/2] verdin-am62: add u-boot update wrappers and fix check for minimum memory size Emanuele Ghidoli
2023-08-24 8:08 ` [PATCH v1 1/2] verdin-am62: add u-boot update wrappers Emanuele Ghidoli
2023-08-24 11:19 ` Francesco Dolcini
2023-08-24 12:10 ` Nishanth Menon
2023-08-24 14:42 ` Francesco Dolcini
2023-08-28 22:11 ` Marcel Ziswiler
2023-09-09 13:30 ` Tom Rini
2023-08-24 8:08 ` [PATCH v1 2/2] board: verdin-am62: fix check for minimum memory size Emanuele Ghidoli
2023-08-24 11:20 ` Francesco Dolcini
2023-08-24 12:14 ` Nishanth Menon
2023-08-24 14:37 ` Francesco Dolcini
2023-08-24 14:58 ` Nishanth Menon
2023-08-24 15:52 ` Francesco Dolcini
2023-08-24 16:18 ` Nishanth Menon
2023-09-09 13:30 ` Tom Rini
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.