Skip to contentSkip to conversation

board: toradex: add verdin am62 support

PATCH Superseded Marcel Ziswiler 4 participants 12 messages Aug 3, 2023 – Aug 4, 2023

Subsystems (3)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover board: toradex: add verdin am62 support

From: Marcel Ziswiler <[email protected]>

This series adds initial support for the Toradex Verdin AM62 SoM [1]. The first commit adds resp. PID4s to the ConfigBlock, the second one fixes an early clocking issue confirmed to be a weird bug in TI's scripting. And last but not least support for the Toradex Verdin AM62 is added.

Azure CI all passed [2]. Thanks!

[1] https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
[2] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=6792&view=results

Changes in v5:
- Fix doc/board/toradex/verdin-am62.rst title underline being too short.
- Add verdin-am62 to doc/board/toradex/index.rst.
Thanks to Emanuele having run this series on the azure CI to find out.
- Update U-Boot output in doc/board/toradex/verdin-am62.rst to latest.
- State that the device trees were taken straight from Linux v6.5-rc1.
- Remove k3-am625-verdin-wifi-dev-binman.dtsi include from r5 dts.
- Remove memory@ and reserved-memory nodes.
- Simplify sa_secproxy and esm nodes.
- Get rid of ifdef zeros around usb stuff in device trees.
- Re-work doc/board/toradex/verdin-am62.rst in a more re-usable way. Thanks to Nishanth for pointing those differences out as compared to arch/arm/dts/k3-am625-r5-sk.dts and his suggestions on the rst stuff.

Changes in v4:
- Re-based on top of master with recent binman integration, mac_efuse, cpsw-phy-sel and mdio clean-up and dtsi bump from linux v6.5-rc1.
- Verdin AM62 binman enablement and further clean-up after re-base.
- Removed all ifdefs from DTs now with bumped Linux dtsi.
- Avoid relocated U-Boot and DT reserved-memory clash.
- Enable of_system_setup.

Changes in v3:
- Add Verdin AM62 launch configuration SKUs as well.
- Integrate our recent find of CTRL_SLEEP_MOCI# needing to be driven from A53 SPL as it may be used to control some power-rails on the carrier board. E.g. on the Yavia carrier board it is needed to power the I2C EEPROM on the carrier board.
- Improve boot environment in R5 SPL vs. A53.
- Integrate launch configuration SKUs to Wi-Fi handling.
- Re-sync device trees from Linux kernel v6.5-rc1.
- Add warning if memory is less than expected.

Changes in v2:
- Add Bryan's reviewed-by tag. Thanks!
- Use 1.2 GHz rather than 1.25 GHz A53 clock as on the EVM/SK.
- Also add power-domain 166 as on the EVM/SK.
- Get rid of main_bcdma and main_pktdma as not required in R5 SPL.
- Get rid of all bootph-pre-ram in Ethernet and SDHC1 aka SD card related pinctrls as not required in any SPL.
- Enable CONFIG_TI_SECURE_DEVICE by default as Non-HS devices will continue to boot due to runtime device type detection.
- Disable FAT and SPI support as not required in R5 SPL.
- Also enable CONFIG_SPL_MMC_HS200_SUPPORT in R5 SPL.
- Enable CONFIG_LEGACY_IMAGE_FORMAT to allow sourcing unsigned script images e.g. like our current boot scripts.
- Increase CONFIG_SYS_BOOTM_LEN to 64 MB to allow booting bigger compressed images as e.g. in the Toradex Easy Installer case.
- Change memory configurations to operate at temperatures of up to 95 degrees celsius.
- Increase CONFIG_SYS_MAXARGS from default 16 to 64.
- Enable CONFIG_CMD_REMOTEPROC, CONFIG_SPL_DM_GPIO_LOOKUP_LABEL and CONFIG_SPL_I2C_EEPROM.
- For R5 SPL increase CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN to 0x140000, enable CONFIG_SPL_I2C, CONFIG_DM_I2C and CONFIG_SYS_I2C_OMAP24XX and savedefconfig got rid of CONFIG_SPL_FIT_IMAGE_POST_PROCESS.

