All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] ARM: dts: support I2SE Duckbill device
@ 2016-10-22 19:22 Michael Heimpold
  2016-10-22 19:22 ` [PATCH 1/7] ARM: dts: imx28: add alternative pinmuxing for mmc2 Michael Heimpold
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

This series updates/adds Device Tree support for I2SE's Duckbill
device family.

The Duckbill devices are small, pen-drive sized boards based on
NXP's i.MX28 SoC. While the initial variants (Duckbill series) were
equipped with a micro SD card slot only, the latest generation
(Duckbill 2 series) have an additional internal eMMC onboard.

Both device generations consists of four "family members":

- Duckbill/Duckbill 2: generic board, intented to be used as
  baseboard for custom designs and/or as development board

- Duckbill EnOcean/Duckbill 2 EnOcean: come with an EnOcean
  daugther board equipped with the popular TCM310 module

- Duckbill 485/Duckbill 2 485: as the name implies, these
  devices are intended to be used as Ethernet - RS485 converters

- Duckbill SPI/Duckbill 2 SPI: not sold separately, but used
  in I2SE's development kits for Green PHY HomePlug Powerline
  communication

Since all devices are very similar and only differ in few
aspects, the following patch series introduces first common
device tree snippets which are then included by the real
devices. For better understanding, I tried to illustrate the
hierarchy:

+--------------------+                      +----------------------+
| imx28-duckbill.dts |                      | imx28-duckbill-2.dts |
+--------------------+                      +----------------------+
  ^                                           ^
  |  +----------------------------+           |  +------------------------------+
  |  | imx28-duckbill-enocean.dts |           |  | imx28-duckbill-2-enocean.dts |
  |  +----------------------------+           |  +------------------------------+
  |    ^                                      |    ^
  |    |  +------------------------+          |    |  +--------------------------+
  |    |  | imx28-duckbill-485.dts |          |    |  | imx28-duckbill-2-485.dts |
  |    |  +------------------------+          |    |  +--------------------------+
  |    |    ^                                 |    |    ^
  |    |    |  +------------------------+     |    |    |  +--------------------------+
  |    |    |  | imx28-duckbill-spi.dts |     |    |    |  | imx28-duckbill-2-spi.dts |
  |    |    |  +------------------------+     |    |    |  +--------------------------+
  |    |    |    ^                            |    |    |    ^
  |    |    |    |                            |    |    |    |
  |    |    |    |                            |    |    |    |
+---------------------------------------+   +-----------------------------------------+
|      imx28-duckbill-common.dtsi       |   |       imx28-duckbill-2-common.dtsi      |
+---------------------------------------+   +-----------------------------------------+
                              ^                      ^
                              |                      |
                           +----------------------------+
                           |  imx28-duckbill-base.dtsi  |
                           +----------------------------+
                                          ^
                                          |
                                    +------------+
                                    | imx28.dtsi |
                                    +------------+

Michael Heimpold (7):
  ARM: dts: imx28: add alternative pinmuxing for mmc2
  ARM: dts: imx28: rename mmc2_sck_cfg to prepare for an alternative
    muxing setup
  ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg
  ARM: dts: add I2SE Duckbill common definitions
  ARM: dts: duckbill: simplify DT and use common definitions
  ARM: dts: add support for remaining members of Duckbill series
  ARM: dts: add support for Duckbill 2 series devices

 arch/arm/boot/dts/Makefile                     |   7 ++
 arch/arm/boot/dts/imx28-duckbill-2-485.dts     |  70 ++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-2-common.dtsi | 110 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-2-enocean.dts | 100 ++++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-2-spi.dts     |  63 ++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-2.dts         |  46 +++++++++++
 arch/arm/boot/dts/imx28-duckbill-485.dts       |  60 ++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-base.dtsi     |  88 ++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-common.dtsi   |  80 ++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-enocean.dts   |  90 ++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-spi.dts       |  64 ++++++++++++++
 arch/arm/boot/dts/imx28-duckbill.dts           |  99 +++-------------------
 arch/arm/boot/dts/imx28-m28cu3.dts             |   2 +-
 arch/arm/boot/dts/imx28.dtsi                   |  28 ++++++-
 14 files changed, 817 insertions(+), 90 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-485.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-common.dtsi
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-enocean.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-spi.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-485.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-base.dtsi
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-common.dtsi
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-enocean.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-spi.dts

-- 
2.7.4

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

* [PATCH 1/7] ARM: dts: imx28: add alternative pinmuxing for mmc2
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
@ 2016-10-22 19:22 ` Michael Heimpold
  2016-10-22 19:22 ` [PATCH 2/7] ARM: dts: imx28: rename mmc2_sck_cfg to prepare for an alternative muxing setup Michael Heimpold
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

From: Michael Heimpold <michael.heimpold@i2se.com>

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
---
 arch/arm/boot/dts/imx28.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 0ad893b..ef6e10d 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -579,6 +579,22 @@
 					fsl,pull-up = <MXS_PULL_ENABLE>;
 				};
 
+				mmc2_4bit_pins_b: mmc2-4bit at 1 {
+					reg = <1>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SSP2_SCK__SSP2_SCK
+						MX28_PAD_SSP2_MOSI__SSP2_CMD
+						MX28_PAD_SSP2_MISO__SSP2_D0
+						MX28_PAD_SSP2_SS0__SSP2_D3
+						MX28_PAD_SSP2_SS1__SSP2_D1
+						MX28_PAD_SSP2_SS2__SSP2_D2
+						MX28_PAD_AUART1_RX__SSP2_CARD_DETECT
+					>;
+					fsl,drive-strength = <MXS_DRIVE_8mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_ENABLE>;
+				};
+
 				mmc2_cd_cfg: mmc2-cd-cfg {
 					fsl,pinmux-ids = <
 						MX28_PAD_AUART1_RX__SSP2_CARD_DETECT
-- 
2.7.4

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

* [PATCH 2/7] ARM: dts: imx28: rename mmc2_sck_cfg to prepare for an alternative muxing setup
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
  2016-10-22 19:22 ` [PATCH 1/7] ARM: dts: imx28: add alternative pinmuxing for mmc2 Michael Heimpold
