Skip to contentSkip to conversation

Changes to Z-turn dts

PATCH Superseded Anton Gerasimov 4 participants 14 messages Mar 15, 2018 – Mar 28, 2018

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Changes to Z-turn dts

Updated patch to dts for Z-turn board. Thanks Alex and Michal for corections. Tested with both u-boot and linux kernel, works fine. Once it gets accepted to U-boot I'll send the final version to Linux devicetree mailing list.

Anton Gerasimov (2):
ARM: dts: zynq: Update dts for Z-turn board
ARM: dts: zynq: Rename dts for Z-turn board

 arch/arm/dts/Makefile                              |  2 +-
 .../dts/{zynq-zturn-myir.dts => zynq-zturn.dts}    | 62 +++++-----------------
 configs/zynq_z_turn_defconfig                      |  2 +-
 3 files changed, 14 insertions(+), 52 deletions(-)
 rename arch/arm/dts/{zynq-zturn-myir.dts => zynq-zturn.dts} (54%)
Signature · 1 line
2.16.2
#1 lore raw

PATCH v2 1/2 ARM: dts: zynq: Update dts for Z-turn board

Delete devices implemented in PL, stylistic changes.

---
 arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++--------------------------------
 1 file changed, 12 insertions(+), 50 deletions(-)
arch/arm/dts/zynq-zturn-myir.dts +12 -50
index a5ecfcc1d7..a9be2c8374 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2015 Andrea Merello <[email protected]>
  *  Copyright (C) 2017 Alexander Graf <[email protected]>
@@ -6,31 +7,22 @@
  *  Copyright (C) 2011 - 2014 Xilinx
  *  Copyright (C) 2012 National Instruments Corp.
  *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