Marcel Ziswiler (3):
toradex: tdx-cfg-block: add verdin am62 skus
arm: mach-k3: am62: fix 2nd mux option of clkout0
board: toradex: add verdin am62 support

 arch/arm/dts/Makefile                         |    4 +-
 arch/arm/dts/k3-am62-verdin-dev.dtsi          |  190 ++
 arch/arm/dts/k3-am62-verdin-wifi.dtsi         |   39 +
 arch/arm/dts/k3-am62-verdin.dtsi              | 1401 +++++++++++
 .../dts/k3-am625-verdin-lpddr4-1600MTs.dtsi   | 2190 +++++++++++++++++
 arch/arm/dts/k3-am625-verdin-r5.dts           |   84 +
 .../dts/k3-am625-verdin-wifi-dev-binman.dtsi  |  570 +++++
 .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi  |  201 ++
 arch/arm/dts/k3-am625-verdin-wifi-dev.dts     |   22 +
 arch/arm/mach-k3/Kconfig                      |    1 +
 arch/arm/mach-k3/am62x/clk-data.c             |    5 +-
 board/toradex/common/tdx-cfg-block.c          |    7 +
 board/toradex/common/tdx-cfg-block.h          |   10 +-
 board/toradex/verdin-am62/Kconfig             |   82 +
 board/toradex/verdin-am62/MAINTAINERS         |   17 +
 board/toradex/verdin-am62/Makefile            |    6 +
 board/toradex/verdin-am62/board-cfg.yaml      |   36 +
 board/toradex/verdin-am62/pm-cfg.yaml         |   12 +
 board/toradex/verdin-am62/rm-cfg.yaml         | 1088 ++++++++
 board/toradex/verdin-am62/sec-cfg.yaml        |  379 +++
 board/toradex/verdin-am62/verdin-am62.c       |  131 +
 configs/verdin-am62_a53_defconfig             |  187 ++
 configs/verdin-am62_r5_defconfig              |  111 +
 doc/board/ti/am62x_sk.rst                     |   16 +-
 doc/board/ti/k3.rst                           |    1 +
 doc/board/toradex/index.rst                   |    1 +
 doc/board/toradex/verdin-am62.rst             |  130 +
 include/configs/verdin-am62.h                 |   55 +
 28 files changed, 6963 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/dts/k3-am62-verdin-dev.dtsi
 create mode 100644 arch/arm/dts/k3-am62-verdin-wifi.dtsi
 create mode 100644 arch/arm/dts/k3-am62-verdin.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-lpddr4-1600MTs.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-r5.dts
 create mode 100644 arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-wifi-dev.dts
 create mode 100644 board/toradex/verdin-am62/Kconfig
 create mode 100644 board/toradex/verdin-am62/MAINTAINERS
 create mode 100644 board/toradex/verdin-am62/Makefile
 create mode 100644 board/toradex/verdin-am62/board-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/pm-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/rm-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/sec-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/verdin-am62.c
 create mode 100644 configs/verdin-am62_a53_defconfig
 create mode 100644 configs/verdin-am62_r5_defconfig
 create mode 100644 doc/board/toradex/verdin-am62.rst
 create mode 100644 include/configs/verdin-am62.h
Signature · 1 line
2.36.1
#1 lore raw

PATCH v5 1/3 toradex: tdx-cfg-block: add verdin am62 skus

From: Marcel Ziswiler <[email protected]>

Add initial Verdin AM62 Quad 1GB WB IT prototype and launch configuration SKUs to ConfigBlock handling.

0069: Verdin AM62 Quad 1GB WB IT
0071: Verdin AM62 Solo 512MB
0072: Verdin AM62 Solo 512MB WB IT
0073: Verdin AM62 Dual 1GB ET
0074: Verdin AM62 Dual 1GB IT
0075: Verdin AM62 Dual 1GB WB IT
0076: Verdin AM62 Quad 2GB WB IT

