All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
@ 2021-02-09 10:21 ` Jan Kiszka
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2021-02-09 10:21 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring
  Cc: linux-arm-kernel, devicetree, Linux Kernel Mailing List, Le Jin,
	Bao Cheng Su

From: Jan Kiszka <jan.kiszka@siemens.com>

Add support for two Siemens SIMATIC IOT2050 variants, Basic and
Advanced. They are based on the TI AM6528 and AM6548 SOCs.

Based on original version by Le Jin.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../devicetree/bindings/arm/ti/k3.yaml        |   2 +
 arch/arm64/boot/dts/ti/Makefile               |   4 +
 .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 649 ++++++++++++++++++
 .../boot/dts/ti/k3-am6528-iot2050-basic.dts   |  56 ++
 .../dts/ti/k3-am6548-iot2050-advanced.dts     |  57 ++
 5 files changed, 768 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts

diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
index c6e1c1e63e43..b1ab0cf4a2d6 100644
--- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
+++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
@@ -23,6 +23,8 @@ properties:
         items:
           - enum:
               - ti,am654-evm
+              - siemens,iot2050-basic
+              - siemens,iot2050-advanced
           - const: ti,am654
 
       - description: K3 J721E SoC
diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index 65506f21ba30..928ea26ce250 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -8,6 +8,10 @@
 
 dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
 
+dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
+
+dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
+
 dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
 
 dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
new file mode 100644
index 000000000000..de05937dbb60
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
@@ -0,0 +1,649 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "k3-am654.dtsi"
+#include <dt-bindings/phy/phy.h>
+
+/ {
+	aliases {
+		spi0 = &mcu_spi0;
+	};
+
+	chosen {
+		stdout-path = "serial3:115200n8";
+		bootargs = "earlycon=ns16550a,mmio32,0x02800000";
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		secure_ddr: secure_ddr@9e800000 {
+			reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
+			alignment = <0x1000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa0000000 0 0x100000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa0100000 0 0xf00000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa1000000 0 0x100000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa1100000 0 0xf00000>;
+			no-map;
+		};
+
+		rtos_ipc_memory_region: ipc-memories@a2000000 {
+			reg = <0x00 0xa2000000 0x00 0x00200000>;
+			alignment = <0x1000>;
+			no-map;
+		};
+	};
+
+	gpio_leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&leds_pins_default>;
+
+		status-led-red {
+			gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>;
+			panic-indicator;
+			linux,default-trigger = "gpio";
+		};
+
+		status-led-green {
+			gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led1-red {
+			gpios = <&pcal9535_3 14 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led1-green {
+			gpios = <&pcal9535_2 15 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led2-red {
+			gpios = <&wkup_gpio0 17 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led2-green {
+			gpios = <&wkup_gpio0 22 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+	};
+
+	dp_refclk: clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <19200000>;
+	};
+};
+
+&wkup_pmx0 {
+	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 */
+		>;
+	};
+
+	arduino_i2c_aio_switch_pins_default: arduino_i2c_aio_switch_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0024, PIN_OUTPUT, 7)  /* (R2) WKUP_GPIO0_21 */
+		>;
+	};
+
+	push_button_pins_default: push_button_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0034, PIN_INPUT,  7)  /* (T1) MCU_OSPI1_CLK.WKUP_GPIO0_25 */
+		>;
+	};
+
+	arduino_uart_pins_default: arduino_uart_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0044, PIN_INPUT,  4)  /* (P4) MCU_UART0_RXD */
+			AM65X_WKUP_IOPAD(0x0048, PIN_OUTPUT, 4)  /* (P5) MCU_UART0_TXD */
+		>;
+	};
+
+	arduino_io_d2_to_d3_pins_default: arduino_io_d2_to_d3_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x004C, PIN_OUTPUT, 7)  /* (P1) WKUP_GPIO0_31 */
+			AM65X_WKUP_IOPAD(0x0054, PIN_OUTPUT, 7)  /* (N3) WKUP_GPIO0_33 */
+		>;
+	};
+
+	arduino_io_oe_pins_default: arduino_io_oe_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0058, PIN_OUTPUT, 7)  /* (N4) WKUP_GPIO0_34 */
+			AM65X_WKUP_IOPAD(0x0060, PIN_OUTPUT, 7)  /* (M2) WKUP_GPIO0_36 */
+			AM65X_WKUP_IOPAD(0x0064, PIN_OUTPUT, 7)  /* (M3) WKUP_GPIO0_37 */
+			AM65X_WKUP_IOPAD(0x0068, PIN_OUTPUT, 7)  /* (M4) WKUP_GPIO0_38 */
+			AM65X_WKUP_IOPAD(0x0074, PIN_OUTPUT, 7)  /* (M1) WKUP_GPIO0_41 */
+		>;
+	};
+
+	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_INPUT,  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 */
+		>;
+	};
+
+	db9_com_mode_pins_default: db9_com_mode_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x00c4, PIN_OUTPUT, 7)  /* (AD3) WKUP_GPIO0_5, used as uart0 mode 0 */
+			AM65X_WKUP_IOPAD(0x00c0, PIN_OUTPUT, 7)  /* (AC3) WKUP_GPIO0_4, used as uart0 mode 1 */
+			AM65X_WKUP_IOPAD(0x00cc, PIN_OUTPUT, 7)  /* (AC1) WKUP_GPIO0_7, used as uart0 term */
+			AM65X_WKUP_IOPAD(0x00c8, PIN_OUTPUT, 7)  /* (AC2) WKUP_GPIO0_6, used as uart0 en */
+		>;
+	};
+
+	leds_pins_default: leds_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0014, PIN_OUTPUT, 7)  /* (T2) WKUP_GPIO0_17, used as user led1 red */
+			AM65X_WKUP_IOPAD(0x0028, PIN_OUTPUT, 7)  /* (R3) WKUP_GPIO0_22, used as user led1 green */
+			AM65X_WKUP_IOPAD(0x0030, PIN_OUTPUT, 7)  /* (R5) WKUP_GPIO0_24, used as status led red */
+			AM65X_WKUP_IOPAD(0x0050, PIN_OUTPUT, 7)  /* (N2) WKUP_GPIO0_32, used as status led green */
+		>;
+	};
+
+	mcu_spi0_pins_default: mcu_spi0_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0090, PIN_INPUT,  0)  /* (Y1) MCU_SPI0_CLK */
+			AM65X_WKUP_IOPAD(0x0094, PIN_INPUT,  0)  /* (Y3) MCU_SPI0_D0 */
+			AM65X_WKUP_IOPAD(0x0098, PIN_INPUT,  0)  /* (Y2) MCU_SPI0_D1 */
+			AM65X_WKUP_IOPAD(0x009c, PIN_OUTPUT, 0)  /* (Y4) MCU_SPI0_CS0 */
+		>;
+	};
+
+	minipcie_pins_default: minipcie_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x003C, PIN_OUTPUT, 7)  /* (P2) MCU_OSPI1_DQS.WKUP_GPIO0_27 */
+		>;
+	};
+};
+
+&main_pmx0 {
+	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 */
+		>;
+	};
+
+	main_i2c3_pins_default: main_i2c3_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x01c0, PIN_INPUT,  2)  /* (AF13) I2C3_SCL */
+			AM65X_IOPAD(0x01d4, PIN_INPUT,  2)  /* (AG12) I2C3_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_PULLUP,   0)  /* (C24) MMC1_SDWP */
+		>;
+	};
+
+	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 */
+		>;
+	};
+
+	arduino_io_d4_to_d9_pins_default: arduino_io_d4_to_d9_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0084, PIN_OUTPUT, 7)  /* (AG18) GPIO0_33 */
+			AM65X_IOPAD(0x008C, PIN_OUTPUT, 7)  /* (AF17) GPIO0_35 */
+			AM65X_IOPAD(0x0098, PIN_OUTPUT, 7)  /* (AH16) GPIO0_38 */
+			AM65X_IOPAD(0x00AC, PIN_OUTPUT, 7)  /* (AH15) GPIO0_43 */
+			AM65X_IOPAD(0x00C0, PIN_OUTPUT, 7)  /* (AG15) GPIO0_48 */
+			AM65X_IOPAD(0x00CC, PIN_OUTPUT, 7)  /* (AD15) GPIO0_51 */
+		>;
+	};
+
+	dss_vout1_pins_default: dss_vout1_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0000, PIN_OUTPUT, 1)  /* VOUT1_DATA0 */
+			AM65X_IOPAD(0x0004, PIN_OUTPUT, 1)  /* VOUT1_DATA1 */
+			AM65X_IOPAD(0x0008, PIN_OUTPUT, 1)  /* VOUT1_DATA2 */
+			AM65X_IOPAD(0x000c, PIN_OUTPUT, 1)  /* VOUT1_DATA3 */
+			AM65X_IOPAD(0x0010, PIN_OUTPUT, 1)  /* VOUT1_DATA4 */
+			AM65X_IOPAD(0x0014, PIN_OUTPUT, 1)  /* VOUT1_DATA5 */
+			AM65X_IOPAD(0x0018, PIN_OUTPUT, 1)  /* VOUT1_DATA6 */
+			AM65X_IOPAD(0x001c, PIN_OUTPUT, 1)  /* VOUT1_DATA7 */
+			AM65X_IOPAD(0x0020, PIN_OUTPUT, 1)  /* VOUT1_DATA8 */
+			AM65X_IOPAD(0x0024, PIN_OUTPUT, 1)  /* VOUT1_DATA9 */
+			AM65X_IOPAD(0x0028, PIN_OUTPUT, 1)  /* VOUT1_DATA10 */
+			AM65X_IOPAD(0x002c, PIN_OUTPUT, 1)  /* VOUT1_DATA11 */
+			AM65X_IOPAD(0x0030, PIN_OUTPUT, 1)  /* VOUT1_DATA12 */
+			AM65X_IOPAD(0x0034, PIN_OUTPUT, 1)  /* VOUT1_DATA13 */
+			AM65X_IOPAD(0x0038, PIN_OUTPUT, 1)  /* VOUT1_DATA14 */
+			AM65X_IOPAD(0x003c, PIN_OUTPUT, 1)  /* VOUT1_DATA15 */
+			AM65X_IOPAD(0x0040, PIN_OUTPUT, 1)  /* VOUT1_DATA16 */
+			AM65X_IOPAD(0x0044, PIN_OUTPUT, 1)  /* VOUT1_DATA17 */
+			AM65X_IOPAD(0x0048, PIN_OUTPUT, 1)  /* VOUT1_DATA18 */
+			AM65X_IOPAD(0x004c, PIN_OUTPUT, 1)  /* VOUT1_DATA19 */
+			AM65X_IOPAD(0x0050, PIN_OUTPUT, 1)  /* VOUT1_DATA20 */
+			AM65X_IOPAD(0x0054, PIN_OUTPUT, 1)  /* VOUT1_DATA21 */
+			AM65X_IOPAD(0x0058, PIN_OUTPUT, 1)  /* VOUT1_DATA22 */
+			AM65X_IOPAD(0x005c, PIN_OUTPUT, 1)  /* VOUT1_DATA23 */
+			AM65X_IOPAD(0x0060, PIN_OUTPUT, 1)  /* VOUT1_VSYNC */
+			AM65X_IOPAD(0x0064, PIN_OUTPUT, 1)  /* VOUT1_HSYNC */
+			AM65X_IOPAD(0x0068, PIN_OUTPUT, 1)  /* VOUT1_PCLK */
+			AM65X_IOPAD(0x006c, PIN_OUTPUT, 1)  /* VOUT1_DE */
+		>;
+	};
+
+	dp_pins_default: dp_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0078, PIN_OUTPUT, 7)  /* (AF18) DP rst_n */
+		>;
+	};
+
+	main_i2c2_pins_default: main_i2c2_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0074, PIN_INPUT,  5)  /* (T27) I2C2_SCL */
+			AM65X_IOPAD(0x0070, PIN_INPUT,  5)  /* (R25) I2C2_SDA */
+		>;
+	};
+};
+
+&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 */
+		>;
+	};
+
+	ecap0_pins_default: ecap0-pins-default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0010, PIN_INPUT,  0)  /* (D21) ECAP0_IN_APWM_OUT */
+		>;
+	};
+};
+
+&wkup_uart0 {
+	/* Wakeup UART is used by System firmware */
+	status = "disabled";
+};
+
+&main_uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart1_pins_default>;
+};
+
+&main_uart2 {
+	status = "disabled";
+};
+
+&mcu_uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&arduino_uart_pins_default>;
+};
+
+&main_gpio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&arduino_io_d4_to_d9_pins_default>;
+	gpio-line-names =
+		"main_gpio0-base", "", "", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "", "", "",
+		"", "", "", "IO4", "", "IO5", "", "", "IO6", "",
+		"", "", "", "IO7", "", "", "", "", "IO8", "",
+		"", "IO9";
+};
+
+&wkup_gpio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&arduino_io_d2_to_d3_pins_default
+		&arduino_i2c_aio_switch_pins_default
+		&arduino_io_oe_pins_default
+		&push_button_pins_default
+		&db9_com_mode_pins_default
+	>;
+	gpio-line-names =
+		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
+			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
+		"", "", "", "", "", "", "", "", "", "",
+		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
+		"IO1", "IO2", "", "IO3", "IO17-direction",
+			"A5", "IO16-direction", "IO15-direction",
+			"IO14-direction", "A3",
+		"", "IO18-direction", "A4", "A2", "A1",
+			"A0", "", "", "IO13", "IO11",
+		"IO12", "IO10";
+};
+
+&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>;
+
+	psu: tps62363@60 {
+		compatible = "ti,tps62363";
+		reg =  <0x60>;
+		regulator-name = "tps62363-vout";
+		regulator-min-microvolt = <500000>;
+		regulator-max-microvolt = <1500000>;
+		regulator-boot-on;
+		/* ti,vsel0-gpio = <&gpio1 16 0>; */
+		/* ti,vsel1-gpio = <&gpio1 17 0>; */
+		ti,vsel0-state-high;
+		ti,vsel1-state-high;
+		/* ti,enable-pull-down; */
+		/* ti,enable-force-pwm; */
+		ti,enable-vout-discharge;
+	};
+
+	/*D4200*/
+	pcal9535_1: gpio@20 {
+		compatible = "nxp,pcal9535";
+		reg = <0x20>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-line-names =
+			"A0-pull", "A1-pull", "A2-pull", "A3-pull", "A4-pull",
+			"A5-pull", "", "",
+			"IO14-enable", "IO15-enable", "IO16-enable",
+			"IO17-enable", "IO18-enable", "IO19-enable";
+	};
+
+	/*D4201*/
+	pcal9535_2: gpio@21 {
+		compatible = "nxp,pcal9535";
+		reg = <0x21>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-line-names =
+			"IO0-direction", "IO1-direction", "IO2-direction",
+			"IO3-direction", "IO4-direction", "IO5-direction",
+			"IO6-direction", "IO7-direction",
+			"IO8-direction", "IO9-direction", "IO10-direction",
+			"IO11-direction", "IO12-direction", "IO13-direction",
+			"IO19-direction";
+	};
+
+	/*D4202*/
+	pcal9535_3: gpio@25 {
+		compatible = "nxp,pcal9535";
+		reg = <0x25>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-line-names =
+			"IO0-pull", "IO1-pull", "IO2-pull", "IO3-pull",
+			"IO4-pull", "IO5-pull", "IO6-pull", "IO7-pull",
+			"IO8-pull", "IO9-pull", "IO10-pull", "IO11-pull",
+			"IO12-pull", "IO13-pull";
+	};
+};
+
+&main_i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c0_pins_default>;
+	clock-frequency = <400000>;
+
+	rtc:rtc8564@51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+
+	eeprom: eeprom@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>;
+};
+
+&main_i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c3_pins_default>;
+	clock-frequency = <400000>;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	edp-bridge@f {
+		compatible = "toshiba,tc358867", "toshiba,tc358767";
+		reg = <0x0f>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&dp_pins_default>;
+		reset-gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>;
+
+		clock-names = "ref";
+		clocks = <&dp_refclk>;
+
+		toshiba,hpd-pin = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@1 {
+				reg = <1>;
+
+				bridge_in: endpoint {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+		};
+	};
+};
+
+&mcu_cpsw {
+	status = "disabled";
+};
+
+&ecap0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ecap0_pins_default>;
+};
+
+&sdhci1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_mmc1_pins_default>;
+	ti,driver-strength-ohm = <50>;
+	disable-wp;
+};
+
+&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";
+};
+
+&mcu_spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcu_spi0_pins_default>;
+
+	#address-cells = <1>;
+	#size-cells= <0>;
+	ti,pindir-d0-out-d1-in = <1>;
+
+	spidev@0 {
+		compatible = "rohm,dh2228fv";
+		spi-max-frequency = <20000000>;
+		reg = <0>;
+	};
+};
+
+&tscadc0 {
+	status = "disabled";
+};
+
+&tscadc1 {
+	adc {
+		ti,adc-channels = <0 1 2 3 4 5>;
+	};
+};
+
+&ospi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0x0>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <1>;
+		spi-max-frequency = <50000000>;
+		cdns,tshsl-ns = <60>;
+		cdns,tsd2d-ns = <60>;
+		cdns,tchsh-ns = <60>;
+		cdns,tslch-ns = <60>;
+		cdns,read-delay = <2>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+	};
+};
+
+&dss {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_vout1_pins_default>;
+
+	assigned-clocks = <&k3_clks 67 2>;
+	assigned-clock-parents = <&k3_clks 67 5>;
+};
+
+&dss_ports {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	port@1 {
+		reg = <1>;
+
+		dpi_out: endpoint {
+			remote-endpoint = <&bridge_in>;
+		};
+	};
+};
+
+&serdes0 {
+	status = "disabled";
+};
+
+&pcie0_rc {
+	status = "disabled";
+};
+
+&pcie0_ep {
+	status = "disabled";
+};
+
+&pcie1_rc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&minipcie_pins_default>;
+
+	num-lanes = <1>;
+	phys = <&serdes1 PHY_TYPE_PCIE 0>;
+	phy-names = "pcie-phy0";
+	reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>;
+};
+
+&pcie1_ep {
+	status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
new file mode 100644
index 000000000000..bb9ab4fdd74e
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "k3-am65-iot2050-common.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-basic", "ti,am654";
+	model = "SIMATIC IOT2050 Basic";
+
+	memory@80000000 {
+		device_type = "memory";
+		/* 1G RAM */
+		reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
+	};
+
+	cpus {
+		cpu-map {
+			/delete-node/ cluster1;
+		};
+		/delete-node/ cpu@100;
+		/delete-node/ cpu@101;
+	};
+};
+
+/* 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 */
+		>;
+	};
+};
+
+&main_uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart0_pins_default>;
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
new file mode 100644
index 000000000000..aa1ef081ef22
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "k3-am65-iot2050-common.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-advanced", "ti,am654";
+	model = "SIMATIC IOT2050 Advanced";
+
+	memory@80000000 {
+		device_type = "memory";
+		/* 2G RAM */
+		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
+	};
+};
+
+&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(0x01b8, PIN_OUTPUT_PULLUP,  7)  /* (B23) MMC0_SDWP */
+			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>;
+	disable-wp;
+};
+
+&main_uart0 {
+	status = "disabled";
+};
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
@ 2021-02-09 10:21 ` Jan Kiszka
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2021-02-09 10:21 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring
  Cc: devicetree, Bao Cheng Su, Linux Kernel Mailing List,
	linux-arm-kernel, Le Jin

