summaryrefslogtreecommitdiff
path: root/board/siemens
diff options
context:
space:
mode:
authorSu Baocheng <baocheng.su@siemens.com>2023-02-28 21:19:09 +0300
committerTom Rini <trini@konsulko.com>2023-03-29 18:58:25 +0300
commitea0f45d18708db2b21e2b771556b3ba1d6a65ed4 (patch)
tree92f722a51c543b083a5fe230caab7c09952b0dbd /board/siemens
parent654483d251275d61eb5f93c18e320ad7d6bfcc5d (diff)
downloadu-boot-ea0f45d18708db2b21e2b771556b3ba1d6a65ed4.tar.xz
board: siemens: iot2050: Split the build for PG1 and PG2
Due to different signature keys, the PG1 and the PG2 boards can no longer use the same FSBL (tiboot3). This makes it impossible anyway to maintaine a single flash.bin for both variants, so we can also split the build. A new target is added to indicates the build is for PG1 vs. PG2 boards. Hence now the variants have separated defconfig files. The runtime board_is_sr1() check does make no sense anymore, so remove it and replace with build time check. Documentation is updated accordingly. New binary artifacts are already available via meta-iot2050. Signed-off-by: Su Baocheng <baocheng.su@siemens.com> [Jan: refactor config option into targets, tweak some wordings] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'board/siemens')
-rw-r--r--board/siemens/iot2050/Kconfig28
-rw-r--r--board/siemens/iot2050/board.c12
2 files changed, 26 insertions, 14 deletions
diff --git a/board/siemens/iot2050/Kconfig b/board/siemens/iot2050/Kconfig
index 063142a43b..a2b40881d1 100644
--- a/board/siemens/iot2050/Kconfig
+++ b/board/siemens/iot2050/Kconfig
@@ -1,20 +1,40 @@
# SPDX-License-Identifier: GPL-2.0+
#
-# Copyright (c) Siemens AG, 2018-2021
+# Copyright (c) Siemens AG, 2018-2022
#
# Authors:
# Le Jin <le.jin@siemens.com>
# Jan Kiszka <jan.kiszka@siemens.com>
-config TARGET_IOT2050_A53
- bool "IOT2050 running on A53"
+choice
+ prompt "Siemens SIMATIC IOT2050 boards"
+ optional
+
+config TARGET_IOT2050_A53_PG1
+ bool "IOT2050 PG1 running on A53"
+ select IOT2050_A53_COMMON
+ help
+ This builds U-Boot for the Product Generation 1 (PG1) of the IOT2050
+ devices.
+
+config TARGET_IOT2050_A53_PG2
+ bool "IOT2050 PG2 running on A53"
+ select IOT2050_A53_COMMON
+ help
+ This builds U-Boot for the Product Generation 2 (PG2) of the IOT2050
+ devices.
+
+endchoice
+
+config IOT2050_A53_COMMON
+ bool
select ARM64
select SOC_K3_AM654
select BOARD_LATE_INIT
select SYS_DISABLE_DCACHE_OPS
select BINMAN
-if TARGET_IOT2050_A53
+if IOT2050_A53_COMMON
config SYS_BOARD
default "iot2050"
diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
index 8f4b0eae49..dbf893000a 100644
--- a/board/siemens/iot2050/board.c
+++ b/board/siemens/iot2050/board.c
@@ -55,14 +55,6 @@ static bool board_is_advanced(void)
strstr((char *)info->name, "IOT2050-ADVANCED") != NULL;
}
-static bool board_is_sr1(void)
-{
- struct iot2050_info *info = IOT2050_INFO_DATA;
-
- return info->magic == IOT2050_INFO_MAGIC &&
- !strstr((char *)info->name, "-PG2");
-}
-
static void remove_mmc1_target(void)
{
char *boot_targets = strdup(env_get("boot_targets"));
@@ -109,12 +101,12 @@ void set_board_info_env(void)
}
if (board_is_advanced()) {
- if (board_is_sr1())
+ if (IS_ENABLED(CONFIG_TARGET_IOT2050_A53_PG1))
fdtfile = "ti/k3-am6548-iot2050-advanced.dtb";
else
fdtfile = "ti/k3-am6548-iot2050-advanced-pg2.dtb";
} else {
- if (board_is_sr1())
+ if (IS_ENABLED(CONFIG_TARGET_IOT2050_A53_PG1))
fdtfile = "ti/k3-am6528-iot2050-basic.dtb";
else
fdtfile = "ti/k3-am6528-iot2050-basic-pg2.dtb";