board: toradex: add verdin am62 support
v2 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. PID4 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.
Please note that this series is based on Emanuele's recent work on get_ram_size() [2].
[1] https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
[2] https://lore.kernel.org/all/[email protected]
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 0069 verdin am62 quad 1gb wb it
arm: mach-k3: am62: fix 2nd mux option of clkout0
board: toradex: add verdin am62 support
arch/arm/dts/Makefile | 3 + arch/arm/dts/k3-am62-verdin-dev.dtsi | 248 ++ arch/arm/dts/k3-am62-verdin-wifi.dtsi | 39 + arch/arm/dts/k3-am62-verdin.dtsi | 1411 +++++++++++ .../dts/k3-am625-verdin-lpddr4-1600MTs.dtsi | 2190 +++++++++++++++++ arch/arm/dts/k3-am625-verdin-r5.dts | 115 + .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 215 ++ 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 | 1 + board/toradex/common/tdx-cfg-block.h | 1 + board/toradex/verdin-am62/Kconfig | 80 + board/toradex/verdin-am62/MAINTAINERS | 16 + board/toradex/verdin-am62/Makefile | 6 + board/toradex/verdin-am62/verdin-am62.c | 117 + configs/verdin-am62_a53_defconfig | 184 ++ configs/verdin-am62_r5_defconfig | 111 + doc/board/toradex/verdin-am62.rst | 167 ++ include/configs/verdin-am62.h | 54 + 20 files changed, 4984 insertions(+), 2 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-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/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
PATCH v2 1/3 toradex: tdx-cfg-block: add 0069 verdin am62 quad 1gb wb it
From: Marcel Ziswiler <[email protected]>
Add initial Verdin AM62 Quad 1GB WB IT prototype SKU to ConfigBlock handling.
0069: Verdin AM62 Quad 1GB WB IT
---
(no changes since v1)
board/toradex/common/tdx-cfg-block.c | 1 + board/toradex/common/tdx-cfg-block.h | 1 + 2 files changed, 2 insertions(+)
board/toradex/common/tdx-cfg-block.c +1 -0
@@ -139,6 +139,7 @@ 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) }, };const char *const toradex_carrier_boards[] = {
board/toradex/common/tdx-cfg-block.h +1 -0
@@ -94,6 +94,7 @@ enum {VERDIN_IMX8MPQ_8GB_WIFI_BT ,APALIS_IMX8QM_8GB_WIFI_BT_IT ,VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN , + VERDIN_AM62Q_WIFI_BT_IT, }; enum {
Signature · 1 line
2.36.1
PATCH v2 2/3 arm: mach-k3: am62: fix 2nd mux option of clkout0
In reply to Marcel ZiswilerFrom: 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
---
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
@@ -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
PATCH v2 3/3 board: toradex: add verdin am62 support
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT V1.0A module. 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.
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 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 | 3 + arch/arm/dts/k3-am62-verdin-dev.dtsi | 248 ++ arch/arm/dts/k3-am62-verdin-wifi.dtsi | 39 + arch/arm/dts/k3-am62-verdin.dtsi | 1411 +++++++++++ .../dts/k3-am625-verdin-lpddr4-1600MTs.dtsi | 2190 +++++++++++++++++ arch/arm/dts/k3-am625-verdin-r5.dts | 115 + .../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 215 ++ arch/arm/dts/k3-am625-verdin-wifi-dev.dts | 22 + arch/arm/mach-k3/Kconfig | 1 + board/toradex/verdin-am62/Kconfig | 80 + board/toradex/verdin-am62/MAINTAINERS | 16 + board/toradex/verdin-am62/Makefile | 6 + board/toradex/verdin-am62/verdin-am62.c | 117 + configs/verdin-am62_a53_defconfig | 184 ++ configs/verdin-am62_r5_defconfig | 111 + doc/board/toradex/verdin-am62.rst | 167 ++ include/configs/verdin-am62.h | 54 + 17 files changed, 4979 insertions(+) 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-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/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 -0
@@ -1298,6 +1298,9 @@ dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \ dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \ k3-am625-r5-sk.dtb +dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-verdin-wifi-dev.dtb \ + k3-am625-verdin-r5.dtb + dtb-$(CONFIG_SOC_K3_AM625) += k3-am62a7-sk.dtb \ k3-am62a7-r5-sk.dtb
arch/arm/dts/k3-am62-verdin-dev.dtsi new file +248 -0
248 lines not on this page · raw message
arch/arm/dts/k3-am62-verdin-wifi.dtsi new file +39 -0
@@ -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 = <®_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 +1411 -0
1,411 lines not on this page · raw message
arch/arm/dts/k3-am625-verdin-lpddr4-1600MTs.dtsi new file +2190 -0
1,293 lines not on this page · raw message
arch/arm/dts/k3-am625-verdin-r5.dts new file +115 -0
115 lines not on this page · raw message
arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi new file +215 -0
215 lines not on this page · raw message
arch/arm/dts/k3-am625-verdin-wifi-dev.dts new file +22 -0
Lines of this file are not shown. View the raw message.
board/toradex/verdin-am62/Kconfig new file +80 -0
80 lines not on this page · raw message
board/toradex/verdin-am62/MAINTAINERS new file +16 -0
Lines of this file are not shown. View the raw message.
board/toradex/verdin-am62/Makefile new file +6 -0
Lines of this file are not shown. View the raw message.
board/toradex/verdin-am62/verdin-am62.c new file +117 -0
117 lines not on this page · raw message
configs/verdin-am62_a53_defconfig new file +184 -0
184 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/toradex/verdin-am62.rst new file +167 -0
167 lines not on this page · raw message
include/configs/verdin-am62.h new file +54 -0
54 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.
Hello! Just a quick look into this patch and I see that it contains lot of dead code hidden in '#if 0'. Could you cleanup it?
Hi Pali
Quoted 2 lines · Pali Rohár
Hello! Just a quick look into this patch and I see that it contains lot of dead code hidden in '#if 0'. Could you cleanup it?
I assume you mean those few as can be found in our device trees. This is due to them device trees coming straight from upstream Linux [1], however, the base TI K3 SoC dtsi have not been synchronised recently. Once that is done (e.g. as partially done by [2]) those '#if 0' may simply be removed again.
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
Cheers
Marcel
Hello Marcel,
doc/board/toradex/verdin-am62.rst line 84
Quoted 13 lines · Marcel Ziswiler
doc/board/toradex/verdin-am62.rst new file +13
-0+Build U-Boot for R5 +------------------- + +.. code-block:: bash + + $ export ARCH=arm + $ export CROSS_COMPILE=arm-none-linux-gnueabihf- + $ make verdin-am62_r5_defconfig O=/tmp/r5 + $ make O=/tmp/r5 + $ cd ../k3-image-gen + $ make SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=../ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-gp.bin + $ cp tiboot3-am62x-gp-evm.bin ../tiboot3.bin +
the existing K3 platforms have been converted to binman workflow:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Do you think it makes sense to convert the newly added Verdin board to binman workflow as well?
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
Hello Marcel,
Quoted 17 lines · Alexander Sverdlin
doc/board/toradex/verdin-am62.rst line 84
Quoted 13 lines
doc/board/toradex/verdin-am62.rst new file +13
-0+Build U-Boot for R5 +------------------- + +.. code-block:: bash + + $ export ARCH=arm + $ export CROSS_COMPILE=arm-none-linux-gnueabihf- + $ make verdin-am62_r5_defconfig O=/tmp/r5 + $ make O=/tmp/r5 + $ cd ../k3-image-gen + $ make SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=../ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-gp.bin + $ cp tiboot3-am62x-gp-evm.bin ../tiboot3.bin +the existing K3 platforms have been converted to binman workflow:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 2 lines
Do you think it makes sense to convert the newly added Verdin board to binman workflow as well?
I'm sorry for the noise, I totally missed the fact this has been fixed and accepted already!
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
Sali Alexander
Quoted 20 lines · Alexander
Hello Marcel,
Quoted 17 lines · Alexander Sverdlin
doc/board/toradex/verdin-am62.rst line 84
Quoted 13 lines
doc/board/toradex/verdin-am62.rst new file +13
-0+Build U-Boot for R5 +------------------- + +.. code-block:: bash + + $ export ARCH=arm + $ export CROSS_COMPILE=arm-none-linux-gnueabihf- + $ make verdin-am62_r5_defconfig O=/tmp/r5 + $ make O=/tmp/r5 + $ cd ../k3-image-gen + $ make SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=../ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-gp.bin + $ cp tiboot3-am62x-gp-evm.bin ../tiboot3.bin +the existing K3 platforms have been converted to binman workflow:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 5 lines
Quoted 2 lines
Do you think it makes sense to convert the newly added Verdin board to binman workflow as well?
I'm sorry for the noise, I totally missed the fact this has been fixed and accepted already!
Don't worry and enjoy (;-p).
Cheers
Marcel