From: Jan Kiszka <jan.kiszka@siemens.com>

Add support for two Siemens SIMATIC IOT2050 variants, Basic and
Advanced. They are based on the TI AM6528 and AM6548 SOCs.

Based on original version by Le Jin.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../devicetree/bindings/arm/ti/k3.yaml        |   2 +
 arch/arm64/boot/dts/ti/Makefile               |   4 +
 .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 649 ++++++++++++++++++
 .../boot/dts/ti/k3-am6528-iot2050-basic.dts   |  56 ++
 .../dts/ti/k3-am6548-iot2050-advanced.dts     |  57 ++
 5 files changed, 768 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts

diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
index c6e1c1e63e43..b1ab0cf4a2d6 100644
--- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
+++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
@@ -23,6 +23,8 @@ properties:
         items:
           - enum:
               - ti,am654-evm
+              - siemens,iot2050-basic
+              - siemens,iot2050-advanced
           - const: ti,am654
 
       - description: K3 J721E SoC
diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index 65506f21ba30..928ea26ce250 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -8,6 +8,10 @@
 
 dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
 
+dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
+
+dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
+
 dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
 
 dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
new file mode 100644
index 000000000000..de05937dbb60
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
@@ -0,0 +1,649 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "k3-am654.dtsi"
+#include <dt-bindings/phy/phy.h>
+
+/ {
+	aliases {
+		spi0 = &mcu_spi0;
+	};
+
+	chosen {
+		stdout-path = "serial3:115200n8";
+		bootargs = "earlycon=ns16550a,mmio32,0x02800000";
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		secure_ddr: secure_ddr@9e800000 {
+			reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
+			alignment = <0x1000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa0000000 0 0x100000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa0100000 0 0xf00000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa1000000 0 0x100000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa1100000 0 0xf00000>;
+			no-map;
+		};
+
+		rtos_ipc_memory_region: ipc-memories@a2000000 {
+			reg = <0x00 0xa2000000 0x00 0x00200000>;
+			alignment = <0x1000>;
+			no-map;
+		};
+	};
+
+	gpio_leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&leds_pins_default>;
+
+		status-led-red {
+			gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>;
+			panic-indicator;
+			linux,default-trigger = "gpio";
+		};
+
+		status-led-green {
+			gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led1-red {
+			gpios = <&pcal9535_3 14 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led1-green {
+			gpios = <&pcal9535_2 15 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led2-red {
+			gpios = <&wkup_gpio0 17 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+
+		user-led2-green {
+			gpios = <&wkup_gpio0 22 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "gpio";
+		};
+	};
+
+	dp_refclk: clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <19200000>;
+	};
+};
+
+&wkup_pmx0 {
+	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 */
+		>;
+	};
+
+	arduino_i2c_aio_switch_pins_default: arduino_i2c_aio_switch_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0024, PIN_OUTPUT, 7)  /* (R2) WKUP_GPIO0_21 */
+		>;
+	};
+
+	push_button_pins_default: push_button_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0034, PIN_INPUT,  7)  /* (T1) MCU_OSPI1_CLK.WKUP_GPIO0_25 */
+		>;
+	};
+
+	arduino_uart_pins_default: arduino_uart_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0044, PIN_INPUT,  4)  /* (P4) MCU_UART0_RXD */
+			AM65X_WKUP_IOPAD(0x0048, PIN_OUTPUT, 4)  /* (P5) MCU_UART0_TXD */
+		>;
+	};
+
+	arduino_io_d2_to_d3_pins_default: arduino_io_d2_to_d3_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x004C, PIN_OUTPUT, 7)  /* (P1) WKUP_GPIO0_31 */
+			AM65X_WKUP_IOPAD(0x0054, PIN_OUTPUT, 7)  /* (N3) WKUP_GPIO0_33 */
+		>;
+	};
+
+	arduino_io_oe_pins_default: arduino_io_oe_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0058, PIN_OUTPUT, 7)  /* (N4) WKUP_GPIO0_34 */
+			AM65X_WKUP_IOPAD(0x0060, PIN_OUTPUT, 7)  /* (M2) WKUP_GPIO0_36 */
+			AM65X_WKUP_IOPAD(0x0064, PIN_OUTPUT, 7)  /* (M3) WKUP_GPIO0_37 */
+			AM65X_WKUP_IOPAD(0x0068, PIN_OUTPUT, 7)  /* (M4) WKUP_GPIO0_38 */
+			AM65X_WKUP_IOPAD(0x0074, PIN_OUTPUT, 7)  /* (M1) WKUP_GPIO0_41 */
+		>;
+	};
+
+	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_INPUT,  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 */
+		>;
+	};
+
+	db9_com_mode_pins_default: db9_com_mode_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x00c4, PIN_OUTPUT, 7)  /* (AD3) WKUP_GPIO0_5, used as uart0 mode 0 */
+			AM65X_WKUP_IOPAD(0x00c0, PIN_OUTPUT, 7)  /* (AC3) WKUP_GPIO0_4, used as uart0 mode 1 */
+			AM65X_WKUP_IOPAD(0x00cc, PIN_OUTPUT, 7)  /* (AC1) WKUP_GPIO0_7, used as uart0 term */
+			AM65X_WKUP_IOPAD(0x00c8, PIN_OUTPUT, 7)  /* (AC2) WKUP_GPIO0_6, used as uart0 en */
+		>;
+	};
+
+	leds_pins_default: leds_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0014, PIN_OUTPUT, 7)  /* (T2) WKUP_GPIO0_17, used as user led1 red */
+			AM65X_WKUP_IOPAD(0x0028, PIN_OUTPUT, 7)  /* (R3) WKUP_GPIO0_22, used as user led1 green */
+			AM65X_WKUP_IOPAD(0x0030, PIN_OUTPUT, 7)  /* (R5) WKUP_GPIO0_24, used as status led red */
+			AM65X_WKUP_IOPAD(0x0050, PIN_OUTPUT, 7)  /* (N2) WKUP_GPIO0_32, used as status led green */
+		>;
+	};
+
+	mcu_spi0_pins_default: mcu_spi0_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x0090, PIN_INPUT,  0)  /* (Y1) MCU_SPI0_CLK */
+			AM65X_WKUP_IOPAD(0x0094, PIN_INPUT,  0)  /* (Y3) MCU_SPI0_D0 */
+			AM65X_WKUP_IOPAD(0x0098, PIN_INPUT,  0)  /* (Y2) MCU_SPI0_D1 */
+			AM65X_WKUP_IOPAD(0x009c, PIN_OUTPUT, 0)  /* (Y4) MCU_SPI0_CS0 */
+		>;
+	};
+
+	minipcie_pins_default: minipcie_pins_default {
+		pinctrl-single,pins = <
+			AM65X_WKUP_IOPAD(0x003C, PIN_OUTPUT, 7)  /* (P2) MCU_OSPI1_DQS.WKUP_GPIO0_27 */
+		>;
+	};
+};
+
+&main_pmx0 {
+	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 */
+		>;
+	};
+
+	main_i2c3_pins_default: main_i2c3_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x01c0, PIN_INPUT,  2)  /* (AF13) I2C3_SCL */
+			AM65X_IOPAD(0x01d4, PIN_INPUT,  2)  /* (AG12) I2C3_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_PULLUP,   0)  /* (C24) MMC1_SDWP */
+		>;
+	};
+
+	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 */
+		>;
+	};
+
+	arduino_io_d4_to_d9_pins_default: arduino_io_d4_to_d9_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0084, PIN_OUTPUT, 7)  /* (AG18) GPIO0_33 */
+			AM65X_IOPAD(0x008C, PIN_OUTPUT, 7)  /* (AF17) GPIO0_35 */
+			AM65X_IOPAD(0x0098, PIN_OUTPUT, 7)  /* (AH16) GPIO0_38 */
+			AM65X_IOPAD(0x00AC, PIN_OUTPUT, 7)  /* (AH15) GPIO0_43 */
+			AM65X_IOPAD(0x00C0, PIN_OUTPUT, 7)  /* (AG15) GPIO0_48 */
+			AM65X_IOPAD(0x00CC, PIN_OUTPUT, 7)  /* (AD15) GPIO0_51 */
+		>;
+	};
+
+	dss_vout1_pins_default: dss_vout1_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0000, PIN_OUTPUT, 1)  /* VOUT1_DATA0 */
+			AM65X_IOPAD(0x0004, PIN_OUTPUT, 1)  /* VOUT1_DATA1 */
+			AM65X_IOPAD(0x0008, PIN_OUTPUT, 1)  /* VOUT1_DATA2 */
+			AM65X_IOPAD(0x000c, PIN_OUTPUT, 1)  /* VOUT1_DATA3 */
+			AM65X_IOPAD(0x0010, PIN_OUTPUT, 1)  /* VOUT1_DATA4 */
+			AM65X_IOPAD(0x0014, PIN_OUTPUT, 1)  /* VOUT1_DATA5 */
+			AM65X_IOPAD(0x0018, PIN_OUTPUT, 1)  /* VOUT1_DATA6 */
+			AM65X_IOPAD(0x001c, PIN_OUTPUT, 1)  /* VOUT1_DATA7 */
+			AM65X_IOPAD(0x0020, PIN_OUTPUT, 1)  /* VOUT1_DATA8 */
+			AM65X_IOPAD(0x0024, PIN_OUTPUT, 1)  /* VOUT1_DATA9 */
+			AM65X_IOPAD(0x0028, PIN_OUTPUT, 1)  /* VOUT1_DATA10 */
+			AM65X_IOPAD(0x002c, PIN_OUTPUT, 1)  /* VOUT1_DATA11 */
+			AM65X_IOPAD(0x0030, PIN_OUTPUT, 1)  /* VOUT1_DATA12 */
+			AM65X_IOPAD(0x0034, PIN_OUTPUT, 1)  /* VOUT1_DATA13 */
+			AM65X_IOPAD(0x0038, PIN_OUTPUT, 1)  /* VOUT1_DATA14 */
+			AM65X_IOPAD(0x003c, PIN_OUTPUT, 1)  /* VOUT1_DATA15 */
+			AM65X_IOPAD(0x0040, PIN_OUTPUT, 1)  /* VOUT1_DATA16 */
+			AM65X_IOPAD(0x0044, PIN_OUTPUT, 1)  /* VOUT1_DATA17 */
+			AM65X_IOPAD(0x0048, PIN_OUTPUT, 1)  /* VOUT1_DATA18 */
+			AM65X_IOPAD(0x004c, PIN_OUTPUT, 1)  /* VOUT1_DATA19 */
+			AM65X_IOPAD(0x0050, PIN_OUTPUT, 1)  /* VOUT1_DATA20 */
+			AM65X_IOPAD(0x0054, PIN_OUTPUT, 1)  /* VOUT1_DATA21 */
+			AM65X_IOPAD(0x0058, PIN_OUTPUT, 1)  /* VOUT1_DATA22 */
+			AM65X_IOPAD(0x005c, PIN_OUTPUT, 1)  /* VOUT1_DATA23 */
+			AM65X_IOPAD(0x0060, PIN_OUTPUT, 1)  /* VOUT1_VSYNC */
+			AM65X_IOPAD(0x0064, PIN_OUTPUT, 1)  /* VOUT1_HSYNC */
+			AM65X_IOPAD(0x0068, PIN_OUTPUT, 1)  /* VOUT1_PCLK */
+			AM65X_IOPAD(0x006c, PIN_OUTPUT, 1)  /* VOUT1_DE */
+		>;
+	};
+
+	dp_pins_default: dp_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0078, PIN_OUTPUT, 7)  /* (AF18) DP rst_n */
+		>;
+	};
+
+	main_i2c2_pins_default: main_i2c2_pins_default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0074, PIN_INPUT,  5)  /* (T27) I2C2_SCL */
+			AM65X_IOPAD(0x0070, PIN_INPUT,  5)  /* (R25) I2C2_SDA */
+		>;
+	};
+};
+
+&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 */
+		>;
+	};
+
+	ecap0_pins_default: ecap0-pins-default {
+		pinctrl-single,pins = <
+			AM65X_IOPAD(0x0010, PIN_INPUT,  0)  /* (D21) ECAP0_IN_APWM_OUT */
+		>;
+	};
+};
+
+&wkup_uart0 {
+	/* Wakeup UART is used by System firmware */
+	status = "disabled";
+};
+
+&main_uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart1_pins_default>;
+};
+
+&main_uart2 {
+	status = "disabled";
+};
+
+&mcu_uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&arduino_uart_pins_default>;
+};
+
+&main_gpio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&arduino_io_d4_to_d9_pins_default>;
+	gpio-line-names =
+		"main_gpio0-base", "", "", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "", "", "",
+		"", "", "", "IO4", "", "IO5", "", "", "IO6", "",
+		"", "", "", "IO7", "", "", "", "", "IO8", "",
+		"", "IO9";
+};
+
+&wkup_gpio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&arduino_io_d2_to_d3_pins_default
+		&arduino_i2c_aio_switch_pins_default
+		&arduino_io_oe_pins_default
+		&push_button_pins_default
+		&db9_com_mode_pins_default
+	>;
+	gpio-line-names =
+		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
+			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
+		"", "", "", "", "", "", "", "", "", "",
+		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
+		"IO1", "IO2", "", "IO3", "IO17-direction",
+			"A5", "IO16-direction", "IO15-direction",
+			"IO14-direction", "A3",
+		"", "IO18-direction", "A4", "A2", "A1",
+			"A0", "", "", "IO13", "IO11",
+		"IO12", "IO10";
+};
+
+&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>;
+
+	psu: tps62363@60 {
+		compatible = "ti,tps62363";
+		reg =  <0x60>;
+		regulator-name = "tps62363-vout";
+		regulator-min-microvolt = <500000>;
+		regulator-max-microvolt = <1500000>;
+		regulator-boot-on;
+		/* ti,vsel0-gpio = <&gpio1 16 0>; */
+		/* ti,vsel1-gpio = <&gpio1 17 0>; */
+		ti,vsel0-state-high;
+		ti,vsel1-state-high;
+		/* ti,enable-pull-down; */
+		/* ti,enable-force-pwm; */
+		ti,enable-vout-discharge;
+	};
+
+	/*D4200*/
+	pcal9535_1: gpio@20 {
+		compatible = "nxp,pcal9535";
+		reg = <0x20>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-line-names =
+			"A0-pull", "A1-pull", "A2-pull", "A3-pull", "A4-pull",
+			"A5-pull", "", "",
+			"IO14-enable", "IO15-enable", "IO16-enable",
+			"IO17-enable", "IO18-enable", "IO19-enable";
+	};
+
+	/*D4201*/
+	pcal9535_2: gpio@21 {
+		compatible = "nxp,pcal9535";
+		reg = <0x21>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-line-names =
+			"IO0-direction", "IO1-direction", "IO2-direction",
+			"IO3-direction", "IO4-direction", "IO5-direction",
+			"IO6-direction", "IO7-direction",
+			"IO8-direction", "IO9-direction", "IO10-direction",
+			"IO11-direction", "IO12-direction", "IO13-direction",
+			"IO19-direction";
+	};
+
+	/*D4202*/
+	pcal9535_3: gpio@25 {
+		compatible = "nxp,pcal9535";
+		reg = <0x25>;
+		#gpio-cells = <2>;
+		gpio-controller;
+		gpio-line-names =
+			"IO0-pull", "IO1-pull", "IO2-pull", "IO3-pull",
+			"IO4-pull", "IO5-pull", "IO6-pull", "IO7-pull",
+			"IO8-pull", "IO9-pull", "IO10-pull", "IO11-pull",
+			"IO12-pull", "IO13-pull";
+	};
+};
+
+&main_i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c0_pins_default>;
+	clock-frequency = <400000>;
+
+	rtc:rtc8564@51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+
+	eeprom: eeprom@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>;
+};
+
+&main_i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_i2c3_pins_default>;
+	clock-frequency = <400000>;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	edp-bridge@f {
+		compatible = "toshiba,tc358867", "toshiba,tc358767";
+		reg = <0x0f>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&dp_pins_default>;
+		reset-gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>;
+
+		clock-names = "ref";
+		clocks = <&dp_refclk>;
+
+		toshiba,hpd-pin = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@1 {
+				reg = <1>;
+
+				bridge_in: endpoint {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+		};
+	};
+};
+
+&mcu_cpsw {
+	status = "disabled";
+};
+
+&ecap0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ecap0_pins_default>;
+};
+
+&sdhci1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_mmc1_pins_default>;
+	ti,driver-strength-ohm = <50>;
+	disable-wp;
+};
+
+&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";
+};
+
+&mcu_spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcu_spi0_pins_default>;
+
+	#address-cells = <1>;
+	#size-cells= <0>;
+	ti,pindir-d0-out-d1-in = <1>;
+
+	spidev@0 {
+		compatible = "rohm,dh2228fv";
+		spi-max-frequency = <20000000>;
+		reg = <0>;
+	};
+};
+
+&tscadc0 {
+	status = "disabled";
+};
+
+&tscadc1 {
+	adc {
+		ti,adc-channels = <0 1 2 3 4 5>;
+	};
+};
+
+&ospi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcu_fss0_ospi0_pins_default>;
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0x0>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <1>;
+		spi-max-frequency = <50000000>;
+		cdns,tshsl-ns = <60>;
+		cdns,tsd2d-ns = <60>;
+		cdns,tchsh-ns = <60>;
+		cdns,tslch-ns = <60>;
+		cdns,read-delay = <2>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+	};
+};
+
+&dss {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_vout1_pins_default>;
+
+	assigned-clocks = <&k3_clks 67 2>;
+	assigned-clock-parents = <&k3_clks 67 5>;
+};
+
+&dss_ports {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	port@1 {
+		reg = <1>;
+
+		dpi_out: endpoint {
+			remote-endpoint = <&bridge_in>;
+		};
+	};
+};
+
+&serdes0 {
+	status = "disabled";
+};
+
+&pcie0_rc {
+	status = "disabled";
+};
+
+&pcie0_ep {
+	status = "disabled";
+};
+
+&pcie1_rc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&minipcie_pins_default>;
+
+	num-lanes = <1>;
+	phys = <&serdes1 PHY_TYPE_PCIE 0>;
+	phy-names = "pcie-phy0";
+	reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>;
+};
+
+&pcie1_ep {
+	status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
new file mode 100644
index 000000000000..bb9ab4fdd74e
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "k3-am65-iot2050-common.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-basic", "ti,am654";
+	model = "SIMATIC IOT2050 Basic";
+
+	memory@80000000 {
+		device_type = "memory";
+		/* 1G RAM */
+		reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
+	};
+
+	cpus {
+		cpu-map {
+			/delete-node/ cluster1;
+		};
+		/delete-node/ cpu@100;
+		/delete-node/ cpu@101;
+	};
+};
+
+/* 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 */
+		>;
+	};
+};
+
+&main_uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_uart0_pins_default>;
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
new file mode 100644
index 000000000000..aa1ef081ef22
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszk@siemens.com>
+ */
+
+/dts-v1/;
+
+#include "k3-am65-iot2050-common.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-advanced", "ti,am654";
+	model = "SIMATIC IOT2050 Advanced";
+
+	memory@80000000 {
+		device_type = "memory";
+		/* 2G RAM */
+		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
+	};
+};
+
+&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(0x01b8, PIN_OUTPUT_PULLUP,  7)  /* (B23) MMC0_SDWP */
+			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>;
+	disable-wp;
+};
+
+&main_uart0 {
+	status = "disabled";
+};
-- 
2.26.2

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
  2021-02-09 10:21 ` Jan Kiszka
@ 2021-02-09 14:44   ` Nishanth Menon
  -1 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2021-02-09 14:44 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, devicetree,
	Linux Kernel Mailing List, Le Jin, Bao Cheng Su

