
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 marcel.ziswiler@toradex.com
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 marcel.ziswiler@toradex.com
[...]
+ /* 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 00000000000..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"
+&binman { + 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
+&binman { + 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"; + }; + }; + }; +};
^ If you are already including k3-binman.dtsi, why are you redefining these?
Yes, I agree. Will change it to just overriding relevant properties using phandles.
+#endif /* CONFIG_ARM64 */
+#ifdef CONFIG_TARGET_VERDIN_AM62_R5
+&binman { + tiboot3-am62x-hs-verdin.bin { + filename = "tiboot3-am62x-hs-verdin.bin"; + ti-secure-rom { + content = <&u_boot_spl>, <&ti_fs_enc>, <&combined_tifs_cfg>, + <&combined_dm_cfg>, <&sysfw_inner_cert>; + combined; + dm-data; + sysfw-inner-cert; + keyfile = "custMpk.pem"; + sw-rev = <1>; + content-sbl = <&u_boot_spl>; + content-sysfw = <&ti_fs_enc>; + content-sysfw-data = <&combined_tifs_cfg>; + content-sysfw-inner-cert = <&sysfw_inner_cert>; + content-dm-data = <&combined_dm_cfg>; + load = <0x43c00000>; + load-sysfw = <0x40000>; + load-sysfw-data = <0x67000>; + load-dm-data = <0x43c3a800>; + }; + u_boot_spl: u-boot-spl { + no-expanded; + }; + ti_fs_enc: ti-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-am62x-hs-enc.bin"; + type = "blob-ext"; + optional;
If the R5 builds are exactly the same as that generated by k3-am625-binman.dtsi, would it make sense to include that file and just replace the filenames using phandles?
First, there is no such thing as a k3-am625-binman.dtsi. You probably meant k3-am625-sk-binman.dtsi but that one is SK specific and not reusable for us due to the target ifdefery in there. I really believe this part needs to be more or less duplicated.
Ah understood. Once we move to using templates to generate all of these, we can reduce this duplication.
[...]
new file mode 100644 index 00000000000..e0c35dfa061 --- /dev/null +++ b/include/configs/verdin-am62.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/*
- Configuration header file for Verdin AM62 SoM
- Copyright 2023 Toradex - https://www.toradex.com/
- */
+#ifndef __VERDIN_AM62_H +#define __VERDIN_AM62_H
+#define RAMDISK_ADDR_R 0x90300000
Nitpick: indentation
Okay.
+#define SCRIPTADDR 0x90280000
+/* DDR Configuration */ +#define CFG_SYS_SDRAM_BASE 0x80000000 +#define CFG_SYS_SDRAM_BASE1 0x880000000 +#define CFG_SYS_SDRAM_SIZE SZ_2G /* Maximum supported size */
+#define MEM_LAYOUT_ENV_SETTINGS \ + "fdt_addr_r=0x90200000\0" \ + "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "kernel_comp_addr_r=0x80200000\0" \ + "kernel_comp_size=0x08000000\0" \ + "ramdisk_addr_r=" __stringify(RAMDISK_ADDR_R) "\0" \ + "scriptaddr=" __stringify(SCRIPTADDR) "\0"
+#if CONFIG_TARGET_VERDIN_AM62_A53 +/* Enable Distro Boot */ +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ + func(DHCP, dhcp, na) +#include <config_distro_bootcmd.h> +#else /* CONFIG_TARGET_VERDIN_AM62_A53 */ +#define BOOTENV \ + "" +#endif /* CONFIG_TARGET_VERDIN_AM62_A53 */
+/* Incorporate settings into the U-Boot environment */ +#define CFG_EXTRA_ENV_SETTINGS \ + BOOTENV \ + MEM_LAYOUT_ENV_SETTINGS \ + "boot_scripts=boot.scr\0" \ + "boot_script_dhcp=boot.scr\0" \ + "console=ttyS2\0" \ + "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)?; " \ + "if test "$confirm" = "y"; then " \ + "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ + "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \ + "${blkcnt}; fi\0"
+#endif /* __VERDIN_AM62_H */
Thanks! A cleaned-up v6 is incoming...
Cheers
Thanks!
Marcel