Skip to contentSkip to conversation

ARM: dts: Gateworks GW5520 support (i.MX6)

PATCH New Tim Harvey 4 participants 11 messages Aug 9, 2014 – Aug 25, 2014

Subsystems (3)
lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

Add support for the Gateworks GW5520 board.

---
 arch/arm/boot/dts/Makefile            |   2 +
 arch/arm/boot/dts/imx6dl-gw552x.dts   |  20 +++
 arch/arm/boot/dts/imx6q-gw552x.dts    |  24 +++
 arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 282 ++++++++++++++++++++++++++++++++++
 4 files changed, 328 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6dl-gw552x.dts
 create mode 100644 arch/arm/boot/dts/imx6q-gw552x.dts
 create mode 100644 arch/arm/boot/dts/imx6qdl-gw552x.dtsi
arch/arm/boot/dts/Makefile +2 -0
index adb5ed9..99697b4 100644
@@ -188,6 +188,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
 	imx6dl-gw52xx.dtb \
 	imx6dl-gw53xx.dtb \
 	imx6dl-gw54xx.dtb \
+	imx6dl-gw552x.dtb \
 	imx6dl-hummingboard.dtb \
 	imx6dl-nitrogen6x.dtb \
 	imx6dl-phytec-pbab01.dtb \
@@ -207,6 +208,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
 	imx6q-gw53xx.dtb \
 	imx6q-gw5400-a.dtb \
 	imx6q-gw54xx.dtb \
+	imx6q-gw552x.dtb \
 	imx6q-nitrogen6x.dtb \
 	imx6q-phytec-pbab01.dtb \
 	imx6q-sabreauto.dtb \
arch/arm/boot/dts/imx6dl-gw552x.dts new file +20 -0
new file mode 100644
index 0000000..a4b700c
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+
+#include "imx6dl.dtsi"
+#include "imx6qdl-gw552x.dtsi"
+
+/ {
+	model = "Gateworks Ventana i.MX6 DualLite/Solo GW552X";
+	compatible = "gw,imx6dl-gw552x", "gw,ventana", "fsl,imx6dl";
+};
arch/arm/boot/dts/imx6q-gw552x.dts new file +24 -0
new file mode 100644
index 0000000..f87a8fa
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6qdl-gw552x.dtsi"
+
+/ {
+	model = "Gateworks Ventana i.MX6 Dual/Quad GW552X";
+	compatible = "gw,imx6q-gw552x", "gw,ventana", "fsl,imx6q";
+};
+
+&sata {
+	status = "okay";
+};
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +282 -0

282 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

Quoted 12 lines · Tim Harvey

Add support for the Gateworks GW5520 board.

---
  arch/arm/boot/dts/Makefile            |   2 +
  arch/arm/boot/dts/imx6dl-gw552x.dts   |  20 +++
  arch/arm/boot/dts/imx6q-gw552x.dts    |  24 +++
  arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 282 ++++++++++++++++++++++++++++++++++
  4 files changed, 328 insertions(+)

create mode 100644 arch/arm/boot/dts/imx6dl-gw552x.dts create mode 100644 arch/arm/boot/dts/imx6q-gw552x.dts create mode 100644 arch/arm/boot/dts/imx6qdl-gw552x.dtsi

...

Quoted 16 lines
arch/arm/boot/dts/imx6dl-gw552x.dts new file +10 -0
new file mode 100644
index 0000000..a4b700c
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */

arch/arm/boot/dts/imx6dl-gw552x.dts line 20

Quoted 10 lines
arch/arm/boot/dts/imx6dl-gw552x.dts new file +10 -0
+
+/dts-v1/;
+
+#include "imx6dl.dtsi"
+#include "imx6qdl-gw552x.dtsi"
+
+/ {
+	model = "Gateworks Ventana i.MX6 DualLite/Solo GW552X";
+	compatible = "gw,imx6dl-gw552x", "gw,ventana", "fsl,imx6dl";
+};