Jan,

A few quick scan comments below, you might need to post based off
5.12-rc1 once available..

Also, I see a bit of warnings with dtbs_check, which probably needs a
little more digging into (pcie insists to get a device_type property,
etc..)

you could use kernel_patch_verify or https://github.com/nmenon/kernel_patch_verify/blob/master/Dockerbuild.md

it throws up a report like this https://pastebin.ubuntu.com/p/SdkZr432z3/

So, many of my comments below are just first pass parse of that log -> I
usually do recommend building with W=2 and dtbs_check (with yamlint etc)
to make sure things are a bit sane. Will be good to have additional
eyes.

On 11:21-20210209, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Add support for two Siemens SIMATIC IOT2050 variants, Basic and
> Advanced. They are based on the TI AM6528 and AM6548 SOCs.
> 
> Based on original version by Le Jin.

Might be good to add links to the boards as well (if available), for
future reference.

> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---

Will be nice to see at least a pastebin link for a bootlog on the boards
in the cover-letter / diffstat section with the v2 - for reference.

>  .../devicetree/bindings/arm/ti/k3.yaml        |   2 +
>  arch/arm64/boot/dts/ti/Makefile               |   4 +
>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 649 ++++++++++++++++++
>  .../boot/dts/ti/k3-am6528-iot2050-basic.dts   |  56 ++
>  .../dts/ti/k3-am6548-iot2050-advanced.dts     |  57 ++
>  5 files changed, 768 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> 
> diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> index c6e1c1e63e43..b1ab0cf4a2d6 100644
> --- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
> +++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> @@ -23,6 +23,8 @@ properties:
>          items:
>            - enum:
>                - ti,am654-evm
> +              - siemens,iot2050-basic
> +              - siemens,iot2050-advanced

