linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella
@ 2015-02-12  0:55 Andreas Färber
  2015-02-12  0:55 ` [PATCH 1/5] ARM: dts: zynq: Split out common Parallella bits Andreas Färber
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Andreas Färber @ 2015-02-12  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

This series is based on linux-next plus Michal's aliases patch.
https://patchwork.kernel.org/patch/5812541/

Patch 2 adds pinctrl for the Parallella board. No such information was 
visible downstream, so this is based on S?ren's patch and the schematic 
plus some testing. In particular the Ethernet voltage level seems to be 
different from the other Zynq boards upstream (io-standard 1 vs. 4).

Patch 3 adds an LED. This is a feature not present downstream. No 
default trigger is thus used and I chose the label scheme used by sunxi 
and omap (zynq-zc702.dts uses just "ds23").
Tested as follows:
echo mmc0 > /sys/class/leds/parallella:cr10:usr/trigger #or s/mmc0/heartbeat/
(on openSUSE Tumbleweed I appended this to /etc/init.d/boot.local script)

Patch 5 goes on to add USB support. As the Microserver edition does not 
have USB, the bulk of nodes is moved to a new .dtsi file in patch 1.

Note: Adapteva's downstream tree has in the meantime split zynq-parallella.dts 
into zynq-parallella1-{hdmi,headless}.dts (without discussing this here first).
Since zynq-parallella.dts has already been released, I have chosen to 
stay with that name and have therefore named the Microserver edition 
zynq-parallella-microserver.dts, while naming the shared file 
zynq-parallella1.dtsi.
Anyone prefer to name the new file zynq-parallella1-microserver.dts?

On my work branch https://github.com/afaerber/linux/commits/parallella-next
I have further prepared a zynq-parallella-headless.dts variant 
following this scheme. Depending on how the Epiphany driver evolves, we 
may further need to split the non-Microserver variant(s) into e16 vs. e64
variants to cope with some Kickstarter boards.

Is there some rule for device tree file name stability when splitting a 
file due to additional nodes?

Example of historic growth:
 zynq-parallella.dtb (today works on all boards) -- now with USB/HDMI
 zynq-parallella-microserver.dtb (this series) -- without USB/HDMI
 zynq-parallella-headless.dtb -- with USB/HDMI, but no FPGA HDMI support
 zynq-parallella-e64.dtb -- with Epiphany-IV instead of Epiphany-III
 zynq-parallella-e64-headless.dtb -- ditto, but different FPGA bitstream
 zynq-parallella2-*.dtb
vs. extreme distinction:
 zynq-parallella1-e16-hdmi.dtb
 zynq-parallella1-e16-headless.dtb
 zynq-parallella1-e16-microserver.dtb (doesn't fully fit the scheme...)
 zynq-parallella1-e64-hdmi.dtb
 zynq-parallella1-e64-headless.dtb
 zynq-parallella2-*.dtb
In the former case, the name remains stable for capable boards, but using 
it on lesser capable boards may break. In the latter case, users of all 
boards need to choose a more specific file whenever incompatible changes 
are made. Since no effort has been made to provide users with a smooth
downstream-to-upstream path, I guess we can at least neglect that scenario,
already having diverged by now.

Regards,
Andreas

Andreas F?rber (5):
  ARM: dts: zynq: Split out common Parallella bits
  ARM: dts: zynq: Add pinctrl to Parallella
  ARM: dts: zynq: Add LED for Parallella
  ARM: dts: zynq: Split off Parallella Microserver device tree
  ARM: dts: zynq: Add USB for Parallella

 arch/arm/boot/dts/Makefile                        |   1 +
 arch/arm/boot/dts/zynq-parallella-microserver.dts |  19 ++
 arch/arm/boot/dts/zynq-parallella.dts             |  72 +-----
 arch/arm/boot/dts/zynq-parallella1.dtsi           | 297 ++++++++++++++++++++++
 4 files changed, 323 insertions(+), 66 deletions(-)
 create mode 100644 arch/arm/boot/dts/zynq-parallella-microserver.dts
 create mode 100644 arch/arm/boot/dts/zynq-parallella1.dtsi

-- 
2.2.2

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/5] ARM: dts: zynq: Split out common Parallella bits
  2015-02-12  0:55 [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella Andreas Färber
@ 2015-02-12  0:55 ` Andreas Färber
  2015-02-12  0:55 ` [PATCH 2/5] ARM: dts: zynq: Add pinctrl to Parallella Andreas Färber
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Andreas Färber @ 2015-02-12  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

This prepares for the USB-less Microserver edition as well as
headless vs. HDMI bitstreams.

Cc: Ola Jeppsson <ola@adapteva.com>
Signed-off-by: Andreas F?rber <afaerber@suse.de>
---
 arch/arm/boot/dts/zynq-parallella.dts              | 80 +---------------------
 .../{zynq-parallella.dts => zynq-parallella1.dtsi} |  3 +-
 2 files changed, 3 insertions(+), 80 deletions(-)
 copy arch/arm/boot/dts/{zynq-parallella.dts => zynq-parallella1.dtsi} (97%)

diff --git a/arch/arm/boot/dts/zynq-parallella.dts b/arch/arm/boot/dts/zynq-parallella.dts
index 0ebd2107022b..99ee6551ae8d 100644
--- a/arch/arm/boot/dts/zynq-parallella.dts
+++ b/arch/arm/boot/dts/zynq-parallella.dts
@@ -1,11 +1,6 @@
 /*
  * Copyright (c) 2014 SUSE LINUX Products GmbH
- *
- * Derived from zynq-zed.dts:
- *
- *  Copyright (C) 2011 Xilinx
- *  Copyright (C) 2012 National Instruments Corp.
- *  Copyright (C) 2013 Xilinx
+ * Copyright (c) 2015 SUSE Linux GmbH
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -17,79 +12,8 @@
  * GNU General Public License for more details.
  */
 /dts-v1/;
-/include/ "zynq-7000.dtsi"
+#include "zynq-parallella1.dtsi"
 
 / {
 	model = "Adapteva Parallella Board";
-	compatible = "adapteva,parallella", "xlnx,zynq-7000";
-
-	aliases {
-		ethernet0 = &gem0;
-		serial0 = &uart1;
-	};
-
-	memory {
-		device_type = "memory";
-		reg = <0x0 0x40000000>;
-	};
-
-	chosen {
-		bootargs = "console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait";
-		linux,stdout-path = "/amba/serial at e0001000";
-	};
-};
-
-&clkc {
-	fclk-enable = <0xf>;
-	ps-clk-frequency = <33333333>;
-};
-
-&gem0 {
-	status = "okay";
-	phy-mode = "rgmii-id";
-	phy-handle = <&ethernet_phy>;
-
-	ethernet_phy: ethernet-phy at 0 {
-		/* Marvell 88E1318 */
-		compatible = "ethernet-phy-id0141.0e90",
-		             "ethernet-phy-ieee802.3-c22";
-		reg = <0>;
-		marvell,reg-init = <0x3 0x10 0xff00 0x1e>,
-		                   <0x3 0x11 0xfff0 0xa>;
-	};
-};
-
-&i2c0 {
-	status = "okay";
-
-	isl9305: isl9305 at 68 {
-		compatible = "isil,isl9305";
-		reg = <0x68>;
-
-		regulators {
-			dcd1 {
-				regulator-name = "VDD_DSP";
-				regulator-always-on;
-			};
-			dcd2 {
-				regulator-name = "1P35V";
-				regulator-always-on;
-			};
-			ldo1 {
-				regulator-name = "VDD_ADJ";
-			};
-			ldo2 {
-				regulator-name = "VDD_GPIO";
-				regulator-always-on;
-			};
-		};
-	};
-};
-
-&sdhci1 {
-	status = "okay";
-};
-
-&uart1 {
-	status = "okay";
 };
diff --git a/arch/arm/boot/dts/zynq-parallella.dts b/arch/arm/boot/dts/zynq-parallella1.dtsi
similarity index 97%
copy from arch/arm/boot/dts/zynq-parallella.dts
copy to arch/arm/boot/dts/zynq-parallella1.dtsi
index 0ebd2107022b..7c1206f928bc 100644
--- a/arch/arm/boot/dts/zynq-parallella.dts
+++ b/arch/arm/boot/dts/zynq-parallella1.dtsi
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014 SUSE LINUX Products GmbH
+ * Copyright (c) 2015 SUSE Linux GmbH
  *
  * Derived from zynq-zed.dts:
  *
@@ -16,11 +17,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
-/dts-v1/;
 /include/ "zynq-7000.dtsi"
 
 / {
-	model = "Adapteva Parallella Board";
 	compatible = "adapteva,parallella", "xlnx,zynq-7000";
 
 	aliases {
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] ARM: dts: zynq: Add pinctrl to Parallella
  2015-02-12  0:55 [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella Andreas Färber
  2015-02-12  0:55 ` [PATCH 1/5] ARM: dts: zynq: Split out common Parallella bits Andreas Färber
