Skip to contentSkip to conversation

Add SIMATIC IOT2050 board support

PATCH In review Jan Kiszka 2 participants 15 messages Sep 18, 2021 – Oct 4, 2021

Subsystems (3)
lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

v8 cover Add SIMATIC IOT2050 board support

This is the baseline support for the SIMATIC IOT2050 devices.

Changes in v8:
- rebased
- added support for product generation 2 board
- align device trees with upstream [pending] kernel version
- only warn on missing watchdog firmware binary
- removed bits only needed for incomplete prueth support

Changes in v7:
- rebased
- registered board doc with index

Changes in v6:
- rebased
- converted board README to docs/board/siemens/iot2050.rst

Changes in v5:
- rebased
- use DEFAULT_LINUX_BOOT_ENV from ti_armv7_common.h, rather than home-grown values
- avoids misaligned kernel load address
- no longer exposes issue around LMB reservations

Changes in v4:
- rebased
- make rtd-wdt firmware a "loadable" inside U-Boot proper fit image, avoiding controversial embedding as object
- improved mmc1 removal from boot_targets
- fixed various build issues

Changes in v3:
- rebased
- addressed several checkpatch warnings
- a few #ifdef -> IS_ENABLED conversions
- comment marker for SPDK identifier in .S file
- trailing whitespaces
- factored out rti_wdt_load_fw (less #ifdef)

Changes in v2:
- rebased
- sync with upstream-accepted DT
- add boot switch
- include watchdog support

Allows to boot mainline kernels and the BSP-derived kernel we currently ship as reference.

Note that this baseline support lacks Ethernet drivers. We are working closely with TI to ensure that the to-be-upstreamed icssg-prueth driver will work both with new SR2.0 AM65x silicon as well as with SR1.0 which is used in the currently shipped IOT2050 devices.

A staging tree for complete IOT2050 support can be found at [1]. Full image integration is available via [2].

Jan

[1] https://github.com/siemens/u-boot/commits/jan/iot2050
[2] https://github.com/siemens/meta-iot2050

Jan Kiszka (5):
arm: dts: Add IOT2050 device tree files
board: siemens: Add support for SIMATIC IOT2050 devices
arm64: dts: ti: k3-am65-mcu: Add RTI watchdog entry
watchdog: rti_wdt: Add support for loading firmware
iot2050: Enable watchdog support, but do not auto-start it

 arch/arm/dts/Makefile                         |   9 +-
 arch/arm/dts/k3-am65-iot2050-boot-image.dtsi  | 173 +++++
 arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi  |  46 ++
 arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi  |  51 ++
 .../dts/k3-am65-iot2050-common-u-boot.dtsi    |  99 +++
 arch/arm/dts/k3-am65-iot2050-common.dtsi      | 733 ++++++++++++++++++
 arch/arm/dts/k3-am65-iot2050-spl.dts          |  17 +
 arch/arm/dts/k3-am65-mcu.dtsi                 |   9 +
 .../dts/k3-am6528-iot2050-basic-common.dtsi   |  63 ++
 arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts  |  24 +
 arch/arm/dts/k3-am6528-iot2050-basic.dts      |  24 +
 .../k3-am6548-iot2050-advanced-common.dtsi    |  59 ++
 .../dts/k3-am6548-iot2050-advanced-pg2.dts    |  29 +
 arch/arm/dts/k3-am6548-iot2050-advanced.dts   |  24 +
 arch/arm/mach-k3/Kconfig                      |   1 +
 board/siemens/iot2050/Kconfig                 |  32 +
 board/siemens/iot2050/MAINTAINERS             |   9 +
 board/siemens/iot2050/Makefile                |  10 +
 board/siemens/iot2050/board.c                 | 272 +++++++
 board/siemens/iot2050/config.mk               |   8 +
 configs/iot2050_defconfig                     | 136 ++++
 doc/board/index.rst                           |   1 +
 doc/board/siemens/index.rst                   |   9 +
 doc/board/siemens/iot2050.rst                 |  78 ++
 drivers/watchdog/Kconfig                      |  20 +
 drivers/watchdog/rti_wdt.c                    |  88 +++
 include/configs/iot2050.h                     |  62 ++
 tools/binman/missing-blob-help                |   5 +
 28 files changed, 2090 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-spl.dts
 create mode 100644 arch/arm/dts/k3-am6528-iot2050-basic-common.dtsi
 create mode 100644 arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts
 create mode 100644 arch/arm/dts/k3-am6528-iot2050-basic.dts
 create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-common.dtsi
 create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dts
 create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced.dts
 create mode 100644 board/siemens/iot2050/Kconfig
 create mode 100644 board/siemens/iot2050/MAINTAINERS
 create mode 100644 board/siemens/iot2050/Makefile
 create mode 100644 board/siemens/iot2050/board.c
 create mode 100644 board/siemens/iot2050/config.mk
 create mode 100644 configs/iot2050_defconfig
 create mode 100644 doc/board/siemens/index.rst
 create mode 100644 doc/board/siemens/iot2050.rst
 create mode 100644 include/configs/iot2050.h
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH v8 1/5 arm: dts: Add IOT2050 device tree files

From: Jan Kiszka <[email protected]>

Prepares for the addition of the IOT2050 board which is based on the TI AM65x. The board comes in four variants, Basic and Advanced, each as product generation 1 (SR1.0) and 2 (SR2.x), so there are separate dts files needed. Furthermore, the SPL has its own device tree.

Based on original board support by Le Jin, Gao Nian and Chao Zeng.

---
 arch/arm/dts/Makefile                         |   9 +-
 arch/arm/dts/k3-am65-iot2050-boot-image.dtsi  | 148 ++++
 arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi  |  46 ++
 arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi  |  51 ++
 .../dts/k3-am65-iot2050-common-u-boot.dtsi    |  99 +++
 arch/arm/dts/k3-am65-iot2050-common.dtsi      | 733 ++++++++++++++++++
 arch/arm/dts/k3-am65-iot2050-spl.dts          |  17 +
 .../dts/k3-am6528-iot2050-basic-common.dtsi   |  63 ++
 arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts  |  24 +
 arch/arm/dts/k3-am6528-iot2050-basic.dts      |  24 +
 .../k3-am6548-iot2050-advanced-common.dtsi    |  59 ++
 .../dts/k3-am6548-iot2050-advanced-pg2.dts    |  29 +
 arch/arm/dts/k3-am6548-iot2050-advanced.dts   |  24 +
 13 files changed, 1325 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-common.dtsi
 create mode 100644 arch/arm/dts/k3-am65-iot2050-spl.dts
 create mode 100644 arch/arm/dts/k3-am6528-iot2050-basic-common.dtsi
 create mode 100644 arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts
 create mode 100644 arch/arm/dts/k3-am6528-iot2050-basic.dts
 create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-common.dtsi
 create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dts
 create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced.dts
arch/arm/dts/Makefile +8 -1
index fc16a57e60..da67561726 100644
@@ -1090,7 +1090,14 @@ dtb-$(CONFIG_STM32MP15x) += \
 	stm32mp15xx-dhcom-picoitx.dtb \
 	stm32mp15xx-dhcor-avenger96.dtb
 
-dtb-$(CONFIG_SOC_K3_AM6) += k3-am654-base-board.dtb k3-am654-r5-base-board.dtb
+dtb-$(CONFIG_SOC_K3_AM6) += \
+	k3-am654-base-board.dtb \
+	k3-am654-r5-base-board.dtb \
+	k3-am65-iot2050-spl.dtb \
+	k3-am6528-iot2050-basic.dtb \
+	k3-am6528-iot2050-basic-pg2.dtb \
+	k3-am6548-iot2050-advanced.dtb \
+	k3-am6548-iot2050-advanced-pg2.dtb
 dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \
 			      k3-j721e-r5-common-proc-board.dtb \
 			      k3-j7200-common-proc-board.dtb \
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi new file +148 -0

148 lines not on this page · raw message

arch/arm/dts/k3-am65-iot2050-common-pg1.dtsi new file +46 -0

46 lines not on this page · raw message

arch/arm/dts/k3-am65-iot2050-common-pg2.dtsi new file +51 -0

51 lines not on this page · raw message

arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi new file +99 -0

99 lines not on this page · raw message

arch/arm/dts/k3-am65-iot2050-common.dtsi new file +733 -0

733 lines not on this page · raw message

arch/arm/dts/k3-am65-iot2050-spl.dts new file +17 -0
new file mode 100644
index 0000000000..4e668fa3e0
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Jan Kiszka <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "k3-am65-iot2050-common.dtsi"
+#include "k3-am65-iot2050-common-u-boot.dtsi"
+
+/ {
+	compatible = "siemens,iot2050", "ti,am654";
+	model = "Siemens IOT2050";
+};
arch/arm/dts/k3-am6528-iot2050-basic-common.dtsi new file +63 -0

63 lines not on this page · raw message

arch/arm/dts/k3-am6528-iot2050-basic-pg2.dts new file +24 -0
new file mode 100644
index 0000000000..c62549a4b4
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 2
+ * 1 GB RAM, no eMMC, main_uart0 on connector X30
+ *
+ * Product homepage:
+ * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html
+ */
+
+/dts-v1/;
+
+#include "k3-am6528-iot2050-basic-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-basic-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Basic PG2";
+};
arch/arm/dts/k3-am6528-iot2050-basic.dts new file +24 -0
new file mode 100644
index 0000000000..87928ff282
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 1
+ * 1 GB RAM, no eMMC, main_uart0 on connector X30
+ *
+ * Product homepage:
+ * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html
+ */
+
+/dts-v1/;
+
+#include "k3-am6528-iot2050-basic-common.dtsi"
+#include "k3-am65-iot2050-common-pg1.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-basic", "ti,am654";
+	model = "SIMATIC IOT2050 Basic";
+};
arch/arm/dts/k3-am6548-iot2050-advanced-common.dtsi new file +59 -0