---

(no changes since v3)

Changes in v3:
- Add Verdin AM62 launch configuration SKUs as well.

 board/toradex/common/tdx-cfg-block.c |  7 +++++++
 board/toradex/common/tdx-cfg-block.h | 10 ++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
board/toradex/common/tdx-cfg-block.c +7 -0
index e513f4a2919..8ad4907bfe4 100644
@@ -139,7 +139,14 @@ const struct toradex_som toradex_modules[] = {
 	[66] = { "Verdin iMX8M Plus Quad 8GB WB",        TARGET_IS_ENABLED(VERDIN_IMX8MP)   },
 	[67] = { "Apalis iMX8QM 8GB WB IT",              TARGET_IS_ENABLED(APALIS_IMX8)     },
 	[68] = { "Verdin iMX8M Mini Quad 2GB WB IT",     TARGET_IS_ENABLED(VERDIN_IMX8MM)   },
+	[69] = { "Verdin AM62 Quad 1GB WB IT",           TARGET_IS_ENABLED(VERDIN_AM62_A53) },
 	[70] = { "Verdin iMX8M Plus Quad 8GB WB IT",     TARGET_IS_ENABLED(VERDIN_IMX8MP)   },
+	[71] = { "Verdin AM62 Solo 512MB",               TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+	[72] = { "Verdin AM62 Solo 512MB WB IT",         TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+	[73] = { "Verdin AM62 Dual 1GB ET",              TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+	[74] = { "Verdin AM62 Dual 1GB IT",              TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+	[75] = { "Verdin AM62 Dual 1GB WB IT",           TARGET_IS_ENABLED(VERDIN_AM62_A53) },
+	[76] = { "Verdin AM62 Quad 2GB WB IT",           TARGET_IS_ENABLED(VERDIN_AM62_A53) },
 };
 
 const char * const toradex_carrier_boards[] = {
board/toradex/common/tdx-cfg-block.h +8 -2
index 45fa04ca38a..5c204931a2d 100644
@@ -94,8 +94,14 @@ enum {
 	VERDIN_IMX8MPQ_8GB_WIFI_BT,
 	APALIS_IMX8QM_8GB_WIFI_BT_IT,
 	VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN,
-	/* 69 */
-	VERDIN_IMX8MPQ_8GB_WIFI_BT_IT = 70, /* 70 */
+	VERDIN_AM62Q_WIFI_BT_IT,
+	VERDIN_IMX8MPQ_8GB_WIFI_BT_IT, /* 70 */
+	VERDIN_AM62S_512MB,
+	VERDIN_AM62S_512MB_WIFI_BT_IT,
+	VERDIN_AM62D_1G_ET,
+	VERDIN_AM62D_1G_IT,
+	VERDIN_AM62D_1G_WIFI_BT_IT, /* 75 */
+	VERDIN_AM62Q_2G_WIFI_BT_IT,
 };
 
 enum {
Signature · 1 line
2.36.1
#2 lore raw

PATCH v5 2/3 arm: mach-k3: am62: fix 2nd mux option of clkout0

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Fix second mux option of clkout0 which should really be DEV_BOARD0_CLKOUT0_IN_PARENT_HSDIV4_16FFT_MAIN_2_HSDIVOUT1_CLK10 rather than twice the same according to [1].

[1] https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62x/clocks.html#clocks-for-board0-device

---

(no changes since v2)

Changes in v2:
- Add Bryan's reviewed-by tag. Thanks!

 arch/arm/mach-k3/am62x/clk-data.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-k3/am62x/clk-data.c +3 -2
index c0881778fe7..d7bfed0e031 100644
@@ -57,7 +57,7 @@ static const char * const sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk_parents[] = {
 
 static const char * const clkout0_ctrl_out0_parents[] = {
 	"hsdiv4_16fft_main_2_hsdivout1_clk",
-	"hsdiv4_16fft_main_2_hsdivout1_clk",
+	"hsdiv4_16fft_main_2_hsdivout1_clk10",
 };
 
 static const char * const clk_32k_rc_sel_out0_parents[] = {
@@ -195,6 +195,7 @@ static const struct clk_data clk_list[] = {
 	CLK_DIV("hsdiv4_16fft_main_1_hsdivout1_clk", "pllfracf_ssmod_16fft_main_1_foutvcop_clk", 0x681084, 0, 7, 0, 0),
 	CLK_DIV("hsdiv4_16fft_main_1_hsdivout2_clk", "pllfracf_ssmod_16fft_main_1_foutvcop_clk", 0x681088, 0, 7, 0, 0),
 	CLK_DIV("hsdiv4_16fft_main_2_hsdivout1_clk", "pllfracf_ssmod_16fft_main_2_foutvcop_clk", 0x682084, 0, 7, 0, 0),
+	CLK_DIV("hsdiv4_16fft_main_2_hsdivout1_clk10", "pllfracf_ssmod_16fft_main_2_foutvcop_clk", 0x682084, 0, 7, 0, 0),
 	CLK_DIV("hsdiv4_16fft_main_2_hsdivout2_clk", "pllfracf_ssmod_16fft_main_2_foutvcop_clk", 0x682088, 0, 7, 0, 0),
 	CLK_DIV("hsdiv4_16fft_mcu_0_hsdivout0_clk", "pllfracf_ssmod_16fft_mcu_0_foutvcop_clk", 0x4040080, 0, 7, 0, 0),
 	CLK_MUX_PLLCTRL("sam62_pll_ctrl_wrap_main_0_sysclkout_clk", sam62_pll_ctrl_wrap_main_0_sysclkout_clk_parents, 2, 0x410000, 0),
@@ -313,7 +314,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
 	DEV_CLK(146, 5, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
 	DEV_CLK(157, 20, "clkout0_ctrl_out0"),
 	DEV_CLK(157, 21, "hsdiv4_16fft_main_2_hsdivout1_clk"),
-	DEV_CLK(157, 22, "hsdiv4_16fft_main_2_hsdivout1_clk"),
+	DEV_CLK(157, 22, "hsdiv4_16fft_main_2_hsdivout1_clk10"),
 	DEV_CLK(157, 24, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
 	DEV_CLK(157, 25, "board_0_ddr0_ck0_out"),
 	DEV_CLK(157, 40, "mshsi2c_main_0_porscl"),
Signature · 1 line
2.36.1
#3 lore raw

PATCH v5 3/3 board: toradex: add verdin am62 support

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

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)

---

Changes in v5:
- Fix doc/board/toradex/verdin-am62.rst title underline being too short.
- Add verdin-am62 to doc/board/toradex/index.rst.
Thanks to Emanuele having run this series on the azure CI to find out.
- Update U-Boot output in doc/board/toradex/verdin-am62.rst to latest.
- State that the device trees were taken straight from Linux v6.5-rc1.
- Remove k3-am625-verdin-wifi-dev-binman.dtsi include from r5 dts.
- Remove memory@ and reserved-memory nodes.
- Simplify sa_secproxy and esm nodes.
- Get rid of ifdef zeros around usb stuff in device trees.
- Re-work doc/board/toradex/verdin-am62.rst in a more re-usable way. Thanks to Nishanth for pointing those differences out as compared to arch/arm/dts/k3-am625-r5-sk.dts and his suggestions on the rst stuff.

Changes in v4:
- Re-based on top of master with recent binman integration, mac_efuse, cpsw-phy-sel and mdio clean-up and dtsi bump from linux v6.5-rc1.
- Verdin AM62 binman enablement and further clean-up after re-base.
- Removed all ifdefs from DTs now with bumped Linux dtsi.
- Avoid relocated U-Boot and DT reserved-memory clash.
- Enable of_system_setup.

Changes in v3:
- Integrate our recent find of CTRL_SLEEP_MOCI# needing to be driven from A53 SPL as it may be used to control some power-rails on the carrier board. E.g. on the Yavia carrier board it is needed to power the I2C EEPROM on the carrier board.
- Improve boot environment in R5 SPL vs. A53.
- Integrate launch configuration SKUs to Wi-Fi handling.
- Re-sync device trees from Linux kernel v6.5-rc1.
- Add warning if memory is less than expected.

Changes in v2:
- Use 1.2 GHz rather than 1.25 GHz A53 clock as on the EVM/SK.
- Also add power-domain 166 as on the EVM/SK.
- Get rid of main_bcdma and main_pktdma as not required in R5 SPL.
- Get rid of all bootph-pre-ram in Ethernet and SDHC1 aka SD card related pinctrls as not required in any SPL.
- Enable CONFIG_TI_SECURE_DEVICE by default as Non-HS devices will continue to boot due to runtime device type detection.
- Disable FAT and SPI support as not required in R5 SPL.
- Also enable CONFIG_SPL_MMC_HS200_SUPPORT in R5 SPL.
- Enable CONFIG_LEGACY_IMAGE_FORMAT to allow sourcing unsigned script images e.g. like our current boot scripts.
- Increase CONFIG_SYS_BOOTM_LEN to 64 MB to allow booting bigger compressed images as e.g. in the Toradex Easy Installer case.
- Change memory configurations to operate at temperatures of up to 95 degrees celsius.
- Increase CONFIG_SYS_MAXARGS from default 16 to 64.
- Enable CONFIG_CMD_REMOTEPROC, CONFIG_SPL_DM_GPIO_LOOKUP_LABEL and CONFIG_SPL_I2C_EEPROM.
- For R5 SPL increase CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN to 0x140000, enable CONFIG_SPL_I2C, CONFIG_DM_I2C and CONFIG_SYS_I2C_OMAP24XX and savedefconfig got rid of CONFIG_SPL_FIT_IMAGE_POST_PROCESS.

 arch/arm/dts/Makefile                         |    4 +-
 arch/arm/dts/k3-am62-verdin-dev.dtsi          |  190 ++
 arch/arm/dts/k3-am62-verdin-wifi.dtsi         |   39 +
 arch/arm/dts/k3-am62-verdin.dtsi              | 1401 +++++++++++
 .../dts/k3-am625-verdin-lpddr4-1600MTs.dtsi   | 2190 +++++++++++++++++
 arch/arm/dts/k3-am625-verdin-r5.dts           |   84 +
 .../dts/k3-am625-verdin-wifi-dev-binman.dtsi  |  570 +++++
 .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi  |  201 ++
 arch/arm/dts/k3-am625-verdin-wifi-dev.dts     |   22 +
 arch/arm/mach-k3/Kconfig                      |    1 +
 board/toradex/verdin-am62/Kconfig             |   82 +
 board/toradex/verdin-am62/MAINTAINERS         |   17 +
 board/toradex/verdin-am62/Makefile            |    6 +
 board/toradex/verdin-am62/board-cfg.yaml      |   36 +
 board/toradex/verdin-am62/pm-cfg.yaml         |   12 +
 board/toradex/verdin-am62/rm-cfg.yaml         | 1088 ++++++++
 board/toradex/verdin-am62/sec-cfg.yaml        |  379 +++
 board/toradex/verdin-am62/verdin-am62.c       |  131 +
 configs/verdin-am62_a53_defconfig             |  187 ++
 configs/verdin-am62_r5_defconfig              |  111 +
 doc/board/ti/am62x_sk.rst                     |   16 +-
 doc/board/ti/k3.rst                           |    1 +
 doc/board/toradex/index.rst                   |    1 +
 doc/board/toradex/verdin-am62.rst             |  130 +
 include/configs/verdin-am62.h                 |   55 +
 25 files changed, 6945 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/dts/k3-am62-verdin-dev.dtsi
 create mode 100644 arch/arm/dts/k3-am62-verdin-wifi.dtsi
 create mode 100644 arch/arm/dts/k3-am62-verdin.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-lpddr4-1600MTs.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-r5.dts
 create mode 100644 arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am625-verdin-wifi-dev.dts
 create mode 100644 board/toradex/verdin-am62/Kconfig
 create mode 100644 board/toradex/verdin-am62/MAINTAINERS
 create mode 100644 board/toradex/verdin-am62/Makefile
 create mode 100644 board/toradex/verdin-am62/board-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/pm-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/rm-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/sec-cfg.yaml
 create mode 100644 board/toradex/verdin-am62/verdin-am62.c
 create mode 100644 configs/verdin-am62_a53_defconfig
 create mode 100644 configs/verdin-am62_r5_defconfig
 create mode 100644 doc/board/toradex/verdin-am62.rst
 create mode 100644 include/configs/verdin-am62.h
arch/arm/dts/Makefile +3 -1
index e66c32e2689..fc1a70dca53 100644
@@ -1319,7 +1319,9 @@ dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
 			      k3-am642-r5-sk.dtb
 
 dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \
-			      k3-am625-r5-sk.dtb
+			      k3-am625-r5-sk.dtb \
+			      k3-am625-verdin-wifi-dev.dtb \
+			      k3-am625-verdin-r5.dtb
 
 dtb-$(CONFIG_SOC_K3_AM62A7) += k3-am62a7-sk.dtb \
 			      k3-am62a7-r5-sk.dtb
arch/arm/dts/k3-am62-verdin-dev.dtsi new file +190 -0

190 lines not on this page · raw message

arch/arm/dts/k3-am62-verdin-wifi.dtsi new file +39 -0
new file mode 100644
index 00000000000..90ddc71bcd3
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ *
+ * Common dtsi for Verdin AM62 SoM WB variant
+ *
+ * https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
+ */
+
+/ {
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_wifi_en>;
+		reset-gpios = <&main_gpio0 22 GPIO_ACTIVE_LOW>;
+	};
+};
+
+/* On-module Wi-Fi */
+&sdhci2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sdhci2>;
+	bus-width = <4>;
+	cap-power-off-card;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	non-removable;
+	ti,fails-without-test-cd;
+	ti,driver-strength-ohm = <50>;
+	vmmc-supply = <&reg_3v3>;
+	status = "okay";
+};
+
+/* On-module Bluetooth */
+&main_uart5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart5>;
+	status = "okay";
+};
arch/arm/dts/k3-am62-verdin.dtsi new file +1401 -0

1,401 lines not on this page · raw message

arch/arm/dts/k3-am625-verdin-lpddr4-1600MTs.dtsi new file +2190 -0

1,360 lines not on this page · raw message

arch/arm/dts/k3-am625-verdin-r5.dts new file +84 -0

84 lines not on this page · raw message

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +570 -0

570 lines not on this page · raw message

arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi new file +201 -0

201 lines not on this page · raw message

arch/arm/dts/k3-am625-verdin-wifi-dev.dts new file +22 -0
new file mode 100644
index 00000000000..4b657d6d3e0

Lines of this file are not shown. View the raw message.

arch/arm/mach-k3/Kconfig +1 -0
index bf1c3c51a41..9168bf842dc 100644

Lines of this file are not shown. View the raw message.

board/toradex/verdin-am62/Kconfig new file +82 -0

82 lines not on this page · raw message

board/toradex/verdin-am62/MAINTAINERS new file +17 -0
new file mode 100644
index 00000000000..4e75980dbd7

Lines of this file are not shown. View the raw message.

board/toradex/verdin-am62/Makefile new file +6 -0
new file mode 100644
index 00000000000..af1a5508ed1

Lines of this file are not shown. View the raw message.

board/toradex/verdin-am62/board-cfg.yaml new file +36 -0
new file mode 100644
index 00000000000..36cfb550adf

Lines of this file are not shown. View the raw message.

board/toradex/verdin-am62/pm-cfg.yaml new file +12 -0
new file mode 100644
index 00000000000..5d04cf82ef7

Lines of this file are not shown. View the raw message.

board/toradex/verdin-am62/rm-cfg.yaml new file +1088 -0

1,088 lines not on this page · raw message

board/toradex/verdin-am62/sec-cfg.yaml new file +379 -0

379 lines not on this page · raw message

board/toradex/verdin-am62/verdin-am62.c new file +131 -0

131 lines not on this page · raw message

configs/verdin-am62_a53_defconfig new file +187 -0

187 lines not on this page · raw message

configs/verdin-am62_r5_defconfig new file +111 -0

111 lines not on this page · raw message

doc/board/ti/am62x_sk.rst +8 -8
index 637985cb096..4646bc0f525 100644

Lines of this file are not shown. View the raw message.

doc/board/ti/k3.rst +1 -0
index 9d40675b600..d2f86b0a11a 100644

Lines of this file are not shown. View the raw message.

doc/board/toradex/index.rst +1 -0
index ead5efbb955..89fbdcbb9e9 100644

Lines of this file are not shown. View the raw message.

doc/board/toradex/verdin-am62.rst new file +130 -0

130 lines not on this page · raw message

include/configs/verdin-am62.h new file +55 -0

55 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.36.1

Part of the diff is not shown here. View the raw message.

#4 lore raw

Hi Marcel

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

Quoted 18 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

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)

---

[...]

Quoted 110 lines
arch/arm/dts/k3-am625-verdin-r5.dts new file +3 -0
+	/* We require this for boot handshake */
+	status = "okay";
+};
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +101 -0
new file mode 100644
index 00000000000..e8c926f48b9
@@ -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";

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 111

Quoted 10 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +10 -0
+				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?

Quoted 22 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +22 -0
+#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>;

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 143

Quoted 10 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +10 -0
+			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?

[...]

Quoted 6 lines

new file mode 100644
index 00000000000..e0c35dfa061

include/configs/verdin-am62.h new file +1 -0
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */

include/configs/verdin-am62.h line 11

Quoted 10 lines
include/configs/verdin-am62.h new file +10 -0
+/*
+ * 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

Quoted 44 lines
include/configs/verdin-am62.h new file +44 -0
+#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 */
Signature · 2 lines
Thanking You
Neha Malcom Francis
#5 lore raw
Quoted 18 lines · Neha Malcom Francis
Quoted 17 lines · Marcel Ziswiler
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +17 -0
+	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";
Quoted 8 lines

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 111

Quoted 6 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +6 -0
+				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

#6 lore raw

Hi Francesco

Quoted 28 lines · Francesco Dolcini
Quoted 18 lines · Neha Malcom Francis
Quoted 17 lines · Marcel Ziswiler
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +17 -0
+	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";
Quoted 8 lines

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 111

Quoted 6 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +6 -0
+				schema = "../../ti/common/schema.yaml";
+			};
+		};
+	};
+};
+

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

Quoted 2 lines

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

Quoted 2 lines

Francesco

Signature · 2 lines
Thanking You
Neha Malcom Francis
#7 lore raw

Hi Neha

Quoted 31 lines · Neha Malcom Francis

Hi Francesco

Quoted 28 lines · Francesco Dolcini
Quoted 26 lines · Neha Malcom Francis
Quoted 21 lines · Marcel Ziswiler

+       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"; +                       };
+               };
+       };

