linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: dts: Update IOT2050 boards
@ 2021-09-07 14:22 Jan Kiszka
  2021-09-07 14:22 ` [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices Jan Kiszka
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 14:22 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree, Bao Cheng Su, Chao Zeng

This enhances the DTs for the IOT2050, primarily by added support for
upcoming Production Generation 2 (PG2) and by ordering the MMC devices
consistently across variants.

Jan

Jan Kiszka (3):
  arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  arm64: dts: ti: iot2050: Disable SR2.0-only PRUs
  arm64: dts: ti: iot2050: Add support for product generation 2 boards

 arch/arm64/boot/dts/ti/Makefile               |  2 +
 .../dts/ti/k3-am65-iot2050-common-pg1.dtsi    | 46 ++++++++++++++++
 .../dts/ti/k3-am65-iot2050-common-pg2.dtsi    | 51 ++++++++++++++++++
 .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 11 +---
 ...ts => k3-am6528-iot2050-basic-common.dtsi} | 12 ++---
 .../dts/ti/k3-am6528-iot2050-basic-pg2.dts    | 21 ++++++++
 .../boot/dts/ti/k3-am6528-iot2050-basic.dts   | 53 ++-----------------
 ...=> k3-am6548-iot2050-advanced-common.dtsi} | 11 ++--
 .../dts/ti/k3-am6548-iot2050-advanced-pg2.dts | 26 +++++++++
 .../dts/ti/k3-am6548-iot2050-advanced.dts     | 47 ++--------------
 10 files changed, 165 insertions(+), 115 deletions(-)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
 copy arch/arm64/boot/dts/ti/{k3-am6528-iot2050-basic.dts => k3-am6528-iot2050-basic-common.dtsi} (80%)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
 copy arch/arm64/boot/dts/ti/{k3-am6548-iot2050-advanced.dts => k3-am6548-iot2050-advanced-common.dtsi} (86%)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts

-- 
2.31.1


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

* [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 14:22 [PATCH 0/3] arm64: dts: Update IOT2050 boards Jan Kiszka
@ 2021-09-07 14:22 ` Jan Kiszka
  2021-09-07 15:13   ` Nishanth Menon
  2021-09-07 14:22 ` [PATCH 2/3] arm64: dts: ti: iot2050: Disable SR2.0-only PRUs Jan Kiszka
  2021-09-07 14:22 ` [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards Jan Kiszka
  2 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 14:22 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree, Bao Cheng Su, Chao Zeng

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

This ensures that the SD card will remain mmc0 across Basic and Advanced
devices, also avoiding surprises for users coming from the downstream
kernels.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
index ec9617c13cdb..d1d5278e0b94 100644
--- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
+++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
+	aliases {
+		mmc0 = &sdhci1;
+		mmc1 = &sdhci0;
+	};
+
 	memory@80000000 {
 		device_type = "memory";
 		/* 2G RAM */
-- 
2.31.1


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

* [PATCH 2/3] arm64: dts: ti: iot2050: Disable SR2.0-only PRUs
  2021-09-07 14:22 [PATCH 0/3] arm64: dts: Update IOT2050 boards Jan Kiszka
  2021-09-07 14:22 ` [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices Jan Kiszka
@ 2021-09-07 14:22 ` Jan Kiszka
  2021-09-07 14:22 ` [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards Jan Kiszka
  2 siblings, 0 replies; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 14:22 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree, Bao Cheng Su, Chao Zeng

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

The IOT2050 devices described so far are using SR1.0 silicon, thus do
not have the additional PRUs of the ICSSG of the SR2.0. Disable them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
index da7d2be48f6f..fb3f3e4ed753 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
@@ -720,3 +720,27 @@ &icssg1_mdio {
 &icssg2_mdio {
 	status = "disabled";
 };
+
+&tx_pru0_0 {
+	status = "disabled";
+};
+
+&tx_pru0_1 {
+	status = "disabled";
+};
+
+&tx_pru1_0 {
+	status = "disabled";
+};
+
+&tx_pru1_1 {
+	status = "disabled";
+};
+
+&tx_pru2_0 {
+	status = "disabled";
+};
+
+&tx_pru2_1 {
+	status = "disabled";
+};
-- 
2.31.1


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

* [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards
  2021-09-07 14:22 [PATCH 0/3] arm64: dts: Update IOT2050 boards Jan Kiszka
  2021-09-07 14:22 ` [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices Jan Kiszka
  2021-09-07 14:22 ` [PATCH 2/3] arm64: dts: ti: iot2050: Disable SR2.0-only PRUs Jan Kiszka
@ 2021-09-07 14:22 ` Jan Kiszka
  2021-09-07 15:16   ` Nishanth Menon
  2 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 14:22 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring
  Cc: linux-arm-kernel, linux-kernel, devicetree, Bao Cheng Su, Chao Zeng

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

Product Generations 1 and 2 differ in the SOC revision which requires
separate device trees.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/arm64/boot/dts/ti/Makefile               |  2 +
 .../dts/ti/k3-am65-iot2050-common-pg1.dtsi    | 46 ++++++++++++++++
 .../dts/ti/k3-am65-iot2050-common-pg2.dtsi    | 51 ++++++++++++++++++
 .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 35 +-----------
 ...ts => k3-am6528-iot2050-basic-common.dtsi} | 12 ++---
 .../dts/ti/k3-am6528-iot2050-basic-pg2.dts    | 21 ++++++++
 .../boot/dts/ti/k3-am6528-iot2050-basic.dts   | 53 ++-----------------
 ...=> k3-am6548-iot2050-advanced-common.dtsi} |  8 +--
 .../dts/ti/k3-am6548-iot2050-advanced-pg2.dts | 26 +++++++++
 .../dts/ti/k3-am6548-iot2050-advanced.dts     | 52 ++----------------
 10 files changed, 161 insertions(+), 145 deletions(-)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
 copy arch/arm64/boot/dts/ti/{k3-am6528-iot2050-basic.dts => k3-am6528-iot2050-basic-common.dtsi} (80%)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
 copy arch/arm64/boot/dts/ti/{k3-am6548-iot2050-advanced.dts => k3-am6548-iot2050-advanced-common.dtsi} (86%)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts

diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index d56c742f5a10..41a4bc96e6bd 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -8,7 +8,9 @@
 
 dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic-pg2.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced-pg2.dtb
 
 dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
 
diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
new file mode 100644
index 000000000000..51f902fa35a7
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2021
+ *
+ * Authors:
+ *   Jan Kiszka <jan.kiszka@siemens.com>
+ *
+ * Common bits of the IOT2050 Basic and Advanced variants, PG1
+ */
+
+&dss {
+	assigned-clocks = <&k3_clks 67 2>;
+	assigned-clock-parents = <&k3_clks 67 5>;
+};
+
+&serdes0 {
+	status = "disabled";
+};
+
+&sdhci1 {
+	no-1-8-v;
+};
+
+&tx_pru0_0 {
+	status = "disabled";
+};
+
+&tx_pru0_1 {
+	status = "disabled";
+};
+
+&tx_pru1_0 {
+	status = "disabled";
+};
+
+&tx_pru1_1 {
+	status = "disabled";
+};
+
+&tx_pru2_0 {
+	status = "disabled";
+};
+
+&tx_pru2_1 {
+	status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
new file mode 100644
index 000000000000..2323628b0444
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2021
+ *
+ * Authors:
+ *   Chao Zeng <chao.zeng@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
+ *
+ * Common bits of the IOT2050 Basic and Advanced variants, PG2
+ */
+
+&main_pmx0 {
+	cp2102n_reset_pin_default: cp2102n_reset_pin_default {
+		pinctrl-single,pins = <
+			/* (AF12) GPIO1_24, used as cp2102 reset */
+			AM65X_IOPAD(0x01e0, PIN_OUTPUT, 7)
+		>;
+	};
+};
+
+&main_gpio1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cp2102n_reset_pin_default>;
+	gpio-line-names =
+		"", "", "", "", "", "", "", "", "", "",
+		"", "", "", "", "", "", "", "", "", "",
+		"", "", "", "", "CP2102N-RESET";
+};
+
+&dss {
+	/* Workaround needed to get DP clock of 154Mhz */
+	assigned-clocks = <&k3_clks 67 0>;
+};
+
+&serdes0 {
+	assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>;
+	assigned-clock-parents = <&k3_clks 153 7>, <&k3_clks 153 4>;
+};
+
+&dwc3_0 {
+	assigned-clock-parents = <&k3_clks 151 4>,  /* set REF_CLK to 20MHz i.e. PER0_PLL/48 */
+				 <&k3_clks 151 8>;  /* set PIPE3_TXB_CLK to WIZ8B2M4VSB */
+	phys = <&serdes0 PHY_TYPE_USB3 0>;
+	phy-names = "usb3-phy";
+};
+
+&usb0_phy {
+	maximum-speed = "super-speed";
+	snps,dis-u1-entry-quirk;
+	snps,dis-u2-entry-quirk;
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
index fb3f3e4ed753..47730fe3a797 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
@@ -4,13 +4,11 @@
  *
  * Authors:
  *   Le Jin <le.jin@siemens.com>
- *   Jan Kiszka <jan.kiszk@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
  *
- * Common bits of the IOT2050 Basic and Advanced variants
+ * Common bits of the IOT2050 Basic and Advanced variants, PG1 and PG2
  */
 
-/dts-v1/;
-
 #include "k3-am654.dtsi"
 #include <dt-bindings/phy/phy.h>
 
@@ -555,7 +553,6 @@ &sdhci1 {
 	pinctrl-0 = <&main_mmc1_pins_default>;
 	ti,driver-strength-ohm = <50>;
 	disable-wp;
-	no-1-8-v;
 };
 
 &usb0 {
@@ -635,10 +632,6 @@ dpi_out: endpoint {
 	};
 };
 
-&serdes0 {
-	status = "disabled";
-};
-
 &pcie0_rc {
 	status = "disabled";
 };
@@ -720,27 +713,3 @@ &icssg1_mdio {
 &icssg2_mdio {
 	status = "disabled";
 };
-
-&tx_pru0_0 {
-	status = "disabled";
-};
-
-&tx_pru0_1 {
-	status = "disabled";
-};
-
-&tx_pru1_0 {
-	status = "disabled";
-};
-
-&tx_pru1_1 {
-	status = "disabled";
-};
-
-&tx_pru2_0 {
-	status = "disabled";
-};
-
-&tx_pru2_1 {
-	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-common.dtsi
similarity index 80%
copy from arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
copy to arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-common.dtsi
index 94bb5dd39122..4a9bf7d7c07d 100644
--- a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
+++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-common.dtsi
@@ -4,20 +4,14 @@
  *
  * Authors:
  *   Le Jin <le.jin@siemens.com>
- *   Jan Kiszka <jan.kiszk@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
  *
- * AM6528-based (dual-core) IOT2050 Basic variant
- * 1 GB RAM, no eMMC, main_uart0 on connector X30
+ * Common bits of the IOT2050 Basic variant, PG1 and PG2
  */
 
-/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 */
@@ -61,6 +55,6 @@ &main_uart0 {
 };
 
 &mcu_r5fss0 {
-	/* lock-step mode not supported on this board */
+	/* lock-step mode not supported on Basic boards */
 	ti,cluster-mode = <0>;
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
new file mode 100644
index 000000000000..5ce609dd49ad
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
+ *
+ * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 2
+ * 1 GB RAM, no eMMC, main_uart0 on connector X30
+ */
+
+/dts-v1/;
+
+#include "k3-am6528-iot2050-basic-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-basic-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Basic PG2";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
index 94bb5dd39122..368a25d449a9 100644
--- a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
+++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
@@ -4,63 +4,18 @@
  *
  * Authors:
  *   Le Jin <le.jin@siemens.com>
- *   Jan Kiszka <jan.kiszk@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
  *
- * AM6528-based (dual-core) IOT2050 Basic variant
+ * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 1
  * 1 GB RAM, no eMMC, main_uart0 on connector X30
  */
 
 /dts-v1/;
 
-#include "k3-am65-iot2050-common.dtsi"
+#include "k3-am6528-iot2050-basic-common.dtsi"
+#include "k3-am65-iot2050-common-pg1.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;
-	};
-
-	/delete-node/ l2-cache1;
-};
-
-/* 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>;
-};
-
-&mcu_r5fss0 {
-	/* lock-step mode not supported on this board */
-	ti,cluster-mode = <0>;
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi
similarity index 86%
copy from arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
copy to arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi
index d1d5278e0b94..d5fa660a2abe 100644
--- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
+++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi
@@ -4,10 +4,9 @@
  *
  * Authors:
  *   Le Jin <le.jin@siemens.com>
- *   Jan Kiszka <jan.kiszk@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
  *
- * AM6548-based (quad-core) IOT2050 Advanced variant
- * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
+ * Common bits of the IOT2050 Advanced variant, PG1 and PG2
  */
 
 /dts-v1/;
@@ -15,9 +14,6 @@
 #include "k3-am65-iot2050-common.dtsi"
 
 / {
-	compatible = "siemens,iot2050-advanced", "ti,am654";
-	model = "SIMATIC IOT2050 Advanced";
-
 	aliases {
 		mmc0 = &sdhci1;
 		mmc1 = &sdhci0;
diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts
new file mode 100644
index 000000000000..066390616b4d
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <le.jin@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
+ *
+ * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 2
+ * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
+ */
+
+/dts-v1/;
+
+#include "k3-am6548-iot2050-advanced-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-advanced-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Advanced PG2";
+};
+
+&mcu_r5fss0 {
+	/* lock-step mode not supported on this board */
+	ti,cluster-mode = <0>;
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
index d1d5278e0b94..7ee5e4942c07 100644
--- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
+++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
@@ -4,62 +4,18 @@
  *
  * Authors:
  *   Le Jin <le.jin@siemens.com>
- *   Jan Kiszka <jan.kiszk@siemens.com>
+ *   Jan Kiszka <jan.kiszka@siemens.com>
  *
- * AM6548-based (quad-core) IOT2050 Advanced variant
+ * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 1
  * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
  */
 
 /dts-v1/;
 
-#include "k3-am65-iot2050-common.dtsi"
+#include "k3-am6548-iot2050-advanced-common.dtsi"
+#include "k3-am65-iot2050-common-pg1.dtsi"
 
 / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
-
-	aliases {
-		mmc0 = &sdhci1;
-		mmc1 = &sdhci0;
-	};
-
-	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.31.1


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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 14:22 ` [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices Jan Kiszka
@ 2021-09-07 15:13   ` Nishanth Menon
  2021-09-07 15:20     ` Jan Kiszka
  0 siblings, 1 reply; 17+ messages in thread
From: Nishanth Menon @ 2021-09-07 15:13 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 16:22-20210907, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> This ensures that the SD card will remain mmc0 across Basic and Advanced
> devices, also avoiding surprises for users coming from the downstream
> kernels.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> index ec9617c13cdb..d1d5278e0b94 100644
> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> @@ -18,6 +18,11 @@ / {
>  	compatible = "siemens,iot2050-advanced", "ti,am654";
>  	model = "SIMATIC IOT2050 Advanced";
>  
> +	aliases {
> +		mmc0 = &sdhci1;
> +		mmc1 = &sdhci0;
> +	};


Should we do this at SoC level?
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards
  2021-09-07 14:22 ` [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards Jan Kiszka
@ 2021-09-07 15:16   ` Nishanth Menon
  2021-09-07 15:27     ` Jan Kiszka
  0 siblings, 1 reply; 17+ messages in thread
From: Nishanth Menon @ 2021-09-07 15:16 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 16:22-20210907, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Product Generations 1 and 2 differ in the SOC revision which requires
> separate device trees.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  arch/arm64/boot/dts/ti/Makefile               |  2 +
>  .../dts/ti/k3-am65-iot2050-common-pg1.dtsi    | 46 ++++++++++++++++
>  .../dts/ti/k3-am65-iot2050-common-pg2.dtsi    | 51 ++++++++++++++++++
>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 35 +-----------
>  ...ts => k3-am6528-iot2050-basic-common.dtsi} | 12 ++---
>  .../dts/ti/k3-am6528-iot2050-basic-pg2.dts    | 21 ++++++++
>  .../boot/dts/ti/k3-am6528-iot2050-basic.dts   | 53 ++-----------------
>  ...=> k3-am6548-iot2050-advanced-common.dtsi} |  8 +--
>  .../dts/ti/k3-am6548-iot2050-advanced-pg2.dts | 26 +++++++++
>  .../dts/ti/k3-am6548-iot2050-advanced.dts     | 52 ++----------------
>  10 files changed, 161 insertions(+), 145 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
>  copy arch/arm64/boot/dts/ti/{k3-am6528-iot2050-basic.dts => k3-am6528-iot2050-basic-common.dtsi} (80%)
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
>  copy arch/arm64/boot/dts/ti/{k3-am6548-iot2050-advanced.dts => k3-am6548-iot2050-advanced-common.dtsi} (86%)
>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts


Few things:

a) Could you split this patch so that the refactoring for SR1 is the
   first patch and then introduce the SR2?
b) Please call these as sr (silicon revision) rather than pg.
c) usual request: Please add urls for the board

> 
> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
> index d56c742f5a10..41a4bc96e6bd 100644
> --- a/arch/arm64/boot/dts/ti/Makefile
> +++ b/arch/arm64/boot/dts/ti/Makefile
> @@ -8,7 +8,9 @@
>  
>  dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb
>  dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb
> +dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic-pg2.dtb
>  dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb
> +dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced-pg2.dtb
>  
>  dtb-$(CONFIG_ARCH_K3) += k3-j721e-common-proc-board.dtb
>  
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
> new file mode 100644
> index 000000000000..51f902fa35a7
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
> @@ -0,0 +1,46 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2021
> + *
> + * Authors:
> + *   Jan Kiszka <jan.kiszka@siemens.com>
> + *
> + * Common bits of the IOT2050 Basic and Advanced variants, PG1
> + */
> +
> +&dss {
> +	assigned-clocks = <&k3_clks 67 2>;
> +	assigned-clock-parents = <&k3_clks 67 5>;
> +};
> +
> +&serdes0 {
> +	status = "disabled";
> +};
> +
> +&sdhci1 {
> +	no-1-8-v;
> +};
> +
> +&tx_pru0_0 {
> +	status = "disabled";
> +};
> +
> +&tx_pru0_1 {
> +	status = "disabled";
> +};
> +
> +&tx_pru1_0 {
> +	status = "disabled";
> +};
> +
> +&tx_pru1_1 {
> +	status = "disabled";
> +};
> +
> +&tx_pru2_0 {
> +	status = "disabled";
> +};
> +
> +&tx_pru2_1 {
> +	status = "disabled";
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
> new file mode 100644
> index 000000000000..2323628b0444
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
> @@ -0,0 +1,51 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2021
> + *
> + * Authors:
> + *   Chao Zeng <chao.zeng@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
> + *
> + * Common bits of the IOT2050 Basic and Advanced variants, PG2
> + */
> +
> +&main_pmx0 {
> +	cp2102n_reset_pin_default: cp2102n_reset_pin_default {
> +		pinctrl-single,pins = <
> +			/* (AF12) GPIO1_24, used as cp2102 reset */
> +			AM65X_IOPAD(0x01e0, PIN_OUTPUT, 7)
> +		>;
> +	};
> +};
> +
> +&main_gpio1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&cp2102n_reset_pin_default>;
> +	gpio-line-names =
> +		"", "", "", "", "", "", "", "", "", "",
> +		"", "", "", "", "", "", "", "", "", "",
> +		"", "", "", "", "CP2102N-RESET";
> +};
> +
> +&dss {
> +	/* Workaround needed to get DP clock of 154Mhz */
> +	assigned-clocks = <&k3_clks 67 0>;
> +};
> +
> +&serdes0 {
> +	assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>;
> +	assigned-clock-parents = <&k3_clks 153 7>, <&k3_clks 153 4>;
> +};
> +
> +&dwc3_0 {
> +	assigned-clock-parents = <&k3_clks 151 4>,  /* set REF_CLK to 20MHz i.e. PER0_PLL/48 */
> +				 <&k3_clks 151 8>;  /* set PIPE3_TXB_CLK to WIZ8B2M4VSB */
> +	phys = <&serdes0 PHY_TYPE_USB3 0>;
> +	phy-names = "usb3-phy";
> +};
> +
> +&usb0_phy {
> +	maximum-speed = "super-speed";
> +	snps,dis-u1-entry-quirk;
> +	snps,dis-u2-entry-quirk;
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> index fb3f3e4ed753..47730fe3a797 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> @@ -4,13 +4,11 @@
>   *
>   * Authors:
>   *   Le Jin <le.jin@siemens.com>
> - *   Jan Kiszka <jan.kiszk@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
>   *
> - * Common bits of the IOT2050 Basic and Advanced variants
> + * Common bits of the IOT2050 Basic and Advanced variants, PG1 and PG2
>   */
>  
> -/dts-v1/;
> -
>  #include "k3-am654.dtsi"
>  #include <dt-bindings/phy/phy.h>
>  
> @@ -555,7 +553,6 @@ &sdhci1 {
>  	pinctrl-0 = <&main_mmc1_pins_default>;
>  	ti,driver-strength-ohm = <50>;
>  	disable-wp;
> -	no-1-8-v;
>  };
>  
>  &usb0 {
> @@ -635,10 +632,6 @@ dpi_out: endpoint {
>  	};
>  };
>  
> -&serdes0 {
> -	status = "disabled";
> -};
> -
>  &pcie0_rc {
>  	status = "disabled";
>  };
> @@ -720,27 +713,3 @@ &icssg1_mdio {
>  &icssg2_mdio {
>  	status = "disabled";
>  };
> -
> -&tx_pru0_0 {
> -	status = "disabled";
> -};
> -
> -&tx_pru0_1 {
> -	status = "disabled";
> -};
> -
> -&tx_pru1_0 {
> -	status = "disabled";
> -};
> -
> -&tx_pru1_1 {
> -	status = "disabled";
> -};
> -
> -&tx_pru2_0 {
> -	status = "disabled";
> -};
> -
> -&tx_pru2_1 {
> -	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-common.dtsi
> similarity index 80%
> copy from arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> copy to arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-common.dtsi
> index 94bb5dd39122..4a9bf7d7c07d 100644
> --- a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-common.dtsi
> @@ -4,20 +4,14 @@
>   *
>   * Authors:
>   *   Le Jin <le.jin@siemens.com>
> - *   Jan Kiszka <jan.kiszk@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
>   *
> - * AM6528-based (dual-core) IOT2050 Basic variant
> - * 1 GB RAM, no eMMC, main_uart0 on connector X30
> + * Common bits of the IOT2050 Basic variant, PG1 and PG2
>   */
>  
> -/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 */
> @@ -61,6 +55,6 @@ &main_uart0 {
>  };
>  
>  &mcu_r5fss0 {
> -	/* lock-step mode not supported on this board */
> +	/* lock-step mode not supported on Basic boards */
>  	ti,cluster-mode = <0>;
>  };
> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
> new file mode 100644
> index 000000000000..5ce609dd49ad
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
> @@ -0,0 +1,21 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *
> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
> + *
> + * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 2
> + * 1 GB RAM, no eMMC, main_uart0 on connector X30
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am6528-iot2050-basic-common.dtsi"
> +#include "k3-am65-iot2050-common-pg2.dtsi"
> +
> +/ {
> +	compatible = "siemens,iot2050-basic-pg2", "ti,am654";
> +	model = "SIMATIC IOT2050 Basic PG2";
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> index 94bb5dd39122..368a25d449a9 100644
> --- a/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts
> @@ -4,63 +4,18 @@
>   *
>   * Authors:
>   *   Le Jin <le.jin@siemens.com>
> - *   Jan Kiszka <jan.kiszk@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
>   *
> - * AM6528-based (dual-core) IOT2050 Basic variant
> + * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 1
>   * 1 GB RAM, no eMMC, main_uart0 on connector X30
>   */
>  
>  /dts-v1/;
>  
> -#include "k3-am65-iot2050-common.dtsi"
> +#include "k3-am6528-iot2050-basic-common.dtsi"
> +#include "k3-am65-iot2050-common-pg1.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;
> -	};
> -
> -	/delete-node/ l2-cache1;
> -};
> -
> -/* 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>;
> -};
> -
> -&mcu_r5fss0 {
> -	/* lock-step mode not supported on this board */
> -	ti,cluster-mode = <0>;
>  };
> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi
> similarity index 86%
> copy from arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> copy to arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi
> index d1d5278e0b94..d5fa660a2abe 100644
> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi
> @@ -4,10 +4,9 @@
>   *
>   * Authors:
>   *   Le Jin <le.jin@siemens.com>
> - *   Jan Kiszka <jan.kiszk@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
>   *
> - * AM6548-based (quad-core) IOT2050 Advanced variant
> - * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
> + * Common bits of the IOT2050 Advanced variant, PG1 and PG2
>   */
>  
>  /dts-v1/;
> @@ -15,9 +14,6 @@
>  #include "k3-am65-iot2050-common.dtsi"
>  
>  / {
> -	compatible = "siemens,iot2050-advanced", "ti,am654";
> -	model = "SIMATIC IOT2050 Advanced";
> -
>  	aliases {
>  		mmc0 = &sdhci1;
>  		mmc1 = &sdhci0;
> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts
> new file mode 100644
> index 000000000000..066390616b4d
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) Siemens AG, 2018-2021
> + *
> + * Authors:
> + *   Le Jin <le.jin@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
> + *
> + * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 2
> + * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
> + */
> +
> +/dts-v1/;
> +
> +#include "k3-am6548-iot2050-advanced-common.dtsi"
> +#include "k3-am65-iot2050-common-pg2.dtsi"
> +
> +/ {
> +	compatible = "siemens,iot2050-advanced-pg2", "ti,am654";
> +	model = "SIMATIC IOT2050 Advanced PG2";
> +};
> +
> +&mcu_r5fss0 {
> +	/* lock-step mode not supported on this board */
> +	ti,cluster-mode = <0>;
> +};
> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> index d1d5278e0b94..7ee5e4942c07 100644
> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> @@ -4,62 +4,18 @@
>   *
>   * Authors:
>   *   Le Jin <le.jin@siemens.com>
> - *   Jan Kiszka <jan.kiszk@siemens.com>
> + *   Jan Kiszka <jan.kiszka@siemens.com>
>   *
> - * AM6548-based (quad-core) IOT2050 Advanced variant
> + * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 1
>   * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
>   */
>  
>  /dts-v1/;
>  
> -#include "k3-am65-iot2050-common.dtsi"
> +#include "k3-am6548-iot2050-advanced-common.dtsi"
> +#include "k3-am65-iot2050-common-pg1.dtsi"
>  
>  / {
>  	compatible = "siemens,iot2050-advanced", "ti,am654";
>  	model = "SIMATIC IOT2050 Advanced";
> -
> -	aliases {
> -		mmc0 = &sdhci1;
> -		mmc1 = &sdhci0;
> -	};
> -
> -	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.31.1
> 

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

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 15:13   ` Nishanth Menon
@ 2021-09-07 15:20     ` Jan Kiszka
  2021-09-07 15:27       ` Nishanth Menon
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 15:20 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 07.09.21 17:13, Nishanth Menon wrote:
> On 16:22-20210907, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> This ensures that the SD card will remain mmc0 across Basic and Advanced
>> devices, also avoiding surprises for users coming from the downstream
>> kernels.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>> index ec9617c13cdb..d1d5278e0b94 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>> @@ -18,6 +18,11 @@ / {
>>  	compatible = "siemens,iot2050-advanced", "ti,am654";
>>  	model = "SIMATIC IOT2050 Advanced";
>>  
>> +	aliases {
>> +		mmc0 = &sdhci1;
>> +		mmc1 = &sdhci0;
>> +	};
> 
> 
> Should we do this at SoC level?
> 

Well, I wouldn't mind - but that would also impact your EVMs. For us,
this is fine as we are coming from that ordering above with our
downstream kernel/dts.

Jan

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

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

* Re: [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards
  2021-09-07 15:16   ` Nishanth Menon
@ 2021-09-07 15:27     ` Jan Kiszka
  2021-09-07 15:37       ` Nishanth Menon
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 15:27 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 07.09.21 17:16, Nishanth Menon wrote:
> On 16:22-20210907, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Product Generations 1 and 2 differ in the SOC revision which requires
>> separate device trees.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  arch/arm64/boot/dts/ti/Makefile               |  2 +
>>  .../dts/ti/k3-am65-iot2050-common-pg1.dtsi    | 46 ++++++++++++++++
>>  .../dts/ti/k3-am65-iot2050-common-pg2.dtsi    | 51 ++++++++++++++++++
>>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 35 +-----------
>>  ...ts => k3-am6528-iot2050-basic-common.dtsi} | 12 ++---
>>  .../dts/ti/k3-am6528-iot2050-basic-pg2.dts    | 21 ++++++++
>>  .../boot/dts/ti/k3-am6528-iot2050-basic.dts   | 53 ++-----------------
>>  ...=> k3-am6548-iot2050-advanced-common.dtsi} |  8 +--
>>  .../dts/ti/k3-am6548-iot2050-advanced-pg2.dts | 26 +++++++++
>>  .../dts/ti/k3-am6548-iot2050-advanced.dts     | 52 ++----------------
>>  10 files changed, 161 insertions(+), 145 deletions(-)
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
>>  copy arch/arm64/boot/dts/ti/{k3-am6528-iot2050-basic.dts => k3-am6528-iot2050-basic-common.dtsi} (80%)
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
>>  copy arch/arm64/boot/dts/ti/{k3-am6548-iot2050-advanced.dts => k3-am6548-iot2050-advanced-common.dtsi} (86%)
>>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts
> 
> 
> Few things:
> 
> a) Could you split this patch so that the refactoring for SR1 is the
>    first patch and then introduce the SR2?

Can do, sure

> b) Please call these as sr (silicon revision) rather than pg.

Nope, this is only motivated by the SR1->SR2 switch. The new products
are called "PG2", and that is what the DT name must reflect. Took me a
while to grasp that as well.

> c) usual request: Please add urls for the board