- In a separate patch, ./Documentation/devicetree/bindings/vendor-prefixes.yaml -> Could you
  make sure we add 'siemens' there?
- and, lets move the bindings to it's own patch, since that is how Rob
 prefers to review in https://patchwork.ozlabs.org/project/devicetree-bindings/list/

Both of these patches will need Rob to ack. I think I should be able
to pick the first one up as well to reduce dependency, but we can
check with Rob in case there is a preference.

>            - const: ti,am654
>  
>        - description: K3 J721E SoC
> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
> index 65506f21ba30..928ea26ce250 100644
> --- a/arch/arm64/boot/dts/ti/Makefile
> +++ b/arch/arm64/boot/dts/ti/Makefile
> @@ -8,6 +8,10 @@
>  
>  dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
>  

- drop the EOL to club am65 dtbs close to each other

> +dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
> +

- Drop this EOL as well. Something like this:

dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb

dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb

> +dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
> +
>  dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
>  
>  dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> new file mode 100644
> index 000000000000..de05937dbb60
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> @@ -0,0 +1,649 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *

Optional: might be nice to add a oneliner comment for reuse scope..

> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszk@siemens.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am654.dtsi"
> +#include <dt-bindings/phy/phy.h>
> +
> +/ {
> +	aliases {
> +		spi0 = &mcu_spi0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial3:115200n8";
> +		bootargs = "earlycon=ns16550a,mmio32,0x02800000";

serial3 is main_uart1, did you mean 0x02810000 instead of 0x02800000 ?

> +	};
> +
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		secure_ddr: secure_ddr@9e800000 {

"_" is not something we prefer for node names, so something like
	secure_ddr: secure-ddr@...

> +			reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
> +			alignment = <0x1000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa0000000 0 0x100000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa0100000 0 0xf00000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa1000000 0 0x100000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa1100000 0 0xf00000>;
> +			no-map;
> +		};
> +
> +		rtos_ipc_memory_region: ipc-memories@a2000000 {
> +			reg = <0x00 0xa2000000 0x00 0x00200000>;
> +			alignment = <0x1000>;
> +			no-map;
> +		};
> +	};
> +
> +	gpio_leds {

just 'leds'?

> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&leds_pins_default>;
> +
> +		status-led-red {
> +			gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>;
> +			panic-indicator;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		status-led-green {
> +			gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led1-red {
> +			gpios = <&pcal9535_3 14 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led1-green {
> +			gpios = <&pcal9535_2 15 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led2-red {
> +			gpios = <&wkup_gpio0 17 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led2-green {
> +			gpios = <&wkup_gpio0 22 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";

are you sure this is "gpio" ? dtbs_check reports should be one of:
	['backlight', 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> +		};
> +	};
> +
> +	dp_refclk: clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <19200000>;
> +	};
> +};
> +
> +&wkup_pmx0 {
> +	wkup_i2c0_pins_default: wkup_i2c0_pins_default {

	Here, and else where:
		wkup_i2c0_pins_default: wkup-i2c0-pins-default

Prefer we dont use _ in node names (rest of the pinmux node names as
		well).

> +		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_IOPAD(0x0070, PIN_INPUT,  5)  /* (R25) I2C2_SDA */

[... similar issues with '_' elsewhere.. ]

> +		>;
> +	};
> +};
> +
> +&main_pmx1 {
> +	main_i2c0_pins_default: main-i2c0-pins-default {

	these look fine..

> +		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 */
> +		>;
> +	};
> +
> +	ecap0_pins_default: ecap0-pins-default {
> +		pinctrl-single,pins = <
> +			AM65X_IOPAD(0x0010, PIN_INPUT,  0)  /* (D21) ECAP0_IN_APWM_OUT */
> +		>;
> +	};
> +};
> +
> +&wkup_uart0 {
> +	/* Wakeup UART is used by System firmware */
> +	status = "disabled";
In case of reservation for firmware usage:
status = "reserved";

[...]

> +
> +&wkup_gpio0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <
> +		&arduino_io_d2_to_d3_pins_default
> +		&arduino_i2c_aio_switch_pins_default
> +		&arduino_io_oe_pins_default
> +		&push_button_pins_default
> +		&db9_com_mode_pins_default
> +	>;
> +	gpio-line-names =
> +		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
> +			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
> +		"", "", "", "", "", "", "", "", "", "",
> +		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
> +		"IO1", "IO2", "", "IO3", "IO17-direction",
> +			"A5", "IO16-direction", "IO15-direction",
> +			"IO14-direction", "A3",
> +		"", "IO18-direction", "A4", "A2", "A1",
> +			"A0", "", "", "IO13", "IO11",
> +		"IO12", "IO10";

Any chance of intending this consistently?

> +};
> +
> +&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>;
> +
> +	psu: tps62363@60 {
> +		compatible = "ti,tps62363";
> +		reg =  <0x60>;
> +		regulator-name = "tps62363-vout";
> +		regulator-min-microvolt = <500000>;
> +		regulator-max-microvolt = <1500000>;
> +		regulator-boot-on;
> +		/* ti,vsel0-gpio = <&gpio1 16 0>; */
> +		/* ti,vsel1-gpio = <&gpio1 17 0>; */

Could you drop the commented out properties: above and later?

> +		ti,vsel0-state-high;
> +		ti,vsel1-state-high;
> +		/* ti,enable-pull-down; */
> +		/* ti,enable-force-pwm; */
> +		ti,enable-vout-discharge;
> +	};
> +
> +	/*D4200*/
Add a space prefix and postfix? (here and below)
/* D4200 */

> +	pcal9535_1: gpio@20 {
> +		compatible = "nxp,pcal9535";
> +		reg = <0x20>;
> +		#gpio-cells = <2>;
> +		gpio-controller;
> +		gpio-line-names =
> +			"A0-pull", "A1-pull", "A2-pull", "A3-pull", "A4-pull",
> +			"A5-pull", "", "",
> +			"IO14-enable", "IO15-enable", "IO16-enable",
> +			"IO17-enable", "IO18-enable", "IO19-enable";
> +	};
> +
> +	/*D4201*/
> +	pcal9535_2: gpio@21 {
> +		compatible = "nxp,pcal9535";
> +		reg = <0x21>;
> +		#gpio-cells = <2>;
> +		gpio-controller;
> +		gpio-line-names =
> +			"IO0-direction", "IO1-direction", "IO2-direction",
> +			"IO3-direction", "IO4-direction", "IO5-direction",
> +			"IO6-direction", "IO7-direction",
> +			"IO8-direction", "IO9-direction", "IO10-direction",
> +			"IO11-direction", "IO12-direction", "IO13-direction",
> +			"IO19-direction";
> +	};
> +

	[...]

> +
> +&pcie1_rc {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&minipcie_pins_default>;
> +
> +	num-lanes = <1>;
> +	phys = <&serdes1 PHY_TYPE_PCIE 0>;
> +	phy-names = "pcie-phy0";
> +	reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>;

schema seems to want a device_type, and there seems to be some warnings
	on serdes as well.. might be something to check up on..

> +};
> +
> +&pcie1_ep {
> +	status = "disabled";
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> new file mode 100644
> index 000000000000..bb9ab4fdd74e
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> @@ -0,0 +1,56 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *

Will be nice to explain the difference between basic and advanced dts.

Are they two different boards? looks like the basic is using a part spin
with a single cluster, perhaps? I guess links might help..

> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszk@siemens.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am65-iot2050-common.dtsi"
> +
> +/ {
> +	compatible = "siemens,iot2050-basic", "ti,am654";
> +	model = "SIMATIC IOT2050 Basic";
> +
> +	memory@80000000 {
> +		device_type = "memory";
> +		/* 1G RAM */
> +		reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
> +	};
> +
> +	cpus {
> +		cpu-map {
> +			/delete-node/ cluster1;
> +		};
> +		/delete-node/ cpu@100;
> +		/delete-node/ cpu@101;
> +	};

Personally, I'd prefer this (handling efuse spins in board files or
even overlays) instead of having to create 100s of dtsi per SoC for
every permutation & combination of TI efused devices and handle these
in board files. I do see examples of similar usage elsewhere in:

$ git grep /delete-node/ arch/arm64/boot/dts/

But, if someone has a different opinion, feel free to pipe up with a
reasonable way to prevent file explosion.

> +};
> +
> +/* 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 */
> +		>;
> +	};
> +};
> +
> +&main_uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&main_uart0_pins_default>;
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> new file mode 100644
> index 000000000000..aa1ef081ef22
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> @@ -0,0 +1,57 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *
> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszk@siemens.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am65-iot2050-common.dtsi"
[...]

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
@ 2021-02-09 14:44   ` Nishanth Menon
  0 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2021-02-09 14:44 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: devicetree, Tero Kristo, Le Jin, Linux Kernel Mailing List,
	Rob Herring, Bao Cheng Su, linux-arm-kernel

Jan,

A few quick scan comments below, you might need to post based off
5.12-rc1 once available..

Also, I see a bit of warnings with dtbs_check, which probably needs a
little more digging into (pcie insists to get a device_type property,
etc..)

you could use kernel_patch_verify or https://github.com/nmenon/kernel_patch_verify/blob/master/Dockerbuild.md

it throws up a report like this https://pastebin.ubuntu.com/p/SdkZr432z3/

So, many of my comments below are just first pass parse of that log -> I
usually do recommend building with W=2 and dtbs_check (with yamlint etc)
to make sure things are a bit sane. Will be good to have additional
eyes.

On 11:21-20210209, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Add support for two Siemens SIMATIC IOT2050 variants, Basic and
> Advanced. They are based on the TI AM6528 and AM6548 SOCs.
> 
> Based on original version by Le Jin.

Might be good to add links to the boards as well (if available), for
future reference.

> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---

Will be nice to see at least a pastebin link for a bootlog on the boards
in the cover-letter / diffstat section with the v2 - for reference.

>  .../devicetree/bindings/arm/ti/k3.yaml        |   2 +
>  arch/arm64/boot/dts/ti/Makefile               |   4 +
>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 649 ++++++++++++++++++
>  .../boot/dts/ti/k3-am6528-iot2050-basic.dts   |  56 ++
>  .../dts/ti/k3-am6548-iot2050-advanced.dts     |  57 ++
>  5 files changed, 768 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> 
> diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> index c6e1c1e63e43..b1ab0cf4a2d6 100644
> --- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
> +++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> @@ -23,6 +23,8 @@ properties:
>          items:
>            - enum:
>                - ti,am654-evm
> +              - siemens,iot2050-basic
> +              - siemens,iot2050-advanced

- In a separate patch, ./Documentation/devicetree/bindings/vendor-prefixes.yaml -> Could you
  make sure we add 'siemens' there?
- and, lets move the bindings to it's own patch, since that is how Rob
 prefers to review in https://patchwork.ozlabs.org/project/devicetree-bindings/list/

Both of these patches will need Rob to ack. I think I should be able
to pick the first one up as well to reduce dependency, but we can
check with Rob in case there is a preference.

>            - const: ti,am654
>  
>        - description: K3 J721E SoC
> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
> index 65506f21ba30..928ea26ce250 100644
> --- a/arch/arm64/boot/dts/ti/Makefile
> +++ b/arch/arm64/boot/dts/ti/Makefile
> @@ -8,6 +8,10 @@
>  
>  dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
>  

- drop the EOL to club am65 dtbs close to each other

> +dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
> +

- Drop this EOL as well. Something like this:

dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb

dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb

> +dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
> +
>  dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
>  
>  dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> new file mode 100644
> index 000000000000..de05937dbb60
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> @@ -0,0 +1,649 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *

Optional: might be nice to add a oneliner comment for reuse scope..

> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszk@siemens.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am654.dtsi"
> +#include <dt-bindings/phy/phy.h>
> +
> +/ {
> +	aliases {
> +		spi0 = &mcu_spi0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial3:115200n8";
> +		bootargs = "earlycon=ns16550a,mmio32,0x02800000";

serial3 is main_uart1, did you mean 0x02810000 instead of 0x02800000 ?

> +	};
> +
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		secure_ddr: secure_ddr@9e800000 {

"_" is not something we prefer for node names, so something like
	secure_ddr: secure-ddr@...

> +			reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
> +			alignment = <0x1000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa0000000 0 0x100000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa0100000 0 0xf00000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa1000000 0 0x100000>;
> +			no-map;
> +		};
> +
> +		mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0 0xa1100000 0 0xf00000>;
> +			no-map;
> +		};
> +
> +		rtos_ipc_memory_region: ipc-memories@a2000000 {
> +			reg = <0x00 0xa2000000 0x00 0x00200000>;
> +			alignment = <0x1000>;
> +			no-map;
> +		};
> +	};
> +
> +	gpio_leds {

just 'leds'?

> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&leds_pins_default>;
> +
> +		status-led-red {
> +			gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>;
> +			panic-indicator;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		status-led-green {
> +			gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led1-red {
> +			gpios = <&pcal9535_3 14 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led1-green {
> +			gpios = <&pcal9535_2 15 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led2-red {
> +			gpios = <&wkup_gpio0 17 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";
> +		};
> +
> +		user-led2-green {
> +			gpios = <&wkup_gpio0 22 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "gpio";

are you sure this is "gpio" ? dtbs_check reports should be one of:
	['backlight', 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> +		};
> +	};
> +
> +	dp_refclk: clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <19200000>;
> +	};
> +};
> +
> +&wkup_pmx0 {
> +	wkup_i2c0_pins_default: wkup_i2c0_pins_default {

	Here, and else where:
		wkup_i2c0_pins_default: wkup-i2c0-pins-default

Prefer we dont use _ in node names (rest of the pinmux node names as
		well).

> +		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_IOPAD(0x0070, PIN_INPUT,  5)  /* (R25) I2C2_SDA */

[... similar issues with '_' elsewhere.. ]

> +		>;
> +	};
> +};
> +
> +&main_pmx1 {
> +	main_i2c0_pins_default: main-i2c0-pins-default {

	these look fine..

> +		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 */
> +		>;
> +	};
> +
> +	ecap0_pins_default: ecap0-pins-default {
> +		pinctrl-single,pins = <
> +			AM65X_IOPAD(0x0010, PIN_INPUT,  0)  /* (D21) ECAP0_IN_APWM_OUT */
> +		>;
> +	};
> +};
> +
> +&wkup_uart0 {
> +	/* Wakeup UART is used by System firmware */
> +	status = "disabled";
In case of reservation for firmware usage:
status = "reserved";

[...]

> +
> +&wkup_gpio0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <
> +		&arduino_io_d2_to_d3_pins_default
> +		&arduino_i2c_aio_switch_pins_default
> +		&arduino_io_oe_pins_default
> +		&push_button_pins_default
> +		&db9_com_mode_pins_default
> +	>;
> +	gpio-line-names =
> +		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
> +			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
> +		"", "", "", "", "", "", "", "", "", "",
> +		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
> +		"IO1", "IO2", "", "IO3", "IO17-direction",
> +			"A5", "IO16-direction", "IO15-direction",
> +			"IO14-direction", "A3",
> +		"", "IO18-direction", "A4", "A2", "A1",
> +			"A0", "", "", "IO13", "IO11",
> +		"IO12", "IO10";

Any chance of intending this consistently?

> +};
> +
> +&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>;
> +
> +	psu: tps62363@60 {
> +		compatible = "ti,tps62363";
> +		reg =  <0x60>;
> +		regulator-name = "tps62363-vout";
> +		regulator-min-microvolt = <500000>;
> +		regulator-max-microvolt = <1500000>;
> +		regulator-boot-on;
> +		/* ti,vsel0-gpio = <&gpio1 16 0>; */
> +		/* ti,vsel1-gpio = <&gpio1 17 0>; */

Could you drop the commented out properties: above and later?

> +		ti,vsel0-state-high;
> +		ti,vsel1-state-high;
> +		/* ti,enable-pull-down; */
> +		/* ti,enable-force-pwm; */
> +		ti,enable-vout-discharge;
> +	};
> +
> +	/*D4200*/
Add a space prefix and postfix? (here and below)
/* D4200 */

> +	pcal9535_1: gpio@20 {
> +		compatible = "nxp,pcal9535";
> +		reg = <0x20>;
> +		#gpio-cells = <2>;
> +		gpio-controller;
> +		gpio-line-names =
> +			"A0-pull", "A1-pull", "A2-pull", "A3-pull", "A4-pull",
> +			"A5-pull", "", "",
> +			"IO14-enable", "IO15-enable", "IO16-enable",
> +			"IO17-enable", "IO18-enable", "IO19-enable";
> +	};
> +
> +	/*D4201*/
> +	pcal9535_2: gpio@21 {
> +		compatible = "nxp,pcal9535";
> +		reg = <0x21>;
> +		#gpio-cells = <2>;
> +		gpio-controller;
> +		gpio-line-names =
> +			"IO0-direction", "IO1-direction", "IO2-direction",
> +			"IO3-direction", "IO4-direction", "IO5-direction",
> +			"IO6-direction", "IO7-direction",
> +			"IO8-direction", "IO9-direction", "IO10-direction",
> +			"IO11-direction", "IO12-direction", "IO13-direction",
> +			"IO19-direction";
> +	};
> +

	[...]

> +
> +&pcie1_rc {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&minipcie_pins_default>;
> +
> +	num-lanes = <1>;
> +	phys = <&serdes1 PHY_TYPE_PCIE 0>;
> +	phy-names = "pcie-phy0";
> +	reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>;

schema seems to want a device_type, and there seems to be some warnings
	on serdes as well.. might be something to check up on..

> +};
> +
> +&pcie1_ep {
> +	status = "disabled";
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> new file mode 100644
> index 000000000000..bb9ab4fdd74e
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> @@ -0,0 +1,56 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *

Will be nice to explain the difference between basic and advanced dts.

Are they two different boards? looks like the basic is using a part spin
with a single cluster, perhaps? I guess links might help..

> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszk@siemens.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am65-iot2050-common.dtsi"
> +
> +/ {
> +	compatible = "siemens,iot2050-basic", "ti,am654";
> +	model = "SIMATIC IOT2050 Basic";
> +
> +	memory@80000000 {
> +		device_type = "memory";
> +		/* 1G RAM */
> +		reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
> +	};
> +
> +	cpus {
> +		cpu-map {
> +			/delete-node/ cluster1;
> +		};
> +		/delete-node/ cpu@100;
> +		/delete-node/ cpu@101;
> +	};

Personally, I'd prefer this (handling efuse spins in board files or
even overlays) instead of having to create 100s of dtsi per SoC for
every permutation & combination of TI efused devices and handle these
in board files. I do see examples of similar usage elsewhere in:

$ git grep /delete-node/ arch/arm64/boot/dts/

But, if someone has a different opinion, feel free to pipe up with a
reasonable way to prevent file explosion.

> +};
> +
> +/* 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 */
> +		>;
> +	};
> +};
> +
> +&main_uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&main_uart0_pins_default>;
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> new file mode 100644
> index 000000000000..aa1ef081ef22
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> @@ -0,0 +1,57 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *
> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszk@siemens.com>
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am65-iot2050-common.dtsi"
[...]

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
  2021-02-09 14:44   ` Nishanth Menon
@ 2021-02-09 17:40     ` Jan Kiszka
  -1 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2021-02-09 17:40 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, devicetree,
	Linux Kernel Mailing List, Le Jin, Bao Cheng Su

On 09.02.21 15:44, Nishanth Menon wrote:
> Jan,
> 
> A few quick scan comments below, you might need to post based off
> 5.12-rc1 once available..
> 
> Also, I see a bit of warnings with dtbs_check, which probably needs a
> little more digging into (pcie insists to get a device_type property,
> etc..)
> 
> you could use kernel_patch_verify or https://github.com/nmenon/kernel_patch_verify/blob/master/Dockerbuild.md
> 
> it throws up a report like this https://pastebin.ubuntu.com/p/SdkZr432z3/
> 

Ok, will have a look - is that checkpatch on steroids?

> So, many of my comments below are just first pass parse of that log -> I
> usually do recommend building with W=2 and dtbs_check (with yamlint etc)
> to make sure things are a bit sane. Will be good to have additional
> eyes.
> 
> On 11:21-20210209, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Add support for two Siemens SIMATIC IOT2050 variants, Basic and
>> Advanced. They are based on the TI AM6528 and AM6548 SOCs.
>>
>> Based on original version by Le Jin.
> 
> Might be good to add links to the boards as well (if available), for
> future reference.
> 

Sure, though stability of links is not under my control. But I could
additionally drop https://github.com/siemens/meta-iot2050 here.

>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
> 
> Will be nice to see at least a pastebin link for a bootlog on the boards
> in the cover-letter / diffstat section with the v2 - for reference.
> 

Sure.

>>  .../devicetree/bindings/arm/ti/k3.yaml        |   2 +
>>  arch/arm64/boot/dts/ti/Makefile               |   4 +
>>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 649 ++++++++++++++++++
>>  .../boot/dts/ti/k3-am6528-iot2050-basic.dts   |  56 ++
>>  .../dts/ti/k3-am6548-iot2050-advanced.dts     |  57 ++
>>  5 files changed, 768 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>
>> diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> index c6e1c1e63e43..b1ab0cf4a2d6 100644
>> --- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> +++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> @@ -23,6 +23,8 @@ properties:
>>          items:
>>            - enum:
>>                - ti,am654-evm
>> +              - siemens,iot2050-basic
>> +              - siemens,iot2050-advanced
> 
> - In a separate patch, ./Documentation/devicetree/bindings/vendor-prefixes.yaml -> Could you
>   make sure we add 'siemens' there?
> - and, lets move the bindings to it's own patch, since that is how Rob
>  prefers to review in https://patchwork.ozlabs.org/project/devicetree-bindings/list/
> 
> Both of these patches will need Rob to ack. I think I should be able
> to pick the first one up as well to reduce dependency, but we can
> check with Rob in case there is a preference.
> 

Ok.

>>            - const: ti,am654
>>  
>>        - description: K3 J721E SoC
>> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
>> index 65506f21ba30..928ea26ce250 100644
>> --- a/arch/arm64/boot/dts/ti/Makefile
>> +++ b/arch/arm64/boot/dts/ti/Makefile
>> @@ -8,6 +8,10 @@
>>  
>>  dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
>>  
> 
> - drop the EOL to club am65 dtbs close to each other
> 
>> +dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
>> +
> 
> - Drop this EOL as well. Something like this:
> 
> dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
> 
> dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
> 
>> +dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
>> +
>>  dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
>>  
>>  dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>> new file mode 100644
>> index 000000000000..de05937dbb60
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>> @@ -0,0 +1,649 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) Siemens AG, 2018-2021
>> + *
> 
> Optional: might be nice to add a oneliner comment for reuse scope..
> 

You mean something like "Common bits for IOT2050 basic and advanced boards"?

>> + * Authors:
>> + *   Le Jin <le.jin@siemens.com>
>> + *   Jan Kiszka <jan.kiszk@siemens.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "k3-am654.dtsi"
>> +#include <dt-bindings/phy/phy.h>
>> +
>> +/ {
>> +	aliases {
>> +		spi0 = &mcu_spi0;
>> +	};
>> +
>> +	chosen {
>> +		stdout-path = "serial3:115200n8";
>> +		bootargs = "earlycon=ns16550a,mmio32,0x02800000";
> 
> serial3 is main_uart1, did you mean 0x02810000 instead of 0x02800000 ?

Indeed, this is 0x02810000 here. We overwrote this in our image - will
fix this occurrence.

> 
>> +	};
>> +
>> +	reserved-memory {
>> +		#address-cells = <2>;
>> +		#size-cells = <2>;
>> +		ranges;
>> +
>> +		secure_ddr: secure_ddr@9e800000 {
> 
> "_" is not something we prefer for node names, so something like
> 	secure_ddr: secure-ddr@...
> 

Yeah, should be no problem to rename.

>> +			reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
>> +			alignment = <0x1000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa0000000 0 0x100000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa0100000 0 0xf00000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa1000000 0 0x100000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa1100000 0 0xf00000>;
>> +			no-map;
>> +		};
>> +
>> +		rtos_ipc_memory_region: ipc-memories@a2000000 {
>> +			reg = <0x00 0xa2000000 0x00 0x00200000>;
>> +			alignment = <0x1000>;
>> +			no-map;
>> +		};
>> +	};
>> +
>> +	gpio_leds {
> 
> just 'leds'?
> 
>> +		compatible = "gpio-leds";
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&leds_pins_default>;
>> +
>> +		status-led-red {
>> +			gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>;
>> +			panic-indicator;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		status-led-green {
>> +			gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led1-red {
>> +			gpios = <&pcal9535_3 14 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led1-green {
>> +			gpios = <&pcal9535_2 15 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led2-red {
>> +			gpios = <&wkup_gpio0 17 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led2-green {
>> +			gpios = <&wkup_gpio0 22 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
> 
> are you sure this is "gpio" ? dtbs_check reports should be one of:
> 	['backlight', 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']

Good point, never checked. None of them has a default trigger, in fact.

>> +		};
>> +	};
>> +
>> +	dp_refclk: clock {
>> +		compatible = "fixed-clock";
>> +		#clock-cells = <0>;
>> +		clock-frequency = <19200000>;
>> +	};
>> +};
>> +
>> +&wkup_pmx0 {
>> +	wkup_i2c0_pins_default: wkup_i2c0_pins_default {
> 
> 	Here, and else where:
> 		wkup_i2c0_pins_default: wkup-i2c0-pins-default
> 
> Prefer we dont use _ in node names (rest of the pinmux node names as
> 		well).
> 
>> +		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_IOPAD(0x0070, PIN_INPUT,  5)  /* (R25) I2C2_SDA */
> 
> [... similar issues with '_' elsewhere.. ]
> 
>> +		>;
>> +	};
>> +};
>> +
>> +&main_pmx1 {
>> +	main_i2c0_pins_default: main-i2c0-pins-default {
> 
> 	these look fine..
> 
>> +		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 */
>> +		>;
>> +	};
>> +
>> +	ecap0_pins_default: ecap0-pins-default {
>> +		pinctrl-single,pins = <
>> +			AM65X_IOPAD(0x0010, PIN_INPUT,  0)  /* (D21) ECAP0_IN_APWM_OUT */
>> +		>;
>> +	};
>> +};
>> +
>> +&wkup_uart0 {
>> +	/* Wakeup UART is used by System firmware */
>> +	status = "disabled";
> In case of reservation for firmware usage:
> status = "reserved";
> 

Ah, ok.

> [...]
> 
>> +
>> +&wkup_gpio0 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <
>> +		&arduino_io_d2_to_d3_pins_default
>> +		&arduino_i2c_aio_switch_pins_default
>> +		&arduino_io_oe_pins_default
>> +		&push_button_pins_default
>> +		&db9_com_mode_pins_default
>> +	>;
>> +	gpio-line-names =
>> +		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
>> +			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
>> +		"", "", "", "", "", "", "", "", "", "",
>> +		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
>> +		"IO1", "IO2", "", "IO3", "IO17-direction",
>> +			"A5", "IO16-direction", "IO15-direction",
>> +			"IO14-direction", "A3",
>> +		"", "IO18-direction", "A4", "A2", "A1",
>> +			"A0", "", "", "IO13", "IO11",
>> +		"IO12", "IO10";
> 
> Any chance of intending this consistently?

There is in fact a plan behind this way: I intended every 10 entries, to
ease counting the pins (and that proved to be valuable more than once
already).

> 
>> +};
>> +
>> +&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>;
>> +
>> +	psu: tps62363@60 {
>> +		compatible = "ti,tps62363";
>> +		reg =  <0x60>;
>> +		regulator-name = "tps62363-vout";
>> +		regulator-min-microvolt = <500000>;
>> +		regulator-max-microvolt = <1500000>;
>> +		regulator-boot-on;
>> +		/* ti,vsel0-gpio = <&gpio1 16 0>; */
>> +		/* ti,vsel1-gpio = <&gpio1 17 0>; */
> 
> Could you drop the commented out properties: above and later?
> 

Sure, missed that. Will first check again where that came from.

>> +		ti,vsel0-state-high;
>> +		ti,vsel1-state-high;
>> +		/* ti,enable-pull-down; */
>> +		/* ti,enable-force-pwm; */
>> +		ti,enable-vout-discharge;
>> +	};
>> +
>> +	/*D4200*/
> Add a space prefix and postfix? (here and below)
> /* D4200 */
> 
>> +	pcal9535_1: gpio@20 {
>> +		compatible = "nxp,pcal9535";
>> +		reg = <0x20>;
>> +		#gpio-cells = <2>;
>> +		gpio-controller;
>> +		gpio-line-names =
>> +			"A0-pull", "A1-pull", "A2-pull", "A3-pull", "A4-pull",
>> +			"A5-pull", "", "",
>> +			"IO14-enable", "IO15-enable", "IO16-enable",
>> +			"IO17-enable", "IO18-enable", "IO19-enable";
>> +	};
>> +
>> +	/*D4201*/
>> +	pcal9535_2: gpio@21 {
>> +		compatible = "nxp,pcal9535";
>> +		reg = <0x21>;
>> +		#gpio-cells = <2>;
>> +		gpio-controller;
>> +		gpio-line-names =
>> +			"IO0-direction", "IO1-direction", "IO2-direction",
>> +			"IO3-direction", "IO4-direction", "IO5-direction",
>> +			"IO6-direction", "IO7-direction",
>> +			"IO8-direction", "IO9-direction", "IO10-direction",
>> +			"IO11-direction", "IO12-direction", "IO13-direction",
>> +			"IO19-direction";
>> +	};
>> +
> 
> 	[...]
> 
>> +
>> +&pcie1_rc {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&minipcie_pins_default>;
>> +
>> +	num-lanes = <1>;
>> +	phys = <&serdes1 PHY_TYPE_PCIE 0>;
>> +	phy-names = "pcie-phy0";
>> +	reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>;
> 
> schema seems to want a device_type, and there seems to be some warnings
> 	on serdes as well.. might be something to check up on..
> 

Will try to understand. Maybe something changed between the BSP kernel
where we are coming from and the final upstream bindings, and I missed that.

>> +};
>> +
>> +&pcie1_ep {
>> +	status = "disabled";
>> +};
>> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>> new file mode 100644
>> index 000000000000..bb9ab4fdd74e
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>> @@ -0,0 +1,56 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) Siemens AG, 2018-2021
>> + *
> 
> Will be nice to explain the difference between basic and advanced dts.
> 
> Are they two different boards? looks like the basic is using a part spin
> with a single cluster, perhaps? I guess links might help..

The main difference was mentioned in the commit message: AM6528 vs.
AM6548 (dual-core, single-cluster vs. quad-core, dual-cluster).

The Advanced also has 16G eMMC, 2 GB RAM (instead of 1) and exploits
some security features (which leads to different external UART
connectivity). Will add that to the respective dts file headers.

> 
>> + * Authors:
>> + *   Le Jin <le.jin@siemens.com>
>> + *   Jan Kiszka <jan.kiszk@siemens.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "k3-am65-iot2050-common.dtsi"
>> +
>> +/ {
>> +	compatible = "siemens,iot2050-basic", "ti,am654";
>> +	model = "SIMATIC IOT2050 Basic";
>> +
>> +	memory@80000000 {
>> +		device_type = "memory";
>> +		/* 1G RAM */
>> +		reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
>> +	};
>> +
>> +	cpus {
>> +		cpu-map {
>> +			/delete-node/ cluster1;
>> +		};
>> +		/delete-node/ cpu@100;
>> +		/delete-node/ cpu@101;
>> +	};
> 
> Personally, I'd prefer this (handling efuse spins in board files or
> even overlays) instead of having to create 100s of dtsi per SoC for
> every permutation & combination of TI efused devices and handle these
> in board files. I do see examples of similar usage elsewhere in:
> 
> $ git grep /delete-node/ arch/arm64/boot/dts/
> 
> But, if someone has a different opinion, feel free to pipe up with a
> reasonable way to prevent file explosion.
> 
>> +};
>> +
>> +/* 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 */
>> +		>;
>> +	};
>> +};
>> +
>> +&main_uart0 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&main_uart0_pins_default>;
>> +};
>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>> new file mode 100644
>> index 000000000000..aa1ef081ef22
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>> @@ -0,0 +1,57 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) Siemens AG, 2018-2021
>> + *
>> + * Authors:
>> + *   Le Jin <le.jin@siemens.com>
>> + *   Jan Kiszka <jan.kiszk@siemens.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "k3-am65-iot2050-common.dtsi"
> [...]
> 

Thanks for the review! Will come up with v2 soon, once all the points
are resolved.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
@ 2021-02-09 17:40     ` Jan Kiszka
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2021-02-09 17:40 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: devicetree, Tero Kristo, Le Jin, Linux Kernel Mailing List,
	Rob Herring, Bao Cheng Su, linux-arm-kernel

On 09.02.21 15:44, Nishanth Menon wrote:
> Jan,
> 
> A few quick scan comments below, you might need to post based off
> 5.12-rc1 once available..
> 
> Also, I see a bit of warnings with dtbs_check, which probably needs a
> little more digging into (pcie insists to get a device_type property,
> etc..)
> 
> you could use kernel_patch_verify or https://github.com/nmenon/kernel_patch_verify/blob/master/Dockerbuild.md
> 
> it throws up a report like this https://pastebin.ubuntu.com/p/SdkZr432z3/
> 

Ok, will have a look - is that checkpatch on steroids?

> So, many of my comments below are just first pass parse of that log -> I
> usually do recommend building with W=2 and dtbs_check (with yamlint etc)
> to make sure things are a bit sane. Will be good to have additional
> eyes.
> 
> On 11:21-20210209, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Add support for two Siemens SIMATIC IOT2050 variants, Basic and
>> Advanced. They are based on the TI AM6528 and AM6548 SOCs.
>>
>> Based on original version by Le Jin.
> 
> Might be good to add links to the boards as well (if available), for
> future reference.
> 

Sure, though stability of links is not under my control. But I could
additionally drop https://github.com/siemens/meta-iot2050 here.

>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
> 
> Will be nice to see at least a pastebin link for a bootlog on the boards
> in the cover-letter / diffstat section with the v2 - for reference.
> 

Sure.

>>  .../devicetree/bindings/arm/ti/k3.yaml        |   2 +
>>  arch/arm64/boot/dts/ti/Makefile               |   4 +
>>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 649 ++++++++++++++++++
>>  .../boot/dts/ti/k3-am6528-iot2050-basic.dts   |  56 ++
>>  .../dts/ti/k3-am6548-iot2050-advanced.dts     |  57 ++
>>  5 files changed, 768 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>
>> diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> index c6e1c1e63e43..b1ab0cf4a2d6 100644
>> --- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> +++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> @@ -23,6 +23,8 @@ properties:
>>          items:
>>            - enum:
>>                - ti,am654-evm
>> +              - siemens,iot2050-basic
>> +              - siemens,iot2050-advanced
> 
> - In a separate patch, ./Documentation/devicetree/bindings/vendor-prefixes.yaml -> Could you
>   make sure we add 'siemens' there?
> - and, lets move the bindings to it's own patch, since that is how Rob
>  prefers to review in https://patchwork.ozlabs.org/project/devicetree-bindings/list/
> 
> Both of these patches will need Rob to ack. I think I should be able
> to pick the first one up as well to reduce dependency, but we can
> check with Rob in case there is a preference.
> 

Ok.

>>            - const: ti,am654
>>  
>>        - description: K3 J721E SoC
>> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
>> index 65506f21ba30..928ea26ce250 100644
>> --- a/arch/arm64/boot/dts/ti/Makefile
>> +++ b/arch/arm64/boot/dts/ti/Makefile
>> @@ -8,6 +8,10 @@
>>  
>>  dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
>>  
> 
> - drop the EOL to club am65 dtbs close to each other
> 
>> +dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
>> +
> 
> - Drop this EOL as well. Something like this:
> 
> dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
> 
> dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
> 
>> +dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
>> +
>>  dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
>>  
>>  dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>> new file mode 100644
>> index 000000000000..de05937dbb60
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>> @@ -0,0 +1,649 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) Siemens AG, 2018-2021
>> + *
> 
> Optional: might be nice to add a oneliner comment for reuse scope..
> 

You mean something like "Common bits for IOT2050 basic and advanced boards"?

>> + * Authors:
>> + *   Le Jin <le.jin@siemens.com>
>> + *   Jan Kiszka <jan.kiszk@siemens.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "k3-am654.dtsi"
>> +#include <dt-bindings/phy/phy.h>
>> +
>> +/ {
>> +	aliases {
>> +		spi0 = &mcu_spi0;
>> +	};
>> +
>> +	chosen {
>> +		stdout-path = "serial3:115200n8";
>> +		bootargs = "earlycon=ns16550a,mmio32,0x02800000";
> 
> serial3 is main_uart1, did you mean 0x02810000 instead of 0x02800000 ?

Indeed, this is 0x02810000 here. We overwrote this in our image - will
fix this occurrence.

> 
>> +	};
>> +
>> +	reserved-memory {
>> +		#address-cells = <2>;
>> +		#size-cells = <2>;
>> +		ranges;
>> +
>> +		secure_ddr: secure_ddr@9e800000 {
> 
> "_" is not something we prefer for node names, so something like
> 	secure_ddr: secure-ddr@...
> 

Yeah, should be no problem to rename.

>> +			reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
>> +			alignment = <0x1000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa0000000 0 0x100000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa0100000 0 0xf00000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa1000000 0 0x100000>;
>> +			no-map;
>> +		};
>> +
>> +		mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
>> +			compatible = "shared-dma-pool";
>> +			reg = <0 0xa1100000 0 0xf00000>;
>> +			no-map;
>> +		};
>> +
>> +		rtos_ipc_memory_region: ipc-memories@a2000000 {
>> +			reg = <0x00 0xa2000000 0x00 0x00200000>;
>> +			alignment = <0x1000>;
>> +			no-map;
>> +		};
>> +	};
>> +
>> +	gpio_leds {
> 
> just 'leds'?
> 
>> +		compatible = "gpio-leds";
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&leds_pins_default>;
>> +
>> +		status-led-red {
>> +			gpios = <&wkup_gpio0 32 GPIO_ACTIVE_HIGH>;
>> +			panic-indicator;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		status-led-green {
>> +			gpios = <&wkup_gpio0 24 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led1-red {
>> +			gpios = <&pcal9535_3 14 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led1-green {
>> +			gpios = <&pcal9535_2 15 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led2-red {
>> +			gpios = <&wkup_gpio0 17 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
>> +		};
>> +
>> +		user-led2-green {
>> +			gpios = <&wkup_gpio0 22 GPIO_ACTIVE_HIGH>;
>> +			linux,default-trigger = "gpio";
> 
> are you sure this is "gpio" ? dtbs_check reports should be one of:
> 	['backlight', 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']

Good point, never checked. None of them has a default trigger, in fact.

>> +		};
>> +	};
>> +
>> +	dp_refclk: clock {
>> +		compatible = "fixed-clock";
>> +		#clock-cells = <0>;
>> +		clock-frequency = <19200000>;
>> +	};
>> +};
>> +
>> +&wkup_pmx0 {
>> +	wkup_i2c0_pins_default: wkup_i2c0_pins_default {
> 
> 	Here, and else where:
> 		wkup_i2c0_pins_default: wkup-i2c0-pins-default
> 
> Prefer we dont use _ in node names (rest of the pinmux node names as
> 		well).
> 
>> +		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_IOPAD(0x0070, PIN_INPUT,  5)  /* (R25) I2C2_SDA */
> 
> [... similar issues with '_' elsewhere.. ]
> 
>> +		>;
>> +	};
>> +};
>> +
>> +&main_pmx1 {
>> +	main_i2c0_pins_default: main-i2c0-pins-default {
> 
> 	these look fine..
> 
>> +		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 */
>> +		>;
>> +	};
>> +
>> +	ecap0_pins_default: ecap0-pins-default {
>> +		pinctrl-single,pins = <
>> +			AM65X_IOPAD(0x0010, PIN_INPUT,  0)  /* (D21) ECAP0_IN_APWM_OUT */
>> +		>;
>> +	};
>> +};
>> +
>> +&wkup_uart0 {
>> +	/* Wakeup UART is used by System firmware */
>> +	status = "disabled";
> In case of reservation for firmware usage:
> status = "reserved";
> 

Ah, ok.

> [...]
> 
>> +
>> +&wkup_gpio0 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <
>> +		&arduino_io_d2_to_d3_pins_default
>> +		&arduino_i2c_aio_switch_pins_default
>> +		&arduino_io_oe_pins_default
>> +		&push_button_pins_default
>> +		&db9_com_mode_pins_default
>> +	>;
>> +	gpio-line-names =
>> +		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
>> +			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
>> +		"", "", "", "", "", "", "", "", "", "",
>> +		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
>> +		"IO1", "IO2", "", "IO3", "IO17-direction",
>> +			"A5", "IO16-direction", "IO15-direction",
>> +			"IO14-direction", "A3",
>> +		"", "IO18-direction", "A4", "A2", "A1",
>> +			"A0", "", "", "IO13", "IO11",
>> +		"IO12", "IO10";
> 
> Any chance of intending this consistently?

There is in fact a plan behind this way: I intended every 10 entries, to
ease counting the pins (and that proved to be valuable more than once
already).

> 
>> +};
>> +
>> +&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>;
>> +
>> +	psu: tps62363@60 {
>> +		compatible = "ti,tps62363";
>> +		reg =  <0x60>;
>> +		regulator-name = "tps62363-vout";
>> +		regulator-min-microvolt = <500000>;
>> +		regulator-max-microvolt = <1500000>;
>> +		regulator-boot-on;
>> +		/* ti,vsel0-gpio = <&gpio1 16 0>; */
>> +		/* ti,vsel1-gpio = <&gpio1 17 0>; */
> 
> Could you drop the commented out properties: above and later?
> 

Sure, missed that. Will first check again where that came from.

>> +		ti,vsel0-state-high;
>> +		ti,vsel1-state-high;
>> +		/* ti,enable-pull-down; */
>> +		/* ti,enable-force-pwm; */
>> +		ti,enable-vout-discharge;
>> +	};
>> +
>> +	/*D4200*/
> Add a space prefix and postfix? (here and below)
> /* D4200 */
> 
>> +	pcal9535_1: gpio@20 {
>> +		compatible = "nxp,pcal9535";
>> +		reg = <0x20>;
>> +		#gpio-cells = <2>;
>> +		gpio-controller;
>> +		gpio-line-names =
>> +			"A0-pull", "A1-pull", "A2-pull", "A3-pull", "A4-pull",
>> +			"A5-pull", "", "",
>> +			"IO14-enable", "IO15-enable", "IO16-enable",
>> +			"IO17-enable", "IO18-enable", "IO19-enable";
>> +	};
>> +
>> +	/*D4201*/
>> +	pcal9535_2: gpio@21 {
>> +		compatible = "nxp,pcal9535";
>> +		reg = <0x21>;
>> +		#gpio-cells = <2>;
>> +		gpio-controller;
>> +		gpio-line-names =
>> +			"IO0-direction", "IO1-direction", "IO2-direction",
>> +			"IO3-direction", "IO4-direction", "IO5-direction",
>> +			"IO6-direction", "IO7-direction",
>> +			"IO8-direction", "IO9-direction", "IO10-direction",
>> +			"IO11-direction", "IO12-direction", "IO13-direction",
>> +			"IO19-direction";
>> +	};
>> +
> 
> 	[...]
> 
>> +
>> +&pcie1_rc {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&minipcie_pins_default>;
>> +
>> +	num-lanes = <1>;
>> +	phys = <&serdes1 PHY_TYPE_PCIE 0>;
>> +	phy-names = "pcie-phy0";
>> +	reset-gpios = <&wkup_gpio0 27 GPIO_ACTIVE_HIGH>;
> 
> schema seems to want a device_type, and there seems to be some warnings
> 	on serdes as well.. might be something to check up on..
> 

Will try to understand. Maybe something changed between the BSP kernel
where we are coming from and the final upstream bindings, and I missed that.

>> +};
>> +
>> +&pcie1_ep {
>> +	status = "disabled";
>> +};
>> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>> new file mode 100644
>> index 000000000000..bb9ab4fdd74e
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
>> @@ -0,0 +1,56 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) Siemens AG, 2018-2021
>> + *
> 
> Will be nice to explain the difference between basic and advanced dts.
> 
> Are they two different boards? looks like the basic is using a part spin
> with a single cluster, perhaps? I guess links might help..

The main difference was mentioned in the commit message: AM6528 vs.
AM6548 (dual-core, single-cluster vs. quad-core, dual-cluster).

The Advanced also has 16G eMMC, 2 GB RAM (instead of 1) and exploits
some security features (which leads to different external UART
connectivity). Will add that to the respective dts file headers.

> 
>> + * Authors:
>> + *   Le Jin <le.jin@siemens.com>
>> + *   Jan Kiszka <jan.kiszk@siemens.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "k3-am65-iot2050-common.dtsi"
>> +
>> +/ {
>> +	compatible = "siemens,iot2050-basic", "ti,am654";
>> +	model = "SIMATIC IOT2050 Basic";
>> +
>> +	memory@80000000 {
>> +		device_type = "memory";
>> +		/* 1G RAM */
>> +		reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
>> +	};
>> +
>> +	cpus {
>> +		cpu-map {
>> +			/delete-node/ cluster1;
>> +		};
>> +		/delete-node/ cpu@100;
>> +		/delete-node/ cpu@101;
>> +	};
> 
> Personally, I'd prefer this (handling efuse spins in board files or
> even overlays) instead of having to create 100s of dtsi per SoC for
> every permutation & combination of TI efused devices and handle these
> in board files. I do see examples of similar usage elsewhere in:
> 
> $ git grep /delete-node/ arch/arm64/boot/dts/
> 
> But, if someone has a different opinion, feel free to pipe up with a
> reasonable way to prevent file explosion.
> 
>> +};
>> +
>> +/* 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 */
>> +		>;
>> +	};
>> +};
>> +
>> +&main_uart0 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&main_uart0_pins_default>;
>> +};
>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>> new file mode 100644
>> index 000000000000..aa1ef081ef22
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>> @@ -0,0 +1,57 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) Siemens AG, 2018-2021
>> + *
>> + * Authors:
>> + *   Le Jin <le.jin@siemens.com>
>> + *   Jan Kiszka <jan.kiszk@siemens.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include "k3-am65-iot2050-common.dtsi"
> [...]
> 

