Skip to contentSkip to conversation

arm: Add support for Trenz TE0820 (zynqmp)

PATCH New Vladimir Svoboda 2 participants 4 messages Apr 30, 2018 – May 2, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Add support for Trenz TE0820 (zynqmp)

Add support for Trenz TE0820 revision 2 MPSoC module.

---

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/zynqmp-te0820-rev2.dts           | 669 ++++++++++++++++++
 .../zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c  | 624 ++++++++++++++++
 configs/xilinx_zynqmp_te0820_rev2_defconfig   | 105 +++
 include/configs/xilinx_zynqmp_te0820.h        |  49 ++
 5 files changed, 1448 insertions(+)
 create mode 100644 arch/arm/dts/zynqmp-te0820-rev2.dts
 create mode 100644 board/xilinx/zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c
 create mode 100644 configs/xilinx_zynqmp_te0820_rev2_defconfig
 create mode 100644 include/configs/xilinx_zynqmp_te0820.h
arch/arm/dts/Makefile +1 -0
index ac7667b1e8..ec4e7cc206 100644
@@ -148,6 +148,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
 dtb-$(CONFIG_ARCH_ZYNQMP) += \
 	zynqmp-mini-emmc.dtb			\
 	zynqmp-mini-nand.dtb			\
+	zynqmp-te0820-rev2.dtb			\
 	zynqmp-zcu100-revC.dtb			\
 	zynqmp-zcu102-revA.dtb			\
 	zynqmp-zcu102-revB.dtb			\
arch/arm/dts/zynqmp-te0820-rev2.dts new file +669 -0

669 lines not on this page · raw message

board/xilinx/zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c new file +624 -0

624 lines not on this page · raw message

configs/xilinx_zynqmp_te0820_rev2_defconfig new file +105 -0

105 lines not on this page · raw message

include/configs/xilinx_zynqmp_te0820.h new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/1 arm: Add support for Trenz TE0820 (zynqmp)

Hi, + Trenz support.

Quoted 3 lines · Vladimir Svoboda

Add support for Trenz TE0820 revision 2 MPSoC module.

I can't see your name in git log that's why I expect this is maybe your the first submission. How can I trust that you will test this board regularly that make sense to have it in the tree?

I don't have this board that's why it can be broken quickly.

Quoted 5 lines

---

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/zynqmp-te0820-rev2.dts           | 669 ++++++++++++++++++
 .../zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c  | 624 ++++++++++++++++

There are a lot of versions with different chips on it. It will be good to exactly write what version this is going to support.
Also there is different amount of flash on 1EL version based on
https://shop.trenz-electronic.de/en/Products/Trenz-Electronic/TE08XX-Zynq-UltraScale/TE0820-Zynq-UltraScale/

Also this is SOM and it requires Carrier board to know wiring. What carrier board is this configuration for?

Quoted 13 lines
 configs/xilinx_zynqmp_te0820_rev2_defconfig   | 105 +++
 include/configs/xilinx_zynqmp_te0820.h        |  49 ++
 5 files changed, 1448 insertions(+)
 create mode 100644 arch/arm/dts/zynqmp-te0820-rev2.dts
 create mode 100644 board/xilinx/zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c
 create mode 100644 configs/xilinx_zynqmp_te0820_rev2_defconfig
 create mode 100644 include/configs/xilinx_zynqmp_te0820.h
arch/arm/dts/Makefile +0 -0
index ac7667b1e8..ec4e7cc206 100644

arch/arm/dts/Makefile dtb-$(CONFIG_ARCH_ZYNQ) += \ · line 151

Quoted 4 lines
arch/arm/dts/Makefile +1 -0
@@ -148,6 +148,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
 dtb-$(CONFIG_ARCH_ZYNQMP) += \
 	zynqmp-mini-emmc.dtb			\
 	zynqmp-mini-nand.dtb			\
+	zynqmp-te0820-rev2.dtb			\

This is Trenz that's why it you should use trenz instead of zynqmp.

arch/arm/dts/zynqmp-te0820-rev2.dts line 2