Where should they go? I think there is only one reasonable to share:

https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html

If that is a stable link, I can't tell.

Thanks
Jan

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

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 15:20     ` Jan Kiszka
@ 2021-09-07 15:27       ` Nishanth Menon
  2021-09-07 15:30         ` Jan Kiszka
  0 siblings, 1 reply; 17+ messages in thread
From: Nishanth Menon @ 2021-09-07 15:27 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 17:20-20210907, Jan Kiszka wrote:
> On 07.09.21 17:13, Nishanth Menon wrote:
> > On 16:22-20210907, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> This ensures that the SD card will remain mmc0 across Basic and Advanced
> >> devices, also avoiding surprises for users coming from the downstream
> >> kernels.
> >>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
> >>  1 file changed, 5 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >> index ec9617c13cdb..d1d5278e0b94 100644
> >> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >> @@ -18,6 +18,11 @@ / {
> >>  	compatible = "siemens,iot2050-advanced", "ti,am654";
> >>  	model = "SIMATIC IOT2050 Advanced";
> >>  
> >> +	aliases {
> >> +		mmc0 = &sdhci1;
> >> +		mmc1 = &sdhci0;
> >> +	};
> > 
> > 
> > Should we do this at SoC level?
> > 
> 
> Well, I wouldn't mind - but that would also impact your EVMs. For us,
> this is fine as we are coming from that ordering above with our
> downstream kernel/dts.
> 

I think it'd probably be a welcome change. overall we've standardized on
partuuid.

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

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 15:27       ` Nishanth Menon
@ 2021-09-07 15:30         ` Jan Kiszka
  2021-09-07 15:35           ` Nishanth Menon
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 15:30 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 07.09.21 17:27, Nishanth Menon wrote:
> On 17:20-20210907, Jan Kiszka wrote:
>> On 07.09.21 17:13, Nishanth Menon wrote:
>>> On 16:22-20210907, Jan Kiszka wrote:
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> This ensures that the SD card will remain mmc0 across Basic and Advanced
>>>> devices, also avoiding surprises for users coming from the downstream
>>>> kernels.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
>>>>  1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>> index ec9617c13cdb..d1d5278e0b94 100644
>>>> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>> @@ -18,6 +18,11 @@ / {
>>>>  	compatible = "siemens,iot2050-advanced", "ti,am654";
>>>>  	model = "SIMATIC IOT2050 Advanced";
>>>>  
>>>> +	aliases {
>>>> +		mmc0 = &sdhci1;
>>>> +		mmc1 = &sdhci0;
>>>> +	};
>>>
>>>
>>> Should we do this at SoC level?
>>>
>>
>> Well, I wouldn't mind - but that would also impact your EVMs. For us,
>> this is fine as we are coming from that ordering above with our
>> downstream kernel/dts.
>>
> 
> I think it'd probably be a welcome change. overall we've standardized on
> partuuid.
> 

Yeah, it's more about "dd if=emmc.img of=/dev/mmcblk1 - damn, the wrong
one again."

Let me know what you prefer, and I'll update my patch.

Jan

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

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 15:30         ` Jan Kiszka
@ 2021-09-07 15:35           ` Nishanth Menon
  2021-09-07 16:47             ` Aswath Govindraju
  0 siblings, 1 reply; 17+ messages in thread
From: Nishanth Menon @ 2021-09-07 15:35 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 17:30-20210907, Jan Kiszka wrote:
> On 07.09.21 17:27, Nishanth Menon wrote:
> > On 17:20-20210907, Jan Kiszka wrote:
> >> On 07.09.21 17:13, Nishanth Menon wrote:
> >>> On 16:22-20210907, Jan Kiszka wrote:
> >>>> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>>>
> >>>> This ensures that the SD card will remain mmc0 across Basic and Advanced
> >>>> devices, also avoiding surprises for users coming from the downstream
> >>>> kernels.
> >>>>
> >>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>>> ---
> >>>>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
> >>>>  1 file changed, 5 insertions(+)
> >>>>
> >>>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >>>> index ec9617c13cdb..d1d5278e0b94 100644
> >>>> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >>>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >>>> @@ -18,6 +18,11 @@ / {
> >>>>  	compatible = "siemens,iot2050-advanced", "ti,am654";
> >>>>  	model = "SIMATIC IOT2050 Advanced";
> >>>>  
> >>>> +	aliases {
> >>>> +		mmc0 = &sdhci1;
> >>>> +		mmc1 = &sdhci0;
> >>>> +	};
> >>>
> >>>
> >>> Should we do this at SoC level?
> >>>
> >>
> >> Well, I wouldn't mind - but that would also impact your EVMs. For us,
> >> this is fine as we are coming from that ordering above with our
> >> downstream kernel/dts.
> >>
> > 
> > I think it'd probably be a welcome change. overall we've standardized on
> > partuuid.
> > 
> 
> Yeah, it's more about "dd if=emmc.img of=/dev/mmcblk1 - damn, the wrong
> one again."
> 
> Let me know what you prefer, and I'll update my patch.


Lets do it at SoC level. I will follow it up with a patch for other K3
SoCs as well.


Unless someone has a strong opinion on this approach - if so, speak up
with reasons.

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

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

* Re: [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards
  2021-09-07 15:27     ` Jan Kiszka
@ 2021-09-07 15:37       ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2021-09-07 15:37 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 17:27-20210907, Jan Kiszka wrote:
> On 07.09.21 17:16, Nishanth Menon wrote:
> > On 16:22-20210907, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> Product Generations 1 and 2 differ in the SOC revision which requires
> >> separate device trees.
> >>
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >>  arch/arm64/boot/dts/ti/Makefile               |  2 +
> >>  .../dts/ti/k3-am65-iot2050-common-pg1.dtsi    | 46 ++++++++++++++++
> >>  .../dts/ti/k3-am65-iot2050-common-pg2.dtsi    | 51 ++++++++++++++++++
> >>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 35 +-----------
> >>  ...ts => k3-am6528-iot2050-basic-common.dtsi} | 12 ++---
> >>  .../dts/ti/k3-am6528-iot2050-basic-pg2.dts    | 21 ++++++++
> >>  .../boot/dts/ti/k3-am6528-iot2050-basic.dts   | 53 ++-----------------
> >>  ...=> k3-am6548-iot2050-advanced-common.dtsi} |  8 +--
> >>  .../dts/ti/k3-am6548-iot2050-advanced-pg2.dts | 26 +++++++++
> >>  .../dts/ti/k3-am6548-iot2050-advanced.dts     | 52 ++----------------
> >>  10 files changed, 161 insertions(+), 145 deletions(-)
> >>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi
> >>  create mode 100644 arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi
> >>  copy arch/arm64/boot/dts/ti/{k3-am6528-iot2050-basic.dts => k3-am6528-iot2050-basic-common.dtsi} (80%)
> >>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts
> >>  copy arch/arm64/boot/dts/ti/{k3-am6548-iot2050-advanced.dts => k3-am6548-iot2050-advanced-common.dtsi} (86%)
> >>  create mode 100644 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts
> > 
> > 
> > Few things:
> > 
> > a) Could you split this patch so that the refactoring for SR1 is the
> >    first patch and then introduce the SR2?
> 
> Can do, sure
> 
> > b) Please call these as sr (silicon revision) rather than pg.
> 
> Nope, this is only motivated by the SR1->SR2 switch. The new products
> are called "PG2", and that is what the DT name must reflect. Took me a
> while to grasp that as well.