Thanks for the review! Will come up with v2 soon, once all the points
are resolved.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
  2021-02-09 17:40     ` Jan Kiszka
@ 2021-02-09 20:04       ` Nishanth Menon
  -1 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2021-02-09 20:04 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, devicetree,
	Linux Kernel Mailing List, Le Jin, Bao Cheng Su

On 18:40-20210209, Jan Kiszka wrote:
> On 09.02.21 15:44, Nishanth Menon wrote:
> > Jan,
> > 
> > A few quick scan comments below, you might need to post based off
> > 5.12-rc1 once available..
> > 
> > Also, I see a bit of warnings with dtbs_check, which probably needs a
> > little more digging into (pcie insists to get a device_type property,
> > etc..)
> > 
> > you could use kernel_patch_verify or https://github.com/nmenon/kernel_patch_verify/blob/master/Dockerbuild.md
> > 
> > it throws up a report like this https://pastebin.ubuntu.com/p/SdkZr432z3/
> > 
> 
> Ok, will have a look - is that checkpatch on steroids?

It does a bit more than execute checkpatch.. you can see the script 
https://github.com/nmenon/kernel_patch_verify/blob/master/kernel_patch_verify

as well, but depending on files, for example: with dts, it does a
dtbs_check, W=2 build, converts dtb to dts and back to dtb to wiggle out
as many issues that people seem to hit against..