Review

Quoted 2 lines
(quoted diff) +2 -0
+};
+

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

Quoted 5 lines
Quoted 2 lines

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!

Quoted 1 line
Quoted 1 line

Francesco

Cheers

Marcel

#8 lore raw
Quoted 34 lines · Marcel Ziswiler

Hi Neha

Quoted 31 lines · Neha Malcom Francis

Hi Francesco

Quoted 28 lines · Francesco Dolcini
Quoted 26 lines · Neha Malcom Francis
Quoted 21 lines · Marcel Ziswiler

+       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"; +                       };
+               };
+       };

Review

Quoted 2 lines
(quoted diff) +2 -0
+};
+

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

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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

#9 lore raw
Quoted 41 lines · Francesco Dolcini
Quoted 40 lines · Marcel Ziswiler

Hi Neha

Quoted 36 lines · Neha Malcom Francis

Hi Francesco

Quoted 28 lines · Francesco Dolcini
Quoted 18 lines · Neha Malcom Francis
Quoted 17 lines · Marcel Ziswiler

+       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";

Quoted 8 lines

Review

Quoted 6 lines

+                               schema = "../../ti/common/schema.yaml"; +                       };
+               };
+       };

(quoted diff) +2 -0
+};
+

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

Quoted 2 lines

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