I don't see 'gw' in the device tree vendor prefixes, so it should to be added to Documentation/devicetree/bindings/vendor-prefixes.txt as well.

Regards
Tony Prisk

#2 lore raw

PATCH 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

In reply to Tim Harvey

Hello Tim,

Quoted 10 lines · Tim Harvey

+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */

There was a discussion [0] recently about what license(s) should be used for Device Tree source files. It seems that we have been using GPLv2-only just because is the Linux kernel license but unlike other source files, the DTS could be used verbatim in other operating systems / bootloaders so we have to better think the implications of the licensing.

Of course this shouldn't hold your patch, I'm just mentioning so you can keep an eye in case an agreement is made while you are pushing this.

Quoted 17 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +17 -0
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       /* these are used by bootloader for disabling nodes */
+       aliases {
+               led0 = &led0;
+               led1 = &led1;
+               led2 = &led2;
+               nand = &gpmi;
+               usb0 = &usbh1;
+               usb1 = &usbotg;
+       };
+
+       chosen {
+               bootargs = "console=ttymxc1,115200";

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 37

Quoted 10 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +10 -0
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_leds>;
+
+               led0: user1 {
+                       label = "user1";
+                       gpios = <&gpio4 6 0>; /* MX6_PANLEDG */

You are already including <dt-bindings/gpio/gpio.h> so please use the GPIO constants instead of magic numbers (e.g: GPIO_ACTIVE_HIGH in this case). Same for others gpios properties.

Quoted 7 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +7 -0
+                       default-state = "on";
+                       linux,default-trigger = "heartbeat";
+               };
+
+               led1: user2 {
+                       label = "user2";
+                       gpios = <&gpio4 7 0>; /* MX6_PANLEDR */

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 54

Quoted 10 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +10 -0
+                       default-state = "off";
+               };
+
+               led2: user3 {
+                       label = "user3";
+                       gpios = <&gpio4 15 1>; /* MX6_LOCLED# */
+                       default-state = "off";
+               };
+       };
+

Overall, looks good to me. After the changes mentioned above:

[0]: http://www.spinics.net/lists/devicetree/msg44439.html

author
#3 lore raw

PATCH 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

Quoted 21 lines · Javier Martinez Canillas

Hello Tim,

Quoted 10 lines · Tim Harvey

+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */

There was a discussion [0] recently about what license(s) should be used for Device Tree source files. It seems that we have been using GPLv2-only just because is the Linux kernel license but unlike other source files, the DTS could be used verbatim in other operating systems / bootloaders so we have to better think the implications of the licensing.

Quoted 3 lines

Of course this shouldn't hold your patch, I'm just mentioning so you can keep an eye in case an agreement is made while you are pushing this.

Javier,

Thanks for pointing this out - The discussion makes sense. I'll try to keep an eye on it.

Quoted 24 lines
Quoted 24 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +23 -0
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       /* these are used by bootloader for disabling nodes */
+       aliases {
+               led0 = &led0;
+               led1 = &led1;
+               led2 = &led2;
+               nand = &gpmi;
+               usb0 = &usbh1;
+               usb1 = &usbotg;
+       };
+
+       chosen {
+               bootargs = "console=ttymxc1,115200";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_leds>;
Quoted 8 lines

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 37

Quoted 4 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +4 -0
+
+               led0: user1 {
+                       label = "user1";
+                       gpios = <&gpio4 6 0>; /* MX6_PANLEDG */

You are already including <dt-bindings/gpio/gpio.h> so please use the GPIO constants instead of magic numbers (e.g: GPIO_ACTIVE_HIGH in this case). Same for others gpios properties.

Agreed - I will change this for v2.

Quoted 21 lines
Quoted 8 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +7 -0
+                       default-state = "on";
+                       linux,default-trigger = "heartbeat";
+               };
+
+               led1: user2 {
+                       label = "user2";
+                       gpios = <&gpio4 7 0>; /* MX6_PANLEDR */

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 54

Quoted 10 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +10 -0
+                       default-state = "off";
+               };
+
+               led2: user3 {
+                       label = "user3";
+                       gpios = <&gpio4 15 1>; /* MX6_LOCLED# */
+                       default-state = "off";
+               };
+       };
+