59 lines not on this page · raw message

arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dts new file +29 -0
new file mode 100644
index 0000000000..f00dc86d01
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 2
+ * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
+ *
+ * Product homepage:
+ * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html
+ */
+
+/dts-v1/;
+
+#include "k3-am6548-iot2050-advanced-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-advanced-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Advanced PG2";
+};
+
+&mcu_r5fss0 {
+	/* lock-step mode not supported on this board */
+	ti,cluster-mode = <0>;
+};
arch/arm/dts/k3-am6548-iot2050-advanced.dts new file +24 -0
new file mode 100644
index 0000000000..077f165bdc
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 1
+ * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
+ *
+ * Product homepage:
+ * https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html
+ */
+
+/dts-v1/;
+
+#include "k3-am6548-iot2050-advanced-common.dtsi"
+#include "k3-am65-iot2050-common-pg1.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-advanced", "ti,am654";
+	model = "SIMATIC IOT2050 Advanced";
+};
Signature · 1 line
2.31.1
#2 lore raw

Re: [PATCH v8 1/5] arm: dts: Add IOT2050 device tree files

Quoted 10 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Prepares for the addition of the IOT2050 board which is based on the TI AM65x. The board comes in four variants, Basic and Advanced, each as product generation 1 (SR1.0) and 2 (SR2.x), so there are separate dts files needed. Furthermore, the SPL has its own device tree.