@ 2015-02-12  0:55 ` Andreas Färber
  2015-02-12  0:55 ` [PATCH 3/5] ARM: dts: zynq: Add LED for Parallella Andreas Färber
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Andreas Färber @ 2015-02-12  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andreas F?rber <afaerber@suse.de>
---
 arch/arm/boot/dts/zynq-parallella1.dtsi | 118 ++++++++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)

diff --git a/arch/arm/boot/dts/zynq-parallella1.dtsi b/arch/arm/boot/dts/zynq-parallella1.dtsi
index 7c1206f928bc..e77a4968fe17 100644
--- a/arch/arm/boot/dts/zynq-parallella1.dtsi
+++ b/arch/arm/boot/dts/zynq-parallella1.dtsi
@@ -47,6 +47,8 @@
 	status = "okay";
 	phy-mode = "rgmii-id";
 	phy-handle = <&ethernet_phy>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_gem0_default>;
 
 	ethernet_phy: ethernet-phy at 0 {
 		/* Marvell 88E1318 */
@@ -58,6 +60,11 @@
 	};
 };
 
+&gpio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_gpio0_default>;
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -85,10 +92,121 @@
 	};
 };
 
+&pinctrl0 {
+	pinctrl_gem0_default: gem0-default {
+		mux {
+			function = "ethernet0";
+			groups = "ethernet0_0_grp";
+		};
+
+		conf {
+			groups = "ethernet0_0_grp";
+			slew-rate = <0>;
+			io-standard = <1>;
+		};
+
+		conf-rx {
+			pins = "MIO22", "MIO23", "MIO24", "MIO25", "MIO26", "MIO27";
+			bias-high-impedance;
+			low-power-disable;
+		};
+
+		conf-tx {
+			pins = "MIO16", "MIO17", "MIO18", "MIO19", "MIO20", "MIO21";
+			bias-disable;
+			low-power-enable;
+		};
+
+		mux-mdio {
+			function = "mdio0";
+			groups = "mdio0_0_grp";
+		};
+
+		conf-mdio {
+			groups = "mdio0_0_grp";
+			slew-rate = <0>;
+			io-standard = <1>;
+			bias-disable;
+		};
+	};
+
+	pinctrl_gpio0_default: gpio0-default {
+		mux {
+			function = "gpio0";
+			groups = "gpio0_7_grp";
+		};
+
+		conf {
+			groups = "gpio0_7_grp";
+			slew-rate = <0>;
+			io-standard = <3>;
+		};
+
+		conf-pull-up {
+			pins = "MIO7";
+			bias-pull-up;
+		};
+	};
+
+	pinctrl_sdhci1_default: sdhci1-default {
+		mux {
+			function = "sdio1";
+			groups = "sdio1_0_grp";
+		};
+
+		conf {
+			groups = "sdio1_0_grp";
+			slew-rate = <0>;
+			io-standard = <1>;
+			bias-disable;
+		};
+
+		mux-cd {
+			function = "sdio1_cd";
+			groups = "gpio0_0_grp";
+		};
+
+		conf-cd {
+			groups = "gpio0_0_grp";
+			bias-high-impedance;
+			bias-pull-up;
+			slew-rate = <0>;
+			io-standard = <3>;
+		};
+	};
+
+	pinctrl_uart1_default: uart1-default {
+		mux {
+			function = "uart1";
+			groups = "uart1_0_grp";
+		};
+
+		conf {
+			groups = "uart1_0_grp";
+			slew-rate = <0>;
+			io-standard = <3>;
+		};
+
+		conf-rx {
+			pins = "MIO9";
+			bias-high-impedance;
+		};
+
+		conf-tx {
+			pins = "MIO8";
+			bias-disable = <0>;
+		};
+	};
+};
+
 &sdhci1 {
 	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sdhci1_default>;
 };
 
 &uart1 {
 	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart1_default>;
 };
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] ARM: dts: zynq: Add LED for Parallella
  2015-02-12  0:55 [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella Andreas Färber
  2015-02-12  0:55 ` [PATCH 1/5] ARM: dts: zynq: Split out common Parallella bits Andreas Färber
  2015-02-12  0:55 ` [PATCH 2/5] ARM: dts: zynq: Add pinctrl to Parallella Andreas Färber
@ 2015-02-12  0:55 ` Andreas Färber
  2015-02-12  0:55 ` [PATCH 4/5] ARM: dts: zynq: Split off Parallella Microserver device tree Andreas Färber
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Andreas Färber @ 2015-02-12  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

This is the green LED CR10.

Signed-off-by: Andreas F?rber <afaerber@suse.de>
---
 arch/arm/boot/dts/zynq-parallella1.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/zynq-parallella1.dtsi b/arch/arm/boot/dts/zynq-parallella1.dtsi
index e77a4968fe17..8b2895c06c8e 100644
--- a/arch/arm/boot/dts/zynq-parallella1.dtsi
+++ b/arch/arm/boot/dts/zynq-parallella1.dtsi
@@ -18,6 +18,7 @@
  * GNU General Public License for more details.
  */
 /include/ "zynq-7000.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	compatible = "adapteva,parallella", "xlnx,zynq-7000";
@@ -36,6 +37,16 @@
 		bootargs = "console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait";
 		linux,stdout-path = "/amba/serial at e0001000";
 	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		cr10 {
+			label = "parallella:cr10:usr";
+			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+		};
+	};
 };
 
 &clkc {
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] ARM: dts: zynq: Split off Parallella Microserver device tree
  2015-02-12  0:55 [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella Andreas Färber
                   ` (2 preceding siblings ...)
  2015-02-12  0:55 ` [PATCH 3/5] ARM: dts: zynq: Add LED for Parallella Andreas Färber
@ 2015-02-12  0:55 ` Andreas Färber
  2015-02-12 13:12   ` Ola Jeppsson
  2015-02-12  0:55 ` [PATCH 5/5] ARM: dts: zynq: Add USB for Parallella Andreas Färber
  2015-02-12  1:19 ` [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, " Sören Brinkmann
  5 siblings, 1 reply; 10+ messages in thread
From: Andreas Färber @ 2015-02-12  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

The Microserver edition has neither HDMI nor USB.

Cc: Ola Jeppsson <ola@adapteva.com>
Signed-off-by: Andreas F?rber <afaerber@suse.de>
---
 arch/arm/boot/dts/Makefile                        |  1 +
 arch/arm/boot/dts/zynq-parallella-microserver.dts | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 arch/arm/boot/dts/zynq-parallella-microserver.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a1c776b8dcec..42c75eeba584 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -606,6 +606,7 @@ dtb-$(CONFIG_ARCH_VT8500) += \
 	wm8850-w70v2.dtb
 dtb-$(CONFIG_ARCH_ZYNQ) += \
 	zynq-parallella.dtb \
+	zynq-parallella-microserver.dtb \
 	zynq-zc702.dtb \
 	zynq-zc706.dtb \
 	zynq-zed.dtb \
diff --git a/arch/arm/boot/dts/zynq-parallella-microserver.dts b/arch/arm/boot/dts/zynq-parallella-microserver.dts
new file mode 100644
index 000000000000..1f3bd2d27a93
--- /dev/null
+++ b/arch/arm/boot/dts/zynq-parallella-microserver.dts
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ * Copyright (c) 2015 SUSE Linux GmbH
+ *
+ * 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-parallella1.dtsi"
+
+/ {
+	model = "Adapteva Parallella Microserver Board";
+};
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] ARM: dts: zynq: Add USB for Parallella
  2015-02-12  0:55 [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella Andreas Färber
                   ` (3 preceding siblings ...)
  2015-02-12  0:55 ` [PATCH 4/5] ARM: dts: zynq: Split off Parallella Microserver device tree Andreas Färber
@ 2015-02-12  0:55 ` Andreas Färber
  2015-02-12  1:19 ` [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, " Sören Brinkmann
  5 siblings, 0 replies; 10+ messages in thread
From: Andreas Färber @ 2015-02-12  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

The Microserver edition does not feature USB - only the Kickstarter,
pre-order, Desktop and Embedded editions.

Signed-off-by: Andreas F?rber <afaerber@suse.de>
---
 arch/arm/boot/dts/zynq-parallella.dts   | 16 +++++++
 arch/arm/boot/dts/zynq-parallella1.dtsi | 74 +++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/arch/arm/boot/dts/zynq-parallella.dts b/arch/arm/boot/dts/zynq-parallella.dts
index 99ee6551ae8d..b2eede1c708f 100644
--- a/arch/arm/boot/dts/zynq-parallella.dts
+++ b/arch/arm/boot/dts/zynq-parallella.dts
@@ -17,3 +17,19 @@
 / {
 	model = "Adapteva Parallella Board";
 };
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb_phy1 {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/zynq-parallella1.dtsi b/arch/arm/boot/dts/zynq-parallella1.dtsi
index 8b2895c06c8e..1395aaadf3be 100644
--- a/arch/arm/boot/dts/zynq-parallella1.dtsi
+++ b/arch/arm/boot/dts/zynq-parallella1.dtsi
@@ -47,6 +47,18 @@
 			default-state = "on";
 		};
 	};
+
+	usb_phy0: phy0 {
+		compatible = "usb-nop-xceiv";
+		#phy-cells = <0>;
+		status = "disabled";
+	};
+
+	usb_phy1: phy1 {
+		compatible = "usb-nop-xceiv";
+		#phy-cells = <0>;
+		status = "disabled";
+	};
 };
 
 &clkc {
@@ -208,6 +220,54 @@
 			bias-disable = <0>;
 		};
 	};