Aaah.. thanks.. will be good to document the same. I think you did mean
Product Generation as PG.. please call it out explicitly in the commit
message.

> 
> > c) usual request: Please add urls for the board
> 
> Where should they go? I think there is only one reasonable to share:
> 
> https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html
> 
> If that is a stable link, I can't tell.


Please confirm and add that to the commit message of the patch that introduces pg2 board.

I'd also suggest adding the link to the dts file.

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

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 15:35           ` Nishanth Menon
@ 2021-09-07 16:47             ` Aswath Govindraju
  2021-09-07 16:53               ` Nishanth Menon
  0 siblings, 1 reply; 17+ messages in thread
From: Aswath Govindraju @ 2021-09-07 16:47 UTC (permalink / raw)
  To: Nishanth Menon, Jan Kiszka
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

Hi Nishanth,

On 07/09/21 9:05 pm, Nishanth Menon wrote:
> On 17:30-20210907, Jan Kiszka wrote:
>> On 07.09.21 17:27, Nishanth Menon wrote:
>>> On 17:20-20210907, Jan Kiszka wrote:
>>>> On 07.09.21 17:13, Nishanth Menon wrote:
>>>>> On 16:22-20210907, Jan Kiszka wrote:
>>>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>
>>>>>> This ensures that the SD card will remain mmc0 across Basic and Advanced
>>>>>> devices, also avoiding surprises for users coming from the downstream
>>>>>> kernels.
>>>>>>
>>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>> ---
>>>>>>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
>>>>>>  1 file changed, 5 insertions(+)
>>>>>>
>>>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>> index ec9617c13cdb..d1d5278e0b94 100644
>>>>>> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>> @@ -18,6 +18,11 @@ / {
>>>>>>  	compatible = "siemens,iot2050-advanced", "ti,am654";
>>>>>>  	model = "SIMATIC IOT2050 Advanced";
>>>>>>  
>>>>>> +	aliases {
>>>>>> +		mmc0 = &sdhci1;
>>>>>> +		mmc1 = &sdhci0;
>>>>>> +	};
>>>>>
>>>>>
>>>>> Should we do this at SoC level?
>>>>>
>>>>
>>>> Well, I wouldn't mind - but that would also impact your EVMs. For us,
>>>> this is fine as we are coming from that ordering above with our
>>>> downstream kernel/dts.
>>>>
>>>
>>> I think it'd probably be a welcome change. overall we've standardized on
>>> partuuid.
>>>
>>
>> Yeah, it's more about "dd if=emmc.img of=/dev/mmcblk1 - damn, the wrong
>> one again."
>>
>> Let me know what you prefer, and I'll update my patch.
> 
> 
> Lets do it at SoC level. I will follow it up with a patch for other K3
> SoCs as well.
> 
> 
> Unless someone has a strong opinion on this approach - if so, speak up
> with reasons.
> 

Making this change in SoC level for all K3 devices would force changes
to be made in U-Boot too, for consistency. In U-Boot, a major change
would be required in the environment variables to support this. As I
don't see any functional advantage by making this change, I feel that
this change would make things more confusing for users already using the
K3 devices. At present, the ordering is consistent across all the K3
devices, I feel that keeping it the same way would be better.

As for making changes only on IoT boards, if it is okay to have the
ordering changed between U-Boot and kernel, I don't see any problem
making this change in kernel alone.

Thanks,
Aswath

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 16:47             ` Aswath Govindraju
@ 2021-09-07 16:53               ` Nishanth Menon
  2021-09-07 17:01                 ` Aswath Govindraju
  0 siblings, 1 reply; 17+ messages in thread
