Skip to contentSkip to conversation

ARM: dts: zynq: pinctrl, LED, USB for Parallella

RFC PATCH In review Andreas Färber 3 participants 10 messages Feb 12, 2015

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

cover ARM: dts: zynq: pinctrl, LED, USB for Parallella

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
Signature · 1 line
2.2.2
#1 lore raw

PATCH 1/5 ARM: dts: zynq: Split out common Parallella bits

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

---
 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%)
arch/arm/boot/dts/zynq-parallella.dts +2 -78
index 0ebd2107022b..99ee6551ae8d 100644
@@ -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";
 };
arch/arm/boot/dts/zynq-parallella1.dtsi renamed from arch/arm/boot/dts/zynq-parallella.dts +1 -2
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
@@ -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 {
Signature · 1 line
2.2.2
#2 lore raw

PATCH 2/5 ARM: dts: zynq: Add pinctrl to Parallella

In reply to Andreas Färber
---
 arch/arm/boot/dts/zynq-parallella1.dtsi | 118 ++++++++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)
arch/arm/boot/dts/zynq-parallella1.dtsi +118 -0
index 7c1206f928bc..e77a4968fe17 100644
@@ -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>;
 };
Signature · 1 line
2.2.2
#3 lore raw

PATCH 3/5 ARM: dts: zynq: Add LED for Parallella

In reply to Andreas Färber

This is the green LED CR10.

---
 arch/arm/boot/dts/zynq-parallella1.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/zynq-parallella1.dtsi +11 -0
index e77a4968fe17..8b2895c06c8e 100644
@@ -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 {
Signature · 1 line
2.2.2
#4 lore raw

PATCH 4/5 ARM: dts: zynq: Split off Parallella Microserver device tree

In reply to Andreas Färber

The Microserver edition has neither HDMI nor USB.

---
 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
arch/arm/boot/dts/Makefile +1 -0
index a1c776b8dcec..42c75eeba584 100644
@@ -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 \
arch/arm/boot/dts/zynq-parallella-microserver.dts new file +19 -0
new file mode 100644
index 000000000000..1f3bd2d27a93
@@ -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";
+};
Signature · 1 line
2.2.2
#5 lore raw

Re: [PATCH 4/5] ARM: dts: zynq: Split off Parallella Microserver device tree

Quoted 37 lines · Andreas F?rber

The Microserver edition has neither HDMI nor USB.

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

arch/arm/boot/dts/Makefile +1 -0
index a1c776b8dcec..42c75eeba584 100644
@@ -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 \
arch/arm/boot/dts/zynq-parallella-microserver.dts new file +9 -0
new file mode 100644
index 000000000000..1f3bd2d27a93
@@ -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,

arch/arm/boot/dts/zynq-parallella-microserver.dts line 19

Quoted 10 lines
arch/arm/boot/dts/zynq-parallella-microserver.dts new file +10 -0
+ * 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

Signature · 3 lines
Phone: +46.733208642
Skype: olajep
Email: ola at adapteva.com
#6 lore raw

PATCH 5/5 ARM: dts: zynq: Add USB for Parallella

In reply to Andreas Färber

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

---
 arch/arm/boot/dts/zynq-parallella.dts   | 16 +++++++
 arch/arm/boot/dts/zynq-parallella1.dtsi | 74 +++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)
arch/arm/boot/dts/zynq-parallella.dts +16 -0
index 99ee6551ae8d..b2eede1c708f 100644
@@ -17,3 +17,19 @@
 / {
 	model = "Adapteva Parallella Board";
 };
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb_phy1 {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
arch/arm/boot/dts/zynq-parallella1.dtsi +74 -0

89 lines not on this page · raw message

Signature · 1 line
2.2.2
#7 lore raw

cover ARM: dts: zynq: pinctrl, LED, USB for Parallella

In reply to Andreas Färber
Quoted 49 lines · Andreas F?rber

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

Quoted 8 lines

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

#8 lore raw

cover ARM: dts: zynq: pinctrl, LED, USB for Parallella

Hi S?ren,

Am 12.02.2015 um 02:19 schrieb S?ren Brinkmann:

Quoted 8 lines

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.

Quoted 1 line

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. ;)

Quoted 4 lines

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

Signature · 3 lines
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)
#9 lore raw

cover ARM: dts: zynq: pinctrl, LED, USB for Parallella

Quoted 31 lines · Andreas F?rber

Hi S?ren,

Am 12.02.2015 um 02:19 schrieb S?ren Brinkmann:

Quoted 8 lines

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.

Quoted 6 lines

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

Quoted 12 lines
Quoted 5 lines

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

Quoted 4 lines

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