Quoted 7 lines
Quoted 1 line

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...

#10 lore raw
In reply to Neha Malcom Francis

Hi Neha

Quoted 141 lines · Neha Malcom Francis

Hi Marcel

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

Quoted 18 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

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)

---

[...]

Quoted 115 lines

+       /* We require this for boot handshake */
+       status = "okay";

(quoted diff) +1 -0
+};
arch/arm/dts/k3-am625-verdin-wifi-dev- renamed from arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi +0 -0

binman.dtsi
new file mode 100644
index 00000000000..e8c926f48b9

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +105 -0
@@ -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";
Quoted 8 lines

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 111

Quoted 6 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +6 -0
+                               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.

Quoted 28 lines
Quoted 28 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +28 -0
+#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;
+               };
Quoted 8 lines

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 143

Quoted 4 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +4 -0
+               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.

Quoted 12 lines

[...]

Quoted 10 lines

new file mode 100644
index 00000000000..e0c35dfa061

include/configs/verdin-am62.h new file +5 -0
@@ -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/
Quoted 8 lines

include/configs/verdin-am62.h line 11

Quoted 6 lines
include/configs/verdin-am62.h new file +6 -0
+ */
+
+#ifndef __VERDIN_AM62_H
+#define __VERDIN_AM62_H
+
+#define RAMDISK_ADDR_R                 0x90300000

