[U-Boot] [PATCHv2 0/2] 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%)

Delete devices implemented in PL, stylistic changes.
Signed-off-by: Anton Gerasimov tossel@gmail.com --- arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 50 deletions(-)
diff --git a/arch/arm/dts/zynq-zturn-myir.dts b/arch/arm/dts/zynq-zturn-myir.dts index a5ecfcc1d7..a9be2c8374 100644 --- a/arch/arm/dts/zynq-zturn-myir.dts +++ b/arch/arm/dts/zynq-zturn-myir.dts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2015 Andrea Merello adnrea.merello@gmail.com * Copyright (C) 2017 Alexander Graf agraf@suse.de @@ -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@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@53 { - compatible = "adi,adxl34x", "adxl34x"; + accelerometer@53 { + compatible = "adi,adxl345", "adxl345", "adi,adxl34x", "adxl34x"; reg = <0x53>; interrupt-parent = <&intc>; interrupts = <0x0 0x1e 0x4>;

On 16.03.18 00:08, Anton Gerasimov wrote:
Delete devices implemented in PL, stylistic changes.
Signed-off-by: Anton Gerasimov tossel@gmail.com
arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 50 deletions(-)
diff --git a/arch/arm/dts/zynq-zturn-myir.dts b/arch/arm/dts/zynq-zturn-myir.dts index a5ecfcc1d7..a9be2c8374 100644 --- a/arch/arm/dts/zynq-zturn-myir.dts +++ b/arch/arm/dts/zynq-zturn-myir.dts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0
Is this intended? I thought you could just add the SPDK identifier right ...
/*
- Copyright (C) 2015 Andrea Merello adnrea.merello@gmail.com
- Copyright (C) 2017 Alexander Graf agraf@suse.de
@@ -6,31 +7,22 @@
- Copyright (C) 2011 - 2014 Xilinx
- Copyright (C) 2012 National Instruments Corp.
... here :)
- 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;
Why? ;)
Sorry if you already explained it, but I don't quite grasp why we need to remove aliases.
The rest is:
Reviewed-by: Alexander Graf agraf@suse.de
Thanks a lot!
Alex

On 16.3.2018 00:29, Alexander Graf wrote:
On 16.03.18 00:08, Anton Gerasimov wrote:
Delete devices implemented in PL, stylistic changes.
Signed-off-by: Anton Gerasimov tossel@gmail.com
arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 50 deletions(-)
diff --git a/arch/arm/dts/zynq-zturn-myir.dts b/arch/arm/dts/zynq-zturn-myir.dts index a5ecfcc1d7..a9be2c8374 100644 --- a/arch/arm/dts/zynq-zturn-myir.dts +++ b/arch/arm/dts/zynq-zturn-myir.dts @@ -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

On Fri, Mar 16, 2018 at 11:33:28AM +0100, Michal Simek wrote:
On 16.3.2018 00:29, Alexander Graf wrote:
On 16.03.18 00:08, Anton Gerasimov wrote:
Delete devices implemented in PL, stylistic changes.
Signed-off-by: Anton Gerasimov tossel@gmail.com
arch/arm/dts/zynq-zturn-myir.dts | 62 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 50 deletions(-)
diff --git a/arch/arm/dts/zynq-zturn-myir.dts b/arch/arm/dts/zynq-zturn-myir.dts index a5ecfcc1d7..a9be2c8374 100644 --- a/arch/arm/dts/zynq-zturn-myir.dts +++ b/arch/arm/dts/zynq-zturn-myir.dts @@ -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?
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.

Hi Alex,
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@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

Makes naming in line with other Zynq boards.
Signed-off-by: Anton Gerasimov tossel@gmail.com --- 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%)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 20a4c37d48..83aa2f4df4 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -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 \ diff --git a/arch/arm/dts/zynq-zturn-myir.dts b/arch/arm/dts/zynq-zturn.dts similarity index 100% rename from arch/arm/dts/zynq-zturn-myir.dts rename to arch/arm/dts/zynq-zturn.dts diff --git a/configs/zynq_z_turn_defconfig b/configs/zynq_z_turn_defconfig index 7a51b85ac8..1270e30cab 100644 --- a/configs/zynq_z_turn_defconfig +++ b/configs/zynq_z_turn_defconfig @@ -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

On 16.03.18 00:08, Anton Gerasimov wrote:
Makes naming in line with other Zynq boards.
Signed-off-by: Anton Gerasimov tossel@gmail.com
Reviewed-by: Alexander Graf agraf@suse.de
Alex

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

Delete devices implemented in PL, stylistic changes.
Signed-off-by: Anton Gerasimov tossel@gmail.com --- arch/arm/dts/zynq-zturn-myir.dts | 61 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 49 deletions(-)
diff --git a/arch/arm/dts/zynq-zturn-myir.dts b/arch/arm/dts/zynq-zturn-myir.dts index a5ecfcc1d7..8aa384b59b 100644 --- a/arch/arm/dts/zynq-zturn-myir.dts +++ b/arch/arm/dts/zynq-zturn-myir.dts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2015 Andrea Merello adnrea.merello@gmail.com * Copyright (C) 2017 Alexander Graf agraf@suse.de @@ -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@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@53 { - compatible = "adi,adxl34x", "adxl34x"; + accelerometer@53 { + compatible = "adi,adxl345", "adxl345", "adi,adxl34x", "adxl34x"; reg = <0x53>; interrupt-parent = <&intc>; interrupts = <0x0 0x1e 0x4>;

On 25.03.18 01:31, Anton Gerasimov wrote:
Delete devices implemented in PL, stylistic changes.
Signed-off-by: Anton Gerasimov tossel@gmail.com
Reviewed-by: Alexander Graf agraf@suse.de
Alex

Makes naming in line with other Zynq boards.
Signed-off-by: Anton Gerasimov tossel@gmail.com --- 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%)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 20a4c37d48..83aa2f4df4 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -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 \ diff --git a/arch/arm/dts/zynq-zturn-myir.dts b/arch/arm/dts/zynq-zturn.dts similarity index 100% rename from arch/arm/dts/zynq-zturn-myir.dts rename to arch/arm/dts/zynq-zturn.dts diff --git a/configs/zynq_z_turn_defconfig b/configs/zynq_z_turn_defconfig index 7a51b85ac8..1270e30cab 100644 --- a/configs/zynq_z_turn_defconfig +++ b/configs/zynq_z_turn_defconfig @@ -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

On 25.03.18 01:32, Anton Gerasimov wrote:
Makes naming in line with other Zynq boards.
Signed-off-by: Anton Gerasimov tossel@gmail.com
Reviewed-by: Alexander Graf agraf@suse.de
Alex

On 24.3.2018 18:31, Anton Gerasimov wrote:
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%)
Applied both. Can you please send another version to Linux to have this synchronized.
Thanks, Michal
participants (4)
-
Alexander Graf
-
Anton Gerasimov
-
Michal Simek
-
Tom Rini