Based on original board support by Le Jin, Gao Nian and Chao Zeng.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom
author
#3 lore raw

PATCH v8 2/5 board: siemens: Add support for SIMATIC IOT2050 devices

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

This adds support for the IOT2050 Basic and Advanced devices. The Basic used the dual-core AM6528 GP processor, the Advanced one the AM6548 HS quad-core version.

Both variants are booted via a Siemens-provided FSBL that runs on the R5 cores. Consequently, U-Boot support is targeting the A53 cores. U-Boot SPL, ATF and TEE have to reside in SPI flash.

Full integration into a bootable image can be found on
https://github.com/siemens/meta-iot2050

Based on original board support by Le Jin, Gao Nian and Chao Zeng.

---
 arch/arm/mach-k3/Kconfig          |   1 +
 board/siemens/iot2050/Kconfig     |  32 ++++
 board/siemens/iot2050/MAINTAINERS |   9 +
 board/siemens/iot2050/Makefile    |  10 ++
 board/siemens/iot2050/board.c     | 272 ++++++++++++++++++++++++++++++
 board/siemens/iot2050/config.mk   |   8 +
 configs/iot2050_defconfig         | 130 ++++++++++++++
 doc/board/index.rst               |   1 +
 doc/board/siemens/index.rst       |   9 +
 doc/board/siemens/iot2050.rst     |  78 +++++++++
 include/configs/iot2050.h         |  62 +++++++
 11 files changed, 612 insertions(+)
 create mode 100644 board/siemens/iot2050/Kconfig
 create mode 100644 board/siemens/iot2050/MAINTAINERS
 create mode 100644 board/siemens/iot2050/Makefile
 create mode 100644 board/siemens/iot2050/board.c
 create mode 100644 board/siemens/iot2050/config.mk
 create mode 100644 configs/iot2050_defconfig
 create mode 100644 doc/board/siemens/index.rst
 create mode 100644 doc/board/siemens/iot2050.rst
 create mode 100644 include/configs/iot2050.h
