board: toradex: add verdin am62 support

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>
Reviewed-by: Nishanth Menon <nm@ti.com>
This commit is contained in:
Marcel Ziswiler 2023-08-04 12:08:08 +02:00 committed by Tom Rini
parent e5fe63d4f6
commit 7d1a10659f
25 changed files with 6907 additions and 9 deletions

View File

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

View File

@ -0,0 +1,190 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2023 Toradex
*
* Common dtsi for Verdin AM62 SoM on Development carrier board
*
* https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
* https://www.toradex.com/products/carrier-board/verdin-development-board-kit
*/
/* Verdin ETHs */
&cpsw3g {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rgmii1>, <&pinctrl_rgmii2>;
status = "okay";
};
/* MDIO, shared by Verdin ETH_1 (On-module PHY) and Verdin ETH_2_RGMII */
&cpsw3g_mdio {
status = "okay";
cpsw3g_phy1: ethernet-phy@7 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <7>;
interrupt-parent = <&main_gpio0>;
interrupts = <38 IRQ_TYPE_EDGE_FALLING>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eth2_rgmii_int>;
micrel,led-mode = <0>;
};
};
/* Verdin ETH_1 (On-module PHY) */
&cpsw_port1 {
status = "okay";
};
/* Verdin ETH_2_RGMII */
&cpsw_port2 {
phy-handle = <&cpsw3g_phy1>;
phy-mode = "rgmii-rxid";
status = "okay";
};
/* Verdin PWM_1, PWM_2 */
&epwm0 {
status = "okay";
};
/* Verdin PWM_3_DSI */
&epwm1 {
status = "okay";
};
&main_gpio0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ctrl_sleep_moci>,
<&pinctrl_gpio_5>,
<&pinctrl_gpio_6>,
<&pinctrl_gpio_7>,
<&pinctrl_gpio_8>;
};
/* Verdin I2C_1 */
&main_i2c1 {
status = "okay";
/* IO Expander */
gpio_expander_21: gpio@21 {
compatible = "nxp,pcal6416";
reg = <0x21>;
#gpio-cells = <2>;
gpio-controller;
};
/* Current measurement into module VCC */
hwmon@40 {
compatible = "ti,ina219";
reg = <0x40>;
shunt-resistor = <10000>;
};
/* Temperature sensor */
sensor@4f {
compatible = "ti,tmp75c";
reg = <0x4f>;
};
/* EEPROM */
eeprom@57 {
compatible = "st,24c02", "atmel,24c02";
reg = <0x57>;
pagesize = <16>;
};
};
/* Verdin I2C_2_DSI */
&main_i2c2 {
status = "okay";
};
/* Verdin I2C_4_CSI */
&main_i2c3 {
status = "okay";
};
/* Verdin CAN_1 */
&main_mcan0 {
status = "okay";
};
/* Verdin SPI_1 */
&main_spi1 {
status = "okay";
};
/* Verdin UART_3 */
&main_uart0 {
status = "okay";
};
/* Verdin UART_1, connector X50 through RS485 transceiver. */
&main_uart1 {
linux,rs485-enabled-at-boot-time;
rs485-rx-during-tx;
status = "okay";
};
/* Verdin I2S_1 */
&mcasp0 {
status = "okay";
};
&mcu_gpio0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_1>,
<&pinctrl_gpio_2>,
<&pinctrl_gpio_3>,
<&pinctrl_gpio_4>;
};
/* Verdin I2C_3_HDMI */
&mcu_i2c0 {
status = "okay";
};
/* Verdin UART_4 */
&mcu_uart0 {
status = "okay";
};
/* Verdin QSPI_1 */
&ospi0 {
status = "okay";
};
/* Verdin SD_1 */
&sdhci1 {
ti,driver-strength-ohm = <33>;
status = "okay";
};
/* Verdin USB_1 */
&usbss0 {
status = "okay";
};
&usb0 {
status = "okay";
};
/* Verdin USB_2 */
&usbss1 {
status = "okay";
};
&usb1 {
status = "okay";
};
/* Verdin CTRL_WAKE1_MICO# */
&verdin_gpio_keys {
status = "okay";
};
/* Verdin UART_2 */
&wkup_uart0 {
/* FIXME: WKUP UART0 is used by DM firmware */
status = "reserved";
};

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,84 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Toradex Verdin AM62 dts file for R5 SPL
* Copyright 2023 Toradex - https://www.toradex.com/
*/
#include "k3-am625-verdin-wifi-dev.dts"
#include "k3-am625-verdin-lpddr4-1600MTs.dtsi"
#include "k3-am62-ddr.dtsi"
#include "k3-am625-verdin-wifi-dev-u-boot.dtsi"
/ {
a53_0: a53@0 {
compatible = "ti,am654-rproc";
reg = <0x00 0x00a90000 0x00 0x10>;
/*
* FIXME: Currently only the SPL running on the R5 has a clock
* driver. As a workaround therefore move the assigned-clock
* stuff required for our ETH_25MHz_CLK from the cpsw3g_mdio
* node of the regular device tree to here (last one each in
* below three lines, adding a <0> as spacing for parents).
*/
assigned-clocks = <&k3_clks 61 0>, <&k3_clks 135 0>, <&k3_clks 157 20>;
assigned-clock-parents = <&k3_clks 61 2>, <0>, <&k3_clks 157 22>;
assigned-clock-rates = <200000000>, <1200000000>, <25000000>;
clocks = <&k3_clks 61 0>;
power-domains = <&k3_pds 61 TI_SCI_PD_EXCLUSIVE>,
<&k3_pds 135 TI_SCI_PD_EXCLUSIVE>,
<&k3_pds 166 TI_SCI_PD_EXCLUSIVE>;
resets = <&k3_reset 135 0>;
ti,sci = <&dmsc>;
ti,sci-host-id = <10>;
ti,sci-proc-id = <32>;
bootph-pre-ram;
};
aliases {
remoteproc0 = &sysctrler;
remoteproc1 = &a53_0;
};
dm_tifs: dm-tifs {
compatible = "ti,j721e-dm-sci";
mbox-names = "rx", "tx";
mboxes= <&secure_proxy_main 22>,
<&secure_proxy_main 23>;
ti,host-id = <36>;
ti,secure-host;
bootph-pre-ram;
};
};
&cbass_main {
sysctrler: sysctrler {
compatible = "ti,am654-system-controller";
mboxes= <&secure_proxy_main 1>, <&secure_proxy_main 0>, <&secure_proxy_sa3 0>;
mbox-names = "tx", "rx", "boot_notify";
bootph-pre-ram;
};
};
&dmsc {
mboxes= <&secure_proxy_main 0>,
<&secure_proxy_main 1>,
<&secure_proxy_main 0>;
mbox-names = "rx", "tx", "notify";
ti,host-id = <35>;
ti,secure-host;
};
&main_esm {
bootph-pre-ram;
};
&mcu_esm {
bootph-pre-ram;
};
&secure_proxy_sa3 {
bootph-pre-ram;
/* We require this for boot handshake */
status = "okay";
};