From: Nishanth Menon @ 2021-09-07 16:53 UTC (permalink / raw)
  To: Aswath Govindraju
  Cc: Jan Kiszka, Tero Kristo, Rob Herring, linux-arm-kernel,
	linux-kernel, devicetree, Bao Cheng Su, Chao Zeng

On 22:17-20210907, Aswath Govindraju wrote:
> Hi Nishanth,
> 
> On 07/09/21 9:05 pm, Nishanth Menon wrote:
> > On 17:30-20210907, Jan Kiszka wrote:
> >> On 07.09.21 17:27, Nishanth Menon wrote:
> >>> On 17:20-20210907, Jan Kiszka wrote:
> >>>> On 07.09.21 17:13, Nishanth Menon wrote:
> >>>>> On 16:22-20210907, Jan Kiszka wrote:
> >>>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>>>>>
> >>>>>> This ensures that the SD card will remain mmc0 across Basic and Advanced
> >>>>>> devices, also avoiding surprises for users coming from the downstream
> >>>>>> kernels.
> >>>>>>
> >>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>>>>> ---
> >>>>>>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
> >>>>>>  1 file changed, 5 insertions(+)
> >>>>>>
> >>>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >>>>>> index ec9617c13cdb..d1d5278e0b94 100644
> >>>>>> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >>>>>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
> >>>>>> @@ -18,6 +18,11 @@ / {
> >>>>>>  	compatible = "siemens,iot2050-advanced", "ti,am654";
> >>>>>>  	model = "SIMATIC IOT2050 Advanced";
> >>>>>>  
> >>>>>> +	aliases {
> >>>>>> +		mmc0 = &sdhci1;
> >>>>>> +		mmc1 = &sdhci0;
> >>>>>> +	};
> >>>>>
> >>>>>
> >>>>> Should we do this at SoC level?
> >>>>>
> >>>>
> >>>> Well, I wouldn't mind - but that would also impact your EVMs. For us,
> >>>> this is fine as we are coming from that ordering above with our
> >>>> downstream kernel/dts.
> >>>>
> >>>
> >>> I think it'd probably be a welcome change. overall we've standardized on
> >>> partuuid.
> >>>
> >>
> >> Yeah, it's more about "dd if=emmc.img of=/dev/mmcblk1 - damn, the wrong
> >> one again."
> >>
> >> Let me know what you prefer, and I'll update my patch.
> > 
> > 
> > Lets do it at SoC level. I will follow it up with a patch for other K3
> > SoCs as well.
> > 
> > 
> > Unless someone has a strong opinion on this approach - if so, speak up
> > with reasons.
> > 
> 
> Making this change in SoC level for all K3 devices would force changes
> to be made in U-Boot too, for consistency. In U-Boot, a major change
> would be required in the environment variables to support this. As I
> don't see any functional advantage by making this change, I feel that
> this change would make things more confusing for users already using the
> K3 devices. At present, the ordering is consistent across all the K3
> devices, I feel that keeping it the same way would be better.
> 
> As for making changes only on IoT boards, if it is okay to have the
> ordering changed between U-Boot and kernel, I don't see any problem
> making this change in kernel alone.


arch/arm64/boot/dts/ti/k3-am65.dtsi has no ordering. u-boot is supposed
to copy from kernel the dtsi files as is. I think having mmc aliases in
kernel is a good thing as we do regard kernel as the canonical dts
source.

If you are suggesting we flip things so that mmc0 is sdhci0 and mmc1 is
sdhci1 -  that might be a valid suggestion - Jan, do you see a problem
in having consistency here (flip the aliases)?


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

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 16:53               ` Nishanth Menon
@ 2021-09-07 17:01                 ` Aswath Govindraju
  2021-09-07 20:28                   ` Jan Kiszka
  0 siblings, 1 reply; 17+ messages in thread
From: Aswath Govindraju @ 2021-09-07 17:01 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Jan Kiszka, Tero Kristo, Rob Herring, linux-arm-kernel,
	linux-kernel, devicetree, Bao Cheng Su, Chao Zeng

Hi Nishanth,

On 07/09/21 10:23 pm, Nishanth Menon wrote:
> On 22:17-20210907, Aswath Govindraju wrote:
>> Hi Nishanth,
>>
>> On 07/09/21 9:05 pm, Nishanth Menon wrote:
>>> On 17:30-20210907, Jan Kiszka wrote:
>>>> On 07.09.21 17:27, Nishanth Menon wrote:
>>>>> On 17:20-20210907, Jan Kiszka wrote:
>>>>>> On 07.09.21 17:13, Nishanth Menon wrote:
>>>>>>> On 16:22-20210907, Jan Kiszka wrote:
>>>>>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>>>
>>>>>>>> This ensures that the SD card will remain mmc0 across Basic and Advanced
>>>>>>>> devices, also avoiding surprises for users coming from the downstream
>>>>>>>> kernels.
>>>>>>>>
>>>>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>>> ---
>>>>>>>>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
>>>>>>>>  1 file changed, 5 insertions(+)
>>>>>>>>
>>>>>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>>>> index ec9617c13cdb..d1d5278e0b94 100644
>>>>>>>> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>>>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>>>> @@ -18,6 +18,11 @@ / {
>>>>>>>>  	compatible = "siemens,iot2050-advanced", "ti,am654";
>>>>>>>>  	model = "SIMATIC IOT2050 Advanced";
>>>>>>>>  
>>>>>>>> +	aliases {
>>>>>>>> +		mmc0 = &sdhci1;
>>>>>>>> +		mmc1 = &sdhci0;
>>>>>>>> +	};
>>>>>>>
>>>>>>>
>>>>>>> Should we do this at SoC level?
>>>>>>>
>>>>>>
>>>>>> Well, I wouldn't mind - but that would also impact your EVMs. For us,
>>>>>> this is fine as we are coming from that ordering above with our
>>>>>> downstream kernel/dts.
>>>>>>
>>>>>
>>>>> I think it'd probably be a welcome change. overall we've standardized on
>>>>> partuuid.
>>>>>
>>>>
>>>> Yeah, it's more about "dd if=emmc.img of=/dev/mmcblk1 - damn, the wrong
>>>> one again."
>>>>
>>>> Let me know what you prefer, and I'll update my patch.
>>>
>>>
>>> Lets do it at SoC level. I will follow it up with a patch for other K3
>>> SoCs as well.
>>>
>>>
>>> Unless someone has a strong opinion on this approach - if so, speak up
>>> with reasons.
>>>
>>
>> Making this change in SoC level for all K3 devices would force changes
>> to be made in U-Boot too, for consistency. In U-Boot, a major change
>> would be required in the environment variables to support this. As I
>> don't see any functional advantage by making this change, I feel that
>> this change would make things more confusing for users already using the
>> K3 devices. At present, the ordering is consistent across all the K3
>> devices, I feel that keeping it the same way would be better.
>>
>> As for making changes only on IoT boards, if it is okay to have the
>> ordering changed between U-Boot and kernel, I don't see any problem
>> making this change in kernel alone.
> 
> 
> arch/arm64/boot/dts/ti/k3-am65.dtsi has no ordering. u-boot is supposed
> to copy from kernel the dtsi files as is. I think having mmc aliases in
> kernel is a good thing as we do regard kernel as the canonical dts
> source.
> 

Yes, you are correct. Aliases are not added for mmc in U-Boot too, but
due to the ordering in the device tree, mmc0 is always sdhci0 and mmc1
is always sdhci1 in U-Boot. I agree that, in kernel as the probe order
is not guaranteed, fixing the order would be better by adding aliases
explicitly.

> If you are suggesting we flip things so that mmc0 is sdhci0 and mmc1 is
> sdhci1 -  that might be a valid suggestion - Jan, do you see a problem
> in having consistency here (flip the aliases)?
> 
> 

Yes, I am suggesting a flip in the order and this order can be applied
across all the K3 SoC's

Thanks,
Aswath


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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 17:01                 ` Aswath Govindraju
@ 2021-09-07 20:28                   ` Jan Kiszka
  2021-09-08  2:47                     ` Nishanth Menon
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Kiszka @ 2021-09-07 20:28 UTC (permalink / raw)
  To: Aswath Govindraju, Nishanth Menon
  Cc: Tero Kristo, Rob Herring, linux-arm-kernel, linux-kernel,
	devicetree, Bao Cheng Su, Chao Zeng

On 07.09.21 19:01, Aswath Govindraju wrote:
> Hi Nishanth,
> 
> On 07/09/21 10:23 pm, Nishanth Menon wrote:
>> On 22:17-20210907, Aswath Govindraju wrote:
>>> Hi Nishanth,
>>>
>>> On 07/09/21 9:05 pm, Nishanth Menon wrote:
>>>> On 17:30-20210907, Jan Kiszka wrote:
>>>>> On 07.09.21 17:27, Nishanth Menon wrote:
>>>>>> On 17:20-20210907, Jan Kiszka wrote:
>>>>>>> On 07.09.21 17:13, Nishanth Menon wrote:
>>>>>>>> On 16:22-20210907, Jan Kiszka wrote:
>>>>>>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>>>>
>>>>>>>>> This ensures that the SD card will remain mmc0 across Basic and Advanced
>>>>>>>>> devices, also avoiding surprises for users coming from the downstream
>>>>>>>>> kernels.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>>>> ---
>>>>>>>>>  arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
>>>>>>>>>  1 file changed, 5 insertions(+)
>>>>>>>>>
>>>>>>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>>>>> index ec9617c13cdb..d1d5278e0b94 100644
>>>>>>>>> --- a/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>>>>> +++ b/arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts
>>>>>>>>> @@ -18,6 +18,11 @@ / {
>>>>>>>>>  	compatible = "siemens,iot2050-advanced", "ti,am654";
>>>>>>>>>  	model = "SIMATIC IOT2050 Advanced";
>>>>>>>>>  
>>>>>>>>> +	aliases {
>>>>>>>>> +		mmc0 = &sdhci1;
>>>>>>>>> +		mmc1 = &sdhci0;
>>>>>>>>> +	};
>>>>>>>>
>>>>>>>>
>>>>>>>> Should we do this at SoC level?
>>>>>>>>
>>>>>>>
>>>>>>> Well, I wouldn't mind - but that would also impact your EVMs. For us,
>>>>>>> this is fine as we are coming from that ordering above with our
>>>>>>> downstream kernel/dts.
>>>>>>>
>>>>>>
>>>>>> I think it'd probably be a welcome change. overall we've standardized on
>>>>>> partuuid.
>>>>>>
>>>>>
>>>>> Yeah, it's more about "dd if=emmc.img of=/dev/mmcblk1 - damn, the wrong
>>>>> one again."
>>>>>
>>>>> Let me know what you prefer, and I'll update my patch.
>>>>
>>>>
>>>> Lets do it at SoC level. I will follow it up with a patch for other K3
>>>> SoCs as well.
>>>>
>>>>
>>>> Unless someone has a strong opinion on this approach - if so, speak up
>>>> with reasons.
>>>>
>>>
>>> Making this change in SoC level for all K3 devices would force changes
>>> to be made in U-Boot too, for consistency. In U-Boot, a major change
>>> would be required in the environment variables to support this. As I
>>> don't see any functional advantage by making this change, I feel that
>>> this change would make things more confusing for users already using the
>>> K3 devices. At present, the ordering is consistent across all the K3
>>> devices, I feel that keeping it the same way would be better.
>>>
>>> As for making changes only on IoT boards, if it is okay to have the
>>> ordering changed between U-Boot and kernel, I don't see any problem
>>> making this change in kernel alone.
>>
>>
>> arch/arm64/boot/dts/ti/k3-am65.dtsi has no ordering. u-boot is supposed
>> to copy from kernel the dtsi files as is. I think having mmc aliases in
>> kernel is a good thing as we do regard kernel as the canonical dts
>> source.
>>
> 
> Yes, you are correct. Aliases are not added for mmc in U-Boot too, but
> due to the ordering in the device tree, mmc0 is always sdhci0 and mmc1
> is always sdhci1 in U-Boot. I agree that, in kernel as the probe order
> is not guaranteed, fixing the order would be better by adding aliases
> explicitly.
> 

We had mmc reordered for our devices in U-Boot already. That separate
snippet would obviously be obsolete when sync'ing common reordering over.

>> If you are suggesting we flip things so that mmc0 is sdhci0 and mmc1 is
>> sdhci1 -  that might be a valid suggestion - Jan, do you see a problem
>> in having consistency here (flip the aliases)?
>>
>>
> 
> Yes, I am suggesting a flip in the order and this order can be applied
> across all the K3 SoC's
> 

I'm not sure what you are suggesting. I've sent v2 already which moves
aliasing to SoC level, and I would push that to U-Boot as well if
acceptable. If not, we will keep this in our board DTs.

Jan

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

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

* Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices
  2021-09-07 20:28                   ` Jan Kiszka
@ 2021-09-08  2:47                     ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2021-09-08  2:47 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Aswath Govindraju, Tero Kristo, Rob Herring, linux-arm-kernel,
	linux-kernel, devicetree, Bao Cheng Su, Chao Zeng

On 22:28-20210907, Jan Kiszka wrote:
[...]

> > Yes, I am suggesting a flip in the order and this order can be applied
> > across all the K3 SoC's
> > 
> 
> I'm not sure what you are suggesting. I've sent v2 already which moves
> aliasing to SoC level, and I would push that to U-Boot as well if
> acceptable. If not, we will keep this in our board DTs.
> 

responded in context of v2:
https://lore.kernel.org/all/20210908024442.jskmqqye432p4nmt@gatherer/
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

end of thread, other threads:[~2021-09-08  2:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 14:22 [PATCH 0/3] arm64: dts: Update IOT2050 boards Jan Kiszka
2021-09-07 14:22 ` [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices Jan Kiszka
2021-09-07 15:13   ` Nishanth Menon
2021-09-07 15:20     ` Jan Kiszka
2021-09-07 15:27       ` Nishanth Menon
2021-09-07 15:30         ` Jan Kiszka
2021-09-07 15:35           ` Nishanth Menon
2021-09-07 16:47             ` Aswath Govindraju
2021-09-07 16:53               ` Nishanth Menon
2021-09-07 17:01                 ` Aswath Govindraju
2021-09-07 20:28                   ` Jan Kiszka
2021-09-08  2:47                     ` Nishanth Menon
2021-09-07 14:22 ` [PATCH 2/3] arm64: dts: ti: iot2050: Disable SR2.0-only PRUs Jan Kiszka
2021-09-07 14:22 ` [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards Jan Kiszka
2021-09-07 15:16   ` Nishanth Menon
2021-09-07 15:27     ` Jan Kiszka
2021-09-07 15:37       ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).