arch/arm/mach-k3/Kconfig +1 -0
index fa8d134b42..526f5f8b76 100644
@@ -168,4 +168,5 @@ config K3_DM_FW
 source "board/ti/am65x/Kconfig"
 source "board/ti/am64x/Kconfig"
 source "board/ti/j721e/Kconfig"
+source "board/siemens/iot2050/Kconfig"
 endif
board/siemens/iot2050/Kconfig new file +32 -0
new file mode 100644
index 0000000000..8f634c172c
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (c) Siemens AG, 2018-2021
+#
+# Authors:
+#   Le Jin <[email protected]>
+#   Jan Kiszka <[email protected]>
+
+config TARGET_IOT2050_A53
+	bool "IOT2050 running on A53"
+	select ARM64
+	select SOC_K3_AM6
+	select BOARD_LATE_INIT
+	select SYS_DISABLE_DCACHE_OPS
+	select BINMAN
+
+if TARGET_IOT2050_A53
+
+config SYS_BOARD
+	default "iot2050"
+
+config SYS_VENDOR
+	default "siemens"
+
+config SYS_CONFIG_NAME
+	default "iot2050"
+
+config IOT2050_BOOT_SWITCH
+	bool "Disable eMMC boot via USER button (Advanced version only)"
+	default y
+
+endif
board/siemens/iot2050/MAINTAINERS new file +9 -0
new file mode 100644
index 0000000000..1b525356c2
@@ -0,0 +1,9 @@
+IOT2050 BOARD
+M:	Le Jin <[email protected]>
+M:	Jan Kiszka <[email protected]>
+S:	Maintained
+F:	board/siemens/iot2050/
+F:	include/configs/iot2050.h
+F:	configs/iot2050_defconfig
+F:	arch/arm/dts/iot2050-*
+F:	doc/board/siemens/iot2050.rst
board/siemens/iot2050/Makefile new file +10 -0
new file mode 100644
index 0000000000..619594ab8e
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Makefile for Siemens IOT2050 board
+# Copyright (c) Siemens AG, 2018-2021
+#
+# Authors:
+#   Le Jin <[email protected]>
+#
+
+obj-y += board.o
board/siemens/iot2050/board.c new file +272 -0

272 lines not on this page · raw message

board/siemens/iot2050/config.mk new file +8 -0
new file mode 100644
index 0000000000..267ec76c4e
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (c) Siemens AG, 2020-2021
+#
+# Authors:
+#   Jan Kiszka <[email protected]>
+
+flash.bin: all
configs/iot2050_defconfig new file +130 -0