+
+	pinctrl_usb0_default: usb0-default {
+		mux {
+			function = "usb0";
+			groups = "usb0_0_grp";
+		};
+
+		conf {
+			groups = "usb0_0_grp";
+			slew-rate = <0>;
+			io-standard = <1>;
+		};
+
+		conf-rx {
+			pins = "MIO29", "MIO31", "MIO36";
+			bias-high-impedance;
+		};
+
+		conf-tx {
+			pins = "MIO28", "MIO30", "MIO32", "MIO33", "MIO34",
+			       "MIO35", "MIO37", "MIO38", "MIO39";
+			bias-disable;
+		};
+	};
+
+	pinctrl_usb1_default: usb1-default {
+		mux {
+			function = "usb1";
+			groups = "usb1_0_grp";
+		};
+
+		conf {
+			groups = "usb1_0_grp";
+			slew-rate = <0>;
+			io-standard = <1>;
+		};
+
+		conf-rx {
+			pins = "MIO41", "MIO43", "MIO48";
+			bias-high-impedance;
+		};
+
+		conf-tx {
+			pins = "MIO40", "MIO42", "MIO44", "MIO45", "MIO46",
+			       "MIO47", "MIO49", "MIO50", "MIO51";
+			bias-disable;
+		};
+	};
 };
 
 &sdhci1 {
@@ -221,3 +281,17 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1_default>;
 };
+
+&usb0 {
+	dr_mode = "host";
+	usb-phy = <&usb_phy0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb0_default>;
+};
+
+&usb1 {
+	dr_mode = "peripheral";
+	usb-phy = <&usb_phy1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb1_default>;
+};
-- 
2.2.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella
  2015-02-12  0:55 [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella Andreas Färber
                   ` (4 preceding siblings ...)
  2015-02-12  0:55 ` [PATCH 5/5] ARM: dts: zynq: Add USB for Parallella Andreas Färber
@ 2015-02-12  1:19 ` Sören Brinkmann
  2015-02-12  2:58   ` Andreas Färber
  5 siblings, 1 reply; 10+ messages in thread
From: Sören Brinkmann @ 2015-02-12  1:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2015-02-12 at 01:55AM +0100, Andreas F?rber wrote:
> Hello,
> 
> This series is based on linux-next plus Michal's aliases patch.
> https://patchwork.kernel.org/patch/5812541/
> 
> Patch 2 adds pinctrl for the Parallella board. No such information was 
> visible downstream, so this is based on S?ren's patch and the schematic 
> plus some testing. In particular the Ethernet voltage level seems to be 
> different from the other Zynq boards upstream (io-standard 1 vs. 4).
> 
> Patch 3 adds an LED. This is a feature not present downstream. No 
> default trigger is thus used and I chose the label scheme used by sunxi 
> and omap (zynq-zc702.dts uses just "ds23").
> Tested as follows:
> echo mmc0 > /sys/class/leds/parallella:cr10:usr/trigger #or s/mmc0/heartbeat/
> (on openSUSE Tumbleweed I appended this to /etc/init.d/boot.local script)
> 
> Patch 5 goes on to add USB support. As the Microserver edition does not 
> have USB, the bulk of nodes is moved to a new .dtsi file in patch 1.
> 
> Note: Adapteva's downstream tree has in the meantime split zynq-parallella.dts 
> into zynq-parallella1-{hdmi,headless}.dts (without discussing this here first).
> Since zynq-parallella.dts has already been released, I have chosen to 
> stay with that name and have therefore named the Microserver edition 
> zynq-parallella-microserver.dts, while naming the shared file 
> zynq-parallella1.dtsi.
> Anyone prefer to name the new file zynq-parallella1-microserver.dts?
> 
> On my work branch https://github.com/afaerber/linux/commits/parallella-next
> I have further prepared a zynq-parallella-headless.dts variant 
> following this scheme. Depending on how the Epiphany driver evolves, we 
> may further need to split the non-Microserver variant(s) into e16 vs. e64
> variants to cope with some Kickstarter boards.
> 
> Is there some rule for device tree file name stability when splitting a 
> file due to additional nodes?
> 
> Example of historic growth:
>  zynq-parallella.dtb (today works on all boards) -- now with USB/HDMI
>  zynq-parallella-microserver.dtb (this series) -- without USB/HDMI
>  zynq-parallella-headless.dtb -- with USB/HDMI, but no FPGA HDMI support
>  zynq-parallella-e64.dtb -- with Epiphany-IV instead of Epiphany-III
>  zynq-parallella-e64-headless.dtb -- ditto, but different FPGA bitstream
>  zynq-parallella2-*.dtb
> vs. extreme distinction:
>  zynq-parallella1-e16-hdmi.dtb
>  zynq-parallella1-e16-headless.dtb
>  zynq-parallella1-e16-microserver.dtb (doesn't fully fit the scheme...)
>  zynq-parallella1-e64-hdmi.dtb
>  zynq-parallella1-e64-headless.dtb
>  zynq-parallella2-*.dtb
> In the former case, the name remains stable for capable boards, but using 
> it on lesser capable boards may break. In the latter case, users of all 
> boards need to choose a more specific file whenever incompatible changes 
> are made. Since no effort has been made to provide users with a smooth
> downstream-to-upstream path, I guess we can at least neglect that scenario,
> already having diverged by now.

I'm just thinking out loud here. I think it's reasonable to have a dts
for each platform/board. On dtsi files the opinions seem to diverge,
but as long as it isn't a completely confusing include scheme,
I'm always for minimizing duplication.
But what I'm not convinced of is, additional dts files for different
bitstreams. The amount of variation you can achieve by programming
different bitstreams is virtually unlimited. Having a dts file for all
of that upstream doesn't seem that reasonable to me.

So, I'd say it needs parallella-{userver, e16, e64} (conceptually, the
names I don't care). I think it should be possible for all of those to
inherit from zynq-7000.dtsi or is there a reason to have a parallella
dtsi?

	S?ren

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella
  2015-02-12  1:19 ` [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, " Sören Brinkmann
@ 2015-02-12  2:58   ` Andreas Färber
  2015-02-12  3:31     ` Sören Brinkmann
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Färber @ 2015-02-12  2:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi S?ren,

Am 12.02.2015 um 02:19 schrieb S?ren Brinkmann:
> I'm just thinking out loud here. I think it's reasonable to have a dts
> for each platform/board. On dtsi files the opinions seem to diverge,
> but as long as it isn't a completely confusing include scheme,
> I'm always for minimizing duplication.
> But what I'm not convinced of is, additional dts files for different
> bitstreams. The amount of variation you can achieve by programming
> different bitstreams is virtually unlimited. Having a dts file for all
> of that upstream doesn't seem that reasonable to me.

Hm, for your Xilinx boards or for the Zed board I would agree. However,
Adapteva specifically offers two alternative bitstreams per board:
https://github.com/parallella/parallella-hw/tree/master/fpga/bitstreams
ftp://ftp.parallella.org/boot/linux/

Don't you think it's reasonable to support those official two, while
letting people who tinker with bitstreams themselves worry about their
own device trees?

Personally I use the HDMI bitstream (despite the ADI AXI HDMI driver
still missing, i.e. headless), so I don't insist on having headless DTs.

>From a distro perspective we'd put just one bitstream (HDMI probably) in
a JeOS image and would set it up to use the matching device tree. On the
other hand, if we were providing both bitstreams and had both dtbs
packaged, then switching would be two file copies or a boot.scr update.
So far the FAT boot partition has kept me from preparing such an image,
don't know how far other distros are here.

I'll leave it to Ola and Andreas O. to comment on how widely the
headless bitstream is used. But as a reminder, it was you S?ren who
discouraged me from adding VDMA etc. to the device tree in case the
bitstream doesn't provide it:
https://patchwork.kernel.org/patch/4620231/
Therefore I've prepared said headless vs. HDMI DT split. ;)

> So, I'd say it needs parallella-{userver, e16, e64} (conceptually, the
> names I don't care). I think it should be possible for all of those to
> inherit from zynq-7000.dtsi or is there a reason to have a parallella
> dtsi?

It would be possible, but it would result in duplication. For the Exynos
Chromebooks we decided that there were not enough common bits, so we
inlined an existing .dtsi and I've been using manual diff -u for
checking which bits people forgot to sync (and I do have a local patch
fixing some things that went out of sync that I need to submit...).

In this case it seems the "same" board with some components left out. We
could duplicate the PHYs for instance (which are physically absent for
the Microserver IIUC), but I'd rather not duplicate all those gory
pinctrl settings.

Cheers,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG N?rnberg)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella
  2015-02-12  2:58   ` Andreas Färber
@ 2015-02-12  3:31     ` Sören Brinkmann
  0 siblings, 0 replies; 10+ messages in thread
From: Sören Brinkmann @ 2015-02-12  3:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2015-02-12 at 03:58AM +0100, Andreas F?rber wrote:
> Hi S?ren,
> 
> Am 12.02.2015 um 02:19 schrieb S?ren Brinkmann:
> > I'm just thinking out loud here. I think it's reasonable to have a dts
> > for each platform/board. On dtsi files the opinions seem to diverge,
> > but as long as it isn't a completely confusing include scheme,
> > I'm always for minimizing duplication.
> > But what I'm not convinced of is, additional dts files for different
> > bitstreams. The amount of variation you can achieve by programming
> > different bitstreams is virtually unlimited. Having a dts file for all
> > of that upstream doesn't seem that reasonable to me.
> 
> Hm, for your Xilinx boards or for the Zed board I would agree. However,
> Adapteva specifically offers two alternative bitstreams per board:
> https://github.com/parallella/parallella-hw/tree/master/fpga/bitstreams
> ftp://ftp.parallella.org/boot/linux/
> 
> Don't you think it's reasonable to support those official two, while
> letting people who tinker with bitstreams themselves worry about their
> own device trees?
> 
> Personally I use the HDMI bitstream (despite the ADI AXI HDMI driver
> still missing, i.e. headless), so I don't insist on having headless DTs.
> 
> From a distro perspective we'd put just one bitstream (HDMI probably) in
> a JeOS image and would set it up to use the matching device tree. On the
> other hand, if we were providing both bitstreams and had both dtbs
> packaged, then switching would be two file copies or a boot.scr update.
> So far the FAT boot partition has kept me from preparing such an image,
> don't know how far other distros are here.
> 
> I'll leave it to Ola and Andreas O. to comment on how widely the
> headless bitstream is used. But as a reminder, it was you S?ren who
> discouraged me from adding VDMA etc. to the device tree in case the
> bitstream doesn't provide it:
> https://patchwork.kernel.org/patch/4620231/
> Therefore I've prepared said headless vs. HDMI DT split. ;)

Yeah, I vaguely remember that we had this topic before. And in the end,
it's not my decision. I just think, it needs to be discussed what to
achieve with the DTs that are upstream and where to draw the line (or
maybe there is already a policy that I'm not aware of).

> 
> > So, I'd say it needs parallella-{userver, e16, e64} (conceptually, the
> > names I don't care). I think it should be possible for all of those to
> > inherit from zynq-7000.dtsi or is there a reason to have a parallella
> > dtsi?
> 
> It would be possible, but it would result in duplication. For the Exynos
> Chromebooks we decided that there were not enough common bits, so we
> inlined an existing .dtsi and I've been using manual diff -u for
> checking which bits people forgot to sync (and I do have a local patch
> fixing some things that went out of sync that I need to submit...).
> 
> In this case it seems the "same" board with some components left out. We
> could duplicate the PHYs for instance (which are physically absent for
> the Microserver IIUC), but I'd rather not duplicate all those gory
> pinctrl settings.

Fair enough. Though, since the userver doesn't have USB even pinctrl
would differ.

	Soren

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/5] ARM: dts: zynq: Split off Parallella Microserver device tree
  2015-02-12  0:55 ` [PATCH 4/5] ARM: dts: zynq: Split off Parallella Microserver device tree Andreas Färber
@ 2015-02-12 13:12   ` Ola Jeppsson
  0 siblings, 0 replies; 10+ messages in thread
From: Ola Jeppsson @ 2015-02-12 13:12 UTC (permalink / raw)
  To: linux-arm-kernel

On 2015-02-12 01:55, Andreas F?rber wrote:
> The Microserver edition has neither HDMI nor USB.
>
> Cc: Ola Jeppsson <ola@adapteva.com>
> Signed-off-by: Andreas F?rber <afaerber@suse.de>
> ---
>   arch/arm/boot/dts/Makefile                        |  1 +
>   arch/arm/boot/dts/zynq-parallella-microserver.dts | 19 +++++++++++++++++++
>   2 files changed, 20 insertions(+)
>   create mode 100644 arch/arm/boot/dts/zynq-parallella-microserver.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index a1c776b8dcec..42c75eeba584 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -606,6 +606,7 @@ dtb-$(CONFIG_ARCH_VT8500) += \
>   	wm8850-w70v2.dtb
>   dtb-$(CONFIG_ARCH_ZYNQ) += \
>   	zynq-parallella.dtb \
> +	zynq-parallella-microserver.dtb \
>   	zynq-zc702.dtb \
>   	zynq-zc706.dtb \
>   	zynq-zed.dtb \
> diff --git a/arch/arm/boot/dts/zynq-parallella-microserver.dts b/arch/arm/boot/dts/zynq-parallella-microserver.dts
> new file mode 100644
> index 000000000000..1f3bd2d27a93
> --- /dev/null
> +++ b/arch/arm/boot/dts/zynq-parallella-microserver.dts
> @@ -0,0 +1,19 @@
> +/*
> + * Copyright (c) 2014 SUSE LINUX Products GmbH
> + * Copyright (c) 2015 SUSE Linux GmbH
> + *
> + * 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-parallella1.dtsi"
> +
> +/ {
> +	model = "Adapteva Parallella Microserver Board";
> +};
To me it would make more sense to use the model number in the file name.
I.e., p1600 instead of microserver.

http://www.digikey.com/product-search/en?v=1554&FV=fff40028%2Cfff8014d


// Ola

-- 
Phone: +46.733208642
Skype: olajep
Email: ola at adapteva.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-12 13:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12  0:55 [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, USB for Parallella Andreas Färber
2015-02-12  0:55 ` [PATCH 1/5] ARM: dts: zynq: Split out common Parallella bits Andreas Färber
2015-02-12  0:55 ` [PATCH 2/5] ARM: dts: zynq: Add pinctrl to Parallella Andreas Färber
2015-02-12  0:55 ` [PATCH 3/5] ARM: dts: zynq: Add LED for Parallella Andreas Färber
2015-02-12  0:55 ` [PATCH 4/5] ARM: dts: zynq: Split off Parallella Microserver device tree Andreas Färber
2015-02-12 13:12   ` Ola Jeppsson
2015-02-12  0:55 ` [PATCH 5/5] ARM: dts: zynq: Add USB for Parallella Andreas Färber
2015-02-12  1:19 ` [PATCH RFC 0/5] ARM: dts: zynq: pinctrl, LED, " Sören Brinkmann
2015-02-12  2:58   ` Andreas Färber
2015-02-12  3:31     ` Sören Brinkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).