Skip to contentSkip to conversation

arm64: dts: Update IOT2050 boards

PATCH Superseded Jan Kiszka 3 participants 17 messages Sep 7, 2021 – Sep 8, 2021

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

cover arm64: dts: Update IOT2050 boards

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
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 1/3 arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +5 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -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 */
Signature · 1 line
2.31.1
maintainer
#2 lore raw

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Quoted 16 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
@@ -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?

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author
#3 lore raw

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
+	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

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

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Quoted 30 lines · Jan Kiszka
Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
+	aliases {
+		mmc0 = &sdhci1;
+		mmc1 = &sdhci0;
+	};

Should we do this at SoC level?

Quoted 4 lines

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.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author
#5 lore raw

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Quoted 31 lines · Nishanth Menon
Quoted 30 lines · Jan Kiszka
Quoted 28 lines · Nishanth Menon
Quoted 16 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
@@ -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?

Quoted 8 lines
Quoted 4 lines

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

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

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Quoted 37 lines · Jan Kiszka
Quoted 36 lines · Nishanth Menon
Quoted 34 lines · Jan Kiszka
Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
+	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.

Quoted 8 lines
Quoted 3 lines

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.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#7 lore raw

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Hi Nishanth,

Quoted 48 lines · Nishanth Menon
Quoted 37 lines · Jan Kiszka
Quoted 36 lines · Nishanth Menon
Quoted 34 lines · Jan Kiszka
Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
+	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.

Quoted 8 lines
Quoted 3 lines

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.

Quoted 7 lines

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

maintainer
#8 lore raw

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Quoted 67 lines · Aswath Govindraju

Hi Nishanth,

Quoted 48 lines · Nishanth Menon
Quoted 37 lines · Jan Kiszka
Quoted 36 lines · Nishanth Menon
Quoted 34 lines · Jan Kiszka
Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
+	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.

Quoted 8 lines
Quoted 3 lines

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.

Quoted 7 lines

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.

Quoted 3 lines

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)?

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#9 lore raw

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Hi Nishanth,

Quoted 73 lines · Nishanth Menon
Quoted 67 lines · Aswath Govindraju

Hi Nishanth,

Quoted 48 lines · Nishanth Menon
Quoted 37 lines · Jan Kiszka
Quoted 36 lines · Nishanth Menon
Quoted 34 lines · Jan Kiszka
Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
+	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.

Quoted 8 lines
Quoted 3 lines

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.

Quoted 7 lines

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.

Quoted 3 lines

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.

Quoted 5 lines

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.

Quoted 5 lines

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

author
#10 lore raw

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

Quoted 82 lines · Aswath Govindraju

Hi Nishanth,

Quoted 73 lines · Nishanth Menon
Quoted 67 lines · Aswath Govindraju

Hi Nishanth,

Quoted 48 lines · Nishanth Menon
Quoted 37 lines · Jan Kiszka
Quoted 36 lines · Nishanth Menon
Quoted 34 lines · Jan Kiszka
Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +0 -0
index ec9617c13cdb..d1d5278e0b94 100644
@@ -18,6 +18,11 @@ / {
 	compatible = "siemens,iot2050-advanced", "ti,am654";
 	model = "SIMATIC IOT2050 Advanced";
 
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts / { · line 24

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -0
+	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.

Quoted 8 lines
Quoted 3 lines

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.

Quoted 7 lines

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.

Quoted 3 lines

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.

Quoted 5 lines

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.

Quoted 6 lines

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.

Quoted 9 lines
Quoted 5 lines

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

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

Re: [PATCH 1/3] arm64: dts: ti: iot2050: Flip mmc device ordering on Advanced devices

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

Quoted 8 lines
Quoted 3 lines

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/

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author
#12 lore raw

PATCH 2/3 arm64: dts: ti: iot2050: Disable SR2.0-only PRUs

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

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.

---
 .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +24 -0
index da7d2be48f6f..fb3f3e4ed753 100644
@@ -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";
+};
Signature · 1 line
2.31.1
author
#13 lore raw

PATCH 3/3 arm64: dts: ti: iot2050: Add support for product generation 2 boards

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 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
arch/arm64/boot/dts/ti/Makefile +2 -0
index d56c742f5a10..41a4bc96e6bd 100644
@@ -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
 
arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi new file +46 -0

46 lines not on this page · raw message

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

51 lines not on this page · raw message

arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +2 -33
index fb3f3e4ed753..47730fe3a797 100644
@@ -4,13 +4,11 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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";
-};
arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-common.dtsi renamed from arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts +3 -9
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
@@ -4,20 +4,14 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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>;
 };
arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts new file +21 -0
new file mode 100644
index 000000000000..5ce609dd49ad
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 2
+ * 1 GB RAM, no eMMC, main_uart0 on connector X30
+ */
+
+/dts-v1/;
+
+#include "k3-am6528-iot2050-basic-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-basic-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Basic PG2";
+};
arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts +4 -49

67 lines not on this page · raw message

arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi renamed from arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +2 -6
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
@@ -4,10 +4,9 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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;
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts new file +26 -0
new file mode 100644
index 000000000000..066390616b4d
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 2
+ * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
+ */
+
+/dts-v1/;
+
+#include "k3-am6548-iot2050-advanced-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-advanced-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Advanced PG2";
+};
+
+&mcu_r5fss0 {
+	/* lock-step mode not supported on this board */
+	ti,cluster-mode = <0>;
+};
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -48

66 lines not on this page · raw message

Signature · 1 line
2.31.1
maintainer
#14 lore raw

Re: [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards

Quoted 16 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 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 +++++++++
Quoted 8 lines
 .../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

Quoted 464 lines
arch/arm64/boot/dts/ti/Makefile +2 -0
index d56c742f5a10..41a4bc96e6bd 100644
@@ -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
 
arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg1.dtsi new file +46 -0
new file mode 100644
index 000000000000..51f902fa35a7
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2021
+ *
+ * Authors:
+ *   Jan Kiszka <[email protected]>
+ *
+ * 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";
+};
arch/arm64/boot/dts/ti/k3-am65-iot2050-common-pg2.dtsi new file +51 -0
new file mode 100644
index 000000000000..2323628b0444
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2021
+ *
+ * Authors:
+ *   Chao Zeng <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * 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;
+};
arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +2 -33
index fb3f3e4ed753..47730fe3a797 100644
@@ -4,13 +4,11 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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";
-};
arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-common.dtsi renamed from arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts +3 -9
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
@@ -4,20 +4,14 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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>;
 };
arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic-pg2.dts new file +21 -0
new file mode 100644
index 000000000000..5ce609dd49ad
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6528-based (dual-core) IOT2050 Basic variant, Product Generation 2
+ * 1 GB RAM, no eMMC, main_uart0 on connector X30
+ */
+
+/dts-v1/;
+
+#include "k3-am6528-iot2050-basic-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-basic-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Basic PG2";
+};
arch/arm64/boot/dts/ti/k3-am6528-iot2050-basic.dts +4 -49
index 94bb5dd39122..368a25d449a9 100644
@@ -4,63 +4,18 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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>;
 };
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-common.dtsi renamed from arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +2 -6
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
@@ -4,10 +4,9 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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;
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced-pg2.dts new file +26 -0
new file mode 100644
index 000000000000..066390616b4d
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) Siemens AG, 2018-2021
+ *
+ * Authors:
+ *   Le Jin <[email protected]>
+ *   Jan Kiszka <[email protected]>
+ *
+ * AM6548-based (quad-core) IOT2050 Advanced variant, Product Generation 2
+ * 2 GB RAM, 16 GB eMMC, USB-serial converter on connector X30
+ */
+
+/dts-v1/;
+
+#include "k3-am6548-iot2050-advanced-common.dtsi"
+#include "k3-am65-iot2050-common-pg2.dtsi"
+
+/ {
+	compatible = "siemens,iot2050-advanced-pg2", "ti,am654";
+	model = "SIMATIC IOT2050 Advanced PG2";
+};
+
+&mcu_r5fss0 {
+	/* lock-step mode not supported on this board */
+	ti,cluster-mode = <0>;
+};
arch/arm64/boot/dts/ti/k3-am6548-iot2050-advanced.dts +4 -48
index d1d5278e0b94..7ee5e4942c07 100644
@@ -4,62 +4,18 @@
  *
  * Authors:
  *   Le Jin <[email protected]>
- *   Jan Kiszka <[email protected]>
+ *   Jan Kiszka <[email protected]>
  *
- * 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";
 };
Signature · 1 line
2.31.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author
#15 lore raw

Re: [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards

Quoted 27 lines · Nishanth Menon
Quoted 16 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 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 +++++++++
Quoted 8 lines
 .../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
Quoted 4 lines

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

Quoted 1 line

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.

Quoted 1 line

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

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

Re: [PATCH 3/3] arm64: dts: ti: iot2050: Add support for product generation 2 boards

Quoted 33 lines · Jan Kiszka
Quoted 27 lines · Nishanth Menon
Quoted 16 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

---
 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 +++++++++
Quoted 8 lines
 .../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
Quoted 4 lines

Few things:

a) Could you split this patch so that the refactoring for SR1 is the first patch and then introduce the SR2?

Quoted 7 lines

Can do, sure

Quoted 1 line

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.

Quoted 8 lines
Quoted 2 lines

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.

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