130 lines not on this page · raw message

doc/board/index.rst +1 -0
index 33087074fa..df4bc671c5 100644
@@ -22,6 +22,7 @@ Board-specific doc
    openpiton/index
    qualcomm/index
    rockchip/index
+   siemens/index
    sifive/index
    sipeed/index
    socionext/index
doc/board/siemens/index.rst new file +9 -0
new file mode 100644
index 0000000000..082936ea7e
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Siemens
+=======
+
+.. toctree::
+   :maxdepth: 2
+
+   iot2050
doc/board/siemens/iot2050.rst new file +78 -0

78 lines not on this page · raw message

include/configs/iot2050.h new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
2.31.1
#4 lore raw

Re: [PATCH v8 2/5] board: siemens: Add support for SIMATIC IOT2050 devices

Quoted 10 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

This adds support for the IOT2050 Basic and Advanced devices. The Basic used the dual-core AM6528 GP processor, the Advanced one the AM6548 HS quad-core version.

Both variants are booted via a Siemens-provided FSBL that runs on the R5 cores. Consequently, U-Boot support is targeting the A53 cores. U-Boot SPL, ATF and TEE have to reside in SPI flash.

Quoted 6 lines

Full integration into a bootable image can be found on
https://github.com/siemens/meta-iot2050

Based on original board support by Le Jin, Gao Nian and Chao Zeng.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom
author
#5 lore raw

Re: [PATCH v8 2/5] board: siemens: Add support for SIMATIC IOT2050 devices

Quoted 12 lines · Tom Rini
Quoted 10 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

This adds support for the IOT2050 Basic and Advanced devices. The Basic used the dual-core AM6528 GP processor, the Advanced one the AM6548 HS quad-core version.

Both variants are booted via a Siemens-provided FSBL that runs on the R5 cores. Consequently, U-Boot support is targeting the A53 cores. U-Boot SPL, ATF and TEE have to reside in SPI flash.

Quoted 9 lines
Quoted 6 lines

Full integration into a bootable image can be found on
https://github.com/siemens/meta-iot2050

Based on original board support by Le Jin, Gao Nian and Chao Zeng.

Applied to u-boot/next, thanks!

Thanks for merging - it just does not boot anymore, no output after TF-A. Trying to understand the differences now, already ruled out arch/arm/dts/k3-am65* as source.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
#6 lore raw

Re: [PATCH v8 2/5] board: siemens: Add support for SIMATIC IOT2050 devices

Quoted 18 lines · Jan Kiszka
Quoted 17 lines · Tom Rini
Quoted 15 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

This adds support for the IOT2050 Basic and Advanced devices. The Basic used the dual-core AM6528 GP processor, the Advanced one the AM6548 HS quad-core version.

Both variants are booted via a Siemens-provided FSBL that runs on the R5 cores. Consequently, U-Boot support is targeting the A53 cores. U-Boot SPL, ATF and TEE have to reside in SPI flash.

Full integration into a bootable image can be found on
https://github.com/siemens/meta-iot2050

Based on original board support by Le Jin, Gao Nian and Chao Zeng.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Applied to u-boot/next, thanks!

Thanks for merging - it just does not boot anymore, no output after TF-A. Trying to understand the differences now, already ruled out arch/arm/dts/k3-am65* as source.

Have you enabled debug uart? I found that quite helpful figuring out what was wrong when updating the dts files, and the correct values for that are in the dts files too.

Signature · 1 line
Tom
author
#7 lore raw

Re: [PATCH v8 2/5] board: siemens: Add support for SIMATIC IOT2050 devices

Quoted 24 lines · Tom Rini
Quoted 23 lines · Jan Kiszka
Quoted 21 lines · Tom Rini
Quoted 10 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

This adds support for the IOT2050 Basic and Advanced devices. The Basic used the dual-core AM6528 GP processor, the Advanced one the AM6548 HS quad-core version.

Both variants are booted via a Siemens-provided FSBL that runs on the R5 cores. Consequently, U-Boot support is targeting the A53 cores. U-Boot SPL, ATF and TEE have to reside in SPI flash.