There are other solutions out there (patman etc).. in effect just a
wrapper script around standard kernel based checkers..

> 
> > So, many of my comments below are just first pass parse of that log -> I
> > usually do recommend building with W=2 and dtbs_check (with yamlint etc)
> > to make sure things are a bit sane. Will be good to have additional
> > eyes.
> > 
> > On 11:21-20210209, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> Add support for two Siemens SIMATIC IOT2050 variants, Basic and
> >> Advanced. They are based on the TI AM6528 and AM6548 SOCs.
> >>
> >> Based on original version by Le Jin.
> > 
> > Might be good to add links to the boards as well (if available), for
> > future reference.
> > 
> 
> Sure, though stability of links is not under my control. But I could
> additionally drop https://github.com/siemens/meta-iot2050 here.

hmm.. Something of a reference for folks may be 5 or 10 years down the
road, as to answer "what is this board"? Upto you though..

[...]

> >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> >> new file mode 100644
> >> index 000000000000..de05937dbb60
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> >> @@ -0,0 +1,649 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * Copyright (c) Siemens AG, 2018-2021
> >> + *
> > 
> > Optional: might be nice to add a oneliner comment for reuse scope..
> > 
> 
> You mean something like "Common bits for IOT2050 basic and advanced boards"?

Yeah, that'd help.

