diff mbox series

[U-Boot,4/5] toradex: configblock: fix apalis imx8 target

Message ID 20190709094046.10635-5-marcel@ziswiler.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series toradex: configblock: apalis-imx8 and colibri-imx8x fixes | expand

Commit Message

Marcel Ziswiler July 9, 2019, 9:40 a.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

The Apalis iMX8 was missing the interactive part should a customer have
bricked his module and want to re-create the configuration block. Fix
this.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 board/toradex/common/tdx-cfg-block.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Comments

Igor Opaniuk July 9, 2019, 10:27 a.m. UTC | #1
HI Marcel,

On Tue, Jul 9, 2019 at 12:43 PM Marcel Ziswiler <marcel@ziswiler.com> wrote:
>
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> The Apalis iMX8 was missing the interactive part should a customer have
> bricked his module and want to re-create the configuration block. Fix
> this.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> ---
>
>  board/toradex/common/tdx-cfg-block.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
> index 90df5bb2ff..a81b0f637c 100644
> --- a/board/toradex/common/tdx-cfg-block.c
> +++ b/board/toradex/common/tdx-cfg-block.c
> @@ -7,6 +7,7 @@
>  #include "tdx-cfg-block.h"
>
>  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
> +       defined(CONFIG_TARGET_APALIS_IMX8) || \
>         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
>         defined(CONFIG_TARGET_COLIBRI_IMX8X)
>  #include <asm/arch/sys_proto.h>
> @@ -356,7 +357,19 @@ static int get_cfgblock_interactive(void)
>                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
>         else if (!strcmp("imx7s", soc))
>                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> -       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> +       else if (is_cpu_type(MXC_CPU_IMX8QM)) {
> +               if (it == 'y' || it == 'Y') {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = APALIS_IMX8QM_WIFI_BT_IT;
> +                       else
> +                               tdx_hw_tag.prodid = APALIS_IMX8QM_IT;
> +               } else {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = APALIS_IMX8QP_WIFI_BT;

Just curious why NXP guys decided to call this CPU type as MXC_CPU_IMX8QM,
and why not to drop the last M, or even both QM (taking into account
that marketing name is
simple IMX8 for these SoC series [1]. and iMX8M and iMX8X respectively
for M and X series),
because it's not obvious for me that APALIS_IMX8QP has any relation to
MXC_CPU_IMX8QM.

> +                       else
> +                               tdx_hw_tag.prodid = APALIS_IMX8QP;
> +               }
> +       } else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
>                 if (it == 'y' || it == 'Y') {
>                         if (wb == 'y' || wb == 'Y')
>                                 tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot

Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>

[1] https://en.wikipedia.org/wiki/I.MX#i.MX_8_series
Oleksandr Suvorov July 9, 2019, 2:08 p.m. UTC | #2
On Tue, 9 Jul 2019 at 12:42, Marcel Ziswiler <marcel@ziswiler.com> wrote:
>
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> The Apalis iMX8 was missing the interactive part should a customer have
> bricked his module and want to re-create the configuration block. Fix
> this.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> ---
>
>  board/toradex/common/tdx-cfg-block.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
> index 90df5bb2ff..a81b0f637c 100644
> --- a/board/toradex/common/tdx-cfg-block.c
> +++ b/board/toradex/common/tdx-cfg-block.c
> @@ -7,6 +7,7 @@
>  #include "tdx-cfg-block.h"
>
>  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
> +       defined(CONFIG_TARGET_APALIS_IMX8) || \
>         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
>         defined(CONFIG_TARGET_COLIBRI_IMX8X)
>  #include <asm/arch/sys_proto.h>
> @@ -356,7 +357,19 @@ static int get_cfgblock_interactive(void)
>                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
>         else if (!strcmp("imx7s", soc))
>                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> -       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> +       else if (is_cpu_type(MXC_CPU_IMX8QM)) {
> +               if (it == 'y' || it == 'Y') {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = APALIS_IMX8QM_WIFI_BT_IT;
> +                       else
> +                               tdx_hw_tag.prodid = APALIS_IMX8QM_IT;
> +               } else {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = APALIS_IMX8QP_WIFI_BT;
> +                       else
> +                               tdx_hw_tag.prodid = APALIS_IMX8QP;
> +               }
> +       } else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
>                 if (it == 'y' || it == 'Y') {
>                         if (wb == 'y' || wb == 'Y')
>                                 tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Marcel Ziswiler July 10, 2019, 6:37 a.m. UTC | #3
Hi Igor

On Tue, 2019-07-09 at 10:27 +0000, Igor Opaniuk wrote:
> HI Marcel,
> 
> On Tue, Jul 9, 2019 at 12:43 PM Marcel Ziswiler <marcel@ziswiler.com>
> wrote:
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > The Apalis iMX8 was missing the interactive part should a customer
> > have
> > bricked his module and want to re-create the configuration block.
> > Fix
> > this.
> > 
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > ---
> > 
> >  board/toradex/common/tdx-cfg-block.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> > 
> > diff --git a/board/toradex/common/tdx-cfg-block.c
> > b/board/toradex/common/tdx-cfg-block.c
> > index 90df5bb2ff..a81b0f637c 100644
> > --- a/board/toradex/common/tdx-cfg-block.c
> > +++ b/board/toradex/common/tdx-cfg-block.c
> > @@ -7,6 +7,7 @@
> >  #include "tdx-cfg-block.h"
> > 
> >  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
> > +       defined(CONFIG_TARGET_APALIS_IMX8) || \
> >         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
> >         defined(CONFIG_TARGET_COLIBRI_IMX8X)
> >  #include <asm/arch/sys_proto.h>
> > @@ -356,7 +357,19 @@ static int get_cfgblock_interactive(void)
> >                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
> >         else if (!strcmp("imx7s", soc))
> >                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> > -       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> > +       else if (is_cpu_type(MXC_CPU_IMX8QM)) {
> > +               if (it == 'y' || it == 'Y') {
> > +                       if (wb == 'y' || wb == 'Y')
> > +                               tdx_hw_tag.prodid =
> > APALIS_IMX8QM_WIFI_BT_IT;
> > +                       else
> > +                               tdx_hw_tag.prodid =
> > APALIS_IMX8QM_IT;
> > +               } else {
> > +                       if (wb == 'y' || wb == 'Y')
> > +                               tdx_hw_tag.prodid =
> > APALIS_IMX8QP_WIFI_BT;
> 
> Just curious why NXP guys decided to call this CPU type as
> MXC_CPU_IMX8QM,
> and why not to drop the last M, or even both QM (taking into account
> that marketing name is
> simple IMX8 for these SoC series [1]. and iMX8M and iMX8X
> respectively
> for M and X series),
> because it's not obvious for me that APALIS_IMX8QP has any relation
> to
> MXC_CPU_IMX8QM.

Good questions. Maybe some of the NXP folks dare answering?

Cheers

Marcel

> > +                       else
> > +                               tdx_hw_tag.prodid = APALIS_IMX8QP;
> > +               }
> > +       } else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> >                 if (it == 'y' || it == 'Y') {
> >                         if (wb == 'y' || wb == 'Y')
> >                                 tdx_hw_tag.prodid =
> > COLIBRI_IMX8QXP_WIFI_BT_IT;
> > --
> > 2.21.0
> > 
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot@lists.denx.de
> > https://lists.denx.de/listinfo/u-boot
> 
> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> 
> [1] https://en.wikipedia.org/wiki/I.MX#i.MX_8_series
> 
> -- 
> Best regards - Freundliche Grüsse - Meilleures salutations
> 
> Senior Development Engineer,
> Igor Opaniuk
> 
> Toradex AG
> Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 48
> 00 (main line)
Peng Fan July 10, 2019, 8:11 a.m. UTC | #4
Hi,

> Subject: Re: [U-Boot] [PATCH 4/5] toradex: configblock: fix apalis imx8 target
> 
> Hi Igor
> 
> On Tue, 2019-07-09 at 10:27 +0000, Igor Opaniuk wrote:
> > HI Marcel,
> >
> > On Tue, Jul 9, 2019 at 12:43 PM Marcel Ziswiler <marcel@ziswiler.com>
> > wrote:
> > > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > >
> > > The Apalis iMX8 was missing the interactive part should a customer
> > > have bricked his module and want to re-create the configuration
> > > block.
> > > Fix
> > > this.
> > >
> > > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > >
> > > ---
> > >
> > >  board/toradex/common/tdx-cfg-block.c | 15 ++++++++++++++-
> > >  1 file changed, 14 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/board/toradex/common/tdx-cfg-block.c
> > > b/board/toradex/common/tdx-cfg-block.c
> > > index 90df5bb2ff..a81b0f637c 100644
> > > --- a/board/toradex/common/tdx-cfg-block.c
> > > +++ b/board/toradex/common/tdx-cfg-block.c
> > > @@ -7,6 +7,7 @@
> > >  #include "tdx-cfg-block.h"
> > >
> > >  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
> > > +       defined(CONFIG_TARGET_APALIS_IMX8) || \
> > >         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
> > >         defined(CONFIG_TARGET_COLIBRI_IMX8X)
> > >  #include <asm/arch/sys_proto.h>
> > > @@ -356,7 +357,19 @@ static int get_cfgblock_interactive(void)
> > >                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
> > >         else if (!strcmp("imx7s", soc))
> > >                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> > > -       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> > > +       else if (is_cpu_type(MXC_CPU_IMX8QM)) {
> > > +               if (it == 'y' || it == 'Y') {
> > > +                       if (wb == 'y' || wb == 'Y')
> > > +                               tdx_hw_tag.prodid =
> > > APALIS_IMX8QM_WIFI_BT_IT;
> > > +                       else
> > > +                               tdx_hw_tag.prodid =
> > > APALIS_IMX8QM_IT;
> > > +               } else {
> > > +                       if (wb == 'y' || wb == 'Y')
> > > +                               tdx_hw_tag.prodid =
> > > APALIS_IMX8QP_WIFI_BT;
> >
> > Just curious why NXP guys decided to call this CPU type as
> > MXC_CPU_IMX8QM, and why not to drop the last M, or even both QM
> > (taking into account that marketing name is simple IMX8 for these SoC
> > series [1]. and iMX8M and iMX8X respectively for M and X series),
> > because it's not obvious for me that APALIS_IMX8QP has any relation to
> > MXC_CPU_IMX8QM.
> 
> Good questions. Maybe some of the NXP folks dare answering?

Thanks for adding me, please also add uboot-imx@nxp.com for i.MX patches
for patch review. I am not able catch every thread in community.

Back to the question,
MXC_CPU_IMX8QM is just follow i.MX8QM. no special reason.

So you are using i.MX8QP? or i.MX8QM?

Thanks,
Peng.

> 
> Cheers
> 
> Marcel
> 
> > > +                       else
> > > +                               tdx_hw_tag.prodid =
> APALIS_IMX8QP;
> > > +               }
> > > +       } else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> > >                 if (it == 'y' || it == 'Y') {
> > >                         if (wb == 'y' || wb == 'Y')
> > >                                 tdx_hw_tag.prodid =
> > > COLIBRI_IMX8QXP_WIFI_BT_IT;
> > > --
> > > 2.21.0
> > >
> > > _______________________________________________
> > > U-Boot mailing list
> > > U-Boot@lists.denx.de
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > >
> sts.denx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7Cpeng.fan%40nxp.c
> o
> > >
> m%7C6f1126063c684a60ae7008d7050115ca%7C686ea1d3bc2b4c6fa92cd99
> c5c301
> > >
> 635%7C0%7C0%7C636983374525754073&amp;sdata=heJJTIdWibdA9594lJu
> FXZ6AS
> > > bWx%2FKrjL160ahWX0dM%3D&amp;reserved=0
> >
> > Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> >
> > [1]
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.w
> >
> ikipedia.org%2Fwiki%2FI.MX%23i.MX_8_series&amp;data=02%7C01%7Cpen
> g.fan
> > %40nxp.com%7C6f1126063c684a60ae7008d7050115ca%7C686ea1d3bc2b
> 4c6fa92cd9
> >
> 9c5c301635%7C0%7C0%7C636983374525754073&amp;sdata=x7uth7RukJ1J
> x46Dzkav
> > 39TtPidNmXrggBc7a4xi2Kk%3D&amp;reserved=0
> >
> > --
> > Best regards - Freundliche Grüsse - Meilleures salutations
> >
> > Senior Development Engineer,
> > Igor Opaniuk
> >
> > Toradex AG
> > Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 48
> > 00 (main line)
Marcel Ziswiler July 10, 2019, 8:49 a.m. UTC | #5
On Wed, 2019-07-10 at 08:11 +0000, Peng Fan wrote:
> Hi,
> 
> > Subject: Re: [U-Boot] [PATCH 4/5] toradex: configblock: fix apalis
> > imx8 target
> > 
> > Hi Igor
> > 
> > On Tue, 2019-07-09 at 10:27 +0000, Igor Opaniuk wrote:
> > > HI Marcel,
> > > 
> > > On Tue, Jul 9, 2019 at 12:43 PM Marcel Ziswiler <
> > > marcel@ziswiler.com>
> > > wrote:
> > > > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > 
> > > > The Apalis iMX8 was missing the interactive part should a
> > > > customer
> > > > have bricked his module and want to re-create the configuration
> > > > block.
> > > > Fix
> > > > this.
> > > > 
> > > > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > 
> > > > ---
> > > > 
> > > >  board/toradex/common/tdx-cfg-block.c | 15 ++++++++++++++-
> > > >  1 file changed, 14 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/board/toradex/common/tdx-cfg-block.c
> > > > b/board/toradex/common/tdx-cfg-block.c
> > > > index 90df5bb2ff..a81b0f637c 100644
> > > > --- a/board/toradex/common/tdx-cfg-block.c
> > > > +++ b/board/toradex/common/tdx-cfg-block.c
> > > > @@ -7,6 +7,7 @@
> > > >  #include "tdx-cfg-block.h"
> > > > 
> > > >  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
> > > > +       defined(CONFIG_TARGET_APALIS_IMX8) || \
> > > >         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
> > > >         defined(CONFIG_TARGET_COLIBRI_IMX8X)
> > > >  #include <asm/arch/sys_proto.h>
> > > > @@ -356,7 +357,19 @@ static int get_cfgblock_interactive(void)
> > > >                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
> > > >         else if (!strcmp("imx7s", soc))
> > > >                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> > > > -       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> > > > +       else if (is_cpu_type(MXC_CPU_IMX8QM)) {
> > > > +               if (it == 'y' || it == 'Y') {
> > > > +                       if (wb == 'y' || wb == 'Y')
> > > > +                               tdx_hw_tag.prodid =
> > > > APALIS_IMX8QM_WIFI_BT_IT;
> > > > +                       else
> > > > +                               tdx_hw_tag.prodid =
> > > > APALIS_IMX8QM_IT;
> > > > +               } else {
> > > > +                       if (wb == 'y' || wb == 'Y')
> > > > +                               tdx_hw_tag.prodid =
> > > > APALIS_IMX8QP_WIFI_BT;
> > > 
> > > Just curious why NXP guys decided to call this CPU type as
> > > MXC_CPU_IMX8QM, and why not to drop the last M, or even both QM
> > > (taking into account that marketing name is simple IMX8 for these
> > > SoC
> > > series [1]. and iMX8M and iMX8X respectively for M and X series),
> > > because it's not obvious for me that APALIS_IMX8QP has any
> > > relation to
> > > MXC_CPU_IMX8QM.
> > 
> > Good questions. Maybe some of the NXP folks dare answering?
> 
> Thanks for adding me, please also add uboot-imx@nxp.com for i.MX
> patches
> for patch review. I am not able catch every thread in community.
> 
> Back to the question,
> MXC_CPU_IMX8QM is just follow i.MX8QM. no special reason.
> 
> So you are using i.MX8QP? or i.MX8QM?

Initially it was just about the i.MX 8QM but eventually both. We are
also experimenting with automatically detecting i.MX 8QM vs. 8QP and
selecting resp. Apalis iMX8 SKU's memory size. Will there also be a
MXC_CPU_IMX8QP or what exactly are your plans?

> Thanks,
> Peng.
> 
> > Cheers
> > 
> > Marcel
> > 
> > > > +                       else
> > > > +                               tdx_hw_tag.prodid =
> > APALIS_IMX8QP;
> > > > +               }
> > > > +       } else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> > > >                 if (it == 'y' || it == 'Y') {
> > > >                         if (wb == 'y' || wb == 'Y')
> > > >                                 tdx_hw_tag.prodid =
> > > > COLIBRI_IMX8QXP_WIFI_BT_IT;
> > > > --
> > > > 2.21.0
> > > > 
> > > > _______________________________________________
> > > > U-Boot mailing list
> > > > U-Boot@lists.denx.de
> > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > > > 
> > sts.denx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7Cpeng.fan%40nxp.c
> > o
> > m%7C6f1126063c684a60ae7008d7050115ca%7C686ea1d3bc2b4c6fa92cd99
> > c5c301
> > 635%7C0%7C0%7C636983374525754073&amp;sdata=heJJTIdWibdA9594lJu
> > FXZ6AS
> > > > bWx%2FKrjL160ahWX0dM%3D&amp;reserved=0
> > > 
> > > Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> > > 
> > > [1]
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.w
> > > 
> > ikipedia.org%2Fwiki%2FI.MX%23i.MX_8_series&amp;data=02%7C01%7Cpen
> > g.fan
> > > %40nxp.com%7C6f1126063c684a60ae7008d7050115ca%7C686ea1d3bc2b
> > 4c6fa92cd9
> > 9c5c301635%7C0%7C0%7C636983374525754073&amp;sdata=x7uth7RukJ1J
> > x46Dzkav
> > > 39TtPidNmXrggBc7a4xi2Kk%3D&amp;reserved=0
> > > 
> > > --
> > > Best regards - Freundliche Grüsse - Meilleures salutations
> > > 
> > > Senior Development Engineer,
> > > Igor Opaniuk
> > > 
> > > Toradex AG
> > > Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41
> > > 500 48
> > > 00 (main line)
Peng Fan July 10, 2019, 9:09 a.m. UTC | #6
> Subject: Re: [U-Boot] [PATCH 4/5] toradex: configblock: fix apalis imx8 target
> 
> On Wed, 2019-07-10 at 08:11 +0000, Peng Fan wrote:
> > Hi,
> >
> > > Subject: Re: [U-Boot] [PATCH 4/5] toradex: configblock: fix apalis
> > > imx8 target
> > >
> > > Hi Igor
> > >
> > > On Tue, 2019-07-09 at 10:27 +0000, Igor Opaniuk wrote:
> > > > HI Marcel,
> > > >
> > > > On Tue, Jul 9, 2019 at 12:43 PM Marcel Ziswiler <
> > > > marcel@ziswiler.com>
> > > > wrote:
> > > > > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > >
> > > > > The Apalis iMX8 was missing the interactive part should a
> > > > > customer have bricked his module and want to re-create the
> > > > > configuration block.
> > > > > Fix
> > > > > this.
> > > > >
> > > > > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > >
> > > > > ---
> > > > >
> > > > >  board/toradex/common/tdx-cfg-block.c | 15 ++++++++++++++-
> > > > >  1 file changed, 14 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/board/toradex/common/tdx-cfg-block.c
> > > > > b/board/toradex/common/tdx-cfg-block.c
> > > > > index 90df5bb2ff..a81b0f637c 100644
> > > > > --- a/board/toradex/common/tdx-cfg-block.c
> > > > > +++ b/board/toradex/common/tdx-cfg-block.c
> > > > > @@ -7,6 +7,7 @@
> > > > >  #include "tdx-cfg-block.h"
> > > > >
> > > > >  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
> > > > > +       defined(CONFIG_TARGET_APALIS_IMX8) || \
> > > > >         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
> > > > >         defined(CONFIG_TARGET_COLIBRI_IMX8X)
> > > > >  #include <asm/arch/sys_proto.h> @@ -356,7 +357,19 @@ static int
> > > > > get_cfgblock_interactive(void)
> > > > >                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
> > > > >         else if (!strcmp("imx7s", soc))
> > > > >                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> > > > > -       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> > > > > +       else if (is_cpu_type(MXC_CPU_IMX8QM)) {
> > > > > +               if (it == 'y' || it == 'Y') {
> > > > > +                       if (wb == 'y' || wb == 'Y')
> > > > > +                               tdx_hw_tag.prodid =
> > > > > APALIS_IMX8QM_WIFI_BT_IT;
> > > > > +                       else
> > > > > +                               tdx_hw_tag.prodid =
> > > > > APALIS_IMX8QM_IT;
> > > > > +               } else {
> > > > > +                       if (wb == 'y' || wb == 'Y')
> > > > > +                               tdx_hw_tag.prodid =
> > > > > APALIS_IMX8QP_WIFI_BT;
> > > >
> > > > Just curious why NXP guys decided to call this CPU type as
> > > > MXC_CPU_IMX8QM, and why not to drop the last M, or even both QM
> > > > (taking into account that marketing name is simple IMX8 for these
> > > > SoC series [1]. and iMX8M and iMX8X respectively for M and X
> > > > series), because it's not obvious for me that APALIS_IMX8QP has
> > > > any relation to MXC_CPU_IMX8QM.
> > >
> > > Good questions. Maybe some of the NXP folks dare answering?
> >
> > Thanks for adding me, please also add uboot-imx@nxp.com for i.MX
> > patches for patch review. I am not able catch every thread in
> > community.
> >
> > Back to the question,
> > MXC_CPU_IMX8QM is just follow i.MX8QM. no special reason.
> >
> > So you are using i.MX8QP? or i.MX8QM?
> 
> Initially it was just about the i.MX 8QM but eventually both. We are also
> experimenting with automatically detecting i.MX 8QM vs. 8QP and selecting
> resp. Apalis iMX8 SKU's memory size. Will there also be a MXC_CPU_IMX8QP
> or what exactly are your plans?

I do not have QP chips to test.
If get_cpu_rev returns same value for i.MX8QM/QP, MXC_CPU_IMX8QP will
not be added. If different value, MXC_CPU_IMX8QP needs to be added.

Regards,
Peng.

> 
> > Thanks,
> > Peng.
> >
> > > Cheers
> > >
> > > Marcel
> > >
> > > > > +                       else
> > > > > +                               tdx_hw_tag.prodid =
> > > APALIS_IMX8QP;
> > > > > +               }
> > > > > +       } else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> > > > >                 if (it == 'y' || it == 'Y') {
> > > > >                         if (wb == 'y' || wb == 'Y')
> > > > >                                 tdx_hw_tag.prodid =
> > > > > COLIBRI_IMX8QXP_WIFI_BT_IT;
> > > > > --
> > > > > 2.21.0
> > > > >
> > > > > _______________________________________________
> > > > > U-Boot mailing list
> > > > > U-Boot@lists.denx.de
> > > > > https://li
> > > > >
> > >
> sts.denx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7Cpeng.fan%40nxp.c
> > > o
> > >
> m%7C6f1126063c684a60ae7008d7050115ca%7C686ea1d3bc2b4c6fa92cd99
> > > c5c301
> > >
> 635%7C0%7C0%7C636983374525754073&amp;sdata=heJJTIdWibdA9594lJu
> > > FXZ6AS
> > > > > bWx%2FKrjL160ahWX0dM%3D&amp;reserved=0
> > > >
> > > > Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> > > >
> > > > [1]
> > > > https://en.w
> > > >
> > >
> ikipedia.org%2Fwiki%2FI.MX%23i.MX_8_series&amp;data=02%7C01%7Cpen
> > > g.fan
> > > > %40nxp.com%7C6f1126063c684a60ae7008d7050115ca%7C686ea1d3b
> c2b
> > > 4c6fa92cd9
> > >
> 9c5c301635%7C0%7C0%7C636983374525754073&amp;sdata=x7uth7RukJ1J
> > > x46Dzkav
> > > > 39TtPidNmXrggBc7a4xi2Kk%3D&amp;reserved=0
> > > >
> > > > --
> > > > Best regards - Freundliche Grüsse - Meilleures salutations
> > > >
> > > > Senior Development Engineer,
> > > > Igor Opaniuk
> > > >
> > > > Toradex AG
> > > > Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41
> > > > 500 48
> > > > 00 (main line)
diff mbox series

Patch

diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 90df5bb2ff..a81b0f637c 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -7,6 +7,7 @@ 
 #include "tdx-cfg-block.h"
 
 #if defined(CONFIG_TARGET_APALIS_IMX6) || \
+	defined(CONFIG_TARGET_APALIS_IMX8) || \
 	defined(CONFIG_TARGET_COLIBRI_IMX6) || \
 	defined(CONFIG_TARGET_COLIBRI_IMX8X)
 #include <asm/arch/sys_proto.h>
@@ -356,7 +357,19 @@  static int get_cfgblock_interactive(void)
 		tdx_hw_tag.prodid = COLIBRI_IMX7D;
 	else if (!strcmp("imx7s", soc))
 		tdx_hw_tag.prodid = COLIBRI_IMX7S;
-	else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
+	else if (is_cpu_type(MXC_CPU_IMX8QM)) {
+		if (it == 'y' || it == 'Y') {
+			if (wb == 'y' || wb == 'Y')
+				tdx_hw_tag.prodid = APALIS_IMX8QM_WIFI_BT_IT;
+			else
+				tdx_hw_tag.prodid = APALIS_IMX8QM_IT;
+		} else {
+			if (wb == 'y' || wb == 'Y')
+				tdx_hw_tag.prodid = APALIS_IMX8QP_WIFI_BT;
+			else
+				tdx_hw_tag.prodid = APALIS_IMX8QP;
+		}
+	} else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
 		if (it == 'y' || it == 'Y') {
 			if (wb == 'y' || wb == 'Y')
 				tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;