Quoted 6 lines

Full integration into a bootable image can be found on
https://github.com/siemens/meta-iot2050

Based on original board support by Le Jin, Gao Nian and Chao Zeng.

Applied to u-boot/next, thanks!

Quoted 8 lines
Quoted 3 lines

Thanks for merging - it just does not boot anymore, no output after TF-A. Trying to understand the differences now, already ruled out arch/arm/dts/k3-am65* as source.

Have you enabled debug uart? I found that quite helpful figuring out what was wrong when updating the dts files, and the correct values for that are in the dts files too.

We do, and it stays silent so far.

Meanwhile I already updated the defconfig, in line with the changes to the similar am65x_evm* (CONFIG_SPL_SERIAL[_SUPPORT]...), but no break-through yet.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
author
#8 lore raw

PATCH v8 3/5 arm64: dts: ti: k3-am65-mcu: Add RTI watchdog entry

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

Add the DT entry for a watchdog based on RTI1. It requires additional firmware on the MCU R5F cores to handle the expiry, e.g.
https://github.com/siemens/k3-rti-wdt. As this firmware will also lock the power domain to protect it against premature shutdown, mark it shared.

Aligns us to the kernel's DT in this regard.

---
 arch/arm/dts/k3-am65-mcu.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/dts/k3-am65-mcu.dtsi +9 -0
index 7454c8cec0..903796bf7d 100644
@@ -308,4 +308,13 @@
 			ti,loczrama = <1>;
 		};
 	};
+
+	mcu_rti1: rti@40610000 {
+		compatible = "ti,j7-rti-wdt";
+		reg = <0x0 0x40610000 0x0 0x100>;
+		clocks = <&k3_clks 135 0>;
+		power-domains = <&k3_pds 135 TI_SCI_PD_SHARED>;
+		assigned-clocks = <&k3_clks 135 0>;
+		assigned-clock-parents = <&k3_clks 135 4>;
+	};
 };
Signature · 1 line
2.31.1
#9 lore raw

Re: [PATCH v8 3/5] arm64: dts: ti: k3-am65-mcu: Add RTI watchdog entry

Quoted 23 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Add the DT entry for a watchdog based on RTI1. It requires additional firmware on the MCU R5F cores to handle the expiry, e.g.
https://github.com/siemens/k3-rti-wdt. As this firmware will also lock the power domain to protect it against premature shutdown, mark it shared.

Aligns us to the kernel's DT in this regard.

---
 arch/arm/dts/k3-am65-mcu.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/dts/k3-am65-mcu.dtsi +0 -0
index 7454c8cec0..903796bf7d 100644
@@ -308,4 +308,13 @@
 			ti,loczrama = <1>;
 		};
 	};

arch/arm/dts/k3-am65-mcu.dtsi line 320

Quoted 10 lines
arch/arm/dts/k3-am65-mcu.dtsi +9 -0
+
+	mcu_rti1: rti@40610000 {
+		compatible = "ti,j7-rti-wdt";
+		reg = <0x0 0x40610000 0x0 0x100>;
+		clocks = <&k3_clks 135 0>;
+		power-domains = <&k3_pds 135 TI_SCI_PD_SHARED>;
+		assigned-clocks = <&k3_clks 135 0>;
+		assigned-clock-parents = <&k3_clks 135 4>;
+	};
 };

So, in applying
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
to bring us fully to v5.14 for K3 platforms, this patch is no longer needed, and I'm deferring it. The only difference is the node name is "watchdog@40610000" not "rti@40610000" but should not matter (and doesn't look to from a quick read of the rest of the series.

Signature · 1 line
Tom
author
#10 lore raw

Re: [PATCH v8 3/5] arm64: dts: ti: k3-am65-mcu: Add RTI watchdog entry

Quoted 34 lines · Tom Rini
Quoted 32 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Add the DT entry for a watchdog based on RTI1. It requires additional firmware on the MCU R5F cores to handle the expiry, e.g.
https://github.com/siemens/k3-rti-wdt. As this firmware will also lock the power domain to protect it against premature shutdown, mark it shared.