Overall, looks good to me. After the changes mentioned above:

Quoted 3 lines

[0]: http://www.spinics.net/lists/devicetree/msg44439.html

Thanks for the review.

Regards,

Tim

#4 lore raw

PATCH 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

In reply to Tim Harvey
Quoted 1 line · Tim Harvey

+&iomuxc {

If you do not mind, I would ask you to put iomuxc node at the bottom of the file. Doing so makes the file a bit easier to read.

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 169

Quoted 8 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +8 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	imx6qdl-gw552x {
+		pinctrl_hog: hoggrp {
+			fsl,pins = <
+				MX6QDL_PAD_GPIO_9__GPIO1_IO09     0x80000000 /* USBHUB_RST# */
+				MX6QDL_PAD_GPIO_17__GPIO7_IO12    0x80000000 /* PCIESKT_WDIS# */

Please use a proper pad configuration value instead of 0x80000000, which will rely on the hardware reset state or what bootloader configures.

Also, can these two pins be moved to some pinctrl entries used by particular client device?

Quoted 38 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +38 -0
+			>;
+		};
+
+		pinctrl_gpmi_nand: gpminandgrp {
+			fsl,pins = <
+				MX6QDL_PAD_NANDF_CLE__NAND_CLE		0xb0b1
+				MX6QDL_PAD_NANDF_ALE__NAND_ALE		0xb0b1
+				MX6QDL_PAD_NANDF_WP_B__NAND_WP_B	0xb0b1
+				MX6QDL_PAD_NANDF_RB0__NAND_READY_B	0xb000
+				MX6QDL_PAD_NANDF_CS0__NAND_CE0_B	0xb0b1
+				MX6QDL_PAD_NANDF_CS1__NAND_CE1_B	0xb0b1
+				MX6QDL_PAD_SD4_CMD__NAND_RE_B		0xb0b1
+				MX6QDL_PAD_SD4_CLK__NAND_WE_B		0xb0b1
+				MX6QDL_PAD_NANDF_D0__NAND_DATA00	0xb0b1
+				MX6QDL_PAD_NANDF_D1__NAND_DATA01	0xb0b1
+				MX6QDL_PAD_NANDF_D2__NAND_DATA02	0xb0b1
+				MX6QDL_PAD_NANDF_D3__NAND_DATA03	0xb0b1
+				MX6QDL_PAD_NANDF_D4__NAND_DATA04	0xb0b1
+				MX6QDL_PAD_NANDF_D5__NAND_DATA05	0xb0b1
+				MX6QDL_PAD_NANDF_D6__NAND_DATA06	0xb0b1
+				MX6QDL_PAD_NANDF_D7__NAND_DATA07	0xb0b1
+			>;
+		};
+
+		pinctrl_i2c1: i2c1grp {
+			fsl,pins = <
+				MX6QDL_PAD_EIM_D21__I2C1_SCL		0x4001b8b1
+				MX6QDL_PAD_EIM_D28__I2C1_SDA		0x4001b8b1
+			>;
+		};
+
+		pinctrl_i2c2: i2c2grp {
+			fsl,pins = <
+				MX6QDL_PAD_KEY_COL3__I2C2_SCL		0x4001b8b1
+				MX6QDL_PAD_KEY_ROW3__I2C2_SDA		0x4001b8b1
+			>;
+		};
+

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 217

Quoted 10 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +10 -0
+		pinctrl_i2c3: i2c3grp {
+			fsl,pins = <
+				MX6QDL_PAD_GPIO_3__I2C3_SCL		0x4001b8b1
+				MX6QDL_PAD_GPIO_6__I2C3_SDA		0x4001b8b1
+			>;
+		};
+
+		pinctrl_pcie: pciegrp {
+			fsl,pins = <
+				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29  0x80000000 /* PCIE_RST# */

Fix 0x80000000.

Quoted 16 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +16 -0
+			>;
+		};
+
+		pinctrl_uart2: uart2grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA	0x1b0b1
+				MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA	0x1b0b1
+			>;
+		};
+
+		pinctrl_uart3: uart3grp {
+			fsl,pins = <
+				MX6QDL_PAD_EIM_D24__UART3_TX_DATA	0x1b0b1
+				MX6QDL_PAD_EIM_D25__UART3_RX_DATA	0x1b0b1
+			>;
+		};

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 243

Quoted 10 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +10 -0
+
+		pinctrl_uart5: uart5grp {
+			fsl,pins = <
+				MX6QDL_PAD_KEY_COL1__UART5_TX_DATA	0x1b0b1
+				MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA	0x1b0b1
+			>;
+		};
+	};
+
+        gpio_leds {

This node can just be saved by putting gpioledsgrp into imx6qdl-gw552x.

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 245

Quoted 2 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +2 -0
+                pinctrl_gpio_leds: gpioledsgrp {
+                        fsl,pins = <

Use tab for indentation.

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 248

Quoted 3 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +3 -0
+				MX6QDL_PAD_KEY_COL0__GPIO4_IO06   0x80000000 /* user1 led */
+				MX6QDL_PAD_KEY_ROW0__GPIO4_IO07   0x80000000 /* user2 led */
+				MX6QDL_PAD_KEY_ROW4__GPIO4_IO15   0x80000000 /* user3 led */

Fix 0x80000000.

Shawn

Quoted 37 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +34 -0
+                        >;
+                };
+        };
+
+};
+
+&pcie {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_pcie>;
+	reset-gpio = <&gpio1 29 0>;
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	status = "okay";
+};
+
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart3>;
+	status = "okay";
+};
+
+&uart5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart5>;
+	status = "okay";
+};
+
+&usbh1 {
+	status = "okay";
+};
Signature · 1 line
1.8.3.2
author
#5 lore raw