+
 /dts-v1/;
 /include/ "zynq-7000.dtsi"
 
 / {
 	model = "Zynq Z-Turn MYIR Board";
-	compatible = "xlnx,zynq-7000";
+	compatible = "myir,zynq-zturn", "xlnx,zynq-7000";
 
 	aliases {
 		ethernet0 = &gem0;
 		serial0 = &uart1;
 		serial1 = &uart0;
-		spi0 = &qspi;
-		mmc0 = &sdhci0;
 	};
 
-	memory {
+	memory at 0 {
 		device_type = "memory";
 		reg = <0x0 0x40000000>;
 	};
@@ -41,52 +33,23 @@
 
 	gpio-leds {
 		compatible = "gpio-leds";
-		led_r {
-			label = "led_r";
-			gpios = <&gpio0 0x72 0x1>;
-			default-state = "on";
-			linux,default-trigger = "heartbeat";
-		};
-
-		led_g {
-			label = "led_g";
-			gpios = <&gpio0 0x73 0x1>;
-			default-state = "on";
-			linux,default-trigger = "heartbeat";
-		};
-
-		led_b {
-			label = "led_b";
-			gpios = <&gpio0 0x74 0x1>;
-			default-state = "on";
-			linux,default-trigger = "heartbeat";
-		};
-
-		usr_led1 {
-			label = "usr_led1";
+		usr-led1 {
+			label = "usr-led1";
 			gpios = <&gpio0 0x0 0x1>;
 			default-state = "off";
-			linux,default-trigger = "none";
 		};
 
-		usr_led2 {
-			label = "usr_led2";
+		usr-led2 {
+			label = "usr-led2";
 			gpios = <&gpio0 0x9 0x1>;
 			default-state = "off";
-			linux,default-trigger = "none";
 		};
 	};
 
-	gpio-beep {
-		compatible = "gpio-beeper";
-		label = "pl-beep";
-		gpios = <&gpio0 0x75 0x0>;
-	};
-
 	gpio-keys {
 		compatible = "gpio-keys";
-		#address-cells = <0x1>;
-		#size-cells = <0x0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
 		autorepeat;
 		K1 {
 			label = "K1";
@@ -100,7 +63,6 @@
 
 &clkc {
 	ps-clk-frequency = <33333333>;
-	fclk-enable = <0xf>;
 };
 
 &qspi {
@@ -152,8 +114,8 @@
 		reg = <0x49>;
 	};
 
-	adxl345 at 53 {
-		compatible = "adi,adxl34x", "adxl34x";
+	accelerometer at 53 {
+		compatible = "adi,adxl345", "adxl345", "adi,adxl34x", "adxl34x";
 		reg = <0x53>;
 		interrupt-parent = <&intc>;
 		interrupts = <0x0 0x1e 0x4>;
Signature · 1 line
2.16.2
#2 lore raw

PATCH v2 1/2 ARM: dts: zynq: Update dts for Z-turn board

arch/arm/dts/zynq-zturn-myir.dts line 1

Quoted 13 lines · Anton Gerasimov

Delete devices implemented in PL, stylistic changes.

---
 arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++--------------------------------
 1 file changed, 12 insertions(+), 50 deletions(-)
arch/arm/dts/zynq-zturn-myir.dts +1 -0
index a5ecfcc1d7..a9be2c8374 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0

Is this intended? I thought you could just add the SPDK identifier right ...

arch/arm/dts/zynq-zturn-myir.dts line 9

Quoted 7 lines
arch/arm/dts/zynq-zturn-myir.dts +0 -0
 /*
  *  Copyright (C) 2015 Andrea Merello <[email protected]>
  *  Copyright (C) 2017 Alexander Graf <[email protected]>
@@ -6,31 +7,22 @@
  *  Copyright (C) 2011 - 2014 Xilinx
  *  Copyright (C) 2012 National Instruments Corp.
  *

... here :)

Quoted 14 lines
arch/arm/dts/zynq-zturn-myir.dts +1 -8
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
+
 /dts-v1/;
 /include/ "zynq-7000.dtsi"
 
 / {

arch/arm/dts/zynq-zturn-myir.dts line 30

Quoted 10 lines
arch/arm/dts/zynq-zturn-myir.dts +1 -3
 	model = "Zynq Z-Turn MYIR Board";
-	compatible = "xlnx,zynq-7000";
+	compatible = "myir,zynq-zturn", "xlnx,zynq-7000";
 
 	aliases {
 		ethernet0 = &gem0;
 		serial0 = &uart1;
 		serial1 = &uart0;
-		spi0 = &qspi;
-		mmc0 = &sdhci0;

Why? ;)

Sorry if you already explained it, but I don't quite grasp why we need to remove aliases.

The rest is:

Thanks a lot!

Alex

#3 lore raw

PATCH v2 1/2 ARM: dts: zynq: Update dts for Z-turn board

Quoted 10 lines · Alexander Graf
Quoted 7 lines · Anton Gerasimov

Delete devices implemented in PL, stylistic changes.

---
 arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++--------------------------------
 1 file changed, 12 insertions(+), 50 deletions(-)
Quoted 8 lines

arch/arm/dts/zynq-zturn-myir.dts line 1

Quoted 6 lines
arch/arm/dts/zynq-zturn-myir.dts +1 -0
index a5ecfcc1d7..a9be2c8374 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0

Is this intended? I thought you could just add the SPDK identifier right ...

This is probably the question to Tom or Wolfgang if we are going to accept SPDX Linux style compare to U-Boot one.

Tom, Wolfgang: Any opinion?

Thanks,
Michal

#4 lore raw

PATCH v2 1/2 ARM: dts: zynq: Update dts for Z-turn board

Quoted 20 lines · Michal Simek
Quoted 10 lines · Alexander Graf
Quoted 7 lines · Anton Gerasimov

Delete devices implemented in PL, stylistic changes.

---
 arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++--------------------------------
 1 file changed, 12 insertions(+), 50 deletions(-)
Quoted 8 lines

arch/arm/dts/zynq-zturn-myir.dts line 1

Quoted 6 lines
arch/arm/dts/zynq-zturn-myir.dts +1 -0
index a5ecfcc1d7..a9be2c8374 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0

Is this intended? I thought you could just add the SPDK identifier right ...

Quoted 4 lines

This is probably the question to Tom or Wolfgang if we are going to accept SPDX Linux style compare to U-Boot one.

Tom, Wolfgang: Any opinion?

Is this coming directly from Linux? If yes, that's fine. If no, get it into Linux first :)

U-Boot files should have the tag where we've always had it, files we're pulling from Linux that are SPDX-only should be able to be unchanged now, which is a good thing.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180316/ddd54134/attachment.sig>
#5 lore raw

PATCH v2 1/2 ARM: dts: zynq: Update dts for Z-turn board

In reply to Alexander Graf

Hi Alex,

Quoted 7 lines

arch/arm/dts/zynq-zturn-myir.dts line 30

Quoted 2 lines
arch/arm/dts/zynq-zturn-myir.dts +0 -2
-		spi0 = &qspi;
-		mmc0 = &sdhci0;

Why? ;)

Sorry if you already explained it, but I don't quite grasp why we need to remove aliases.

Sorry, I've missed that. The original reason was that qspi was missing from linux's zynq-7000.dtsi, but we'll probably just need to update it there, qspi is quite important for z-turn. I just see one potential point of confusion in that spi0 overrides actual spi0 (spi0 at e0006000) in zynq-7000.dtsi. While it is not used on Z-turn by default, it can possibly be routed to one of the pins on an external connector. It can still be addressed by the full name of course.

Thanks,
Anton

#6 lore raw

PATCH v2 2/2 ARM: dts: zynq: Rename dts for Z-turn board

In reply to Anton Gerasimov

Makes naming in line with other Zynq boards.

---
 arch/arm/dts/Makefile                                | 2 +-
 arch/arm/dts/{zynq-zturn-myir.dts => zynq-zturn.dts} | 0
 configs/zynq_z_turn_defconfig                        | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/dts/{zynq-zturn-myir.dts => zynq-zturn.dts} (100%)
arch/arm/dts/Makefile +1 -1
index 20a4c37d48..83aa2f4df4 100644
@@ -143,7 +143,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
 	zynq-zc770-xm012.dtb \
 	zynq-zc770-xm013.dtb \
 	zynq-zed.dtb \
-	zynq-zturn-myir.dtb \
+	zynq-zturn.dtb \
 	zynq-zybo.dtb
 dtb-$(CONFIG_ARCH_ZYNQMP) += \
 	zynqmp-ep108.dtb			\
arch/arm/dts/zynq-zturn.dts renamed from arch/arm/dts/zynq-zturn-myir.dts +0 -0
similarity index 100%
rename from arch/arm/dts/zynq-zturn-myir.dts
rename to arch/arm/dts/zynq-zturn.dts
configs/zynq_z_turn_defconfig +1 -1
index 7a51b85ac8..1270e30cab 100644
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_SYS_TEXT_BASE=0x4000000
 CONFIG_SPL_STACK_R_ADDR=0x200000
-CONFIG_DEFAULT_DEVICE_TREE="zynq-zturn-myir"
+CONFIG_DEFAULT_DEVICE_TREE="zynq-zturn"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
Signature · 1 line
2.16.2
#8 lore raw

v3 cover Changes to Z-turn dtd

In reply to Anton Gerasimov

Same as v2, but restored mmc0 alias. spi0 is deleted to avoid confusion with spi0 from zynq-7000.dtsi.

Anton Gerasimov (2):
ARM: dts: zynq: Update dts for Z-turn board
ARM: dts: zynq: Rename dts for Z-turn board

 arch/arm/dts/Makefile                              |  2 +-
 .../dts/{zynq-zturn-myir.dts => zynq-zturn.dts}    | 61 +++++-----------------
 configs/zynq_z_turn_defconfig                      |  2 +-
 3 files changed, 14 insertions(+), 51 deletions(-)
 rename arch/arm/dts/{zynq-zturn-myir.dts => zynq-zturn.dts} (55%)
Signature · 1 line
2.16.2
#9 lore raw

PATCH v3 1/2 ARM: dts: zynq: Update dts for Z-turn board

Delete devices implemented in PL, stylistic changes.

---
 arch/arm/dts/zynq-zturn-myir.dts | 61 ++++++++--------------------------------
 1 file changed, 12 insertions(+), 49 deletions(-)
arch/arm/dts/zynq-zturn-myir.dts +12 -49
index a5ecfcc1d7..8aa384b59b 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2015 Andrea Merello <[email protected]>
  *  Copyright (C) 2017 Alexander Graf <[email protected]>
@@ -6,31 +7,23 @@
  *  Copyright (C) 2011 - 2014 Xilinx
  *  Copyright (C) 2012 National Instruments Corp.
  *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
+
 /dts-v1/;
 /include/ "zynq-7000.dtsi"
 
 / {
 	model = "Zynq Z-Turn MYIR Board";
-	compatible = "xlnx,zynq-7000";
+	compatible = "myir,zynq-zturn", "xlnx,zynq-7000";
 
 	aliases {
 		ethernet0 = &gem0;
 		serial0 = &uart1;
 		serial1 = &uart0;
-		spi0 = &qspi;
 		mmc0 = &sdhci0;
 	};
 
-	memory {
+	memory at 0 {
 		device_type = "memory";
 		reg = <0x0 0x40000000>;
 	};
@@ -41,52 +34,23 @@
 
 	gpio-leds {
 		compatible = "gpio-leds";
-		led_r {
-			label = "led_r";
-			gpios = <&gpio0 0x72 0x1>;
-			default-state = "on";
-			linux,default-trigger = "heartbeat";
-		};
-
-		led_g {
-			label = "led_g";
-			gpios = <&gpio0 0x73 0x1>;
-			default-state = "on";
-			linux,default-trigger = "heartbeat";
-		};
-
-		led_b {
-			label = "led_b";
-			gpios = <&gpio0 0x74 0x1>;
-			default-state = "on";
-			linux,default-trigger = "heartbeat";
-		};
-
-		usr_led1 {
-			label = "usr_led1";
+		usr-led1 {
+			label = "usr-led1";
 			gpios = <&gpio0 0x0 0x1>;
 			default-state = "off";
-			linux,default-trigger = "none";
 		};
 
-		usr_led2 {
-			label = "usr_led2";
+		usr-led2 {
+			label = "usr-led2";
 			gpios = <&gpio0 0x9 0x1>;
 			default-state = "off";
-			linux,default-trigger = "none";
 		};
 	};
 
-	gpio-beep {
-		compatible = "gpio-beeper";
-		label = "pl-beep";
-		gpios = <&gpio0 0x75 0x0>;
-	};
-
 	gpio-keys {
 		compatible = "gpio-keys";
-		#address-cells = <0x1>;
-		#size-cells = <0x0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
 		autorepeat;
 		K1 {
 			label = "K1";
@@ -100,7 +64,6 @@
 
 &clkc {
 	ps-clk-frequency = <33333333>;
-	fclk-enable = <0xf>;
 };
 
 &qspi {
@@ -152,8 +115,8 @@
 		reg = <0x49>;
 	};
 
-	adxl345 at 53 {
-		compatible = "adi,adxl34x", "adxl34x";
+	accelerometer at 53 {
+		compatible = "adi,adxl345", "adxl345", "adi,adxl34x", "adxl34x";
 		reg = <0x53>;
 		interrupt-parent = <&intc>;
 		interrupts = <0x0 0x1e 0x4>;
Signature · 1 line
2.16.2
#11 lore raw

PATCH v3 2/2 ARM: dts: zynq: Rename dts for Z-turn board

In reply to Anton Gerasimov

Makes naming in line with other Zynq boards.

---
 arch/arm/dts/Makefile                                | 2 +-
 arch/arm/dts/{zynq-zturn-myir.dts => zynq-zturn.dts} | 0
 configs/zynq_z_turn_defconfig                        | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/dts/{zynq-zturn-myir.dts => zynq-zturn.dts} (100%)
arch/arm/dts/Makefile +1 -1
index 20a4c37d48..83aa2f4df4 100644
@@ -143,7 +143,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \
 	zynq-zc770-xm012.dtb \
 	zynq-zc770-xm013.dtb \
 	zynq-zed.dtb \
-	zynq-zturn-myir.dtb \
+	zynq-zturn.dtb \
 	zynq-zybo.dtb
 dtb-$(CONFIG_ARCH_ZYNQMP) += \
 	zynqmp-ep108.dtb			\
arch/arm/dts/zynq-zturn.dts renamed from arch/arm/dts/zynq-zturn-myir.dts +0 -0
similarity index 100%
rename from arch/arm/dts/zynq-zturn-myir.dts
rename to arch/arm/dts/zynq-zturn.dts
configs/zynq_z_turn_defconfig +1 -1
index 7a51b85ac8..1270e30cab 100644
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_SYS_TEXT_BASE=0x4000000
 CONFIG_SPL_STACK_R_ADDR=0x200000
-CONFIG_DEFAULT_DEVICE_TREE="zynq-zturn-myir"
+CONFIG_DEFAULT_DEVICE_TREE="zynq-zturn"
 CONFIG_DEBUG_UART=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
Signature · 1 line
2.16.2
Applied
#13 lore raw

v3 cover Changes to Z-turn dtd

In reply to Anton Gerasimov
Quoted 7 lines · Anton Gerasimov

Same as v2, but restored mmc0 alias. spi0 is deleted to avoid confusion with spi0 from zynq-7000.dtsi.

Anton Gerasimov (2):
ARM: dts: zynq: Update dts for Z-turn board
ARM: dts: zynq: Rename dts for Z-turn board

Quoted 6 lines
 arch/arm/dts/Makefile                              |  2 +-
 .../dts/{zynq-zturn-myir.dts => zynq-zturn.dts}    | 61 +++++-----------------
 configs/zynq_z_turn_defconfig                      |  2 +-
 3 files changed, 14 insertions(+), 51 deletions(-)
 rename arch/arm/dts/{zynq-zturn-myir.dts => zynq-zturn.dts} (55%)

Applied both. Can you please send another version to Linux to have this synchronized.

Thanks,
Michal