Aligns us to the kernel's DT in this regard.

---
 arch/arm/dts/k3-am65-mcu.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/dts/k3-am65-mcu.dtsi +9 -0
index 7454c8cec0..903796bf7d 100644
@@ -308,4 +308,13 @@
 			ti,loczrama = <1>;
 		};
 	};
+
+	mcu_rti1: rti@40610000 {
+		compatible = "ti,j7-rti-wdt";
+		reg = <0x0 0x40610000 0x0 0x100>;
+		clocks = <&k3_clks 135 0>;
+		power-domains = <&k3_pds 135 TI_SCI_PD_SHARED>;
+		assigned-clocks = <&k3_clks 135 0>;
+		assigned-clock-parents = <&k3_clks 135 4>;
+	};
Quoted 9 lines

arch/arm/dts/k3-am65-mcu.dtsi line 320

Quoted 1 line
arch/arm/dts/k3-am65-mcu.dtsi +0 -0
 };

So, in applying
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
to bring us fully to v5.14 for K3 platforms, this patch is no longer needed, and I'm deferring it. The only difference is the node name is "watchdog@40610000" not "rti@40610000" but should not matter (and doesn't look to from a quick read of the rest of the series.

Ack, this is now obsolete.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
author
#11 lore raw

PATCH v8 4/5 watchdog: rti_wdt: Add support for loading firmware

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

To avoid the need of extra boot scripting on AM65x for loading a watchdog firmware, add the required rproc init and loading logic for the first R5F core to the watchdog start handler. In case the R5F cluster is in lock-step mode, also initialize the second core. The firmware itself is embedded into U-Boot binary to ease access to it and ensure it is properly hashed in case of secure boot.

One possible firmware source is https://github.com/siemens/k3-rti-wdt.

The board is responsible for providing the firmware as additional loadable via the U-Boot fit image. The driver will pick up its location from /fit-images/k3-rti-wdt-firmware then.

---
 drivers/watchdog/Kconfig   | 20 +++++++++
 drivers/watchdog/rti_wdt.c | 88 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)
drivers/watchdog/Kconfig +20 -0
index f0ff2612a6..1a1fddfe9f 100644
@@ -209,6 +209,26 @@ config WDT_K3_RTI
 	  Say Y here if you want to include support for the K3 watchdog
 	  timer (RTI module) available in the K3 generation of processors.
 
+if WDT_K3_RTI
+
+config WDT_K3_RTI_LOAD_FW
+	bool "Load watchdog firmware"
+	depends on REMOTEPROC
+	help
+	  Automatically load the specified firmware image into the MCU R5F
+	  core 0. On the AM65x, this firmware is supposed to handle the expiry
+	  of the watchdog timer, typically by resetting the system.
+
+config WDT_K3_RTI_FW_FILE
+	string "Watchdog firmware image file"
+	default "k3-rti-wdt.fw"
+	depends on WDT_K3_RTI_LOAD_FW
+	help
+	  Firmware image to be embedded into U-Boot and loaded on watchdog
+	  start.
+
+endif
+
 config WDT_SANDBOX
 	bool "Enable Watchdog Timer support for Sandbox"
 	depends on SANDBOX && WDT
drivers/watchdog/rti_wdt.c +88 -0

109 lines not on this page · raw message

Signature · 1 line
2.31.1
#12 lore raw

Re: [PATCH v8 4/5] watchdog: rti_wdt: Add support for loading firmware

Quoted 9 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

To avoid the need of extra boot scripting on AM65x for loading a watchdog firmware, add the required rproc init and loading logic for the first R5F core to the watchdog start handler. In case the R5F cluster is in lock-step mode, also initialize the second core. The firmware itself is embedded into U-Boot binary to ease access to it and ensure it is properly hashed in case of secure boot.

Quoted 7 lines

One possible firmware source is https://github.com/siemens/k3-rti-wdt.