PATCH 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

Quoted 5 lines · Shawn Guo
Quoted 1 line · Tim Harvey

+&iomuxc {

If you do not mind, I would ask you to put iomuxc node at the bottom of the file. Doing so makes the file a bit easier to read.

will do

Quoted 10 lines

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 169

Quoted 9 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +8 -0
+     pinctrl-names = "default";
+     pinctrl-0 = <&pinctrl_hog>;
+
+     imx6qdl-gw552x {
+             pinctrl_hog: hoggrp {
+                     fsl,pins = <
+                             MX6QDL_PAD_GPIO_9__GPIO1_IO09     0x80000000 /* USBHUB_RST# */
+                             MX6QDL_PAD_GPIO_17__GPIO7_IO12    0x80000000 /* PCIESKT_WDIS# */
Quoted 2 lines

Please use a proper pad configuration value instead of 0x80000000, which will rely on the hardware reset state or what bootloader configures.

will do

Quoted 3 lines

Also, can these two pins be moved to some pinctrl entries used by particular client device?

Do you know of any appropriate bindings for a USB hub reset signal? This does get configured and used properly in the bootloader but I thought the common belief was that GPIO's should get configured in the kernel as well (and of course I will use a value other than 0x8000000 so that its pinmuxed and padconf'd).

The PCISKT_WDIS# is a gpio that routes to the miniPCIe socket(s) WDIS# signal. While no kernel driver uses it I think its valuable to document to users such that they can export it and use it for rfkill of wireless devices that may be placed in those sockets. I'm not aware of a proper binding for an rfkill pin either.

If no bindings exist, are you saying these should be dropped and thus functionality hidden from a user possibly trying to use them from userspace through gpio-sysfs or are you saying they should be moved into pinctrl groups for logical grouping?

Quoted 43 lines
Quoted 43 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +42 -0
+                     >;
+             };
+
+             pinctrl_gpmi_nand: gpminandgrp {
+                     fsl,pins = <
+                             MX6QDL_PAD_NANDF_CLE__NAND_CLE          0xb0b1
+                             MX6QDL_PAD_NANDF_ALE__NAND_ALE          0xb0b1
+                             MX6QDL_PAD_NANDF_WP_B__NAND_WP_B        0xb0b1
+                             MX6QDL_PAD_NANDF_RB0__NAND_READY_B      0xb000
+                             MX6QDL_PAD_NANDF_CS0__NAND_CE0_B        0xb0b1
+                             MX6QDL_PAD_NANDF_CS1__NAND_CE1_B        0xb0b1
+                             MX6QDL_PAD_SD4_CMD__NAND_RE_B           0xb0b1
+                             MX6QDL_PAD_SD4_CLK__NAND_WE_B           0xb0b1
+                             MX6QDL_PAD_NANDF_D0__NAND_DATA00        0xb0b1
+                             MX6QDL_PAD_NANDF_D1__NAND_DATA01        0xb0b1
+                             MX6QDL_PAD_NANDF_D2__NAND_DATA02        0xb0b1
+                             MX6QDL_PAD_NANDF_D3__NAND_DATA03        0xb0b1
+                             MX6QDL_PAD_NANDF_D4__NAND_DATA04        0xb0b1
+                             MX6QDL_PAD_NANDF_D5__NAND_DATA05        0xb0b1
+                             MX6QDL_PAD_NANDF_D6__NAND_DATA06        0xb0b1
+                             MX6QDL_PAD_NANDF_D7__NAND_DATA07        0xb0b1
+                     >;
+             };
+
+             pinctrl_i2c1: i2c1grp {
+                     fsl,pins = <
+                             MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
+                             MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                     >;
+             };
+
+             pinctrl_i2c2: i2c2grp {
+                     fsl,pins = <
+                             MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
+                             MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
+                     >;
+             };
+
+             pinctrl_i2c3: i2c3grp {
+                     fsl,pins = <
+                             MX6QDL_PAD_GPIO_3__I2C3_SCL             0x4001b8b1
+                             MX6QDL_PAD_GPIO_6__I2C3_SDA             0x4001b8b1
Quoted 8 lines

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 217

Quoted 6 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +6 -0
+                     >;
+             };
+
+             pinctrl_pcie: pciegrp {
+                     fsl,pins = <
+                             MX6QDL_PAD_ENET_TXD1__GPIO1_IO29  0x80000000 /* PCIE_RST# */

Fix 0x80000000.

will do

Quoted 21 lines
Quoted 21 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +20 -0
+                     >;
+             };
+
+             pinctrl_uart2: uart2grp {
+                     fsl,pins = <
+                             MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
+                             MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA      0x1b0b1
+                     >;
+             };
+
+             pinctrl_uart3: uart3grp {
+                     fsl,pins = <
+                             MX6QDL_PAD_EIM_D24__UART3_TX_DATA       0x1b0b1
+                             MX6QDL_PAD_EIM_D25__UART3_RX_DATA       0x1b0b1
+                     >;
+             };
+
+             pinctrl_uart5: uart5grp {
+                     fsl,pins = <
+                             MX6QDL_PAD_KEY_COL1__UART5_TX_DATA      0x1b0b1
Quoted 10 lines

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 243

Quoted 6 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +6 -0
+                             MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA      0x1b0b1
+                     >;
+             };
+     };
+
+        gpio_leds {

This node can just be saved by putting gpioledsgrp into imx6qdl-gw552x.

Quoted 2 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +2 -0
+                pinctrl_gpio_leds: gpioledsgrp {
+                        fsl,pins = <

ok - that makes sense, will do.

Quoted 2 lines

Use tab for indentation.

oops - I guess checkpatch.pl doesn't catch that on dts/dtsi files

Quoted 6 lines

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 248

Quoted 4 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +3 -0
+                             MX6QDL_PAD_KEY_COL0__GPIO4_IO06   0x80000000 /* user1 led */
+                             MX6QDL_PAD_KEY_ROW0__GPIO4_IO07   0x80000000 /* user2 led */
+                             MX6QDL_PAD_KEY_ROW4__GPIO4_IO15   0x80000000 /* user3 led */

Fix 0x80000000.

will do

Quoted 3 lines

Shawn

Thanks for the review!

Tim

#6 lore raw

PATCH 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

Quoted 12 lines · Tim Harvey

Do you know of any appropriate bindings for a USB hub reset signal? This does get configured and used properly in the bootloader but I thought the common belief was that GPIO's should get configured in the kernel as well (and of course I will use a value other than 0x8000000 so that its pinmuxed and padconf'd).

The PCISKT_WDIS# is a gpio that routes to the miniPCIe socket(s) WDIS# signal. While no kernel driver uses it I think its valuable to document to users such that they can export it and use it for rfkill of wireless devices that may be placed in those sockets. I'm not aware of a proper binding for an rfkill pin either.

Quoted 4 lines

If no bindings exist, are you saying these should be dropped and thus functionality hidden from a user possibly trying to use them from userspace through gpio-sysfs or are you saying they should be moved into pinctrl groups for logical grouping?

Oh, I was wondering if these GPIOs can be put into USB and PCIe pingroup. But if you think it doesn't make sense to do so, I'm fine with them being in hoggrp, after all it seems we do not have a proper binding existing for them.

Shawn

author
#7 lore raw

PATCH v2 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

In reply to Tim Harvey

Add support for the Gateworks GW5520 board.

---
Changes in v2:
- use GPIO constants
- move gpio pins from hoggrp to gpiogrp
- use proper pad conf instead of 0x80000000
- moved iomuxc to bottom for readability
- pulled gpioledsgrp into iomuxc
- fix whitespace errors
- Note that a patch was sent for adding the vendor prefix of 'gw' for Gateworks and is queued for inclusion

---
 arch/arm/boot/dts/Makefile            |   2 +
 arch/arm/boot/dts/imx6dl-gw552x.dts   |  20 +++
 arch/arm/boot/dts/imx6q-gw552x.dts    |  24 +++
 arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 278 ++++++++++++++++++++++++++++++++++
 4 files changed, 324 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6dl-gw552x.dts
 create mode 100644 arch/arm/boot/dts/imx6q-gw552x.dts
 create mode 100644 arch/arm/boot/dts/imx6qdl-gw552x.dtsi
arch/arm/boot/dts/Makefile +2 -0
index adb5ed9..99697b4 100644
@@ -188,6 +188,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
 	imx6dl-gw52xx.dtb \
 	imx6dl-gw53xx.dtb \
 	imx6dl-gw54xx.dtb \
+	imx6dl-gw552x.dtb \
 	imx6dl-hummingboard.dtb \
 	imx6dl-nitrogen6x.dtb \
 	imx6dl-phytec-pbab01.dtb \
@@ -207,6 +208,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
 	imx6q-gw53xx.dtb \
 	imx6q-gw5400-a.dtb \
 	imx6q-gw54xx.dtb \
+	imx6q-gw552x.dtb \
 	imx6q-nitrogen6x.dtb \
 	imx6q-phytec-pbab01.dtb \
 	imx6q-sabreauto.dtb \
arch/arm/boot/dts/imx6dl-gw552x.dts new file +20 -0
new file mode 100644
index 0000000..a4b700c
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+
+#include "imx6dl.dtsi"
+#include "imx6qdl-gw552x.dtsi"
+
+/ {
+	model = "Gateworks Ventana i.MX6 DualLite/Solo GW552X";
+	compatible = "gw,imx6dl-gw552x", "gw,ventana", "fsl,imx6dl";
+};
arch/arm/boot/dts/imx6q-gw552x.dts new file +24 -0
new file mode 100644
index 0000000..f87a8fa
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6qdl-gw552x.dtsi"
+
+/ {
+	model = "Gateworks Ventana i.MX6 Dual/Quad GW552X";
+	compatible = "gw,imx6q-gw552x", "gw,ventana", "fsl,imx6q";
+};
+
+&sata {
+	status = "okay";
+};
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +278 -0

278 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#8 lore raw

PATCH v2 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

Review

Quoted 3 lines · Tim Harvey

+&iomuxc {

(quoted diff) +2 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;

DTC arch/arm/boot/dts/imx6dl-gw552x.dtb
ERROR (phandle_references): Reference to non-existent node or label "pinctrl_hog"

arch/arm/boot/dts/imx6qdl-gw552x.dtsi line 199

Quoted 8 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +8 -0
+
+	imx6qdl-gw552x {
+		pinctrl_gpio: gpiogrp {
+			fsl,pins = <
+				MX6QDL_PAD_GPIO_9__GPIO1_IO09	0x4001b0b0 /* USBHUB_RST# */
+				MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x4001b0b0 /* PCIESKT_WDIS# */
+			>;
+		};

pinctrl_gpio is not referenced by any client device, so kernel will not set up these two pins.

Shawn

Quoted 82 lines
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +79 -0
+
+		pinctrl_gpio_leds: gpioledsgrp {
+			fsl,pins = <
+				MX6QDL_PAD_KEY_COL0__GPIO4_IO06		0x1b0b0
+				MX6QDL_PAD_KEY_ROW0__GPIO4_IO07		0x1b0b0
+				MX6QDL_PAD_KEY_ROW4__GPIO4_IO15		0x1b0b0
+			>;
+		};
+
+		pinctrl_gpmi_nand: gpminandgrp {
+			fsl,pins = <
+				MX6QDL_PAD_NANDF_CLE__NAND_CLE		0xb0b1
+				MX6QDL_PAD_NANDF_ALE__NAND_ALE		0xb0b1
+				MX6QDL_PAD_NANDF_WP_B__NAND_WP_B	0xb0b1
+				MX6QDL_PAD_NANDF_RB0__NAND_READY_B	0xb000
+				MX6QDL_PAD_NANDF_CS0__NAND_CE0_B	0xb0b1
+				MX6QDL_PAD_NANDF_CS1__NAND_CE1_B	0xb0b1
+				MX6QDL_PAD_SD4_CMD__NAND_RE_B		0xb0b1
+				MX6QDL_PAD_SD4_CLK__NAND_WE_B		0xb0b1
+				MX6QDL_PAD_NANDF_D0__NAND_DATA00	0xb0b1
+				MX6QDL_PAD_NANDF_D1__NAND_DATA01	0xb0b1
+				MX6QDL_PAD_NANDF_D2__NAND_DATA02	0xb0b1
+				MX6QDL_PAD_NANDF_D3__NAND_DATA03	0xb0b1
+				MX6QDL_PAD_NANDF_D4__NAND_DATA04	0xb0b1
+				MX6QDL_PAD_NANDF_D5__NAND_DATA05	0xb0b1
+				MX6QDL_PAD_NANDF_D6__NAND_DATA06	0xb0b1
+				MX6QDL_PAD_NANDF_D7__NAND_DATA07	0xb0b1
+			>;
+		};
+
+		pinctrl_i2c1: i2c1grp {
+			fsl,pins = <
+				MX6QDL_PAD_EIM_D21__I2C1_SCL		0x4001b8b1
+				MX6QDL_PAD_EIM_D28__I2C1_SDA		0x4001b8b1
+			>;
+		};
+
+		pinctrl_i2c2: i2c2grp {
+			fsl,pins = <
+				MX6QDL_PAD_KEY_COL3__I2C2_SCL		0x4001b8b1
+				MX6QDL_PAD_KEY_ROW3__I2C2_SDA		0x4001b8b1
+			>;
+		};
+
+		pinctrl_i2c3: i2c3grp {
+			fsl,pins = <
+				MX6QDL_PAD_GPIO_3__I2C3_SCL		0x4001b8b1
+				MX6QDL_PAD_GPIO_6__I2C3_SDA		0x4001b8b1
+			>;
+		};
+
+		pinctrl_pcie: pciegrp {
+			fsl,pins = <
+				MX6QDL_PAD_ENET_TXD1__GPIO1_IO29	0x1b0b0
+			>;
+		};
+
+		pinctrl_uart2: uart2grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA	0x1b0b1
+				MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA	0x1b0b1
+			>;
+		};
+
+		pinctrl_uart3: uart3grp {
+			fsl,pins = <
+				MX6QDL_PAD_EIM_D24__UART3_TX_DATA	0x1b0b1
+				MX6QDL_PAD_EIM_D25__UART3_RX_DATA	0x1b0b1
+			>;
+		};
+
+		pinctrl_uart5: uart5grp {
+			fsl,pins = <
+				MX6QDL_PAD_KEY_COL1__UART5_TX_DATA	0x1b0b1
+				MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA	0x1b0b1
+			>;
+                };
+	};
+};
Signature · 1 line
1.8.3.2
author
#9 lore raw

PATCH v3 1/1 ARM: dts: Gateworks GW5520 support (i.MX6)

In reply to Tim Harvey

Add support for the Gateworks GW5520 board.

---
Changes in v3:
- remove gpiogrp and hog
- fix state on pcie reset
- remove unused input bindings include

Changes in v2:
- use GPIO constants
- move gpio pins from hoggrp to gpiogrp
- use proper pad conf instead of 0x80000000
- moved iomuxc to bottom for readability
- pulled gpioledsgrp into iomuxc
- fix whitespace errors

---
 arch/arm/boot/dts/Makefile            |   2 +
 arch/arm/boot/dts/imx6dl-gw552x.dts   |  20 +++
 arch/arm/boot/dts/imx6q-gw552x.dts    |  24 +++
 arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 267 ++++++++++++++++++++++++++++++++++
 4 files changed, 313 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6dl-gw552x.dts
 create mode 100644 arch/arm/boot/dts/imx6q-gw552x.dts
 create mode 100644 arch/arm/boot/dts/imx6qdl-gw552x.dtsi
arch/arm/boot/dts/Makefile +2 -0
index adb5ed9..99697b4 100644
@@ -188,6 +188,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
 	imx6dl-gw52xx.dtb \
 	imx6dl-gw53xx.dtb \
 	imx6dl-gw54xx.dtb \