Quoted 11 lines
arch/arm/dts/Makefile +0 -0
 	zynqmp-zcu100-revC.dtb			\
 	zynqmp-zcu102-revA.dtb			\
 	zynqmp-zcu102-revB.dtb			\
arch/arm/dts/zynqmp-te0820-rev2.dts new file +2 -0
new file mode 100644
index 0000000000..db23dfe45c
@@ -0,0 +1,669 @@
+/*
+ * dts file for Xilinx ZynqMP TE0820 Rev2

Trenz again.

arch/arm/dts/zynqmp-te0820-rev2.dts line 8

Quoted 6 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +6 -0
+ *
+ * (C) Copyright 2018, HIPPEROS.
+ *
+ * Vladimir Svoboda <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+

Please use kernel format where this line comes first.

arch/arm/dts/zynqmp-te0820-rev2.dts line 20

Quoted 12 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +12 -0
+ */
+
+/dts-v1/;
+
+#include "zynqmp.dtsi"
+#include "zynqmp-clk-ccf.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/phy/phy.h>
+
+/ {
+	model = "ZynqMP TE0820 Rev2";

Trenz,

arch/arm/dts/zynqmp-te0820-rev2.dts line 21

Quoted 1 line
arch/arm/dts/zynqmp-te0820-rev2.dts new file +1 -0
+	compatible = "xlnx,zynqmp-te0820-rev2", "xlnx,zynqmp-te0820", "xlnx,zynqmp";

Add trenz to vendor-prefixes.txt in the Linux kernel and use it here.

arch/arm/dts/zynqmp-te0820-rev2.dts line 25

Quoted 4 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +4 -0
+
+	aliases {
+		ethernet0 = &gem3;
+		gpio0 = &gpio;

Based on Rob Herring this shouldn't be here.

arch/arm/dts/zynqmp-te0820-rev2.dts line 34

Quoted 9 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +9 -0
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		mmc0 = &sdhci1;
+		rtc0 = &rtc;
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &dcc;
+		spi0 = &qspi;
+		usb0 = &usb0;

The same for gpio.

Quoted 24 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +24 -0
+	};
+
+	chosen {
+		bootargs = "earlycon";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory at 0 {
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x40000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		autorepeat;
+		sw19 {
+			label = "sw19";
+			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+			linux,code = <KEY_DOWN>;
+			gpio-key,wakeup;
+			autorepeat;
+		};

arch/arm/dts/zynqmp-te0820-rev2.dts line 68

Quoted 10 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +10 -0
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		heartbeat_led {
+			label = "heartbeat";
+			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};

This and stuff below looks like c&p from zcu102 version which is incorrect.

I am going to skip the rest of this patch because questions above needs to be answered first.

Thanks,
Michal

#2 lore raw

PATCH 1/1 arm: Add support for Trenz TE0820 (zynqmp)

Thanks for the review,

Quoted 11 lines · Michal Simek

Hi, + Trenz support.

Quoted 3 lines · Vladimir Svoboda

Add support for Trenz TE0820 revision 2 MPSoC module.

I can't see your name in git log that's why I expect this is maybe your the first submission. How can I trust that you will test this board regularly that make sense to have it in the tree?

I don't have this board that's why it can be broken quickly.

This is indeed my first patch submission to U-boot.
I work at HIPPEROS S.A. and we develop a RTOS.
We are part of a european-funded project, called Tulipp, where partners use that board.
That's the guarantee I can give you.

Quoted 6 lines
Quoted 6 lines

---

  arch/arm/dts/Makefile                         |   1 +
  arch/arm/dts/zynqmp-te0820-rev2.dts           | 669 ++++++++++++++++++
  .../zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c  | 624 ++++++++++++++++
Quoted 7 lines

There are a lot of versions with different chips on it. It will be good to exactly write what version this is going to support.
Also there is different amount of flash on 1EL version based on
https://shop.trenz-electronic.de/en/Products/Trenz-Electronic/TE08XX-Zynq-UltraScale/TE0820-Zynq-UltraScale/

Also this is SOM and it requires Carrier board to know wiring. What carrier board is this configuration for?

Indeed, there are several versions.
I can only test with the module TE0820-02-03EG-1EA as this is the only one we
have.
The carrier board we use is the Sundance EMC2, they will sell it with the TE0820 module under the name EMC2-ZU3EG.

Quoted 9 lines
Quoted 9 lines
  configs/xilinx_zynqmp_te0820_rev2_defconfig   | 105 +++
  include/configs/xilinx_zynqmp_te0820.h        |  49 ++
  5 files changed, 1448 insertions(+)

create mode 100644 arch/arm/dts/zynqmp-te0820-rev2.dts create mode 100644 board/xilinx/zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c create mode 100644 configs/xilinx_zynqmp_te0820_rev2_defconfig create mode 100644 include/configs/xilinx_zynqmp_te0820.h

Quoted 10 lines

arch/arm/dts/Makefile dtb-$(CONFIG_ARCH_ZYNQ) += \ · line 151

Quoted 9 lines
arch/arm/dts/Makefile +1 -0
index ac7667b1e8..ec4e7cc206 100644
@@ -148,6 +148,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
  dtb-$(CONFIG_ARCH_ZYNQMP) += \
  	zynqmp-mini-emmc.dtb			\
  	zynqmp-mini-nand.dtb			\
+	zynqmp-te0820-rev2.dtb			\

This is Trenz that's why it you should use trenz instead of zynqmp.

Just for my information, what does zynqmp refers to then? I thought it was the technical name for UltraScale+ MPSoC.

Quoted 13 lines

arch/arm/dts/zynqmp-te0820-rev2.dts line 2

Quoted 12 lines
arch/arm/dts/Makefile +0 -0
  	zynqmp-zcu100-revC.dtb			\
  	zynqmp-zcu102-revA.dtb			\
  	zynqmp-zcu102-revB.dtb			\
arch/arm/dts/zynqmp-te0820-rev2.dts new file +2 -0
new file mode 100644
index 0000000000..db23dfe45c
@@ -0,0 +1,669 @@
+/*
+ * dts file for Xilinx ZynqMP TE0820 Rev2

Trenz again.

So you expect "Xilinx Trenz TE0820 Rev2" or "Trenz TE0820 Rev2"?

Quoted 71 lines

arch/arm/dts/zynqmp-te0820-rev2.dts line 8

Quoted 7 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +6 -0
+ *
+ * (C) Copyright 2018, HIPPEROS.
+ *
+ * Vladimir Svoboda <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+

Please use kernel format where this line comes first.

arch/arm/dts/zynqmp-te0820-rev2.dts line 20

Quoted 12 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +12 -0
+ */
+
+/dts-v1/;
+
+#include "zynqmp.dtsi"
+#include "zynqmp-clk-ccf.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/phy/phy.h>
+
+/ {
+	model = "ZynqMP TE0820 Rev2";

Trenz,

arch/arm/dts/zynqmp-te0820-rev2.dts line 21

Quoted 1 line
arch/arm/dts/zynqmp-te0820-rev2.dts new file +1 -0
+	compatible = "xlnx,zynqmp-te0820-rev2", "xlnx,zynqmp-te0820", "xlnx,zynqmp";

Add trenz to vendor-prefixes.txt in the Linux kernel and use it here.

arch/arm/dts/zynqmp-te0820-rev2.dts line 25

Quoted 4 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +4 -0
+
+	aliases {
+		ethernet0 = &gem3;
+		gpio0 = &gpio;

Based on Rob Herring this shouldn't be here.

arch/arm/dts/zynqmp-te0820-rev2.dts line 34

Quoted 9 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +9 -0
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		mmc0 = &sdhci1;
+		rtc0 = &rtc;
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &dcc;
+		spi0 = &qspi;
+		usb0 = &usb0;

The same for gpio.

Quoted 27 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +27 -0
+	};
+
+	chosen {
+		bootargs = "earlycon";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory at 0 {
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x40000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		autorepeat;
+		sw19 {
+			label = "sw19";
+			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+			linux,code = <KEY_DOWN>;
+			gpio-key,wakeup;
+			autorepeat;
+		};
+	};
+
+	leds {
Quoted 8 lines

arch/arm/dts/zynqmp-te0820-rev2.dts line 68

Quoted 7 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +7 -0
+		compatible = "gpio-leds";
+		heartbeat_led {
+			label = "heartbeat";
+			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};

This and stuff below looks like c&p from zcu102 version which is incorrect.

This is indeed a c&p from the ZCU 102 where I modified a couple of things (memory size, SDIO...).
I did not check the validity of all the devices information and there are probably errors regarding the routing of GPIO.

Quoted 3 lines

I am going to skip the rest of this patch because questions above needs to be answered first.

I hope that this answer will help to continue the review.

Vladimir

Quoted 3 lines

Thanks,
Michal

#3 lore raw

PATCH 1/1 arm: Add support for Trenz TE0820 (zynqmp)

Hi,

Quoted 13 lines · Vladimir Svoboda

Thanks for the review,

Quoted 10 lines · Michal Simek

Hi, + Trenz support.

Quoted 3 lines · Vladimir Svoboda

Add support for Trenz TE0820 revision 2 MPSoC module.

I can't see your name in git log that's why I expect this is maybe your the first submission. How can I trust that you will test this board regularly that make sense to have it in the tree?

Quoted 6 lines
Quoted 1 line

I don't have this board that's why it can be broken quickly.

This is indeed my first patch submission to U-boot.
I work at HIPPEROS S.A. and we develop a RTOS.
We are part of a european-funded project, called Tulipp, where partners use that board.
That's the guarantee I can give you.

It means when this project ends the most likely none will take care about this configuration anymore.

Quoted 12 lines
Quoted 12 lines
Quoted 6 lines

---

  arch/arm/dts/Makefile                         |   1 + arch/arm/dts/zynqmp-te0820-rev2.dts           | 669 ++++++++++++++++++ .../zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c  | 624 ++++++++++++++++

There are a lot of versions with different chips on it. It will be good to exactly write what version this is going to support.
Also there is different amount of flash on 1EL version based on
https://shop.trenz-electronic.de/en/Products/Trenz-Electronic/TE08XX-Zynq-UltraScale/TE0820-Zynq-UltraScale/

Quoted 7 lines
Quoted 2 lines

Also this is SOM and it requires Carrier board to know wiring. What carrier board is this configuration for?

Indeed, there are several versions.
I can only test with the module TE0820-02-03EG-1EA as this is the only one we
have.

That's not a problem but it needs to be said in commit message.

Quoted 2 lines

The carrier board we use is the Sundance EMC2, they will sell it with the TE0820 module under the name EMC2-ZU3EG.

Ok. Then dts needs to be structure properly.

It means dts file for Sundance EMC2 which describe board components (at least that one you care.
dtsi for SOM which includes zynqmp.dtsi and really describes only things available on the SOM.

Quoted 19 lines
Quoted 9 lines
Quoted 9 lines

  configs/xilinx_zynqmp_te0820_rev2_defconfig   | 105 +++ include/configs/xilinx_zynqmp_te0820.h        |  49 ++

  5 files changed, 1448 insertions(+)

  create mode 100644 arch/arm/dts/zynqmp-te0820-rev2.dts create mode 100644 board/xilinx/zynqmp/zynqmp-te0820-rev2/psu_init_gpl.c create mode 100644 configs/xilinx_zynqmp_te0820_rev2_defconfig create mode 100644 include/configs/xilinx_zynqmp_te0820.h

Quoted 10 lines

arch/arm/dts/Makefile dtb-$(CONFIG_ARCH_ZYNQ) += \ · line 151

Quoted 9 lines
arch/arm/dts/Makefile +1 -0
index ac7667b1e8..ec4e7cc206 100644
@@ -148,6 +148,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
   dtb-$(CONFIG_ARCH_ZYNQMP) += \
       zynqmp-mini-emmc.dtb            \
       zynqmp-mini-nand.dtb            \
+    zynqmp-te0820-rev2.dtb            \

This is Trenz that's why it you should use trenz instead of zynqmp.

Quoted 2 lines

Just for my information, what does zynqmp refers to then? I thought it was the technical name for UltraScale+ MPSoC.

ZynqMP is shortcut for UltraScale+ MPSoC and in u-boot this is a little bit mess but in the Linux kernel it is inside xilinx folder.

Based on information above it will be the best to call it sundance-emc2-revX-te0820-revY.dts
where revX is carrier board revision and revY is SoM revision.

Quoted 96 lines
Quoted 14 lines

arch/arm/dts/zynqmp-te0820-rev2.dts line 2

Quoted 13 lines
arch/arm/dts/Makefile +0 -0
       zynqmp-zcu100-revC.dtb            \
       zynqmp-zcu102-revA.dtb            \
       zynqmp-zcu102-revB.dtb            \
arch/arm/dts/zynqmp-te0820-rev2.dts new file +2 -0
new file mode 100644
index 0000000000..db23dfe45c
@@ -0,0 +1,669 @@
+/*
+ * dts file for Xilinx ZynqMP TE0820 Rev2

Trenz again.

So you expect "Xilinx Trenz TE0820 Rev2" or "Trenz TE0820 Rev2"?

Quoted 73 lines

arch/arm/dts/zynqmp-te0820-rev2.dts line 8

Quoted 7 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +6 -0
+ *
+ * (C) Copyright 2018, HIPPEROS.
+ *
+ * Vladimir Svoboda <[email protected]>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+

Please use kernel format where this line comes first.

arch/arm/dts/zynqmp-te0820-rev2.dts line 20

Quoted 12 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +12 -0
+ */
+
+/dts-v1/;
+
+#include "zynqmp.dtsi"
+#include "zynqmp-clk-ccf.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/phy/phy.h>
+
+/ {
+    model = "ZynqMP TE0820 Rev2";

Trenz,

Quoted 2 lines
arch/arm/dts/zynqmp-te0820-rev2.dts new file +1 -0
+    compatible = "xlnx,zynqmp-te0820-rev2", "xlnx,zynqmp-te0820",

"xlnx,zynqmp";

Add trenz to vendor-prefixes.txt in the Linux kernel and use it here.

Quoted 4 lines

+
+    aliases {
+        ethernet0 = &gem3;
+        gpio0 = &gpio;

Based on Rob Herring this shouldn't be here.

Quoted 9 lines

+        i2c0 = &i2c0;
+        i2c1 = &i2c1;
+        mmc0 = &sdhci1;
+        rtc0 = &rtc;
+        serial0 = &uart0;
+        serial1 = &uart1;
+        serial2 = &dcc;
+        spi0 = &qspi;
+        usb0 = &usb0;

The same for gpio.

Quoted 28 lines

+    };

arch/arm/dts/zynqmp-te0820-rev2.dts new file +27 -0
+
+    chosen {
+        bootargs = "earlycon";
+        stdout-path = "serial0:115200n8";
+    };
+
+    memory at 0 {
+        device_type = "memory";
+        reg = <0x0 0x0 0x0 0x40000000>;
+    };
+
+    gpio-keys {
+        compatible = "gpio-keys";
+        #address-cells = <1>;
+        #size-cells = <0>;
+        autorepeat;
+        sw19 {
+            label = "sw19";
+            gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+            linux,code = <KEY_DOWN>;
+            gpio-key,wakeup;
+            autorepeat;
+        };
+    };
+
+    leds {
+        compatible = "gpio-leds";
Quoted 8 lines
Quoted 6 lines

+        heartbeat_led {
+            label = "heartbeat";
+            gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+            linux,default-trigger = "heartbeat";
+        };
+    };

This and stuff below looks like c&p from zcu102 version which is incorrect.

Quoted 4 lines

This is indeed a c&p from the ZCU 102 where I modified a couple of things (memory size, SDIO...).
I did not check the validity of all the devices information and there are probably errors regarding the routing of GPIO.

Keep there only things you have validated and ignore the rest.

Quoted 5 lines
Quoted 3 lines

I am going to skip the rest of this patch because questions above needs to be answered first.

I hope that this answer will help to continue the review.

Will see. The best will be to see Trenz to support their HW instead of 3rd party.

Thanks,
Michal