[...]

> >> +	gpio-line-names =
> >> +		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
> >> +			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
> >> +		"", "", "", "", "", "", "", "", "", "",
> >> +		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
> >> +		"IO1", "IO2", "", "IO3", "IO17-direction",
> >> +			"A5", "IO16-direction", "IO15-direction",
> >> +			"IO14-direction", "A3",
> >> +		"", "IO18-direction", "A4", "A2", "A1",
> >> +			"A0", "", "", "IO13", "IO11",
> >> +		"IO12", "IO10";
> > 
> > Any chance of intending this consistently?
> 
> There is in fact a plan behind this way: I intended every 10 entries, to
> ease counting the pins (and that proved to be valuable more than once
> already).

AAAh.. interesting.. as long as you find it useful, I am ok with it.. it
was'nt obvious to me the first look..

[...]

> >> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> >> new file mode 100644
> >> index 000000000000..bb9ab4fdd74e
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> >> @@ -0,0 +1,56 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * Copyright (c) Siemens AG, 2018-2021
> >> + *
> >> +	cpus {
> >> +		cpu-map {
> >> +			/delete-node/ cluster1;
> >> +		};
> >> +		/delete-node/ cpu@100;
> >> +		/delete-node/ cpu@101;
> >> +	};
> > 
> > Personally, I'd prefer this (handling efuse spins in board files or
> > even overlays) instead of having to create 100s of dtsi per SoC for
> > every permutation & combination of TI efused devices and handle these
> > in board files. I do see examples of similar usage elsewhere in:
> > 
> > $ git grep /delete-node/ arch/arm64/boot/dts/
> > 
> > But, if someone has a different opinion, feel free to pipe up with a
> > reasonable way to prevent file explosion.
> > 