+	imx6dl-gw552x.dtb \
 	imx6dl-hummingboard.dtb \
 	imx6dl-nitrogen6x.dtb \
 	imx6dl-phytec-pbab01.dtb \
@@ -207,6 +208,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
 	imx6q-gw53xx.dtb \
 	imx6q-gw5400-a.dtb \
 	imx6q-gw54xx.dtb \
+	imx6q-gw552x.dtb \
 	imx6q-nitrogen6x.dtb \
 	imx6q-phytec-pbab01.dtb \
 	imx6q-sabreauto.dtb \
arch/arm/boot/dts/imx6dl-gw552x.dts new file +20 -0
new file mode 100644
index 0000000..a4b700c
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+
+#include "imx6dl.dtsi"
+#include "imx6qdl-gw552x.dtsi"
+
+/ {
+	model = "Gateworks Ventana i.MX6 DualLite/Solo GW552X";
+	compatible = "gw,imx6dl-gw552x", "gw,ventana", "fsl,imx6dl";
+};
arch/arm/boot/dts/imx6q-gw552x.dts new file +24 -0
new file mode 100644
index 0000000..f87a8fa
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2014 Gateworks Corporation
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6qdl-gw552x.dtsi"
+
+/ {
+	model = "Gateworks Ventana i.MX6 Dual/Quad GW552X";
+	compatible = "gw,imx6q-gw552x", "gw,ventana", "fsl,imx6q";
+};
+
+&sata {
+	status = "okay";
+};
arch/arm/boot/dts/imx6qdl-gw552x.dtsi new file +267 -0

267 lines not on this page · raw message

Signature · 1 line
1.8.3.2