View File

@ -0,0 +1,532 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2023 Toradex
*/
#include "k3-binman.dtsi"
&custmpk_pem {
filename = "../../ti/keys/custMpk.pem";
};
&dkey_pem {
filename = "../../ti/keys/ti-degenerate-key.pem";
};
#ifndef CONFIG_ARM64
&bcfg_yaml {
schema = "../../ti/common/schema.yaml";
};
&pcfg_yaml {
schema = "../../ti/common/schema.yaml";
};
&rcfg_yaml {
schema = "../../ti/common/schema.yaml";
};
&scfg_yaml {
schema = "../../ti/common/schema.yaml";
};
/* combined-tifs-cfg */
&bcfg_yaml_tifs {
schema = "../../ti/common/schema.yaml";
};
&pcfg_yaml_tifs {
schema = "../../ti/common/schema.yaml";
};
&rcfg_yaml_tifs {
schema = "../../ti/common/schema.yaml";
};
&scfg_yaml_tifs {
schema = "../../ti/common/schema.yaml";
};
/* combined-dm-cfg */
&pcfg_yaml_dm {
schema = "../../ti/common/schema.yaml";
};
&rcfg_yaml_dm {
schema = "../../ti/common/schema.yaml";
};
/* combined-sysfw-cfg */
&bcfg_yaml_sysfw {
schema = "../../ti/common/schema.yaml";
};
&pcfg_yaml_sysfw {
schema = "../../ti/common/schema.yaml";
};
&rcfg_yaml_sysfw {
schema = "../../ti/common/schema.yaml";
};
&scfg_yaml_sysfw {
schema = "../../ti/common/schema.yaml";
};
#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;
};
combined_tifs_cfg: combined-tifs-cfg.bin {
filename = "combined-tifs-cfg.bin";
type = "blob-ext";
};
sysfw_inner_cert: sysfw-inner-cert {
filename = "ti-sysfw/ti-fs-firmware-am62x-hs-cert.bin";
type = "blob-ext";
optional;
};
combined_dm_cfg: combined-dm-cfg.bin {
filename = "combined-dm-cfg.bin";
type = "blob-ext";
};
};
};
&binman {
tiboot3-am62x-hs-fs-verdin.bin {
filename = "tiboot3-am62x-hs-fs-verdin.bin";
symlink = "tiboot3.bin";
ti-secure-rom {
content = <&u_boot_spl_fs>, <&ti_fs_enc_fs>, <&combined_tifs_cfg_fs>,
<&combined_dm_cfg_fs>, <&sysfw_inner_cert_fs>;
combined;
dm-data;
sysfw-inner-cert;
keyfile = "custMpk.pem";
sw-rev = <1>;
content-sbl = <&u_boot_spl_fs>;
content-sysfw = <&ti_fs_enc_fs>;
content-sysfw-data = <&combined_tifs_cfg_fs>;
content-sysfw-inner-cert = <&sysfw_inner_cert_fs>;
content-dm-data = <&combined_dm_cfg_fs>;
load = <0x43c00000>;
load-sysfw = <0x40000>;
load-sysfw-data = <0x67000>;
load-dm-data = <0x43c3a800>;
};
u_boot_spl_fs: u-boot-spl {
no-expanded;
};
ti_fs_enc_fs: ti-fs-enc.bin {
filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-enc.bin";
type = "blob-ext";
optional;
};
combined_tifs_cfg_fs: combined-tifs-cfg.bin {
filename = "combined-tifs-cfg.bin";
type = "blob-ext";
};
sysfw_inner_cert_fs: sysfw-inner-cert {
filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-cert.bin";
type = "blob-ext";
optional;
};
combined_dm_cfg_fs: combined-dm-cfg.bin {
filename = "combined-dm-cfg.bin";
type = "blob-ext";
};
};
};
&binman {
tiboot3-am62x-gp-verdin.bin {
filename = "tiboot3-am62x-gp-verdin.bin";
ti-secure-rom {
content = <&u_boot_spl_unsigned>, <&ti_fs_gp>,
<&combined_tifs_cfg_gp>, <&combined_dm_cfg_gp>;
combined;
dm-data;
content-sbl = <&u_boot_spl_unsigned>;
load = <0x43c00000>;
content-sysfw = <&ti_fs_gp>;
load-sysfw = <0x40000>;
content-sysfw-data = <&combined_tifs_cfg_gp>;
load-sysfw-data = <0x67000>;
content-dm-data = <&combined_dm_cfg_gp>;
load-dm-data = <0x43c3a800>;
sw-rev = <1>;
keyfile = "ti-degenerate-key.pem";
};
u_boot_spl_unsigned: u-boot-spl {
no-expanded;
};
ti_fs_gp: ti-fs-gp.bin {
filename = "ti-sysfw/ti-fs-firmware-am62x-gp.bin";
type = "blob-ext";
optional;
};
combined_tifs_cfg_gp: combined-tifs-cfg-gp.bin {
filename = "combined-tifs-cfg.bin";
type = "blob-ext";
};
combined_dm_cfg_gp: combined-dm-cfg-gp.bin {
filename = "combined-dm-cfg.bin";
type = "blob-ext";
};
};
};
#endif /* CONFIG_TARGET_VERDIN_AM62_R5 */
#ifdef CONFIG_TARGET_VERDIN_AM62_A53
#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
#define SPL_VERDIN_AM62_DTB "spl/dts/k3-am625-verdin-wifi-dev.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin"
#define VERDIN_AM62_DTB "u-boot.dtb"
&binman {
ti-dm {
filename = "ti-dm.bin";
blob-ext {
filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
};
};
ti-spl {
filename = "tispl.bin";
pad-byte = <0xff>;
fit {
description = "Configuration to load ATF and SPL";
#address-cells = <1>;
images {
atf {
description = "ARM Trusted Firmware";
type = "firmware";
arch = "arm64";
compression = "none";
os = "arm-trusted-firmware";
load = <CONFIG_K3_ATF_LOAD_ADDR>;
entry = <CONFIG_K3_ATF_LOAD_ADDR>;
ti-secure {
content = <&atf>;
keyfile = "custMpk.pem";
};
atf: atf-bl31 {
};
};
tee {
description = "OP-TEE";
type = "tee";
arch = "arm64";
compression = "none";
os = "tee";
load = <0x9e800000>;
entry = <0x9e800000>;
ti-secure {
content = <&tee>;
keyfile = "custMpk.pem";
};
tee: tee-os {
};
};
dm {
description = "DM binary";
type = "firmware";
arch = "arm32";
compression = "none";
os = "DM";
load = <0x89000000>;
entry = <0x89000000>;
ti-secure {
content = <&dm>;
keyfile = "custMpk.pem";
};
dm: blob-ext {
filename = "ti-dm.bin";
};
};
spl {
description = "SPL (64-bit)";
type = "standalone";
os = "U-Boot";
arch = "arm64";
compression = "none";
load = <CONFIG_SPL_TEXT_BASE>;
entry = <CONFIG_SPL_TEXT_BASE>;
ti-secure {
content = <&u_boot_spl_nodtb>;
keyfile = "custMpk.pem";
};
u_boot_spl_nodtb: blob-ext {
filename = SPL_NODTB;
};
};
fdt-0 {
description = "k3-am625-verdin-wifi-dev";
type = "flat_dt";
arch = "arm";
compression = "none";
ti-secure {
content = <&spl_verdin_am62_dtb>;
keyfile = "custMpk.pem";
};
spl_verdin_am62_dtb: blob-ext {
filename = SPL_VERDIN_AM62_DTB;
};
};
};
configurations {
default = "conf-0";
conf-0 {
description = "k3-am625-verdin-wifi-dev";
firmware = "atf";
loadables = "tee", "dm", "spl";
fdt = "fdt-0";
};
};
};
};
};
&binman {
u-boot {
filename = "u-boot.img";
pad-byte = <0xff>;
fit {
description = "FIT image with multiple configurations";
images {
uboot {
description = "U-Boot for AM625 board";
type = "firmware";
os = "u-boot";
arch = "arm";
compression = "none";
load = <CONFIG_TEXT_BASE>;
ti-secure {
content = <&u_boot_nodtb>;
keyfile = "custMpk.pem";
};
u_boot_nodtb: u-boot-nodtb {
};
hash {
algo = "crc32";
};
};
fdt-0 {
description = "k3-am625-verdin-wifi-dev";
type = "flat_dt";
arch = "arm";
compression = "none";
ti-secure {
content = <&verdin_am62_dtb>;
keyfile = "custMpk.pem";
};
verdin_am62_dtb: blob-ext {
filename = VERDIN_AM62_DTB;
};
hash {
algo = "crc32";
};
};
};
configurations {
default = "conf-0";
conf-0 {
description = "k3-am625-verdin-wifi-dev";
firmware = "uboot";
loadables = "uboot";
fdt = "fdt-0";
};
};
};
};
};
&binman {
ti-spl_unsigned {
filename = "tispl.bin_unsigned";
pad-byte = <0xff>;
fit {
description = "Configuration to load ATF and SPL";
#address-cells = <1>;
images {
atf {
description = "ARM Trusted Firmware";
type = "firmware";
arch = "arm64";
compression = "none";
os = "arm-trusted-firmware";
load = <CONFIG_K3_ATF_LOAD_ADDR>;
entry = <CONFIG_K3_ATF_LOAD_ADDR>;
atf-bl31 {
filename = "bl31.bin";
};
};
tee {
description = "OP-TEE";
type = "tee";
arch = "arm64";
compression = "none";
os = "tee";
load = <0x9e800000>;
entry = <0x9e800000>;
tee-os {
filename = "tee-raw.bin";
};
};
dm {
description = "DM binary";
type = "firmware";
arch = "arm32";
compression = "none";
os = "DM";
load = <0x89000000>;
entry = <0x89000000>;
blob-ext {
filename = "ti-dm.bin";
};
};
spl {
description = "SPL (64-bit)";
type = "standalone";
os = "U-Boot";
arch = "arm64";
compression = "none";
load = <CONFIG_SPL_TEXT_BASE>;
entry = <CONFIG_SPL_TEXT_BASE>;
blob {
filename = "spl/u-boot-spl-nodtb.bin";
};
};
fdt-0 {
description = "k3-am625-verdin-wifi-dev";
type = "flat_dt";
arch = "arm";
compression = "none";
blob {
filename = SPL_VERDIN_AM62_DTB;
};
};
};
configurations {
default = "conf-0";
conf-0 {
description = "k3-am625-verdin-wifi-dev";
firmware = "atf";
loadables = "tee", "dm", "spl";
fdt = "fdt-0";
};
};
};
};
};
&binman {
u-boot_unsigned {
filename = "u-boot.img_unsigned";
pad-byte = <0xff>;
fit {
description = "FIT image with multiple configurations";
images {
uboot {
description = "U-Boot for AM625 board";
type = "firmware";
os = "u-boot";
arch = "arm";
compression = "none";
load = <CONFIG_TEXT_BASE>;
blob {
filename = UBOOT_NODTB;
};
hash {
algo = "crc32";
};
};
fdt-0 {
description = "k3-am625-verdin-wifi-dev";
type = "flat_dt";
arch = "arm";
compression = "none";
blob {
filename = VERDIN_AM62_DTB;
};
hash {
algo = "crc32";
};
};
};
configurations {
default = "conf-0";
conf-0 {
description = "k3-am625-verdin-wifi-dev";
firmware = "uboot";
loadables = "uboot";
fdt = "fdt-0";
};
};
};
};
};
#endif /* CONFIG_TARGET_VERDIN_AM62_A53 */