@ 2016-10-22 19:22 ` Michael Heimpold
  2016-10-22 19:22 ` [PATCH 3/7] ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg Michael Heimpold
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

From: Michael Heimpold <michael.heimpold@i2se.com>

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
---
 arch/arm/boot/dts/imx28-m28cu3.dts | 2 +-
 arch/arm/boot/dts/imx28.dtsi       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx28-m28cu3.dts b/arch/arm/boot/dts/imx28-m28cu3.dts
index 2df63be..bb53294 100644
--- a/arch/arm/boot/dts/imx28-m28cu3.dts
+++ b/arch/arm/boot/dts/imx28-m28cu3.dts
@@ -57,7 +57,7 @@
 				pinctrl-names = "default";
 				pinctrl-0 = <&mmc2_4bit_pins_a
 					     &mmc2_cd_cfg
-					     &mmc2_sck_cfg>;
+					     &mmc2_sck_cfg_a>;
 				bus-width = <4>;
 				vmmc-supply = <&reg_vddio_sd1>;
 				status = "okay";
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index ef6e10d..e29d797 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -602,7 +602,8 @@
 					fsl,pull-up = <MXS_PULL_DISABLE>;
 				};
 
-				mmc2_sck_cfg: mmc2-sck-cfg {
+				mmc2_sck_cfg_a: mmc2-sck-cfg at 0 {
+					reg = <0>;
 					fsl,pinmux-ids = <
 						MX28_PAD_SSP0_DATA7__SSP2_SCK
 					>;
-- 
2.7.4

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

* [PATCH 3/7] ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
  2016-10-22 19:22 ` [PATCH 1/7] ARM: dts: imx28: add alternative pinmuxing for mmc2 Michael Heimpold
  2016-10-22 19:22 ` [PATCH 2/7] ARM: dts: imx28: rename mmc2_sck_cfg to prepare for an alternative muxing setup Michael Heimpold
@ 2016-10-22 19:22 ` Michael Heimpold
  2016-10-22 19:22 ` [PATCH 4/7] ARM: dts: add I2SE Duckbill common definitions Michael Heimpold
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

From: Michael Heimpold <michael.heimpold@i2se.com>

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
---
 arch/arm/boot/dts/imx28.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index e29d797..f7707b4 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -611,6 +611,15 @@
 					fsl,pull-up = <MXS_PULL_DISABLE>;
 				};
 
+				mmc2_sck_cfg_b: mmc2-sck-cfg at 1 {
+					reg = <1>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SSP2_SCK__SSP2_SCK
+					>;
+					fsl,drive-strength = <MXS_DRIVE_12mA>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
 				i2c0_pins_a: i2c0 at 0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
-- 
2.7.4

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

* [PATCH 4/7] ARM: dts: add I2SE Duckbill common definitions
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
                   ` (2 preceding siblings ...)
  2016-10-22 19:22 ` [PATCH 3/7] ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg Michael Heimpold
@ 2016-10-22 19:22 ` Michael Heimpold
  2016-10-26 13:53   ` Shawn Guo
  2016-10-22 19:22 ` [PATCH 5/7] ARM: dts: duckbill: simplify DT and use " Michael Heimpold
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
---
 arch/arm/boot/dts/imx28-duckbill-2-common.dtsi | 110 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-base.dtsi     |  88 ++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-common.dtsi   |  80 ++++++++++++++++++
 3 files changed, 278 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-common.dtsi
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-base.dtsi
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-common.dtsi

diff --git a/arch/arm/boot/dts/imx28-duckbill-2-common.dtsi b/arch/arm/boot/dts/imx28-duckbill-2-common.dtsi
new file mode 100644
index 0000000..3354f8f
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-2-common.dtsi
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2013-2014 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
+ *
+ * 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
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include "imx28-duckbill-base.dtsi"
+
+/ {
+	model = "I2SE Duckbill 2";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp0: ssp at 80010000 {
+				compatible = "fsl,imx28-mmc";
+				pinctrl-names = "default";
+				pinctrl-0 = <&mmc0_8bit_pins_a
+					&mmc0_cd_cfg &mmc0_sck_cfg>;
+				bus-width = <8>;
+				vmmc-supply = <&reg_3p3v>;
+				status = "okay";
+				non-removable;
+			};
+
+			pinctrl at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				mac0_phy_reset_pin: mac0_phy_reset_pin at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_GPMI_ALE__GPIO_0_26    /* PHY Reset */
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
+				mac0_phy_int_pin: mac0_phy_int_pin at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_GPMI_D07__GPIO_0_7    /* PHY Interrupt */
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
+				status_led_pins: status_led_pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SAIF0_MCLK__GPIO_3_20
+						MX28_PAD_SAIF0_LRCLK__GPIO_3_21
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+	};
+
+	ahb at 80080000 {
+		mac0: ethernet at 800f0000 {
+			phy-reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
+			phy-handle = <&ethphy>;
+			mdio {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ethphy: ethernet-phy at 0 {
+						compatible = "ethernet-phy-ieee802.3-c22";
+						reg = <0>;
+						pinctrl-names = "default";
+						pinctrl-0 = <&mac0_phy_int_pin>;
+						interrupt-parent = <&gpio0>;
+						interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+						max-speed = <100>;
+				};
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&status_led_pins>;
+
+		status_red {
+			label = "duckbill:red:status";
+			gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
+		};
+
+		status_green {
+			label = "duckbill:green:status";
+			gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/imx28-duckbill-base.dtsi b/arch/arm/boot/dts/imx28-duckbill-base.dtsi
new file mode 100644
index 0000000..b64efd5
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-base.dtsi
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2013-2014 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
+ *
+ * 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
+ */
+
+#include "imx28.dtsi"
+
+/ {
+	model = "I2SE Duckbill";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	memory {
+		reg = <0x40000000 0x08000000>;
+	};
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			pinctrl at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				hog_pins_a: hog_pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_LCD_D17__GPIO_1_17    /* Revision detection */
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+
+		apbx at 80040000 {
+			lradc at 80050000 {
+				status = "okay";
+			};
+
+			duart: serial at 80074000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&duart_pins_a>;
+				status = "okay";
+			};
+
+			usbphy0: usbphy at 8007c000 {
+				status = "okay";
+			};
+		};
+	};
+
+	ahb at 80080000 {
+		usb0: usb at 80080000 {
+			status = "okay";
+			dr_mode = "peripheral";
+		};
+
+		mac0: ethernet at 800f0000 {
+			phy-mode = "rmii";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
+			phy-supply = <&reg_3p3v>;
+			phy-reset-duration = <25>;
+			status = "okay";
+		};
+	};
+
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg_3p3v: regulator at 0 {
+			compatible = "regulator-fixed";
+			reg = <0>;
+			regulator-name = "3P3V";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-always-on;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/imx28-duckbill-common.dtsi b/arch/arm/boot/dts/imx28-duckbill-common.dtsi
new file mode 100644
index 0000000..167b53f
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-common.dtsi
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2013-2014 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
+ *
+ * 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
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include "imx28-duckbill-base.dtsi"
+
+/ {
+	model = "I2SE Duckbill";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp0: ssp at 80010000 {
+				compatible = "fsl,imx28-mmc";
+				pinctrl-names = "default";
+				pinctrl-0 = <&mmc0_4bit_pins_a
+					&mmc0_cd_cfg &mmc0_sck_cfg>;
+				bus-width = <4>;
+				vmmc-supply = <&reg_3p3v>;
+				status = "okay";
+			};
+
+			pinctrl at 80018000 {
+				mac0_phy_reset_pin: mac0_phy_reset_pin at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SSP0_DATA7__GPIO_2_7    /* PHY Reset */
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
+				status_led_pins: status_led_pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_AUART1_RX__GPIO_3_4
+						MX28_PAD_AUART1_TX__GPIO_3_5
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+	};
+
+	ahb at 80080000 {
+		mac0: ethernet at 800f0000 {
+			phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&status_led_pins>;
+
+		status_red {
+			label = "duckbill:red:status";
+			gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
+		};
+
+		status_green {
+			label = "duckbill:green:status";
+			gpios = <&gpio3 5 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+};
-- 
2.7.4

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

* [PATCH 5/7] ARM: dts: duckbill: simplify DT and use common definitions
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
                   ` (3 preceding siblings ...)
  2016-10-22 19:22 ` [PATCH 4/7] ARM: dts: add I2SE Duckbill common definitions Michael Heimpold
@ 2016-10-22 19:22 ` Michael Heimpold
  2016-10-22 19:22 ` [PATCH 6/7] ARM: dts: add support for remaining members of Duckbill series Michael Heimpold
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
---
 arch/arm/boot/dts/imx28-duckbill.dts | 99 ++++--------------------------------
 1 file changed, 11 insertions(+), 88 deletions(-)

diff --git a/arch/arm/boot/dts/imx28-duckbill.dts b/arch/arm/boot/dts/imx28-duckbill.dts
index ce1a7ef..c3d1ce1 100644
--- a/arch/arm/boot/dts/imx28-duckbill.dts
+++ b/arch/arm/boot/dts/imx28-duckbill.dts
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2013 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2013-2014,2016 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
  *
  * The code contained herein is licensed under the GNU General Public
  * License. You may obtain a copy of the GNU General Public License
@@ -10,112 +11,34 @@
  */
 
 /dts-v1/;
-#include "imx28.dtsi"
+#include "imx28-duckbill-common.dtsi"
 
 / {
 	model = "I2SE Duckbill";
 	compatible = "i2se,duckbill", "fsl,imx28";
 
-	memory {
-		reg = <0x40000000 0x08000000>;
-	};
-
 	apb at 80000000 {
 		apbh at 80000000 {
-			ssp0: ssp at 80010000 {
-				compatible = "fsl,imx28-mmc";
+			ssp2: ssp at 80014000 {
+				compatible = "fsl,imx28-spi";
 				pinctrl-names = "default";
-				pinctrl-0 = <&mmc0_4bit_pins_a
-					&mmc0_cd_cfg &mmc0_sck_cfg>;
-				bus-width = <4>;
-				vmmc-supply = <&reg_3p3v>;
+				pinctrl-0 = <&spi2_pins_a>;
 				status = "okay";
 			};
-
-			pinctrl at 80018000 {
-				pinctrl-names = "default";
-				pinctrl-0 = <&hog_pins_a>;
-
-				hog_pins_a: hog at 0 {
-					reg = <0>;
-					fsl,pinmux-ids = <
-						MX28_PAD_SSP0_DATA7__GPIO_2_7 /* PHY Reset */
-					>;
-					fsl,drive-strength = <MXS_DRIVE_4mA>;
-					fsl,voltage = <MXS_VOLTAGE_HIGH>;
-					fsl,pull-up = <MXS_PULL_DISABLE>;
-				};
-
-				led_pins_a: led_gpio at 0 {
-					reg = <0>;
-					fsl,pinmux-ids = <
-						MX28_PAD_AUART1_RX__GPIO_3_4
-						MX28_PAD_AUART1_TX__GPIO_3_5
-					>;
-					fsl,drive-strength = <MXS_DRIVE_4mA>;
-					fsl,voltage = <MXS_VOLTAGE_HIGH>;
-					fsl,pull-up = <MXS_PULL_DISABLE>;
-				};
-			};
 		};
 
 		apbx at 80040000 {
-			duart: serial at 80074000 {
+			i2c0: i2c at 80058000 {
 				pinctrl-names = "default";
-				pinctrl-0 = <&duart_pins_a>;
+				pinctrl-0 = <&i2c0_pins_a>;
 				status = "okay";
 			};
 
-			usbphy0: usbphy at 8007c000 {
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
 				status = "okay";
 			};
 		};
 	};
-
-	ahb at 80080000 {
-		usb0: usb at 80080000 {
-			status = "okay";
-		};
-
-		mac0: ethernet at 800f0000 {
-			phy-mode = "rmii";
-			pinctrl-names = "default";
-			pinctrl-0 = <&mac0_pins_a>;
-			phy-supply = <&reg_3p3v>;
-			phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
-			phy-reset-duration = <100>;
-			status = "okay";
-		};
-	};
-
-	regulators {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		reg_3p3v: regulator at 0 {
-			compatible = "regulator-fixed";
-			reg = <0>;
-			regulator-name = "3P3V";
-			regulator-min-microvolt = <3300000>;
-			regulator-max-microvolt = <3300000>;
-			regulator-always-on;
-		};
-	};
-
-	leds {
-		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_pins_a>;
-
-		status {
-			label = "duckbill:green:status";
-			gpios = <&gpio3 5 GPIO_ACTIVE_HIGH>;
-		};
-
-		failure {
-			label = "duckbill:red:status";
-			gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
-		};
-	};
 };
-- 
2.7.4

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

* [PATCH 6/7] ARM: dts: add support for remaining members of Duckbill series
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
                   ` (4 preceding siblings ...)
  2016-10-22 19:22 ` [PATCH 5/7] ARM: dts: duckbill: simplify DT and use " Michael Heimpold
@ 2016-10-22 19:22 ` Michael Heimpold
  2016-10-22 19:22 ` [PATCH 7/7] ARM: dts: add support for Duckbill 2 series devices Michael Heimpold
  2016-10-24 13:12 ` [PATCH 0/7] ARM: dts: support I2SE Duckbill device Shawn Guo
  7 siblings, 0 replies; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
---
 arch/arm/boot/dts/Makefile                   |  3 +
 arch/arm/boot/dts/imx28-duckbill-485.dts     | 60 +++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-enocean.dts | 90 ++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-spi.dts     | 64 ++++++++++++++++++++
 4 files changed, 217 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-485.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-enocean.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-spi.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index befcd26..5a366c4 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -459,7 +459,10 @@ dtb-$(CONFIG_ARCH_MXS) += \
 	imx28-cfa10056.dtb \
 	imx28-cfa10057.dtb \
 	imx28-cfa10058.dtb \
+	imx28-duckbill-485.dtb \
 	imx28-duckbill.dtb \
+	imx28-duckbill-enocean.dtb \
+	imx28-duckbill-spi.dtb \
 	imx28-eukrea-mbmx283lc.dtb \
 	imx28-eukrea-mbmx287lc.dtb \
 	imx28-evk.dtb \
diff --git a/arch/arm/boot/dts/imx28-duckbill-485.dts b/arch/arm/boot/dts/imx28-duckbill-485.dts
new file mode 100644
index 0000000..a60d78a
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-485.dts
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
+ *
+ * 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 <dt-bindings/gpio/gpio.h>
+#include "imx28-duckbill-common.dtsi"
+
+/ {
+	model = "I2SE Duckbill 485";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			pinctrl at 80018000 {
+				rs485_led_pins: rs485_led_pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SSP2_SCK__GPIO_2_16
+						MX28_PAD_SSP2_MISO__GPIO_2_18
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+
+		apbx at 80040000 {
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	rs485_leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&rs485_led_pins>;
+
+		rs485_red {
+			label = "duckbill:red:rs485";
+			gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
+		};
+
+		rs485_green {
+			label = "duckbill:green:rs485";
+			gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/imx28-duckbill-enocean.dts b/arch/arm/boot/dts/imx28-duckbill-enocean.dts
new file mode 100644
index 0000000..4602d13
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-enocean.dts
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
+ *
+ * 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 <dt-bindings/input/input.h>
+#include "imx28-duckbill-common.dtsi"
+
+/ {
+	model = "I2SE Duckbill EnOcean";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			pinctrl at 80018000 {
+				enocean_led_pins: enocean_led_pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SSP2_SCK__GPIO_2_16
+						MX28_PAD_SSP2_MISO__GPIO_2_18
+						MX28_PAD_SSP2_SS0__GPIO_2_19
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
+				enocean_button: enocean_button at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_SSP2_SS2__GPIO_2_21
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+
+		apbx at 80040000 {
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	enocean_leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&enocean_led_pins>;
+
+		enocean_blue {
+			label = "duckbill:blue:enocean";
+			gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
+		};
+
+		enocean_red {
+			label = "duckbill:red:enocean";
+			gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
+		};
+
+		enocean_green {
+			label = "duckbill:green:enocean";
+			gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&enocean_button>;
+
+		enocean {
+			label = "EnOcean";
+			linux,code = <KEY_NEW>;
+			gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/imx28-duckbill-spi.dts b/arch/arm/boot/dts/imx28-duckbill-spi.dts
new file mode 100644
index 0000000..5248d84
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-spi.dts
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2013-2014 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
+ *
+ * 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 <dt-bindings/interrupt-controller/irq.h>
+#include "imx28-duckbill-common.dtsi"
+
+/ {
+	model = "I2SE Duckbill SPI";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	aliases {
+		ethernet1 = &qca7000;
+	};
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp2: ssp at 80014000 {
+				compatible = "fsl,imx28-spi";
+				pinctrl-names = "default";
+				pinctrl-0 = <&spi2_pins_a>;
+				status = "okay";
+
+				qca7000: ethernet at 0 {
+					compatible = "qca,qca7000";
+					pinctrl-names = "default";
+					pinctrl-0 = <&qca7000_pins>;
+					reg = <0>;
+					interrupt-parent = <&gpio3>;
+					interrupts = <3 IRQ_TYPE_EDGE_RISING>;
+					spi-cpha;
+					spi-cpol;
+					spi-max-frequency = <8000000>;
+				};
+			};
+
+			pinctrl at 80018000 {
+				qca7000_pins: qca7000-pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_AUART0_RTS__GPIO_3_3    /* Interrupt */
+						MX28_PAD_LCD_D13__GPIO_1_13      /* QCA7K reset */
+						MX28_PAD_LCD_D14__GPIO_1_14      /* GPIO 0 */
+						MX28_PAD_LCD_D15__GPIO_1_15      /* GPIO 1 */
+						MX28_PAD_LCD_D18__GPIO_1_18      /* GPIO 2 */
+						MX28_PAD_LCD_D21__GPIO_1_21      /* GPIO 3 */
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+	};
+};
-- 
2.7.4

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

* [PATCH 7/7] ARM: dts: add support for Duckbill 2 series devices
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
                   ` (5 preceding siblings ...)
  2016-10-22 19:22 ` [PATCH 6/7] ARM: dts: add support for remaining members of Duckbill series Michael Heimpold
@ 2016-10-22 19:22 ` Michael Heimpold
  2016-10-24 13:12 ` [PATCH 0/7] ARM: dts: support I2SE Duckbill device Shawn Guo
  7 siblings, 0 replies; 12+ messages in thread
From: Michael Heimpold @ 2016-10-22 19:22 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
---
 arch/arm/boot/dts/Makefile                     |   4 +
 arch/arm/boot/dts/imx28-duckbill-2-485.dts     |  70 +++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-2-enocean.dts | 100 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-2-spi.dts     |  63 ++++++++++++++++
 arch/arm/boot/dts/imx28-duckbill-2.dts         |  46 ++++++++++++
 5 files changed, 283 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-485.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-enocean.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-spi.dts
 create mode 100644 arch/arm/boot/dts/imx28-duckbill-2.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 5a366c4..510e6f3 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -459,6 +459,10 @@ dtb-$(CONFIG_ARCH_MXS) += \
 	imx28-cfa10056.dtb \
 	imx28-cfa10057.dtb \
 	imx28-cfa10058.dtb \
+	imx28-duckbill-2-485.dtb \
+	imx28-duckbill-2.dtb \
+	imx28-duckbill-2-enocean.dtb \
+	imx28-duckbill-2-spi.dtb \
 	imx28-duckbill-485.dtb \
 	imx28-duckbill.dtb \
 	imx28-duckbill-enocean.dtb \
diff --git a/arch/arm/boot/dts/imx28-duckbill-2-485.dts b/arch/arm/boot/dts/imx28-duckbill-2-485.dts
new file mode 100644
index 0000000..6c7429d
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-2-485.dts
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2015-2016 I2SE GmbH <info@i2se.com>
+ *
+ * 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 <dt-bindings/gpio/gpio.h>
+#include "imx28-duckbill-2-common.dtsi"
+
+/ {
+	model = "I2SE Duckbill 2 485";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp2: ssp at 80014000 {
+				compatible = "fsl,imx28-mmc";
+				pinctrl-names = "default";
+				pinctrl-0 = <&mmc2_4bit_pins_b
+					&mmc2_cd_cfg &mmc2_sck_cfg_b>;
+				bus-width = <4>;
+				vmmc-supply = <&reg_3p3v>;
+				status = "okay";
+			};
+
+			pinctrl at 80018000 {
+				rs485_led_pins: rs485_led_pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_I2C0_SCL__GPIO_3_24
+						MX28_PAD_I2C0_SDA__GPIO_3_25
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+
+		apbx at 80040000 {
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	rs485_leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&rs485_led_pins>;
+
+		rs485_red {
+			label = "duckbill:red:rs485";
+			gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
+		};
+
+		rs485_green {
+			label = "duckbill:green:rs485";
+			gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/imx28-duckbill-2-enocean.dts b/arch/arm/boot/dts/imx28-duckbill-2-enocean.dts
new file mode 100644
index 0000000..f71944d3
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-2-enocean.dts
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2015-2016 I2SE GmbH <info@i2se.com>
+ *
+ * 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 <dt-bindings/input/input.h>
+#include "imx28-duckbill-2-common.dtsi"
+
+/ {
+	model = "I2SE Duckbill 2 EnOcean";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp2: ssp at 80014000 {
+				compatible = "fsl,imx28-mmc";
+				pinctrl-names = "default";
+				pinctrl-0 = <&mmc2_4bit_pins_b
+					&mmc2_cd_cfg &mmc2_sck_cfg_b>;
+				bus-width = <4>;
+				vmmc-supply = <&reg_3p3v>;
+				status = "okay";
+			};
+
+			pinctrl at 80018000 {
+				enocean_led_pins: enocean_led_pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_AUART0_CTS__GPIO_3_2
+						MX28_PAD_I2C0_SCL__GPIO_3_24
+						MX28_PAD_I2C0_SDA__GPIO_3_25
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
+				enocean_button: enocean_button at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_AUART0_RTS__GPIO_3_3
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+
+		apbx at 80040000 {
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	enocean_leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&enocean_led_pins>;
+
+		enocean_blue {
+			label = "duckbill:blue:enocean";
+			gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
+		};
+
+		enocean_red {
+			label = "duckbill:red:enocean";
+			gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
+		};
+
+		enocean_green {
+			label = "duckbill:green:enocean";
+			gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&enocean_button>;
+
+		enocean {
+			label = "EnOcean";
+			linux,code = <KEY_NEW>;
+			gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/imx28-duckbill-2-spi.dts b/arch/arm/boot/dts/imx28-duckbill-2-spi.dts
new file mode 100644
index 0000000..e5c7d00
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-2-spi.dts
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2015 I2SE GmbH <info@i2se.com>
+ *
+ * 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 <dt-bindings/interrupt-controller/irq.h>
+#include "imx28-duckbill-2-common.dtsi"
+
+/ {
+	model = "I2SE Duckbill 2 SPI";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	aliases {
+		ethernet1 = &qca7000;
+	};
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp2: ssp at 80014000 {
+				compatible = "fsl,imx28-spi";
+				pinctrl-names = "default";
+				pinctrl-0 = <&spi2_pins_a>;
+				status = "okay";
+
+				qca7000: ethernet at 0 {
+					compatible = "qca,qca7000";
+					pinctrl-names = "default";
+					pinctrl-0 = <&qca7000_pins>;
+					reg = <0>;
+					interrupt-parent = <&gpio3>;
+					interrupts = <3 IRQ_TYPE_EDGE_RISING>;
+					spi-cpha;
+					spi-cpol;
+					spi-max-frequency = <8000000>;
+				};
+			};
+
+			pinctrl at 80018000 {
+				qca7000_pins: qca7000-pins at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX28_PAD_AUART0_RTS__GPIO_3_3    /* Interrupt */
+						MX28_PAD_LCD_D13__GPIO_1_13      /* QCA7K reset */
+						MX28_PAD_LCD_D14__GPIO_1_14      /* GPIO 0 */
+						MX28_PAD_LCD_D15__GPIO_1_15      /* GPIO 1 */
+						MX28_PAD_LCD_D18__GPIO_1_18      /* GPIO 2 */
+						MX28_PAD_LCD_D21__GPIO_1_21      /* GPIO 3 */
+					>;
+					fsl,drive-strength = <MXS_DRIVE_4mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/imx28-duckbill-2.dts b/arch/arm/boot/dts/imx28-duckbill-2.dts
new file mode 100644
index 0000000..207e263
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-duckbill-2.dts
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2015-2016 I2SE GmbH <info@i2se.com>
+ *
+ * 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 "imx28-duckbill-2-common.dtsi"
+
+/ {
+	model = "I2SE Duckbill 2";
+	compatible = "i2se,duckbill", "fsl,imx28";
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp2: ssp at 80014000 {
+				compatible = "fsl,imx28-mmc";
+				pinctrl-names = "default";
+				pinctrl-0 = <&mmc2_4bit_pins_b
+					&mmc2_cd_cfg &mmc2_sck_cfg_b>;
+				bus-width = <4>;
+				vmmc-supply = <&reg_3p3v>;
+				status = "okay";
+			};
+		};
+
+		apbx at 80040000 {
+			i2c0: i2c at 80058000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&i2c0_pins_a>;
+				status = "okay";
+			};
+
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
+				status = "okay";
+			};
+		};
+	};
+};
-- 
2.7.4

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

* [PATCH 0/7] ARM: dts: support I2SE Duckbill device
  2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
                   ` (6 preceding siblings ...)
  2016-10-22 19:22 ` [PATCH 7/7] ARM: dts: add support for Duckbill 2 series devices Michael Heimpold
@ 2016-10-24 13:12 ` Shawn Guo
  2016-10-24 19:45   ` Michael Heimpold
  7 siblings, 1 reply; 12+ messages in thread
From: Shawn Guo @ 2016-10-24 13:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Oct 22, 2016 at 09:22:23PM +0200, Michael Heimpold wrote:
> This series updates/adds Device Tree support for I2SE's Duckbill
> device family.
> 
> The Duckbill devices are small, pen-drive sized boards based on
> NXP's i.MX28 SoC. While the initial variants (Duckbill series) were
> equipped with a micro SD card slot only, the latest generation
> (Duckbill 2 series) have an additional internal eMMC onboard.
> 
> Both device generations consists of four "family members":
> 
> - Duckbill/Duckbill 2: generic board, intented to be used as
>   baseboard for custom designs and/or as development board
> 
> - Duckbill EnOcean/Duckbill 2 EnOcean: come with an EnOcean
>   daugther board equipped with the popular TCM310 module
> 
> - Duckbill 485/Duckbill 2 485: as the name implies, these
>   devices are intended to be used as Ethernet - RS485 converters
> 
> - Duckbill SPI/Duckbill 2 SPI: not sold separately, but used
>   in I2SE's development kits for Green PHY HomePlug Powerline
>   communication

So we basically need to maintain 8 dts/dtb files for imx28-duckbill
board.  This is not pleasant.  Can you please investigate if Device Tree
overlay is going to help here?

Shawn

[1] http://free-electrons.com/blog/dt-overlay-uboot-libfdt/

> Since all devices are very similar and only differ in few
> aspects, the following patch series introduces first common
> device tree snippets which are then included by the real
> devices. For better understanding, I tried to illustrate the
> hierarchy:
> 
> +--------------------+                      +----------------------+
> | imx28-duckbill.dts |                      | imx28-duckbill-2.dts |
> +--------------------+                      +----------------------+
>   ^                                           ^
>   |  +----------------------------+           |  +------------------------------+
>   |  | imx28-duckbill-enocean.dts |           |  | imx28-duckbill-2-enocean.dts |
>   |  +----------------------------+           |  +------------------------------+
>   |    ^                                      |    ^
>   |    |  +------------------------+          |    |  +--------------------------+
>   |    |  | imx28-duckbill-485.dts |          |    |  | imx28-duckbill-2-485.dts |
>   |    |  +------------------------+          |    |  +--------------------------+
>   |    |    ^                                 |    |    ^
>   |    |    |  +------------------------+     |    |    |  +--------------------------+
>   |    |    |  | imx28-duckbill-spi.dts |     |    |    |  | imx28-duckbill-2-spi.dts |
>   |    |    |  +------------------------+     |    |    |  +--------------------------+
>   |    |    |    ^                            |    |    |    ^
>   |    |    |    |                            |    |    |    |
>   |    |    |    |                            |    |    |    |
> +---------------------------------------+   +-----------------------------------------+
> |      imx28-duckbill-common.dtsi       |   |       imx28-duckbill-2-common.dtsi      |
> +---------------------------------------+   +-----------------------------------------+
>                               ^                      ^
>                               |                      |
>                            +----------------------------+
>                            |  imx28-duckbill-base.dtsi  |
>                            +----------------------------+
>                                           ^
>                                           |
>                                     +------------+
>                                     | imx28.dtsi |
>                                     +------------+
> 
> Michael Heimpold (7):
>   ARM: dts: imx28: add alternative pinmuxing for mmc2
>   ARM: dts: imx28: rename mmc2_sck_cfg to prepare for an alternative
>     muxing setup
>   ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg
>   ARM: dts: add I2SE Duckbill common definitions
>   ARM: dts: duckbill: simplify DT and use common definitions
>   ARM: dts: add support for remaining members of Duckbill series
>   ARM: dts: add support for Duckbill 2 series devices
> 
>  arch/arm/boot/dts/Makefile                     |   7 ++
>  arch/arm/boot/dts/imx28-duckbill-2-485.dts     |  70 ++++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-2-common.dtsi | 110 +++++++++++++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-2-enocean.dts | 100 ++++++++++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-2-spi.dts     |  63 ++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-2.dts         |  46 +++++++++++
>  arch/arm/boot/dts/imx28-duckbill-485.dts       |  60 ++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-base.dtsi     |  88 ++++++++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-common.dtsi   |  80 ++++++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-enocean.dts   |  90 ++++++++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill-spi.dts       |  64 ++++++++++++++
>  arch/arm/boot/dts/imx28-duckbill.dts           |  99 +++-------------------
>  arch/arm/boot/dts/imx28-m28cu3.dts             |   2 +-
>  arch/arm/boot/dts/imx28.dtsi                   |  28 ++++++-
>  14 files changed, 817 insertions(+), 90 deletions(-)
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-485.dts
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-common.dtsi
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-enocean.dts
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-spi.dts
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2.dts
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-485.dts
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-base.dtsi
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-common.dtsi
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-enocean.dts
>  create mode 100644 arch/arm/boot/dts/imx28-duckbill-spi.dts
> 
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 0/7] ARM: dts: support I2SE Duckbill device
  2016-10-24 13:12 ` [PATCH 0/7] ARM: dts: support I2SE Duckbill device Shawn Guo
@ 2016-10-24 19:45   ` Michael Heimpold
  2016-10-26 13:55     ` Shawn Guo
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Heimpold @ 2016-10-24 19:45 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag, 24. Oktober 2016, 21:12:09 CEST schrieb Shawn Guo:
> On Sat, Oct 22, 2016 at 09:22:23PM +0200, Michael Heimpold wrote:
> > This series updates/adds Device Tree support for I2SE's Duckbill
> > device family.
> > 
> > The Duckbill devices are small, pen-drive sized boards based on
> > NXP's i.MX28 SoC. While the initial variants (Duckbill series) were
> > equipped with a micro SD card slot only, the latest generation
> > (Duckbill 2 series) have an additional internal eMMC onboard.
> > 
> > Both device generations consists of four "family members":
> > 
> > - Duckbill/Duckbill 2: generic board, intented to be used as
> > 
> >   baseboard for custom designs and/or as development board
> > 
> > - Duckbill EnOcean/Duckbill 2 EnOcean: come with an EnOcean
> > 
> >   daugther board equipped with the popular TCM310 module
> > 
> > - Duckbill 485/Duckbill 2 485: as the name implies, these
> > 
> >   devices are intended to be used as Ethernet - RS485 converters
> > 
> > - Duckbill SPI/Duckbill 2 SPI: not sold separately, but used
> > 
> >   in I2SE's development kits for Green PHY HomePlug Powerline
> >   communication
> 
> So we basically need to maintain 8 dts/dtb files for imx28-duckbill
> board.  This is not pleasant.  Can you please investigate if Device Tree
> overlay is going to help here?

First, thank you very much for your quick feedback.

Actually it would even be 11 files for 8 boards, thats right.
There is no mechanism (no EEPROM, GPIO...) to automatically probe for the 
device variants, and the "variant-forming daugther boards" are
not switchable like the expansion boards e.g. for Raspberry Pi.
Another point is, that this would really require to use U-Boot to apply
the overlay (or another DT capable bootloader with this functionality).
For booting very fast, the good old Freescale bootlets are still
an option, which could not handle the overlays - at least at the moment...
However, it still an option to have a second look...

To reduce the number of files, I see the following other approaches:
- don't use the three "common" files which are included: -3 files (8 total)
- don't mainline Duckbill EnOcean, Duckbill 485 and Duckbill SPI:
  they are EOL, only Duckbill 2 variants are still sold;
  however, since Duckbill (without 2) is/was already mainlined, we
  should keep this, leaving 4 new variants + 1 old variant: -3 files (5 total)
- only mainline Duckbill 2 (generic board) and maintain all other variants
  in a private Github repo (this is what we are doing now): -3 files (2 total)

So, I'll discuss this again internally. Do you have any preference?

I was also told off-list, that there should be an additional file in
Documentation/devicetree/bindings/arm to document the imx28-duckbill
binding.
And DT maintainers don't like the simple-bus stuff around the regulators.

So, I've already material to fix for v2 :-)

Michael

> 
> Shawn
> 
> [1] http://free-electrons.com/blog/dt-overlay-uboot-libfdt/
> 
> > Since all devices are very similar and only differ in few
> > aspects, the following patch series introduces first common
> > device tree snippets which are then included by the real
> > devices. For better understanding, I tried to illustrate the
> > hierarchy:
> > 
> > ...
> > [removed brocken ASCII art]
> > ...

> > 
> > Michael Heimpold (7):
> >   ARM: dts: imx28: add alternative pinmuxing for mmc2
> >   ARM: dts: imx28: rename mmc2_sck_cfg to prepare for an alternative
> >   
> >     muxing setup
> >   
> >   ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg
> >   ARM: dts: add I2SE Duckbill common definitions
> >   ARM: dts: duckbill: simplify DT and use common definitions
> >   ARM: dts: add support for remaining members of Duckbill series
> >   ARM: dts: add support for Duckbill 2 series devices
> >  
> >  arch/arm/boot/dts/Makefile                     |   7 ++
> >  arch/arm/boot/dts/imx28-duckbill-2-485.dts     |  70 ++++++++++++++++
> >  arch/arm/boot/dts/imx28-duckbill-2-common.dtsi | 110
> >  +++++++++++++++++++++++++ arch/arm/boot/dts/imx28-duckbill-2-enocean.dts
> >  | 100 ++++++++++++++++++++++ arch/arm/boot/dts/imx28-duckbill-2-spi.dts 
> >     |  63 ++++++++++++++ arch/arm/boot/dts/imx28-duckbill-2.dts         |
> >   46 +++++++++++
> >  arch/arm/boot/dts/imx28-duckbill-485.dts       |  60 ++++++++++++++
> >  arch/arm/boot/dts/imx28-duckbill-base.dtsi     |  88 ++++++++++++++++++++
> >  arch/arm/boot/dts/imx28-duckbill-common.dtsi   |  80 ++++++++++++++++++
> >  arch/arm/boot/dts/imx28-duckbill-enocean.dts   |  90 ++++++++++++++++++++
> >  arch/arm/boot/dts/imx28-duckbill-spi.dts       |  64 ++++++++++++++
> >  arch/arm/boot/dts/imx28-duckbill.dts           |  99
> >  +++-------------------
> >  arch/arm/boot/dts/imx28-m28cu3.dts             |   2 +-
> >  arch/arm/boot/dts/imx28.dtsi                   |  28 ++++++-
> >  14 files changed, 817 insertions(+), 90 deletions(-)
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-485.dts
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-common.dtsi
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-enocean.dts
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2-spi.dts
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-2.dts
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-485.dts
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-base.dtsi
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-common.dtsi
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-enocean.dts
> >  create mode 100644 arch/arm/boot/dts/imx28-duckbill-spi.dts

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

* [PATCH 4/7] ARM: dts: add I2SE Duckbill common definitions
  2016-10-22 19:22 ` [PATCH 4/7] ARM: dts: add I2SE Duckbill common definitions Michael Heimpold
@ 2016-10-26 13:53   ` Shawn Guo
  0 siblings, 0 replies; 12+ messages in thread
From: Shawn Guo @ 2016-10-26 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Oct 22, 2016 at 09:22:27PM +0200, Michael Heimpold wrote:
> +			pinctrl at 80018000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&hog_pins_a>;
> +
> +				mac0_phy_reset_pin: mac0_phy_reset_pin at 0 {

Please use hyphen instead of underscore in node name.

Shawn

> +					reg = <0>;
> +					fsl,pinmux-ids = <
> +						MX28_PAD_GPMI_ALE__GPIO_0_26    /* PHY Reset */
> +					>;
> +					fsl,drive-strength = <MXS_DRIVE_4mA>;
> +					fsl,voltage = <MXS_VOLTAGE_HIGH>;
> +					fsl,pull-up = <MXS_PULL_DISABLE>;
> +				};

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

* [PATCH 0/7] ARM: dts: support I2SE Duckbill device
  2016-10-24 19:45   ` Michael Heimpold
@ 2016-10-26 13:55     ` Shawn Guo
  0 siblings, 0 replies; 12+ messages in thread
From: Shawn Guo @ 2016-10-26 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 24, 2016 at 09:45:56PM +0200, Michael Heimpold wrote:
> Actually it would even be 11 files for 8 boards, thats right.
> There is no mechanism (no EEPROM, GPIO...) to automatically probe for the 
> device variants, and the "variant-forming daugther boards" are
> not switchable like the expansion boards e.g. for Raspberry Pi.
> Another point is, that this would really require to use U-Boot to apply
> the overlay (or another DT capable bootloader with this functionality).
> For booting very fast, the good old Freescale bootlets are still
> an option, which could not handle the overlays - at least at the moment...
> However, it still an option to have a second look...
> 
> To reduce the number of files, I see the following other approaches:
> - don't use the three "common" files which are included: -3 files (8 total)
> - don't mainline Duckbill EnOcean, Duckbill 485 and Duckbill SPI:
>   they are EOL, only Duckbill 2 variants are still sold;
>   however, since Duckbill (without 2) is/was already mainlined, we
>   should keep this, leaving 4 new variants + 1 old variant: -3 files (5 total)
> - only mainline Duckbill 2 (generic board) and maintain all other variants
>   in a private Github repo (this is what we are doing now): -3 files (2 total)
> 
> So, I'll discuss this again internally. Do you have any preference?

I'm fine with the second one.

Shawn

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

end of thread, other threads:[~2016-10-26 13:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22 19:22 [PATCH 0/7] ARM: dts: support I2SE Duckbill device Michael Heimpold
2016-10-22 19:22 ` [PATCH 1/7] ARM: dts: imx28: add alternative pinmuxing for mmc2 Michael Heimpold
2016-10-22 19:22 ` [PATCH 2/7] ARM: dts: imx28: rename mmc2_sck_cfg to prepare for an alternative muxing setup Michael Heimpold
2016-10-22 19:22 ` [PATCH 3/7] ARM: dts: imx28: add alternative muxing for mmc2_sck_cfg Michael Heimpold
2016-10-22 19:22 ` [PATCH 4/7] ARM: dts: add I2SE Duckbill common definitions Michael Heimpold
2016-10-26 13:53   ` Shawn Guo
2016-10-22 19:22 ` [PATCH 5/7] ARM: dts: duckbill: simplify DT and use " Michael Heimpold
2016-10-22 19:22 ` [PATCH 6/7] ARM: dts: add support for remaining members of Duckbill series Michael Heimpold
2016-10-22 19:22 ` [PATCH 7/7] ARM: dts: add support for Duckbill 2 series devices Michael Heimpold
2016-10-24 13:12 ` [PATCH 0/7] ARM: dts: support I2SE Duckbill device Shawn Guo
2016-10-24 19:45   ` Michael Heimpold
2016-10-26 13:55     ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.