Just a side note to folks (since I got a couple of private poked
on this) -> if we do see a pattern going forward where the efuse
parts have more *upstream* boards coming online, we will consider
spawning off dtsi - but I don't see that yet and I don't really want
to create a explosion of real and imagined unused dtsi combinations
"just because someone might need it". There is always the overlay
option for all the other variants that may or maynot exist.

Jan, on patch itself: I might have missed an unused l2-cache (2nd
cluster) entry.. Might be good to check dtb-> dts and give it a glance
if the right set of nodes are present.

> >> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >> new file mode 100644
> >> index 000000000000..aa1ef081ef22
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >> @@ -0,0 +1,57 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * Copyright (c) Siemens AG, 2018-2021
> >> + *
> >> + * Authors:
> >> + *   Le Jin <le.jin@siemens.com>
> >> + *   Jan Kiszka <jan.kiszk@siemens.com>
> >> + */
> >> +
> >> +/dts-v1/;
> >> +
> >> +#include "k3-am65-iot2050-common.dtsi"
> > [...]
> > 
> 
> Thanks for the review! Will come up with v2 soon, once all the points
> are resolved.

Thanks Jan. Glad to see this moving :)

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards
@ 2021-02-09 20:04       ` Nishanth Menon
  0 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2021-02-09 20:04 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: devicetree, Tero Kristo, Le Jin, Linux Kernel Mailing List,
	Rob Herring, Bao Cheng Su, linux-arm-kernel

On 18:40-20210209, Jan Kiszka wrote:
> On 09.02.21 15:44, Nishanth Menon wrote:
> > Jan,
> > 
> > A few quick scan comments below, you might need to post based off
> > 5.12-rc1 once available..
> > 
> > Also, I see a bit of warnings with dtbs_check, which probably needs a
> > little more digging into (pcie insists to get a device_type property,
> > etc..)
> > 
> > you could use kernel_patch_verify or https://github.com/nmenon/kernel_patch_verify/blob/master/Dockerbuild.md
> > 
> > it throws up a report like this https://pastebin.ubuntu.com/p/SdkZr432z3/
> > 
> 
> Ok, will have a look - is that checkpatch on steroids?

It does a bit more than execute checkpatch.. you can see the script 
https://github.com/nmenon/kernel_patch_verify/blob/master/kernel_patch_verify

as well, but depending on files, for example: with dts, it does a
dtbs_check, W=2 build, converts dtb to dts and back to dtb to wiggle out
as many issues that people seem to hit against..

There are other solutions out there (patman etc).. in effect just a
wrapper script around standard kernel based checkers..

> 
> > So, many of my comments below are just first pass parse of that log -> I
> > usually do recommend building with W=2 and dtbs_check (with yamlint etc)
> > to make sure things are a bit sane. Will be good to have additional
> > eyes.
> > 
> > On 11:21-20210209, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> Add support for two Siemens SIMATIC IOT2050 variants, Basic and
> >> Advanced. They are based on the TI AM6528 and AM6548 SOCs.
> >>
> >> Based on original version by Le Jin.
> > 
> > Might be good to add links to the boards as well (if available), for
> > future reference.
> > 
> 
> Sure, though stability of links is not under my control. But I could
> additionally drop https://github.com/siemens/meta-iot2050 here.

hmm.. Something of a reference for folks may be 5 or 10 years down the
road, as to answer "what is this board"? Upto you though..

[...]

> >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> >> new file mode 100644
> >> index 000000000000..de05937dbb60
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> >> @@ -0,0 +1,649 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * Copyright (c) Siemens AG, 2018-2021
> >> + *
> > 
> > Optional: might be nice to add a oneliner comment for reuse scope..
> > 
> 
> You mean something like "Common bits for IOT2050 basic and advanced boards"?

Yeah, that'd help.

[...]

> >> +	gpio-line-names =
> >> +		"wkup_gpio0-base", "", "", "", "UART0-mode1", "UART0-mode0",
> >> +			"UART0-enable", "UART0-terminate", "", "WIFI-disable",
> >> +		"", "", "", "", "", "", "", "", "", "",
> >> +		"", "A4A5-I2C-mux", "", "", "", "USER-button", "", "", "","IO0",
> >> +		"IO1", "IO2", "", "IO3", "IO17-direction",
> >> +			"A5", "IO16-direction", "IO15-direction",
> >> +			"IO14-direction", "A3",
> >> +		"", "IO18-direction", "A4", "A2", "A1",
> >> +			"A0", "", "", "IO13", "IO11",
> >> +		"IO12", "IO10";
> > 
> > Any chance of intending this consistently?
> 
> There is in fact a plan behind this way: I intended every 10 entries, to
> ease counting the pins (and that proved to be valuable more than once
> already).

AAAh.. interesting.. as long as you find it useful, I am ok with it.. it
was'nt obvious to me the first look..

[...]

> >> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> >> new file mode 100644
> >> index 000000000000..bb9ab4fdd74e
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> >> @@ -0,0 +1,56 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * Copyright (c) Siemens AG, 2018-2021
> >> + *
> >> +	cpus {
> >> +		cpu-map {
> >> +			/delete-node/ cluster1;
> >> +		};
> >> +		/delete-node/ cpu@100;
> >> +		/delete-node/ cpu@101;
> >> +	};
> > 
> > Personally, I'd prefer this (handling efuse spins in board files or
> > even overlays) instead of having to create 100s of dtsi per SoC for
> > every permutation & combination of TI efused devices and handle these
> > in board files. I do see examples of similar usage elsewhere in:
> > 
> > $ git grep /delete-node/ arch/arm64/boot/dts/
> > 
> > But, if someone has a different opinion, feel free to pipe up with a
> > reasonable way to prevent file explosion.
> > 

Just a side note to folks (since I got a couple of private poked
on this) -> if we do see a pattern going forward where the efuse
parts have more *upstream* boards coming online, we will consider
spawning off dtsi - but I don't see that yet and I don't really want
to create a explosion of real and imagined unused dtsi combinations
"just because someone might need it". There is always the overlay
option for all the other variants that may or maynot exist.

Jan, on patch itself: I might have missed an unused l2-cache (2nd
cluster) entry.. Might be good to check dtb-> dts and give it a glance
if the right set of nodes are present.

> >> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >> new file mode 100644
> >> index 000000000000..aa1ef081ef22
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >> @@ -0,0 +1,57 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * Copyright (c) Siemens AG, 2018-2021
> >> + *
> >> + * Authors:
> >> + *   Le Jin <le.jin@siemens.com>
> >> + *   Jan Kiszka <jan.kiszk@siemens.com>
> >> + */
> >> +
> >> +/dts-v1/;
> >> +
> >> +#include "k3-am65-iot2050-common.dtsi"
> > [...]
> > 
> 
> Thanks for the review! Will come up with v2 soon, once all the points
> are resolved.

Thanks Jan. Glad to see this moving :)

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-10  0:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 10:21 [PATCH] arm64: dts: ti: Add support for Siemens IOT2050 boards Jan Kiszka
2021-02-09 10:21 ` Jan Kiszka
2021-02-09 14:44 ` Nishanth Menon
2021-02-09 14:44   ` Nishanth Menon
2021-02-09 17:40   ` Jan Kiszka
2021-02-09 17:40     ` Jan Kiszka
2021-02-09 20:04     ` Nishanth Menon
2021-02-09 20:04       ` Nishanth Menon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.