Nitpick: indentation

Okay.

Quoted 36 lines
Quoted 36 lines
include/configs/verdin-am62.h new file +36 -0
+#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} " \
Quoted 8 lines

include/configs/verdin-am62.h line 55

Quoted 8 lines
include/configs/verdin-am62.h new file +8 -0
+               "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

Marcel

#11 lore raw

Hi Marcel

Quoted 192 lines · Marcel Ziswiler

Hi Neha

Quoted 141 lines · Neha Malcom Francis

Hi Marcel

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

Quoted 18 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

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)

---

[...]

Quoted 115 lines

+       /* We require this for boot handshake */
+       status = "okay";

(quoted diff) +1 -0
+};
arch/arm/dts/k3-am625-verdin-wifi-dev- renamed from arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi +0 -0

binman.dtsi
new file mode 100644
index 00000000000..e8c926f48b9

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +105 -0
@@ -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";
Quoted 8 lines

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 111

Quoted 6 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +6 -0
+                               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.

Quoted 28 lines
Quoted 28 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +28 -0
+#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;
+               };
Quoted 8 lines

arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi line 143

Quoted 4 lines
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi new file +4 -0
+               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?

Quoted 3 lines

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.

Quoted 71 lines
Quoted 13 lines

[...]

Quoted 10 lines

new file mode 100644
index 00000000000..e0c35dfa061

include/configs/verdin-am62.h new file +5 -0
@@ -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/
Quoted 8 lines

include/configs/verdin-am62.h line 11

Quoted 6 lines
include/configs/verdin-am62.h new file +6 -0
+ */
+
+#ifndef __VERDIN_AM62_H
+#define __VERDIN_AM62_H
+
+#define RAMDISK_ADDR_R                 0x90300000

Nitpick: indentation

Okay.

Quoted 36 lines
Quoted 36 lines
include/configs/verdin-am62.h new file +36 -0
+#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} " \
Quoted 8 lines

include/configs/verdin-am62.h line 55

Quoted 8 lines
include/configs/verdin-am62.h new file +8 -0
+               "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...

Quoted 1 line

Cheers

Thanks!

Quoted 2 lines

Marcel

Signature · 2 lines
Thanking You
Neha Malcom Francis