The board is responsible for providing the firmware as additional loadable via the U-Boot fit image. The driver will pick up its location from /fit-images/k3-rti-wdt-firmware then.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom
author
#13 lore raw

PATCH v8 5/5 iot2050: Enable watchdog support, but do not auto-start it

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

This allows to use the watchdog in custom scripts but does not enforce that the OS has to support it as well.

---
 arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 25 ++++++++++++++++++++
 configs/iot2050_defconfig                    |  6 +++++
 tools/binman/missing-blob-help               |  5 ++++
 3 files changed, 36 insertions(+)
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +25 -0
index 1e02cece6c..69479d7b18 100644
@@ -80,6 +80,19 @@
 						filename = "arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dtb";
 					};
 				};
+
+#ifdef CONFIG_WDT_K3_RTI_FW_FILE
+				k3-rti-wdt-firmware {
+					type = "firmware";
+					load = <0x82000000>;
+					arch = "arm";
+					compression = "none";
+					blob-ext {
+						filename = CONFIG_WDT_K3_RTI_FW_FILE;
+						missing-msg = "k3-rti-wdt-firmware";
+					};
+				};
+#endif
 			};
 
 			configurations {
@@ -89,24 +102,36 @@
 					description = "iot2050-basic";
 					firmware = "u-boot";
 					fdt = "fdt-iot2050-basic";
+#ifdef CONFIG_WDT_K3_RTI_FW_FILE
+					loadables = "k3-rti-wdt-firmware";
+#endif
 				};
 
 				conf-iot2050-basic-pg2 {
 					description = "iot2050-basic-pg2";
 					firmware = "u-boot";
 					fdt = "fdt-iot2050-basic-pg2";
+#ifdef CONFIG_WDT_K3_RTI_FW_FILE
+					loadables = "k3-rti-wdt-firmware";
+#endif
 				};
 
 				conf-iot2050-advanced {
 					description = "iot2050-advanced";
 					firmware = "u-boot";
 					fdt = "fdt-iot2050-advanced";
+#ifdef CONFIG_WDT_K3_RTI_FW_FILE
+					loadables = "k3-rti-wdt-firmware";
+#endif
 				};
 
 				conf-iot2050-advanced-pg2 {
 					description = "iot2050-advanced-pg2";
 					firmware = "u-boot";
 					fdt = "fdt-iot2050-advanced-pg2";
+#ifdef CONFIG_WDT_K3_RTI_FW_FILE
+					loadables = "k3-rti-wdt-firmware";
+#endif
 				};
 			};
 		};
configs/iot2050_defconfig +6 -0
index b5c5fd7ac1..72ee5c83f1 100644
@@ -50,6 +50,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_REMOTEPROC=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_WDT=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 # CONFIG_ISO_PARTITION is not set
@@ -127,4 +128,9 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_KEYBOARD=y
+# CONFIG_WATCHDOG is not set
+# CONFIG_WATCHDOG_AUTOSTART is not set
+CONFIG_WDT=y
+CONFIG_WDT_K3_RTI=y
+CONFIG_WDT_K3_RTI_LOAD_FW=y
 CONFIG_OF_LIBFDT_OVERLAY=y
tools/binman/missing-blob-help +5 -0
index f7bc80ea83..dc2d9c9811 100644
@@ -17,3 +17,8 @@ board/sunxi/README.sunxi64
 scp-sunxi:
 SCP firmware is required for system suspend, but is otherwise optional.
 Please read the section on SCP firmware in board/sunxi/README.sunxi64
+
+k3-rti-wdt-firmware:
+If CONFIG_WDT_K3_RTI_LOAD_FW is enabled, a firmware image is needed for
+the R5F core(s) to trigger the system reset. One possible source is
+https://github.com/siemens/k3-rti-wdt.
Signature · 1 line
2.31.1
#14 lore raw

Re: [PATCH v8 5/5] iot2050: Enable watchdog support, but do not auto-start it

Quoted 6 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

This allows to use the watchdog in custom scripts but does not enforce that the OS has to support it as well.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom