Merge https://source.denx.de/u-boot/custodians/u-boot-usb
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 06c46b6..2678e5a 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -2,7 +2,7 @@
windows_vm: windows-2019
ubuntu_vm: ubuntu-22.04
macos_vm: macOS-12
- ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230308-04Apr2023
+ ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230624-20Jul2023
# Add '-u 0' options for Azure pipelines, otherwise we get "permission
# denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
# since our $(ci_runner_image) user is not root.
@@ -123,7 +123,7 @@
options: $(container_option)
steps:
- script: |
- ./tools/buildman/buildman -R
+ ./tools/buildman/buildman --maintainer-check || exit 0
- job: tools_only
displayName: 'Ensure host tools build'
@@ -162,6 +162,7 @@
virtualenv -p /usr/bin/python3 /tmp/venv
. /tmp/venv/bin/activate
pip install -r test/py/requirements.txt
+ pip install -r tools/buildman/requirements.txt
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
@@ -194,7 +195,7 @@
ln -s /opt/nokia/libc6_2.5.1-1eglibc27+0m5_armel.deb nokia_rx51_tmp/
ln -s /opt/nokia/busybox_1.10.2.legal-1osso30+0m5_armel.deb nokia_rx51_tmp/
ln -s /opt/nokia/qemu-system-arm nokia_rx51_tmp/
- export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH
+ export PATH=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
test/nokia_rx51_test.sh
- job: pylint
@@ -209,6 +210,7 @@
git config --global --add safe.directory $(work_dir)
export USER=azure
pip install -r test/py/requirements.txt
+ pip install -r tools/buildman/requirements.txt
pip install asteval pylint==2.12.2 pyopenssl
export PATH=${PATH}:~/.local/bin
echo "[MASTER]" >> .pylintrc
@@ -404,6 +406,7 @@
if [ -n "${BUILD_ENV}" ]; then
export ${BUILD_ENV};
fi
+ pip install -r tools/buildman/requirements.txt
tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE}
cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/
cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/
@@ -460,6 +463,7 @@
fi
# Some tests using libguestfs-tools need the fuse device to run
docker run "$@" --device /dev/fuse:/dev/fuse -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh
+ retryCountOnTaskFailure: 2 # QEMU may be too slow, etc.
- stage: world_build
jobs:
@@ -506,7 +510,7 @@
imx:
BUILDMAN: "mx -x mx6,imx8,freescale,technexion,toradex"
imx8_imx9:
- BUILDMAN: "imx8 imx9"
+ BUILDMAN: "imx8 imx9 -x engicam,technexion,toradex"
keymile:
BUILDMAN: "keymile"
keystone2_keystone3:
@@ -563,10 +567,10 @@
BUILDMAN: "uniphier"
aarch64_catch_all:
BUILDMAN: "aarch64 -x amlogic,bcm,imx8,imx9,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
- rockchip_32bit:
- BUILDMAN: "rk -x aarch64"
- rockchip_64bit:
- BUILDMAN: "rk&aarch64"
+ rk_rv_non_rockchip:
+ BUILDMAN: "rk|rv -x rockchip"
+ rk_rv_and_rockchip:
+ BUILDMAN: "(rk|rv)&rockchip"
renesas:
BUILDMAN: "renesas"
zynq:
@@ -583,6 +587,7 @@
# make environment variables available as tests are running inside a container
export BUILDMAN="${BUILDMAN}"
git config --global --add safe.directory ${WORK_DIR}
+ pip install -r tools/buildman/requirements.txt
EOF
cat << "EOF" >> build.sh
if [[ "${BUILDMAN}" != "" ]]; then
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cfd5851..8010afa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,7 @@
# Grab our configured image. The source for this is found
# in the u-boot tree at tools/docker/Dockerfile
-image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20230308-04Apr2023
+image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20230624-20Jul2023
# We run some tests in different order, to catch some failures quicker.
stages:
@@ -20,6 +20,7 @@
.buildman_and_testpy_template: &buildman_and_testpy_dfn
stage: test.py
+ retry: 2 # QEMU may be too slow, etc.
before_script:
# Clone uboot-test-hooks
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
@@ -97,6 +98,7 @@
script:
- ret=0;
git config --global --add safe.directory "${CI_PROJECT_DIR}";
+ pip install -r tools/buildman/requirements.txt;
./tools/buildman/buildman -o /tmp -PEWM arm -x aarch64 || ret=$?;
if [[ $ret -ne 0 ]]; then
./tools/buildman/buildman -o /tmp -seP;
@@ -110,6 +112,7 @@
- . /tmp/venv/bin/activate
- ret=0;
git config --global --add safe.directory "${CI_PROJECT_DIR}";
+ pip install -r tools/buildman/requirements.txt;
./tools/buildman/buildman -o /tmp -PEWM aarch64 || ret=$?;
if [[ $ret -ne 0 ]]; then
./tools/buildman/buildman -o /tmp -seP;
@@ -184,7 +187,7 @@
Check for configs without MAINTAINERS entry:
stage: testsuites
script:
- - ./tools/buildman/buildman -R
+ - ./tools/buildman/buildman --maintainer-check || exit 0
# Ensure host tools build
Build tools-only:
@@ -208,6 +211,7 @@
virtualenv -p /usr/bin/python3 /tmp/venv;
. /tmp/venv/bin/activate;
pip install -r test/py/requirements.txt;
+ pip install -r tools/buildman/requirements.txt;
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl;
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
@@ -231,7 +235,7 @@
ln -s /opt/nokia/libc6_2.5.1-1eglibc27+0m5_armel.deb nokia_rx51_tmp/;
ln -s /opt/nokia/busybox_1.10.2.legal-1osso30+0m5_armel.deb nokia_rx51_tmp/;
ln -s /opt/nokia/qemu-system-arm nokia_rx51_tmp/;
- export PATH=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin:$PATH;
+ export PATH=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin:$PATH;
test/nokia_rx51_test.sh
# Check for any pylint regressions
@@ -240,6 +244,7 @@
script:
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
- pip install -r test/py/requirements.txt
+ - pip install -r tools/buildman/requirements.txt
- pip install asteval pylint==2.12.2 pyopenssl
- export PATH=${PATH}:~/.local/bin
- echo "[MASTER]" >> .pylintrc
diff --git a/.mailmap b/.mailmap
index 312a428..05cb310 100644
--- a/.mailmap
+++ b/.mailmap
@@ -65,8 +65,8 @@
Marek Vasut <marex@denx.de> <marek.vasut@gmail.com>
Marek Vasut <marex@denx.de> <marex at denx.de>
Markus Klotzbuecher <mk@denx.de>
-Masahiro Yamada <yamada.masahiro@socionext.com> <masahiroy@kernel.org>
-Masahiro Yamada <yamada.masahiro@socionext.com> <yamada.m@jp.panasonic.com>
+Masahiro Yamada <masahiroy@kernel.org> <yamada.masahiro@socionext.com>
+Masahiro Yamada <masahiroy@kernel.org> <yamada.m@jp.panasonic.com>
Michal Simek <michal.simek@amd.com> <Monstr@seznam.cz>
Michal Simek <michal.simek@amd.com> <michal.simek@xilinx.com>
Michal Simek <michal.simek@amd.com> <monstr@monstr.eu>
diff --git a/MAINTAINERS b/MAINTAINERS
index 87991cc..47581cf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -272,6 +272,7 @@
R: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-imx.git
+F: arch/Kconfig.nxp
F: arch/arm/cpu/arm1136/mx*/
F: arch/arm/cpu/arm926ejs/mx*/
F: arch/arm/cpu/armv7/vf610/
@@ -282,6 +283,7 @@
F: arch/arm/include/asm/arch-vf610/
F: arch/arm/include/asm/mach-imx/
F: board/freescale/*mx*/
+F: board/freescale/common/
F: drivers/serial/serial_mxc.c
ARM HISILICON
@@ -840,6 +842,13 @@
S: Maintained
F: tools/buildman/
+CAAM
+M: Gaurav Jain <gaurav.jain@nxp.com>
+S: Maintained
+F: arch/arm/dts/ls1021a-twr-u-boot.dtsi
+F: drivers/crypto/fsl/
+F: include/fsl_sec.h
+
CAT
M: Roger Knecht <rknecht@pm.me>
S: Maintained
@@ -867,6 +876,7 @@
T: git https://source.denx.de/u-boot/custodians/u-boot-coldfire.git
F: arch/m68k/
F: doc/arch/m68k.rst
+F: drivers/watchdog/mcf_wdt.c
CYCLIC
M: Stefan Roese <sr@denx.de>
@@ -1627,10 +1637,3 @@
F: configs/tools-only_defconfig
F: *
F: */
-
-CAAM
-M: Gaurav Jain <gaurav.jain@nxp.com>
-S: Maintained
-F: arch/arm/dts/ls1021a-twr-u-boot.dtsi
-F: drivers/crypto/fsl/
-F: include/fsl_sec.h
diff --git a/Makefile b/Makefile
index 87f9fc7..96c3f14 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0+
VERSION = 2023
-PATCHLEVEL = 07
+PATCHLEVEL = 10
SUBLEVEL =
-EXTRAVERSION =
+EXTRAVERSION = -rc1
NAME =
# *DOCUMENTATION*
@@ -2444,7 +2444,7 @@
cmd_genenv = \
$(objtree)/tools/printinitialenv | \
sed -e '/^\s*$$/d' | \
- sort --field-separator='=' -k1,1 --stable -o $@
+ sort -t '=' -k 1,1 -s -o $@
u-boot-initial-env: $(env_h) FORCE
$(Q)$(MAKE) $(build)=tools $(objtree)/tools/printinitialenv
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b3115b0..97c25b4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -357,7 +357,7 @@
choice
prompt "Select the ARM data write cache policy"
- default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMCYGNUS || TARGET_BCMNS || RZA1
+ default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMNS || RZA1
default SYS_ARM_CACHE_WRITEBACK
config SYS_ARM_CACHE_WRITEBACK
@@ -668,19 +668,6 @@
select CPU_V7A
select PL011_SERIAL
-config TARGET_BCMCYGNUS
- bool "Support bcmcygnus"
- select CPU_V7A
- select GPIO_EXTRA_HEADER
- select IPROC
- imply BCM_SF2_ETH
- imply BCM_SF2_ETH_GMAC
- imply CMD_HASH
- imply CRC32_VERIFY
- imply FAT_WRITE
- imply HASH_VERIFY
- imply NETDEVICES
-
config TARGET_BCMNS
bool "Support Broadcom Northstar"
select CPU_V7A
@@ -798,6 +785,8 @@
select SPL
select SUPPORT_SPL
select FIT
+ select REGEX
+ select FIT_SIGNATURE if ARM64
config ARCH_OMAP2PLUS
bool "TI OMAP2+"
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 07b26df..b7780de 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -416,6 +416,9 @@
xilinx-versal-virt.dtb
dtb-$(CONFIG_ARCH_VERSAL_NET) += \
versal-net-mini.dtb \
+ versal-net-mini-emmc.dtb \
+ versal-net-mini-ospi-single.dtb \
+ versal-net-mini-qspi-single.dtb \
xilinx-versal-net-virt.dtb
dtb-$(CONFIG_ARCH_ZYNQMP_R5) += \
zynqmp-r5.dtb
@@ -1303,7 +1306,7 @@
dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \
k3-am625-r5-sk.dtb
-dtb-$(CONFIG_SOC_K3_AM625) += k3-am62a7-sk.dtb \
+dtb-$(CONFIG_SOC_K3_AM62A7) += k3-am62a7-sk.dtb \
k3-am62a7-r5-sk.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += \
diff --git a/arch/arm/dts/avnet-ultra96-rev1.dts b/arch/arm/dts/avnet-ultra96-rev1.dts
index ddb8feb..96a6403 100644
--- a/arch/arm/dts/avnet-ultra96-rev1.dts
+++ b/arch/arm/dts/avnet-ultra96-rev1.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2018 - 2020, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/k3-am625-r5-sk.dts b/arch/arm/dts/k3-am625-r5-sk.dts
index 78df7ce..3ec5bad 100644
--- a/arch/arm/dts/k3-am625-r5-sk.dts
+++ b/arch/arm/dts/k3-am625-r5-sk.dts
@@ -9,6 +9,7 @@
#include "k3-am62-ddr.dtsi"
#include "k3-am625-sk-u-boot.dtsi"
+#include "k3-am625-sk-binman.dtsi"
/ {
aliases {
diff --git a/arch/arm/dts/k3-am625-sk-binman.dtsi b/arch/arm/dts/k3-am625-sk-binman.dtsi
new file mode 100644
index 0000000..a35d641
--- /dev/null
+++ b/arch/arm/dts/k3-am625-sk-binman.dtsi
@@ -0,0 +1,463 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+
+#ifdef CONFIG_TARGET_AM625_R5_EVM
+
+&binman {
+ tiboot3-am62x-hs-evm.bin {
+ filename = "tiboot3-am62x-hs-evm.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-evm.bin {
+ filename = "tiboot3-am62x-hs-fs-evm.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-evm.bin {
+ filename = "tiboot3-am62x-gp-evm.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
+
+#ifdef CONFIG_TARGET_AM625_A53_EVM
+
+#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
+#define SPL_AM625_SK_DTB "spl/dts/k3-am625-sk.dtb"
+
+#define UBOOT_NODTB "u-boot-nodtb.bin"
+#define AM625_SK_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-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_am625_sk_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_am625_sk_dtb: blob-ext {
+ filename = SPL_AM625_SK_DTB;
+ };
+
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am625-sk";
+ 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-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&am625_sk_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ am625_sk_dtb: blob-ext {
+ filename = AM625_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am625-sk";
+ 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-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_AM625_SK_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am625-sk";
+ 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-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = AM625_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am625-sk";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+ };
+ };
+ };
+};
+#endif
diff --git a/arch/arm/dts/k3-am625-sk-u-boot.dtsi b/arch/arm/dts/k3-am625-sk-u-boot.dtsi
index 2491557..a60c37f 100644
--- a/arch/arm/dts/k3-am625-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-sk-u-boot.dtsi
@@ -4,6 +4,8 @@
* Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include "k3-am625-sk-binman.dtsi"
+
/ {
chosen {
stdout-path = "serial2:115200n8";
diff --git a/arch/arm/dts/k3-am62a-sk-binman.dtsi b/arch/arm/dts/k3-am62a-sk-binman.dtsi
new file mode 100644
index 0000000..de09430
--- /dev/null
+++ b/arch/arm/dts/k3-am62a-sk-binman.dtsi
@@ -0,0 +1,466 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+
+#ifdef CONFIG_TARGET_AM62A7_R5_EVM
+
+&rcfg_yaml_tifs {
+ config = "tifs-rm-cfg.yaml";
+};
+
+&binman {
+ tiboot3-am62ax-hs-evm.bin {
+ filename = "tiboot3-am62ax-hs-evm.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-am62ax-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-am62ax-hs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+ combined_dm_cfg: combined-dm-cfg.bin {
+ filename = "combined-dm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+};
+
+&binman {
+ tiboot3-am62ax-hs-fs-evm.bin {
+ filename = "tiboot3-am62ax-hs-fs-evm.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-am62ax-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-am62ax-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-am62ax-gp-evm.bin {
+ filename = "tiboot3-am62ax-gp-evm.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-am62ax-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
+
+#ifdef CONFIG_TARGET_AM62A7_A53_EVM
+
+#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
+#define SPL_AM62A7_SK_DTB "spl/dts/k3-am62a7-sk.dtb"
+
+#define UBOOT_NODTB "u-boot-nodtb.bin"
+#define AM62A7_SK_DTB "u-boot.dtb"
+
+&binman {
+ ti-dm {
+ filename = "ti-dm.bin";
+ blob-ext {
+ filename = "ti-dm/am62axx/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-am62a7-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_am62a7_sk_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_am62a7_sk_dtb: blob-ext {
+ filename = SPL_AM62A7_SK_DTB;
+ };
+
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am62a7-sk";
+ 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 AM62Ax 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-am62a7-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&am62a7_sk_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ am62a7_sk_dtb: blob-ext {
+ filename = AM62A7_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am62a7-sk";
+ 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-am62a7-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_AM62A7_SK_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am62a7-sk";
+ 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 AM62Ax 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-am62a7-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = AM62A7_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am62a7-sk";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+ };
+ };
+ };
+};
+#endif
diff --git a/arch/arm/dts/k3-am62a7-r5-sk.dts b/arch/arm/dts/k3-am62a7-r5-sk.dts
index cc4b179..bbbd9e5 100644
--- a/arch/arm/dts/k3-am62a7-r5-sk.dts
+++ b/arch/arm/dts/k3-am62a7-r5-sk.dts
@@ -7,6 +7,7 @@
#include "k3-am62a7-sk.dts"
#include "k3-am62a-ddr-1866mhz-32bit.dtsi"
#include "k3-am62a-ddr.dtsi"
+#include "k3-am62a-sk-binman.dtsi"
#include "k3-am62a7-sk-u-boot.dtsi"
diff --git a/arch/arm/dts/k3-am62a7-sk.dts b/arch/arm/dts/k3-am62a7-sk.dts
index b08a083..270e669 100644
--- a/arch/arm/dts/k3-am62a7-sk.dts
+++ b/arch/arm/dts/k3-am62a7-sk.dts
@@ -10,6 +10,7 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
#include "k3-am62a7.dtsi"
+#include "k3-am62a-sk-binman.dtsi"
/ {
compatible = "ti,am62a7-sk", "ti,am62a7";
diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
index 64857b0..73577e8 100644
--- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi
+++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi
@@ -3,6 +3,8 @@
* Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include "k3-am64x-binman.dtsi"
+
/ {
chosen {
stdout-path = "serial2:115200n8";
diff --git a/arch/arm/dts/k3-am642-r5-evm.dts b/arch/arm/dts/k3-am642-r5-evm.dts
index e870492..b490641 100644
--- a/arch/arm/dts/k3-am642-r5-evm.dts
+++ b/arch/arm/dts/k3-am642-r5-evm.dts
@@ -8,6 +8,7 @@
#include "k3-am642.dtsi"
#include "k3-am64-evm-ddr4-1600MTs.dtsi"
#include "k3-am64-ddr.dtsi"
+#include "k3-am64x-binman.dtsi"
/ {
chosen {
diff --git a/arch/arm/dts/k3-am642-sk-u-boot.dtsi b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
index 69dbe94..3d6be02 100644
--- a/arch/arm/dts/k3-am642-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
@@ -3,6 +3,8 @@
* Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include "k3-am64x-binman.dtsi"
+
/ {
chosen {
stdout-path = "serial2:115200n8";
diff --git a/arch/arm/dts/k3-am64x-binman.dtsi b/arch/arm/dts/k3-am64x-binman.dtsi
new file mode 100644
index 0000000..a5e5400
--- /dev/null
+++ b/arch/arm/dts/k3-am64x-binman.dtsi
@@ -0,0 +1,515 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+
+#include "k3-binman.dtsi"
+
+#ifdef CONFIG_TARGET_AM642_R5_EVM
+
+&binman {
+ tiboot3-am64x_sr2-hs-evm.bin {
+ filename = "tiboot3-am64x_sr2-hs-evm.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl>, <&ti_sci_enc>,
+ <&combined_sysfw_cfg>, <&sysfw_inner_cert>;
+ combined;
+ sysfw-inner-cert;
+ keyfile = "custMpk.pem";
+ sw-rev = <1>;
+ content-sbl = <&u_boot_spl>;
+ content-sysfw = <&ti_sci_enc>;
+ content-sysfw-data = <&combined_sysfw_cfg>;
+ content-sysfw-inner-cert = <&sysfw_inner_cert>;
+ load = <0x70000000>;
+ load-sysfw = <0x44000>;
+ load-sysfw-data = <0x7b000>;
+ };
+ u_boot_spl: u-boot-spl {
+ no-expanded;
+ };
+ ti_sci_enc: ti-fs-enc.bin {
+ filename = "ti-sysfw/ti-sci-firmware-am64x_sr2-hs-enc.bin";
+ type = "blob-ext";
+ optional;
+ };
+ combined_sysfw_cfg: combined-sysfw-cfg.bin {
+ filename = "combined-sysfw-cfg.bin";
+ type = "blob-ext";
+ };
+ sysfw_inner_cert: sysfw-inner-cert {
+ filename = "ti-sysfw/ti-sci-firmware-am64x_sr2-hs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+
+ };
+};
+
+&binman {
+ tiboot3-am64x_sr2-hs-fs-evm.bin {
+ filename = "tiboot3-am64x_sr2-hs-fs-evm.bin";
+ symlink = "tiboot3.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl_fs>, <&ti_sci_enc_fs>,
+ <&combined_sysfw_cfg_fs>, <&sysfw_inner_cert_fs>;
+ combined;
+ sysfw-inner-cert;
+ keyfile = "custMpk.pem";
+ sw-rev = <1>;
+ content-sbl = <&u_boot_spl_fs>;
+ content-sysfw = <&ti_sci_enc_fs>;
+ content-sysfw-data = <&combined_sysfw_cfg_fs>;
+ content-sysfw-inner-cert = <&sysfw_inner_cert_fs>;
+ load = <0x70000000>;
+ load-sysfw = <0x44000>;
+ load-sysfw-data = <0x7b000>;
+ };
+ u_boot_spl_fs: u-boot-spl {
+ no-expanded;
+ };
+ ti_sci_enc_fs: ti-fs-enc.bin {
+ filename = "ti-sysfw/ti-sci-firmware-am64x_sr2-hs-fs-enc.bin";
+ type = "blob-ext";
+ optional;
+ };
+ combined_sysfw_cfg_fs: combined-sysfw-cfg.bin {
+ filename = "combined-sysfw-cfg.bin";
+ type = "blob-ext";
+ };
+ sysfw_inner_cert_fs: sysfw-inner-cert {
+ filename = "ti-sysfw/ti-sci-firmware-am64x_sr2-hs-fs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+
+ };
+};
+
+&binman {
+ tiboot3-am64x-gp-evm.bin {
+ filename = "tiboot3-am64x-gp-evm.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl_unsigned>, <&ti_sci_gp>, <&combined_sysfw_cfg_gp>;
+ combined;
+ content-sbl = <&u_boot_spl_unsigned>;
+ load = <0x70000000>;
+ content-sysfw = <&ti_sci_gp>;
+ load-sysfw = <0x44000>;
+ content-sysfw-data = <&combined_sysfw_cfg_gp>;
+ load-sysfw-data = <0x7b000>;
+ sw-rev = <1>;
+ keyfile = "ti-degenerate-key.pem";
+ };
+ u_boot_spl_unsigned: u-boot-spl {
+ no-expanded;
+ };
+ ti_sci_gp: ti-sci-gp.bin {
+ filename = "ti-sysfw/ti-sci-firmware-am64x-gp.bin";
+ type = "blob-ext";
+ optional;
+ };
+ combined_sysfw_cfg_gp: combined-sysfw-cfg-gp.bin {
+ filename = "combined-sysfw-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+};
+
+#endif
+
+#ifdef CONFIG_TARGET_AM642_A53_EVM
+
+#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
+#define SPL_AM642_EVM_DTB "spl/dts/k3-am642-evm.dtb"
+#define SPL_AM642_SK_DTB "spl/dts/k3-am642-sk.dtb"
+
+#define UBOOT_NODTB "u-boot-nodtb.bin"
+#define AM642_EVM_DTB "u-boot.dtb"
+#define AM642_SK_DTB "arch/arm/dts/k3-am642-sk.dtb"
+
+&binman {
+ 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>;
+ blob-ext {
+ filename = "/dev/null";
+ };
+ };
+
+ 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-am642-evm";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_am64x_evm_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_am64x_evm_dtb: blob-ext {
+ filename = SPL_AM642_EVM_DTB;
+ };
+
+ };
+
+ fdt-1 {
+ description = "k3-am642-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_am64x_sk_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_am64x_sk_dtb: blob-ext {
+ filename = SPL_AM642_SK_DTB;
+ };
+
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am642-evm";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-am642-sk";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&binman {
+ u-boot {
+ filename = "u-boot.img";
+ pad-byte = <0xff>;
+
+ fit {
+ description = "FIT image with multiple configurations";
+
+ images {
+ uboot {
+ description = "U-Boot for AM64 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-am642-evm";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&am64x_evm_dtb>;
+ keyfile = "custMpk.pem";
+
+ };
+ am64x_evm_dtb: blob-ext {
+ filename = AM642_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ fdt-1 {
+ description = "k3-am642-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&am64x_sk_dtb>;
+ keyfile = "custMpk.pem";
+
+ };
+ am64x_sk_dtb: blob-ext {
+ filename = AM642_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am642-evm";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-am642-sk";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&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 {
+ };
+ };
+
+ tee {
+ description = "OP-TEE";
+ type = "tee";
+ arch = "arm64";
+ compression = "none";
+ os = "tee";
+ load = <0x9e800000>;
+ entry = <0x9e800000>;
+ tee-os {
+ };
+ };
+
+ dm {
+ description = "DM binary";
+ type = "firmware";
+ arch = "arm32";
+ compression = "none";
+ os = "DM";
+ load = <0x89000000>;
+ entry = <0x89000000>;
+ blob-ext {
+ filename = "/dev/null";
+ };
+ };
+
+ 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-am642-evm";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_AM642_EVM_DTB;
+ };
+ };
+
+ fdt-1 {
+ description = "k3-am642-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_AM642_SK_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am642-evm";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-am642-sk";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&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 AM64 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-am642-evm";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = AM642_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ fdt-1 {
+ description = "k3-am642-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = AM642_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am642-evm";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-am642-sk";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+#endif
diff --git a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
index 03ccc54..7bfa4ee 100644
--- a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
+++ b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
@@ -26,9 +26,82 @@
missing-msg = "iot2050-seboot";
};
- blob@0x180000 {
+ fit@0x180000 {
offset = <0x180000>;
filename = "tispl.bin";
+ pad-byte = <0xff>;
+ description = "Configuration to load ATF and SPL";
+
+ 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: atf-bl31 {
+ };
+ };
+
+ tee {
+ description = "OP-TEE";
+ type = "tee";
+ arch = "arm64";
+ compression = "none";
+ os = "tee";
+ load = <0x9e800000>;
+ entry = <0x9e800000>;
+ tee: tee-os {
+ };
+ };
+
+ dm {
+ description = "DM binary";
+ type = "firmware";
+ arch = "arm32";
+ compression = "none";
+ os = "DM";
+ load = <0x89000000>;
+ entry = <0x89000000>;
+ blob-ext {
+ filename = "/dev/null";
+ };
+ };
+
+ spl {
+ description = "SPL (64-bit)";
+ type = "standalone";
+ os = "U-Boot";
+ arch = "arm64";
+ compression = "none";
+ load = <CONFIG_SPL_TEXT_BASE>;
+ entry = <CONFIG_SPL_TEXT_BASE>;
+ u_boot_spl_nodtb: blob-ext {
+ filename = "spl/u-boot-spl-nodtb.bin";
+ };
+ };
+
+ fdt-0 {
+ description = "k3-am65-iot2050-spl.dtb";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ spl_am65x_evm_dtb: blob-ext {
+ filename = "spl/dts/k3-am65-iot2050-spl.dtb";
+ };
+ };
+ };
+
+ configurations {
+ default = "spl";
+ spl {
+ fdt = "fdt-0";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ };
+ };
};
fit@0x380000 {
diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index 0c1305d..e4cbc47 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -4,6 +4,7 @@
*/
#include "k3-am654-r5-base-board-u-boot.dtsi"
+#include "k3-am65x-binman.dtsi"
&pru0_0 {
remoteproc-name = "pru0_0";
diff --git a/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi
index 4516ab1..949320c 100644
--- a/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi
@@ -5,6 +5,7 @@
#include <dt-bindings/pinctrl/k3.h>
#include <dt-bindings/net/ti-dp83867.h>
+#include "k3-am65x-binman.dtsi"
/ {
chosen {
diff --git a/arch/arm/dts/k3-am65x-binman.dtsi b/arch/arm/dts/k3-am65x-binman.dtsi
new file mode 100644
index 0000000..59605ca
--- /dev/null
+++ b/arch/arm/dts/k3-am65x-binman.dtsi
@@ -0,0 +1,518 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+
+#ifdef CONFIG_TARGET_AM654_R5_EVM
+
+&binman {
+ tiboot3-am65x_sr2-hs-evm.bin {
+ filename = "tiboot3-am65x_sr2-hs-evm.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl>;
+ core = "public";
+ load = <CONFIG_SPL_TEXT_BASE>;
+ keyfile = "custMpk.pem";
+ };
+ u_boot_spl: u-boot-spl {
+ no-expanded;
+ };
+ };
+ sysfw {
+ filename = "sysfw.bin";
+ ti-secure-rom {
+ content = <&ti_sci_cert>;
+ core = "secure";
+ load = <0x40000>;
+ keyfile = "custMpk.pem";
+ countersign;
+ };
+ ti_sci_cert: ti-sci-cert.bin {
+ filename = "ti-sysfw/ti-sci-firmware-am65x_sr2-hs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+ ti-sci-firmware-am65x-hs-enc.bin {
+ filename = "ti-sysfw/ti-sci-firmware-am65x_sr2-hs-enc.bin";
+ type = "blob-ext";
+ optional;
+ };
+ };
+ itb {
+ filename = "sysfw-am65x_sr2-hs-evm.itb";
+ fit {
+ description = "SYSFW and Config fragments";
+ #address-cells = <1>;
+ images {
+ sysfw.bin {
+ description = "sysfw";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "sysfw.bin";
+ };
+ };
+ board-cfg.bin {
+ description = "board-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&board_cfg>;
+ keyfile = "custMpk.pem";
+ };
+ board_cfg: board-cfg {
+ filename = "board-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ pm-cfg.bin {
+ description = "pm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&pm_cfg>;
+ keyfile = "custMpk.pem";
+ };
+ pm_cfg: pm-cfg {
+ filename = "pm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ rm-cfg.bin {
+ description = "rm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&rm_cfg>;
+ keyfile = "custMpk.pem";\
+ };
+ rm_cfg: rm-cfg {
+ filename = "rm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ sec-cfg.bin {
+ description = "sec-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&sec_cfg>;
+ keyfile = "custMpk.pem";
+ };
+ sec_cfg: sec-cfg {
+ filename = "sec-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ };
+ };
+ };
+};
+
+&binman {
+ tiboot3-am65x_sr2-gp-evm.bin {
+ filename = "tiboot3-am65x_sr2-gp-evm.bin";
+ symlink = "tiboot3.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl_unsigned>;
+ core = "public";
+ load = <CONFIG_SPL_TEXT_BASE>;
+ sw-rev = <CONFIG_K3_X509_SWRV>;
+ keyfile = "ti-degenerate-key.pem";
+ };
+ u_boot_spl_unsigned: u-boot-spl {
+ no-expanded;
+ };
+ };
+ sysfw_gp {
+ filename = "sysfw.bin_gp";
+ ti-secure-rom {
+ content = <&ti_sci>;
+ core = "secure";
+ load = <0x40000>;
+ sw-rev = <CONFIG_K3_X509_SWRV>;
+ keyfile = "ti-degenerate-key.pem";
+ };
+ ti_sci: ti-sci.bin {
+ filename = "ti-sysfw/ti-sci-firmware-am65x_sr2-gp.bin";
+ type = "blob-ext";
+ optional;
+ };
+ };
+ itb_gp {
+ filename = "sysfw-am65x_sr2-gp-evm.itb";
+ symlink = "sysfw.itb";
+ fit {
+ description = "SYSFW and Config fragments";
+ #address-cells = <1>;
+ images {
+ sysfw.bin {
+ description = "sysfw";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "sysfw.bin_gp";
+ };
+ };
+ board-cfg.bin {
+ description = "board-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "board-cfg.bin";
+ };
+ };
+ pm-cfg.bin {
+ description = "pm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "pm-cfg.bin";
+ };
+ };
+ rm-cfg.bin {
+ description = "rm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "rm-cfg.bin";
+ };
+ };
+ sec-cfg.bin {
+ description = "sec-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "sec-cfg.bin";
+ };
+ };
+ };
+ };
+ };
+};
+#endif
+
+#ifdef CONFIG_TARGET_AM654_A53_EVM
+
+#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
+#define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb"
+
+#define UBOOT_NODTB "u-boot-nodtb.bin"
+#define AM654_EVM_DTB "u-boot.dtb"
+
+&binman {
+ 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>;
+ blob-ext {
+ filename = "/dev/null";
+ };
+ };
+
+ 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-am654-base-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_am65x_evm_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_am65x_evm_dtb: blob-ext {
+ filename = SPL_AM654_EVM_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am654-base-board";
+ 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 AM65 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-am654-base-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&am65x_evm_dtb>;
+ keyfile = "custMpk.pem";
+
+ };
+ am65x_evm_dtb: blob-ext {
+ filename = AM654_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am654-base-board";
+ 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 = "/dev/null";
+ };
+ };
+
+ 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-ext {
+ filename = SPL_NODTB;
+ };
+ };
+
+ fdt-0 {
+ description = "k3-j721e-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_AM654_EVM_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am654-base-board";
+ 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 AM65 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-am654-base-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = AM654_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-am654-base-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+ };
+ };
+ };
+};
+#endif
diff --git a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
index ee31b1e..79faa1b 100644
--- a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
@@ -3,6 +3,8 @@
* Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include "k3-j721s2-binman.dtsi"
+
/ {
chosen {
stdout-path = "serial2:115200n8";
diff --git a/arch/arm/dts/k3-binman.dtsi b/arch/arm/dts/k3-binman.dtsi
new file mode 100644
index 0000000..2a67ceb
--- /dev/null
+++ b/arch/arm/dts/k3-binman.dtsi
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/ {
+ binman: binman {
+ multiple-images;
+ };
+};
+
+&binman {
+ custMpk {
+ filename = "custMpk.pem";
+ blob-ext {
+ filename = "../keys/custMpk.pem";
+ };
+ };
+
+ ti-degenerate-key {
+ filename = "ti-degenerate-key.pem";
+ blob-ext {
+ filename = "../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 = "../common/schema.yaml";
+ };
+ };
+ pm-cfg {
+ filename = "pm-cfg.bin";
+ rcfg_yaml: ti-board-config {
+ config = "pm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ };
+ rm-cfg {
+ filename = "rm-cfg.bin";
+ pcfg_yaml: ti-board-config {
+ config = "rm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ };
+ sec-cfg {
+ filename = "sec-cfg.bin";
+ scfg_yaml: ti-board-config {
+ config = "sec-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ };
+ combined-tifs-cfg {
+ filename = "combined-tifs-cfg.bin";
+ ti-board-config {
+ bcfg_yaml_tifs: board-cfg {
+ config = "board-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ scfg_yaml_tifs: sec-cfg {
+ config = "sec-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ pcfg_yaml_tifs: pm-cfg {
+ config = "pm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ rcfg_yaml_tifs: rm-cfg {
+ config = "rm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ };
+ };
+ combined-dm-cfg {
+ filename = "combined-dm-cfg.bin";
+ ti-board-config {
+ pcfg_yaml_dm: pm-cfg {
+ config = "pm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ rcfg_yaml_dm: rm-cfg {
+ config = "rm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ };
+ };
+ combined-sysfw-cfg {
+ filename = "combined-sysfw-cfg.bin";
+ ti-board-config {
+ board-cfg {
+ config = "board-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ sec-cfg {
+ config = "sec-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ pm-cfg {
+ config = "pm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ rm-cfg {
+ config = "rm-cfg.yaml";
+ schema = "../common/schema.yaml";
+ };
+ };
+ };
+};
+
+#endif
diff --git a/arch/arm/dts/k3-j7200-binman.dtsi b/arch/arm/dts/k3-j7200-binman.dtsi
new file mode 100644
index 0000000..14f7dea
--- /dev/null
+++ b/arch/arm/dts/k3-j7200-binman.dtsi
@@ -0,0 +1,502 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+
+#ifdef CONFIG_TARGET_J7200_R5_EVM
+
+&bcfg_yaml {
+ config = "board-cfg_j7200.yaml";
+};
+
+&rcfg_yaml {
+ config = "rm-cfg_j7200.yaml";
+};
+
+&pcfg_yaml {
+ config = "pm-cfg_j7200.yaml";
+};
+
+&scfg_yaml {
+ config = "sec-cfg_j7200.yaml";
+};
+
+&bcfg_yaml_tifs {
+ config = "board-cfg_j7200.yaml";
+};
+
+&rcfg_yaml_tifs {
+ config = "rm-cfg_j7200.yaml";
+};
+
+&pcfg_yaml_tifs {
+ config = "pm-cfg_j7200.yaml";
+};
+
+&scfg_yaml_tifs {
+ config = "sec-cfg_j7200.yaml";
+};
+
+&rcfg_yaml_dm {
+ config = "rm-cfg_j7200.yaml";
+};
+
+&pcfg_yaml_dm {
+ config = "pm-cfg_j7200.yaml";
+};
+
+&binman {
+ tiboot3-j7200_sr2-hs-evm.bin {
+ filename = "tiboot3-j7200_sr2-hs-evm.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 = <0x41c00000>;
+ load-sysfw = <0x40000>;
+ load-sysfw-data = <0x7f000>;
+ load-dm-data = <0x41c80000>;
+ };
+ u_boot_spl: u-boot-spl {
+ no-expanded;
+ };
+ ti_fs_enc: ti-fs-enc.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j7200_sr2-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-j7200_sr2-hs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+ combined_dm_cfg: combined-dm-cfg.bin {
+ filename = "combined-dm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+};
+
+&binman {
+ tiboot3-j7200_sr2-hs-fs-evm.bin {
+ filename = "tiboot3-j7200_sr2-hs-fs-evm.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 = <0x41c00000>;
+ load-sysfw = <0x40000>;
+ load-sysfw-data = <0x7f000>;
+ load-dm-data = <0x41c80000>;
+ };
+ u_boot_spl_fs: u-boot-spl {
+ no-expanded;
+ };
+ ti_fs_enc_fs: ti-fs-enc.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j7200_sr2-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-j7200_sr2-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-j7200-gp-evm.bin {
+ filename = "tiboot3-j7200-gp-evm.bin";
+ symlink = "tiboot3.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 = <0x41c00000>;
+ content-sysfw = <&ti_fs_gp>;
+ load-sysfw = <0x40000>;
+ content-sysfw-data = <&combined_tifs_cfg_gp>;
+ load-sysfw-data = <0x7f000>;
+ content-dm-data = <&combined_dm_cfg_gp>;
+ load-dm-data = <0x41c80000>;
+ 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-j7200-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
+
+#ifdef CONFIG_TARGET_J7200_A72_EVM
+
+#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
+#define SPL_J7200_EVM_DTB "spl/dts/k3-j7200-common-proc-board.dtb"
+
+#define UBOOT_NODTB "u-boot-nodtb.bin"
+#define J7200_EVM_DTB "u-boot.dtb"
+
+&binman {
+ ti-dm {
+ filename = "ti-dm.bin";
+ blob-ext {
+ filename = "ti-dm/j7200/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-j7200-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_j7200_evm_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_j7200_evm_dtb: blob-ext {
+ filename = SPL_J7200_EVM_DTB;
+ };
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j7200-common-proc-board";
+ 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 J7200 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-j7200-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&j7200_evm_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ j7200_evm_dtb: blob-ext {
+ filename = J7200_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j7200-common-proc-board";
+ 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_NODTB;
+ };
+ };
+
+ fdt-1 {
+ description = "k3-j7200-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_J7200_EVM_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-1";
+
+ conf-1 {
+ description = "k3-j7200-common-proc-board";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&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 J7200 board";
+ type = "firmware";
+ os = "u-boot";
+ arch = "arm";
+ compression = "none";
+ load = <CONFIG_TEXT_BASE>;
+ blob {
+ filename = UBOOT_NODTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ fdt-1 {
+ description = "k3-j7200-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = J7200_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-1";
+
+ conf-1 {
+ description = "k3-j7200-common-proc-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+#endif
diff --git a/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi
index f57c230..f25c713 100644
--- a/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi
@@ -3,6 +3,8 @@
* Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include "k3-j7200-binman.dtsi"
+
/ {
chosen {
stdout-path = "serial2:115200n8";
diff --git a/arch/arm/dts/k3-j721e-binman.dtsi b/arch/arm/dts/k3-j721e-binman.dtsi
new file mode 100644
index 0000000..4f566c2
--- /dev/null
+++ b/arch/arm/dts/k3-j721e-binman.dtsi
@@ -0,0 +1,701 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+
+#ifdef CONFIG_TARGET_J721E_R5_EVM
+
+&binman {
+ tiboot3-j721e_sr1_1-hs-evm.bin {
+ filename = "tiboot3-j721e_sr1_1-hs-evm.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl>;
+ core = "public";
+ load = <CONFIG_SPL_TEXT_BASE>;
+ keyfile = "custMpk.pem";
+ };
+ u_boot_spl: u-boot-spl {
+ no-expanded;
+ };
+ };
+ sysfw {
+ filename = "sysfw.bin";
+ ti-secure-rom {
+ content = <&ti_fs_cert>;
+ core = "secure";
+ load = <0x40000>;
+ keyfile = "custMpk.pem";
+ countersign;
+ };
+ ti_fs_cert: ti-fs-cert.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+ ti-fs-firmware-j721e_sr1_1-hs-enc.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-enc.bin";
+ type = "blob-ext";
+ optional;
+ };
+ };
+ itb {
+ filename = "sysfw-j721e_sr1_1-hs-evm.itb";
+ fit {
+ description = "SYSFW and Config fragments";
+ #address-cells = <1>;
+ images {
+ sysfw.bin {
+ description = "sysfw";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "sysfw.bin";
+ };
+ };
+ board-cfg.bin {
+ description = "board-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&board_cfg>;
+ keyfile = "custMpk.pem";
+ };
+ board_cfg: board-cfg {
+ filename = "board-cfg.bin";
+ type = "blob-ext";
+ };
+
+ };
+ pm-cfg.bin {
+ description = "pm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&pm_cfg>;
+ keyfile = "custMpk.pem";
+ };
+ pm_cfg: pm-cfg {
+ filename = "pm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ rm-cfg.bin {
+ description = "rm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&rm_cfg>;
+ keyfile = "custMpk.pem";
+ };
+ rm_cfg: rm-cfg {
+ filename = "rm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ sec-cfg.bin {
+ description = "sec-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&sec_cfg>;
+ keyfile = "custMpk.pem";
+ };
+ sec_cfg: sec-cfg {
+ filename = "sec-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ };
+ };
+ };
+};
+
+&binman {
+ tiboot3-j721e_sr2-hs-fs-evm.bin {
+ filename = "tiboot3-j721e_sr2-hs-fs-evm.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl_fs>;
+ core = "public";
+ load = <CONFIG_SPL_TEXT_BASE>;
+ keyfile = "custMpk.pem";
+ };
+ u_boot_spl_fs: u-boot-spl {
+ no-expanded;
+ };
+ };
+ sysfw_fs {
+ filename = "sysfw.bin_fs";
+ ti-fs-cert-fs.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j721e_sr2-hs-fs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+ ti-fs-firmware-j721e-hs-fs-enc.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j721e_sr2-hs-fs-enc.bin";
+ type = "blob-ext";
+ optional;
+ };
+ };
+ itb_fs {
+ filename = "sysfw-j721e_sr2-hs-fs-evm.itb";
+ fit {
+ description = "SYSFW and Config fragments";
+ #address-cells = <1>;
+ images {
+ sysfw.bin {
+ description = "sysfw";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "sysfw.bin_fs";
+ };
+ };
+ board-cfg.bin {
+ description = "board-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ board-cfg {
+ filename = "board-cfg.bin";
+ type = "blob-ext";
+ };
+
+ };
+ pm-cfg.bin {
+ description = "pm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ pm-cfg {
+ filename = "pm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ rm-cfg.bin {
+ description = "rm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ rm-cfg {
+ filename = "rm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ sec-cfg.bin {
+ description = "sec-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ sec-cfg {
+ filename = "sec-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+ };
+ };
+ };
+};
+
+&binman {
+ tiboot3-j721e-gp-evm.bin {
+ filename = "tiboot3-j721e-gp-evm.bin";
+ symlink = "tiboot3.bin";
+ ti-secure-rom {
+ content = <&u_boot_spl_unsigned>;
+ core = "public";
+ load = <CONFIG_SPL_TEXT_BASE>;
+ sw-rev = <CONFIG_K3_X509_SWRV>;
+ keyfile = "ti-degenerate-key.pem";
+ };
+ u_boot_spl_unsigned: u-boot-spl {
+ no-expanded;
+ };
+ };
+ sysfw_gp {
+ filename = "sysfw.bin_gp";
+ ti-secure-rom {
+ content = <&ti_fs>;
+ core = "secure";
+ load = <0x40000>;
+ sw-rev = <CONFIG_K3_X509_SWRV>;
+ keyfile = "ti-degenerate-key.pem";
+ };
+ ti_fs: ti-fs.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j721e-gp.bin";
+ type = "blob-ext";
+ optional;
+ };
+ };
+ itb_gp {
+ filename = "sysfw-j721e-gp-evm.itb";
+ symlink = "sysfw.itb";
+ fit {
+ description = "SYSFW and Config fragments";
+ #address-cells = <1>;
+ images {
+ sysfw.bin {
+ description = "sysfw";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "sysfw.bin_gp";
+ };
+ };
+ board-cfg.bin {
+ description = "board-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "board-cfg.bin";
+ };
+ };
+ pm-cfg.bin {
+ description = "pm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "pm-cfg.bin";
+ };
+ };
+ rm-cfg.bin {
+ description = "rm-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "rm-cfg.bin";
+ };
+ };
+ sec-cfg.bin {
+ description = "sec-cfg";
+ type = "firmware";
+ arch = "arm";
+ compression = "none";
+ blob-ext {
+ filename = "sec-cfg.bin";
+ };
+ };
+ };
+ };
+ };
+};
+#endif
+
+#ifdef CONFIG_TARGET_J721E_A72_EVM
+
+#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
+#define SPL_J721E_EVM_DTB "spl/dts/k3-j721e-common-proc-board.dtb"
+#define SPL_J721E_SK_DTB "spl/dts/k3-j721e-sk.dtb"
+
+#define UBOOT_NODTB "u-boot-nodtb.bin"
+#define J721E_EVM_DTB "u-boot.dtb"
+#define J721E_SK_DTB "arch/arm/dts/k3-j721e-sk.dtb"
+
+&binman {
+ ti-dm {
+ filename = "ti-dm.bin";
+ blob-ext {
+ filename = "ti-dm/j721e/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-j721e-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_j721e_evm_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_j721e_evm_dtb: blob-ext {
+ filename = SPL_J721E_EVM_DTB;
+ };
+ };
+
+ fdt-1 {
+ description = "k3-j721e-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_j721e_sk_dtb>;
+ keyfile = "custMpk.pem";
+
+ };
+ spl_j721e_sk_dtb: blob-ext {
+ filename = SPL_J721E_SK_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721e-common-proc-board";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-j721e-sk";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&binman {
+ u-boot {
+ filename = "u-boot.img";
+ pad-byte = <0xff>;
+
+ fit {
+ description = "FIT image with multiple configurations";
+
+ images {
+ uboot {
+ description = "U-Boot for j721e 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-j721e-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&j721e_evm_dtb>;
+ keyfile = "custMpk.pem";
+
+ };
+ j721e_evm_dtb: blob-ext {
+ filename = J721E_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ fdt-1 {
+ description = "k3-j721e-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&j721e_sk_dtb>;
+ keyfile = "custMpk.pem";
+
+ };
+ j721e_sk_dtb: blob-ext {
+ filename = J721E_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721e-common-proc-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-j721e-sk";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&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-ext {
+ filename = SPL_NODTB;
+ };
+ };
+
+ fdt-0 {
+ description = "k3-j721e-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_J721E_EVM_DTB;
+ };
+ };
+
+ fdt-1 {
+ description = "k3-j721e-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_J721E_SK_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721e-common-proc-board";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-j721e-sk";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&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 j721e 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-j721e-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = J721E_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ fdt-1 {
+ description = "k3-j721e-sk";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = J721E_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721e-common-proc-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-j721e-sk";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+#endif
diff --git a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
index 867ec2b..540c847 100644
--- a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
@@ -4,6 +4,7 @@
*/
#include <dt-bindings/net/ti-dp83867.h>
+#include "k3-j721e-binman.dtsi"
/ {
chosen {
diff --git a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
index 1b40cf2..32f71e9 100644
--- a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
+++ b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts
@@ -8,6 +8,7 @@
#include "k3-j721e-som-p0.dtsi"
#include "k3-j721e-ddr-evm-lp4-4266.dtsi"
#include "k3-j721e-ddr.dtsi"
+#include "k3-j721e-binman.dtsi"
#include <dt-bindings/phy/phy-cadence.h>
/ {
diff --git a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
index 31f979f..205dacf 100644
--- a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
@@ -4,6 +4,7 @@
*/
#include <dt-bindings/net/ti-dp83867.h>
+#include "k3-j721e-binman.dtsi"
/ {
chosen {
diff --git a/arch/arm/dts/k3-j721s2-binman.dtsi b/arch/arm/dts/k3-j721s2-binman.dtsi
new file mode 100644
index 0000000..5bca4e9
--- /dev/null
+++ b/arch/arm/dts/k3-j721s2-binman.dtsi
@@ -0,0 +1,546 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-binman.dtsi"
+
+#ifdef CONFIG_TARGET_J721S2_R5_EVM
+
+&binman {
+ tiboot3-j721s2-hs-evm.bin {
+ filename = "tiboot3-j721s2-hs-evm.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 = <0x41c00000>;
+ load-sysfw = <0x40000>;
+ load-sysfw-data = <0x67000>;
+ load-dm-data = <0x41c80000>;
+ };
+ u_boot_spl: u-boot-spl {
+ no-expanded;
+ };
+ ti_fs_enc: ti-fs-enc.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j721s2-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-j721s2-hs-cert.bin";
+ type = "blob-ext";
+ optional;
+ };
+ combined_dm_cfg: combined-dm-cfg.bin {
+ filename = "combined-dm-cfg.bin";
+ type = "blob-ext";
+ };
+ };
+};
+
+&binman {
+ tiboot3-j721s2-hs-fs-evm.bin {
+ filename = "tiboot3-j721s2-hs-fs-evm.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 = <0x41c00000>;
+ load-sysfw = <0x40000>;
+ load-sysfw-data = <0x67000>;
+ load-dm-data = <0x41c80000>;
+ };
+ u_boot_spl_fs: u-boot-spl {
+ no-expanded;
+ };
+ ti_fs_enc_fs: ti-fs-enc.bin {
+ filename = "ti-sysfw/ti-fs-firmware-j721s2-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-j721s2-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-j721s2-gp-evm.bin {
+ filename = "tiboot3-j721s2-gp-evm.bin";
+ symlink = "tiboot3.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 = <0x41c00000>;
+ 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 = <0x41c80000>;
+ 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-j721s2-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
+
+#ifdef CONFIG_TARGET_J721S2_A72_EVM
+
+#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
+#define SPL_J721S2_EVM_DTB "spl/dts/k3-j721s2-common-proc-board.dtb"
+#define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb"
+
+#define UBOOT_NODTB "u-boot-nodtb.bin"
+#define J721S2_EVM_DTB "u-boot.dtb"
+#define AM68_SK_DTB "arch/arm/dts/k3-am68-sk-base-board.dtb"
+
+&binman {
+ ti-dm {
+ filename = "ti-dm.bin";
+ blob-ext {
+ filename = "ti-dm/j721s2/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-j721s2-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_j721s2_evm_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_j721s2_evm_dtb: blob-ext {
+ filename = SPL_J721S2_EVM_DTB;
+ };
+
+ };
+
+ fdt-1 {
+ description = "k3-am68-sk-base-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&spl_am68_sk_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ spl_am68_sk_dtb: blob-ext {
+ filename = SPL_AM68_SK_DTB;
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721s2-common-proc-board";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-0";
+ };
+
+ conf-1 {
+ description = "k3-am68-sk-base-board";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&binman {
+ u-boot {
+ filename = "u-boot.img";
+ pad-byte = <0xff>;
+
+ fit {
+ description = "FIT image with multiple configurations";
+
+ images {
+ uboot {
+ description = "U-Boot for J721S2 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-j721s2-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&j721s2_evm_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ j721s2_evm_dtb: blob-ext {
+ filename = J721S2_EVM_DTB;
+ };
+
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ fdt-1 {
+ description = "k3-am68-sk-base-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ ti-secure {
+ content = <&am68_sk_dtb>;
+ keyfile = "custMpk.pem";
+ };
+ am68_sk_dtb: blob-ext {
+ filename = AM68_SK_DTB;
+ };
+
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721s2-common-proc-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+ conf-1 {
+ description = "k3-am68-sk-base-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-1";
+ };
+
+ };
+ };
+ };
+};
+
+&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-j721s2-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_J721S2_EVM_DTB;
+ };
+ };
+ fdt-1 {
+ description = "k3-am68-sk-base-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = SPL_AM68_SK_DTB;
+ };
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721s2-common-proc-board";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-0";
+ };
+ conf-1 {
+ description = "k3-am68-sk-base-board";
+ firmware = "atf";
+ loadables = "tee", "dm", "spl";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+
+&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 J721S2 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-j721s2-common-proc-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = J721S2_EVM_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+ fdt-1 {
+ description = "k3-am68-sk-base-board";
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ blob {
+ filename = AM68_SK_DTB;
+ };
+ hash {
+ algo = "crc32";
+ };
+ };
+
+ };
+
+ configurations {
+ default = "conf-0";
+
+ conf-0 {
+ description = "k3-j721s2-common-proc-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-0";
+ };
+ conf-1 {
+ description = "k3-am68-sk-base-board";
+ firmware = "uboot";
+ loadables = "uboot";
+ fdt = "fdt-1";
+ };
+ };
+ };
+ };
+};
+#endif
diff --git a/arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi
index 4fd6d36..f940ffe 100644
--- a/arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi
@@ -3,6 +3,8 @@
* Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
*/
+#include "k3-j721s2-binman.dtsi"
+
/ {
chosen {
stdout-path = "serial2:115200n8";
diff --git a/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts b/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts
index e02b334..c74e8e5 100644
--- a/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts
+++ b/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts
@@ -8,6 +8,7 @@
#include "k3-j721s2-som-p0.dtsi"
#include "k3-j721s2-ddr-evm-lp4-4266.dtsi"
#include "k3-j721s2-ddr.dtsi"
+#include "k3-j721s2-binman.dtsi"
/ {
chosen {
diff --git a/arch/arm/dts/stm32mp15-u-boot.dtsi b/arch/arm/dts/stm32mp15-u-boot.dtsi
index d872c6f..573dd4d 100644
--- a/arch/arm/dts/stm32mp15-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp15-u-boot.dtsi
@@ -226,6 +226,7 @@
mkimage {
args = "-T stm32image -a 0x2ffc2500 -e 0x2ffc2500";
u-boot-spl {
+ no-write-symbols;
};
};
};
diff --git a/arch/arm/dts/versal-mini-emmc0.dts b/arch/arm/dts/versal-mini-emmc0.dts
index 1863d29..bd685dd 100644
--- a/arch/arm/dts/versal-mini-emmc0.dts
+++ b/arch/arm/dts/versal-mini-emmc0.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2018-2019, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/versal-mini-emmc1.dts b/arch/arm/dts/versal-mini-emmc1.dts
index 8701c3b..fbdcf5d 100644
--- a/arch/arm/dts/versal-mini-emmc1.dts
+++ b/arch/arm/dts/versal-mini-emmc1.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2018-2019, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/versal-mini-ospi.dtsi b/arch/arm/dts/versal-mini-ospi.dtsi
index 2d04521..19caea7 100644
--- a/arch/arm/dts/versal-mini-ospi.dtsi
+++ b/arch/arm/dts/versal-mini-ospi.dtsi
@@ -4,8 +4,8 @@
*
* (C) Copyright 2018-2019, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/versal-mini-qspi.dtsi b/arch/arm/dts/versal-mini-qspi.dtsi
index bb8819d..2fec92c 100644
--- a/arch/arm/dts/versal-mini-qspi.dtsi
+++ b/arch/arm/dts/versal-mini-qspi.dtsi
@@ -4,8 +4,8 @@
*
* (C) Copyright 2018-2019, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/versal-mini.dts b/arch/arm/dts/versal-mini.dts
index 769eb9e..a213b74 100644
--- a/arch/arm/dts/versal-mini.dts
+++ b/arch/arm/dts/versal-mini.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019, Xilinx, Inc.
*
- * Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
/dts-v1/;
diff --git a/arch/arm/dts/versal-net-mini-emmc.dts b/arch/arm/dts/versal-net-mini-emmc.dts
new file mode 100644
index 0000000..8a864ba
--- /dev/null
+++ b/arch/arm/dts/versal-net-mini-emmc.dts
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * dts file for Xilinx Versal NET Mini eMMC Configuration
+ *
+ * (C) Copyright 2023, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <michal.simek@amd.com>
+ * Ashok Reddy Soma <ashok.reddy.soma@amd.com>
+ */
+
+/dts-v1/;
+
+/ {
+ compatible = "xlnx,versal-net-mini";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ model = "Xilinx Versal NET MINI eMMC";
+
+ aliases {
+ serial0 = &dcc;
+ mmc0 = &sdhci1;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0 0 0 0x20000000>;
+ };
+
+ clk200: clk200 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <200000000>;
+ };
+
+ dcc: dcc {
+ compatible = "arm,dcc";
+ status = "okay";
+ bootph-all;
+ };
+
+ amba: amba {
+ bootph-all;
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ sdhci1: sdhci@f1050000 {
+ compatible = "xlnx,versal-net-emmc";
+ status = "okay";
+ non-removable;
+ disable-wp;
+ bus-width = <8>;
+ reg = <0 0xf1050000 0 0x10000>;
+ clock-names = "clk_xin", "clk_ahb";
+ clocks = <&clk200>, <&clk200>;
+ xlnx,mio-bank = <0>;
+ };
+ };
+};
diff --git a/arch/arm/dts/versal-net-mini-ospi-single.dts b/arch/arm/dts/versal-net-mini-ospi-single.dts
new file mode 100644
index 0000000..11a8e8b
--- /dev/null
+++ b/arch/arm/dts/versal-net-mini-ospi-single.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Xilinx Versal NET OSPI single DTS
+ *
+ * (C) Copyright 2023, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <michal.simek@amd.com>
+ * Ashok Reddy Soma <ashok.reddy.soma@amd.com>
+ */
+
+#include "versal-net-mini-ospi.dtsi"
+
+/ {
+ model = "Xilinx Versal NET MINI OSPI SINGLE";
+};
+
+&flash0 {
+ spi-rx-bus-width = <8>;
+};
diff --git a/arch/arm/dts/versal-net-mini-ospi.dtsi b/arch/arm/dts/versal-net-mini-ospi.dtsi
new file mode 100644
index 0000000..ce8e215
--- /dev/null
+++ b/arch/arm/dts/versal-net-mini-ospi.dtsi
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * dts file for Xilinx Versal NET Mini OSPI Configuration
+ *
+ * (C) Copyright 2023, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <michal.simek@amd.com>
+ * Ashok Reddy Soma <ashok.reddy.soma@amd.com>
+ */
+
+/dts-v1/;
+
+/ {
+ compatible = "xlnx,versal-net-mini";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ model = "Xilinx Versal NET MINI OSPI";
+
+ aliases {
+ serial0 = &dcc;
+ spi0 = &ospi;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200";
+ };
+
+ memory@bbf00000 {
+ device_type = "memory";
+ reg = <0 0xBBF00000 0 0x100000>;
+ };
+
+ clk125: clk125 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <125000000>;
+ };
+
+ dcc: dcc {
+ compatible = "arm,dcc";
+ status = "okay";
+ bootph-all;
+ };
+
+ amba: amba {
+ bootph-all;
+ compatible = "simple-bus";
+ #address-cells = <0x2>;
+ #size-cells = <0x2>;
+ ranges;
+
+ ospi: spi@f1010000 {
+ compatible = "cadence,qspi", "cdns,qspi-nor";
+ status = "okay";
+ reg = <0 0xf1010000 0 0x10000>, <0 0xc0000000 0 0x20000000>;
+ clock-names = "ref_clk", "pclk";
+ clocks = <&clk125>, <&clk125>;
+ bus-num = <2>;
+ num-cs = <1>;
+ cdns,fifo-depth = <256>;
+ cdns,fifo-width = <4>;
+ cdns,is-dma = <1>;
+ cdns,is-stig-pgm = <1>;
+ cdns,trigger-address = <0xc0000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash0: flash@0 {
+ compatible = "mt35xu02g", "micron,m25p80",
+ "jedec,spi-nor";
+ reg = <0>;
+ spi-tx-bus-width = <8>;
+ spi-rx-bus-width = <8>;
+ spi-max-frequency = <20000000>;
+ };
+ };
+ };
+};
diff --git a/arch/arm/dts/versal-net-mini-qspi-single.dts b/arch/arm/dts/versal-net-mini-qspi-single.dts
new file mode 100644
index 0000000..fec1b51
--- /dev/null
+++ b/arch/arm/dts/versal-net-mini-qspi-single.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Xilinx Versal NET QSPI single DTS
+ *
+ * (C) Copyright 2023, Advanced Micro Devices, Inc.
+ */
+
+#include "versal-net-mini-qspi.dtsi"
+
+/ {
+ model = "Xilinx Versal NET MINI QSPI SINGLE";
+};
+
+&flash0 {
+ spi-rx-bus-width = <4>;
+};
diff --git a/arch/arm/dts/versal-net-mini-qspi.dtsi b/arch/arm/dts/versal-net-mini-qspi.dtsi
new file mode 100644
index 0000000..097b58c
--- /dev/null
+++ b/arch/arm/dts/versal-net-mini-qspi.dtsi
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * dts file for Xilinx Versal NET Mini QSPI Configuration
+ *
+ * (C) Copyright 2023, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <michal.simek@amd.com>
+ * Ashok Reddy Soma <ashok.reddy.soma@amd.com>
+ */
+
+/dts-v1/;
+
+/ {
+ compatible = "xlnx,versal-net-mini";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ model = "Xilinx Versal NET MINI QSPI";
+
+ aliases {
+ serial0 = &dcc;
+ spi0 = &qspi;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200";
+ };
+
+ memory@bbf00000 {
+ device_type = "memory";
+ reg = <0 0xbbf00000 0 0x100000>;
+ };
+
+ clk150: clk150 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <150000000>;
+ };
+
+ dcc: dcc {
+ compatible = "arm,dcc";
+ status = "okay";
+ bootph-all;
+ };
+
+ amba: amba {
+ bootph-all;
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ qspi: spi@f1030000 {
+ compatible = "xlnx,versal-qspi-1.0";
+ status = "okay";
+ clock-names = "ref_clk", "pclk";
+ num-cs = <1>;
+ reg = <0 0xf1030000 0 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&clk150>, <&clk150>;
+
+ flash0: flash@0 {
+ compatible = "n25q512a", "micron,m25p80",
+ "jedec,spi-nor";
+ reg = <0>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ spi-max-frequency = <20000000>;
+ };
+ };
+ };
+};
diff --git a/arch/arm/dts/zynq-7000.dtsi b/arch/arm/dts/zynq-7000.dtsi
index 97a9e49..8c6eafe 100644
--- a/arch/arm/dts/zynq-7000.dtsi
+++ b/arch/arm/dts/zynq-7000.dtsi
@@ -153,6 +153,7 @@
clocks = <&clkc 38>;
interrupt-parent = <&intc>;
interrupts = <0 25 4>;
+ clock-frequency = <400000>;
reg = <0xe0004000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
@@ -164,6 +165,7 @@
clocks = <&clkc 39>;
interrupt-parent = <&intc>;
interrupts = <0 48 4>;
+ clock-frequency = <400000>;
reg = <0xe0005000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm/dts/zynq-dlc20-rev1.0.dts b/arch/arm/dts/zynq-dlc20-rev1.0.dts
index cfe0710..d06838c 100644
--- a/arch/arm/dts/zynq-dlc20-rev1.0.dts
+++ b/arch/arm/dts/zynq-dlc20-rev1.0.dts
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018 Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
#include "zynq-7000.dtsi"
diff --git a/arch/arm/dts/zynq-minized.dts b/arch/arm/dts/zynq-minized.dts
index 38365d1..3214ee4 100644
--- a/arch/arm/dts/zynq-minized.dts
+++ b/arch/arm/dts/zynq-minized.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2018, Xilinx, Inc.
*
- * Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
+ * Ibai Erkiaga <ibai.erkiaga-elorza@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynq-zc702.dts b/arch/arm/dts/zynq-zc702.dts
index 27fb194..8d47f24 100644
--- a/arch/arm/dts/zynq-zc702.dts
+++ b/arch/arm/dts/zynq-zc702.dts
@@ -5,6 +5,7 @@
*/
/dts-v1/;
#include "zynq-7000.dtsi"
+#include <dt-bindings/gpio/gpio.h>
/ {
model = "Xilinx ZC702 board";
@@ -102,8 +103,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio0 50 0>;
- sda-gpios = <&gpio0 51 0>;
+ scl-gpios = <&gpio0 50 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio0 51 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-mux@74 {
compatible = "nxp,pca9548";
diff --git a/arch/arm/dts/zynqmp-a2197-revA.dts b/arch/arm/dts/zynqmp-a2197-revA.dts
index 04f9f02..8416705 100644
--- a/arch/arm/dts/zynqmp-a2197-revA.dts
+++ b/arch/arm/dts/zynqmp-a2197-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-clk-ccf.dtsi b/arch/arm/dts/zynqmp-clk-ccf.dtsi
index 38dc9cd..1ae8ea2 100644
--- a/arch/arm/dts/zynqmp-clk-ccf.dtsi
+++ b/arch/arm/dts/zynqmp-clk-ccf.dtsi
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <dt-bindings/clock/xlnx-zynqmp-clk.h>
@@ -126,7 +126,7 @@
};
&gpu {
- clocks = <&zynqmp_clk GPU_REF>, <&zynqmp_clk GPU_PP0_REF>, <&zynqmp_clk GPU_PP1_REF>;
+ clocks = <&zynqmp_clk GPU_REF>, <&zynqmp_clk GPU_PP0_REF>;
};
&lpd_dma_chan1 {
@@ -169,24 +169,28 @@
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM0_REF>,
<&zynqmp_clk GEM0_TX>, <&zynqmp_clk GEM0_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gem1 {
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM1_REF>,
<&zynqmp_clk GEM1_TX>, <&zynqmp_clk GEM1_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gem2 {
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM2_REF>,
<&zynqmp_clk GEM2_TX>, <&zynqmp_clk GEM2_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gem3 {
clocks = <&zynqmp_clk LPD_LSBUS>, <&zynqmp_clk GEM3_REF>,
<&zynqmp_clk GEM3_TX>, <&zynqmp_clk GEM3_RX>,
<&zynqmp_clk GEM_TSU>;
+ assigned-clocks = <&zynqmp_clk GEM_TSU>;
};
&gpio {
@@ -285,10 +289,6 @@
clocks = <&zynqmp_clk AMS_REF>;
};
-&zynqmp_pcap {
- clocks = <&zynqmp_clk PCAP>;
-};
-
&zynqmp_dpdma {
clocks = <&zynqmp_clk DPDMA_REF>;
assigned-clocks = <&zynqmp_clk DPDMA_REF>; /* apll */
diff --git a/arch/arm/dts/zynqmp-dlc21-revA.dts b/arch/arm/dts/zynqmp-dlc21-revA.dts
index 7460e4a..1b247bf 100644
--- a/arch/arm/dts/zynqmp-dlc21-revA.dts
+++ b/arch/arm/dts/zynqmp-dlc21-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -131,7 +131,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 { /* MIO34/35 */
diff --git a/arch/arm/dts/zynqmp-e-a2197-00-revA.dts b/arch/arm/dts/zynqmp-e-a2197-00-revA.dts
index 3fa18f5..bf6ffb7 100644
--- a/arch/arm/dts/zynqmp-e-a2197-00-revA.dts
+++ b/arch/arm/dts/zynqmp-e-a2197-00-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -201,7 +201,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 { /* MIO 34-35 - can't stay here */
diff --git a/arch/arm/dts/zynqmp-g-a2197-00-revA.dts b/arch/arm/dts/zynqmp-g-a2197-00-revA.dts
index 02d2427..d5cfc61 100644
--- a/arch/arm/dts/zynqmp-g-a2197-00-revA.dts
+++ b/arch/arm/dts/zynqmp-g-a2197-00-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -125,14 +125,14 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 { /* MIO 34-35 - can't stay here */
status = "okay";
clock-frequency = <400000>;
- scl-gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 34 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 35 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-mux@74 { /* u94 */
compatible = "nxp,pca9548";
#address-cells = <1>;
diff --git a/arch/arm/dts/zynqmp-m-a2197-01-revA.dts b/arch/arm/dts/zynqmp-m-a2197-01-revA.dts
index 2d7fe59..97500b1 100644
--- a/arch/arm/dts/zynqmp-m-a2197-01-revA.dts
+++ b/arch/arm/dts/zynqmp-m-a2197-01-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -154,7 +154,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 { /* MIO 34-35 - can't stay here */
diff --git a/arch/arm/dts/zynqmp-m-a2197-02-revA.dts b/arch/arm/dts/zynqmp-m-a2197-02-revA.dts
index e46748d..3bdcf05 100644
--- a/arch/arm/dts/zynqmp-m-a2197-02-revA.dts
+++ b/arch/arm/dts/zynqmp-m-a2197-02-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -149,7 +149,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 { /* MIO 34-35 - can't stay here */
diff --git a/arch/arm/dts/zynqmp-m-a2197-03-revA.dts b/arch/arm/dts/zynqmp-m-a2197-03-revA.dts
index f564817..9a693a5 100644
--- a/arch/arm/dts/zynqmp-m-a2197-03-revA.dts
+++ b/arch/arm/dts/zynqmp-m-a2197-03-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -149,7 +149,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 { /* MIO 34-35 - can't stay here */
diff --git a/arch/arm/dts/zynqmp-mini-emmc0.dts b/arch/arm/dts/zynqmp-mini-emmc0.dts
index d1e58eb..08ec2f7 100644
--- a/arch/arm/dts/zynqmp-mini-emmc0.dts
+++ b/arch/arm/dts/zynqmp-mini-emmc0.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2018, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-mini-emmc1.dts b/arch/arm/dts/zynqmp-mini-emmc1.dts
index 0c139f8..905de08 100644
--- a/arch/arm/dts/zynqmp-mini-emmc1.dts
+++ b/arch/arm/dts/zynqmp-mini-emmc1.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2018, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-mini-nand.dts b/arch/arm/dts/zynqmp-mini-nand.dts
index 8fae01b..e5688fd 100644
--- a/arch/arm/dts/zynqmp-mini-nand.dts
+++ b/arch/arm/dts/zynqmp-mini-nand.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2018, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-mini-qspi.dts b/arch/arm/dts/zynqmp-mini-qspi.dts
index a7cf4ef..fc0a2e8 100644
--- a/arch/arm/dts/zynqmp-mini-qspi.dts
+++ b/arch/arm/dts/zynqmp-mini-qspi.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2015 - 2020, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-mini.dts b/arch/arm/dts/zynqmp-mini.dts
index 15bee16..b9a24f0 100644
--- a/arch/arm/dts/zynqmp-mini.dts
+++ b/arch/arm/dts/zynqmp-mini.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-p-a2197-00-revA.dts b/arch/arm/dts/zynqmp-p-a2197-00-revA.dts
index d63deb8..16691a8 100644
--- a/arch/arm/dts/zynqmp-p-a2197-00-revA.dts
+++ b/arch/arm/dts/zynqmp-p-a2197-00-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2019, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -134,7 +134,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 { /* MIO 34-35 - can't stay here */
diff --git a/arch/arm/dts/zynqmp-r5.dts b/arch/arm/dts/zynqmp-r5.dts
index 9789d71..77b15fe 100644
--- a/arch/arm/dts/zynqmp-r5.dts
+++ b/arch/arm/dts/zynqmp-r5.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2018, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-sck-kr-g-revA.dts b/arch/arm/dts/zynqmp-sck-kr-g-revA.dts
index c82e1df..d318773 100644
--- a/arch/arm/dts/zynqmp-sck-kr-g-revA.dts
+++ b/arch/arm/dts/zynqmp-sck-kr-g-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <dt-bindings/gpio/gpio.h>
@@ -68,8 +68,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
u14: ina260@40 { /* u14 */
compatible = "ti,ina260";
@@ -188,6 +188,7 @@
phy-handle = <&phy0>;
phy-mode = "sgmii";
is-internal-pcspma;
+ assigned-clock-rates = <250000000>;
};
&gem1 { /* mdio mio50/51, gem mio38 - mio49 */
@@ -196,6 +197,7 @@
pinctrl-0 = <&pinctrl_gem1_default>;
phy-handle = <&phy1>;
phy-mode = "rgmii-id";
+ assigned-clock-rates = <250000000>;
mdio: mdio {
#address-cells = <1>;
@@ -208,7 +210,7 @@
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,dp83867-rxctrl-strap-quirk;
- reset-assert-us = <100>;
+ reset-assert-us = <300>;
reset-deassert-us = <280>;
reset-gpios = <&slg7xl45106 5 GPIO_ACTIVE_LOW>;
};
diff --git a/arch/arm/dts/zynqmp-sck-kr-g-revB.dts b/arch/arm/dts/zynqmp-sck-kr-g-revB.dts
index 9dd160c..69dba07 100644
--- a/arch/arm/dts/zynqmp-sck-kr-g-revB.dts
+++ b/arch/arm/dts/zynqmp-sck-kr-g-revB.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2021 - 2022, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <dt-bindings/gpio/gpio.h>
@@ -68,8 +68,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
u14: ina260@40 { /* u14 */
compatible = "ti,ina260";
@@ -188,6 +188,7 @@
phy-handle = <&phy0>;
phy-mode = "sgmii";
is-internal-pcspma;
+ assigned-clock-rates = <250000000>;
};
&gem1 { /* mdio mio50/51, gem mio38 - mio49 */
@@ -196,6 +197,7 @@
pinctrl-0 = <&pinctrl_gem1_default>;
phy-handle = <&phy1>;
phy-mode = "rgmii-id";
+ assigned-clock-rates = <250000000>;
mdio: mdio {
#address-cells = <1>;
@@ -208,7 +210,7 @@
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,dp83867-rxctrl-strap-quirk;
- reset-assert-us = <100>;
+ reset-assert-us = <300>;
reset-deassert-us = <280>;
reset-gpios = <&slg7xl45106 5 GPIO_ACTIVE_LOW>;
};
diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revA.dts b/arch/arm/dts/zynqmp-sck-kv-g-revA.dts
index 6f5a426..a81b3f6 100644
--- a/arch/arm/dts/zynqmp-sck-kv-g-revA.dts
+++ b/arch/arm/dts/zynqmp-sck-kv-g-revA.dts
@@ -9,7 +9,7 @@
* "Y" – A01 board modified with legacy interposer (Nexperia)
* "Z" – A01 board modified with Diode interposer
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <dt-bindings/gpio/gpio.h>
@@ -34,8 +34,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
u14: ina260@40 { /* u14 */
compatible = "ti,ina260";
@@ -165,6 +165,7 @@
pinctrl-0 = <&pinctrl_gem3_default>;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
+ assigned-clock-rates = <250000000>;
mdio: mdio {
#address-cells = <1>;
diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revB.dts b/arch/arm/dts/zynqmp-sck-kv-g-revB.dts
index 7764adf..f935f25 100644
--- a/arch/arm/dts/zynqmp-sck-kv-g-revB.dts
+++ b/arch/arm/dts/zynqmp-sck-kv-g-revB.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2020 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <dt-bindings/gpio/gpio.h>
@@ -16,7 +16,8 @@
/plugin/;
&{/} {
- compatible = "xlnx,zynqmp-sk-kv260-rev1",
+ compatible = "xlnx,zynqmp-sk-kv260-rev2",
+ "xlnx,zynqmp-sk-kv260-rev1",
"xlnx,zynqmp-sk-kv260-revB",
"xlnx,zynqmp-sk-kv260", "xlnx,zynqmp";
model = "ZynqMP KV260 revB";
@@ -28,8 +29,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
u14: ina260@40 { /* u14 */
compatible = "ti,ina260";
@@ -152,6 +153,7 @@
pinctrl-0 = <&pinctrl_gem3_default>;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
+ assigned-clock-rates = <250000000>;
mdio: mdio {
#address-cells = <1>;
diff --git a/arch/arm/dts/zynqmp-sm-k24-revA.dts b/arch/arm/dts/zynqmp-sm-k24-revA.dts
index 2451440..653bd93 100644
--- a/arch/arm/dts/zynqmp-sm-k24-revA.dts
+++ b/arch/arm/dts/zynqmp-sm-k24-revA.dts
@@ -11,8 +11,9 @@
#include "zynqmp-sm-k26-revA.dts"
/ {
- model = "ZynqMP SM-K24 RevA";
- compatible = "xlnx,zynqmp-sm-k24-revA", "xlnx,zynqmp-sm-k24",
+ model = "ZynqMP SM-K24 RevA/B/1";
+ compatible = "xlnx,zynqmp-sm-k24-rev1", "xlnx,zynqmp-sm-k24-revB",
+ "xlnx,zynqmp-sm-k24-revA", "xlnx,zynqmp-sm-k24",
"xlnx,zynqmp";
memory@0 {
diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts
index f6ed047..d718fec 100644
--- a/arch/arm/dts/zynqmp-sm-k26-revA.dts
+++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2020 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -50,6 +50,17 @@
reg = <0x0 0x0 0x0 0x80000000>, <0x8 0x00000000 0x0 0x80000000>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ pmu_region: pmu@7ff00000 {
+ reg = <0x0 0x7ff00000 0x0 0x100000>;
+ no-map;
+ };
+ };
+
gpio-keys {
compatible = "gpio-keys";
autorepeat;
@@ -256,8 +267,8 @@
status = "okay";
bootph-all;
clock-frequency = <400000>;
- scl-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
eeprom: eeprom@50 { /* u46 - also at address 0x58 */
bootph-all;
@@ -352,7 +363,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&xilinx_ams {
diff --git a/arch/arm/dts/zynqmp-smk-k26-revA.dts b/arch/arm/dts/zynqmp-smk-k26-revA.dts
index c70966c..85b0d16 100644
--- a/arch/arm/dts/zynqmp-smk-k26-revA.dts
+++ b/arch/arm/dts/zynqmp-smk-k26-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2020 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include "zynqmp-sm-k26-revA.dts"
diff --git a/arch/arm/dts/zynqmp-zc1232-revA.dts b/arch/arm/dts/zynqmp-zc1232-revA.dts
index 63c553f..a288029 100644
--- a/arch/arm/dts/zynqmp-zc1232-revA.dts
+++ b/arch/arm/dts/zynqmp-zc1232-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-zc1254-revA.dts b/arch/arm/dts/zynqmp-zc1254-revA.dts
index 343033c..5c4acd17 100644
--- a/arch/arm/dts/zynqmp-zc1254-revA.dts
+++ b/arch/arm/dts/zynqmp-zc1254-revA.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2015 - 2020, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad Paladugu <sivadur@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-zc1751-xm015-dc1.dts b/arch/arm/dts/zynqmp-zc1751-xm015-dc1.dts
index 7ea2a1c..cffad44 100644
--- a/arch/arm/dts/zynqmp-zc1751-xm015-dc1.dts
+++ b/arch/arm/dts/zynqmp-zc1751-xm015-dc1.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2015 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -118,8 +118,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 36 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 37 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
eeprom: eeprom@55 {
compatible = "atmel,24c64"; /* 24AA64 */
diff --git a/arch/arm/dts/zynqmp-zc1751-xm016-dc2.dts b/arch/arm/dts/zynqmp-zc1751-xm016-dc2.dts
index b6bc2f5..bb04778 100644
--- a/arch/arm/dts/zynqmp-zc1751-xm016-dc2.dts
+++ b/arch/arm/dts/zynqmp-zc1751-xm016-dc2.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2015 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -109,8 +109,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u26: gpio@20 {
compatible = "ti,tca6416";
diff --git a/arch/arm/dts/zynqmp-zc1751-xm017-dc3.dts b/arch/arm/dts/zynqmp-zc1751-xm017-dc3.dts
index 6021f8b..69ad580 100644
--- a/arch/arm/dts/zynqmp-zc1751-xm017-dc3.dts
+++ b/arch/arm/dts/zynqmp-zc1751-xm017-dc3.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2016 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-zc1751-xm018-dc4.dts b/arch/arm/dts/zynqmp-zc1751-xm018-dc4.dts
index e153a64..3017c9b 100644
--- a/arch/arm/dts/zynqmp-zc1751-xm018-dc4.dts
+++ b/arch/arm/dts/zynqmp-zc1751-xm018-dc4.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2015 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-zc1751-xm019-dc5.dts b/arch/arm/dts/zynqmp-zc1751-xm019-dc5.dts
index ae2d03d..74a5b02 100644
--- a/arch/arm/dts/zynqmp-zc1751-xm019-dc5.dts
+++ b/arch/arm/dts/zynqmp-zc1751-xm019-dc5.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2015 - 2021, Xilinx, Inc.
*
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -91,8 +91,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 74 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 75 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 74 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 75 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&i2c1 {
@@ -100,8 +100,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 76 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 77 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 76 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 77 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
diff --git a/arch/arm/dts/zynqmp-zcu100-revC.dts b/arch/arm/dts/zynqmp-zcu100-revC.dts
index 742a539..a84cd86 100644
--- a/arch/arm/dts/zynqmp-zcu100-revC.dts
+++ b/arch/arm/dts/zynqmp-zcu100-revC.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2016 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
* Nathalie Chan King Choy
*/
@@ -188,8 +188,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
clock-frequency = <100000>;
i2c-mux@75 { /* u11 */
compatible = "nxp,pca9548";
@@ -569,6 +569,7 @@
pinctrl-0 = <&pinctrl_usb0_default>;
phy-names = "usb3-phy";
phys = <&psgtr 2 PHY_TYPE_USB3 0 0>;
+ /delete-property/ reset-gpios;
};
&dwc3_0 {
@@ -584,6 +585,7 @@
pinctrl-0 = <&pinctrl_usb1_default>;
phy-names = "usb3-phy";
phys = <&psgtr 3 PHY_TYPE_USB3 1 0>;
+ reset-gpios = <&modepin_gpio 1 GPIO_ACTIVE_LOW>;
};
&dwc3_1 {
diff --git a/arch/arm/dts/zynqmp-zcu102-rev1.0.dts b/arch/arm/dts/zynqmp-zcu102-rev1.0.dts
index d508f33..c0a4d91 100644
--- a/arch/arm/dts/zynqmp-zcu102-rev1.0.dts
+++ b/arch/arm/dts/zynqmp-zcu102-rev1.0.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2016 - 2020, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include "zynqmp-zcu102-revB.dts"
diff --git a/arch/arm/dts/zynqmp-zcu102-rev1.1.dts b/arch/arm/dts/zynqmp-zcu102-rev1.1.dts
index b679839..70536976 100644
--- a/arch/arm/dts/zynqmp-zcu102-rev1.1.dts
+++ b/arch/arm/dts/zynqmp-zcu102-rev1.1.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2016 - 2020, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include "zynqmp-zcu102-rev1.0.dts"
diff --git a/arch/arm/dts/zynqmp-zcu102-revA.dts b/arch/arm/dts/zynqmp-zcu102-revA.dts
index d78bfb8..79d67c4 100644
--- a/arch/arm/dts/zynqmp-zcu102-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu102-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2015 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -232,8 +232,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u97: gpio@20 {
compatible = "ti,tca6416";
@@ -496,8 +496,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
/* PL i2c via PCA9306 - u45 */
i2c-mux@74 { /* u34 */
diff --git a/arch/arm/dts/zynqmp-zcu102-revB.dts b/arch/arm/dts/zynqmp-zcu102-revB.dts
index de3b5ab..ce0a6e5 100644
--- a/arch/arm/dts/zynqmp-zcu102-revB.dts
+++ b/arch/arm/dts/zynqmp-zcu102-revB.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2016 - 2020, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include "zynqmp-zcu102-revA.dts"
diff --git a/arch/arm/dts/zynqmp-zcu104-revA.dts b/arch/arm/dts/zynqmp-zcu104-revA.dts
index b9d82af..90fbfca 100644
--- a/arch/arm/dts/zynqmp-zcu104-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu104-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -139,8 +139,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
/* Another connection to this bus via PL i2c via PCA9306 - u45 */
i2c-mux@74 { /* u34 */
diff --git a/arch/arm/dts/zynqmp-zcu104-revC.dts b/arch/arm/dts/zynqmp-zcu104-revC.dts
index 6f24e33..69470f8 100644
--- a/arch/arm/dts/zynqmp-zcu104-revC.dts
+++ b/arch/arm/dts/zynqmp-zcu104-revC.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -144,8 +144,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u97: gpio@20 {
compatible = "ti,tca6416";
diff --git a/arch/arm/dts/zynqmp-zcu106-rev1.0.dts b/arch/arm/dts/zynqmp-zcu106-rev1.0.dts
index f43c477..a9b5826 100644
--- a/arch/arm/dts/zynqmp-zcu106-rev1.0.dts
+++ b/arch/arm/dts/zynqmp-zcu106-rev1.0.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2016 - 2022, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include "zynqmp-zcu106-revA.dts"
diff --git a/arch/arm/dts/zynqmp-zcu106-revA.dts b/arch/arm/dts/zynqmp-zcu106-revA.dts
index 266c24e..7a8094a 100644
--- a/arch/arm/dts/zynqmp-zcu106-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu106-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2016 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -232,8 +232,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u97: gpio@20 {
compatible = "ti,tca6416";
@@ -495,8 +495,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
/* PL i2c via PCA9306 - u45 */
i2c-mux@74 { /* u34 */
diff --git a/arch/arm/dts/zynqmp-zcu111-revA.dts b/arch/arm/dts/zynqmp-zcu111-revA.dts
index 8535cc0..c9ff99f 100644
--- a/arch/arm/dts/zynqmp-zcu111-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu111-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -204,8 +204,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u22: gpio@20 {
compatible = "ti,tca6416";
@@ -384,8 +384,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-mux@74 { /* u26 */
compatible = "nxp,pca9548";
diff --git a/arch/arm/dts/zynqmp-zcu1275-revA.dts b/arch/arm/dts/zynqmp-zcu1275-revA.dts
index e88fc23..9404c13 100644
--- a/arch/arm/dts/zynqmp-zcu1275-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu1275-revA.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad Paladugu <sivadur@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-zcu1275-revB.dts b/arch/arm/dts/zynqmp-zcu1275-revB.dts
index 97ae1b2..c06d262 100644
--- a/arch/arm/dts/zynqmp-zcu1275-revB.dts
+++ b/arch/arm/dts/zynqmp-zcu1275-revB.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2018 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad Paladugu <sivadur@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-zcu1285-revA.dts b/arch/arm/dts/zynqmp-zcu1285-revA.dts
index eaf99a9..99ea143 100644
--- a/arch/arm/dts/zynqmp-zcu1285-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu1285-revA.dts
@@ -4,8 +4,8 @@
*
* (C) Copyright 2018 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad Paladugu <sivadur@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
/dts-v1/;
diff --git a/arch/arm/dts/zynqmp-zcu208-revA.dts b/arch/arm/dts/zynqmp-zcu208-revA.dts
index 7e7e157..9b3ae67 100644
--- a/arch/arm/dts/zynqmp-zcu208-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu208-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -222,7 +222,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&i2c0 {
@@ -231,8 +231,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u15: gpio@20 { /* u15 */
compatible = "ti,tca6416";
@@ -397,8 +397,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-mux@74 {
compatible = "nxp,pca9548"; /* u20 */
diff --git a/arch/arm/dts/zynqmp-zcu216-revA.dts b/arch/arm/dts/zynqmp-zcu216-revA.dts
index 35a3097..43eeaec 100644
--- a/arch/arm/dts/zynqmp-zcu216-revA.dts
+++ b/arch/arm/dts/zynqmp-zcu216-revA.dts
@@ -4,7 +4,7 @@
*
* (C) Copyright 2017 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
/dts-v1/;
@@ -228,7 +228,7 @@
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
- "", "", "", ""; /* 170 - 174 */
+ "", "", "", ""; /* 170 - 173 */
};
&gpu {
@@ -241,8 +241,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c0_default>;
pinctrl-1 = <&pinctrl_i2c0_gpio>;
- scl-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
tca6416_u15: gpio@20 { /* u15 */
compatible = "ti,tca6416";
@@ -407,8 +407,8 @@
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c1_default>;
pinctrl-1 = <&pinctrl_i2c1_gpio>;
- scl-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
- sda-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-mux@74 {
compatible = "nxp,pca9548"; /* u20 */
diff --git a/arch/arm/dts/zynqmp.dtsi b/arch/arm/dts/zynqmp.dtsi
index 6a16638..1632be8 100644
--- a/arch/arm/dts/zynqmp.dtsi
+++ b/arch/arm/dts/zynqmp.dtsi
@@ -4,7 +4,7 @@
*
* (C) Copyright 2014 - 2021, Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -33,6 +33,7 @@
operating-points-v2 = <&cpu_opp_table>;
reg = <0x0>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
};
cpu1: cpu@1 {
@@ -42,6 +43,7 @@
reg = <0x1>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
};
cpu2: cpu@2 {
@@ -51,6 +53,7 @@
reg = <0x2>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
};
cpu3: cpu@3 {
@@ -60,8 +63,15 @@
reg = <0x3>;
operating-points-v2 = <&cpu_opp_table>;
cpu-idle-states = <&CPU_SLEEP_0>;
+ next-level-cache = <&L2>;
};
+ L2: l2-cache {
+ compatible = "cache";
+ cache-level = <2>;
+ cache-unified;
+ };
+
idle-states {
entry-method = "psci";
@@ -111,7 +121,7 @@
#size-cells = <2>;
ranges;
- ipi_mailbox_pmu1: mailbox@ff990400 {
+ ipi_mailbox_pmu1: mailbox@ff9905c0 {
bootph-all;
reg = <0x0 0xff9905c0 0x0 0x20>,
<0x0 0xff9905e0 0x0 0x20>,
@@ -139,6 +149,10 @@
<0 144 4>,
<0 145 4>,
<0 146 4>;
+ interrupt-affinity = <&cpu0>,
+ <&cpu1>,
+ <&cpu2>,
+ <&cpu3>;
};
psci {
@@ -179,7 +193,6 @@
zynqmp_pcap: pcap {
compatible = "xlnx,zynqmp-pcap-fpga";
- clock-names = "ref_clk";
};
xlnx_aes: zynqmp-aes {
@@ -396,12 +409,12 @@
gpu: gpu@fd4b0000 {
status = "disabled";
- compatible = "arm,mali-400", "arm,mali-utgard";
+ compatible = "xlnx,zynqmp-mali", "arm,mali-400";
reg = <0x0 0xfd4b0000 0x0 0x10000>;
interrupt-parent = <&gic>;
interrupts = <0 132 4>, <0 132 4>, <0 132 4>, <0 132 4>, <0 132 4>, <0 132 4>;
- interrupt-names = "IRQGP", "IRQGPMMU", "IRQPP0", "IRQPPMMU0", "IRQPP1", "IRQPPMMU1";
- clock-names = "gpu", "gpu_pp0", "gpu_pp1";
+ interrupt-names = "gp", "gpmmu", "pp0", "ppmmu0", "pp1", "ppmmu1";
+ clock-names = "bus", "core";
power-domains = <&zynqmp_firmware PD_GPU>;
};
@@ -611,6 +624,7 @@
status = "disabled";
interrupt-parent = <&gic>;
interrupts = <0 17 4>;
+ clock-frequency = <400000>;
reg = <0x0 0xff020000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
@@ -622,6 +636,7 @@
status = "disabled";
interrupt-parent = <&gic>;
interrupts = <0 18 4>;
+ clock-frequency = <400000>;
reg = <0x0 0xff030000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
@@ -876,7 +891,6 @@
iommus = <&smmu 0x860>;
snps,quirk-frame-length-adjustment = <0x20>;
clock-names = "ref";
- snps,enable_guctl1_resume_quirk;
snps,enable_guctl1_ipd_quirk;
snps,xhci-stream-quirk;
snps,resume-hs-terminations;
@@ -908,7 +922,6 @@
iommus = <&smmu 0x861>;
snps,quirk-frame-length-adjustment = <0x20>;
clock-names = "ref";
- snps,enable_guctl1_resume_quirk;
snps,enable_guctl1_ipd_quirk;
snps,xhci-stream-quirk;
snps,resume-hs-terminations;
@@ -940,21 +953,19 @@
status = "disabled";
interrupt-parent = <&gic>;
interrupts = <0 56 4>;
- interrupt-names = "ams-irq";
reg = <0x0 0xffa50000 0x0 0x800>;
- reg-names = "ams-base";
#address-cells = <1>;
#size-cells = <1>;
#io-channel-cells = <1>;
ranges = <0 0 0xffa50800 0x800>;
- ams_ps: ams_ps@0 {
+ ams_ps: ams-ps@0 {
compatible = "xlnx,zynqmp-ams-ps";
status = "disabled";
reg = <0x0 0x400>;
};
- ams_pl: ams_pl@400 {
+ ams_pl: ams-pl@400 {
compatible = "xlnx,zynqmp-ams-pl";
status = "disabled";
reg = <0x400 0x400>;
diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h
index 63a51042..d585b5c 100644
--- a/arch/arm/include/asm/arch-mx5/clock.h
+++ b/arch/arm/include/asm/arch-mx5/clock.h
@@ -42,7 +42,7 @@
u32 imx_get_uartclk(void);
u32 imx_get_fecclk(void);
unsigned int mxc_get_clock(enum mxc_clock clk);
-int mxc_set_clock(u32 ref, u32 freq, u32 clk_type);
+int mxc_set_clock(u32 ref, u32 freq, enum mxc_clock clk);
void set_usb_phy_clk(void);
void enable_usb_phy1_clk(bool enable);
void enable_usb_phy2_clk(bool enable);
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h
index 6db869c..11774de 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h
@@ -148,10 +148,6 @@
struct dram_para {
u32 clk;
enum sunxi_dram_type type;
- u8 cols;
- u8 rows;
- u8 ranks;
- u8 bus_full_width;
u32 dx_odt;
u32 dx_dri;
u32 ca_dri;
@@ -163,6 +159,12 @@
u32 tpr12;
};
+struct dram_config {
+ u8 cols;
+ u8 rows;
+ u8 ranks;
+ u8 bus_full_width;
+};
static inline int ns_to_t(int nanoseconds)
{
@@ -171,6 +173,6 @@
return DIV_ROUND_UP(ctrl_freq * nanoseconds, 1000);
}
-void mctl_set_timing_params(struct dram_para *para);
+void mctl_set_timing_params(const struct dram_para *para);
#endif /* _SUNXI_DRAM_SUN50I_H616_H */
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index bae0a82..bf1c3c5 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -52,7 +52,7 @@
config SYS_K3_MCU_SCRATCHPAD_BASE
hex
default 0x40280000 if SOC_K3_AM654
- default 0x40280000 if SOC_K3_J721S2
+ default 0x41cff9fc if SOC_K3_J721S2
default 0x41cff9fc if SOC_K3_J721E
help
Describes the base address of MCU Scratchpad RAM.
diff --git a/arch/arm/mach-k3/Makefile b/arch/arm/mach-k3/Makefile
index b5bc236..fd77b8b 100644
--- a/arch/arm/mach-k3/Makefile
+++ b/arch/arm/mach-k3/Makefile
@@ -10,6 +10,13 @@
obj-$(CONFIG_ARM64) += arm64-mmu.o
obj-$(CONFIG_CPU_V7R) += r5_mpu.o lowlevel_init.o
obj-$(CONFIG_ARM64) += cache.o
+obj-$(CONFIG_OF_LIBFDT) += common_fdt.o
+ifeq ($(CONFIG_OF_LIBFDT)$(CONFIG_OF_SYSTEM_SETUP),yy)
+obj-$(CONFIG_SOC_K3_AM654) += am654_fdt.o
+obj-$(CONFIG_SOC_K3_J721E) += j721e_fdt.o
+obj-$(CONFIG_SOC_K3_J721S2) += j721s2_fdt.o
+obj-$(CONFIG_SOC_K3_AM625) += am625_fdt.o
+endif
ifeq ($(CONFIG_SPL_BUILD),y)
obj-$(CONFIG_SOC_K3_AM654) += am654_init.o
obj-$(CONFIG_SOC_K3_J721E) += j721e_init.o
diff --git a/arch/arm/mach-k3/am625_fdt.c b/arch/arm/mach-k3/am625_fdt.c
new file mode 100644
index 0000000..3780690
--- /dev/null
+++ b/arch/arm/mach-k3/am625_fdt.c
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2023 Toradex - https://www.toradex.com/
+ */
+
+#include <asm/hardware.h>
+#include "common_fdt.h"
+#include <fdt_support.h>
+
+static void fdt_fixup_cores_nodes_am625(void *blob, int core_nr)
+{
+ char node_path[32];
+
+ if (core_nr < 1)
+ return;
+
+ for (; core_nr < 4; core_nr++) {
+ snprintf(node_path, sizeof(node_path), "/cpus/cpu@%d", core_nr);
+ fdt_del_node_path(blob, node_path);
+ snprintf(node_path, sizeof(node_path), "/cpus/cpu-map/cluster0/core%d", core_nr);
+ fdt_del_node_path(blob, node_path);
+ snprintf(node_path, sizeof(node_path), "/bus@f0000/watchdog@e0%d0000", core_nr);
+ fdt_del_node_path(blob, node_path);
+ }
+}
+
+static void fdt_fixup_gpu_nodes_am625(void *blob, int has_gpu)
+{
+ if (!has_gpu) {
+ fdt_del_node_path(blob, "/bus@f0000/gpu@fd00000");
+ fdt_del_node_path(blob, "/bus@f0000/watchdog@e0f0000");
+ }
+}
+
+static void fdt_fixup_pru_node_am625(void *blob, int has_pru)
+{
+ if (!has_pru)
+ fdt_del_node_path(blob, "/bus@f0000/pruss@30040000");
+}
+
+static int k3_get_core_nr(void)
+{
+ u32 full_devid = readl(CTRLMMR_WKUP_JTAG_DEVICE_ID);
+
+ return (full_devid & JTAG_DEV_CORE_NR_MASK) >> JTAG_DEV_CORE_NR_SHIFT;
+}
+
+static int k3_has_pru(void)
+{
+ u32 full_devid = readl(CTRLMMR_WKUP_JTAG_DEVICE_ID);
+ u32 feature_mask = (full_devid & JTAG_DEV_FEATURES_MASK) >>
+ JTAG_DEV_FEATURES_SHIFT;
+
+ return !(feature_mask & JTAG_DEV_FEATURE_NO_PRU);
+}
+
+static int k3_has_gpu(void)
+{
+ u32 full_devid = readl(CTRLMMR_WKUP_JTAG_DEVICE_ID);
+
+ return (full_devid & JTAG_DEV_GPU_MASK) >> JTAG_DEV_GPU_SHIFT;
+}
+
+int ft_system_setup(void *blob, struct bd_info *bd)
+{
+ fdt_fixup_cores_nodes_am625(blob, k3_get_core_nr());
+ fdt_fixup_gpu_nodes_am625(blob, k3_has_gpu());
+ fdt_fixup_pru_node_am625(blob, k3_has_pru());
+
+ return 0;
+}
diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
index 787fe92..0e5d442 100644
--- a/arch/arm/mach-k3/am625_init.c
+++ b/arch/arm/mach-k3/am625_init.c
@@ -214,6 +214,7 @@
if (ret)
panic("DRAM init failed: %d\n", ret);
#endif
+ spl_enable_dcache();
}
u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
diff --git a/arch/arm/mach-k3/am62a7_init.c b/arch/arm/mach-k3/am62a7_init.c
index 1f51b04..d72e199 100644
--- a/arch/arm/mach-k3/am62a7_init.c
+++ b/arch/arm/mach-k3/am62a7_init.c
@@ -14,6 +14,10 @@
#include <dm/uclass-internal.h>
#include <dm/pinctrl.h>
+struct fwl_data cbass_main_fwls[] = {
+ { "FSS_DAT_REG3", 7, 8 },
+};
+
/*
* This uninitialized global variable would normal end up in the .bss section,
* but the .bss is cleared between writing and reading this variable, so move
@@ -166,6 +170,9 @@
/* Output System Firmware version info */
k3_sysfw_print_ver();
+ /* Disable ROM configured firewalls right after loading sysfw */
+ remove_fwl_configs(cbass_main_fwls, ARRAY_SIZE(cbass_main_fwls));
+
#if defined(CONFIG_K3_AM62A_DDRSS)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret)
@@ -174,7 +181,7 @@
setup_qos();
- printf("am62a_init: %s done\n", __func__);
+ debug("am62a_init: %s done\n", __func__);
}
static u32 __get_backup_bootmedia(u32 devstat)
@@ -272,7 +279,7 @@
else
bootmedia = __get_backup_bootmedia(devstat);
- printf("am62a_init: %s: devstat = 0x%x bootmedia = 0x%x bootindex = %d\n",
+ debug("am62a_init: %s: devstat = 0x%x bootmedia = 0x%x bootindex = %d\n",
__func__, devstat, bootmedia, bootindex);
return bootmedia;
}
diff --git a/arch/arm/mach-k3/am62ax/dev-data.c b/arch/arm/mach-k3/am62ax/dev-data.c
index 74739c6..abf5d8e 100644
--- a/arch/arm/mach-k3/am62ax/dev-data.c
+++ b/arch/arm/mach-k3/am62ax/dev-data.c
@@ -66,8 +66,8 @@
.pd = soc_pd_list,
.lpsc = soc_lpsc_list,
.devs = soc_dev_list,
- .num_psc = 2,
- .num_pd = 4,
- .num_lpsc = 14,
- .num_devs = 19,
+ .num_psc = ARRAY_SIZE(soc_psc_list),
+ .num_pd = ARRAY_SIZE(soc_pd_list),
+ .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+ .num_devs = ARRAY_SIZE(soc_dev_list),
};
diff --git a/arch/arm/mach-k3/am62x/dev-data.c b/arch/arm/mach-k3/am62x/dev-data.c
index 616d065..1a6f9e2 100644
--- a/arch/arm/mach-k3/am62x/dev-data.c
+++ b/arch/arm/mach-k3/am62x/dev-data.c
@@ -71,8 +71,8 @@
.pd = soc_pd_list,
.lpsc = soc_lpsc_list,
.devs = soc_dev_list,
- .num_psc = 2,
- .num_pd = 5,
- .num_lpsc = 16,
- .num_devs = 21,
+ .num_psc = ARRAY_SIZE(soc_psc_list),
+ .num_pd = ARRAY_SIZE(soc_pd_list),
+ .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+ .num_devs = ARRAY_SIZE(soc_dev_list),
};
diff --git a/arch/arm/mach-k3/am654_fdt.c b/arch/arm/mach-k3/am654_fdt.c
new file mode 100644
index 0000000..652fe8d
--- /dev/null
+++ b/arch/arm/mach-k3/am654_fdt.c
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2023 Toradex - https://www.toradex.com/
+ */
+
+#include "common_fdt.h"
+#include <fdt_support.h>
+
+int ft_system_setup(void *blob, struct bd_info *bd)
+{
+ return fdt_fixup_msmc_ram_k3(blob);
+}
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index bda0152..a351104 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -357,97 +357,6 @@
}
#endif
-#if defined(CONFIG_OF_LIBFDT)
-int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name)
-{
- u64 msmc_start = 0, msmc_end = 0, msmc_size, reg[2];
- struct ti_sci_handle *ti_sci = get_ti_sci_handle();
- int ret, node, subnode, len, prev_node;
- u32 range[4], addr, size;
- const fdt32_t *sub_reg;
-
- ti_sci->ops.core_ops.query_msmc(ti_sci, &msmc_start, &msmc_end);
- msmc_size = msmc_end - msmc_start + 1;
- debug("%s: msmc_start = 0x%llx, msmc_size = 0x%llx\n", __func__,
- msmc_start, msmc_size);
-
- /* find or create "msmc_sram node */
- ret = fdt_path_offset(blob, parent_path);
- if (ret < 0)
- return ret;
-
- node = fdt_find_or_add_subnode(blob, ret, node_name);
- if (node < 0)
- return node;
-
- ret = fdt_setprop_string(blob, node, "compatible", "mmio-sram");
- if (ret < 0)
- return ret;
-
- reg[0] = cpu_to_fdt64(msmc_start);
- reg[1] = cpu_to_fdt64(msmc_size);
- ret = fdt_setprop(blob, node, "reg", reg, sizeof(reg));
- if (ret < 0)
- return ret;
-
- fdt_setprop_cell(blob, node, "#address-cells", 1);
- fdt_setprop_cell(blob, node, "#size-cells", 1);
-
- range[0] = 0;
- range[1] = cpu_to_fdt32(msmc_start >> 32);
- range[2] = cpu_to_fdt32(msmc_start & 0xffffffff);
- range[3] = cpu_to_fdt32(msmc_size);
- ret = fdt_setprop(blob, node, "ranges", range, sizeof(range));
- if (ret < 0)
- return ret;
-
- subnode = fdt_first_subnode(blob, node);
- prev_node = 0;
-
- /* Look for invalid subnodes and delete them */
- while (subnode >= 0) {
- sub_reg = fdt_getprop(blob, subnode, "reg", &len);
- addr = fdt_read_number(sub_reg, 1);
- sub_reg++;
- size = fdt_read_number(sub_reg, 1);
- debug("%s: subnode = %d, addr = 0x%x. size = 0x%x\n", __func__,
- subnode, addr, size);
- if (addr + size > msmc_size ||
- !strncmp(fdt_get_name(blob, subnode, &len), "sysfw", 5) ||
- !strncmp(fdt_get_name(blob, subnode, &len), "l3cache", 7)) {
- fdt_del_node(blob, subnode);
- debug("%s: deleting subnode %d\n", __func__, subnode);
- if (!prev_node)
- subnode = fdt_first_subnode(blob, node);
- else
- subnode = fdt_next_subnode(blob, prev_node);
- } else {
- prev_node = subnode;
- subnode = fdt_next_subnode(blob, prev_node);
- }
- }
-
- return 0;
-}
-
-#if defined(CONFIG_OF_SYSTEM_SETUP)
-int ft_system_setup(void *blob, struct bd_info *bd)
-{
- int ret;
-
- ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000");
- if (ret < 0)
- ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000",
- "sram@70000000");
- if (ret)
- printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
-
- return ret;
-}
-#endif
-
-#endif
-
#ifndef CONFIG_SYSRESET
void reset_cpu(void)
{
@@ -588,8 +497,7 @@
/* Don't disable the background regions */
if (region.control != 0 &&
- ((region.control & K3_FIREWALL_BACKGROUND_BIT) ==
- fwl_type)) {
+ ((region.control >> K3_FIREWALL_BACKGROUND_BIT) & 1) == fwl_type) {
pr_debug("Attempting to disable firewall %5d (%25s)\n",
region.fwl_id, fwl_data.name);
region.control = 0;
@@ -629,8 +537,10 @@
ram_top = (phys_addr_t) 0x100000000;
gd->arch.tlb_addr = ram_top - gd->arch.tlb_size;
+ gd->arch.tlb_addr &= ~(0x10000 - 1);
debug("TLB table from %08lx to %08lx\n", gd->arch.tlb_addr,
gd->arch.tlb_addr + gd->arch.tlb_size);
+ gd->relocaddr = gd->arch.tlb_addr;
dcache_enable();
#endif
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index 6cffbd4..9bd9ad6 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -9,7 +9,7 @@
#include <asm/armv7_mpu.h>
#include <asm/hardware.h>
-#define K3_FIREWALL_BACKGROUND_BIT BIT(8)
+#define K3_FIREWALL_BACKGROUND_BIT (8)
struct fwl_data {
const char *name;
diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c
new file mode 100644
index 0000000..9478f60
--- /dev/null
+++ b/arch/arm/mach-k3/common_fdt.c
@@ -0,0 +1,113 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2023 Toradex - https://www.toradex.com/
+ */
+
+#include "common.h"
+#include <dm.h>
+#include <fdt_support.h>
+#include <linux/soc/ti/ti_sci_protocol.h>
+
+static int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name)
+{
+ u64 msmc_start = 0, msmc_end = 0, msmc_size, reg[2];
+ struct ti_sci_handle *ti_sci = get_ti_sci_handle();
+ int ret, node, subnode, len, prev_node;
+ u32 range[4], addr, size;
+ const fdt32_t *sub_reg;
+
+ ti_sci->ops.core_ops.query_msmc(ti_sci, &msmc_start, &msmc_end);
+ msmc_size = msmc_end - msmc_start + 1;
+ debug("%s: msmc_start = 0x%llx, msmc_size = 0x%llx\n", __func__,
+ msmc_start, msmc_size);
+
+ /* find or create "msmc_sram node */
+ ret = fdt_path_offset(blob, parent_path);
+ if (ret < 0)
+ return ret;
+
+ node = fdt_find_or_add_subnode(blob, ret, node_name);
+ if (node < 0)
+ return node;
+
+ ret = fdt_setprop_string(blob, node, "compatible", "mmio-sram");
+ if (ret < 0)
+ return ret;
+
+ reg[0] = cpu_to_fdt64(msmc_start);
+ reg[1] = cpu_to_fdt64(msmc_size);
+ ret = fdt_setprop(blob, node, "reg", reg, sizeof(reg));
+ if (ret < 0)
+ return ret;
+
+ fdt_setprop_cell(blob, node, "#address-cells", 1);
+ fdt_setprop_cell(blob, node, "#size-cells", 1);
+
+ range[0] = 0;
+ range[1] = cpu_to_fdt32(msmc_start >> 32);
+ range[2] = cpu_to_fdt32(msmc_start & 0xffffffff);
+ range[3] = cpu_to_fdt32(msmc_size);
+ ret = fdt_setprop(blob, node, "ranges", range, sizeof(range));
+ if (ret < 0)
+ return ret;
+
+ subnode = fdt_first_subnode(blob, node);
+ prev_node = 0;
+
+ /* Look for invalid subnodes and delete them */
+ while (subnode >= 0) {
+ sub_reg = fdt_getprop(blob, subnode, "reg", &len);
+ addr = fdt_read_number(sub_reg, 1);
+ sub_reg++;
+ size = fdt_read_number(sub_reg, 1);
+ debug("%s: subnode = %d, addr = 0x%x. size = 0x%x\n", __func__,
+ subnode, addr, size);
+ if (addr + size > msmc_size ||
+ !strncmp(fdt_get_name(blob, subnode, &len), "sysfw", 5) ||
+ !strncmp(fdt_get_name(blob, subnode, &len), "l3cache", 7)) {
+ fdt_del_node(blob, subnode);
+ debug("%s: deleting subnode %d\n", __func__, subnode);
+ if (!prev_node)
+ subnode = fdt_first_subnode(blob, node);
+ else
+ subnode = fdt_next_subnode(blob, prev_node);
+ } else {
+ prev_node = subnode;
+ subnode = fdt_next_subnode(blob, prev_node);
+ }
+ }
+
+ return 0;
+}
+
+int fdt_fixup_msmc_ram_k3(void *blob)
+{
+ int ret;
+
+ ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000");
+ if (ret < 0)
+ ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000",
+ "sram@70000000");
+ if (ret)
+ printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
+
+ return ret;
+}
+
+int fdt_del_node_path(void *blob, const char *path)
+{
+ int ret;
+ int nodeoff;
+
+ nodeoff = fdt_path_offset(blob, path);
+ if (nodeoff < 0)
+ return 0; /* Not found, skip it */
+
+ ret = fdt_del_node(blob, nodeoff);
+ if (ret < 0)
+ printf("Unable to delete node %s, err=%s\n", path, fdt_strerror(ret));
+ else
+ debug("Deleted node %s\n", path);
+
+ return ret;
+}
diff --git a/arch/arm/mach-k3/common_fdt.h b/arch/arm/mach-k3/common_fdt.h
new file mode 100644
index 0000000..46c3dc5
--- /dev/null
+++ b/arch/arm/mach-k3/common_fdt.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright 2023 Toradex - https://www.toradex.com/
+ */
+
+#ifndef _COMMON_FDT_H
+#define _COMMON_FDT_H
+
+int fdt_fixup_msmc_ram_k3(void *blob);
+
+#endif /* _COMMON_FDT_H */
diff --git a/arch/arm/mach-k3/config.mk b/arch/arm/mach-k3/config.mk
deleted file mode 100644
index cbf9c10..0000000
--- a/arch/arm/mach-k3/config.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
-# Lokesh Vutla <lokeshvutla@ti.com>
-
-ifdef CONFIG_SPL_BUILD
-
-# Openssl is required to generate x509 certificate.
-# Error out if openssl is not available.
-ifeq ($(shell which openssl),)
-$(error "No openssl in $(PATH), consider installing openssl")
-endif
-
-IMAGE_SIZE= $(shell cat $(obj)/u-boot-spl.bin | wc -c)
-MAX_SIZE= $(shell printf "%d" $(CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE))
-
-ifeq ($(CONFIG_SYS_K3_KEY), "")
-KEY=""
-# On HS use real key or warn if not available
-ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-ifneq ($(wildcard $(TI_SECURE_DEV_PKG)/keys/custMpk.pem),)
-KEY=$(TI_SECURE_DEV_PKG)/keys/custMpk.pem
-else
-$(warning "WARNING: signing key not found. Random key will NOT work on HS hardware!")
-endif
-endif
-else
-KEY=$(patsubst "%",$(srctree)/%,$(CONFIG_SYS_K3_KEY))
-endif
-
-# X509 SWRV default
-SWRV = $(CONFIG_K3_X509_SWRV)
-# On HS use SECDEV provided software revision or warn if not available
-ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-ifneq ($(wildcard $(TI_SECURE_DEV_PKG)/keys/swrv.txt),)
-SWRV= $(shell cat $(TI_SECURE_DEV_PKG)/keys/swrv.txt)
-else
-$(warning "WARNING: Software revision file not found. Default may not work on HS hardware.")
-endif
-endif
-
-# tiboot3.bin is mandated by ROM and ROM only supports R5 boot.
-# So restrict tiboot3.bin creation for CPU_V7R.
-ifdef CONFIG_CPU_V7R
-image_check: $(obj)/u-boot-spl.bin FORCE
- @if [ $(IMAGE_SIZE) -gt $(MAX_SIZE) ]; then \
- echo "===============================================" >&2; \
- echo "ERROR: Final Image too big. " >&2; \
- echo "$< size = $(IMAGE_SIZE), max size = $(MAX_SIZE)" >&2; \
- echo "===============================================" >&2; \
- exit 1; \
- fi
-
-tiboot3.bin: image_check FORCE
- $(srctree)/tools/k3_gen_x509_cert.sh -c 16 -b $(obj)/u-boot-spl.bin \
- -o $@ -l $(CONFIG_SPL_TEXT_BASE) -r $(SWRV) -k $(KEY)
-
-INPUTS-y += tiboot3.bin
-endif
-
-ifdef CONFIG_ARM64
-
-ifeq ($(CONFIG_SOC_K3_J721E),)
-export DM := /dev/null
-endif
-
-ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-SPL_ITS := u-boot-spl-k3_HS.its
-$(SPL_ITS): export IS_HS=1
-INPUTS-y += tispl.bin_HS
-INPUTS-y += tispl.bin
-tispl.bin: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(subst ",,$(CONFIG_SPL_OF_LIST)))
-else
-SPL_ITS := u-boot-spl-k3.its
-INPUTS-y += tispl.bin
-endif
-
-ifeq ($(CONFIG_SPL_OF_LIST),)
-LIST_OF_DTB := $(CONFIG_DEFAULT_DEVICE_TREE)
-else
-LIST_OF_DTB := $(CONFIG_SPL_OF_LIST)
-endif
-
-quiet_cmd_k3_mkits = MKITS $@
-cmd_k3_mkits = \
- $(srctree)/tools/k3_fit_atf.sh \
- $(CONFIG_K3_ATF_LOAD_ADDR) \
- $(patsubst %,$(obj)/dts/%.dtb,$(subst ",,$(LIST_OF_DTB))) > $@
-
-$(SPL_ITS): FORCE
- $(call cmd,k3_mkits)
-endif
-
-else
-
-ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-INPUTS-y += u-boot.img_HS
-else
-INPUTS-y += u-boot.img
-endif
-endif
-
-include $(srctree)/arch/arm/mach-k3/config_secure.mk
diff --git a/arch/arm/mach-k3/include/mach/am62_hardware.h b/arch/arm/mach-k3/include/mach/am62_hardware.h
index 88d5894..acd2d10 100644
--- a/arch/arm/mach-k3/include/mach/am62_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am62_hardware.h
@@ -20,6 +20,28 @@
#define MCU_CTRL_MMR0_BASE 0x04500000
#define WKUP_CTRL_MMR0_BASE 0x43000000
+#define CTRLMMR_WKUP_JTAG_DEVICE_ID (WKUP_CTRL_MMR0_BASE + 0x18)
+#define JTAG_DEV_ID_MASK GENMASK(31, 18)
+#define JTAG_DEV_ID_SHIFT 18
+#define JTAG_DEV_CORE_NR_MASK GENMASK(21, 19)
+#define JTAG_DEV_CORE_NR_SHIFT 19
+#define JTAG_DEV_GPU_MASK BIT(18)
+#define JTAG_DEV_GPU_SHIFT 18
+#define JTAG_DEV_FEATURES_MASK GENMASK(17, 13)
+#define JTAG_DEV_FEATURES_SHIFT 13
+#define JTAG_DEV_SECURITY_MASK BIT(12)
+#define JTAG_DEV_SECURITY_SHIFT 12
+#define JTAG_DEV_SAFETY_MASK BIT(11)
+#define JTAG_DEV_SAFETY_SHIFT 11
+#define JTAG_DEV_SPEED_MASK GENMASK(10, 6)
+#define JTAG_DEV_SPEED_SHIFT 6
+#define JTAG_DEV_TEMP_MASK GENMASK(5, 3)
+#define JTAG_DEV_TEMP_SHIFT 3
+#define JTAG_DEV_PKG_MASK GENMASK(2, 0)
+#define JTAG_DEV_PKG_SHIFT 0
+
+#define JTAG_DEV_FEATURE_NO_PRU 0x4
+
#define CTRLMMR_MAIN_DEVSTAT (WKUP_CTRL_MMR0_BASE + 0x30)
#define MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK GENMASK(6, 3)
#define MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT 3
diff --git a/arch/arm/mach-k3/j7200/dev-data.c b/arch/arm/mach-k3/j7200/dev-data.c
index c1a4dab..4ddc342 100644
--- a/arch/arm/mach-k3/j7200/dev-data.c
+++ b/arch/arm/mach-k3/j7200/dev-data.c
@@ -75,8 +75,8 @@
.pd = soc_pd_list,
.lpsc = soc_lpsc_list,
.devs = soc_dev_list,
- .num_psc = 2,
- .num_pd = 6,
- .num_lpsc = 17,
- .num_devs = 23,
+ .num_psc = ARRAY_SIZE(soc_psc_list),
+ .num_pd = ARRAY_SIZE(soc_pd_list),
+ .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+ .num_devs = ARRAY_SIZE(soc_dev_list),
};
diff --git a/arch/arm/mach-k3/j721e/dev-data.c b/arch/arm/mach-k3/j721e/dev-data.c
index f0afa35..97f017f 100644
--- a/arch/arm/mach-k3/j721e/dev-data.c
+++ b/arch/arm/mach-k3/j721e/dev-data.c
@@ -73,8 +73,8 @@
.pd = soc_pd_list,
.lpsc = soc_lpsc_list,
.devs = soc_dev_list,
- .num_psc = 2,
- .num_pd = 5,
- .num_lpsc = 16,
- .num_devs = 23,
+ .num_psc = ARRAY_SIZE(soc_psc_list),
+ .num_pd = ARRAY_SIZE(soc_pd_list),
+ .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+ .num_devs = ARRAY_SIZE(soc_dev_list),
};
diff --git a/arch/arm/mach-k3/j721e_fdt.c b/arch/arm/mach-k3/j721e_fdt.c
new file mode 100644
index 0000000..652fe8d
--- /dev/null
+++ b/arch/arm/mach-k3/j721e_fdt.c
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2023 Toradex - https://www.toradex.com/
+ */
+
+#include "common_fdt.h"
+#include <fdt_support.h>
+
+int ft_system_setup(void *blob, struct bd_info *bd)
+{
+ return fdt_fixup_msmc_ram_k3(blob);
+}
diff --git a/arch/arm/mach-k3/j721s2/dev-data.c b/arch/arm/mach-k3/j721s2/dev-data.c
index 35e8b17..8c999a3 100644
--- a/arch/arm/mach-k3/j721s2/dev-data.c
+++ b/arch/arm/mach-k3/j721s2/dev-data.c
@@ -79,8 +79,8 @@
.pd = soc_pd_list,
.lpsc = soc_lpsc_list,
.devs = soc_dev_list,
- .num_psc = 2,
- .num_pd = 6,
- .num_lpsc = 19,
- .num_devs = 25,
+ .num_psc = ARRAY_SIZE(soc_psc_list),
+ .num_pd = ARRAY_SIZE(soc_pd_list),
+ .num_lpsc = ARRAY_SIZE(soc_lpsc_list),
+ .num_devs = ARRAY_SIZE(soc_dev_list),
};
diff --git a/arch/arm/mach-k3/j721s2_fdt.c b/arch/arm/mach-k3/j721s2_fdt.c
new file mode 100644
index 0000000..652fe8d
--- /dev/null
+++ b/arch/arm/mach-k3/j721s2_fdt.c
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2023 Toradex - https://www.toradex.com/
+ */
+
+#include "common_fdt.h"
+#include <fdt_support.h>
+
+int ft_system_setup(void *blob, struct bd_info *bd)
+{
+ return fdt_fixup_msmc_ram_k3(blob);
+}
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index 02a2c12..6038c96 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -91,8 +91,9 @@
return;
}
- if (get_device_type() != K3_DEVICE_TYPE_HS_SE &&
- get_device_type() != K3_DEVICE_TYPE_HS_FS)
+ if (get_device_type() == K3_DEVICE_TYPE_GP &&
+ (get_device_type() != K3_DEVICE_TYPE_HS_SE &&
+ !ti_secure_cert_detected(*p_image)))
return;
/* Clean out image so it can be seen by system firmware */
diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c
index a6a97af..9daaeef 100644
--- a/arch/arm/mach-omap2/emif-common.c
+++ b/arch/arm/mach-omap2/emif-common.c
@@ -40,7 +40,7 @@
readl(&emif->emif_pwr_mgmt_ctrl);
}
-void force_emif_self_refresh()
+void force_emif_self_refresh(void)
{
set_lpmode_selfrefresh(EMIF1_BASE);
if (!is_dra72x())
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 6e6791f..7d93872 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -100,8 +100,7 @@
return 0;
}
- /* Check only for EFI (GPT) partition table */
- res = part_get_info_by_name_type(dev_desc, part, &info, PART_TYPE_EFI);
+ res = part_get_info_by_name(dev_desc, part, &info);
if (res < 0)
return 0;
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 6dcbb09..e20c3a3 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -207,7 +207,6 @@
config MACH_SUNXI_H3_H5
bool
- select PHY_SUN4I_USB
select SUNXI_DE2
select SUNXI_DRAM_DW
select SUNXI_DRAM_DW_32BIT
@@ -236,7 +235,6 @@
config MACH_SUN4I
bool "sun4i (Allwinner A10)"
select CPU_V7A
- select PHY_SUN4I_USB
select DRAM_SUN4I
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
@@ -247,7 +245,6 @@
bool "sun5i (Allwinner A13)"
select CPU_V7A
select DRAM_SUN4I
- select PHY_SUN4I_USB
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
imply SPL_SYS_I2C_LEGACY
@@ -261,7 +258,6 @@
select ARCH_SUPPORT_PSCI
select SPL_ARMV7_SET_CORTEX_SMPEN
select DRAM_SUN6I
- select PHY_SUN4I_USB
select SPL_I2C
select SUN6I_PRCM
select SUNXI_GEN_SUN6I
@@ -277,7 +273,6 @@
select ARCH_SUPPORT_PSCI
select SPL_ARMV7_SET_CORTEX_SMPEN
select DRAM_SUN4I
- select PHY_SUN4I_USB
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
@@ -291,7 +286,6 @@
select CPU_V7_HAS_VIRT
select ARCH_SUPPORT_PSCI
select DRAM_SUN8I_A23
- select PHY_SUN4I_USB
select SPL_I2C
select SUNXI_GEN_SUN6I
select SUPPORT_SPL
@@ -305,7 +299,6 @@
select CPU_V7_HAS_VIRT
select ARCH_SUPPORT_PSCI
select DRAM_SUN8I_A33
- select PHY_SUN4I_USB
select SPL_I2C
select SUNXI_GEN_SUN6I
select SUPPORT_SPL
@@ -316,7 +309,6 @@
bool "sun8i (Allwinner A83T)"
select CPU_V7A
select DRAM_SUN8I_A83T
- select PHY_SUN4I_USB
select SPL_I2C
select SUNXI_GEN_SUN6I
select MMC_SUNXI_HAS_NEW_MODE
@@ -344,7 +336,6 @@
select SUPPORT_SPL
select SUNXI_DRAM_DW
select SUNXI_DRAM_DW_32BIT
- select PHY_SUN4I_USB
imply SPL_SYS_I2C_LEGACY
config MACH_SUN8I_V3S
@@ -372,7 +363,6 @@
config MACH_SUN50I
bool "sun50i (Allwinner A64)"
select ARM64
- select PHY_SUN4I_USB
select SUN6I_PRCM
select SUNXI_DE2
select SUNXI_GEN_SUN6I
@@ -395,7 +385,6 @@
config MACH_SUN50I_H6
bool "sun50i (Allwinner H6)"
select ARM64
- select PHY_SUN4I_USB
select DRAM_SUN50I_H6
select SUN50I_GEN_H6
@@ -442,7 +431,7 @@
This allows both the SPL and the U-Boot proper to be entered in
either mode and switch to AArch64 if needed.
-if SUNXI_DRAM_DW || DRAM_SUN50I_H6
+if SUNXI_DRAM_DW || DRAM_SUN50I_H6 || DRAM_SUN50I_H616
config SUNXI_DRAM_DDR3
bool
@@ -487,6 +476,22 @@
This option is the DDR3 timing used by the boot0 on H6 TV boxes
which use a DDR3-1333 timing.
+config SUNXI_DRAM_H616_LPDDR3
+ bool "LPDDR3 DRAM chips on the H616 DRAM controller"
+ select SUNXI_DRAM_LPDDR3
+ depends on DRAM_SUN50I_H616
+ help
+ This option is the LPDDR3 timing used by the stock boot0 by
+ Allwinner.
+
+config SUNXI_DRAM_H616_DDR3_1333
+ bool "DDR3-1333 boot0 timings on the H616 DRAM controller"
+ select SUNXI_DRAM_DDR3
+ depends on DRAM_SUN50I_H616
+ help
+ This option is the DDR3 timing used by the boot0 on H616 TV boxes
+ which use a DDR3-1333 timing.
+
config SUNXI_DRAM_DDR2_V3S
bool "DDR2 found in V3s chip"
select SUNXI_DRAM_DDR2
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c
index b332f3a..bff2e42 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_h6.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c
@@ -93,7 +93,8 @@
MBUS_QOS_HIGH,
MBUS_QOS_HIGHEST
};
-inline void mbus_configure_port(u8 port,
+
+static void mbus_configure_port(u8 port,
bool bwlimit,
bool priority,
u8 qos,
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c
index 1f9416d..7e580b6 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_h616.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c
@@ -31,7 +31,7 @@
MBUS_QOS_HIGHEST
};
-inline void mbus_configure_port(u8 port,
+static void mbus_configure_port(u8 port,
bool bwlimit,
bool priority,
u8 qos,
@@ -92,7 +92,7 @@
dmb();
}
-static void mctl_sys_init(struct dram_para *para)
+static void mctl_sys_init(u32 clk_rate)
{
struct sunxi_ccm_reg * const ccm =
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
@@ -114,7 +114,7 @@
/* Set PLL5 rate to doubled DRAM clock rate */
writel(CCM_PLL5_CTRL_EN | CCM_PLL5_LOCK_EN | CCM_PLL5_OUT_EN |
- CCM_PLL5_CTRL_N(para->clk * 2 / 24), &ccm->pll5_cfg);
+ CCM_PLL5_CTRL_N(clk_rate * 2 / 24), &ccm->pll5_cfg);
mctl_await_completion(&ccm->pll5_cfg, CCM_PLL5_LOCK, CCM_PLL5_LOCK);
/* Configure DRAM mod clock */
@@ -141,15 +141,15 @@
writel(0x8000, &mctl_ctl->clken);
}
-static void mctl_set_addrmap(struct dram_para *para)
+static void mctl_set_addrmap(const struct dram_config *config)
{
struct sunxi_mctl_ctl_reg * const mctl_ctl =
(struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE;
- u8 cols = para->cols;
- u8 rows = para->rows;
- u8 ranks = para->ranks;
+ u8 cols = config->cols;
+ u8 rows = config->rows;
+ u8 ranks = config->ranks;
- if (!para->bus_full_width)
+ if (!config->bus_full_width)
cols -= 1;
/* Ranks */
@@ -228,13 +228,20 @@
}
static const u8 phy_init[] = {
+#ifdef CONFIG_SUNXI_DRAM_H616_DDR3_1333
0x07, 0x0b, 0x02, 0x16, 0x0d, 0x0e, 0x14, 0x19,
0x0a, 0x15, 0x03, 0x13, 0x04, 0x0c, 0x10, 0x06,
0x0f, 0x11, 0x1a, 0x01, 0x12, 0x17, 0x00, 0x08,
0x09, 0x05, 0x18
+#elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR3)
+ 0x18, 0x06, 0x00, 0x05, 0x04, 0x03, 0x09, 0x02,
+ 0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x07,
+ 0x17, 0x19, 0x1a
+#endif
};
-static void mctl_phy_configure_odt(struct dram_para *para)
+static void mctl_phy_configure_odt(const struct dram_para *para)
{
unsigned int val;
@@ -263,25 +270,37 @@
writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x34c);
val = para->dx_odt & 0x1f;
- writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x380);
+ if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ writel_relaxed(0, SUNXI_DRAM_PHY0_BASE + 0x380);
+ else
+ writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x380);
writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x384);
val = (para->dx_odt >> 8) & 0x1f;
- writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x3c0);
+ if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ writel_relaxed(0, SUNXI_DRAM_PHY0_BASE + 0x3c0);
+ else
+ writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x3c0);
writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x3c4);
val = (para->dx_odt >> 16) & 0x1f;
- writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x400);
+ if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ writel_relaxed(0, SUNXI_DRAM_PHY0_BASE + 0x400);
+ else
+ writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x400);
writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x404);
val = (para->dx_odt >> 24) & 0x1f;
- writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x440);
+ if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ writel_relaxed(0, SUNXI_DRAM_PHY0_BASE + 0x440);
+ else
+ writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x440);
writel_relaxed(val, SUNXI_DRAM_PHY0_BASE + 0x444);
dmb();
}
-static bool mctl_phy_write_leveling(struct dram_para *para)
+static bool mctl_phy_write_leveling(const struct dram_config *config)
{
bool result = true;
u32 val;
@@ -292,7 +311,7 @@
setbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 4);
- if (para->bus_full_width)
+ if (config->bus_full_width)
val = 0xf;
else
val = 3;
@@ -316,12 +335,12 @@
clrbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 0xc0);
- if (para->ranks == 2) {
+ if (config->ranks == 2) {
clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 0xc0, 0x40);
setbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 4);
- if (para->bus_full_width)
+ if (config->bus_full_width)
val = 0xf;
else
val = 3;
@@ -336,7 +355,7 @@
return result;
}
-static bool mctl_phy_read_calibration(struct dram_para *para)
+static bool mctl_phy_read_calibration(const struct dram_config *config)
{
bool result = true;
u32 val, tmp;
@@ -345,7 +364,7 @@
setbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 1);
- if (para->bus_full_width)
+ if (config->bus_full_width)
val = 0xf;
else
val = 3;
@@ -361,7 +380,7 @@
clrbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 0x30);
- if (para->ranks == 2) {
+ if (config->ranks == 2) {
clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 0x30, 0x10);
setbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 1);
@@ -395,7 +414,7 @@
return result;
}
-static bool mctl_phy_read_training(struct dram_para *para)
+static bool mctl_phy_read_training(const struct dram_config *config)
{
u32 val1, val2, *ptr1, *ptr2;
bool result = true;
@@ -414,7 +433,7 @@
if (readl(SUNXI_DRAM_PHY0_BASE + 0x840) & 3)
result = false;
- if (para->bus_full_width) {
+ if (config->bus_full_width) {
mctl_await_completion((u32 *)(SUNXI_DRAM_PHY0_BASE + 0xa40), 0xc, 0xc);
if (readl(SUNXI_DRAM_PHY0_BASE + 0xa40) & 3)
result = false;
@@ -437,7 +456,7 @@
result = false;
}
- if (para->bus_full_width) {
+ if (config->bus_full_width) {
ptr1 = (u32 *)(SUNXI_DRAM_PHY0_BASE + 0xa98);
ptr2 = (u32 *)(SUNXI_DRAM_PHY0_BASE + 0xa50);
for (i = 0; i < 9; i++) {
@@ -459,7 +478,7 @@
clrbits_le32(SUNXI_DRAM_PHY0_BASE + 0x190, 3);
- if (para->ranks == 2) {
+ if (config->ranks == 2) {
/* maybe last parameter should be 1? */
clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 0x198, 3, 2);
@@ -470,7 +489,7 @@
if (readl(SUNXI_DRAM_PHY0_BASE + 0x840) & 3)
result = false;
- if (para->bus_full_width) {
+ if (config->bus_full_width) {
mctl_await_completion((u32 *)(SUNXI_DRAM_PHY0_BASE + 0xa40), 0xc, 0xc);
if (readl(SUNXI_DRAM_PHY0_BASE + 0xa40) & 3)
result = false;
@@ -484,7 +503,7 @@
return result;
}
-static bool mctl_phy_write_training(struct dram_para *para)
+static bool mctl_phy_write_training(const struct dram_config *config)
{
u32 val1, val2, *ptr1, *ptr2;
bool result = true;
@@ -504,7 +523,7 @@
if (readl(SUNXI_DRAM_PHY0_BASE + 0x8e0) & 0xc)
result = false;
- if (para->bus_full_width) {
+ if (config->bus_full_width) {
mctl_await_completion((u32 *)(SUNXI_DRAM_PHY0_BASE + 0xae0), 3, 3);
if (readl(SUNXI_DRAM_PHY0_BASE + 0xae0) & 0xc)
result = false;
@@ -527,7 +546,7 @@
result = false;
}
- if (para->bus_full_width) {
+ if (config->bus_full_width) {
ptr1 = (u32 *)(SUNXI_DRAM_PHY0_BASE + 0xb38);
ptr2 = (u32 *)(SUNXI_DRAM_PHY0_BASE + 0xaf0);
for (i = 0; i < 9; i++) {
@@ -548,7 +567,7 @@
clrbits_le32(SUNXI_DRAM_PHY0_BASE + 0x190, 0x60);
- if (para->ranks == 2) {
+ if (config->ranks == 2) {
clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 0x198, 0xc, 4);
setbits_le32(SUNXI_DRAM_PHY0_BASE + 0x190, 0x10);
@@ -558,7 +577,7 @@
if (readl(SUNXI_DRAM_PHY0_BASE + 0x8e0) & 0xc)
result = false;
- if (para->bus_full_width) {
+ if (config->bus_full_width) {
mctl_await_completion((u32 *)(SUNXI_DRAM_PHY0_BASE + 0xae0), 3, 3);
if (readl(SUNXI_DRAM_PHY0_BASE + 0xae0) & 0xc)
result = false;
@@ -572,7 +591,7 @@
return result;
}
-static void mctl_phy_bit_delay_compensation(struct dram_para *para)
+static void mctl_phy_bit_delay_compensation(const struct dram_para *para)
{
u32 *ptr, val;
int i;
@@ -773,7 +792,8 @@
}
}
-static void mctl_phy_ca_bit_delay_compensation(struct dram_para *para)
+static void mctl_phy_ca_bit_delay_compensation(const struct dram_para *para,
+ const struct dram_config *config)
{
u32 val, *ptr;
int i;
@@ -793,36 +813,53 @@
writel(val, SUNXI_DRAM_PHY0_BASE + 0x7e0);
writel(val, SUNXI_DRAM_PHY0_BASE + 0x7f4);
- /* following configuration is DDR3 specific */
- val = (para->tpr10 >> 7) & 0x1e;
- if (para->tpr2 & 1) {
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x794);
- if (para->ranks == 2) {
- val = (para->tpr10 >> 11) & 0x1e;
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x7e4);
- }
- if (para->tpr0 & BIT(31)) {
- val = (para->tpr0 << 1) & 0x3e;
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x790);
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x7b8);
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x7cc);
- }
- } else {
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x7d4);
- if (para->ranks == 2) {
- val = (para->tpr10 >> 11) & 0x1e;
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x79c);
+ if (para->type == SUNXI_DRAM_TYPE_DDR3) {
+ val = (para->tpr10 >> 7) & 0x1e;
+ if (para->tpr2 & 1) {
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x794);
+ if (config->ranks == 2) {
+ val = (para->tpr10 >> 11) & 0x1e;
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7e4);
+ }
+ if (para->tpr0 & BIT(31)) {
+ val = (para->tpr0 << 1) & 0x3e;
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x790);
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7b8);
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7cc);
+ }
+ } else {
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7d4);
+ if (config->ranks == 2) {
+ val = (para->tpr10 >> 11) & 0x1e;
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x79c);
+ }
+ if (para->tpr0 & BIT(31)) {
+ val = (para->tpr0 << 1) & 0x3e;
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x78c);
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7a4);
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7b8);
+ }
}
- if (para->tpr0 & BIT(31)) {
- val = (para->tpr0 << 1) & 0x3e;
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x78c);
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x7a4);
- writel(val, SUNXI_DRAM_PHY0_BASE + 0x7b8);
+ } else if (para->type == SUNXI_DRAM_TYPE_LPDDR3) {
+ val = (para->tpr10 >> 7) & 0x1e;
+ if (para->tpr2 & 1) {
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7a0);
+ if (config->ranks == 2) {
+ val = (para->tpr10 >> 11) & 0x1e;
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x79c);
+ }
+ } else {
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7e8);
+ if (config->ranks == 2) {
+ val = (para->tpr10 >> 11) & 0x1e;
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x7f8);
+ }
}
}
}
-static bool mctl_phy_init(struct dram_para *para)
+static bool mctl_phy_init(const struct dram_para *para,
+ const struct dram_config *config)
{
struct sunxi_mctl_com_reg * const mctl_com =
(struct sunxi_mctl_com_reg *)SUNXI_DRAM_COM_BASE;
@@ -831,18 +868,29 @@
u32 val, val2, *ptr, mr0, mr2;
int i;
- if (para->bus_full_width)
+ if (config->bus_full_width)
val = 0xf;
else
val = 3;
clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 0x3c, 0xf, val);
if (para->tpr2 & 0x100) {
- val = 9;
- val2 = 7;
+ if (para->type == SUNXI_DRAM_TYPE_DDR3) {
+ val = 9;
+ val2 = 7;
+ } else if (para->type == SUNXI_DRAM_TYPE_LPDDR3) {
+ // untested setup: use some values for now
+ val = 14;
+ val2 = 8;
+ }
} else {
- val = 13;
- val2 = 9;
+ if (para->type == SUNXI_DRAM_TYPE_DDR3) {
+ val = 13;
+ val2 = 9;
+ } else if (para->type == SUNXI_DRAM_TYPE_LPDDR3) {
+ val = 14;
+ val2 = 8;
+ }
}
writel(val, SUNXI_DRAM_PHY0_BASE + 0x14);
@@ -865,14 +913,22 @@
writel(phy_init[i], &ptr[i]);
if (para->tpr10 & TPR10_CA_BIT_DELAY)
- mctl_phy_ca_bit_delay_compensation(para);
+ mctl_phy_ca_bit_delay_compensation(para, config);
- writel(0x80, SUNXI_DRAM_PHY0_BASE + 0x3dc);
- writel(0x80, SUNXI_DRAM_PHY0_BASE + 0x45c);
+ if (para->type == SUNXI_DRAM_TYPE_DDR3)
+ val = 0x80;
+ else if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ val = 0xc0;
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x3dc);
+ writel(val, SUNXI_DRAM_PHY0_BASE + 0x45c);
mctl_phy_configure_odt(para);
- clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 4, 7, 0xa);
+ if (para->type == SUNXI_DRAM_TYPE_DDR3)
+ val = 0x0a;
+ else if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ val = 0x0b;
+ clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 4, 0x7, val);
if (para->clk <= 672)
writel(0xf, SUNXI_DRAM_PHY0_BASE + 0x20);
@@ -922,21 +978,39 @@
mr2 = 0x20;
}
+ if (para->type == SUNXI_DRAM_TYPE_DDR3) {
+ writel(mr0, &mctl_ctl->mrctrl1);
+ writel(0x80000030, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+
- writel(mr0, &mctl_ctl->mrctrl1);
- writel(0x80000030, &mctl_ctl->mrctrl0);
- mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+ writel(4, &mctl_ctl->mrctrl1);
+ writel(0x80001030, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
- writel(4, &mctl_ctl->mrctrl1);
- writel(0x80001030, &mctl_ctl->mrctrl0);
- mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+ writel(mr2, &mctl_ctl->mrctrl1);
+ writel(0x80002030, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
- writel(mr2, &mctl_ctl->mrctrl1);
- writel(0x80002030, &mctl_ctl->mrctrl0);
- mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+ writel(0, &mctl_ctl->mrctrl1);
+ writel(0x80003030, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+ } else if (para->type == SUNXI_DRAM_TYPE_LPDDR3) {
+ writel(mr0, &mctl_ctl->mrctrl1);
+ writel(0x800000f0, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
- writel(0, &mctl_ctl->mrctrl1);
- writel(0x80003030, &mctl_ctl->mrctrl0);
- mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+ writel(4, &mctl_ctl->mrctrl1);
+ writel(0x800000f0, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+
+ writel(mr2, &mctl_ctl->mrctrl1);
+ writel(0x800000f0, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+
+ writel(0x301, &mctl_ctl->mrctrl1);
+ writel(0x800000f0, &mctl_ctl->mrctrl0);
+ mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0);
+ }
writel(0, SUNXI_DRAM_PHY0_BASE + 0x54);
@@ -946,7 +1020,7 @@
if (para->tpr10 & TPR10_WRITE_LEVELING) {
for (i = 0; i < 5; i++)
- if (mctl_phy_write_leveling(para))
+ if (mctl_phy_write_leveling(config))
break;
if (i == 5) {
debug("write leveling failed!\n");
@@ -956,7 +1030,7 @@
if (para->tpr10 & TPR10_READ_CALIBRATION) {
for (i = 0; i < 5; i++)
- if (mctl_phy_read_calibration(para))
+ if (mctl_phy_read_calibration(config))
break;
if (i == 5) {
debug("read calibration failed!\n");
@@ -966,7 +1040,7 @@
if (para->tpr10 & TPR10_READ_TRAINING) {
for (i = 0; i < 5; i++)
- if (mctl_phy_read_training(para))
+ if (mctl_phy_read_training(config))
break;
if (i == 5) {
debug("read training failed!\n");
@@ -976,7 +1050,7 @@
if (para->tpr10 & TPR10_WRITE_TRAINING) {
for (i = 0; i < 5; i++)
- if (mctl_phy_write_training(para))
+ if (mctl_phy_write_training(config))
break;
if (i == 5) {
debug("write training failed!\n");
@@ -991,7 +1065,8 @@
return true;
}
-static bool mctl_ctrl_init(struct dram_para *para)
+static bool mctl_ctrl_init(const struct dram_para *para,
+ const struct dram_config *config)
{
struct sunxi_mctl_com_reg * const mctl_com =
(struct sunxi_mctl_com_reg *)SUNXI_DRAM_COM_BASE;
@@ -1010,27 +1085,34 @@
setbits_le32(&mctl_com->unk_0x008, 0xff00);
- reg_val = MSTR_BURST_LENGTH(8) | MSTR_ACTIVE_RANKS(para->ranks);
- reg_val |= MSTR_DEVICETYPE_DDR3 | MSTR_2TMODE;
- if (para->bus_full_width)
+ reg_val = MSTR_BURST_LENGTH(8) | MSTR_ACTIVE_RANKS(config->ranks);
+ if (para->type == SUNXI_DRAM_TYPE_DDR3)
+ reg_val |= MSTR_DEVICETYPE_DDR3 | MSTR_2TMODE;
+ else if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ reg_val |= MSTR_DEVICETYPE_LPDDR3;
+ if (config->bus_full_width)
reg_val |= MSTR_BUSWIDTH_FULL;
else
reg_val |= MSTR_BUSWIDTH_HALF;
writel(BIT(31) | BIT(30) | reg_val, &mctl_ctl->mstr);
- if (para->ranks == 2)
+ if (config->ranks == 2)
writel(0x0303, &mctl_ctl->odtmap);
else
writel(0x0201, &mctl_ctl->odtmap);
- writel(0x06000400, &mctl_ctl->odtcfg);
- writel(0x06000400, &mctl_ctl->unk_0x2240);
- writel(0x06000400, &mctl_ctl->unk_0x3240);
- writel(0x06000400, &mctl_ctl->unk_0x4240);
+ if (para->type == SUNXI_DRAM_TYPE_DDR3)
+ reg_val = 0x06000400;
+ else if (para->type == SUNXI_DRAM_TYPE_LPDDR3)
+ reg_val = 0x09020400;
+ writel(reg_val, &mctl_ctl->odtcfg);
+ writel(reg_val, &mctl_ctl->unk_0x2240);
+ writel(reg_val, &mctl_ctl->unk_0x3240);
+ writel(reg_val, &mctl_ctl->unk_0x4240);
writel(BIT(31), &mctl_com->cr);
- mctl_set_addrmap(para);
+ mctl_set_addrmap(config);
mctl_set_timing_params(para);
@@ -1056,7 +1138,7 @@
/* this write seems to enable PHY MMIO region */
setbits_le32(&mctl_com->unk_0x500, BIT(24));
- if (!mctl_phy_init(para))
+ if (!mctl_phy_init(para, config))
return false;
writel(0, &mctl_ctl->swctl);
@@ -1073,18 +1155,20 @@
return true;
}
-static bool mctl_core_init(struct dram_para *para)
+static bool mctl_core_init(const struct dram_para *para,
+ const struct dram_config *config)
{
- mctl_sys_init(para);
+ mctl_sys_init(para->clk);
- return mctl_ctrl_init(para);
+ return mctl_ctrl_init(para, config);
}
-static void mctl_auto_detect_rank_width(struct dram_para *para)
+static void mctl_auto_detect_rank_width(const struct dram_para *para,
+ struct dram_config *config)
{
/* this is minimum size that it's supported */
- para->cols = 8;
- para->rows = 13;
+ config->cols = 8;
+ config->rows = 13;
/*
* Strategy here is to test most demanding combination first and least
@@ -1095,94 +1179,101 @@
*/
debug("testing 32-bit width, rank = 2\n");
- para->bus_full_width = 1;
- para->ranks = 2;
- if (mctl_core_init(para))
+ config->bus_full_width = 1;
+ config->ranks = 2;
+ if (mctl_core_init(para, config))
return;
debug("testing 32-bit width, rank = 1\n");
- para->bus_full_width = 1;
- para->ranks = 1;
- if (mctl_core_init(para))
+ config->bus_full_width = 1;
+ config->ranks = 1;
+ if (mctl_core_init(para, config))
return;
debug("testing 16-bit width, rank = 2\n");
- para->bus_full_width = 0;
- para->ranks = 2;
- if (mctl_core_init(para))
+ config->bus_full_width = 0;
+ config->ranks = 2;
+ if (mctl_core_init(para, config))
return;
debug("testing 16-bit width, rank = 1\n");
- para->bus_full_width = 0;
- para->ranks = 1;
- if (mctl_core_init(para))
+ config->bus_full_width = 0;
+ config->ranks = 1;
+ if (mctl_core_init(para, config))
return;
panic("This DRAM setup is currently not supported.\n");
}
-static void mctl_auto_detect_dram_size(struct dram_para *para)
+static void mctl_auto_detect_dram_size(const struct dram_para *para,
+ struct dram_config *config)
{
/* detect row address bits */
- para->cols = 8;
- para->rows = 18;
- mctl_core_init(para);
+ config->cols = 8;
+ config->rows = 18;
+ mctl_core_init(para, config);
- for (para->rows = 13; para->rows < 18; para->rows++) {
+ for (config->rows = 13; config->rows < 18; config->rows++) {
/* 8 banks, 8 bit per byte and 16/32 bit width */
- if (mctl_mem_matches((1 << (para->rows + para->cols +
- 4 + para->bus_full_width))))
+ if (mctl_mem_matches((1 << (config->rows + config->cols +
+ 4 + config->bus_full_width))))
break;
}
/* detect column address bits */
- para->cols = 11;
- mctl_core_init(para);
+ config->cols = 11;
+ mctl_core_init(para, config);
- for (para->cols = 8; para->cols < 11; para->cols++) {
+ for (config->cols = 8; config->cols < 11; config->cols++) {
/* 8 bits per byte and 16/32 bit width */
- if (mctl_mem_matches(1 << (para->cols + 1 +
- para->bus_full_width)))
+ if (mctl_mem_matches(1 << (config->cols + 1 +
+ config->bus_full_width)))
break;
}
}
-static unsigned long mctl_calc_size(struct dram_para *para)
+static unsigned long mctl_calc_size(const struct dram_config *config)
{
- u8 width = para->bus_full_width ? 4 : 2;
+ u8 width = config->bus_full_width ? 4 : 2;
/* 8 banks */
- return (1ULL << (para->cols + para->rows + 3)) * width * para->ranks;
+ return (1ULL << (config->cols + config->rows + 3)) * width * config->ranks;
}
+static const struct dram_para para = {
+ .clk = CONFIG_DRAM_CLK,
+#ifdef CONFIG_SUNXI_DRAM_H616_DDR3_1333
+ .type = SUNXI_DRAM_TYPE_DDR3,
+#elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR3)
+ .type = SUNXI_DRAM_TYPE_LPDDR3,
+#endif
+ .dx_odt = CONFIG_DRAM_SUN50I_H616_DX_ODT,
+ .dx_dri = CONFIG_DRAM_SUN50I_H616_DX_DRI,
+ .ca_dri = CONFIG_DRAM_SUN50I_H616_CA_DRI,
+ .odt_en = CONFIG_DRAM_SUN50I_H616_ODT_EN,
+ .tpr0 = CONFIG_DRAM_SUN50I_H616_TPR0,
+ .tpr2 = CONFIG_DRAM_SUN50I_H616_TPR2,
+ .tpr10 = CONFIG_DRAM_SUN50I_H616_TPR10,
+ .tpr11 = CONFIG_DRAM_SUN50I_H616_TPR11,
+ .tpr12 = CONFIG_DRAM_SUN50I_H616_TPR12,
+};
+
unsigned long sunxi_dram_init(void)
{
struct sunxi_prcm_reg *const prcm =
(struct sunxi_prcm_reg *)SUNXI_PRCM_BASE;
- struct dram_para para = {
- .clk = CONFIG_DRAM_CLK,
- .type = SUNXI_DRAM_TYPE_DDR3,
- .dx_odt = CONFIG_DRAM_SUN50I_H616_DX_ODT,
- .dx_dri = CONFIG_DRAM_SUN50I_H616_DX_DRI,
- .ca_dri = CONFIG_DRAM_SUN50I_H616_CA_DRI,
- .odt_en = CONFIG_DRAM_SUN50I_H616_ODT_EN,
- .tpr0 = CONFIG_DRAM_SUN50I_H616_TPR0,
- .tpr2 = CONFIG_DRAM_SUN50I_H616_TPR2,
- .tpr10 = CONFIG_DRAM_SUN50I_H616_TPR10,
- .tpr11 = CONFIG_DRAM_SUN50I_H616_TPR11,
- .tpr12 = CONFIG_DRAM_SUN50I_H616_TPR12,
- };
+ struct dram_config config;
unsigned long size;
setbits_le32(&prcm->res_cal_ctrl, BIT(8));
clrbits_le32(&prcm->ohms240, 0x3f);
- mctl_auto_detect_rank_width(¶);
- mctl_auto_detect_dram_size(¶);
+ mctl_auto_detect_rank_width(¶, &config);
+ mctl_auto_detect_dram_size(¶, &config);
- mctl_core_init(¶);
+ mctl_core_init(¶, &config);
- size = mctl_calc_size(¶);
+ size = mctl_calc_size(&config);
mctl_set_master_priority();
diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
index 4af5922..9382d3d 100644
--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
+++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
@@ -81,15 +81,15 @@
MBUS_QOS_HIGHEST
};
-static inline void mbus_configure_port(u8 port,
- bool bwlimit,
- bool priority,
- u8 qos, /* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
- u8 waittime, /* 0 .. 0xf */
- u8 acs, /* 0 .. 0xff */
- u16 bwl0, /* 0 .. 0xffff, bandwidth limit in MB/s */
- u16 bwl1,
- u16 bwl2)
+static void mbus_configure_port(u8 port,
+ bool bwlimit,
+ bool priority,
+ u8 qos, /* MBUS_QOS_LOWEST .. MBUS_QOS_HIGEST */
+ u8 waittime, /* 0 .. 0xf */
+ u8 acs, /* 0 .. 0xff */
+ u16 bwl0, /* 0 .. 0xffff, bandwidth limit in MB/s */
+ u16 bwl1,
+ u16 bwl2)
{
struct sunxi_mctl_com_reg * const mctl_com =
(struct sunxi_mctl_com_reg *)SUNXI_DRAM_COM_BASE;
diff --git a/arch/arm/mach-sunxi/dram_timings/Makefile b/arch/arm/mach-sunxi/dram_timings/Makefile
index 39a8756..8bfd994 100644
--- a/arch/arm/mach-sunxi/dram_timings/Makefile
+++ b/arch/arm/mach-sunxi/dram_timings/Makefile
@@ -3,5 +3,5 @@
obj-$(CONFIG_SUNXI_DRAM_DDR2_V3S) += ddr2_v3s.o
obj-$(CONFIG_SUNXI_DRAM_H6_LPDDR3) += h6_lpddr3.o
obj-$(CONFIG_SUNXI_DRAM_H6_DDR3_1333) += h6_ddr3_1333.o
-# currently only DDR3 is supported on H616
-obj-$(CONFIG_MACH_SUN50I_H616) += h616_ddr3_1333.o
+obj-$(CONFIG_SUNXI_DRAM_H616_DDR3_1333) += h616_ddr3_1333.o
+obj-$(CONFIG_SUNXI_DRAM_H616_LPDDR3) += h616_lpddr3.o
diff --git a/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c b/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c
index eea4d6a..232b4fe 100644
--- a/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c
+++ b/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c
@@ -15,7 +15,7 @@
#include <asm/arch/dram.h>
#include <asm/arch/cpu.h>
-void mctl_set_timing_params(struct dram_para *para)
+void mctl_set_timing_params(const struct dram_para *para)
{
struct sunxi_mctl_ctl_reg * const mctl_ctl =
(struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE;
diff --git a/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c b/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c
new file mode 100644
index 0000000..b6d6a68
--- /dev/null
+++ b/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c
@@ -0,0 +1,95 @@
+/*
+ * sun50i H616 LPDDR3 timings, as programmed by Allwinner's boot0
+ *
+ * The chips are probably able to be driven by a faster clock, but boot0
+ * uses a more conservative timing (as usual).
+ *
+ * (C) Copyright 2020 Jernej Skrabec <jernej.skrabec@siol.net>
+ * Based on H6 DDR3 timings:
+ * (C) Copyright 2018,2019 Arm Ltd.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/dram.h>
+#include <asm/arch/cpu.h>
+
+void mctl_set_timing_params(const struct dram_para *para)
+{
+ struct sunxi_mctl_ctl_reg * const mctl_ctl =
+ (struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE;
+
+ u8 tccd = 2;
+ u8 tfaw = ns_to_t(50);
+ u8 trrd = max(ns_to_t(6), 4);
+ u8 trcd = ns_to_t(24);
+ u8 trc = ns_to_t(70);
+ u8 txp = max(ns_to_t(8), 3);
+ u8 trtp = max(ns_to_t(8), 2);
+ u8 trp = ns_to_t(27);
+ u8 tras = ns_to_t(41);
+ u16 trefi = ns_to_t(7800) / 64;
+ u16 trfc = ns_to_t(210);
+ u16 txsr = 88;
+
+ u8 tmrw = 5;
+ u8 tmrd = 5;
+ u8 tmod = max(ns_to_t(15), 12);
+ u8 tcke = max(ns_to_t(6), 3);
+ u8 tcksrx = max(ns_to_t(12), 4);
+ u8 tcksre = max(ns_to_t(12), 4);
+ u8 tckesr = tcke + 2;
+ u8 trasmax = (para->clk / 2) / 16;
+ u8 txs = ns_to_t(360) / 32;
+ u8 txsdll = 16;
+ u8 txsabort = 4;
+ u8 txsfast = 4;
+ u8 tcl = 7;
+ u8 tcwl = 4;
+ u8 t_rdata_en = 12;
+ u8 t_wr_lat = 6;
+
+ u8 twtp = 16;
+ u8 twr2rd = trtp + 9;
+ u8 trd2wr = 13;
+
+ /* DRAM timing grabbed from tvbox with LPDDR3 memory */
+ writel((twtp << 24) | (tfaw << 16) | (trasmax << 8) | tras,
+ &mctl_ctl->dramtmg[0]);
+ writel((txp << 16) | (trtp << 8) | trc, &mctl_ctl->dramtmg[1]);
+ writel((tcwl << 24) | (tcl << 16) | (trd2wr << 8) | twr2rd,
+ &mctl_ctl->dramtmg[2]);
+ writel((tmrw << 20) | (tmrd << 12) | tmod, &mctl_ctl->dramtmg[3]);
+ writel((trcd << 24) | (tccd << 16) | (trrd << 8) | trp,
+ &mctl_ctl->dramtmg[4]);
+ writel((tcksrx << 24) | (tcksre << 16) | (tckesr << 8) | tcke,
+ &mctl_ctl->dramtmg[5]);
+ /* Value suggested by ZynqMP manual and used by libdram */
+ writel((txp + 2) | 0x02020000, &mctl_ctl->dramtmg[6]);
+ writel((txsfast << 24) | (txsabort << 16) | (txsdll << 8) | txs,
+ &mctl_ctl->dramtmg[8]);
+ writel(0x00020208, &mctl_ctl->dramtmg[9]);
+ writel(0xE0C05, &mctl_ctl->dramtmg[10]);
+ writel(0x440C021C, &mctl_ctl->dramtmg[11]);
+ writel(8, &mctl_ctl->dramtmg[12]);
+ writel(0xA100002, &mctl_ctl->dramtmg[13]);
+ writel(txsr, &mctl_ctl->dramtmg[14]);
+
+ writel(0x4f0112, &mctl_ctl->init[0]);
+ writel(0x420000, &mctl_ctl->init[1]);
+ writel(0xd05, &mctl_ctl->init[2]);
+ writel(0x83001c, &mctl_ctl->init[3]);
+ writel(0x00010000, &mctl_ctl->init[4]);
+
+ writel(0, &mctl_ctl->dfimisc);
+ clrsetbits_le32(&mctl_ctl->rankctl, 0xff0, 0x660);
+
+ /* Configure DFI timing */
+ writel(t_wr_lat | 0x2000000 | (t_rdata_en << 16) | 0x808000,
+ &mctl_ctl->dfitmg0);
+ writel(0x100202, &mctl_ctl->dfitmg1);
+
+ /* set refresh timing */
+ writel((trefi << 16) | trfc, &mctl_ctl->rfshtmg);
+}
diff --git a/arch/arm/mach-tegra/arm64-mmu.c b/arch/arm/mach-tegra/arm64-mmu.c
index d45b1fa..ea4eac3 100644
--- a/arch/arm/mach-tegra/arm64-mmu.c
+++ b/arch/arm/mach-tegra/arm64-mmu.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
* (This file derived from arch/arm/mach-zynqmp/cpu.c)
*
* Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
diff --git a/arch/arm/mach-versal-net/include/mach/hardware.h b/arch/arm/mach-versal-net/include/mach/hardware.h
index 3f04104..9bddb8b 100644
--- a/arch/arm/mach-versal-net/include/mach/hardware.h
+++ b/arch/arm/mach-versal-net/include/mach/hardware.h
@@ -81,3 +81,14 @@
#define VERSAL_SLCR_BASEADDR 0xF1060000
#define VERSAL_AXI_MUX_SEL (VERSAL_SLCR_BASEADDR + 0x504)
#define VERSAL_OSPI_LINEAR_MODE BIT(1)
+
+#define FLASH_RESET_GPIO 0xc
+#define WPROT_CRP 0xF126001C
+#define RST_GPIO 0xF1260318
+#define WPROT_LPD_MIO 0xFF080728
+#define WPROT_PMC_MIO 0xF1060828
+#define BOOT_MODE_DIR 0xF1020204
+#define BOOT_MODE_OUT 0xF1020208
+#define MIO_PIN_12 0xF1060030
+#define BANK0_OUTPUT 0xF1020040
+#define BANK0_TRI 0xF1060200
diff --git a/arch/arm/mach-versal-net/include/mach/sys_proto.h b/arch/arm/mach-versal-net/include/mach/sys_proto.h
index a20cf02..23374d1 100644
--- a/arch/arm/mach-versal-net/include/mach/sys_proto.h
+++ b/arch/arm/mach-versal-net/include/mach/sys_proto.h
@@ -7,5 +7,3 @@
#include <linux/build_bug.h>
void mem_map_fill(void);
-
-int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
diff --git a/arch/arm/mach-versal/Makefile b/arch/arm/mach-versal/Makefile
index ca12e29..864b305 100644
--- a/arch/arm/mach-versal/Makefile
+++ b/arch/arm/mach-versal/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2016 - 2018 Xilinx, Inc.
-# Michal Simek <michal.simek@xilinx.com>
+# Michal Simek <michal.simek@amd.com>
#
obj-y += clk.o
diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c
index 249e050..5e3f44c7 100644
--- a/arch/arm/mach-versal/clk.c
+++ b/arch/arm/mach-versal/clk.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2016 - 2018 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
index 9dc308b..e4dc305 100644
--- a/arch/arm/mach-versal/cpu.c
+++ b/arch/arm/mach-versal/cpu.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2016 - 2018 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/arch/arm/mach-versal/include/mach/sys_proto.h b/arch/arm/mach-versal/include/mach/sys_proto.h
index 433f9ba..757bd87 100644
--- a/arch/arm/mach-versal/include/mach/sys_proto.h
+++ b/arch/arm/mach-versal/include/mach/sys_proto.h
@@ -13,5 +13,3 @@
void initialize_tcm(bool mode);
void tcm_init(u8 mode);
void mem_map_fill(void);
-
-int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
diff --git a/arch/arm/mach-versal/mp.c b/arch/arm/mach-versal/mp.c
index 5b850f3..7bd3928 100644
--- a/arch/arm/mach-versal/mp.c
+++ b/arch/arm/mach-versal/mp.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/*
* (C) Copyright 2019 Xilinx, Inc.
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
*/
#include <common.h>
diff --git a/arch/arm/mach-zynqmp/Makefile b/arch/arm/mach-zynqmp/Makefile
index bb1830c..3f25554 100644
--- a/arch/arm/mach-zynqmp/Makefile
+++ b/arch/arm/mach-zynqmp/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2014 - 2015 Xilinx, Inc.
-# Michal Simek <michal.simek@xilinx.com>
+# Michal Simek <michal.simek@amd.com>
obj-y += clk.o
obj-y += cpu.o
diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
index 1e6e726..3b05f84 100644
--- a/arch/arm/mach-zynqmp/clk.c
+++ b/arch/arm/mach-zynqmp/clk.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index 26e285c..6ae2789 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/arch/arm/mach-zynqmp/handoff.c b/arch/arm/mach-zynqmp/handoff.c
index 511b241..dce9243 100644
--- a/arch/arm/mach-zynqmp/handoff.c
+++ b/arch/arm/mach-zynqmp/handoff.c
@@ -2,7 +2,7 @@
/*
* Copyright 2016 - 2017 Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/arch/arm/mach-zynqmp/include/mach/clk.h b/arch/arm/mach-zynqmp/include/mach/clk.h
index cfd44c8..9918d46 100644
--- a/arch/arm/mach-zynqmp/include/mach/clk.h
+++ b/arch/arm/mach-zynqmp/include/mach/clk.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#ifndef _ASM_ARCH_CLK_H_
diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
index 70221e0..634bf16 100644
--- a/arch/arm/mach-zynqmp/include/mach/hardware.h
+++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#ifndef _ASM_ARCH_HARDWARE_H
diff --git a/arch/arm/mach-zynqmp/include/mach/sys_proto.h b/arch/arm/mach-zynqmp/include/mach/sys_proto.h
index c6733ed..15b69e7 100644
--- a/arch/arm/mach-zynqmp/include/mach/sys_proto.h
+++ b/arch/arm/mach-zynqmp/include/mach/sys_proto.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#ifndef _ASM_ARCH_SYS_PROTO_H
@@ -48,9 +48,6 @@
unsigned int zynqmp_get_silicon_version(void);
-int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
-int zynqmp_mmio_read(const u32 address, u32 *value);
-
void initialize_tcm(bool mode);
void mem_map_fill(void);
#if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) || defined(CONFIG_DEFINE_TCM_OCM_MMAP)
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index b06c867..aff9054 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -1,12 +1,13 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
#include <cpu_func.h>
#include <log.h>
+#include <zynqmp_firmware.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-zynqmp/psu_spl_init.c b/arch/arm/mach-zynqmp/psu_spl_init.c
index 5c5c7d1..b4d7f44 100644
--- a/arch/arm/mach-zynqmp/psu_spl_init.c
+++ b/arch/arm/mach-zynqmp/psu_spl_init.c
@@ -2,7 +2,7 @@
/*
* Copyright 2018 Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index b428fd5..a0f35f3 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -2,7 +2,7 @@
/*
* Copyright 2015 - 2016 Xilinx, Inc.
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index ba2c228..bef6776 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -12,7 +12,6 @@
#include <init.h>
#include <net.h>
#include <vsprintf.h>
-#include <watchdog.h>
#include <command.h>
#include <netdev.h>
#include <asm/global_data.h>
@@ -62,47 +61,6 @@
};
#endif /* CONFIG_DISPLAY_CPUINFO */
-#if defined(CONFIG_WATCHDOG)
-/* Called by macro WATCHDOG_RESET */
-void watchdog_reset(void)
-{
- wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
-
- /* Count register */
- out_be16(&wdp->sr, 0x5555);
- asm("nop");
- out_be16(&wdp->sr, 0xaaaa);
-}
-
-int watchdog_disable(void)
-{
- wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
-
- /* UserManual, once the wdog is disabled, wdog cannot be re-enabled */
- /* halted watchdog timer */
- setbits_be16(&wdp->cr, WTM_WCR_HALTED);
-
- puts("WATCHDOG:disabled\n");
- return (0);
-}
-
-int watchdog_init(void)
-{
- wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
- u32 wdog_module = 0;
-
- /* set timeout and enable watchdog */
- wdog_module = ((CFG_SYS_CLK / CONFIG_SYS_HZ) * CONFIG_WATCHDOG_TIMEOUT_MSECS);
- wdog_module |= (wdog_module / 8192);
- out_be16(&wdp->mr, wdog_module);
-
- out_be16(&wdp->cr, WTM_WCR_EN);
- puts("WATCHDOG:enabled\n");
-
- return (0);
-}
-#endif /* CONFIG_WATCHDOG */
-
#if defined(CONFIG_MCFFEC)
/* Default initializations for MCFFEC controllers. To override,
* create a board-specific function called:
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index d7cbf11..5042a38 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -17,7 +17,6 @@
#include <init.h>
#include <net.h>
#include <vsprintf.h>
-#include <watchdog.h>
#include <command.h>
#include <asm/global_data.h>
#include <asm/immap.h>
@@ -53,51 +52,7 @@
return 0;
};
#endif /* CONFIG_DISPLAY_CPUINFO */
-
-#if defined(CONFIG_WATCHDOG)
-/* Called by macro WATCHDOG_RESET */
-void watchdog_reset(void)
-{
- wdog_t *wdt = (wdog_t *)(MMAP_WDOG);
-
- out_be16(&wdt->sr, 0x5555);
- out_be16(&wdt->sr, 0xaaaa);
-}
-
-int watchdog_disable(void)
-{
- wdog_t *wdt = (wdog_t *)(MMAP_WDOG);
-
- /* reset watchdog counter */
- out_be16(&wdt->sr, 0x5555);
- out_be16(&wdt->sr, 0xaaaa);
- /* disable watchdog timer */
- out_be16(&wdt->cr, 0);
-
- puts("WATCHDOG:disabled\n");
- return (0);
-}
-
-int watchdog_init(void)
-{
- wdog_t *wdt = (wdog_t *)(MMAP_WDOG);
-
- /* disable watchdog */
- out_be16(&wdt->cr, 0);
-
- /* set timeout and enable watchdog */
- out_be16(&wdt->mr,
- (CONFIG_WATCHDOG_TIMEOUT_MSECS * CONFIG_SYS_HZ) / (32768 * 1000) - 1);
-
- /* reset watchdog counter */
- out_be16(&wdt->sr, 0x5555);
- out_be16(&wdt->sr, 0xaaaa);
-
- puts("WATCHDOG:enabled\n");
- return (0);
-}
-#endif /* #ifdef CONFIG_WATCHDOG */
-#endif /* #ifdef CONFIG_M5208 */
+#endif /* #ifdef CONFIG_M5208 */
#ifdef CONFIG_M5271
#if defined(CONFIG_DISPLAY_CPUINFO)
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index 548cbca..18d20a8 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -12,7 +12,6 @@
#include <init.h>
#include <net.h>
#include <vsprintf.h>
-#include <watchdog.h>
#include <command.h>
#include <netdev.h>
#include <asm/global_data.h>
@@ -102,49 +101,6 @@
};
#endif /* CONFIG_DISPLAY_CPUINFO */
-#if defined(CONFIG_WATCHDOG)
-/* Called by macro WATCHDOG_RESET */
-void watchdog_reset(void)
-{
- wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
-
- /* Count register */
- out_be16(&wdp->sr, 0x5555);
- out_be16(&wdp->sr, 0xaaaa);
-}
-
-int watchdog_disable(void)
-{
- wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
-
- /* UserManual, once the wdog is disabled, wdog cannot be re-enabled */
- /* halted watchdog timer */
- setbits_be16(&wdp->cr, WTM_WCR_HALTED);
-
- puts("WATCHDOG:disabled\n");
- return (0);
-}
-
-int watchdog_init(void)
-{
- wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
- u32 wdog_module = 0;
-
- /* set timeout and enable watchdog */
- wdog_module = ((CFG_SYS_CLK / 1000) * CONFIG_WATCHDOG_TIMEOUT_MSECS);
-#ifdef CONFIG_M5329
- out_be16(&wdp->mr, wdog_module / 8192);
-#else
- out_be16(&wdp->mr, wdog_module / 4096);
-#endif
-
- out_be16(&wdp->cr, WTM_WCR_EN);
- puts("WATCHDOG:enabled\n");
-
- return (0);
-}
-#endif /* CONFIG_WATCHDOG */
-
#if defined(CONFIG_MCFFEC)
/* Default initializations for MCFFEC controllers. To override,
* create a board-specific function called:
diff --git a/arch/m68k/dts/M5208EVBE.dts b/arch/m68k/dts/M5208EVBE.dts
index 1c32718..ec203e8 100644
--- a/arch/m68k/dts/M5208EVBE.dts
+++ b/arch/m68k/dts/M5208EVBE.dts
@@ -15,6 +15,11 @@
};
};
+&wdog0 {
+ timeout-sec = <32>;
+ status = "okay";
+};
+
&uart0 {
bootph-all;
status = "okay";
diff --git a/arch/m68k/dts/mcf5208.dtsi b/arch/m68k/dts/mcf5208.dtsi
index 9392fac..c61dbf3 100644
--- a/arch/m68k/dts/mcf5208.dtsi
+++ b/arch/m68k/dts/mcf5208.dtsi
@@ -16,6 +16,12 @@
#address-cells = <1>;
#size-cells = <1>;
+ wdog0: watchdog@fc08c000 {
+ compatible = "fsl,mcf5208-wdt";
+ reg = <0xfc08c000 0x10>;
+ status = "disabled";
+ };
+
uart0: uart@fc060000 {
compatible = "fsl,mcf-uart";
reg = <0xfc060000 0x40>;
diff --git a/arch/m68k/dts/mcf523x.dtsi b/arch/m68k/dts/mcf523x.dtsi
index 41c7b9b..cae7b4f 100644
--- a/arch/m68k/dts/mcf523x.dtsi
+++ b/arch/m68k/dts/mcf523x.dtsi
@@ -23,6 +23,12 @@
ranges = <0x00000000 0x40000000 0x40000000>;
reg = <0x40000000 0x40000000>;
+ wdog0: watchdog@140000 {
+ compatible = "fsl,mcf5208-wdt";
+ reg = <0x140000 0x10>;
+ status = "disabled";
+ };
+
uart0: uart@200 {
compatible = "fsl,mcf-uart";
reg = <0x200 0x40>;
diff --git a/arch/m68k/dts/mcf5271.dtsi b/arch/m68k/dts/mcf5271.dtsi
index fc82bd3..5acf699 100644
--- a/arch/m68k/dts/mcf5271.dtsi
+++ b/arch/m68k/dts/mcf5271.dtsi
@@ -23,6 +23,12 @@
ranges = <0x00000000 0x40000000 0x40000000>;
reg = <0x40000000 0x40000000>;
+ wdog0: watchdog@140000 {
+ compatible = "fsl,mcf5208-wdt";
+ reg = <0x140000 0x10>;
+ status = "disabled";
+ };
+
uart0: uart@200 {
compatible = "fsl,mcf-uart";
reg = <0x200 0x40>;
diff --git a/arch/m68k/dts/mcf5275.dtsi b/arch/m68k/dts/mcf5275.dtsi
index 402517c..3df17b4 100644
--- a/arch/m68k/dts/mcf5275.dtsi
+++ b/arch/m68k/dts/mcf5275.dtsi
@@ -24,6 +24,12 @@
ranges = <0x00000000 0x40000000 0x40000000>;
reg = <0x40000000 0x40000000>;
+ wdog0: watchdog@140000 {
+ compatible = "fsl,mcf5208-wdt";
+ reg = <0x140000 0x10>;
+ status = "disabled";
+ };
+
uart0: uart@200 {
compatible = "fsl,mcf-uart";
reg = <0x200 0x40>;
diff --git a/arch/m68k/dts/mcf5282.dtsi b/arch/m68k/dts/mcf5282.dtsi
index 883c0d0..640c1a3 100644
--- a/arch/m68k/dts/mcf5282.dtsi
+++ b/arch/m68k/dts/mcf5282.dtsi
@@ -23,6 +23,12 @@
ranges = <0x00000000 0x40000000 0x40000000>;
reg = <0x40000000 0x40000000>;
+ wdog0: watchdog@140000 {
+ compatible = "fsl,mcf5282-wdt";
+ reg = <0x140000 0x10>;
+ status = "disabled";
+ };
+
uart0: uart@200 {
compatible = "fsl,mcf-uart";
reg = <0x200 0x40>;
diff --git a/arch/m68k/dts/mcf5329.dtsi b/arch/m68k/dts/mcf5329.dtsi
index 7501cc4..991985e 100644
--- a/arch/m68k/dts/mcf5329.dtsi
+++ b/arch/m68k/dts/mcf5329.dtsi
@@ -16,6 +16,12 @@
#address-cells = <1>;
#size-cells = <1>;
+ wdog0: watchdog@fc098000 {
+ compatible = "fsl,mcf5208-wdt";
+ reg = <0xfc08c000 0x10>;
+ status = "disabled";
+ };
+
uart0: uart@fc060000 {
compatible = "fsl,mcf-uart";
reg = <0xfc060000 0x40>;
diff --git a/arch/m68k/dts/mcf537x.dtsi b/arch/m68k/dts/mcf537x.dtsi
index 338b8b4..4fa0f4b 100644
--- a/arch/m68k/dts/mcf537x.dtsi
+++ b/arch/m68k/dts/mcf537x.dtsi
@@ -16,6 +16,12 @@
#address-cells = <1>;
#size-cells = <1>;
+ wdog0: watchdog@fc098000 {
+ compatible = "fsl,mcf5208-wdt";
+ reg = <0xfc08c000 0x10>;
+ status = "disabled";
+ };
+
uart0: uart@fc060000 {
compatible = "fsl,mcf-uart";
reg = <0xfc060000 0x40>;
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index eaa095b..c21beaf 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -2,7 +2,7 @@
/*
* (C) Copyright 2013 - 2014 Xilinx, Inc
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/arch/microblaze/cpu/u-boot-spl.lds b/arch/microblaze/cpu/u-boot-spl.lds
index 5970951..09abbea 100644
--- a/arch/microblaze/cpu/u-boot-spl.lds
+++ b/arch/microblaze/cpu/u-boot-spl.lds
@@ -2,7 +2,7 @@
/*
* (C) Copyright 2013 - 2014 Xilinx, Inc
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <asm-offsets.h>
diff --git a/arch/microblaze/include/asm/spl.h b/arch/microblaze/include/asm/spl.h
index 350d283..7557dc2 100644
--- a/arch/microblaze/include/asm/spl.h
+++ b/arch/microblaze/include/asm/spl.h
@@ -2,7 +2,7 @@
/*
* (C) Copyright 2013 - 2014 Xilinx, Inc
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#ifndef _ASM_MICROBLAZE_SPL_H_
diff --git a/arch/mips/mach-octeon/cvmx-pko3-queue.c b/arch/mips/mach-octeon/cvmx-pko3-queue.c
index e28afdf..53f2e4d 100644
--- a/arch/mips/mach-octeon/cvmx-pko3-queue.c
+++ b/arch/mips/mach-octeon/cvmx-pko3-queue.c
@@ -761,7 +761,7 @@
* The Scheduler Queues in Levels 3 to 5 and Descriptor Queues are
* configured one-to-one or many-to-one to a single parent Scheduler
* Queues. The level of the parent SQ is specified in an argument,
- * as well as the number of childer to attach to the specific parent.
+ * as well as the number of children to attach to the specific parent.
* The children can have fair round-robin or priority-based scheduling
* when multiple children are assigned a single parent.
*
diff --git a/arch/mips/mach-octeon/include/mach/cvmx-pko3-queue.h b/arch/mips/mach-octeon/include/mach/cvmx-pko3-queue.h
index b3f61d7..3931191 100644
--- a/arch/mips/mach-octeon/include/mach/cvmx-pko3-queue.h
+++ b/arch/mips/mach-octeon/include/mach/cvmx-pko3-queue.h
@@ -6,6 +6,8 @@
#ifndef __CVMX_PKO3_QUEUE_H__
#define __CVMX_PKO3_QUEUE_H__
+enum cvmx_pko3_level_e;
+
/**
* @INTERNAL
*
@@ -46,11 +48,10 @@
* The children can have fair round-robin or priority-based scheduling
* when multiple children are assigned a single parent.
*
- * @param node is the OCI node location for the queues to be configured
- * @param parent_level is the level of the parent queue, 2 to 5.
+ * @param node on which to operate
+ * @param child_level is the level of the child queue
* @param parent_queue is the number of the parent Scheduler Queue
* @param child_base is the number of the first child SQ or DQ to assign to
- * @param parent
* @param child_count is the number of consecutive children to assign
* @param stat_prio_count is the priority setting for the children L2 SQs
*
@@ -65,8 +66,10 @@
*
* Note: this function supports the configuration of node-local unit.
*/
-int cvmx_pko3_sq_config_children(unsigned int node, unsigned int parent_level,
- unsigned int parent_queue, unsigned int child_base,
+int cvmx_pko3_sq_config_children(unsigned int node,
+ enum cvmx_pko3_level_e child_level,
+ unsigned int parent_queue,
+ unsigned int child_base,
unsigned int child_count, int stat_prio_count);
/*
diff --git a/arch/riscv/cpu/generic/Kconfig b/arch/riscv/cpu/generic/Kconfig
index 897765c..2baba22 100644
--- a/arch/riscv/cpu/generic/Kconfig
+++ b/arch/riscv/cpu/generic/Kconfig
@@ -6,6 +6,7 @@
bool
select BINMAN if SPL
select ARCH_EARLY_INIT_R
+ select SYS_CACHE_SHIFT_6
imply CPU
imply CPU_RISCV
imply RISCV_TIMER if (RISCV_SMODE || SPL_RISCV_SMODE)
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
index dad22bf..59d58a5 100644
--- a/arch/riscv/cpu/start.S
+++ b/arch/riscv/cpu/start.S
@@ -91,16 +91,35 @@
* Set stackpointer in internal/ex RAM to call board_init_f
*/
call_board_init_f:
- li t0, -16
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
- li t1, CONFIG_SPL_STACK
+ li t0, CONFIG_SPL_STACK
#else
- li t1, SYS_INIT_SP_ADDR
+ li t0, SYS_INIT_SP_ADDR
#endif
- and sp, t1, t0 /* force 16 byte alignment */
+ and t0, t0, -16 /* force 16 byte alignment */
+
+ /* setup stack */
+#if CONFIG_IS_ENABLED(SMP)
+ /* tp: hart id */
+ slli t1, tp, CONFIG_STACK_SIZE_SHIFT
+ sub sp, t0, t1
+#else
+ mv sp, t0
+#endif
+/*
+ * Now sp points to the right stack belonging to current CPU.
+ * It's essential before any function call, otherwise, we get data-race.
+ */
call_board_init_f_0:
- mv a0, sp
+ /* find top of reserve space */
+#if CONFIG_IS_ENABLED(SMP)
+ li t1, CONFIG_NR_CPUS
+#else
+ li t1, 1
+#endif
+ slli t1, t1, CONFIG_STACK_SIZE_SHIFT
+ sub a0, t0, t1 /* t1 -> size of all CPU stacks */
jal board_init_f_alloc_reserve
/*
@@ -109,14 +128,6 @@
*/
mv s0, a0
- /* setup stack */
-#if CONFIG_IS_ENABLED(SMP)
- /* tp: hart id */
- slli t0, tp, CONFIG_STACK_SIZE_SHIFT
- sub sp, a0, t0
-#else
- mv sp, a0
-#endif
/* Configure proprietary settings and customized CSRs of harts */
call_harts_early_init:
diff --git a/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi
index 710b082..b90e7f8 100644
--- a/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi
+++ b/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi
@@ -313,9 +313,9 @@
<&syscrg JH7110_SYSCLK_BUS_ROOT>,
<&syscrg JH7110_SYSCLK_PERH_ROOT>,
<&syscrg JH7110_SYSCLK_QSPI_REF>;
- assigned-clock-parents = <&syscrg JH7110_SYSCLK_PLL0_OUT>,
- <&syscrg JH7110_SYSCLK_PLL2_OUT>,
- <&syscrg JH7110_SYSCLK_PLL2_OUT>,
+ assigned-clock-parents = <&pllclk JH7110_SYSCLK_PLL0_OUT>,
+ <&pllclk JH7110_SYSCLK_PLL2_OUT>,
+ <&pllclk JH7110_SYSCLK_PLL2_OUT>,
<&syscrg JH7110_SYSCLK_QSPI_REF_SRC>;
assigned-clock-rates = <0>, <0>, <0>, <0>;
};
diff --git a/arch/riscv/dts/jh7110-u-boot.dtsi b/arch/riscv/dts/jh7110-u-boot.dtsi
index c221195..2f560e7 100644
--- a/arch/riscv/dts/jh7110-u-boot.dtsi
+++ b/arch/riscv/dts/jh7110-u-boot.dtsi
@@ -83,7 +83,6 @@
&syscrg {
bootph-pre-ram;
- starfive,sys-syscon = <&sys_syscon>;
};
&stgcrg {
diff --git a/arch/riscv/dts/jh7110.dtsi b/arch/riscv/dts/jh7110.dtsi
index 58e332e..825fbb7 100644
--- a/arch/riscv/dts/jh7110.dtsi
+++ b/arch/riscv/dts/jh7110.dtsi
@@ -487,19 +487,29 @@
<&gmac1_rgmii_rxin>,
<&i2stx_bclk_ext>, <&i2stx_lrck_ext>,
<&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
- <&tdm_ext>, <&mclk_ext>;
+ <&tdm_ext>, <&mclk_ext>,
+ <&pllclk JH7110_SYSCLK_PLL0_OUT>,
+ <&pllclk JH7110_SYSCLK_PLL1_OUT>,
+ <&pllclk JH7110_SYSCLK_PLL2_OUT>;
clock-names = "osc", "gmac1_rmii_refin",
"gmac1_rgmii_rxin",
"i2stx_bclk_ext", "i2stx_lrck_ext",
"i2srx_bclk_ext", "i2srx_lrck_ext",
- "tdm_ext", "mclk_ext";
+ "tdm_ext", "mclk_ext",
+ "pll0_out", "pll1_out", "pll2_out";
#clock-cells = <1>;
#reset-cells = <1>;
};
sys_syscon: sys_syscon@13030000 {
- compatible = "starfive,jh7110-sys-syscon","syscon";
+ compatible = "starfive,jh7110-sys-syscon","syscon", "simple-mfd";
reg = <0x0 0x13030000 0x0 0x1000>;
+
+ pllclk: clock-controller {
+ compatible = "starfive,jh7110-pll";
+ clocks = <&osc>;
+ #clock-cells = <1>;
+ };
};
sysgpio: pinctrl@13040000 {
diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h
index 56dcb84..ee4991f 100644
--- a/arch/sandbox/include/asm/sdl.h
+++ b/arch/sandbox/include/asm/sdl.h
@@ -7,6 +7,7 @@
#define __SANDBOX_SDL_H
#include <errno.h>
+#include <video.h>
#ifdef CONFIG_SANDBOX_SDL
@@ -87,6 +88,22 @@
*/
int sandbox_sdl_sound_init(int rate, int channels);
+/**
+ * sandbox_sdl_set_bpp() - Set the depth of the sandbox display
+ *
+ * The device must not be active when this function is called. It activiates it
+ * before returning.
+ *
+ * This updates the depth value and adjusts a few other settings accordingly.
+ * It must be called before the display is probed.
+ *
+ * @dev: Device to adjust
+ * @l2bpp: depth to set
+ * Return: 0 if the device was already active, other error if it fails to probe
+ * after the change
+ */
+int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp);
+
#else
static inline int sandbox_sdl_init_display(int width, int height, int log2_bpp,
bool double_size)
@@ -134,6 +151,12 @@
return -ENODEV;
}
+static inline int sandbox_sdl_set_bpp(struct udevice *dev,
+ enum video_log2_bpp l2bpp)
+{
+ return -ENOSYS;
+}
+
#endif
#endif
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index e482271..17159f8 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -8,7 +8,6 @@
#ifndef __ASM_TEST_H
#define __ASM_TEST_H
-#include <video.h>
#include <pci_ids.h>
struct unit_test_state;
@@ -300,30 +299,6 @@
*/
int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty);
-#if IS_ENABLED(CONFIG_SANDBOX_SDL)
-/**
- * sandbox_sdl_set_bpp() - Set the depth of the sandbox display
- *
- * The device must not be active when this function is called. It activiates it
- * before returning.
- *
- * This updates the depth value and adjusts a few other settings accordingly.
- * It must be called before the display is probed.
- *
- * @dev: Device to adjust
- * @l2bpp: depth to set
- * Return: 0 if the device was already active, other error if it fails to probe
- * after the change
- */
-int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp);
-#else
-static inline int sandbox_sdl_set_bpp(struct udevice *dev,
- enum video_log2_bpp l2bpp)
-{
- return -ENOSYS;
-}
-#endif
-
/**
* sandbox_set_fake_efi_mgr_dev() - Control EFI bootmgr producing valid bootflow
*
diff --git a/bin/travis-ci/conf.M5208EVBE_qemu b/bin/travis-ci/conf.M5208EVBE_qemu
deleted file mode 100644
index 947f13c..0000000
--- a/bin/travis-ci/conf.M5208EVBE_qemu
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (c) 2023 Marek Vasut <marek.vasut+renesas@mailbox.org>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-console_impl=qemu
-qemu_machine="mcf5208evb"
-qemu_binary="qemu-system-m68k"
-qemu_extra_args="-nographic -serial mon:stdio -net user,tftp=${UBOOT_TRAVIS_BUILD_DIR} -net nic,model=mcf-fec"
-qemu_kernel_args="-bios ${U_BOOT_BUILD_DIR}/u-boot.bin"
-reset_impl=none
-flash_impl=none
diff --git a/board/BuR/brppt1/MAINTAINERS b/board/BuR/brppt1/MAINTAINERS
index 6b45508..a974a97 100644
--- a/board/BuR/brppt1/MAINTAINERS
+++ b/board/BuR/brppt1/MAINTAINERS
@@ -2,6 +2,7 @@
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
S: Maintained
F: board/BuR/brppt1/
+F: board/BuR/common/
F: include/configs/brppt1.h
F: configs/brppt1_mmc_defconfig
F: configs/brppt1_nand_defconfig
diff --git a/board/BuR/brppt2/MAINTAINERS b/board/BuR/brppt2/MAINTAINERS
index fe65188..bfeaa57 100644
--- a/board/BuR/brppt2/MAINTAINERS
+++ b/board/BuR/brppt2/MAINTAINERS
@@ -2,5 +2,6 @@
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
S: Maintained
F: board/BuR/brppt2/
+F: board/BuR/common/
F: include/configs/brppt2.h
F: configs/brppt2_defconfig
diff --git a/board/BuR/brsmarc1/MAINTAINERS b/board/BuR/brsmarc1/MAINTAINERS
index 8d1fe21..7421f61 100644
--- a/board/BuR/brsmarc1/MAINTAINERS
+++ b/board/BuR/brsmarc1/MAINTAINERS
@@ -2,5 +2,6 @@
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
S: Maintained
F: board/BuR/brsmarc1/
+F: board/BuR/common/
F: include/configs/brsmarc1.h
F: configs/brsmarc1_defconfig
diff --git a/board/BuR/brxre1/MAINTAINERS b/board/BuR/brxre1/MAINTAINERS
index 5aa3671..f826a44 100644
--- a/board/BuR/brxre1/MAINTAINERS
+++ b/board/BuR/brxre1/MAINTAINERS
@@ -2,6 +2,7 @@
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
S: Maintained
F: board/BuR/brxre1/
+F: board/BuR/common/
F: include/configs/brxre1.h
F: configs/brxre1_defconfig
F: arch/arm/dts/am335x-brxre1.dts
diff --git a/board/LaCie/net2big_v2/MAINTAINERS b/board/LaCie/net2big_v2/MAINTAINERS
index 7046e1b..66e8219 100644
--- a/board/LaCie/net2big_v2/MAINTAINERS
+++ b/board/LaCie/net2big_v2/MAINTAINERS
@@ -7,6 +7,7 @@
F: arch/arm/dts/kirkwood-net2big.dts
F: arch/arm/dts/kirkwood-net2big-u-boot.dtsi
F: arch/arm/dts/kirkwood-netxbig.dtsi
+F: board/LaCie/common/
F: board/LaCie/net2big_v2/
F: include/configs/lacie_kw.h
F: configs/d2net_v2_defconfig
diff --git a/board/LaCie/netspace_v2/MAINTAINERS b/board/LaCie/netspace_v2/MAINTAINERS
index 1cc4f71..03bc787 100644
--- a/board/LaCie/netspace_v2/MAINTAINERS
+++ b/board/LaCie/netspace_v2/MAINTAINERS
@@ -12,6 +12,7 @@
F: arch/arm/dts/kirkwood-ns2mini.dts
F: arch/arm/dts/kirkwood-ns2mini-u-boot.dtsi
F: arch/arm/dts/kirkwood-ns2-u-boot.dtsi
+F: board/LaCie/common/
F: board/LaCie/netspace_v2/
F: include/configs/lacie_kw.h
F: configs/inetspace_v2_defconfig
diff --git a/board/Marvell/db-88f6820-amc/MAINTAINERS b/board/Marvell/db-88f6820-amc/MAINTAINERS
index abf5b7e..d519eb4 100644
--- a/board/Marvell/db-88f6820-amc/MAINTAINERS
+++ b/board/Marvell/db-88f6820-amc/MAINTAINERS
@@ -4,3 +4,4 @@
F: board/Marvell/db-88f6820-amc/
F: include/configs/db-88f6820-amc.h
F: configs/db-88f6820-amc_defconfig
+F: configs/db-88f6820-amc_nand_defconfig
diff --git a/board/Synology/ds109/MAINTAINERS b/board/Synology/ds109/MAINTAINERS
index 8783fdb..2c50edc 100644
--- a/board/Synology/ds109/MAINTAINERS
+++ b/board/Synology/ds109/MAINTAINERS
@@ -2,5 +2,6 @@
M: Walter Schweizer <swwa@users.sourceforge.net>
S: Maintained
F: board/Synology/ds109
+F: board/Synology/common
F: configs/ds109_defconfig
F: include/configs/ds109.h
diff --git a/board/Synology/ds116/MAINTAINERS b/board/Synology/ds116/MAINTAINERS
index a5080b0..8d3cc24 100644
--- a/board/Synology/ds116/MAINTAINERS
+++ b/board/Synology/ds116/MAINTAINERS
@@ -3,5 +3,6 @@
S: Maintained
F: arch/arm/dts/armada-385-synology-ds116.dts
F: board/Synology/ds116/
+F: board/Synology/common
F: include/configs/ds116.h
F: configs/ds116_defconfig
diff --git a/board/Synology/ds414/MAINTAINERS b/board/Synology/ds414/MAINTAINERS
index 502cbd7..22b7535 100644
--- a/board/Synology/ds414/MAINTAINERS
+++ b/board/Synology/ds414/MAINTAINERS
@@ -2,5 +2,6 @@
M: Phil Sutter <phil@nwl.cc>
S: Maintained
F: board/Synology/ds414/
+F: board/Synology/common/
F: include/configs/ds414.h
F: configs/ds414_defconfig
diff --git a/board/amlogic/u200/MAINTAINERS b/board/amlogic/u200/MAINTAINERS
index f429c21..88c5038 100644
--- a/board/amlogic/u200/MAINTAINERS
+++ b/board/amlogic/u200/MAINTAINERS
@@ -4,7 +4,7 @@
L: u-boot-amlogic@groups.io
F: board/amlogic/u200/
F: configs/u200_defconfig
-F: configs/bananapi-m2pro_defconfig
+F: configs/bananapi-m2-pro_defconfig
F: configs/bananapi-m5_defconfig
F: configs/radxa-zero_defconfig
F: doc/board/amlogic/u200.rst
diff --git a/board/amlogic/w400/MAINTAINERS b/board/amlogic/w400/MAINTAINERS
index 117f79e..19b1f30 100644
--- a/board/amlogic/w400/MAINTAINERS
+++ b/board/amlogic/w400/MAINTAINERS
@@ -5,6 +5,7 @@
F: board/amlogic/w400/
F: configs/bananapi-cm4-cm4io_defconfig
F: configs/bananapi-m2s_defconfig
+F: configs/odroid-n2l_defconfig
F: configs/radxa-zero2_defconfig
F: doc/board/amlogic/w400.rst
F: doc/board/amlogic/bananapi-cm4io.rst
diff --git a/board/anbernic/rgxx3_rk3566/MAINTAINERS b/board/anbernic/rgxx3_rk3566/MAINTAINERS
index 647e49d..1c0d3fe 100644
--- a/board/anbernic/rgxx3_rk3566/MAINTAINERS
+++ b/board/anbernic/rgxx3_rk3566/MAINTAINERS
@@ -1,6 +1,6 @@
RGXX3-RK3566
M: Chris Morgan <macromorgan@hotmail.com>
S: Maintained
-F: board/anbernic/rgxx3-rk3566
-F: include/configs/anbernic-rgxx3-rk3566
+F: board/anbernic/rgxx3_rk3566
+F: include/configs/anbernic-rgxx3-rk3566.h
F: configs/anbernic-rgxx3_defconfig
diff --git a/board/avionic-design/medcom-wide/MAINTAINERS b/board/avionic-design/medcom-wide/MAINTAINERS
index 0a00fcf..3d2cdec 100644
--- a/board/avionic-design/medcom-wide/MAINTAINERS
+++ b/board/avionic-design/medcom-wide/MAINTAINERS
@@ -2,5 +2,6 @@
M: Alban Bedel <alban.bedel@avionic-design.de>
S: Maintained
F: board/avionic-design/medcom-wide/
+F: board/avionic-design/common/
F: include/configs/medcom-wide.h
F: configs/medcom-wide_defconfig
diff --git a/board/avionic-design/plutux/MAINTAINERS b/board/avionic-design/plutux/MAINTAINERS
index e8ef509..0275680 100644
--- a/board/avionic-design/plutux/MAINTAINERS
+++ b/board/avionic-design/plutux/MAINTAINERS
@@ -2,5 +2,6 @@
M: Alban Bedel <alban.bedel@avionic-design.de>
S: Maintained
F: board/avionic-design/plutux/
+F: board/avionic-design/common/
F: include/configs/plutux.h
F: configs/plutux_defconfig
diff --git a/board/avionic-design/tec-ng/MAINTAINERS b/board/avionic-design/tec-ng/MAINTAINERS
index 5cbdf8e..645be81 100644
--- a/board/avionic-design/tec-ng/MAINTAINERS
+++ b/board/avionic-design/tec-ng/MAINTAINERS
@@ -2,5 +2,6 @@
M: Alban Bedel <alban.bedel@avionic-design.de>
S: Maintained
F: board/avionic-design/tec-ng/
+F: board/avionic-design/common/
F: include/configs/tec-ng.h
F: configs/tec-ng_defconfig
diff --git a/board/avionic-design/tec/MAINTAINERS b/board/avionic-design/tec/MAINTAINERS
index 10f1aac..36088e7 100644
--- a/board/avionic-design/tec/MAINTAINERS
+++ b/board/avionic-design/tec/MAINTAINERS
@@ -2,5 +2,6 @@
M: Alban Bedel <alban.bedel@avionic-design.de>
S: Maintained
F: board/avionic-design/tec/
+F: board/avionic-design/common/
F: include/configs/tec.h
F: configs/tec_defconfig
diff --git a/board/beacon/imx8mm/MAINTAINERS b/board/beacon/imx8mm/MAINTAINERS
index d48ba86..d8a5d09 100644
--- a/board/beacon/imx8mm/MAINTAINERS
+++ b/board/beacon/imx8mm/MAINTAINERS
@@ -5,4 +5,5 @@
F: board/beacon/imx8mm/
F: include/configs/imx8mm_beacon.h
F: configs/imx8mm_beacon_defconfig
+F: configs/imx8mm_beacon_fspi_defconfig
F: doc/board/beacon/
diff --git a/board/beacon/imx8mn/MAINTAINERS b/board/beacon/imx8mn/MAINTAINERS
index 4805cb2..6dcef21 100644
--- a/board/beacon/imx8mn/MAINTAINERS
+++ b/board/beacon/imx8mn/MAINTAINERS
@@ -5,3 +5,4 @@
F: include/configs/imx8mn_beacon.h
F: configs/imx8mn_beacon_defconfig
F: configs/imx8mn_beacon_2g_defconfig
+F: configs/imx8mn_beacon_fspi_defconfig
diff --git a/board/birdland/bav335x/MAINTAINERS b/board/birdland/bav335x/MAINTAINERS
deleted file mode 100644
index 45dcfcb..0000000
--- a/board/birdland/bav335x/MAINTAINERS
+++ /dev/null
@@ -1,13 +0,0 @@
-BAV335x BOARD
-M: Gilles Gameiro <gilles@gigadevices.com>
-S: Maintained
-F: include/configs/bav335x.h
-F: board/birdland/bav335x/Kconfig
-F: board/birdland/bav335x/Makefile
-F: board/birdland/bav335x/README
-F: board/birdland/bav335x/board.c
-F: board/birdland/bav335x/board.h
-F: board/birdland/bav335x/mux.c
-F: board/birdland/bav335x/u-boot.lds
-F: configs/birdland_bav335a_defconfig
-F: configs/birdland_bav335b_defconfig
diff --git a/board/broadcom/bcm11130/MAINTAINERS b/board/broadcom/bcm11130/MAINTAINERS
deleted file mode 100644
index 5478350..0000000
--- a/board/broadcom/bcm11130/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-BCM11130 BOARD
-M: Steve Rae <steve.rae@raedomain.com>
-S: Maintained
-F: board/broadcom/bcm28155_ap/
-F: include/configs/bcm_ep_board.h
-F: configs/bcm11130_defconfig
diff --git a/board/broadcom/bcm11130_nand/MAINTAINERS b/board/broadcom/bcm11130_nand/MAINTAINERS
deleted file mode 100644
index 4cf66b7..0000000
--- a/board/broadcom/bcm11130_nand/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-BCM11130_NAND BOARD
-M: Steve Rae <steve.rae@raedomain.com>
-S: Maintained
-F: board/broadcom/bcm28155_ap/
-F: include/configs/bcm_ep_board.h
-F: configs/bcm11130_nand_defconfig
diff --git a/board/broadcom/bcm28155_w1d/MAINTAINERS b/board/broadcom/bcm28155_w1d/MAINTAINERS
deleted file mode 100644
index c0558e7..0000000
--- a/board/broadcom/bcm28155_w1d/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-BCM28155_W1D BOARD
-M: Steve Rae <steve.rae@raedomain.com>
-S: Maintained
-F: board/broadcom/bcm28155_ap/
-F: include/configs/bcm28155_ap.h
-F: configs/bcm28155_w1d_defconfig
diff --git a/board/broadcom/bcm_ep/Makefile b/board/broadcom/bcm_ep/Makefile
deleted file mode 100644
index 29a3ea7..0000000
--- a/board/broadcom/bcm_ep/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright 2014 Broadcom Corporation.
-
-obj-y += board.o
diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c
deleted file mode 100644
index e91fa40..0000000
--- a/board/broadcom/bcm_ep/board.c
+++ /dev/null
@@ -1,86 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2014 Broadcom Corporation.
- */
-
-#include <common.h>
-#include <cpu_func.h>
-#include <init.h>
-#include <net.h>
-#include <asm/cache.h>
-#include <asm/global_data.h>
-#include <asm/io.h>
-#include <config.h>
-#include <netdev.h>
-#include <asm/system.h>
-#include <asm/iproc-common/armpll.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/*
- * board_init - early hardware init
- */
-int board_init(void)
-{
- /*
- * Address of boot parameters passed to kernel
- * Use default offset 0x100
- */
- gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
-
- return 0;
-}
-
-/*
- * dram_init - sets u-boot's idea of sdram size
- */
-int dram_init(void)
-{
- gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE,
- CFG_SYS_SDRAM_SIZE);
- return 0;
-}
-
-int dram_init_banksize(void)
-{
- gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
- gd->bd->bi_dram[0].size = gd->ram_size;
-
- return 0;
-}
-
-int board_early_init_f(void)
-{
- uint32_t status = 0;
-
- /* Setup PLL if required */
-#if defined(CONFIG_ARMCLK)
- armpll_config(CONFIG_ARMCLK);
-#endif
-
- return status;
-}
-
-#ifdef CONFIG_ARMV7_NONSEC
-void smp_set_core_boot_addr(unsigned long addr, int corenr)
-{
-}
-
-void smp_kick_all_cpus(void)
-{
-}
-
-void smp_waitloop(unsigned previous_address)
-{
-}
-#endif
-
-#ifdef CONFIG_BCM_SF2_ETH
-int board_eth_init(struct bd_info *bis)
-{
- int rc = -1;
- printf("Registering BCM sf2 eth\n");
- rc = bcm_sf2_eth_register(bis, 0);
- return rc;
-}
-#endif
diff --git a/board/broadcom/bcmns/MAINTAINERS b/board/broadcom/bcmns/MAINTAINERS
index fd37c33..63c6d8b 100644
--- a/board/broadcom/bcmns/MAINTAINERS
+++ b/board/broadcom/bcmns/MAINTAINERS
@@ -1,6 +1,6 @@
BCMNS BOARD
M: Linus Walleij <linus.walleij@linaro.org>
S: Maintained
-F: board/broadcom/bcmnsp/
-F: configs/bcmnsp_defconfig
-F: include/configs/bcmnsp.h
+F: board/broadcom/bcmns/
+F: configs/bcmns_defconfig
+F: include/configs/bcmns.h
diff --git a/board/bsh/imx6ulz_smm_m2/MAINTAINERS b/board/bsh/imx6ulz_smm_m2/MAINTAINERS
index 8f3d79d..77a033c 100644
--- a/board/bsh/imx6ulz_smm_m2/MAINTAINERS
+++ b/board/bsh/imx6ulz_smm_m2/MAINTAINERS
@@ -1,6 +1,6 @@
MX6ULZ_SMM_M2 BOARD
M: Michael Trimarchi <michael@amarulasolutions.com>
S: Maintained
-F: board/bsh/mx6ulz_smm_m2/
+F: board/bsh/imx6ulz_smm_m2/
F: include/configs/imx6ulz_smm_m2.h
F: configs/imx6ulz_smm_m2_defconfig
diff --git a/board/cei/cei-tk1-som/MAINTAINERS b/board/cei/cei-tk1-som/MAINTAINERS
index 192e1a3..f181740 100644
--- a/board/cei/cei-tk1-som/MAINTAINERS
+++ b/board/cei/cei-tk1-som/MAINTAINERS
@@ -1,6 +1,6 @@
TK1-SOM BOARD
M: Peter.Chubb@data61.csiro.au
S: Maintained
-F: board/cei/tk1-som/
+F: board/cei/cei-tk1-som/
F: include/configs/cei-tk1-som.h
F: configs/cei-tk1-som_defconfig
diff --git a/board/cobra5272/MAINTAINERS b/board/cobra5272/MAINTAINERS
index a064da2..1f398a7 100644
--- a/board/cobra5272/MAINTAINERS
+++ b/board/cobra5272/MAINTAINERS
@@ -1,5 +1,5 @@
COBRA5272 BOARD
-#M: -
+M: Angelo Dureghello <angelo@kernel-space.org>
S: Maintained
F: board/cobra5272/
F: include/configs/cobra5272.h
diff --git a/board/comtrend/ar5315u/MAINTAINERS b/board/comtrend/ar5315u/MAINTAINERS
index 048073c..0515e03 100644
--- a/board/comtrend/ar5315u/MAINTAINERS
+++ b/board/comtrend/ar5315u/MAINTAINERS
@@ -1,6 +1,6 @@
COMTREND AR-5315U BOARD
M: Álvaro Fernández Rojas <noltari@gmail.com>
S: Maintained
-F: board/comtrend/ar-5315u/
+F: board/comtrend/ar5315u/
F: include/configs/comtrend_ar5315u.h
F: configs/comtrend_ar5315u_ram_defconfig
diff --git a/board/comtrend/ar5387un/MAINTAINERS b/board/comtrend/ar5387un/MAINTAINERS
index bcaac64..48757c9 100644
--- a/board/comtrend/ar5387un/MAINTAINERS
+++ b/board/comtrend/ar5387un/MAINTAINERS
@@ -1,6 +1,6 @@
COMTREND AR-5387UN BOARD
M: Álvaro Fernández Rojas <noltari@gmail.com>
S: Maintained
-F: board/comtrend/ar-5387un/
+F: board/comtrend/ar5387un/
F: include/configs/comtrend_ar5387un.h
F: configs/comtrend_ar5387un_ram_defconfig
diff --git a/board/comtrend/ct5361/MAINTAINERS b/board/comtrend/ct5361/MAINTAINERS
index aea737a..3373e50 100644
--- a/board/comtrend/ct5361/MAINTAINERS
+++ b/board/comtrend/ct5361/MAINTAINERS
@@ -1,6 +1,6 @@
COMTREND CT-5361 BOARD
M: Álvaro Fernández Rojas <noltari@gmail.com>
S: Maintained
-F: board/comtrend/ct-5361/
+F: board/comtrend/ct5361/
F: include/configs/comtrend_ct5361.h
F: configs/comtrend_ct5361_ram_defconfig
diff --git a/board/comtrend/vr3032u/MAINTAINERS b/board/comtrend/vr3032u/MAINTAINERS
index 833d7da..132101f 100644
--- a/board/comtrend/vr3032u/MAINTAINERS
+++ b/board/comtrend/vr3032u/MAINTAINERS
@@ -1,6 +1,6 @@
COMTREND VR-3032U BOARD
M: Álvaro Fernández Rojas <noltari@gmail.com>
S: Maintained
-F: board/comtrend/vr-3032u/
+F: board/comtrend/vr3032u/
F: include/configs/comtrend_vr-3032u.h
F: configs/comtrend_vr3032u_ram_defconfig
diff --git a/board/comtrend/wap5813n/MAINTAINERS b/board/comtrend/wap5813n/MAINTAINERS
index f4d9979..c676483 100644
--- a/board/comtrend/wap5813n/MAINTAINERS
+++ b/board/comtrend/wap5813n/MAINTAINERS
@@ -1,6 +1,6 @@
COMTREND WAP-5813N BOARD
M: Álvaro Fernández Rojas <noltari@gmail.com>
S: Maintained
-F: board/comtrend/wap-5813n/
+F: board/comtrend/wap5813n/
F: include/configs/comtrend_wap-5813n.h
F: configs/comtrend_wap5813n_ram_defconfig
diff --git a/board/coreboot/coreboot/MAINTAINERS b/board/coreboot/coreboot/MAINTAINERS
index ee12d32..f777365 100644
--- a/board/coreboot/coreboot/MAINTAINERS
+++ b/board/coreboot/coreboot/MAINTAINERS
@@ -1,13 +1,11 @@
COREBOOT BOARD
M: Simon Glass <sjg@chromium.org>
S: Maintained
-F: board/coreboot/coreboot/
+F: board/coreboot/
F: include/configs/coreboot.h
F: configs/coreboot_defconfig
COREBOOT64 BOARD
M: Simon Glass <sjg@chromium.org>
S: Maintained
-F: board/coreboot/coreboot/
-F: include/configs/coreboot.h
F: configs/coreboot64_defconfig
diff --git a/board/data_modul/imx8mm_edm_sbc/MAINTAINERS b/board/data_modul/imx8mm_edm_sbc/MAINTAINERS
index 72659c0..36af19b 100644
--- a/board/data_modul/imx8mm_edm_sbc/MAINTAINERS
+++ b/board/data_modul/imx8mm_edm_sbc/MAINTAINERS
@@ -3,6 +3,6 @@
S: Maintained
F: arch/arm/dts/imx8mm-data-modul-edm-sbc.dts
F: arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi
-F: board/data_modul/imx8mm_data_modul_edm_sbc/
+F: board/data_modul/imx8mm_edm_sbc/
F: configs/imx8mm_data_modul_edm_sbc_defconfig
F: include/configs/imx8mm_data_modul_edm_sbc.h
diff --git a/board/data_modul/imx8mp_edm_sbc/MAINTAINERS b/board/data_modul/imx8mp_edm_sbc/MAINTAINERS
index a67e104..8a49c8a 100644
--- a/board/data_modul/imx8mp_edm_sbc/MAINTAINERS
+++ b/board/data_modul/imx8mp_edm_sbc/MAINTAINERS
@@ -3,6 +3,6 @@
S: Maintained
F: arch/arm/dts/imx8mp-data-modul-edm-sbc.dts
F: arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
-F: board/data_modul/imx8mp_data_modul_edm_sbc/
+F: board/data_modul/imx8mp_edm_sbc/
F: configs/imx8mp_data_modul_edm_sbc_defconfig
F: include/configs/imx8mp_data_modul_edm_sbc.h
diff --git a/board/devboards/dbm-soc1/MAINTAINERS b/board/devboards/dbm-soc1/MAINTAINERS
index 625f2c8..577eba5 100644
--- a/board/devboards/dbm-soc1/MAINTAINERS
+++ b/board/devboards/dbm-soc1/MAINTAINERS
@@ -1,5 +1,6 @@
Devboards.de DBM-SoC1 BOARD
M: Marek Vasut <marex@denx.de>
S: Maintained
+F: board/devboards/dbm-soc1/
F: include/configs/socfpga_dbm_soc1.h
F: configs/socfpga_dbm_soc1_defconfig
diff --git a/board/efi/efi-x86_app/MAINTAINERS b/board/efi/efi-x86_app/MAINTAINERS
index b292811..584619c 100644
--- a/board/efi/efi-x86_app/MAINTAINERS
+++ b/board/efi/efi-x86_app/MAINTAINERS
@@ -1,6 +1,7 @@
EFI-X86_APP32 BOARD
M: Simon Glass <sjg@chromium.org>
S: Maintained
+F: board/efi/Kconfig
F: board/efi/efi-x86_app/
F: include/configs/efi-x86_app.h
F: configs/efi-x86_app32_defconfig
@@ -8,6 +9,7 @@
EFI-X86_APP64 BOARD
M: Simon Glass <sjg@chromium.org>
S: Maintained
+F: board/efi/Kconfig
F: board/efi/efi-x86_app/
F: include/configs/efi-x86_app.h
F: configs/efi-x86_app64_defconfig
diff --git a/board/efi/efi-x86_payload/MAINTAINERS b/board/efi/efi-x86_payload/MAINTAINERS
index abf3a15..d795d60 100644
--- a/board/efi/efi-x86_payload/MAINTAINERS
+++ b/board/efi/efi-x86_payload/MAINTAINERS
@@ -1,6 +1,7 @@
EFI-X86_PAYLOAD BOARD
M: Bin Meng <bmeng.cn@gmail.com>
S: Maintained
+F: board/efi/Kconfig
F: board/efi/efi-x86_payload/
F: include/configs/efi-x86_payload.h
F: configs/efi-x86_payload32_defconfig
diff --git a/board/emulation/qemu-arm/MAINTAINERS b/board/emulation/qemu-arm/MAINTAINERS
index e757ffc..5154262 100644
--- a/board/emulation/qemu-arm/MAINTAINERS
+++ b/board/emulation/qemu-arm/MAINTAINERS
@@ -2,6 +2,7 @@
M: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
S: Maintained
F: board/emulation/qemu-arm/
+F: board/emulation/common/
F: include/configs/qemu-arm.h
F: configs/qemu_arm_defconfig
F: configs/qemu_arm64_defconfig
diff --git a/board/emulation/qemu-ppce500/MAINTAINERS b/board/emulation/qemu-ppce500/MAINTAINERS
index 7317983..348ae90 100644
--- a/board/emulation/qemu-ppce500/MAINTAINERS
+++ b/board/emulation/qemu-ppce500/MAINTAINERS
@@ -3,5 +3,6 @@
M: Bin Meng <bmeng.cn@gmail.com>
S: Maintained
F: board/emulation/qemu-ppce500/
+F: board/emulation/common/
F: include/configs/qemu-ppce500.h
F: configs/qemu-ppce500_defconfig
diff --git a/board/emulation/qemu-riscv/MAINTAINERS b/board/emulation/qemu-riscv/MAINTAINERS
index 78969ed..3d7453f 100644
--- a/board/emulation/qemu-riscv/MAINTAINERS
+++ b/board/emulation/qemu-riscv/MAINTAINERS
@@ -2,6 +2,7 @@
M: Bin Meng <bmeng.cn@gmail.com>
S: Maintained
F: board/emulation/qemu-riscv/
+F: board/emulation/common/
F: include/configs/qemu-riscv.h
F: configs/qemu-riscv32_defconfig
F: configs/qemu-riscv32_smode_defconfig
diff --git a/board/emulation/qemu-x86/MAINTAINERS b/board/emulation/qemu-x86/MAINTAINERS
index 9a99d38..e62585a 100644
--- a/board/emulation/qemu-x86/MAINTAINERS
+++ b/board/emulation/qemu-x86/MAINTAINERS
@@ -2,6 +2,7 @@
M: Bin Meng <bmeng.cn@gmail.com>
S: Maintained
F: board/emulation/qemu-x86/
+F: board/emulation/common/
F: include/configs/qemu-x86.h
F: configs/qemu-x86_defconfig
@@ -9,5 +10,6 @@
M: Bin Meng <bmeng.cn@gmail.com>
S: Maintained
F: board/emulation/qemu-x86/
+F: board/emulation/common/
F: include/configs/qemu-x86.h
F: configs/qemu-x86_64_defconfig
diff --git a/board/engicam/imx6q/MAINTAINERS b/board/engicam/imx6q/MAINTAINERS
index 6b46378..266da95 100644
--- a/board/engicam/imx6q/MAINTAINERS
+++ b/board/engicam/imx6q/MAINTAINERS
@@ -2,6 +2,7 @@
M: Jagan Teki <jagan@amarulasolutions.com>
S: Maintained
F: board/engicam/imx6q
+F: board/engicam/common
F: include/configs/imx6-engicam.h
F: configs/imx6qdl_icore_mmc_defconfig
F: configs/imx6q_icore_nand_defconfig
diff --git a/board/engicam/imx6ul/MAINTAINERS b/board/engicam/imx6ul/MAINTAINERS
index 88db309..b9c6af2 100644
--- a/board/engicam/imx6ul/MAINTAINERS
+++ b/board/engicam/imx6ul/MAINTAINERS
@@ -2,6 +2,7 @@
M: Jagan Teki <jagan@amarulasolutions.com>
S: Maintained
F: board/engicam/imx6ul
+F: board/engicam/common
F: include/configs/imx6-engicam.h
F: configs/imx6ul_geam_mmc_defconfig
F: configs/imx6ul_geam_nand_defconfig
diff --git a/board/engicam/imx8mm/MAINTAINERS b/board/engicam/imx8mm/MAINTAINERS
index 2e99a59..ec0ad51 100644
--- a/board/engicam/imx8mm/MAINTAINERS
+++ b/board/engicam/imx8mm/MAINTAINERS
@@ -9,5 +9,6 @@
M: Matteo Lisi <matteo.lisi@engicam.com>
S: Maintained
F: board/engicam/imx8mm
+F: board/engicam/common
F: include/configs/imx8mm_icore_mx8mm.h
F: configs/imx8mm-icore-mx8mm-edimm2.2_defconfig
diff --git a/board/engicam/imx8mp/MAINTAINERS b/board/engicam/imx8mp/MAINTAINERS
index a25908a..c86f9bc 100644
--- a/board/engicam/imx8mp/MAINTAINERS
+++ b/board/engicam/imx8mp/MAINTAINERS
@@ -3,5 +3,6 @@
M: Matteo Lisi <matteo.lisi@engicam.com>
S: Maintained
F: board/engicam/imx8mp
+F: board/engicam/common
F: include/configs/imx8mp_icore_mx8mp.h
F: configs/imx8mp-icore-mx8mp-edimm2.2_defconfig
diff --git a/board/engicam/px30_core/MAINTAINERS b/board/engicam/px30_core/MAINTAINERS
index 77f0c2d..99c5f28 100644
--- a/board/engicam/px30_core/MAINTAINERS
+++ b/board/engicam/px30_core/MAINTAINERS
@@ -15,5 +15,6 @@
M: Suniel Mahesh <sunil@amarulasolutions.com>
S: Maintained
F: board/engicam/px30_core
+F: board/engicam/common
F: include/configs/px30_core.h
F: configs/px30-core-edimm2.2-px30_defconfig
diff --git a/board/engicam/stm32mp1/MAINTAINERS b/board/engicam/stm32mp1/MAINTAINERS
index 405ff99..4ba2a76 100644
--- a/board/engicam/stm32mp1/MAINTAINERS
+++ b/board/engicam/stm32mp1/MAINTAINERS
@@ -23,4 +23,5 @@
S: Maintained
F: arch/arm/dts/stm32mp15*icore*
F: board/engicam/stm32mp1
+F: board/engicam/common
F: configs/stm32mp15-icore-stm32mp1-edimm2.2_defconfig
diff --git a/board/firefly/firefly-rk3308/MAINTAINERS b/board/firefly/firefly-rk3308/MAINTAINERS
index 1990797..e584038 100644
--- a/board/firefly/firefly-rk3308/MAINTAINERS
+++ b/board/firefly/firefly-rk3308/MAINTAINERS
@@ -1,5 +1,6 @@
ROC-RK3308-CC
M: Andy Yan <andy.yan@rock-chips.com>
S: Maintained
-F: board/firefly/firefly-rk3308/roc_cc_rk3308.c
+F: board/firefly/firefly-rk3308/
F: configs/roc-cc-rk3308_defconfig
+F: include/configs/firefly_rk3308.h
diff --git a/board/freescale/imx93_evk/MAINTAINERS b/board/freescale/imx93_evk/MAINTAINERS
index 8ca4646..34ba278 100644
--- a/board/freescale/imx93_evk/MAINTAINERS
+++ b/board/freescale/imx93_evk/MAINTAINERS
@@ -4,4 +4,4 @@
F: board/freescale/imx93_evk/
F: include/configs/imx93_evk.h
F: configs/imx93_11x11_evk_defconfig
- configs/imx93_11x11_evk_ld_defconfig
+F: configs/imx93_11x11_evk_ld_defconfig
diff --git a/board/freescale/ls1043ardb/MAINTAINERS b/board/freescale/ls1043ardb/MAINTAINERS
index 36e7331..8e14ba3 100644
--- a/board/freescale/ls1043ardb/MAINTAINERS
+++ b/board/freescale/ls1043ardb/MAINTAINERS
@@ -3,7 +3,6 @@
M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1043ardb/
-F: board/freescale/ls1043ardb/ls1043ardb.c
F: include/configs/ls1043ardb.h
F: configs/ls1043ardb_defconfig
F: configs/ls1043ardb_nand_defconfig
diff --git a/board/freescale/m5208evbe/MAINTAINERS b/board/freescale/m5208evbe/MAINTAINERS
index c9c3c88..ff15303 100644
--- a/board/freescale/m5208evbe/MAINTAINERS
+++ b/board/freescale/m5208evbe/MAINTAINERS
@@ -1,5 +1,5 @@
M5208EVBE BOARD
-#M: -
+M: Angelo Dureghello <angelo@kernel-space.org>
S: Maintained
F: board/freescale/m5208evbe/
F: include/configs/M5208EVBE.h
diff --git a/board/freescale/m5249evb/MAINTAINERS b/board/freescale/m5249evb/MAINTAINERS
index c2273c3..619e0cd 100644
--- a/board/freescale/m5249evb/MAINTAINERS
+++ b/board/freescale/m5249evb/MAINTAINERS
@@ -1,5 +1,5 @@
M5249EVB BOARD
-#M: -
+M: Angelo Dureghello <angelo@kernel-space.org>
S: Maintained
F: board/freescale/m5249evb/
F: include/configs/M5249EVB.h
diff --git a/board/freescale/m5272c3/MAINTAINERS b/board/freescale/m5272c3/MAINTAINERS
index e586630..692ab5b 100644
--- a/board/freescale/m5272c3/MAINTAINERS
+++ b/board/freescale/m5272c3/MAINTAINERS
@@ -1,5 +1,5 @@
M5272C3 BOARD
-#M: -
+M: Angelo Dureghello <angelo@kernel-space.org>
S: Maintained
F: board/freescale/m5272c3/
F: include/configs/M5272C3.h
diff --git a/board/freescale/m5275evb/MAINTAINERS b/board/freescale/m5275evb/MAINTAINERS
index 4e6dbb1..065ae7b 100644
--- a/board/freescale/m5275evb/MAINTAINERS
+++ b/board/freescale/m5275evb/MAINTAINERS
@@ -1,5 +1,5 @@
M5275EVB BOARD
-#M: -
+M: Angelo Dureghello <angelo@kernel-space.org>
S: Maintained
F: board/freescale/m5275evb/
F: include/configs/M5275EVB.h
diff --git a/board/freescale/m5282evb/MAINTAINERS b/board/freescale/m5282evb/MAINTAINERS
index 305e748..f141c89 100644
--- a/board/freescale/m5282evb/MAINTAINERS
+++ b/board/freescale/m5282evb/MAINTAINERS
@@ -1,5 +1,5 @@
M5282EVB BOARD
-#M: -
+M: Angelo Dureghello <angelo@kernel-space.org>
S: Maintained
F: board/freescale/m5282evb/
F: include/configs/M5282EVB.h
diff --git a/board/gdsys/a38x/MAINTAINERS b/board/gdsys/a38x/MAINTAINERS
index 6492e79..bd81720 100644
--- a/board/gdsys/a38x/MAINTAINERS
+++ b/board/gdsys/a38x/MAINTAINERS
@@ -2,5 +2,6 @@
M: Mario Six <mario.six@gdsys.cc>
S: Maintained
F: board/gdsys/a38x/
+F: board/gdsys/common/
F: include/configs/controlcenterdc.h
F: configs/controlcenterdc_defconfig
diff --git a/board/gdsys/mpc8308/MAINTAINERS b/board/gdsys/mpc8308/MAINTAINERS
index 57faba4..514cde5 100644
--- a/board/gdsys/mpc8308/MAINTAINERS
+++ b/board/gdsys/mpc8308/MAINTAINERS
@@ -2,5 +2,6 @@
M: Mario Six <mario.six@gdsys.cc>
S: Maintained
F: board/gdsys/mpc8308/
+F: board/gdsys/common/
F: include/configs/gazerbeam.h
F: configs/gazerbeam_defconfig
diff --git a/board/google/chromebox_panther/MAINTAINERS b/board/google/chromebox_panther/MAINTAINERS
index c88774b..4963a89 100644
--- a/board/google/chromebox_panther/MAINTAINERS
+++ b/board/google/chromebox_panther/MAINTAINERS
@@ -1,6 +1,6 @@
CHROMEBOX PANTHER BOARD
M: Simon Glass <sjg@chromium.org>
S: Maintained
-F: board/google/chromebook_panther/
+F: board/google/chromebox_panther/
F: include/configs/chromebox_panther.h
F: configs/chromebox_panther_defconfig
diff --git a/board/hardkernel/odroid_go2/MAINTAINERS b/board/hardkernel/odroid_go2/MAINTAINERS
index eab622a..4d4c6e8 100644
--- a/board/hardkernel/odroid_go2/MAINTAINERS
+++ b/board/hardkernel/odroid_go2/MAINTAINERS
@@ -1,6 +1,6 @@
GO2
M: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
S: Maintained
-F: board/odroid/go2
+F: board/hardkernel/odroid_go2/
F: include/configs/odroid_go2.h
F: configs/odroid-go2_defconfig
diff --git a/board/k+p/kp_imx53/MAINTAINERS b/board/k+p/kp_imx53/MAINTAINERS
index c105a93..daf8611 100644
--- a/board/k+p/kp_imx53/MAINTAINERS
+++ b/board/k+p/kp_imx53/MAINTAINERS
@@ -1,6 +1,7 @@
KP_IMX53_HSC BOARD
M: Lukasz Majewski <lukma@denx.de>
S: Maintained
-F: board/k+p/kp_imx53/
+F: board/k\+p/kp_imx53/
+F: board/k\+p/bootscripts/tpcboot.cmd
F: include/configs/kp_imx53.h
F: configs/kp_imx53_defconfig
diff --git a/board/k+p/kp_imx6q_tpc/MAINTAINERS b/board/k+p/kp_imx6q_tpc/MAINTAINERS
index 6c4c8dd..e54f460 100644
--- a/board/k+p/kp_imx6q_tpc/MAINTAINERS
+++ b/board/k+p/kp_imx6q_tpc/MAINTAINERS
@@ -1,6 +1,7 @@
KP_IMX6Q_TPC BOARD
M: Lukasz Majewski <lukma@denx.de>
S: Maintained
-F: board/k+p/kp_imx6q_tpc/
+F: board/k\+p/kp_imx6q_tpc/
+F: board/k\+p/bootscripts/tpcboot.cmd
F: include/configs/kp_imx6q_tpc.h
F: configs/kp_imx6q_tpc_defconfig
diff --git a/board/keymile/km83xx/MAINTAINERS b/board/keymile/km83xx/MAINTAINERS
index ac1f8cb..8822e5d 100644
--- a/board/keymile/km83xx/MAINTAINERS
+++ b/board/keymile/km83xx/MAINTAINERS
@@ -3,6 +3,8 @@
M: Heiko Schocher <hs@denx.de>
S: Maintained
F: board/keymile/km83xx/
+F: board/keymile/common/
+F: board/keymile/scripts/
F: include/configs/km8360.h
F: configs/kmcoge5ne_defconfig
F: configs/kmeter1_defconfig
diff --git a/board/keymile/kmcent2/MAINTAINERS b/board/keymile/kmcent2/MAINTAINERS
index 1426475..1026188 100644
--- a/board/keymile/kmcent2/MAINTAINERS
+++ b/board/keymile/kmcent2/MAINTAINERS
@@ -2,6 +2,8 @@
M: Niel Fourie <lusus@denx.de>
S: Maintained
F: board/keymile/kmcent2/
+F: board/keymile/common/
+F: board/keymile/scripts/
F: include/configs/kmcent2.h
F: configs/kmcent2_defconfig
F: arch/powerpc/dts/kmcent2.dts
diff --git a/board/keymile/pg-wcom-ls102xa/MAINTAINERS b/board/keymile/pg-wcom-ls102xa/MAINTAINERS
index 33db2b2..ed5baf2 100644
--- a/board/keymile/pg-wcom-ls102xa/MAINTAINERS
+++ b/board/keymile/pg-wcom-ls102xa/MAINTAINERS
@@ -3,6 +3,8 @@
M: Rainer Boschung <rainer.boschung@hitachienergy.com>
S: Maintained
F: board/keymile/pg-wcom-ls102xa/
+F: board/keymile/common/
+F: board/keymile/scripts/
F: include/configs/km/pg-wcom-ls102xa.h
F: include/configs/pg-wcom-seli8.h
F: include/configs/pg-wcom-expu1.h
diff --git a/board/keymile/secu1/MAINTAINERS b/board/keymile/secu1/MAINTAINERS
index 833b3fd..e441f25 100644
--- a/board/keymile/secu1/MAINTAINERS
+++ b/board/keymile/secu1/MAINTAINERS
@@ -1,5 +1,8 @@
Hitachi Power Grids SECU1 BOARD
M: Holger Brunck <holger.brunck@hitachienergy.com>
S: Maintained
+F: board/keymile/secu1/
+F: board/keymile/common/
+F: board/keymile/scripts/
F: include/configs/socfpga_arria5_secu1.h
F: configs/socfpga_secu1_defconfig
diff --git a/board/l+g/vinco/MAINTAINERS b/board/l+g/vinco/MAINTAINERS
index 0cd6044..14b76b1 100644
--- a/board/l+g/vinco/MAINTAINERS
+++ b/board/l+g/vinco/MAINTAINERS
@@ -1,6 +1,6 @@
VInCo Platform
M: Gregory CLEMENT <gregory.clement@free-electrons.com>
S: Maintained
-F: board/l+g/vinco
+F: board/l\+g/vinco/
F: include/configs/vinco.h
F: configs/vinco_defconfig
diff --git a/board/pine64/pinebook-pro-rk3399/MAINTAINERS b/board/pine64/pinebook-pro-rk3399/MAINTAINERS
index 227c1c0..7300ca1 100644
--- a/board/pine64/pinebook-pro-rk3399/MAINTAINERS
+++ b/board/pine64/pinebook-pro-rk3399/MAINTAINERS
@@ -1,7 +1,7 @@
PINEBOOK_PRO
M: Peter Robinson <pbrobinson@gmail.com>
S: Maintained
-F: board/pine64/rk3399-pinebook-pro/
+F: board/pine64/pinebook-pro-rk3399/
F: include/configs/rk3399-pinebook-pro.h
F: arch/arm/dts/rk3399-pinebook-pro.dts
F: arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
diff --git a/board/pine64/pinephone-pro-rk3399/MAINTAINERS b/board/pine64/pinephone-pro-rk3399/MAINTAINERS
index c923ff1..bc2dcdd 100644
--- a/board/pine64/pinephone-pro-rk3399/MAINTAINERS
+++ b/board/pine64/pinephone-pro-rk3399/MAINTAINERS
@@ -1,7 +1,7 @@
PINEPHONE_PRO
M: Peter Robinson <pbrobinson@gmail.com>
S: Maintained
-F: board/pine64/rk3399-pinephone-pro/
+F: board/pine64/pinephone-pro-rk3399/
F: include/configs/rk3399-pinephone-pro.h
F: arch/arm/dts/rk3399-pinephone-pro.dts
F: arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi
diff --git a/board/rockchip/evb_rk3399/MAINTAINERS b/board/rockchip/evb_rk3399/MAINTAINERS
index 5be58f8..de1dc64 100644
--- a/board/rockchip/evb_rk3399/MAINTAINERS
+++ b/board/rockchip/evb_rk3399/MAINTAINERS
@@ -80,6 +80,12 @@
F: arch/arm/dts/rk3399-u-boot.dtsi
F: arch/arm/dts/rk3399-orangepi-u-boot.dtsi
+RADXA ROCK 4C+
+M: FUKAUMI Naoki <naoki@radxa.com>
+S: Maintained
+F: configs/rock-4c-plus-rk3399_defconfig
+F: arch/arm/dts/rk3399-rock-4c-plus.dts
+
ROCK-PI-4
M: Akash Gajjar <akash@openedev.com>
M: Jagan Teki <jagan@amarulasolutions.com>
diff --git a/board/ronetix/imx7-cm/MAINTAINERS b/board/ronetix/imx7-cm/MAINTAINERS
index 184c887..158c2b7 100644
--- a/board/ronetix/imx7-cm/MAINTAINERS
+++ b/board/ronetix/imx7-cm/MAINTAINERS
@@ -1,6 +1,6 @@
i.MX7-CM BOARD
M: Ilko Iliev <iliev@ronetix.com>
S: Maintained
-F: board/ronetix/imx7_cm/
-F: include/configs/imx7_cm.h
-F: configs/imx7_cm_defconfig
\ No newline at end of file
+F: board/ronetix/imx7-cm/
+F: include/configs/imx7-cm.h
+F: configs/imx7_cm_defconfig
diff --git a/board/seeed/npi_imx6ull/MAINTAINERS b/board/seeed/npi_imx6ull/MAINTAINERS
index c6a915c..ddf4984 100644
--- a/board/seeed/npi_imx6ull/MAINTAINERS
+++ b/board/seeed/npi_imx6ull/MAINTAINERS
@@ -4,6 +4,6 @@
F: arch/arm/dts/imx6ull-seeed-npi-imx6ull-dev-board.dts
F: arch/arm/dts/imx6ull-seeed-npi-imx6ull-u-boot.dtsi
F: arch/arm/dts/imx6ull-seeed-npi-imx6ull.dtsi
-F: board/seeed/npi-imx6ull/
+F: board/seeed/npi_imx6ull/
F: configs/seeed_npi_imx6ull_defconfig
F: include/configs/npi_imx6ull.h
diff --git a/board/siemens/iot2050/MAINTAINERS b/board/siemens/iot2050/MAINTAINERS
index 1b52535..aa21de2 100644
--- a/board/siemens/iot2050/MAINTAINERS
+++ b/board/siemens/iot2050/MAINTAINERS
@@ -4,6 +4,7 @@
S: Maintained
F: board/siemens/iot2050/
F: include/configs/iot2050.h
-F: configs/iot2050_defconfig
+F: configs/iot2050_pg1_defconfig
+F: configs/iot2050_pg2_defconfig
F: arch/arm/dts/iot2050-*
F: doc/board/siemens/iot2050.rst
diff --git a/board/softing/vining_fpga/MAINTAINERS b/board/softing/vining_fpga/MAINTAINERS
index c2002fe..ed44b09 100644
--- a/board/softing/vining_fpga/MAINTAINERS
+++ b/board/softing/vining_fpga/MAINTAINERS
@@ -1,5 +1,6 @@
VINING FPGA BOARD
M: Marek Vasut <marex@denx.de>
S: Maintained
+F: board/softing/vining_fpga/
F: include/configs/socfpga_vining_fpga.h
F: configs/socfpga_vining_fpga_defconfig
diff --git a/board/solidrun/clearfog/MAINTAINERS b/board/solidrun/clearfog/MAINTAINERS
index 6646d96..6b2d5d1 100644
--- a/board/solidrun/clearfog/MAINTAINERS
+++ b/board/solidrun/clearfog/MAINTAINERS
@@ -1,7 +1,9 @@
CLEARFOG BOARD
M: Stefan Roese <sr@denx.de>
S: Maintained
-F: board/soldrun/clearfog/
+F: board/solidrun/clearfog/
F: include/configs/clearfog.h
F: configs/clearfog_defconfig
F: configs/clearfog_gt_8k_defconfig
+F: configs/clearfog_sata_defconfig
+F: configs/clearfog_spi_defconfig
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index 80e3f4b..98bbd2d 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -211,6 +211,11 @@
S: Maintained
F: configs/emlid_neutis_n5_devboard_defconfig
+LCTECH PI F1C200S
+M: Andre Przywara <andre.przywara@arm.com>
+S: Maintained
+F: configs/lctech_pi_f1c200s_defconfig
+
GEMEI-G9 TABLET
M: Priit Laes <plaes@plaes.org>
S: Maintained
diff --git a/board/terasic/de0-nano-soc/MAINTAINERS b/board/terasic/de0-nano-soc/MAINTAINERS
index 7f4cf1e..6ffa0c0 100644
--- a/board/terasic/de0-nano-soc/MAINTAINERS
+++ b/board/terasic/de0-nano-soc/MAINTAINERS
@@ -1,5 +1,6 @@
SOCFPGA ATLAS BOARD
M: Dinh Nguyen <dinguyen@kernel.org>
S: Maintained
+F: board/terasic/de0-nano-soc/
F: include/configs/socfpga_de0_nano_soc.h
F: configs/socfpga_de0_nano_soc_defconfig
diff --git a/board/terasic/de1-soc/MAINTAINERS b/board/terasic/de1-soc/MAINTAINERS
index bd7a8d5..1e726e9 100644
--- a/board/terasic/de1-soc/MAINTAINERS
+++ b/board/terasic/de1-soc/MAINTAINERS
@@ -1,5 +1,6 @@
DE1-SoC BOARD
M: Anatolij Gustschin <agust@denx.de>
S: Maintained
+F: board/terasic/de1-soc/
F: include/configs/socfpga_de1_soc.h
F: configs/socfpga_de1_soc_defconfig
diff --git a/board/terasic/de10-nano/MAINTAINERS b/board/terasic/de10-nano/MAINTAINERS
index f4dd0df..ebfd3b2 100644
--- a/board/terasic/de10-nano/MAINTAINERS
+++ b/board/terasic/de10-nano/MAINTAINERS
@@ -1,5 +1,6 @@
DE10-NANO BOARD
M: Dalon Westergreen <dwesterg@gmail.com>
S: Maintained
+F: board/terasic/de10-nano/
F: include/configs/socfpga_de10_nano.h
F: configs/socfpga_de10_nano_defconfig
diff --git a/board/terasic/de10-standard/MAINTAINERS b/board/terasic/de10-standard/MAINTAINERS
index 94bf1e0..49fdc75 100644
--- a/board/terasic/de10-standard/MAINTAINERS
+++ b/board/terasic/de10-standard/MAINTAINERS
@@ -1,5 +1,6 @@
DE10-STANDARD BOARD
M: Humberto Naves <hsnaves@gmail.com>
S: Maintained
+F: board/terasic/de10-standard/
F: include/configs/socfpga_de10_standard.h
F: configs/socfpga_de10_standard_defconfig
diff --git a/board/terasic/sockit/MAINTAINERS b/board/terasic/sockit/MAINTAINERS
index 792f184..e301751 100644
--- a/board/terasic/sockit/MAINTAINERS
+++ b/board/terasic/sockit/MAINTAINERS
@@ -1,5 +1,6 @@
SOCKIT BOARD
M: Marek Vasut <marex@denx.de>
S: Maintained
+F: board/terasic/sockit/
F: include/configs/socfpga_sockit.h
F: configs/socfpga_sockit_defconfig
diff --git a/board/ti/am62ax/Kconfig b/board/ti/am62ax/Kconfig
index 9b868e4..61f289f 100644
--- a/board/ti/am62ax/Kconfig
+++ b/board/ti/am62ax/Kconfig
@@ -10,6 +10,7 @@
config TARGET_AM62A7_A53_EVM
bool "TI K3 based AM62A7 EVM running on A53"
select ARM64
+ select BINMAN
imply BOARD
imply SPL_BOARD
imply TI_I2C_BOARD_DETECT
@@ -22,6 +23,7 @@
select RAM
select SPL_RAM
select K3_DDRSS
+ select BINMAN
imply SYS_K3_SPL_ATF
imply TI_I2C_BOARD_DETECT
diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env
index 8c1c26e..491ec97 100644
--- a/board/ti/am62ax/am62ax.env
+++ b/board/ti/am62ax/am62ax.env
@@ -1,7 +1,7 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
-default_device_tree=k3-am62a7-sk.dtb
+default_device_tree=ti/k3-am62a7-sk.dtb
findfdt=
setenv name_fdt ${default_device_tree};
setenv fdtfile ${name_fdt}
@@ -17,7 +17,6 @@
bootdir=/boot
rd_spec=-
init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_mmc=
fdt address ${fdtaddr};
fdt resize 0x100000;
diff --git a/board/ti/am62ax/board-cfg.yaml b/board/ti/am62ax/board-cfg.yaml
new file mode 100644
index 0000000..4aa8ddd
--- /dev/null
+++ b/board/ti/am62ax/board-cfg.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for AM62ax
+#
+
+---
+
+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 : 0x10
+ debug_cfg:
+ subhdr:
+ magic: 0x020C
+ size: 8
+ trace_dst_enables : 0x00
+ trace_src_enables : 0x00
diff --git a/board/ti/am62ax/pm-cfg.yaml b/board/ti/am62ax/pm-cfg.yaml
new file mode 100644
index 0000000..3ad182a
--- /dev/null
+++ b/board/ti/am62ax/pm-cfg.yaml
@@ -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 AM62ax
+#
+
+---
+
+pm-cfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
diff --git a/board/ti/am62ax/rm-cfg.yaml b/board/ti/am62ax/rm-cfg.yaml
new file mode 100644
index 0000000..15c4017
--- /dev/null
+++ b/board/ti/am62ax/rm-cfg.yaml
@@ -0,0 +1,1151 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for AM62ax
+#
+
+---
+
+rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size : 356
+ host_cfg_entries:
+ - #1
+ host_id: 12
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #2
+ host_id: 30
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #3
+ host_id: 36
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #4
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #5
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #6
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #7
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #8
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #9
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #10
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #11
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #12
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #13
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #14
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #15
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #16
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #17
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #18
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #19
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #20
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #21
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #22
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #23
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #24
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #25
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #26
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #27
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #28
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #29
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #30
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #31
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #32
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size : 8
+ resasg_entries_size: 1032
+ reserved : 0
+ resasg_entries:
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 64
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 64
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 64
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 22
+ type: 64
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 192
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 2
+ type: 192
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 320
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 320
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 26
+ type: 384
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 50176
+ num_resource: 164
+ type: 1666
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 1667
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1677
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1677
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1677
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1677
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 6
+ type: 1677
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 18
+ type: 1678
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 6
+ type: 1678
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 6
+ type: 1678
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 2
+ type: 1678
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 2
+ type: 1678
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 12
+ type: 1679
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 6
+ type: 1679
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 6
+ type: 1679
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 2
+ type: 1679
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 2
+ type: 1679
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1696
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1696
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1696
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1696
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 6
+ type: 1696
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1697
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1697
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1697
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1697
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 2
+ type: 1697
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 1698
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1698
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1698
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 2
+ type: 1698
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 2
+ type: 1698
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 34
+ type: 1802
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 36
+ type: 1802
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 36
+ type: 1802
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 8
+ type: 1802
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 512
+ type: 1805
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 526
+ num_resource: 256
+ type: 1805
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 526
+ num_resource: 256
+ type: 1805
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 782
+ num_resource: 128
+ type: 1805
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 910
+ num_resource: 626
+ type: 1805
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1024
+ type: 1807
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4096
+ num_resource: 29
+ type: 1808
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4608
+ num_resource: 99
+ type: 1809
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5120
+ num_resource: 24
+ type: 1810
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5632
+ num_resource: 51
+ type: 1811
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6144
+ num_resource: 51
+ type: 1812
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6656
+ num_resource: 51
+ type: 1813
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8192
+ num_resource: 32
+ type: 1814
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8704
+ num_resource: 32
+ type: 1815
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9216
+ num_resource: 32
+ type: 1816
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9728
+ num_resource: 22
+ type: 1817
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10240
+ num_resource: 22
+ type: 1818
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10752
+ num_resource: 22
+ type: 1819
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11264
+ num_resource: 28
+ type: 1820
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11776
+ num_resource: 28
+ type: 1821
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 12288
+ num_resource: 28
+ type: 1822
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 1923
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1936
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1936
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1936
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1936
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1936
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 64
+ type: 1937
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 64
+ type: 1937
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 83
+ num_resource: 8
+ type: 1938
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 91
+ num_resource: 8
+ type: 1939
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 99
+ num_resource: 10
+ type: 1942
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 3
+ type: 1942
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 3
+ type: 1942
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 112
+ num_resource: 3
+ type: 1942
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 115
+ num_resource: 3
+ type: 1942
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 16
+ type: 1943
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 16
+ type: 1943
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 134
+ num_resource: 8
+ type: 1944
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 134
+ num_resource: 8
+ type: 1945
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 8
+ type: 1946
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 8
+ type: 1947
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1955
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1955
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1955
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1955
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1955
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 8
+ type: 1956
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 8
+ type: 1956
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 1
+ type: 1957
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 1
+ type: 1958
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1961
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1961
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1961
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1961
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1961
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1962
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1962
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1962
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1962
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1962
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 1
+ type: 1963
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 1
+ type: 1963
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 16
+ type: 1964
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 16
+ type: 1964
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 1
+ type: 1965
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 8
+ type: 1966
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 1
+ type: 1967
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 8
+ type: 1968
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 1
+ type: 1969
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 8
+ type: 1970
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 1
+ type: 1971
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 8
+ type: 1972
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 2112
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 2122
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 51200
+ num_resource: 12
+ type: 12738
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 12739
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 6
+ type: 12750
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 6
+ type: 12769
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 12810
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12288
+ num_resource: 128
+ type: 12813
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3072
+ num_resource: 6
+ type: 12828
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 3584
+ num_resource: 6
+ type: 12829
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4096
+ num_resource: 6
+ type: 12830
+ host_id: 128
+ reserved: 0
diff --git a/board/ti/am62ax/sec-cfg.yaml b/board/ti/am62ax/sec-cfg.yaml
new file mode 100644
index 0000000..f0ad20c
--- /dev/null
+++ b/board/ti/am62ax/sec-cfg.yaml
@@ -0,0 +1,379 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Security configuration for AM62ax
+#
+
+---
+
+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]
diff --git a/board/ti/am62ax/tifs-rm-cfg.yaml b/board/ti/am62ax/tifs-rm-cfg.yaml
new file mode 100644
index 0000000..0b1980e
--- /dev/null
+++ b/board/ti/am62ax/tifs-rm-cfg.yaml
@@ -0,0 +1,1011 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for AM62AX
+#
+
+---
+
+tifs-rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size : 356
+ host_cfg_entries:
+ - #1
+ host_id: 12
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #2
+ host_id: 30
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #3
+ host_id: 36
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #4
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #5
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #6
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #7
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #8
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #9
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #10
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #11
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #12
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #13
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #14
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #15
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #16
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #17
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #18
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #19
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #20
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #21
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #22
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #23
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #24
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #25
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #26
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #27
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #28
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #29
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #30
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #31
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #32
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size : 8
+ resasg_entries_size: 872
+ reserved : 0
+ resasg_entries:
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1677
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1677
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1677
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1677
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 6
+ type: 1677
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 18
+ type: 1678
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 6
+ type: 1678
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 6
+ type: 1678
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 2
+ type: 1678
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 2
+ type: 1678
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 12
+ type: 1679
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 6
+ type: 1679
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 6
+ type: 1679
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 2
+ type: 1679
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 2
+ type: 1679
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1696
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1696
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1696
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1696
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 6
+ type: 1696
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1697
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1697
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1697
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1697
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 2
+ type: 1697
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 1698
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1698
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1698
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 2
+ type: 1698
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 2
+ type: 1698
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 34
+ type: 1802
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 36
+ type: 1802
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 36
+ type: 1802
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 8
+ type: 1802
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1024
+ type: 1807
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4096
+ num_resource: 29
+ type: 1808
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4608
+ num_resource: 99
+ type: 1809
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5120
+ num_resource: 24
+ type: 1810
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5632
+ num_resource: 51
+ type: 1811
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6144
+ num_resource: 51
+ type: 1812
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6656
+ num_resource: 51
+ type: 1813
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8192
+ num_resource: 32
+ type: 1814
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8704
+ num_resource: 32
+ type: 1815
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9216
+ num_resource: 32
+ type: 1816
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9728
+ num_resource: 22
+ type: 1817
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10240
+ num_resource: 22
+ type: 1818
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10752
+ num_resource: 22
+ type: 1819
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11264
+ num_resource: 28
+ type: 1820
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11776
+ num_resource: 28
+ type: 1821
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 12288
+ num_resource: 28
+ type: 1822
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1936
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1936
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1936
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1936
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1936
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 64
+ type: 1937
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 64
+ type: 1937
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 83
+ num_resource: 8
+ type: 1938
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 91
+ num_resource: 8
+ type: 1939
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 99
+ num_resource: 10
+ type: 1942
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 3
+ type: 1942
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 3
+ type: 1942
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 112
+ num_resource: 3
+ type: 1942
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 115
+ num_resource: 3
+ type: 1942
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 16
+ type: 1943
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 16
+ type: 1943
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 134
+ num_resource: 8
+ type: 1944
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 134
+ num_resource: 8
+ type: 1945
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 8
+ type: 1946
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 8
+ type: 1947
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1955
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1955
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1955
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1955
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1955
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 8
+ type: 1956
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 8
+ type: 1956
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 1
+ type: 1957
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 1
+ type: 1958
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1961
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1961
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1961
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1961
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1961
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1962
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1962
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1962
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1962
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1962
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 1
+ type: 1963
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 1
+ type: 1963
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 16
+ type: 1964
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 16
+ type: 1964
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 1
+ type: 1965
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 8
+ type: 1966
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 1
+ type: 1967
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 8
+ type: 1968
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 1
+ type: 1969
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 8
+ type: 1970
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 1
+ type: 1971
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 8
+ type: 1972
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 2112
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 2122
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 6
+ type: 12750
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 6
+ type: 12769
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 12810
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3072
+ num_resource: 6
+ type: 12828
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 3584
+ num_resource: 6
+ type: 12829
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4096
+ num_resource: 6
+ type: 12830
+ host_id: 128
+ reserved: 0
diff --git a/board/ti/am62x/Kconfig b/board/ti/am62x/Kconfig
index 5e8dfa3..cd17e93 100644
--- a/board/ti/am62x/Kconfig
+++ b/board/ti/am62x/Kconfig
@@ -10,6 +10,7 @@
config TARGET_AM625_A53_EVM
bool "TI K3 based AM625 EVM running on A53"
select ARM64
+ select BINMAN
config TARGET_AM625_R5_EVM
bool "TI K3 based AM625 EVM running on R5"
@@ -19,6 +20,7 @@
select RAM
select SPL_RAM
select K3_DDRSS
+ select BINMAN
imply SYS_K3_SPL_ATF
endchoice
diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
index 5ac15fd..0901a85 100644
--- a/board/ti/am62x/am62x.env
+++ b/board/ti/am62x/am62x.env
@@ -1,7 +1,7 @@
#include <environment/ti/ti_armv7_common.env>
#include <environment/ti/mmc.env>
-default_device_tree=k3-am625-sk.dtb
+default_device_tree=ti/k3-am625-sk.dtb
findfdt=
setenv name_fdt ${default_device_tree};
setenv fdtfile ${name_fdt}
@@ -17,7 +17,6 @@
bootdir=/boot
rd_spec=-
init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_mmc=
fdt address ${fdtaddr};
fdt resize 0x100000;
diff --git a/board/ti/am62x/board-cfg.yaml b/board/ti/am62x/board-cfg.yaml
new file mode 100644
index 0000000..36cfb55
--- /dev/null
+++ b/board/ti/am62x/board-cfg.yaml
@@ -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
diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
index 34830f4..ad93908 100644
--- a/board/ti/am62x/evm.c
+++ b/board/ti/am62x/evm.c
@@ -12,6 +12,7 @@
#include <init.h>
#include <video.h>
#include <splash.h>
+#include <cpu_func.h>
#include <k3-ddrss.h>
#include <fdt_support.h>
#include <asm/io.h>
@@ -59,42 +60,31 @@
}
#if defined(CONFIG_SPL_BUILD)
-#ifdef CONFIG_SPL_VIDEO_TIDSS
-static int setup_dram(void)
-{
- dram_init();
- dram_init_banksize();
- gd->ram_base = CFG_SYS_SDRAM_BASE;
- gd->ram_top = gd->ram_base + gd->ram_size;
- gd->relocaddr = gd->ram_top;
- return 0;
-}
-
static int video_setup(void)
{
- ulong addr;
- int ret;
- addr = gd->relocaddr;
+ if (CONFIG_IS_ENABLED(VIDEO)) {
+ ulong addr;
+ int ret;
- ret = video_reserve(&addr);
- if (ret)
- return ret;
- debug("Reserving %luk for video at: %08lx\n",
- ((unsigned long)gd->relocaddr - addr) >> 10, addr);
- gd->relocaddr = addr;
+ addr = gd->relocaddr;
+ ret = video_reserve(&addr);
+ if (ret)
+ return ret;
+ debug("Reserving %luk for video at: %08lx\n",
+ ((unsigned long)gd->relocaddr - addr) >> 10, addr);
+ gd->relocaddr = addr;
+ }
+
return 0;
}
-#endif
void spl_board_init(void)
{
-#if defined(CONFIG_SPL_VIDEO_TIDSS)
- setup_dram();
- arch_reserve_mmu();
video_setup();
enable_caches();
- splash_display();
-#endif
+ if (IS_ENABLED(CONFIG_SPL_SPLASH_SCREEN) && IS_ENABLED(CONFIG_SPL_BMP))
+ splash_display();
+
}
#if defined(CONFIG_K3_AM64_DDRSS)
diff --git a/board/ti/am62x/pm-cfg.yaml b/board/ti/am62x/pm-cfg.yaml
new file mode 100644
index 0000000..5d04cf8
--- /dev/null
+++ b/board/ti/am62x/pm-cfg.yaml
@@ -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
diff --git a/board/ti/am62x/rm-cfg.yaml b/board/ti/am62x/rm-cfg.yaml
new file mode 100644
index 0000000..c28707b
--- /dev/null
+++ b/board/ti/am62x/rm-cfg.yaml
@@ -0,0 +1,1088 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for AM62
+#
+
+---
+
+rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size : 356
+ host_cfg_entries:
+ - #1
+ host_id: 12
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #2
+ host_id: 30
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #3
+ host_id: 36
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #4
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #5
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #6
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #7
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #8
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #9
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #10
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #11
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #12
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #13
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #14
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #15
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #16
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #17
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #18
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #19
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #20
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #21
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #22
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #23
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #24
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #25
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #26
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #27
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #28
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #29
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #30
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #31
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #32
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size : 8
+ resasg_entries_size: 960
+ reserved : 0
+ resasg_entries:
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 64
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 64
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 64
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 22
+ type: 64
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 192
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 2
+ type: 192
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 320
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 320
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 26
+ type: 384
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 50176
+ num_resource: 164
+ type: 1666
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 1667
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1677
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1677
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1677
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1677
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 6
+ type: 1677
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 18
+ type: 1678
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 6
+ type: 1678
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 6
+ type: 1678
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 2
+ type: 1678
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 2
+ type: 1678
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 12
+ type: 1679
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 6
+ type: 1679
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 6
+ type: 1679
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 2
+ type: 1679
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 2
+ type: 1679
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1696
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1696
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1696
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1696
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 6
+ type: 1696
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 18
+ type: 1697
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1697
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 6
+ type: 1697
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1697
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 2
+ type: 1697
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 1698
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1698
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1698
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 2
+ type: 1698
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 2
+ type: 1698
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 35
+ type: 1802
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 36
+ type: 1802
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 36
+ type: 1802
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 8
+ type: 1802
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 512
+ type: 1805
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 525
+ num_resource: 256
+ type: 1805
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 525
+ num_resource: 256
+ type: 1805
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 781
+ num_resource: 128
+ type: 1805
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 909
+ num_resource: 627
+ type: 1805
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1024
+ type: 1807
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4096
+ num_resource: 29
+ type: 1808
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4608
+ num_resource: 99
+ type: 1809
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5120
+ num_resource: 24
+ type: 1810
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5632
+ num_resource: 51
+ type: 1811
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6144
+ num_resource: 51
+ type: 1812
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6656
+ num_resource: 51
+ type: 1813
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8192
+ num_resource: 32
+ type: 1814
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8704
+ num_resource: 32
+ type: 1815
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9216
+ num_resource: 32
+ type: 1816
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9728
+ num_resource: 22
+ type: 1817
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10240
+ num_resource: 22
+ type: 1818
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10752
+ num_resource: 22
+ type: 1819
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11264
+ num_resource: 28
+ type: 1820
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11776
+ num_resource: 28
+ type: 1821
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 12288
+ num_resource: 28
+ type: 1822
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 1923
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1936
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1936
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1936
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1936
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1936
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 64
+ type: 1937
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 64
+ type: 1937
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 83
+ num_resource: 8
+ type: 1938
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 91
+ num_resource: 8
+ type: 1939
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 99
+ num_resource: 10
+ type: 1942
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 3
+ type: 1942
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 3
+ type: 1942
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 112
+ num_resource: 3
+ type: 1942
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 115
+ num_resource: 3
+ type: 1942
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 16
+ type: 1943
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 16
+ type: 1943
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 134
+ num_resource: 8
+ type: 1944
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 134
+ num_resource: 8
+ type: 1945
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 8
+ type: 1946
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 8
+ type: 1947
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1955
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1955
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1955
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1955
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1955
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 8
+ type: 1956
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 8
+ type: 1956
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 1
+ type: 1957
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 1
+ type: 1958
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1961
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1961
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1961
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1961
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1961
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 10
+ type: 1962
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1962
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 1962
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 1962
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 1962
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 1
+ type: 1963
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 1
+ type: 1963
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 16
+ type: 1964
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 16
+ type: 1964
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 1
+ type: 1965
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 8
+ type: 1966
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 1
+ type: 1967
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 8
+ type: 1968
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 1
+ type: 1969
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 8
+ type: 1970
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 1
+ type: 1971
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 8
+ type: 1972
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 2112
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 2122
+ host_id: 12
+ reserved: 0
diff --git a/board/ti/am62x/sec-cfg.yaml b/board/ti/am62x/sec-cfg.yaml
new file mode 100644
index 0000000..07081ce
--- /dev/null
+++ b/board/ti/am62x/sec-cfg.yaml
@@ -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]
diff --git a/board/ti/am64x/Kconfig b/board/ti/am64x/Kconfig
index afb54f8..fb596e4 100644
--- a/board/ti/am64x/Kconfig
+++ b/board/ti/am64x/Kconfig
@@ -9,6 +9,7 @@
config TARGET_AM642_A53_EVM
bool "TI K3 based AM642 EVM running on A53"
select ARM64
+ select BINMAN
imply BOARD
imply SPL_BOARD
imply TI_I2C_BOARD_DETECT
@@ -21,6 +22,7 @@
select RAM
select SPL_RAM
select K3_DDRSS
+ select BINMAN
imply SYS_K3_SPL_ATF
imply TI_I2C_BOARD_DETECT
diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env
index c3960be..015f63a 100644
--- a/board/ti/am64x/am64x.env
+++ b/board/ti/am64x/am64x.env
@@ -4,11 +4,12 @@
findfdt=
if test $board_name = am64x_gpevm; then
- setenv name_fdt k3-am642-evm.dtb; fi;
+ setenv name_fdt ti/k3-am642-evm.dtb; fi;
if test $board_name = am64x_skevm; then
- setenv name_fdt k3-am642-sk.dtb; fi;
+ setenv name_fdt ti/k3-am642-sk.dtb; fi;
if test $name_fdt = undefined; then
echo WARNING: Could not determine device tree to use; fi;
+ setenv fdtfile ${name_fdt}
name_kern=Image
console=ttyS2,115200n8
args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
@@ -20,7 +21,6 @@
bootdir=/boot
rd_spec=-
init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_mmc=
fdt address ${fdtaddr};
fdt resize 0x100000;
diff --git a/board/ti/am64x/board-cfg.yaml b/board/ti/am64x/board-cfg.yaml
new file mode 100644
index 0000000..62947c0
--- /dev/null
+++ b/board/ti/am64x/board-cfg.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for AM64x
+#
+
+---
+
+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
diff --git a/board/ti/am64x/pm-cfg.yaml b/board/ti/am64x/pm-cfg.yaml
new file mode 100644
index 0000000..83c6a03
--- /dev/null
+++ b/board/ti/am64x/pm-cfg.yaml
@@ -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 AM64x
+#
+
+---
+
+pm-cfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
diff --git a/board/ti/am64x/rm-cfg.yaml b/board/ti/am64x/rm-cfg.yaml
new file mode 100644
index 0000000..1f4c6cf
--- /dev/null
+++ b/board/ti/am64x/rm-cfg.yaml
@@ -0,0 +1,1400 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for AM64x
+#
+
+---
+
+rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size : 356
+ host_cfg_entries:
+ - #1
+ host_id: 12
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #2
+ host_id: 30
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #3
+ host_id: 36
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #4
+ host_id: 38
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #5
+ host_id: 41
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #6
+ host_id: 43
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #7
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #8
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #9
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #10
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #11
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #12
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #13
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #14
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #15
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #16
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #17
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #18
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #19
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #20
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #21
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #22
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #23
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #24
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #25
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #26
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #27
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #28
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #29
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #30
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #31
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #32
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size : 8
+ resasg_entries_size: 1288
+ reserved : 0
+ resasg_entries:
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 64
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 64
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 64
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 64
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 64
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 64
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 8
+ type: 64
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 192
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 192
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 2
+ type: 192
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 320
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 320
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 41
+ type: 384
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 50176
+ num_resource: 136
+ type: 1666
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 1667
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 1677
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1677
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1677
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 2
+ type: 1677
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 1677
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1677
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 1
+ type: 1677
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 1
+ type: 1677
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 6
+ type: 1678
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 6
+ type: 1678
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 6
+ type: 1678
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 2
+ type: 1678
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 62
+ num_resource: 4
+ type: 1678
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 66
+ num_resource: 2
+ type: 1678
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 6
+ type: 1679
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 6
+ type: 1679
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 6
+ type: 1679
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 2
+ type: 1679
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 4
+ type: 1679
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 46
+ num_resource: 2
+ type: 1679
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 1696
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1696
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 6
+ type: 1696
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 2
+ type: 1696
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 1696
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 1696
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 1
+ type: 1696
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 1
+ type: 1696
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 6
+ type: 1697
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 6
+ type: 1697
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 6
+ type: 1697
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 1697
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 4
+ type: 1697
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 2
+ type: 1697
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 6
+ type: 1698
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 6
+ type: 1698
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 6
+ type: 1698
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 1698
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 4
+ type: 1698
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 2
+ type: 1698
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 35
+ type: 1802
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 14
+ type: 1802
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 14
+ type: 1802
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 58
+ num_resource: 14
+ type: 1802
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 92
+ num_resource: 14
+ type: 1802
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 106
+ num_resource: 14
+ type: 1802
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 16
+ type: 1802
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 512
+ type: 1805
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 528
+ num_resource: 256
+ type: 1805
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 528
+ num_resource: 256
+ type: 1805
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 784
+ num_resource: 192
+ type: 1805
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 976
+ num_resource: 256
+ type: 1805
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 1232
+ num_resource: 192
+ type: 1805
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 1424
+ num_resource: 96
+ type: 1805
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 1520
+ num_resource: 16
+ type: 1805
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1024
+ type: 1807
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4096
+ num_resource: 42
+ type: 1808
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4608
+ num_resource: 112
+ type: 1809
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5120
+ num_resource: 29
+ type: 1810
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 5632
+ num_resource: 176
+ type: 1811
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6144
+ num_resource: 176
+ type: 1812
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 6656
+ num_resource: 176
+ type: 1813
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8192
+ num_resource: 28
+ type: 1814
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8704
+ num_resource: 28
+ type: 1815
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9216
+ num_resource: 28
+ type: 1816
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 9728
+ num_resource: 20
+ type: 1817
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10240
+ num_resource: 20
+ type: 1818
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 10752
+ num_resource: 20
+ type: 1819
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11264
+ num_resource: 20
+ type: 1820
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 11776
+ num_resource: 20
+ type: 1821
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 12288
+ num_resource: 20
+ type: 1822
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 1923
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 1936
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1936
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1936
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 2
+ type: 1936
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 4
+ type: 1936
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 2
+ type: 1936
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 1
+ type: 1936
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 64
+ type: 1937
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 64
+ type: 1937
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 88
+ num_resource: 8
+ type: 1939
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 8
+ type: 1940
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 104
+ num_resource: 8
+ type: 1941
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 112
+ num_resource: 4
+ type: 1942
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 116
+ num_resource: 3
+ type: 1942
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 116
+ num_resource: 3
+ type: 1942
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 119
+ num_resource: 2
+ type: 1942
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 121
+ num_resource: 4
+ type: 1942
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 125
+ num_resource: 2
+ type: 1942
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 127
+ num_resource: 1
+ type: 1942
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 16
+ type: 1943
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 16
+ type: 1943
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 144
+ num_resource: 8
+ type: 1945
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 152
+ num_resource: 8
+ type: 1946
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 152
+ num_resource: 8
+ type: 1947
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 160
+ num_resource: 64
+ type: 1948
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 224
+ num_resource: 64
+ type: 1949
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 1955
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1955
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1955
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 2
+ type: 1955
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 4
+ type: 1955
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 2
+ type: 1955
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 1
+ type: 1955
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 1956
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 1956
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 25
+ num_resource: 1
+ type: 1958
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 8
+ type: 1959
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 8
+ type: 1960
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 1961
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1961
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1961
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 2
+ type: 1961
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 4
+ type: 1961
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 2
+ type: 1961
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 1
+ type: 1961
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 1962
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1962
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 3
+ type: 1962
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 2
+ type: 1962
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 4
+ type: 1962
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 2
+ type: 1962
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 1
+ type: 1962
+ host_id: 30
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 1
+ type: 1963
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 1
+ type: 1963
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 16
+ type: 1964
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 16
+ type: 1964
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 8
+ type: 1966
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 8
+ type: 1968
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 1
+ type: 1969
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 8
+ type: 1970
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 1
+ type: 1971
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 8
+ type: 1972
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 4
+ type: 1973
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 64
+ type: 1974
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 25
+ num_resource: 4
+ type: 1975
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 112
+ num_resource: 64
+ type: 1976
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 2112
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 2122
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 2
+ type: 2124
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 2
+ type: 2124
+ host_id: 36
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 2
+ type: 2124
+ host_id: 38
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 2124
+ host_id: 41
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 2
+ type: 2124
+ host_id: 43
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 2124
+ host_id: 128
+ reserved: 0
diff --git a/board/ti/am64x/sec-cfg.yaml b/board/ti/am64x/sec-cfg.yaml
new file mode 100644
index 0000000..7c51fd3
--- /dev/null
+++ b/board/ti/am64x/sec-cfg.yaml
@@ -0,0 +1,380 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Security configuration for AM64x
+#
+
+---
+
+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: 0
+ 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]
diff --git a/board/ti/am65x/Kconfig b/board/ti/am65x/Kconfig
index 220dd02..5fd19d6 100644
--- a/board/ti/am65x/Kconfig
+++ b/board/ti/am65x/Kconfig
@@ -12,6 +12,7 @@
select ARM64
select SYS_DISABLE_DCACHE_OPS
select BOARD_LATE_INIT
+ select BINMAN
imply TI_I2C_BOARD_DETECT
config TARGET_AM654_R5_EVM
@@ -20,6 +21,7 @@
select SYS_THUMB_BUILD
select K3_LOAD_SYSFW
select K3_AM654_DDRSS
+ select BINMAN
imply SYS_K3_SPL_ATF
imply TI_I2C_BOARD_DETECT
diff --git a/board/ti/am65x/README b/board/ti/am65x/README
deleted file mode 100644
index 67081ce..0000000
--- a/board/ti/am65x/README
+++ /dev/null
@@ -1,350 +0,0 @@
-Introduction:
--------------
-The AM65x family of SoCs is the first device family from K3 Multicore
-SoC architecture, targeted for broad market and industrial control with
-aim to meet the complex processing needs of modern embedded products.
-
-The device is built over three domains, each containing specific processing
-cores, voltage domains and peripherals:
-1. Wake-up (WKUP) domain:
- - Device Management and Security Controller (DMSC)
-2. Microcontroller (MCU) domain:
- - Dual Core ARM Cortex-R5F processor
-3. MAIN domain:
- - Quad core 64-bit ARM Cortex-A53
-
-More info can be found in TRM: http://www.ti.com/lit/pdf/spruid7
-
-Boot Flow:
-----------
-On AM65x family devices, ROM supports boot only via MCU(R5). This means that
-bootloader has to run on R5 core. In order to meet this constraint, and for
-the following reasons the boot flow is designed as mentioned:
-1. Need to move away from R5 asap, so that we want to start *any*
-firmware on the r5 cores like.... autosar can be loaded to receive CAN
-response and other safety operations to be started. This operation is
-very time critical and is applicable for all automotive use cases.
-2. U-Boot on A53 should start other remotecores for various
-applications. This should happen before running Linux.
-3. In production boot flow, we might not like to use full u-boot,
-instead use Flacon boot flow to reduce boot time.
-
-+------------------------------------------------------------------------+
-| DMSC | R5 | A53 |
-+------------------------------------------------------------------------+
-| +--------+ | | |
-| | Reset | | | |
-| +--------+ | | |
-| : | | |
-| +--------+ | +-----------+ | |
-| | *ROM* |----------|-->| Reset rls | | |
-| +--------+ | +-----------+ | |
-| | | | : | |
-| | ROM | | : | |
-| |services| | : | |
-| | | | +-------------+ | |
-| | | | | *R5 ROM* | | |
-| | | | +-------------+ | |
-| | |<---------|---|Load and auth| | |
-| | | | | tiboot3.bin | | |
-| | | | +-------------+ | |
-| | | | : | |
-| | | | : | |
-| | | | : | |
-| | | | +-------------+ | |
-| | | | | *R5 SPL* | | |
-| | | | +-------------+ | |
-| | | | | Load | | |
-| | | | | sysfw.itb | | |
-| | Start | | +-------------+ | |
-| | System |<---------|---| Start | | |
-| |Firmware| | | SYSFW | | |
-| +--------+ | +-------------+ | |
-| : | | | | |
-| +---------+ | | Load | | |
-| | *SYSFW* | | | system | | |
-| +---------+ | | Config data | | |
-| | |<--------|---| | | |
-| | | | +-------------+ | |
-| | | | | | | |
-| | | | | DDR | | |
-| | | | | config | | |
-| | | | +-------------+ | |
-| | | | | | | |
-| | |<--------|---| Start A53 | | |
-| | | | | and Reset | | |
-| | | | +-------------+ | |
-| | | | | +-----------+ |
-| | |---------|-----------------------|---->| Reset rls | |
-| | | | | +-----------+ |
-| | DMSC | | | : |
-| |Services | | | +-----------+ |
-| | |<--------|-----------------------|---->|*ATF/OPTEE*| |
-| | | | | +-----------+ |
-| | | | | : |
-| | | | | +-----------+ |
-| | |<--------|-----------------------|---->| *A53 SPL* | |
-| | | | | +-----------+ |
-| | | | | | Load | |
-| | | | | | u-boot.img| |
-| | | | | +-----------+ |
-| | | | | : |
-| | | | | +-----------+ |
-| | |<--------|-----------------------|---->| *U-Boot* | |
-| | | | | +-----------+ |
-| | | | | | prompt | |
-| | | | | +-----------+ |
-| +---------+ | | |
-| | | |
-+------------------------------------------------------------------------+
-
-- Here DMSC acts as master and provides all the critical services. R5/A53
-requests DMSC to get these services done as shown in the above diagram.
-
-Sources:
---------
-1. SYSFW:
- Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
- Branch: master
-
-2. ATF:
- Tree: https://github.com/ARM-software/arm-trusted-firmware.git
- Branch: master
-
-3. OPTEE:
- Tree: https://github.com/OP-TEE/optee_os.git
- Branch: master
-
-4. U-Boot:
- Tree: http://git.denx.de/u-boot.git
- Branch: master
-
-Build procedure:
-----------------
-1. SYSFW:
-$ make CROSS_COMPILE=arm-linux-gnueabihf-
-
-2. ATF:
-$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
-
-3. OPTEE:
-$ make PLATFORM=k3-am65x CFG_ARM64_core=y
-
-4. U-Boot:
-
-4.1. R5:
-$ make CROSS_COMPILE=arm-linux-gnueabihf- am65x_evm_r5_defconfig O=/tmp/r5
-$ make CROSS_COMPILE=arm-linux-gnueabihf- O=/tmp/r5
-
-4.2. A53:
-$ make CROSS_COMPILE=aarch64-linux-gnu- am65x_evm_a53_defconfig O=/tmp/a53
-$ make CROSS_COMPILE=aarch64-linux-gnu- ATF=<path to ATF dir>/build/k3/generic/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin O=/tmp/a53
-
-Target Images
---------------
-Copy the below images to an SD card and boot:
-- sysfw.itb from step 1
-- tiboot3.bin from step 4.1
-- tispl.bin, u-boot.img from 4.2
-
-Image formats:
---------------
-
-- tiboot3.bin:
- +-----------------------+
- | X.509 |
- | Certificate |
- | +-------------------+ |
- | | | |
- | | R5 | |
- | | u-boot-spl.bin | |
- | | | |
- | +-------------------+ |
- | | | |
- | | FIT header | |
- | | +---------------+ | |
- | | | | | |
- | | | DTB 1...N | | |
- | | +---------------+ | |
- | +-------------------+ |
- +-----------------------+
-
-- tispl.bin
- +-----------------------+
- | |
- | FIT HEADER |
- | +-------------------+ |
- | | | |
- | | A53 ATF | |
- | +-------------------+ |
- | | | |
- | | A53 OPTEE | |
- | +-------------------+ |
- | | | |
- | | A53 SPL | |
- | +-------------------+ |
- | | | |
- | | SPL DTB 1...N | |
- | +-------------------+ |
- +-----------------------+
-
-- sysfw.itb
- +-----------------------+
- | |
- | FIT HEADER |
- | +-------------------+ |
- | | | |
- | | sysfw.bin | |
- | +-------------------+ |
- | | | |
- | | board config | |
- | +-------------------+ |
- | | | |
- | | PM config | |
- | +-------------------+ |
- | | | |
- | | RM config | |
- | +-------------------+ |
- | | | |
- | | Secure config | |
- | +-------------------+ |
- +-----------------------+
-
-eMMC:
------
-ROM supports booting from eMMC from boot0 partition offset 0x0
-
-Flashing images to eMMC:
-
-The following commands can be used to download tiboot3.bin, tispl.bin,
-u-boot.img, and sysfw.itb from an SD card and write them to the eMMC boot0
-partition at respective addresses.
-
-=> 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
-=> fatload mmc 1 ${loadaddr} sysfw.itb
-=> mmc write ${loadaddr} 0x3600 0x800
-
-To give the ROM access to the boot partition, the following commands must be
-used for the first time:
-=> mmc partconf 0 1 1 1
-=> mmc bootbus 0 1 0 0
-
-To create a software partition for the rootfs, the following command can be
-used:
-=> gpt write mmc 0 ${partitions}
-
-eMMC layout:
-
- boot0 partition (8 MB) user partition
- 0x0+----------------------------------+ 0x0+-------------------------+
- | tiboot3.bin (512 KB) | | |
- 0x400+----------------------------------+ | |
- | tispl.bin (2 MB) | | |
-0x1400+----------------------------------+ | rootfs |
- | u-boot.img (4 MB) | | |
-0x3400+----------------------------------+ | |
- | environment (128 KB) | | |
-0x3500+----------------------------------+ | |
- | backup environment (128 KB) | | |
-0x3600+----------------------------------+ | |
- | sysfw (1 MB) | | |
-0x3E00+----------------------------------+ +-------------------------+
-
-Kernel image and DT are expected to be present in the /boot folder of rootfs.
-To boot kernel from eMMC, use the following commands:
-=> setenv mmcdev 0
-=> setenv bootpart 0
-=> boot
-
-OSPI:
------
-ROM supports booting from OSPI from offset 0x0.
-
-Flashing images to OSPI:
-
-Below commands can be used to download tiboot3.bin, tispl.bin, u-boot.img,
-and sysfw.itb over tftp and then flash those to OSPI at their respective
-addresses.
-
-=> sf probe
-=> tftp ${loadaddr} tiboot3.bin
-=> sf update $loadaddr 0x0 $filesize
-=> tftp ${loadaddr} tispl.bin
-=> sf update $loadaddr 0x80000 $filesize
-=> tftp ${loadaddr} u-boot.img
-=> sf update $loadaddr 0x280000 $filesize
-=> tftp ${loadaddr} sysfw.itb
-=> sf update $loadaddr 0x6C0000 $filesize
-
-Flash layout for OSPI:
-
- 0x0 +----------------------------+
- | ospi.tiboot3(512K) |
- | |
- 0x80000 +----------------------------+
- | ospi.tispl(2M) |
- | |
- 0x280000 +----------------------------+
- | ospi.u-boot(4M) |
- | |
- 0x680000 +----------------------------+
- | ospi.env(128K) |
- | |
- 0x6A0000 +----------------------------+
- | ospi.env.backup (128K) |
- | |
- 0x6C0000 +----------------------------+
- | ospi.sysfw(1M) |
- | |
- 0x7C0000 +----------------------------+
- | padding (256k) |
- 0x800000 +----------------------------+
- | ospi.rootfs(UBIFS) |
- | |
- +----------------------------+
-
-Kernel Image and DT are expected to be present in the /boot folder of UBIFS
-ospi.rootfs just like in SD card case. U-Boot looks for UBI volume named
-"rootfs" for rootfs.
-
-To boot kernel from OSPI, at the U-Boot prompt:
-=> setenv boot ubi
-=> boot
-
-UART:
------
-ROM supports booting from MCU_UART0 via X-Modem protocol. The entire UART-based
-boot process up to U-Boot (proper) prompt goes through different stages and uses
-different UART peripherals as follows:
-
- WHO | Loading WHAT | HW Module | Protocol
-----------+---------------+-------------+------------
-Boot ROM | tiboot3.bin | MCU_UART0 | X-Modem(*)
-R5 SPL | sysfw.itb | MCU_UART0 | Y-Modem(*)
-R5 SPL | tispl.bin | MAIN_UART0 | Y-Modem
-A53 SPL | u-boot.img | MAIN_UART0 | Y-Modem
-
-(*) Note that in addition to X/Y-Modem related protocol timeouts the DMSC
- watchdog timeout of 3min (typ.) needs to be observed until System Firmware
- is fully loaded (from sysfw.itb) and started.
-
-Example bash script sequence for running on a Linux host PC feeding all boot
-artifacts needed to the device:
-
-MCU_DEV=/dev/ttyUSB1
-MAIN_DEV=/dev/ttyUSB0
-
-stty -F $MCU_DEV 115200 cs8 -cstopb -parenb
-stty -F $MAIN_DEV 115200 cs8 -cstopb -parenb
-
-sb --xmodem tiboot3.bin > $MCU_DEV < $MCU_DEV
-sb --ymodem sysfw.itb > $MCU_DEV < $MCU_DEV
-sb --ymodem tispl.bin > $MAIN_DEV < $MAIN_DEV
-sleep 1
-sb --xmodem u-boot.img > $MAIN_DEV < $MAIN_DEV
diff --git a/board/ti/am65x/am65x.env b/board/ti/am65x/am65x.env
index a048b47..d7130cc 100644
--- a/board/ti/am65x/am65x.env
+++ b/board/ti/am65x/am65x.env
@@ -6,7 +6,7 @@
#endif
findfdt=
- setenv name_fdt k3-am654-base-board.dtb;
+ setenv name_fdt ti/k3-am654-base-board.dtb;
setenv fdtfile ${name_fdt}
name_kern=Image
console=ttyS2,115200n8
@@ -20,7 +20,6 @@
bootdir=/boot
rd_spec=-
init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_mmc=
fdt address ${fdtaddr};
fdt resize 0x100000;
diff --git a/board/ti/am65x/board-cfg.yaml b/board/ti/am65x/board-cfg.yaml
new file mode 100644
index 0000000..a8e0616
--- /dev/null
+++ b/board/ti/am65x/board-cfg.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for AM65x
+#
+
+---
+
+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 : 0x10
+ debug_cfg:
+ subhdr:
+ magic: 0x020C
+ size: 8
+ trace_dst_enables : 0x00
+ trace_src_enables : 0x00
diff --git a/board/ti/am65x/pm-cfg.yaml b/board/ti/am65x/pm-cfg.yaml
new file mode 100644
index 0000000..73fe86c
--- /dev/null
+++ b/board/ti/am65x/pm-cfg.yaml
@@ -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 AM65x
+#
+
+---
+
+pm-cfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
diff --git a/board/ti/am65x/rm-cfg.yaml b/board/ti/am65x/rm-cfg.yaml
new file mode 100644
index 0000000..5903773
--- /dev/null
+++ b/board/ti/am65x/rm-cfg.yaml
@@ -0,0 +1,2068 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for AM65x
+#
+
+---
+
+rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size : 356
+ host_cfg_entries:
+ - #1
+ host_id: 3
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #2
+ host_id: 5
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #3
+ host_id: 12
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #4
+ host_id: 13
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #5
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #6
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #7
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #8
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #9
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #10
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #11
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #12
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #13
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #14
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #15
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #16
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #17
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #18
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #19
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #20
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #21
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #22
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #23
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #24
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #25
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #26
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #27
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #28
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #29
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #30
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #31
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #32
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size : 8
+ resasg_entries_size: 2080
+ reserved : 0
+ resasg_entries:
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 192
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 4
+ type: 192
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 192
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 192
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 8
+ type: 192
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 32
+ type: 6208
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 32
+ type: 6208
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 32
+ type: 6208
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 24
+ type: 6272
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 24
+ type: 6272
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 24
+ type: 6272
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 20
+ type: 6400
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 6400
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 6400
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 6400
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 6400
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 9280
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 9280
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 16
+ type: 9280
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 8
+ type: 9280
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 9984
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 9984
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 4
+ type: 9984
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 4
+ type: 9984
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 4
+ type: 9984
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 80
+ type: 11466
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 30
+ type: 11466
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 126
+ num_resource: 50
+ type: 11466
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 126
+ num_resource: 50
+ type: 11466
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 176
+ num_resource: 50
+ type: 11466
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 226
+ num_resource: 30
+ type: 11466
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 1024
+ type: 11469
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1040
+ num_resource: 512
+ type: 11469
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 1552
+ num_resource: 512
+ type: 11469
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 1552
+ num_resource: 512
+ type: 11469
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 2064
+ num_resource: 512
+ type: 11469
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 2576
+ num_resource: 2032
+ type: 11469
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 11530
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 20480
+ num_resource: 1024
+ type: 11533
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 11594
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 22528
+ num_resource: 1024
+ type: 11597
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 64
+ type: 11648
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 40
+ type: 11648
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 120
+ num_resource: 4
+ type: 11648
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 120
+ num_resource: 4
+ type: 11648
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 124
+ num_resource: 4
+ type: 11648
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 24
+ type: 11648
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 12
+ type: 11840
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 4
+ type: 11840
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 16
+ type: 11840
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 16
+ type: 11840
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 16
+ type: 11840
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 15
+ type: 11840
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 11968
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 304
+ num_resource: 100
+ type: 11969
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 404
+ num_resource: 50
+ type: 11969
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 454
+ num_resource: 256
+ type: 11969
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 454
+ num_resource: 256
+ type: 11969
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 710
+ num_resource: 32
+ type: 11969
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 742
+ num_resource: 26
+ type: 11969
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 160
+ num_resource: 12
+ type: 11970
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 4
+ type: 11970
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 4
+ type: 11970
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 0
+ type: 11970
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 176
+ num_resource: 2
+ type: 11970
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 178
+ num_resource: 52
+ type: 11970
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 230
+ num_resource: 8
+ type: 11970
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 238
+ num_resource: 32
+ type: 11970
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 238
+ num_resource: 32
+ type: 11970
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 270
+ num_resource: 14
+ type: 11970
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 284
+ num_resource: 18
+ type: 11970
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 12
+ type: 11971
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 11971
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 11971
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 0
+ type: 11971
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 11971
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 38
+ type: 11971
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 64
+ num_resource: 8
+ type: 11971
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 32
+ type: 11971
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 32
+ type: 11971
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 104
+ num_resource: 14
+ type: 11971
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 2
+ type: 11971
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 120
+ num_resource: 4
+ type: 11972
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 124
+ num_resource: 4
+ type: 11972
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 12
+ type: 11972
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 12
+ type: 11972
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 140
+ num_resource: 12
+ type: 11972
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 154
+ num_resource: 0
+ type: 11973
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 154
+ num_resource: 0
+ type: 11973
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 154
+ num_resource: 0
+ type: 11973
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 154
+ num_resource: 0
+ type: 11973
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 154
+ num_resource: 2
+ type: 11973
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 2
+ type: 11973
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 2
+ type: 11973
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 158
+ num_resource: 2
+ type: 11973
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 11975
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 11975
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 11975
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 11975
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 3
+ type: 11975
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 2
+ type: 11975
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 2
+ type: 11975
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 2
+ type: 11975
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 11978
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 11978
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 11979
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 11979
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 11979
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 11979
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 8
+ type: 11979
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 150
+ num_resource: 64
+ type: 12032
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 214
+ num_resource: 8
+ type: 12032
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 222
+ num_resource: 64
+ type: 12032
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 222
+ num_resource: 64
+ type: 12032
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 286
+ num_resource: 8
+ type: 12032
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 294
+ num_resource: 6
+ type: 12032
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 12033
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 49152
+ num_resource: 1024
+ type: 12034
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 12035
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 12
+ type: 12042
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 12042
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 12042
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 0
+ type: 12042
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 12042
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 52
+ type: 12042
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 8
+ type: 12042
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 86
+ num_resource: 32
+ type: 12042
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 86
+ num_resource: 32
+ type: 12042
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 14
+ type: 12042
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 132
+ num_resource: 18
+ type: 12042
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 12043
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 12043
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 12043
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 12043
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 12043
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 2
+ type: 12043
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 2
+ type: 12043
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 2
+ type: 12043
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 12
+ type: 12045
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 12045
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 12045
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 0
+ type: 12045
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 12045
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 38
+ type: 12045
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 64
+ num_resource: 8
+ type: 12045
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 32
+ type: 12045
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 32
+ type: 12045
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 104
+ num_resource: 14
+ type: 12045
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 2
+ type: 12045
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 120
+ num_resource: 4
+ type: 12046
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 124
+ num_resource: 4
+ type: 12046
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 12
+ type: 12046
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 12
+ type: 12046
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 140
+ num_resource: 12
+ type: 12046
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 12047
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 12047
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 12047
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 0
+ type: 12047
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 3
+ type: 12047
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 2
+ type: 12047
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 2
+ type: 12047
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 2
+ type: 12047
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 80
+ type: 12106
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 88
+ num_resource: 30
+ type: 12106
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 50
+ type: 12106
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 50
+ type: 12106
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 50
+ type: 12106
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 218
+ num_resource: 38
+ type: 12106
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16392
+ num_resource: 512
+ type: 12109
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16904
+ num_resource: 128
+ type: 12109
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 17032
+ num_resource: 256
+ type: 12109
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 17032
+ num_resource: 256
+ type: 12109
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 17288
+ num_resource: 256
+ type: 12109
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 17544
+ num_resource: 376
+ type: 12109
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 28
+ type: 12160
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 28
+ type: 12160
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 28
+ type: 12160
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 12
+ type: 12224
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 4
+ type: 12224
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 24
+ type: 12224
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 24
+ type: 12224
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 24
+ type: 12224
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 16
+ type: 12416
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 64
+ num_resource: 4
+ type: 12416
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 68
+ num_resource: 16
+ type: 12416
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 68
+ num_resource: 16
+ type: 12416
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 84
+ num_resource: 8
+ type: 12416
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 92
+ num_resource: 4
+ type: 12416
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 12417
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 56320
+ num_resource: 256
+ type: 12418
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 12419
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 12426
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 12426
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 12426
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 12426
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 2
+ type: 12426
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 12
+ type: 12426
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 4
+ type: 12426
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 10
+ type: 12426
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 10
+ type: 12426
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 12
+ type: 12426
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 12427
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 12427
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 12427
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 12427
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 12429
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 12429
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 12429
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 12429
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 2
+ type: 12429
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 12
+ type: 12429
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 4
+ type: 12429
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 10
+ type: 12429
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 10
+ type: 12429
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 12
+ type: 12429
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 12431
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 12431
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 12431
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 12431
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 12480
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 32
+ type: 12481
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 8
+ type: 12481
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 136
+ num_resource: 60
+ type: 12481
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 136
+ num_resource: 60
+ type: 12481
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 196
+ num_resource: 60
+ type: 12481
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 2
+ type: 12482
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 4
+ type: 12482
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 4
+ type: 12482
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 0
+ type: 12482
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 56
+ num_resource: 2
+ type: 12482
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 58
+ num_resource: 12
+ type: 12482
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 70
+ num_resource: 4
+ type: 12482
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 74
+ num_resource: 10
+ type: 12482
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 74
+ num_resource: 10
+ type: 12482
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 84
+ num_resource: 12
+ type: 12482
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 12483
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 12483
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 12483
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 12483
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 2
+ type: 12483
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 12
+ type: 12483
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 4
+ type: 12483
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 10
+ type: 12483
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 10
+ type: 12483
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 12
+ type: 12483
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 0
+ type: 12485
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 2
+ type: 12485
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 0
+ type: 12485
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 2
+ type: 12485
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 12487
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 12487
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 12487
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 12487
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 12490
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 12490
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 12491
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 12491
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 12491
+ host_id: 4
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 12491
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 8
+ type: 12491
+ host_id: 128
+ reserved: 0
diff --git a/board/ti/am65x/sec-cfg.yaml b/board/ti/am65x/sec-cfg.yaml
new file mode 100644
index 0000000..7fa12f0
--- /dev/null
+++ b/board/ti/am65x/sec-cfg.yaml
@@ -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 AM65x
+#
+
+---
+
+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: 0
+ 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]
diff --git a/board/ti/common/schema.yaml b/board/ti/common/schema.yaml
new file mode 100644
index 0000000..c8dd2e7
--- /dev/null
+++ b/board/ti/common/schema.yaml
@@ -0,0 +1,436 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Config schema for TI K3 devices
+#
+
+---
+
+definitions:
+ u8:
+ type: integer
+ minimum: 0
+ maximum: 0xff
+ u16:
+ type: integer
+ minimum: 0
+ maximum: 0xffff
+ u32:
+ type: integer
+ minimum: 0
+ maximum: 0xffffffff
+
+
+
+type: object
+properties:
+ pm-cfg:
+ type: object
+ properties:
+ rev:
+ type: object
+ properties:
+ boardcfg_abi_maj:
+ $ref: "#/definitions/u8"
+ boardcfg_abi_min:
+ $ref: "#/definitions/u8"
+ board-cfg:
+ type: object
+ properties:
+ rev:
+ type: object
+ properties:
+ boardcfg_abi_maj:
+ $ref: "#/definitions/u8"
+ boardcfg_abi_min:
+ $ref: "#/definitions/u8"
+ control:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ main_isolation_enable:
+ $ref: "#/definitions/u8"
+ main_isolation_hostid:
+ $ref: "#/definitions/u16"
+
+
+ secproxy:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ scaling_factor:
+ $ref: "#/definitions/u8"
+ scaling_profile:
+ $ref: "#/definitions/u8"
+ disable_main_nav_secure_proxy:
+ $ref: "#/definitions/u8"
+
+ msmc:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ msmc_cache_size:
+ $ref: "#/definitions/u8"
+ debug_cfg:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ trace_dst_enables:
+ $ref: "#/definitions/u16"
+ trace_src_enables:
+ $ref: "#/definitions/u16"
+
+ sec-cfg:
+ type: object
+ properties:
+ rev:
+ type: object
+ properties:
+ boardcfg_abi_maj:
+ $ref: "#/definitions/u8"
+ boardcfg_abi_min:
+ $ref: "#/definitions/u8"
+
+ processor_acl_list:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ proc_acl_entries:
+ type: array
+ minItems: 32
+ maxItems: 32
+ items:
+ type: object
+ properties:
+ processor_id:
+ $ref: "#/definitions/u8"
+ proc_access_master:
+ $ref: "#/definitions/u8"
+ proc_access_secondary:
+ type: array
+ minItems: 3
+ maxItems: 3
+ items:
+ $ref: "#/definitions/u8"
+ host_hierarchy:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ host_hierarchy_entries:
+ type: array
+ minItems: 32
+ maxItems: 32
+ items:
+ type: object
+ properties:
+ host_id:
+ $ref: "#/definitions/u8"
+ supervisor_host_id:
+ $ref: "#/definitions/u8"
+
+ otp_config:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ otp_entry:
+ type: array
+ minItems: 32
+ maxItems: 32
+ items:
+ type: object
+ properties:
+ host_id:
+ $ref: "#/definitions/u8"
+ host_perms:
+ $ref: "#/definitions/u8"
+ write_host_id:
+ $ref: "#/definitions/u8"
+
+ dkek_config:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ allowed_hosts:
+ type: array
+ minItems: 4
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"
+ allow_dkek_export_tisci:
+ $ref: "#/definitions/u8"
+ rsvd:
+ type: array
+ minItems: 3
+ maxItems: 3
+ items:
+ $ref: "#/definitions/u8"
+
+ sa2ul_cfg:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ rsvd:
+ type: array
+ minItems: 2
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"
+ enable_saul_psil_global_config_writes:
+ $ref: "#/definitions/u8"
+ auth_resource_owner:
+ $ref: "#/definitions/u8"
+
+ sec_dbg_config:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ allow_jtag_unlock:
+ $ref: "#/definitions/u8"
+ allow_wildcard_unlock:
+ $ref: "#/definitions/u8"
+ allowed_debug_level_rsvd:
+ $ref: "#/definitions/u8"
+ rsvd:
+ $ref: "#/definitions/u8"
+ min_cert_rev:
+ $ref: "#/definitions/u32"
+ jtag_unlock_hosts:
+ type: array
+ minItems: 4
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"
+
+
+ sec_handover_cfg:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ handover_msg_sender:
+ $ref: "#/definitions/u8"
+ handover_to_host_id:
+ $ref: "#/definitions/u8"
+ rsvd:
+ type: array
+ minItems: 4
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"
+
+ rm-cfg:
+ type: object
+ properties:
+ rm_boardcfg:
+ type: object
+ properties:
+ rev:
+ type: object
+ properties:
+ boardcfg_abi_maj:
+ $ref: "#/definitions/u8"
+ boardcfg_abi_min:
+ $ref: "#/definitions/u8"
+
+ host_cfg:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ host_cfg_entries:
+ type: array
+ minItems: 0
+ maxItems: 32
+ items:
+ type: object
+ properties:
+ host_id:
+ $ref: "#/definitions/u8"
+ allowed_atype:
+ $ref: "#/definitions/u8"
+ allowed_qos:
+ $ref: "#/definitions/u16"
+ allowed_orderid:
+ $ref: "#/definitions/u32"
+ allowed_priority:
+ $ref: "#/definitions/u16"
+ allowed_sched_priority:
+ $ref: "#/definitions/u8"
+ resasg:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ resasg_entries_size:
+ $ref: "#/definitions/u16"
+ reserved:
+ $ref: "#/definitions/u16"
+
+ resasg_entries:
+ type: array
+ minItems: 0
+ maxItems: 468
+ items:
+ type: object
+ properties:
+ start_resource:
+ $ref: "#/definitions/u16"
+ num_resource:
+ $ref: "#/definitions/u16"
+ type:
+ $ref: "#/definitions/u16"
+ host_id:
+ $ref: "#/definitions/u8"
+ reserved:
+ $ref: "#/definitions/u8"
+
+ tifs-rm-cfg:
+ type: object
+ properties:
+ rm_boardcfg:
+ type: object
+ properties:
+ rev:
+ type: object
+ properties:
+ boardcfg_abi_maj:
+ $ref: "#/definitions/u8"
+ boardcfg_abi_min:
+ $ref: "#/definitions/u8"
+
+ host_cfg:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ host_cfg_entries:
+ type: array
+ minItems: 0
+ maxItems: 32
+ items:
+ type: object
+ properties:
+ host_id:
+ $ref: "#/definitions/u8"
+ allowed_atype:
+ $ref: "#/definitions/u8"
+ allowed_qos:
+ $ref: "#/definitions/u16"
+ allowed_orderid:
+ $ref: "#/definitions/u32"
+ allowed_priority:
+ $ref: "#/definitions/u16"
+ allowed_sched_priority:
+ $ref: "#/definitions/u8"
+ resasg:
+ type: object
+ properties:
+ subhdr:
+ type: object
+ properties:
+ magic:
+ $ref: "#/definitions/u16"
+ size:
+ $ref: "#/definitions/u16"
+ resasg_entries_size:
+ $ref: "#/definitions/u16"
+ reserved:
+ $ref: "#/definitions/u16"
+
+ resasg_entries:
+ type: array
+ minItems: 0
+ maxItems: 468
+ items:
+ type: object
+ properties:
+ start_resource:
+ $ref: "#/definitions/u16"
+ num_resource:
+ $ref: "#/definitions/u16"
+ type:
+ $ref: "#/definitions/u16"
+ host_id:
+ $ref: "#/definitions/u8"
+ reserved:
+ $ref: "#/definitions/u8"
diff --git a/board/ti/j721e/Kconfig b/board/ti/j721e/Kconfig
index 84bca32..e6cb21f 100644
--- a/board/ti/j721e/Kconfig
+++ b/board/ti/j721e/Kconfig
@@ -13,6 +13,7 @@
select BOARD_LATE_INIT
imply TI_I2C_BOARD_DETECT
select SYS_DISABLE_DCACHE_OPS
+ select BINMAN
config TARGET_J721E_R5_EVM
bool "TI K3 based J721E EVM running on R5"
@@ -22,6 +23,7 @@
select RAM
select SPL_RAM
select K3_DDRSS
+ select BINMAN
imply SYS_K3_SPL_ATF
imply TI_I2C_BOARD_DETECT
@@ -31,6 +33,7 @@
select BOARD_LATE_INIT
imply TI_I2C_BOARD_DETECT
select SYS_DISABLE_DCACHE_OPS
+ select BINMAN
config TARGET_J7200_R5_EVM
bool "TI K3 based J7200 EVM running on R5"
@@ -40,6 +43,7 @@
select RAM
select SPL_RAM
select K3_DDRSS
+ select BINMAN
imply SYS_K3_SPL_ATF
imply TI_I2C_BOARD_DETECT
diff --git a/board/ti/j721e/board-cfg.yaml b/board/ti/j721e/board-cfg.yaml
new file mode 100644
index 0000000..1375dca
--- /dev/null
+++ b/board/ti/j721e/board-cfg.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for J721E
+#
+
+---
+
+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
diff --git a/board/ti/j721e/board-cfg_j7200.yaml b/board/ti/j721e/board-cfg_j7200.yaml
new file mode 100644
index 0000000..0ac1ae9
--- /dev/null
+++ b/board/ti/j721e/board-cfg_j7200.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for J7200
+#
+
+---
+
+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 : 0x10
+ debug_cfg:
+ subhdr:
+ magic: 0x020C
+ size: 8
+ trace_dst_enables : 0x00
+ trace_src_enables : 0x00
diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env
index c181741..23ce7e1 100644
--- a/board/ti/j721e/j721e.env
+++ b/board/ti/j721e/j721e.env
@@ -7,15 +7,15 @@
#include <environment/ti/k3_rproc.env>
#endif
-default_device_tree=k3-j721e-common-proc-board.dtb
+default_device_tree=ti/k3-j721e-common-proc-board.dtb
findfdt=
setenv name_fdt ${default_device_tree};
if test $board_name = j721e; then
- setenv name_fdt k3-j721e-common-proc-board.dtb; fi;
+ setenv name_fdt ti/k3-j721e-common-proc-board.dtb; fi;
if test $board_name = j7200; then
- setenv name_fdt k3-j7200-common-proc-board.dtb; fi;
+ setenv name_fdt ti/k3-j7200-common-proc-board.dtb; fi;
if test $board_name = j721e-eaik || test $board_name = j721e-sk; then
- setenv name_fdt k3-j721e-sk.dtb; fi;
+ setenv name_fdt ti/k3-j721e-sk.dtb; fi;
setenv fdtfile ${name_fdt}
name_kern=Image
console=ttyS2,115200n8
@@ -37,7 +37,6 @@
bootdir=/boot
rd_spec=-
init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_mmc=
fdt address ${fdtaddr};
fdt resize 0x100000;
diff --git a/board/ti/j721e/pm-cfg.yaml b/board/ti/j721e/pm-cfg.yaml
new file mode 100644
index 0000000..7ae52b3
--- /dev/null
+++ b/board/ti/j721e/pm-cfg.yaml
@@ -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 J721E
+#
+
+---
+
+pm-cfg:
+ rev:
+ boardcfg_abi_maj: 0x0
+ boardcfg_abi_min: 0x1
diff --git a/board/ti/j721e/pm-cfg_j7200.yaml b/board/ti/j721e/pm-cfg_j7200.yaml
new file mode 100644
index 0000000..daaefb1
--- /dev/null
+++ b/board/ti/j721e/pm-cfg_j7200.yaml
@@ -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 J7200
+#
+
+---
+
+pm-cfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
diff --git a/board/ti/j721e/rm-cfg.yaml b/board/ti/j721e/rm-cfg.yaml
new file mode 100644
index 0000000..9f604cf
--- /dev/null
+++ b/board/ti/j721e/rm-cfg.yaml
@@ -0,0 +1,3174 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for J721E
+#
+
+---
+
+rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj: 0x0
+ boardcfg_abi_min: 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size: 356
+ host_cfg_entries:
+ - #1
+ host_id: 3
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #2
+ host_id: 5
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #3
+ host_id: 12
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #4
+ host_id: 13
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #5
+ host_id: 21
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #6
+ host_id: 26
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #7
+ host_id: 28
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #8
+ host_id: 35
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #9
+ host_id: 37
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #10
+ host_id: 40
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #11
+ host_id: 42
+ allowed_atype: 0x2A
+ allowed_qos: 0xAAAA
+ allowed_orderid: 0xAAAAAAAA
+ allowed_priority: 0xAAAA
+ allowed_sched_priority: 0xAA
+ - #12
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #13
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #14
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #15
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #16
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #17
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #18
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #19
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #20
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #21
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #22
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #23
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #24
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #25
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #26
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #27
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #28
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #29
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #30
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #31
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ - #32
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size: 8
+ resasg_entries_size: 3344
+ reserved: 0
+ resasg_entries:
+ -
+ start_resource: 4
+ num_resource: 93
+ type: 7744
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 93
+ type: 7808
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 32
+ type: 7872
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 32
+ type: 8192
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 32
+ type: 8192
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 24
+ type: 8320
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 24
+ type: 8320
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 8384
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 8384
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 8384
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 8384
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 8384
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 8384
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 4
+ type: 8384
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 4
+ type: 8384
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 12
+ type: 8384
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 12
+ type: 8384
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 128
+ type: 8576
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 128
+ type: 8576
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 128
+ type: 8640
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 128
+ type: 8640
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 48
+ type: 8704
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 8768
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 8768
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 6
+ type: 8768
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 6
+ type: 8768
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 2
+ type: 8768
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 2
+ type: 8768
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 13258
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 20480
+ num_resource: 1024
+ type: 13261
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 13322
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 22528
+ num_resource: 1024
+ type: 13325
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 86
+ type: 13386
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 124
+ num_resource: 32
+ type: 13386
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 12
+ type: 13386
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 12
+ type: 13386
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 180
+ num_resource: 12
+ type: 13386
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 192
+ num_resource: 12
+ type: 13386
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 204
+ num_resource: 12
+ type: 13386
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 216
+ num_resource: 28
+ type: 13386
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 244
+ num_resource: 8
+ type: 13386
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 252
+ num_resource: 4
+ type: 13386
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 1024
+ type: 13389
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1062
+ num_resource: 512
+ type: 13389
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 1574
+ num_resource: 32
+ type: 13389
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 1606
+ num_resource: 32
+ type: 13389
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 1638
+ num_resource: 256
+ type: 13389
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 1894
+ num_resource: 256
+ type: 13389
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 2150
+ num_resource: 256
+ type: 13389
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 2406
+ num_resource: 256
+ type: 13389
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 2662
+ num_resource: 256
+ type: 13389
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 2918
+ num_resource: 512
+ type: 13389
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 3430
+ num_resource: 256
+ type: 13389
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 3686
+ num_resource: 922
+ type: 13389
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 13440
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13440
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 4
+ type: 13440
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 4
+ type: 13440
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 4
+ type: 13440
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 4
+ type: 13440
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 13440
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 13440
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 4
+ type: 13440
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 12
+ type: 13440
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 4
+ type: 13440
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 52
+ num_resource: 12
+ type: 13440
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 13504
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 440
+ num_resource: 150
+ type: 13505
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 590
+ num_resource: 40
+ type: 13505
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 630
+ num_resource: 6
+ type: 13505
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 636
+ num_resource: 6
+ type: 13505
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 642
+ num_resource: 10
+ type: 13505
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 652
+ num_resource: 10
+ type: 13505
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 662
+ num_resource: 32
+ type: 13505
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 694
+ num_resource: 38
+ type: 13505
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 732
+ num_resource: 12
+ type: 13505
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 744
+ num_resource: 182
+ type: 13505
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 926
+ num_resource: 40
+ type: 13505
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 966
+ num_resource: 8
+ type: 13505
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 316
+ num_resource: 8
+ type: 13506
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 324
+ num_resource: 2
+ type: 13506
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 324
+ num_resource: 0
+ type: 13506
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 326
+ num_resource: 2
+ type: 13506
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 328
+ num_resource: 2
+ type: 13506
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 330
+ num_resource: 2
+ type: 13506
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 332
+ num_resource: 2
+ type: 13506
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 334
+ num_resource: 8
+ type: 13506
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 342
+ num_resource: 2
+ type: 13506
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 344
+ num_resource: 4
+ type: 13506
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 348
+ num_resource: 1
+ type: 13506
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 349
+ num_resource: 47
+ type: 13506
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 396
+ num_resource: 1
+ type: 13506
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 397
+ num_resource: 4
+ type: 13506
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 401
+ num_resource: 4
+ type: 13506
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 405
+ num_resource: 4
+ type: 13506
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 409
+ num_resource: 8
+ type: 13506
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 417
+ num_resource: 6
+ type: 13506
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 423
+ num_resource: 16
+ type: 13506
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 439
+ num_resource: 1
+ type: 13506
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 13507
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 13507
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 0
+ type: 13507
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 2
+ type: 13507
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 2
+ type: 13507
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 2
+ type: 13507
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 2
+ type: 13507
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 8
+ type: 13507
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 2
+ type: 13507
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 4
+ type: 13507
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 1
+ type: 13507
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 47
+ type: 13507
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 1
+ type: 13507
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 97
+ num_resource: 4
+ type: 13507
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 101
+ num_resource: 4
+ type: 13507
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 105
+ num_resource: 4
+ type: 13507
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 8
+ type: 13507
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 117
+ num_resource: 6
+ type: 13507
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 123
+ num_resource: 10
+ type: 13507
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 133
+ num_resource: 6
+ type: 13507
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 139
+ num_resource: 1
+ type: 13507
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 140
+ num_resource: 16
+ type: 13508
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 6
+ type: 13508
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 162
+ num_resource: 6
+ type: 13508
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 2
+ type: 13508
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 170
+ num_resource: 2
+ type: 13508
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 96
+ type: 13508
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 268
+ num_resource: 32
+ type: 13508
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 304
+ num_resource: 0
+ type: 13509
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 304
+ num_resource: 4
+ type: 13509
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 304
+ num_resource: 0
+ type: 13509
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 308
+ num_resource: 6
+ type: 13509
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 314
+ num_resource: 2
+ type: 13509
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 300
+ num_resource: 0
+ type: 13510
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 300
+ num_resource: 2
+ type: 13510
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 300
+ num_resource: 0
+ type: 13510
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 302
+ num_resource: 2
+ type: 13510
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 13511
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13511
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 13511
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 6
+ type: 13511
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 2
+ type: 13511
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13512
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 13512
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13512
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 13512
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 5
+ type: 13514
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 1
+ type: 13514
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 3
+ type: 13515
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 2
+ type: 13515
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 1
+ type: 13515
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 1
+ type: 13515
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 3
+ type: 13515
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 3
+ type: 13515
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 3
+ type: 13515
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 3
+ type: 13515
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 19
+ num_resource: 3
+ type: 13515
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 6
+ type: 13515
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 3
+ type: 13515
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 31
+ num_resource: 1
+ type: 13515
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 140
+ num_resource: 16
+ type: 13568
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 16
+ type: 13568
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 128
+ type: 13568
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 13569
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 49152
+ num_resource: 1024
+ type: 13570
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 13571
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 13578
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 13578
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 0
+ type: 13578
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 2
+ type: 13578
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 2
+ type: 13578
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 2
+ type: 13578
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 2
+ type: 13578
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 8
+ type: 13578
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 2
+ type: 13578
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 4
+ type: 13578
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 1
+ type: 13578
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 47
+ type: 13578
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 1
+ type: 13578
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 97
+ num_resource: 4
+ type: 13578
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 101
+ num_resource: 4
+ type: 13578
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 105
+ num_resource: 4
+ type: 13578
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 8
+ type: 13578
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 117
+ num_resource: 6
+ type: 13578
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 123
+ num_resource: 16
+ type: 13578
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 139
+ num_resource: 1
+ type: 13578
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 13579
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13579
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 13579
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 6
+ type: 13579
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 2
+ type: 13579
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13580
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 13580
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13580
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 13580
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 13581
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 2
+ type: 13581
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 0
+ type: 13581
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 2
+ type: 13581
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 2
+ type: 13581
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 2
+ type: 13581
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 2
+ type: 13581
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 8
+ type: 13581
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 2
+ type: 13581
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 4
+ type: 13581
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 1
+ type: 13581
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 47
+ type: 13581
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 1
+ type: 13581
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 97
+ num_resource: 4
+ type: 13581
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 101
+ num_resource: 4
+ type: 13581
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 105
+ num_resource: 4
+ type: 13581
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 109
+ num_resource: 8
+ type: 13581
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 117
+ num_resource: 6
+ type: 13581
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 123
+ num_resource: 10
+ type: 13581
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 133
+ num_resource: 6
+ type: 13581
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 139
+ num_resource: 1
+ type: 13581
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 140
+ num_resource: 16
+ type: 13582
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 6
+ type: 13582
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 162
+ num_resource: 6
+ type: 13582
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 2
+ type: 13582
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 170
+ num_resource: 2
+ type: 13582
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 96
+ type: 13582
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 268
+ num_resource: 32
+ type: 13582
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 13583
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13583
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 0
+ type: 13583
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 6
+ type: 13583
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 2
+ type: 13583
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13584
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 13584
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13584
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 2
+ type: 13584
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 100
+ type: 13632
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 110
+ num_resource: 32
+ type: 13632
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 46
+ type: 13632
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 196
+ num_resource: 28
+ type: 13632
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 228
+ num_resource: 28
+ type: 13632
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 260
+ num_resource: 28
+ type: 13632
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 292
+ num_resource: 28
+ type: 13632
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 320
+ num_resource: 24
+ type: 13632
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 352
+ num_resource: 24
+ type: 13632
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 400
+ num_resource: 4
+ type: 13632
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 404
+ num_resource: 4
+ type: 13632
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 32
+ type: 14922
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 16
+ type: 14922
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 64
+ num_resource: 64
+ type: 14922
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 4
+ type: 14922
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 132
+ num_resource: 16
+ type: 14922
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 148
+ num_resource: 16
+ type: 14922
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 164
+ num_resource: 8
+ type: 14922
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 8
+ type: 14922
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 180
+ num_resource: 8
+ type: 14922
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 188
+ num_resource: 24
+ type: 14922
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 212
+ num_resource: 8
+ type: 14922
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 220
+ num_resource: 36
+ type: 14922
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16400
+ num_resource: 128
+ type: 14925
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16528
+ num_resource: 128
+ type: 14925
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 16656
+ num_resource: 256
+ type: 14925
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 16912
+ num_resource: 64
+ type: 14925
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16976
+ num_resource: 128
+ type: 14925
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 17104
+ num_resource: 128
+ type: 14925
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 17232
+ num_resource: 64
+ type: 14925
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 17296
+ num_resource: 64
+ type: 14925
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 17360
+ num_resource: 64
+ type: 14925
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 17424
+ num_resource: 128
+ type: 14925
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 17552
+ num_resource: 128
+ type: 14925
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 17680
+ num_resource: 240
+ type: 14925
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 4
+ type: 14976
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 4
+ type: 14976
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 4
+ type: 14976
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 4
+ type: 14976
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 4
+ type: 14976
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 4
+ type: 14976
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 25
+ num_resource: 4
+ type: 14976
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 29
+ num_resource: 4
+ type: 14976
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 4
+ type: 14976
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 37
+ num_resource: 16
+ type: 14976
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 53
+ num_resource: 4
+ type: 14976
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 57
+ num_resource: 7
+ type: 14976
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15040
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 20
+ type: 15041
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 116
+ num_resource: 8
+ type: 15041
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 124
+ num_resource: 32
+ type: 15041
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 12
+ type: 15041
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 8
+ type: 15041
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 176
+ num_resource: 8
+ type: 15041
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 184
+ num_resource: 8
+ type: 15041
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 192
+ num_resource: 8
+ type: 15041
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 200
+ num_resource: 8
+ type: 15041
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 208
+ num_resource: 16
+ type: 15041
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 224
+ num_resource: 8
+ type: 15041
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 232
+ num_resource: 20
+ type: 15041
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 4
+ type: 15042
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 2
+ type: 15042
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 0
+ type: 15042
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 56
+ num_resource: 0
+ type: 15042
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 56
+ num_resource: 1
+ type: 15042
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 57
+ num_resource: 1
+ type: 15042
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 58
+ num_resource: 1
+ type: 15042
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 59
+ num_resource: 1
+ type: 15042
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 1
+ type: 15042
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 61
+ num_resource: 1
+ type: 15042
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 62
+ num_resource: 1
+ type: 15042
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 63
+ num_resource: 9
+ type: 15042
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 6
+ type: 15042
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 3
+ type: 15042
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 81
+ num_resource: 2
+ type: 15042
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 83
+ num_resource: 1
+ type: 15042
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 84
+ num_resource: 1
+ type: 15042
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 85
+ num_resource: 1
+ type: 15042
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 86
+ num_resource: 1
+ type: 15042
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 87
+ num_resource: 1
+ type: 15042
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 88
+ num_resource: 2
+ type: 15042
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 90
+ num_resource: 1
+ type: 15042
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 91
+ num_resource: 2
+ type: 15042
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 4
+ type: 15043
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 2
+ type: 15043
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 0
+ type: 15043
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 0
+ type: 15043
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 1
+ type: 15043
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 1
+ type: 15043
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 1
+ type: 15043
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 1
+ type: 15043
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 1
+ type: 15043
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 1
+ type: 15043
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 1
+ type: 15043
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 9
+ type: 15043
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 6
+ type: 15043
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 3
+ type: 15043
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 2
+ type: 15043
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 1
+ type: 15043
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 1
+ type: 15043
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 37
+ num_resource: 1
+ type: 15043
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 1
+ type: 15043
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 39
+ num_resource: 1
+ type: 15043
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 2
+ type: 15043
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 1
+ type: 15043
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 3
+ type: 15043
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 0
+ type: 15045
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 2
+ type: 15045
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15047
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 15047
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 5
+ type: 15050
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 1
+ type: 15050
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 3
+ type: 15051
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 2
+ type: 15051
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 3
+ type: 15051
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 3
+ type: 15051
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 3
+ type: 15051
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 3
+ type: 15051
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 3
+ type: 15051
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 3
+ type: 15051
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 3
+ type: 15051
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 3
+ type: 15051
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 29
+ num_resource: 3
+ type: 15051
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 8
+ type: 15104
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 56
+ num_resource: 4
+ type: 15104
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 8
+ type: 15104
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 68
+ num_resource: 4
+ type: 15104
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 4
+ type: 15104
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 76
+ num_resource: 4
+ type: 15104
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 8
+ type: 15104
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 88
+ num_resource: 4
+ type: 15104
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 92
+ num_resource: 4
+ type: 15104
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15105
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 56320
+ num_resource: 256
+ type: 15106
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15107
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 4
+ type: 15114
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 2
+ type: 15114
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 0
+ type: 15114
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 0
+ type: 15114
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 1
+ type: 15114
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 1
+ type: 15114
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 1
+ type: 15114
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 1
+ type: 15114
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 1
+ type: 15114
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 1
+ type: 15114
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 1
+ type: 15114
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 9
+ type: 15114
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 6
+ type: 15114
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 3
+ type: 15114
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 2
+ type: 15114
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 1
+ type: 15114
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 1
+ type: 15114
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 37
+ num_resource: 1
+ type: 15114
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 1
+ type: 15114
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 39
+ num_resource: 1
+ type: 15114
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 2
+ type: 15114
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 1
+ type: 15114
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 2
+ type: 15114
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15115
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 15115
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 4
+ type: 15117
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 2
+ type: 15117
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 0
+ type: 15117
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 0
+ type: 15117
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 1
+ type: 15117
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 1
+ type: 15117
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 1
+ type: 15117
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 1
+ type: 15117
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 1
+ type: 15117
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 1
+ type: 15117
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 1
+ type: 15117
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 9
+ type: 15117
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 6
+ type: 15117
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 3
+ type: 15117
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 2
+ type: 15117
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 1
+ type: 15117
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 1
+ type: 15117
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 37
+ num_resource: 1
+ type: 15117
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 1
+ type: 15117
+ host_id: 26
+ reserved: 0
+
+ -
+ start_resource: 39
+ num_resource: 1
+ type: 15117
+ host_id: 28
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 2
+ type: 15117
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 1
+ type: 15117
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 43
+ num_resource: 3
+ type: 15117
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15119
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 15119
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 20
+ type: 15168
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 28
+ type: 15168
+ host_id: 5
+ reserved: 0
diff --git a/board/ti/j721e/rm-cfg_j7200.yaml b/board/ti/j721e/rm-cfg_j7200.yaml
new file mode 100644
index 0000000..263285f
--- /dev/null
+++ b/board/ti/j721e/rm-cfg_j7200.yaml
@@ -0,0 +1,2065 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for J7200
+#
+
+---
+
+rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size : 356
+ host_cfg_entries:
+ - #1
+ host_id: 3
+ allowed_atype : 0b101010
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #2
+ host_id: 5
+ allowed_atype : 0b101010
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #3
+ host_id: 12
+ allowed_atype : 0b101010
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #4
+ host_id: 13
+ allowed_atype : 0b101010
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #5
+ host_id: 35
+ allowed_atype : 0b101010
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #6
+ host_id: 37
+ allowed_atype : 0b101010
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #7
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #8
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #9
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #10
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #11
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #12
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #13
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #14
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #15
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #16
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #17
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #18
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #19
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #20
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #21
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #22
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #23
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #24
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #25
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #26
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #27
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #28
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #29
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #30
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #31
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+
+ - #32
+ host_id: 0
+ allowed_atype: 0
+ allowed_qos: 0
+ allowed_orderid: 0
+ allowed_priority: 0
+ allowed_sched_priority: 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size : 8
+ resasg_entries_size: 2048
+ reserved : 0
+ resasg_entries:
+ -
+ start_resource: 0
+ num_resource: 32
+ type: 8192
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 32
+ type: 8192
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 24
+ type: 8320
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 24
+ type: 8320
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 8384
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 8384
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 8384
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 8
+ type: 8384
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 16
+ type: 8384
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 16
+ type: 8384
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 48
+ type: 8704
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 8768
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 8768
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 8768
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 8
+ type: 8768
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 13258
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 20480
+ num_resource: 1024
+ type: 13261
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 13322
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 22528
+ num_resource: 1024
+ type: 13325
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 86
+ type: 13386
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 104
+ num_resource: 32
+ type: 13386
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 136
+ num_resource: 16
+ type: 13386
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 152
+ num_resource: 16
+ type: 13386
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 168
+ num_resource: 32
+ type: 13386
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 200
+ num_resource: 24
+ type: 13386
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 224
+ num_resource: 32
+ type: 13386
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 1024
+ type: 13389
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1042
+ num_resource: 512
+ type: 13389
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 1554
+ num_resource: 128
+ type: 13389
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 1682
+ num_resource: 128
+ type: 13389
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 1810
+ num_resource: 256
+ type: 13389
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2066
+ num_resource: 512
+ type: 13389
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 2578
+ num_resource: 2030
+ type: 13389
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 13440
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13440
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 4
+ type: 13440
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 4
+ type: 13440
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 16
+ type: 13440
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 16
+ type: 13440
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 16
+ type: 13440
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 13504
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 120
+ num_resource: 200
+ type: 13505
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 320
+ num_resource: 40
+ type: 13505
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 360
+ num_resource: 32
+ type: 13505
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 392
+ num_resource: 32
+ type: 13505
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 424
+ num_resource: 256
+ type: 13505
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 680
+ num_resource: 256
+ type: 13505
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 936
+ num_resource: 38
+ type: 13505
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 64
+ num_resource: 4
+ type: 13506
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 68
+ num_resource: 2
+ type: 13506
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 70
+ num_resource: 2
+ type: 13506
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 2
+ type: 13506
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 74
+ num_resource: 2
+ type: 13506
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 76
+ num_resource: 2
+ type: 13506
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 20
+ type: 13506
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 98
+ num_resource: 4
+ type: 13506
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 102
+ num_resource: 8
+ type: 13506
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 110
+ num_resource: 8
+ type: 13506
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 2
+ type: 13506
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13507
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 2
+ type: 13507
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 2
+ type: 13507
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 13507
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 2
+ type: 13507
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 2
+ type: 13507
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 20
+ type: 13507
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 4
+ type: 13507
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 8
+ type: 13507
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 8
+ type: 13507
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 58
+ num_resource: 2
+ type: 13507
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 62
+ num_resource: 0
+ type: 13509
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 62
+ num_resource: 1
+ type: 13509
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 62
+ num_resource: 0
+ type: 13509
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 63
+ num_resource: 1
+ type: 13509
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 0
+ type: 13510
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 2
+ type: 13510
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 13511
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 13511
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 13511
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 13511
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13512
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 13512
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 13514
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 13514
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 3
+ type: 13515
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 2
+ type: 13515
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 1
+ type: 13515
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 1
+ type: 13515
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 16
+ type: 13515
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 8
+ type: 13515
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 31
+ num_resource: 1
+ type: 13515
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 8
+ type: 13568
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 68
+ num_resource: 8
+ type: 13568
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 76
+ num_resource: 8
+ type: 13568
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 84
+ num_resource: 66
+ type: 13568
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 13569
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 49152
+ num_resource: 1024
+ type: 13570
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 13571
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13578
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 2
+ type: 13578
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 2
+ type: 13578
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 13578
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 2
+ type: 13578
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 2
+ type: 13578
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 20
+ type: 13578
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 4
+ type: 13578
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 8
+ type: 13578
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 8
+ type: 13578
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 58
+ num_resource: 2
+ type: 13578
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 13579
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 13579
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 13579
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 13579
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13580
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 13580
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 13581
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 2
+ type: 13581
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 2
+ type: 13581
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 13581
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 2
+ type: 13581
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 2
+ type: 13581
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 18
+ num_resource: 20
+ type: 13581
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 38
+ num_resource: 4
+ type: 13581
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 42
+ num_resource: 8
+ type: 13581
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 8
+ type: 13581
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 58
+ num_resource: 2
+ type: 13581
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 13583
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 13583
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 0
+ type: 13583
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 13583
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 13584
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 13584
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 128
+ type: 13632
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 138
+ num_resource: 54
+ type: 13632
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 196
+ num_resource: 28
+ type: 13632
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 228
+ num_resource: 28
+ type: 13632
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 400
+ num_resource: 4
+ type: 13632
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 404
+ num_resource: 4
+ type: 13632
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 32
+ type: 14922
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 47
+ num_resource: 16
+ type: 14922
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 63
+ num_resource: 64
+ type: 14922
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 127
+ num_resource: 32
+ type: 14922
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 159
+ num_resource: 16
+ type: 14922
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 175
+ num_resource: 16
+ type: 14922
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 191
+ num_resource: 65
+ type: 14922
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16399
+ num_resource: 128
+ type: 14925
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16527
+ num_resource: 128
+ type: 14925
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 16655
+ num_resource: 256
+ type: 14925
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 16911
+ num_resource: 128
+ type: 14925
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 17039
+ num_resource: 128
+ type: 14925
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 17167
+ num_resource: 128
+ type: 14925
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 17295
+ num_resource: 625
+ type: 14925
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 8
+ type: 14976
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 4
+ type: 14976
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 16
+ type: 14976
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 29
+ num_resource: 16
+ type: 14976
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 45
+ num_resource: 8
+ type: 14976
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 53
+ num_resource: 8
+ type: 14976
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 61
+ num_resource: 3
+ type: 14976
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15040
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 32
+ type: 15041
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 128
+ num_resource: 16
+ type: 15041
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 144
+ num_resource: 32
+ type: 15041
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 176
+ num_resource: 32
+ type: 15041
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 208
+ num_resource: 16
+ type: 15041
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 224
+ num_resource: 16
+ type: 15041
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 240
+ num_resource: 12
+ type: 15041
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 3
+ type: 15042
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 53
+ num_resource: 2
+ type: 15042
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 55
+ num_resource: 2
+ type: 15042
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 57
+ num_resource: 2
+ type: 15042
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 59
+ num_resource: 2
+ type: 15042
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 61
+ num_resource: 2
+ type: 15042
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 63
+ num_resource: 9
+ type: 15042
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 4
+ type: 15042
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 76
+ num_resource: 4
+ type: 15042
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 4
+ type: 15042
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 84
+ num_resource: 4
+ type: 15042
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 88
+ num_resource: 4
+ type: 15042
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 92
+ num_resource: 1
+ type: 15042
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 3
+ type: 15043
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 2
+ type: 15043
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 2
+ type: 15043
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 2
+ type: 15043
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 2
+ type: 15043
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 2
+ type: 15043
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 9
+ type: 15043
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 15043
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 15043
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 4
+ type: 15043
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 4
+ type: 15043
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 4
+ type: 15043
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 2
+ type: 15043
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 0
+ type: 15045
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 0
+ type: 15045
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 1
+ type: 15045
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 1
+ type: 15045
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15047
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15047
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15047
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 1
+ type: 15047
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 15050
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 15050
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 3
+ type: 15051
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 2
+ type: 15051
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 6
+ type: 15051
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 6
+ type: 15051
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 5
+ type: 15051
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 5
+ type: 15051
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 5
+ type: 15051
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 8
+ type: 15104
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 56
+ num_resource: 4
+ type: 15104
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 8
+ type: 15104
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 68
+ num_resource: 4
+ type: 15104
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 8
+ type: 15104
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 4
+ type: 15104
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 84
+ num_resource: 12
+ type: 15104
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15105
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 56320
+ num_resource: 256
+ type: 15106
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15107
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 3
+ type: 15114
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 2
+ type: 15114
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 2
+ type: 15114
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 2
+ type: 15114
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 2
+ type: 15114
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 2
+ type: 15114
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 9
+ type: 15114
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 15114
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 15114
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 4
+ type: 15114
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 4
+ type: 15114
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 4
+ type: 15114
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 1
+ type: 15114
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15115
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15115
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15115
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 1
+ type: 15115
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 3
+ type: 15117
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 2
+ type: 15117
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 2
+ type: 15117
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 2
+ type: 15117
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 2
+ type: 15117
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 2
+ type: 15117
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 15
+ num_resource: 9
+ type: 15117
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 4
+ type: 15117
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 15117
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 4
+ type: 15117
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 4
+ type: 15117
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 4
+ type: 15117
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 2
+ type: 15117
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15119
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 15119
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 15119
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 1
+ type: 15119
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 20
+ type: 15168
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 28
+ type: 15168
+ host_id: 5
+ reserved: 0
diff --git a/board/ti/j721e/sec-cfg.yaml b/board/ti/j721e/sec-cfg.yaml
new file mode 100644
index 0000000..1eab588
--- /dev/null
+++ b/board/ti/j721e/sec-cfg.yaml
@@ -0,0 +1,380 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Security configuration for J721E
+#
+
+---
+
+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
+ 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
+ write_host_id: 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: 0
+ 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]
diff --git a/board/ti/j721e/sec-cfg_j7200.yaml b/board/ti/j721e/sec-cfg_j7200.yaml
new file mode 100644
index 0000000..c346087
--- /dev/null
+++ b/board/ti/j721e/sec-cfg_j7200.yaml
@@ -0,0 +1,380 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Security management configuration for J7200
+#
+
+---
+
+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: 0
+ 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]
diff --git a/board/ti/j721s2/Kconfig b/board/ti/j721s2/Kconfig
index a24641f..f6d1cb5 100644
--- a/board/ti/j721s2/Kconfig
+++ b/board/ti/j721s2/Kconfig
@@ -13,6 +13,7 @@
select BOARD_LATE_INIT
imply TI_I2C_BOARD_DETECT
select SYS_DISABLE_DCACHE_OPS
+ select BINMAN
config TARGET_J721S2_R5_EVM
bool "TI K3 based J721S2 EVM running on R5"
@@ -22,6 +23,7 @@
select RAM
select SPL_RAM
select K3_DDRSS
+ select BINMAN
imply SYS_K3_SPL_ATF
imply TI_I2C_BOARD_DETECT
diff --git a/board/ti/j721s2/board-cfg.yaml b/board/ti/j721s2/board-cfg.yaml
new file mode 100644
index 0000000..dd02411
--- /dev/null
+++ b/board/ti/j721s2/board-cfg.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Board configuration for J721S2
+#
+
+---
+
+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
diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env
index f446777..9464fe4 100644
--- a/board/ti/j721s2/j721s2.env
+++ b/board/ti/j721s2/j721s2.env
@@ -7,13 +7,13 @@
#include <environment/ti/k3_rproc.env>
#endif
-default_device_tree=k3-j721s2-common-proc-board.dtb
+default_device_tree=ti/k3-j721s2-common-proc-board.dtb
findfdt=
setenv name_fdt ${default_device_tree};
if test $board_name = j721s2; then \
- setenv name_fdt k3-j721s2-common-proc-board.dtb; fi;
+ setenv name_fdt ti/k3-j721s2-common-proc-board.dtb; fi;
if test $board_name = am68-sk; then
- setenv name_fdt k3-am68-sk-base-board.dtb; fi;
+ setenv name_fdt ti/k3-am68-sk-base-board.dtb; fi;
setenv fdtfile ${name_fdt}
name_kern=Image
console=ttyS2,115200n8
@@ -31,7 +31,6 @@
#endif
rd_spec=-
init_mmc=run args_all args_mmc
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}
get_overlay_mmc=
fdt address ${fdtaddr};
fdt resize 0x100000;
diff --git a/board/ti/j721s2/pm-cfg.yaml b/board/ti/j721s2/pm-cfg.yaml
new file mode 100644
index 0000000..a640460
--- /dev/null
+++ b/board/ti/j721s2/pm-cfg.yaml
@@ -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 J721S2
+#
+
+---
+
+pm-cfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
diff --git a/board/ti/j721s2/rm-cfg.yaml b/board/ti/j721s2/rm-cfg.yaml
new file mode 100644
index 0000000..f772832
--- /dev/null
+++ b/board/ti/j721s2/rm-cfg.yaml
@@ -0,0 +1,2901 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+#
+# Resource management configuration for J721S2
+#
+
+---
+
+rm-cfg:
+ rm_boardcfg:
+ rev:
+ boardcfg_abi_maj : 0x0
+ boardcfg_abi_min : 0x1
+ host_cfg:
+ subhdr:
+ magic: 0x4C41
+ size : 356
+ host_cfg_entries:
+ - #1
+ host_id: 3
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #2
+ host_id: 5
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #3
+ host_id: 12
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #4
+ host_id: 13
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #5
+ host_id: 21
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #6
+ host_id: 23
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #7
+ host_id: 35
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #8
+ host_id: 37
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #9
+ host_id: 40
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #10
+ host_id: 42
+ allowed_atype : 0x2A
+ allowed_qos : 0xAAAA
+ allowed_orderid : 0xAAAAAAAA
+ allowed_priority : 0xAAAA
+ allowed_sched_priority : 0xAA
+ - #11
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #12
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #13
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #14
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #15
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #16
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #17
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #18
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #19
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #20
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #21
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #22
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #23
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #24
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #25
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #26
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #27
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #28
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #29
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #30
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #31
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ - #32
+ host_id: 0
+ allowed_atype : 0
+ allowed_qos : 0
+ allowed_orderid : 0
+ allowed_priority : 0
+ allowed_sched_priority : 0
+ resasg:
+ subhdr:
+ magic: 0x7B25
+ size : 8
+ resasg_entries_size: 3032
+ reserved : 0
+ resasg_entries:
+ -
+ start_resource: 0
+ num_resource: 32
+ type: 7744
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 24
+ type: 7744
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 24
+ type: 7808
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 16
+ type: 7808
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 48
+ type: 7936
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 8000
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 8000
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 6
+ type: 8000
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 6
+ type: 8000
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 2
+ type: 8000
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 2
+ type: 8000
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 9472
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 9472
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 4
+ type: 9472
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 4
+ type: 9472
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 8
+ type: 9472
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 24
+ num_resource: 8
+ type: 9472
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 12
+ type: 9472
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 12
+ type: 9472
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 9600
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 50176
+ num_resource: 96
+ type: 14402
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 14403
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 16
+ type: 14414
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 16
+ type: 14414
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 14415
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 14415
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 16
+ type: 14433
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 16
+ type: 14433
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 8
+ type: 14434
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 8
+ type: 14434
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 100
+ type: 14528
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 110
+ num_resource: 32
+ type: 14528
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 142
+ num_resource: 21
+ type: 14528
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 163
+ num_resource: 21
+ type: 14528
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 196
+ num_resource: 28
+ type: 14528
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 228
+ num_resource: 28
+ type: 14528
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 260
+ num_resource: 28
+ type: 14528
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 292
+ num_resource: 28
+ type: 14528
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 400
+ num_resource: 4
+ type: 14528
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 404
+ num_resource: 4
+ type: 14528
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 16266
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 20480
+ num_resource: 1024
+ type: 16269
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 64
+ type: 16330
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 22528
+ num_resource: 1024
+ type: 16333
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 4
+ type: 16384
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 4
+ type: 16384
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 4
+ type: 16384
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 4
+ type: 16384
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 16
+ num_resource: 12
+ type: 16384
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 16384
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 32
+ num_resource: 4
+ type: 16384
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 4
+ type: 16384
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 40
+ num_resource: 4
+ type: 16384
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 44
+ num_resource: 4
+ type: 16384
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 16
+ type: 16384
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 16576
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 423
+ num_resource: 32
+ type: 16577
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 455
+ num_resource: 32
+ type: 16577
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 487
+ num_resource: 182
+ type: 16577
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 669
+ num_resource: 40
+ type: 16577
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 709
+ num_resource: 10
+ type: 16577
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 719
+ num_resource: 10
+ type: 16577
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 729
+ num_resource: 6
+ type: 16577
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 735
+ num_resource: 6
+ type: 16577
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 878
+ num_resource: 128
+ type: 16577
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1006
+ num_resource: 10
+ type: 16577
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 345
+ num_resource: 6
+ type: 16578
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 351
+ num_resource: 0
+ type: 16578
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 351
+ num_resource: 2
+ type: 16578
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 353
+ num_resource: 2
+ type: 16578
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 355
+ num_resource: 6
+ type: 16578
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 361
+ num_resource: 1
+ type: 16578
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 362
+ num_resource: 1
+ type: 16578
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 363
+ num_resource: 1
+ type: 16578
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 364
+ num_resource: 2
+ type: 16578
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 366
+ num_resource: 2
+ type: 16578
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 368
+ num_resource: 22
+ type: 16578
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 390
+ num_resource: 6
+ type: 16578
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 396
+ num_resource: 4
+ type: 16578
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 400
+ num_resource: 4
+ type: 16578
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 404
+ num_resource: 12
+ type: 16578
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 416
+ num_resource: 1
+ type: 16578
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 417
+ num_resource: 2
+ type: 16578
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 419
+ num_resource: 2
+ type: 16578
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 421
+ num_resource: 2
+ type: 16578
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 6
+ type: 16579
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 0
+ type: 16579
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 2
+ type: 16579
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 16579
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 6
+ type: 16579
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 1
+ type: 16579
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 1
+ type: 16579
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 1
+ type: 16579
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 2
+ type: 16579
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 25
+ num_resource: 2
+ type: 16579
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 22
+ type: 16579
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 6
+ type: 16579
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 55
+ num_resource: 4
+ type: 16579
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 59
+ num_resource: 4
+ type: 16579
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 63
+ num_resource: 12
+ type: 16579
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 75
+ num_resource: 4
+ type: 16579
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 79
+ num_resource: 2
+ type: 16579
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 81
+ num_resource: 2
+ type: 16579
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 83
+ num_resource: 2
+ type: 16579
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 85
+ num_resource: 16
+ type: 16580
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 101
+ num_resource: 12
+ type: 16580
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 113
+ num_resource: 2
+ type: 16580
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 115
+ num_resource: 2
+ type: 16580
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 117
+ num_resource: 96
+ type: 16580
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 309
+ num_resource: 32
+ type: 16580
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 343
+ num_resource: 1
+ type: 16581
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 344
+ num_resource: 1
+ type: 16581
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 341
+ num_resource: 1
+ type: 16582
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 342
+ num_resource: 1
+ type: 16582
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 16583
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 16583
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 16584
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 1
+ type: 16584
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 5
+ type: 16586
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 1
+ type: 16586
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 3
+ type: 16587
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 2
+ type: 16587
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 3
+ type: 16587
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 3
+ type: 16587
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 6
+ type: 16587
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 3
+ type: 16587
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 3
+ type: 16587
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 3
+ type: 16587
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 1
+ type: 16587
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 1
+ type: 16587
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 28
+ num_resource: 4
+ type: 16587
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 82
+ num_resource: 16
+ type: 16832
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 98
+ num_resource: 16
+ type: 16832
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 114
+ num_resource: 110
+ type: 16832
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 16833
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 49152
+ num_resource: 1024
+ type: 16834
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 16835
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 6
+ type: 16842
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 0
+ type: 16842
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 2
+ type: 16842
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 16842
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 6
+ type: 16842
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 1
+ type: 16842
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 1
+ type: 16842
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 1
+ type: 16842
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 2
+ type: 16842
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 25
+ num_resource: 2
+ type: 16842
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 22
+ type: 16842
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 6
+ type: 16842
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 55
+ num_resource: 4
+ type: 16842
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 59
+ num_resource: 4
+ type: 16842
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 63
+ num_resource: 12
+ type: 16842
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 75
+ num_resource: 1
+ type: 16842
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 76
+ num_resource: 2
+ type: 16842
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 2
+ type: 16842
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 2
+ type: 16842
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 16843
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 16843
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 16844
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 1
+ type: 16844
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 4
+ num_resource: 6
+ type: 16845
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 0
+ type: 16845
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 2
+ type: 16845
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 16845
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 6
+ type: 16845
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 1
+ type: 16845
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 21
+ num_resource: 1
+ type: 16845
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 1
+ type: 16845
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 2
+ type: 16845
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 25
+ num_resource: 2
+ type: 16845
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 27
+ num_resource: 22
+ type: 16845
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 6
+ type: 16845
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 55
+ num_resource: 4
+ type: 16845
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 59
+ num_resource: 4
+ type: 16845
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 63
+ num_resource: 12
+ type: 16845
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 75
+ num_resource: 4
+ type: 16845
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 79
+ num_resource: 2
+ type: 16845
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 81
+ num_resource: 2
+ type: 16845
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 83
+ num_resource: 2
+ type: 16845
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 85
+ num_resource: 16
+ type: 16846
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 101
+ num_resource: 12
+ type: 16846
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 113
+ num_resource: 2
+ type: 16846
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 115
+ num_resource: 2
+ type: 16846
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 117
+ num_resource: 96
+ type: 16846
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 309
+ num_resource: 32
+ type: 16846
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 1
+ type: 16847
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 1
+ type: 16847
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 16848
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 1
+ type: 16848
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 86
+ type: 16970
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 120
+ num_resource: 32
+ type: 16970
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 152
+ num_resource: 12
+ type: 16970
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 164
+ num_resource: 12
+ type: 16970
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 176
+ num_resource: 28
+ type: 16970
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 204
+ num_resource: 8
+ type: 16970
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 212
+ num_resource: 12
+ type: 16970
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 224
+ num_resource: 12
+ type: 16970
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 236
+ num_resource: 20
+ type: 16970
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 1024
+ type: 16973
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 1058
+ num_resource: 512
+ type: 16973
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 1570
+ num_resource: 256
+ type: 16973
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 1826
+ num_resource: 256
+ type: 16973
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 2082
+ num_resource: 512
+ type: 16973
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 2594
+ num_resource: 256
+ type: 16973
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 2850
+ num_resource: 256
+ type: 16973
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 3106
+ num_resource: 256
+ type: 16973
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 3362
+ num_resource: 32
+ type: 16973
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 3394
+ num_resource: 32
+ type: 16973
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 3426
+ num_resource: 1182
+ type: 16973
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 1536
+ num_resource: 16
+ type: 16975
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2048
+ num_resource: 16
+ type: 16976
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2560
+ num_resource: 16
+ type: 16977
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 3072
+ num_resource: 32
+ type: 16978
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 3584
+ num_resource: 32
+ type: 16979
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 4096
+ num_resource: 32
+ type: 16980
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 12
+ type: 17152
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 20
+ type: 17152
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 1
+ num_resource: 4
+ type: 17344
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 4
+ type: 17344
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 4
+ type: 17344
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 13
+ num_resource: 4
+ type: 17344
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 16
+ type: 17344
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 4
+ type: 17344
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 37
+ num_resource: 4
+ type: 17344
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 41
+ num_resource: 4
+ type: 17344
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 45
+ num_resource: 4
+ type: 17344
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 49
+ num_resource: 4
+ type: 17344
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 53
+ num_resource: 11
+ type: 17344
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 17408
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 96
+ num_resource: 20
+ type: 17409
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 116
+ num_resource: 8
+ type: 17409
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 124
+ num_resource: 8
+ type: 17409
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 132
+ num_resource: 8
+ type: 17409
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 140
+ num_resource: 16
+ type: 17409
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 156
+ num_resource: 8
+ type: 17409
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 164
+ num_resource: 8
+ type: 17409
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 172
+ num_resource: 8
+ type: 17409
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 180
+ num_resource: 32
+ type: 17409
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 212
+ num_resource: 12
+ type: 17409
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 224
+ num_resource: 28
+ type: 17409
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 50
+ num_resource: 4
+ type: 17410
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 0
+ type: 17410
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 1
+ type: 17410
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 55
+ num_resource: 1
+ type: 17410
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 56
+ num_resource: 1
+ type: 17410
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 57
+ num_resource: 1
+ type: 17410
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 58
+ num_resource: 1
+ type: 17410
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 59
+ num_resource: 1
+ type: 17410
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 2
+ type: 17410
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 62
+ num_resource: 0
+ type: 17410
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 62
+ num_resource: 9
+ type: 17410
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 71
+ num_resource: 6
+ type: 17410
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 77
+ num_resource: 1
+ type: 17410
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 1
+ type: 17410
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 79
+ num_resource: 2
+ type: 17410
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 81
+ num_resource: 1
+ type: 17410
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 82
+ num_resource: 1
+ type: 17410
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 83
+ num_resource: 1
+ type: 17410
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 84
+ num_resource: 3
+ type: 17410
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 87
+ num_resource: 2
+ type: 17410
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 89
+ num_resource: 4
+ type: 17410
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 4
+ type: 17411
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 0
+ type: 17411
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 1
+ type: 17411
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 1
+ type: 17411
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 1
+ type: 17411
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 1
+ type: 17411
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 1
+ type: 17411
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 1
+ type: 17411
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 17411
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 0
+ type: 17411
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 9
+ type: 17411
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 6
+ type: 17411
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 29
+ num_resource: 1
+ type: 17411
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 1
+ type: 17411
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 31
+ num_resource: 2
+ type: 17411
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 1
+ type: 17411
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 1
+ type: 17411
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 1
+ type: 17411
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 3
+ type: 17411
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 39
+ num_resource: 2
+ type: 17411
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 41
+ num_resource: 5
+ type: 17411
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 0
+ type: 17413
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 2
+ type: 17413
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 17415
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 17415
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 5
+ type: 17418
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 1
+ type: 17418
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 3
+ type: 17419
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 3
+ num_resource: 2
+ type: 17419
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 5
+ num_resource: 3
+ type: 17419
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 3
+ type: 17419
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 3
+ type: 17419
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 3
+ type: 17419
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 17
+ num_resource: 3
+ type: 17419
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 20
+ num_resource: 3
+ type: 17419
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 3
+ type: 17419
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 26
+ num_resource: 3
+ type: 17419
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 29
+ num_resource: 3
+ type: 17419
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 48
+ num_resource: 8
+ type: 17472
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 56
+ num_resource: 4
+ type: 17472
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 60
+ num_resource: 8
+ type: 17472
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 68
+ num_resource: 4
+ type: 17472
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 72
+ num_resource: 4
+ type: 17472
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 76
+ num_resource: 4
+ type: 17472
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 80
+ num_resource: 8
+ type: 17472
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 88
+ num_resource: 4
+ type: 17472
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 92
+ num_resource: 4
+ type: 17472
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 17473
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 56320
+ num_resource: 256
+ type: 17474
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 1
+ type: 17475
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 4
+ type: 17482
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 0
+ type: 17482
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 1
+ type: 17482
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 1
+ type: 17482
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 1
+ type: 17482
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 1
+ type: 17482
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 1
+ type: 17482
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 1
+ type: 17482
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 17482
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 0
+ type: 17482
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 9
+ type: 17482
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 6
+ type: 17482
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 29
+ num_resource: 1
+ type: 17482
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 1
+ type: 17482
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 31
+ num_resource: 2
+ type: 17482
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 1
+ type: 17482
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 1
+ type: 17482
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 1
+ type: 17482
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 3
+ type: 17482
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 39
+ num_resource: 2
+ type: 17482
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 41
+ num_resource: 4
+ type: 17482
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 17483
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 17483
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 2
+ num_resource: 4
+ type: 17485
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 0
+ type: 17485
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 6
+ num_resource: 1
+ type: 17485
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 7
+ num_resource: 1
+ type: 17485
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 8
+ num_resource: 1
+ type: 17485
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 9
+ num_resource: 1
+ type: 17485
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 10
+ num_resource: 1
+ type: 17485
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 11
+ num_resource: 1
+ type: 17485
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 12
+ num_resource: 2
+ type: 17485
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 0
+ type: 17485
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 14
+ num_resource: 9
+ type: 17485
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 23
+ num_resource: 6
+ type: 17485
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 29
+ num_resource: 1
+ type: 17485
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 30
+ num_resource: 1
+ type: 17485
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 31
+ num_resource: 2
+ type: 17485
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 33
+ num_resource: 1
+ type: 17485
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 34
+ num_resource: 1
+ type: 17485
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 35
+ num_resource: 1
+ type: 17485
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 36
+ num_resource: 3
+ type: 17485
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 39
+ num_resource: 2
+ type: 17485
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 41
+ num_resource: 5
+ type: 17485
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 0
+ type: 17487
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 0
+ num_resource: 2
+ type: 17487
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 22
+ num_resource: 32
+ type: 17610
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 54
+ num_resource: 16
+ type: 17610
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 70
+ num_resource: 8
+ type: 17610
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 78
+ num_resource: 8
+ type: 17610
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 86
+ num_resource: 24
+ type: 17610
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 110
+ num_resource: 8
+ type: 17610
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 118
+ num_resource: 16
+ type: 17610
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 134
+ num_resource: 16
+ type: 17610
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 150
+ num_resource: 64
+ type: 17610
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 214
+ num_resource: 4
+ type: 17610
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 218
+ num_resource: 38
+ type: 17610
+ host_id: 128
+ reserved: 0
+
+ -
+ start_resource: 16406
+ num_resource: 128
+ type: 17613
+ host_id: 12
+ reserved: 0
+
+ -
+ start_resource: 16534
+ num_resource: 128
+ type: 17613
+ host_id: 13
+ reserved: 0
+
+ -
+ start_resource: 16662
+ num_resource: 64
+ type: 17613
+ host_id: 21
+ reserved: 0
+
+ -
+ start_resource: 16726
+ num_resource: 64
+ type: 17613
+ host_id: 23
+ reserved: 0
+
+ -
+ start_resource: 16790
+ num_resource: 128
+ type: 17613
+ host_id: 35
+ reserved: 0
+
+ -
+ start_resource: 16918
+ num_resource: 128
+ type: 17613
+ host_id: 37
+ reserved: 0
+
+ -
+ start_resource: 17046
+ num_resource: 128
+ type: 17613
+ host_id: 40
+ reserved: 0
+
+ -
+ start_resource: 17174
+ num_resource: 128
+ type: 17613
+ host_id: 42
+ reserved: 0
+
+ -
+ start_resource: 17302
+ num_resource: 256
+ type: 17613
+ host_id: 3
+ reserved: 0
+
+ -
+ start_resource: 17558
+ num_resource: 64
+ type: 17613
+ host_id: 5
+ reserved: 0
+
+ -
+ start_resource: 17622
+ num_resource: 298
+ type: 17613
+ host_id: 128
+ reserved: 0
diff --git a/board/ti/j721s2/sec-cfg.yaml b/board/ti/j721s2/sec-cfg.yaml
new file mode 100644
index 0000000..b3601d2
--- /dev/null
+++ b/board/ti/j721s2/sec-cfg.yaml
@@ -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 J721S2
+#
+
+---
+
+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: 0
+ rsvd: [0, 0]
+ sec_dbg_config:
+ subhdr:
+ magic: 0x42AF
+ size: 16
+ allow_jtag_unlock : 0x0
+ allow_wildcard_unlock : 0x0
+ 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]
diff --git a/board/ti/keys/custMpk.crt b/board/ti/keys/custMpk.crt
new file mode 100644
index 0000000..01bd64a
--- /dev/null
+++ b/board/ti/keys/custMpk.crt
@@ -0,0 +1,33 @@
+-----BEGIN CERTIFICATE-----
+MIIFwzCCA6sCFHKW0ueol0+vsilVaZyqKhppo9ryMA0GCSqGSIb3DQEBCwUAMIGd
+MQswCQYDVQQGEwJVUzELMAkGA1UECAwCVFgxDzANBgNVBAcMBkRhbGxhczEnMCUG
+A1UECgweVGV4YXMgSW5zdHJ1bWVudHMgSW5jb3Jwb3JhdGVkMRMwEQYDVQQLDApQ
+cm9jZXNzb3JzMRMwEQYDVQQDDApUSSBTdXBwb3J0MR0wGwYJKoZIhvcNAQkBFg5z
+dXBwb3J0QHRpLmNvbTAeFw0yMzA2MDEwNTIxMTZaFw0zMzA1MjkwNTIxMTZaMIGd
+MQswCQYDVQQGEwJVUzELMAkGA1UECAwCVFgxDzANBgNVBAcMBkRhbGxhczEnMCUG
+A1UECgweVGV4YXMgSW5zdHJ1bWVudHMgSW5jb3Jwb3JhdGVkMRMwEQYDVQQLDApQ
+cm9jZXNzb3JzMRMwEQYDVQQDDApUSSBTdXBwb3J0MR0wGwYJKoZIhvcNAQkBFg5z
+dXBwb3J0QHRpLmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL8U
+rknYf3LTayPN60gOZdwiTfIOT4L27bXy3dt8kfpuWf/V97beBB2KzNKV2dHgxMH4
+UL//SAyRIlCaTHuL85YKKCazpNngqVVBGvs+Wydsv8rAca8vciLuRgElYq0+xwT2
+sRi2LMASbg/imz7lpqCoBkUDQRdOFh+pdNaETtZ5pxC4EakOkh8l3X+x8tG58mjY
+M1lLgn13zNGc+iO0+1iI8s3q1RbyLHUt+mLDwQlu4AZw4LUHCZli2dbk52xtyIIH
+UJP34tjt0V/j0J7Pk1TZX91dzjdg8asUigR7Zae6f99FRXxLoVuuTsaUPYxOh9KU
+PKTzn9r88jZ85w2tWkI38SqB0G6hp2cDHoftALtzSmgoMaKCmqMEweiH/0V+qsGf
+1DsFx4P9IXH+vX84yRYZUg7mAzONHR7JNhzNTp2CKYjNmyq+bF97srI6eQBqffWt
+Gp0ezVgqz170ToCrO0/d+NTeNKLEINlZGS2FAl4faLFMjbkRBuktdrVYjFCoN25m
+eG+DMEZNNJ+0GEq5u/p7xa7WMhCEhGw/moAzNfxNvNVuYFRQz35tgJcE+o8LIP29
+mCuhN71Z/UrsRaEJixfJchQztwVeEl3iWh3OIVT24erVVaon600J3xlAgi5miRdl
+2W6z1jhOjWEW1nTU3hZfURnVQriD0sjeS6lpl7aNAgMBAAEwDQYJKoZIhvcNAQEL
+BQADggIBAHy+h1FQKedFTJWgqGJkTwtcym5LyXD6ig8LyhJpVEbXmqK7ZKY2F2hB
+PqVbfCZNogszIvl8q3ykz+tcGbfBk3rq+KMUwbk5E29mSMmAJ9DNNozudgKkKq9w
+RmcO1bXCEspFgNvNEkYAQCBvMOyH/nCyFu9QzOzN35XIzf0fI3jM6rueLxSXq3xO
+7yHUZ3mzAZp6e1Qo6cuABAw1q6KqKYJCnJ3Nq6F42bmGp8mSD+2AuGV8cU+7Z3sh
+k/ooFMCsulj1R5+TlKgEfqspQXbefEsvRW3n3ZD8bcQF0ytiX7XVmDMFVpQkTzps
+92fjZ08Zcj7bCZQsFXXACIQkMiTiiMW6NwLFZDyq11/B1oe1bhjFUuqqUkHC/PKx
+gdWRwluGRt+onFRD5/upXnugKT99j/hQ7sy80a64A1xoCcKVbwcHU7YBQG1vLk6D
+idg0vI3gj7v+/jZEPkv/KrqAI6YuvpplkcHkEKuAUFAkozvVJ5pPK3K0xHBJGNMK
+kJ9FMAakFj6jfZaR5Ay3ZuOAn5oPMwd6RaauNOzVpBll6DFOyw2rU6fbId/gi841
+drmBfM6ufue6ecslkp9zSOpPLXhjt2g9NRVKPE20CmRetVSDLcMFet7ZImbxqggw
+yjDxA7oR+Px+o+xr+djcDlfj6500Rys6W1SNHe99HXOCcpQqivX0
+-----END CERTIFICATE-----
diff --git a/board/ti/keys/custMpk.key b/board/ti/keys/custMpk.key
new file mode 100644
index 0000000..adba378
--- /dev/null
+++ b/board/ti/keys/custMpk.key
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKQIBAAKCAgEAvxSuSdh/ctNrI83rSA5l3CJN8g5PgvbttfLd23yR+m5Z/9X3
+tt4EHYrM0pXZ0eDEwfhQv/9IDJEiUJpMe4vzlgooJrOk2eCpVUEa+z5bJ2y/ysBx
+ry9yIu5GASVirT7HBPaxGLYswBJuD+KbPuWmoKgGRQNBF04WH6l01oRO1nmnELgR
+qQ6SHyXdf7Hy0bnyaNgzWUuCfXfM0Zz6I7T7WIjyzerVFvIsdS36YsPBCW7gBnDg
+tQcJmWLZ1uTnbG3IggdQk/fi2O3RX+PQns+TVNlf3V3ON2DxqxSKBHtlp7p/30VF
+fEuhW65OxpQ9jE6H0pQ8pPOf2vzyNnznDa1aQjfxKoHQbqGnZwMeh+0Au3NKaCgx
+ooKaowTB6If/RX6qwZ/UOwXHg/0hcf69fzjJFhlSDuYDM40dHsk2HM1OnYIpiM2b
+Kr5sX3uysjp5AGp99a0anR7NWCrPXvROgKs7T9341N40osQg2VkZLYUCXh9osUyN
+uREG6S12tViMUKg3bmZ4b4MwRk00n7QYSrm7+nvFrtYyEISEbD+agDM1/E281W5g
+VFDPfm2AlwT6jwsg/b2YK6E3vVn9SuxFoQmLF8lyFDO3BV4SXeJaHc4hVPbh6tVV
+qifrTQnfGUCCLmaJF2XZbrPWOE6NYRbWdNTeFl9RGdVCuIPSyN5LqWmXto0CAwEA
+AQKCAgAzkAwcJ0z1GnId/lJQZno8NhGckRoJuEKbR8dwlCP8VUz6Ca5H7Y9kvXDa
+Hs/hn+rYgP6hYOz7XyrIX2rmJ/T6dxEwqGeC1+o59FConcIRWHpE5zuGT6JYJL5F
+TuZa48bm4v8VMQvQZOjIZpkIFwao8c6HTwKAnHTB5IN/48I2hCt+Cn3RhfoOZ7Rm
+4gkpaSkt+7GXlhXHb82YfujNO+hbktEamhUYlQ9EK70Wa8aqmf3gHxO0JgsEFjW8
+lJaSnultlTW8SDcx3LMUUjCYumECk4oX/VlJfmKYjPlVjkr3QQ+Cm3nNucb4K4hc
+c+JL+2ERhSj8RjXL7VgbNgdPnIjvQDJuTNqecTU8xWPYrkOLQpNibbLjnutLkhJz
+fMyRtmDtrsey8WiCDuCHkPJ8/f8RjL2zWI9fzTDDIzdlEKouUFGOovaHVnbua6pn
+hymcu9d9FV3p2rcbj0ivCs7e8j+vhSxFJEJoAbcQdXCTi/n2uR7pLtoMNiUzsejy
+d46Uz+KEU920NTwE2z6JJq8I2vegnxjc7PDDrV3/5rK04B93aXiqvwWseCpxelrI
+xaMkRHbXrIXRO6MXQ3N+zNq8Dg3hjGTTvaBKuwgvqLwlXY8+Aa3ooFzEOInIOSsI
+XcWqXxt/tgZgsj9RwpC42t8kbA+BkbNk9EIUa+P5kEr2P/fO7QKCAQEA4EtArnOX
+D6tQF8uTw8USOZC2P9s/ez1z4jRq3oKP0Kv4tJiuIObJ/dUvGVD7aM5v2xaCfhm8
+xpk09VPUgghfG5jR5qVvQr75kCNToJQudWi4ngk1HwKJzzTO11giFEdybvTUA+Pj
+fmxCM0dYYqRWZoj0hLqXlUCwxE74BFIhJVjeYbf+nTQrqpllTLoW7MTZHzGx5SXx
+4dNzyVAUH49Yt2D8mgXXCkf5sGLh762wj34b/rR10Kr4O5utGMZrfTRIbuQ1pNjU
+m66baPzq+mC0BzqZEW70TgEb7lOr8rcVXLOi3r36omfd9/MHx7iZD6o3K1axSO15
+grD4ZrN7Ac3QJwKCAQEA2heCoBdpvy6YUk8AO2k8qDygTdmPQRuwjjT+Z2fMslBt
+D7DkpKwZ6Bl9OclcpiiLHmH+hv65KqYg+tR0RRb7PcogB9El9x7yKkGTPZEYWGky
+n8P84rJpKwjnwWQvPQktI1cs3YGvZA9DQTFBavRrwuzgd1oSJq5aPQ2tme0kMvWp
+l1/B/cPK+PKCi/Wfisaze1TjijP9qIeUwkdNN6WLrLU3QgsGppcg2I7RQtAIikT6
+GkuiOQAvWMsrJVV6PNrVKz4fJDJ59Rz6jbDHZNi1MEYNxQoB/Pl7QIakbfjWpHLv
+8Ey7cB2JKxjQy8tmyl8WNQVbXbE6daPXcMTUmaRAKwKCAQBv1lYMJmq+T2eCVen6
+BbvOpE+bi5EdvEiaFBTtmiBnpjg+pJq+oRU60h/H+c9CNR0lGxY6Fk9An4f+g6xE
+ojP6KLsQzJCrsVny+wpp2TlJJcxYULMCIVvhy60PR0zG29E9biqBPhJjKUvhEcQK
+e3LxcXyq6fdHXphFajLUxLbuTl+kTgBRFoBnclFGbsubh5PTsA3J+p+fQLZNPPar
+veg4l82cZykQYU8pGkUaI3sUMYd3+zd7sqRP5JHs9pMGPRmY4YW2CsAIWIn5UZNB
+ARMDP76vKKn8cyUgMuxb+9pU/OVLN2NPs4bEaZQJjAwV+YPEwldny7F47xEM9JVz
+EtKlAoIBAQDUt62u3GdGE/p5/ZgqWoDRTyDEDfmN9aYFbmbdEP80xQE7FrxMaZhz
+K7laja6SWmUm40nQ/c45bQQp4uLtKHcxU15egX7YRBTLZl5o5IasZR79ebnEm2O8
+l9kEZeU1USf3mmWmP4GExOZCRfqaiYA6BbUCdJXTqKdXeWnkAssV8UrS3JFoJHpq
+yo7OWGqefyQ8nRW6jO9SW7uaqtUD+7H6aF5XSk3YWvusfdBZrHNH+fM/hpnZovaL
+Us7ogTDS/laA8PyK37jYfMVdQhmZoU1Iomt3zkUWK3gt/aWPpfAlQf4Jka4YspZB
+tNiijefaZ1hPqsPs5Joyd/YAhdsfaHc1AoIBAQCn/9j6RRjRaw0ip756oad4AXHz
+XBwVB2CrY96qT6Hj9Sq7tGgdskqGkOQkAivBLBizUdcWv0t1yenOsSgasQeMlvlh
+B8md9cLvpKXPB3HM3rTDH/xNXe0TpVKLf7SXC8HfDyIweHwMW3QgO2DWrvI4BV/T
+ckBatRNQ90HxkqGFhC/Mp529lQlyg3ifxPxJsvZOyPMUnrflAvsKQk5c2ZiQg3nZ
+h7I2pjSYgCl+Ib52l8p9bf1kcrVGgPM+auzm496i0RPobFeDBoBvSoznJktHJ7+3
+NnZH+jLiZCODiQPGtQUi+T6eIZUIJF0YASpsCCtUzXCxwW3lYIDNy7UlMivF
+-----END RSA PRIVATE KEY-----
diff --git a/board/ti/keys/custMpk.pem b/board/ti/keys/custMpk.pem
new file mode 100644
index 0000000..adba378
--- /dev/null
+++ b/board/ti/keys/custMpk.pem
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKQIBAAKCAgEAvxSuSdh/ctNrI83rSA5l3CJN8g5PgvbttfLd23yR+m5Z/9X3
+tt4EHYrM0pXZ0eDEwfhQv/9IDJEiUJpMe4vzlgooJrOk2eCpVUEa+z5bJ2y/ysBx
+ry9yIu5GASVirT7HBPaxGLYswBJuD+KbPuWmoKgGRQNBF04WH6l01oRO1nmnELgR
+qQ6SHyXdf7Hy0bnyaNgzWUuCfXfM0Zz6I7T7WIjyzerVFvIsdS36YsPBCW7gBnDg
+tQcJmWLZ1uTnbG3IggdQk/fi2O3RX+PQns+TVNlf3V3ON2DxqxSKBHtlp7p/30VF
+fEuhW65OxpQ9jE6H0pQ8pPOf2vzyNnznDa1aQjfxKoHQbqGnZwMeh+0Au3NKaCgx
+ooKaowTB6If/RX6qwZ/UOwXHg/0hcf69fzjJFhlSDuYDM40dHsk2HM1OnYIpiM2b
+Kr5sX3uysjp5AGp99a0anR7NWCrPXvROgKs7T9341N40osQg2VkZLYUCXh9osUyN
+uREG6S12tViMUKg3bmZ4b4MwRk00n7QYSrm7+nvFrtYyEISEbD+agDM1/E281W5g
+VFDPfm2AlwT6jwsg/b2YK6E3vVn9SuxFoQmLF8lyFDO3BV4SXeJaHc4hVPbh6tVV
+qifrTQnfGUCCLmaJF2XZbrPWOE6NYRbWdNTeFl9RGdVCuIPSyN5LqWmXto0CAwEA
+AQKCAgAzkAwcJ0z1GnId/lJQZno8NhGckRoJuEKbR8dwlCP8VUz6Ca5H7Y9kvXDa
+Hs/hn+rYgP6hYOz7XyrIX2rmJ/T6dxEwqGeC1+o59FConcIRWHpE5zuGT6JYJL5F
+TuZa48bm4v8VMQvQZOjIZpkIFwao8c6HTwKAnHTB5IN/48I2hCt+Cn3RhfoOZ7Rm
+4gkpaSkt+7GXlhXHb82YfujNO+hbktEamhUYlQ9EK70Wa8aqmf3gHxO0JgsEFjW8
+lJaSnultlTW8SDcx3LMUUjCYumECk4oX/VlJfmKYjPlVjkr3QQ+Cm3nNucb4K4hc
+c+JL+2ERhSj8RjXL7VgbNgdPnIjvQDJuTNqecTU8xWPYrkOLQpNibbLjnutLkhJz
+fMyRtmDtrsey8WiCDuCHkPJ8/f8RjL2zWI9fzTDDIzdlEKouUFGOovaHVnbua6pn
+hymcu9d9FV3p2rcbj0ivCs7e8j+vhSxFJEJoAbcQdXCTi/n2uR7pLtoMNiUzsejy
+d46Uz+KEU920NTwE2z6JJq8I2vegnxjc7PDDrV3/5rK04B93aXiqvwWseCpxelrI
+xaMkRHbXrIXRO6MXQ3N+zNq8Dg3hjGTTvaBKuwgvqLwlXY8+Aa3ooFzEOInIOSsI
+XcWqXxt/tgZgsj9RwpC42t8kbA+BkbNk9EIUa+P5kEr2P/fO7QKCAQEA4EtArnOX
+D6tQF8uTw8USOZC2P9s/ez1z4jRq3oKP0Kv4tJiuIObJ/dUvGVD7aM5v2xaCfhm8
+xpk09VPUgghfG5jR5qVvQr75kCNToJQudWi4ngk1HwKJzzTO11giFEdybvTUA+Pj
+fmxCM0dYYqRWZoj0hLqXlUCwxE74BFIhJVjeYbf+nTQrqpllTLoW7MTZHzGx5SXx
+4dNzyVAUH49Yt2D8mgXXCkf5sGLh762wj34b/rR10Kr4O5utGMZrfTRIbuQ1pNjU
+m66baPzq+mC0BzqZEW70TgEb7lOr8rcVXLOi3r36omfd9/MHx7iZD6o3K1axSO15
+grD4ZrN7Ac3QJwKCAQEA2heCoBdpvy6YUk8AO2k8qDygTdmPQRuwjjT+Z2fMslBt
+D7DkpKwZ6Bl9OclcpiiLHmH+hv65KqYg+tR0RRb7PcogB9El9x7yKkGTPZEYWGky
+n8P84rJpKwjnwWQvPQktI1cs3YGvZA9DQTFBavRrwuzgd1oSJq5aPQ2tme0kMvWp
+l1/B/cPK+PKCi/Wfisaze1TjijP9qIeUwkdNN6WLrLU3QgsGppcg2I7RQtAIikT6
+GkuiOQAvWMsrJVV6PNrVKz4fJDJ59Rz6jbDHZNi1MEYNxQoB/Pl7QIakbfjWpHLv
+8Ey7cB2JKxjQy8tmyl8WNQVbXbE6daPXcMTUmaRAKwKCAQBv1lYMJmq+T2eCVen6
+BbvOpE+bi5EdvEiaFBTtmiBnpjg+pJq+oRU60h/H+c9CNR0lGxY6Fk9An4f+g6xE
+ojP6KLsQzJCrsVny+wpp2TlJJcxYULMCIVvhy60PR0zG29E9biqBPhJjKUvhEcQK
+e3LxcXyq6fdHXphFajLUxLbuTl+kTgBRFoBnclFGbsubh5PTsA3J+p+fQLZNPPar
+veg4l82cZykQYU8pGkUaI3sUMYd3+zd7sqRP5JHs9pMGPRmY4YW2CsAIWIn5UZNB
+ARMDP76vKKn8cyUgMuxb+9pU/OVLN2NPs4bEaZQJjAwV+YPEwldny7F47xEM9JVz
+EtKlAoIBAQDUt62u3GdGE/p5/ZgqWoDRTyDEDfmN9aYFbmbdEP80xQE7FrxMaZhz
+K7laja6SWmUm40nQ/c45bQQp4uLtKHcxU15egX7YRBTLZl5o5IasZR79ebnEm2O8
+l9kEZeU1USf3mmWmP4GExOZCRfqaiYA6BbUCdJXTqKdXeWnkAssV8UrS3JFoJHpq
+yo7OWGqefyQ8nRW6jO9SW7uaqtUD+7H6aF5XSk3YWvusfdBZrHNH+fM/hpnZovaL
+Us7ogTDS/laA8PyK37jYfMVdQhmZoU1Iomt3zkUWK3gt/aWPpfAlQf4Jka4YspZB
+tNiijefaZ1hPqsPs5Joyd/YAhdsfaHc1AoIBAQCn/9j6RRjRaw0ip756oad4AXHz
+XBwVB2CrY96qT6Hj9Sq7tGgdskqGkOQkAivBLBizUdcWv0t1yenOsSgasQeMlvlh
+B8md9cLvpKXPB3HM3rTDH/xNXe0TpVKLf7SXC8HfDyIweHwMW3QgO2DWrvI4BV/T
+ckBatRNQ90HxkqGFhC/Mp529lQlyg3ifxPxJsvZOyPMUnrflAvsKQk5c2ZiQg3nZ
+h7I2pjSYgCl+Ib52l8p9bf1kcrVGgPM+auzm496i0RPobFeDBoBvSoznJktHJ7+3
+NnZH+jLiZCODiQPGtQUi+T6eIZUIJF0YASpsCCtUzXCxwW3lYIDNy7UlMivF
+-----END RSA PRIVATE KEY-----
diff --git a/board/ti/keys/ti-degenerate-key.pem b/board/ti/keys/ti-degenerate-key.pem
new file mode 100644
index 0000000..bd7d374
--- /dev/null
+++ b/board/ti/keys/ti-degenerate-key.pem
@@ -0,0 +1,10 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBWwIBAAKBgQDRfrnXQaP0k6vRK/gZ+bDflSU6y1JagGeQ/b+QYuiDz14japog
+8fRSu5WBsAxaSaySAUwS3L9Ppw+hGMecmyIJ494aMfZTtk1g49gU58joduiRnu7e
+QSZHMnehhuNlfD7A2tAAKnxIYuabs8zHYM/SS9Ne7t3kIQMbKfUSzNy6qQIBAQIB
+AQJBAOelUA376o6w3HkShXfN+shaOZYqFuTJ9exLMwsLp7DZKXB5F9I4JJ+Vkvho
+k6QWs7vkhleLSYUZknXHYm26ZE0CQQDnhTtd4PTBoZPjPXOeYMJFtEdMNy0XP6ey
+bcce389ugoY7BEkvASrd8PHgJQHziepgWOG4DGp33c64Hfq4zI3NAgEBAgEBAkA0
+RbK4uqoLciQluesTPU6lBy7Se3Dw0F9xBqlF5SR4KI6q+zQrHpBKyFOofMHZgizR
+iCrL55cxEM146zMw3AnF
+-----END RSA PRIVATE KEY-----
diff --git a/board/ti/ks2_evm/MAINTAINERS b/board/ti/ks2_evm/MAINTAINERS
index 999ef0a..637feec 100644
--- a/board/ti/ks2_evm/MAINTAINERS
+++ b/board/ti/ks2_evm/MAINTAINERS
@@ -1,12 +1,9 @@
-KS2_EVM BOARD
-M: Vitaly Andrianov <vitalya@ti.com>
+KeyStone II EVM Boards
+M: Andrew Davis <afd@ti.com>
S: Maintained
+F: arch/arm/mach-keystone/
F: board/ti/ks2_evm/
-F: include/configs/k2hk_evm.h
-F: configs/k2hk_evm_defconfig
-F: include/configs/k2e_evm.h
-F: configs/k2e_evm_defconfig
-F: include/configs/k2l_evm.h
-F: configs/k2l_evm_defconfig
-F: include/configs/k2g_evm.h
-F: configs/k2g_evm_defconfig
+N: k2hk
+N: k2e
+N: k2l
+N: k2g
diff --git a/board/toradex/apalis-imx8/MAINTAINERS b/board/toradex/apalis-imx8/MAINTAINERS
index 03b0fda..198399c 100644
--- a/board/toradex/apalis-imx8/MAINTAINERS
+++ b/board/toradex/apalis-imx8/MAINTAINERS
@@ -5,6 +5,7 @@
F: arch/arm/dts/fsl-imx8qm-apalis.dts
F: arch/arm/dts/fsl-imx8qm-apalis-u-boot.dtsi
F: board/toradex/apalis-imx8/
+F: board/toradex/common/
F: configs/apalis-imx8_defconfig
F: doc/board/toradex/apalis-imx8.rst
F: include/configs/apalis-imx8.h
diff --git a/board/toradex/apalis-tk1/MAINTAINERS b/board/toradex/apalis-tk1/MAINTAINERS
index 3c908e1..e2c6f63 100644
--- a/board/toradex/apalis-tk1/MAINTAINERS
+++ b/board/toradex/apalis-tk1/MAINTAINERS
@@ -2,6 +2,7 @@
M: Marcel Ziswiler <marcel.ziswiler@toradex.com>
S: Maintained
F: board/toradex/apalis-tk1/
+F: board/toradex/common/
F: include/configs/apalis-tk1.h
F: configs/apalis-tk1_defconfig
F: arch/arm/dts/tegra124-apalis.dtb
diff --git a/board/toradex/apalis_imx6/MAINTAINERS b/board/toradex/apalis_imx6/MAINTAINERS
index 9c36ae1..0b2907b 100644
--- a/board/toradex/apalis_imx6/MAINTAINERS
+++ b/board/toradex/apalis_imx6/MAINTAINERS
@@ -7,5 +7,6 @@
F: arch/arm/dts/imx6q-apalis-eval-u-boot.dtsi
F: arch/arm/dts/imx6qdl-apalis.dtsi
F: board/toradex/apalis_imx6/
+F: board/toradex/common/
F: configs/apalis_imx6_defconfig
F: include/configs/apalis_imx6.h
diff --git a/board/toradex/apalis_t30/MAINTAINERS b/board/toradex/apalis_t30/MAINTAINERS
index 01bc73e..097db7d 100644
--- a/board/toradex/apalis_t30/MAINTAINERS
+++ b/board/toradex/apalis_t30/MAINTAINERS
@@ -2,6 +2,7 @@
M: Marcel Ziswiler <marcel.ziswiler@toradex.com>
S: Maintained
F: board/toradex/apalis_t30/
+F: board/toradex/common/
F: include/configs/apalis_t30.h
F: configs/apalis_t30_defconfig
F: arch/arm/dts/tegra30-apalis.dtb
diff --git a/board/toradex/colibri-imx6ull/MAINTAINERS b/board/toradex/colibri-imx6ull/MAINTAINERS
index 37c485a..ee6fe6c 100644
--- a/board/toradex/colibri-imx6ull/MAINTAINERS
+++ b/board/toradex/colibri-imx6ull/MAINTAINERS
@@ -11,6 +11,7 @@
F: arch/arm/dts/imx6ull-colibri-nonwifi.dtsi
F: arch/arm/dts/imx6ull-colibri-u-boot.dtsi
F: board/toradex/colibri-imx6ull/
+F: board/toradex/common/
F: configs/colibri-imx6ull_defconfig
F: configs/colibri-imx6ull-emmc_defconfig
F: include/configs/colibri-imx6ull.h
diff --git a/board/toradex/colibri-imx8x/MAINTAINERS b/board/toradex/colibri-imx8x/MAINTAINERS
index de62f87..8c9bf1f 100644
--- a/board/toradex/colibri-imx8x/MAINTAINERS
+++ b/board/toradex/colibri-imx8x/MAINTAINERS
@@ -5,6 +5,7 @@
F: arch/arm/dts/fsl-imx8x-colibri.dts
F: arch/arm/dts/fsl-imx8x-colibri-u-boot.dtsi
F: board/toradex/colibri-imx8x/
+F: board/toradex/common/
F: configs/colibri-imx8x_defconfig
F: doc/board/toradex/colibri-imx8x.rst
F: include/configs/colibri-imx8x.h
diff --git a/board/toradex/colibri_imx6/MAINTAINERS b/board/toradex/colibri_imx6/MAINTAINERS
index f7a5ad5..25d3a06 100644
--- a/board/toradex/colibri_imx6/MAINTAINERS
+++ b/board/toradex/colibri_imx6/MAINTAINERS
@@ -4,6 +4,7 @@
W: https://www.toradex.com/community
S: Maintained
F: board/toradex/colibri_imx6/
+F: board/toradex/common/
F: include/configs/colibri_imx6.h
F: configs/colibri_imx6_defconfig
F: arch/arm/dts/imx6dl-colibri-eval-v3.dts
diff --git a/board/toradex/colibri_imx7/MAINTAINERS b/board/toradex/colibri_imx7/MAINTAINERS
index 513679a..e4583d5 100644
--- a/board/toradex/colibri_imx7/MAINTAINERS
+++ b/board/toradex/colibri_imx7/MAINTAINERS
@@ -10,6 +10,7 @@
F: arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts
F: arch/arm/boot/dts/imx7d-colibri-eval-v3.dts
F: board/toradex/colibri_imx7/
+F: board/toradex/common/
F: configs/colibri_imx7_defconfig
F: configs/colibri_imx7_emmc_defconfig
F: doc/board/toradex/colibri_imx7.rst
diff --git a/board/toradex/colibri_t20/MAINTAINERS b/board/toradex/colibri_t20/MAINTAINERS
index 77c2fc3..d0c5b11 100644
--- a/board/toradex/colibri_t20/MAINTAINERS
+++ b/board/toradex/colibri_t20/MAINTAINERS
@@ -2,6 +2,7 @@
M: Marcel Ziswiler <marcel.ziswiler@toradex.com>
S: Maintained
F: board/toradex/colibri_t20/
+F: board/toradex/common/
F: include/configs/colibri_t20.h
F: configs/colibri_t20_defconfig
F: arch/arm/dts/tegra20-colibri.dtb
diff --git a/board/toradex/colibri_t30/MAINTAINERS b/board/toradex/colibri_t30/MAINTAINERS
index c2d6587..006a0e5 100644
--- a/board/toradex/colibri_t30/MAINTAINERS
+++ b/board/toradex/colibri_t30/MAINTAINERS
@@ -2,6 +2,7 @@
M: Marcel Ziswiler <marcel.ziswiler@toradex.com>
S: Maintained
F: board/toradex/colibri_t30/
+F: board/toradex/common/
F: include/configs/colibri_t30.h
F: configs/colibri_t30_defconfig
F: arch/arm/dts/tegra30-colibri.dtb
diff --git a/board/toradex/colibri_vf/MAINTAINERS b/board/toradex/colibri_vf/MAINTAINERS
index f821a33..2e1a74c 100644
--- a/board/toradex/colibri_vf/MAINTAINERS
+++ b/board/toradex/colibri_vf/MAINTAINERS
@@ -8,5 +8,6 @@
F: arch/arm/dts/vf610-colibri-eval-v3-u-boot.dtsi
F: arch/arm/dts/vf610-colibri.dts
F: board/toradex/colibri_vf/
+F: board/toradex/common/
F: configs/colibri_vf_defconfig
F: include/configs/colibri_vf.h
diff --git a/board/toradex/verdin-imx8mm/MAINTAINERS b/board/toradex/verdin-imx8mm/MAINTAINERS
index b0f4329..8217bbc 100644
--- a/board/toradex/verdin-imx8mm/MAINTAINERS
+++ b/board/toradex/verdin-imx8mm/MAINTAINERS
@@ -8,6 +8,7 @@
F: arch/arm/dts/imx8mm-verdin-wifi-dev.dts
F: arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi
F: board/toradex/verdin-imx8mm/
+F: board/toradex/common/
F: configs/verdin-imx8mm_defconfig
F: doc/board/toradex/verdin-imx8mm.rst
F: include/configs/verdin-imx8mm.h
diff --git a/board/toradex/verdin-imx8mp/MAINTAINERS b/board/toradex/verdin-imx8mp/MAINTAINERS
index ea04a83..85d6be8 100644
--- a/board/toradex/verdin-imx8mp/MAINTAINERS
+++ b/board/toradex/verdin-imx8mp/MAINTAINERS
@@ -5,6 +5,7 @@
F: arch/arm/dts/imx8mp-verdin-wifi-dev.dts
F: arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi
F: board/toradex/verdin-imx8mp/
+F: board/toradex/common/
F: configs/verdin-imx8mp_defconfig
F: doc/board/toradex/verdin-imx8mp.rst
F: include/configs/verdin-imx8mp.h
diff --git a/board/vamrs/rock960_rk3399/MAINTAINERS b/board/vamrs/rock960_rk3399/MAINTAINERS
index 5ee5256..8821672 100644
--- a/board/vamrs/rock960_rk3399/MAINTAINERS
+++ b/board/vamrs/rock960_rk3399/MAINTAINERS
@@ -1,7 +1,7 @@
ROCK960-RK3399
M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
S: Maintained
-F: board/rockchip/rock960_rk3399
+F: board/vamrs/rock960_rk3399/
F: include/configs/rock960_rk3399.h
F: configs/rock960-rk3399_defconfig
diff --git a/board/xes/common/Makefile b/board/xes/common/Makefile
deleted file mode 100644
index b00accc..0000000
--- a/board/xes/common/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-
-obj-$(CONFIG_MPC86xx) += fsl_8xxx_clk.o
-obj-$(CONFIG_ARCH_P2020) += fsl_8xxx_clk.o
-obj-$(CONFIG_MPC85xx) += fsl_8xxx_misc.o board.o
-obj-$(CONFIG_MPC86xx) += fsl_8xxx_misc.o board.o
diff --git a/board/xes/common/board.c b/board/xes/common/board.c
deleted file mode 100644
index 053b07a..0000000
--- a/board/xes/common/board.c
+++ /dev/null
@@ -1,67 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2009 Extreme Engineering Solutions, Inc.
- */
-
-#include <common.h>
-#include <env.h>
-#include "fsl_8xxx_misc.h"
-#include <init.h>
-
-int checkboard(void)
-{
- char name[] = CONFIG_SYS_BOARD_NAME;
- char buf[64];
- char *s;
- int i;
-
-#ifdef CONFIG_SYS_FORM_CUSTOM
- s = "Custom";
-#elif CONFIG_SYS_FORM_6U_CPCI
- s = "6U CompactPCI";
-#elif CONFIG_SYS_FORM_ATCA_PMC
- s = "ATCA w/PMC";
-#elif CONFIG_SYS_FORM_ATCA_AMC
- s = "ATCA w/AMC";
-#elif CONFIG_SYS_FORM_VME
- s = "VME";
-#elif CONFIG_SYS_FORM_6U_VPX
- s = "6U VPX";
-#elif CONFIG_SYS_FORM_PMC
- s = "PMC";
-#elif CONFIG_SYS_FORM_PCI
- s = "PCI";
-#elif CONFIG_SYS_FORM_3U_CPCI
- s = "3U CompactPCI";
-#elif CONFIG_SYS_FORM_AMC
- s = "AdvancedMC";
-#elif CONFIG_SYS_FORM_XMC
- s = "XMC";
-#elif CONFIG_SYS_FORM_PMC_XMC
- s = "PMC/XMC";
-#elif CONFIG_SYS_FORM_PCI_EXPRESS
- s = "PCI Express";
-#elif CONFIG_SYS_FORM_3U_VPX
- s = "3U VPX";
-#else
-#error "Form factor not defined"
-#endif
-
- name[strlen(name) - 1] += get_board_derivative();
- printf("Board: X-ES %s %s SBC\n", name, s);
-
- /* Display board specific information */
- puts(" ");
- i = env_get_f("board_rev", buf, sizeof(buf));
- if (i > 0)
- printf("Rev %s, ", buf);
- i = env_get_f("serial#", buf, sizeof(buf));
- if (i > 0)
- printf("Serial# %s, ", buf);
- i = env_get_f("board_cfg", buf, sizeof(buf));
- if (i > 0)
- printf("Cfg %s", buf);
- puts("\n");
-
- return 0;
-}
diff --git a/board/xes/common/fsl_8xxx_clk.c b/board/xes/common/fsl_8xxx_clk.c
deleted file mode 100644
index c36b2af..0000000
--- a/board/xes/common/fsl_8xxx_clk.c
+++ /dev/null
@@ -1,54 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- */
-
-#include <common.h>
-#include <clock_legacy.h>
-#include <asm/io.h>
-
-/*
- * Return SYSCLK input frequency - 50 MHz or 66 MHz depending on POR config
- */
-unsigned long get_board_sys_clk(void)
-{
-#if defined(CONFIG_MPC85xx)
- volatile ccsr_gur_t *gur = (void *)(CFG_SYS_MPC85xx_GUTS_ADDR);
-#elif defined(CONFIG_MPC86xx)
- immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
- volatile ccsr_gur_t *gur = &immap->im_gur;
-#endif
-
- if (in_be32(&gur->gpporcr) & 0x10000)
- return 66666666;
- else
-#ifdef CONFIG_ARCH_P2020
- return 100000000;
-#else
- return 50000000;
-#endif
-}
-
-#ifdef CONFIG_MPC85xx
-/*
- * Return DDR input clock - synchronous with SYSCLK or 66 MHz
- * Note: 86xx doesn't support asynchronous DDR clk
- */
-unsigned long get_board_ddr_clk(void)
-{
- volatile ccsr_gur_t *gur = (void *)(CFG_SYS_MPC85xx_GUTS_ADDR);
- u32 ddr_ratio = (in_be32(&gur->porpllsr) & 0x00003e00) >> 9;
-
- if (ddr_ratio == 0x7)
- return get_board_sys_clk();
-
-#ifdef CONFIG_ARCH_P2020
- if (in_be32(&gur->gpporcr) & 0x20000)
- return 66666666;
- else
- return 100000000;
-#else
- return 66666666;
-#endif
-}
-#endif
diff --git a/board/xes/common/fsl_8xxx_misc.c b/board/xes/common/fsl_8xxx_misc.c
deleted file mode 100644
index bc7e5c5..0000000
--- a/board/xes/common/fsl_8xxx_misc.c
+++ /dev/null
@@ -1,43 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- */
-
-#include <common.h>
-#include <asm/mmu.h>
-#ifdef CONFIG_PCA953X
-#include <pca953x.h>
-
-/*
- * Determine if a board's flashes are write protected
- */
-int board_flash_wp_on(void)
-{
- if (pca953x_get_val(CFG_SYS_I2C_PCA953X_ADDR0) &
- CONFIG_SYS_PCA953X_NVM_WP)
- return 1;
-
- return 0;
-}
-#endif
-
-/*
- * Return a board's derivative model number. For example:
- * return 2 for the XPedite5372 and return 1 for the XPedite5201.
- */
-uint get_board_derivative(void)
-{
-#if defined(CONFIG_MPC85xx)
- volatile ccsr_gur_t *gur = (void *)CFG_SYS_MPC85xx_GUTS_ADDR;
-#elif defined(CONFIG_MPC86xx)
- volatile immap_t *immap = (immap_t *)CFG_SYS_CCSRBAR;
- volatile ccsr_gur_t *gur = &immap->im_gur;
-#endif
-
- /*
- * The top 4 lines of the local bus address are pulled low/high and
- * can be read to determine the least significant digit of a board's
- * model number.
- */
- return gur->gpporcr >> 28;
-}
diff --git a/board/xes/common/fsl_8xxx_misc.h b/board/xes/common/fsl_8xxx_misc.h
deleted file mode 100644
index 6e4858f..0000000
--- a/board/xes/common/fsl_8xxx_misc.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright 2008 Extreme Engineering Solutions, Inc.
- */
-
-#ifndef __FSL_8XXX_MISC_H___
-#define __FSL_8XXX_MISC_H___
-
-uint get_board_derivative(void);
-
-#endif /* __FSL_8XXX_MISC_H__ */
diff --git a/board/xilinx/common/Makefile b/board/xilinx/common/Makefile
index cdc3c96..d563290 100644
--- a/board/xilinx/common/Makefile
+++ b/board/xilinx/common/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
#
# (C) Copyright 2020 Xilinx, Inc.
-# Michal Simek <michal.simek@xilinx.com>
+# Michal Simek <michal.simek@amd.com>
#
obj-y += board.o
diff --git a/board/xilinx/common/board.h b/board/xilinx/common/board.h
index 922c9d5..64d6576 100644
--- a/board/xilinx/common/board.h
+++ b/board/xilinx/common/board.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* (C) Copyright 2020 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#ifndef _BOARD_XILINX_COMMON_BOARD_H
diff --git a/board/xilinx/common/cpu-info.c b/board/xilinx/common/cpu-info.c
index 4eccc7a..bfe7f5b 100644
--- a/board/xilinx/common/cpu-info.c
+++ b/board/xilinx/common/cpu-info.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 - 2020 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/board/xilinx/common/fru.h b/board/xilinx/common/fru.h
index 586c41b..2b3fa05 100644
--- a/board/xilinx/common/fru.h
+++ b/board/xilinx/common/fru.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2019 Xilinx, Inc.
- * Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#ifndef __FRU_H
diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c
index a68b608..f0d2224 100644
--- a/board/xilinx/versal-net/board.c
+++ b/board/xilinx/versal-net/board.c
@@ -227,15 +227,33 @@
break;
case QSPI_MODE_24BIT:
puts("QSPI_MODE_24\n");
- mode = "xspi0";
+ if (uclass_get_device_by_name(UCLASS_SPI,
+ "spi@f1030000", &dev)) {
+ puts("Boot from QSPI but without QSPI enabled!\n");
+ return -1;
+ }
+ mode = "xspi";
+ bootseq = dev_seq(dev);
break;
case QSPI_MODE_32BIT:
puts("QSPI_MODE_32\n");
- mode = "xspi0";
+ if (uclass_get_device_by_name(UCLASS_SPI,
+ "spi@f1030000", &dev)) {
+ puts("Boot from QSPI but without QSPI enabled!\n");
+ return -1;
+ }
+ mode = "xspi";
+ bootseq = dev_seq(dev);
break;
case OSPI_MODE:
puts("OSPI_MODE\n");
- mode = "xspi0";
+ if (uclass_get_device_by_name(UCLASS_SPI,
+ "spi@f1010000", &dev)) {
+ puts("Boot from OSPI but without OSPI enabled!\n");
+ return -1;
+ }
+ mode = "xspi";
+ bootseq = dev_seq(dev);
break;
case EMMC_MODE:
puts("EMMC_MODE\n");
diff --git a/board/xilinx/versal/Makefile b/board/xilinx/versal/Makefile
index 4a46ca0..d912f2e 100644
--- a/board/xilinx/versal/Makefile
+++ b/board/xilinx/versal/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2016 - 2018 Xilinx, Inc.
-# Michal Simek <michal.simek@xilinx.com>
+# Michal Simek <michal.simek@amd.com>
#
obj-y := board.o
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 81e1b69..60bf37d 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 - 2018 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <command.h>
diff --git a/board/xilinx/versal/cmds.c b/board/xilinx/versal/cmds.c
index 797c1a5..148fa51 100644
--- a/board/xilinx/versal/cmds.c
+++ b/board/xilinx/versal/cmds.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/*
* (C) Copyright 2020 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <cpu_func.h>
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 9a59445..3b6581e 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <debug_uart.h>
+#include <dfu.h>
#include <init.h>
#include <log.h>
#include <dm/uclass.h>
diff --git a/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c b/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c
index c2a6f91..602a789 100644
--- a/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c
+++ b/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c
@@ -12408,7 +12408,7 @@
unsigned long *ps7_peripherals_init_data = ps7_peripherals_init_data_3_0;
int
-ps7_post_config()
+ps7_post_config(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
@@ -12427,7 +12427,7 @@
}
int
-ps7_init()
+ps7_init(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
diff --git a/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c
index fd102a3..9343683 100644
--- a/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c
+++ b/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c
@@ -12741,7 +12741,7 @@
unsigned long *ps7_peripherals_init_data = ps7_peripherals_init_data_3_0;
int
-ps7_post_config()
+ps7_post_config(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
@@ -12760,7 +12760,7 @@
}
int
-ps7_init()
+ps7_init(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
diff --git a/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c
index 796e5b0..6b153aa 100644
--- a/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c
+++ b/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c
@@ -12648,7 +12648,7 @@
unsigned long *ps7_peripherals_init_data = ps7_peripherals_init_data_3_0;
int
-ps7_post_config()
+ps7_post_config(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
@@ -12667,7 +12667,7 @@
}
int
-ps7_init()
+ps7_init(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
diff --git a/board/xilinx/zynq/zynq-zed/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zed/ps7_init_gpl.c
index baf89a5..6f2edf1 100644
--- a/board/xilinx/zynq/zynq-zed/ps7_init_gpl.c
+++ b/board/xilinx/zynq/zynq-zed/ps7_init_gpl.c
@@ -12306,7 +12306,7 @@
unsigned long *ps7_peripherals_init_data = ps7_peripherals_init_data_3_0;
int
-ps7_post_config()
+ps7_post_config(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
@@ -12325,7 +12325,7 @@
}
int
-ps7_init()
+ps7_init(void)
{
// Get the PS_VERSION on run time
unsigned long si_ver = ps7GetSiliconVersion ();
diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile
index 732f909..204e4fa 100644
--- a/board/xilinx/zynqmp/Makefile
+++ b/board/xilinx/zynqmp/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2014 - 2016 Xilinx, Inc.
-# Michal Simek <michal.simek@xilinx.com>
+# Michal Simek <michal.simek@amd.com>
obj-y := zynqmp.o
diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c
index dd1ad66..ea404d5 100644
--- a/board/xilinx/zynqmp/cmds.c
+++ b/board/xilinx/zynqmp/cmds.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/*
* (C) Copyright 2018 Xilinx, Inc.
- * Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#include <common.h>
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 39da96b..309f24a 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
diff --git a/boot/Kconfig b/boot/Kconfig
index b424265..e8fb03b 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -125,8 +125,7 @@
config FIT_IMAGE_POST_PROCESS
bool "Enable post-processing of FIT artifacts after loading by U-Boot"
depends on FIT
- depends on TI_SECURE_DEVICE || SOCFPGA_SECURE_VAB_AUTH
- default y if TI_SECURE_DEVICE
+ depends on SOCFPGA_SECURE_VAB_AUTH
help
Allows doing any sort of manipulation to blobs after they got extracted
from FIT images like stripping off headers or modifying the size of the
diff --git a/boot/bootmeth_script.c b/boot/bootmeth_script.c
index 225eb18..a4050c3 100644
--- a/boot/bootmeth_script.c
+++ b/boot/bootmeth_script.c
@@ -190,7 +190,10 @@
ulong addr;
int ret;
- ret = env_set("devtype", blk_get_devtype(bflow->blk));
+ if (desc->uclass_id == UCLASS_USB)
+ ret = env_set("devtype", "usb");
+ else
+ ret = env_set("devtype", blk_get_devtype(bflow->blk));
if (!ret)
ret = env_set_hex("devnum", desc->devnum);
if (!ret)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index ecfd575..2d6e5f9 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -2005,6 +2005,7 @@
config CMD_BMP
bool "Enable 'bmp' command"
depends on VIDEO
+ select BMP
help
This provides a way to obtain information about a BMP-format image
and to display it. BMP (which presumably stands for BitMaP) is a
diff --git a/cmd/load.c b/cmd/load.c
index 5c4f347..2715cf5 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -181,13 +181,17 @@
} else
#endif
{
+ void *dst;
+
ret = lmb_reserve(&lmb, store_addr, binlen);
if (ret) {
printf("\nCannot overwrite reserved area (%08lx..%08lx)\n",
store_addr, store_addr + binlen);
return ret;
}
- memcpy((char *)(store_addr), binbuf, binlen);
+ dst = map_sysmem(store_addr, binlen);
+ memcpy(dst, binbuf, binlen);
+ unmap_sysmem(dst);
lmb_free(&lmb, store_addr, binlen);
}
if ((store_addr) < start_addr)
@@ -350,15 +354,19 @@
if(write_record(SREC3_START)) /* write the header */
return (-1);
do {
- if(count) { /* collect hex data in the buffer */
- c = *(volatile uchar*)(address + reclen); /* get one byte */
- checksum += c; /* accumulate checksum */
+ volatile uchar *src;
+
+ src = map_sysmem(address, count);
+ if (count) { /* collect hex data in the buffer */
+ c = src[reclen]; /* get one byte */
+ checksum += c; /* accumulate checksum */
data[2*reclen] = hex[(c>>4)&0x0f];
data[2*reclen+1] = hex[c & 0x0f];
data[2*reclen+2] = '\0';
++reclen;
--count;
}
+ unmap_sysmem((void *)src);
if(reclen == SREC_BYTES_PER_RECORD || count == 0) {
/* enough data collected for one record: dump it */
if(reclen) { /* build & write a data record: */
diff --git a/common/Kconfig b/common/Kconfig
index f5ad63c..973482f 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1167,7 +1167,6 @@
config BMP
bool "Enable bmp image display"
- default y if CMD_BMP
help
Enable bmp functions to display bmp image and get bmp info.
diff --git a/common/board_f.c b/common/board_f.c
index e5969ec..7d2c380 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -411,7 +411,16 @@
static int reserve_video(void)
{
- if (IS_ENABLED(CONFIG_VIDEO)) {
+ if (IS_ENABLED(CONFIG_SPL_VIDEO) && spl_phase() > PHASE_SPL &&
+ CONFIG_IS_ENABLED(BLOBLIST)) {
+ struct video_handoff *ho;
+
+ ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho));
+ if (!ho)
+ return log_msg_ret("blf", -ENOENT);
+ video_reserve_from_bloblist(ho);
+ gd->relocaddr = ho->fb;
+ } else if (CONFIG_IS_ENABLED(VIDEO)) {
ulong addr;
int ret;
diff --git a/common/event.c b/common/event.c
index 164c95f..20720c5 100644
--- a/common/event.c
+++ b/common/event.c
@@ -36,6 +36,9 @@
/* init hooks */
"misc_init_f",
+ /* Fpga load hook */
+ "fpga_load",
+
/* fdt hooks */
"ft_fixup",
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d74acec..f09bb97 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -891,18 +891,18 @@
debug("Failed to stash bootstage: err=%d\n", ret);
#endif
-#if defined(CONFIG_SPL_VIDEO)
- struct udevice *dev;
- int rc;
+ if (IS_ENABLED(CONFIG_SPL_VIDEO_REMOVE)) {
+ struct udevice *dev;
+ int rc;
- rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
- if (!rc && dev) {
- rc = device_remove(dev, DM_REMOVE_NORMAL);
- if (rc)
- printf("Cannot remove video device '%s' (err=%d)\n",
- dev->name, rc);
+ rc = uclass_find_device(UCLASS_VIDEO, 0, &dev);
+ if (!rc && dev) {
+ rc = device_remove(dev, DM_REMOVE_NORMAL);
+ if (rc)
+ printf("Cannot remove video device '%s' (err=%d)\n",
+ dev->name, rc);
+ }
}
-#endif
spl_board_prepare_for_boot();
jump_to_image_no_args(&spl_image);
@@ -992,6 +992,7 @@
#endif
/* Get stack position: use 8-byte alignment for ABI compliance */
ptr = CONFIG_SPL_STACK_R_ADDR - roundup(sizeof(gd_t),16);
+ gd->start_addr_sp = ptr;
new_gd = (gd_t *)ptr;
memcpy(new_gd, (void *)gd, sizeof(gd_t));
#if CONFIG_IS_ENABLED(DM)
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 8139a20..93cf420 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -6,7 +6,7 @@
* (C) Copyright 2016
* Toradex AG
*
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
* Stefan Agner <stefan.agner@toradex.com>
*/
#include <common.h>
diff --git a/common/splash_source.c b/common/splash_source.c
index a260137..7223a1a 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -363,7 +363,7 @@
if (res < 0)
return res;
- img_header = (struct legacy_img_hdr *)bmp_load_addr;
+ img_header = (struct legacy_img_hdr *)(uintptr_t)bmp_load_addr;
if (image_get_magic(img_header) != FDT_MAGIC) {
printf("Could not find FDT magic\n");
return -EINVAL;
@@ -373,7 +373,7 @@
/* Read in entire FIT */
fit_header = (const u32 *)(bmp_load_addr + header_size);
- res = splash_storage_read_raw(location, (u32)fit_header, fit_size);
+ res = splash_storage_read_raw(location, (uintptr_t)fit_header, fit_size);
if (res < 0)
return res;
@@ -398,7 +398,7 @@
/* Extract the splash data from FIT */
/* 1. Test if splash is in FIT internal data. */
if (!fit_image_get_data(fit_header, node_offset, &internal_splash_data, &internal_splash_size))
- memmove((void *)bmp_load_addr, internal_splash_data, internal_splash_size);
+ memmove((void *)(uintptr_t)bmp_load_addr, internal_splash_data, internal_splash_size);
/* 2. Test if splash is in FIT external data with fixed position. */
else if (!fit_image_get_data_position(fit_header, node_offset, &external_splash_addr))
is_splash_external = true;
diff --git a/configs/M5208EVBE_defconfig b/configs/M5208EVBE_defconfig
index 0c5afe8..aa054f7 100644
--- a/configs/M5208EVBE_defconfig
+++ b/configs/M5208EVBE_defconfig
@@ -50,3 +50,5 @@
CONFIG_MII=y
CONFIG_MCFUART=y
CONFIG_WATCHDOG_TIMEOUT_MSECS=5000
+CONFIG_WDT=y
+CONFIG_WDT_MCF=y
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig
index 1e93439..a3a4ab3 100644
--- a/configs/am335x_hs_evm_defconfig
+++ b/configs/am335x_hs_evm_defconfig
@@ -37,7 +37,6 @@
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_NAND=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_BOOTP_DNS2=y
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT="nand0=nand.0"
diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig
index 466b12e..01428ac 100644
--- a/configs/am43xx_hs_evm_defconfig
+++ b/configs/am43xx_hs_evm_defconfig
@@ -38,7 +38,6 @@
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_NAND=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_BOOTP_DNS2=y
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT="nand0=nand.0"
diff --git a/configs/am43xx_hs_evm_qspi_defconfig b/configs/am43xx_hs_evm_qspi_defconfig
index ad6ce2b..54051ca 100644
--- a/configs/am43xx_hs_evm_qspi_defconfig
+++ b/configs/am43xx_hs_evm_qspi_defconfig
@@ -31,7 +31,6 @@
CONFIG_CMD_MMC=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_BOOTP_DNS2=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_CONTROL=y
diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig
index 1b03848..94ffce1 100644
--- a/configs/am57xx_hs_evm_defconfig
+++ b/configs/am57xx_hs_evm_defconfig
@@ -49,7 +49,6 @@
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_CMD_BCB=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_AB_SELECT=y
CONFIG_BOOTP_DNS2=y
# CONFIG_CMD_PMIC is not set
diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig
index 39fdc05..404e714 100644
--- a/configs/am57xx_hs_evm_usb_defconfig
+++ b/configs/am57xx_hs_evm_usb_defconfig
@@ -52,7 +52,6 @@
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_CMD_BCB=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_AB_SELECT=y
CONFIG_BOOTP_DNS2=y
# CONFIG_CMD_PMIC is not set
diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig
index 76ec5ed..773cf3a 100644
--- a/configs/am62ax_evm_a53_defconfig
+++ b/configs/am62ax_evm_a53_defconfig
@@ -23,6 +23,7 @@
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_DISTRO_DEFAULTS=y
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
CONFIG_SPL_MAX_SIZE=0x58000
CONFIG_SPL_PAD_TO=0x0
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
index 7c3bc18..de90663 100644
--- a/configs/am62x_evm_a53_defconfig
+++ b/configs/am62x_evm_a53_defconfig
@@ -29,8 +29,7 @@
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; setenv fdtfile ti/${name_fdt}; run distro_bootcmd"
-CONFIG_SPL_MAX_SIZE=0x58000
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x80c80000
CONFIG_SPL_BSS_MAX_SIZE=0x80000
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig
index 6485ed1..9bdb767 100644
--- a/configs/am64x_evm_a53_defconfig
+++ b/configs/am64x_evm_a53_defconfig
@@ -14,7 +14,6 @@
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000
CONFIG_ENV_SIZE=0x20000
-CONFIG_ENV_OFFSET=0x680000
CONFIG_DM_GPIO=y
CONFIG_SPL_DM_SPI=y
CONFIG_DEFAULT_DEVICE_TREE="k3-am642-evm"
@@ -33,7 +32,7 @@
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run run_kern"
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
CONFIG_BOARD_LATE_INIT=y
CONFIG_SPL_MAX_SIZE=0x180000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
@@ -62,7 +61,6 @@
CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_SYS_MAXARGS=64
-CONFIG_SYS_BOOTM_LEN=0x800000
CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_DM=y
@@ -79,8 +77,6 @@
CONFIG_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_SYS_MMC_ENV_PART=1
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index c3a2f09..4301553 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -71,7 +71,6 @@
CONFIG_CMD_PCI=y
CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),128k(ospi.env),128k(ospi.env.backup),1m(ospi.sysfw),-@8m(ospi.rootfs)"
diff --git a/configs/am65x_hs_evm_a53_defconfig b/configs/am65x_hs_evm_a53_defconfig
index e0277d4..3f9626e 100644
--- a/configs/am65x_hs_evm_a53_defconfig
+++ b/configs/am65x_hs_evm_a53_defconfig
@@ -69,7 +69,6 @@
CONFIG_CMD_PCI=y
CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),128k(ospi.env),128k(ospi.env.backup),1m(ospi.sysfw),-@8m(ospi.rootfs)"
diff --git a/configs/arbel_evb_defconfig b/configs/arbel_evb_defconfig
index c27a7cd..ce7f235 100644
--- a/configs/arbel_evb_defconfig
+++ b/configs/arbel_evb_defconfig
@@ -1,8 +1,8 @@
CONFIG_ARM=y
CONFIG_ARCH_NPCM=y
+CONFIG_TEXT_BASE=0x06208000
CONFIG_SYS_MALLOC_LEN=0x240000
CONFIG_SYS_MALLOC_F_LEN=0x1000
-CONFIG_TEXT_BASE=0x06208000
CONFIG_NR_DRAM_BANKS=2
CONFIG_ENV_SIZE=0x40000
CONFIG_ENV_OFFSET=0x3C0000
@@ -14,7 +14,7 @@
# CONFIG_PSCI_RESET is not set
CONFIG_ARCH_NPCM8XX=y
CONFIG_TARGET_ARBEL_EVB=y
-CONFIG_SYS_LOAD_ADDR=0x10000000
+CONFIG_SYS_LOAD_ADDR=0x06208000
CONFIG_ENV_ADDR=0x803C0000
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
@@ -23,12 +23,12 @@
CONFIG_HUSH_PARSER=y
CONFIG_SYS_MAXARGS=32
CONFIG_SYS_BOOTM_LEN=0x1400000
-CONFIG_SYS_LOAD_ADDR=0x06208000
-CONFIG_SYS_INIT_SP_ADDR=0x06208000
CONFIG_CMD_FUSE=y
CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
@@ -38,7 +38,9 @@
CONFIG_CMD_RNG=y
CONFIG_CMD_UUID=y
CONFIG_CMD_HASH=y
+CONFIG_CMD_TPM=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
@@ -50,6 +52,7 @@
# CONFIG_INPUT is not set
CONFIG_MISC=y
CONFIG_NPCM_HOST=y
+CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_NPCM=y
CONFIG_DM_SPI_FLASH=y
@@ -68,7 +71,6 @@
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_NPCM8XX=y
CONFIG_RESET_SYSCON=y
-CONFIG_DM_RNG=y
CONFIG_RNG_NPCM=y
CONFIG_DM_SERIAL=y
CONFIG_NPCM_SERIAL=y
@@ -76,8 +78,11 @@
CONFIG_DM_SPI=y
CONFIG_NPCM_FIU_SPI=y
CONFIG_NPCM_PSPI=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_TIMER=y
CONFIG_NPCM_TIMER=y
+CONFIG_TPM2_FTPM_TEE=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_NPCM=y
@@ -87,15 +92,6 @@
CONFIG_USB_OHCI_NPCM=y
CONFIG_USB_STORAGE=y
CONFIG_LIB_HW_RAND=y
+CONFIG_TPM=y
CONFIG_SHA_HW_ACCEL=y
# CONFIG_EFI_LOADER is not set
-CONFIG_TEE=y
-CONFIG_OPTEE=y
-CONFIG_TPM=y
-CONFIG_TPM_V2=y
-CONFIG_TPM2_FTPM_TEE=y
-CONFIG_CMD_TPM=y
-CONFIG_SUPPORT_EMMC_RPMB=y
-CONFIG_CMD_GPT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_CMD_PART=y
diff --git a/configs/astro_mcf5373l_defconfig b/configs/astro_mcf5373l_defconfig
index aade1f9..f4dad3b 100644
--- a/configs/astro_mcf5373l_defconfig
+++ b/configs/astro_mcf5373l_defconfig
@@ -46,5 +46,5 @@
CONFIG_MCFRTC=y
CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
CONFIG_MCFUART=y
-CONFIG_WATCHDOG=y
-CONFIG_WATCHDOG_TIMEOUT_MSECS=3355
+CONFIG_WDT=y
+CONFIG_WDT_MCF=y
diff --git a/configs/chromebook_coral_defconfig b/configs/chromebook_coral_defconfig
index fe61153..152f297 100644
--- a/configs/chromebook_coral_defconfig
+++ b/configs/chromebook_coral_defconfig
@@ -55,7 +55,6 @@
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_TPL_SYS_MALLOC_SIMPLE=y
CONFIG_TPL_POWER=y
-CONFIG_HUSH_PARSER=y
CONFIG_SYS_CBSIZE=1024
CONFIG_SYS_PBSIZE=1024
CONFIG_CMD_CPU=y
diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig
index fc935610..8e11de6 100644
--- a/configs/coreboot_defconfig
+++ b/configs/coreboot_defconfig
@@ -22,7 +22,6 @@
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_LAST_STAGE_INIT=y
CONFIG_PCI_INIT_R=y
-CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
CONFIG_CMD_PART=y
CONFIG_CMD_USB=y
diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig
index d3513b9..c68e52b 100644
--- a/configs/corstone1000_defconfig
+++ b/configs/corstone1000_defconfig
@@ -28,12 +28,10 @@
CONFIG_CMD_BOOTZ=y
CONFIG_SYS_BOOTM_LEN=0x800000
# CONFIG_CMD_XIMG is not set
-CONFIG_CMD_NVMXIP=y
CONFIG_CMD_GPT=y
# CONFIG_RANDOM_UUID is not set
CONFIG_CMD_LOADM=y
# CONFIG_CMD_LOADS is not set
-CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_CACHE=y
@@ -44,8 +42,6 @@
CONFIG_VERSION_VARIABLE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_REGMAP=y
-CONFIG_FWU_MDATA=y
-CONFIG_FWU_MDATA_GPT_BLK=y
CONFIG_MISC=y
# CONFIG_MMC is not set
CONFIG_NVMXIP_QSPI=y
@@ -60,7 +56,7 @@
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_ISP1760=y
+CONFIG_ERRNO_STR=y
CONFIG_EFI_CAPSULE_ON_DISK=y
CONFIG_EFI_IGNORE_OSINDICATIONS=y
CONFIG_FWU_MULTI_BANK_UPDATE=y
-CONFIG_ERRNO_STR=y
diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig
index 24edecb..2873322 100644
--- a/configs/eb_cpu5282_defconfig
+++ b/configs/eb_cpu5282_defconfig
@@ -52,3 +52,4 @@
CONFIG_DM_RTC=y
CONFIG_RTC_DS1338=y
CONFIG_MCFUART=y
+CONFIG_WDT=y
diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig
index 44e22eb..bd78003 100644
--- a/configs/eb_cpu5282_internal_defconfig
+++ b/configs/eb_cpu5282_internal_defconfig
@@ -50,3 +50,4 @@
CONFIG_DM_RTC=y
CONFIG_RTC_DS1338=y
CONFIG_MCFUART=y
+CONFIG_WDT=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index c3d0bc2..f03b59e 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -31,7 +31,6 @@
CONFIG_CMD_UNZIP=y
CONFIG_CMD_I2C=y
# CONFIG_CMD_LOADS is not set
-CONFIG_CMD_SAVES=y
CONFIG_CMD_MMC=y
CONFIG_CMD_NAND=y
CONFIG_CMD_SPI=y
diff --git a/configs/grpeach_defconfig b/configs/grpeach_defconfig
index 8626918..ed38d6e 100644
--- a/configs/grpeach_defconfig
+++ b/configs/grpeach_defconfig
@@ -53,7 +53,6 @@
CONFIG_BITBANGMII=y
CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_SMSC=y
-CONFIG_PHY_ETHERNET_ID=y
CONFIG_DM_ETH_PHY=y
CONFIG_SH_ETHER=y
CONFIG_PINCTRL=y
diff --git a/configs/imx8mm_beacon_fspi_defconfig b/configs/imx8mm_beacon_fspi_defconfig
index 805fd3f..5dc4e14 100644
--- a/configs/imx8mm_beacon_fspi_defconfig
+++ b/configs/imx8mm_beacon_fspi_defconfig
@@ -5,6 +5,8 @@
CONFIG_SPL_GPIO=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SF_DEFAULT_SPEED=40000000
+CONFIG_SF_DEFAULT_MODE=0
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
CONFIG_IMX_CONFIG="board/freescale/imx8mm_evk/imximage-8mm-lpddr4-fspi.cfg"
@@ -13,16 +15,16 @@
CONFIG_SPL_TEXT_BASE=0x7E2000
CONFIG_TARGET_IMX8MM_BEACON=y
CONFIG_SYS_PROMPT="u-boot=> "
+CONFIG_SYS_MONITOR_LEN=524288
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_STACK=0x920000
CONFIG_SPL=y
CONFIG_SYS_LOAD_ADDR=0x40480000
CONFIG_LTO=y
-CONFIG_SYS_MONITOR_LEN=524288
CONFIG_FIT=y
CONFIG_FIT_EXTERNAL_OFFSET=0x3000
CONFIG_SPL_LOAD_FIT=y
-# CONFIG_USE_SPL_FIT_GENERATOR is not set
CONFIG_OF_SYSTEM_SETUP=y
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; fi;"
@@ -34,7 +36,6 @@
CONFIG_SPL_BSS_MAX_SIZE=0x2000
CONFIG_SPL_BOARD_INIT=y
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
-CONFIG_SPL_STACK=0x920000
CONFIG_SYS_SPL_MALLOC=y
CONFIG_HAS_CUSTOM_SPL_MALLOC_START=y
CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x42200000
@@ -45,9 +46,6 @@
CONFIG_SPL_I2C=y
CONFIG_SPL_NOR_SUPPORT=y
CONFIG_SPL_POWER=y
-CONFIG_SPL_USB_HOST=y
-CONFIG_SPL_USB_GADGET=y
-CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_SPL_WATCHDOG=y
CONFIG_HUSH_PARSER=y
CONFIG_SYS_MAXARGS=64
@@ -105,8 +103,6 @@
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_DM_SPI_FLASH=y
-CONFIG_SF_DEFAULT_MODE=0
-CONFIG_SF_DEFAULT_SPEED=40000000
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_MTD=y
@@ -141,15 +137,18 @@
CONFIG_SYSRESET_WATCHDOG=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
+CONFIG_SPL_USB_HOST=y
CONFIG_USB_EHCI_HCD=y
CONFIG_MXC_USB_OTG_HACTIVE=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
+CONFIG_SPL_USB_GADGET=y
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
CONFIG_CI_UDC=y
CONFIG_SDP_LOADADDR=0x40400000
CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_IMX_WATCHDOG=y
CONFIG_FSPI_CONF_HEADER=y
CONFIG_FSPI_CONF_FILE="fspi_header.bin"
diff --git a/configs/imx8mn_beacon_2g_defconfig b/configs/imx8mn_beacon_2g_defconfig
index 00e7cd0..fab3ab1 100644
--- a/configs/imx8mn_beacon_2g_defconfig
+++ b/configs/imx8mn_beacon_2g_defconfig
@@ -5,8 +5,8 @@
CONFIG_SPL_GPIO=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_ENV_SOURCE_FILE="imx8mn_beacon"
CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SOURCE_FILE="imx8mn_beacon"
CONFIG_SF_DEFAULT_SPEED=40000000
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
diff --git a/configs/imx8mn_beacon_defconfig b/configs/imx8mn_beacon_defconfig
index d9a413f..f810d4b 100644
--- a/configs/imx8mn_beacon_defconfig
+++ b/configs/imx8mn_beacon_defconfig
@@ -5,8 +5,8 @@
CONFIG_SPL_GPIO=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_ENV_SOURCE_FILE="imx8mn_beacon"
CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SOURCE_FILE="imx8mn_beacon"
CONFIG_SF_DEFAULT_SPEED=40000000
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
diff --git a/configs/imx8mn_beacon_fspi_defconfig b/configs/imx8mn_beacon_fspi_defconfig
index 6c626ae..8705d9b 100644
--- a/configs/imx8mn_beacon_fspi_defconfig
+++ b/configs/imx8mn_beacon_fspi_defconfig
@@ -5,8 +5,8 @@
CONFIG_SPL_GPIO=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_ENV_SOURCE_FILE="imx8mn_beacon"
CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SOURCE_FILE="imx8mn_beacon"
CONFIG_SF_DEFAULT_SPEED=40000000
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFDE00
diff --git a/configs/imx8mp_beacon_defconfig b/configs/imx8mp_beacon_defconfig
index 77a10b9..2570eb6 100644
--- a/configs/imx8mp_beacon_defconfig
+++ b/configs/imx8mp_beacon_defconfig
@@ -18,7 +18,6 @@
CONFIG_TARGET_IMX8MP_BEACON=y
CONFIG_SYS_PROMPT="u-boot=> "
CONFIG_SYS_MONITOR_LEN=524288
-CONFIG_LTO=y
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
@@ -35,6 +34,7 @@
CONFIG_ARMV8_EA_EL3_FIRST=y
CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
CONFIG_SYS_LOAD_ADDR=0x40480000
+CONFIG_LTO=y
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_FIT=y
CONFIG_FIT_EXTERNAL_OFFSET=0x3000
diff --git a/configs/imxrt1170-evk_defconfig b/configs/imxrt1170-evk_defconfig
index 0030733..c12ab1e 100644
--- a/configs/imxrt1170-evk_defconfig
+++ b/configs/imxrt1170-evk_defconfig
@@ -24,7 +24,6 @@
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SD_BOOT=y
# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_NO_BSS_LIMIT=y
CONFIG_SPL_BOARD_INIT=y
diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig
index cc68a21..c68d525 100644
--- a/configs/j7200_evm_a72_defconfig
+++ b/configs/j7200_evm_a72_defconfig
@@ -12,7 +12,6 @@
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000
CONFIG_ENV_SIZE=0x20000
-CONFIG_ENV_OFFSET=0x680000
CONFIG_DM_GPIO=y
CONFIG_SPL_DM_SPI=y
CONFIG_DEFAULT_DEVICE_TREE="k3-j7200-common-proc-board"
@@ -23,7 +22,6 @@
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_ENV_OFFSET_REDUND=0x6A0000
CONFIG_SPL_FS_FAT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
@@ -35,7 +33,7 @@
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;"
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
CONFIG_LOGLEVEL=7
CONFIG_SPL_MAX_SIZE=0xc0000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
@@ -78,7 +76,6 @@
CONFIG_CMD_UFS=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
@@ -90,8 +87,6 @@
CONFIG_SPL_OF_CONTROL=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_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 32ac47c..525f150 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -33,7 +33,7 @@
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;"
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
CONFIG_LOGLEVEL=7
CONFIG_SPL_MAX_SIZE=0xc0000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
@@ -76,7 +76,6 @@
CONFIG_CMD_UFS=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
@@ -91,11 +90,7 @@
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_NOWHERE=y
-CONFIG_ENV_IS_IN_FAT=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
-CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig
index 37c1fde..d59f315 100644
--- a/configs/j721s2_evm_a72_defconfig
+++ b/configs/j721s2_evm_a72_defconfig
@@ -32,7 +32,7 @@
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;"
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
CONFIG_LOGLEVEL=7
CONFIG_SPL_MAX_SIZE=0xc0000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
@@ -76,7 +76,6 @@
CONFIG_CMD_UFS=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
-# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
@@ -89,10 +88,7 @@
CONFIG_OF_LIST="k3-j721s2-common-proc-board k3-am68-sk-base-board"
CONFIG_SPL_MULTI_DTB_FIT=y
CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
-CONFIG_ENV_OVERWRITE=y
-CONFIG_ENV_IS_IN_FAT=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
-CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
diff --git a/configs/mvebu_ac5_rd_defconfig b/configs/mvebu_ac5_rd_defconfig
index 0a4c218..dbf1e31 100644
--- a/configs/mvebu_ac5_rd_defconfig
+++ b/configs/mvebu_ac5_rd_defconfig
@@ -18,7 +18,6 @@
CONFIG_FIT=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTDELAY=-1
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_CMD_BOOTZ=y
diff --git a/configs/mx23_olinuxino_defconfig b/configs/mx23_olinuxino_defconfig
index 24968e1..335de62 100644
--- a/configs/mx23_olinuxino_defconfig
+++ b/configs/mx23_olinuxino_defconfig
@@ -14,7 +14,6 @@
CONFIG_SPL_SERIAL=y
CONFIG_SPL=y
CONFIG_SYS_LOAD_ADDR=0x42000000
-# CONFIG_SYS_MALLOC_F is not set
CONFIG_BOOTDELAY=3
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi"
diff --git a/configs/orangepi_zero2_defconfig b/configs/orangepi_zero2_defconfig
index 6cb942f..f13735e 100644
--- a/configs/orangepi_zero2_defconfig
+++ b/configs/orangepi_zero2_defconfig
@@ -7,6 +7,7 @@
CONFIG_DRAM_SUN50I_H616_CA_DRI=0x0e0e
CONFIG_DRAM_SUN50I_H616_TPR10=0xf83438
CONFIG_MACH_SUN50I_H616=y
+CONFIG_SUNXI_DRAM_H616_DDR3_1333=y
CONFIG_R_I2C_ENABLE=y
CONFIG_SPL_SPI_SUNXI=y
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -19,3 +20,6 @@
CONFIG_PHY_REALTEK=y
CONFIG_SUN8I_EMAC=y
CONFIG_SPI=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_MUSB_GADGET=y
diff --git a/configs/poleg_evb_defconfig b/configs/poleg_evb_defconfig
index cab589d..1eb3396 100644
--- a/configs/poleg_evb_defconfig
+++ b/configs/poleg_evb_defconfig
@@ -18,6 +18,7 @@
CONFIG_TARGET_POLEG=y
CONFIG_SYS_LOAD_ADDR=0x10000000
CONFIG_ENV_ADDR=0x80100000
+CONFIG_FIT=y
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="run common_bootargs; run romboot"
CONFIG_SYS_MAXARGS=32
@@ -101,7 +102,5 @@
# CONFIG_WATCHDOG is not set
CONFIG_WDT_NPCM=y
CONFIG_LIB_HW_RAND=y
-CONFIG_SHA_HW_ACCEL=y
-CONFIG_FIT=y
-CONFIG_SHA256=y
CONFIG_SHA512=y
+CONFIG_SHA_HW_ACCEL=y
diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig
index 4a15c51..9cf38a5 100644
--- a/configs/qemu-x86_64_defconfig
+++ b/configs/qemu-x86_64_defconfig
@@ -21,8 +21,8 @@
CONFIG_FIT=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_BOOTSTD_FULL=y
-CONFIG_SYS_MONITOR_BASE=0x01110000
CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_SYS_MONITOR_BASE=0x01110000
CONFIG_BOOTSTAGE=y
CONFIG_BOOTSTAGE_REPORT=y
CONFIG_SHOW_BOOT_PROGRESS=y
@@ -85,7 +85,6 @@
CONFIG_SPI=y
CONFIG_USB_KEYBOARD=y
CONFIG_CONSOLE_SCROLL_LINES=5
-CONFIG_FAT_BLK_XLATE=y
# CONFIG_SPL_USE_TINY_PRINTF is not set
CONFIG_GENERATE_ACPI_TABLE=y
# CONFIG_GZIP is not set
diff --git a/configs/r8a77970_v3msk_defconfig b/configs/r8a77970_v3msk_defconfig
index 74a140a..e26607a 100644
--- a/configs/r8a77970_v3msk_defconfig
+++ b/configs/r8a77970_v3msk_defconfig
@@ -14,14 +14,14 @@
CONFIG_RCAR_GEN3=y
CONFIG_R8A77970=y
CONFIG_TARGET_V3MSK=y
+CONFIG_SYS_MONITOR_LEN=1048576
CONFIG_SPL_STACK=0xe6304000
CONFIG_SYS_LOAD_ADDR=0x58000000
CONFIG_LTO=y
CONFIG_REMAKE_ELF=y
-CONFIG_SYS_MONITOR_LEN=1048576
CONFIG_FIT=y
-# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_SUPPORT_RAW_INITRD=y
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_USE_BOOTARGS=y
CONFIG_DEFAULT_FDT_FILE="r8a77970-v3msk.dtb"
CONFIG_SYS_MALLOC_BOOTPARAMS=y
@@ -33,8 +33,8 @@
CONFIG_SYS_MAXARGS=64
CONFIG_SYS_PBSIZE=2068
CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_DFU=y
CONFIG_CMD_ASKENV=y
+CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
diff --git a/configs/r8a77980_v3hsk_defconfig b/configs/r8a77980_v3hsk_defconfig
index 564ff2d..0025c04 100644
--- a/configs/r8a77980_v3hsk_defconfig
+++ b/configs/r8a77980_v3hsk_defconfig
@@ -13,11 +13,11 @@
CONFIG_RCAR_GEN3=y
CONFIG_R8A77980=y
CONFIG_TARGET_V3HSK=y
+CONFIG_SYS_MONITOR_LEN=1048576
CONFIG_SPL_STACK=0xe6304000
CONFIG_SYS_LOAD_ADDR=0x58000000
CONFIG_LTO=y
CONFIG_REMAKE_ELF=y
-CONFIG_SYS_MONITOR_LEN=1048576
CONFIG_FIT=y
CONFIG_SUPPORT_RAW_INITRD=y
CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig
index 185694d..9456b9e 100644
--- a/configs/sama5d2_icp_mmc_defconfig
+++ b/configs/sama5d2_icp_mmc_defconfig
@@ -27,6 +27,7 @@
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SYS_LOAD_ADDR=0x22000000
CONFIG_DEBUG_UART=y
+CONFIG_LTO=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_FIT=y
CONFIG_SD_BOOT=y
diff --git a/configs/sama5d2_xplained_emmc_defconfig b/configs/sama5d2_xplained_emmc_defconfig
index e33dcb8..9ef0ff4 100644
--- a/configs/sama5d2_xplained_emmc_defconfig
+++ b/configs/sama5d2_xplained_emmc_defconfig
@@ -28,6 +28,7 @@
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SYS_LOAD_ADDR=0x22000000
CONFIG_DEBUG_UART=y
+CONFIG_LTO=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_FIT=y
CONFIG_SD_BOOT=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index acd7517..aed9eda 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -29,6 +29,7 @@
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SYS_LOAD_ADDR=0x22000000
CONFIG_DEBUG_UART=y
+CONFIG_LTO=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_FIT=y
CONFIG_SD_BOOT=y
diff --git a/configs/sama5d2_xplained_qspiflash_defconfig b/configs/sama5d2_xplained_qspiflash_defconfig
index 6346e53..c9a2072 100644
--- a/configs/sama5d2_xplained_qspiflash_defconfig
+++ b/configs/sama5d2_xplained_qspiflash_defconfig
@@ -29,6 +29,7 @@
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SYS_LOAD_ADDR=0x22000000
CONFIG_DEBUG_UART=y
+CONFIG_LTO=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_FIT=y
CONFIG_QSPI_BOOT=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index 76fa56e..c01a0c4 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -31,6 +31,7 @@
CONFIG_SPL_SPI=y
CONFIG_SYS_LOAD_ADDR=0x22000000
CONFIG_DEBUG_UART=y
+CONFIG_LTO=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_FIT=y
CONFIG_SPI_BOOT=y
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index 9bd81c1..bf3ef0c 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -135,7 +135,6 @@
CONFIG_DFU_SF=y
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
-CONFIG_FWU_MDATA_GPT_BLK=y
CONFIG_GPIO_HOG=y
CONFIG_DM_GPIO_LOOKUP_LABEL=y
CONFIG_QCOM_PMIC_GPIO=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 19cc670..b6c4f73 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -133,7 +133,6 @@
CONFIG_CMD_STACKPROTECTOR_TEST=y
CONFIG_MAC_PARTITION=y
CONFIG_AMIGA_PARTITION=y
-CONFIG_DOS_PARTITION=y
CONFIG_OF_CONTROL=y
CONFIG_OF_LIVE=y
CONFIG_ENV_IS_NOWHERE=y
diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig
index 570a1f5..75b7274 100644
--- a/configs/starfive_visionfive2_defconfig
+++ b/configs/starfive_visionfive2_defconfig
@@ -9,7 +9,7 @@
CONFIG_SPL_DM_SPI=y
CONFIG_DEFAULT_DEVICE_TREE="jh7110-starfive-visionfive-2"
CONFIG_SPL_TEXT_BASE=0x8000000
-CONFIG_SYS_PROMPT="StarFive #"
+CONFIG_SYS_PROMPT="StarFive # "
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_DM_RESET=y
CONFIG_SPL_MMC=y
diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
index 77f0faf..af74166 100644
--- a/configs/stm32mp15_dhcom_basic_defconfig
+++ b/configs/stm32mp15_dhcom_basic_defconfig
@@ -172,5 +172,4 @@
CONFIG_WDT_STM32MP=y
CONFIG_FAT_WRITE=y
# CONFIG_BINMAN_FDT is not set
-CONFIG_FDT_FIXUP_PARTITIONS=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
index 6438ad8..b7f372f 100644
--- a/configs/stm32mp15_dhcor_basic_defconfig
+++ b/configs/stm32mp15_dhcor_basic_defconfig
@@ -172,5 +172,4 @@
CONFIG_WDT_STM32MP=y
CONFIG_FAT_WRITE=y
# CONFIG_BINMAN_FDT is not set
-CONFIG_FDT_FIXUP_PARTITIONS=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/synquacer_developerbox_defconfig b/configs/synquacer_developerbox_defconfig
index 17d70ef..b0b6868 100644
--- a/configs/synquacer_developerbox_defconfig
+++ b/configs/synquacer_developerbox_defconfig
@@ -1,10 +1,8 @@
CONFIG_ARM=y
-CONFIG_ARCH_SYNQUACER=y
CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_SYNQUACER=y
CONFIG_SYS_MALLOC_LEN=0x1000000
CONFIG_SYS_MALLOC_F_LEN=0x4000
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xe0000000
CONFIG_SF_DEFAULT_SPEED=31250000
CONFIG_ENV_SIZE=0x30000
CONFIG_ENV_OFFSET=0x580000
@@ -13,11 +11,13 @@
CONFIG_DEFAULT_DEVICE_TREE="synquacer-sc2a11-developerbox"
CONFIG_SYS_LOAD_ADDR=0x80000000
CONFIG_TARGET_DEVELOPERBOX=y
+CONFIG_FWU_NUM_IMAGES_PER_BANK=1
CONFIG_AHCI=y
CONFIG_FIT=y
CONFIG_BOOTSTAGE_STASH_SIZE=4096
CONFIG_HUSH_PARSER=y
CONFIG_SYS_MAXARGS=128
+CONFIG_CMD_FWU_METADATA=y
CONFIG_SYS_BOOTM_LEN=0x800000
CONFIG_CMD_IMLS=y
CONFIG_CMD_ERASEENV=y
@@ -44,7 +44,6 @@
CONFIG_CMD_MTDPARTS=y
CONFIG_CMD_LOG=y
CONFIG_ISO_PARTITION=y
-CONFIG_PARTITION_TYPE_GUID=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_PROT_UDP=y
@@ -54,6 +53,7 @@
CONFIG_DFU_MTD=y
CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
+CONFIG_FWU_MDATA_MTD=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_SYNQUACER=y
CONFIG_MMC_SDHCI=y
@@ -97,11 +97,4 @@
CONFIG_EFI_CAPSULE_ON_DISK=y
CONFIG_EFI_IGNORE_OSINDICATIONS=y
CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
-CONFIG_EFI_SECURE_BOOT=y
CONFIG_FWU_MULTI_BANK_UPDATE=y
-CONFIG_FWU_MDATA=y
-CONFIG_FWU_MDATA_MTD=y
-CONFIG_FWU_NUM_BANKS=2
-CONFIG_FWU_NUM_IMAGES_PER_BANK=1
-CONFIG_CMD_FWU_METADATA=y
-CONFIG_TOOLS_MKFWUMDATA=y
diff --git a/configs/videostrong-kii-pro_defconfig b/configs/videostrong-kii-pro_defconfig
index 71a8029..4a2ff34 100644
--- a/configs/videostrong-kii-pro_defconfig
+++ b/configs/videostrong-kii-pro_defconfig
@@ -1,17 +1,19 @@
CONFIG_ARM=y
CONFIG_ARCH_MESON=y
CONFIG_TEXT_BASE=0x01000000
-CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_NR_DRAM_BANKS=1
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
CONFIG_ENV_SIZE=0x2000
CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-kii-pro"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_DM_RESET=y
CONFIG_DEBUG_UART_BASE=0xc81004c0
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_IDENT_STRING=" kii-pro"
-CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-kii-pro"
+CONFIG_SYS_LOAD_ADDR=0x1000000
CONFIG_DEBUG_UART=y
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000
CONFIG_OF_BOARD_SETUP=y
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_MISC_INIT_R=y
@@ -31,10 +33,8 @@
CONFIG_SARADC_MESON=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MESON=y
-CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_REALTEK=y
-CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE_MESON8B=y
CONFIG_PHY=y
CONFIG_MESON_GXBB_USB_PHY=y
@@ -45,14 +45,12 @@
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
-CONFIG_DM_RESET=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_DEBUG_UART_SKIP_INIT=y
CONFIG_MESON_SERIAL=y
CONFIG_SYSINFO=y
CONFIG_SYSINFO_SMBIOS=y
CONFIG_USB=y
-CONFIG_DM_USB=y
CONFIG_USB_DWC2=y
CONFIG_USB_KEYBOARD=y
CONFIG_VIDEO=y
@@ -67,4 +65,3 @@
CONFIG_BMP_16BPP=y
CONFIG_BMP_24BPP=y
CONFIG_BMP_32BPP=y
-CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/configs/x240_defconfig b/configs/x240_defconfig
index 6d25c5a..a78cb3c 100644
--- a/configs/x240_defconfig
+++ b/configs/x240_defconfig
@@ -15,7 +15,6 @@
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_FIT=y
CONFIG_BOOTDELAY=3
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_CMD_BOOTZ=y
diff --git a/configs/x96_mate_defconfig b/configs/x96_mate_defconfig
index 122c1a9..318951e 100644
--- a/configs/x96_mate_defconfig
+++ b/configs/x96_mate_defconfig
@@ -10,6 +10,7 @@
CONFIG_DRAM_SUN50I_H616_TPR11=0xffffdddd
CONFIG_DRAM_SUN50I_H616_TPR12=0xfedf7557
CONFIG_MACH_SUN50I_H616=y
+CONFIG_SUNXI_DRAM_H616_DDR3_1333=y
CONFIG_R_I2C_ENABLE=y
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL_I2C=y
@@ -18,3 +19,5 @@
CONFIG_SYS_I2C_SLAVE=0x7f
CONFIG_SYS_I2C_SPEED=400000
CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
diff --git a/configs/xilinx_versal_net_mini_emmc_defconfig b/configs/xilinx_versal_net_mini_emmc_defconfig
new file mode 100644
index 0000000..6d5affc
--- /dev/null
+++ b/configs/xilinx_versal_net_mini_emmc_defconfig
@@ -0,0 +1,63 @@
+CONFIG_ARM=y
+CONFIG_SYS_CONFIG_NAME="xilinx_versal_net_mini"
+CONFIG_COUNTER_FREQUENCY=100000000
+CONFIG_ARCH_VERSAL_NET=y
+CONFIG_TEXT_BASE=0x10000
+CONFIG_SYS_MALLOC_LEN=0x80000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x10000
+CONFIG_ENV_SIZE=0x80
+CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini-emmc"
+CONFIG_SYS_PROMPT="Versal NET> "
+# CONFIG_PSCI_RESET is not set
+CONFIG_SYS_LOAD_ADDR=0x8000000
+# CONFIG_EXPERT is not set
+CONFIG_REMAKE_ELF=y
+# CONFIG_AUTOBOOT is not set
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_BOARD_EARLY_INIT_R=y
+# CONFIG_BOARD_LATE_INIT is not set
+# CONFIG_CMDLINE_EDITING is not set
+# CONFIG_AUTO_COMPLETE is not set
+# CONFIG_SYS_LONGHELP is not set
+# CONFIG_CMD_BDI is not set
+# CONFIG_CMD_CONSOLE is not set
+# CONFIG_CMD_BOOTD is not set
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_BOOTI is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_FDT is not set
+# CONFIG_CMD_GO is not set
+# CONFIG_CMD_RUN is not set
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_IMPORTENV is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_ECHO is not set
+# CONFIG_CMD_ITEST is not set
+# CONFIG_CMD_SOURCE is not set
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_EMBED=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+# CONFIG_NET is not set
+# CONFIG_DM_WARN is not set
+# CONFIG_DM_DEVICE_REMOVE is not set
+CONFIG_MMC_HS200_SUPPORT=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_ARM_DCC=y
+CONFIG_FAT_WRITE=y
+# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
+# CONFIG_LMB is not set
diff --git a/configs/xilinx_versal_net_mini_ospi_defconfig b/configs/xilinx_versal_net_mini_ospi_defconfig
new file mode 100644
index 0000000..d11e180
--- /dev/null
+++ b/configs/xilinx_versal_net_mini_ospi_defconfig
@@ -0,0 +1,71 @@
+CONFIG_ARM=y
+CONFIG_SYS_CONFIG_NAME="xilinx_versal_net_mini"
+CONFIG_COUNTER_FREQUENCY=100000000
+CONFIG_ARCH_VERSAL_NET=y
+CONFIG_TEXT_BASE=0xBBF00000
+CONFIG_SYS_MALLOC_LEN=0x2000
+CONFIG_SYS_MALLOC_F_LEN=0x500
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xBBF20000
+CONFIG_SF_DEFAULT_SPEED=30000000
+CONFIG_ENV_SIZE=0x80
+# CONFIG_DM_GPIO is not set
+CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini-ospi-single"
+CONFIG_SYS_PROMPT="Versal NET> "
+CONFIG_SYS_MEM_RSVD_FOR_MMU=y
+# CONFIG_PSCI_RESET is not set
+CONFIG_SYS_LOAD_ADDR=0xBBF80000
+# CONFIG_EXPERT is not set
+CONFIG_REMAKE_ELF=y
+# CONFIG_AUTOBOOT is not set
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_BOARD_EARLY_INIT_R=y
+# CONFIG_BOARD_LATE_INIT is not set
+# CONFIG_CMDLINE_EDITING is not set
+# CONFIG_AUTO_COMPLETE is not set
+# CONFIG_SYS_LONGHELP is not set
+# CONFIG_CMD_BDI is not set
+# CONFIG_CMD_CONSOLE is not set
+# CONFIG_CMD_BOOTD is not set
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_BOOTI is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_FDT is not set
+# CONFIG_CMD_GO is not set
+# CONFIG_CMD_RUN is not set
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_IMPORTENV is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+# CONFIG_CMD_ECHO is not set
+# CONFIG_CMD_ITEST is not set
+# CONFIG_CMD_SOURCE is not set
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_NET is not set
+# CONFIG_DM_WARN is not set
+# CONFIG_DM_DEVICE_REMOVE is not set
+# CONFIG_MMC is not set
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_SOFT_RESET=y
+CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_ISSI=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_MT35XU=y
+CONFIG_ARM_DCC=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_CADENCE_QSPI=y
+CONFIG_HAS_CQSPI_REF_CLK=y
+CONFIG_CQSPI_REF_CLK=200000000
+CONFIG_CADENCE_OSPI_VERSAL=y
+# CONFIG_LMB is not set
diff --git a/configs/xilinx_versal_net_mini_qspi_defconfig b/configs/xilinx_versal_net_mini_qspi_defconfig
new file mode 100644
index 0000000..a7ebc38
--- /dev/null
+++ b/configs/xilinx_versal_net_mini_qspi_defconfig
@@ -0,0 +1,75 @@
+CONFIG_ARM=y
+CONFIG_SYS_CONFIG_NAME="xilinx_versal_net_mini"
+CONFIG_COUNTER_FREQUENCY=100000000
+CONFIG_ARCH_VERSAL_NET=y
+CONFIG_TEXT_BASE=0xBBF00000
+CONFIG_SYS_MALLOC_LEN=0x2000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xBBF20000
+CONFIG_SF_DEFAULT_SPEED=30000000
+CONFIG_ENV_SIZE=0x80
+CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini-qspi-single"
+CONFIG_SYS_PROMPT="Versal NET> "
+CONFIG_SYS_MEM_RSVD_FOR_MMU=y
+# CONFIG_PSCI_RESET is not set
+CONFIG_SYS_LOAD_ADDR=0xBBF80000
+# CONFIG_EXPERT is not set
+CONFIG_REMAKE_ELF=y
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
+# CONFIG_AUTOBOOT is not set
+CONFIG_LOGLEVEL=0
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_BOARD_EARLY_INIT_R=y
+# CONFIG_BOARD_LATE_INIT is not set
+# CONFIG_CMDLINE_EDITING is not set
+# CONFIG_AUTO_COMPLETE is not set
+# CONFIG_SYS_LONGHELP is not set
+# CONFIG_SYS_XTRACE is not set
+# CONFIG_CMD_BDI is not set
+# CONFIG_CMD_CONSOLE is not set
+# CONFIG_CMD_BOOTD is not set
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_BOOTI is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_FDT is not set
+# CONFIG_CMD_GO is not set
+# CONFIG_CMD_RUN is not set
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_IMPORTENV is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+# CONFIG_CMD_ECHO is not set
+# CONFIG_CMD_ITEST is not set
+# CONFIG_CMD_SOURCE is not set
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set
+# CONFIG_NET is not set
+# CONFIG_DM_WARN is not set
+# CONFIG_DM_DEVICE_REMOVE is not set
+# CONFIG_GPIO is not set
+# CONFIG_I2C is not set
+# CONFIG_INPUT is not set
+# CONFIG_MMC is not set
+CONFIG_DM_SPI_FLASH=y
+# CONFIG_SPI_FLASH_SMART_HWCAPS is not set
+# CONFIG_SPI_FLASH_UNLOCK_ALL is not set
+CONFIG_SPI_FLASH_ISSI=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_WINBOND=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+# CONFIG_POWER is not set
+CONFIG_ARM_DCC=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_ZYNQMP_GQSPI=y
+# CONFIG_LMB is not set
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 474abc7..9900577 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -7,6 +7,7 @@
CONFIG_ENV_OFFSET=0xE00000
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706"
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SPL_STACK_R_ADDR=0x200000
CONFIG_SPL_STACK=0xfffffe00
CONFIG_SPL=y
diff --git a/disk/part.c b/disk/part.c
index 0a03b82..186ee96 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -670,8 +670,8 @@
return ret;
}
-int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
- struct disk_partition *info, int part_type)
+int part_get_info_by_name(struct blk_desc *dev_desc, const char *name,
+ struct disk_partition *info)
{
struct part_driver *part_drv;
int ret;
@@ -702,12 +702,6 @@
return -ENOENT;
}
-int part_get_info_by_name(struct blk_desc *dev_desc, const char *name,
- struct disk_partition *info)
-{
- return part_get_info_by_name_type(dev_desc, name, info, PART_TYPE_ALL);
-}
-
/**
* Get partition info from device number and partition name.
*
diff --git a/doc/board/starfive/visionfive2.rst b/doc/board/starfive/visionfive2.rst
index 951e0d8..941899a 100644
--- a/doc/board/starfive/visionfive2.rst
+++ b/doc/board/starfive/visionfive2.rst
@@ -206,16 +206,16 @@
Working FDT set to ff74a340
Hit any key to stop autoboot: 0
StarFive #
- StarFive #version
+ StarFive # version
U-Boot 2023.04-rc2-00055-gfc43b9c51a-dirty (Mar 02 2023 - 10:51:39 +0800)
riscv64-buildroot-linux-gnu-gcc.br_real (Buildroot VF2_515_v1.0.0_rc4) 10.3.0
GNU ld (GNU Binutils) 2.36.1
StarFive #
- StarFive #mmc dev 1
+ StarFive # mmc dev 1
switch to partitions #0, OK
mmc1 is current device
- StarFive #mmc info
+ StarFive # mmc info
Device: mmc@16020000
Manufacturer ID: 9f
OEM: 5449
@@ -229,7 +229,7 @@
Bus Width: 4-bit
Erase Group Size: 512 Bytes
StarFive #
- StarFive #mmc part
+ StarFive # mmc part
Partition Map for MMC device 1 -- Partition Type: EFI
@@ -253,7 +253,7 @@
(data)
guid: 539a6df9-4655-4953-8541-733ca36eb1db
StarFive #
- StarFive #fatls mmc 1:3
+ StarFive # fatls mmc 1:3
6429424 Image.gz
717705 u-boot.itb
125437 u-boot-spl.bin.normal.out
@@ -262,13 +262,13 @@
5 file(s), 0 dir(s)
- StarFive #fatload mmc 1:3 ${kernel_addr_r} Image.gz
+ StarFive # fatload mmc 1:3 ${kernel_addr_r} Image.gz
6429424 bytes read in 394 ms (15.6 MiB/s)
- StarFive #fatload mmc 1:3 ${fdt_addr_r} jh7110-starfive-visionfive-2.dtb
+ StarFive # fatload mmc 1:3 ${fdt_addr_r} jh7110-starfive-visionfive-2.dtb
11285 bytes read in 5 ms (2.2 MiB/s)
- StarFive #fatload mmc 1:3 ${ramdisk_addr_r} initramfs.cpio.gz
+ StarFive # fatload mmc 1:3 ${ramdisk_addr_r} initramfs.cpio.gz
152848495 bytes read in 9271 ms (15.7 MiB/s)
- StarFive #booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
+ StarFive # booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
Uncompressing Kernel Image
## Flattened Device Tree blob at 46000000
Booting using the fdt blob at 0x46000000
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index 27d7b52..3a122b0 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -90,9 +90,9 @@
| | |----------|-----------------------|---->| Reset rls | |
| | | | | +-----------+ |
| | TIFS | | | : |
- | |Services| | | +-----------+ |
- | | |<---------|-----------------------|---->|*ATF/OPTEE*| |
- | | | | | +-----------+ |
+ | |Services| | | +-------------+ |
+ | | |<---------|-----------------------|---->|*TF-A/OP-TEE*| |
+ | | | | | +-------------+ |
| | | | | : |
| | | | | +-----------+ |
| | |<---------|-----------------------|---->| *A53 SPL* | |
@@ -115,65 +115,76 @@
Sources:
--------
-1. SYSFW:
- Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
- Branch: master
-
-2. ATF:
- Tree: https://github.com/ARM-software/arm-trusted-firmware.git
+1. Trusted Firmware-A:
+ Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
Branch: master
-3. OPTEE:
+2. OP-TEE:
Tree: https://github.com/OP-TEE/optee_os.git
Branch: master
-4. U-Boot:
+3. U-Boot:
Tree: https://source.denx.de/u-boot/u-boot
Branch: master
-5. TI Linux Firmware:
+4. TI Linux Firmware:
Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
Branch: ti-linux-firmware
Build procedure:
----------------
-1. ATF:
+1. Trusted Firmware-A:
-.. code-block:: text
+.. code-block:: bash
- $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=lite SPD=opteed
+ $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \
+ TARGET_BOARD=lite SPD=opteed
-2. OPTEE:
+2. OP-TEE:
-.. code-block:: text
+.. code-block:: bash
- $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- CROSS_COMPILE64=aarch64-none-linux-gnu-
+ $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \
+ CROSS_COMPILE64=aarch64-none-linux-gnu-
3. U-Boot:
* 3.1 R5:
-.. code-block:: text
-
- $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5
- $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5
- $ cd <k3-image-gen>
- $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin
+.. code-block:: bash
-Use the tiboot3.bin generated from last command
+ $ make ARCH=arm am62x_evm_r5_defconfig
+ $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
* 3.2 A53:
-.. code-block:: text
+.. code-block:: bash
- $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53
- $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53
+ $ make ARCH=arm am62x_evm_a53_defconfig
+ $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- \
+ BL31=<path/to/trusted-firmware-a/dir>/build/k3/lite/release/bl31.bin \
+ TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
Target Images
--------------
Copy the below images to an SD card and boot:
- - tiboot3.bin from step 3.1
- - tispl.bin, u-boot.img from 3.2
+
+ - GP
+
+ * tiboot3-am62x-gp-evm.bin from step 3.1
+ * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
+
+ - HS-FS
+
+ * tiboot3-am62x-hs-fs-evm.bin from step 3.1
+ * tispl.bin, u-boot.img from step 3.2
+
+ - HS-SE
+
+ * tiboot3-am62x-hs-evm.bin from step 3.1
+ * tispl.bin, u-boot.img from step 3.2
Image formats:
--------------
@@ -214,10 +225,10 @@
| FIT HEADER |
| +-------------------+ |
| | | |
- | | A53 ATF | |
+ | | A53 TF-A | |
| +-------------------+ |
| | | |
- | | A53 OPTEE | |
+ | | A53 OP-TEE | |
| +-------------------+ |
| | | |
| | R5 DM FW | |
@@ -230,6 +241,63 @@
| +-------------------+ |
+-----------------------+
+A53 SPL DDR Memory Layout
+-------------------------
+
+This provides an overview memory usage in A53 SPL stage.
+
+.. list-table::
+ :widths: 16 16 16
+ :header-rows: 1
+
+ * - Region
+ - Start Address
+ - End Address
+
+ * - EMPTY
+ - 0x80000000
+ - 0x80080000
+
+ * - TEXT BASE
+ - 0x80080000
+ - 0x800d8000
+
+ * - EMPTY
+ - 0x800d8000
+ - 0x80200000
+
+ * - BMP IMAGE
+ - 0x80200000
+ - 0x80b77660
+
+ * - STACK
+ - 0x80b77660
+ - 0x80b77e60
+
+ * - GD
+ - 0x80b77e60
+ - 0x80b78000
+
+ * - MALLOC
+ - 0x80b78000
+ - 0x80b80000
+
+ * - EMPTY
+ - 0x80b80000
+ - 0x80c80000
+
+ * - BSS
+ - 0x80c80000
+ - 0x80d00000
+
+ * - BLOBS
+ - 0x80d00000
+ - 0x80d00400
+
+ * - EMPTY
+ - 0x80d00400
+ - 0x81000000
+
Switch Setting for Boot Mode
----------------------------
diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst
new file mode 100644
index 0000000..300cd3e
--- /dev/null
+++ b/doc/board/ti/am65x_evm.rst
@@ -0,0 +1,420 @@
+.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+.. sectionauthor:: Neha Francis <n-francis@ti.com>
+
+AM65x Platforms
+===============
+
+Introduction:
+-------------
+The AM65x family of SoCs is the first device family from K3 Multicore
+SoC architecture, targeted for broad market and industrial control with
+aim to meet the complex processing needs of modern embedded products.
+
+The device is built over three domains, each containing specific processing
+cores, voltage domains and peripherals:
+
+1. Wake-up (WKUP) domain:
+ * Device Management and Security Controller (DMSC)
+
+2. Microcontroller (MCU) domain:
+ * Dual Core ARM Cortex-R5F processor
+
+3. MAIN domain:
+ * Quad core 64-bit ARM Cortex-A53
+
+More info can be found in TRM: http://www.ti.com/lit/pdf/spruid7
+
+Boot Flow:
+----------
+On AM65x family devices, ROM supports boot only via MCU(R5). This means that
+bootloader has to run on R5 core. In order to meet this constraint, and for
+the following reasons the boot flow is designed as mentioned:
+
+1. Need to move away from R5 asap, so that we want to start *any*
+firmware on the R5 cores for example autosar can be loaded to receive CAN
+response and other safety operations to be started. This operation is
+very time critical and is applicable for all automotive use cases.
+
+2. U-Boot on A53 should start other remotecores for various
+applications. This should happen before running Linux.
+
+3. In production boot flow, we might not like to use full U-Boot,
+instead use Falcon boot flow to reduce boot time.
+
+.. code-block:: text
+
+ +------------------------------------------------------------------------+
+ | DMSC | R5 | A53 |
+ +------------------------------------------------------------------------+
+ | +--------+ | | |
+ | | Reset | | | |
+ | +--------+ | | |
+ | : | | |
+ | +--------+ | +-----------+ | |
+ | | *ROM* |----------|-->| Reset rls | | |
+ | +--------+ | +-----------+ | |
+ | | | | : | |
+ | | ROM | | : | |
+ | |services| | : | |
+ | | | | +-------------+ | |
+ | | | | | *R5 ROM* | | |
+ | | | | +-------------+ | |
+ | | |<---------|---|Load and auth| | |
+ | | | | | tiboot3.bin | | |
+ | | | | +-------------+ | |
+ | | | | : | |
+ | | | | : | |
+ | | | | : | |
+ | | | | +-------------+ | |
+ | | | | | *R5 SPL* | | |
+ | | | | +-------------+ | |
+ | | | | | Load | | |
+ | | | | | sysfw.itb | | |
+ | | Start | | +-------------+ | |
+ | | System |<---------|---| Start | | |
+ | |Firmware| | | SYSFW | | |
+ | +--------+ | +-------------+ | |
+ | : | | | | |
+ | +---------+ | | Load | | |
+ | | *SYSFW* | | | system | | |
+ | +---------+ | | Config data | | |
+ | | |<--------|---| | | |
+ | | | | +-------------+ | |
+ | | | | | | | |
+ | | | | | DDR | | |
+ | | | | | config | | |
+ | | | | +-------------+ | |
+ | | | | | | | |
+ | | |<--------|---| Start A53 | | |
+ | | | | | and Reset | | |
+ | | | | +-------------+ | |
+ | | | | | +-----------+ |
+ | | |---------|-----------------------|---->| Reset rls | |
+ | | | | | +-----------+ |
+ | | DMSC | | | : |
+ | |Services | | | +------------+ |
+ | | |<--------|-----------------------|---->|*ATF/OP-TEE*| |
+ | | | | | +------------+ |
+ | | | | | : |
+ | | | | | +-----------+ |
+ | | |<--------|-----------------------|---->| *A53 SPL* | |
+ | | | | | +-----------+ |
+ | | | | | | Load | |
+ | | | | | | u-boot.img| |
+ | | | | | +-----------+ |
+ | | | | | : |
+ | | | | | +-----------+ |
+ | | |<--------|-----------------------|---->| *U-Boot* | |
+ | | | | | +-----------+ |
+ | | | | | | prompt | |
+ | | | | | +-----------+ |
+ | +---------+ | | |
+ | | | |
+ +------------------------------------------------------------------------+
+
+- Here DMSC acts as master and provides all the critical services. R5/A53
+ requests DMSC to get these services done as shown in the above diagram.
+
+Sources:
+--------
+1. Trusted Firmware-A:
+ Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
+ Branch: master
+
+2. OP-TEE:
+ Tree: https://github.com/OP-TEE/optee_os.git
+ Branch: master
+
+3. U-Boot:
+ Tree: https://source.denx.de/u-boot/u-boot
+ Branch: master
+
+4. TI Linux Firmware:
+ Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
+ Branch: ti-linux-firmware
+
+Build procedure:
+----------------
+1. Trusted Firmware-A:
+
+.. code-block:: bash
+
+ $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 \
+ TARGET_BOARD=generic SPD=opteed
+
+2. OP-TEE:
+
+.. code-block:: bash
+
+ $ make PLATFORM=k3-am65x CFG_ARM64_core=y
+
+3. U-Boot:
+
+* 4.1 R5:
+
+.. code-block:: bash
+
+ $ make am65x_evm_r5_defconfig
+ $ make CROSS_COMPILE=arm-linux-gnueabihf- \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
+
+* 4.2 A53:
+
+.. code-block:: bash
+
+ $ make am65x_evm_a53_defconfig
+ $ make CROSS_COMPILE=aarch64-linux-gnu- \
+ BL31=<path/to/trusted-firmware-a/dir>/build/k3/generic/release/bl31.bin \
+ TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
+
+Target Images
+--------------
+Copy the below images to an SD card and boot:
+
+- GP
+
+ * tiboot3-am65x_sr2-gp-evm.bin, sysfw-am65x_sr2-gp-evm.itb from step 4.1
+ * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2
+
+- HS
+
+ * tiboot3-am65x_sr2-hs-evm.bin, sysfw-am65x_sr2-hs-evm.itb from step 4.1
+ * tispl.bin, u-boot.img from step 4.2
+
+Image formats:
+--------------
+
+- tiboot3.bin:
+
+.. code-block:: text
+
+ +-----------------------+
+ | X.509 |
+ | Certificate |
+ | +-------------------+ |
+ | | | |
+ | | R5 | |
+ | | u-boot-spl.bin | |
+ | | | |
+ | +-------------------+ |
+ | | | |
+ | | FIT header | |
+ | | +---------------+ | |
+ | | | | | |
+ | | | DTB 1...N | | |
+ | | +---------------+ | |
+ | +-------------------+ |
+ +-----------------------+
+
+- tispl.bin
+
+.. code-block:: text
+
+ +-----------------------+
+ | |
+ | FIT HEADER |
+ | +-------------------+ |
+ | | | |
+ | | A53 ATF | |
+ | +-------------------+ |
+ | | | |
+ | | A53 OP-TEE | |
+ | +-------------------+ |
+ | | | |
+ | | A53 SPL | |
+ | +-------------------+ |
+ | | | |
+ | | SPL DTB 1...N | |
+ | +-------------------+ |
+ +-----------------------+
+
+- sysfw.itb
+
+.. code-block:: text
+
+ +-----------------------+
+ | |
+ | FIT HEADER |
+ | +-------------------+ |
+ | | | |
+ | | sysfw.bin | |
+ | +-------------------+ |
+ | | | |
+ | | board config | |
+ | +-------------------+ |
+ | | | |
+ | | PM config | |
+ | +-------------------+ |
+ | | | |
+ | | RM config | |
+ | +-------------------+ |
+ | | | |
+ | | Secure config | |
+ | +-------------------+ |
+ +-----------------------+
+
+eMMC:
+-----
+ROM supports booting from eMMC from boot0 partition offset 0x0
+
+Flashing images to eMMC:
+
+The following commands can be used to download tiboot3.bin, tispl.bin,
+u-boot.img, and sysfw.itb from an SD card and write them to the eMMC boot0
+partition at respective addresses.
+
+.. code-block:: text
+
+ => 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
+ => fatload mmc 1 ${loadaddr} sysfw.itb
+ => mmc write ${loadaddr} 0x3600 0x800
+
+To give the ROM access to the boot partition, the following commands must be
+used for the first time:
+
+.. code-block:: text
+
+ => mmc partconf 0 1 1 1
+ => mmc bootbus 0 1 0 0
+
+To create a software partition for the rootfs, the following command can be
+used:
+
+.. code-block:: text
+
+ => gpt write mmc 0 ${partitions}
+
+eMMC layout:
+
+.. code-block:: text
+
+ boot0 partition (8 MB) user partition
+ 0x0+----------------------------------+ 0x0+-------------------------+
+ | tiboot3.bin (512 KB) | | |
+ 0x400+----------------------------------+ | |
+ | tispl.bin (2 MB) | | |
+ 0x1400+----------------------------------+ | rootfs |
+ | u-boot.img (4 MB) | | |
+ 0x3400+----------------------------------+ | |
+ | environment (128 KB) | | |
+ 0x3500+----------------------------------+ | |
+ | backup environment (128 KB) | | |
+ 0x3600+----------------------------------+ | |
+ | sysfw (1 MB) | | |
+ 0x3E00+----------------------------------+ +-------------------------+
+
+Kernel image and DT are expected to be present in the /boot folder of rootfs.
+To boot kernel from eMMC, use the following commands:
+
+.. code-block:: text
+
+ => setenv mmcdev 0
+ => setenv bootpart 0
+ => boot
+
+OSPI:
+-----
+ROM supports booting from OSPI from offset 0x0.
+
+Flashing images to OSPI:
+
+Below commands can be used to download tiboot3.bin, tispl.bin, u-boot.img,
+and sysfw.itb over tftp and then flash those to OSPI at their respective
+addresses.
+
+.. code-block:: text
+
+ => sf probe
+ => tftp ${loadaddr} tiboot3.bin
+ => sf update $loadaddr 0x0 $filesize
+ => tftp ${loadaddr} tispl.bin
+ => sf update $loadaddr 0x80000 $filesize
+ => tftp ${loadaddr} u-boot.img
+ => sf update $loadaddr 0x280000 $filesize
+ => tftp ${loadaddr} sysfw.itb
+ => sf update $loadaddr 0x6C0000 $filesize
+
+Flash layout for OSPI:
+
+.. code-block:: text
+
+ 0x0 +----------------------------+
+ | ospi.tiboot3(512K) |
+ | |
+ 0x80000 +----------------------------+
+ | ospi.tispl(2M) |
+ | |
+ 0x280000 +----------------------------+
+ | ospi.u-boot(4M) |
+ | |
+ 0x680000 +----------------------------+
+ | ospi.env(128K) |
+ | |
+ 0x6A0000 +----------------------------+
+ | ospi.env.backup (128K) |
+ | |
+ 0x6C0000 +----------------------------+
+ | ospi.sysfw(1M) |
+ | |
+ 0x7C0000 +----------------------------+
+ | padding (256k) |
+ 0x800000 +----------------------------+
+ | ospi.rootfs(UBIFS) |
+ | |
+ +----------------------------+
+
+Kernel Image and DT are expected to be present in the /boot folder of UBIFS
+ospi.rootfs just like in SD card case. U-Boot looks for UBI volume named
+"rootfs" for rootfs.
+
+To boot kernel from OSPI, at the U-Boot prompt:
+
+.. code-block:: text
+
+ => setenv boot ubi
+ => boot
+
+UART:
+-----
+ROM supports booting from MCU_UART0 via X-Modem protocol. The entire UART-based
+boot process up to U-Boot (proper) prompt goes through different stages and uses
+different UART peripherals as follows:
+
+.. code-block:: text
+
+ +---------+---------------+-------------+------------+
+ | WHO | Loading WHAT | HW Module | Protocol |
+ +---------+---------------+-------------+------------+
+ |Boot ROM | tiboot3.bin | MCU_UART0 | X-Modem(*)|
+ |R5 SPL | sysfw.itb | MCU_UART0 | Y-Modem(*)|
+ |R5 SPL | tispl.bin | MAIN_UART0 | Y-Modem |
+ |A53 SPL | u-boot.img | MAIN_UART0 | Y-Modem |
+ +---------+---------------+-------------+------------+
+
+Note that in addition to X/Y-Modem related protocol timeouts the DMSC
+watchdog timeout of 3min (typ.) needs to be observed until System Firmware
+is fully loaded (from sysfw.itb) and started.
+
+Example bash script sequence for running on a Linux host PC feeding all boot
+artifacts needed to the device:
+
+.. code-block:: text
+
+ MCU_DEV=/dev/ttyUSB1
+ MAIN_DEV=/dev/ttyUSB0
+
+ stty -F $MCU_DEV 115200 cs8 -cstopb -parenb
+ stty -F $MAIN_DEV 115200 cs8 -cstopb -parenb
+
+ sb --xmodem tiboot3.bin > $MCU_DEV < $MCU_DEV
+ sb --ymodem sysfw.itb > $MCU_DEV < $MCU_DEV
+ sb --ymodem tispl.bin > $MAIN_DEV < $MAIN_DEV
+ sleep 1
+ sb --xmodem u-boot.img > $MAIN_DEV < $MAIN_DEV
diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst
index 0d3a526..5e3d750 100644
--- a/doc/board/ti/j7200_evm.rst
+++ b/doc/board/ti/j7200_evm.rst
@@ -83,9 +83,9 @@
| | |---------|-----------------------|---->| Reset rls | | |
| | | | | +-----------+ | |
| | TIFS | | | : | |
- | |Services | | | +-----------+ | |
- | | |<--------|-----------------------|---->|*ATF/OPTEE*| | |
- | | | | | +-----------+ | |
+ | |Services | | | +-------------+ | |
+ | | |<--------|-----------------------|---->|*TF-A/OP-TEE*| | |
+ | | | | | +-------------+ | |
| | | | | : | |
| | | | | +-----------+ | |
| | |<--------|-----------------------|---->| *A72 SPL* | | |
@@ -120,68 +120,74 @@
Sources:
--------
-1. SYSFW:
- Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
+1. Trusted Firmware-A:
+ Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
Branch: master
-2. ATF:
- Tree: https://github.com/ARM-software/arm-trusted-firmware.git
+2. OP-TEE:
+ Tree: https://github.com/OP-TEE/optee_os.git
Branch: master
-3. OPTEE:
- Tree: https://github.com/OP-TEE/optee_os.git
+3. U-Boot:
+ Tree: https://source.denx.de/u-boot/u-boot
Branch: master
-4. DM Firmware:
+4. TI Linux Firmware:
Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
Branch: ti-linux-firmware
-5. U-Boot:
- Tree: https://source.denx.de/u-boot/u-boot
- Branch: master
-
Build procedure:
----------------
-1. SYSFW:
+1. Trusted Firmware-A:
.. code-block:: bash
- make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=j7200 SBL=u-boot-spl.bin SYSFW_PATH=<path to sysfw>/ti-fs-firmware-j7200-gp.bin
- u-boot-spl.bin is generated at step 4.
+ $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
-2. ATF:
+2. OP-TEE:
.. code-block:: bash
- make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
+ $ make PLATFORM=k3-j7200 CFG_ARM64_core=y
-3. OPTEE:
-
-.. code-block:: bash
-
- make PLATFORM=k3-j7200 CFG_ARM64_core=y
-
-4. U-Boot:
+3. U-Boot:
* 4.1 R5:
.. code-block:: bash
- make CROSS_COMPILE=arm-linux-gnueabihf- j7200_evm_r5_defconfig O=build/r5
- make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5
+ $ make CROSS_COMPILE=arm-linux-gnueabihf- j7200_evm_r5_defconfig O=build/r5
+ $ make CROSS_COMPILE=arm-linux-gnueabihf- \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
* 4.2 A72:
.. code-block:: bash
- make CROSS_COMPILE=aarch64-linux-gnu- j7200_evm_a72_defconfig O=build/a72
- make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72
+ $ make CROSS_COMPILE=aarch64-linux-gnu- j7200_evm_a72_defconfig O=build/a72
+ $ make CROSS_COMPILE=aarch64-linux-gnu- \
+ BL31=<path/to/trusted-firmware-a/dir>/build/k3/generic/release/bl31.bin \
+ TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
Target Images
--------------
Copy the below images to an SD card and boot:
- - tiboot3.bin from step 1
- - tispl.bin, u-boot.img from 4.2
+
+ - GP
+
+ * tiboot3-j7200-gp-evm.bin from step 4.1
+ * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2
+
+ - HS-FS
+
+ * tiboot3-j7200_sr2-hs-fs-evm.bin from step 4.1
+ * tispl.bin, u-boot.img from step 4.2
+
+ - HS-SE
+
+ * tiboot3-j7200_sr2-hs-evm.bin from step 4.1
+ * tispl.bin, u-boot.img from step 4.2
Image formats:
--------------
@@ -236,10 +242,10 @@
| FIT HEADER |
| +-------------------+ |
| | | |
- | | A72 ATF | |
+ | | A72 TF-A | |
| +-------------------+ |
| | | |
- | | A72 OPTEE | |
+ | | A72 OP-TEE | |
| +-------------------+ |
| | | |
| | R5 DM FW | |
diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst
index feaa2da..4624419 100644
--- a/doc/board/ti/j721e_evm.rst
+++ b/doc/board/ti/j721e_evm.rst
@@ -90,9 +90,9 @@
| | |---------|-----------------------|---->| Reset rls | | |
| | | | | +-----------+ | |
| | TIFS | | | : | |
- | |Services | | | +-----------+ | |
- | | |<--------|-----------------------|---->|*ATF/OPTEE*| | |
- | | | | | +-----------+ | |
+ | |Services | | | +-------------+ | |
+ | | |<--------|-----------------------|---->|*TF-A/OP-TEE*| | |
+ | | | | | +-------------+ | |
| | | | | : | |
| | | | | +-----------+ | |
| | |<--------|-----------------------|---->| *A72 SPL* | | |
@@ -130,68 +130,75 @@
Sources:
--------
-1. SYSFW:
- Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
+1. Trusted Firmware-A:
+ Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
Branch: master
-2. ATF:
- Tree: https://github.com/ARM-software/arm-trusted-firmware.git
+2. OP-TEE:
+ Tree: https://github.com/OP-TEE/optee_os.git
Branch: master
-3. OPTEE:
- Tree: https://github.com/OP-TEE/optee_os.git
+3. U-Boot:
+ Tree: https://source.denx.de/u-boot/u-boot
Branch: master
-4. DM Firmware:
+4. TI Linux Firmware:
Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
Branch: ti-linux-firmware
-5. U-Boot:
- Tree: https://source.denx.de/u-boot/u-boot
- Branch: master
-
Build procedure:
----------------
-1. SYSFW:
+1. Trusted Firmware-A:
.. code-block:: bash
- make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e
+ $ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 \
+ TARGET_BOARD=generic SPD=opteed
-2. ATF:
+2. OP-TEE:
.. code-block:: bash
- make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
+ $ make PLATFORM=k3-j721e CFG_ARM64_core=y
-3. OPTEE:
-
-.. code-block:: bash
-
- make PLATFORM=k3-j721e CFG_ARM64_core=y
-
-4. U-Boot:
+3. U-Boot:
* 4.1 R5:
.. code-block:: bash
- make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=build/r5
- make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5
+ $ make j721e_evm_r5_defconfig
+ $ make CROSS_COMPILE=arm-linux-gnueabihf- \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
* 4.2 A72:
.. code-block:: bash
- make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=build/a72
- make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72
+ $ make j721e_evm_a72_defconfig
+ $ make CROSS_COMPILE=aarch64-linux-gnu- \
+ BL31=<path/to/trusted-firmware-a/dir>/build/k3/generic/release/bl31.bin \
+ TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
Target Images
--------------
Copy the below images to an SD card and boot:
- - sysfw.itb from step 1
- - tiboot3.bin from step 4.1
- - tispl.bin, u-boot.img from 4.2
+
+ - GP
+
+ * tiboot3-j721e-gp-evm.bin, sysfw-j721e-gp-evm.itb from step 4.1
+ * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2
+
+ - HS-FS
+
+ * tiboot3-j721e_sr2-hs-fs-evm.bin, sysfw-j721e_sr2-hs-fs-evm.itb from step 4.1
+ * tispl.bin, u-boot.img from step 4.2
+
+ - HS-SE
+
+ * tiboot3-j721e_sr2-hs-evm.bin, sysfw-j721e_sr2-hs-evm.itb from step 4.1
+ * tispl.bin, u-boot.img from step 4.2
Image formats:
--------------
@@ -227,10 +234,10 @@
| FIT HEADER |
| +-------------------+ |
| | | |
- | | A72 ATF | |
+ | | A72 TF-A | |
| +-------------------+ |
| | | |
- | | A72 OPTEE | |
+ | | A72 OP-TEE | |
| +-------------------+ |
| | | |
| | R5 DM FW | |
diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 2b2f4bb..2db7bbd 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -33,6 +33,7 @@
j721e_evm
j7200_evm
am62x_sk
+ am65x_evm
Boot Flow Overview
------------------
@@ -53,13 +54,13 @@
any peripherals needed load the larger binaries inside the `tispl.bin`
into DDR. Once loaded the wakeup SPL will start one of the 'big'
application cores inside the main domain to initialize the main domain,
-starting with ARM Trusted Firmware (ATF), before moving on to start
-OPTEE and the main domain's U-Boot SPL.
+starting with Trusted Firmware-A (TF-A), before moving on to start
+OP-TEE and the main domain's U-Boot SPL.
.. code-block:: text
| WKUP Domain | Main Domain ->
- ROM -> WKUP SPL -> ATF -> OPTEE -> Main SPL
+ ROM -> WKUP SPL -> TF-A -> OP-TEE -> Main SPL
The main domain's SPL, running on a 64bit application core, has
virtually unlimited space (billions of bytes now that DDR is working) to
@@ -70,7 +71,7 @@
.. code-block:: text
| WKUP Domain | Main Domain ->
- ROM -> WKUP SPL -> ATF -> OPTEE -> Main SPL -> UBoot -> Linux
+ ROM -> WKUP SPL -> TF-A -> OP-TEE -> Main SPL -> UBoot -> Linux
This is the typical boot flow for all K3 based SoCs, however this flow
offers quite a lot in the terms of flexibility, especially on High
@@ -115,17 +116,12 @@
| **source:** https://source.denx.de/u-boot/u-boot.git
| **branch:** master
-* **K3 Image Gen**
+* **Trusted Firmware-A (TF-A)**
- | **source:** https://git.ti.com/git/k3-image-gen/k3-image-gen.git
+ | **source:** https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
| **branch:** master
-* **ARM Trusted Firmware (ATF)**
-
- | **source:** https://github.com/ARM-software/arm-trusted-firmware.git
- | **branch:** master
-
-* **Open Portable Trusted Execution Environment (OPTEE)**
+* **Open Portable Trusted Execution Environment (OP-TEE)**
| **source:** https://github.com/OP-TEE/optee_os.git
| **branch:** master
@@ -135,11 +131,6 @@
| **source:** https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
| **branch:** ti-linux-firmware
-* **TI's Security Development Tools**
-
- | **source:** https://git.ti.com/git/security-development-tools/core-secdev-k3.git
- | **branch:** master
-
Build Procedure
---------------
@@ -161,54 +152,37 @@
.. code-block:: bash
- export CC32=arm-linux-gnueabihf-
- export CC64=aarch64-linux-gnu-
+ $ export CC32=arm-linux-gnueabihf-
+ $ export CC64=aarch64-linux-gnu-
Building tiboot3.bin
^^^^^^^^^^^^^^^^^^^^^
1. To generate the U-Boot SPL for the wakeup domain, use the following
commands, substituting :code:`{SOC}` for the name of your device (eg:
- am62x)
-
-.. code-block:: bash
-
- # inside u-boot source
- make ARCH=arm O=build/wkup CROSS_COMPILE=$CC32 {SOC}_evm_r5_defconfig
- make ARCH=arm O=build/wkup CROSS_COMPILE=$CC32
+ am62x) to package the various firmware and the wakeup UBoot SPL into
+ the final `tiboot3.bin` binary. (or the `sysfw.itb` if your device
+ uses the split binary flow)
-2. Next we will use the K3 Image Gen scripts to package the various
- firmware and the wakeup UBoot SPL into the final `tiboot3.bin`
- binary. (or the `sysfw.itb` if your device uses the split binary
- flow)
.. code-block:: bash
- # inside k3-image-gen source
- make CROSS_COMPILE=$CC32 SOC={SOC} SOC_TYPE={hs,gp} \
- TI_SECURE_DEV_PKG=<path/to/securit-development-tools> \
- SYSFW_PATH=<path/to/ti-sysfw/ti-fs-firmware-{SOC}-{hs|gp}.bin> \
- SYSFW_HS_INNER_CERT_PATH=<path/to/ti-sysfw/ti-fs-firmware-{SOC}-hs-cert.bin
-
-For devices that use the *combined binary flow*, you will also need to
-supply the location of the SPL we created in step 1 above, so it can be
-packaged into the final `tiboot3.bin`.
-
-.. code-block:: bash
-
- SBL=<path/to/wakeup/u-boot-spl.bin>
+ $ # inside u-boot source
+ $ make ARCH=arm {SOC}_evm_r5_defconfig
+ $ make ARCH=arm CROSS_COMPILE=$CC32 \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware>
At this point you should have all the needed binaries to boot the wakeup
domain of your K3 SoC.
**Combined Binary Boot Flow** (eg: am62x, am64x, ... )
- `k3-image-gen/tiboot3-{SOC}-{hs,gp}-evm.bin`
+ `tiboot3-{SOC}-{gp/hs-fs/hs}.bin`
**Split Binary Boot Flow** (eg: j721e, am65x)
- | `u-boot/build/wkup/tiboot3.bin`
- | `k3-image-gen/sysfw-{SOC}-evm.bin`
+ | `tiboot3-{SOC}-{gp/hs-fs/hs}.bin`
+ | `sysfw-{SOC}-{gp/hs-fs/hs}-evm.itb`
.. note ::
@@ -223,53 +197,217 @@
the main domain to function properly as well as Device Management (DM)
firmware if your device using a split firmware.
-3. We will first need ATF, as it's the first thing to run on the 'big'
+2. We will first need TF-A, as it's the first thing to run on the 'big'
application cores on the main domain.
.. code-block:: bash
- # inside arm-trusted-firmware source
- make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 \
- TARGET_BOARD={lite|generic} \
- SPD=opteed \
+ $ # inside trusted-firmware-a source
+ $ make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 \
+ TARGET_BOARD={lite|generic|j784s4} \
+ SPD=opteed
-Typically all `j7*` devices will use `TARGET_BOARD=generic` while all
-Sitara (`am6*`) devices use the `lite` option.
+Typically all `j7*` devices will use `TARGET_BOARD=generic` or `TARGET_BOARD
+=j784s4` (if it is a J784S4 device), while all Sitara (`am6*`) devices
+use the `lite` option.
-4. The Open Portable Trusted Execution Environment (OPTEE) is designed
+3. The Open Portable Trusted Execution Environment (OP-TEE) is designed
to run as a companion to a non-secure Linux kernel for Cortex-A cores
using the TrustZone technology built into the core.
.. code-block:: bash
- # inside optee_os source
- make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 \
+ $ # inside optee_os source
+ $ make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 \
PLATFORM=k3 CFG_ARM64_core=y
-5. Finally, after ATF has initialized the main domain and OPTEE has
+4. Finally, after TF-A has initialized the main domain and OP-TEE has
finished, we can jump back into U-Boot again, this time running on a
64bit core in the main domain.
.. code-block:: bash
- # inside u-boot source
- make ARCH=arm O=build/main CROSS_COMPILE=$CC64 {SOC}_evm_a{53,72}_defconfig
- make ARCH=arm O=build/main CROSS_COMPILE=$CC64 \
- ATF=<path/to/atf/bl31.bin \
- TEE=<path/to/optee/tee-pager_v2.bin
-
-If your device uses a split firmware, you will also need to supply the
-path to the Device Management (DM) Firmware to be included in the final
-`tispl.bin` binary
-
-.. code-block:: bash
-
- DM=<path/to/ti-linux-firmware/ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f>
+ $ # inside u-boot source
+ $ make ARCH=arm {SOC}_evm_a{53,72}_defconfig
+ $ make ARCH=arm CROSS_COMPILE=$CC64 \
+ BINMAN_INDIRS=<path/to/ti-linux-firmware> \
+ BL31=<path/to/trusted-firmware-a/dir>/build/k3/generic/release/bl31.bin \
+ TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin
At this point you should have every binary needed initialize both the
wakeup and main domain and to boot to the U-Boot prompt
**Main Domain Bootloader**
+ | `tispl.bin` for HS devices or `tispl.bin_unsigned` for GP devices
+ | `u-boot.img` for HS devices or `u-boot.img_unsigned` for GP devices
+
+Fit Signature Signing
+---------------------
+
+K3 Platforms have fit signature signing enabled by default on their primary
+platforms. Here we'll take an example for creating fit image for J721e platform
+and the same can be extended to other platforms
+
+1. Describing FIT source
+
+ .. code-block:: bash
+
+ /dts-v1/;
+
+ / {
+ description = "Kernel fitImage for j721e-hs-evm";
+ #address-cells = <1>;
+
+ images {
+ kernel-1 {
+ description = "Linux kernel";
+ data = /incbin/("Image");
+ type = "kernel";
+ arch = "arm64";
+ os = "linux";
+ compression = "none";
+ load = <0x80080000>;
+ entry = <0x80080000>;
+ hash-1 {
+ algo = "sha512";
+ };
+
+ };
+ fdt-ti_k3-j721e-common-proc-board.dtb {
+ description = "Flattened Device Tree blob";
+ data = /incbin/("k3-j721e-common-proc-board.dtb");
+ type = "flat_dt";
+ arch = "arm64";
+ compression = "none";
+ load = <0x83000000>;
+ hash-1 {
+ algo = "sha512";
+ };
+
+ };
+ };
+
+ configurations {
+ default = "conf-ti_k3-j721e-common-proc-board.dtb";
+ conf-ti_k3-j721e-common-proc-board.dtb {
+ description = "Linux kernel, FDT blob";
+ fdt = "fdt-ti_k3-j721e-common-proc-board.dtb";
+ kernel = "kernel-1";
+ signature-1 {
+ algo = "sha512,rsa4096";
+ key-name-hint = "custMpk";
+ sign-images = "kernel", "fdt";
+ };
+ };
+ };
+ };
+
+ You would require to change the '/incbin/' lines to point to the respective
+ files in your local machine and the key-name-hint also needs to be changed
+ if you are using some other key other than the TI dummy key that we are
+ using for this example.
+
+2. Compile U-boot for the respective board
+
+ .. code-block:: bash
+
+ make O=build/a72 CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=arm
+ BL31=/path/to/bl31.bin TEE=/path/to/bl32.bin
+ BINMAN_INDIRS="/path/to/ti-linux-firmware" -j15
+
+ .. note::
+
+ The changes only affect a72 binaries so the example just builds that
+
+3. Sign the fit image and embed the dtb in uboot
+
+ Now once the build is done, you'll have a dtb for your board that you'll
+ be passing to mkimage for signing the fitImage and embedding the key in
+ the u-boot dtb.
+
+ .. code-block:: bash
+
+ mkimage -r -f fitImage.its -k $UBOOT_PATH/board/ti/keys -K
+ $UBOOT_PATH/build/a72/dts/dt.dtb
+
+ For signing a secondary platform, pass the -K parameter to that DTB
+
+ .. code-block:: bash
+
+ mkimage -f fitImage.its -k $UBOOT_PATH/board/ti/keys -K
+ $UBOOT_PATH/build/a72/arch/arm/dts/k3-j721e-sk.dtb
+
+ .. note::
+
+ If changing `CONFIG_DEFAULT_DEVICE_TREE` to the secondary platform,
+ binman changes would also be required so that correct dtb gets packaged.
+
+ .. code-block:: bash
+
+ diff --git a/arch/arm/dts/k3-j721e-binman.dtsi b/arch/arm/dts/k3-j721e-binman.dtsi
+ index 673be646b1e3..752fa805fe8d 100644
+ --- a/arch/arm/dts/k3-j721e-binman.dtsi
+ +++ b/arch/arm/dts/k3-j721e-binman.dtsi
+ @@ -299,8 +299,8 @@
+ #define SPL_J721E_SK_DTB "spl/dts/k3-j721e-sk.dtb"
+
+ #define UBOOT_NODTB "u-boot-nodtb.bin"
+ -#define J721E_EVM_DTB "u-boot.dtb"
+ -#define J721E_SK_DTB "arch/arm/dts/k3-j721e-sk.dtb"
+ +#define J721E_EVM_DTB "arch/arm/dts/k3-j721e-common-proc-board.dtb"
+ +#define J721E_SK_DTB "u-boot.dtb"
+
+5. Rebuilt u-boot
+
+ This is required so that the modified dtb gets updated in u-boot.img
+
+ .. code-block:: bash
+
+ make O=build/a72 CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=arm
+ BL31=/path/to/bl31.bin TEE=/path/to/bl32.bin
+ BINMAN_INDIRS="/path/to/ti-linux-firmware" -j15
+
+6. (Optional) Enabled FIT_SIGNATURE_ENFORCED
+
+ By default u-boot will boot up the fit image without any authentication as
+ such if the public key is not embedded properly, to check if the public key
+ nodes are proper you can enable FIT_SIGNATURE_ENFORCED that would not rely
+ on the dtb for anything else then the signature node for checking the fit
+ image, rest other things will be enforced such as the property of
+ required-keys. This is not an extensive check so do manual checks also
+
+ This is by default enabled for devices with TI_SECURE_DEVICE enabled.
+
+.. note::
+
+ The devices now also have distroboot enabled so if the fit image doesn't
+ work then the fallback to normal distroboot will be there on hs devices,
+ this will need to be explicitly disabled by changing the boot_targets.
+
+Saving environment
+------------------
+
+SAVEENV is disabled by default and for the new flow uses Uenv.txt as the default
+way for saving the environments. This has been done as Uenv.txt is more granular
+then the saveenv command and can be used across various bootmodes too.
+
+**Writing to MMC/EMMC**
+
+.. code-block::
+
+ => env export -t $loadaddr <list of variables>
+ => fatwrite mmc ${mmcdev} ${loadaddr} ${bootenvfile} ${filesize}
+
+**Reading from MMC/EMMC**
+
+By default run envboot will read it from the MMC/EMMC partition ( based on
+mmcdev) and set the environments.
+
+If manually needs to be done then the environment can be read from the
+filesystem and then imported
+
+.. code-block::
+
- | `u-boot/build/main/tispl.bin`
- | `u-boot/build/main/u-boot.img`
+ => fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
+ => env import -t ${loadaddr} ${filesize}
diff --git a/doc/develop/release_cycle.rst b/doc/develop/release_cycle.rst
index eca128f..46bc200 100644
--- a/doc/develop/release_cycle.rst
+++ b/doc/develop/release_cycle.rst
@@ -50,8 +50,7 @@
* U-Boot v2023.07 was released on Mon 10 July 2023.
-* The Merge Window for the next release (v2023.10) is **open** until the -rc1
- release on Mon 24 July 2023.
+* The Merge Window for the next release (v2023.10) is **closed**.
* The next branch is now **closed**.
@@ -63,9 +62,9 @@
.. The following commented out dates are for when release candidates are
planned to be tagged.
-.. For the next scheduled release, release candidates were made on::
+For the next scheduled release, release candidates were made on::
-.. * U-Boot v2023.10-rc1 was released on Mon 24 July 2023.
+* U-Boot v2023.10-rc1 was released on Tue 25 July 2023.
.. * U-Boot v2023.10-rc2 was released on Mon 07 August 2023.
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c
index 43bcc59..4736643 100644
--- a/drivers/ata/sata_ceva.c
+++ b/drivers/ata/sata_ceva.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2015 - 2016 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#include <common.h>
#include <dm.h>
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index faebbab..b3b3333 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2019 Xilinx, Inc.
- * Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#include <common.h>
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index be0ee50..1cfe0e2 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -12,6 +12,7 @@
#include <linux/bitops.h>
#include <clk-uclass.h>
#include <clk.h>
+#include <zynqmp_firmware.h>
#include <asm/arch/sys_proto.h>
#include <dm.h>
#include <linux/err.h>
@@ -269,17 +270,22 @@
case usb3_dual_ref:
return CRL_APB_USB3_DUAL_REF_CTRL;
case gem_tsu_ref:
+ case gem_tsu:
return CRL_APB_GEM_TSU_REF_CTRL;
case gem0_tx:
+ case gem0_rx:
case gem0_ref:
return CRL_APB_GEM0_REF_CTRL;
case gem1_tx:
+ case gem1_rx:
case gem1_ref:
return CRL_APB_GEM1_REF_CTRL;
case gem2_tx:
+ case gem2_rx:
case gem2_ref:
return CRL_APB_GEM2_REF_CTRL;
case gem3_tx:
+ case gem3_rx:
case gem3_ref:
return CRL_APB_GEM3_REF_CTRL;
case usb0_bus_ref:
@@ -718,6 +724,8 @@
switch (id) {
case gem0_ref ... gem3_ref:
case gem0_tx ... gem3_tx:
+ case gem0_rx ... gem3_rx:
+ case gem_tsu:
case qspi_ref ... can1_ref:
case usb0_bus_ref ... usb3_dual_ref:
return zynqmp_clk_set_peripheral_rate(priv, id,
diff --git a/drivers/clk/starfive/clk-jh7110-pll.c b/drivers/clk/starfive/clk-jh7110-pll.c
index 7492b1f..1568a1f 100644
--- a/drivers/clk/starfive/clk-jh7110-pll.c
+++ b/drivers/clk/starfive/clk-jh7110-pll.c
@@ -3,6 +3,7 @@
* Copyright (C) 2022-23 StarFive Technology Co., Ltd.
*
* Author: Yanhong Wang <yanhong.wang@starfivetech.com>
+ * Xingyu Wu <xingyu.wu@starfivetech.com>
*/
#include <common.h>
@@ -11,6 +12,8 @@
#include <clk-uclass.h>
#include <div64.h>
#include <dm/device.h>
+#include <dm/read.h>
+#include <dt-bindings/clock/starfive,jh7110-crg.h>
#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
@@ -30,6 +33,47 @@
#define CLK_DDR_BUS_PLL1_DIV4 2
#define CLK_DDR_BUS_PLL1_DIV8 3
+#define JH7110_PLL_ID_TRANS(id) ((id) + JH7110_EXTCLK_END)
+
+enum starfive_pll_type {
+ PLL0 = 0,
+ PLL1,
+ PLL2,
+ PLL_MAX = PLL2
+};
+
+struct starfive_pllx_rate {
+ u64 rate;
+ u32 prediv;
+ u32 fbdiv;
+ u32 frac;
+};
+
+struct starfive_pllx_offset {
+ u32 pd;
+ u32 prediv;
+ u32 fbdiv;
+ u32 frac;
+ u32 postdiv1;
+ u32 dacpd;
+ u32 dsmpd;
+ u32 pd_mask;
+ u32 prediv_mask;
+ u32 fbdiv_mask;
+ u32 frac_mask;
+ u32 postdiv1_mask;
+ u32 dacpd_mask;
+ u32 dsmpd_mask;
+};
+
+struct starfive_pllx_clk {
+ enum starfive_pll_type type;
+ const struct starfive_pllx_offset *offset;
+ const struct starfive_pllx_rate *rate_table;
+ int rate_count;
+ int flags;
+};
+
struct clk_jh7110_pllx {
struct clk clk;
void __iomem *base;
@@ -271,7 +315,7 @@
return jh7110_pllx_recalc_rate(clk);
}
-static const struct clk_ops clk_jh7110_ops = {
+static const struct clk_ops jh7110_clk_pllx_ops = {
.set_rate = jh7110_pllx_set_rate,
.get_rate = jh7110_pllx_recalc_rate,
};
@@ -314,8 +358,63 @@
return clk;
}
+/* PLLx clock implementation */
U_BOOT_DRIVER(jh7110_clk_pllx) = {
.name = UBOOT_DM_CLK_JH7110_PLLX,
.id = UCLASS_CLK,
+ .ops = &jh7110_clk_pllx_ops,
+ .flags = DM_FLAG_PRE_RELOC,
+};
+
+static int jh7110_pll_clk_probe(struct udevice *dev)
+{
+ void __iomem *reg = (void __iomem *)dev_read_addr_ptr(dev->parent);
+ fdt_addr_t sysreg = ofnode_get_addr(ofnode_by_compatible(ofnode_null(),
+ "starfive,jh7110-syscrg"));
+
+ if (sysreg == FDT_ADDR_T_NONE)
+ return -EINVAL;
+
+ clk_dm(JH7110_PLL_ID_TRANS(JH7110_SYSCLK_PLL0_OUT),
+ starfive_jh7110_pll("pll0_out", "oscillator", reg,
+ (void __iomem *)sysreg, &starfive_jh7110_pll0));
+ clk_dm(JH7110_PLL_ID_TRANS(JH7110_SYSCLK_PLL1_OUT),
+ starfive_jh7110_pll("pll1_out", "oscillator", reg,
+ (void __iomem *)sysreg, &starfive_jh7110_pll1));
+ clk_dm(JH7110_PLL_ID_TRANS(JH7110_SYSCLK_PLL2_OUT),
+ starfive_jh7110_pll("pll2_out", "oscillator", reg,
+ (void __iomem *)sysreg, &starfive_jh7110_pll2));
+
+ return 0;
+}
+
+static int jh7110_pll_clk_of_xlate(struct clk *clk, struct ofnode_phandle_args *args)
+{
+ if (args->args_count > 1) {
+ debug("Invalid args_count: %d\n", args->args_count);
+ return -EINVAL;
+ }
+
+ if (args->args_count)
+ clk->id = JH7110_PLL_ID_TRANS(args->args[0]);
+ else
+ clk->id = 0;
+
+ return 0;
+}
+
+static const struct udevice_id jh7110_pll_clk_of_match[] = {
+ { .compatible = "starfive,jh7110-pll", },
+ { }
+};
+
+JH7110_CLK_OPS(pll);
+
+/* PLL clk device */
+U_BOOT_DRIVER(jh7110_pll_clk) = {
+ .name = "jh7110_pll_clk",
+ .id = UCLASS_CLK,
- .ops = &clk_jh7110_ops,
+ .of_match = jh7110_pll_clk_of_match,
+ .probe = jh7110_pll_clk_probe,
+ .ops = &jh7110_pll_clk_ops,
};
diff --git a/drivers/clk/starfive/clk-jh7110.c b/drivers/clk/starfive/clk-jh7110.c
index a74b709..31aaf33 100644
--- a/drivers/clk/starfive/clk-jh7110.c
+++ b/drivers/clk/starfive/clk-jh7110.c
@@ -3,6 +3,7 @@
* Copyright (C) 2022-23 StarFive Technology Co., Ltd.
*
* Author: Yanhong Wang <yanhong.wang@starfivetech.com>
+ * Xingyu Wu <xingyu.wu@starfivetech.com>
*/
#include <common.h>
@@ -24,8 +25,10 @@
#define STARFIVE_CLK_DIV_SHIFT 0 /* [23:0] */
#define OFFSET(id) ((id) * 4)
-#define AONOFFSET(id) (((id) - JH7110_SYSCLK_END) * 4)
-#define STGOFFSET(id) (((id) - JH7110_AONCLK_END) * 4)
+
+#define JH7110_SYS_ID_TRANS(id) ((id) + JH7110_PLLCLK_END + JH7110_EXTCLK_END)
+#define JH7110_AON_ID_TRANS(id) ((id) + JH7110_SYS_ID_TRANS(JH7110_SYSCLK_END))
+#define JH7110_STG_ID_TRANS(id) ((id) + JH7110_AON_ID_TRANS(JH7110_AONCLK_END))
typedef int (*jh1710_init_fn)(struct udevice *dev);
@@ -230,224 +233,204 @@
static int jh7110_syscrg_init(struct udevice *dev)
{
struct jh7110_clk_priv *priv = dev_get_priv(dev);
- struct ofnode_phandle_args args;
- fdt_addr_t addr;
struct clk *pclk;
- int ret;
-
- ret = ofnode_parse_phandle_with_args(dev->node_, "starfive,sys-syscon", NULL, 0, 0, &args);
- if (ret)
- return ret;
- addr = ofnode_get_addr(args.node);
- if (addr == FDT_ADDR_T_NONE)
- return -EINVAL;
-
- clk_dm(JH7110_SYSCLK_PLL0_OUT,
- starfive_jh7110_pll("pll0_out", "oscillator", (void __iomem *)addr,
- priv->reg, &starfive_jh7110_pll0));
- clk_dm(JH7110_SYSCLK_PLL1_OUT,
- starfive_jh7110_pll("pll1_out", "oscillator", (void __iomem *)addr,
- priv->reg, &starfive_jh7110_pll1));
- clk_dm(JH7110_SYSCLK_PLL2_OUT,
- starfive_jh7110_pll("pll2_out", "oscillator", (void __iomem *)addr,
- priv->reg, &starfive_jh7110_pll2));
- clk_dm(JH7110_SYSCLK_CPU_ROOT,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_CPU_ROOT),
starfive_clk_mux(priv->reg, "cpu_root",
OFFSET(JH7110_SYSCLK_CPU_ROOT), 1,
cpu_root_sels, ARRAY_SIZE(cpu_root_sels)));
- clk_dm(JH7110_SYSCLK_CPU_CORE,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_CPU_CORE),
starfive_clk_divider(priv->reg,
"cpu_core", "cpu_root",
OFFSET(JH7110_SYSCLK_CPU_CORE), 3));
- clk_dm(JH7110_SYSCLK_CPU_BUS,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_CPU_BUS),
starfive_clk_divider(priv->reg,
"cpu_bus", "cpu_core",
OFFSET(JH7110_SYSCLK_CPU_BUS), 2));
- clk_dm(JH7110_SYSCLK_PERH_ROOT,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_PERH_ROOT),
starfive_clk_composite(priv->reg,
"perh_root",
perh_root_sels, ARRAY_SIZE(perh_root_sels),
OFFSET(JH7110_SYSCLK_PERH_ROOT), 1, 0, 2));
- clk_dm(JH7110_SYSCLK_BUS_ROOT,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_BUS_ROOT),
starfive_clk_mux(priv->reg, "bus_root",
OFFSET(JH7110_SYSCLK_BUS_ROOT), 1,
bus_root_sels, ARRAY_SIZE(bus_root_sels)));
- clk_dm(JH7110_SYSCLK_NOCSTG_BUS,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_NOCSTG_BUS),
starfive_clk_divider(priv->reg,
"nocstg_bus", "bus_root",
OFFSET(JH7110_SYSCLK_NOCSTG_BUS), 3));
- clk_dm(JH7110_SYSCLK_AXI_CFG0,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_AXI_CFG0),
starfive_clk_divider(priv->reg,
"axi_cfg0", "bus_root",
OFFSET(JH7110_SYSCLK_AXI_CFG0), 2));
- clk_dm(JH7110_SYSCLK_STG_AXIAHB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_STG_AXIAHB),
starfive_clk_divider(priv->reg,
"stg_axiahb", "axi_cfg0",
OFFSET(JH7110_SYSCLK_STG_AXIAHB), 2));
- clk_dm(JH7110_SYSCLK_AHB0,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_AHB0),
starfive_clk_gate(priv->reg,
"ahb0", "stg_axiahb",
OFFSET(JH7110_SYSCLK_AHB0)));
- clk_dm(JH7110_SYSCLK_AHB1,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_AHB1),
starfive_clk_gate(priv->reg,
"ahb1", "stg_axiahb",
OFFSET(JH7110_SYSCLK_AHB1)));
- clk_dm(JH7110_SYSCLK_APB_BUS,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_APB_BUS),
starfive_clk_divider(priv->reg,
"apb_bus", "stg_axiahb",
OFFSET(JH7110_SYSCLK_APB_BUS), 4));
- clk_dm(JH7110_SYSCLK_APB0,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_APB0),
starfive_clk_gate(priv->reg,
"apb0", "apb_bus",
OFFSET(JH7110_SYSCLK_APB0)));
- clk_dm(JH7110_SYSCLK_QSPI_AHB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_QSPI_AHB),
starfive_clk_gate(priv->reg,
"qspi_ahb", "ahb1",
OFFSET(JH7110_SYSCLK_QSPI_AHB)));
- clk_dm(JH7110_SYSCLK_QSPI_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_QSPI_APB),
starfive_clk_gate(priv->reg,
"qspi_apb", "apb_bus",
OFFSET(JH7110_SYSCLK_QSPI_APB)));
- clk_dm(JH7110_SYSCLK_QSPI_REF_SRC,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_QSPI_REF_SRC),
starfive_clk_divider(priv->reg,
"qspi_ref_src", "pll0_out",
OFFSET(JH7110_SYSCLK_QSPI_REF_SRC), 5));
- clk_dm(JH7110_SYSCLK_QSPI_REF,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_QSPI_REF),
starfive_clk_composite(priv->reg,
"qspi_ref",
qspi_ref_sels, ARRAY_SIZE(qspi_ref_sels),
OFFSET(JH7110_SYSCLK_QSPI_REF), 1, 1, 0));
- clk_dm(JH7110_SYSCLK_SDIO0_AHB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_SDIO0_AHB),
starfive_clk_gate(priv->reg,
"sdio0_ahb", "ahb0",
OFFSET(JH7110_SYSCLK_SDIO0_AHB)));
- clk_dm(JH7110_SYSCLK_SDIO1_AHB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_SDIO1_AHB),
starfive_clk_gate(priv->reg,
"sdio1_ahb", "ahb0",
OFFSET(JH7110_SYSCLK_SDIO1_AHB)));
- clk_dm(JH7110_SYSCLK_SDIO0_SDCARD,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_SDIO0_SDCARD),
starfive_clk_fix_parent_composite(priv->reg,
"sdio0_sdcard", "axi_cfg0",
OFFSET(JH7110_SYSCLK_SDIO0_SDCARD), 0, 1, 4));
- clk_dm(JH7110_SYSCLK_SDIO1_SDCARD,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_SDIO1_SDCARD),
starfive_clk_fix_parent_composite(priv->reg,
"sdio1_sdcard", "axi_cfg0",
OFFSET(JH7110_SYSCLK_SDIO1_SDCARD), 0, 1, 4));
- clk_dm(JH7110_SYSCLK_USB_125M,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_USB_125M),
starfive_clk_divider(priv->reg,
"usb_125m", "pll0_out",
OFFSET(JH7110_SYSCLK_USB_125M), 4));
- clk_dm(JH7110_SYSCLK_NOC_BUS_STG_AXI,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_NOC_BUS_STG_AXI),
starfive_clk_gate(priv->reg,
"noc_bus_stg_axi", "nocstg_bus",
OFFSET(JH7110_SYSCLK_NOC_BUS_STG_AXI)));
- clk_dm(JH7110_SYSCLK_GMAC1_AHB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_AHB),
starfive_clk_gate(priv->reg,
"gmac1_ahb", "ahb0",
OFFSET(JH7110_SYSCLK_GMAC1_AHB)));
- clk_dm(JH7110_SYSCLK_GMAC1_AXI,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_AXI),
starfive_clk_gate(priv->reg,
"gmac1_axi", "stg_axiahb",
OFFSET(JH7110_SYSCLK_GMAC1_AXI)));
- clk_dm(JH7110_SYSCLK_GMAC_SRC,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC_SRC),
starfive_clk_divider(priv->reg,
"gmac_src", "pll0_out",
OFFSET(JH7110_SYSCLK_GMAC_SRC), 3));
- clk_dm(JH7110_SYSCLK_GMAC1_GTXCLK,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_GTXCLK),
starfive_clk_divider(priv->reg,
"gmac1_gtxclk", "pll0_out",
OFFSET(JH7110_SYSCLK_GMAC1_GTXCLK), 4));
- clk_dm(JH7110_SYSCLK_GMAC1_GTXC,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_GTXC),
starfive_clk_gate(priv->reg,
"gmac1_gtxc", "gmac1_gtxclk",
OFFSET(JH7110_SYSCLK_GMAC1_GTXC)));
- clk_dm(JH7110_SYSCLK_GMAC1_RMII_RTX,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_RMII_RTX),
starfive_clk_divider(priv->reg,
"gmac1_rmii_rtx", "gmac1-rmii-refin-clock",
OFFSET(JH7110_SYSCLK_GMAC1_RMII_RTX), 5));
- clk_dm(JH7110_SYSCLK_GMAC1_PTP,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_PTP),
starfive_clk_gate_divider(priv->reg,
"gmac1_ptp", "gmac_src",
OFFSET(JH7110_SYSCLK_GMAC1_PTP), 5));
- clk_dm(JH7110_SYSCLK_GMAC1_RX,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_RX),
starfive_clk_mux(priv->reg, "gmac1_rx",
OFFSET(JH7110_SYSCLK_GMAC1_RX), 1,
gmac1_rx_sels, ARRAY_SIZE(gmac1_rx_sels)));
- clk_dm(JH7110_SYSCLK_GMAC1_TX,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_TX),
starfive_clk_composite(priv->reg,
"gmac1_tx",
gmac1_tx_sels, ARRAY_SIZE(gmac1_tx_sels),
OFFSET(JH7110_SYSCLK_GMAC1_TX), 1, 1, 0));
- clk_dm(JH7110_SYSCLK_GMAC1_TX_INV,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC1_TX_INV),
starfive_clk_inv(priv->reg,
"gmac1_tx_inv", "gmac1_tx",
OFFSET(JH7110_SYSCLK_GMAC1_TX_INV)));
- clk_dm(JH7110_SYSCLK_GMAC0_GTXCLK,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC0_GTXCLK),
starfive_clk_gate_divider(priv->reg,
"gmac0_gtxclk", "pll0_out",
OFFSET(JH7110_SYSCLK_GMAC0_GTXCLK), 4));
- clk_dm(JH7110_SYSCLK_GMAC0_PTP,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC0_PTP),
starfive_clk_gate_divider(priv->reg,
"gmac0_ptp", "gmac_src",
OFFSET(JH7110_SYSCLK_GMAC0_PTP), 5));
- clk_dm(JH7110_SYSCLK_GMAC0_GTXC,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_GMAC0_GTXC),
starfive_clk_gate(priv->reg,
"gmac0_gtxc", "gmac0_gtxclk",
OFFSET(JH7110_SYSCLK_GMAC0_GTXC)));
- clk_dm(JH7110_SYSCLK_UART0_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART0_APB),
starfive_clk_gate(priv->reg,
"uart0_apb", "apb0",
OFFSET(JH7110_SYSCLK_UART0_APB)));
- clk_dm(JH7110_SYSCLK_UART0_CORE,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART0_CORE),
starfive_clk_gate(priv->reg,
"uart0_core", "oscillator",
OFFSET(JH7110_SYSCLK_UART0_CORE)));
- clk_dm(JH7110_SYSCLK_UART1_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART1_APB),
starfive_clk_gate(priv->reg,
"uart1_apb", "apb0",
OFFSET(JH7110_SYSCLK_UART1_APB)));
- clk_dm(JH7110_SYSCLK_UART1_CORE,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART1_CORE),
starfive_clk_gate(priv->reg,
"uart1_core", "oscillator",
OFFSET(JH7110_SYSCLK_UART1_CORE)));
- clk_dm(JH7110_SYSCLK_UART2_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART2_APB),
starfive_clk_gate(priv->reg,
"uart2_apb", "apb0",
OFFSET(JH7110_SYSCLK_UART2_APB)));
- clk_dm(JH7110_SYSCLK_UART2_CORE,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART2_CORE),
starfive_clk_gate(priv->reg,
"uart2_core", "oscillator",
OFFSET(JH7110_SYSCLK_UART2_CORE)));
- clk_dm(JH7110_SYSCLK_UART3_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART3_APB),
starfive_clk_gate(priv->reg,
"uart3_apb", "apb0",
OFFSET(JH7110_SYSCLK_UART3_APB)));
- clk_dm(JH7110_SYSCLK_UART3_CORE,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART3_CORE),
starfive_clk_gate_divider(priv->reg,
"uart3_core", "perh_root",
OFFSET(JH7110_SYSCLK_UART3_CORE), 8));
- clk_dm(JH7110_SYSCLK_UART4_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART4_APB),
starfive_clk_gate(priv->reg,
"uart4_apb", "apb0",
OFFSET(JH7110_SYSCLK_UART4_APB)));
- clk_dm(JH7110_SYSCLK_UART4_CORE,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART4_CORE),
starfive_clk_gate_divider(priv->reg,
"uart4_core", "perh_root",
OFFSET(JH7110_SYSCLK_UART4_CORE), 8));
- clk_dm(JH7110_SYSCLK_UART5_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART5_APB),
starfive_clk_gate(priv->reg,
"uart5_apb", "apb0",
OFFSET(JH7110_SYSCLK_UART5_APB)));
- clk_dm(JH7110_SYSCLK_UART5_CORE,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_UART5_CORE),
starfive_clk_gate_divider(priv->reg,
"uart5_core", "perh_root",
OFFSET(JH7110_SYSCLK_UART5_CORE), 8));
- clk_dm(JH7110_SYSCLK_I2C2_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_I2C2_APB),
starfive_clk_gate(priv->reg,
"i2c2_apb", "apb0",
OFFSET(JH7110_SYSCLK_I2C2_APB)));
- clk_dm(JH7110_SYSCLK_I2C5_APB,
+ clk_dm(JH7110_SYS_ID_TRANS(JH7110_SYSCLK_I2C5_APB),
starfive_clk_gate(priv->reg,
"i2c5_apb", "apb0",
OFFSET(JH7110_SYSCLK_I2C5_APB)));
@@ -463,39 +446,39 @@
{
struct jh7110_clk_priv *priv = dev_get_priv(dev);
- clk_dm(JH7110_AONCLK_OSC_DIV4,
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_OSC_DIV4),
starfive_clk_divider(priv->reg,
"osc_div4", "oscillator",
- AONOFFSET(JH7110_AONCLK_OSC_DIV4), 5));
- clk_dm(JH7110_AONCLK_APB_FUNC,
+ OFFSET(JH7110_AONCLK_OSC_DIV4), 5));
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_APB_FUNC),
starfive_clk_mux(priv->reg, "apb_func",
- AONOFFSET(JH7110_AONCLK_APB_FUNC), 1,
+ OFFSET(JH7110_AONCLK_APB_FUNC), 1,
apb_func_sels, ARRAY_SIZE(apb_func_sels)));
- clk_dm(JH7110_AONCLK_GMAC0_AHB,
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_GMAC0_AHB),
starfive_clk_gate(priv->reg,
"gmac0_ahb", "stg_axiahb",
- AONOFFSET(JH7110_AONCLK_GMAC0_AHB)));
- clk_dm(JH7110_AONCLK_GMAC0_AXI,
+ OFFSET(JH7110_AONCLK_GMAC0_AHB)));
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_GMAC0_AXI),
starfive_clk_gate(priv->reg,
"gmac0_axi", "stg_axiahb",
- AONOFFSET(JH7110_AONCLK_GMAC0_AXI)));
- clk_dm(JH7110_AONCLK_GMAC0_RMII_RTX,
+ OFFSET(JH7110_AONCLK_GMAC0_AXI)));
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_GMAC0_RMII_RTX),
starfive_clk_divider(priv->reg,
"gmac0_rmii_rtx", "gmac0-rmii-refin-clock",
- AONOFFSET(JH7110_AONCLK_GMAC0_RMII_RTX), 5));
- clk_dm(JH7110_AONCLK_GMAC0_TX,
+ OFFSET(JH7110_AONCLK_GMAC0_RMII_RTX), 5));
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_GMAC0_TX),
starfive_clk_composite(priv->reg,
"gmac0_tx", gmac0_tx_sels,
ARRAY_SIZE(gmac0_tx_sels),
- AONOFFSET(JH7110_AONCLK_GMAC0_TX), 1, 1, 0));
- clk_dm(JH7110_AONCLK_GMAC0_TX_INV,
+ OFFSET(JH7110_AONCLK_GMAC0_TX), 1, 1, 0));
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_GMAC0_TX_INV),
starfive_clk_inv(priv->reg,
"gmac0_tx_inv", "gmac0_tx",
- AONOFFSET(JH7110_AONCLK_GMAC0_TX_INV)));
- clk_dm(JH7110_AONCLK_OTPC_APB,
+ OFFSET(JH7110_AONCLK_GMAC0_TX_INV)));
+ clk_dm(JH7110_AON_ID_TRANS(JH7110_AONCLK_OTPC_APB),
starfive_clk_gate(priv->reg,
"otpc_apb", "apb_bus",
- AONOFFSET(JH7110_AONCLK_OTPC_APB)));
+ OFFSET(JH7110_AONCLK_OTPC_APB)));
return 0;
}
@@ -504,57 +487,57 @@
{
struct jh7110_clk_priv *priv = dev_get_priv(dev);
- clk_dm(JH7110_STGCLK_USB_APB,
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_USB_APB),
starfive_clk_gate(priv->reg,
"usb_apb", "apb_bus",
- STGOFFSET(JH7110_STGCLK_USB_APB)));
- clk_dm(JH7110_STGCLK_USB_UTMI_APB,
+ OFFSET(JH7110_STGCLK_USB_APB)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_USB_UTMI_APB),
starfive_clk_gate(priv->reg,
"usb_utmi_apb", "apb_bus",
- STGOFFSET(JH7110_STGCLK_USB_UTMI_APB)));
- clk_dm(JH7110_STGCLK_USB_AXI,
+ OFFSET(JH7110_STGCLK_USB_UTMI_APB)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_USB_AXI),
starfive_clk_gate(priv->reg,
"usb_axi", "stg_axiahb",
- STGOFFSET(JH7110_STGCLK_USB_AXI)));
- clk_dm(JH7110_STGCLK_USB_LPM,
+ OFFSET(JH7110_STGCLK_USB_AXI)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_USB_LPM),
starfive_clk_gate_divider(priv->reg,
"usb_lpm", "oscillator",
- STGOFFSET(JH7110_STGCLK_USB_LPM), 2));
- clk_dm(JH7110_STGCLK_USB_STB,
+ OFFSET(JH7110_STGCLK_USB_LPM), 2));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_USB_STB),
starfive_clk_gate_divider(priv->reg,
"usb_stb", "oscillator",
- STGOFFSET(JH7110_STGCLK_USB_STB), 3));
- clk_dm(JH7110_STGCLK_USB_APP_125,
+ OFFSET(JH7110_STGCLK_USB_STB), 3));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_USB_APP_125),
starfive_clk_gate(priv->reg,
"usb_app_125", "usb_125m",
- STGOFFSET(JH7110_STGCLK_USB_APP_125)));
- clk_dm(JH7110_STGCLK_USB_REFCLK,
+ OFFSET(JH7110_STGCLK_USB_APP_125)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_USB_REFCLK),
starfive_clk_divider(priv->reg, "usb_refclk", "oscillator",
- STGOFFSET(JH7110_STGCLK_USB_REFCLK), 2));
- clk_dm(JH7110_STGCLK_PCIE0_AXI,
+ OFFSET(JH7110_STGCLK_USB_REFCLK), 2));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_PCIE0_AXI),
starfive_clk_gate(priv->reg,
"pcie0_axi", "stg_axiahb",
- STGOFFSET(JH7110_STGCLK_PCIE0_AXI)));
- clk_dm(JH7110_STGCLK_PCIE0_APB,
+ OFFSET(JH7110_STGCLK_PCIE0_AXI)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_PCIE0_APB),
starfive_clk_gate(priv->reg,
"pcie0_apb", "apb_bus",
- STGOFFSET(JH7110_STGCLK_PCIE0_APB)));
- clk_dm(JH7110_STGCLK_PCIE0_TL,
+ OFFSET(JH7110_STGCLK_PCIE0_APB)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_PCIE0_TL),
starfive_clk_gate(priv->reg,
"pcie0_tl", "stg_axiahb",
- STGOFFSET(JH7110_STGCLK_PCIE0_TL)));
- clk_dm(JH7110_STGCLK_PCIE1_AXI,
+ OFFSET(JH7110_STGCLK_PCIE0_TL)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_PCIE1_AXI),
starfive_clk_gate(priv->reg,
"pcie1_axi", "stg_axiahb",
- STGOFFSET(JH7110_STGCLK_PCIE1_AXI)));
- clk_dm(JH7110_STGCLK_PCIE1_APB,
+ OFFSET(JH7110_STGCLK_PCIE1_AXI)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_PCIE1_APB),
starfive_clk_gate(priv->reg,
"pcie1_apb", "apb_bus",
- STGOFFSET(JH7110_STGCLK_PCIE1_APB)));
- clk_dm(JH7110_STGCLK_PCIE1_TL,
+ OFFSET(JH7110_STGCLK_PCIE1_APB)));
+ clk_dm(JH7110_STG_ID_TRANS(JH7110_STGCLK_PCIE1_TL),
starfive_clk_gate(priv->reg,
"pcie1_tl", "stg_axiahb",
- STGOFFSET(JH7110_STGCLK_PCIE1_TL)));
+ OFFSET(JH7110_STGCLK_PCIE1_TL)));
return 0;
}
@@ -579,25 +562,104 @@
dev_ofnode(dev), NULL);
}
+static int jh7110_sys_clk_of_xlate(struct clk *clk, struct ofnode_phandle_args *args)
+{
+ if (args->args_count > 1) {
+ debug("Invalid args_count: %d\n", args->args_count);
+ return -EINVAL;
+ }
+
+ if (args->args_count)
+ clk->id = JH7110_SYS_ID_TRANS(args->args[0]);
+ else
+ clk->id = 0;
+
+ return 0;
+}
+
-static const struct udevice_id jh7110_clk_of_match[] = {
+static int jh7110_aon_clk_of_xlate(struct clk *clk, struct ofnode_phandle_args *args)
+{
+ if (args->args_count > 1) {
+ debug("Invalid args_count: %d\n", args->args_count);
+ return -EINVAL;
+ }
+
+ if (args->args_count)
+ clk->id = JH7110_AON_ID_TRANS(args->args[0]);
+ else
+ clk->id = 0;
+
+ return 0;
+}
+
+static int jh7110_stg_clk_of_xlate(struct clk *clk, struct ofnode_phandle_args *args)
+{
+ if (args->args_count > 1) {
+ debug("Invalid args_count: %d\n", args->args_count);
+ return -EINVAL;
+ }
+
+ if (args->args_count)
+ clk->id = JH7110_STG_ID_TRANS(args->args[0]);
+ else
+ clk->id = 0;
+
+ return 0;
+}
+
+static const struct udevice_id jh7110_sys_clk_of_match[] = {
{ .compatible = "starfive,jh7110-syscrg",
.data = (ulong)&jh7110_syscrg_init
},
- { .compatible = "starfive,jh7110-stgcrg",
- .data = (ulong)&jh7110_stgcrg_init
- },
+ { }
+};
+
+JH7110_CLK_OPS(sys);
+
+U_BOOT_DRIVER(jh7110_sys_clk) = {
+ .name = "jh7110_sys_clk",
+ .id = UCLASS_CLK,
+ .of_match = jh7110_sys_clk_of_match,
+ .probe = jh7110_clk_probe,
+ .ops = &jh7110_sys_clk_ops,
+ .priv_auto = sizeof(struct jh7110_clk_priv),
+ .bind = jh7110_clk_bind,
+};
+
+static const struct udevice_id jh7110_aon_clk_of_match[] = {
{ .compatible = "starfive,jh7110-aoncrg",
.data = (ulong)&jh7110_aoncrg_init
},
{ }
};
-U_BOOT_DRIVER(jh7110_clk) = {
- .name = "jh7110_clk",
+JH7110_CLK_OPS(aon);
+
+U_BOOT_DRIVER(jh7110_aon_clk) = {
+ .name = "jh7110_aon_clk",
+ .id = UCLASS_CLK,
+ .of_match = jh7110_aon_clk_of_match,
+ .probe = jh7110_clk_probe,
+ .ops = &jh7110_aon_clk_ops,
+ .priv_auto = sizeof(struct jh7110_clk_priv),
+ .bind = jh7110_clk_bind,
+};
+
+static const struct udevice_id jh7110_stg_clk_of_match[] = {
+ { .compatible = "starfive,jh7110-stgcrg",
+ .data = (ulong)&jh7110_stgcrg_init
+ },
+ { }
+};
+
+JH7110_CLK_OPS(stg);
+
+U_BOOT_DRIVER(jh7110_stg_clk) = {
+ .name = "jh7110_stg_clk",
.id = UCLASS_CLK,
- .of_match = jh7110_clk_of_match,
+ .of_match = jh7110_stg_clk_of_match,
.probe = jh7110_clk_probe,
- .ops = &ccf_clk_ops,
+ .ops = &jh7110_stg_clk_ops,
.priv_auto = sizeof(struct jh7110_clk_priv),
- .bind = jh7110_clk_bind,
+ .bind = jh7110_clk_bind,
};
diff --git a/drivers/clk/starfive/clk.h b/drivers/clk/starfive/clk.h
index 4dee12f..9d20ed0 100644
--- a/drivers/clk/starfive/clk.h
+++ b/drivers/clk/starfive/clk.h
@@ -1,57 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
- * Copyright (C) 2022 Starfive, Inc.
+ * Copyright (C) 2022 StarFive Technology Co., Ltd.
* Author: Yanhong Wang <yanhong.wang@starfivetech.com>
- *
*/
#ifndef __CLK_STARFIVE_H
#define __CLK_STARFIVE_H
-enum starfive_pll_type {
- PLL0 = 0,
- PLL1,
- PLL2,
- PLL_MAX = PLL2
-};
+/* the number of fixed clocks in DTS */
+#define JH7110_EXTCLK_END 12
-struct starfive_pllx_rate {
- u64 rate;
- u32 prediv;
- u32 fbdiv;
- u32 frac;
-};
+#define _JH7110_CLK_OPS(_name) \
+static const struct clk_ops jh7110_##_name##_clk_ops = { \
+ .set_rate = ccf_clk_set_rate, \
+ .get_rate = ccf_clk_get_rate, \
+ .set_parent = ccf_clk_set_parent, \
+ .enable = ccf_clk_enable, \
+ .disable = ccf_clk_disable, \
+ .of_xlate = jh7110_##_name##_clk_of_xlate, \
+}
-struct starfive_pllx_offset {
- u32 pd;
- u32 prediv;
- u32 fbdiv;
- u32 frac;
- u32 postdiv1;
- u32 dacpd;
- u32 dsmpd;
- u32 pd_mask;
- u32 prediv_mask;
- u32 fbdiv_mask;
- u32 frac_mask;
- u32 postdiv1_mask;
- u32 dacpd_mask;
- u32 dsmpd_mask;
-};
-
-struct starfive_pllx_clk {
- enum starfive_pll_type type;
- const struct starfive_pllx_offset *offset;
- const struct starfive_pllx_rate *rate_table;
- int rate_count;
- int flags;
-};
-
-extern struct starfive_pllx_clk starfive_jh7110_pll0;
-extern struct starfive_pllx_clk starfive_jh7110_pll1;
-extern struct starfive_pllx_clk starfive_jh7110_pll2;
+#define JH7110_CLK_OPS(name) _JH7110_CLK_OPS(name)
-struct clk *starfive_jh7110_pll(const char *name, const char *parent_name,
- void __iomem *base, void __iomem *sysreg,
- const struct starfive_pllx_clk *pll_clk);
#endif
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 81a3079..57f1044 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -593,11 +593,14 @@
int of_property_match_string(const struct device_node *np, const char *propname,
const char *string)
{
- const struct property *prop = of_find_property(np, propname, NULL);
+ int len = 0;
+ const struct property *prop = of_find_property(np, propname, &len);
size_t l;
int i;
const char *p, *end;
+ if (!prop && len == -FDT_ERR_NOTFOUND)
+ return -ENOENT;
if (!prop)
return -EINVAL;
if (!prop->value)
diff --git a/drivers/core/read.c b/drivers/core/read.c
index 0289a2e..5749473 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -211,10 +211,9 @@
return dev_remap_addr_index(dev, 0);
}
-fdt_addr_t dev_read_addr_size(const struct udevice *dev, const char *property,
- fdt_size_t *sizep)
+fdt_addr_t dev_read_addr_size(const struct udevice *dev, fdt_size_t *sizep)
{
- return ofnode_get_addr_size(dev_ofnode(dev), property, sizep);
+ return dev_read_addr_size_index(dev, 0, sizep);
}
const char *dev_read_name(const struct udevice *dev)
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 9d25c40..060918e 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -19,8 +19,6 @@
#include <linux/compat.h>
#include <android_image.h>
-#define FASTBOOT_MAX_BLK_WRITE 16384
-
#define BOOT_PARTITION_NAME "boot"
struct fb_mmc_sparse {
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index 7f6b6bc..81e6d8f 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -244,6 +244,21 @@
}
#endif
+static int fpga_load_event_notify(const void *buf, size_t bsize, int result)
+{
+ if (CONFIG_IS_ENABLED(EVENT)) {
+ struct event_fpga_load load = {
+ .buf = buf,
+ .bsize = bsize,
+ .result = result
+ };
+
+ return event_notify(EVT_FPGA_LOAD, &load, sizeof(load));
+ }
+
+ return 0;
+}
+
/*
* Generic multiplexing code
*/
@@ -251,6 +266,7 @@
int flags)
{
int ret_val = FPGA_FAIL; /* assume failure */
+ int ret_notify;
const fpga_desc *desc = fpga_validate(devnum, buf, bsize,
(char *)__func__);
@@ -284,6 +300,10 @@
}
}
+ ret_notify = fpga_load_event_notify(buf, bsize, ret_val);
+ if (ret_notify)
+ return ret_notify;
+
return ret_val;
}
diff --git a/drivers/fpga/versalpl.c b/drivers/fpga/versalpl.c
index d3876a8..be58db5 100644
--- a/drivers/fpga/versalpl.c
+++ b/drivers/fpga/versalpl.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/*
* (C) Copyright 2019, Xilinx, Inc,
- * Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#include <common.h>
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index 7b5128f..b1f201f 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
/*
* (C) Copyright 2015 - 2016, Xilinx, Inc,
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad <siva.durga.paladugu@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad <siva.durga.prasad.paladugu@amd.com>>
*/
#include <console.h>
diff --git a/drivers/led/led_bcm6858.c b/drivers/led/led_bcm6858.c
index 6b36986..397dc0d 100644
--- a/drivers/led/led_bcm6858.c
+++ b/drivers/led/led_bcm6858.c
@@ -180,63 +180,71 @@
static int bcm6858_led_probe(struct udevice *dev)
{
- struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev);
+ struct bcm6858_led_priv *priv = dev_get_priv(dev);
+ void __iomem *regs;
+ unsigned int pin, brightness;
- /* Top-level LED node */
- if (!uc_plat->label) {
- void __iomem *regs;
- u32 set_bits = 0;
+ regs = dev_remap_addr(dev_get_parent(dev));
+ if (!regs)
+ return -EINVAL;
- regs = dev_remap_addr(dev);
- if (!regs)
- return -EINVAL;
+ pin = dev_read_u32_default(dev, "reg", LEDS_MAX);
+ if (pin >= LEDS_MAX)
+ return -EINVAL;
- if (dev_read_bool(dev, "brcm,serial-led-msb-first"))
- set_bits |= LED_CTRL_SERIAL_LED_MSB_FIRST;
- if (dev_read_bool(dev, "brcm,serial-led-en-pol"))
- set_bits |= LED_CTRL_SERIAL_LED_EN_POL;
- if (dev_read_bool(dev, "brcm,serial-led-clk-pol"))
- set_bits |= LED_CTRL_SERIAL_LED_CLK_POL;
- if (dev_read_bool(dev, "brcm,serial-led-data-ppol"))
- set_bits |= LED_CTRL_SERIAL_LED_DATA_PPOL;
- if (dev_read_bool(dev, "brcm,led-test-mode"))
- set_bits |= LED_CTRL_LED_TEST_MODE;
+ priv->regs = regs;
+ priv->pin = pin;
- clrsetbits_32(regs + LED_CTRL_REG, ~0, set_bits);
- } else {
- struct bcm6858_led_priv *priv = dev_get_priv(dev);
- void __iomem *regs;
- unsigned int pin, brightness;
+ /* this led is managed by software */
+ clrbits_32(regs + LED_HW_LED_EN_REG, 1 << pin);
- regs = dev_remap_addr(dev_get_parent(dev));
- if (!regs)
- return -EINVAL;
+ /* configure the polarity */
+ if (dev_read_bool(dev, "active-low"))
+ clrbits_32(regs + LED_PLED_OP_PPOL_REG, 1 << pin);
+ else
+ setbits_32(regs + LED_PLED_OP_PPOL_REG, 1 << pin);
- pin = dev_read_u32_default(dev, "reg", LEDS_MAX);
- if (pin >= LEDS_MAX)
- return -EINVAL;
+ brightness = dev_read_u32_default(dev, "default-brightness",
+ LEDS_MAX_BRIGHTNESS);
+ led_set_brightness(dev, brightness);
- priv->regs = regs;
- priv->pin = pin;
+ return 0;
+}
- /* this led is managed by software */
- clrbits_32(regs + LED_HW_LED_EN_REG, 1 << pin);
+U_BOOT_DRIVER(bcm6858_led) = {
+ .name = "bcm6858-led",
+ .id = UCLASS_LED,
+ .probe = bcm6858_led_probe,
+ .priv_auto = sizeof(struct bcm6858_led_priv),
+ .ops = &bcm6858_led_ops,
+};
- /* configure the polarity */
- if (dev_read_bool(dev, "active-low"))
- clrbits_32(regs + LED_PLED_OP_PPOL_REG, 1 << pin);
- else
- setbits_32(regs + LED_PLED_OP_PPOL_REG, 1 << pin);
+static int bcm6858_led_wrap_probe(struct udevice *dev)
+{
+ void __iomem *regs;
+ u32 set_bits = 0;
- brightness = dev_read_u32_default(dev, "default-brightness",
- LEDS_MAX_BRIGHTNESS);
- led_set_brightness(dev, brightness);
- }
+ regs = dev_remap_addr(dev);
+ if (!regs)
+ return -EINVAL;
+
+ if (dev_read_bool(dev, "brcm,serial-led-msb-first"))
+ set_bits |= LED_CTRL_SERIAL_LED_MSB_FIRST;
+ if (dev_read_bool(dev, "brcm,serial-led-en-pol"))
+ set_bits |= LED_CTRL_SERIAL_LED_EN_POL;
+ if (dev_read_bool(dev, "brcm,serial-led-clk-pol"))
+ set_bits |= LED_CTRL_SERIAL_LED_CLK_POL;
+ if (dev_read_bool(dev, "brcm,serial-led-data-ppol"))
+ set_bits |= LED_CTRL_SERIAL_LED_DATA_PPOL;
+ if (dev_read_bool(dev, "brcm,led-test-mode"))
+ set_bits |= LED_CTRL_LED_TEST_MODE;
+
+ clrsetbits_32(regs + LED_CTRL_REG, ~0, set_bits);
return 0;
}
-static int bcm6858_led_bind(struct udevice *parent)
+static int bcm6858_led_wrap_bind(struct udevice *parent)
{
ofnode node;
@@ -259,12 +267,10 @@
{ /* sentinel */ }
};
-U_BOOT_DRIVER(bcm6858_led) = {
- .name = "bcm6858-led",
- .id = UCLASS_LED,
+U_BOOT_DRIVER(bcm6858_led_wrap) = {
+ .name = "bcm6858_led_wrap",
+ .id = UCLASS_NOP,
.of_match = bcm6858_led_ids,
- .bind = bcm6858_led_bind,
- .probe = bcm6858_led_probe,
- .priv_auto = sizeof(struct bcm6858_led_priv),
- .ops = &bcm6858_led_ops,
+ .probe = bcm6858_led_wrap_probe,
+ .bind = bcm6858_led_wrap_bind,
};
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c
index a862e55..8158084 100644
--- a/drivers/mailbox/k3-sec-proxy.c
+++ b/drivers/mailbox/k3-sec-proxy.c
@@ -94,11 +94,6 @@
return readl(addr + offset);
}
-static inline void sp_writel(void __iomem *addr, unsigned int offset, u32 data)
-{
- writel(data, addr + offset);
-}
-
/**
* k3_sec_proxy_of_xlate() - Translation of phandle to channel
* @chan: Mailbox channel
@@ -241,15 +236,20 @@
/* Ensure all unused data is 0 */
data_trail &= 0xFFFFFFFF >> (8 * (sizeof(u32) - trail_bytes));
writel(data_trail, data_reg);
- data_reg++;
+ data_reg += sizeof(u32);
}
/*
* 'data_reg' indicates next register to write. If we did not already
* write on tx complete reg(last reg), we must do so for transmit
+ * In addition, we also need to make sure all intermediate data
+ * registers(if any required), are reset to 0 for TISCI backward
+ * compatibility to be maintained.
*/
- if (data_reg <= (spt->data + spm->desc->data_end_offset))
- sp_writel(spt->data, spm->desc->data_end_offset, 0);
+ while (data_reg <= (spt->data + spm->desc->data_end_offset)) {
+ writel(0x0, data_reg);
+ data_reg += sizeof(u32);
+ }
debug("%s: Message successfully sent on thread %ld\n",
__func__, chan->id);
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index 37b0bee..5347ba9 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -15,6 +15,9 @@
#define ATMEL_SDHC_MIN_FREQ 400000
#define ATMEL_SDHC_GCK_RATE 240000000
+#define ATMEL_SDHC_MC1R 0x204
+#define ATMEL_SDHC_MC1R_FCD 0x80
+
#ifndef CONFIG_DM_MMC
int atmel_sdhci_init(void *regbase, u32 id)
{
@@ -52,11 +55,37 @@
struct mmc mmc;
};
+static void atmel_sdhci_config_fcd(struct sdhci_host *host)
+{
+ u8 mc1r;
+
+ /* If nonremovable, assume that the card is always present.
+ *
+ * WA: SAMA5D2 doesn't drive CMD if using CD GPIO line.
+ */
+ if ((host->mmc->cfg->host_caps & MMC_CAP_NONREMOVABLE)
+#if CONFIG_IS_ENABLED(DM_GPIO)
+ || dm_gpio_get_value(&host->cd_gpio) >= 0
+#endif
+ ) {
+ sdhci_readb(host, ATMEL_SDHC_MC1R);
+ mc1r |= ATMEL_SDHC_MC1R_FCD;
+ sdhci_writeb(host, mc1r, ATMEL_SDHC_MC1R);
+ }
+}
+
static int atmel_sdhci_deferred_probe(struct sdhci_host *host)
{
struct udevice *dev = host->mmc->dev;
+ int ret;
- return sdhci_probe(dev);
+ ret = sdhci_probe(dev);
+ if (ret)
+ return ret;
+
+ atmel_sdhci_config_fcd(host);
+
+ return 0;
}
static const struct sdhci_ops atmel_sdhci_ops = {
@@ -120,7 +149,13 @@
clk_free(&clk);
+ ret = sdhci_probe(dev);
+ if (ret)
+ return ret;
+
- return sdhci_probe(dev);
+ atmel_sdhci_config_fcd(host);
+
+ return 0;
}
static int atmel_sdhci_bind(struct udevice *dev)
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index e779251..935540d 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -422,7 +422,8 @@
mdelay(1);
- arasan_zynqmp_dll_reset(host, priv->node_id);
+ if (device_is_compatible(mmc->dev, "xlnx,zynqmp-8.9a"))
+ arasan_zynqmp_dll_reset(host, priv->node_id);
sdhci_writel(host, SDHCI_INT_DATA_AVAIL, SDHCI_INT_ENABLE);
sdhci_writel(host, SDHCI_INT_DATA_AVAIL, SDHCI_SIGNAL_ENABLE);
@@ -468,7 +469,9 @@
}
udelay(1);
- arasan_zynqmp_dll_reset(host, priv->node_id);
+
+ if (device_is_compatible(mmc->dev, "xlnx,zynqmp-8.9a"))
+ arasan_zynqmp_dll_reset(host, priv->node_id);
/* Enable only interrupts served by the SD controller */
sdhci_writel(host, SDHCI_INT_DATA_MASK | SDHCI_INT_CMD_MASK,
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 5fa88da..c56840c 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -128,7 +128,7 @@
config FLASH_CFI_MTD
bool "Enable CFI MTD driver"
- depends on FLASH_CFI_DRIVER
+ depends on FLASH_CFI_DRIVER && MTD
help
This option enables the building of the cfi_mtd driver
in the drivers directory. The driver exports CFI flash
diff --git a/drivers/mtd/nand/raw/zynq_nand.c b/drivers/mtd/nand/raw/zynq_nand.c
index 9e3ee74..545fdd7 100644
--- a/drivers/mtd/nand/raw/zynq_nand.c
+++ b/drivers/mtd/nand/raw/zynq_nand.c
@@ -285,7 +285,7 @@
{
struct nand_chip *nand_chip = mtd_to_nand(mtd);
struct nand_drv *smc = nand_get_controller_data(nand_chip);
- u32 status;
+ int status;
/* disable interrupts */
writel(ZYNQ_NAND_CLR_CONFIG, &smc->reg->cfr);
@@ -332,7 +332,7 @@
struct nand_drv *smc = nand_get_controller_data(nand_chip);
u32 ecc_value = 0;
u8 ecc_reg, ecc_byte;
- u32 ecc_status;
+ int ecc_status;
/* Wait till the ECC operation is complete */
ecc_status = zynq_nand_waitfor_ecc_completion(mtd);
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 3e99199..39cb3cc 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -748,7 +748,7 @@
/* Wait for an incoming packet */
if (!isrxready(priv))
- return -1;
+ return -EAGAIN;
debug("axiemac: RX data ready\n");
diff --git a/drivers/net/xilinx_axi_mrmac.c b/drivers/net/xilinx_axi_mrmac.c
index 6d15386..410fb25 100644
--- a/drivers/net/xilinx_axi_mrmac.c
+++ b/drivers/net/xilinx_axi_mrmac.c
@@ -3,7 +3,7 @@
* Xilinx Multirate Ethernet MAC(MRMAC) driver
*
* Author(s): Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*
* Copyright (C) 2021 Xilinx, Inc. All rights reserved.
*/
diff --git a/drivers/net/xilinx_axi_mrmac.h b/drivers/net/xilinx_axi_mrmac.h
index 4f87585..e2c2105 100644
--- a/drivers/net/xilinx_axi_mrmac.h
+++ b/drivers/net/xilinx_axi_mrmac.h
@@ -3,7 +3,7 @@
* Xilinx Multirate Ethernet MAC(MRMAC) driver
*
* Author(s): Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*
* Copyright (C) 2021 Xilinx, Inc. All rights reserved.
*/
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 211b2c6..f3cdfb0 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -30,6 +30,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <dm/device_compat.h>
+#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/errno.h>
@@ -67,11 +68,6 @@
#define ZYNQ_GEM_NWCFG_FSREM 0x00020000 /* FCS removal */
#define ZYNQ_GEM_NWCFG_SGMII_ENBL 0x08000000 /* SGMII Enable */
#define ZYNQ_GEM_NWCFG_PCS_SEL 0x00000800 /* PCS select */
-#ifdef CONFIG_ARM64
-#define ZYNQ_GEM_NWCFG_MDCCLKDIV 0x00100000 /* Div pclk by 64, max 160MHz */
-#else
-#define ZYNQ_GEM_NWCFG_MDCCLKDIV 0x000c0000 /* Div pclk by 48, max 120MHz */
-#endif
#ifdef CONFIG_ARM64
# define ZYNQ_GEM_DBUS_WIDTH (1 << 21) /* 64 bit bus */
@@ -81,8 +77,7 @@
#define ZYNQ_GEM_NWCFG_INIT (ZYNQ_GEM_DBUS_WIDTH | \
ZYNQ_GEM_NWCFG_FDEN | \
- ZYNQ_GEM_NWCFG_FSREM | \
- ZYNQ_GEM_NWCFG_MDCCLKDIV)
+ ZYNQ_GEM_NWCFG_FSREM)
#define ZYNQ_GEM_NWSR_MDIOIDLE_MASK 0x00000004 /* PHY management idle */
@@ -141,6 +136,18 @@
#define RXCLK_EN BIT(0)
+/* GEM specific constants for CLK. */
+#define GEM_CLK_DIV8 0
+#define GEM_CLK_DIV16 1
+#define GEM_CLK_DIV32 2
+#define GEM_CLK_DIV48 3
+#define GEM_CLK_DIV64 4
+#define GEM_CLK_DIV96 5
+#define GEM_CLK_DIV128 6
+#define GEM_CLK_DIV224 7
+
+#define GEM_MDC_SET(val) FIELD_PREP(GENMASK(20, 18), val)
+
/* Device registers */
struct zynq_gem_regs {
u32 nwctrl; /* 0x0 - Network Control reg */
@@ -220,6 +227,7 @@
struct mii_dev *bus;
struct clk rx_clk;
struct clk tx_clk;
+ struct clk pclk;
u32 max_speed;
bool int_pcs;
bool dma_64bit;
@@ -352,6 +360,32 @@
return phy_config(priv->phydev);
}
+static u32 gem_mdc_clk_div(struct zynq_gem_priv *priv)
+{
+ u32 config;
+ unsigned long pclk_hz;
+
+ pclk_hz = clk_get_rate(&priv->pclk);
+ if (pclk_hz <= 20000000)
+ config = GEM_MDC_SET(GEM_CLK_DIV8);
+ else if (pclk_hz <= 40000000)
+ config = GEM_MDC_SET(GEM_CLK_DIV16);
+ else if (pclk_hz <= 80000000)
+ config = GEM_MDC_SET(GEM_CLK_DIV32);
+ else if (pclk_hz <= 120000000)
+ config = GEM_MDC_SET(GEM_CLK_DIV48);
+ else if (pclk_hz <= 160000000)
+ config = GEM_MDC_SET(GEM_CLK_DIV64);
+ else if (pclk_hz <= 240000000)
+ config = GEM_MDC_SET(GEM_CLK_DIV96);
+ else if (pclk_hz <= 320000000)
+ config = GEM_MDC_SET(GEM_CLK_DIV128);
+ else
+ config = GEM_MDC_SET(GEM_CLK_DIV224);
+
+ return config;
+}
+
static int zynq_gem_init(struct udevice *dev)
{
u32 i, nwconfig;
@@ -460,7 +494,8 @@
return -1;
}
- nwconfig = ZYNQ_GEM_NWCFG_INIT;
+ nwconfig = gem_mdc_clk_div(priv);
+ nwconfig |= ZYNQ_GEM_NWCFG_INIT;
/*
* Set SGMII enable PCS selection only if internal PCS/PMA
@@ -828,6 +863,12 @@
}
}
+ ret = clk_get_by_name(dev, "pclk", &priv->pclk);
+ if (ret < 0) {
+ dev_err(dev, "failed to get pclk clock\n");
+ goto err2;
+ }
+
if (IS_ENABLED(CONFIG_DM_ETH_PHY))
priv->bus = eth_phy_get_mdio_bus(dev);
diff --git a/drivers/phy/allwinner/Kconfig b/drivers/phy/allwinner/Kconfig
index f8f1e99..bb0bd8d 100644
--- a/drivers/phy/allwinner/Kconfig
+++ b/drivers/phy/allwinner/Kconfig
@@ -4,6 +4,9 @@
config PHY_SUN4I_USB
bool "Allwinner Sun4I USB PHY driver"
depends on ARCH_SUNXI
+ depends on !MACH_SUN9I
+ default n if MACH_SUN8I_V3S
+ default y
select DM_REGULATOR
select PHY
help
@@ -11,7 +14,7 @@
sunxi SoCs.
This driver controls the entire USB PHY block, both the USB OTG
- parts, as well as the 2 regular USB 2 host PHYs.
+ parts, as well as the regular USB HCI host PHYs.
config INITIAL_USB_SCAN_DELAY
int "Delay initial USB scan by x ms to allow builtin devices to init"
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 6428163..77dffca 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -73,26 +73,16 @@
#define MAX_PHYS 4
-enum sun4i_usb_phy_type {
- sun4i_a10_phy,
- sun6i_a31_phy,
- sun8i_a33_phy,
- sun8i_a83t_phy,
- sun8i_h3_phy,
- sun8i_r40_phy,
- sun8i_v3s_phy,
- sun50i_a64_phy,
- sun50i_h6_phy,
-};
-
struct sun4i_usb_phy_cfg {
int num_phys;
- enum sun4i_usb_phy_type type;
+ int hsic_index;
u32 disc_thresh;
u32 hci_phy_ctl_clear;
u8 phyctl_offset;
bool dedicated_clocks;
bool phy0_dual_route;
+ bool siddq_in_base;
+ bool needs_phy2_siddq;
int missing_phys;
};
@@ -129,6 +119,7 @@
struct gpio_desc gpio_vbus_det;
struct gpio_desc gpio_id_det;
struct clk clocks;
+ struct clk clk2;
struct reset_ctl resets;
int id;
};
@@ -200,7 +191,7 @@
SUNXI_AHB_INCRX_ALIGN_EN | SUNXI_ULPI_BYPASS_EN;
/* A83T USB2 is HSIC */
- if (data->cfg->type == sun8i_a83t_phy && usb_phy->id == 2)
+ if (data->cfg->hsic_index && usb_phy->id == data->cfg->hsic_index)
bits |= SUNXI_EHCI_HS_FORCE | SUNXI_HSIC_CONNECT_INT |
SUNXI_HSIC;
@@ -283,14 +274,48 @@
return ret;
}
+ /* Some PHYs on some SoCs (the H616) need the help of PHY2 to work. */
+ if (data->cfg->needs_phy2_siddq && phy->id != 2) {
+ struct sun4i_usb_phy_plat *phy2 = &data->usb_phy[2];
+
+ ret = clk_enable(&phy2->clocks);
+ if (ret) {
+ dev_err(phy->dev, "failed to enable aux clock\n");
+ return ret;
+ }
+
+ ret = reset_deassert(&phy2->resets);
+ if (ret) {
+ dev_err(phy->dev, "failed to deassert aux reset\n");
+ return ret;
+ }
+
+ /*
+ * This extra clock is just needed to access the
+ * REG_HCI_PHY_CTL PMU register for PHY2.
+ */
+ ret = clk_enable(&phy2->clk2);
+ if (ret) {
+ dev_err(phy->dev, "failed to enable PHY2 clock\n");
+ return ret;
+ }
+
+ if (phy2->pmu && data->cfg->hci_phy_ctl_clear) {
+ val = readl(phy2->pmu + REG_HCI_PHY_CTL);
+ val &= ~data->cfg->hci_phy_ctl_clear;
+ writel(val, phy2->pmu + REG_HCI_PHY_CTL);
+ }
+
+ clk_disable(&phy2->clk2);
+ }
+
if (usb_phy->pmu && data->cfg->hci_phy_ctl_clear) {
val = readl(usb_phy->pmu + REG_HCI_PHY_CTL);
val &= ~data->cfg->hci_phy_ctl_clear;
writel(val, usb_phy->pmu + REG_HCI_PHY_CTL);
}
- if (data->cfg->type == sun8i_a83t_phy ||
- data->cfg->type == sun50i_h6_phy) {
+ if (data->cfg->siddq_in_base) {
if (phy->id == 0) {
val = readl(data->base + data->cfg->phyctl_offset);
val |= PHY_CTL_VBUSVLDEXT;
@@ -339,8 +364,7 @@
int ret;
if (phy->id == 0) {
- if (data->cfg->type == sun8i_a83t_phy ||
- data->cfg->type == sun50i_h6_phy) {
+ if (data->cfg->siddq_in_base) {
void __iomem *phyctl = data->base +
data->cfg->phyctl_offset;
@@ -372,9 +396,12 @@
{
struct sun4i_usb_phy_data *data = dev_get_priv(phy->dev);
- if (args->args_count >= data->cfg->num_phys)
+ if (args->args_count != 1)
return -EINVAL;
+ if (args->args[0] >= data->cfg->num_phys)
+ return -EINVAL;
+
if (data->cfg->missing_phys & BIT(args->args[0]))
return -ENODEV;
@@ -510,6 +537,15 @@
return ret;
}
+ /* Helper clock from PHY2 for the H616 PHY quirk */
+ snprintf(name, sizeof(name), "pmu%d_clk", i);
+ ret = clk_get_by_name_optional(dev, name, &phy->clk2);
+ if (ret) {
+ dev_err(dev, "failed to get pmu%d_clk clock phandle\n",
+ i);
+ return ret;
+ }
+
snprintf(name, sizeof(name), "usb%d_reset", i);
ret = reset_get_by_name(dev, name, &phy->resets);
if (ret) {
@@ -533,7 +569,6 @@
static const struct sun4i_usb_phy_cfg sun4i_a10_cfg = {
.num_phys = 3,
- .type = sun4i_a10_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A10,
.dedicated_clocks = false,
@@ -541,7 +576,6 @@
static const struct sun4i_usb_phy_cfg sun5i_a13_cfg = {
.num_phys = 2,
- .type = sun4i_a10_phy,
.disc_thresh = 2,
.phyctl_offset = REG_PHYCTL_A10,
.dedicated_clocks = false,
@@ -549,7 +583,6 @@
static const struct sun4i_usb_phy_cfg sun6i_a31_cfg = {
.num_phys = 3,
- .type = sun6i_a31_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A10,
.dedicated_clocks = true,
@@ -557,7 +590,6 @@
static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = {
.num_phys = 3,
- .type = sun4i_a10_phy,
.disc_thresh = 2,
.phyctl_offset = REG_PHYCTL_A10,
.dedicated_clocks = false,
@@ -565,7 +597,6 @@
static const struct sun4i_usb_phy_cfg sun8i_a23_cfg = {
.num_phys = 2,
- .type = sun4i_a10_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A10,
.dedicated_clocks = true,
@@ -573,7 +604,6 @@
static const struct sun4i_usb_phy_cfg sun8i_a33_cfg = {
.num_phys = 2,
- .type = sun8i_a33_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
@@ -581,14 +611,14 @@
static const struct sun4i_usb_phy_cfg sun8i_a83t_cfg = {
.num_phys = 3,
- .type = sun8i_a83t_phy,
+ .hsic_index = 2,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
+ .siddq_in_base = true,
};
static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = {
.num_phys = 4,
- .type = sun8i_h3_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
@@ -598,7 +628,6 @@
static const struct sun4i_usb_phy_cfg sun8i_r40_cfg = {
.num_phys = 3,
- .type = sun8i_r40_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
@@ -608,7 +637,6 @@
static const struct sun4i_usb_phy_cfg sun8i_v3s_cfg = {
.num_phys = 1,
- .type = sun8i_v3s_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
@@ -618,16 +646,15 @@
static const struct sun4i_usb_phy_cfg sun20i_d1_cfg = {
.num_phys = 2,
- .type = sun50i_h6_phy,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
.hci_phy_ctl_clear = PHY_CTL_SIDDQ,
.phy0_dual_route = true,
+ .siddq_in_base = true,
};
static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = {
.num_phys = 2,
- .type = sun50i_a64_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
@@ -637,14 +664,32 @@
static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = {
.num_phys = 4,
- .type = sun50i_h6_phy,
.disc_thresh = 3,
.phyctl_offset = REG_PHYCTL_A33,
.dedicated_clocks = true,
.phy0_dual_route = true,
+ .siddq_in_base = true,
.missing_phys = BIT(1) | BIT(2),
};
+static const struct sun4i_usb_phy_cfg sun50i_h616_cfg = {
+ .num_phys = 4,
+ .disc_thresh = 3,
+ .phyctl_offset = REG_PHYCTL_A33,
+ .dedicated_clocks = true,
+ .phy0_dual_route = true,
+ .hci_phy_ctl_clear = PHY_CTL_SIDDQ,
+ .needs_phy2_siddq = true,
+ .siddq_in_base = true,
+};
+
+static const struct sun4i_usb_phy_cfg suniv_f1c100s_cfg = {
+ .num_phys = 1,
+ .disc_thresh = 3,
+ .phyctl_offset = REG_PHYCTL_A10,
+ .dedicated_clocks = true,
+};
+
static const struct udevice_id sun4i_usb_phy_ids[] = {
{ .compatible = "allwinner,sun4i-a10-usb-phy", .data = (ulong)&sun4i_a10_cfg },
{ .compatible = "allwinner,sun5i-a13-usb-phy", .data = (ulong)&sun5i_a13_cfg },
@@ -659,6 +704,8 @@
{ .compatible = "allwinner,sun20i-d1-usb-phy", .data = (ulong)&sun20i_d1_cfg },
{ .compatible = "allwinner,sun50i-a64-usb-phy", .data = (ulong)&sun50i_a64_cfg},
{ .compatible = "allwinner,sun50i-h6-usb-phy", .data = (ulong)&sun50i_h6_cfg},
+ { .compatible = "allwinner,sun50i-h616-usb-phy", .data = (ulong)&sun50i_h616_cfg },
+ { .compatible = "allwinner,suniv-f1c100s-usb-phy", .data = (ulong)&suniv_f1c100s_cfg },
{ }
};
diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c
index ee6529b..02626a7 100644
--- a/drivers/pinctrl/pinctrl-zynqmp.c
+++ b/drivers/pinctrl/pinctrl-zynqmp.c
@@ -3,7 +3,7 @@
* Xilinx pinctrl driver for ZynqMP
*
* Author(s): Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*
* Copyright (C) 2021 Xilinx, Inc. All rights reserved.
*/
diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index 7e445d2..b54557f 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -138,6 +138,7 @@
u32 ddr_freq1;
u32 ddr_freq2;
u32 ddr_fhs_cnt;
+ u32 dram_class;
struct udevice *vtt_supply;
u32 instance;
lpddr4_obj *driverdt;
@@ -243,14 +244,11 @@
static void k3_lpddr4_ack_freq_upd_req(const lpddr4_privatedata *pd)
{
- u32 dram_class;
struct k3_ddrss_desc *ddrss = (struct k3_ddrss_desc *)pd->ddr_instance;
debug("--->>> LPDDR4 Initialization is in progress ... <<<---\n");
- dram_class = k3_lpddr4_read_ddr_type(pd);
-
- switch (dram_class) {
+ switch (ddrss->dram_class) {
case DENALI_CTL_0_DRAM_CLASS_DDR4:
break;
case DENALI_CTL_0_DRAM_CLASS_LPDDR4:
@@ -263,13 +261,12 @@
static int k3_ddrss_init_freq(struct k3_ddrss_desc *ddrss)
{
- u32 dram_class;
int ret;
lpddr4_privatedata *pd = &ddrss->pd;
- dram_class = k3_lpddr4_read_ddr_type(pd);
+ ddrss->dram_class = k3_lpddr4_read_ddr_type(pd);
- switch (dram_class) {
+ switch (ddrss->dram_class) {
case DENALI_CTL_0_DRAM_CLASS_DDR4:
/* Set to ddr_freq1 from DT for DDR4 */
ret = clk_set_rate(&ddrss->ddr_clk, ddrss->ddr_freq1);
diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c
index 2ebe338..6cabaa1 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -97,7 +97,7 @@
fdt_addr_t addr;
fdt_size_t size;
- addr = dev_read_addr_size(dev, "reg", &size);
+ addr = dev_read_addr_size(dev, &size);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/rtc/max313xx.c b/drivers/rtc/max313xx.c
index 748f3c4..6040023 100644
--- a/drivers/rtc/max313xx.c
+++ b/drivers/rtc/max313xx.c
@@ -326,10 +326,22 @@
return ret;
}
+static int max313xx_read8(struct udevice *dev, unsigned int reg)
+{
+ return dm_i2c_reg_read(dev, reg);
+}
+
+static int max313xx_write8(struct udevice *dev, unsigned int reg, int val)
+{
+ return dm_i2c_reg_write(dev, reg, val);
+}
+
static const struct rtc_ops max3133x_rtc_ops = {
.get = max313xx_read_time,
.set = max313xx_set_time,
.reset = max313xx_reset,
+ .read8 = max313xx_read8,
+ .write8 = max313xx_write8,
};
static int max313xx_init(struct udevice *dev)
diff --git a/drivers/soc/soc_xilinx_zynqmp.c b/drivers/soc/soc_xilinx_zynqmp.c
index afa277f..d9a5944 100644
--- a/drivers/soc/soc_xilinx_zynqmp.c
+++ b/drivers/soc/soc_xilinx_zynqmp.c
@@ -3,7 +3,7 @@
* Xilinx ZynqMP SOC driver
*
* Copyright (C) 2021 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*
* Copyright (C) 2022 Weidmüller Interface GmbH & Co. KG
* Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
diff --git a/drivers/spi/cadence_ospi_versal.c b/drivers/spi/cadence_ospi_versal.c
index 434c603..a7685a2 100644
--- a/drivers/spi/cadence_ospi_versal.c
+++ b/drivers/spi/cadence_ospi_versal.c
@@ -130,7 +130,6 @@
#if defined(CONFIG_DM_GPIO)
int cadence_qspi_versal_flash_reset(struct udevice *dev)
{
-#ifndef CONFIG_ARCH_VERSAL_NET
struct gpio_desc gpio;
u32 reset_gpio;
int ret;
@@ -166,7 +165,7 @@
/* Set value 1 to pin */
dm_gpio_set_value(&gpio, 1);
udelay(1);
-#endif
+
return 0;
}
#else
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 2d715e4..cc3a54f 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -249,17 +249,14 @@
priv->wr_delay = 50 * DIV_ROUND_UP(NSEC_PER_SEC, priv->ref_clk_hz);
- if (IS_ENABLED(CONFIG_ARCH_VERSAL)) {
- /* Versal platform uses spi calibration to set read delay */
+ /* Versal and Versal-NET use spi calibration to set read delay */
+ if (CONFIG_IS_ENABLED(ARCH_VERSAL) ||
+ CONFIG_IS_ENABLED(ARCH_VERSAL_NET))
if (priv->read_delay >= 0)
priv->read_delay = -1;
- /* Reset ospi flash device */
- ret = cadence_qspi_versal_flash_reset(bus);
- if (ret)
- return ret;
- }
- return 0;
+ /* Reset ospi flash device */
+ return cadence_qspi_versal_flash_reset(bus);
}
static int cadence_spi_remove(struct udevice *dev)
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 33575fe..b58a3f6 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -363,8 +363,8 @@
return -EOPNOTSUPP;
}
-bool xilinx_qspi_mem_exec_op(struct spi_slave *slave,
- const struct spi_mem_op *op)
+static bool xilinx_qspi_mem_exec_op(struct spi_slave *slave,
+ const struct spi_mem_op *op)
{
if (xilinx_qspi_check_buswidth(slave, op->cmd.buswidth))
return false;
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index d1d4048..cb52c0f 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -747,8 +747,8 @@
return -EOPNOTSUPP;
}
-bool zynq_qspi_mem_exec_op(struct spi_slave *slave,
- const struct spi_mem_op *op)
+static bool zynq_qspi_mem_exec_op(struct spi_slave *slave,
+ const struct spi_mem_op *op)
{
if (zynq_qspi_check_buswidth(slave, op->cmd.buswidth))
return false;
diff --git a/drivers/usb/musb-new/Kconfig b/drivers/usb/musb-new/Kconfig
index 51f876c..c52afd4 100644
--- a/drivers/usb/musb-new/Kconfig
+++ b/drivers/usb/musb-new/Kconfig
@@ -68,6 +68,7 @@
config USB_MUSB_SUNXI
bool "Enable sunxi OTG / DRC USB controller"
depends on ARCH_SUNXI
+ depends on PHY_SUN4I_USB
select USB_MUSB_PIO_ONLY
default y
---help---
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index b8147f2..b41dc60 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -871,6 +871,12 @@
out On-screen Display (OSD) used on gdsys FPGAs to control dynamic
textual overlays of the display outputs.
+config VIDEO_REMOVE
+ bool "Remove video driver"
+ help
+ Use this option to specify if user wants to call remove method of
+ video driver in u-boot proper stage.
+
config SPLASH_SCREEN
bool "Show a splash-screen image"
help
@@ -1094,6 +1100,12 @@
This can be better in low-light situations or to reduce eye strain in
some cases.
+config SPL_VIDEO_REMOVE
+ bool "Remove video driver after SPL stage"
+ help
+ if this option is enabled video driver will be removed at the end of
+ SPL stage, beforeloading the next stage.
+
if SPL_SPLASH_SCREEN
config SPL_SPLASH_SCREEN_ALIGN
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 95e874b..949595f 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -6,12 +6,14 @@
#define LOG_CATEGORY UCLASS_VIDEO
#include <common.h>
+#include <bloblist.h>
#include <console.h>
#include <cpu_func.h>
#include <dm.h>
#include <log.h>
#include <malloc.h>
#include <mapmem.h>
+#include <spl.h>
#include <stdio_dev.h>
#include <video.h>
#include <video_console.h>
@@ -139,6 +141,16 @@
debug("Video frame buffers from %lx to %lx\n", gd->video_bottom,
gd->video_top);
+ if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(BLOBLIST)) {
+ struct video_handoff *ho;
+
+ ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0);
+ if (!ho)
+ return log_msg_ret("blf", -ENOENT);
+ ho->fb = *addrp;
+ ho->size = size;
+ }
+
return 0;
}
@@ -194,6 +206,17 @@
return 0;
}
+int video_reserve_from_bloblist(struct video_handoff *ho)
+{
+ gd->video_bottom = ho->fb;
+ gd->fb_base = ho->fb;
+ gd->video_top = ho->fb + ho->size;
+ debug("Reserving %luk for video using blob at: %08x\n",
+ ((unsigned long)ho->size) >> 10, (u32)ho->fb);
+
+ return 0;
+}
+
int video_fill(struct udevice *dev, u32 colour)
{
struct video_priv *priv = dev_get_uclass_priv(dev);
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 6466635..07fc494 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -178,6 +178,13 @@
help
Select this to enable max6370 watchdog timer.
+config WDT_MCF
+ bool "ColdFire family watchdog timer support"
+ depends on WDT
+ help
+ Select this to enable ColdFire watchdog timer,
+ which supports mcf52x2 mcf532x mcf523x families.
+
config WDT_MESON_GXBB
bool "Amlogic watchdog timer support"
depends on WDT
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index fd5d9c7..eef786f 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -31,6 +31,7 @@
obj-$(CONFIG_WDT_FTWDT010) += ftwdt010_wdt.o
obj-$(CONFIG_WDT_GPIO) += gpio_wdt.o
obj-$(CONFIG_WDT_MAX6370) += max6370_wdt.o
+obj-$(CONFIG_WDT_MCF) += mcf_wdt.o
obj-$(CONFIG_WDT_MESON_GXBB) += meson_gxbb_wdt.o
obj-$(CONFIG_WDT_MPC8xxx) += mpc8xxx_wdt.o
obj-$(CONFIG_WDT_MT7620) += mt7620_wdt.o
diff --git a/drivers/watchdog/mcf_wdt.c b/drivers/watchdog/mcf_wdt.c
new file mode 100644
index 0000000..b36488b
--- /dev/null
+++ b/drivers/watchdog/mcf_wdt.c
@@ -0,0 +1,135 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * mcf_wdt.c - driver for ColdFire on-chip watchdog
+ *
+ * Author: Angelo Dureghello <angelo@kernel-space.org>
+ *
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <hang.h>
+#include <asm/io.h>
+#include <wdt.h>
+#include <linux/bitops.h>
+
+#define DIVIDER_5XXX 4096
+#define DIVIDER_5282 8192
+
+#define WCR_EN BIT(0)
+#define WCR_HALTED BIT(1)
+#define WCR_DOZE BIT(2)
+#define WCR_WAIT BIT(3)
+
+struct watchdog_regs {
+ u16 wcr; /* Control */
+ u16 wmr; /* Service */
+ u16 wcntr; /* Counter */
+ u16 wsr; /* Reset Status */
+};
+
+static void mcf_watchdog_reset(struct watchdog_regs *wdog)
+{
+ if (!IS_ENABLED(CONFIG_WATCHDOG_RESET_DISABLE)) {
+ writew(0x5555, &wdog->wsr);
+ writew(0xaaaa, &wdog->wsr);
+ }
+}
+
+static void mcf_watchdog_init(struct watchdog_regs *wdog, u32 fixed_divider,
+ u64 timeout_msecs)
+{
+ u32 wdog_module, cycles_per_sec;
+
+ cycles_per_sec = CFG_SYS_CLK / fixed_divider;
+
+ wdog_module = cycles_per_sec * ((u32)timeout_msecs / 1000);
+ wdog_module += (cycles_per_sec / 1000) * ((u32)timeout_msecs % 1000);
+
+ /* Limit check, max 16 bits */
+ if (wdog_module > 0xffff)
+ wdog_module = 0xffff;
+
+ /* Set timeout and enable watchdog */
+ writew((u16)wdog_module, &wdog->wmr);
+ writew(WCR_EN, &wdog->wcr);
+
+ mcf_watchdog_reset(wdog);
+}
+
+struct mcf_wdt_priv {
+ void __iomem *base;
+ u32 fixed_divider;
+};
+
+static int mcf_wdt_expire_now(struct udevice *dev, ulong flags)
+{
+ hang();
+
+ return 0;
+}
+
+static int mcf_wdt_reset(struct udevice *dev)
+{
+ struct mcf_wdt_priv *priv = dev_get_priv(dev);
+
+ mcf_watchdog_reset(priv->base);
+
+ return 0;
+}
+
+static int mcf_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
+{
+ struct mcf_wdt_priv *priv = dev_get_priv(dev);
+
+ /* Timeout from fdt (timeout) comes in milliseconds */
+ mcf_watchdog_init(priv->base, priv->fixed_divider, timeout);
+
+ return 0;
+}
+
+static int mcf_wdt_stop(struct udevice *dev)
+{
+ struct mcf_wdt_priv *priv = dev_get_priv(dev);
+ struct watchdog_regs *wdog = (struct watchdog_regs *)priv->base;
+
+ setbits_be16(&wdog->wcr, WCR_HALTED);
+
+ return 0;
+}
+
+static int mcf_wdt_probe(struct udevice *dev)
+{
+ struct mcf_wdt_priv *priv = dev_get_priv(dev);
+
+ priv->base = dev_read_addr_ptr(dev);
+ if (!priv->base)
+ return -ENOENT;
+
+ priv->fixed_divider = (u32)dev_get_driver_data(dev);
+
+ return 0;
+}
+
+static const struct wdt_ops mcf_wdt_ops = {
+ .start = mcf_wdt_start,
+ .stop = mcf_wdt_stop,
+ .reset = mcf_wdt_reset,
+ .expire_now = mcf_wdt_expire_now,
+};
+
+static const struct udevice_id mcf_wdt_ids[] = {
+ { .compatible = "fsl,mcf5208-wdt", .data = DIVIDER_5XXX },
+ { .compatible = "fsl,mcf5282-wdt", .data = DIVIDER_5282 },
+ {}
+};
+
+U_BOOT_DRIVER(mcf_wdt) = {
+ .name = "mcf_wdt",
+ .id = UCLASS_WDT,
+ .of_match = mcf_wdt_ids,
+ .probe = mcf_wdt_probe,
+ .ops = &mcf_wdt_ops,
+ .priv_auto = sizeof(struct mcf_wdt_priv),
+ .flags = DM_FLAG_PRE_RELOC,
+};
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index 0f9fb02..b38c400 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -2,7 +2,7 @@
/*
* Xilinx AXI platforms watchdog timer driver.
*
- * Author(s): Michal Simek <michal.simek@xilinx.com>
+ * Author(s): Michal Simek <michal.simek@amd.com>
* Shreenidhi Shedi <yesshedi@gmail.com>
*
* Copyright (c) 2011-2018 Xilinx Inc.
diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c
index d582e3c..963ab22 100644
--- a/drivers/watchdog/xilinx_wwdt.c
+++ b/drivers/watchdog/xilinx_wwdt.c
@@ -2,7 +2,7 @@
/*
* Xilinx window watchdog timer driver.
*
- * Author(s): Michal Simek <michal.simek@xilinx.com>
+ * Author(s): Michal Simek <michal.simek@amd.com>
* Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
*
* Copyright (c) 2020, Xilinx Inc.
@@ -191,7 +191,8 @@
};
static const struct udevice_id xlnx_wwdt_ids[] = {
- { .compatible = "xlnx,versal-wwdt-1.0", },
+ { .compatible = "xlnx,versal-wwdt", },
+ { .compatible = "xlnx,versal-wwdt-1.0", }, /* deprecated */
{},
};
diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h
index d8ef250..3997ce5 100644
--- a/include/configs/am62ax_evm.h
+++ b/include/configs/am62ax_evm.h
@@ -15,77 +15,6 @@
/* DDR Configuration */
#define CFG_SYS_SDRAM_BASE1 0x880000000
-#define PARTS_DEFAULT \
- /* Linux partitions */ \
- "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
-
-/* U-Boot general configuration */
-#define EXTRA_ENV_AM62A7_BOARD_SETTINGS \
- "default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
- "findfdt=" \
- "setenv name_fdt ${default_device_tree};" \
- "setenv fdtfile ${name_fdt}\0" \
- "name_kern=Image\0" \
- "console=ttyS2,115200n8\0" \
- "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
- "${mtdparts}\0" \
- "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
-
-/* U-Boot MMC-specific configuration */
-#define EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \
- "boot=mmc\0" \
- "mmcdev=1\0" \
- "bootpart=1:2\0" \
- "bootdir=/boot\0" \
- "rd_spec=-\0" \
- "init_mmc=run args_all args_mmc\0" \
- "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
- "get_overlay_mmc=" \
- "fdt address ${fdtaddr};" \
- "fdt resize 0x100000;" \
- "for overlay in $name_overlays;" \
- "do;" \
- "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
- "fdt apply ${dtboaddr};" \
- "done;\0" \
- "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
- "${bootdir}/${name_kern}\0" \
- "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
- "${bootdir}/${name_fit}\0" \
- "partitions=" PARTS_DEFAULT
-
-#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) \
- DEFAULT_MMC_TI_ARGS \
- EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \
- "bootcmd_ti_mmc=" \
- "run findfdt; run envboot; run init_mmc;" \
- "if test ${boot_fit} -eq 1; then;" \
- "run get_fit_mmc; run get_overlaystring;" \
- "run run_fit;" \
- "else;" \
- "run get_kern_mmc; run get_fdt_mmc;" \
- "run get_overlay_mmc;" \
- "run run_kern;" \
- "fi;\0"
-
-#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \
- "ti_mmc "
-
-#if IS_ENABLED(CONFIG_CMD_MMC)
- #define BOOT_TARGET_MMC(func) \
- func(TI_MMC, ti_mmc, na)
-#else
- #define BOOT_TARGET_MMC(func)
-#endif /* IS_ENABLED(CONFIG_CMD_MMC) */
-
-#define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_MMC(func)
-
-#include <config_distro_bootcmd.h>
-
-/* Incorporate settings into the U-Boot environment */
-#define CFG_EXTRA_ENV_SETTINGS \
- BOOTENV
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
index 7bf0780..6b2a6ee 100644
--- a/include/configs/am62x_evm.h
+++ b/include/configs/am62x_evm.h
@@ -15,33 +15,6 @@
/* DDR Configuration */
#define CFG_SYS_SDRAM_BASE1 0x880000000
-#ifdef CONFIG_CMD_MMC
-#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
-#else
-#define DISTRO_BOOT_DEV_MMC(func)
-#endif
-
-#ifdef CONFIG_CMD_PXE
-#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na)
-#else
-#define DISTRO_BOOT_DEV_PXE(func)
-#endif
-
-#ifdef CONFIG_CMD_DHCP
-#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na)
-#else
-#define DISTRO_BOOT_DEV_DHCP(func)
-#endif
-
-#define BOOT_TARGET_DEVICES(func) \
- DISTRO_BOOT_DEV_MMC(func) \
- DISTRO_BOOT_DEV_PXE(func) \
- DISTRO_BOOT_DEV_DHCP(func)
-
-/* Incorporate settings into the U-Boot environment */
-#define CFG_EXTRA_ENV_SETTINGS \
- BOOTENV
-
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index c549573..2fa658d 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -17,20 +17,6 @@
/* DDR Configuration */
#define CFG_SYS_SDRAM_BASE1 0x880000000
-#ifdef CONFIG_TARGET_AM654_A53_EVM
-#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 0)
-
-#include <config_distro_bootcmd.h>
-#else
-#define BOOTENV
-#endif
-
-/* Incorporate settings into the U-Boot environment */
-#define CFG_EXTRA_ENV_SETTINGS \
- BOOTENV
-
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h
index 82174b8..2177e0d 100644
--- a/include/configs/iot2050.h
+++ b/include/configs/iot2050.h
@@ -13,31 +13,6 @@
#include <linux/sizes.h>
-#if IS_ENABLED(CONFIG_CMD_USB)
-# define BOOT_TARGET_USB(func) \
- func(USB, usb, 0) \
- func(USB, usb, 1) \
- func(USB, usb, 2)
-#else
-# define BOOT_TARGET_USB(func)
-#endif
-
-/*
- * This defines all MMC devices, even if the basic variant has no mmc1.
- * The non-supported device will be removed from the boot targets during
- * runtime, when that board was detected.
- */
-#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 0) \
- BOOT_TARGET_USB(func)
-
-#include <config_distro_bootcmd.h>
-
-#define CFG_EXTRA_ENV_SETTINGS \
- DEFAULT_LINUX_BOOT_ENV \
- BOOTENV
-
#include <configs/ti_armv7_common.h>
#ifdef CONFIG_ENV_WRITEABLE_LIST
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
index de92cd4..ea39d1b 100644
--- a/include/configs/j721e_evm.h
+++ b/include/configs/j721e_evm.h
@@ -24,40 +24,8 @@
#define CFG_SYS_UBOOT_BASE 0x50080000
#endif
-#if CONFIG_IS_ENABLED(CMD_PXE)
-# define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
-#else
-# define BOOT_TARGET_PXE(func)
-#endif
-
-#if CONFIG_IS_ENABLED(CMD_DHCP)
-# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
-#else
-# define BOOT_TARGET_DHCP(func)
-#endif
-
-#ifdef CONFIG_CMD_USB
-# define BOOT_TARGET_USB(func) func(USB, usb, 0)
-#else
-# define BOOT_TARGET_USB(func)
-#endif
-
-#define BOOT_TARGET_DEVICES(func) \
- BOOT_TARGET_USB(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 0) \
- BOOT_TARGET_PXE(func) \
- BOOT_TARGET_DHCP(func)
-
-#include <config_distro_bootcmd.h>
-
-/* Incorporate settings into the U-Boot environment */
-#define CFG_EXTRA_ENV_SETTINGS \
- BOOTENV
-
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
-/* MMC ENV related defines */
#endif /* __CONFIG_J721E_EVM_H */
diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h
index 1e0da9f..692c6bb 100644
--- a/include/configs/j721s2_evm.h
+++ b/include/configs/j721s2_evm.h
@@ -23,12 +23,7 @@
#define CFG_SYS_UBOOT_BASE 0x50080000
#endif
-/* Incorporate settings into the U-Boot environment */
-#define CFG_EXTRA_ENV_SETTINGS
-
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
-/* MMC ENV related defines */
-
#endif /* __CONFIG_J721S2_EVM_H */
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h
index 929c9a2..630dfdc 100644
--- a/include/configs/k2e_evm.h
+++ b/include/configs/k2e_evm.h
@@ -11,18 +11,11 @@
#include <environment/ti/spi.h>
-#ifdef CONFIG_TI_SECURE_DEVICE
-#define DEFAULT_SEC_BOOT_ENV \
- DEFAULT_FIT_TI_ARGS \
- "findfdt=setenv fdtfile ${name_fdt}\0"
-#else
-#define DEFAULT_SEC_BOOT_ENV
-#endif
-
/* U-Boot general configuration */
#define ENV_KS2_BOARD_SETTINGS \
DEFAULT_FW_INITRAMFS_BOOT_ENV \
- DEFAULT_SEC_BOOT_ENV \
+ DEFAULT_FIT_TI_ARGS \
+ "findfdt=setenv fdtfile ${name_fdt}\0" \
"boot=ubi\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \
diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h
index 05b4a3c..ed54be8 100644
--- a/include/configs/k2hk_evm.h
+++ b/include/configs/k2hk_evm.h
@@ -11,18 +11,11 @@
#include <environment/ti/spi.h>
-#ifdef CONFIG_TI_SECURE_DEVICE
-#define DEFAULT_SEC_BOOT_ENV \
- DEFAULT_FIT_TI_ARGS \
- "findfdt=setenv fdtfile ${name_fdt}\0"
-#else
-#define DEFAULT_SEC_BOOT_ENV
-#endif
-
/* U-Boot general configuration */
#define ENV_KS2_BOARD_SETTINGS \
DEFAULT_FW_INITRAMFS_BOOT_ENV \
- DEFAULT_SEC_BOOT_ENV \
+ DEFAULT_FIT_TI_ARGS \
+ "findfdt=setenv fdtfile ${name_fdt}\0" \
"boot=ubi\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \
diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h
index b1b839b..69d42ea 100644
--- a/include/configs/k2l_evm.h
+++ b/include/configs/k2l_evm.h
@@ -11,18 +11,11 @@
#include <environment/ti/spi.h>
-#ifdef CONFIG_TI_SECURE_DEVICE
-#define DEFAULT_SEC_BOOT_ENV \
- DEFAULT_FIT_TI_ARGS \
- "findfdt=setenv fdtfile ${name_fdt}\0"
-#else
-#define DEFAULT_SEC_BOOT_ENV
-#endif
-
/* U-Boot general configuration */
#define ENV_KS2_BOARD_SETTINGS \
DEFAULT_FW_INITRAMFS_BOOT_ENV \
- DEFAULT_SEC_BOOT_ENV \
+ DEFAULT_FIT_TI_ARGS \
+ "findfdt=setenv fdtfile ${name_fdt}\0" \
"boot=ubi\0" \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,4096\0" \
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 149a74d..dbbeff3 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -154,4 +154,54 @@
#define NETARGS ""
#endif
+#ifdef CONFIG_ARM64
+#ifdef CONFIG_DISTRO_DEFAULTS
+#ifdef CONFIG_CMD_PXE
+# define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
+#else
+# define BOOT_TARGET_PXE(func)
+#endif
+
+#ifdef CONFIG_CMD_DHCP
+# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
+#else
+# define BOOT_TARGET_DHCP(func)
+#endif
+
+#ifdef CONFIG_CMD_MMC
+#define BOOT_TARGET_MMC(func) \
+ func(TI_MMC, ti_mmc, na) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1)
+#else
+#define BOOT_TARGET_MMC(func)
+#endif
+
+#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance)
+
+#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \
+ "ti_mmc "
+
+#ifdef CONFIG_CMD_USB
+# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+# define BOOT_TARGET_USB(func)
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+ BOOT_TARGET_MMC(func) \
+ BOOT_TARGET_USB(func) \
+ BOOT_TARGET_PXE(func) \
+ BOOT_TARGET_DHCP(func)
+
+#include <config_distro_bootcmd.h>
+
+/* Incorporate settings into the U-Boot environment */
+#define CFG_EXTRA_ENV_SETTINGS \
+ BOOTENV
+
+#endif
+
+#endif /* CONFIG_ARM64 */
+
#endif /* __CONFIG_TI_ARMV7_COMMON_H__ */
diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index e70acd9..a403999 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -2,7 +2,7 @@
/*
* Configuration for Xilinx Versal
* (C) Copyright 2016 - 2018 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*
* Based on Configuration for Xilinx ZynqMP
*/
diff --git a/include/configs/xilinx_versal_mini.h b/include/configs/xilinx_versal_mini.h
index 23655a4..628fd80 100644
--- a/include/configs/xilinx_versal_mini.h
+++ b/include/configs/xilinx_versal_mini.h
@@ -3,8 +3,8 @@
* Configuration for Xilinx Versal MINI configuration
*
* (C) Copyright 2018-2019 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#ifndef __CONFIG_VERSAL_MINI_H
diff --git a/include/configs/xilinx_versal_net.h b/include/configs/xilinx_versal_net.h
index 424ead0..613cce4 100644
--- a/include/configs/xilinx_versal_net.h
+++ b/include/configs/xilinx_versal_net.h
@@ -76,20 +76,24 @@
# define BOOT_TARGET_DEVICES_DHCP(func)
#endif
-#if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL_NET)
-# define BOOT_TARGET_DEVICES_XSPI(func) func(XSPI, xspi, 0)
+#if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL)
+# define BOOT_TARGET_DEVICES_XSPI(func) func(XSPI, xspi, 0) func(XSPI, xspi, 1)
+# define BOOTENV_DEV_SHARED_XSPI \
+ "xspi_boot=sf probe $devnum_xspi:0 0 0 && " \
+ "sf read $scriptaddr $script_offset_f $script_size_f && " \
+ "echo XSPI: Trying to boot script at ${scriptaddr} && " \
+ "source ${scriptaddr}; echo XSPI: SCRIPT FAILED: continuing...;\0"
#else
# define BOOT_TARGET_DEVICES_XSPI(func)
+# define BOOTENV_DEV_SHARED_XSPI
#endif
#define BOOTENV_DEV_XSPI(devtypeu, devtypel, instance) \
- "bootcmd_xspi0=sf probe 0 0 0 && " \
- "sf read $scriptaddr $script_offset_f $script_size_f && " \
- "echo XSPI: Trying to boot script at ${scriptaddr} && " \
- "source ${scriptaddr}; echo XSPI: SCRIPT FAILED: continuing...;\0"
+ "bootcmd_" #devtypel #instance "=" \
+ "devnum_xspi=" #instance "; run " #devtypel "_boot\0" \
#define BOOTENV_DEV_NAME_XSPI(devtypeu, devtypel, instance) \
- "xspi0 "
+ ""
#define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na)
@@ -127,6 +131,7 @@
#define CFG_EXTRA_ENV_SETTINGS \
ENV_MEM_LAYOUT_SETTINGS \
BOOTENV \
+ BOOTENV_DEV_SHARED_XSPI \
DFU_ALT_INFO
#endif
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 995427d..74264b7 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -2,7 +2,7 @@
/*
* Configuration for Xilinx ZynqMP
* (C) Copyright 2014 - 2015 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*
* Based on Configuration for Versatile Express
*/
diff --git a/include/configs/xilinx_zynqmp_mini.h b/include/configs/xilinx_zynqmp_mini.h
index 9af0545..8afccb7 100644
--- a/include/configs/xilinx_zynqmp_mini.h
+++ b/include/configs/xilinx_zynqmp_mini.h
@@ -3,8 +3,8 @@
* Configuration for Xilinx ZynqMP Flash utility
*
* (C) Copyright 2018 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad Paladugu <sivadur@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#ifndef __CONFIG_ZYNQMP_MINI_H
diff --git a/include/configs/xilinx_zynqmp_mini_nand.h b/include/configs/xilinx_zynqmp_mini_nand.h
index 1b6e26e..cf3747a 100644
--- a/include/configs/xilinx_zynqmp_mini_nand.h
+++ b/include/configs/xilinx_zynqmp_mini_nand.h
@@ -3,8 +3,8 @@
* Configuration for Xilinx ZynqMP Nand Flash utility
*
* (C) Copyright 2018 Xilinx, Inc.
- * Michal Simek <michal.simek@xilinx.com>
- * Siva Durga Prasad Paladugu <sivadur@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#ifndef __CONFIG_ZYNQMP_MINI_NAND_H
diff --git a/include/dm/read.h b/include/dm/read.h
index 56ac076..137f2a5 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -347,18 +347,13 @@
void *dev_remap_addr(const struct udevice *dev);
/**
- * dev_read_addr_size() - get address and size from a device property
- *
- * This does no address translation. It simply reads an property that contains
- * an address and a size value, one after the other.
+ * dev_read_addr_size() - Get the reg property of a device
*
* @dev: Device to read from
- * @propname: property to read
* @sizep: place to put size value (on success)
* Return: address value, or FDT_ADDR_T_NONE on error
*/
-fdt_addr_t dev_read_addr_size(const struct udevice *dev, const char *propname,
- fdt_size_t *sizep);
+fdt_addr_t dev_read_addr_size(const struct udevice *dev, fdt_size_t *sizep);
/**
* dev_read_name() - get the name of a device's node
@@ -1002,10 +997,9 @@
}
static inline fdt_addr_t dev_read_addr_size(const struct udevice *dev,
- const char *propname,
fdt_size_t *sizep)
{
- return ofnode_get_addr_size(dev_ofnode(dev), propname, sizep);
+ return dev_read_addr_size_index(dev, 0, sizep);
}
static inline const char *dev_read_name(const struct udevice *dev)
diff --git a/include/dt-bindings/clock/starfive,jh7110-crg.h b/include/dt-bindings/clock/starfive,jh7110-crg.h
index 77b70e7..b51e382 100644
--- a/include/dt-bindings/clock/starfive,jh7110-crg.h
+++ b/include/dt-bindings/clock/starfive,jh7110-crg.h
@@ -8,6 +8,11 @@
#ifndef __DT_BINDINGS_CLOCK_STARFIVE_JH7110_H__
#define __DT_BINDINGS_CLOCK_STARFIVE_JH7110_H__
+#define JH7110_SYSCLK_PLL0_OUT 0
+#define JH7110_SYSCLK_PLL1_OUT 1
+#define JH7110_SYSCLK_PLL2_OUT 2
+#define JH7110_PLLCLK_END 3
+
#define JH7110_SYSCLK_CPU_ROOT 0
#define JH7110_SYSCLK_CPU_CORE 1
#define JH7110_SYSCLK_CPU_BUS 2
@@ -199,59 +204,55 @@
#define JH7110_SYSCLK_TDM_CLK_TDM_N 188
#define JH7110_SYSCLK_JTAG_CERTIFICATION_TRNG 189
-#define JH7110_SYSCLK_PLL0_OUT 190
-#define JH7110_SYSCLK_PLL1_OUT 191
-#define JH7110_SYSCLK_PLL2_OUT 192
+#define JH7110_SYSCLK_END 190
-#define JH7110_SYSCLK_END 193
+#define JH7110_AONCLK_OSC_DIV4 0
+#define JH7110_AONCLK_APB_FUNC 1
+#define JH7110_AONCLK_GMAC0_AHB 2
+#define JH7110_AONCLK_GMAC0_AXI 3
+#define JH7110_AONCLK_GMAC0_RMII_RTX 4
+#define JH7110_AONCLK_GMAC0_TX 5
+#define JH7110_AONCLK_GMAC0_TX_INV 6
+#define JH7110_AONCLK_GMAC0_RX 7
+#define JH7110_AONCLK_GMAC0_RX_INV 8
+#define JH7110_AONCLK_OTPC_APB 9
+#define JH7110_AONCLK_RTC_APB 10
+#define JH7110_AONCLK_RTC_INTERNAL 11
+#define JH7110_AONCLK_RTC_32K 12
+#define JH7110_AONCLK_RTC_CAL 13
-#define JH7110_AONCLK_OSC_DIV4 (JH7110_SYSCLK_END + 0)
-#define JH7110_AONCLK_APB_FUNC (JH7110_SYSCLK_END + 1)
-#define JH7110_AONCLK_GMAC0_AHB (JH7110_SYSCLK_END + 2)
-#define JH7110_AONCLK_GMAC0_AXI (JH7110_SYSCLK_END + 3)
-#define JH7110_AONCLK_GMAC0_RMII_RTX (JH7110_SYSCLK_END + 4)
-#define JH7110_AONCLK_GMAC0_TX (JH7110_SYSCLK_END + 5)
-#define JH7110_AONCLK_GMAC0_TX_INV (JH7110_SYSCLK_END + 6)
-#define JH7110_AONCLK_GMAC0_RX (JH7110_SYSCLK_END + 7)
-#define JH7110_AONCLK_GMAC0_RX_INV (JH7110_SYSCLK_END + 8)
-#define JH7110_AONCLK_OTPC_APB (JH7110_SYSCLK_END + 9)
-#define JH7110_AONCLK_RTC_APB (JH7110_SYSCLK_END + 10)
-#define JH7110_AONCLK_RTC_INTERNAL (JH7110_SYSCLK_END + 11)
-#define JH7110_AONCLK_RTC_32K (JH7110_SYSCLK_END + 12)
-#define JH7110_AONCLK_RTC_CAL (JH7110_SYSCLK_END + 13)
+#define JH7110_AONCLK_END 14
-#define JH7110_AONCLK_END (JH7110_SYSCLK_END + 14)
-
-#define JH7110_STGCLK_HIFI4_CORE (JH7110_AONCLK_END + 0)
-#define JH7110_STGCLK_USB_APB (JH7110_AONCLK_END + 1)
-#define JH7110_STGCLK_USB_UTMI_APB (JH7110_AONCLK_END + 2)
-#define JH7110_STGCLK_USB_AXI (JH7110_AONCLK_END + 3)
-#define JH7110_STGCLK_USB_LPM (JH7110_AONCLK_END + 4)
-#define JH7110_STGCLK_USB_STB (JH7110_AONCLK_END + 5)
-#define JH7110_STGCLK_USB_APP_125 (JH7110_AONCLK_END + 6)
-#define JH7110_STGCLK_USB_REFCLK (JH7110_AONCLK_END + 7)
-#define JH7110_STGCLK_PCIE0_AXI (JH7110_AONCLK_END + 8)
-#define JH7110_STGCLK_PCIE0_APB (JH7110_AONCLK_END + 9)
-#define JH7110_STGCLK_PCIE0_TL (JH7110_AONCLK_END + 10)
-#define JH7110_STGCLK_PCIE1_AXI (JH7110_AONCLK_END + 11)
-#define JH7110_STGCLK_PCIE1_APB (JH7110_AONCLK_END + 12)
-#define JH7110_STGCLK_PCIE1_TL (JH7110_AONCLK_END + 13)
-#define JH7110_STGCLK_PCIE01_MAIN (JH7110_AONCLK_END + 14)
-#define JH7110_STGCLK_SEC_HCLK (JH7110_AONCLK_END + 15)
-#define JH7110_STGCLK_SEC_MISCAHB (JH7110_AONCLK_END + 16)
-#define JH7110_STGCLK_MTRX_GRP0_MAIN (JH7110_AONCLK_END + 17)
-#define JH7110_STGCLK_MTRX_GRP0_BUS (JH7110_AONCLK_END + 18)
-#define JH7110_STGCLK_MTRX_GRP0_STG (JH7110_AONCLK_END + 19)
-#define JH7110_STGCLK_MTRX_GRP1_MAIN (JH7110_AONCLK_END + 20)
-#define JH7110_STGCLK_MTRX_GRP1_BUS (JH7110_AONCLK_END + 21)
-#define JH7110_STGCLK_MTRX_GRP1_STG (JH7110_AONCLK_END + 22)
-#define JH7110_STGCLK_MTRX_GRP1_HIFI (JH7110_AONCLK_END + 23)
-#define JH7110_STGCLK_E2_RTC (JH7110_AONCLK_END + 24)
-#define JH7110_STGCLK_E2_CORE (JH7110_AONCLK_END + 25)
-#define JH7110_STGCLK_E2_DBG (JH7110_AONCLK_END + 26)
-#define JH7110_STGCLK_DMA1P_AXI (JH7110_AONCLK_END + 27)
-#define JH7110_STGCLK_DMA1P_AHB (JH7110_AONCLK_END + 28)
+#define JH7110_STGCLK_HIFI4_CORE 0
+#define JH7110_STGCLK_USB_APB 1
+#define JH7110_STGCLK_USB_UTMI_APB 2
+#define JH7110_STGCLK_USB_AXI 3
+#define JH7110_STGCLK_USB_LPM 4
+#define JH7110_STGCLK_USB_STB 5
+#define JH7110_STGCLK_USB_APP_125 6
+#define JH7110_STGCLK_USB_REFCLK 7
+#define JH7110_STGCLK_PCIE0_AXI 8
+#define JH7110_STGCLK_PCIE0_APB 9
+#define JH7110_STGCLK_PCIE0_TL 10
+#define JH7110_STGCLK_PCIE1_AXI 11
+#define JH7110_STGCLK_PCIE1_APB 12
+#define JH7110_STGCLK_PCIE1_TL 13
+#define JH7110_STGCLK_PCIE01_MAIN 14
+#define JH7110_STGCLK_SEC_HCLK 15
+#define JH7110_STGCLK_SEC_MISCAHB 16
+#define JH7110_STGCLK_MTRX_GRP0_MAIN 17
+#define JH7110_STGCLK_MTRX_GRP0_BUS 18
+#define JH7110_STGCLK_MTRX_GRP0_STG 19
+#define JH7110_STGCLK_MTRX_GRP1_MAIN 20
+#define JH7110_STGCLK_MTRX_GRP1_BUS 21
+#define JH7110_STGCLK_MTRX_GRP1_STG 22
+#define JH7110_STGCLK_MTRX_GRP1_HIFI 23
+#define JH7110_STGCLK_E2_RTC 24
+#define JH7110_STGCLK_E2_CORE 25
+#define JH7110_STGCLK_E2_DBG 26
+#define JH7110_STGCLK_DMA1P_AXI 27
+#define JH7110_STGCLK_DMA1P_AHB 28
-#define JH7110_STGCLK_END (JH7110_AONCLK_END + 29)
+#define JH7110_STGCLK_END 29
#endif /* __DT_BINDINGS_CLOCK_STARFIVE_JH7110_H__ */
diff --git a/include/environment/ti/mmc.env b/include/environment/ti/mmc.env
index 5677d05..a052d28 100644
--- a/include/environment/ti/mmc.env
+++ b/include/environment/ti/mmc.env
@@ -13,7 +13,8 @@
env import -t ${loadaddr} ${filesize}
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
-loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
+loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
+get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt}
envboot=mmc dev ${mmcdev};
if mmc rescan; then
echo SD/MMC found on device ${mmcdev};
@@ -32,7 +33,7 @@
fi;
mmcloados=
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then
- if run loadfdt; then
+ if run get_fdt_mmc; then
bootz ${loadaddr} - ${fdtaddr};
else
if test ${boot_fdt} = try; then
diff --git a/include/environment/ti/ti_armv7_common.env b/include/environment/ti/ti_armv7_common.env
index 0c0929d..e87a41a 100644
--- a/include/environment/ti/ti_armv7_common.env
+++ b/include/environment/ti/ti_armv7_common.env
@@ -22,4 +22,13 @@
done;
get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
-
+bootcmd_ti_mmc=
+ run findfdt; run init_${boot};
+#if CONFIG_CMD_REMOTEPROC
+ run main_cpsw0_qsgmii_phyinit; run boot_rprocs;
+#endif
+ if test ${boot_fit} -eq 1;
+ then run get_fit_${boot}; run get_overlaystring; run run_fit;
+ else;
+ run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern;
+ fi;
diff --git a/include/event.h b/include/event.h
index fe41080..daf44bf 100644
--- a/include/event.h
+++ b/include/event.h
@@ -11,6 +11,7 @@
#define __event_h
#include <dm/ofnode_decl.h>
+#include <linux/types.h>
/**
* enum event_t - Types of events supported by U-Boot
@@ -31,6 +32,9 @@
/* Init hooks */
EVT_MISC_INIT_F,
+ /* Fpga load hook */
+ EVT_FPGA_LOAD,
+
/* Device tree fixups before booting */
EVT_FT_FIXUP,
@@ -60,6 +64,19 @@
} dm;
/**
+ * struct event_fpga_load - fpga load event
+ *
+ * @buf: The buffer that was loaded into the fpga
+ * @bsize: The size of the buffer that was loaded into the fpga
+ * @result: Result of the load operation
+ */
+ struct event_fpga_load {
+ const void *buf;
+ size_t bsize;
+ int result;
+ } fpga_load;
+
+ /**
* struct event_ft_fixup - FDT fixup before booting
*
* @tree: tree to update
diff --git a/include/image-sparse.h b/include/image-sparse.h
index 0572dbd..282a0b2 100644
--- a/include/image-sparse.h
+++ b/include/image-sparse.h
@@ -7,6 +7,8 @@
#include <part.h>
#include <sparse_format.h>
+#define FASTBOOT_MAX_BLK_WRITE 16384
+
#define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
struct sparse_storage {
diff --git a/include/linux/types.h b/include/linux/types.h
index baa2c49..9df930a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -65,7 +65,7 @@
#ifndef _TIME_T
#define _TIME_T
-typedef __kernel_time_t time_t;
+typedef long long time_t;
#endif
#ifndef _CLOCK_T
diff --git a/include/part.h b/include/part.h
index b19b33a..edc46f8 100644
--- a/include/part.h
+++ b/include/part.h
@@ -202,21 +202,6 @@
struct disk_partition *info, int allow_whole_dev);
/**
- * part_get_info_by_name_type() - Search for a partition by name
- * for only specified partition type
- *
- * @param dev_desc - block device descriptor
- * @param gpt_name - the specified table entry name
- * @param info - returns the disk partition info
- * @param part_type - only search in partitions of this type
- *
- * Return: - the partition number on match (starting on 1), -1 on no match,
- * otherwise error
- */
-int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
- struct disk_partition *info, int part_type);
-
-/**
* part_get_info_by_name() - Search for a partition by name
* among all available registered partitions
*
@@ -293,14 +278,6 @@
int allow_whole_dev)
{ *dev_desc = NULL; return -1; }
-static inline int part_get_info_by_name_type(struct blk_desc *dev_desc,
- const char *name,
- struct disk_partition *info,
- int part_type)
-{
- return -ENOENT;
-}
-
static inline int part_get_info_by_name(struct blk_desc *dev_desc,
const char *name,
struct disk_partition *info)
diff --git a/include/spl.h b/include/spl.h
index 658d364..92bcaa9 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -31,6 +31,7 @@
struct blk_desc;
struct legacy_img_hdr;
struct spl_boot_device;
+enum boot_device;
/*
* u_boot_first_phase() - check if this is the first U-Boot phase
@@ -525,7 +526,7 @@
void spl_board_prepare_for_optee(void *fdt);
void spl_board_prepare_for_boot(void);
int spl_board_ubi_load_image(u32 boot_device);
-int spl_board_boot_device(u32 boot_device);
+int spl_board_boot_device(enum boot_device boot_dev_spl);
/**
* spl_board_loader_name() - Return a name for the loader
diff --git a/include/versalpl.h b/include/versalpl.h
index 0cc101b..7dae56b 100644
--- a/include/versalpl.h
+++ b/include/versalpl.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* (C) Copyright 2019 Xilinx, Inc,
- * Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
+ * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>>
*/
#ifndef _VERSALPL_H_
diff --git a/include/video.h b/include/video.h
index 9729fa3..2699151 100644
--- a/include/video.h
+++ b/include/video.h
@@ -406,4 +406,13 @@
*/
int bmp_info(ulong addr);
+/*
+ * video_reserve_from_bloblist()- Reserve frame-buffer memory for video devices
+ * using blobs.
+ *
+ * @ho: video information passed from SPL
+ * Returns: 0 (always)
+ */
+int video_reserve_from_bloblist(struct video_handoff *ho);
+
#endif
diff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h
index 1192d59..18a87d2 100644
--- a/include/zynqmp_firmware.h
+++ b/include/zynqmp_firmware.h
@@ -454,6 +454,8 @@
int zynqmp_pm_set_gem_config(u32 node, enum pm_gem_config_type config,
u32 value);
int zynqmp_pm_is_function_supported(const u32 api_id, const u32 id);
+int zynqmp_mmio_read(const u32 address, u32 *value);
+int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
/* Type of Config Object */
#define PM_CONFIG_OBJECT_TYPE_BASE 0x1U
diff --git a/include/zynqmppl.h b/include/zynqmppl.h
index acf75a8..3fd334a 100644
--- a/include/zynqmppl.h
+++ b/include/zynqmppl.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* (C) Copyright 2015 Xilinx, Inc,
- * Michal Simek <michal.simek@xilinx.com>
+ * Michal Simek <michal.simek@amd.com>
*/
#ifndef _ZYNQMPPL_H_
diff --git a/lib/Kconfig b/lib/Kconfig
index c8b3ec1..3926652 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -508,6 +508,7 @@
config SHA512
bool "Enable SHA512 support"
+ default y if TI_SECURE_DEVICE && FIT_SIGNATURE
help
This option enables support of hashing using SHA512 algorithm.
The hash is calculated in software.
diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c
index cd5c3b6..4d0c8b8 100644
--- a/lib/fwu_updates/fwu.c
+++ b/lib/fwu_updates/fwu.c
@@ -95,6 +95,8 @@
log_err("Unable to revert active_index\n");
ret = 1;
} else {
+ log_info("Trial State count: attempt %d out of %d\n",
+ trial_state_ctr, CONFIG_FWU_TRIAL_STATE_CNT);
ret = trial_counter_update(&trial_state_ctr);
if (ret)
log_err("Unable to increment TrialStateCtr variable\n");
@@ -666,8 +668,6 @@
ret = fwu_set_active_index(boot_idx);
if (!ret)
boottime_check = 1;
-
- return 0;
}
if (efi_init_obj_list() != EFI_SUCCESS)
diff --git a/lib/fwu_updates/fwu_mtd.c b/lib/fwu_updates/fwu_mtd.c
index b73111a..69cd3d7 100644
--- a/lib/fwu_updates/fwu_mtd.c
+++ b/lib/fwu_updates/fwu_mtd.c
@@ -175,8 +175,10 @@
l = strlen(buf);
/* Replace the last ';' with '&' if there is another image. */
- if (i != CONFIG_FWU_NUM_IMAGES_PER_BANK - 1 && l)
- buf[l - 1] = '&';
+ if (i != CONFIG_FWU_NUM_IMAGES_PER_BANK - 1 && l) {
+ buf[l] = '&';
+ buf++;
+ }
len -= l;
buf += l;
}
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 5ec0f94..8f8a67e 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -55,7 +55,8 @@
void *data,
char *response)
{
- lbaint_t n = blkcnt, write_blks, blks = 0, aligned_buf_blks = 100;
+ lbaint_t n = blkcnt, write_blks, blks = 0;
+ lbaint_t aligned_buf_blks = FASTBOOT_MAX_BLK_WRITE;
uint32_t *aligned_buf = NULL;
if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) {
diff --git a/py/travis-ci/u_boot_boardenv_M5208EVBE_qemu.py b/py/travis-ci/u_boot_boardenv_M5208EVBE_qemu.py
deleted file mode 100644
index 4e100cd..0000000
--- a/py/travis-ci/u_boot_boardenv_M5208EVBE_qemu.py
+++ /dev/null
@@ -1,6 +0,0 @@
-import os
-import travis_tftp
-
-env__net_uses_pci = False
-env__net_dhcp_server = True
-env__net_tftp_readable_file = travis_tftp.file2env('u-boot')
diff --git a/test/dm/video.c b/test/dm/video.c
index 0534ee9..d907f68 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -15,6 +15,7 @@
#include <video.h>
#include <video_console.h>
#include <asm/test.h>
+#include <asm/sdl.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
#include <test/test.h>
diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst
index 23cbb99..8f57b6c 100644
--- a/tools/binman/binman.rst
+++ b/tools/binman/binman.rst
@@ -727,6 +727,13 @@
Note that missing, optional blobs do not produce a non-zero exit code from
binman, although it does show a warning about the missing external blob.
+insert-template:
+ This is not strictly speaking an entry property, since it is processed early
+ in Binman before the entries are read. It is a list of phandles of nodes to
+ include in the current (target) node. For each node, its subnodes and their
+ properties are brought into the target node. See Templates_ below for
+ more information.
+
The attributes supported for images and sections are described below. Several
are similar to those for entries.
@@ -831,6 +838,13 @@
binman. This is automatic for certain entry types, e.g. `u-boot-spl`. See
binman_syms_ for more information.
+no-write-symbols:
+ Disables symbol writing for this entry. This can be used in entry types
+ where symbol writing is automatic. For example, if `u-boot-spl` refers to
+ the `u_boot_any_image_pos` symbol but U-Boot is not available in the image
+ containing SPL, this can be used to disable the writing. Quite likely this
+ indicates a bug in your setup.
+
elf-filename:
Sets the file name of a blob's associated ELF file. For example, if the
blob is `zephyr.bin` then the ELF file may be `zephyr.elf`. This allows
@@ -1165,6 +1179,86 @@
arch/arm/dts/u-boot.dtsi ... found: "arch/arm/dts/juno-r2-u-boot.dtsi"
+Templates
+=========
+
+Sometimes multiple images need to be created which have all have a common
+part. For example, a board may generate SPI and eMMC images which both include
+a FIT. Since the FIT includes many entries, it is tedious to repeat them twice
+in the image description.
+
+Templates provide a simple way to handle this::
+
+ binman {
+ multiple-images;
+ common_part: template-1 {
+ some-property;
+ fit {
+ ... lots of entries in here
+ };
+
+ text {
+ text = "base image";
+ };
+ };
+
+ spi-image {
+ filename = "image-spi.bin";
+ insert-template = <&fit>;
+
+ /* things specific to SPI follow */
+ footer {
+ ];
+
+ text {
+ text = "SPI image";
+ };
+ };
+
+ mmc-image {
+ filename = "image-mmc.bin";
+ insert-template = <&fit>;
+
+ /* things specific to MMC follow */
+ footer {
+ ];
+
+ text {
+ text = "MMC image";
+ };
+ };
+ };
+
+The template node name must start with 'template', so it is not considered to be
+an image itself.
+
+The mechanism is very simple. For each phandle in the 'insert-templates'
+property, the source node is looked up. Then the subnodes of that source node
+are copied into the target node, i.e. the one containing the `insert-template`
+property.
+
+If the target node has a node with the same name as a template, its properties
+override corresponding properties in the template. This allows the template to
+be uses as a base, with the node providing updates to the properties as needed.
+The overriding happens recursively.
+
+Template nodes appear first in each node that they are inserted into and
+ordering of template nodes is preserved. Other nodes come afterwards. If a
+template node also appears in the target node, then the template node sets the
+order. Thus the template can be used to set the ordering, even if the target
+node provides all the properties. In the above example, `fit` and `text` appear
+first in the `spi-image` and `mmc-image` images, followed by `footer`.
+
+Where there are multiple template nodes, they are inserted in that order. so
+the first template node appears first, then the second.
+
+Properties in the template node are inserted into the destination node if they
+do not exist there. In the example above, `some-property` is added to each of
+`spi-image` and `mmc-image`.
+
+Note that template nodes are not removed from the binman description at present.
+
+
Updating an ELF file
====================
diff --git a/tools/binman/bintool.py b/tools/binman/bintool.py
index 8162968..0b0f56d 100644
--- a/tools/binman/bintool.py
+++ b/tools/binman/bintool.py
@@ -288,7 +288,7 @@
name = os.path.expanduser(self.name) # Expand paths containing ~
all_args = (name,) + args
env = tools.get_env_with_path()
- tout.detail(f"bintool: {' '.join(all_args)}")
+ tout.debug(f"bintool: {' '.join(all_args)}")
result = command.run_pipe(
[all_args], capture=True, capture_stderr=True, env=env,
raise_on_error=False, binary=binary)
diff --git a/tools/binman/bintools.rst b/tools/binman/bintools.rst
index c30e7eb..20ee243 100644
--- a/tools/binman/bintools.rst
+++ b/tools/binman/bintools.rst
@@ -155,6 +155,17 @@
+Bintool: openssl: openssl tool
+------------------------------
+
+This bintool supports creating new openssl certificates.
+
+It also supports fetching a binary openssl
+
+Documentation about openssl is at https://www.openssl.org/
+
+
+
Bintool: xz: Compression/decompression using the xz algorithm
-------------------------------------------------------------
@@ -182,4 +193,26 @@
man zstd
+
+Bintool: fdt_add_pubkey: Add public key to device tree
+------------------------------------------------------
+
+This bintool supports running `fdt_add_pubkey` in order to add a public
+key coming from a certificate to a device-tree.
+
+Normally signing is done using `mkimage` in context of `binman sign`. However,
+in this process the public key is not added to the stage before u-boot proper.
+Using `fdt_add_pubkey` the key can be injected to the SPL independent of
+`mkimage`
+
+
+
+Bintool: bootgen: Sign ZynqMP FSBL image
+---------------------------------------------
+
+This bintool supports running `bootgen` in order to sign a SPL for ZynqMP
+devices.
+The bintool automatically creates an appropriate input image file (.bif) for
+bootgen based on the passed arguments. The output is a bootable,
+authenticated `boot.bin` file.
diff --git a/tools/binman/btool/fdt_add_pubkey.py b/tools/binman/btool/fdt_add_pubkey.py
new file mode 100644
index 0000000..a507742
--- /dev/null
+++ b/tools/binman/btool/fdt_add_pubkey.py
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2023 Weidmüller Interface GmbH & Co. KG
+# Lukas Funke <lukas.funke@weidmueller.com>
+#
+"""Bintool implementation for fdt_add_pubkey"""
+
+from binman import bintool
+
+class Bintoolfdt_add_pubkey(bintool.Bintool):
+ """Add public key to control dtb (spl or u-boot proper)
+
+ This bintool supports running `fdt_add_pubkey`.
+
+ Normally mkimage adds signature information to the control dtb. However
+ binman images are built independent from each other. Thus it is required
+ to add the public key separately from mkimage.
+ """
+ def __init__(self, name):
+ super().__init__(name, 'Generate image for U-Boot')
+
+ # pylint: disable=R0913
+ def run(self, input_fname, keydir, keyname, required, algo):
+ """Run fdt_add_pubkey
+
+ Args:
+ input_fname (str): dtb file to sign
+ keydir (str): Directory with public key. Optional parameter,
+ default value: '.' (current directory)
+ keyname (str): Public key name. Optional parameter,
+ default value: key
+ required (str): If present this indicates that the key must be
+ verified for the image / configuration to be considered valid.
+ algo (str): Cryptographic algorithm. Optional parameter,
+ default value: sha1,rsa2048
+ """
+ args = []
+ if algo:
+ args += ['-a', algo]
+ if keydir:
+ args += ['-k', keydir]
+ if keyname:
+ args += ['-n', keyname]
+ if required:
+ args += ['-r', required]
+
+ args += [ input_fname ]
+
+ return self.run_cmd(*args)
+
+ def fetch(self, method):
+ """Fetch handler for fdt_add_pubkey
+
+ This installs fdt_add_pubkey using the apt utility.
+
+ Args:
+ method (FETCH_...): Method to use
+
+ Returns:
+ True if the file was fetched and now installed, None if a method
+ other than FETCH_BIN was requested
+
+ Raises:
+ Valuerror: Fetching could not be completed
+ """
+ if method != bintool.FETCH_BIN:
+ return None
+ return self.apt_install('u-boot-tools')
diff --git a/tools/binman/btool/openssl.py b/tools/binman/btool/openssl.py
index 3a4dbdd..aad3b61 100644
--- a/tools/binman/btool/openssl.py
+++ b/tools/binman/btool/openssl.py
@@ -15,6 +15,13 @@
from binman import bintool
from u_boot_pylib import tools
+
+VALID_SHAS = [256, 384, 512, 224]
+SHA_OIDS = {256:'2.16.840.1.101.3.4.2.1',
+ 384:'2.16.840.1.101.3.4.2.2',
+ 512:'2.16.840.1.101.3.4.2.3',
+ 224:'2.16.840.1.101.3.4.2.4'}
+
class Bintoolopenssl(bintool.Bintool):
"""openssl tool
@@ -74,6 +81,243 @@
'-sha512']
return self.run_cmd(*args)
+ def x509_cert_sysfw(self, cert_fname, input_fname, key_fname, sw_rev,
+ config_fname, req_dist_name_dict):
+ """Create a certificate to be booted by system firmware
+
+ Args:
+ cert_fname (str): Filename of certificate to create
+ input_fname (str): Filename containing data to sign
+ key_fname (str): Filename of .pem file
+ sw_rev (int): Software revision
+ config_fname (str): Filename to write fconfig into
+ req_dist_name_dict (dict): Dictionary containing key-value pairs of
+ req_distinguished_name section extensions, must contain extensions for
+ C, ST, L, O, OU, CN and emailAddress
+
+ Returns:
+ str: Tool output
+ """
+ indata = tools.read_file(input_fname)
+ hashval = hashlib.sha512(indata).hexdigest()
+ with open(config_fname, 'w', encoding='utf-8') as outf:
+ print(f'''[ req ]
+distinguished_name = req_distinguished_name
+x509_extensions = v3_ca
+prompt = no
+dirstring_type = nobmp
+
+[ req_distinguished_name ]
+C = {req_dist_name_dict['C']}
+ST = {req_dist_name_dict['ST']}
+L = {req_dist_name_dict['L']}
+O = {req_dist_name_dict['O']}
+OU = {req_dist_name_dict['OU']}
+CN = {req_dist_name_dict['CN']}
+emailAddress = {req_dist_name_dict['emailAddress']}
+
+[ v3_ca ]
+basicConstraints = CA:true
+1.3.6.1.4.1.294.1.3 = ASN1:SEQUENCE:swrv
+1.3.6.1.4.1.294.1.34 = ASN1:SEQUENCE:sysfw_image_integrity
+1.3.6.1.4.1.294.1.35 = ASN1:SEQUENCE:sysfw_image_load
+
+[ swrv ]
+swrv = INTEGER:{sw_rev}
+
+[ sysfw_image_integrity ]
+shaType = OID:2.16.840.1.101.3.4.2.3
+shaValue = FORMAT:HEX,OCT:{hashval}
+imageSize = INTEGER:{len(indata)}
+
+[ sysfw_image_load ]
+destAddr = FORMAT:HEX,OCT:00000000
+authInPlace = INTEGER:2
+''', file=outf)
+ args = ['req', '-new', '-x509', '-key', key_fname, '-nodes',
+ '-outform', 'DER', '-out', cert_fname, '-config', config_fname,
+ '-sha512']
+ return self.run_cmd(*args)
+
+ def x509_cert_rom(self, cert_fname, input_fname, key_fname, sw_rev,
+ config_fname, req_dist_name_dict, cert_type, bootcore,
+ bootcore_opts, load_addr, sha):
+ """Create a certificate
+
+ Args:
+ cert_fname (str): Filename of certificate to create
+ input_fname (str): Filename containing data to sign
+ key_fname (str): Filename of .pem file
+ sw_rev (int): Software revision
+ config_fname (str): Filename to write fconfig into
+ req_dist_name_dict (dict): Dictionary containing key-value pairs of
+ req_distinguished_name section extensions, must contain extensions for
+ C, ST, L, O, OU, CN and emailAddress
+ cert_type (int): Certification type
+ bootcore (int): Booting core
+ load_addr (int): Load address of image
+ sha (int): Hash function
+
+ Returns:
+ str: Tool output
+ """
+ indata = tools.read_file(input_fname)
+ hashval = hashlib.sha512(indata).hexdigest()
+ with open(config_fname, 'w', encoding='utf-8') as outf:
+ print(f'''
+[ req ]
+ distinguished_name = req_distinguished_name
+ x509_extensions = v3_ca
+ prompt = no
+ dirstring_type = nobmp
+
+ [ req_distinguished_name ]
+C = {req_dist_name_dict['C']}
+ST = {req_dist_name_dict['ST']}
+L = {req_dist_name_dict['L']}
+O = {req_dist_name_dict['O']}
+OU = {req_dist_name_dict['OU']}
+CN = {req_dist_name_dict['CN']}
+emailAddress = {req_dist_name_dict['emailAddress']}
+
+ [ v3_ca ]
+ basicConstraints = CA:true
+ 1.3.6.1.4.1.294.1.1 = ASN1:SEQUENCE:boot_seq
+ 1.3.6.1.4.1.294.1.2 = ASN1:SEQUENCE:image_integrity
+ 1.3.6.1.4.1.294.1.3 = ASN1:SEQUENCE:swrv
+# 1.3.6.1.4.1.294.1.4 = ASN1:SEQUENCE:encryption
+ 1.3.6.1.4.1.294.1.8 = ASN1:SEQUENCE:debug
+
+ [ boot_seq ]
+ certType = INTEGER:{cert_type}
+ bootCore = INTEGER:{bootcore}
+ bootCoreOpts = INTEGER:{bootcore_opts}
+ destAddr = FORMAT:HEX,OCT:{load_addr:08x}
+ imageSize = INTEGER:{len(indata)}
+
+ [ image_integrity ]
+ shaType = OID:{SHA_OIDS[sha]}
+ shaValue = FORMAT:HEX,OCT:{hashval}
+
+ [ swrv ]
+ swrv = INTEGER:{sw_rev}
+
+# [ encryption ]
+# initalVector = FORMAT:HEX,OCT:TEST_IMAGE_ENC_IV
+# randomString = FORMAT:HEX,OCT:TEST_IMAGE_ENC_RS
+# iterationCnt = INTEGER:TEST_IMAGE_KEY_DERIVE_INDEX
+# salt = FORMAT:HEX,OCT:TEST_IMAGE_KEY_DERIVE_SALT
+
+ [ debug ]
+ debugUID = FORMAT:HEX,OCT:0000000000000000000000000000000000000000000000000000000000000000
+ debugType = INTEGER:4
+ coreDbgEn = INTEGER:0
+ coreDbgSecEn = INTEGER:0
+''', file=outf)
+ args = ['req', '-new', '-x509', '-key', key_fname, '-nodes',
+ '-outform', 'DER', '-out', cert_fname, '-config', config_fname,
+ '-sha512']
+ return self.run_cmd(*args)
+
+ def x509_cert_rom_combined(self, cert_fname, input_fname, key_fname, sw_rev,
+ config_fname, req_dist_name_dict, load_addr, sha, total_size, num_comps,
+ sysfw_inner_cert_ext_boot_sequence_string, dm_data_ext_boot_sequence_string,
+ imagesize_sbl, hashval_sbl, load_addr_sysfw, imagesize_sysfw,
+ hashval_sysfw, load_addr_sysfw_data, imagesize_sysfw_data,
+ hashval_sysfw_data, sysfw_inner_cert_ext_boot_block,
+ dm_data_ext_boot_block):
+ """Create a certificate
+
+ Args:
+ cert_fname (str): Filename of certificate to create
+ input_fname (str): Filename containing data to sign
+ key_fname (str): Filename of .pem file
+ sw_rev (int): Software revision
+ config_fname (str): Filename to write fconfig into
+ req_dist_name_dict (dict): Dictionary containing key-value pairs of
+ req_distinguished_name section extensions, must contain extensions for
+ C, ST, L, O, OU, CN and emailAddress
+ cert_type (int): Certification type
+ bootcore (int): Booting core
+ load_addr (int): Load address of image
+ sha (int): Hash function
+
+ Returns:
+ str: Tool output
+ """
+ indata = tools.read_file(input_fname)
+ hashval = hashlib.sha512(indata).hexdigest()
+ sha_type = SHA_OIDS[sha]
+ with open(config_fname, 'w', encoding='utf-8') as outf:
+ print(f'''
+[ req ]
+distinguished_name = req_distinguished_name
+x509_extensions = v3_ca
+prompt = no
+dirstring_type = nobmp
+
+[ req_distinguished_name ]
+C = {req_dist_name_dict['C']}
+ST = {req_dist_name_dict['ST']}
+L = {req_dist_name_dict['L']}
+O = {req_dist_name_dict['O']}
+OU = {req_dist_name_dict['OU']}
+CN = {req_dist_name_dict['CN']}
+emailAddress = {req_dist_name_dict['emailAddress']}
+
+[ v3_ca ]
+basicConstraints = CA:true
+1.3.6.1.4.1.294.1.3=ASN1:SEQUENCE:swrv
+1.3.6.1.4.1.294.1.9=ASN1:SEQUENCE:ext_boot_info
+
+[swrv]
+swrv=INTEGER:{sw_rev}
+
+[ext_boot_info]
+extImgSize=INTEGER:{total_size}
+numComp=INTEGER:{num_comps}
+sbl=SEQUENCE:sbl
+sysfw=SEQUENCE:sysfw
+sysfw_data=SEQUENCE:sysfw_data
+{sysfw_inner_cert_ext_boot_sequence_string}
+{dm_data_ext_boot_sequence_string}
+
+[sbl]
+compType = INTEGER:1
+bootCore = INTEGER:16
+compOpts = INTEGER:0
+destAddr = FORMAT:HEX,OCT:{load_addr:08x}
+compSize = INTEGER:{imagesize_sbl}
+shaType = OID:{sha_type}
+shaValue = FORMAT:HEX,OCT:{hashval_sbl}
+
+[sysfw]
+compType = INTEGER:2
+bootCore = INTEGER:0
+compOpts = INTEGER:0
+destAddr = FORMAT:HEX,OCT:{load_addr_sysfw:08x}
+compSize = INTEGER:{imagesize_sysfw}
+shaType = OID:{sha_type}
+shaValue = FORMAT:HEX,OCT:{hashval_sysfw}
+
+[sysfw_data]
+compType = INTEGER:18
+bootCore = INTEGER:0
+compOpts = INTEGER:0
+destAddr = FORMAT:HEX,OCT:{load_addr_sysfw_data:08x}
+compSize = INTEGER:{imagesize_sysfw_data}
+shaType = OID:{sha_type}
+shaValue = FORMAT:HEX,OCT:{hashval_sysfw_data}
+
+{sysfw_inner_cert_ext_boot_block}
+
+{dm_data_ext_boot_block}
+ ''', file=outf)
+ args = ['req', '-new', '-x509', '-key', key_fname, '-nodes',
+ '-outform', 'DER', '-out', cert_fname, '-config', config_fname,
+ '-sha512']
+ return self.run_cmd(*args)
+
def fetch(self, method):
"""Fetch handler for openssl
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 7e2dd35..d1ee1d6 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -22,6 +22,7 @@
from binman import cbfs_util
from binman import elf
from binman import entry
+from dtoc import fdt_util
from u_boot_pylib import command
from u_boot_pylib import tools
from u_boot_pylib import tout
@@ -56,8 +57,9 @@
images = OrderedDict()
if 'multiple-images' in binman_node.props:
for node in binman_node.subnodes:
- images[node.name] = Image(node.name, node,
- use_expanded=use_expanded)
+ if 'template' not in node.name:
+ images[node.name] = Image(node.name, node,
+ use_expanded=use_expanded)
else:
images['image'] = Image('image', binman_node, use_expanded=use_expanded)
return images
@@ -306,8 +308,8 @@
image: Image to prepare
"""
state.PrepareFromLoadedData(image)
- image.LoadData()
image.CollectBintools()
+ image.LoadData(decomp=False)
# If repacking, drop the old offset/size values except for the original
# ones, so we are only left with the constraints.
@@ -478,6 +480,30 @@
AfterReplace(image, allow_resize=True, write_map=write_map)
+def _ProcessTemplates(parent):
+ """Handle any templates in the binman description
+
+ Args:
+ parent: Binman node to process (typically /binman)
+
+ Search though each target node looking for those with an 'insert-template'
+ property. Use that as a list of references to template nodes to use to
+ adjust the target node.
+
+ Processing involves copying each subnode of the template node into the
+ target node.
+
+ This is done recursively, so templates can be at any level of the binman
+ image, e.g. inside a section.
+
+ See 'Templates' in the Binman documnentation for details.
+ """
+ for node in parent.subnodes:
+ tmpl = fdt_util.GetPhandleList(node, 'insert-template')
+ if tmpl:
+ node.copy_subnodes_from_phandles(tmpl)
+ _ProcessTemplates(node)
+
def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded):
"""Prepare the images to be processed and select the device tree
@@ -520,6 +546,8 @@
raise ValueError("Device tree '%s' does not have a 'binman' "
"node" % dtb_fname)
+ _ProcessTemplates(node)
+
images = _ReadImageDesc(node, use_expanded)
if select_images:
diff --git a/tools/binman/elf.py b/tools/binman/elf.py
index 5816284..4219001 100644
--- a/tools/binman/elf.py
+++ b/tools/binman/elf.py
@@ -248,6 +248,9 @@
entry: Entry to process
section: Section which can be used to lookup symbol values
base_sym: Base symbol marking the start of the image
+
+ Returns:
+ int: Number of symbols written
"""
if not base_sym:
base_sym = '__image_copy_start'
@@ -269,12 +272,13 @@
if not syms:
tout.debug('LookupAndWriteSymbols: no syms')
- return
+ return 0
base = syms.get(base_sym)
if not base and not is_elf:
tout.debug('LookupAndWriteSymbols: no base')
- return
+ return 0
base_addr = 0 if is_elf else base.address
+ count = 0
for name, sym in syms.items():
if name.startswith('_binman'):
msg = ("Section '%s': Symbol '%s'\n in entry '%s'" %
@@ -307,6 +311,11 @@
(msg, name, offset, value, len(value_bytes)))
entry.data = (entry.data[:offset] + value_bytes +
entry.data[offset + sym.size:])
+ count += 1
+ if count:
+ tout.detail(
+ f"Section '{section.GetPath()}': entry '{entry.GetPath()}' : {count} symbols")
+ return count
def GetSymbolValue(sym, data, msg):
"""Get the value of a symbol
diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py
index c980839..cc95b42 100644
--- a/tools/binman/elf_test.py
+++ b/tools/binman/elf_test.py
@@ -141,7 +141,8 @@
entry = FakeEntry(10)
section = FakeSection()
elf_fname = self.ElfTestFile('u_boot_binman_syms_bad')
- elf.LookupAndWriteSymbols(elf_fname, entry, section)
+ count = elf.LookupAndWriteSymbols(elf_fname, entry, section)
+ self.assertEqual(0, count)
def testBadSymbolSize(self):
"""Test that an attempt to use an 8-bit symbol are detected
@@ -162,7 +163,7 @@
def testNoValue(self):
"""Test the case where we have no value for the symbol
- This should produce -1 values for all thress symbols, taking up the
+ This should produce -1 values for all three symbols, taking up the
first 16 bytes of the image.
"""
if not elf.ELF_TOOLS:
@@ -170,7 +171,8 @@
entry = FakeEntry(28)
section = FakeSection(sym_value=None)
elf_fname = self.ElfTestFile('u_boot_binman_syms')
- elf.LookupAndWriteSymbols(elf_fname, entry, section)
+ count = elf.LookupAndWriteSymbols(elf_fname, entry, section)
+ self.assertEqual(5, count)
expected = (struct.pack('<L', elf.BINMAN_SYM_MAGIC_VALUE) +
tools.get_bytes(255, 20) +
tools.get_bytes(ord('a'), 4))
@@ -369,6 +371,11 @@
elf.GetSymbolOffset(fname, 'embed')
self.assertIn('__image_copy_start', str(e.exception))
+ def test_get_symbol_address(self):
+ fname = self.ElfTestFile('embed_data')
+ addr = elf.GetSymbolAddress(fname, 'region_size')
+ self.assertEqual(0, addr)
+
if __name__ == '__main__':
unittest.main()
diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst
index b71af80..f237693 100644
--- a/tools/binman/entries.rst
+++ b/tools/binman/entries.rst
@@ -468,6 +468,92 @@
+.. _etype_encrypted:
+
+Entry: encrypted: Externally built encrypted binary blob
+--------------------------------------------------------
+
+This entry provides the functionality to include information about how to
+decrypt an encrypted binary. This information is added to the
+resulting device tree by adding a new cipher node in the entry's parent
+node (i.e. the binary).
+
+The key that must be used to decrypt the binary is either directly embedded
+in the device tree or indirectly by specifying a key source. The key source
+can be used as an id of a key that is stored in an external device.
+
+Using an embedded key
+~~~~~~~~~~~~~~~~~~~~~
+
+This is an example using an embedded key::
+
+ blob-ext {
+ filename = "encrypted-blob.bin";
+ };
+
+ encrypted {
+ algo = "aes256-gcm";
+ iv-filename = "encrypted-blob.bin.iv";
+ key-filename = "encrypted-blob.bin.key";
+ };
+
+This entry generates the following device tree structure form the example
+above::
+
+ data = [...]
+ cipher {
+ algo = "aes256-gcm";
+ key = <0x...>;
+ iv = <0x...>;
+ };
+
+The data property is generated by the blob-ext etype, the cipher node and
+its content is generated by this etype.
+
+Using an external key
+~~~~~~~~~~~~~~~~~~~~~
+
+Instead of embedding the key itself into the device tree, it is also
+possible to address an externally stored key by specifying a 'key-source'
+instead of the 'key'::
+
+ blob-ext {
+ filename = "encrypted-blob.bin";
+ };
+
+ encrypted {
+ algo = "aes256-gcm";
+ iv-filename = "encrypted-blob.bin.iv";
+ key-source = "external-key-id";
+ };
+
+This entry generates the following device tree structure form the example
+above::
+
+ data = [...]
+ cipher {
+ algo = "aes256-gcm";
+ key-source = "external-key-id";
+ iv = <0x...>;
+ };
+
+Properties
+~~~~~~~~~~
+
+Properties / Entry arguments:
+ - algo: The encryption algorithm. Currently no algorithm is supported
+ out-of-the-box. Certain algorithms will be added in future
+ patches.
+ - iv-filename: The name of the file containing the initialization
+ vector (in short iv). See
+ https://en.wikipedia.org/wiki/Initialization_vector
+ - key-filename: The name of the file containing the key. Either
+ key-filename or key-source must be provided.
+ - key-source: The key that should be used. Either key-filename or
+ key-source must be provided.
+
+
+
.. _etype_fdtmap:
Entry: fdtmap: An entry which contains an FDT map
@@ -615,6 +701,12 @@
`of-list` meaning that `-a of-list="dtb1 dtb2..."` should be passed
to binman.
+ fit,fdt-list-val
+ As an alternative to fit,fdt-list the list of device tree files
+ can be provided in this property as a string list, e.g.::
+
+ fit,fdt-list-val = "dtb1", "dtb2";
+
Substitutions
~~~~~~~~~~~~~
@@ -1656,8 +1748,121 @@
The text is not itself nul-terminated. This can be achieved, if required,
by setting the size of the entry to something larger than the text.
+
+
+.. _etype_ti_board_config:
+
+Entry: ti-board-config: An entry containing a TI schema validated board config binary
+-------------------------------------------------------------------------------------
+
+This etype supports generation of two kinds of board configuration
+binaries: singular board config binary as well as combined board config
+binary.
+
+Properties / Entry arguments:
+ - config-file: File containing board configuration data in YAML
+ - schema-file: File containing board configuration YAML schema against
+ which the config file is validated
+
+Output files:
+ - board config binary: File containing board configuration binary
+
+These above parameters are used only when the generated binary is
+intended to be a single board configuration binary. Example::
+
+ my-ti-board-config {
+ ti-board-config {
+ config = "board-config.yaml";
+ schema = "schema.yaml";
+ };
+ };
+
+To generate a combined board configuration binary, we pack the
+needed individual binaries into a ti-board-config binary. In this case,
+the available supported subnode names are board-cfg, pm-cfg, sec-cfg and
+rm-cfg. The final binary is prepended with a header containing details about
+the included board config binaries. Example::
+
+ my-combined-ti-board-config {
+ ti-board-config {
+ board-cfg {
+ config = "board-cfg.yaml";
+ schema = "schema.yaml";
+ };
+ sec-cfg {
+ config = "sec-cfg.yaml";
+ schema = "schema.yaml";
+ };
+ }
+ }
+
+
+
+.. _etype_ti_secure:
+
+Entry: ti-secure: Entry containing a TI x509 certificate binary
+---------------------------------------------------------------
+
+Properties / Entry arguments:
+ - content: List of phandles to entries to sign
+ - keyfile: Filename of file containing key to sign binary with
+ - sha: Hash function to be used for signing
+
+Output files:
+ - input.<unique_name> - input file passed to openssl
+ - config.<unique_name> - input file generated for openssl (which is
+ used as the config file)
+ - cert.<unique_name> - output file generated by openssl (which is
+ used as the entry contents)
+
+openssl signs the provided data, using the TI templated config file and
+writes the signature in this entry. This allows verification that the
+data is genuine.
+
+
+
+.. _etype_ti_secure_rom:
+
+Entry: ti-secure-rom: Entry containing a TI x509 certificate binary for images booted by ROM
+--------------------------------------------------------------------------------------------
+
+Properties / Entry arguments:
+ - keyfile: Filename of file containing key to sign binary with
+ - combined: boolean if device follows combined boot flow
+ - countersign: boolean if device contains countersigned system firmware
+ - load: load address of SPL
+ - sw-rev: software revision
+ - sha: Hash function to be used for signing
+ - core: core on which bootloader runs, valid cores are 'secure' and 'public'
+ - content: phandle of SPL in case of legacy bootflow or phandles of component binaries
+ in case of combined bootflow
+
+The following properties are only for generating a combined bootflow binary:
+ - sysfw-inner-cert: boolean if binary contains sysfw inner certificate
+ - dm-data: boolean if binary contains dm-data binary
+ - content-sbl: phandle of SPL binary
+ - content-sysfw: phandle of sysfw binary
+ - content-sysfw-data: phandle of sysfw-data or tifs-data binary
+ - content-sysfw-inner-cert (optional): phandle of sysfw inner certificate binary
+ - content-dm-data (optional): phandle of dm-data binary
+ - load-sysfw: load address of sysfw binary
+ - load-sysfw-data: load address of sysfw-data or tifs-data binary
+ - load-sysfw-inner-cert (optional): load address of sysfw inner certificate binary
+ - load-dm-data (optional): load address of dm-data binary
+
+Output files:
+ - input.<unique_name> - input file passed to openssl
+ - config.<unique_name> - input file generated for openssl (which is
+ used as the config file)
+ - cert.<unique_name> - output file generated by openssl (which is
+ used as the entry contents)
+
+openssl signs the provided data, using the TI templated config file and
+writes the signature in this entry. This allows verification that the
+data is genuine.
+
.. _etype_u_boot:
Entry: u-boot: U-Boot flat binary
@@ -1912,6 +2117,45 @@
+.. _etype_u_boot_spl_pubkey_dtb:
+
+Entry: u-boot-spl-pubkey-dtb: U-Boot SPL device tree including public key
+-------------------------------------------------------------------------
+
+Properties / Entry arguments:
+ - key-name-hint: Public key name without extension (.crt).
+ Default is determined by underlying
+ bintool (fdt_add_pubkey), usually 'key'.
+ - algo: (Optional) Algorithm used for signing. Default is determined by
+ underlying bintool (fdt_add_pubkey), usually 'sha1,rsa2048'
+ - required: (Optional) If present this indicates that the key must be
+ verified for the image / configuration to be
+ considered valid
+
+The following example shows an image containing an SPL which
+is packed together with the dtb. Binman will add a signature
+node to the dtb.
+
+Example node::
+
+ image {
+ ...
+ spl {
+ filename = "spl.bin"
+
+ u-boot-spl-nodtb {
+ };
+ u-boot-spl-pubkey-dtb {
+ algo = "sha384,rsa4096";
+ required = "conf";
+ key-name-hint = "dev";
+ };
+ };
+ ...
+ }
+
+
+
.. _etype_u_boot_spl_with_ucode_ptr:
Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 3945690..42e0b7b 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -158,6 +158,7 @@
self.offset_from_elf = None
self.preserve = False
self.build_done = False
+ self.no_write_symbols = False
@staticmethod
def FindEntryClass(etype, expanded):
@@ -321,6 +322,7 @@
'offset-from-elf')
self.preserve = fdt_util.GetBool(self._node, 'preserve')
+ self.no_write_symbols = fdt_util.GetBool(self._node, 'no-write-symbols')
def GetDefaultFilename(self):
return None
@@ -472,6 +474,9 @@
def ObtainContents(self, skip_entry=None, fake_size=0):
"""Figure out the contents of an entry.
+ For missing blobs (where allow-missing is enabled), the contents are set
+ to b'' and self.missing is set to True.
+
Args:
skip_entry (Entry): Entry to skip when obtaining section contents
fake_size (int): Size of fake file to create if needed
@@ -695,7 +700,7 @@
Args:
section: Section containing the entry
"""
- if self.auto_write_symbols:
+ if self.auto_write_symbols and not self.no_write_symbols:
# Check if we are writing symbols into an ELF file
is_elf = self.GetDefaultFilename() == self.elf_fname
elf.LookupAndWriteSymbols(self.elf_fname, self, section.GetImage(),
@@ -1309,10 +1314,6 @@
"""
data = b''
for entry in entries:
- # First get the input data and put it in a file. If not available,
- # try later.
- if not entry.ObtainContents(fake_size=fake_size):
- return None, None, None
data += entry.GetData()
uniq = self.GetUniqueName()
fname = tools.get_output_filename(f'{prefix}.{uniq}')
diff --git a/tools/binman/etype/blob_dtb.py b/tools/binman/etype/blob_dtb.py
index 6a3fbc4..d543de9 100644
--- a/tools/binman/etype/blob_dtb.py
+++ b/tools/binman/etype/blob_dtb.py
@@ -38,7 +38,7 @@
self.Raise("Invalid prepend in '%s': '%s'" %
(self._node.name, self.prepend))
- def ObtainContents(self):
+ def ObtainContents(self, fake_size=0):
"""Get the device-tree from the list held by the 'state' module"""
self._filename = self.GetDefaultFilename()
self._pathname, _ = state.GetFdtContents(self.GetFdtEtype())
diff --git a/tools/binman/etype/blob_phase.py b/tools/binman/etype/blob_phase.py
index b937158..951d993 100644
--- a/tools/binman/etype/blob_phase.py
+++ b/tools/binman/etype/blob_phase.py
@@ -52,3 +52,8 @@
# Read entries again, now that we have some
self.ReadEntries()
+
+ # Propagate the no-write-symbols property
+ if self.no_write_symbols:
+ for entry in self._entries.values():
+ entry.no_write_symbols = True
diff --git a/tools/binman/etype/encrypted.py b/tools/binman/etype/encrypted.py
new file mode 100644
index 0000000..53d0e76
--- /dev/null
+++ b/tools/binman/etype/encrypted.py
@@ -0,0 +1,138 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright 2023 Weidmüller Interface GmbH & Co. KG
+# Written by Christian Taedcke <christian.taedcke@weidmueller.com>
+#
+# Entry-type module for cipher information of encrypted blobs/binaries
+#
+
+from binman.etype.collection import Entry
+from dtoc import fdt_util
+from u_boot_pylib import tools
+
+# This is imported if needed
+state = None
+
+
+class Entry_encrypted(Entry):
+ """Externally built encrypted binary blob
+
+ This entry provides the functionality to include information about how to
+ decrypt an encrypted binary. This information is added to the
+ resulting device tree by adding a new cipher node in the entry's parent
+ node (i.e. the binary).
+
+ The key that must be used to decrypt the binary is either directly embedded
+ in the device tree or indirectly by specifying a key source. The key source
+ can be used as an id of a key that is stored in an external device.
+
+ Using an embedded key
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ This is an example using an embedded key::
+
+ blob-ext {
+ filename = "encrypted-blob.bin";
+ };
+
+ encrypted {
+ algo = "aes256-gcm";
+ iv-filename = "encrypted-blob.bin.iv";
+ key-filename = "encrypted-blob.bin.key";
+ };
+
+ This entry generates the following device tree structure form the example
+ above::
+
+ data = [...]
+ cipher {
+ algo = "aes256-gcm";
+ key = <0x...>;
+ iv = <0x...>;
+ };
+
+ The data property is generated by the blob-ext etype, the cipher node and
+ its content is generated by this etype.
+
+ Using an external key
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ Instead of embedding the key itself into the device tree, it is also
+ possible to address an externally stored key by specifying a 'key-source'
+ instead of the 'key'::
+
+ blob-ext {
+ filename = "encrypted-blob.bin";
+ };
+
+ encrypted {
+ algo = "aes256-gcm";
+ iv-filename = "encrypted-blob.bin.iv";
+ key-source = "external-key-id";
+ };
+
+ This entry generates the following device tree structure form the example
+ above::
+
+ data = [...]
+ cipher {
+ algo = "aes256-gcm";
+ key-source = "external-key-id";
+ iv = <0x...>;
+ };
+
+ Properties
+ ~~~~~~~~~~
+
+ Properties / Entry arguments:
+ - algo: The encryption algorithm. Currently no algorithm is supported
+ out-of-the-box. Certain algorithms will be added in future
+ patches.
+ - iv-filename: The name of the file containing the initialization
+ vector (in short iv). See
+ https://en.wikipedia.org/wiki/Initialization_vector
+ - key-filename: The name of the file containing the key. Either
+ key-filename or key-source must be provided.
+ - key-source: The key that should be used. Either key-filename or
+ key-source must be provided.
+ """
+
+ def __init__(self, section, etype, node):
+ # Put this here to allow entry-docs and help to work without libfdt
+ global state
+ from binman import state
+
+ super().__init__(section, etype, node)
+ self.required_props = ['algo', 'iv-filename']
+ self._algo = None
+ self._iv_filename = None
+ self._key_name_hint = None
+ self._key_filename = None
+
+ def ReadNode(self):
+ super().ReadNode()
+
+ self._algo = fdt_util.GetString(self._node, 'algo')
+ self._iv_filename = fdt_util.GetString(self._node, 'iv-filename')
+ self._key_filename = fdt_util.GetString(self._node, 'key-filename')
+ self._key_source = fdt_util.GetString(self._node, 'key-source')
+
+ if self._key_filename is None and self._key_source is None:
+ self.Raise("Provide either 'key-filename' or 'key-source'")
+
+ def gen_entries(self):
+ super().gen_entries()
+
+ iv_filename = tools.get_input_filename(self._iv_filename)
+ iv = tools.read_file(iv_filename, binary=True)
+
+ cipher_node = state.AddSubnode(self._node.parent, "cipher")
+ cipher_node.AddString("algo", self._algo)
+ cipher_node.AddData("iv", iv)
+
+ if self._key_filename:
+ key_filename = tools.get_input_filename(self._key_filename)
+ key = tools.read_file(key_filename, binary=True)
+ cipher_node.AddData("key", key)
+
+ if self._key_source:
+ cipher_node.AddString("key-source", self._key_source)
diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
index c395706..ef4d066 100644
--- a/tools/binman/etype/fit.py
+++ b/tools/binman/etype/fit.py
@@ -81,6 +81,12 @@
`of-list` meaning that `-a of-list="dtb1 dtb2..."` should be passed
to binman.
+ fit,fdt-list-val
+ As an alternative to fit,fdt-list the list of device tree files
+ can be provided in this property as a string list, e.g.::
+
+ fit,fdt-list-val = "dtb1", "dtb2";
+
Substitutions
~~~~~~~~~~~~~
@@ -361,6 +367,9 @@
[EntryArg(self._fit_list_prop.value, str)])
if fdts is not None:
self._fdts = fdts.split()
+ else:
+ self._fdts = fdt_util.GetStringList(self._node, 'fit,fdt-list-val')
+
self._fit_default_dt = self.GetEntryArgsOrProps([EntryArg('default-dt',
str)])[0]
diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py
index e028c44..6ae5d0c 100644
--- a/tools/binman/etype/mkimage.py
+++ b/tools/binman/etype/mkimage.py
@@ -8,10 +8,11 @@
from collections import OrderedDict
from binman.entry import Entry
+from binman.etype.section import Entry_section
from dtoc import fdt_util
from u_boot_pylib import tools
-class Entry_mkimage(Entry):
+class Entry_mkimage(Entry_section):
"""Binary produced by mkimage
Properties / Entry arguments:
@@ -121,54 +122,67 @@
"""
def __init__(self, section, etype, node):
super().__init__(section, etype, node)
- self._multiple_data_files = fdt_util.GetBool(self._node, 'multiple-data-files')
- self._mkimage_entries = OrderedDict()
self._imagename = None
- self._filename = fdt_util.GetString(self._node, 'filename')
- self.align_default = None
+ self._multiple_data_files = False
def ReadNode(self):
super().ReadNode()
+ self._multiple_data_files = fdt_util.GetBool(self._node,
+ 'multiple-data-files')
self._args = fdt_util.GetArgs(self._node, 'args')
self._data_to_imagename = fdt_util.GetBool(self._node,
'data-to-imagename')
if self._data_to_imagename and self._node.FindNode('imagename'):
self.Raise('Cannot use both imagename node and data-to-imagename')
- self.ReadEntries()
def ReadEntries(self):
"""Read the subnodes to find out what should go in this image"""
for node in self._node.subnodes:
- entry = Entry.Create(self, node)
+ if self.IsSpecialSubnode(node):
+ continue
+ entry = Entry.Create(self, node,
+ expanded=self.GetImage().use_expanded,
+ missing_etype=self.GetImage().missing_etype)
entry.ReadNode()
+ entry.SetPrefix(self._name_prefix)
if entry.name == 'imagename':
self._imagename = entry
else:
- self._mkimage_entries[entry.name] = entry
+ self._entries[entry.name] = entry
- def ObtainContents(self):
+ def BuildSectionData(self, required):
+ """Build mkimage entry contents
+
+ Runs mkimage to build the entry contents
+
+ Args:
+ required (bool): True if the data must be present, False if it is OK
+ to return None
+
+ Returns:
+ bytes: Contents of the section
+ """
# Use a non-zero size for any fake files to keep mkimage happy
# Note that testMkimageImagename() relies on this 'mkimage' parameter
fake_size = 1024
if self._multiple_data_files:
fnames = []
uniq = self.GetUniqueName()
- for entry in self._mkimage_entries.values():
- if not entry.ObtainContents(fake_size=fake_size):
- return False
- if entry._pathname:
- fnames.append(entry._pathname)
+ for entry in self._entries.values():
+ # Put the contents in a temporary file
+ ename = f'mkimage-in-{uniq}-{entry.name}'
+ fname = tools.get_output_filename(ename)
+ data = entry.GetData(required)
+ tools.write_file(fname, data)
+ fnames.append(fname)
input_fname = ":".join(fnames)
+ data = b''
else:
data, input_fname, uniq = self.collect_contents_to_file(
- self._mkimage_entries.values(), 'mkimage', fake_size)
- if data is None:
- return False
+ self._entries.values(), 'mkimage', fake_size)
if self._imagename:
image_data, imagename_fname, _ = self.collect_contents_to_file(
[self._imagename], 'mkimage-n', 1024)
- if image_data is None:
- return False
outfile = self._filename if self._filename else 'mkimage-out.%s' % uniq
output_fname = tools.get_output_filename(outfile)
@@ -176,8 +190,7 @@
self.CheckMissing(missing_list)
self.missing = bool(missing_list)
if self.missing:
- self.SetContents(b'')
- return self.allow_missing
+ return b''
args = ['-d', input_fname]
if self._data_to_imagename:
@@ -186,71 +199,58 @@
args += ['-n', imagename_fname]
args += self._args + [output_fname]
if self.mkimage.run_cmd(*args) is not None:
- self.SetContents(tools.read_file(output_fname))
+ return tools.read_file(output_fname)
else:
# Bintool is missing; just use the input data as the output
self.record_missing_bintool(self.mkimage)
- self.SetContents(data)
-
- return True
+ return data
def GetEntries(self):
# Make a copy so we don't change the original
- entries = OrderedDict(self._mkimage_entries)
+ entries = OrderedDict(self._entries)
if self._imagename:
entries['imagename'] = self._imagename
return entries
- def SetAllowMissing(self, allow_missing):
- """Set whether a section allows missing external blobs
+ def AddBintools(self, btools):
+ super().AddBintools(btools)
+ self.mkimage = self.AddBintool(btools, 'mkimage')
- Args:
- allow_missing: True if allowed, False if not allowed
- """
- self.allow_missing = allow_missing
- for entry in self._mkimage_entries.values():
- entry.SetAllowMissing(allow_missing)
- if self._imagename:
- self._imagename.SetAllowMissing(allow_missing)
+ def CheckEntries(self):
+ pass
- def SetAllowFakeBlob(self, allow_fake):
- """Set whether the sub nodes allows to create a fake blob
+ def ProcessContents(self):
+ # The blob may have changed due to WriteSymbols()
+ ok = super().ProcessContents()
+ data = self.BuildSectionData(True)
+ ok2 = self.ProcessContentsUpdate(data)
+ return ok and ok2
- Args:
- allow_fake: True if allowed, False if not allowed
- """
- for entry in self._mkimage_entries.values():
- entry.SetAllowFakeBlob(allow_fake)
- if self._imagename:
- self._imagename.SetAllowFakeBlob(allow_fake)
+ def SetImagePos(self, image_pos):
+ """Set the position in the image
- def CheckMissing(self, missing_list):
- """Check if any entries in this section have missing external blobs
+ This sets each subentry's offsets, sizes and positions-in-image
+ according to where they ended up in the packed mkimage file.
- If there are missing (non-optional) blobs, the entries are added to the
- list
+ NOTE: This assumes a legacy mkimage and assumes that the images are
+ written to the output in order. SoC-specific mkimage handling may not
+ conform to this, in which case these values may be wrong.
Args:
- missing_list: List of Entry objects to be added to
+ image_pos (int): Position of this entry in the image
"""
- for entry in self._mkimage_entries.values():
- entry.CheckMissing(missing_list)
- if self._imagename:
- self._imagename.CheckMissing(missing_list)
+ # The mkimage header consists of 0x40 bytes, following by a table of
+ # offsets for each file
+ upto = 0x40
- def CheckFakedBlobs(self, faked_blobs_list):
- """Check if any entries in this section have faked external blobs
+ # Skip the 0-terminated list of offsets (assume a single image)
+ upto += 4 + 4
+ for entry in self.GetEntries().values():
+ entry.SetOffsetSize(upto, None)
- If there are faked blobs, the entries are added to the list
+ # Give up if any entries lack a size
+ if entry.size is None:
+ return
+ upto += entry.size
- Args:
- faked_blobs_list: List of Entry objects to be added to
- """
- for entry in self._mkimage_entries.values():
- entry.CheckFakedBlobs(faked_blobs_list)
- if self._imagename:
- self._imagename.CheckFakedBlobs(faked_blobs_list)
-
- def AddBintools(self, btools):
- super().AddBintools(btools)
- self.mkimage = self.AddBintool(btools, 'mkimage')
+ super().SetImagePos(image_pos)
diff --git a/tools/binman/etype/pre_load.py b/tools/binman/etype/pre_load.py
index bd3545b..2e4c723 100644
--- a/tools/binman/etype/pre_load.py
+++ b/tools/binman/etype/pre_load.py
@@ -81,7 +81,8 @@
def ReadNode(self):
super().ReadNode()
- self.key_path, = self.GetEntryArgsOrProps([EntryArg('pre-load-key-path', str)])
+ self.key_path, = self.GetEntryArgsOrProps(
+ [EntryArg('pre-load-key-path', str)])
if self.key_path is None:
self.key_path = ''
@@ -98,8 +99,7 @@
self.Raise(sign_name + " is not supported")
# Read the key
- with open(key_name, 'rb') as pem:
- key = RSA.import_key(pem.read())
+ key = RSA.import_key(tools.read_file(key_name))
# Check if the key has the expected size
if key.size_in_bytes() != RSAS[sign_name]:
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index c36edd1..fb49e85 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -168,6 +168,7 @@
self._end_4gb = False
self._ignore_missing = False
self._filename = None
+ self.align_default = 0
def IsSpecialSubnode(self, node):
"""Check if a node is a special one used by the section itself
@@ -178,7 +179,8 @@
Returns:
bool: True if the node is a special one, else False
"""
- return node.name.startswith('hash') or node.name.startswith('signature')
+ start_list = ('cipher', 'hash', 'signature', 'template')
+ return any(node.name.startswith(name) for name in start_list)
def ReadNode(self):
"""Read properties from the section node"""
@@ -315,12 +317,15 @@
This should be overridden by subclasses which want to build their own
data structure for the section.
+ Missing entries will have be given empty (or fake) data, so are
+ processed normally here.
+
Args:
required: True if the data must be present, False if it is OK to
return None
Returns:
- Contents of the section (bytes)
+ Contents of the section (bytes), None if not available
"""
section_data = bytearray()
@@ -710,6 +715,33 @@
def GetEntryContents(self, skip_entry=None):
"""Call ObtainContents() for each entry in the section
+ The overall goal of this function is to read in any available data in
+ this entry and any subentries. This includes reading in blobs, setting
+ up objects which have predefined contents, etc.
+
+ Since entry types which contain entries call ObtainContents() on all
+ those entries too, the result is that ObtainContents() is called
+ recursively for the whole tree below this one.
+
+ Entries with subentries are generally not *themselves& processed here,
+ i.e. their ObtainContents() implementation simply obtains contents of
+ their subentries, skipping their own contents. For example, the
+ implementation here (for entry_Section) does not attempt to pack the
+ entries into a final result. That is handled later.
+
+ Generally, calling this results in SetContents() being called for each
+ entry, so that the 'data' and 'contents_size; properties are set, and
+ subsequent calls to GetData() will return value data.
+
+ Where 'allow_missing' is set, this can result in the 'missing' property
+ being set to True if there is no data. This is handled by setting the
+ data to b''. This function will still return success. Future calls to
+ GetData() for this entry will return b'', or in the case where the data
+ is faked, GetData() will return that fake data.
+
+ Args:
+ skip_entry: (single) Entry to skip, or None to process all entries
+
Note that this may set entry.absent to True if the entry is not
actually needed
"""
@@ -719,7 +751,7 @@
next_todo.append(entry)
return entry
- todo = self._entries.values()
+ todo = self.GetEntries().values()
for passnum in range(3):
threads = state.GetThreads()
next_todo = []
@@ -892,7 +924,7 @@
allow_missing: True if allowed, False if not allowed
"""
self.allow_missing = allow_missing
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.SetAllowMissing(allow_missing)
def SetAllowFakeBlob(self, allow_fake):
@@ -902,7 +934,7 @@
allow_fake: True if allowed, False if not allowed
"""
super().SetAllowFakeBlob(allow_fake)
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.SetAllowFakeBlob(allow_fake)
def CheckMissing(self, missing_list):
@@ -914,7 +946,7 @@
Args:
missing_list: List of Entry objects to be added to
"""
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.CheckMissing(missing_list)
def CheckFakedBlobs(self, faked_blobs_list):
@@ -925,7 +957,7 @@
Args:
faked_blobs_list: List of Entry objects to be added to
"""
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.CheckFakedBlobs(faked_blobs_list)
def CheckOptional(self, optional_list):
@@ -936,7 +968,7 @@
Args:
optional_list (list): List of Entry objects to be added to
"""
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.CheckOptional(optional_list)
def check_missing_bintools(self, missing_list):
@@ -948,7 +980,7 @@
missing_list: List of Bintool objects to be added to
"""
super().check_missing_bintools(missing_list)
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.check_missing_bintools(missing_list)
def _CollectEntries(self, entries, entries_by_name, add_entry):
@@ -998,12 +1030,12 @@
entry.Raise(f'Missing required properties/entry args: {missing}')
def CheckAltFormats(self, alt_formats):
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.CheckAltFormats(alt_formats)
def AddBintools(self, btools):
super().AddBintools(btools)
- for entry in self._entries.values():
+ for entry in self.GetEntries().values():
entry.AddBintools(btools)
def read_elf_segments(self):
diff --git a/tools/binman/etype/ti_board_config.py b/tools/binman/etype/ti_board_config.py
new file mode 100644
index 0000000..94f894c
--- /dev/null
+++ b/tools/binman/etype/ti_board_config.py
@@ -0,0 +1,259 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+# Written by Neha Malcom Francis <n-francis@ti.com>
+#
+# Entry-type module for generating schema validated TI board
+# configuration binary
+#
+
+import os
+import struct
+import yaml
+
+from collections import OrderedDict
+from jsonschema import validate
+from shutil import copyfileobj
+
+from binman.entry import Entry
+from binman.etype.section import Entry_section
+from dtoc import fdt_util
+from u_boot_pylib import tools
+
+BOARDCFG = 0xB
+BOARDCFG_SEC = 0xD
+BOARDCFG_PM = 0xE
+BOARDCFG_RM = 0xC
+BOARDCFG_NUM_ELEMS = 4
+
+class Entry_ti_board_config(Entry_section):
+ """An entry containing a TI schema validated board config binary
+
+ This etype supports generation of two kinds of board configuration
+ binaries: singular board config binary as well as combined board config
+ binary.
+
+ Properties / Entry arguments:
+ - config-file: File containing board configuration data in YAML
+ - schema-file: File containing board configuration YAML schema against
+ which the config file is validated
+
+ Output files:
+ - board config binary: File containing board configuration binary
+
+ These above parameters are used only when the generated binary is
+ intended to be a single board configuration binary. Example::
+
+ my-ti-board-config {
+ ti-board-config {
+ config = "board-config.yaml";
+ schema = "schema.yaml";
+ };
+ };
+
+ To generate a combined board configuration binary, we pack the
+ needed individual binaries into a ti-board-config binary. In this case,
+ the available supported subnode names are board-cfg, pm-cfg, sec-cfg and
+ rm-cfg. The final binary is prepended with a header containing details about
+ the included board config binaries. Example::
+
+ my-combined-ti-board-config {
+ ti-board-config {
+ board-cfg {
+ config = "board-cfg.yaml";
+ schema = "schema.yaml";
+ };
+ sec-cfg {
+ config = "sec-cfg.yaml";
+ schema = "schema.yaml";
+ };
+ }
+ }
+ """
+ def __init__(self, section, etype, node):
+ super().__init__(section, etype, node)
+ self._config = None
+ self._schema = None
+ self._entries = OrderedDict()
+ self._num_elems = BOARDCFG_NUM_ELEMS
+ self._fmt = '<HHHBB'
+ self._index = 0
+ self._binary_offset = 0
+ self._sw_rev = 1
+ self._devgrp = 0
+
+ def ReadNode(self):
+ super().ReadNode()
+ self._config = fdt_util.GetString(self._node, 'config')
+ self._schema = fdt_util.GetString(self._node, 'schema')
+ # Depending on whether config file is present in node, we determine
+ # whether it is a combined board config binary or not
+ if self._config is None:
+ self.ReadEntries()
+ else:
+ self._config_file = tools.get_input_filename(self._config)
+ self._schema_file = tools.get_input_filename(self._schema)
+
+ def ReadEntries(self):
+ """Read the subnodes to find out what should go in this image
+ """
+ for node in self._node.subnodes:
+ if 'type' not in node.props:
+ entry = Entry.Create(self, node, 'ti-board-config')
+ entry.ReadNode()
+ cfg_data = entry.BuildSectionData(True)
+ entry._cfg_data = cfg_data
+ self._entries[entry.name] = entry
+ self._num_elems = len(self._node.subnodes)
+
+ def _convert_to_byte_chunk(self, val, data_type):
+ """Convert value into byte array
+
+ Args:
+ val: value to convert into byte array
+ data_type: data type used in schema, supported data types are u8,
+ u16 and u32
+
+ Returns:
+ array of bytes representing value
+ """
+ size = 0
+ if (data_type == '#/definitions/u8'):
+ size = 1
+ elif (data_type == '#/definitions/u16'):
+ size = 2
+ else:
+ size = 4
+ if type(val) == int:
+ br = val.to_bytes(size, byteorder='little')
+ return br
+
+ def _compile_yaml(self, schema_yaml, file_yaml):
+ """Convert YAML file into byte array based on YAML schema
+
+ Args:
+ schema_yaml: file containing YAML schema
+ file_yaml: file containing config to compile
+
+ Returns:
+ array of bytes repesenting YAML file against YAML schema
+ """
+ br = bytearray()
+ for key, node in file_yaml.items():
+ node_schema = schema_yaml['properties'][key]
+ node_type = node_schema.get('type')
+ if not 'type' in node_schema:
+ br += self._convert_to_byte_chunk(node,
+ node_schema.get('$ref'))
+ elif node_type == 'object':
+ br += self._compile_yaml(node_schema, node)
+ elif node_type == 'array':
+ for item in node:
+ if not isinstance(item, dict):
+ br += self._convert_to_byte_chunk(
+ item, schema_yaml['properties'][key]['items']['$ref'])
+ else:
+ br += self._compile_yaml(node_schema.get('items'), item)
+ return br
+
+ def _generate_binaries(self):
+ """Generate config binary artifacts from the loaded YAML configuration file
+
+ Returns:
+ byte array containing config binary artifacts
+ or None if generation fails
+ """
+ cfg_binary = bytearray()
+ for key, node in self.file_yaml.items():
+ node_schema = self.schema_yaml['properties'][key]
+ br = self._compile_yaml(node_schema, node)
+ cfg_binary += br
+ return cfg_binary
+
+ def _add_boardcfg(self, bcfgtype, bcfgdata):
+ """Add board config to combined board config binary
+
+ Args:
+ bcfgtype (int): board config type
+ bcfgdata (byte array): board config data
+ """
+ size = len(bcfgdata)
+ desc = struct.pack(self._fmt, bcfgtype,
+ self._binary_offset, size, self._devgrp, 0)
+ with open(self.descfile, 'ab+') as desc_fh:
+ desc_fh.write(desc)
+ with open(self.bcfgfile, 'ab+') as bcfg_fh:
+ bcfg_fh.write(bcfgdata)
+ self._binary_offset += size
+ self._index += 1
+
+ def _finalize(self):
+ """Generate final combined board config binary
+
+ Returns:
+ byte array containing combined board config data
+ or None if unable to generate
+ """
+ with open(self.descfile, 'rb') as desc_fh:
+ with open(self.bcfgfile, 'rb') as bcfg_fh:
+ with open(self.fh_file, 'ab+') as fh:
+ copyfileobj(desc_fh, fh)
+ copyfileobj(bcfg_fh, fh)
+ data = tools.read_file(self.fh_file)
+ return data
+
+ def BuildSectionData(self, required):
+ if self._config is None:
+ self._binary_offset = 0
+ uniq = self.GetUniqueName()
+ self.fh_file = tools.get_output_filename('fh.%s' % uniq)
+ self.descfile = tools.get_output_filename('desc.%s' % uniq)
+ self.bcfgfile = tools.get_output_filename('bcfg.%s' % uniq)
+
+ # when binman runs again make sure we start clean
+ if os.path.exists(self.fh_file):
+ os.remove(self.fh_file)
+ if os.path.exists(self.descfile):
+ os.remove(self.descfile)
+ if os.path.exists(self.bcfgfile):
+ os.remove(self.bcfgfile)
+
+ with open(self.fh_file, 'wb') as f:
+ t_bytes = f.write(struct.pack(
+ '<BB', self._num_elems, self._sw_rev))
+ self._binary_offset += t_bytes
+ self._binary_offset += self._num_elems * struct.calcsize(self._fmt)
+
+ if 'board-cfg' in self._entries:
+ self._add_boardcfg(BOARDCFG, self._entries['board-cfg']._cfg_data)
+
+ if 'sec-cfg' in self._entries:
+ self._add_boardcfg(BOARDCFG_SEC, self._entries['sec-cfg']._cfg_data)
+
+ if 'pm-cfg' in self._entries:
+ self._add_boardcfg(BOARDCFG_PM, self._entries['pm-cfg']._cfg_data)
+
+ if 'rm-cfg' in self._entries:
+ self._add_boardcfg(BOARDCFG_RM, self._entries['rm-cfg']._cfg_data)
+
+ data = self._finalize()
+ return data
+
+ else:
+ with open(self._config_file, 'r') as f:
+ self.file_yaml = yaml.safe_load(f)
+ with open(self._schema_file, 'r') as sch:
+ self.schema_yaml = yaml.safe_load(sch)
+
+ try:
+ validate(self.file_yaml, self.schema_yaml)
+ except Exception as e:
+ self.Raise(f"Schema validation error: {e}")
+
+ data = self._generate_binaries()
+ return data
+
+ def SetImagePos(self, image_pos):
+ Entry.SetImagePos(self, image_pos)
+
+ def CheckEntries(self):
+ Entry.CheckEntries(self)
diff --git a/tools/binman/etype/ti_secure.py b/tools/binman/etype/ti_secure.py
new file mode 100644
index 0000000..d939dce
--- /dev/null
+++ b/tools/binman/etype/ti_secure.py
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+# Written by Neha Malcom Francis <n-francis@ti.com>
+#
+
+# Support for generation of TI secured binary blobs
+
+from binman.entry import EntryArg
+from binman.etype.x509_cert import Entry_x509_cert
+
+from dtoc import fdt_util
+
+class Entry_ti_secure(Entry_x509_cert):
+ """Entry containing a TI x509 certificate binary
+
+ Properties / Entry arguments:
+ - content: List of phandles to entries to sign
+ - keyfile: Filename of file containing key to sign binary with
+ - sha: Hash function to be used for signing
+
+ Output files:
+ - input.<unique_name> - input file passed to openssl
+ - config.<unique_name> - input file generated for openssl (which is
+ used as the config file)
+ - cert.<unique_name> - output file generated by openssl (which is
+ used as the entry contents)
+
+ openssl signs the provided data, using the TI templated config file and
+ writes the signature in this entry. This allows verification that the
+ data is genuine.
+ """
+ def __init__(self, section, etype, node):
+ super().__init__(section, etype, node)
+ self.openssl = None
+
+ def ReadNode(self):
+ super().ReadNode()
+ self.key_fname = self.GetEntryArgsOrProps([
+ EntryArg('keyfile', str)], required=True)[0]
+ self.sha = fdt_util.GetInt(self._node, 'sha', 512)
+ self.req_dist_name = {'C': 'US',
+ 'ST': 'TX',
+ 'L': 'Dallas',
+ 'O': 'Texas Instruments Incorporated',
+ 'OU': 'Processors',
+ 'CN': 'TI Support',
+ 'emailAddress': 'support@ti.com'}
+
+ def GetCertificate(self, required):
+ """Get the contents of this entry
+
+ Args:
+ required: True if the data must be present, False if it is OK to
+ return None
+
+ Returns:
+ bytes content of the entry, which is the certificate binary for the
+ provided data
+ """
+ return super().GetCertificate(required=required, type='sysfw')
+
+ def ObtainContents(self):
+ data = self.data
+ if data is None:
+ data = self.GetCertificate(False)
+ if data is None:
+ return False
+ self.SetContents(data)
+ return True
+
+ def ProcessContents(self):
+ # The blob may have changed due to WriteSymbols()
+ data = self.data
+ return self.ProcessContentsUpdate(data)
+
+ def AddBintools(self, btools):
+ super().AddBintools(btools)
+ self.openssl = self.AddBintool(btools, 'openssl')
diff --git a/tools/binman/etype/ti_secure_rom.py b/tools/binman/etype/ti_secure_rom.py
new file mode 100644
index 0000000..9a7ac9e
--- /dev/null
+++ b/tools/binman/etype/ti_secure_rom.py
@@ -0,0 +1,249 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+# Written by Neha Malcom Francis <n-francis@ti.com>
+#
+
+# Support for generation of TI secured bootloaders booted by ROM
+
+from binman.entry import EntryArg
+from binman.etype.x509_cert import Entry_x509_cert
+
+import hashlib
+
+from dtoc import fdt_util
+from u_boot_pylib import tools
+
+VALID_SHAS = [256, 384, 512, 224]
+SHA_OIDS = {256:'2.16.840.1.101.3.4.2.1',
+ 384:'2.16.840.1.101.3.4.2.2',
+ 512:'2.16.840.1.101.3.4.2.3',
+ 224:'2.16.840.1.101.3.4.2.4'}
+
+class Entry_ti_secure_rom(Entry_x509_cert):
+ """Entry containing a TI x509 certificate binary for images booted by ROM
+
+ Properties / Entry arguments:
+ - keyfile: Filename of file containing key to sign binary with
+ - combined: boolean if device follows combined boot flow
+ - countersign: boolean if device contains countersigned system firmware
+ - load: load address of SPL
+ - sw-rev: software revision
+ - sha: Hash function to be used for signing
+ - core: core on which bootloader runs, valid cores are 'secure' and 'public'
+ - content: phandle of SPL in case of legacy bootflow or phandles of component binaries
+ in case of combined bootflow
+
+ The following properties are only for generating a combined bootflow binary:
+ - sysfw-inner-cert: boolean if binary contains sysfw inner certificate
+ - dm-data: boolean if binary contains dm-data binary
+ - content-sbl: phandle of SPL binary
+ - content-sysfw: phandle of sysfw binary
+ - content-sysfw-data: phandle of sysfw-data or tifs-data binary
+ - content-sysfw-inner-cert (optional): phandle of sysfw inner certificate binary
+ - content-dm-data (optional): phandle of dm-data binary
+ - load-sysfw: load address of sysfw binary
+ - load-sysfw-data: load address of sysfw-data or tifs-data binary
+ - load-sysfw-inner-cert (optional): load address of sysfw inner certificate binary
+ - load-dm-data (optional): load address of dm-data binary
+
+ Output files:
+ - input.<unique_name> - input file passed to openssl
+ - config.<unique_name> - input file generated for openssl (which is
+ used as the config file)
+ - cert.<unique_name> - output file generated by openssl (which is
+ used as the entry contents)
+
+ openssl signs the provided data, using the TI templated config file and
+ writes the signature in this entry. This allows verification that the
+ data is genuine.
+ """
+ def __init__(self, section, etype, node):
+ super().__init__(section, etype, node)
+ self.openssl = None
+
+ def ReadNode(self):
+ super().ReadNode()
+ self.combined = fdt_util.GetBool(self._node, 'combined', False)
+ self.countersign = fdt_util.GetBool(self._node, 'countersign', False)
+ self.load_addr = fdt_util.GetInt(self._node, 'load', 0x00000000)
+ self.sw_rev = fdt_util.GetInt(self._node, 'sw-rev', 1)
+ self.sha = fdt_util.GetInt(self._node, 'sha', 512)
+ self.core = fdt_util.GetString(self._node, 'core', 'secure')
+ self.key_fname = self.GetEntryArgsOrProps([
+ EntryArg('keyfile', str)], required=True)[0]
+ if self.combined:
+ self.sysfw_inner_cert = fdt_util.GetBool(self._node, 'sysfw-inner-cert', False)
+ self.load_addr_sysfw = fdt_util.GetInt(self._node, 'load-sysfw', 0x00000000)
+ self.load_addr_sysfw_data = fdt_util.GetInt(self._node, 'load-sysfw-data', 0x00000000)
+ self.dm_data = fdt_util.GetBool(self._node, 'dm-data', False)
+ if self.dm_data:
+ self.load_addr_dm_data = fdt_util.GetInt(self._node, 'load-dm-data', 0x00000000)
+ self.req_dist_name = {'C': 'US',
+ 'ST': 'TX',
+ 'L': 'Dallas',
+ 'O': 'Texas Instruments Incorporated',
+ 'OU': 'Processors',
+ 'CN': 'TI Support',
+ 'emailAddress': 'support@ti.com'}
+
+ def NonCombinedGetCertificate(self, required):
+ """Generate certificate for legacy boot flow
+
+ Args:
+ required: True if the data must be present, False if it is OK to
+ return None
+
+ Returns:
+ bytes content of the entry, which is the certificate binary for the
+ provided data
+ """
+ if self.core == 'secure':
+ if self.countersign:
+ self.cert_type = 3
+ else:
+ self.cert_type = 2
+ self.bootcore = 0
+ self.bootcore_opts = 32
+ else:
+ self.cert_type = 1
+ self.bootcore = 16
+ self.bootcore_opts = 0
+ return super().GetCertificate(required=required, type='rom')
+
+ def CombinedGetCertificate(self, required):
+ """Generate certificate for combined boot flow
+
+ Args:
+ required: True if the data must be present, False if it is OK to
+ return None
+
+ Returns:
+ bytes content of the entry, which is the certificate binary for the
+ provided data
+ """
+ uniq = self.GetUniqueName()
+
+ self.num_comps = 3
+ self.sha_type = SHA_OIDS[self.sha]
+
+ # sbl
+ self.content = fdt_util.GetPhandleList(self._node, 'content-sbl')
+ input_data_sbl = self.GetContents(required)
+ if input_data_sbl is None:
+ return None
+
+ input_fname_sbl = tools.get_output_filename('input.%s' % uniq)
+ tools.write_file(input_fname_sbl, input_data_sbl)
+
+ indata_sbl = tools.read_file(input_fname_sbl)
+ self.hashval_sbl = hashlib.sha512(indata_sbl).hexdigest()
+ self.imagesize_sbl = len(indata_sbl)
+
+ # sysfw
+ self.content = fdt_util.GetPhandleList(self._node, 'content-sysfw')
+ input_data_sysfw = self.GetContents(required)
+
+ input_fname_sysfw = tools.get_output_filename('input.%s' % uniq)
+ tools.write_file(input_fname_sysfw, input_data_sysfw)
+
+ indata_sysfw = tools.read_file(input_fname_sysfw)
+ self.hashval_sysfw = hashlib.sha512(indata_sysfw).hexdigest()
+ self.imagesize_sysfw = len(indata_sysfw)
+
+ # sysfw data
+ self.content = fdt_util.GetPhandleList(self._node, 'content-sysfw-data')
+ input_data_sysfw_data = self.GetContents(required)
+
+ input_fname_sysfw_data = tools.get_output_filename('input.%s' % uniq)
+ tools.write_file(input_fname_sysfw_data, input_data_sysfw_data)
+
+ indata_sysfw_data = tools.read_file(input_fname_sysfw_data)
+ self.hashval_sysfw_data = hashlib.sha512(indata_sysfw_data).hexdigest()
+ self.imagesize_sysfw_data = len(indata_sysfw_data)
+
+ # sysfw inner cert
+ self.sysfw_inner_cert_ext_boot_block = ""
+ self.sysfw_inner_cert_ext_boot_sequence_string = ""
+ imagesize_sysfw_inner_cert = 0
+ if self.sysfw_inner_cert:
+ self.content = fdt_util.GetPhandleList(self._node, 'content-sysfw-inner-cert')
+ input_data_sysfw_inner_cert = self.GetContents(required)
+
+ input_fname_sysfw_inner_cert = tools.get_output_filename('input.%s' % uniq)
+ tools.write_file(input_fname_sysfw_inner_cert, input_data_sysfw_inner_cert)
+
+ indata_sysfw_inner_cert = tools.read_file(input_fname_sysfw_inner_cert)
+ hashval_sysfw_inner_cert = hashlib.sha512(indata_sysfw_inner_cert).hexdigest()
+ imagesize_sysfw_inner_cert = len(indata_sysfw_inner_cert)
+ self.num_comps += 1
+ self.sysfw_inner_cert_ext_boot_sequence_string = "sysfw_inner_cert=SEQUENCE:sysfw_inner_cert"
+ self.sysfw_inner_cert_ext_boot_block = f"""[sysfw_inner_cert]
+compType = INTEGER:3
+bootCore = INTEGER:0
+compOpts = INTEGER:0
+destAddr = FORMAT:HEX,OCT:00000000
+compSize = INTEGER:{imagesize_sysfw_inner_cert}
+shaType = OID:{self.sha_type}
+shaValue = FORMAT:HEX,OCT:{hashval_sysfw_inner_cert}"""
+
+ # dm data
+ self.dm_data_ext_boot_sequence_string = ""
+ self.dm_data_ext_boot_block = ""
+ imagesize_dm_data = 0
+ if self.dm_data:
+ self.content = fdt_util.GetPhandleList(self._node, 'content-dm-data')
+ input_data_dm_data = self.GetContents(required)
+
+ input_fname_dm_data = tools.get_output_filename('input.%s' % uniq)
+ tools.write_file(input_fname_dm_data, input_data_dm_data)
+
+ indata_dm_data = tools.read_file(input_fname_dm_data)
+ hashval_dm_data = hashlib.sha512(indata_dm_data).hexdigest()
+ imagesize_dm_data = len(indata_dm_data)
+ self.num_comps += 1
+ self.dm_data_ext_boot_sequence_string = "dm_data=SEQUENCE:dm_data"
+ self.dm_data_ext_boot_block = f"""[dm_data]
+compType = INTEGER:17
+bootCore = INTEGER:16
+compOpts = INTEGER:0
+destAddr = FORMAT:HEX,OCT:{self.load_addr_dm_data:08x}
+compSize = INTEGER:{imagesize_dm_data}
+shaType = OID:{self.sha_type}
+shaValue = FORMAT:HEX,OCT:{hashval_dm_data}"""
+
+ self.total_size = self.imagesize_sbl + self.imagesize_sysfw + self.imagesize_sysfw_data + imagesize_sysfw_inner_cert + imagesize_dm_data
+ return super().GetCertificate(required=required, type='rom-combined')
+
+ def GetCertificate(self, required):
+ """Get the contents of this entry
+
+ Args:
+ required: True if the data must be present, False if it is OK to
+ return None
+
+ Returns:
+ bytes content of the entry, which is the certificate binary for the
+ provided data
+ """
+ if self.combined:
+ return self.CombinedGetCertificate(required)
+ else:
+ return self.NonCombinedGetCertificate(required)
+
+ def ObtainContents(self):
+ data = self.data
+ if data is None:
+ data = self.GetCertificate(False)
+ if data is None:
+ return False
+ self.SetContents(data)
+ return True
+
+ def ProcessContents(self):
+ # The blob may have changed due to WriteSymbols()
+ data = self.data
+ return self.ProcessContentsUpdate(data)
+
+ def AddBintools(self, btools):
+ super().AddBintools(btools)
+ self.openssl = self.AddBintool(btools, 'openssl')
diff --git a/tools/binman/etype/u_boot_spl_bss_pad.py b/tools/binman/etype/u_boot_spl_bss_pad.py
index 1ffeb39..4af4045 100644
--- a/tools/binman/etype/u_boot_spl_bss_pad.py
+++ b/tools/binman/etype/u_boot_spl_bss_pad.py
@@ -38,7 +38,7 @@
def ObtainContents(self):
fname = tools.get_input_filename('spl/u-boot-spl')
bss_size = elf.GetSymbolAddress(fname, '__bss_size')
- if not bss_size:
+ if bss_size is None:
self.Raise('Expected __bss_size symbol in spl/u-boot-spl')
self.SetContents(tools.get_bytes(0, bss_size))
return True
diff --git a/tools/binman/etype/u_boot_spl_pubkey_dtb.py b/tools/binman/etype/u_boot_spl_pubkey_dtb.py
new file mode 100644
index 0000000..cb19606
--- /dev/null
+++ b/tools/binman/etype/u_boot_spl_pubkey_dtb.py
@@ -0,0 +1,112 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2023 Weidmueller GmbH
+# Written by Lukas Funke <lukas.funke@weidmueller.com>
+#
+# Entry-type module for 'u-boot-spl-pubkey.dtb'
+#
+
+import tempfile
+import os
+
+from binman.etype.blob_dtb import Entry_blob_dtb
+
+from dtoc import fdt_util
+
+from u_boot_pylib import tools
+
+# This is imported if needed
+state = None
+
+# pylint: disable=C0103
+class Entry_u_boot_spl_pubkey_dtb(Entry_blob_dtb):
+ """U-Boot SPL device tree including public key
+
+ Properties / Entry arguments:
+ - key-name-hint: Public key name without extension (.crt).
+ Default is determined by underlying
+ bintool (fdt_add_pubkey), usually 'key'.
+ - algo: (Optional) Algorithm used for signing. Default is determined by
+ underlying bintool (fdt_add_pubkey), usually 'sha1,rsa2048'
+ - required: (Optional) If present this indicates that the key must be
+ verified for the image / configuration to be
+ considered valid
+
+ The following example shows an image containing an SPL which
+ is packed together with the dtb. Binman will add a signature
+ node to the dtb.
+
+ Example node::
+
+ image {
+ ...
+ spl {
+ filename = "spl.bin"
+
+ u-boot-spl-nodtb {
+ };
+ u-boot-spl-pubkey-dtb {
+ algo = "sha384,rsa4096";
+ required = "conf";
+ key-name-hint = "dev";
+ };
+ };
+ ...
+ }
+ """
+
+ def __init__(self, section, etype, node):
+ # Put this here to allow entry-docs and help to work without libfdt
+ global state
+ from binman import state
+
+ super().__init__(section, etype, node)
+ self.required_props = ['key-name-hint']
+ self.fdt_add_pubkey = None
+ self._algo = fdt_util.GetString(self._node, 'algo')
+ self._required = fdt_util.GetString(self._node, 'required')
+ self._key_name_hint = fdt_util.GetString(self._node, 'key-name-hint')
+
+ def ObtainContents(self, fake_size=0):
+ """Add public key to SPL dtb
+
+ Add public key which is pointed out by
+ 'key-name-hint' to node 'signature' in the spl-dtb
+
+ This is equivalent to the '-K' option of 'mkimage'
+
+ Args:
+ fake_size (int): unused
+ """
+
+ # We don't pass fake_size upwards because this is currently
+ # not supported by the blob type
+ super().ObtainContents()
+
+ with tempfile.NamedTemporaryFile(prefix=os.path.basename(
+ self.GetFdtEtype()),
+ dir=tools.get_output_dir())\
+ as pubkey_tdb:
+ tools.write_file(pubkey_tdb.name, self.GetData())
+ keyname = tools.get_input_filename(self._key_name_hint + ".crt")
+ self.fdt_add_pubkey.run(pubkey_tdb.name,
+ os.path.dirname(keyname),
+ self._key_name_hint,
+ self._required, self._algo)
+ dtb = tools.read_file(pubkey_tdb.name)
+ self.SetContents(dtb)
+ state.UpdateFdtContents(self.GetFdtEtype(), dtb)
+
+ return True
+
+ # pylint: disable=R0201,C0116
+ def GetDefaultFilename(self):
+ return 'spl/u-boot-spl-pubkey.dtb'
+
+ # pylint: disable=R0201,C0116
+ def GetFdtEtype(self):
+ return 'u-boot-spl-dtb'
+
+ # pylint: disable=R0201,C0116
+ def AddBintools(self, btools):
+ super().AddBintools(btools)
+ self.fdt_add_pubkey = self.AddBintool(btools, 'fdt_add_pubkey')
diff --git a/tools/binman/etype/u_boot_tpl_bss_pad.py b/tools/binman/etype/u_boot_tpl_bss_pad.py
index 29c6a95..46d2cd5 100644
--- a/tools/binman/etype/u_boot_tpl_bss_pad.py
+++ b/tools/binman/etype/u_boot_tpl_bss_pad.py
@@ -38,7 +38,7 @@
def ObtainContents(self):
fname = tools.get_input_filename('tpl/u-boot-tpl')
bss_size = elf.GetSymbolAddress(fname, '__bss_size')
- if not bss_size:
+ if bss_size is None:
self.Raise('Expected __bss_size symbol in tpl/u-boot-tpl')
self.SetContents(tools.get_bytes(0, bss_size))
return True
diff --git a/tools/binman/etype/u_boot_vpl_bss_pad.py b/tools/binman/etype/u_boot_vpl_bss_pad.py
index bba38cc..12b286a 100644
--- a/tools/binman/etype/u_boot_vpl_bss_pad.py
+++ b/tools/binman/etype/u_boot_vpl_bss_pad.py
@@ -38,7 +38,7 @@
def ObtainContents(self):
fname = tools.get_input_filename('vpl/u-boot-vpl')
bss_size = elf.GetSymbolAddress(fname, '__bss_size')
- if not bss_size:
+ if bss_size is None:
self.Raise('Expected __bss_size symbol in vpl/u-boot-vpl')
self.SetContents(tools.get_bytes(0, bss_size))
return True
diff --git a/tools/binman/etype/x509_cert.py b/tools/binman/etype/x509_cert.py
index f80a6ec..d028cfe 100644
--- a/tools/binman/etype/x509_cert.py
+++ b/tools/binman/etype/x509_cert.py
@@ -31,6 +31,26 @@
def __init__(self, section, etype, node):
super().__init__(section, etype, node)
self.openssl = None
+ self.req_dist_name = None
+ self.cert_type = None
+ self.bootcore = None
+ self.bootcore_opts = None
+ self.load_addr = None
+ self.sha = None
+ self.total_size = None
+ self.num_comps = None
+ self.sysfw_inner_cert_ext_boot_sequence_string = None
+ self.dm_data_ext_boot_sequence_string = None
+ self.imagesize_sbl = None
+ self.hashval_sbl = None
+ self.load_addr_sysfw = None
+ self.imagesize_sysfw = None
+ self.hashval_sysfw = None
+ self.load_addr_sysfw_data = None
+ self.imagesize_sysfw_data = None
+ self.hashval_sysfw_data = None
+ self.sysfw_inner_cert_ext_boot_block = None
+ self.dm_data_ext_boot_block = None
def ReadNode(self):
super().ReadNode()
@@ -38,13 +58,16 @@
self._cert_rev = fdt_util.GetInt(self._node, 'cert-revision-int', 0)
self.key_fname = self.GetEntryArgsOrProps([
EntryArg('keyfile', str)], required=True)[0]
+ self.sw_rev = fdt_util.GetInt(self._node, 'sw-rev', 1)
- def GetCertificate(self, required):
+ def GetCertificate(self, required, type='generic'):
"""Get the contents of this entry
Args:
required: True if the data must be present, False if it is OK to
return None
+ type: Type of x509 certificate to generate, current supported ones are
+ 'generic', 'sysfw', 'rom'
Returns:
bytes content of the entry, which is the signed vblock for the
@@ -60,13 +83,61 @@
input_fname = tools.get_output_filename('input.%s' % uniq)
config_fname = tools.get_output_filename('config.%s' % uniq)
tools.write_file(input_fname, input_data)
- stdout = self.openssl.x509_cert(
- cert_fname=output_fname,
- input_fname=input_fname,
- key_fname=self.key_fname,
- cn=self._cert_ca,
- revision=self._cert_rev,
- config_fname=config_fname)
+ if type == 'generic':
+ stdout = self.openssl.x509_cert(
+ cert_fname=output_fname,
+ input_fname=input_fname,
+ key_fname=self.key_fname,
+ cn=self._cert_ca,
+ revision=self._cert_rev,
+ config_fname=config_fname)
+ elif type == 'sysfw':
+ stdout = self.openssl.x509_cert_sysfw(
+ cert_fname=output_fname,
+ input_fname=input_fname,
+ key_fname=self.key_fname,
+ config_fname=config_fname,
+ sw_rev=self.sw_rev,
+ req_dist_name_dict=self.req_dist_name)
+ elif type == 'rom':
+ stdout = self.openssl.x509_cert_rom(
+ cert_fname=output_fname,
+ input_fname=input_fname,
+ key_fname=self.key_fname,
+ config_fname=config_fname,
+ sw_rev=self.sw_rev,
+ req_dist_name_dict=self.req_dist_name,
+ cert_type=self.cert_type,
+ bootcore=self.bootcore,
+ bootcore_opts=self.bootcore_opts,
+ load_addr=self.load_addr,
+ sha=self.sha
+ )
+ elif type == 'rom-combined':
+ stdout = self.openssl.x509_cert_rom_combined(
+ cert_fname=output_fname,
+ input_fname=input_fname,
+ key_fname=self.key_fname,
+ config_fname=config_fname,
+ sw_rev=self.sw_rev,
+ req_dist_name_dict=self.req_dist_name,
+ load_addr=self.load_addr,
+ sha=self.sha,
+ total_size=self.total_size,
+ num_comps=self.num_comps,
+ sysfw_inner_cert_ext_boot_sequence_string=self.sysfw_inner_cert_ext_boot_sequence_string,
+ dm_data_ext_boot_sequence_string=self.dm_data_ext_boot_sequence_string,
+ imagesize_sbl=self.imagesize_sbl,
+ hashval_sbl=self.hashval_sbl,
+ load_addr_sysfw=self.load_addr_sysfw,
+ imagesize_sysfw=self.imagesize_sysfw,
+ hashval_sysfw=self.hashval_sysfw,
+ load_addr_sysfw_data=self.load_addr_sysfw_data,
+ imagesize_sysfw_data=self.imagesize_sysfw_data,
+ hashval_sysfw_data=self.hashval_sysfw_data,
+ sysfw_inner_cert_ext_boot_block=self.sysfw_inner_cert_ext_boot_block,
+ dm_data_ext_boot_block=self.dm_data_ext_boot_block
+ )
if stdout is not None:
data = tools.read_file(output_fname)
else:
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 43b4f85..1cfa349 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -94,9 +94,13 @@
TEST_FDT1_DATA = b'fdt1'
TEST_FDT2_DATA = b'test-fdt2'
ENV_DATA = b'var1=1\nvar2="2"'
+ENCRYPTED_IV_DATA = b'123456'
+ENCRYPTED_KEY_DATA = b'abcde'
PRE_LOAD_MAGIC = b'UBSH'
PRE_LOAD_VERSION = 0x11223344.to_bytes(4, 'big')
PRE_LOAD_HDR_SIZE = 0x00001000.to_bytes(4, 'big')
+TI_BOARD_CONFIG_DATA = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
+TI_UNSECURE_DATA = b'unsecuredata'
# Subdirectory of the input dir to use to put test FDTs
TEST_FDT_SUBDIR = 'fdts'
@@ -199,6 +203,9 @@
shutil.copytree(cls.TestFile('files'),
os.path.join(cls._indir, 'files'))
+ shutil.copytree(cls.TestFile('yaml'),
+ os.path.join(cls._indir, 'yaml'))
+
TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
TestFunctional._MakeInputFile('compress_big', COMPRESS_DATA_BIG)
TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)
@@ -207,6 +214,7 @@
TestFunctional._MakeInputFile('fw_dynamic.bin', OPENSBI_DATA)
TestFunctional._MakeInputFile('scp.bin', SCP_DATA)
TestFunctional._MakeInputFile('rockchip-tpl.bin', ROCKCHIP_TPL_DATA)
+ TestFunctional._MakeInputFile('ti_unsecure.bin', TI_UNSECURE_DATA)
# Add a few .dtb files for testing
TestFunctional._MakeInputFile('%s/test-fdt1.dtb' % TEST_FDT_SUBDIR,
@@ -226,6 +234,10 @@
# Newer OP_TEE file in v1 binary format
cls.make_tee_bin('tee.bin')
+ # test files for encrypted tests
+ TestFunctional._MakeInputFile('encrypted-file.iv', ENCRYPTED_IV_DATA)
+ TestFunctional._MakeInputFile('encrypted-file.key', ENCRYPTED_KEY_DATA)
+
cls.comp_bintools = {}
for name in COMP_BINTOOLS:
cls.comp_bintools[name] = bintool.Bintool.create(name)
@@ -347,7 +359,7 @@
use_expanded=False, verbosity=None, allow_missing=False,
allow_fake_blobs=False, extra_indirs=None, threads=None,
test_section_timeout=False, update_fdt_in_elf=None,
- force_missing_bintools='', ignore_missing=False):
+ force_missing_bintools='', ignore_missing=False, output_dir=None):
"""Run binman with a given test file
Args:
@@ -378,6 +390,7 @@
update_fdt_in_elf: Value to pass with --update-fdt-in-elf=xxx
force_missing_tools (str): comma-separated list of bintools to
regard as missing
+ output_dir: Specific output directory to use for image using -O
Returns:
int return code, 0 on success
@@ -424,6 +437,8 @@
if extra_indirs:
for indir in extra_indirs:
args += ['-I', indir]
+ if output_dir:
+ args += ['-O', output_dir]
return self._DoBinman(*args)
def _SetupDtb(self, fname, outfile='u-boot.dtb'):
@@ -639,6 +654,16 @@
tools.read_file(cls.ElfTestFile(src_fname)))
@classmethod
+ def _SetupPmuFwlElf(cls, src_fname='bss_data'):
+ """Set up an ELF file with a '_dt_ucode_base_size' symbol
+
+ Args:
+ Filename of ELF file to use as VPL
+ """
+ TestFunctional._MakeInputFile('pmu-firmware.elf',
+ tools.read_file(cls.ElfTestFile(src_fname)))
+
+ @classmethod
def _SetupDescriptor(cls):
with open(cls.TestFile('descriptor.bin'), 'rb') as fd:
TestFunctional._MakeInputFile('descriptor.bin', fd.read())
@@ -1103,6 +1128,7 @@
def testPackZeroOffset(self):
"""Test that an entry at offset 0 is not given a new offset"""
+ self._SetupSplElf()
with self.assertRaises(ValueError) as e:
self._DoTestFile('025_pack_zero_size.dts')
self.assertIn("Node '/binman/u-boot-spl': Offset 0x0 (0) overlaps "
@@ -1116,6 +1142,7 @@
def testPackX86RomNoSize(self):
"""Test that the end-at-4gb property requires a size property"""
+ self._SetupSplElf()
with self.assertRaises(ValueError) as e:
self._DoTestFile('027_pack_4gb_no_size.dts')
self.assertIn("Image '/binman': Section size must be provided when "
@@ -1124,6 +1151,7 @@
def test4gbAndSkipAtStartTogether(self):
"""Test that the end-at-4gb and skip-at-size property can't be used
together"""
+ self._SetupSplElf()
with self.assertRaises(ValueError) as e:
self._DoTestFile('098_4gb_and_skip_at_start_together.dts')
self.assertIn("Image '/binman': Provide either 'end-at-4gb' or "
@@ -1131,6 +1159,7 @@
def testPackX86RomOutside(self):
"""Test that the end-at-4gb property checks for offset boundaries"""
+ self._SetupSplElf()
with self.assertRaises(ValueError) as e:
self._DoTestFile('028_pack_4gb_outside.dts')
self.assertIn("Node '/binman/u-boot': Offset 0x0 (0) size 0x4 (4) "
@@ -1423,6 +1452,7 @@
def testPackUbootSplMicrocode(self):
"""Test that x86 microcode can be handled correctly in SPL"""
+ self._SetupSplElf()
self._PackUbootSplMicrocode('049_x86_ucode_spl.dts')
def testPackUbootSplMicrocodeReorder(self):
@@ -1442,6 +1472,7 @@
def testSplDtb(self):
"""Test that an image with spl/u-boot-spl.dtb can be created"""
+ self._SetupSplElf()
data = self._DoReadFile('051_u_boot_spl_dtb.dts')
self.assertEqual(U_BOOT_SPL_DTB_DATA, data[:len(U_BOOT_SPL_DTB_DATA)])
@@ -1452,7 +1483,7 @@
self.assertEqual(U_BOOT_SPL_NODTB_DATA, data[:len(U_BOOT_SPL_NODTB_DATA)])
def checkSymbols(self, dts, base_data, u_boot_offset, entry_args=None,
- use_expanded=False):
+ use_expanded=False, no_write_symbols=False):
"""Check the image contains the expected symbol values
Args:
@@ -1481,9 +1512,14 @@
sym_values = struct.pack('<LLQLL', elf.BINMAN_SYM_MAGIC_VALUE,
0x00, u_boot_offset + len(U_BOOT_DATA),
0x10 + u_boot_offset, 0x04)
- expected = (sym_values + base_data[24:] +
- tools.get_bytes(0xff, 1) + U_BOOT_DATA + sym_values +
- base_data[24:])
+ if no_write_symbols:
+ expected = (base_data +
+ tools.get_bytes(0xff, 0x38 - len(base_data)) +
+ U_BOOT_DATA + base_data)
+ else:
+ expected = (sym_values + base_data[24:] +
+ tools.get_bytes(0xff, 1) + U_BOOT_DATA + sym_values +
+ base_data[24:])
self.assertEqual(expected, data)
def testSymbols(self):
@@ -1957,6 +1993,8 @@
def testUpdateFdtAll(self):
"""Test that all device trees are updated with offset/size info"""
+ self._SetupSplElf()
+ self._SetupTplElf()
data = self._DoReadFileRealDtb('082_fdt_update_all.dts')
base_expected = {
@@ -3279,6 +3317,8 @@
def testUpdateFdtAllRepack(self):
"""Test that all device trees are updated with offset/size info"""
+ self._SetupSplElf()
+ self._SetupTplElf()
data = self._DoReadFileRealDtb('134_fdt_update_all_repack.dts')
SECTION_SIZE = 0x300
DTB_SIZE = 602
@@ -3732,6 +3772,7 @@
def testMkimage(self):
"""Test using mkimage to build an image"""
+ self._SetupSplElf()
data = self._DoReadFile('156_mkimage.dts')
# Just check that the data appears in the file somewhere
@@ -3739,6 +3780,7 @@
def testMkimageMissing(self):
"""Test that binman still produces an image if mkimage is missing"""
+ self._SetupSplElf()
with test_util.capture_sys_output() as (_, stderr):
self._DoTestFile('156_mkimage.dts',
force_missing_bintools='mkimage')
@@ -3851,6 +3893,7 @@
def testSimpleFit(self):
"""Test an image with a FIT inside"""
+ self._SetupSplElf()
data = self._DoReadFile('161_fit.dts')
self.assertEqual(U_BOOT_DATA, data[:len(U_BOOT_DATA)])
self.assertEqual(U_BOOT_NODTB_DATA, data[-len(U_BOOT_NODTB_DATA):])
@@ -5370,6 +5413,7 @@
def testFitSubentryHashSubnode(self):
"""Test an image with a FIT inside"""
+ self._SetupSplElf()
data, _, _, out_dtb_name = self._DoReadFileDtb(
'221_fit_subentry_hash.dts', use_real_dtb=True, update_dtb=True)
@@ -5619,41 +5663,61 @@
def testPreLoad(self):
"""Test an image with a pre-load header"""
entry_args = {
- 'pre-load-key-path': '.',
+ 'pre-load-key-path': os.path.join(self._binman_dir, 'test'),
}
- data, _, _, _ = self._DoReadFileDtb('230_pre_load.dts',
- entry_args=entry_args)
- self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
- self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
- self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
- data = self._DoReadFile('230_pre_load.dts')
+ data = self._DoReadFileDtb(
+ '230_pre_load.dts', entry_args=entry_args,
+ extra_indirs=[os.path.join(self._binman_dir, 'test')])[0]
self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
+ def testPreLoadNoKey(self):
+ """Test an image with a pre-load heade0r with missing key"""
+ with self.assertRaises(FileNotFoundError) as exc:
+ self._DoReadFile('230_pre_load.dts')
+ self.assertIn("No such file or directory: 'dev.key'",
+ str(exc.exception))
+
def testPreLoadPkcs(self):
"""Test an image with a pre-load header with padding pkcs"""
- data = self._DoReadFile('231_pre_load_pkcs.dts')
+ entry_args = {
+ 'pre-load-key-path': os.path.join(self._binman_dir, 'test'),
+ }
+ data = self._DoReadFileDtb('231_pre_load_pkcs.dts',
+ entry_args=entry_args)[0]
self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
def testPreLoadPss(self):
"""Test an image with a pre-load header with padding pss"""
- data = self._DoReadFile('232_pre_load_pss.dts')
+ entry_args = {
+ 'pre-load-key-path': os.path.join(self._binman_dir, 'test'),
+ }
+ data = self._DoReadFileDtb('232_pre_load_pss.dts',
+ entry_args=entry_args)[0]
self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)])
self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
self.assertEqual(PRE_LOAD_HDR_SIZE, data[8:8 + len(PRE_LOAD_HDR_SIZE)])
def testPreLoadInvalidPadding(self):
"""Test an image with a pre-load header with an invalid padding"""
+ entry_args = {
+ 'pre-load-key-path': os.path.join(self._binman_dir, 'test'),
+ }
with self.assertRaises(ValueError) as e:
- data = self._DoReadFile('233_pre_load_invalid_padding.dts')
+ self._DoReadFileDtb('233_pre_load_invalid_padding.dts',
+ entry_args=entry_args)
def testPreLoadInvalidSha(self):
"""Test an image with a pre-load header with an invalid hash"""
+ entry_args = {
+ 'pre-load-key-path': os.path.join(self._binman_dir, 'test'),
+ }
with self.assertRaises(ValueError) as e:
- data = self._DoReadFile('234_pre_load_invalid_sha.dts')
+ self._DoReadFileDtb('234_pre_load_invalid_sha.dts',
+ entry_args=entry_args)
def testPreLoadInvalidAlgo(self):
"""Test an image with a pre-load header with an invalid algo"""
@@ -5662,8 +5726,12 @@
def testPreLoadInvalidKey(self):
"""Test an image with a pre-load header with an invalid key"""
+ entry_args = {
+ 'pre-load-key-path': os.path.join(self._binman_dir, 'test'),
+ }
with self.assertRaises(ValueError) as e:
- data = self._DoReadFile('236_pre_load_invalid_key.dts')
+ data = self._DoReadFileDtb('236_pre_load_invalid_key.dts',
+ entry_args=entry_args)
def _CheckSafeUniqueNames(self, *images):
"""Check all entries of given images for unsafe unique names"""
@@ -5888,6 +5956,7 @@
def testMkimageImagename(self):
"""Test using mkimage with -n holding the data too"""
+ self._SetupSplElf()
data = self._DoReadFile('242_mkimage_name.dts')
# Check that the data appears in the file somewhere
@@ -5905,6 +5974,7 @@
def testMkimageImage(self):
"""Test using mkimage with -n holding the data too"""
+ self._SetupSplElf()
data = self._DoReadFile('243_mkimage_image.dts')
# Check that the data appears in the file somewhere
@@ -5925,6 +5995,7 @@
def testMkimageImageNoContent(self):
"""Test using mkimage with -n and no data"""
+ self._SetupSplElf()
with self.assertRaises(ValueError) as exc:
self._DoReadFile('244_mkimage_image_no_content.dts')
self.assertIn('Could not complete processing of contents',
@@ -5932,6 +6003,7 @@
def testMkimageImageBad(self):
"""Test using mkimage with imagename node and data-to-imagename"""
+ self._SetupSplElf()
with self.assertRaises(ValueError) as exc:
self._DoReadFile('245_mkimage_image_bad.dts')
self.assertIn('Cannot use both imagename node and data-to-imagename',
@@ -5947,6 +6019,7 @@
def testMkimageCollection(self):
"""Test using a collection referring to an entry in a mkimage entry"""
+ self._SetupSplElf()
data = self._DoReadFile('247_mkimage_coll.dts')
expect = U_BOOT_SPL_DATA + U_BOOT_DATA
self.assertEqual(expect, data[:len(expect)])
@@ -6032,6 +6105,8 @@
def testMkimageMultipleDataFiles(self):
"""Test passing multiple files to mkimage in a mkimage entry"""
+ self._SetupSplElf()
+ self._SetupTplElf()
data = self._DoReadFile('252_mkimage_mult_data.dts')
# Size of files are packed in their 4B big-endian format
expect = struct.pack('>I', len(U_BOOT_TPL_DATA))
@@ -6046,8 +6121,42 @@
expect += U_BOOT_SPL_DATA
self.assertEqual(expect, data[-len(expect):])
+ def testMkimageMultipleExpanded(self):
+ """Test passing multiple files to mkimage in a mkimage entry"""
+ self._SetupSplElf()
+ self._SetupTplElf()
+ entry_args = {
+ 'spl-bss-pad': 'y',
+ 'spl-dtb': 'y',
+ }
+ data = self._DoReadFileDtb('252_mkimage_mult_data.dts',
+ use_expanded=True, entry_args=entry_args)[0]
+ pad_len = 10
+ tpl_expect = U_BOOT_TPL_DATA
+ spl_expect = U_BOOT_SPL_NODTB_DATA + tools.get_bytes(0, pad_len)
+ spl_expect += U_BOOT_SPL_DTB_DATA
+
+ content = data[0x40:]
+ lens = struct.unpack('>III', content[:12])
+
+ # Size of files are packed in their 4B big-endian format
+ # Size info is always followed by a 4B zero value.
+ self.assertEqual(len(tpl_expect), lens[0])
+ self.assertEqual(len(spl_expect), lens[1])
+ self.assertEqual(0, lens[2])
+
+ rest = content[12:]
+ self.assertEqual(tpl_expect, rest[:len(tpl_expect)])
+
+ rest = rest[len(tpl_expect):]
+ align_pad = len(tpl_expect) % 4
+ self.assertEqual(tools.get_bytes(0, align_pad), rest[:align_pad])
+ rest = rest[align_pad:]
+ self.assertEqual(spl_expect, rest)
+
def testMkimageMultipleNoContent(self):
"""Test passing multiple data files to mkimage with one data file having no content"""
+ self._SetupSplElf()
with self.assertRaises(ValueError) as exc:
self._DoReadFile('253_mkimage_mult_no_content.dts')
self.assertIn('Could not complete processing of contents',
@@ -6055,6 +6164,7 @@
def testMkimageFilename(self):
"""Test using mkimage to build a binary with a filename"""
+ self._SetupSplElf()
retcode = self._DoTestFile('254_mkimage_filename.dts')
self.assertEqual(0, retcode)
fname = tools.get_output_filename('mkimage-test.bin')
@@ -6107,7 +6217,7 @@
str(e.exception))
def testSymlink(self):
- """Test that image files can be named"""
+ """Test that image files can be symlinked"""
retcode = self._DoTestFile('259_symlink.dts', debug=True, map=True)
self.assertEqual(0, retcode)
image = control.images['test_image']
@@ -6116,6 +6226,17 @@
self.assertTrue(os.path.islink(sname))
self.assertEqual(os.readlink(sname), fname)
+ def testSymlinkOverwrite(self):
+ """Test that symlinked images can be overwritten"""
+ testdir = TestFunctional._MakeInputDir('symlinktest')
+ self._DoTestFile('259_symlink.dts', debug=True, map=True, output_dir=testdir)
+ # build the same image again in the same directory so that existing symlink is present
+ self._DoTestFile('259_symlink.dts', debug=True, map=True, output_dir=testdir)
+ fname = tools.get_output_filename('test_image.bin')
+ sname = tools.get_output_filename('symlink_to_test.bin')
+ self.assertTrue(os.path.islink(sname))
+ self.assertEqual(os.readlink(sname), fname)
+
def testSymbolsElf(self):
"""Test binman can assign symbols embedded in an ELF file"""
if not elf.ELF_TOOLS:
@@ -6529,6 +6650,7 @@
def testReplaceFitSibling(self):
"""Test an image with a FIT inside where we replace its sibling"""
+ self._SetupSplElf()
fname = TestFunctional._MakeInputFile('once', b'available once')
self._DoReadFileRealDtb('277_replace_fit_sibling.dts')
os.remove(fname)
@@ -6577,18 +6699,18 @@
def testPackRockchipTpl(self):
"""Test that an image with a Rockchip TPL binary can be created"""
- data = self._DoReadFile('277_rockchip_tpl.dts')
+ data = self._DoReadFile('291_rockchip_tpl.dts')
self.assertEqual(ROCKCHIP_TPL_DATA, data[:len(ROCKCHIP_TPL_DATA)])
def testMkimageMissingBlobMultiple(self):
"""Test missing blob with mkimage entry and multiple-data-files"""
with test_util.capture_sys_output() as (stdout, stderr):
- self._DoTestFile('278_mkimage_missing_multiple.dts', allow_missing=True)
+ self._DoTestFile('292_mkimage_missing_multiple.dts', allow_missing=True)
err = stderr.getvalue()
self.assertIn("is missing external blobs and is non-functional", err)
with self.assertRaises(ValueError) as e:
- self._DoTestFile('278_mkimage_missing_multiple.dts', allow_missing=False)
+ self._DoTestFile('292_mkimage_missing_multiple.dts', allow_missing=False)
self.assertIn("not found in input path", str(e.exception))
def _PrepareSignEnv(self, dts='280_fit_sign.dts'):
@@ -6603,7 +6725,7 @@
Private key
DTB
"""
-
+ self._SetupSplElf()
data = self._DoReadFileRealDtb(dts)
updated_fname = tools.get_output_filename('image-updated.bin')
tools.write_file(updated_fname, data)
@@ -6676,6 +6798,294 @@
['fit'])
self.assertIn("Node '/fit': Missing tool: 'mkimage'", str(e.exception))
+ def testSymbolNoWrite(self):
+ """Test disabling of symbol writing"""
+ self._SetupSplElf()
+ self.checkSymbols('282_symbols_disable.dts', U_BOOT_SPL_DATA, 0x1c,
+ no_write_symbols=True)
+
+ def testSymbolNoWriteExpanded(self):
+ """Test disabling of symbol writing in expanded entries"""
+ entry_args = {
+ 'spl-dtb': '1',
+ }
+ self.checkSymbols('282_symbols_disable.dts', U_BOOT_SPL_NODTB_DATA +
+ U_BOOT_SPL_DTB_DATA, 0x38,
+ entry_args=entry_args, use_expanded=True,
+ no_write_symbols=True)
+
+ def testMkimageSpecial(self):
+ """Test mkimage ignores special hash-1 node"""
+ data = self._DoReadFile('283_mkimage_special.dts')
+
+ # Just check that the data appears in the file somewhere
+ self.assertIn(U_BOOT_DATA, data)
+
+ def testFitFdtList(self):
+ """Test an image with an FIT with the fit,fdt-list-val option"""
+ entry_args = {
+ 'default-dt': 'test-fdt2',
+ }
+ data = self._DoReadFileDtb(
+ '284_fit_fdt_list.dts',
+ entry_args=entry_args,
+ extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0]
+ self.assertEqual(U_BOOT_NODTB_DATA, data[-len(U_BOOT_NODTB_DATA):])
+ fit_data = data[len(U_BOOT_DATA):-len(U_BOOT_NODTB_DATA)]
+
+ def testSplEmptyBss(self):
+ """Test an expanded SPL with a zero-size BSS"""
+ # ELF file with a '__bss_size' symbol
+ self._SetupSplElf(src_fname='bss_data_zero')
+
+ entry_args = {
+ 'spl-bss-pad': 'y',
+ 'spl-dtb': 'y',
+ }
+ data = self._DoReadFileDtb('285_spl_expand.dts',
+ use_expanded=True, entry_args=entry_args)[0]
+
+ def testTemplate(self):
+ """Test using a template"""
+ TestFunctional._MakeInputFile('vga2.bin', b'#' + VGA_DATA)
+ data = self._DoReadFile('286_template.dts')
+ first = U_BOOT_DATA + VGA_DATA + U_BOOT_DTB_DATA
+ second = U_BOOT_DATA + b'#' + VGA_DATA + U_BOOT_DTB_DATA
+ self.assertEqual(U_BOOT_IMG_DATA + first + second, data)
+
+ def testTemplateBlobMulti(self):
+ """Test using a template with 'multiple-images' enabled"""
+ TestFunctional._MakeInputFile('my-blob.bin', b'blob')
+ TestFunctional._MakeInputFile('my-blob2.bin', b'other')
+ retcode = self._DoTestFile('287_template_multi.dts')
+
+ self.assertEqual(0, retcode)
+ image = control.images['image']
+ image_fname = tools.get_output_filename('my-image.bin')
+ data = tools.read_file(image_fname)
+ self.assertEqual(b'blob@@@@other', data)
+
+ def testTemplateFit(self):
+ """Test using a template in a FIT"""
+ fit_data = self._DoReadFile('288_template_fit.dts')
+ fname = os.path.join(self._indir, 'fit_data.fit')
+ tools.write_file(fname, fit_data)
+ out = tools.run('dumpimage', '-l', fname)
+
+ def testTemplateSection(self):
+ """Test using a template in a section (not at top level)"""
+ TestFunctional._MakeInputFile('vga2.bin', b'#' + VGA_DATA)
+ data = self._DoReadFile('289_template_section.dts')
+ first = U_BOOT_DATA + VGA_DATA + U_BOOT_DTB_DATA
+ second = U_BOOT_DATA + b'#' + VGA_DATA + U_BOOT_DTB_DATA
+ self.assertEqual(U_BOOT_IMG_DATA + first + second + first, data)
+
+ def testMkimageSymbols(self):
+ """Test using mkimage to build an image with symbols in it"""
+ self._SetupSplElf('u_boot_binman_syms')
+ data = self._DoReadFile('290_mkimage_sym.dts')
+
+ image = control.images['image']
+ entries = image.GetEntries()
+ self.assertIn('u-boot', entries)
+ u_boot = entries['u-boot']
+
+ mkim = entries['mkimage']
+ mkim_entries = mkim.GetEntries()
+ self.assertIn('u-boot-spl', mkim_entries)
+ spl = mkim_entries['u-boot-spl']
+ self.assertIn('u-boot-spl2', mkim_entries)
+ spl2 = mkim_entries['u-boot-spl2']
+
+ # skip the mkimage header and the area sizes
+ mk_data = data[mkim.offset + 0x40:]
+ size, term = struct.unpack('>LL', mk_data[:8])
+
+ # There should be only one image, so check that the zero terminator is
+ # present
+ self.assertEqual(0, term)
+
+ content = mk_data[8:8 + size]
+
+ # The image should contain the symbols from u_boot_binman_syms.c
+ # Note that image_pos is adjusted by the base address of the image,
+ # which is 0x10 in our test image
+ spl_data = content[:0x18]
+ content = content[0x1b:]
+
+ # After the header is a table of offsets for each image. There should
+ # only be one image, then a 0 terminator, so figure out the real start
+ # of the image data
+ base = 0x40 + 8
+
+ # Check symbols in both u-boot-spl and u-boot-spl2
+ for i in range(2):
+ vals = struct.unpack('<LLQLL', spl_data)
+
+ # The image should contain the symbols from u_boot_binman_syms.c
+ # Note that image_pos is adjusted by the base address of the image,
+ # which is 0x10 in our 'u_boot_binman_syms' test image
+ self.assertEqual(elf.BINMAN_SYM_MAGIC_VALUE, vals[0])
+ self.assertEqual(base, vals[1])
+ self.assertEqual(spl2.offset, vals[2])
+ # figure out the internal positions of its components
+ self.assertEqual(0x10 + u_boot.image_pos, vals[3])
+
+ # Check that spl and spl2 are actually at the indicated positions
+ self.assertEqual(
+ elf.BINMAN_SYM_MAGIC_VALUE,
+ struct.unpack('<I', data[spl.image_pos:spl.image_pos + 4])[0])
+ self.assertEqual(
+ elf.BINMAN_SYM_MAGIC_VALUE,
+ struct.unpack('<I', data[spl2.image_pos:spl2.image_pos + 4])[0])
+
+ self.assertEqual(len(U_BOOT_DATA), vals[4])
+
+ # Move to next
+ spl_data = content[:0x18]
+
+ def testTIBoardConfig(self):
+ """Test that a schema validated board config file can be generated"""
+ data = self._DoReadFile('293_ti_board_cfg.dts')
+ self.assertEqual(TI_BOARD_CONFIG_DATA, data)
+
+ def testTIBoardConfigCombined(self):
+ """Test that a schema validated combined board config file can be generated"""
+ data = self._DoReadFile('294_ti_board_cfg_combined.dts')
+ configlen_noheader = TI_BOARD_CONFIG_DATA * 4
+ self.assertGreater(data, configlen_noheader)
+
+ def testTIBoardConfigNoDataType(self):
+ """Test that error is thrown when data type is not supported"""
+ with self.assertRaises(ValueError) as e:
+ data = self._DoReadFile('295_ti_board_cfg_no_type.dts')
+ self.assertIn("Schema validation error", str(e.exception))
+
+ def testPackTiSecure(self):
+ """Test that an image with a TI secured binary can be created"""
+ keyfile = self.TestFile('key.key')
+ entry_args = {
+ 'keyfile': keyfile,
+ }
+ data = self._DoReadFileDtb('296_ti_secure.dts',
+ entry_args=entry_args)[0]
+ self.assertGreater(len(data), len(TI_UNSECURE_DATA))
+
+ def testPackTiSecureMissingTool(self):
+ """Test that an image with a TI secured binary (non-functional) can be created
+ when openssl is missing"""
+ keyfile = self.TestFile('key.key')
+ entry_args = {
+ 'keyfile': keyfile,
+ }
+ with test_util.capture_sys_output() as (_, stderr):
+ self._DoTestFile('296_ti_secure.dts',
+ force_missing_bintools='openssl',
+ entry_args=entry_args)
+ err = stderr.getvalue()
+ self.assertRegex(err, "Image 'image'.*missing bintools.*: openssl")
+
+ def testPackTiSecureROM(self):
+ """Test that a ROM image with a TI secured binary can be created"""
+ keyfile = self.TestFile('key.key')
+ entry_args = {
+ 'keyfile': keyfile,
+ }
+ data = self._DoReadFileDtb('297_ti_secure_rom.dts',
+ entry_args=entry_args)[0]
+ data_a = self._DoReadFileDtb('299_ti_secure_rom_a.dts',
+ entry_args=entry_args)[0]
+ data_b = self._DoReadFileDtb('300_ti_secure_rom_b.dts',
+ entry_args=entry_args)[0]
+ self.assertGreater(len(data), len(TI_UNSECURE_DATA))
+ self.assertGreater(len(data_a), len(TI_UNSECURE_DATA))
+ self.assertGreater(len(data_b), len(TI_UNSECURE_DATA))
+
+ def testPackTiSecureROMCombined(self):
+ """Test that a ROM image with a TI secured binary can be created"""
+ keyfile = self.TestFile('key.key')
+ entry_args = {
+ 'keyfile': keyfile,
+ }
+ data = self._DoReadFileDtb('298_ti_secure_rom_combined.dts',
+ entry_args=entry_args)[0]
+ self.assertGreater(len(data), len(TI_UNSECURE_DATA))
+
+ def testEncryptedNoAlgo(self):
+ """Test encrypted node with missing required properties"""
+ with self.assertRaises(ValueError) as e:
+ self._DoReadFileDtb('301_encrypted_no_algo.dts')
+ self.assertIn(
+ "Node '/binman/fit/images/u-boot/encrypted': 'encrypted' entry is missing properties: algo iv-filename",
+ str(e.exception))
+
+ def testEncryptedInvalidIvfile(self):
+ """Test encrypted node with invalid iv file"""
+ with self.assertRaises(ValueError) as e:
+ self._DoReadFileDtb('302_encrypted_invalid_iv_file.dts')
+ self.assertIn("Filename 'invalid-iv-file' not found in input path",
+ str(e.exception))
+
+ def testEncryptedMissingKey(self):
+ """Test encrypted node with missing key properties"""
+ with self.assertRaises(ValueError) as e:
+ self._DoReadFileDtb('303_encrypted_missing_key.dts')
+ self.assertIn(
+ "Node '/binman/fit/images/u-boot/encrypted': Provide either 'key-filename' or 'key-source'",
+ str(e.exception))
+
+ def testEncryptedKeySource(self):
+ """Test encrypted node with key-source property"""
+ data = self._DoReadFileDtb('304_encrypted_key_source.dts')[0]
+
+ dtb = fdt.Fdt.FromData(data)
+ dtb.Scan()
+
+ node = dtb.GetNode('/images/u-boot/cipher')
+ self.assertEqual('algo-name', node.props['algo'].value)
+ self.assertEqual('key-source-value', node.props['key-source'].value)
+ self.assertEqual(ENCRYPTED_IV_DATA,
+ tools.to_bytes(''.join(node.props['iv'].value)))
+ self.assertNotIn('key', node.props)
+
+ def testEncryptedKeyFile(self):
+ """Test encrypted node with key-filename property"""
+ data = self._DoReadFileDtb('305_encrypted_key_file.dts')[0]
+
+ dtb = fdt.Fdt.FromData(data)
+ dtb.Scan()
+
+ node = dtb.GetNode('/images/u-boot/cipher')
+ self.assertEqual('algo-name', node.props['algo'].value)
+ self.assertEqual(ENCRYPTED_IV_DATA,
+ tools.to_bytes(''.join(node.props['iv'].value)))
+ self.assertEqual(ENCRYPTED_KEY_DATA,
+ tools.to_bytes(''.join(node.props['key'].value)))
+ self.assertNotIn('key-source', node.props)
+
+
+ def testSplPubkeyDtb(self):
+ """Test u_boot_spl_pubkey_dtb etype"""
+ data = tools.read_file(self.TestFile("key.pem"))
+ self._MakeInputFile("key.crt", data)
+ self._DoReadFileRealDtb('306_spl_pubkey_dtb.dts')
+ image = control.images['image']
+ entries = image.GetEntries()
+ dtb_entry = entries['u-boot-spl-pubkey-dtb']
+ dtb_data = dtb_entry.GetData()
+ dtb = fdt.Fdt.FromData(dtb_data)
+ dtb.Scan()
+
+ signature_node = dtb.GetNode('/signature')
+ self.assertIsNotNone(signature_node)
+ key_node = signature_node.FindNode("key-key")
+ self.assertIsNotNone(key_node)
+ self.assertEqual(fdt_util.GetString(key_node, "required"),
+ "conf")
+ self.assertEqual(fdt_util.GetString(key_node, "algo"),
+ "sha384,rsa4096")
+ self.assertEqual(fdt_util.GetString(key_node, "key-name-hint"),
+ "key")
if __name__ == "__main__":
unittest.main()
diff --git a/tools/binman/image.py b/tools/binman/image.py
index 8ebf71d..e77b5d0 100644
--- a/tools/binman/image.py
+++ b/tools/binman/image.py
@@ -182,6 +182,8 @@
# Create symlink to file if symlink given
if self._symlink is not None:
sname = tools.get_output_filename(self._symlink)
+ if os.path.islink(sname):
+ os.remove(sname)
os.symlink(fname, sname)
def WriteMap(self):
diff --git a/tools/binman/state.py b/tools/binman/state.py
index 3e78cf3..45bae40 100644
--- a/tools/binman/state.py
+++ b/tools/binman/state.py
@@ -385,8 +385,8 @@
for_repack: True is this property is only needed for repacking
"""
for n in GetUpdateNodes(node, for_repack):
- tout.detail("File %s: Update node '%s' prop '%s' to %#x" %
- (n.GetFdt().name, n.path, prop, value))
+ tout.debug("File %s: Update node '%s' prop '%s' to %#x" %
+ (n.GetFdt().name, n.path, prop, value))
n.SetInt(prop, value)
def CheckAddHashProp(node):
diff --git a/tools/binman/test/230_pre_load.dts b/tools/binman/test/230_pre_load.dts
index c0c2472..e6d9ef4 100644
--- a/tools/binman/test/230_pre_load.dts
+++ b/tools/binman/test/230_pre_load.dts
@@ -10,7 +10,7 @@
pre-load {
content = <&image>;
algo-name = "sha256,rsa2048";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/231_pre_load_pkcs.dts b/tools/binman/test/231_pre_load_pkcs.dts
index 530638c..66268cd 100644
--- a/tools/binman/test/231_pre_load_pkcs.dts
+++ b/tools/binman/test/231_pre_load_pkcs.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/232_pre_load_pss.dts b/tools/binman/test/232_pre_load_pss.dts
index 371e0fd..3008d3f 100644
--- a/tools/binman/test/232_pre_load_pss.dts
+++ b/tools/binman/test/232_pre_load_pss.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "pss";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <0x11223344>;
};
diff --git a/tools/binman/test/233_pre_load_invalid_padding.dts b/tools/binman/test/233_pre_load_invalid_padding.dts
index 9cb4cb5..bbe2d1b 100644
--- a/tools/binman/test/233_pre_load_invalid_padding.dts
+++ b/tools/binman/test/233_pre_load_invalid_padding.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa2048";
padding-name = "padding";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/234_pre_load_invalid_sha.dts b/tools/binman/test/234_pre_load_invalid_sha.dts
index 8ded98d..29afd2e 100644
--- a/tools/binman/test/234_pre_load_invalid_sha.dts
+++ b/tools/binman/test/234_pre_load_invalid_sha.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha2560,rsa2048";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/235_pre_load_invalid_algo.dts b/tools/binman/test/235_pre_load_invalid_algo.dts
index 145286c..d6f6dd2 100644
--- a/tools/binman/test/235_pre_load_invalid_algo.dts
+++ b/tools/binman/test/235_pre_load_invalid_algo.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa20480";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/236_pre_load_invalid_key.dts b/tools/binman/test/236_pre_load_invalid_key.dts
index df858c3..f93bc97 100644
--- a/tools/binman/test/236_pre_load_invalid_key.dts
+++ b/tools/binman/test/236_pre_load_invalid_key.dts
@@ -11,7 +11,7 @@
content = <&image>;
algo-name = "sha256,rsa4096";
padding-name = "pkcs-1.5";
- key-name = "tools/binman/test/230_dev.key";
+ key-name = "dev.key";
header-size = <4096>;
version = <1>;
};
diff --git a/tools/binman/test/282_symbols_disable.dts b/tools/binman/test/282_symbols_disable.dts
new file mode 100644
index 0000000..6efa933
--- /dev/null
+++ b/tools/binman/test/282_symbols_disable.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ pad-byte = <0xff>;
+ u-boot-spl {
+ no-write-symbols;
+ };
+
+ u-boot {
+ offset = <0x38>;
+ no-expanded;
+ };
+
+ u-boot-spl2 {
+ type = "u-boot-spl";
+ no-write-symbols;
+ };
+ };
+};
diff --git a/tools/binman/test/283_mkimage_special.dts b/tools/binman/test/283_mkimage_special.dts
new file mode 100644
index 0000000..c234093
--- /dev/null
+++ b/tools/binman/test/283_mkimage_special.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ mkimage {
+ args = "-T script";
+
+ u-boot {
+ };
+
+ hash {
+ };
+
+ imagename {
+ type = "u-boot";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/284_fit_fdt_list.dts b/tools/binman/test/284_fit_fdt_list.dts
new file mode 100644
index 0000000..8885313
--- /dev/null
+++ b/tools/binman/test/284_fit_fdt_list.dts
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot {
+ };
+ fit {
+ description = "test-desc";
+ #address-cells = <1>;
+ fit,fdt-list-val = "test-fdt1", "test-fdt2";
+
+ images {
+ kernel {
+ description = "Vanilla Linux kernel";
+ type = "kernel";
+ arch = "ppc";
+ os = "linux";
+ compression = "gzip";
+ load = <00000000>;
+ entry = <00000000>;
+ hash-1 {
+ algo = "crc32";
+ };
+ hash-2 {
+ algo = "sha1";
+ };
+ u-boot {
+ };
+ };
+ @fdt-SEQ {
+ description = "fdt-NAME.dtb";
+ type = "flat_dt";
+ compression = "none";
+ hash {
+ algo = "sha256";
+ };
+ };
+ };
+
+ configurations {
+ default = "@config-DEFAULT-SEQ";
+ @config-SEQ {
+ description = "conf-NAME.dtb";
+ firmware = "uboot";
+ loadables = "atf";
+ fdt = "fdt-SEQ";
+ };
+ };
+ };
+ u-boot-nodtb {
+ };
+ };
+};
diff --git a/tools/binman/test/285_spl_expand.dts b/tools/binman/test/285_spl_expand.dts
new file mode 100644
index 0000000..9c88ccb
--- /dev/null
+++ b/tools/binman/test/285_spl_expand.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-spl {
+ };
+ };
+};
diff --git a/tools/binman/test/286_template.dts b/tools/binman/test/286_template.dts
new file mode 100644
index 0000000..6980dbf
--- /dev/null
+++ b/tools/binman/test/286_template.dts
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-img {
+ };
+
+ common_part: template {
+ u-boot {
+ };
+
+ intel-vga {
+ filename = "vga.bin";
+ };
+ };
+
+ first {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+ };
+
+ second {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+
+ intel-vga {
+ filename = "vga2.bin";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/287_template_multi.dts b/tools/binman/test/287_template_multi.dts
new file mode 100644
index 0000000..122bfcc
--- /dev/null
+++ b/tools/binman/test/287_template_multi.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+/ {
+ binman: binman {
+ multiple-images;
+
+ my_template: template {
+ blob-ext@0 {
+ filename = "my-blob.bin";
+ offset = <0>;
+ };
+ blob-ext@8 {
+ offset = <8>;
+ };
+ };
+
+ image {
+ pad-byte = <0x40>;
+ filename = "my-image.bin";
+ insert-template = <&my_template>;
+ blob-ext@8 {
+ filename = "my-blob2.bin";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/288_template_fit.dts b/tools/binman/test/288_template_fit.dts
new file mode 100644
index 0000000..d84dca4
--- /dev/null
+++ b/tools/binman/test/288_template_fit.dts
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ binman: binman {
+ multiple-images;
+
+ my_template: template {
+ fit@0 {
+ images {
+ kernel-1 {
+ };
+ kernel-2 {
+ };
+ };
+ };
+ };
+
+ image {
+ filename = "image.bin";
+ insert-template = <&my_template>;
+
+ fit@0 {
+ description = "desc";
+ configurations {
+ };
+ images {
+ kernel-3 {
+ };
+ kernel-4 {
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/289_template_section.dts b/tools/binman/test/289_template_section.dts
new file mode 100644
index 0000000..8a744a0
--- /dev/null
+++ b/tools/binman/test/289_template_section.dts
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-img {
+ };
+
+ common_part: template {
+ u-boot {
+ };
+
+ intel-vga {
+ filename = "vga.bin";
+ };
+ };
+
+ first {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+ };
+
+ section {
+ second {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+
+ intel-vga {
+ filename = "vga2.bin";
+ };
+ };
+ };
+
+ second {
+ type = "section";
+ insert-template = <&common_part>;
+
+ u-boot-dtb {
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/290_mkimage_sym.dts b/tools/binman/test/290_mkimage_sym.dts
new file mode 100644
index 0000000..2dfd286
--- /dev/null
+++ b/tools/binman/test/290_mkimage_sym.dts
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-dtb {
+ };
+
+ mkimage {
+ args = "-n test -T script";
+
+ u-boot-spl {
+ };
+
+ u-boot-spl2 {
+ type = "u-boot-spl";
+ };
+ };
+
+ u-boot {
+ };
+ };
+};
diff --git a/tools/binman/test/277_rockchip_tpl.dts b/tools/binman/test/291_rockchip_tpl.dts
similarity index 100%
rename from tools/binman/test/277_rockchip_tpl.dts
rename to tools/binman/test/291_rockchip_tpl.dts
diff --git a/tools/binman/test/278_mkimage_missing_multiple.dts b/tools/binman/test/292_mkimage_missing_multiple.dts
similarity index 100%
rename from tools/binman/test/278_mkimage_missing_multiple.dts
rename to tools/binman/test/292_mkimage_missing_multiple.dts
diff --git a/tools/binman/test/293_ti_board_cfg.dts b/tools/binman/test/293_ti_board_cfg.dts
new file mode 100644
index 0000000..cda024c
--- /dev/null
+++ b/tools/binman/test/293_ti_board_cfg.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-board-config {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ };
+};
diff --git a/tools/binman/test/294_ti_board_cfg_combined.dts b/tools/binman/test/294_ti_board_cfg_combined.dts
new file mode 100644
index 0000000..95ef449
--- /dev/null
+++ b/tools/binman/test/294_ti_board_cfg_combined.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ ti-board-config {
+ board-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ sec-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ rm-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ pm-cfg {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema.yaml";
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/295_ti_board_cfg_no_type.dts b/tools/binman/test/295_ti_board_cfg_no_type.dts
new file mode 100644
index 0000000..584b7ac
--- /dev/null
+++ b/tools/binman/test/295_ti_board_cfg_no_type.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ ti-board-config {
+ config = "yaml/config.yaml";
+ schema = "yaml/schema_notype.yaml";
+ };
+ };
+};
diff --git a/tools/binman/test/296_ti_secure.dts b/tools/binman/test/296_ti_secure.dts
new file mode 100644
index 0000000..941d0ab
--- /dev/null
+++ b/tools/binman/test/296_ti_secure.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure {
+ content = <&unsecure_binary>;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/297_ti_secure_rom.dts b/tools/binman/test/297_ti_secure_rom.dts
new file mode 100644
index 0000000..d131376
--- /dev/null
+++ b/tools/binman/test/297_ti_secure_rom.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/298_ti_secure_rom_combined.dts b/tools/binman/test/298_ti_secure_rom_combined.dts
new file mode 100644
index 0000000..bf87273
--- /dev/null
+++ b/tools/binman/test/298_ti_secure_rom_combined.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ content-sbl = <&unsecure_binary>;
+ content-sysfw = <&unsecure_binary>;
+ content-sysfw-data = <&unsecure_binary>;
+ content-sysfw-inner-cert = <&unsecure_binary>;
+ content-dm-data = <&unsecure_binary>;
+ combined;
+ sysfw-inner-cert;
+ dm-data;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/299_ti_secure_rom_a.dts b/tools/binman/test/299_ti_secure_rom_a.dts
new file mode 100644
index 0000000..887138f
--- /dev/null
+++ b/tools/binman/test/299_ti_secure_rom_a.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ core = "secure";
+ countersign;
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/300_ti_secure_rom_b.dts b/tools/binman/test/300_ti_secure_rom_b.dts
new file mode 100644
index 0000000..c6d6182
--- /dev/null
+++ b/tools/binman/test/300_ti_secure_rom_b.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ ti-secure-rom {
+ content = <&unsecure_binary>;
+ core = "public";
+ };
+ unsecure_binary: blob-ext {
+ filename = "ti_unsecure.bin";
+ };
+ };
+};
diff --git a/tools/binman/test/301_encrypted_no_algo.dts b/tools/binman/test/301_encrypted_no_algo.dts
new file mode 100644
index 0000000..03f7ffe
--- /dev/null
+++ b/tools/binman/test/301_encrypted_no_algo.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ fit {
+ images {
+ u-boot {
+ encrypted {
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/302_encrypted_invalid_iv_file.dts b/tools/binman/test/302_encrypted_invalid_iv_file.dts
new file mode 100644
index 0000000..388a0a6
--- /dev/null
+++ b/tools/binman/test/302_encrypted_invalid_iv_file.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+/ {
+ binman {
+ fit {
+ images {
+ u-boot {
+ encrypted {
+ algo = "some-algo";
+ key-source = "key";
+ iv-filename = "invalid-iv-file";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/303_encrypted_missing_key.dts b/tools/binman/test/303_encrypted_missing_key.dts
new file mode 100644
index 0000000..d1daaa0
--- /dev/null
+++ b/tools/binman/test/303_encrypted_missing_key.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test desc";
+
+ images {
+ u-boot {
+ encrypted {
+ algo = "algo-name";
+ iv-filename = "encrypted-file.iv";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/304_encrypted_key_source.dts b/tools/binman/test/304_encrypted_key_source.dts
new file mode 100644
index 0000000..884ec50
--- /dev/null
+++ b/tools/binman/test/304_encrypted_key_source.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test desc";
+
+ images {
+ u-boot {
+ encrypted {
+ algo = "algo-name";
+ key-source = "key-source-value";
+ iv-filename = "encrypted-file.iv";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/305_encrypted_key_file.dts b/tools/binman/test/305_encrypted_key_file.dts
new file mode 100644
index 0000000..efd7ee5
--- /dev/null
+++ b/tools/binman/test/305_encrypted_key_file.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ fit {
+ description = "test desc";
+
+ images {
+ u-boot {
+ encrypted {
+ algo = "algo-name";
+ iv-filename = "encrypted-file.iv";
+ key-filename = "encrypted-file.key";
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/tools/binman/test/306_spl_pubkey_dtb.dts b/tools/binman/test/306_spl_pubkey_dtb.dts
new file mode 100644
index 0000000..3256ff9
--- /dev/null
+++ b/tools/binman/test/306_spl_pubkey_dtb.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ u-boot-spl-pubkey-dtb {
+ algo = "sha384,rsa4096";
+ required = "conf";
+ key-name-hint = "key";
+ };
+ };
+};
diff --git a/tools/binman/test/Makefile b/tools/binman/test/Makefile
index cd66a30..4d152ee 100644
--- a/tools/binman/test/Makefile
+++ b/tools/binman/test/Makefile
@@ -32,7 +32,7 @@
LDS_EFL_SECTIONS := -T $(SRC)elf_sections.lds
LDS_BLOB := -T $(SRC)blob_syms.lds
-TARGETS = u_boot_ucode_ptr u_boot_no_ucode_ptr bss_data \
+TARGETS = u_boot_ucode_ptr u_boot_no_ucode_ptr bss_data bss_data_zero \
u_boot_binman_syms u_boot_binman_syms.bin u_boot_binman_syms_bad \
u_boot_binman_syms_size u_boot_binman_syms_x86 embed_data \
u_boot_binman_embed u_boot_binman_embed_sm elf_sections blob_syms.bin
@@ -48,6 +48,9 @@
bss_data: CFLAGS += $(SRC)bss_data.lds
bss_data: bss_data.c
+bss_data_zero: CFLAGS += $(SRC)bss_data_zero.lds
+bss_data_zero: bss_data_zero.c
+
embed_data: CFLAGS += $(SRC)embed_data.lds
embed_data: embed_data.c
diff --git a/tools/binman/test/bss_data.c b/tools/binman/test/bss_data.c
index 4f9b64c..7047a3b 100644
--- a/tools/binman/test/bss_data.c
+++ b/tools/binman/test/bss_data.c
@@ -7,9 +7,8 @@
*/
int bss_data[10];
-int __bss_size = sizeof(bss_data);
-int main()
+int main(void)
{
bss_data[2] = 2;
diff --git a/tools/binman/test/bss_data_zero.c b/tools/binman/test/bss_data_zero.c
new file mode 100644
index 0000000..7047a3b
--- /dev/null
+++ b/tools/binman/test/bss_data_zero.c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2016 Google, Inc
+ *
+ * Simple program to create a bss_data region so the symbol can be read
+ * by binutils. This is used by binman tests.
+ */
+
+int bss_data[10];
+
+int main(void)
+{
+ bss_data[2] = 2;
+
+ return 0;
+}
diff --git a/tools/binman/test/bss_data_zero.lds b/tools/binman/test/bss_data_zero.lds
new file mode 100644
index 0000000..8fa0210
--- /dev/null
+++ b/tools/binman/test/bss_data_zero.lds
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2016 Google, Inc
+ */
+
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+ENTRY(_start)
+
+SECTIONS
+{
+ . = 0xfffffdf0;
+ _start = .;
+ __bss_size = 0;
+}
diff --git a/tools/binman/test/230_dev.key b/tools/binman/test/dev.key
similarity index 100%
rename from tools/binman/test/230_dev.key
rename to tools/binman/test/dev.key
diff --git a/tools/binman/test/embed_data.lds b/tools/binman/test/embed_data.lds
index 908bf66..d416cb2 100644
--- a/tools/binman/test/embed_data.lds
+++ b/tools/binman/test/embed_data.lds
@@ -17,6 +17,7 @@
embed_start = .;
*(.embed*)
embed_end = .;
+ region_size = 0;
. = ALIGN(32);
*(.data*)
}
diff --git a/tools/binman/test/yaml/config.yaml b/tools/binman/test/yaml/config.yaml
new file mode 100644
index 0000000..5f799a6
--- /dev/null
+++ b/tools/binman/test/yaml/config.yaml
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Test config
+#
+---
+
+main-branch:
+ obj:
+ a: 0x0
+ b: 0
+ arr: [0, 0, 0, 0]
+ another-arr:
+ - #1
+ c: 0
+ d: 0
+ - #2
+ c: 0
+ d: 0
diff --git a/tools/binman/test/yaml/schema.yaml b/tools/binman/test/yaml/schema.yaml
new file mode 100644
index 0000000..8aa03f3
--- /dev/null
+++ b/tools/binman/test/yaml/schema.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Test schema
+#
+---
+
+definitions:
+ u8:
+ type: integer
+ minimum: 0
+ maximum: 0xff
+ u16:
+ type: integer
+ minimum: 0
+ maximum: 0xffff
+ u32:
+ type: integer
+ minimum: 0
+ maximum: 0xffffffff
+
+type: object
+properties:
+ main-branch:
+ type: object
+ properties:
+ obj:
+ type: object
+ properties:
+ a:
+ $ref: "#/definitions/u32"
+ b:
+ $ref: "#/definitions/u16"
+ arr:
+ type: array
+ minItems: 4
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"
+ another-arr:
+ type: array
+ minItems: 2
+ maxItems: 2
+ items:
+ type: object
+ properties:
+ c:
+ $ref: "#/definitions/u8"
+ d:
+ $ref: "#/definitions/u8"
diff --git a/tools/binman/test/yaml/schema_notype.yaml b/tools/binman/test/yaml/schema_notype.yaml
new file mode 100644
index 0000000..6b4d98f
--- /dev/null
+++ b/tools/binman/test/yaml/schema_notype.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Test schema
+#
+---
+
+definitions:
+ u8:
+ type: integer
+ minimum: 0
+ maximum: 0xff
+ u16:
+ type: integer
+ minimum: 0
+ maximum: 0xffff
+ u32:
+ type: integer
+ minimum: 0
+ maximum: 0xffffffff
+
+type: object
+properties:
+ main-branch:
+ type: object
+ properties:
+ obj:
+ type: object
+ properties:
+ a:
+ $ref: "#/definitions/u4"
+ b:
+ $ref: "#/definitions/u16"
+ arr:
+ type: array
+ minItems: 4
+ maxItems: 4
+ items:
+ $ref: "#/definitions/u8"
diff --git a/tools/buildman/board.py b/tools/buildman/board.py
index 8ef905b..248d8bf 100644
--- a/tools/buildman/board.py
+++ b/tools/buildman/board.py
@@ -17,14 +17,14 @@
vendor: Name of vendor (e.g. armltd)
board_name: Name of board (e.g. integrator)
target: Target name (use make <target>_defconfig to configure)
- cfg_name: Config name
+ cfg_name: Config-file name (in includes/configs/)
"""
self.target = target
self.arch = arch
self.cpu = cpu
- self.board_name = board_name
- self.vendor = vendor
self.soc = soc
+ self.vendor = vendor
+ self.board_name = board_name
self.cfg_name = cfg_name
self.props = [self.target, self.arch, self.cpu, self.board_name,
self.vendor, self.soc, self.cfg_name]
diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py
index 0bb0723..83adbf1 100644
--- a/tools/buildman/boards.py
+++ b/tools/buildman/boards.py
@@ -50,7 +50,7 @@
raise
-def output_is_new(output):
+def output_is_new(output, config_dir, srcdir):
"""Check if the output file is up to date.
Looks at defconfig and Kconfig files to make sure none is newer than the
@@ -59,6 +59,8 @@
Args:
output (str): Filename to check
+ config_dir (str): Directory containing defconfig files
+ srcdir (str): Directory containing Kconfig and MAINTAINERS files
Returns:
True if the given output file exists and is newer than any of
@@ -76,7 +78,7 @@
return False
raise
- for (dirpath, _, filenames) in os.walk(CONFIG_DIR):
+ for (dirpath, _, filenames) in os.walk(config_dir):
for filename in fnmatch.filter(filenames, '*_defconfig'):
if fnmatch.fnmatch(filename, '.*'):
continue
@@ -84,7 +86,7 @@
if ctime < os.path.getctime(filepath):
return False
- for (dirpath, _, filenames) in os.walk('.'):
+ for (dirpath, _, filenames) in os.walk(srcdir):
for filename in filenames:
if (fnmatch.fnmatch(filename, '*~') or
not fnmatch.fnmatch(filename, 'Kconfig*') and
@@ -103,7 +105,7 @@
if line[0] == '#' or line == '\n':
continue
defconfig = line.split()[6] + '_defconfig'
- if not os.path.exists(os.path.join(CONFIG_DIR, defconfig)):
+ if not os.path.exists(os.path.join(config_dir, defconfig)):
return False
return True
@@ -191,10 +193,10 @@
# 'target' is added later
}
- def __init__(self):
+ def __init__(self, srctree):
"""Scan all the Kconfig files and create a Kconfig object."""
# Define environment variables referenced from Kconfig
- os.environ['srctree'] = os.getcwd()
+ os.environ['srctree'] = srctree
os.environ['UBOOTVERSION'] = 'dummy'
os.environ['KCONFIG_OBJDIR'] = ''
self._tmpfile = None
@@ -211,40 +213,36 @@
if self._tmpfile:
try_remove(self._tmpfile)
- def scan(self, defconfig):
+ def scan(self, defconfig, warn_targets):
"""Load a defconfig file to obtain board parameters.
Args:
defconfig (str): path to the defconfig file to be processed
+ warn_targets (bool): True to warn about missing or duplicate
+ CONFIG_TARGET options
Returns:
- A dictionary of board parameters. It has a form of:
- {
- 'arch': <arch_name>,
- 'cpu': <cpu_name>,
- 'soc': <soc_name>,
- 'vendor': <vendor_name>,
- 'board': <board_name>,
- 'target': <target_name>,
- 'config': <config_header_name>,
- }
+ tuple: dictionary of board parameters. It has a form of:
+ {
+ 'arch': <arch_name>,
+ 'cpu': <cpu_name>,
+ 'soc': <soc_name>,
+ 'vendor': <vendor_name>,
+ 'board': <board_name>,
+ 'target': <target_name>,
+ 'config': <config_header_name>,
+ }
+ warnings (list of str): list of warnings found
"""
- # strip special prefixes and save it in a temporary file
- outfd, self._tmpfile = tempfile.mkstemp()
- with os.fdopen(outfd, 'w') as outf:
- with open(defconfig, encoding='utf-8') as inf:
- for line in inf:
- colon = line.find(':CONFIG_')
- if colon == -1:
- outf.write(line)
- else:
- outf.write(line[colon + 1:])
+ leaf = os.path.basename(defconfig)
+ expect_target, match, rear = leaf.partition('_defconfig')
+ assert match and not rear, f'{leaf} : invalid defconfig'
- self._conf.load_config(self._tmpfile)
- try_remove(self._tmpfile)
+ self._conf.load_config(defconfig)
self._tmpfile = None
params = {}
+ warnings = []
# Get the value of CONFIG_SYS_ARCH, CONFIG_SYS_CPU, ... etc.
# Set '-' if the value is empty.
@@ -255,9 +253,23 @@
else:
params[key] = '-'
+ # Check there is exactly one TARGET_xxx set
+ if warn_targets:
+ target = None
+ for name, sym in self._conf.syms.items():
+ if name.startswith('TARGET_') and sym.str_value == 'y':
+ tname = name[7:].lower()
+ if target:
+ warnings.append(
+ f'WARNING: {leaf}: Duplicate TARGET_xxx: {target} and {tname}')
+ else:
+ target = tname
+
+ if not target:
+ cfg_name = expect_target.replace('-', '_').upper()
+ warnings.append(f'WARNING: {leaf}: No TARGET_{cfg_name} enabled')
+
- defconfig = os.path.basename(defconfig)
- params['target'], match, rear = defconfig.partition('_defconfig')
- assert match and not rear, f'{defconfig} : invalid defconfig'
+ params['target'] = expect_target
# fix-up for aarch64
if params['arch'] == 'arm' and params['cpu'] == 'armv8':
@@ -274,7 +286,7 @@
else:
params['arch'] = 'riscv64'
- return params
+ return params, warnings
class MaintainersDatabase:
@@ -332,26 +344,55 @@
str: Maintainers of the board. If the board has two or more
maintainers, they are separated with colons.
"""
- if not target in self.database:
- self.warnings.append(f"WARNING: no maintainers for '{target}'")
- return ''
+ entry = self.database.get(target)
+ if entry:
+ status, maint_list = entry
+ if not status.startswith('Orphan'):
+ if len(maint_list) > 1 or (maint_list and maint_list[0] != '-'):
+ return ':'.join(maint_list)
- return ':'.join(self.database[target][1])
+ self.warnings.append(f"WARNING: no maintainers for '{target}'")
+ return ''
- def parse_file(self, fname):
+ def parse_file(self, srcdir, fname):
"""Parse a MAINTAINERS file.
Parse a MAINTAINERS file and accumulate board status and maintainers
information in the self.database dict.
+ defconfig files are used to specify the target, e.g. xxx_defconfig is
+ used for target 'xxx'. If there is no defconfig file mentioned in the
+ MAINTAINERS file F: entries, then this function does nothing.
+
+ The N: name entries can be used to specify a defconfig file using
+ wildcards.
+
Args:
+ srcdir (str): Directory containing source code (Kconfig files)
fname (str): MAINTAINERS file to be parsed
"""
+ def add_targets(linenum):
+ """Add any new targets
+
+ Args:
+ linenum (int): Current line number
+ """
+ added = False
+ if targets:
+ for target in targets:
+ self.database[target] = (status, maintainers)
+ added = True
+ if not added and (status != '-' and maintainers):
+ leaf = fname[len(srcdir) + 1:]
+ if leaf != 'MAINTAINERS':
+ self.warnings.append(
+ f'WARNING: orphaned defconfig in {leaf} ending at line {linenum + 1}')
+
targets = []
maintainers = []
status = '-'
with open(fname, encoding="utf-8") as inf:
- for line in inf:
+ for linenum, line in enumerate(inf):
# Check also commented maintainers
if line[:3] == '#M:':
line = line[1:]
@@ -360,9 +401,12 @@
maintainers.append(rest)
elif tag == 'F:':
# expand wildcard and filter by 'configs/*_defconfig'
- for item in glob.glob(rest):
+ glob_path = os.path.join(srcdir, rest)
+ for item in glob.glob(glob_path):
front, match, rear = item.partition('configs/')
- if not front and match:
+ if front.endswith('/'):
+ front = front[:-1]
+ if front == srcdir and match:
front, match, rear = rear.rpartition('_defconfig')
if match and not rear:
targets.append(front)
@@ -371,23 +415,26 @@
elif tag == 'N:':
# Just scan the configs directory since that's all we care
# about
- for dirpath, _, fnames in os.walk('configs'):
- for fname in fnames:
- path = os.path.join(dirpath, fname)
+ walk_path = os.walk(os.path.join(srcdir, 'configs'))
+ for dirpath, _, fnames in walk_path:
+ for cfg in fnames:
+ path = os.path.join(dirpath, cfg)[len(srcdir) + 1:]
front, match, rear = path.partition('configs/')
- if not front and match:
- front, match, rear = rear.rpartition('_defconfig')
- if match and not rear:
- targets.append(front)
+ if front or not match:
+ continue
+ front, match, rear = rear.rpartition('_defconfig')
+
+ # Use this entry if it matches the defconfig file
+ # without the _defconfig suffix. For example
+ # 'am335x.*' matches am335x_guardian_defconfig
+ if match and not rear and re.search(rest, front):
+ targets.append(front)
elif line == '\n':
- for target in targets:
- self.database[target] = (status, maintainers)
+ add_targets(linenum)
targets = []
maintainers = []
status = '-'
- if targets:
- for target in targets:
- self.database[target] = (status, maintainers)
+ add_targets(linenum)
class Boards:
@@ -622,39 +669,63 @@
return result, warnings
@classmethod
- def scan_defconfigs_for_multiprocess(cls, queue, defconfigs):
+ def scan_defconfigs_for_multiprocess(cls, srcdir, queue, defconfigs,
+ warn_targets):
"""Scan defconfig files and queue their board parameters
This function is intended to be passed to multiprocessing.Process()
constructor.
Args:
+ srcdir (str): Directory containing source code
queue (multiprocessing.Queue): The resulting board parameters are
written into this.
defconfigs (sequence of str): A sequence of defconfig files to be
scanned.
+ warn_targets (bool): True to warn about missing or duplicate
+ CONFIG_TARGET options
"""
- kconf_scanner = KconfigScanner()
+ kconf_scanner = KconfigScanner(srcdir)
for defconfig in defconfigs:
- queue.put(kconf_scanner.scan(defconfig))
+ queue.put(kconf_scanner.scan(defconfig, warn_targets))
@classmethod
- def read_queues(cls, queues, params_list):
- """Read the queues and append the data to the paramers list"""
+ def read_queues(cls, queues, params_list, warnings):
+ """Read the queues and append the data to the paramers list
+
+ Args:
+ queues (list of multiprocessing.Queue): Queues to read
+ params_list (list of dict): List to add params too
+ warnings (set of str): Set to add warnings to
+ """
for que in queues:
while not que.empty():
- params_list.append(que.get())
+ params, warn = que.get()
+ params_list.append(params)
+ warnings.update(warn)
- def scan_defconfigs(self, jobs=1):
+ def scan_defconfigs(self, config_dir, srcdir, jobs=1, warn_targets=False):
"""Collect board parameters for all defconfig files.
This function invokes multiple processes for faster processing.
Args:
+ config_dir (str): Directory containing the defconfig files
+ srcdir (str): Directory containing source code (Kconfig files)
jobs (int): The number of jobs to run simultaneously
+ warn_targets (bool): True to warn about missing or duplicate
+ CONFIG_TARGET options
+
+ Returns:
+ tuple:
+ list of dict: List of board parameters, each a dict:
+ key: 'arch', 'cpu', 'soc', 'vendor', 'board', 'target',
+ 'config'
+ value: string value of the key
+ list of str: List of warnings recorded
"""
all_defconfigs = []
- for (dirpath, _, filenames) in os.walk(CONFIG_DIR):
+ for (dirpath, _, filenames) in os.walk(config_dir):
for filename in fnmatch.filter(filenames, '*_defconfig'):
if fnmatch.fnmatch(filename, '.*'):
continue
@@ -669,18 +740,19 @@
que = multiprocessing.Queue(maxsize=-1)
proc = multiprocessing.Process(
target=self.scan_defconfigs_for_multiprocess,
- args=(que, defconfigs))
+ args=(srcdir, que, defconfigs, warn_targets))
proc.start()
processes.append(proc)
queues.append(que)
- # The resulting data should be accumulated to this list
+ # The resulting data should be accumulated to these lists
params_list = []
+ warnings = set()
# Data in the queues should be retrieved preriodically.
# Otherwise, the queues would become full and subprocesses would get stuck.
while any(p.is_alive() for p in processes):
- self.read_queues(queues, params_list)
+ self.read_queues(queues, params_list, warnings)
# sleep for a while until the queues are filled
time.sleep(SLEEP_TIME)
@@ -690,12 +762,12 @@
proc.join()
# retrieve leftover data
- self.read_queues(queues, params_list)
+ self.read_queues(queues, params_list, warnings)
- return params_list
+ return params_list, sorted(list(warnings))
@classmethod
- def insert_maintainers_info(cls, params_list):
+ def insert_maintainers_info(cls, srcdir, params_list):
"""Add Status and Maintainers information to the board parameters list.
Args:
@@ -705,16 +777,21 @@
list of str: List of warnings collected due to missing status, etc.
"""
database = MaintainersDatabase()
- for (dirpath, _, filenames) in os.walk('.'):
- if 'MAINTAINERS' in filenames:
- database.parse_file(os.path.join(dirpath, 'MAINTAINERS'))
+ for (dirpath, _, filenames) in os.walk(srcdir):
+ if 'MAINTAINERS' in filenames and 'tools/buildman' not in dirpath:
+ database.parse_file(srcdir,
+ os.path.join(dirpath, 'MAINTAINERS'))
for i, params in enumerate(params_list):
target = params['target']
- params['status'] = database.get_status(target)
- params['maintainers'] = database.get_maintainers(target)
+ maintainers = database.get_maintainers(target)
+ params['maintainers'] = maintainers
+ if maintainers:
+ params['status'] = database.get_status(target)
+ else:
+ params['status'] = '-'
params_list[i] = params
- return database.warnings
+ return sorted(database.warnings)
@classmethod
def format_and_output(cls, params_list, output):
@@ -750,9 +827,40 @@
with open(output, 'w', encoding="utf-8") as outf:
outf.write(COMMENT_BLOCK + '\n'.join(output_lines) + '\n')
+ def build_board_list(self, config_dir=CONFIG_DIR, srcdir='.', jobs=1,
+ warn_targets=False):
+ """Generate a board-database file
+
+ This works by reading the Kconfig, then loading each board's defconfig
+ in to get the setting for each option. In particular, CONFIG_TARGET_xxx
+ is typically set by the defconfig, where xxx is the target to build.
+
+ Args:
+ config_dir (str): Directory containing the defconfig files
+ srcdir (str): Directory containing source code (Kconfig files)
+ jobs (int): The number of jobs to run simultaneously
+ warn_targets (bool): True to warn about missing or duplicate
+ CONFIG_TARGET options
+
+ Returns:
+ tuple:
+ list of dict: List of board parameters, each a dict:
+ key: 'arch', 'cpu', 'soc', 'vendor', 'board', 'config',
+ 'target'
+ value: string value of the key
+ list of str: Warnings that came up
+ """
+ params_list, warnings = self.scan_defconfigs(config_dir, srcdir, jobs,
+ warn_targets)
+ m_warnings = self.insert_maintainers_info(srcdir, params_list)
+ return params_list, warnings + m_warnings
+
def ensure_board_list(self, output, jobs=1, force=False, quiet=False):
"""Generate a board database file if needed.
+ This is intended to check if Kconfig has changed since the boards.cfg
+ files was generated.
+
Args:
output (str): The name of the output file
jobs (int): The number of jobs to run simultaneously
@@ -762,12 +870,11 @@
Returns:
bool: True if all is well, False if there were warnings
"""
- if not force and output_is_new(output):
+ if not force and output_is_new(output, CONFIG_DIR, '.'):
if not quiet:
print(f'{output} is up to date. Nothing to do.')
return True
- params_list = self.scan_defconfigs(jobs)
- warnings = self.insert_maintainers_info(params_list)
+ params_list, warnings = self.build_board_list(CONFIG_DIR, '.', jobs)
for warn in warnings:
print(warn, file=sys.stderr)
self.format_and_output(params_list, output)
diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py
index 0eb894a..f7f8276 100644
--- a/tools/buildman/bsettings.py
+++ b/tools/buildman/bsettings.py
@@ -7,7 +7,7 @@
config_fname = None
-def Setup(fname=''):
+def setup(fname=''):
"""Set up the buildman settings module by reading config files
Args:
@@ -23,15 +23,15 @@
config_fname = '%s/.buildman' % os.getenv('HOME')
if not os.path.exists(config_fname):
print('No config file found ~/.buildman\nCreating one...\n')
- CreateBuildmanConfigFile(config_fname)
+ create_buildman_config_file(config_fname)
print('To install tool chains, please use the --fetch-arch option')
if config_fname:
settings.read(config_fname)
-def AddFile(data):
+def add_file(data):
settings.readfp(io.StringIO(data))
-def GetItems(section):
+def get_items(section):
"""Get the items from a section of the config.
Args:
@@ -47,7 +47,7 @@
except:
raise
-def GetGlobalItemValue(name):
+def get_global_item_value(name):
"""Get an item from the 'global' section of the config.
Args:
@@ -58,7 +58,7 @@
"""
return settings.get('global', name, fallback=None)
-def SetItem(section, tag, value):
+def set_item(section, tag, value):
"""Set an item and write it back to the settings file"""
global settings
global config_fname
@@ -68,7 +68,7 @@
with open(config_fname, 'w') as fd:
settings.write(fd)
-def CreateBuildmanConfigFile(config_fname):
+def create_buildman_config_file(config_fname):
"""Creates a new config file with no tool chain information.
Args:
@@ -91,7 +91,6 @@
[toolchain-prefix]
# name = path to prefix
# e.g. x86 = /opt/gcc-4.6.3-nolibc/x86_64-linux/bin/x86_64-linux-
-# arc = /opt/arc/arc_gnu_2021.03_prebuilt_elf32_le_linux_install/bin/arc-elf32-
[toolchain-alias]
# arch = alias
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index d81752e..ecbd368 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -134,7 +134,7 @@
for fname in config_filename:
self.config[fname] = {}
- def Add(self, fname, key, value):
+ def add(self, fname, key, value):
self.config[fname][key] = value
def __hash__(self):
@@ -151,7 +151,7 @@
self.target = target
self.environment = {}
- def Add(self, key, value):
+ def add(self, key, value):
self.environment[key] = value
class Builder:
@@ -163,7 +163,8 @@
checkout: True to check out source, False to skip that step.
This is used for testing.
col: terminal.Color() object
- count: Number of commits to build
+ count: Total number of commits to build, which is the number of commits
+ multiplied by the number of boards
do_make: Method to call to invoke Make
fail: Number of builds that failed due to error
force_build: Force building even if a build already exists
@@ -255,7 +256,10 @@
config_only=False, squash_config_y=False,
warnings_as_errors=False, work_in_output=False,
test_thread_exceptions=False, adjust_cfg=None,
- allow_missing=False, no_lto=False, reproducible_builds=False):
+ allow_missing=False, no_lto=False, reproducible_builds=False,
+ force_build=False, force_build_failures=False,
+ force_reconfig=False, in_tree=False,
+ force_config_on_failure=False, make_func=None):
"""Create a new Builder object
Args:
@@ -295,7 +299,14 @@
a string Kconfig
allow_missing: Run build with BINMAN_ALLOW_MISSING=1
no_lto (bool): True to set the NO_LTO flag when building
-
+ force_build (bool): Rebuild even commits that are already built
+ force_build_failures (bool): Rebuild commits that have not been
+ built, or failed to build
+ force_reconfig (bool): Reconfigure on each commit
+ in_tree (bool): Bulid in tree instead of out-of-tree
+ force_config_on_failure (bool): Reconfigure the build before
+ retrying a failed build
+ make_func (function): Function to call to run 'make'
"""
self.toolchains = toolchains
self.base_dir = base_dir
@@ -304,7 +315,7 @@
else:
self._working_dir = os.path.join(base_dir, '.bm-work')
self.threads = []
- self.do_make = self.Make
+ self.do_make = make_func or self.make
self.gnu_make = gnu_make
self.checkout = checkout
self.num_threads = num_threads
@@ -318,11 +329,7 @@
self._complete_delay = None
self._next_delay_update = datetime.now()
self._start_time = datetime.now()
- self.force_config_on_failure = True
- self.force_build_failures = False
- self.force_reconfig = False
self._step = step
- self.in_tree = False
self._error_lines = 0
self.no_subdirs = no_subdirs
self.full_path = full_path
@@ -336,6 +343,11 @@
self._ide = False
self.no_lto = no_lto
self.reproducible_builds = reproducible_builds
+ self.force_build = force_build
+ self.force_build_failures = force_build_failures
+ self.force_reconfig = force_reconfig
+ self.in_tree = in_tree
+ self.force_config_on_failure = force_config_on_failure
if not self.squash_config_y:
self.config_filenames += EXTRA_CONFIG_FILENAMES
@@ -389,7 +401,7 @@
def signal_handler(self, signal, frame):
sys.exit(1)
- def SetDisplayOptions(self, show_errors=False, show_sizes=False,
+ def set_display_options(self, show_errors=False, show_sizes=False,
show_detail=False, show_bloat=False,
list_error_boards=False, show_config=False,
show_environment=False, filter_dtb_warnings=False,
@@ -422,7 +434,7 @@
self._filter_migration_warnings = filter_migration_warnings
self._ide = ide
- def _AddTimestamp(self):
+ def _add_timestamp(self):
"""Add a new timestamp to the list and record the build period.
The build period is the length of time taken to perform a single
@@ -451,14 +463,14 @@
self._timestamps.popleft()
count -= 1
- def SelectCommit(self, commit, checkout=True):
+ def select_commit(self, commit, checkout=True):
"""Checkout the selected commit for this build
"""
self.commit = commit
if checkout and self.checkout:
gitutil.checkout(commit.hash)
- def Make(self, commit, brd, stage, cwd, *args, **kwargs):
+ def make(self, commit, brd, stage, cwd, *args, **kwargs):
"""Run make
Args:
@@ -503,7 +515,7 @@
result.combined = '%s\n' % (' '.join(cmd)) + result.combined
return result
- def ProcessResult(self, result):
+ def process_result(self, result):
"""Process the result of a build, showing progress information
Args:
@@ -524,8 +536,8 @@
if self._verbose:
terminal.print_clear()
boards_selected = {target : result.brd}
- self.ResetResultSummary(boards_selected)
- self.ProduceResultSummary(result.commit_upto, self.commits,
+ self.reset_result_summary(boards_selected)
+ self.produce_result_summary(result.commit_upto, self.commits,
boards_selected)
else:
target = '(starting)'
@@ -544,7 +556,7 @@
line += ' ' * 8
# Add our current completion time estimate
- self._AddTimestamp()
+ self._add_timestamp()
if self._complete_delay:
line += '%s : ' % self._complete_delay
@@ -553,7 +565,7 @@
terminal.print_clear()
tprint(line, newline=False, limit_to_line=True)
- def _GetOutputDir(self, commit_upto):
+ def get_output_dir(self, commit_upto):
"""Get the name of the output directory for a commit number
The output directory is typically .../<branch>/<commit>.
@@ -568,7 +580,7 @@
if self.commits:
commit = self.commits[commit_upto]
subject = commit.subject.translate(trans_valid_chars)
- # See _GetOutputSpaceRemovals() which parses this name
+ # See _get_output_space_removals() which parses this name
commit_dir = ('%02d_g%s_%s' % (commit_upto + 1,
commit.hash, subject[:20]))
elif not self.no_subdirs:
@@ -577,7 +589,7 @@
return self.base_dir
return os.path.join(self.base_dir, commit_dir)
- def GetBuildDir(self, commit_upto, target):
+ def get_build_dir(self, commit_upto, target):
"""Get the name of the build directory for a commit number
The build directory is typically .../<branch>/<commit>/<target>.
@@ -586,30 +598,30 @@
commit_upto: Commit number to use (0..self.count-1)
target: Target name
"""
- output_dir = self._GetOutputDir(commit_upto)
+ output_dir = self.get_output_dir(commit_upto)
if self.work_in_output:
return output_dir
return os.path.join(output_dir, target)
- def GetDoneFile(self, commit_upto, target):
+ def get_done_file(self, commit_upto, target):
"""Get the name of the done file for a commit number
Args:
commit_upto: Commit number to use (0..self.count-1)
target: Target name
"""
- return os.path.join(self.GetBuildDir(commit_upto, target), 'done')
+ return os.path.join(self.get_build_dir(commit_upto, target), 'done')
- def GetSizesFile(self, commit_upto, target):
+ def get_sizes_file(self, commit_upto, target):
"""Get the name of the sizes file for a commit number
Args:
commit_upto: Commit number to use (0..self.count-1)
target: Target name
"""
- return os.path.join(self.GetBuildDir(commit_upto, target), 'sizes')
+ return os.path.join(self.get_build_dir(commit_upto, target), 'sizes')
- def GetFuncSizesFile(self, commit_upto, target, elf_fname):
+ def get_func_sizes_file(self, commit_upto, target, elf_fname):
"""Get the name of the funcsizes file for a commit number and ELF file
Args:
@@ -617,10 +629,10 @@
target: Target name
elf_fname: Filename of elf image
"""
- return os.path.join(self.GetBuildDir(commit_upto, target),
+ return os.path.join(self.get_build_dir(commit_upto, target),
'%s.sizes' % elf_fname.replace('/', '-'))
- def GetObjdumpFile(self, commit_upto, target, elf_fname):
+ def get_objdump_file(self, commit_upto, target, elf_fname):
"""Get the name of the objdump file for a commit number and ELF file
Args:
@@ -628,20 +640,20 @@
target: Target name
elf_fname: Filename of elf image
"""
- return os.path.join(self.GetBuildDir(commit_upto, target),
+ return os.path.join(self.get_build_dir(commit_upto, target),
'%s.objdump' % elf_fname.replace('/', '-'))
- def GetErrFile(self, commit_upto, target):
+ def get_err_file(self, commit_upto, target):
"""Get the name of the err file for a commit number
Args:
commit_upto: Commit number to use (0..self.count-1)
target: Target name
"""
- output_dir = self.GetBuildDir(commit_upto, target)
+ output_dir = self.get_build_dir(commit_upto, target)
return os.path.join(output_dir, 'err')
- def FilterErrors(self, lines):
+ def filter_errors(self, lines):
"""Filter out errors in which we have no interest
We should probably use map().
@@ -664,7 +676,7 @@
out_lines.append(line)
return out_lines
- def ReadFuncSizes(self, fname, fd):
+ def read_func_sizes(self, fname, fd):
"""Read function sizes from the output of 'nm'
Args:
@@ -688,7 +700,7 @@
sym[name] = sym.get(name, 0) + int(size, 16)
return sym
- def _ProcessConfig(self, fname):
+ def _process_config(self, fname):
"""Read in a .config, autoconf.mk or autoconf.h file
This function handles all config file types. It ignores comments and
@@ -725,7 +737,7 @@
config[key] = value
return config
- def _ProcessEnvironment(self, fname):
+ def _process_environment(self, fname):
"""Read in a uboot.env file
This function reads in environment variables from a file.
@@ -750,7 +762,7 @@
pass
return environment
- def GetBuildOutcome(self, commit_upto, target, read_func_sizes,
+ def get_build_outcome(self, commit_upto, target, read_func_sizes,
read_config, read_environment):
"""Work out the outcome of a build.
@@ -764,8 +776,8 @@
Returns:
Outcome object
"""
- done_file = self.GetDoneFile(commit_upto, target)
- sizes_file = self.GetSizesFile(commit_upto, target)
+ done_file = self.get_done_file(commit_upto, target)
+ sizes_file = self.get_sizes_file(commit_upto, target)
sizes = {}
func_sizes = {}
config = {}
@@ -779,10 +791,10 @@
# Try a rebuild
return_code = 1
err_lines = []
- err_file = self.GetErrFile(commit_upto, target)
+ err_file = self.get_err_file(commit_upto, target)
if os.path.exists(err_file):
with open(err_file, 'r') as fd:
- err_lines = self.FilterErrors(fd.readlines())
+ err_lines = self.filter_errors(fd.readlines())
# Decide whether the build was ok, failed or created warnings
if return_code:
@@ -811,30 +823,30 @@
sizes[values[5]] = size_dict
if read_func_sizes:
- pattern = self.GetFuncSizesFile(commit_upto, target, '*')
+ pattern = self.get_func_sizes_file(commit_upto, target, '*')
for fname in glob.glob(pattern):
with open(fname, 'r') as fd:
dict_name = os.path.basename(fname).replace('.sizes',
'')
- func_sizes[dict_name] = self.ReadFuncSizes(fname, fd)
+ func_sizes[dict_name] = self.read_func_sizes(fname, fd)
if read_config:
- output_dir = self.GetBuildDir(commit_upto, target)
+ output_dir = self.get_build_dir(commit_upto, target)
for name in self.config_filenames:
fname = os.path.join(output_dir, name)
- config[name] = self._ProcessConfig(fname)
+ config[name] = self._process_config(fname)
if read_environment:
- output_dir = self.GetBuildDir(commit_upto, target)
+ output_dir = self.get_build_dir(commit_upto, target)
fname = os.path.join(output_dir, 'uboot.env')
- environment = self._ProcessEnvironment(fname)
+ environment = self._process_environment(fname)
return Builder.Outcome(rc, err_lines, sizes, func_sizes, config,
environment)
return Builder.Outcome(OUTCOME_UNKNOWN, [], {}, {}, {}, {})
- def GetResultSummary(self, boards_selected, commit_upto, read_func_sizes,
+ def get_result_summary(self, boards_selected, commit_upto, read_func_sizes,
read_config, read_environment):
"""Calculate a summary of the results of building a commit.
@@ -865,7 +877,7 @@
key: environment variable
value: value of environment variable
"""
- def AddLine(lines_summary, lines_boards, line, board):
+ def add_line(lines_summary, lines_boards, line, board):
line = line.rstrip()
if line in lines_boards:
lines_boards[line].append(board)
@@ -882,7 +894,7 @@
environment = {}
for brd in boards_selected.values():
- outcome = self.GetBuildOutcome(commit_upto, brd.target,
+ outcome = self.get_build_outcome(commit_upto, brd.target,
read_func_sizes, read_config,
read_environment)
board_dict[brd.target] = outcome
@@ -899,15 +911,15 @@
is_note = self._re_note.match(line)
if is_warning or (last_was_warning and is_note):
if last_func:
- AddLine(warn_lines_summary, warn_lines_boards,
+ add_line(warn_lines_summary, warn_lines_boards,
last_func, brd)
- AddLine(warn_lines_summary, warn_lines_boards,
+ add_line(warn_lines_summary, warn_lines_boards,
line, brd)
else:
if last_func:
- AddLine(err_lines_summary, err_lines_boards,
+ add_line(err_lines_summary, err_lines_boards,
last_func, brd)
- AddLine(err_lines_summary, err_lines_boards,
+ add_line(err_lines_summary, err_lines_boards,
line, brd)
last_was_warning = is_warning
last_func = None
@@ -915,19 +927,19 @@
for fname in self.config_filenames:
if outcome.config:
for key, value in outcome.config[fname].items():
- tconfig.Add(fname, key, value)
+ tconfig.add(fname, key, value)
config[brd.target] = tconfig
tenvironment = Environment(brd.target)
if outcome.environment:
for key, value in outcome.environment.items():
- tenvironment.Add(key, value)
+ tenvironment.add(key, value)
environment[brd.target] = tenvironment
return (board_dict, err_lines_summary, err_lines_boards,
warn_lines_summary, warn_lines_boards, config, environment)
- def AddOutcome(self, board_dict, arch_list, changes, char, color):
+ def add_outcome(self, board_dict, arch_list, changes, char, color):
"""Add an output to our list of outcomes for each architecture
This simple function adds failing boards (changes) to the
@@ -957,19 +969,19 @@
arch_list[arch] += str
- def ColourNum(self, num):
+ def colour_num(self, num):
color = self.col.RED if num > 0 else self.col.GREEN
if num == 0:
return '0'
return self.col.build(color, str(num))
- def ResetResultSummary(self, board_selected):
+ def reset_result_summary(self, board_selected):
"""Reset the results summary ready for use.
Set up the base board list to be all those selected, and set the
error lines to empty.
- Following this, calls to PrintResultSummary() will use this
+ Following this, calls to print_result_summary() will use this
information to work out what has changed.
Args:
@@ -986,7 +998,7 @@
self._base_config = None
self._base_environment = None
- def PrintFuncSizeDetail(self, fname, old, new):
+ def print_func_size_detail(self, fname, old, new):
grow, shrink, add, remove, up, down = 0, 0, 0, 0, 0, 0
delta, common = [], {}
@@ -1020,7 +1032,7 @@
args = [add, -remove, grow, -shrink, up, -down, up - down]
if max(args) == 0 and min(args) == 0:
return
- args = [self.ColourNum(x) for x in args]
+ args = [self.colour_num(x) for x in args]
indent = ' ' * 15
tprint('%s%s: add: %s/%s, grow: %s/%s bytes: %s/%s (%s)' %
tuple([indent, self.col.build(self.col.YELLOW, fname)] + args))
@@ -1034,7 +1046,7 @@
tprint(msg, colour=color)
- def PrintSizeDetail(self, target_list, show_bloat):
+ def print_size_detail(self, target_list, show_bloat):
"""Show details size information for each board
Args:
@@ -1067,12 +1079,12 @@
outcome = result['_outcome']
base_outcome = self._base_board_dict[target]
for fname in outcome.func_sizes:
- self.PrintFuncSizeDetail(fname,
+ self.print_func_size_detail(fname,
base_outcome.func_sizes[fname],
outcome.func_sizes[fname])
- def PrintSizeSummary(self, board_selected, board_dict, show_detail,
+ def print_size_summary(self, board_selected, board_dict, show_detail,
show_bloat):
"""Print a summary of image sizes broken down by section.
@@ -1173,10 +1185,10 @@
if printed_arch:
tprint()
if show_detail:
- self.PrintSizeDetail(target_list, show_bloat)
+ self.print_size_detail(target_list, show_bloat)
- def PrintResultSummary(self, board_selected, board_dict, err_lines,
+ def print_result_summary(self, board_selected, board_dict, err_lines,
err_line_boards, warn_lines, warn_line_boards,
config, environment, show_sizes, show_detail,
show_bloat, show_config, show_environment):
@@ -1212,7 +1224,7 @@
show_config: Show config changes
show_environment: Show environment changes
"""
- def _BoardList(line, line_boards):
+ def _board_list(line, line_boards):
"""Helper function to get a line of boards containing a line
Args:
@@ -1231,7 +1243,7 @@
board_set.add(brd)
return brds
- def _CalcErrorDelta(base_lines, base_line_boards, lines, line_boards,
+ def _calc_error_delta(base_lines, base_line_boards, lines, line_boards,
char):
"""Calculate the required output based on changes in errors
@@ -1255,17 +1267,17 @@
worse_lines = []
for line in lines:
if line not in base_lines:
- errline = ErrLine(char + '+', _BoardList(line, line_boards),
+ errline = ErrLine(char + '+', _board_list(line, line_boards),
line)
worse_lines.append(errline)
for line in base_lines:
if line not in lines:
errline = ErrLine(char + '-',
- _BoardList(line, base_line_boards), line)
+ _board_list(line, base_line_boards), line)
better_lines.append(errline)
return better_lines, worse_lines
- def _CalcConfig(delta, name, config):
+ def _calc_config(delta, name, config):
"""Calculate configuration changes
Args:
@@ -1283,7 +1295,7 @@
out += '%s=%s ' % (key, config[key])
return '%s %s: %s' % (delta, name, out)
- def _AddConfig(lines, name, config_plus, config_minus, config_change):
+ def _add_config(lines, name, config_plus, config_minus, config_change):
"""Add changes in configuration to a list
Args:
@@ -1300,13 +1312,13 @@
value: config value
"""
if config_plus:
- lines.append(_CalcConfig('+', name, config_plus))
+ lines.append(_calc_config('+', name, config_plus))
if config_minus:
- lines.append(_CalcConfig('-', name, config_minus))
+ lines.append(_calc_config('-', name, config_minus))
if config_change:
- lines.append(_CalcConfig('c', name, config_change))
+ lines.append(_calc_config('c', name, config_change))
- def _OutputConfigInfo(lines):
+ def _output_config_info(lines):
for line in lines:
if not line:
continue
@@ -1318,7 +1330,7 @@
col = self.col.YELLOW
tprint(' ' + line, newline=True, colour=col)
- def _OutputErrLines(err_lines, colour):
+ def _output_err_lines(err_lines, colour):
"""Output the line of error/warning lines, if not empty
Also increments self._error_lines if err_lines not empty
@@ -1376,9 +1388,9 @@
new_boards.append(target)
# Get a list of errors and warnings that have appeared, and disappeared
- better_err, worse_err = _CalcErrorDelta(self._base_err_lines,
+ better_err, worse_err = _calc_error_delta(self._base_err_lines,
self._base_err_line_boards, err_lines, err_line_boards, '')
- better_warn, worse_warn = _CalcErrorDelta(self._base_warn_lines,
+ better_warn, worse_warn = _calc_error_delta(self._base_warn_lines,
self._base_warn_line_boards, warn_lines, warn_line_boards, 'w')
# For the IDE mode, print out all the output
@@ -1391,26 +1403,26 @@
elif any((ok_boards, warn_boards, err_boards, unknown_boards, new_boards,
worse_err, better_err, worse_warn, better_warn)):
arch_list = {}
- self.AddOutcome(board_selected, arch_list, ok_boards, '',
+ self.add_outcome(board_selected, arch_list, ok_boards, '',
self.col.GREEN)
- self.AddOutcome(board_selected, arch_list, warn_boards, 'w+',
+ self.add_outcome(board_selected, arch_list, warn_boards, 'w+',
self.col.YELLOW)
- self.AddOutcome(board_selected, arch_list, err_boards, '+',
+ self.add_outcome(board_selected, arch_list, err_boards, '+',
self.col.RED)
- self.AddOutcome(board_selected, arch_list, new_boards, '*', self.col.BLUE)
+ self.add_outcome(board_selected, arch_list, new_boards, '*', self.col.BLUE)
if self._show_unknown:
- self.AddOutcome(board_selected, arch_list, unknown_boards, '?',
+ self.add_outcome(board_selected, arch_list, unknown_boards, '?',
self.col.MAGENTA)
for arch, target_list in arch_list.items():
tprint('%10s: %s' % (arch, target_list))
self._error_lines += 1
- _OutputErrLines(better_err, colour=self.col.GREEN)
- _OutputErrLines(worse_err, colour=self.col.RED)
- _OutputErrLines(better_warn, colour=self.col.CYAN)
- _OutputErrLines(worse_warn, colour=self.col.YELLOW)
+ _output_err_lines(better_err, colour=self.col.GREEN)
+ _output_err_lines(worse_err, colour=self.col.RED)
+ _output_err_lines(better_warn, colour=self.col.CYAN)
+ _output_err_lines(worse_warn, colour=self.col.YELLOW)
if show_sizes:
- self.PrintSizeSummary(board_selected, board_dict, show_detail,
+ self.print_size_summary(board_selected, board_dict, show_detail,
show_bloat)
if show_environment and self._base_environment:
@@ -1438,10 +1450,10 @@
desc = '%s -> %s' % (value, new_value)
environment_change[key] = desc
- _AddConfig(lines, target, environment_plus, environment_minus,
+ _add_config(lines, target, environment_plus, environment_minus,
environment_change)
- _OutputConfigInfo(lines)
+ _output_config_info(lines)
if show_config and self._base_config:
summary = {}
@@ -1504,9 +1516,9 @@
arch_config_minus[arch][name].update(config_minus)
arch_config_change[arch][name].update(config_change)
- _AddConfig(lines, name, config_plus, config_minus,
+ _add_config(lines, name, config_plus, config_minus,
config_change)
- _AddConfig(lines, 'all', all_config_plus, all_config_minus,
+ _add_config(lines, 'all', all_config_plus, all_config_minus,
all_config_change)
summary[target] = '\n'.join(lines)
@@ -1526,20 +1538,20 @@
all_plus.update(arch_config_plus[arch][name])
all_minus.update(arch_config_minus[arch][name])
all_change.update(arch_config_change[arch][name])
- _AddConfig(lines, name, arch_config_plus[arch][name],
+ _add_config(lines, name, arch_config_plus[arch][name],
arch_config_minus[arch][name],
arch_config_change[arch][name])
- _AddConfig(lines, 'all', all_plus, all_minus, all_change)
+ _add_config(lines, 'all', all_plus, all_minus, all_change)
#arch_summary[target] = '\n'.join(lines)
if lines:
tprint('%s:' % arch)
- _OutputConfigInfo(lines)
+ _output_config_info(lines)
for lines, targets in lines_by_target.items():
if not lines:
continue
tprint('%s :' % ' '.join(sorted(targets)))
- _OutputConfigInfo(lines.split('\n'))
+ _output_config_info(lines.split('\n'))
# Save our updated information for the next call to this function
@@ -1560,9 +1572,9 @@
tprint("Boards not built (%d): %s" % (len(not_built),
', '.join(not_built)))
- def ProduceResultSummary(self, commit_upto, commits, board_selected):
+ def produce_result_summary(self, commit_upto, commits, board_selected):
(board_dict, err_lines, err_line_boards, warn_lines,
- warn_line_boards, config, environment) = self.GetResultSummary(
+ warn_line_boards, config, environment) = self.get_result_summary(
board_selected, commit_upto,
read_func_sizes=self._show_bloat,
read_config=self._show_config,
@@ -1571,13 +1583,13 @@
msg = '%02d: %s' % (commit_upto + 1,
commits[commit_upto].subject)
tprint(msg, colour=self.col.BLUE)
- self.PrintResultSummary(board_selected, board_dict,
+ self.print_result_summary(board_selected, board_dict,
err_lines if self._show_errors else [], err_line_boards,
warn_lines if self._show_errors else [], warn_line_boards,
config, environment, self._show_sizes, self._show_detail,
self._show_bloat, self._show_config, self._show_environment)
- def ShowSummary(self, commits, board_selected):
+ def show_summary(self, commits, board_selected):
"""Show a build summary for U-Boot for a given board list.
Reset the result summary, then repeatedly call GetResultSummary on
@@ -1589,16 +1601,16 @@
"""
self.commit_count = len(commits) if commits else 1
self.commits = commits
- self.ResetResultSummary(board_selected)
+ self.reset_result_summary(board_selected)
self._error_lines = 0
for commit_upto in range(0, self.commit_count, self._step):
- self.ProduceResultSummary(commit_upto, commits, board_selected)
+ self.produce_result_summary(commit_upto, commits, board_selected)
if not self._error_lines:
tprint('(no errors to report)', colour=self.col.GREEN)
- def SetupBuild(self, board_selected, commits):
+ def setup_build(self, board_selected, commits):
"""Set up ready to start a build.
Args:
@@ -1611,7 +1623,7 @@
self.upto = self.warned = self.fail = 0
self._timestamps = collections.deque()
- def GetThreadDir(self, thread_num):
+ def get_thread_dir(self, thread_num):
"""Get the directory path to the working dir for a thread.
Args:
@@ -1622,7 +1634,7 @@
return self._working_dir
return os.path.join(self._working_dir, '%02d' % max(thread_num, 0))
- def _PrepareThread(self, thread_num, setup_git):
+ def _prepare_thread(self, thread_num, setup_git):
"""Prepare the working directory for a thread.
This clones or fetches the repo into the thread's work directory.
@@ -1635,8 +1647,8 @@
'clone' to set up a git clone
'worktree' to set up a git worktree
"""
- thread_dir = self.GetThreadDir(thread_num)
- builderthread.Mkdir(thread_dir)
+ thread_dir = self.get_thread_dir(thread_num)
+ builderthread.mkdir(thread_dir)
git_dir = os.path.join(thread_dir, '.git')
# Create a worktree or a git repo clone for this thread if it
@@ -1672,7 +1684,7 @@
else:
raise ValueError("Can't setup git repo with %s." % setup_git)
- def _PrepareWorkingSpace(self, max_threads, setup_git):
+ def _prepare_working_space(self, max_threads, setup_git):
"""Prepare the working directory for use.
Set up the git repo for each thread. Creates a linked working tree
@@ -1684,7 +1696,7 @@
work
setup_git: True to set up a git worktree or a git clone
"""
- builderthread.Mkdir(self._working_dir)
+ builderthread.mkdir(self._working_dir)
if setup_git and self.git_dir:
src_dir = os.path.abspath(self.git_dir)
if gitutil.check_worktree_is_available(src_dir):
@@ -1698,14 +1710,14 @@
# Always do at least one thread
for thread in range(max(max_threads, 1)):
- self._PrepareThread(thread, setup_git)
+ self._prepare_thread(thread, setup_git)
- def _GetOutputSpaceRemovals(self):
+ def _get_output_space_removals(self):
"""Get the output directories ready to receive files.
Figure out what needs to be deleted in the output directory before it
can be used. We only delete old buildman directories which have the
- expected name pattern. See _GetOutputDir().
+ expected name pattern. See get_output_dir().
Returns:
List of full paths of directories to remove
@@ -1714,7 +1726,7 @@
return
dir_list = []
for commit_upto in range(self.commit_count):
- dir_list.append(self._GetOutputDir(commit_upto))
+ dir_list.append(self.get_output_dir(commit_upto))
to_remove = []
for dirname in glob.glob(os.path.join(self.base_dir, '*')):
@@ -1725,14 +1737,14 @@
to_remove.append(dirname)
return to_remove
- def _PrepareOutputSpace(self):
+ def _prepare_output_space(self):
"""Get the output directories ready to receive files.
We delete any output directories which look like ones we need to
create. Having left over directories is confusing when the user wants
to check the output manually.
"""
- to_remove = self._GetOutputSpaceRemovals()
+ to_remove = self._get_output_space_removals()
if to_remove:
tprint('Removing %d old build directories...' % len(to_remove),
newline=False)
@@ -1740,7 +1752,7 @@
shutil.rmtree(dirname)
terminal.print_clear()
- def BuildBoards(self, commits, board_selected, keep_outputs, verbose):
+ def build_boards(self, commits, board_selected, keep_outputs, verbose):
"""Build all commits for a list of boards
Args:
@@ -1759,15 +1771,15 @@
self.commits = commits
self._verbose = verbose
- self.ResetResultSummary(board_selected)
- builderthread.Mkdir(self.base_dir, parents = True)
- self._PrepareWorkingSpace(min(self.num_threads, len(board_selected)),
+ self.reset_result_summary(board_selected)
+ builderthread.mkdir(self.base_dir, parents = True)
+ self._prepare_working_space(min(self.num_threads, len(board_selected)),
commits is not None)
- self._PrepareOutputSpace()
+ self._prepare_output_space()
if not self._ide:
tprint('\rStarting build...', newline=False)
- self.SetupBuild(board_selected, commits)
- self.ProcessResult(None)
+ self.setup_build(board_selected, commits)
+ self.process_result(None)
self.thread_exceptions = []
# Create jobs to build all commits for each board
for brd in board_selected.values():
@@ -1781,7 +1793,7 @@
if self.num_threads:
self.queue.put(job)
else:
- self._single_builder.RunJob(job)
+ self._single_builder.run_job(job)
if self.num_threads:
term = threading.Thread(target=self.queue.join)
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 635865c..25f460c 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -2,8 +2,15 @@
# Copyright (c) 2014 Google, Inc
#
+"""Implementation the bulider threads
+
+This module provides the BuilderThread class, which handles calling the builder
+based on the jobs provided.
+"""
+
import errno
import glob
+import io
import os
import shutil
import sys
@@ -16,11 +23,15 @@
RETURN_CODE_RETRY = -1
BASE_ELF_FILENAMES = ['u-boot', 'spl/u-boot-spl', 'tpl/u-boot-tpl']
-def Mkdir(dirname, parents = False):
+def mkdir(dirname, parents=False):
"""Make a directory if it doesn't already exist.
Args:
- dirname: Directory to create
+ dirname (str): Directory to create
+ parents (bool): True to also make parent directories
+
+ Raises:
+ OSError: File already exists
"""
try:
if parents:
@@ -30,12 +41,51 @@
except OSError as err:
if err.errno == errno.EEXIST:
if os.path.realpath('.') == os.path.realpath(dirname):
- print("Cannot create the current working directory '%s'!" % dirname)
+ print(f"Cannot create the current working directory '{dirname}'!")
sys.exit(1)
- pass
else:
raise
+
+def _remove_old_outputs(out_dir):
+ """Remove any old output-target files
+
+ Args:
+ out_dir (str): Output directory for the build
+
+ Since we use a build directory that was previously used by another
+ board, it may have produced an SPL image. If we don't remove it (i.e.
+ see do_config and self.mrproper below) then it will appear to be the
+ output of this build, even if it does not produce SPL images.
+ """
+ for elf in BASE_ELF_FILENAMES:
+ fname = os.path.join(out_dir, elf)
+ if os.path.exists(fname):
+ os.remove(fname)
+
+
+def copy_files(out_dir, build_dir, dirname, patterns):
+ """Copy files from the build directory to the output.
+
+ Args:
+ out_dir (str): Path to output directory containing the files
+ build_dir (str): Place to copy the files
+ dirname (str): Source directory, '' for normal U-Boot, 'spl' for SPL
+ patterns (list of str): A list of filenames to copy, each relative
+ to the build directory
+ """
+ for pattern in patterns:
+ file_list = glob.glob(os.path.join(out_dir, dirname, pattern))
+ for fname in file_list:
+ target = os.path.basename(fname)
+ if dirname:
+ base, ext = os.path.splitext(target)
+ if ext:
+ target = f'{base}-{dirname}{ext}'
+ shutil.copy(fname, os.path.join(build_dir, target))
+
+
+# pylint: disable=R0903
class BuilderJob:
"""Holds information about a job to be performed by a thread
@@ -77,7 +127,7 @@
"""
while True:
result = self.builder.out_queue.get()
- self.builder.ProcessResult(result)
+ self.builder.process_result(result)
self.builder.out_queue.task_done()
@@ -107,22 +157,25 @@
self.mrproper = mrproper
self.per_board_out_dir = per_board_out_dir
self.test_exception = test_exception
+ self.toolchain = None
- def Make(self, commit, brd, stage, cwd, *args, **kwargs):
+ def make(self, commit, brd, stage, cwd, *args, **kwargs):
"""Run 'make' on a particular commit and board.
The source code will already be checked out, so the 'commit'
argument is only for information.
Args:
- commit: Commit object that is being built
- brd: Board object that is being built
- stage: Stage of the build. Valid stages are:
+ commit (Commit): Commit that is being built
+ brd (Board): Board that is being built
+ stage (str): Stage of the build. Valid stages are:
mrproper - can be called to clean source
config - called to configure for a board
build - the main make invocation - it does the build
- args: A list of arguments to pass to 'make'
- kwargs: A list of keyword arguments to pass to command.run_pipe()
+ cwd (str): Working directory to set, or None to leave it alone
+ *args (list of str): Arguments to pass to 'make'
+ **kwargs (dict): A list of keyword arguments to pass to
+ command.run_pipe()
Returns:
CommandResult object
@@ -130,61 +183,140 @@
return self.builder.do_make(commit, brd, stage, cwd, *args,
**kwargs)
- def RunCommit(self, commit_upto, brd, work_dir, do_config, config_only,
- force_build, force_build_failures, work_in_output,
- adjust_cfg):
- """Build a particular commit.
-
- If the build is already done, and we are not forcing a build, we skip
- the build and just return the previously-saved results.
+ def _build_args(self, brd, out_dir, out_rel_dir, work_dir, commit_upto):
+ """Set up arguments to the args list based on the settings
Args:
- commit_upto: Commit number to build (0...n-1)
- brd: Board object to build
- work_dir: Directory to which the source will be checked out
- do_config: True to run a make <board>_defconfig on the source
- config_only: Only configure the source, do not build it
- force_build: Force a build even if one was previously done
- force_build_failures: Force a bulid if the previous result showed
- failure
- work_in_output: Use the output directory as the work directory and
- don't write to a separate output directory.
- adjust_cfg (list of str): List of changes to make to .config file
- before building. Each is one of (where C is either CONFIG_xxx
- or just xxx):
- C to enable C
- ~C to disable C
- C=val to set the value of C (val must have quotes if C is
- a string Kconfig
+ brd (Board): Board to create arguments for
+ out_dir (str): Path to output directory containing the files
+ out_rel_dir (str): Output directory relative to the current dir
+ work_dir (str): Directory to which the source will be checked out
+ commit_upto (int): Commit number to build (0...n-1)
Returns:
- tuple containing:
- - CommandResult object containing the results of the build
- - boolean indicating whether 'make config' is still needed
+ tuple:
+ list of str: Arguments to pass to make
+ str: Current working directory, or None if no commit
+ str: Source directory (typically the work directory)
"""
- # Create a default result - it will be overwritte by the call to
- # self.Make() below, in the event that we do a build.
- result = command.CommandResult()
- result.return_code = 0
- if work_in_output or self.builder.in_tree:
- out_dir = work_dir
- else:
- if self.per_board_out_dir:
- out_rel_dir = os.path.join('..', brd.target)
+ args = []
+ cwd = work_dir
+ src_dir = os.path.realpath(work_dir)
+ if not self.builder.in_tree:
+ if commit_upto is None:
+ # In this case we are building in the original source directory
+ # (i.e. the current directory where buildman is invoked. The
+ # output directory is set to this thread's selected work
+ # directory.
+ #
+ # Symlinks can confuse U-Boot's Makefile since we may use '..'
+ # in our path, so remove them.
+ real_dir = os.path.realpath(out_dir)
+ args.append(f'O={real_dir}')
+ cwd = None
+ src_dir = os.getcwd()
else:
- out_rel_dir = 'build'
- out_dir = os.path.join(work_dir, out_rel_dir)
+ args.append(f'O={out_rel_dir}')
+ if self.builder.verbose_build:
+ args.append('V=1')
+ else:
+ args.append('-s')
+ if self.builder.num_jobs is not None:
+ args.extend(['-j', str(self.builder.num_jobs)])
+ if self.builder.warnings_as_errors:
+ args.append('KCFLAGS=-Werror')
+ args.append('HOSTCFLAGS=-Werror')
+ if self.builder.allow_missing:
+ args.append('BINMAN_ALLOW_MISSING=1')
+ if self.builder.no_lto:
+ args.append('NO_LTO=1')
+ if self.builder.reproducible_builds:
+ args.append('SOURCE_DATE_EPOCH=0')
+ args.extend(self.builder.toolchains.GetMakeArguments(brd))
+ args.extend(self.toolchain.MakeArgs())
+ return args, cwd, src_dir
- # Check if the job was already completed last time
- done_file = self.builder.GetDoneFile(commit_upto, brd.target)
+ def _reconfigure(self, commit, brd, cwd, args, env, config_args, config_out,
+ cmd_list):
+ """Reconfigure the build
+
+ Args:
+ commit (Commit): Commit only being built
+ brd (Board): Board being built
+ cwd (str): Current working directory
+ args (list of str): Arguments to pass to make
+ env (dict): Environment strings
+ config_args (list of str): defconfig arg for this board
+ cmd_list (list of str): List to add the commands to, for logging
+
+ Returns:
+ CommandResult object
+ """
+ if self.mrproper:
+ result = self.make(commit, brd, 'mrproper', cwd, 'mrproper', *args,
+ env=env)
+ config_out.write(result.combined)
+ cmd_list.append([self.builder.gnu_make, 'mrproper', *args])
+ result = self.make(commit, brd, 'config', cwd, *(args + config_args),
+ env=env)
+ cmd_list.append([self.builder.gnu_make] + args + config_args)
+ config_out.write(result.combined)
+ return result
+
+ def _build(self, commit, brd, cwd, args, env, cmd_list, config_only):
+ """Perform the build
+
+ Args:
+ commit (Commit): Commit only being built
+ brd (Board): Board being built
+ cwd (str): Current working directory
+ args (list of str): Arguments to pass to make
+ env (dict): Environment strings
+ cmd_list (list of str): List to add the commands to, for logging
+ config_only (bool): True if this is a config-only build (using the
+ 'make cfg' target)
+
+ Returns:
+ CommandResult object
+ """
+ if config_only:
+ args.append('cfg')
+ result = self.make(commit, brd, 'build', cwd, *args, env=env)
+ cmd_list.append([self.builder.gnu_make] + args)
+ if (result.return_code == 2 and
+ ('Some images are invalid' in result.stderr)):
+ # This is handled later by the check for output in stderr
+ result.return_code = 0
+ return result
+
+ def _read_done_file(self, commit_upto, brd, force_build,
+ force_build_failures):
+ """Check the 'done' file and see if this commit should be built
+
+ Args:
+ commit (Commit): Commit only being built
+ brd (Board): Board being built
+ force_build (bool): Force a build even if one was previously done
+ force_build_failures (bool): Force a bulid if the previous result
+ showed failure
+
+ Returns:
+ tuple:
+ bool: True if build should be built
+ CommandResult: if there was a previous run:
+ - already_done set to True
+ - return_code set to return code
+ - result.stderr set to 'bad' if stderr output was recorded
+ """
+ result = command.CommandResult()
+ done_file = self.builder.get_done_file(commit_upto, brd.target)
result.already_done = os.path.exists(done_file)
will_build = (force_build or force_build_failures or
not result.already_done)
if result.already_done:
- # Get the return code from that build and use it
- with open(done_file, 'r') as fd:
+ with open(done_file, 'r', encoding='utf-8') as outf:
try:
- result.return_code = int(fd.readline())
+ result.return_code = int(outf.readline())
except ValueError:
# The file may be empty due to running out of disk space.
# Try a rebuild
@@ -194,12 +326,155 @@
if result.return_code == RETURN_CODE_RETRY:
will_build = True
elif will_build:
- err_file = self.builder.GetErrFile(commit_upto, brd.target)
+ err_file = self.builder.get_err_file(commit_upto, brd.target)
if os.path.exists(err_file) and os.stat(err_file).st_size:
result.stderr = 'bad'
elif not force_build:
# The build passed, so no need to build it again
will_build = False
+ return will_build, result
+
+ def _decide_dirs(self, brd, work_dir, work_in_output):
+ """Decide the output directory to use
+
+ Args:
+ work_dir (str): Directory to which the source will be checked out
+ work_in_output (bool): Use the output directory as the work
+ directory and don't write to a separate output directory.
+
+ Returns:
+ tuple:
+ out_dir (str): Output directory for the build
+ out_rel_dir (str): Output directory relatie to the current dir
+ """
+ if work_in_output or self.builder.in_tree:
+ out_rel_dir = None
+ out_dir = work_dir
+ else:
+ if self.per_board_out_dir:
+ out_rel_dir = os.path.join('..', brd.target)
+ else:
+ out_rel_dir = 'build'
+ out_dir = os.path.join(work_dir, out_rel_dir)
+ return out_dir, out_rel_dir
+
+ def _checkout(self, commit_upto, work_dir):
+ """Checkout the right commit
+
+ Args:
+ commit_upto (int): Commit number to build (0...n-1)
+ work_dir (str): Directory to which the source will be checked out
+
+ Returns:
+ Commit: Commit being built, or 'current' for current source
+ """
+ if self.builder.commits:
+ commit = self.builder.commits[commit_upto]
+ if self.builder.checkout:
+ git_dir = os.path.join(work_dir, '.git')
+ gitutil.checkout(commit.hash, git_dir, work_dir, force=True)
+ else:
+ commit = 'current'
+ return commit
+
+ def _config_and_build(self, commit_upto, brd, work_dir, do_config,
+ config_only, adjust_cfg, commit, out_dir, out_rel_dir,
+ result):
+ """Do the build, configuring first if necessary
+
+ Args:
+ commit_upto (int): Commit number to build (0...n-1)
+ brd (Board): Board to create arguments for
+ work_dir (str): Directory to which the source will be checked out
+ do_config (bool): True to run a make <board>_defconfig on the source
+ config_only (bool): Only configure the source, do not build it
+ adjust_cfg (list of str): See the cfgutil module and run_commit()
+ commit (Commit): Commit only being built
+ out_dir (str): Output directory for the build
+ out_rel_dir (str): Output directory relatie to the current dir
+ result (CommandResult): Previous result
+
+ Returns:
+ tuple:
+ result (CommandResult): Result of the build
+ do_config (bool): indicates whether 'make config' is needed on
+ the next incremental build
+ """
+ # Set up the environment and command line
+ env = self.toolchain.MakeEnvironment(self.builder.full_path)
+ mkdir(out_dir)
+
+ args, cwd, src_dir = self._build_args(brd, out_dir, out_rel_dir,
+ work_dir, commit_upto)
+ config_args = [f'{brd.target}_defconfig']
+ config_out = io.StringIO()
+
+ _remove_old_outputs(out_dir)
+
+ # If we need to reconfigure, do that now
+ cfg_file = os.path.join(out_dir, '.config')
+ cmd_list = []
+ if do_config or adjust_cfg:
+ result = self._reconfigure(
+ commit, brd, cwd, args, env, config_args, config_out, cmd_list)
+ do_config = False # No need to configure next time
+ if adjust_cfg:
+ cfgutil.adjust_cfg_file(cfg_file, adjust_cfg)
+
+ # Now do the build, if everything looks OK
+ if result.return_code == 0:
+ result = self._build(commit, brd, cwd, args, env, cmd_list,
+ config_only)
+ if adjust_cfg:
+ errs = cfgutil.check_cfg_file(cfg_file, adjust_cfg)
+ if errs:
+ result.stderr += errs
+ result.return_code = 1
+ result.stderr = result.stderr.replace(src_dir + '/', '')
+ if self.builder.verbose_build:
+ result.stdout = config_out.getvalue() + result.stdout
+ result.cmd_list = cmd_list
+ return result, do_config
+
+ def run_commit(self, commit_upto, brd, work_dir, do_config, config_only,
+ force_build, force_build_failures, work_in_output,
+ adjust_cfg):
+ """Build a particular commit.
+
+ If the build is already done, and we are not forcing a build, we skip
+ the build and just return the previously-saved results.
+
+ Args:
+ commit_upto (int): Commit number to build (0...n-1)
+ brd (Board): Board to build
+ work_dir (str): Directory to which the source will be checked out
+ do_config (bool): True to run a make <board>_defconfig on the source
+ config_only (bool): Only configure the source, do not build it
+ force_build (bool): Force a build even if one was previously done
+ force_build_failures (bool): Force a bulid if the previous result
+ showed failure
+ work_in_output (bool) : Use the output directory as the work
+ directory and don't write to a separate output directory.
+ adjust_cfg (list of str): List of changes to make to .config file
+ before building. Each is one of (where C is either CONFIG_xxx
+ or just xxx):
+ C to enable C
+ ~C to disable C
+ C=val to set the value of C (val must have quotes if C is
+ a string Kconfig
+
+ Returns:
+ tuple containing:
+ - CommandResult object containing the results of the build
+ - boolean indicating whether 'make config' is still needed
+ """
+ # Create a default result - it will be overwritte by the call to
+ # self.make() below, in the event that we do a build.
+ out_dir, out_rel_dir = self._decide_dirs(brd, work_dir, work_in_output)
+
+ # Check if the job was already completed last time
+ will_build, result = self._read_done_file(commit_upto, brd, force_build,
+ force_build_failures)
if will_build:
# We are going to have to build it. First, get a toolchain
@@ -209,115 +484,13 @@
except ValueError as err:
result.return_code = 10
result.stdout = ''
- result.stderr = str(err)
- # TODO(sjg@chromium.org): This gets swallowed, but needs
- # to be reported.
+ result.stderr = f'Tool chain error for {brd.arch}: {str(err)}'
if self.toolchain:
- # Checkout the right commit
- if self.builder.commits:
- commit = self.builder.commits[commit_upto]
- if self.builder.checkout:
- git_dir = os.path.join(work_dir, '.git')
- gitutil.checkout(commit.hash, git_dir, work_dir,
- force=True)
- else:
- commit = 'current'
-
- # Set up the environment and command line
- env = self.toolchain.MakeEnvironment(self.builder.full_path)
- Mkdir(out_dir)
- args = []
- cwd = work_dir
- src_dir = os.path.realpath(work_dir)
- if not self.builder.in_tree:
- if commit_upto is None:
- # In this case we are building in the original source
- # directory (i.e. the current directory where buildman
- # is invoked. The output directory is set to this
- # thread's selected work directory.
- #
- # Symlinks can confuse U-Boot's Makefile since
- # we may use '..' in our path, so remove them.
- out_dir = os.path.realpath(out_dir)
- args.append('O=%s' % out_dir)
- cwd = None
- src_dir = os.getcwd()
- else:
- args.append('O=%s' % out_rel_dir)
- if self.builder.verbose_build:
- args.append('V=1')
- else:
- args.append('-s')
- if self.builder.num_jobs is not None:
- args.extend(['-j', str(self.builder.num_jobs)])
- if self.builder.warnings_as_errors:
- args.append('KCFLAGS=-Werror')
- args.append('HOSTCFLAGS=-Werror')
- if self.builder.allow_missing:
- args.append('BINMAN_ALLOW_MISSING=1')
- if self.builder.no_lto:
- args.append('NO_LTO=1')
- if self.builder.reproducible_builds:
- args.append('SOURCE_DATE_EPOCH=0')
- config_args = ['%s_defconfig' % brd.target]
- config_out = ''
- args.extend(self.builder.toolchains.GetMakeArguments(brd))
- args.extend(self.toolchain.MakeArgs())
-
- # Remove any output targets. Since we use a build directory that
- # was previously used by another board, it may have produced an
- # SPL image. If we don't remove it (i.e. see do_config and
- # self.mrproper below) then it will appear to be the output of
- # this build, even if it does not produce SPL images.
- build_dir = self.builder.GetBuildDir(commit_upto, brd.target)
- for elf in BASE_ELF_FILENAMES:
- fname = os.path.join(out_dir, elf)
- if os.path.exists(fname):
- os.remove(fname)
-
- # If we need to reconfigure, do that now
- cfg_file = os.path.join(out_dir, '.config')
- cmd_list = []
- if do_config or adjust_cfg:
- config_out = ''
- if self.mrproper:
- result = self.Make(commit, brd, 'mrproper', cwd,
- 'mrproper', *args, env=env)
- config_out += result.combined
- cmd_list.append([self.builder.gnu_make, 'mrproper',
- *args])
- result = self.Make(commit, brd, 'config', cwd,
- *(args + config_args), env=env)
- cmd_list.append([self.builder.gnu_make] + args +
- config_args)
- config_out += result.combined
- do_config = False # No need to configure next time
- if adjust_cfg:
- cfgutil.adjust_cfg_file(cfg_file, adjust_cfg)
- if result.return_code == 0:
- if config_only:
- args.append('cfg')
- result = self.Make(commit, brd, 'build', cwd, *args,
- env=env)
- cmd_list.append([self.builder.gnu_make] + args)
- if (result.return_code == 2 and
- ('Some images are invalid' in result.stderr)):
- # This is handled later by the check for output in
- # stderr
- result.return_code = 0
- if adjust_cfg:
- errs = cfgutil.check_cfg_file(cfg_file, adjust_cfg)
- if errs:
- result.stderr += errs
- result.return_code = 1
- result.stderr = result.stderr.replace(src_dir + '/', '')
- if self.builder.verbose_build:
- result.stdout = config_out + result.stdout
- result.cmd_list = cmd_list
- else:
- result.return_code = 1
- result.stderr = 'No tool chain for %s\n' % brd.arch
+ commit = self._checkout(commit_upto, work_dir)
+ result, do_config = self._config_and_build(
+ commit_upto, brd, work_dir, do_config, config_only,
+ adjust_cfg, commit, out_dir, out_rel_dir, result)
result.already_done = False
result.toolchain = self.toolchain
@@ -326,15 +499,15 @@
result.out_dir = out_dir
return result, do_config
- def _WriteResult(self, result, keep_outputs, work_in_output):
+ def _write_result(self, result, keep_outputs, work_in_output):
"""Write a built result to the output directory.
Args:
- result: CommandResult object containing result to write
- keep_outputs: True to store the output binaries, False
+ result (CommandResult): result to write
+ keep_outputs (bool): True to store the output binaries, False
to delete them
- work_in_output: Use the output directory as the work directory and
- don't write to a separate output directory.
+ work_in_output (bool): Use the output directory as the work
+ directory and don't write to a separate output directory.
"""
# If we think this might have been aborted with Ctrl-C, record the
# failure but not that we are 'done' with this board. A retry may fix
@@ -345,22 +518,22 @@
return
# Write the output and stderr
- output_dir = self.builder._GetOutputDir(result.commit_upto)
- Mkdir(output_dir)
- build_dir = self.builder.GetBuildDir(result.commit_upto,
+ output_dir = self.builder.get_output_dir(result.commit_upto)
+ mkdir(output_dir)
+ build_dir = self.builder.get_build_dir(result.commit_upto,
result.brd.target)
- Mkdir(build_dir)
+ mkdir(build_dir)
outfile = os.path.join(build_dir, 'log')
- with open(outfile, 'w') as fd:
+ with open(outfile, 'w', encoding='utf-8') as outf:
if result.stdout:
- fd.write(result.stdout)
+ outf.write(result.stdout)
- errfile = self.builder.GetErrFile(result.commit_upto,
+ errfile = self.builder.get_err_file(result.commit_upto,
result.brd.target)
if result.stderr:
- with open(errfile, 'w') as fd:
- fd.write(result.stderr)
+ with open(errfile, 'w', encoding='utf-8') as outf:
+ outf.write(result.stderr)
elif os.path.exists(errfile):
os.remove(errfile)
@@ -370,60 +543,61 @@
if result.toolchain:
# Write the build result and toolchain information.
- done_file = self.builder.GetDoneFile(result.commit_upto,
+ done_file = self.builder.get_done_file(result.commit_upto,
result.brd.target)
- with open(done_file, 'w') as fd:
+ with open(done_file, 'w', encoding='utf-8') as outf:
if maybe_aborted:
# Special code to indicate we need to retry
- fd.write('%s' % RETURN_CODE_RETRY)
+ outf.write(f'{RETURN_CODE_RETRY}')
else:
- fd.write('%s' % result.return_code)
- with open(os.path.join(build_dir, 'toolchain'), 'w') as fd:
- print('gcc', result.toolchain.gcc, file=fd)
- print('path', result.toolchain.path, file=fd)
- print('cross', result.toolchain.cross, file=fd)
- print('arch', result.toolchain.arch, file=fd)
- fd.write('%s' % result.return_code)
+ outf.write(f'{result.return_code}')
+ with open(os.path.join(build_dir, 'toolchain'), 'w',
+ encoding='utf-8') as outf:
+ print('gcc', result.toolchain.gcc, file=outf)
+ print('path', result.toolchain.path, file=outf)
+ print('cross', result.toolchain.cross, file=outf)
+ print('arch', result.toolchain.arch, file=outf)
+ outf.write(f'{result.return_code}')
# Write out the image and function size information and an objdump
env = result.toolchain.MakeEnvironment(self.builder.full_path)
- with open(os.path.join(build_dir, 'out-env'), 'wb') as fd:
+ with open(os.path.join(build_dir, 'out-env'), 'wb') as outf:
for var in sorted(env.keys()):
- fd.write(b'%s="%s"' % (var, env[var]))
+ outf.write(b'%s="%s"' % (var, env[var]))
with open(os.path.join(build_dir, 'out-cmd'), 'w',
- encoding='utf-8') as fd:
+ encoding='utf-8') as outf:
for cmd in result.cmd_list:
- print(' '.join(cmd), file=fd)
+ print(' '.join(cmd), file=outf)
lines = []
for fname in BASE_ELF_FILENAMES:
- cmd = ['%snm' % self.toolchain.cross, '--size-sort', fname]
+ cmd = [f'{self.toolchain.cross}nm', '--size-sort', fname]
nm_result = command.run_pipe([cmd], capture=True,
capture_stderr=True, cwd=result.out_dir,
raise_on_error=False, env=env)
if nm_result.stdout:
- nm = self.builder.GetFuncSizesFile(result.commit_upto,
- result.brd.target, fname)
- with open(nm, 'w') as fd:
- print(nm_result.stdout, end=' ', file=fd)
+ nm_fname = self.builder.get_func_sizes_file(
+ result.commit_upto, result.brd.target, fname)
+ with open(nm_fname, 'w', encoding='utf-8') as outf:
+ print(nm_result.stdout, end=' ', file=outf)
- cmd = ['%sobjdump' % self.toolchain.cross, '-h', fname]
+ cmd = [f'{self.toolchain.cross}objdump', '-h', fname]
dump_result = command.run_pipe([cmd], capture=True,
capture_stderr=True, cwd=result.out_dir,
raise_on_error=False, env=env)
rodata_size = ''
if dump_result.stdout:
- objdump = self.builder.GetObjdumpFile(result.commit_upto,
+ objdump = self.builder.get_objdump_file(result.commit_upto,
result.brd.target, fname)
- with open(objdump, 'w') as fd:
- print(dump_result.stdout, end=' ', file=fd)
+ with open(objdump, 'w', encoding='utf-8') as outf:
+ print(dump_result.stdout, end=' ', file=outf)
for line in dump_result.stdout.splitlines():
fields = line.split()
if len(fields) > 5 and fields[1] == '.rodata':
rodata_size = fields[2]
- cmd = ['%ssize' % self.toolchain.cross, fname]
+ cmd = [f'{self.toolchain.cross}size', fname]
size_result = command.run_pipe([cmd], capture=True,
capture_stderr=True, cwd=result.out_dir,
raise_on_error=False, env=env)
@@ -432,30 +606,29 @@
rodata_size)
# Extract the environment from U-Boot and dump it out
- cmd = ['%sobjcopy' % self.toolchain.cross, '-O', 'binary',
+ cmd = [f'{self.toolchain.cross}objcopy', '-O', 'binary',
'-j', '.rodata.default_environment',
'env/built-in.o', 'uboot.env']
command.run_pipe([cmd], capture=True,
capture_stderr=True, cwd=result.out_dir,
raise_on_error=False, env=env)
- ubootenv = os.path.join(result.out_dir, 'uboot.env')
if not work_in_output:
- self.CopyFiles(result.out_dir, build_dir, '', ['uboot.env'])
+ copy_files(result.out_dir, build_dir, '', ['uboot.env'])
# Write out the image sizes file. This is similar to the output
# of binutil's 'size' utility, but it omits the header line and
# adds an additional hex value at the end of each line for the
# rodata size
- if len(lines):
- sizes = self.builder.GetSizesFile(result.commit_upto,
+ if lines:
+ sizes = self.builder.get_sizes_file(result.commit_upto,
result.brd.target)
- with open(sizes, 'w') as fd:
- print('\n'.join(lines), file=fd)
+ with open(sizes, 'w', encoding='utf-8') as outf:
+ print('\n'.join(lines), file=outf)
if not work_in_output:
# Write out the configuration files, with a special case for SPL
for dirname in ['', 'spl', 'tpl']:
- self.CopyFiles(
+ copy_files(
result.out_dir, build_dir, dirname,
['u-boot.cfg', 'spl/u-boot-spl.cfg', 'tpl/u-boot-tpl.cfg',
'.config', 'include/autoconf.mk',
@@ -463,60 +636,40 @@
# Now write the actual build output
if keep_outputs:
- self.CopyFiles(
+ copy_files(
result.out_dir, build_dir, '',
['u-boot*', '*.bin', '*.map', '*.img', 'MLO', 'SPL',
'include/autoconf.mk', 'spl/u-boot-spl*'])
- def CopyFiles(self, out_dir, build_dir, dirname, patterns):
- """Copy files from the build directory to the output.
-
- Args:
- out_dir: Path to output directory containing the files
- build_dir: Place to copy the files
- dirname: Source directory, '' for normal U-Boot, 'spl' for SPL
- patterns: A list of filenames (strings) to copy, each relative
- to the build directory
- """
- for pattern in patterns:
- file_list = glob.glob(os.path.join(out_dir, dirname, pattern))
- for fname in file_list:
- target = os.path.basename(fname)
- if dirname:
- base, ext = os.path.splitext(target)
- if ext:
- target = '%s-%s%s' % (base, dirname, ext)
- shutil.copy(fname, os.path.join(build_dir, target))
-
- def _SendResult(self, result):
+ def _send_result(self, result):
"""Send a result to the builder for processing
Args:
- result: CommandResult object containing the results of the build
+ result (CommandResult): results of the build
Raises:
- ValueError if self.test_exception is true (for testing)
+ ValueError: self.test_exception is true (for testing)
"""
if self.test_exception:
raise ValueError('test exception')
if self.thread_num != -1:
self.builder.out_queue.put(result)
else:
- self.builder.ProcessResult(result)
+ self.builder.process_result(result)
- def RunJob(self, job):
+ def run_job(self, job):
"""Run a single job
A job consists of a building a list of commits for a particular board.
Args:
- job: Job to build
+ job (Job): Job to build
- Returns:
- List of Result objects
+ Raises:
+ ValueError: Thread was interrupted
"""
brd = job.brd
- work_dir = self.builder.GetThreadDir(self.thread_num)
+ work_dir = self.builder.get_thread_dir(self.thread_num)
self.toolchain = None
if job.commits:
# Run 'make board_defconfig' on the first commit
@@ -524,7 +677,7 @@
commit_upto = 0
force_build = False
for commit_upto in range(0, len(job.commits), job.step):
- result, request_config = self.RunCommit(commit_upto, brd,
+ result, request_config = self.run_commit(commit_upto, brd,
work_dir, do_config, self.builder.config_only,
force_build or self.builder.force_build,
self.builder.force_build_failures,
@@ -535,7 +688,7 @@
# If our incremental build failed, try building again
# with a reconfig.
if self.builder.force_config_on_failure:
- result, request_config = self.RunCommit(commit_upto,
+ result, request_config = self.run_commit(commit_upto,
brd, work_dir, True, False, True, False,
job.work_in_output, job.adjust_cfg)
did_config = True
@@ -576,17 +729,17 @@
raise ValueError('Interrupt')
# We have the build results, so output the result
- self._WriteResult(result, job.keep_outputs, job.work_in_output)
- self._SendResult(result)
+ self._write_result(result, job.keep_outputs, job.work_in_output)
+ self._send_result(result)
else:
# Just build the currently checked-out build
- result, request_config = self.RunCommit(None, brd, work_dir, True,
+ result, request_config = self.run_commit(None, brd, work_dir, True,
self.builder.config_only, True,
self.builder.force_build_failures, job.work_in_output,
job.adjust_cfg)
result.commit_upto = 0
- self._WriteResult(result, job.keep_outputs, job.work_in_output)
- self._SendResult(result)
+ self._write_result(result, job.keep_outputs, job.work_in_output)
+ self._send_result(result)
def run(self):
"""Our thread's run function
@@ -597,8 +750,9 @@
while True:
job = self.builder.queue.get()
try:
- self.RunJob(job)
- except Exception as e:
- print('Thread exception (use -T0 to run without threads):', e)
- self.builder.thread_exceptions.append(e)
+ self.run_job(job)
+ except Exception as exc:
+ print('Thread exception (use -T0 to run without threads):',
+ exc)
+ self.builder.thread_exceptions.append(exc)
self.builder.queue.task_done()
diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst
index c8b0db3..aae2477 100644
--- a/tools/buildman/buildman.rst
+++ b/tools/buildman/buildman.rst
@@ -159,7 +159,7 @@
.. code-block:: bash
- buildman --boards sandbox,snow --boards
+ buildman --boards sandbox,snow --boards firefly-rk3399
It is convenient to use the -n option to see what will be built based on
the subset given. Use -v as well to get an actual list of boards.
@@ -475,10 +475,6 @@
sudo mkdir -p /toolchains
sudo mv ~/.buildman-toolchains/*/* /toolchains/
- For those not available from kernel.org, download from the following links:
-
- - `Arc Toolchain`_
-
Buildman should now be set up to use your new toolchain.
At the time of writing, U-Boot has these architectures:
@@ -1066,9 +1062,9 @@
The -K option uses the u-boot.cfg, spl/u-boot-spl.cfg and tpl/u-boot-tpl.cfg
files which are produced by a build. If all you want is to check the
-configuration you can in fact avoid doing a full build, using -D. This tells
-buildman to configuration U-Boot and create the .cfg files, but not actually
-build the source. This is 5-10 times faster than doing a full build.
+configuration you can in fact avoid doing a full build, using --config-only.
+This tells buildman to configuration U-Boot and create the .cfg files, but not
+actually build the source. This is 5-10 times faster than doing a full build.
By default buildman considers the follow two configuration methods
equivalent::
@@ -1307,13 +1303,31 @@
This file is no-longer needed by buildman but it is still generated in the
working directory. This helps avoid a delay on every build, since scanning all
-the Kconfig files takes a few seconds. Use the -R flag to force regeneration
-of the file - in that case buildman exits after writing the file. with exit code
-2 if there was an error in the maintainer files.
+the Kconfig files takes a few seconds. Use the `-R <filename>` flag to force
+regeneration of the file - in that case buildman exits after writing the file
+with exit code 2 if there was an error in the maintainer files. To use the
+default filename, use a hyphen, i.e. `-R -`.
You should use 'buildman -nv <criteria>' instead of greoing the boards.cfg file,
since it may be dropped altogether in future.
+
+Checking maintainers
+--------------------
+
+Sometimes a board is added without a corresponding entry in a MAINTAINERS file.
+Use the `--maintainer-check` option to check this::
+
+ $ buildman --maintainer-check
+ WARNING: board/mikrotik/crs3xx-98dx3236/MAINTAINERS: missing defconfig ending at line 7
+ WARNING: no maintainers for 'clearfog_spi'
+
+Buildman returns with an exit code of 2 if there area any warnings.
+
+An experimental `--full-check option` also checks for boards which don't have a
+CONFIG_TARGET_xxx where xxx corresponds to their defconfig filename. This is
+not strictly necessary, but may be useful information.
+
Checking the command
--------------------
@@ -1342,8 +1356,6 @@
the build speed by building all commits for a board instead of the other
way around.
-.. _`Arc Toolchain`: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_elf32_le_linux_install.tar.gz
-
.. sectionauthor:: Simon Glass
.. sectionauthor:: Copyright (c) 2013 The Chromium OS Authors.
.. sectionauthor:: sjg@chromium.org
diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py
index a9cda24..03211bd 100644
--- a/tools/buildman/cmdline.py
+++ b/tools/buildman/cmdline.py
@@ -2,148 +2,190 @@
# Copyright (c) 2014 Google, Inc
#
-from optparse import OptionParser
+"""Handles parsing of buildman arguments
+
+This creates the argument parser and uses it to parse the arguments passed in
+"""
+
+import argparse
import os
import pathlib
BUILDMAN_DIR = pathlib.Path(__file__).parent
HAS_TESTS = os.path.exists(BUILDMAN_DIR / "test.py")
-def ParseArgs():
- """Parse command line arguments from sys.argv[]
+def add_upto_m(parser):
+ """Add arguments up to 'M'
- Returns:
- tuple containing:
- options: command line options
- args: command lin arguments
+ Args:
+ parser (ArgumentParser): Parse to add to
+
+ This is split out to avoid having too many statements in one function
"""
- parser = OptionParser()
- parser.add_option('-a', '--adjust-cfg', type=str, action='append',
+ parser.add_argument('-a', '--adjust-cfg', type=str, action='append',
help='Adjust the Kconfig settings in .config before building')
- parser.add_option('-A', '--print-prefix', action='store_true',
+ parser.add_argument('-A', '--print-prefix', action='store_true',
help='Print the tool-chain prefix for a board (CROSS_COMPILE=)')
- parser.add_option('-b', '--branch', type='string',
+ parser.add_argument('-b', '--branch', type=str,
help='Branch name to build, or range of commits to build')
- parser.add_option('-B', '--bloat', dest='show_bloat',
+ parser.add_argument('-B', '--bloat', dest='show_bloat',
action='store_true', default=False,
help='Show changes in function code size for each board')
- parser.add_option('--boards', type='string', action='append',
+ parser.add_argument('--boards', type=str, action='append',
help='List of board names to build separated by comma')
- parser.add_option('-c', '--count', dest='count', type='int',
+ parser.add_argument('-c', '--count', dest='count', type=int,
default=-1, help='Run build on the top n commits')
- parser.add_option('-C', '--force-reconfig', dest='force_reconfig',
+ parser.add_argument('-C', '--force-reconfig', dest='force_reconfig',
action='store_true', default=False,
help='Reconfigure for every commit (disable incremental build)')
- parser.add_option('-d', '--detail', dest='show_detail',
+ parser.add_argument('--config-only', action='store_true',
+ default=False,
+ help="Don't build, just configure each commit")
+ parser.add_argument('-d', '--detail', dest='show_detail',
action='store_true', default=False,
help='Show detailed size delta for each board in the -S summary')
- parser.add_option('-D', '--config-only', action='store_true', default=False,
- help="Don't build, just configure each commit")
- parser.add_option('--debug', action='store_true',
+ parser.add_argument('-D', '--debug', action='store_true',
help='Enabling debugging (provides a full traceback on error)')
- parser.add_option('-e', '--show_errors', action='store_true',
+ parser.add_argument('-e', '--show_errors', action='store_true',
default=False, help='Show errors and warnings')
- parser.add_option('-E', '--warnings-as-errors', action='store_true',
+ parser.add_argument('-E', '--warnings-as-errors', action='store_true',
default=False, help='Treat all compiler warnings as errors')
- parser.add_option('-f', '--force-build', dest='force_build',
+ parser.add_argument('-f', '--force-build', dest='force_build',
action='store_true', default=False,
help='Force build of boards even if already built')
- parser.add_option('-F', '--force-build-failures', dest='force_build_failures',
+ parser.add_argument('-F', '--force-build-failures', dest='force_build_failures',
action='store_true', default=False,
help='Force build of previously-failed build')
- parser.add_option('--fetch-arch', type='string',
+ parser.add_argument('--fetch-arch', type=str,
help="Fetch a toolchain for architecture FETCH_ARCH ('list' to list)."
' You can also fetch several toolchains separate by comma, or'
" 'all' to download all")
- parser.add_option('-g', '--git', type='string',
+ parser.add_argument(
+ '--full-check', action='store_true',
+ help='Check maintainer entries and TARGET configs')
+ parser.add_argument('-g', '--git', type=str,
help='Git repo containing branch to build', default='.')
- parser.add_option('-G', '--config-file', type='string',
+ parser.add_argument('-G', '--config-file', type=str,
help='Path to buildman config file', default='')
- parser.add_option('-H', '--full-help', action='store_true', dest='full_help',
+ parser.add_argument('-H', '--full-help', action='store_true', dest='full_help',
default=False, help='Display the README file')
- parser.add_option('-i', '--in-tree', dest='in_tree',
+ parser.add_argument('-i', '--in-tree', dest='in_tree',
action='store_true', default=False,
help='Build in the source tree instead of a separate directory')
- parser.add_option('-I', '--ide', action='store_true', default=False,
+ parser.add_argument('-I', '--ide', action='store_true', default=False,
help='Create build output that can be parsed by an IDE')
- parser.add_option('-j', '--jobs', dest='jobs', type='int',
+ parser.add_argument('-j', '--jobs', dest='jobs', type=int,
default=None, help='Number of jobs to run at once (passed to make)')
- parser.add_option('-k', '--keep-outputs', action='store_true',
+ parser.add_argument('-k', '--keep-outputs', action='store_true',
default=False, help='Keep all build output files (e.g. binaries)')
- parser.add_option('-K', '--show-config', action='store_true',
- default=False, help='Show configuration changes in summary (both board config files and Kconfig)')
- parser.add_option('--preserve-config-y', action='store_true',
+ parser.add_argument('-K', '--show-config', action='store_true',
+ default=False,
+ help='Show configuration changes in summary (both board config files and Kconfig)')
+ parser.add_argument('--preserve-config-y', action='store_true',
default=False, help="Don't convert y to 1 in configs")
- parser.add_option('-l', '--list-error-boards', action='store_true',
+ parser.add_argument('-l', '--list-error-boards', action='store_true',
default=False, help='Show a list of boards next to each error/warning')
- parser.add_option('-L', '--no-lto', action='store_true',
+ parser.add_argument('-L', '--no-lto', action='store_true',
default=False, help='Disable Link-time Optimisation (LTO) for builds')
- parser.add_option('--list-tool-chains', action='store_true', default=False,
+ parser.add_argument('--list-tool-chains', action='store_true', default=False,
help='List available tool chains (use -v to see probing detail)')
- parser.add_option('-m', '--mrproper', action='store_true',
+ parser.add_argument('-m', '--mrproper', action='store_true',
default=False, help="Run 'make mrproper before reconfiguring")
- parser.add_option(
+ parser.add_argument(
'-M', '--allow-missing', action='store_true', default=False,
- help='Tell binman to allow missing blobs and generate fake ones as needed'),
- parser.add_option(
+ help='Tell binman to allow missing blobs and generate fake ones as needed')
+ parser.add_argument(
+ '--maintainer-check', action='store_true',
+ help='Check that maintainer entries exist for each board')
+ parser.add_argument(
'--no-allow-missing', action='store_true', default=False,
- help='Disable telling binman to allow missing blobs'),
- parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run',
+ help='Disable telling binman to allow missing blobs')
+ parser.add_argument('-n', '--dry-run', action='store_true', dest='dry_run',
default=False, help="Do a dry run (describe actions, but do nothing)")
- parser.add_option('-N', '--no-subdirs', action='store_true', dest='no_subdirs',
- default=False, help="Don't create subdirectories when building current source for a single board")
- parser.add_option('-o', '--output-dir', type='string', dest='output_dir',
+ parser.add_argument('-N', '--no-subdirs', action='store_true', dest='no_subdirs',
+ default=False,
+ help="Don't create subdirectories when building current source for a single board")
+
+
+def add_after_m(parser):
+ """Add arguments after 'M'
+
+ Args:
+ parser (ArgumentParser): Parse to add to
+
+ This is split out to avoid having too many statements in one function
+ """
+ parser.add_argument('-o', '--output-dir', type=str, dest='output_dir',
help='Directory where all builds happen and buildman has its workspace (default is ../)')
- parser.add_option('-O', '--override-toolchain', type='string',
+ parser.add_argument('-O', '--override-toolchain', type=str,
help="Override host toochain to use for sandbox (e.g. 'clang-7')")
- parser.add_option('-Q', '--quick', action='store_true',
+ parser.add_argument('-Q', '--quick', action='store_true',
default=False, help='Do a rough build, with limited warning resolution')
- parser.add_option('-p', '--full-path', action='store_true',
+ parser.add_argument('-p', '--full-path', action='store_true',
default=False, help="Use full toolchain path in CROSS_COMPILE")
- parser.add_option('-P', '--per-board-out-dir', action='store_true',
+ parser.add_argument('-P', '--per-board-out-dir', action='store_true',
default=False, help="Use an O= (output) directory per board rather than per thread")
- parser.add_option('-r', '--reproducible-builds', action='store_true',
+ parser.add_argument('--print-arch', action='store_true',
+ default=False, help="Print the architecture for a board (ARCH=)")
+ parser.add_argument('-r', '--reproducible-builds', action='store_true',
help='Set SOURCE_DATE_EPOCH=0 to suuport a reproducible build')
- parser.add_option('-R', '--regen-board-list', action='store_true',
+ parser.add_argument('-R', '--regen-board-list', type=str,
help='Force regeneration of the list of boards, like the old boards.cfg file')
- parser.add_option('-s', '--summary', action='store_true',
+ parser.add_argument('-s', '--summary', action='store_true',
default=False, help='Show a build summary')
- parser.add_option('-S', '--show-sizes', action='store_true',
+ parser.add_argument('-S', '--show-sizes', action='store_true',
default=False, help='Show image size variation in summary')
- parser.add_option('--step', type='int',
+ parser.add_argument('--step', type=int,
default=1, help='Only build every n commits (0=just first and last)')
if HAS_TESTS:
- parser.add_option('--skip-net-tests', action='store_true', default=False,
+ parser.add_argument('--skip-net-tests', action='store_true', default=False,
help='Skip tests which need the network')
- parser.add_option('-t', '--test', action='store_true', dest='test',
+ parser.add_argument('-t', '--test', action='store_true', dest='test',
default=False, help='run tests')
- parser.add_option('-T', '--threads', type='int',
+ parser.add_argument('--coverage', action='store_true',
+ help='Calculated test coverage')
+ parser.add_argument('-T', '--threads', type=int,
default=None,
help='Number of builder threads to use (0=single-thread)')
- parser.add_option('-u', '--show_unknown', action='store_true',
+ parser.add_argument('-u', '--show_unknown', action='store_true',
default=False, help='Show boards with unknown build result')
- parser.add_option('-U', '--show-environment', action='store_true',
+ parser.add_argument('-U', '--show-environment', action='store_true',
default=False, help='Show environment changes in summary')
- parser.add_option('-v', '--verbose', action='store_true',
+ parser.add_argument('-v', '--verbose', action='store_true',
default=False, help='Show build results while the build progresses')
- parser.add_option('-V', '--verbose-build', action='store_true',
+ parser.add_argument('-V', '--verbose-build', action='store_true',
default=False, help='Run make with V=1, logging all output')
- parser.add_option('-w', '--work-in-output', action='store_true',
+ parser.add_argument('-w', '--work-in-output', action='store_true',
default=False, help='Use the output directory as the work directory')
- parser.add_option('-W', '--ignore-warnings', action='store_true',
+ parser.add_argument('-W', '--ignore-warnings', action='store_true',
default=False, help='Return success even if there are warnings')
- parser.add_option('-x', '--exclude', dest='exclude',
- type='string', action='append',
+ parser.add_argument('-x', '--exclude', dest='exclude',
+ type=str, action='append',
help='Specify a list of boards to exclude, separated by comma')
- parser.add_option('-y', '--filter-dtb-warnings', action='store_true',
+ parser.add_argument('-y', '--filter-dtb-warnings', action='store_true',
default=False,
help='Filter out device-tree-compiler warnings from output')
- parser.add_option('-Y', '--filter-migration-warnings', action='store_true',
+ parser.add_argument('-Y', '--filter-migration-warnings', action='store_true',
default=False,
help='Filter out migration warnings from output')
+
+def parse_args():
+ """Parse command line arguments from sys.argv[]
+
- parser.usage += """ [list of target/arch/cpu/board/vendor/soc to build]
+ Returns:
+ tuple containing:
+ options: command line options
+ args: command lin arguments
+ """
+ epilog = """ [list of target/arch/cpu/board/vendor/soc to build]
Build U-Boot for all commits in a branch. Use -n to do a dry run"""
+ parser = argparse.ArgumentParser(epilog=epilog)
+ add_upto_m(parser)
+ add_after_m(parser)
+ parser.add_argument('terms', type=str, nargs='*',
+ help='Board / SoC names to build')
+
return parser.parse_args()
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 09a11f2..5c57200 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -2,15 +2,14 @@
# Copyright (c) 2013 The Chromium OS Authors.
#
+"""Control module for buildman
+
+This holds the main control logic for buildman, when not running tests.
+"""
+
import multiprocessing
-try:
- import importlib.resources
-except ImportError:
- # for Python 3.6
- import importlib_resources
import os
import shutil
-import subprocess
import sys
from buildman import boards
@@ -22,34 +21,58 @@
from patman import patchstream
from u_boot_pylib import command
from u_boot_pylib import terminal
-from u_boot_pylib import tools
from u_boot_pylib.terminal import tprint
-def GetPlural(count):
+TEST_BUILDER = None
+
+def get_plural(count):
"""Returns a plural 's' if count is not 1"""
return 's' if count != 1 else ''
-def GetActionSummary(is_summary, commits, selected, options):
- """Return a string summarising the intended action.
+
+def count_build_commits(commits, step):
+ """Calculate the number of commits to be built
+
+ Args:
+ commits (list of Commit): Commits to build or None
+ step (int): Step value for commits, typically 1
Returns:
- Summary string.
+ Number of commits that will be built
"""
if commits:
count = len(commits)
- count = (count + options.step - 1) // options.step
- commit_str = '%d commit%s' % (count, GetPlural(count))
+ return (count + step - 1) // step
+ return 0
+
+
+def get_action_summary(is_summary, commit_count, selected, threads, jobs):
+ """Return a string summarising the intended action.
+
+ Args:
+ is_summary (bool): True if this is a summary (otherwise it is building)
+ commits (list): List of commits being built
+ selected (list of Board): List of Board objects that are marked
+ step (int): Step increment through commits
+ threads (int): Number of processor threads being used
+ jobs (int): Number of jobs to build at once
+
+ Returns:
+ Summary string.
+ """
+ if commit_count:
+ commit_str = f'{commit_count} commit{get_plural(commit_count)}'
else:
commit_str = 'current source'
- str = '%s %s for %d boards' % (
- 'Summary of' if is_summary else 'Building', commit_str,
- len(selected))
- str += ' (%d thread%s, %d job%s per thread)' % (options.threads,
- GetPlural(options.threads), options.jobs, GetPlural(options.jobs))
- return str
+ msg = (f"{'Summary of' if is_summary else 'Building'} "
+ f'{commit_str} for {len(selected)} boards')
+ msg += (f' ({threads} thread{get_plural(threads)}, '
+ f'{jobs} job{get_plural(jobs)} per thread)')
+ return msg
-def ShowActions(series, why_selected, boards_selected, builder, options,
- board_warnings):
+# pylint: disable=R0913
+def show_actions(series, why_selected, boards_selected, output_dir,
+ board_warnings, step, threads, jobs, verbose):
"""Display a list of actions that we would take, if not a dry run.
Args:
@@ -61,9 +84,12 @@
the value would be a list of board names.
boards_selected: Dict of selected boards, key is target name,
value is Board object
- builder: The builder that will be used to build the commits
- options: Command line options object
+ output_dir (str): Output directory for builder
board_warnings: List of warnings obtained from board selected
+ step (int): Step increment through commits
+ threads (int): Number of processor threads being used
+ jobs (int): Number of jobs to build at once
+ verbose (bool): True to indicate why each board was selected
"""
col = terminal.Color()
print('Dry run, so not doing much. But I would do this:')
@@ -72,27 +98,27 @@
commits = series.commits
else:
commits = None
- print(GetActionSummary(False, commits, boards_selected,
- options))
- print('Build directory: %s' % builder.base_dir)
+ print(get_action_summary(False, count_build_commits(commits, step),
+ boards_selected, threads, jobs))
+ print(f'Build directory: {output_dir}')
if commits:
- for upto in range(0, len(series.commits), options.step):
+ for upto in range(0, len(series.commits), step):
commit = series.commits[upto]
print(' ', col.build(col.YELLOW, commit.hash[:8], bright=False), end=' ')
print(commit.subject)
print()
for arg in why_selected:
if arg != 'all':
- print(arg, ': %d boards' % len(why_selected[arg]))
- if options.verbose:
- print(' %s' % ' '.join(why_selected[arg]))
- print(('Total boards to build for each commit: %d\n' %
- len(why_selected['all'])))
+ print(arg, f': {len(why_selected[arg])} boards')
+ if verbose:
+ print(f" {' '.join(why_selected[arg])}")
+ print('Total boards to build for each '
+ f"commit: {len(why_selected['all'])}\n")
if board_warnings:
for warning in board_warnings:
print(col.build(col.YELLOW, warning))
-def ShowToolchainPrefix(brds, toolchains):
+def show_toolchain_prefix(brds, toolchains):
"""Show information about a the tool chain used by one or more boards
The function checks that all boards use the same toolchain, then prints
@@ -110,15 +136,48 @@
for brd in board_selected.values():
tc_set.add(toolchains.Select(brd.arch))
if len(tc_set) != 1:
- return 'Supplied boards must share one toolchain'
- return False
- tc = tc_set.pop()
- print(tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
- return None
+ sys.exit('Supplied boards must share one toolchain')
+ tchain = tc_set.pop()
+ print(tchain.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
+
+def show_arch(brds):
+ """Show information about a the architecture used by one or more boards
+
+ The function checks that all boards use the same architecture, then prints
+ the correct value for ARCH.
+
+ Args:
+ boards: Boards object containing selected boards
+
+ Return:
+ None on success, string error message otherwise
+ """
+ board_selected = brds.get_selected_dict()
+ arch_set = set()
+ for brd in board_selected.values():
+ arch_set.add(brd.arch)
+ if len(arch_set) != 1:
+ sys.exit('Supplied boards must share one arch')
+ print(arch_set.pop())
def get_allow_missing(opt_allow, opt_no_allow, num_selected, has_branch):
+ """Figure out whether to allow external blobs
+
+ Uses the allow-missing setting and the provided arguments to decide whether
+ missing external blobs should be allowed
+
+ Args:
+ opt_allow (bool): True if --allow-missing flag is set
+ opt_no_allow (bool): True if --no-allow-missing flag is set
+ num_selected (int): Number of selected board
+ has_branch (bool): True if a git branch (to build) has been provided
+
+ Returns:
+ bool: True to allow missing external blobs, False to produce an error if
+ external blobs are used
+ """
allow_missing = False
- am_setting = bsettings.GetGlobalItemValue('allow-missing')
+ am_setting = bsettings.get_global_item_value('allow-missing')
if am_setting:
if am_setting == 'always':
allow_missing = True
@@ -133,284 +192,485 @@
allow_missing = False
return allow_missing
-def DoBuildman(options, args, toolchains=None, make_func=None, brds=None,
- clean_dir=False, test_thread_exceptions=False):
- """The main control code for buildman
+
+def count_commits(branch, count, col, git_dir):
+ """Could the number of commits in the branch/ranch being built
Args:
- options: Command line options object
- args: Command line arguments (list of strings)
- toolchains: Toolchains to use - this should be a Toolchains()
- object. If None, then it will be created and scanned
- make_func: Make function to use for the builder. This is called
- to execute 'make'. If this is None, the normal function
- will be used, which calls the 'make' tool with suitable
- arguments. This setting is useful for tests.
- brds: Boards() object to use, containing a list of available
- boards. If this is None it will be created and scanned.
- clean_dir: Used for tests only, indicates that the existing output_dir
- should be removed before starting the build
- test_thread_exceptions: Uses for tests only, True to make the threads
- raise an exception instead of reporting their result. This simulates
- a failure in the code somewhere
+ branch (str): Name of branch to build, or None if none
+ count (int): Number of commits to build, or -1 for all
+ col (Terminal.Color): Color object to use
+ git_dir (str): Git directory to use, e.g. './.git'
+
+ Returns:
+ tuple:
+ Number of commits being built
+ True if the 'branch' string contains a range rather than a simple
+ name
"""
- global builder
+ has_range = branch and '..' in branch
+ if count == -1:
+ if not branch:
+ count = 1
+ else:
+ if has_range:
+ count, msg = gitutil.count_commits_in_range(git_dir, branch)
+ else:
+ count, msg = gitutil.count_commits_in_branch(git_dir, branch)
+ if count is None:
+ sys.exit(col.build(col.RED, msg))
+ elif count == 0:
+ sys.exit(col.build(col.RED,
+ f"Range '{branch}' has no commits"))
+ if msg:
+ print(col.build(col.YELLOW, msg))
+ count += 1 # Build upstream commit also
+
+ if not count:
+ msg = (f"No commits found to process in branch '{branch}': "
+ "set branch's upstream or use -c flag")
+ sys.exit(col.build(col.RED, msg))
+ return count, has_range
+
+
+def determine_series(selected, col, git_dir, count, branch, work_in_output):
+ """Determine the series which is to be built, if any
+
+ If there is a series, the commits in that series are numbered by setting
+ their sequence value (starting from 0). This is used by tests.
+
+ Args:
+ selected (list of Board): List of Board objects that are marked
+ selected
+ col (Terminal.Color): Color object to use
+ git_dir (str): Git directory to use, e.g. './.git'
+ count (int): Number of commits in branch
+ branch (str): Name of branch to build, or None if none
+ work_in_output (bool): True to work in the output directory
+
+ Returns:
+ Series: Series to build, or None for none
+
+ Read the metadata from the commits. First look at the upstream commit,
+ then the ones in the branch. We would like to do something like
+ upstream/master~..branch but that isn't possible if upstream/master is
+ a merge commit (it will list all the commits that form part of the
+ merge)
+
+ Conflicting tags are not a problem for buildman, since it does not use
+ them. For example, Series-version is not useful for buildman. On the
+ other hand conflicting tags will cause an error. So allow later tags
+ to overwrite earlier ones by setting allow_overwrite=True
+ """
+
+ # Work out how many commits to build. We want to build everything on the
+ # branch. We also build the upstream commit as a control so we can see
+ # problems introduced by the first commit on the branch.
+ count, has_range = count_commits(branch, count, col, git_dir)
+ if work_in_output:
+ if len(selected) != 1:
+ sys.exit(col.build(col.RED,
+ '-w can only be used with a single board'))
+ if count != 1:
+ sys.exit(col.build(col.RED,
+ '-w can only be used with a single commit'))
+
+ if branch:
+ if count == -1:
+ if has_range:
+ range_expr = branch
+ else:
+ range_expr = gitutil.get_range_in_branch(git_dir, branch)
+ upstream_commit = gitutil.get_upstream(git_dir, branch)
+ series = patchstream.get_metadata_for_list(upstream_commit,
+ git_dir, 1, series=None, allow_overwrite=True)
+
+ series = patchstream.get_metadata_for_list(range_expr,
+ git_dir, None, series, allow_overwrite=True)
+ else:
+ # Honour the count
+ series = patchstream.get_metadata_for_list(branch,
+ git_dir, count, series=None, allow_overwrite=True)
+
+ # Number the commits for test purposes
+ for i, commit in enumerate(series.commits):
+ commit.sequence = i
+ else:
+ series = None
+ return series
- if options.full_help:
- with importlib.resources.path('buildman', 'README.rst') as readme:
- tools.print_full_help(str(readme))
+
+def do_fetch_arch(toolchains, col, fetch_arch):
+ """Handle the --fetch-arch option
+
+ Args:
+ toolchains (Toolchains): Tool chains to use
+ col (terminal.Color): Color object to build
+ fetch_arch (str): Argument passed to the --fetch-arch option
+
+ Returns:
+ int: Return code for buildman
+ """
+ if fetch_arch == 'list':
+ sorted_list = toolchains.ListArchs()
+ print(col.build(
+ col.BLUE,
+ f"Available architectures: {' '.join(sorted_list)}\n"))
return 0
- gitutil.setup()
- col = terminal.Color()
+ if fetch_arch == 'all':
+ fetch_arch = ','.join(toolchains.ListArchs())
+ print(col.build(col.CYAN,
+ f'\nDownloading toolchains: {fetch_arch}'))
+ for arch in fetch_arch.split(','):
+ print()
+ ret = toolchains.FetchAndInstall(arch)
+ if ret:
+ return ret
+ return 0
+
- options.git_dir = os.path.join(options.git, '.git')
+def get_toolchains(toolchains, col, override_toolchain, fetch_arch,
+ list_tool_chains, verbose):
+ """Get toolchains object to use
+ Args:
+ toolchains (Toolchains or None): Toolchains to use. If None, then a
+ Toolchains object will be created and scanned
+ col (Terminal.Color): Color object
+ override_toolchain (str or None): Override value for toolchain, or None
+ fetch_arch (bool): True to fetch the toolchain for the architectures
+ list_tool_chains (bool): True to list all tool chains
+ verbose (bool): True for verbose output when listing toolchains
+
+ Returns:
+ Either:
+ int: Operation completed and buildman should exit with exit code
+ Toolchains: Toolchains object to use
+ """
no_toolchains = toolchains is None
if no_toolchains:
- toolchains = toolchain.Toolchains(options.override_toolchain)
+ toolchains = toolchain.Toolchains(override_toolchain)
- if options.fetch_arch:
- if options.fetch_arch == 'list':
- sorted_list = toolchains.ListArchs()
- print(col.build(col.BLUE, 'Available architectures: %s\n' %
- ' '.join(sorted_list)))
- return 0
- else:
- fetch_arch = options.fetch_arch
- if fetch_arch == 'all':
- fetch_arch = ','.join(toolchains.ListArchs())
- print(col.build(col.CYAN, '\nDownloading toolchains: %s' %
- fetch_arch))
- for arch in fetch_arch.split(','):
- print()
- ret = toolchains.FetchAndInstall(arch)
- if ret:
- return ret
- return 0
+ if fetch_arch:
+ return do_fetch_arch(toolchains, col, fetch_arch)
if no_toolchains:
toolchains.GetSettings()
- toolchains.Scan(options.list_tool_chains and options.verbose)
- if options.list_tool_chains:
+ toolchains.Scan(list_tool_chains and verbose)
+ if list_tool_chains:
toolchains.List()
print()
return 0
+ return toolchains
- if not options.output_dir:
- if options.work_in_output:
- sys.exit(col.build(col.RED, '-w requires that you specify -o'))
- options.output_dir = '..'
- # Work out what subset of the boards we are building
- if not brds:
- if not os.path.exists(options.output_dir):
- os.makedirs(options.output_dir)
- board_file = os.path.join(options.output_dir, 'boards.cfg')
+def get_boards_obj(output_dir, regen_board_list, maintainer_check, full_check,
+ threads, verbose):
+ """Object the Boards object to use
+
+ Creates the output directory and ensures there is a boards.cfg file, then
+ read it in.
+
+ Args:
+ output_dir (str): Output directory to use
+ regen_board_list (bool): True to just regenerate the board list
+ maintainer_check (bool): True to just run a maintainer check
+ full_check (bool): True to just run a full check of Kconfig and
+ maintainers
+ threads (int or None): Number of threads to use to create boards file
+ verbose (bool): False to suppress output from boards-file generation
- brds = boards.Boards()
- ok = brds.ensure_board_list(board_file,
- options.threads or multiprocessing.cpu_count(),
- force=options.regen_board_list,
- quiet=not options.verbose)
- if options.regen_board_list:
- return 0 if ok else 2
- brds.read_boards(board_file)
+ Returns:
+ Either:
+ int: Operation completed and buildman should exit with exit code
+ Boards: Boards object to use
+ """
+ brds = boards.Boards()
+ nr_cpus = threads or multiprocessing.cpu_count()
+ if maintainer_check or full_check:
+ warnings = brds.build_board_list(jobs=nr_cpus,
+ warn_targets=full_check)[1]
+ if warnings:
+ for warn in warnings:
+ print(warn, file=sys.stderr)
+ return 2
+ return 0
+
+ if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+ board_file = os.path.join(output_dir, 'boards.cfg')
+ if regen_board_list and regen_board_list != '-':
+ board_file = regen_board_list
+
+ okay = brds.ensure_board_list(board_file, nr_cpus, force=regen_board_list,
+ quiet=not verbose)
+ if regen_board_list:
+ return 0 if okay else 2
+ brds.read_boards(board_file)
+ return brds
+
+
+def determine_boards(brds, args, col, opt_boards, exclude_list):
+ """Determine which boards to build
+
+ Each element of args and exclude can refer to a board name, arch or SoC
+ Args:
+ brds (Boards): Boards object
+ args (list of str): Arguments describing boards to build
+ col (Terminal.Color): Color object
+ opt_boards (list of str): Specific boards to build, or None for all
+ exclude_list (list of str): Arguments describing boards to exclude
+
+ Returns:
+ tuple:
+ list of Board: List of Board objects that are marked selected
+ why_selected: Dictionary where each key is a buildman argument
+ provided by the user, and the value is the list of boards
+ brought in by that argument. For example, 'arm' might bring
+ in 400 boards, so in this case the key would be 'arm' and
+ the value would be a list of board names.
+ board_warnings: List of warnings obtained from board selected
+ """
exclude = []
- if options.exclude:
- for arg in options.exclude:
+ if exclude_list:
+ for arg in exclude_list:
exclude += arg.split(',')
- if options.boards:
+ if opt_boards:
requested_boards = []
- for b in options.boards:
- requested_boards += b.split(',')
+ for brd in opt_boards:
+ requested_boards += brd.split(',')
else:
requested_boards = None
why_selected, board_warnings = brds.select_boards(args, exclude,
requested_boards)
selected = brds.get_selected()
- if not len(selected):
+ if not selected:
sys.exit(col.build(col.RED, 'No matching boards found'))
+ return selected, why_selected, board_warnings
- if options.print_prefix:
- err = ShowToolchainPrefix(brds, toolchains)
- if err:
- sys.exit(col.build(col.RED, err))
- return 0
- # Work out how many commits to build. We want to build everything on the
- # branch. We also build the upstream commit as a control so we can see
- # problems introduced by the first commit on the branch.
- count = options.count
- has_range = options.branch and '..' in options.branch
- if count == -1:
- if not options.branch:
- count = 1
- else:
- if has_range:
- count, msg = gitutil.count_commits_in_range(options.git_dir,
- options.branch)
- else:
- count, msg = gitutil.count_commits_in_branch(options.git_dir,
- options.branch)
- if count is None:
- sys.exit(col.build(col.RED, msg))
- elif count == 0:
- sys.exit(col.build(col.RED, "Range '%s' has no commits" %
- options.branch))
- if msg:
- print(col.build(col.YELLOW, msg))
- count += 1 # Build upstream commit also
+def adjust_args(args, series, selected):
+ """Adjust arguments according to various constraints
- if not count:
- msg = ("No commits found to process in branch '%s': "
- "set branch's upstream or use -c flag" % options.branch)
- sys.exit(col.build(col.RED, msg))
- if options.work_in_output:
- if len(selected) != 1:
- sys.exit(col.build(col.RED,
- '-w can only be used with a single board'))
- if count != 1:
- sys.exit(col.build(col.RED,
- '-w can only be used with a single commit'))
+ Updates verbose, show_errors, threads, jobs and step
- # Read the metadata from the commits. First look at the upstream commit,
- # then the ones in the branch. We would like to do something like
- # upstream/master~..branch but that isn't possible if upstream/master is
- # a merge commit (it will list all the commits that form part of the
- # merge)
- # Conflicting tags are not a problem for buildman, since it does not use
- # them. For example, Series-version is not useful for buildman. On the
- # other hand conflicting tags will cause an error. So allow later tags
- # to overwrite earlier ones by setting allow_overwrite=True
- if options.branch:
- if count == -1:
- if has_range:
- range_expr = options.branch
- else:
- range_expr = gitutil.get_range_in_branch(options.git_dir,
- options.branch)
- upstream_commit = gitutil.get_upstream(options.git_dir,
- options.branch)
- series = patchstream.get_metadata_for_list(upstream_commit,
- options.git_dir, 1, series=None, allow_overwrite=True)
-
- series = patchstream.get_metadata_for_list(range_expr,
- options.git_dir, None, series, allow_overwrite=True)
- else:
- # Honour the count
- series = patchstream.get_metadata_for_list(options.branch,
- options.git_dir, count, series=None, allow_overwrite=True)
- else:
- series = None
- if not options.dry_run:
- options.verbose = True
- if not options.summary:
- options.show_errors = True
+ Args:
+ args (Namespace): Namespace object to adjust
+ series (Series): Series being built / summarised
+ selected (list of Board): List of Board objects that are marked
+ """
+ if not series and not args.dry_run:
+ args.verbose = True
+ if not args.summary:
+ args.show_errors = True
# By default we have one thread per CPU. But if there are not enough jobs
# we can have fewer threads and use a high '-j' value for make.
- if options.threads is None:
- options.threads = min(multiprocessing.cpu_count(), len(selected))
- if not options.jobs:
- options.jobs = max(1, (multiprocessing.cpu_count() +
+ if args.threads is None:
+ args.threads = min(multiprocessing.cpu_count(), len(selected))
+ if not args.jobs:
+ args.jobs = max(1, (multiprocessing.cpu_count() +
len(selected) - 1) // len(selected))
- if not options.step:
- options.step = len(series.commits) - 1
+ if not args.step:
+ args.step = len(series.commits) - 1
- gnu_make = command.output(os.path.join(options.git,
- 'scripts/show-gnu-make'), raise_on_error=False).rstrip()
- if not gnu_make:
- sys.exit('GNU Make not found')
+ # We can't show function sizes without board details at present
+ if args.show_bloat:
+ args.show_detail = True
- allow_missing = get_allow_missing(options.allow_missing,
- options.no_allow_missing, len(selected),
- options.branch)
- # Create a new builder with the selected options.
- output_dir = options.output_dir
- if options.branch:
- dirname = options.branch.replace('/', '_')
+def setup_output_dir(output_dir, work_in_output, branch, no_subdirs, col,
+ clean_dir):
+ """Set up the output directory
+
+ Args:
+ output_dir (str): Output directory provided by the user, or None if none
+ work_in_output (bool): True to work in the output directory
+ branch (str): Name of branch to build, or None if none
+ no_subdirs (bool): True to put the output in the top-level output dir
+ clean_dir: Used for tests only, indicates that the existing output_dir
+ should be removed before starting the build
+
+ Returns:
+ str: Updated output directory pathname
+ """
+ if not output_dir:
+ if work_in_output:
+ sys.exit(col.build(col.RED, '-w requires that you specify -o'))
+ output_dir = '..'
+ if branch and not no_subdirs:
# As a special case allow the board directory to be placed in the
# output directory itself rather than any subdirectory.
- if not options.no_subdirs:
- output_dir = os.path.join(options.output_dir, dirname)
+ dirname = branch.replace('/', '_')
+ output_dir = os.path.join(output_dir, dirname)
if clean_dir and os.path.exists(output_dir):
shutil.rmtree(output_dir)
- adjust_cfg = cfgutil.convert_list_to_dict(options.adjust_cfg)
+ return output_dir
+
+
+def run_builder(builder, commits, board_selected, args):
+ """Run the builder or show the summary
+
+ Args:
+ commits (list of Commit): List of commits being built, None if no branch
+ boards_selected (dict): Dict of selected boards:
+ key: target name
+ value: Board object
+ args (Namespace): Namespace to use
+
+ Returns:
+ int: Return code for buildman
+ """
+ gnu_make = command.output(os.path.join(args.git,
+ 'scripts/show-gnu-make'), raise_on_error=False).rstrip()
+ if not gnu_make:
+ sys.exit('GNU Make not found')
+ builder.gnu_make = gnu_make
+
+ if not args.ide:
+ commit_count = count_build_commits(commits, args.step)
+ tprint(get_action_summary(args.summary, commit_count, board_selected,
+ args.threads, args.jobs))
+
+ builder.set_display_options(
+ args.show_errors, args.show_sizes, args.show_detail, args.show_bloat,
+ args.list_error_boards, args.show_config, args.show_environment,
+ args.filter_dtb_warnings, args.filter_migration_warnings, args.ide)
+ if args.summary:
+ builder.show_summary(commits, board_selected)
+ else:
+ fail, warned, excs = builder.build_boards(
+ commits, board_selected, args.keep_outputs, args.verbose)
+ if excs:
+ return 102
+ if fail:
+ return 100
+ if warned and not args.ignore_warnings:
+ return 101
+ return 0
+
+
+def calc_adjust_cfg(adjust_cfg, reproducible_builds):
+ """Calculate the value to use for adjust_cfg
+
+ Args:
+ adjust_cfg (list of str): List of configuration changes. See cfgutil for
+ details
+ reproducible_builds (bool): True to adjust the configuration to get
+ reproduceable builds
+
+ Returns:
+ adjust_cfg (list of str): List of configuration changes
+ """
+ adjust_cfg = cfgutil.convert_list_to_dict(adjust_cfg)
# Drop LOCALVERSION_AUTO since it changes the version string on every commit
- if options.reproducible_builds:
+ if reproducible_builds:
# If these are mentioned, leave the local version alone
if 'LOCALVERSION' in adjust_cfg or 'LOCALVERSION_AUTO' in adjust_cfg:
print('Not dropping LOCALVERSION_AUTO for reproducible build')
else:
adjust_cfg['LOCALVERSION_AUTO'] = '~'
+ return adjust_cfg
- builder = Builder(toolchains, output_dir, options.git_dir,
- options.threads, options.jobs, gnu_make=gnu_make, checkout=True,
- show_unknown=options.show_unknown, step=options.step,
- no_subdirs=options.no_subdirs, full_path=options.full_path,
- verbose_build=options.verbose_build,
- mrproper=options.mrproper,
- per_board_out_dir=options.per_board_out_dir,
- config_only=options.config_only,
- squash_config_y=not options.preserve_config_y,
- warnings_as_errors=options.warnings_as_errors,
- work_in_output=options.work_in_output,
- test_thread_exceptions=test_thread_exceptions,
- adjust_cfg=adjust_cfg,
- allow_missing=allow_missing, no_lto=options.no_lto,
- reproducible_builds=options.reproducible_builds)
- builder.force_config_on_failure = not options.quick
- if make_func:
- builder.do_make = make_func
- # For a dry run, just show our actions as a sanity check
- if options.dry_run:
- ShowActions(series, why_selected, selected, builder, options,
- board_warnings)
- else:
- builder.force_build = options.force_build
- builder.force_build_failures = options.force_build_failures
- builder.force_reconfig = options.force_reconfig
- builder.in_tree = options.in_tree
+def do_buildman(args, toolchains=None, make_func=None, brds=None,
+ clean_dir=False, test_thread_exceptions=False):
+ """The main control code for buildman
+
+ Args:
+ args: ArgumentParser object
+ args: Command line arguments (list of strings)
+ toolchains: Toolchains to use - this should be a Toolchains()
+ object. If None, then it will be created and scanned
+ make_func: Make function to use for the builder. This is called
+ to execute 'make'. If this is None, the normal function
+ will be used, which calls the 'make' tool with suitable
+ arguments. This setting is useful for tests.
+ brds: Boards() object to use, containing a list of available
+ boards. If this is None it will be created and scanned.
+ clean_dir: Used for tests only, indicates that the existing output_dir
+ should be removed before starting the build
+ test_thread_exceptions: Uses for tests only, True to make the threads
+ raise an exception instead of reporting their result. This simulates
+ a failure in the code somewhere
+ """
+ # Used so testing can obtain the builder: pylint: disable=W0603
+ global TEST_BUILDER
- # Work out which boards to build
- board_selected = brds.get_selected_dict()
+ gitutil.setup()
+ col = terminal.Color()
- if series:
- commits = series.commits
- # Number the commits for test purposes
- for commit in range(len(commits)):
- commits[commit].sequence = commit
- else:
- commits = None
+ git_dir = os.path.join(args.git, '.git')
- if not options.ide:
- tprint(GetActionSummary(options.summary, commits, board_selected,
- options))
+ toolchains = get_toolchains(toolchains, col, args.override_toolchain,
+ args.fetch_arch, args.list_tool_chains,
+ args.verbose)
+ output_dir = setup_output_dir(
+ args.output_dir, args.work_in_output, args.branch,
+ args.no_subdirs, col, clean_dir)
- # We can't show function sizes without board details at present
- if options.show_bloat:
- options.show_detail = True
- builder.SetDisplayOptions(
- options.show_errors, options.show_sizes, options.show_detail,
- options.show_bloat, options.list_error_boards, options.show_config,
- options.show_environment, options.filter_dtb_warnings,
- options.filter_migration_warnings, options.ide)
- if options.summary:
- builder.ShowSummary(commits, board_selected)
- else:
- fail, warned, excs = builder.BuildBoards(
- commits, board_selected, options.keep_outputs, options.verbose)
- if excs:
- return 102
- elif fail:
- return 100
- elif warned and not options.ignore_warnings:
- return 101
- return 0
+ # Work out what subset of the boards we are building
+ if not brds:
+ brds = get_boards_obj(output_dir, args.regen_board_list,
+ args.maintainer_check, args.full_check,
+ args.threads, args.verbose)
+ if isinstance(brds, int):
+ return brds
+
+ selected, why_selected, board_warnings = determine_boards(
+ brds, args.terms, col, args.boards, args.exclude)
+
+ if args.print_prefix:
+ show_toolchain_prefix(brds, toolchains)
+ return 0
+
+ if args.print_arch:
+ show_arch(brds)
+ return 0
+
+ series = determine_series(selected, col, git_dir, args.count,
+ args.branch, args.work_in_output)
+
+ adjust_args(args, series, selected)
+
+ # For a dry run, just show our actions as a sanity check
+ if args.dry_run:
+ show_actions(series, why_selected, selected, output_dir, board_warnings,
+ args.step, args.threads, args.jobs,
+ args.verbose)
+ return 0
+
+ # Create a new builder with the selected args
+ builder = Builder(toolchains, output_dir, git_dir,
+ args.threads, args.jobs, checkout=True,
+ show_unknown=args.show_unknown, step=args.step,
+ no_subdirs=args.no_subdirs, full_path=args.full_path,
+ verbose_build=args.verbose_build,
+ mrproper=args.mrproper,
+ per_board_out_dir=args.per_board_out_dir,
+ config_only=args.config_only,
+ squash_config_y=not args.preserve_config_y,
+ warnings_as_errors=args.warnings_as_errors,
+ work_in_output=args.work_in_output,
+ test_thread_exceptions=test_thread_exceptions,
+ adjust_cfg=calc_adjust_cfg(args.adjust_cfg,
+ args.reproducible_builds),
+ allow_missing=get_allow_missing(args.allow_missing,
+ args.no_allow_missing,
+ len(selected), args.branch),
+ no_lto=args.no_lto,
+ reproducible_builds=args.reproducible_builds,
+ force_build = args.force_build,
+ force_build_failures = args.force_build_failures,
+ force_reconfig = args.force_reconfig, in_tree = args.in_tree,
+ force_config_on_failure=not args.quick, make_func=make_func)
+
+ TEST_BUILDER = builder
+
+ return run_builder(builder, series.commits if series else None,
+ brds.get_selected_dict(), args)
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index ebd78f2..3115700 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -3,9 +3,11 @@
#
import os
+from pathlib import Path
import shutil
import sys
import tempfile
+import time
import unittest
from buildman import board
@@ -38,8 +40,8 @@
'''
BOARDS = [
- ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board0', ''],
- ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 2', 'board1', ''],
+ ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 0', 'board0', ''],
+ ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board1', ''],
['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC board 1', 'board2', ''],
['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', ''],
]
@@ -184,8 +186,8 @@
self._buildman_pathname = sys.argv[0]
self._buildman_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
command.test_result = self._HandleCommand
- bsettings.Setup(None)
- bsettings.AddFile(settings_data)
+ bsettings.setup(None)
+ bsettings.add_file(settings_data)
self.setupToolchains()
self._toolchains.Add('arm-gcc', test=False)
self._toolchains.Add('powerpc-gcc', test=False)
@@ -209,6 +211,12 @@
# Set to True to report missing blobs
self._missing = False
+ self._buildman_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
+ self._test_dir = os.path.join(self._buildman_dir, 'test')
+
+ # Set up some fake source files
+ shutil.copytree(self._test_dir, self._git_dir)
+
# Avoid sending any output and clear all terminal output
terminal.set_print_test_mode()
terminal.get_print_test_lines()
@@ -225,29 +233,34 @@
return command.run_pipe([[self._buildman_pathname] + list(args)],
capture=True, capture_stderr=True)
- def _RunControl(self, *args, brds=None, clean_dir=False,
- test_thread_exceptions=False):
+ def _RunControl(self, *args, brds=False, clean_dir=False,
+ test_thread_exceptions=False, get_builder=True):
"""Run buildman
Args:
args: List of arguments to pass
- brds: Boards object
+ brds: Boards object, or False to pass self._boards, or None to pass
+ None
clean_dir: Used for tests only, indicates that the existing output_dir
should be removed before starting the build
test_thread_exceptions: Uses for tests only, True to make the threads
raise an exception instead of reporting their result. This simulates
a failure in the code somewhere
+ get_builder (bool): Set self._builder to the resulting builder
Returns:
result code from buildman
"""
sys.argv = [sys.argv[0]] + list(args)
- options, args = cmdline.ParseArgs()
- result = control.DoBuildman(options, args, toolchains=self._toolchains,
- make_func=self._HandleMake, brds=brds or self._boards,
- clean_dir=clean_dir,
- test_thread_exceptions=test_thread_exceptions)
- self._builder = control.builder
+ args = cmdline.parse_args()
+ if brds == False:
+ brds = self._boards
+ result = control.do_buildman(
+ args, toolchains=self._toolchains, make_func=self._HandleMake,
+ brds=brds, clean_dir=clean_dir,
+ test_thread_exceptions=test_thread_exceptions)
+ if get_builder:
+ self._builder = control.TEST_BUILDER
return result
def testFullHelp(self):
@@ -496,10 +509,12 @@
for commit in range(self._commits):
for brd in self._boards.get_list():
if brd.arch != 'sandbox':
- errfile = self._builder.GetErrFile(commit, brd.target)
+ errfile = self._builder.get_err_file(commit, brd.target)
fd = open(errfile)
- self.assertEqual(fd.readlines(),
- ['No tool chain for %s\n' % brd.arch])
+ self.assertEqual(
+ fd.readlines(),
+ [f'Tool chain error for {brd.arch}: '
+ f"No tool chain found for arch '{brd.arch}'"])
fd.close()
def testBranch(self):
@@ -573,7 +588,8 @@
def testBranchWithSlash(self):
"""Test building a branch with a '/' in the name"""
self._test_branch = '/__dev/__testbranch'
- self._RunControl('-b', self._test_branch, clean_dir=False)
+ self._RunControl('-b', self._test_branch, '-o', self._output_dir,
+ clean_dir=False)
self.assertEqual(self._builder.count, self._total_builds)
self.assertEqual(self._builder.fail, 0)
@@ -686,7 +702,7 @@
def testBlobSettingsAlways(self):
"""Test the 'always' policy"""
- bsettings.SetItem('global', 'allow-missing', 'always')
+ bsettings.set_item('global', 'allow-missing', 'always')
self.assertEqual(True,
control.get_allow_missing(False, False, 1, False))
self.assertEqual(False,
@@ -694,7 +710,7 @@
def testBlobSettingsBranch(self):
"""Test the 'branch' policy"""
- bsettings.SetItem('global', 'allow-missing', 'branch')
+ bsettings.set_item('global', 'allow-missing', 'branch')
self.assertEqual(False,
control.get_allow_missing(False, False, 1, False))
self.assertEqual(True,
@@ -704,7 +720,7 @@
def testBlobSettingsMultiple(self):
"""Test the 'multiple' policy"""
- bsettings.SetItem('global', 'allow-missing', 'multiple')
+ bsettings.set_item('global', 'allow-missing', 'multiple')
self.assertEqual(False,
control.get_allow_missing(False, False, 1, False))
self.assertEqual(True,
@@ -714,7 +730,7 @@
def testBlobSettingsBranchMultiple(self):
"""Test the 'branch multiple' policy"""
- bsettings.SetItem('global', 'allow-missing', 'branch multiple')
+ bsettings.set_item('global', 'allow-missing', 'branch multiple')
self.assertEqual(False,
control.get_allow_missing(False, False, 1, False))
self.assertEqual(True,
@@ -779,3 +795,278 @@
CONFIG_LOCALVERSION=y
''', cfg_data)
self.assertIn('Not dropping LOCALVERSION_AUTO', stdout.getvalue())
+
+ def test_scan_defconfigs(self):
+ """Test scanning the defconfigs to obtain all the boards"""
+ src = self._git_dir
+
+ # Scan the test directory which contains a Kconfig and some *_defconfig
+ # files
+ params, warnings = self._boards.scan_defconfigs(src, src)
+
+ # We should get two boards
+ self.assertEquals(2, len(params))
+ self.assertFalse(warnings)
+ first = 0 if params[0]['target'] == 'board0' else 1
+ board0 = params[first]
+ board2 = params[1 - first]
+
+ self.assertEquals('arm', board0['arch'])
+ self.assertEquals('armv7', board0['cpu'])
+ self.assertEquals('-', board0['soc'])
+ self.assertEquals('Tester', board0['vendor'])
+ self.assertEquals('ARM Board 0', board0['board'])
+ self.assertEquals('config0', board0['config'])
+ self.assertEquals('board0', board0['target'])
+
+ self.assertEquals('powerpc', board2['arch'])
+ self.assertEquals('ppc', board2['cpu'])
+ self.assertEquals('mpc85xx', board2['soc'])
+ self.assertEquals('Tester', board2['vendor'])
+ self.assertEquals('PowerPC board 1', board2['board'])
+ self.assertEquals('config2', board2['config'])
+ self.assertEquals('board2', board2['target'])
+
+ def test_output_is_new(self):
+ """Test detecting new changes to Kconfig"""
+ base = self._base_dir
+ src = self._git_dir
+ config_dir = os.path.join(src, 'configs')
+ delay = 0.02
+
+ # Create a boards.cfg file
+ boards_cfg = os.path.join(base, 'boards.cfg')
+ content = b'''#
+# List of boards
+# Automatically generated by buildman/boards.py: don't edit
+#
+# Status, Arch, CPU, SoC, Vendor, Board, Target, Config, Maintainers
+
+Active aarch64 armv8 - armltd corstone1000 board0
+Active aarch64 armv8 - armltd total_compute board2
+'''
+ # Check missing file
+ self.assertFalse(boards.output_is_new(boards_cfg, config_dir, src))
+
+ # Check that the board.cfg file is newer
+ time.sleep(delay)
+ tools.write_file(boards_cfg, content)
+ self.assertTrue(boards.output_is_new(boards_cfg, config_dir, src))
+
+ # Touch the Kconfig files after a show delay to avoid a race
+ time.sleep(delay)
+ Path(os.path.join(src, 'Kconfig')).touch()
+ self.assertFalse(boards.output_is_new(boards_cfg, config_dir, src))
+ Path(boards_cfg).touch()
+ self.assertTrue(boards.output_is_new(boards_cfg, config_dir, src))
+
+ # Touch a different Kconfig file
+ time.sleep(delay)
+ Path(os.path.join(src, 'Kconfig.something')).touch()
+ self.assertFalse(boards.output_is_new(boards_cfg, config_dir, src))
+ Path(boards_cfg).touch()
+ self.assertTrue(boards.output_is_new(boards_cfg, config_dir, src))
+
+ # Touch a MAINTAINERS file
+ time.sleep(delay)
+ Path(os.path.join(src, 'MAINTAINERS')).touch()
+ self.assertFalse(boards.output_is_new(boards_cfg, config_dir, src))
+
+ Path(boards_cfg).touch()
+ self.assertTrue(boards.output_is_new(boards_cfg, config_dir, src))
+
+ # Touch a defconfig file
+ time.sleep(delay)
+ Path(os.path.join(config_dir, 'board0_defconfig')).touch()
+ self.assertFalse(boards.output_is_new(boards_cfg, config_dir, src))
+ Path(boards_cfg).touch()
+ self.assertTrue(boards.output_is_new(boards_cfg, config_dir, src))
+
+ # Remove a board and check that the board.cfg file is now older
+ Path(os.path.join(config_dir, 'board0_defconfig')).unlink()
+ self.assertFalse(boards.output_is_new(boards_cfg, config_dir, src))
+
+ def test_maintainers(self):
+ """Test detecting boards without a MAINTAINERS entry"""
+ src = self._git_dir
+ main = os.path.join(src, 'boards', 'board0', 'MAINTAINERS')
+ other = os.path.join(src, 'boards', 'board2', 'MAINTAINERS')
+ kc_file = os.path.join(src, 'Kconfig')
+ config_dir = os.path.join(src, 'configs')
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+
+ # There should be two boards no warnings
+ self.assertEquals(2, len(params_list))
+ self.assertFalse(warnings)
+
+ # Set an invalid status line in the file
+ orig_data = tools.read_file(main, binary=False)
+ lines = ['S: Other\n' if line.startswith('S:') else line
+ for line in orig_data.splitlines(keepends=True)]
+ tools.write_file(main, ''.join(lines), binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ params = params_list[0]
+ if params['target'] == 'board2':
+ params = params_list[1]
+ self.assertEquals('-', params['status'])
+ self.assertEquals(["WARNING: Other: unknown status for 'board0'"],
+ warnings)
+
+ # Remove the status line (S:) from a file
+ lines = [line for line in orig_data.splitlines(keepends=True)
+ if not line.startswith('S:')]
+ tools.write_file(main, ''.join(lines), binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(["WARNING: -: unknown status for 'board0'"], warnings)
+
+ # Remove the configs/ line (F:) from a file - this is the last line
+ data = ''.join(orig_data.splitlines(keepends=True)[:-1])
+ tools.write_file(main, data, binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(
+ ["WARNING: no maintainers for 'board0'",
+ 'WARNING: orphaned defconfig in boards/board0/MAINTAINERS ending at line 4',
+ ], warnings)
+
+ # Mark a board as orphaned - this should give a warning
+ lines = ['S: Orphaned' if line.startswith('S') else line
+ for line in orig_data.splitlines(keepends=True)]
+ tools.write_file(main, ''.join(lines), binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(["WARNING: no maintainers for 'board0'"], warnings)
+
+ # Change the maintainer to '-' - this should give a warning
+ lines = ['M: -' if line.startswith('M') else line
+ for line in orig_data.splitlines(keepends=True)]
+ tools.write_file(main, ''.join(lines), binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(["WARNING: -: unknown status for 'board0'"], warnings)
+
+ # Remove the maintainer line (M:) from a file
+ lines = [line for line in orig_data.splitlines(keepends=True)
+ if not line.startswith('M:')]
+ tools.write_file(main, ''.join(lines), binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(["WARNING: no maintainers for 'board0'"], warnings)
+
+ # Move the contents of the second file into this one, removing the
+ # second file, to check multiple records in a single file.
+ both_data = orig_data + tools.read_file(other, binary=False)
+ tools.write_file(main, both_data, binary=False)
+ os.remove(other)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertFalse(warnings)
+
+ # Add another record, this should be ignored with a warning
+ extra = '\n\nAnother\nM: Fred\nF: configs/board9_defconfig\nS: other\n'
+ tools.write_file(main, both_data + extra, binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(
+ ['WARNING: orphaned defconfig in boards/board0/MAINTAINERS ending at line 16'],
+ warnings)
+
+ # Add another TARGET to the Kconfig
+ tools.write_file(main, both_data, binary=False)
+ orig_kc_data = tools.read_file(kc_file)
+ extra = (b'''
+if TARGET_BOARD2
+config TARGET_OTHER
+\tbool "other"
+\tdefault y
+endif
+''')
+ tools.write_file(kc_file, orig_kc_data + extra)
+ params_list, warnings = self._boards.build_board_list(config_dir, src,
+ warn_targets=True)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(
+ ['WARNING: board2_defconfig: Duplicate TARGET_xxx: board2 and other'],
+ warnings)
+
+ # Remove the TARGET_BOARD0 Kconfig option
+ lines = [b'' if line == b'config TARGET_BOARD2\n' else line
+ for line in orig_kc_data.splitlines(keepends=True)]
+ tools.write_file(kc_file, b''.join(lines))
+ params_list, warnings = self._boards.build_board_list(config_dir, src,
+ warn_targets=True)
+ self.assertEquals(2, len(params_list))
+ self.assertEquals(
+ ['WARNING: board2_defconfig: No TARGET_BOARD2 enabled'],
+ warnings)
+ tools.write_file(kc_file, orig_kc_data)
+
+ # Replace the last F: line of board 2 with an N: line
+ data = ''.join(both_data.splitlines(keepends=True)[:-1])
+ tools.write_file(main, data + 'N: oa.*2\n', binary=False)
+ params_list, warnings = self._boards.build_board_list(config_dir, src)
+ self.assertEquals(2, len(params_list))
+ self.assertFalse(warnings)
+
+ def testRegenBoards(self):
+ """Test that we can regenerate the boards.cfg file"""
+ outfile = os.path.join(self._output_dir, 'test-boards.cfg')
+ if os.path.exists(outfile):
+ os.remove(outfile)
+ with test_util.capture_sys_output() as (stdout, stderr):
+ result = self._RunControl('-R', outfile, brds=None,
+ get_builder=False)
+ self.assertTrue(os.path.exists(outfile))
+
+ def test_print_prefix(self):
+ """Test that we can print the toolchain prefix"""
+ with test_util.capture_sys_output() as (stdout, stderr):
+ result = self._RunControl('-A', 'board0')
+ self.assertEqual('arm-\n', stdout.getvalue())
+ self.assertEqual('', stderr.getvalue())
+
+ def test_exclude_one(self):
+ """Test excluding a single board from an arch"""
+ self._RunControl('arm', '-x', 'board1', '-o', self._output_dir)
+ self.assertEqual(['board0'],
+ [b.target for b in self._boards.get_selected()])
+
+ def test_exclude_arch(self):
+ """Test excluding an arch"""
+ self._RunControl('-x', 'arm', '-o', self._output_dir)
+ self.assertEqual(['board2', 'board4'],
+ [b.target for b in self._boards.get_selected()])
+
+ def test_exclude_comma(self):
+ """Test excluding a comma-separated list of things"""
+ self._RunControl('-x', 'arm,powerpc', '-o', self._output_dir)
+ self.assertEqual(['board4'],
+ [b.target for b in self._boards.get_selected()])
+
+ def test_exclude_list(self):
+ """Test excluding a list of things"""
+ self._RunControl('-x', 'board2', '-x' 'board4', '-o', self._output_dir)
+ self.assertEqual(['board0', 'board1'],
+ [b.target for b in self._boards.get_selected()])
+
+ def test_single_boards(self):
+ """Test building single boards"""
+ self._RunControl('--boards', 'board1', '-o', self._output_dir)
+ self.assertEqual(1, self._builder.count)
+
+ self._RunControl('--boards', 'board1', '--boards', 'board2',
+ '-o', self._output_dir)
+ self.assertEqual(2, self._builder.count)
+
+ self._RunControl('--boards', 'board1,board2', '--boards', 'board4',
+ '-o', self._output_dir)
+ self.assertEqual(3, self._builder.count)
+
+ def test_print_arch(self):
+ """Test that we can print the board architecture"""
+ with test_util.capture_sys_output() as (stdout, stderr):
+ result = self._RunControl('--print-arch', 'board0')
+ self.assertEqual('arm\n', stdout.getvalue())
+ self.assertEqual('', stderr.getvalue())
diff --git a/tools/buildman/main.py b/tools/buildman/main.py
index 5e1f68d..5f42a58 100755
--- a/tools/buildman/main.py
+++ b/tools/buildman/main.py
@@ -6,62 +6,91 @@
"""See README for more information"""
-import doctest
-import multiprocessing
+try:
+ from importlib.resources import files
+except ImportError:
+ # for Python 3.6
+ import importlib_resources
import os
-import re
import sys
# Bring in the patman libraries
+# pylint: disable=C0413
our_path = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(1, os.path.join(our_path, '..'))
# Our modules
-from buildman import board
from buildman import bsettings
-from buildman import builder
from buildman import cmdline
from buildman import control
-from buildman import toolchain
-from patman import patchstream
-from patman import gitutil
-from u_boot_pylib import terminal
from u_boot_pylib import test_util
+from u_boot_pylib import tools
-def RunTests(skip_net_tests, verboose, args):
+def run_tests(skip_net_tests, debug, verbose, args):
+ """Run the buildman tests
+
+ Args:
+ skip_net_tests (bool): True to skip tests which need the network
+ debug (bool): True to run in debugging mode (full traceback)
+ verbosity (int): Verbosity level to use (0-4)
+ args (list of str): List of tests to run, empty to run all
+ """
+ # These imports are here since tests are not available when buildman is
+ # installed as a Python module
+ # pylint: disable=C0415
from buildman import func_test
from buildman import test
- import doctest
- test_name = args and args[0] or None
+ test_name = args.terms and args.terms[0] or None
if skip_net_tests:
test.use_network = False
# Run the entry tests first ,since these need to be the first to import the
# 'entry' module.
result = test_util.run_test_suites(
- 'buildman', False, verboose, False, None, test_name, [],
+ 'buildman', debug, verbose, False, args.threads, test_name, [],
[test.TestBuild, func_test.TestFunctional,
'buildman.toolchain', 'patman.gitutil'])
return (0 if result.wasSuccessful() else 1)
+def run_test_coverage():
+ """Run the tests and check that we get 100% coverage"""
+ test_util.run_test_coverage(
+ 'tools/buildman/buildman', None,
+ ['tools/patman/*.py', 'tools/u_boot_pylib/*', '*test_fdt.py',
+ 'tools/buildman/kconfiglib.py', 'tools/buildman/*test*.py',
+ 'tools/buildman/main.py'],
+ '/tmp/b', single_thread='-T1')
+
+
def run_buildman():
- options, args = cmdline.ParseArgs()
+ """Run bulidman
- if not options.debug:
+ This is the main program. It collects arguments and runs either the tests or
+ the control module.
+ """
+ args = cmdline.parse_args()
+
+ if not args.debug:
sys.tracebacklimit = 0
# Run our meagre tests
- if cmdline.HAS_TESTS and options.test:
- RunTests(options.skip_net_tests, options.verbose, args)
+ if cmdline.HAS_TESTS and args.test:
+ return run_tests(args.skip_net_tests, args.debug, args.verbose, args)
+
+ elif cmdline.HAS_TESTS and args.coverage:
+ run_test_coverage()
+
+ elif args.full_help:
+ tools.print_full_help(str(files('buildman').joinpath('README.rst')))
# Build selected commits for selected boards
else:
- bsettings.Setup(options.config_file)
- ret_code = control.DoBuildman(options, args)
- sys.exit(ret_code)
+ bsettings.setup(args.config_file)
+ ret_code = control.do_buildman(args)
+ return ret_code
if __name__ == "__main__":
- run_buildman()
+ sys.exit(run_buildman())
diff --git a/tools/buildman/requirements.txt b/tools/buildman/requirements.txt
new file mode 100644
index 0000000..a1efcb9
--- /dev/null
+++ b/tools/buildman/requirements.txt
@@ -0,0 +1,2 @@
+jsonschema==4.17.3
+pyyaml==6.0
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index 9fa6445..bdd3d84 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -138,8 +138,8 @@
self.brds.select_boards([])
# Add some test settings
- bsettings.Setup(None)
- bsettings.AddFile(settings_data)
+ bsettings.setup(None)
+ bsettings.add_file(settings_data)
# Set up the toolchains
self.toolchains = toolchain.Toolchains()
@@ -208,8 +208,8 @@
# Build the boards for the pre-defined commits and warnings/errors
# associated with each. This calls our Make() to inject the fake output.
- build.BuildBoards(self.commits, board_selected, keep_outputs=False,
- verbose=False)
+ build.build_boards(self.commits, board_selected, keep_outputs=False,
+ verbose=False)
lines = terminal.get_print_test_lines()
count = 0
for line in lines:
@@ -219,8 +219,8 @@
# We should get two starting messages, an update for every commit built
# and a summary message
self.assertEqual(count, len(commits) * len(BOARDS) + 3)
- build.SetDisplayOptions(**kwdisplay_args);
- build.ShowSummary(self.commits, board_selected)
+ build.set_display_options(**kwdisplay_args);
+ build.show_summary(self.commits, board_selected)
if echo_lines:
terminal.echo_print_test_lines()
return iter(terminal.get_print_test_lines())
@@ -465,7 +465,7 @@
options.show_errors = False
options.keep_outputs = False
args = ['tegra20']
- control.DoBuildman(options, args)
+ control.do_buildman(options, args)
def testBoardSingle(self):
"""Test single board selection"""
@@ -528,17 +528,17 @@
'sandbox']),
({'all': ['board4'], 'sandbox': ['board4']}, []))
def CheckDirs(self, build, dirname):
- self.assertEqual('base%s' % dirname, build._GetOutputDir(1))
+ self.assertEqual('base%s' % dirname, build.get_output_dir(1))
self.assertEqual('base%s/fred' % dirname,
- build.GetBuildDir(1, 'fred'))
+ build.get_build_dir(1, 'fred'))
self.assertEqual('base%s/fred/done' % dirname,
- build.GetDoneFile(1, 'fred'))
+ build.get_done_file(1, 'fred'))
self.assertEqual('base%s/fred/u-boot.sizes' % dirname,
- build.GetFuncSizesFile(1, 'fred', 'u-boot'))
+ build.get_func_sizes_file(1, 'fred', 'u-boot'))
self.assertEqual('base%s/fred/u-boot.objdump' % dirname,
- build.GetObjdumpFile(1, 'fred', 'u-boot'))
+ build.get_objdump_file(1, 'fred', 'u-boot'))
self.assertEqual('base%s/fred/err' % dirname,
- build.GetErrFile(1, 'fred'))
+ build.get_err_file(1, 'fred'))
def testOutputDir(self):
build = builder.Builder(self.toolchains, BASE_DIR, None, 1, 2,
@@ -622,7 +622,7 @@
build = builder.Builder(self.toolchains, base_dir, None, 1, 2)
build.commits = self.commits
build.commit_count = len(commits)
- result = set(build._GetOutputSpaceRemovals())
+ result = set(build._get_output_space_removals())
expected = set([os.path.join(base_dir, f) for f in to_remove])
self.assertEqual(expected, result)
diff --git a/tools/buildman/test/Kconfig b/tools/buildman/test/Kconfig
new file mode 100644
index 0000000..a87660c
--- /dev/null
+++ b/tools/buildman/test/Kconfig
@@ -0,0 +1,72 @@
+# Board properties
+config SYS_ARCH
+ string
+
+config SYS_CPU
+ string
+
+config SYS_SOC
+ string
+
+config SYS_VENDOR
+ string
+
+config SYS_BOARD
+ string
+
+config SYS_CONFIG_NAME
+ string
+
+
+# Available targets
+config TARGET_BOARD0
+ bool "board 9"
+
+config TARGET_BOARD2
+ bool "board 2"
+
+
+# Settings for each board
+if TARGET_BOARD0
+
+config SYS_ARCH
+ default "arm"
+
+config SYS_CPU
+ default "armv7"
+
+#config SYS_SOC
+# string
+
+config SYS_VENDOR
+ default "Tester"
+
+config SYS_BOARD
+ default "ARM Board 0"
+
+config SYS_CONFIG_NAME
+ default "config0"
+
+endif
+
+if TARGET_BOARD2
+
+config SYS_ARCH
+ default "powerpc"
+
+config SYS_CPU
+ default "ppc"
+
+config SYS_SOC
+ default "mpc85xx"
+
+config SYS_VENDOR
+ default "Tester"
+
+config SYS_BOARD
+ default "PowerPC board 1"
+
+config SYS_CONFIG_NAME
+ default "config2"
+
+endif
diff --git a/tools/buildman/test/boards/board0/MAINTAINERS b/tools/buildman/test/boards/board0/MAINTAINERS
new file mode 100644
index 0000000..08207ff
--- /dev/null
+++ b/tools/buildman/test/boards/board0/MAINTAINERS
@@ -0,0 +1,5 @@
+ARM Board 0
+M: Mary Mary <quite@contrary.org>
+S: Maintained
+F: boards/board0
+F: configs/board0_defconfig
diff --git a/tools/buildman/test/boards/board2/MAINTAINERS b/tools/buildman/test/boards/board2/MAINTAINERS
new file mode 100644
index 0000000..c154782
--- /dev/null
+++ b/tools/buildman/test/boards/board2/MAINTAINERS
@@ -0,0 +1,5 @@
+ARM Board 2
+M: Old Mother <hubbard@cupboard.org>
+S: Maintained
+F: boards/board2
+F: configs/board2_defconfig
diff --git a/tools/buildman/test/configs/board0_defconfig b/tools/buildman/test/configs/board0_defconfig
new file mode 100644
index 0000000..50e562e
--- /dev/null
+++ b/tools/buildman/test/configs/board0_defconfig
@@ -0,0 +1 @@
+CONFIG_TARGET_BOARD0=y
diff --git a/tools/buildman/test/configs/board2_defconfig b/tools/buildman/test/configs/board2_defconfig
new file mode 100644
index 0000000..8b76c0a
--- /dev/null
+++ b/tools/buildman/test/configs/board2_defconfig
@@ -0,0 +1 @@
+CONFIG_TARGET_BOARD2=y
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 0ecd845..b050011 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -139,7 +139,7 @@
"""Get toolchain wrapper from the setting file.
"""
value = ''
- for name, value in bsettings.GetItems('toolchain-wrapper'):
+ for name, value in bsettings.get_items('toolchain-wrapper'):
if not value:
print("Warning: Wrapper not found")
if value:
@@ -249,7 +249,7 @@
self.prefixes = {}
self.paths = []
self.override_toolchain = override_toolchain
- self._make_flags = dict(bsettings.GetItems('make-flags'))
+ self._make_flags = dict(bsettings.get_items('make-flags'))
def GetPathList(self, show_warning=True):
"""Get a list of available toolchain paths
@@ -261,7 +261,7 @@
List of strings, each a path to a toolchain mentioned in the
[toolchain] section of the settings file.
"""
- toolchains = bsettings.GetItems('toolchain')
+ toolchains = bsettings.get_items('toolchain')
if show_warning and not toolchains:
print(("Warning: No tool chains. Please run 'buildman "
"--fetch-arch all' to download all available toolchains, or "
@@ -283,7 +283,7 @@
Args:
show_warning: True to show a warning if there are no tool chains.
"""
- self.prefixes = bsettings.GetItems('toolchain-prefix')
+ self.prefixes = bsettings.get_items('toolchain-prefix')
self.paths += self.GetPathList(show_warning)
def Add(self, fname, test=True, verbose=False, priority=PRIORITY_CALC,
@@ -399,7 +399,7 @@
returns:
toolchain object, or None if none found
"""
- for tag, value in bsettings.GetItems('toolchain-alias'):
+ for tag, value in bsettings.get_items('toolchain-alias'):
if arch == tag:
for alias in value.split():
if alias in self.toolchains:
@@ -421,7 +421,7 @@
Returns:
Resolved string
- >>> bsettings.Setup(None)
+ >>> bsettings.setup(None)
>>> tcs = Toolchains()
>>> tcs.Add('fred', False)
>>> var_dict = {'oblique' : 'OBLIQUE', 'first' : 'fi${second}rst', \
@@ -499,7 +499,7 @@
if arch == 'aarch64':
arch = 'arm64'
base = 'https://www.kernel.org/pub/tools/crosstool/files/bin'
- versions = ['12.2.0', '11.1.0']
+ versions = ['13.1.0', '12.2.0']
links = []
for version in versions:
url = '%s/%s/%s/' % (base, arch, version)
@@ -598,5 +598,5 @@
if not self.TestSettingsHasPath(dirpath):
print(("Adding 'download' to config file '%s'" %
bsettings.config_fname))
- bsettings.SetItem('toolchain', 'download', '%s/*/*' % dest)
+ bsettings.set_item('toolchain', 'download', '%s/*/*' % dest)
return 0
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 9804b55..3d2b64a 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -2,7 +2,7 @@
# This Dockerfile is used to build an image containing basic stuff to be used
# to build U-Boot and run our test suites.
-FROM ubuntu:jammy-20230308
+FROM ubuntu:jammy-20230624
MAINTAINER Tom Rini <trini@konsulko.com>
LABEL Description=" This image is for building U-Boot inside a container"
@@ -14,22 +14,22 @@
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main | tee /etc/apt/sources.list.d/llvm.list
-# Manually install the kernel.org "Crosstool" based toolchains for gcc-12.2.0
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-mips-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-microblaze-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-nios2-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-powerpc-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-riscv64-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-riscv32-linux.tar.xz | tar -C /opt -xJ
-RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-sh2-linux.tar.xz | tar -C /opt -xJ
+# Manually install the kernel.org "Crosstool" based toolchains for gcc-13.1.0
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-arc-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-mips-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-microblaze-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-nios2-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-powerpc-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-riscv64-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-riscv32-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-sh2-linux.tar.xz | tar -C /opt -xJ
# Manually install other toolchains
RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2020.07/x86_64-2020.07-xtensa-dc233c-elf.tar.gz | tar -C /opt -xz
-RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install.tar.gz | tar --no-same-owner -C /opt -xz
# Update and install things from apt now
RUN apt-get update && apt-get install -y \
@@ -77,6 +77,7 @@
libsdl1.2-dev \
libsdl2-dev \
libseccomp-dev \
+ libslirp-dev \
libssl-dev \
libtool \
libudev-dev \
@@ -128,15 +129,16 @@
git config --global user.name "GitLab CI Runner" && \
git config --global user.email trini@konsulko.com && \
git cherry-pick 049efdd72eb7baa7b2bf8884391ee7fe650da5a0 && \
+ git cherry-pick 403d6540cd608b2706cfa0cb4713f7e4b490ff45 && \
./bootstrap && \
mkdir -p /opt/grub && \
./configure --target=aarch64 --with-platform=efi \
CC=gcc \
- TARGET_CC=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \
- TARGET_OBJCOPY=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \
- TARGET_STRIP=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \
- TARGET_NM=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \
- TARGET_RANLIB=/opt/gcc-12.2.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \
+ TARGET_CC=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \
+ TARGET_OBJCOPY=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \
+ TARGET_STRIP=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \
+ TARGET_NM=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \
+ TARGET_RANLIB=/opt/gcc-13.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \
make && \
./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \
grub-core cat chain configfile echo efinet ext2 fat halt help linux \
@@ -146,11 +148,11 @@
make clean && \
./configure --target=arm --with-platform=efi \
CC=gcc \
- TARGET_CC=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \
- TARGET_OBJCOPY=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \
- TARGET_STRIP=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \
- TARGET_NM=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \
- TARGET_RANLIB=/opt/gcc-12.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \
+ TARGET_CC=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \
+ TARGET_OBJCOPY=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \
+ TARGET_STRIP=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \
+ TARGET_NM=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \
+ TARGET_RANLIB=/opt/gcc-13.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \
make && \
./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \
grub-core cat chain configfile echo efinet ext2 fat halt help linux \
@@ -160,11 +162,11 @@
make clean && \
./configure --target=riscv64 --with-platform=efi \
CC=gcc \
- TARGET_CC=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc \
- TARGET_OBJCOPY=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \
- TARGET_STRIP=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-strip \
- TARGET_NM=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-nm \
- TARGET_RANLIB=/opt/gcc-12.2.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \
+ TARGET_CC=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc \
+ TARGET_OBJCOPY=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \
+ TARGET_STRIP=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-strip \
+ TARGET_NM=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-nm \
+ TARGET_RANLIB=/opt/gcc-13.1.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \
make && \
./grub-mkimage -O riscv64-efi -o /opt/grub/grubriscv64.efi --prefix= -d \
grub-core cat chain configfile echo efinet ext2 fat halt help linux \
@@ -175,13 +177,10 @@
RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \
cd /tmp/qemu && \
- git submodule update --init dtc && \
- git checkout v6.1.0 && \
+ git checkout v8.0.3 && \
# config user.name and user.email to make 'git am' happy
git config user.name u-boot && \
git config user.email u-boot@denx.de && \
- # manually apply the bug fix for QEMU 6.1.0 Xilinx Zynq UART emulation codes
- wget -O - http://patchwork.ozlabs.org/project/qemu-devel/patch/20210823020813.25192-2-bmeng.cn@gmail.com/mbox/ | git am && \
./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,m68k-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \
make -j$(nproc) all install && \
rm -rf /tmp/qemu
@@ -278,8 +277,7 @@
# Create the buildman config file
RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman
-RUN /bin/echo -e "kernelorg = /opt/gcc-12.2.0-nolibc/*" >> ~/.buildman
-RUN /bin/echo -e "arc = /opt/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
+RUN /bin/echo -e "kernelorg = /opt/gcc-13.1.0-nolibc/*" >> ~/.buildman
RUN /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2020.07/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman;
RUN /bin/echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman
RUN /bin/echo -e "\nsandbox = x86_64" >> ~/.buildman
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index a8e0534..fd0f3e9 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -13,6 +13,7 @@
import libfdt
from libfdt import QUIET_NOTFOUND
from u_boot_pylib import tools
+from u_boot_pylib import tout
# This deals with a device tree, presenting it as an assortment of Node and
# Prop objects, representing nodes and properties, respectively. This file
@@ -264,6 +265,13 @@
fdt_obj.setprop(node.Offset(), self.name, self.bytes)
self.dirty = False
+ def purge(self):
+ """Set a property offset to None
+
+ The property remains in the tree structure and will be recreated when
+ the FDT is synced
+ """
+ self._offset = None
class Node:
"""A device tree node
@@ -534,8 +542,8 @@
"""
return self.AddData(prop_name, struct.pack('>I', val))
- def AddSubnode(self, name):
- """Add a new subnode to the node
+ def Subnode(self, name):
+ """Create new subnode for the node
Args:
name: name of node to add
@@ -544,10 +552,72 @@
New subnode that was created
"""
path = self.path + '/' + name
- subnode = Node(self._fdt, self, None, name, path)
+ return Node(self._fdt, self, None, name, path)
+
+ def AddSubnode(self, name):
+ """Add a new subnode to the node, after all other subnodes
+
+ Args:
+ name: name of node to add
+
+ Returns:
+ New subnode that was created
+ """
+ subnode = self.Subnode(name)
self.subnodes.append(subnode)
return subnode
+ def insert_subnode(self, name):
+ """Add a new subnode to the node, before all other subnodes
+
+ This deletes other subnodes and sets their offset to None, so that they
+ will be recreated after this one.
+
+ Args:
+ name: name of node to add
+
+ Returns:
+ New subnode that was created
+ """
+ # Deleting a node invalidates the offsets of all following nodes, so
+ # process in reverse order so that the offset of each node remains valid
+ # until deletion.
+ for subnode in reversed(self.subnodes):
+ subnode.purge(True)
+ subnode = self.Subnode(name)
+ self.subnodes.insert(0, subnode)
+ return subnode
+
+ def purge(self, delete_it=False):
+ """Purge this node, setting offset to None and deleting from FDT"""
+ if self._offset is not None:
+ if delete_it:
+ CheckErr(self._fdt._fdt_obj.del_node(self.Offset()),
+ "Node '%s': delete" % self.path)
+ self._offset = None
+ self._fdt.Invalidate()
+
+ for prop in self.props.values():
+ prop.purge()
+
+ for subnode in self.subnodes:
+ subnode.purge(False)
+
+ def move_to_first(self):
+ """Move the current node to first in its parent's node list"""
+ parent = self.parent
+ if parent.subnodes and parent.subnodes[0] == self:
+ return
+ for subnode in reversed(parent.subnodes):
+ subnode.purge(True)
+
+ new_subnodes = [self]
+ for subnode in parent.subnodes:
+ #subnode.purge(False)
+ if subnode != self:
+ new_subnodes.append(subnode)
+ parent.subnodes = new_subnodes
+
def Delete(self):
"""Delete a node
@@ -635,6 +705,71 @@
prop.Sync(auto_resize)
return added
+ def merge_props(self, src):
+ """Copy missing properties (except 'phandle') from another node
+
+ Args:
+ src (Node): Node containing properties to copy
+
+ Adds properties which are present in src but not in this node. Any
+ 'phandle' property is not copied since this might result in two nodes
+ with the same phandle, thus making phandle references ambiguous.
+ """
+ for name, src_prop in src.props.items():
+ if name != 'phandle' and name not in self.props:
+ self.props[name] = Prop(self, None, name, src_prop.bytes)
+
+ def copy_node(self, src):
+ """Copy a node and all its subnodes into this node
+
+ Args:
+ src (Node): Node to copy
+
+ Returns:
+ Node: Resulting destination node
+
+ This works recursively.
+
+ The new node is put before all other nodes. If the node already
+ exists, just its subnodes and properties are copied, placing them before
+ any existing subnodes. Properties which exist in the destination node
+ already are not copied.
+ """
+ dst = self.FindNode(src.name)
+ if dst:
+ dst.move_to_first()
+ else:
+ dst = self.insert_subnode(src.name)
+ dst.merge_props(src)
+
+ # Process in reverse order so that they appear correctly in the result,
+ # since copy_node() puts the node first in the list
+ for node in reversed(src.subnodes):
+ dst.copy_node(node)
+ return dst
+
+ def copy_subnodes_from_phandles(self, phandle_list):
+ """Copy subnodes of a list of nodes into another node
+
+ Args:
+ phandle_list (list of int): List of phandles of nodes to copy
+
+ For each node in the phandle list, its subnodes and their properties are
+ copied recursively. Note that it does not copy the node itself, nor its
+ properties.
+ """
+ # Process in reverse order, since new nodes are inserted at the start of
+ # the destination's node list. We want them to appear in order of the
+ # phandle list
+ for phandle in phandle_list.__reversed__():
+ parent = self.GetFdt().LookupPhandle(phandle)
+ tout.debug(f'adding template {parent.path} to node {self.path}')
+ for node in parent.subnodes.__reversed__():
+ dst = self.copy_node(node)
+
+ tout.debug(f'merge props from {parent.path} to {dst.path}')
+ self.merge_props(parent)
+
class Fdt:
"""Provides simple access to a flat device tree blob using libfdts.
diff --git a/tools/dtoc/test/dtoc_test_copy.dts b/tools/dtoc/test/dtoc_test_copy.dts
new file mode 100644
index 0000000..36faa9b
--- /dev/null
+++ b/tools/dtoc/test/dtoc_test_copy.dts
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Test device tree file for dtoc
+ *
+ * Copyright 2017 Google, Inc
+ */
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reference = <&over>; /* nake sure that the 'over' phandle exists */
+ copy-list = <&another &base>;
+
+ dest {
+ bootph-all;
+ compatible = "sandbox,spl-test";
+ stringarray = "one";
+ longbytearray = [09 0a 0b 0c 0d 0e 0f 10];
+ maybe-empty-int = <1>;
+
+ first@0 {
+ a-prop = <456>;
+ b-prop = <1>;
+ };
+
+ existing {
+ };
+
+ base {
+ second {
+ second3 {
+ };
+
+ second2 {
+ new-prop;
+ };
+
+ second1 {
+ new-prop;
+ };
+
+ second4 {
+ };
+ };
+ };
+ };
+
+ base: base {
+ compatible = "sandbox,i2c";
+ bootph-all;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ over: over {
+ compatible = "sandbox,pmic";
+ bootph-all;
+ reg = <9>;
+ low-power;
+ };
+
+ first@0 {
+ reg = <0>;
+ a-prop = <123>;
+ };
+
+ second: second {
+ second1 {
+ some-prop;
+ };
+
+ second2 {
+ some-prop;
+ };
+ };
+ };
+
+ another: another {
+ new-prop = "hello";
+ earlier {
+ wibble = <2>;
+ };
+
+ later {
+ fibble = <3>;
+ };
+ };
+};
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index 4fe8d12..3e54694 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -306,6 +306,119 @@
self.assertIn("Internal error, node '/spl-test' name mismatch 'i2c@0'",
str(exc.exception))
+ def test_copy_node(self):
+ """Test copy_node() function"""
+ def do_copy_checks(dtb, dst, expect_none):
+ self.assertEqual(
+ ['/dest/base', '/dest/first@0', '/dest/existing'],
+ [n.path for n in dst.subnodes])
+
+ chk = dtb.GetNode('/dest/base')
+ self.assertTrue(chk)
+ self.assertEqual(
+ {'compatible', 'bootph-all', '#address-cells', '#size-cells'},
+ chk.props.keys())
+
+ # Check the first property
+ prop = chk.props['bootph-all']
+ self.assertEqual('bootph-all', prop.name)
+ self.assertEqual(True, prop.value)
+ self.assertEqual(chk.path, prop._node.path)
+
+ # Check the second property
+ prop2 = chk.props['compatible']
+ self.assertEqual('compatible', prop2.name)
+ self.assertEqual('sandbox,i2c', prop2.value)
+ self.assertEqual(chk.path, prop2._node.path)
+
+ base = chk.FindNode('base')
+ self.assertTrue(chk)
+
+ first = dtb.GetNode('/dest/base/first@0')
+ self.assertTrue(first)
+ over = dtb.GetNode('/dest/base/over')
+ self.assertTrue(over)
+
+ # Make sure that the phandle for 'over' is not copied
+ self.assertNotIn('phandle', over.props.keys())
+
+ second = dtb.GetNode('/dest/base/second')
+ self.assertTrue(second)
+ self.assertEqual([over.name, first.name, second.name],
+ [n.name for n in chk.subnodes])
+ self.assertEqual(chk, over.parent)
+ self.assertEqual(
+ {'bootph-all', 'compatible', 'reg', 'low-power'},
+ over.props.keys())
+
+ if expect_none:
+ self.assertIsNone(prop._offset)
+ self.assertIsNone(prop2._offset)
+ self.assertIsNone(over._offset)
+ else:
+ self.assertTrue(prop._offset)
+ self.assertTrue(prop2._offset)
+ self.assertTrue(over._offset)
+
+ # Now check ordering of the subnodes
+ self.assertEqual(
+ ['second1', 'second2', 'second3', 'second4'],
+ [n.name for n in second.subnodes])
+
+ dtb = fdt.FdtScan(find_dtb_file('dtoc_test_copy.dts'))
+ tmpl = dtb.GetNode('/base')
+ dst = dtb.GetNode('/dest')
+ dst.copy_node(tmpl)
+
+ do_copy_checks(dtb, dst, expect_none=True)
+
+ dtb.Sync(auto_resize=True)
+
+ # Now check that the FDT looks correct
+ new_dtb = fdt.Fdt.FromData(dtb.GetContents())
+ new_dtb.Scan()
+ dst = new_dtb.GetNode('/dest')
+ do_copy_checks(new_dtb, dst, expect_none=False)
+
+ def test_copy_subnodes_from_phandles(self):
+ """Test copy_node() function"""
+ dtb = fdt.FdtScan(find_dtb_file('dtoc_test_copy.dts'))
+
+ orig = dtb.GetNode('/')
+ node_list = fdt_util.GetPhandleList(orig, 'copy-list')
+
+ dst = dtb.GetNode('/dest')
+ dst.copy_subnodes_from_phandles(node_list)
+
+ pmic = dtb.GetNode('/dest/over')
+ self.assertTrue(pmic)
+
+ subn = dtb.GetNode('/dest/first@0')
+ self.assertTrue(subn)
+ self.assertEqual({'a-prop', 'b-prop', 'reg'}, subn.props.keys())
+
+ self.assertEqual(
+ ['/dest/earlier', '/dest/later', '/dest/over', '/dest/first@0',
+ '/dest/second', '/dest/existing', '/dest/base'],
+ [n.path for n in dst.subnodes])
+
+ # Make sure that the phandle for 'over' is not copied
+ over = dst.FindNode('over')
+ print('keys', over.props.keys())
+ self.assertNotIn('phandle', over.props.keys())
+
+ # Check the merged properties, first the base ones in '/dest'
+ expect = {'bootph-all', 'compatible', 'stringarray', 'longbytearray',
+ 'maybe-empty-int'}
+
+ # Properties from 'base'
+ expect.update({'#address-cells', '#size-cells'})
+
+ # Properties from 'another'
+ expect.add('new-prop')
+
+ self.assertEqual(expect, set(dst.props.keys()))
+
class TestProp(unittest.TestCase):
"""Test operation of the Prop class"""
diff --git a/tools/k3_fit_atf.sh b/tools/k3_fit_atf.sh
deleted file mode 100755
index 7bc07ad..0000000
--- a/tools/k3_fit_atf.sh
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0+
-#
-# script to generate FIT image source for K3 Family boards with
-# ATF, OPTEE, SPL and multiple device trees (given on the command line).
-# Inspired from board/sunxi/mksunxi_fit_atf.sh
-#
-# usage: $0 <atf_load_addr> <dt_name> [<dt_name> [<dt_name] ...]
-
-[ -z "$ATF" ] && ATF="bl31.bin"
-
-if [ ! -f $ATF ]; then
- echo "WARNING ATF file $ATF NOT found, resulting binary is non-functional" >&2
- ATF=/dev/null
-fi
-
-[ -z "$TEE" ] && TEE="bl32.bin"
-
-if [ ! -f $TEE ]; then
- echo "WARNING OPTEE file $TEE NOT found, resulting might be non-functional" >&2
- TEE=/dev/null
-fi
-
-[ -z "$DM" ] && DM="dm.bin"
-
-if [ ! -e $DM ]; then
- echo "WARNING DM file $DM NOT found, resulting might be non-functional" >&2
- DM=/dev/null
-fi
-
-if [ ! -z "$IS_HS" ]; then
- HS_APPEND=_HS
-fi
-
-cat << __HEADER_EOF
-/dts-v1/;
-
-/ {
- description = "Configuration to load ATF and SPL";
- #address-cells = <1>;
-
- images {
- atf {
- description = "ARM Trusted Firmware";
- data = /incbin/("$ATF");
- type = "firmware";
- arch = "arm64";
- compression = "none";
- os = "arm-trusted-firmware";
- load = <$1>;
- entry = <$1>;
- };
- tee {
- description = "OPTEE";
- data = /incbin/("$TEE");
- type = "tee";
- arch = "arm64";
- compression = "none";
- os = "tee";
- load = <0x9e800000>;
- entry = <0x9e800000>;
- };
- dm {
- description = "DM binary";
- data = /incbin/("$DM");
- type = "firmware";
- arch = "arm32";
- compression = "none";
- os = "DM";
- load = <0x89000000>;
- entry = <0x89000000>;
- };
- spl {
- description = "SPL (64-bit)";
- data = /incbin/("spl/u-boot-spl-nodtb.bin$HS_APPEND");
- type = "standalone";
- os = "U-Boot";
- arch = "arm64";
- compression = "none";
- load = <0x80080000>;
- entry = <0x80080000>;
- };
-__HEADER_EOF
-
-# shift through ATF load address in the command line arguments
-shift
-
-for dtname in $*
-do
- cat << __FDT_IMAGE_EOF
- $(basename $dtname) {
- description = "$(basename $dtname .dtb)";
- data = /incbin/("$dtname$HS_APPEND");
- type = "flat_dt";
- arch = "arm";
- compression = "none";
- };
-__FDT_IMAGE_EOF
-done
-
-cat << __CONF_HEADER_EOF
- };
- configurations {
- default = "$(basename $1)";
-
-__CONF_HEADER_EOF
-
-for dtname in $*
-do
- cat << __CONF_SECTION_EOF
- $(basename $dtname) {
- description = "$(basename $dtname .dtb)";
- firmware = "atf";
- loadables = "tee", "dm", "spl";
- fdt = "$(basename $dtname)";
- };
-__CONF_SECTION_EOF
-done
-
-cat << __ITS_EOF
- };
-};
-__ITS_EOF
diff --git a/tools/k3_gen_x509_cert.sh b/tools/k3_gen_x509_cert.sh
deleted file mode 100755
index d9cde07..0000000
--- a/tools/k3_gen_x509_cert.sh
+++ /dev/null
@@ -1,262 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
-#
-# Script to add K3 specific x509 cetificate to a binary.
-#
-
-# Variables
-OUTPUT=tiboot3.bin
-TEMP_X509=x509-temp.cert
-CERT=certificate.bin
-RAND_KEY=eckey.pem
-LOADADDR=0x41c00000
-BOOTCORE_OPTS=0
-BOOTCORE=16
-DEBUG_TYPE=0
-SWRV=1
-
-gen_degen_template() {
-cat << 'EOF' > degen-template.txt
-
-asn1=SEQUENCE:rsa_key
-
-[rsa_key]
-version=INTEGER:0
-modulus=INTEGER:0xDEGEN_MODULUS
-pubExp=INTEGER:1
-privExp=INTEGER:1
-p=INTEGER:0xDEGEN_P
-q=INTEGER:0xDEGEN_Q
-e1=INTEGER:1
-e2=INTEGER:1
-coeff=INTEGER:0xDEGEN_COEFF
-EOF
-}
-
-# Generate x509 Template
-gen_template() {
-cat << 'EOF' > x509-template.txt
- [ req ]
- distinguished_name = req_distinguished_name
- x509_extensions = v3_ca
- prompt = no
- dirstring_type = nobmp
-
- [ req_distinguished_name ]
- C = US
- ST = TX
- L = Dallas
- O = Texas Instruments Incorporated
- OU = Processors
- CN = TI support
- emailAddress = support@ti.com
-
- [ v3_ca ]
- basicConstraints = CA:true
- 1.3.6.1.4.1.294.1.1 = ASN1:SEQUENCE:boot_seq
- 1.3.6.1.4.1.294.1.2 = ASN1:SEQUENCE:image_integrity
- 1.3.6.1.4.1.294.1.3 = ASN1:SEQUENCE:swrv
-# 1.3.6.1.4.1.294.1.4 = ASN1:SEQUENCE:encryption
- 1.3.6.1.4.1.294.1.8 = ASN1:SEQUENCE:debug
-
- [ boot_seq ]
- certType = INTEGER:TEST_CERT_TYPE
- bootCore = INTEGER:TEST_BOOT_CORE
- bootCoreOpts = INTEGER:TEST_BOOT_CORE_OPTS
- destAddr = FORMAT:HEX,OCT:TEST_BOOT_ADDR
- imageSize = INTEGER:TEST_IMAGE_LENGTH
-
- [ image_integrity ]
- shaType = OID:2.16.840.1.101.3.4.2.3
- shaValue = FORMAT:HEX,OCT:TEST_IMAGE_SHA_VAL
-
- [ swrv ]
- swrv = INTEGER:TEST_SWRV
-
-# [ encryption ]
-# initalVector = FORMAT:HEX,OCT:TEST_IMAGE_ENC_IV
-# randomString = FORMAT:HEX,OCT:TEST_IMAGE_ENC_RS
-# iterationCnt = INTEGER:TEST_IMAGE_KEY_DERIVE_INDEX
-# salt = FORMAT:HEX,OCT:TEST_IMAGE_KEY_DERIVE_SALT
-
- [ debug ]
- debugUID = FORMAT:HEX,OCT:0000000000000000000000000000000000000000000000000000000000000000
- debugType = INTEGER:TEST_DEBUG_TYPE
- coreDbgEn = INTEGER:0
- coreDbgSecEn = INTEGER:0
-EOF
-}
-
-parse_key() {
- sed '/ /s/://g' key.txt | \
- awk '!/ / {printf("\n%s\n", $0)}; / / {printf("%s", $0)}' | \
- sed 's/ //g' | \
- awk "/$1:/{getline; print}"
-}
-
-gen_degen_key() {
-# Generate a 4096 bit RSA Key
- openssl genrsa -out key.pem 1024 >>/dev/null 2>&1
- openssl rsa -in key.pem -text -out key.txt >>/dev/null 2>&1
- DEGEN_MODULUS=$( parse_key 'modulus' )
- DEGEN_P=$( parse_key 'prime1' )
- DEGEN_Q=$( parse_key 'prime2' )
- DEGEN_COEFF=$( parse_key 'coefficient' )
- gen_degen_template
-
- sed -e "s/DEGEN_MODULUS/$DEGEN_MODULUS/"\
- -e "s/DEGEN_P/$DEGEN_P/" \
- -e "s/DEGEN_Q/$DEGEN_Q/" \
- -e "s/DEGEN_COEFF/$DEGEN_COEFF/" \
- degen-template.txt > degenerateKey.txt
-
- openssl asn1parse -genconf degenerateKey.txt -out degenerateKey.der >>/dev/null 2>&1
- openssl rsa -in degenerateKey.der -inform DER -outform PEM -out $RAND_KEY >>/dev/null 2>&1
- KEY=$RAND_KEY
- rm key.pem key.txt degen-template.txt degenerateKey.txt degenerateKey.der
-}
-
-declare -A options_help
-usage() {
- if [ -n "$*" ]; then
- echo "ERROR: $*"
- fi
- echo -n "Usage: $0 "
- for option in "${!options_help[@]}"
- do
- arg=`echo ${options_help[$option]}|cut -d ':' -f1`
- if [ -n "$arg" ]; then
- arg=" $arg"
- fi
- echo -n "[-$option$arg] "
- done
- echo
- echo -e "\nWhere:"
- for option in "${!options_help[@]}"
- do
- arg=`echo ${options_help[$option]}|cut -d ':' -f1`
- txt=`echo ${options_help[$option]}|cut -d ':' -f2`
- tb="\t\t\t"
- if [ -n "$arg" ]; then
- arg=" $arg"
- tb="\t"
- fi
- echo -e " -$option$arg:$tb$txt"
- done
- echo
- echo "Examples of usage:-"
- echo "# Example of signing the SYSFW binary with rsa degenerate key"
- echo " $0 -c 0 -b ti-sci-firmware-am6x.bin -o sysfw.bin -l 0x40000"
- echo "# Example of signing the SPL binary with rsa degenerate key"
- echo " $0 -c 16 -b spl/u-boot-spl.bin -o tiboot3.bin -l 0x41c00000"
-}
-
-options_help[b]="bin_file:Bin file that needs to be signed"
-options_help[k]="key_file:file with key inside it. If not provided script generates a rsa degenerate key."
-options_help[o]="output_file:Name of the final output file. default to $OUTPUT"
-options_help[c]="core_id:target core id on which the image would be running. Default to $BOOTCORE"
-options_help[l]="loadaddr: Target load address of the binary in hex. Default to $LOADADDR"
-options_help[d]="debug_type: Debug type, set to 4 to enable early JTAG. Default to $DEBUG_TYPE"
-options_help[r]="SWRV: Software Rev for X509 certificate"
-
-while getopts "b:k:o:c:l:d:h:r:" opt
-do
- case $opt in
- b)
- BIN=$OPTARG
- ;;
- k)
- KEY=$OPTARG
- ;;
- o)
- OUTPUT=$OPTARG
- ;;
- l)
- LOADADDR=$OPTARG
- ;;
- c)
- BOOTCORE=$OPTARG
- ;;
- d)
- DEBUG_TYPE=$OPTARG
- ;;
- r)
- SWRV=$OPTARG
- ;;
- h)
- usage
- exit 0
- ;;
- \?)
- usage "Invalid Option '-$OPTARG'"
- exit 1
- ;;
- :)
- usage "Option '-$OPTARG' Needs an argument."
- exit 1
- ;;
- esac
-done
-
-if [ "$#" -eq 0 ]; then
- usage "Arguments missing"
- exit 1
-fi
-
-if [ -z "$BIN" ]; then
- usage "Bin file missing in arguments"
- exit 1
-fi
-
-# Generate rsa degenerate key if user doesn't provide a key
-if [ -z "$KEY" ]; then
- gen_degen_key
-fi
-
-if [ $BOOTCORE == 0 ]; then # BOOTCORE M3, loaded by ROM
- CERTTYPE=2
-elif [ $BOOTCORE == 16 ]; then # BOOTCORE R5, loaded by ROM
- CERTTYPE=1
-else # Non BOOTCORE, loaded by SYSFW
- BOOTCORE_OPTS_VER=$(printf "%01x" 1)
- # Add input args option for SET and CLR flags.
- BOOTCORE_OPTS_SETFLAG=$(printf "%08x" 0)
- BOOTCORE_OPTS_CLRFLAG=$(printf "%08x" 0x100) # Clear FLAG_ARMV8_AARCH32
- BOOTCORE_OPTS="0x$BOOTCORE_OPTS_VER$BOOTCORE_OPTS_SETFLAG$BOOTCORE_OPTS_CLRFLAG"
- # Set the cert type to zero.
- # We are not using public/private key store now
- CERTTYPE=$(printf "0x%08x" 0)
-fi
-
-SHA_VAL=`openssl dgst -sha512 -hex $BIN | sed -e "s/^.*= //g"`
-BIN_SIZE=`cat $BIN | wc -c`
-ADDR=`printf "%08x" $LOADADDR`
-
-gen_cert() {
- #echo "Certificate being generated :"
- #echo " LOADADDR = 0x$ADDR"
- #echo " IMAGE_SIZE = $BIN_SIZE"
- #echo " CERT_TYPE = $CERTTYPE"
- #echo " DEBUG_TYPE = $DEBUG_TYPE"
- #echo " SWRV = $SWRV"
- sed -e "s/TEST_IMAGE_LENGTH/$BIN_SIZE/" \
- -e "s/TEST_IMAGE_SHA_VAL/$SHA_VAL/" \
- -e "s/TEST_CERT_TYPE/$CERTTYPE/" \
- -e "s/TEST_BOOT_CORE_OPTS/$BOOTCORE_OPTS/" \
- -e "s/TEST_BOOT_CORE/$BOOTCORE/" \
- -e "s/TEST_BOOT_ADDR/$ADDR/" \
- -e "s/TEST_DEBUG_TYPE/$DEBUG_TYPE/" \
- -e "s/TEST_SWRV/$SWRV/" \
- x509-template.txt > $TEMP_X509
- openssl req -new -x509 -key $KEY -nodes -outform DER -out $CERT -config $TEMP_X509 -sha512
-}
-
-gen_template
-gen_cert
-cat $CERT $BIN > $OUTPUT
-
-# Remove all intermediate files
-rm $TEMP_X509 $CERT x509-template.txt
-if [ "$KEY" == "$RAND_KEY" ]; then
- rm $RAND_KEY
-fi
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index c4d72ed..6cbecc3 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -2037,7 +2037,7 @@
if not args.cleanup_headers_only:
check_clean_directory()
- bsettings.Setup('')
+ bsettings.setup('')
toolchains = toolchain.Toolchains()
toolchains.GetSettings()
toolchains.Scan(verbose=False)
diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml
index 3f33caf..037c5d6 100644
--- a/tools/u_boot_pylib/pyproject.toml
+++ b/tools/u_boot_pylib/pyproject.toml
@@ -9,7 +9,7 @@
{ name="Simon Glass", email="sjg@chromium.org" },
]
description = "U-Boot python library"
-readme = "README.md"
+readme = "README.rst"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
@@ -20,3 +20,7 @@
[project.urls]
"Homepage" = "https://u-boot.readthedocs.io"
"Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
+
+[tool.setuptools.packages.find]
+where = [".."]
+include = ["u_boot_pylib*"]
diff --git a/tools/u_boot_pylib/test_util.py b/tools/u_boot_pylib/test_util.py
index e7564e1..f18d385 100644
--- a/tools/u_boot_pylib/test_util.py
+++ b/tools/u_boot_pylib/test_util.py
@@ -24,7 +24,7 @@
def run_test_coverage(prog, filter_fname, exclude_list, build_dir, required=None,
- extra_args=None):
+ extra_args=None, single_thread='-P1'):
"""Run tests and check that we get 100% coverage
Args:
@@ -39,6 +39,9 @@
required: List of modules which must be in the coverage report
extra_args (str): Extra arguments to pass to the tool before the -t/test
arg
+ single_thread (str): Argument string to make the tests run
+ single-threaded. This is necessary to get proper coverage results.
+ The default is '-P0'
Raises:
ValueError if the code coverage is not 100%
@@ -58,8 +61,9 @@
if build_dir:
prefix = 'PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools ' % build_dir
cmd = ('%spython3-coverage run '
- '--omit "%s" %s %s %s -P1' % (prefix, ','.join(glob_list),
- prog, extra_args or '', test_cmd))
+ '--omit "%s" %s %s %s %s' % (prefix, ','.join(glob_list),
+ prog, extra_args or '', test_cmd,
+ single_thread or '-P1'))
os.system(cmd)
stdout = command.output('python3-coverage', 'report')
lines = stdout.splitlines()
diff --git a/tools/zynqmp_psu_init_minimize.sh b/tools/zynqmp_psu_init_minimize.sh
index 16c622f..5c8b737 100755
--- a/tools/zynqmp_psu_init_minimize.sh
+++ b/tools/zynqmp_psu_init_minimize.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0+
-# Copyright (C) 2018 Michal Simek <michal.simek@xilinx.com>
+# Copyright (C) 2018 Michal Simek <michal.simek@amd.com>
# Copyright (C) 2019 Luca Ceresoli <luca@lucaceresoli.net>
# Copyright (C) 2022 Weidmüller Interface GmbH & Co. KG
# Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
diff --git a/tools/zynqmpimage.c b/tools/zynqmpimage.c
index 5113ba8..bb54f41 100644
--- a/tools/zynqmpimage.c
+++ b/tools/zynqmpimage.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Copyright (C) 2016 Michal Simek <michals@xilinx.com>
+ * Copyright (C) 2016 Michal Simek <michal.simek@amd.com>
* Copyright (C) 2015 Nathan Rossi <nathan@nathanrossi.com>
*
* The following Boot Header format/structures and values are defined in the
diff --git a/tools/zynqmpimage.h b/tools/zynqmpimage.h
index 9d526a1..ca74898 100644
--- a/tools/zynqmpimage.h
+++ b/tools/zynqmpimage.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
- * Copyright (C) 2016 Michal Simek <michals@xilinx.com>
+ * Copyright (C) 2016 Michal Simek <michal.simek@amd.com>
* Copyright (C) 2015 Nathan Rossi <nathan@nathanrossi.com>
*
* The following Boot Header format/structures and values are defined in the