Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Neha Malcom Francis

Hi Marcel

On 04/08/23 15:13, Marcel Ziswiler wrote:

Hi Neha

On Fri, 2023-08-04 at 12:04 +0530, Neha Malcom Francis wrote:

Hi Marcel

Repeating my comments from v4, as I missed seeing this version.

On 03/08/23 19:30, Marcel Ziswiler wrote:

From: Marcel Ziswiler 

This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT
V1.0A module and subsequent V1.1 launch configuration SKUs. They are
strapped to boot from their on-module eMMC. U-Boot supports booting
from the on-module eMMC only, DFU support is disabled for now due to
missing AM62x USB support.

The device trees were taken straight from Linux v6.5-rc1.

Boot sequence is:
SYSFW ---> R5 SPL (both in tiboot3.bin) ---> ATF (TF-A) ---> OP-TEE
    ---> A53 SPL (part of tispl.bin) ---> U-boot proper (u-boot.img)

Signed-off-by: Marcel Ziswiler 

---



[...]


+   /* We require this for boot handshake */
+   status = "okay";
+};
diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi 
b/arch/arm/dts/k3-am625-verdin-wifi-dev-
binman.dtsi
new file mode 100644
index 000..e8c926f48b9
--- /dev/null
+++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
@@ -0,0 +1,570 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+#include "k3-binman.dtsi"
+
+ {
+   custMpk {
+   filename = "custMpk.pem";
+   blob-ext {
+   filename = "../../ti/keys/custMpk.pem";
+   };
+   };
+
+   ti-degenerate-key {
+   filename = "ti-degenerate-key.pem";
+   blob-ext {
+   filename = "../../ti/keys/ti-degenerate-key.pem";
+   };
+   };
+};
+
+#ifndef CONFIG_ARM64
+
+ {
+   board-cfg {
+   filename = "board-cfg.bin";
+   bcfg_yaml: ti-board-config {
+   config = "board-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   pm-cfg {
+   filename = "pm-cfg.bin";
+   rcfg_yaml: ti-board-config {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   rm-cfg {
+   filename = "rm-cfg.bin";
+   pcfg_yaml: ti-board-config {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   sec-cfg {
+   filename = "sec-cfg.bin";
+   scfg_yaml: ti-board-config {
+   config = "sec-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   combined-tifs-cfg {
+   filename = "combined-tifs-cfg.bin";
+   ti-board-config {
+   bcfg_yaml_tifs: board-cfg {
+   config = "board-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   scfg_yaml_tifs: sec-cfg {
+   config = "sec-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   pcfg_yaml_tifs: pm-cfg {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   rcfg_yaml_tifs: rm-cfg {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   };
+   combined-dm-cfg {
+   filename = "combined-dm-cfg.bin";
+   ti-board-config {
+   pcfg_yaml_dm: pm-cfg {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   rcfg_yaml_dm: rm-cfg {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   };
+   combined-sysfw-cfg {
+   filename = "combined-sysfw-cfg.bin";
+   ti-board-config {
+   board-cfg {
+   config = "board-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   sec-cfg {
+   config = "sec-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   pm-cfg {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   rm-cfg {
+   config = 

Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Marcel Ziswiler
Hi Neha

On Fri, 2023-08-04 at 12:04 +0530, Neha Malcom Francis wrote:
> Hi Marcel
> 
> Repeating my comments from v4, as I missed seeing this version.
> 
> On 03/08/23 19:30, Marcel Ziswiler wrote:
> > From: Marcel Ziswiler 
> > 
> > This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT
> > V1.0A module and subsequent V1.1 launch configuration SKUs. They are
> > strapped to boot from their on-module eMMC. U-Boot supports booting
> > from the on-module eMMC only, DFU support is disabled for now due to
> > missing AM62x USB support.
> > 
> > The device trees were taken straight from Linux v6.5-rc1.
> > 
> > Boot sequence is:
> > SYSFW ---> R5 SPL (both in tiboot3.bin) ---> ATF (TF-A) ---> OP-TEE
> >    ---> A53 SPL (part of tispl.bin) ---> U-boot proper (u-boot.img)
> > 
> > Signed-off-by: Marcel Ziswiler 
> > 
> > ---
> > 
> 
> [...]
> 
> > +   /* We require this for boot handshake */
> > +   status = "okay";
> > +};
> > diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi 
> > b/arch/arm/dts/k3-am625-verdin-wifi-dev-
> > binman.dtsi
> > new file mode 100644
> > index 000..e8c926f48b9
> > --- /dev/null
> > +++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
> > @@ -0,0 +1,570 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> > +/*
> > + * Copyright 2023 Toradex
> > + */
> > +
> > +#include "k3-binman.dtsi"
> > +
> > + {
> > +   custMpk {
> > +   filename = "custMpk.pem";
> > +   blob-ext {
> > +   filename = "../../ti/keys/custMpk.pem";
> > +   };
> > +   };
> > +
> > +   ti-degenerate-key {
> > +   filename = "ti-degenerate-key.pem";
> > +   blob-ext {
> > +   filename = "../../ti/keys/ti-degenerate-key.pem";
> > +   };
> > +   };
> > +};
> > +
> > +#ifndef CONFIG_ARM64
> > +
> > + {
> > +   board-cfg {
> > +   filename = "board-cfg.bin";
> > +   bcfg_yaml: ti-board-config {
> > +   config = "board-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   };
> > +   pm-cfg {
> > +   filename = "pm-cfg.bin";
> > +   rcfg_yaml: ti-board-config {
> > +   config = "pm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   };
> > +   rm-cfg {
> > +   filename = "rm-cfg.bin";
> > +   pcfg_yaml: ti-board-config {
> > +   config = "rm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   };
> > +   sec-cfg {
> > +   filename = "sec-cfg.bin";
> > +   scfg_yaml: ti-board-config {
> > +   config = "sec-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   };
> > +   combined-tifs-cfg {
> > +   filename = "combined-tifs-cfg.bin";
> > +   ti-board-config {
> > +   bcfg_yaml_tifs: board-cfg {
> > +   config = "board-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   scfg_yaml_tifs: sec-cfg {
> > +   config = "sec-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   pcfg_yaml_tifs: pm-cfg {
> > +   config = "pm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   rcfg_yaml_tifs: rm-cfg {
> > +   config = "rm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   };
> > +   };
> > +   combined-dm-cfg {
> > +   filename = "combined-dm-cfg.bin";
> > +   ti-board-config {
> > +   pcfg_yaml_dm: pm-cfg {
> > +   config = "pm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   rcfg_yaml_dm: rm-cfg {
> > +   config = "rm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   };
> > +   };
> > +   combined-sysfw-cfg {
> > +   filename = "combined-sysfw-cfg.bin";
> > +   ti-board-config {
> > +   board-cfg {
> > +   config = "board-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > + 

Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Marcel Ziswiler
On Fri, 2023-08-04 at 10:15 +0200, Francesco Dolcini wrote:
> On Fri, Aug 04, 2023 at 08:12:36AM +, Marcel Ziswiler wrote:
> > Hi Neha
> > 
> > On Fri, 2023-08-04 at 13:35 +0530, Neha Malcom Francis wrote:
> > > Hi Francesco
> > > 
> > > On 04/08/23 13:24, Francesco Dolcini wrote:
> > > > On Fri, Aug 04, 2023 at 12:04:59PM +0530, Neha Malcom Francis wrote:
> > > > > On 03/08/23 19:30, Marcel Ziswiler wrote:
> > > > > > +   combined-sysfw-cfg {
> > > > > > +   filename = "combined-sysfw-cfg.bin";
> > > > > > +   ti-board-config {
> > > > > > +   board-cfg {
> > > > > > +   config = "board-cfg.yaml";
> > > > > > +   schema = 
> > > > > > "../../ti/common/schema.yaml";
> > > > > > +   };
> > > > > > +   sec-cfg {
> > > > > > +   config = "sec-cfg.yaml";
> > > > > > +   schema = 
> > > > > > "../../ti/common/schema.yaml";
> > > > > > +   };
> > > > > > +   pm-cfg {
> > > > > > +   config = "pm-cfg.yaml";
> > > > > > +   schema = 
> > > > > > "../../ti/common/schema.yaml";
> > > > > > +   };
> > > > > > +   rm-cfg {
> > > > > > +   config = "rm-cfg.yaml";
> > > > > > +   schema = 
> > > > > > "../../ti/common/schema.yaml";
> > > > > > +   };
> > > > > > +   };
> > > > > > +   };
> > > > > > +};
> > > > > > +
> > > > > 
> > > > > ^ If you are already including k3-binman.dtsi, why are you redefining 
> > > > > these?
> > > > 
> > > > We want/need out own `config`. Any other solution apart of this one?
> > > > 
> > > 
> > > Ah I see, how about using the cfg phandle to replace it with your own? 
> > > See 
> > > example in arch/arm/dts/k3-j7200-binman.dtsi
> > 
> > Yes, I missed that. Let me do it that way and post a v6.
> 
> Will it work? in k3-binman.dtsi the schema is referenced with such
> relative path: `schema = "../common/schema.yaml";` there.
> 
> There is an assumption of this being used from board/ti/$boardname if I
> understand it correctly.

Yes, but we can still override only that with labels rather than duplicating 
the whole thing. I am cleaning it
up that minute...


Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Francesco Dolcini
On Fri, Aug 04, 2023 at 08:12:36AM +, Marcel Ziswiler wrote:
> Hi Neha
> 
> On Fri, 2023-08-04 at 13:35 +0530, Neha Malcom Francis wrote:
> > Hi Francesco
> > 
> > On 04/08/23 13:24, Francesco Dolcini wrote:
> > > On Fri, Aug 04, 2023 at 12:04:59PM +0530, Neha Malcom Francis wrote:
> > > > On 03/08/23 19:30, Marcel Ziswiler wrote:
> > > > > +   combined-sysfw-cfg {
> > > > > +   filename = "combined-sysfw-cfg.bin";
> > > > > +   ti-board-config {
> > > > > +   board-cfg {
> > > > > +   config = "board-cfg.yaml";
> > > > > +   schema = 
> > > > > "../../ti/common/schema.yaml";
> > > > > +   };
> > > > > +   sec-cfg {
> > > > > +   config = "sec-cfg.yaml";
> > > > > +   schema = 
> > > > > "../../ti/common/schema.yaml";
> > > > > +   };
> > > > > +   pm-cfg {
> > > > > +   config = "pm-cfg.yaml";
> > > > > +   schema = 
> > > > > "../../ti/common/schema.yaml";
> > > > > +   };
> > > > > +   rm-cfg {
> > > > > +   config = "rm-cfg.yaml";
> > > > > +   schema = 
> > > > > "../../ti/common/schema.yaml";
> > > > > +   };
> > > > > +   };
> > > > > +   };
> > > > > +};
> > > > > +
> > > > 
> > > > ^ If you are already including k3-binman.dtsi, why are you redefining 
> > > > these?
> > > 
> > > We want/need out own `config`. Any other solution apart of this one?
> > > 
> > 
> > Ah I see, how about using the cfg phandle to replace it with your own? See 
> > example in arch/arm/dts/k3-j7200-binman.dtsi
> 
> Yes, I missed that. Let me do it that way and post a v6.

Will it work? in k3-binman.dtsi the schema is referenced with such
relative path: `schema = "../common/schema.yaml";` there.

There is an assumption of this being used from board/ti/$boardname if I
understand it correctly.

Francesco



Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Marcel Ziswiler
Hi Neha

On Fri, 2023-08-04 at 13:35 +0530, Neha Malcom Francis wrote:
> Hi Francesco
> 
> On 04/08/23 13:24, Francesco Dolcini wrote:
> > On Fri, Aug 04, 2023 at 12:04:59PM +0530, Neha Malcom Francis wrote:
> > > On 03/08/23 19:30, Marcel Ziswiler wrote:
> > > > +   combined-sysfw-cfg {
> > > > +   filename = "combined-sysfw-cfg.bin";
> > > > +   ti-board-config {
> > > > +   board-cfg {
> > > > +   config = "board-cfg.yaml";
> > > > +   schema = "../../ti/common/schema.yaml";
> > > > +   };
> > > > +   sec-cfg {
> > > > +   config = "sec-cfg.yaml";
> > > > +   schema = "../../ti/common/schema.yaml";
> > > > +   };
> > > > +   pm-cfg {
> > > > +   config = "pm-cfg.yaml";
> > > > +   schema = "../../ti/common/schema.yaml";
> > > > +   };
> > > > +   rm-cfg {
> > > > +   config = "rm-cfg.yaml";
> > > > +   schema = "../../ti/common/schema.yaml";
> > > > +   };
> > > > +   };
> > > > +   };
> > > > +};
> > > > +
> > > 
> > > ^ If you are already including k3-binman.dtsi, why are you redefining 
> > > these?
> > 
> > We want/need out own `config`. Any other solution apart of this one?
> > 
> 
> Ah I see, how about using the cfg phandle to replace it with your own? See 
> example in arch/arm/dts/k3-j7200-binman.dtsi

Yes, I missed that. Let me do it that way and post a v6.

Thanks!

> > Francesco

Cheers

Marcel


Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Neha Malcom Francis

Hi Francesco

On 04/08/23 13:24, Francesco Dolcini wrote:

On Fri, Aug 04, 2023 at 12:04:59PM +0530, Neha Malcom Francis wrote:

On 03/08/23 19:30, Marcel Ziswiler wrote:

+   combined-sysfw-cfg {
+   filename = "combined-sysfw-cfg.bin";
+   ti-board-config {
+   board-cfg {
+   config = "board-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   sec-cfg {
+   config = "sec-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   pm-cfg {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   rm-cfg {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   };
+};
+


^ If you are already including k3-binman.dtsi, why are you redefining these?


We want/need out own `config`. Any other solution apart of this one?



Ah I see, how about using the cfg phandle to replace it with your own? See 
example in arch/arm/dts/k3-j7200-binman.dtsi



Francesco



--
Thanking You
Neha Malcom Francis


Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Francesco Dolcini
On Fri, Aug 04, 2023 at 12:04:59PM +0530, Neha Malcom Francis wrote:
> On 03/08/23 19:30, Marcel Ziswiler wrote:
> > +   combined-sysfw-cfg {
> > +   filename = "combined-sysfw-cfg.bin";
> > +   ti-board-config {
> > +   board-cfg {
> > +   config = "board-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   sec-cfg {
> > +   config = "sec-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   pm-cfg {
> > +   config = "pm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   rm-cfg {
> > +   config = "rm-cfg.yaml";
> > +   schema = "../../ti/common/schema.yaml";
> > +   };
> > +   };
> > +   };
> > +};
> > +
> 
> ^ If you are already including k3-binman.dtsi, why are you redefining these?

We want/need out own `config`. Any other solution apart of this one?

Francesco



Re: [PATCH v5 3/3] board: toradex: add verdin am62 support

2023-08-04 Thread Neha Malcom Francis

Hi Marcel

Repeating my comments from v4, as I missed seeing this version.

On 03/08/23 19:30, Marcel Ziswiler wrote:

From: Marcel Ziswiler 

This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT
V1.0A module and subsequent V1.1 launch configuration SKUs. They are
strapped to boot from their on-module eMMC. U-Boot supports booting
from the on-module eMMC only, DFU support is disabled for now due to
missing AM62x USB support.

The device trees were taken straight from Linux v6.5-rc1.

Boot sequence is:
SYSFW ---> R5 SPL (both in tiboot3.bin) ---> ATF (TF-A) ---> OP-TEE
   ---> A53 SPL (part of tispl.bin) ---> U-boot proper (u-boot.img)

Signed-off-by: Marcel Ziswiler 

---



[...]


+   /* We require this for boot handshake */
+   status = "okay";
+};
diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi 
b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
new file mode 100644
index 000..e8c926f48b9
--- /dev/null
+++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
@@ -0,0 +1,570 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+#include "k3-binman.dtsi"
+
+ {
+   custMpk {
+   filename = "custMpk.pem";
+   blob-ext {
+   filename = "../../ti/keys/custMpk.pem";
+   };
+   };
+
+   ti-degenerate-key {
+   filename = "ti-degenerate-key.pem";
+   blob-ext {
+   filename = "../../ti/keys/ti-degenerate-key.pem";
+   };
+   };
+};
+
+#ifndef CONFIG_ARM64
+
+ {
+   board-cfg {
+   filename = "board-cfg.bin";
+   bcfg_yaml: ti-board-config {
+   config = "board-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   pm-cfg {
+   filename = "pm-cfg.bin";
+   rcfg_yaml: ti-board-config {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   rm-cfg {
+   filename = "rm-cfg.bin";
+   pcfg_yaml: ti-board-config {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   sec-cfg {
+   filename = "sec-cfg.bin";
+   scfg_yaml: ti-board-config {
+   config = "sec-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   combined-tifs-cfg {
+   filename = "combined-tifs-cfg.bin";
+   ti-board-config {
+   bcfg_yaml_tifs: board-cfg {
+   config = "board-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   scfg_yaml_tifs: sec-cfg {
+   config = "sec-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   pcfg_yaml_tifs: pm-cfg {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   rcfg_yaml_tifs: rm-cfg {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   };
+   combined-dm-cfg {
+   filename = "combined-dm-cfg.bin";
+   ti-board-config {
+   pcfg_yaml_dm: pm-cfg {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   rcfg_yaml_dm: rm-cfg {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+   };
+   combined-sysfw-cfg {
+   filename = "combined-sysfw-cfg.bin";
+   ti-board-config {
+   board-cfg {
+   config = "board-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   sec-cfg {
+   config = "sec-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   pm-cfg {
+   config = "pm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   rm-cfg {
+   config = "rm-cfg.yaml";
+   schema = "../../ti/common/schema.yaml";
+   };
+   };
+