View File

@ -0,0 +1,201 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2023 Toradex
*/
#include "k3-am625-verdin-wifi-dev-binman.dtsi"
/ {
aliases {
eeprom0 = &eeprom_module;
eeprom1 = &eeprom_carrier_board;
eeprom2 = &eeprom_display_adapter;
};
chosen {
tick-timer = &main_timer0;
};
memory@80000000 {
bootph-pre-ram;
};
};
&cbass_main {
bootph-pre-ram;
timer@2400000 {
clock-frequency = <25000000>;
bootph-pre-ram;
};
};
&cbass_mcu {
bootph-pre-ram;
};
&cbass_wakeup {
bootph-pre-ram;
};
&chipid {
bootph-pre-ram;
};
&cpsw3g {
bootph-pre-ram;
};
&cpsw3g_phy0 {
bootph-pre-ram;
};
&cpsw3g_phy1 {
bootph-pre-ram;
};
&cpsw_port1 {
bootph-pre-ram;
};
&cpsw_port2 {
bootph-pre-ram;
};
/* MDIO, shared by Verdin ETH_1 (On-module PHY) and Verdin ETH_2_RGMII */
&cpsw3g_mdio {
/delete-property/ assigned-clocks;
/delete-property/ assigned-clock-parents;
/delete-property/ assigned-clock-rates;
bootph-pre-ram;
};
&dmsc {
bootph-pre-ram;
k3_sysreset: sysreset-controller {
compatible = "ti,sci-sysreset";
bootph-pre-ram;
};
};
&dmss {
bootph-pre-ram;
};
&fss {
bootph-pre-ram;
};
&k3_clks {
bootph-pre-ram;
};
&k3_pds {
bootph-pre-ram;
};
&k3_reset {
bootph-pre-ram;
};
&main_gpio0 {
bootph-pre-ram;
};
/* On-module I2C - PMIC_I2C */
&main_i2c0 {
eeprom_module: eeprom@50 {
compatible = "i2c-eeprom";
pagesize = <16>;
reg = <0x50>;
};
};
/* Verdin I2C_1 */
&main_i2c1 {
/* EEPROM on display adapter (MIPI DSI Display Adapter) */
eeprom_display_adapter: eeprom@50 {
compatible = "i2c-eeprom";
reg = <0x50>;
pagesize = <16>;
};
/* EEPROM on carrier board */
eeprom_carrier_board: eeprom@57 {
compatible = "i2c-eeprom";
reg = <0x57>;
pagesize = <16>;
};
};
&main_pmx0 {
bootph-pre-ram;
};
/* Verdin UART_3, used as the Linux console */
&main_uart0 {
bootph-pre-ram;
};
/* Verdin UART_1 */
&main_uart1 {
bootph-pre-ram;
};
&mcu_pmx0 {
bootph-pre-ram;
};
&pinctrl_ctrl_sleep_moci {
bootph-pre-ram;
};
&pinctrl_i2c0 {
bootph-pre-ram;
};
&pinctrl_i2c1 {
bootph-pre-ram;
};
&pinctrl_sdhci0 {
bootph-pre-ram;
};
&pinctrl_uart0 {
bootph-pre-ram;
};
&pinctrl_uart1 {
bootph-pre-ram;
};
&pinctrl_wkup_uart0 {
bootph-pre-ram;
};
&sdhci0 {
bootph-pre-ram;
};
&sdhci2 {
status = "disabled";
};
&secure_proxy_main {
bootph-pre-ram;
};
&verdin_ctrl_sleep_moci {
bootph-pre-ram;
};
&wkup_conf {
bootph-pre-ram;
};
/* Verdin UART_2 */
&wkup_uart0 {
bootph-pre-ram;
};

View File

@ -0,0 +1,22 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2023 Toradex
*
* https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
* https://www.toradex.com/products/carrier-board/verdin-development-board-kit
*/
/dts-v1/;
#include "k3-am625.dtsi"
#include "k3-am62-verdin.dtsi"
#include "k3-am62-verdin-wifi.dtsi"
#include "k3-am62-verdin-dev.dtsi"
/ {
model = "Toradex Verdin AM62 WB on Verdin Development Board";
compatible = "toradex,verdin-am62-wifi-dev",
"toradex,verdin-am62-wifi",
"toradex,verdin-am62",
"ti,am625";
};

View File

@ -194,4 +194,5 @@ source "board/ti/am62ax/Kconfig"
source "board/ti/j721e/Kconfig"
source "board/siemens/iot2050/Kconfig"
source "board/ti/j721s2/Kconfig"
source "board/toradex/verdin-am62/Kconfig"
endif

View File

@ -0,0 +1,82 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright 2023 Toradex
#
choice
prompt "Toradex Verdin AM62 based boards"
optional
config TARGET_VERDIN_AM62_A53
bool "Toradex Verdin AM62 running on A53"
select ARM64
select BINMAN
config TARGET_VERDIN_AM62_R5
bool "Toradex Verdin AM62 running on R5"
select CPU_V7R
select SYS_THUMB_BUILD
select K3_LOAD_SYSFW
select RAM
select SPL_RAM
select K3_DDRSS
select BINMAN
imply SYS_K3_SPL_ATF
endchoice
if TARGET_VERDIN_AM62_A53
config SYS_BOARD
default "verdin-am62"
config SYS_CONFIG_NAME
default "verdin-am62"
config SYS_VENDOR
default "toradex"
config TDX_CFG_BLOCK
default y
config TDX_CFG_BLOCK_2ND_ETHADDR
default y
config TDX_CFG_BLOCK_DEV
default "0"
config TDX_CFG_BLOCK_EXTRA
default y
# Toradex config block in eMMC, at the end of 1st "boot sector"
config TDX_CFG_BLOCK_OFFSET
default "-512"
config TDX_CFG_BLOCK_PART
default "1"
config TDX_HAVE_EEPROM_EXTRA
default y
config TDX_HAVE_MMC
default y
source "board/toradex/common/Kconfig"
endif
if TARGET_VERDIN_AM62_R5
config SPL_LDSCRIPT
default "arch/arm/mach-omap2/u-boot-spl.lds"
config SYS_BOARD
default "verdin-am62"
config SYS_CONFIG_NAME
default "verdin-am62"
config SYS_VENDOR
default "toradex"
endif

View File

@ -0,0 +1,17 @@
Verdin AM62
F: arch/arm/dts/k3-am625-verdin-lpddr4-1600MTs.dtsi
F: arch/arm/dts/k3-am625-verdin-r5.dts
F: arch/arm/dts/k3-am625-verdin-wifi-dev.dts
F: arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
F: arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
F: arch/arm/dts/k3-am62-verdin-dev.dtsi
F: arch/arm/dts/k3-am62-verdin.dtsi
F: arch/arm/dts/k3-am62-verdin-wifi.dtsi
F: board/toradex/verdin-am62/
F: configs/verdin-am62_a53_defconfig
F: configs/verdin-am62_r5_defconfig
F: doc/board/toradex/verdin-am62.rst
F: include/configs/verdin-am62.h
M: Marcel Ziswiler <marcel.ziswiler@toradex.com>
S: Maintained
W: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am-62

View File

@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright 2023 Toradex
#
obj-y += verdin-am62.o

View File

@ -0,0 +1,36 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
#
# Board configuration for AM62
#
---
board-cfg:
rev:
boardcfg_abi_maj : 0x0
boardcfg_abi_min : 0x1
control:
subhdr:
magic: 0xC1D3
size: 7
main_isolation_enable : 0x5A
main_isolation_hostid : 0x2
secproxy:
subhdr:
magic: 0x1207
size: 7
scaling_factor : 0x1
scaling_profile : 0x1
disable_main_nav_secure_proxy : 0
msmc:
subhdr:
magic: 0xA5C3
size: 5
msmc_cache_size : 0x0
debug_cfg:
subhdr:
magic: 0x020C
size: 8
trace_dst_enables : 0x00
trace_src_enables : 0x00

View File

@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
#
# Power management configuration for AM62
#
---
pm-cfg:
rev:
boardcfg_abi_maj : 0x0
boardcfg_abi_min : 0x1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,379 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
#
# Security management configuration for AM62
#
---
sec-cfg:
rev:
boardcfg_abi_maj : 0x0
boardcfg_abi_min : 0x1
processor_acl_list:
subhdr:
magic: 0xF1EA
size: 164
proc_acl_entries:
- #1
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #2
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #3
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #4
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #5
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #6
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #7
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #8
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #9
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #10
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #11
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #12
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #13
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #14
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #15
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #16
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #17
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #18
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #19
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #20
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #21
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #22
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #23
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #24
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #25
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #26
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #27
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #28
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #29
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #30
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #31
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
- #32
processor_id: 0
proc_access_master: 0
proc_access_secondary: [0, 0, 0]
host_hierarchy:
subhdr:
magic: 0x8D27
size: 68
host_hierarchy_entries:
- #1
host_id: 0
supervisor_host_id: 0
- #2
host_id: 0
supervisor_host_id: 0
- #3
host_id: 0
supervisor_host_id: 0
- #4
host_id: 0
supervisor_host_id: 0
- #5
host_id: 0
supervisor_host_id: 0
- #6
host_id: 0
supervisor_host_id: 0
- #7
host_id: 0
supervisor_host_id: 0
- #8
host_id: 0
supervisor_host_id: 0
- #9
host_id: 0
supervisor_host_id: 0
- #10
host_id: 0
supervisor_host_id: 0
- #11
host_id: 0
supervisor_host_id: 0
- #12
host_id: 0
supervisor_host_id: 0
- #13
host_id: 0
supervisor_host_id: 0
- #14
host_id: 0
supervisor_host_id: 0
- #15
host_id: 0
supervisor_host_id: 0
- #16
host_id: 0
supervisor_host_id: 0
- #17
host_id: 0
supervisor_host_id: 0
- #18
host_id: 0
supervisor_host_id: 0
- #19
host_id: 0
supervisor_host_id: 0
- #20
host_id: 0
supervisor_host_id: 0
- #21
host_id: 0
supervisor_host_id: 0
- #22
host_id: 0
supervisor_host_id: 0
- #23
host_id: 0
supervisor_host_id: 0
- #24
host_id: 0
supervisor_host_id: 0
- #25
host_id: 0
supervisor_host_id: 0
- #26
host_id: 0
supervisor_host_id: 0
- #27
host_id: 0
supervisor_host_id: 0
- #28
host_id: 0
supervisor_host_id: 0
- #29
host_id: 0
supervisor_host_id: 0
- #30
host_id: 0
supervisor_host_id: 0
- #31
host_id: 0
supervisor_host_id: 0
- #32
host_id: 0
supervisor_host_id: 0
otp_config:
subhdr:
magic: 0x4081
size: 69
write_host_id : 0
otp_entry:
- #1
host_id: 0
host_perms: 0
- #2
host_id: 0
host_perms: 0
- #3
host_id: 0
host_perms: 0
- #4
host_id: 0
host_perms: 0
- #5
host_id: 0
host_perms: 0
- #6
host_id: 0
host_perms: 0
- #7
host_id: 0
host_perms: 0
- #8
host_id: 0
host_perms: 0
- #9
host_id: 0
host_perms: 0
- #10
host_id: 0
host_perms: 0
- #11
host_id: 0
host_perms: 0
- #12
host_id: 0
host_perms: 0
- #13
host_id: 0
host_perms: 0
- #14
host_id: 0
host_perms: 0
- #15
host_id: 0
host_perms: 0
- #16
host_id: 0
host_perms: 0
- #17
host_id: 0
host_perms: 0
- #18
host_id: 0
host_perms: 0
- #19
host_id: 0
host_perms: 0
- #20
host_id: 0
host_perms: 0
- #21
host_id: 0
host_perms: 0
- #22
host_id: 0
host_perms: 0
- #23
host_id: 0
host_perms: 0
- #24
host_id: 0
host_perms: 0
- #25
host_id: 0
host_perms: 0
- #26
host_id: 0
host_perms: 0
- #27
host_id: 0
host_perms: 0
- #28
host_id: 0
host_perms: 0
- #29
host_id: 0
host_perms: 0
- #30
host_id: 0
host_perms: 0
- #31
host_id: 0
host_perms: 0
- #32
host_id: 0
host_perms: 0
dkek_config:
subhdr:
magic: 0x5170
size: 12
allowed_hosts: [128, 0, 0, 0]
allow_dkek_export_tisci : 0x5A
rsvd: [0, 0, 0]
sa2ul_cfg:
subhdr:
magic: 0x23BE
size : 0
auth_resource_owner: 0
enable_saul_psil_global_config_writes: 0x5A
rsvd: [0, 0]
sec_dbg_config:
subhdr:
magic: 0x42AF
size: 16
allow_jtag_unlock : 0x5A
allow_wildcard_unlock : 0x5A
allowed_debug_level_rsvd: 0
rsvd: 0
min_cert_rev : 0x0
jtag_unlock_hosts: [0, 0, 0, 0]
sec_handover_cfg:
subhdr:
magic: 0x608F
size: 10
handover_msg_sender : 0
handover_to_host_id : 0
rsvd: [0, 0, 0, 0]

View File

@ -0,0 +1,131 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Board specific initialization for Verdin AM62 SoM
*
* Copyright 2023 Toradex - https://www.toradex.com/
*
*/
#include <asm/arch/hardware.h>
#include <asm/io.h>
#include <dm/uclass.h>
#include <env.h>
#include <fdt_support.h>
#include <init.h>
#include <k3-ddrss.h>
#include <spl.h>
#include "../common/tdx-cfg-block.h"
DECLARE_GLOBAL_DATA_PTR;
int board_init(void)
{
return 0;
}
int dram_init(void)
{
gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, CFG_SYS_SDRAM_SIZE);
if (gd->ram_size < SZ_64M)
puts("## WARNING: Less than 64MB RAM detected\n");
return 0;
}
/*
* Avoid relocated U-Boot clash with Linux reserved-memory on 512 MB SoM
*/
phys_size_t board_get_usable_ram_top(phys_size_t total_size)
{
return 0x9C000000;
}
#if defined(CONFIG_SPL_LOAD_FIT)
int board_fit_config_name_match(const char *name)
{
return 0;
}
#endif
#if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
{
return ft_common_board_setup(blob, bd);
}
#endif
static void select_dt_from_module_version(void)
{
char variant[32];
char *env_variant = env_get("variant");
int is_wifi = 0;
if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK)) {
/*
* If we have a valid config block and it says we are a module with
* Wi-Fi/Bluetooth make sure we use the -wifi device tree.
*/
is_wifi = (tdx_hw_tag.prodid == VERDIN_AM62Q_WIFI_BT_IT) ||
(tdx_hw_tag.prodid == VERDIN_AM62S_512MB_WIFI_BT_IT) ||
(tdx_hw_tag.prodid == VERDIN_AM62D_1G_WIFI_BT_IT) ||
(tdx_hw_tag.prodid == VERDIN_AM62Q_2G_WIFI_BT_IT);
}
if (is_wifi)
strlcpy(&variant[0], "wifi", sizeof(variant));
else
strlcpy(&variant[0], "nonwifi", sizeof(variant));
if (strcmp(variant, env_variant)) {
printf("Setting variant to %s\n", variant);
env_set("variant", variant);
}
}
int board_late_init(void)
{
select_dt_from_module_version();
return 0;
}
#define CTRLMMR_USB0_PHY_CTRL 0x43004008
#define CTRLMMR_USB1_PHY_CTRL 0x43004018
#define CORE_VOLTAGE 0x80000000
#define MCU_CTRL_LFXOSC_32K_BYPASS_VAL BIT(4)
#ifdef CONFIG_SPL_BOARD_INIT
void spl_board_init(void)
{
u32 val;
/* Set USB0 PHY core voltage to 0.85V */
val = readl(CTRLMMR_USB0_PHY_CTRL);
val &= ~(CORE_VOLTAGE);
writel(val, CTRLMMR_USB0_PHY_CTRL);
/* Set USB1 PHY core voltage to 0.85V */
val = readl(CTRLMMR_USB1_PHY_CTRL);
val &= ~(CORE_VOLTAGE);
writel(val, CTRLMMR_USB1_PHY_CTRL);
/* We use the 32k FOUT from the Epson RX8130CE RTC chip */
/* In WKUP_LFOSC0 clear the power down bit and set the bypass bit
* The bypass bit is required as we provide a CMOS clock signal and
* the power down seems to be required also in the bypass case
* despite of the datasheet stating otherwise
*/
/* Compare with the AM62 datasheet,
* Table 7-21. LFXOSC Modes of Operation
*/
val = readl(MCU_CTRL_LFXOSC_CTRL);
val &= ~MCU_CTRL_LFXOSC_32K_DISABLE_VAL;
val |= MCU_CTRL_LFXOSC_32K_BYPASS_VAL;
writel(val, MCU_CTRL_LFXOSC_CTRL);
/* Make sure to mux up to take the SoC 32k from the LFOSC input */
writel(MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL,
MCU_CTRL_DEVICE_CLKOUT_32K_CTRL);
}
#endif

View File

@ -0,0 +1,187 @@
CONFIG_ARM=y
CONFIG_SKIP_LOWLEVEL_INIT=y
CONFIG_ARCH_K3=y
CONFIG_TI_SECURE_DEVICE=y
CONFIG_SYS_MALLOC_LEN=0x2000000
CONFIG_SYS_MALLOC_F_LEN=0x8000
CONFIG_SPL_GPIO=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=2
CONFIG_SOC_K3_AM625=y
CONFIG_K3_ATF_LOAD_ADDR=0x9e780000
CONFIG_TARGET_VERDIN_AM62_A53=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="k3-am625-verdin-wifi-dev"
CONFIG_SPL_TEXT_BASE=0x80080000
CONFIG_SYS_PROMPT="Verdin AM62 # "
CONFIG_DM_RESET=y
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL_SIZE_LIMIT=0x40000
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x800
CONFIG_SPL_FS_FAT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SYS_LOAD_ADDR=0x88200000
CONFIG_SYS_MEMTEST_START=0x80000000
CONFIG_SYS_MEMTEST_END=0xB0000000
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY=y
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTDELAY=1
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile k3-am625-verdin-${variant}-${fdt_board}.dtb"
CONFIG_LOG=y
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_BOARD_LATE_INIT=y
CONFIG_SPL_MAX_SIZE=0x58000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x80c80000
CONFIG_SPL_BSS_MAX_SIZE=0x80000
CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y
CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_SYS_MALLOC_SIMPLE=y
CONFIG_SPL_STACK_R=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400
CONFIG_SPL_DMA=y
CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
CONFIG_SPL_I2C=y
CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_SUPPORT=y
CONFIG_SPL_RAM_DEVICE=y
CONFIG_SPL_THERMAL=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_SYS_MAXARGS=64
CONFIG_SYS_BOOTM_LEN=0x40000000
CONFIG_CMD_ADTIMG=y
CONFIG_CMD_ASKENV=y
# CONFIG_CMD_EXPORTENV is not set
CONFIG_CRC32_VERIFY=y
CONFIG_CMD_MD5SUM=y
CONFIG_MD5SUM_VERIFY=y
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_BCB=y
CONFIG_CMD_CLK=y
CONFIG_CMD_DM=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_READ=y
CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_BOOTCOUNT=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_UUID=y
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
CONFIG_CMD_EXT4_WRITE=y
# CONFIG_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="eth0"
CONFIG_VERSION_VARIABLE=y
CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
CONFIG_SYSCON=y
CONFIG_SPL_SYSCON=y
CONFIG_SPL_OF_TRANSLATE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_CLK_TI_SCI=y
CONFIG_DMA_CHANNELS=y
CONFIG_TI_K3_NAVSS_UDMA=y
CONFIG_TI_SCI_PROTOCOL=y
CONFIG_GPIO_HOG=y
CONFIG_SPL_GPIO_HOG=y
CONFIG_SPL_DM_GPIO_LOOKUP_LABEL=y
CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_I2C_GPIO=y
CONFIG_SYS_I2C_OMAP24XX=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_DM_MAILBOX=y
CONFIG_K3_SEC_PROXY=y
CONFIG_I2C_EEPROM=y
CONFIG_SPL_I2C_EEPROM=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_IO_VOLTAGE=y
CONFIG_SPL_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_SPL_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ADMA=y
CONFIG_SPL_MMC_SDHCI_ADMA=y
CONFIG_MMC_SDHCI_AM654=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_PHY_TI_DP83867=y
CONFIG_PHY_ETHERNET_ID=y
CONFIG_PHY_FIXED=y
CONFIG_DM_MDIO=y
CONFIG_DM_ETH_PHY=y
CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_TI_AM65_CPSW_NUSS=y
CONFIG_PHY=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_SCI_POWER_DOMAIN=y
CONFIG_DM_PMIC=y
CONFIG_PMIC_TPS65219=y
CONFIG_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_DM_REGULATOR_GPIO=y
CONFIG_DM_REGULATOR_TPS65219=y
CONFIG_K3_SYSTEM_CONTROLLER=y
CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y
CONFIG_SOC_TI=y
CONFIG_SYSRESET=y
CONFIG_SPL_SYSRESET=y
CONFIG_SYSRESET_TI_SCI=y
CONFIG_DM_THERMAL=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_HEXDUMP=y

View File

@ -0,0 +1,111 @@
CONFIG_ARM=y
CONFIG_ARCH_K3=y
CONFIG_TI_SECURE_DEVICE=y
CONFIG_SYS_MALLOC_LEN=0x08000000
CONFIG_SYS_MALLOC_F_LEN=0x9000
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=2
CONFIG_SOC_K3_AM625=y
CONFIG_TARGET_VERDIN_AM62_R5=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x43c3a7f0
CONFIG_ENV_SIZE=0x20000
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="k3-am625-verdin-r5"
CONFIG_SPL_TEXT_BASE=0x43c00000
CONFIG_DM_RESET=y
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
CONFIG_SPL_SIZE_LIMIT=0x3A7F0
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD=y
CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y
CONFIG_SPL_MAX_SIZE=0x3B000
CONFIG_SPL_PAD_TO=0x0
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x43c3b000
CONFIG_SPL_BSS_MAX_SIZE=0x3000
CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y
CONFIG_SPL_SYS_MALLOC_SIMPLE=y
CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x140000
CONFIG_SPL_SEPARATE_BSS=y
CONFIG_SYS_SPL_MALLOC=y
CONFIG_HAS_CUSTOM_SPL_MALLOC_START=y
CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x84000000
CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000
CONFIG_SPL_EARLY_BSS=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
CONFIG_SPL_I2C=y
CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_SUPPORT=y
CONFIG_SPL_RAM_DEVICE=y
CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_SPL_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
CONFIG_SPL_OF_TRANSLATE=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_SPL_CLK_CCF=y
CONFIG_SPL_CLK_K3_PLL=y
CONFIG_SPL_CLK_K3=y
CONFIG_TI_SCI_PROTOCOL=y
CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_OMAP24XX=y
CONFIG_DM_MAILBOX=y
CONFIG_K3_SEC_PROXY=y
CONFIG_SPL_MISC=y
CONFIG_ESM_K3=y
CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ADMA=y
CONFIG_SPL_MMC_SDHCI_ADMA=y
CONFIG_MMC_SDHCI_AM654=y
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_GENERIC is not set
CONFIG_SPL_PINCTRL=y
# CONFIG_SPL_PINCTRL_GENERIC is not set
CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y
CONFIG_SOC_TI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_LIB_RATIONAL=y
CONFIG_SPL_LIB_RATIONAL=y

View File

@ -54,7 +54,7 @@ Below is the pictorial representation of boot flow:
Sources:
--------
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_boot_sources
:end-before: .. k3_rst_include_end_boot_sources
@ -62,17 +62,17 @@ Build procedure:
----------------
0. Setup the environment variables:
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_common_env_vars_desc
:end-before: .. k3_rst_include_end_common_env_vars_desc
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_board_env_vars_desc
:end-before: .. k3_rst_include_end_board_env_vars_desc
Set the variables corresponding to this platform:
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_common_env_vars_defn
:end-before: .. k3_rst_include_end_common_env_vars_defn
.. code-block:: bash
@ -89,14 +89,14 @@ Set the variables corresponding to this platform:
1. Trusted Firmware-A:
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_tfa
:end-before: .. k3_rst_include_end_build_steps_tfa
2. OP-TEE:
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_optee
:end-before: .. k3_rst_include_end_build_steps_optee
@ -104,13 +104,13 @@ Set the variables corresponding to this platform:
* 4.1 R5:
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_spl_r5
:end-before: .. k3_rst_include_end_build_steps_spl_r5
* 4.2 A53:
.. include:: k3.rst
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_build_steps_uboot
:end-before: .. k3_rst_include_end_build_steps_uboot
.. am62x_evm_rst_include_end_build_steps

View File

@ -31,6 +31,7 @@ K3 Based SoCs
:maxdepth: 1
am62x_sk
../toradex/verdin-am62
am65x_evm
j7200_evm
j721e_evm

View File

@ -9,5 +9,6 @@ Toradex
apalis-imx8
colibri_imx7
colibri-imx8x
verdin-am62
verdin-imx8mm
verdin-imx8mp

View File

@ -0,0 +1,130 @@
.. SPDX-License-Identifier: GPL-2.0-or-later
.. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Verdin AM62 Module
==================
Quick Start
-----------
- Get the binary-only SYSFW
- Get binary-only TI Linux firmware
- Build the ARM trusted firmware binary
- Build the OPTEE binary
- Build U-Boot for the R5
- Build U-Boot for the A53
- Flash to eMMC
- Boot
For an overview of the TI AM62 SoC boot flow please head over to:
:doc:`../ti/am62x_sk`
Sources:
--------
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_boot_sources
:end-before: .. k3_rst_include_end_boot_sources
Build procedure:
----------------
0. Setup the environment variables:
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_common_env_vars_desc
:end-before: .. k3_rst_include_end_common_env_vars_desc
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_board_env_vars_desc
:end-before: .. k3_rst_include_end_board_env_vars_desc
Set the variables corresponding to this platform:
.. include:: ../ti/k3.rst
:start-after: .. k3_rst_include_start_common_env_vars_defn
:end-before: .. k3_rst_include_end_common_env_vars_defn
.. code-block:: bash
$ export UBOOT_CFG_CORTEXR=verdin-am62_r5_defconfig
$ export UBOOT_CFG_CORTEXA=verdin-am62_a53_defconfig
$ export TFA_BOARD=lite
$ # we dont use any extra TFA parameters
$ unset TFA_EXTRA_ARGS
$ export OPTEE_PLATFORM=k3-am62x
$ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
.. include:: ../ti/am62x_sk.rst
:start-after: .. am62x_evm_rst_include_start_build_steps
:end-before: .. am62x_evm_rst_include_end_build_steps
Flash to eMMC
-------------
.. code-block:: bash
=> mmc dev 0 1
=> fatload mmc 1 ${loadaddr} tiboot3.bin
=> mmc write ${loadaddr} 0x0 0x400
=> fatload mmc 1 ${loadaddr} tispl.bin
=> mmc write ${loadaddr} 0x400 0x1000
=> fatload mmc 1 ${loadaddr} u-boot.img
=> mmc write ${loadaddr} 0x1400 0x2000
Boot
----
Output:
.. code-block:: bash
U-Boot SPL 2023.10-rc1-00210-gb678170a34c (Aug 03 2023 - 00:09:14 +0200)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.1--v09.00.01 (Kool Koala)')
SPL initial stack usage: 13368 bytes
Trying to boot from MMC1
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...
NOTICE: BL31: v2.9(release):v2.9.0-73-g463655cc8
NOTICE: BL31: Built : 14:51:42, Jun 5 2023
I/TC:
I/TC: OP-TEE version: 3.21.0-168-g322cf9e33 (gcc version 12.2.1 20221205 (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24))) #2 Mon Jun 5 13:04:15 UTC 2023 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.1--v09.00.01 (Kool Koala)')
I/TC: HUK Initialized
I/TC: Primary CPU switching to normal world boot
U-Boot SPL 2023.10-rc1-00210-gb678170a34c (Aug 03 2023 - 00:09:41 +0200)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.1--v09.00.01 (Kool Koala)')
SPL initial stack usage: 1840 bytes
Trying to boot from MMC1
Authentication passed
Authentication passed
U-Boot 2023.10-rc1-00210-gb678170a34c (Aug 03 2023 - 00:09:41 +0200)
SoC: AM62X SR1.0 HS-FS
DRAM: 2 GiB
Core: 136 devices, 28 uclasses, devicetree: separate
MMC: mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from MMC... OK
In: serial@2800000
Out: serial@2800000
Err: serial@2800000
Model: Toradex 0076 Verdin AM62 Quad 2GB WB IT V1.0A
Serial#: 15037380
Carrier: Toradex Verdin Development Board V1.1A, Serial# 10754333
am65_cpsw_nuss ethernet@8000000: K3 CPSW: nuss_ver: 0x6BA01103 cpsw_ver: 0x6BA81103 ale_ver: 0x00290105 Ports:2 mdio_freq:1000000
Setting variant to wifi
Net:
Warning: ethernet@8000000port@1 MAC addresses don't match:
Address in ROM is 1c:63:49:22:5f:f9
Address in environment is 00:14:2d:e5:73:c4
eth0: ethernet@8000000port@1 [PRIME], eth1: ethernet@8000000port@2
Hit any key to stop autoboot: 0
Verdin AM62 #

View File

@ -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
#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 */