* [PATCH 1/2] arm: dts: Add IOT2050 device tree files
2020-12-04 7:59 [PATCH 0/2] Add SIMATIC IOT2050 board support Jan Kiszka
@ 2020-12-04 7:59 ` Jan Kiszka
2020-12-04 7:59 ` [PATCH 2/2] board: siemens: Add support for SIMATIC IOT2050 devices Jan Kiszka
2020-12-18 4:46 ` [PATCH 0/2] Add SIMATIC IOT2050 board support Lokesh Vutla
2 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2020-12-04 7:59 UTC (permalink / raw)
To: u-boot
From: Jan Kiszka <jan.kiszka@siemens.com>
Prepares for the addition of the IOT2050 board which is based on the TI
AM65x. The board comes in two variants, Basic and Advanced, so there are
separate dts files. Furthermore, the SPL has its own device tree.
Based on original board support by Le Jin, Gao Nian and Chao Zeng.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
arch/arm/dts/Makefile | 7 +-
arch/arm/dts/iot2050-advanced.dts | 62 +++++
arch/arm/dts/iot2050-basic.dts | 61 +++++
arch/arm/dts/iot2050-boot-image.dtsi | 105 +++++++++
arch/arm/dts/iot2050-common.dtsi | 341 +++++++++++++++++++++++++++
arch/arm/dts/iot2050-spl.dts | 16 ++
6 files changed, 591 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/dts/iot2050-advanced.dts
create mode 100644 arch/arm/dts/iot2050-basic.dts
create mode 100644 arch/arm/dts/iot2050-boot-image.dtsi
create mode 100644 arch/arm/dts/iot2050-common.dtsi
create mode 100644 arch/arm/dts/iot2050-spl.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index e2e8a5fb7a..bf2bd8e8a3 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -968,7 +968,12 @@ 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 \
+ iot2050-spl.dtb \
+ iot2050-basic.dtb \
+ iot2050-advanced.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 \
diff --git a/arch/arm/dts/iot2050-advanced.dts b/arch/arm/dts/iot2050-advanced.dts
new file mode 100644
index 0000000000..ed8ef5beac
--- /dev/null
+++ b/arch/arm/dts/iot2050-advanced.dts
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2020
+ *
+ * Authors:
+ * Le Jin <le.jin@siemens.com>
+ * Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "iot2050-common.dtsi"
+#include "iot2050-boot-image.dtsi"
+
+/ {
+ compatible = "siemens,iot2050-advanced", "ti,am654";
+ model = "Siemens IOT2050 Advanced Base Board";
+
+ aliases {
+ mmc0 = &sdhci1;
+ mmc1 = &sdhci0;
+ };
+
+ memory at 80000000 {
+ device_type = "memory";
+ /* 2G RAM */
+ reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
+ <0x00000008 0x80000000 0x00000000 0x00000000>;
+ };
+};
+
+&main_pmx0 {
+ main_mmc0_pins_default: main_mmc0_pins_default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */
+ AM65X_IOPAD(0x01aC, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */
+ AM65X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */
+ AM65X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */
+ AM65X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */
+ AM65X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */
+ AM65X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */
+ AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */
+ AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */
+ AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */
+ AM65X_IOPAD(0x01b4, PIN_INPUT_PULLUP, 0) /* (A23) MMC0_SDCD */
+ AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */
+ >;
+ };
+};
+
+/* eMMC */
+&sdhci0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc0_pins_default>;
+ bus-width = <8>;
+ non-removable;
+ ti,driver-strength-ohm = <50>;
+};
+
+&main_uart0 {
+ status = "disabled";
+};
diff --git a/arch/arm/dts/iot2050-basic.dts b/arch/arm/dts/iot2050-basic.dts
new file mode 100644
index 0000000000..dd27244b95
--- /dev/null
+++ b/arch/arm/dts/iot2050-basic.dts
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2020
+ *
+ * Authors:
+ * Le Jin <le.jin@siemens.com>
+ * Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "iot2050-common.dtsi"
+#include "iot2050-boot-image.dtsi"
+
+/ {
+ compatible = "siemens,iot2050-basic", "ti,am654";
+ model = "Siemens IOT2050 Basic Base Board";
+
+ memory at 80000000 {
+ device_type = "memory";
+ /* 1G RAM */
+ reg = <0x00000000 0x80000000 0x00000000 0x40000000>,
+ <0x00000008 0x80000000 0x00000000 0x00000000>;
+ };
+};
+
+/* eMMC */
+&sdhci0 {
+ status = "disabled";
+};
+
+&main_pmx0 {
+ main_uart0_pins_default: main_uart0_pins_default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x01e4, PIN_INPUT, 0) /* (AF11) UART0_RXD */
+ AM65X_IOPAD(0x01e8, PIN_OUTPUT, 0) /* (AE11) UART0_TXD */
+ AM65X_IOPAD(0x01ec, PIN_INPUT, 0) /* (AG11) UART0_CTSn */
+ AM65X_IOPAD(0x01f0, PIN_OUTPUT, 0) /* (AD11) UART0_RTSn */
+ AM65X_IOPAD(0x0188, PIN_INPUT, 1) /* (D25) UART0_DCDn */
+ AM65X_IOPAD(0x018c, PIN_INPUT, 1) /* (B26) UART0_DSRn */
+ AM65X_IOPAD(0x0190, PIN_OUTPUT, 1) /* (A24) UART0_DTRn */
+ AM65X_IOPAD(0x0194, PIN_INPUT, 1) /* (E24) UART0_RIN */
+ >;
+ };
+};
+
+&wkup_pmx0 {
+ main_uart0_mode_pins_default: main_uart0_mode_pins_default {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x00c4, PIN_OUTPUT, 7) /* (AD3) WKUP_GPIO0_5, serial mode switch0 */
+ AM65X_WKUP_IOPAD(0x00c0, PIN_OUTPUT, 7) /* (AC3) WKUP_GPIO0_4, serial mode switch1 */
+ AM65X_WKUP_IOPAD(0x00cc, PIN_OUTPUT, 7) /* (AC1) WKUP_GPIO0_7, 485 terminal resister */
+ AM65X_WKUP_IOPAD(0x00c8, PIN_OUTPUT, 7) /* (AC2) WKUP_GPIO0_6, 485 en */
+ >;
+ };
+};
+
+&main_uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart0_pins_default &main_uart0_mode_pins_default>;
+};
diff --git a/arch/arm/dts/iot2050-boot-image.dtsi b/arch/arm/dts/iot2050-boot-image.dtsi
new file mode 100644
index 0000000000..75e4ec0b57
--- /dev/null
+++ b/arch/arm/dts/iot2050-boot-image.dtsi
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2020
+ *
+ * Authors:
+ * Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+#include <config.h>
+
+/ {
+ binman {
+ filename = "flash.bin";
+ pad-byte = <0xff>;
+ size = <0x800000>;
+
+ blob-ext at 0x000000 {
+ offset = <0x000000>;
+ filename = "tiboot3.bin";
+ };
+
+ blob at 0x080000 {
+ offset = <0x080000>;
+ filename = "tispl.bin";
+ };
+
+ fit at 0x280000 {
+ description = "U-Boot for IOT2050";
+ offset = <0x280000>;
+ images {
+ u-boot {
+ description = "U-Boot";
+ type = "standalone";
+ arch = "arm64";
+ os = "u-boot";
+ compression = "none";
+ load = <0x80800000>;
+ entry = <0x80800000>;
+ u-boot-nodtb {
+ };
+ };
+
+ fdt-iot2050-basic {
+ description = "iot2050-basic.dtb";
+ type = "flat_dt";
+ arch = "arm64";
+ compression = "none";
+ blob {
+ filename = "arch/arm/dts/iot2050-basic.dtb";
+ };
+ };
+
+ fdt-iot2050-advanced {
+ description = "iot2050-advanced.dtb";
+ type = "flat_dt";
+ arch = "arm64";
+ compression = "none";
+ blob {
+ filename = "arch/arm/dts/iot2050-advanced.dtb";
+ };
+ };
+ };
+
+ configurations {
+ default = "conf-iot2050-basic";
+
+ conf-iot2050-basic {
+ description = "iot2050-basic";
+ firmware = "u-boot";
+ fdt = "fdt-iot2050-basic";
+ };
+
+ conf-iot2050-advanced {
+ description = "iot2050-advanced";
+ firmware = "u-boot";
+ fdt = "fdt-iot2050-advanced";
+ };
+ };
+ };
+
+ /* primary env */
+ fill at 0x680000 {
+ offset = <0x680000>;
+ size = <0x020000>;
+ fill-byte = [00];
+ };
+ /* secondary env */
+ fill at 0x6a0000 {
+ offset = <0x6a0000>;
+ size = <0x020000>;
+ fill-byte = [00];
+ };
+
+ /* Sysfw Basic */
+ blob-ext at 0x6c0000 {
+ offset = <0x6c0000>;
+ filename = "sysfw.itb";
+ };
+ /* Sysfw Advanced */
+ blob-ext at 0x740000 {
+ offset = <0x740000>;
+ filename = "sysfw.itb_HS";
+ };
+ };
+};
diff --git a/arch/arm/dts/iot2050-common.dtsi b/arch/arm/dts/iot2050-common.dtsi
new file mode 100644
index 0000000000..1e204fd1d4
--- /dev/null
+++ b/arch/arm/dts/iot2050-common.dtsi
@@ -0,0 +1,341 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2020
+ *
+ * Authors:
+ * Le Jin <le.jin@siemens.com>
+ * Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+#include "k3-am654.dtsi"
+#include <dt-bindings/pinctrl/k3.h>
+#include <dt-bindings/net/ti-dp83867.h>
+
+/ {
+ chosen {
+ stdout-path = "serial3:115200n8";
+ bootargs = "earlycon=ns16550a,mmio32,0x02800000";
+ };
+
+ aliases {
+ remoteproc0 = &mcu_r5fss0_core0;
+ remoteproc1 = &mcu_r5fss0_core1;
+ serial3 = &main_uart1;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ secure_ddr: secure_ddr at 9e800000 {
+ reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
+ alignment = <0x1000>;
+ no-map;
+ };
+ };
+};
+
+&sdhci0 {
+ /*
+ * Swap clock TISCI clock IDs between sdhci0 and sdhci1 to work
+ * around an issue in System Firmware 2019.12a (and earlier) known
+ * as SYSFW-3179.
+ */
+ clocks =<&k3_clks 48 0>, <&k3_clks 48 1>;
+ assigned-clocks = <&k3_clks 48 1>;
+ assigned-clock-rates = <142860000>;
+};
+
+&cbass_main {
+ u-boot,dm-spl;
+
+ sdhci1: sdhci at 04FA0000 {
+ compatible = "ti,am654-sdhci-5.1";
+ reg = <0x0 0x4FA0000 0x0 0x1000>,
+ <0x0 0x4FB0000 0x0 0x400>;
+ power-domains = <&k3_pds 48 TI_SCI_PD_EXCLUSIVE>;
+ /*
+ * Swap clock TISCI clock IDs between sdhci0 and sdhci1 to work
+ * around an issue in System Firmware 2019.12a (and earlier)
+ * known as SYSFW-3179.
+ */
+ clocks = <&k3_clks 47 0>, <&k3_clks 47 1>;
+ clock-names = "clk_ahb", "clk_xin";
+ max-frequency = <25000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc1_pins_default>;
+ sdhci-caps-mask = <0x7 0x200000>;
+ ti,otap-del-sel-legacy = <0x0>;
+ ti,otap-del-sel-mmc-hs = <0x0>;
+ ti,otap-del-sel-sd-hs = <0x0>;
+ ti,otap-del-sel-sdr12 = <0x0>;
+ ti,otap-del-sel-sdr25 = <0x0>;
+ ti,otap-del-sel-sdr50 = <0x8>;
+ ti,otap-del-sel-sdr104 = <0x7>;
+ ti,otap-del-sel-ddr50 = <0x4>;
+ ti,otap-del-sel-ddr52 = <0x4>;
+ ti,otap-del-sel-hs200 = <0x7>;
+ ti,trm-icp = <0x8>;
+ ti,driver-strength-ohm = <50>;
+ status = "okay";
+ };
+};
+
+&cbass_mcu {
+ u-boot,dm-spl;
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins_default>;
+ u-boot,dm-spl;
+
+ status-led-red {
+ gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>;
+ label = "status-red";
+ u-boot,dm-spl;
+ };
+
+ status-led-green {
+ gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>;
+ label = "status-green";
+ u-boot,dm-spl;
+ };
+ };
+};
+
+&wkup_pmx0 {
+ u-boot,dm-spl;
+
+ mcu_fss0_ospi0_pins_default: mcu_fss0_ospi0_pins_default {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) /* (V1) MCU_OSPI0_CLK */
+ AM65X_WKUP_IOPAD(0x0008, PIN_INPUT, 0) /* (U2) MCU_OSPI0_DQS */
+ AM65X_WKUP_IOPAD(0x000c, PIN_OUTPUT, 0) /* (U4) MCU_OSPI0_D0 */
+ AM65X_WKUP_IOPAD(0x0010, PIN_INPUT, 0) /* (U5) MCU_OSPI0_D1 */
+ AM65X_WKUP_IOPAD(0x002c, PIN_OUTPUT, 0) /* (R4) MCU_OSPI0_CSn0 */
+ >;
+ u-boot,dm-spl;
+ };
+
+ wkup_i2c0_pins_default: wkup-i2c0-pins-default {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x00e0, PIN_INPUT, 0) /* (AC7) WKUP_I2C0_SCL */
+ AM65X_WKUP_IOPAD(0x00e4, PIN_INPUT, 0) /* (AD6) WKUP_I2C0_SDA */
+ >;
+ };
+
+ mcu_i2c0_pins_default: mcu_i2c0_pins_default {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x00e8, PIN_INPUT, 0) /* (AD8) MCU_I2C0_SCL */
+ AM65X_WKUP_IOPAD(0x00ec, PIN_INPUT, 0) /* (AD7) MCU_I2C0_SDA */
+ >;
+ };
+
+ led_pins_default: led_pins_default {
+ pinctrl-single,pins = <
+ AM65X_WKUP_IOPAD(0x0050, PIN_OUTPUT, 7) /* (N2) WKUP_GPIO0_32 STATUS RED LED */
+ AM65X_WKUP_IOPAD(0x0028, PIN_OUTPUT, 7) /* (R3) WKUP_GPIO0_22 USER GREEN LED */
+ AM65X_WKUP_IOPAD(0x0030, PIN_OUTPUT, 7) /* (R5) WKUP_GPIO0_24 STATUS GREEN LED */
+ >;
+ };
+};
+
+&main_pmx0 {
+ u-boot,dm-spl;
+
+ main_uart1_pins_default: main_uart1_pins_default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0174, PIN_INPUT, 6) /* (AE23) UART1_RXD */
+ AM65X_IOPAD(0x014c, PIN_OUTPUT, 6) /* (AD23) UART1_TXD */
+ AM65X_IOPAD(0x0178, PIN_INPUT, 6) /* (AD22) UART1_CTSn */
+ AM65X_IOPAD(0x017c, PIN_OUTPUT, 6) /* (AC21) UART1_RTSn */
+ >;
+ u-boot,dm-spl;
+ };
+
+ usb0_pins_default: usb0_pins_default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x02bc, PIN_OUTPUT, 0) /* (AD9) USB0_DRVVBUS */
+ >;
+ };
+
+ usb1_pins_default: usb1_pins_default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x02c0, PIN_OUTPUT, 0) /* (AC8) USB1_DRVVBUS */
+ >;
+ };
+
+ main_i2c2_pins_default: main-i2c2-pins-default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0074, PIN_INPUT, 5) /* (T27) GPMC0_CSn3.I2C2_SCL */
+ AM65X_IOPAD(0x0070, PIN_INPUT, 5) /* (R25) GPMC0_CSn2.I2C2_SDA */
+ >;
+ };
+
+ main_mmc1_pins_default: main_mmc1_pins_default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x02d4, PIN_INPUT_PULLDOWN, 0) /* (C27) MMC1_CLK */
+ AM65X_IOPAD(0x02d8, PIN_INPUT_PULLUP, 0) /* (C28) MMC1_CMD */
+ AM65X_IOPAD(0x02d0, PIN_INPUT_PULLUP, 0) /* (D28) MMC1_DAT0 */
+ AM65X_IOPAD(0x02cc, PIN_INPUT_PULLUP, 0) /* (E27) MMC1_DAT1 */
+ AM65X_IOPAD(0x02c8, PIN_INPUT_PULLUP, 0) /* (D26) MMC1_DAT2 */
+ AM65X_IOPAD(0x02c4, PIN_INPUT_PULLUP, 0) /* (D27) MMC1_DAT3 */
+ AM65X_IOPAD(0x02dc, PIN_INPUT_PULLUP, 0) /* (B24) MMC1_SDCD */
+ AM65X_IOPAD(0x02e0, PIN_INPUT, 0) /* (C24) MMC1_SDWP */
+ >;
+ };
+};
+
+&main_pmx1 {
+ main_i2c0_pins_default: main-i2c0-pins-default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0000, PIN_INPUT, 0) /* (D20) I2C0_SCL */
+ AM65X_IOPAD(0x0004, PIN_INPUT, 0) /* (C21) I2C0_SDA */
+ >;
+ };
+
+ main_i2c1_pins_default: main-i2c1-pins-default {
+ pinctrl-single,pins = <
+ AM65X_IOPAD(0x0008, PIN_INPUT, 0) /* (B21) I2C1_SCL */
+ AM65X_IOPAD(0x000c, PIN_INPUT, 0) /* (E21) I2C1_SDA */
+ >;
+ };
+};
+
+&dwc3_0 {
+ status = "okay";
+};
+
+&usb0_phy {
+ status = "okay";
+};
+
+&usb0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb0_pins_default>;
+ dr_mode = "host";
+};
+
+&dwc3_1 {
+ status = "okay";
+};
+
+&usb1_phy {
+ status = "okay";
+};
+
+&usb1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb1_pins_default>;
+ dr_mode = "host";
+};
+
+&wkup_i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&wkup_i2c0_pins_default>;
+ clock-frequency = <400000>;
+};
+
+&mcu_i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_i2c0_pins_default>;
+ clock-frequency = <400000>;
+};
+
+&main_i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c0_pins_default>;
+ clock-frequency = <400000>;
+ eeprom: eeprom at 54 {
+ compatible = "atmel,24c08";
+ reg = <0x54>;
+ pagesize = <16>;
+ };
+};
+
+&main_i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c1_pins_default>;
+ clock-frequency = <400000>;
+};
+
+&main_i2c2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c2_pins_default>;
+ clock-frequency = <400000>;
+};
+
+&ospi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
+ u-boot,dm-spl;
+
+ flash at 0 {
+ compatible = "jedec,spi-nor";
+ reg = <0x0>;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <1>;
+ spi-max-frequency = <33333334>;
+ cdns,tshsl-ns = <60>;
+ cdns,tsd2d-ns = <60>;
+ cdns,tchsh-ns = <60>;
+ cdns,tslch-ns = <60>;
+ cdns,read-delay = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ u-boot,dm-spl;
+ };
+};
+
+&cbass_wakeup {
+ u-boot,dm-spl;
+
+ wkup_gpio0: wkup_gpio0 at 42110000 {
+ compatible = "ti,k2g-gpio", "ti,keystone-gpio";
+ reg = <0x42110000 0x100>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ ti,ngpio = <56>;
+ ti,davinci-gpio-unbanked = <0>;
+ clocks = <&k3_clks 59 0>;
+ clock-names = "gpio";
+ u-boot,dm-spl;
+ };
+};
+
+&secure_proxy_main {
+ u-boot,dm-spl;
+};
+
+&dmsc {
+ u-boot,dm-spl;
+ k3_sysreset: sysreset-controller {
+ compatible = "ti,sci-sysreset";
+ u-boot,dm-spl;
+ };
+};
+
+&k3_pds {
+ u-boot,dm-spl;
+};
+
+&k3_clks {
+ u-boot,dm-spl;
+};
+
+&k3_reset {
+ u-boot,dm-spl;
+};
+
+&main_uart1 {
+ u-boot,dm-spl;
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_uart1_pins_default>;
+ status = "okay";
+};
+
+&fss {
+ u-boot,dm-spl;
+};
diff --git a/arch/arm/dts/iot2050-spl.dts b/arch/arm/dts/iot2050-spl.dts
new file mode 100644
index 0000000000..280a7c91e3
--- /dev/null
+++ b/arch/arm/dts/iot2050-spl.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2020
+ *
+ * Authors:
+ * Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "iot2050-common.dtsi"
+
+/ {
+ compatible = "siemens,iot2050", "ti,am654";
+ model = "Siemens IOT2050";
+};
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] board: siemens: Add support for SIMATIC IOT2050 devices
2020-12-04 7:59 [PATCH 0/2] Add SIMATIC IOT2050 board support Jan Kiszka
2020-12-04 7:59 ` [PATCH 1/2] arm: dts: Add IOT2050 device tree files Jan Kiszka
@ 2020-12-04 7:59 ` Jan Kiszka
2020-12-18 4:46 ` [PATCH 0/2] Add SIMATIC IOT2050 board support Lokesh Vutla
2 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2020-12-04 7:59 UTC (permalink / raw)
To: u-boot
From: Jan Kiszka <jan.kiszka@siemens.com>
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.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
arch/arm/mach-k3/Kconfig | 1 +
board/siemens/iot2050/Kconfig | 28 ++++
board/siemens/iot2050/MAINTAINERS | 8 ++
board/siemens/iot2050/Makefile | 10 ++
board/siemens/iot2050/README | 65 +++++++++
board/siemens/iot2050/board.c | 229 ++++++++++++++++++++++++++++++
board/siemens/iot2050/config.mk | 8 ++
configs/iot2050_defconfig | 136 ++++++++++++++++++
include/configs/iot2050.h | 60 ++++++++
9 files changed, 545 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/README
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 include/configs/iot2050.h
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index c7d186149b..b191e88b13 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -143,4 +143,5 @@ config SYS_K3_SPL_ATF
source "board/ti/am65x/Kconfig"
source "board/ti/j721e/Kconfig"
+source "board/siemens/iot2050/Kconfig"
endif
diff --git a/board/siemens/iot2050/Kconfig b/board/siemens/iot2050/Kconfig
new file mode 100644
index 0000000000..28ba746936
--- /dev/null
+++ b/board/siemens/iot2050/Kconfig
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (c) Siemens AG, 2018-2020
+#
+# Authors:
+# Le Jin <le.jin@siemens.com>
+# Jan Kiszka <jan.kiszka@siemens.com>
+
+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"
+
+endif
diff --git a/board/siemens/iot2050/MAINTAINERS b/board/siemens/iot2050/MAINTAINERS
new file mode 100644
index 0000000000..028fd22960
--- /dev/null
+++ b/board/siemens/iot2050/MAINTAINERS
@@ -0,0 +1,8 @@
+IOT2050 BOARD
+M: Le Jin <le.jin@siemens.com>
+M: Jan Kiszka <jan.kiszka@siemens.com>
+S: Maintained
+F: board/siemens/iot2050/
+F: include/configs/iot2050.h
+F: configs/iot2050_defconfig
+F: arch/arm/dts/iot2050-*
diff --git a/board/siemens/iot2050/Makefile b/board/siemens/iot2050/Makefile
new file mode 100644
index 0000000000..5f2cfa40e8
--- /dev/null
+++ b/board/siemens/iot2050/Makefile
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Makefile for Siemens IOT2050 board
+# Copyright (c) Siemens AG, 2018-2020
+#
+# Authors:
+# Le Jin <le.jin@siemens.com>
+#
+
+obj-y += board.o
diff --git a/board/siemens/iot2050/README b/board/siemens/iot2050/README
new file mode 100644
index 0000000000..b63f05b5cf
--- /dev/null
+++ b/board/siemens/iot2050/README
@@ -0,0 +1,65 @@
+SIMATIC IOT2050 BASIC and ADVANCED
+==================================
+
+The SIMATIC IOT2050 is an open industrial IoT gateway that is using the TI
+AM6528 GP (Basic variant) or the AM6548 HS (Advanced variant). The Advanced
+variant is prepared for secure boot.
+
+The IOT2050 starts only from OSPI. It loads a Siemens-provided bootloader
+called SE-Boot for the MCU domain (R5F cores), then hands over to ATF and
+OP-TEE, before booting U-Boot on the A53 cores. This describes how to build all
+open artifacts into a flashable image for the OSPI flash. The flash image will
+work on both variants.
+
+
+Dependencies
+------------
+
+ATF: Upstream release 2.4 or newer
+OP-TEE: Upstream release 3.10.0 or newer
+
+Binary dependencies can be found in
+https://github.com/siemens/meta-iot2050/tree/master/recipes-bsp/u-boot/files/prebuild.
+The following binaries from that source need to be present in the build folder:
+
+ - tiboot3.bin
+ - sysfw.itb
+ - sysfw.itb_HS
+
+
+Building
+--------
+
+Make sure that CROSS_COMPILE is set appropriately:
+
+ export CROSS_COMPILE=aarch64-linux-gnu-
+
+ATF:
+
+ make PLAT=k3 SPD=opteed K3_USART=1
+
+OP-TEE:
+
+ make PLATFORM=k3-am65x CFG_ARM64_core=y \
+ CFG_TEE_CORE_LOG_LEVEL=2 CFG_CONSOLE_UART=1
+
+U-Boot:
+
+ export ATF=/path/to/bl31.bin
+ export TEE=/path/to/tee-pager_v2.bin
+ make iot2050_defconfig
+ make
+
+
+Flashing
+--------
+
+Via U-Boot:
+
+ sf probe
+ load mmc 0:1 $loadaddr /path/to/flash.bin
+ sf update $loadaddr 0x0 $filesize
+
+Via external programmer Dediprog SF100 or SF600:
+
+ dpcmd --vcc 2 -v -u flash.bin
diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
new file mode 100644
index 0000000000..33c9ff69de
--- /dev/null
+++ b/board/siemens/iot2050/board.c
@@ -0,0 +1,229 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Board specific initialization for IOT2050
+ * Copyright (c) Siemens AG, 2018-2020
+ *
+ * Authors:
+ * Le Jin <le.jin@siemens.com>
+ * Jan Kiszka <jan.kiszka@siemens.com>
+ */
+
+#include <common.h>
+#include <bootstage.h>
+#include <dm.h>
+#include <i2c.h>
+#include <led.h>
+#include <net.h>
+#include <phy.h>
+#include <spl.h>
+#include <version.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/arch/hardware.h>
+#include <asm/gpio.h>
+#include <asm/io.h>
+
+#define IOT2050_INFO_MAGIC 0x20502050
+
+struct iot2050_info {
+ u32 magic;
+ u16 size;
+ char name[20 + 1];
+ char serial[16 + 1];
+ char mlfb[18 + 1];
+ char uuid[32 + 1];
+ char a5e[18 + 1];
+ u8 mac_addr_cnt;
+ u8 mac_addr[8][ARP_HLEN];
+ char seboot_version[40 + 1];
+} __packed;
+
+/*
+ * Scratch SRAM (available before DDR RAM) contains extracted EEPROM data.
+ */
+#define IOT2050_INFO_DATA ((struct iot2050_info *) \
+ TI_SRAM_SCRATCH_BOARD_EEPROM_START)
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static bool board_is_advanced(void)
+{
+ struct iot2050_info *info = IOT2050_INFO_DATA;
+
+ return info->magic == IOT2050_INFO_MAGIC &&
+ !strcmp((char *)info->name, "IOT2050-ADVANCED");
+}
+
+void set_board_info_env(void)
+{
+ struct iot2050_info *info = IOT2050_INFO_DATA;
+ u8 __maybe_unused mac_cnt;
+
+ if (info->magic != IOT2050_INFO_MAGIC) {
+ pr_err("IOT2050: Board info parsing error!\n");
+ return;
+ }
+
+ if (env_get("board_uuid"))
+ return;
+
+ env_set("board_name", info->name);
+ env_set("board_serial", info->serial);
+ env_set("mlfb", info->mlfb);
+ env_set("board_uuid", info->uuid);
+ env_set("board_a5e", info->a5e);
+ env_set("fw_version", PLAIN_VERSION);
+ env_set("seboot_version", info->seboot_version);
+
+#ifdef CONFIG_NET
+ /* MAC address */
+ for (mac_cnt = 0; mac_cnt < info->mac_addr_cnt; mac_cnt++) {
+ if (is_valid_ethaddr(info->mac_addr[mac_cnt]))
+ eth_env_set_enetaddr_by_index("eth", mac_cnt + 1,
+ info->mac_addr[mac_cnt]);
+ }
+
+ /*
+ * Set the MAC address environment variable that ICSSG0-PRU eth0 will
+ * use in u-boot
+ */
+ env_set("ethaddr", env_get("eth1addr"));
+#endif
+
+ if (board_is_advanced()) {
+ env_set("fdtfile", "siemens/iot2050-advanced.dtb");
+ } else {
+ env_set("fdtfile", "siemens/iot2050-basic.dtb");
+ /* remove the unavailable eMMC (mmc1) from the list */
+ env_set("boot_targets", "mmc0 usb0 usb1 usb2");
+ }
+
+ env_save();
+}
+
+int board_init(void)
+{
+ return 0;
+}
+
+int dram_init(void)
+{
+ if (board_is_advanced())
+ gd->ram_size = SZ_2G;
+ else
+ gd->ram_size = SZ_1G;
+
+ return 0;
+}
+
+int dram_init_banksize(void)
+{
+ dram_init();
+
+ /* Bank 0 declares the memory available in the DDR low region */
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = gd->ram_size;
+
+ /* Bank 1 declares the memory available in the DDR high region */
+ gd->bd->bi_dram[1].start = 0;
+ gd->bd->bi_dram[1].size = 0;
+
+ return 0;
+}
+
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+ struct iot2050_info *info = IOT2050_INFO_DATA;
+ char upper_name[32];
+
+ if (info->magic != IOT2050_INFO_MAGIC ||
+ strlen(name) >= sizeof(upper_name))
+ return -1;
+
+ str_to_upper(name, upper_name, sizeof(upper_name));
+ if (!strcmp(upper_name, (char *)info->name))
+ return 0;
+
+ return -1;
+}
+#endif
+
+int do_board_detect(void)
+{
+ return 0;
+}
+
+#define SERDES0_LANE_SELECT 0x00104080
+
+int board_late_init(void)
+{
+ /* change CTRL_MMR register to let serdes0 not output USB3.0 signals. */
+ writel(0x3, SERDES0_LANE_SELECT);
+
+ set_board_info_env();
+
+ return 0;
+}
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+ int ret;
+
+ ret = fdt_fixup_msmc_ram(blob, "/bus at 100000", "sram at 70000000");
+ if (ret < 0)
+ ret = fdt_fixup_msmc_ram(blob, "/interconnect at 100000",
+ "sram at 70000000");
+ if (ret)
+ printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
+
+ return ret;
+}
+#endif
+
+void spl_board_init(void)
+{
+}
+
+/* RJ45 LED configuration */
+#define DP83867_DEVADDR 0x1f
+
+#define DP83867_LEDCR_1 0x0018
+
+#define DP83867_LED_1000_BT_LINK 0x5
+#define DP83867_LED_100_BTX_LINK 0x6
+#define DP83867_LED_LINK_BLINK_ACTIVE 0xb
+#define DP83867_LED_SET(n, v) ((v) << ((n) * 4))
+
+#define DP83867_LED_SETTINGS \
+ (DP83867_LED_SET(0, DP83867_LED_LINK_BLINK_ACTIVE) | \
+ DP83867_LED_SET(1, DP83867_LED_1000_BT_LINK) | \
+ DP83867_LED_SET(2, DP83867_LED_100_BTX_LINK) | \
+ DP83867_LED_SET(3, DP83867_LED_100_BTX_LINK))
+
+int board_phy_config(struct phy_device *phydev)
+{
+ return phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_LEDCR_1,
+ DP83867_LED_SETTINGS);
+}
+
+/*
+ * Indicate any error or (accidental?) entering of CLI via the red status LED.
+ */
+#if CONFIG_IS_ENABLED(LED)
+void show_boot_progress(int progress)
+{
+ struct udevice *dev;
+ int ret;
+
+ if (progress < 0 || progress == BOOTSTAGE_ID_ENTER_CLI_LOOP) {
+ ret = led_get_by_label("status-green", &dev);
+ if (ret == 0)
+ led_set_state(dev, LEDST_OFF);
+
+ ret = led_get_by_label("status-red", &dev);
+ if (ret == 0)
+ led_set_state(dev, LEDST_ON);
+ }
+}
+#endif
diff --git a/board/siemens/iot2050/config.mk b/board/siemens/iot2050/config.mk
new file mode 100644
index 0000000000..951f72ba16
--- /dev/null
+++ b/board/siemens/iot2050/config.mk
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (c) Siemens AG, 2020
+#
+# Authors:
+# Jan Kiszka <jan.kiszka@siemens.com>
+
+flash.bin: all
diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig
new file mode 100644
index 0000000000..6c5e5e80de
--- /dev/null
+++ b/configs/iot2050_defconfig
@@ -0,0 +1,136 @@
+CONFIG_ARM=y
+CONFIG_ARCH_K3=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x8000
+CONFIG_SOC_K3_AM6=y
+CONFIG_TARGET_IOT2050_A53=y
+CONFIG_ENV_SIZE=0x20000
+CONFIG_ENV_OFFSET=0x680000
+CONFIG_ENV_SECT_SIZE=0x20000
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000
+CONFIG_DM_GPIO=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
+CONFIG_NR_DRAM_BANKS=2
+CONFIG_ENV_OFFSET_REDUND=0x6a0000
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL_DM_SPI=y
+CONFIG_SPL_TEXT_BASE=0x80080000
+CONFIG_DISTRO_DEFAULTS=y
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_LOAD_FIT=y
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_CONSOLE_MUX=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400
+CONFIG_SPL_DM_MAILBOX=y
+CONFIG_SPL_DM_SPI_FLASH=y
+CONFIG_SPL_DM_RESET=y
+CONFIG_SPL_POWER_DOMAIN=y
+# CONFIG_SPL_SPI_FLASH_TINY is not set
+CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SYS_PROMPT="IOT2050> "
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_DFU=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_NET is not set
+CONFIG_CMD_PCI=y
+CONFIG_CMD_REMOTEPROC=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_TIME=y
+# CONFIG_ISO_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="iot2050-basic"
+CONFIG_OF_LIST="iot2050-basic iot2050-advanced"
+CONFIG_SPL_MULTI_DTB_FIT=y
+CONFIG_SPL_OF_LIST="iot2050-spl"
+CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+# CONFIG_NET is not set
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_CLK_TI_SCI=y
+CONFIG_DFU_MMC=y
+CONFIG_DFU_RAM=y
+CONFIG_DFU_SF=y
+CONFIG_DMA_CHANNELS=y
+CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_TI_SCI_PROTOCOL=y
+CONFIG_DA8XX_GPIO=y
+CONFIG_DM_PCA953X=y
+CONFIG_DM_I2C=y
+CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
+CONFIG_SYS_I2C_OMAP24XX=y
+CONFIG_DM_KEYBOARD=y
+CONFIG_LED=y
+CONFIG_SPL_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_SPL_LED_GPIO=y
+CONFIG_DM_MAILBOX=y
+CONFIG_K3_SEC_PROXY=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_HS200_SUPPORT=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ADMA=y
+CONFIG_MMC_SDHCI_AM654=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPI_FLASH_WINBOND=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_DM_ETH=y
+# CONFIG_TI_AM65_CPSW_NUSS is not set
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_PCI_KEYSTONE=y
+CONFIG_PHY=y
+CONFIG_AM654_PHY=y
+CONFIG_OMAP_USB2_PHY=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_GENERIC is not set
+CONFIG_SPL_PINCTRL=y
+# CONFIG_SPL_PINCTRL_GENERIC is not set
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_TI_SCI_POWER_DOMAIN=y
+CONFIG_REMOTEPROC_TI_K3_R5F=y
+CONFIG_DM_RESET=y
+CONFIG_RESET_TI_SCI=y
+CONFIG_DM_SERIAL=y
+CONFIG_SOC_TI=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_CADENCE_QSPI=y
+CONFIG_SYSRESET=y
+CONFIG_SPL_SYSRESET=y
+CONFIG_SYSRESET_TI_SCI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_FAT_WRITE=y
+CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h
new file mode 100644
index 0000000000..2d1b1b1150
--- /dev/null
+++ b/include/configs/iot2050.h
@@ -0,0 +1,60 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration header file for IOT2050
+ * Copyright (c) Siemens AG, 2018-2020
+ *
+ * Authors:
+ * Le Jin <le.jin@siemens.com>
+ * Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+#ifndef __CONFIG_IOT2050_H
+#define __CONFIG_IOT2050_H
+
+#include <linux/sizes.h>
+
+/* SPL Loader Configuration */
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + \
+ CONFIG_SYS_K3_NON_SECURE_MSRAM_SIZE)
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+
+#define CONFIG_SPL_MAX_SIZE CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
+
+#define CONFIG_SYS_BOOTM_LEN SZ_64M
+
+/* U-Boot general configuration */
+#define EXTRA_ENV_IOT2050_BOARD_SETTINGS \
+ "loadaddr=0x80080000\0" \
+ "scriptaddr=0x83000000\0" \
+ "kernel_addr_r=0x80080000\0" \
+ "ramdisk_addr_r=0x81000000\0" \
+ "fdt_addr_r=0x82000000\0" \
+ "overlay_addr_r=0x83000000\0" \
+ "usb_pgood_delay=900\0"
+
+#ifndef CONFIG_SPL_BUILD
+
+/*
+ * 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) \
+ func(USB, usb, 0) \
+ func(USB, usb, 1) \
+ func(USB, usb, 2)
+
+#include <config_distro_bootcmd.h>
+
+#endif
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ BOOTENV \
+ EXTRA_ENV_IOT2050_BOARD_SETTINGS
+
+#include <configs/ti_armv7_common.h>
+
+#endif /* __CONFIG_IOT2050_H */
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread