Skip to contentSkip to conversation

Adding support for NI Ettus Research USRP E3XX series

RFC In review Moritz Fischer 4 participants 6 messages Sep 3, 2015

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

Hi all,

this patch adds basic support for NI Ettus Research E3XX series boards. I tagged this RFC because I'm not sure if the boards/xilinx/zynq subdirectory is the correct place for this, as I'll have some follow up patches that read the devices EEPROM for ethernet address etc.

Would putting it under boards/ni/zynq be the correct way of integrating it? While technically a Zynq device there are a lot of custom modifications, that I wouldn't like to force into board/xilinx/zynq/board.c in my follow up patches. However duplicating the entire board.c doesn't seem like a good idea neither.

Any suggestions? For future reference do you want me to split out dts etc in a separate patch?

Thanks for your feedback & suggestions,

Moritz

Moritz Fischer (1):
zynq: Add support for E3xx board.

 arch/arm/dts/Makefile                             |     3 +-
 arch/arm/dts/zynq-e3xx.dts                        |    35 +
 arch/arm/mach-zynq/Kconfig                        |     4 +
 board/xilinx/zynq/Makefile                        |     2 +
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.c | 13446 ++++++++++++++++++++
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.h |   130 +
 configs/zynq_e3xx_defconfig                       |    12 +
 include/configs/zynq_e3xx.h                       |    29 +
 8 files changed, 13660 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/zynq-e3xx.dts
 create mode 100644 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.c
 create mode 100644 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.h
 create mode 100644 configs/zynq_e3xx_defconfig
 create mode 100644 include/configs/zynq_e3xx.h
Signature · 1 line
2.5.1
#1 lore raw

RFC 1/1 zynq: Add support for E3xx board.

---
 arch/arm/dts/Makefile                             |     3 +-
 arch/arm/dts/zynq-e3xx.dts                        |    35 +
 arch/arm/mach-zynq/Kconfig                        |     4 +
 board/xilinx/zynq/Makefile                        |     2 +
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.c | 13446 ++++++++++++++++++++
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.h |   130 +
 configs/zynq_e3xx_defconfig                       |    12 +
 include/configs/zynq_e3xx.h                       |    29 +
 8 files changed, 13660 insertions(+), 1 deletion(-)
arch/arm/dts/Makefile +2 -1
index c97f39d..bb5cb34 100644
@@ -43,7 +43,8 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \
 	uniphier-ph1-pro4-ref.dtb \
 	uniphier-ph1-sld3-ref.dtb \
 	uniphier-ph1-sld8-ref.dtb
-dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
+dtb-$(CONFIG_ARCH_ZYNQ) += zynq-e3xx.dtb \
+	zynq-zc702.dtb \
 	zynq-zc706.dtb \
 	zynq-zed.dtb \
 	zynq-zybo.dtb \
arch/arm/dts/zynq-e3xx.dts new file +35 -0
new file mode 100644
index 0000000..3ee7927
@@ -0,0 +1,35 @@
+/*
+ *  Copyright (C) 2015 National Instruments Corp. All rights reserved.
+ *
+ * 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 = "NI Ettus Research USRP E3xx Embedded SDR";
+	compatible = "ettus,zynq-e3xx", "xlnx,zynq-7000";
+
+	aliases {
+		ethernet0 = &gem0;
+		i2c0 = &i2c0;
+		serial0 = &uart0;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0 0x40000000>;
+	};
+
+	chosen {
+		bootargs = "earlyprintk";
+		stdout-path = "serial0:115200n8";
+	};
+};
arch/arm/mach-zynq/Kconfig +4 -0
index 7a1aec4..8fc0126 100644
@@ -12,6 +12,9 @@ choice
 	prompt "Xilinx Zynq board select"
 	default TARGET_ZYNQ_ZC702
 
+config TARGET_ZYNQ_E3XX
+	bool "Zynq E3XX"
+
 config TARGET_ZYNQ_ZED
 	bool "Zynq ZedBoard"
 
@@ -54,6 +57,7 @@ config SYS_SOC
 	default "zynq"
 
 config SYS_CONFIG_NAME
+	default "zynq_e3xx" if TARGET_ZYNQ_E3XX
 	default "zynq_zed" if TARGET_ZYNQ_ZED
 	default "zynq_microzed" if TARGET_ZYNQ_MICROZED
 	default "zynq_picozed" if TARGET_ZYNQ_PICOZED
board/xilinx/zynq/Makefile +2 -0
index fd5d6fe..746f405 100644
@@ -1,6 +1,7 @@
 #
 # (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+# Copyright (C) 2015 National Instruments Corp.
 #
 # SPDX-License-Identifier:	GPL-2.0+
 #
@@ -12,6 +13,7 @@ hw-platform-$(CONFIG_TARGET_ZYNQ_ZED)		:= zed_hw_platform
 hw-platform-$(CONFIG_TARGET_ZYNQ_MICROZED)	:= MicroZed_hw_platform
 hw-platform-$(CONFIG_TARGET_ZYNQ_ZC702)		:= ZC702_hw_platform
 hw-platform-$(CONFIG_TARGET_ZYNQ_ZC706)		:= ZC706_hw_platform
+hw-platform-$(CONFIG_TARGET_ZYNQ_E3XX)		:= e3xx_hw_platform
 # If you want to use customized ps7_init_gpl.c/h,
 # enable CONFIG_ZYNQ_CUSTOM_INIT and put them into custom_hw_platform/.
 # This line must be placed at the bottom of the list because
board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.c new file +13446 -0

2,926 lines not on this page · raw message

board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.h new file +130 -0

130 lines not on this page · raw message

configs/zynq_e3xx_defconfig new file +12 -0
new file mode 100644
index 0000000..213c34c

Lines of this file are not shown. View the raw message.

include/configs/zynq_e3xx.h new file +29 -0
new file mode 100644
index 0000000..feb1739

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.5.1

Part of the diff is not shown here. View the raw message.

#2 lore raw

[U-Boot] [RFC] zynq: Add support for E3xx board.

Quoted 8 lines · Moritz Fischer
---
 arch/arm/dts/Makefile                             |     3 +-
 arch/arm/dts/zynq-e3xx.dts                        |    35 +
 arch/arm/mach-zynq/Kconfig                        |     4 +
 board/xilinx/zynq/Makefile                        |     2 +
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.c | 13446 ++++++++++++++++++++
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.h |   130 +

Can we consolidate this with other ps7_init_gpl.[ch] files using smaller diffs rather than commit the generated files verbatim?

Regards,
Peter

Quoted 4 lines
 configs/zynq_e3xx_defconfig                       |    12 +
 include/configs/zynq_e3xx.h                       |    29 +
 8 files changed, 13660 insertions(+), 1 deletion(-)
#3 lore raw

[U-Boot] [RFC] zynq: Add support for E3xx board.

In reply to Moritz Fischer

Hi Moritz,

Quoted 17 lines · Moritz Fischer
---
 arch/arm/dts/Makefile                             |     3 +-
 arch/arm/dts/zynq-e3xx.dts                        |    35 +
 arch/arm/mach-zynq/Kconfig                        |     4 +
 board/xilinx/zynq/Makefile                        |     2 +
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.c | 13446 ++++++++++++++++++++
 board/xilinx/zynq/e3xx_hw_platform/ps7_init_gpl.h |   130 +
 configs/zynq_e3xx_defconfig                       |    12 +
 include/configs/zynq_e3xx.h                       |    29 +
 8 files changed, 13660 insertions(+), 1 deletion(-)
arch/arm/dts/Makefile +0 -0
index c97f39d..bb5cb34 100644

arch/arm/dts/Makefile dtb-$(CONFIG_ARCH_UNIPHIER) += \ · line 47

Quoted 6 lines
arch/arm/dts/Makefile +2 -1
@@ -43,7 +43,8 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \
 	uniphier-ph1-pro4-ref.dtb \
 	uniphier-ph1-sld3-ref.dtb \
 	uniphier-ph1-sld8-ref.dtb
-dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
+dtb-$(CONFIG_ARCH_ZYNQ) += zynq-e3xx.dtb \
+	zynq-zc702.dtb \

Just a nit, but should we make this
+dtb-$(CONFIG_ARCH_ZYNQ) += \
+ zynq-e3xx.dtb \
+ zynq-zc702.dtb \
...

Then, when more boards are added we have just simple additions of lines and get rid of the removal in the diffs.

S?ren

#4 lore raw
In reply to Moritz Fischer
Quoted 1 line · Moritz Fischer

Hi all,

Hi!

Quoted 4 lines

this patch adds basic support for NI Ettus Research E3XX series boards. I tagged this RFC because I'm not sure if the boards/xilinx/zynq subdirectory is the correct place for this, as I'll have some follow up patches that read the devices EEPROM for ethernet address etc.

It's not, it should be board/ettus/e3xx/ .

Quoted 8 lines

Would putting it under boards/ni/zynq be the correct way of integrating it? While technically a Zynq device there are a lot of custom modifications, that I wouldn't like to force into board/xilinx/zynq/board.c in my follow up patches. However duplicating the entire board.c doesn't seem like a good idea neither.

Any suggestions? For future reference do you want me to split out dts etc in a separate patch?

It's always boards/VENDOR/BOARD/ .

Best regards,
Marek Vasut

#5 lore raw
Quoted 18 lines · Marek Vasut
Quoted 1 line · Moritz Fischer

Hi all,

Hi!

Quoted 4 lines

this patch adds basic support for NI Ettus Research E3XX series boards. I tagged this RFC because I'm not sure if the boards/xilinx/zynq subdirectory is the correct place for this, as I'll have some follow up patches that read the devices EEPROM for ethernet address etc.

It's not, it should be board/ettus/e3xx/ .

Quoted 6 lines

Would putting it under boards/ni/zynq be the correct way of integrating it? While technically a Zynq device there are a lot of custom modifications, that I wouldn't like to force into board/xilinx/zynq/board.c in my follow up patches. However duplicating the entire board.c doesn't seem like a good idea neither.

Quoted 4 lines
Quoted 2 lines

Any suggestions? For future reference do you want me to split out dts etc in a separate patch?

It's always boards/VENDOR/BOARD/ .

Oh btw, I'm not gonna review that patch you send, I ran checkpatch on it and these are the results:

./scripts/checkpatch.pl /tmp/\[RFC\]\ zynq_Add\ support\ for\ E3xx\ board..mbox [...]
total: 13937 errors, 13285 warnings, 14 checks, 13691 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
scripts/cleanfile

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE NETWORKING_BLOCK_COMMENT_STYLE USLEEP_RANGE

/tmp/[RFC] zynq_Add support for E3xx board..mbox has style problems, please review.

If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.

I'd suggest you drop all the useless generated documentation and fix the patch so that it follows kernel coding style [1]. Then, make sure it's checkpatch clean (see invocation above or use ./scripts/checkpatch.pl -f FILE to check separate files).

[1] https://www.kernel.org/doc/Documentation/CodingStyle

Best regards,
Marek Vasut