linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: dts: imx: add two ZII boards
@ 2018-06-21 17:44 Andrey Gusakov
  2018-06-21 17:44 ` [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi Andrey Gusakov
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Andrey Gusakov @ 2018-06-21 17:44 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, cphealy,
	andrew.smirnov, l.stach
  Cc: linux-arm-kernel, devicetree, linux-kernel, andrey.gusakov

Common part of dts was moved to imx51-zii-common.dtsi
for future reuse.

Andrey Gusakov (3):
  ARM: dts: imx51-zii-common: create common include dtsi
  ARM: dts: imx: add ZII SCU2 ESB board
  ARM: dts: imx: add ZII SCU2 Mezz board

 arch/arm/boot/dts/Makefile                |   4 +-
 arch/arm/boot/dts/imx51-zii-common.dtsi   | 317 ++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx51-zii-rdu1.dts      | 330 +++---------------------------
 arch/arm/boot/dts/imx51-zii-scu2-esb.dts  | 178 ++++++++++++++++
 arch/arm/boot/dts/imx51-zii-scu2-mezz.dts | 190 +++++++++++++++++
 5 files changed, 718 insertions(+), 301 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx51-zii-common.dtsi
 create mode 100644 arch/arm/boot/dts/imx51-zii-scu2-esb.dts
 create mode 100644 arch/arm/boot/dts/imx51-zii-scu2-mezz.dts

-- 
1.9.1


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

* [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-21 17:44 [PATCH 0/3] ARM: dts: imx: add two ZII boards Andrey Gusakov
@ 2018-06-21 17:44 ` Andrey Gusakov
  2018-06-26 22:08   ` Fabio Estevam
                     ` (2 more replies)
  2018-06-21 17:44 ` [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board Andrey Gusakov
  2018-06-21 17:45 ` [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board Andrey Gusakov
  2 siblings, 3 replies; 16+ messages in thread
From: Andrey Gusakov @ 2018-06-21 17:44 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, cphealy,
	andrew.smirnov, l.stach
  Cc: linux-arm-kernel, devicetree, linux-kernel, andrey.gusakov

Make shared include file. Move common stuff from rdu1 dts file to
dtsi for future reuse by other imx51 based boards from ZII.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
---
 arch/arm/boot/dts/imx51-zii-common.dtsi | 317 ++++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx51-zii-rdu1.dts    | 330 +++-----------------------------
 2 files changed, 347 insertions(+), 300 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx51-zii-common.dtsi

diff --git a/arch/arm/boot/dts/imx51-zii-common.dtsi b/arch/arm/boot/dts/imx51-zii-common.dtsi
new file mode 100644
index 0000000..b0f0643
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-zii-common.dtsi
@@ -0,0 +1,317 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+// Copyright (C) 2018 Zodiac Inflight Innovations
+
+#include "imx51.dtsi"
+
+/ {
+	chosen {
+		stdout-path = &uart1;
+	};
+
+	/* Will be filled by the bootloader */
+	memory@90000000 {
+		reg = <0x90000000 0>;
+	};
+
+	i2c_gpio: i2c-gpio {
+		compatible = "i2c-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_swi2c>;
+		i2c-gpio,delay-us = <50>;
+		status = "okay";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	usb_vbus: regulator-usb-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
+};
+
+&cpu {
+	cpu-supply = <&sw1_reg>;
+};
+
+&ecspi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ecspi1>;
+	cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>,
+		   <&gpio4 25 GPIO_ACTIVE_LOW>;
+	status = "okay";
+
+	pmic@0 {
+		compatible = "fsl,mc13892";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_pmic>;
+		spi-max-frequency = <6000000>;
+		spi-cs-high;
+		reg = <0>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
+		fsl,mc13xxx-uses-adc;
+
+		regulators {
+			sw1_reg: sw1 {
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <1375000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			sw2_reg: sw2 {
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <1850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			sw3_reg: sw3 {
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			sw4_reg: sw4 {
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vpll_reg: vpll {
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vdig_reg: vdig {
+				regulator-min-microvolt = <1650000>;
+				regulator-max-microvolt = <1650000>;
+				regulator-boot-on;
+			};
+
+			vsd_reg: vsd {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3150000>;
+			};
+
+			vusb_reg: vusb {
+				regulator-always-on;
+			};
+
+			vusb2_reg: vusb2 {
+				regulator-min-microvolt = <2400000>;
+				regulator-max-microvolt = <2775000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			vvideo_reg: vvideo {
+				regulator-min-microvolt = <2775000>;
+				regulator-max-microvolt = <2775000>;
+			};
+
+			vaudio_reg: vaudio {
+				regulator-min-microvolt = <2300000>;
+				regulator-max-microvolt = <3000000>;
+			};
+
+			vcam_reg: vcam {
+				regulator-min-microvolt = <2500000>;
+				regulator-max-microvolt = <3000000>;
+			};
+
+			vgen1_reg: vgen1 {
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			vgen2_reg: vgen2 {
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3150000>;
+				regulator-always-on;
+			};
+
+			vgen3_reg: vgen3 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <2900000>;
+				regulator-always-on;
+			};
+		};
+
+		leds {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			led-control = <0x0 0x0 0x3f83f8 0x0>;
+
+			sysled3: led3@3 {
+				reg = <3>;
+				label = "system:red:power";
+				linux,default-trigger = "default-on";
+			};
+
+			sysled4: led4@4 {
+				reg = <4>;
+				label = "system:green:act";
+				linux,default-trigger = "heartbeat";
+			};
+		};
+	};
+
+	flash@1 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "atmel,at45", "atmel,dataflash";
+		spi-max-frequency = <25000000>;
+		reg = <1>;
+	};
+};
+
+&ecspi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ecspi2>;
+	cs-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>,
+		   <&gpio3 28 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
+
+&esdhc1 {
+	non-removable;
+	no-1-8-v;
+	no-sdio;
+	no-sd;
+	status = "okay";
+};
+
+&esdhc4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc4>;
+	bus-width = <4>;
+	no-1-8-v;
+	no-sdio;
+	cd-gpios = <&gpio4 8 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
+
+&fec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec>;
+	phy-mode = "mii";
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+
+	eeprom@50 {
+		compatible = "atmel,24c04";
+		pagesize = <16>;
+		reg = <0x50>;
+	};
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart1>;
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	status = "okay";
+};
+
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart3>;
+	status = "okay";
+};
+
+&usbotg {
+	dr_mode = "host";
+	disable-over-current;
+	phy_type = "utmi_wide";
+	vbus-supply = <&usb_vbus>;
+	status = "okay";
+};
+
+&usbphy0 {
+	vcc-supply = <&vusb2_reg>;
+};
+
+&iomuxc {
+	pinctrl_ecspi1: ecspi1grp {
+		fsl,pins = <
+			MX51_PAD_CSPI1_MISO__ECSPI1_MISO	0x185
+			MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI	0x185
+			MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK	0x185
+			MX51_PAD_CSPI1_SS0__GPIO4_24		0x85
+			MX51_PAD_CSPI1_SS1__GPIO4_25		0x85
+		>;
+	};
+
+	pinctrl_ecspi2: ecspi2grp {
+		fsl,pins = <
+			MX51_PAD_NANDF_RB2__ECSPI2_SCLK		0x185
+			MX51_PAD_NANDF_RB3__ECSPI2_MISO		0x185
+			MX51_PAD_NANDF_D15__ECSPI2_MOSI		0x185
+			MX51_PAD_NANDF_RDY_INT__GPIO3_24	0x85
+			MX51_PAD_NANDF_D12__GPIO3_28		0x85
+		>;
+	};
+
+	pinctrl_esdhc1_4bit: esdhc1grp_4bit {
+		fsl,pins = <
+			MX51_PAD_SD1_CMD__SD1_CMD		0x400020d5
+			MX51_PAD_SD1_CLK__SD1_CLK		0x20d5
+			MX51_PAD_SD1_DATA0__SD1_DATA0		0x20d5
+			MX51_PAD_SD1_DATA1__SD1_DATA1		0x20d5
+			MX51_PAD_SD1_DATA2__SD1_DATA2		0x20d5
+			MX51_PAD_SD1_DATA3__SD1_DATA3		0x20d5
+		>;
+	};
+
+	pinctrl_esdhc1_8bit: esdhc1grp_8bit {
+		fsl,pins = <
+			MX51_PAD_SD2_DATA0__SD1_DAT4		0x20d5
+			MX51_PAD_SD2_DATA1__SD1_DAT5		0x20d5
+			MX51_PAD_SD2_DATA2__SD1_DAT6		0x20d5
+			MX51_PAD_SD2_DATA3__SD1_DAT7		0x20d5
+		>;
+	};
+
+	pinctrl_esdhc4: esdhc4grp {
+		fsl,pins = <
+			MX51_PAD_NANDF_RB1__SD4_CMD		0x400020d5
+			MX51_PAD_NANDF_CS2__SD4_CLK		0x20d5
+			MX51_PAD_NANDF_CS3__SD4_DAT0		0x20d5
+			MX51_PAD_NANDF_CS4__SD4_DAT1		0x20d5
+			MX51_PAD_NANDF_CS5__SD4_DAT2		0x20d5
+			MX51_PAD_NANDF_CS6__SD4_DAT3		0x20d5
+			MX51_PAD_NANDF_D0__GPIO4_8		0x100
+		>;
+	};
+
+	pinctrl_i2c2: i2c2grp {
+		fsl,pins = <
+			MX51_PAD_KEY_COL4__I2C2_SCL		0x400001ed
+			MX51_PAD_KEY_COL5__I2C2_SDA		0x400001ed
+		>;
+	};
+
+	pinctrl_pmic: pmicgrp {
+		fsl,pins = <
+			MX51_PAD_GPIO1_4__GPIO1_4		0x85
+			MX51_PAD_GPIO1_8__GPIO1_8		0xe5
+		>;
+	};
+};
diff --git a/arch/arm/boot/dts/imx51-zii-rdu1.dts b/arch/arm/boot/dts/imx51-zii-rdu1.dts
index df9eca9..59a80da 100644
--- a/arch/arm/boot/dts/imx51-zii-rdu1.dts
+++ b/arch/arm/boot/dts/imx51-zii-rdu1.dts
@@ -1,61 +1,14 @@
-/*
- * Copyright (C) 2017 Zodiac Inflight Innovations
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License
- *     version 2 as published by the Free Software Foundation.
- *
- *     This file 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.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
- */
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+// Copyright (C) 2018 Zodiac Inflight Innovations
 
 /dts-v1/;
-#include "imx51.dtsi"
+#include "imx51-zii-common.dtsi"
 #include <dt-bindings/sound/fsl-imx-audmux.h>
 
 / {
 	model = "ZII RDU1 Board";
 	compatible = "zii,imx51-rdu1", "fsl,imx51";
 
-	chosen {
-		stdout-path = &uart1;
-	};
-
-	/* Will be filled by the bootloader */
-	memory@90000000 {
-		reg = <0x90000000 0>;
-	};
-
 	aliases {
 		mdio-gpio0 = &mdio_gpio;
 		rtc0 = &ds1341;
@@ -94,14 +47,6 @@
 		enable-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
 	};
 
-	reg_5p0v_main: regulator-5p0v-main {
-		compatible = "regulator-fixed";
-		regulator-name = "5V_MAIN";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-always-on;
-	};
-
 	reg_3p3v: regulator-3p3v {
 		compatible = "regulator-fixed";
 		regulator-name = "3.3V";
@@ -150,28 +95,6 @@
 		};
 	};
 
-	i2c_gpio: i2c-gpio {
-		compatible = "i2c-gpio";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_swi2c>;
-		gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>, /* sda */
-			<&gpio3 4 GPIO_ACTIVE_HIGH>; /* scl */
-		i2c-gpio,delay-us = <50>;
-		status = "okay";
-
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		sgtl5000: codec@a {
-			compatible = "fsl,sgtl5000";
-			reg = <0x0a>;
-			clocks = <&clk_26M_snd>;
-			VDDA-supply = <&vdig_reg>;
-			VDDIO-supply = <&vvideo_reg>;
-			#sound-dai-cells = <0>;
-		};
-	};
-
 	spi_gpio: spi-gpio {
 		compatible = "spi-gpio";
 		#address-cells = <1>;
@@ -315,178 +238,30 @@
 	};
 };
 
-&cpu {
-	cpu-supply = <&sw1_reg>;
+&usb_vbus {
+	regulator-always-on;
 };
 
-&ecspi1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_ecspi1>;
-	cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>,
-		   <&gpio4 25 GPIO_ACTIVE_LOW>;
-	status = "okay";
-
-	pmic@0 {
-		compatible = "fsl,mc13892";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_pmic>;
-		spi-max-frequency = <6000000>;
-		spi-cs-high;
-		reg = <0>;
-		interrupt-parent = <&gpio1>;
-		interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
-		fsl,mc13xxx-uses-adc;
-
-		regulators {
-			sw1_reg: sw1 {
-				regulator-min-microvolt = <600000>;
-				regulator-max-microvolt = <1375000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			sw2_reg: sw2 {
-				regulator-min-microvolt = <900000>;
-				regulator-max-microvolt = <1850000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			sw3_reg: sw3 {
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1850000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			sw4_reg: sw4 {
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1850000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			vpll_reg: vpll {
-				regulator-min-microvolt = <1050000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			vdig_reg: vdig {
-				regulator-min-microvolt = <1650000>;
-				regulator-max-microvolt = <1650000>;
-				regulator-boot-on;
-			};
-
-			vsd_reg: vsd {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <3150000>;
-			};
-
-			vusb_reg: vusb {
-				regulator-always-on;
-			};
-
-			vusb2_reg: vusb2 {
-				regulator-min-microvolt = <2400000>;
-				regulator-max-microvolt = <2775000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-
-			vvideo_reg: vvideo {
-				regulator-min-microvolt = <2775000>;
-				regulator-max-microvolt = <2775000>;
-			};
-
-			vaudio_reg: vaudio {
-				regulator-min-microvolt = <2300000>;
-				regulator-max-microvolt = <3000000>;
-			};
-
-			vcam_reg: vcam {
-				regulator-min-microvolt = <2500000>;
-				regulator-max-microvolt = <3000000>;
-			};
-
-			vgen1_reg: vgen1 {
-				regulator-min-microvolt = <1200000>;
-				regulator-max-microvolt = <1200000>;
-			};
-
-			vgen2_reg: vgen2 {
-				regulator-min-microvolt = <1200000>;
-				regulator-max-microvolt = <3150000>;
-				regulator-always-on;
-			};
-
-			vgen3_reg: vgen3 {
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <2900000>;
-				regulator-always-on;
-			};
-		};
-
-		leds {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			led-control = <0x0 0x0 0x3f83f8 0x0>;
-
-			sysled0@3 {
-				reg = <3>;
-				label = "system:green:status";
-				linux,default-trigger = "default-on";
-			};
-
-			sysled1@4 {
-				reg = <4>;
-				label = "system:green:act";
-				linux,default-trigger = "heartbeat";
-			};
-		};
-	};
-
-	flash@1 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "atmel,at45db642d", "atmel,at45", "atmel,dataflash";
-		spi-max-frequency = <25000000>;
-		reg = <1>;
-	};
+&ecspi2 {
+	status = "disabled";
 };
 
 &esdhc1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_esdhc1>;
+	pinctrl-0 = <&pinctrl_esdhc1_4bit>;
 	bus-width = <4>;
-	no-1-8-v;
-	non-removable;
-	no-sdio;
-	no-sd;
-	status = "okay";
+};
+
+&esdhc4 {
+	status = "disabled";
 };
 
 &fec {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_fec>;
-	phy-mode = "mii";
 	phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
 	phy-supply = <&vgen3_reg>;
-	status = "okay";
 };
 
 &i2c2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_i2c2>;
-	status = "okay";
-
-	eeprom@50 {
-		compatible = "atmel,24c04";
-		pagesize = <16>;
-		reg = <0x50>;
-	};
-
 	hpa1: amp@60 {
 		compatible = "ti,tpa6130a2";
 		reg = <0x60>;
@@ -550,31 +325,29 @@
 
 };
 
-&ipu_di0_disp1 {
-	remote-endpoint = <&display_in>;
-};
+&i2c_gpio {
+	gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>, /* sda */
+		<&gpio3 4 GPIO_ACTIVE_HIGH>; /* scl */
 
-&ssi2 {
-	status = "okay";
+	sgtl5000: codec@a {
+		compatible = "fsl,sgtl5000";
+		reg = <0x0a>;
+		clocks = <&clk_26M_snd>;
+		VDDA-supply = <&vdig_reg>;
+		VDDIO-supply = <&vvideo_reg>;
+		#sound-dai-cells = <0>;
+	};
 };
 
-&uart1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart1>;
-	status = "okay";
+&ipu_di0_disp1 {
+	remote-endpoint = <&display_in>;
 };
 
-&uart2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart2>;
+&ssi2 {
 	status = "okay";
 };
 
 &uart3 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart3>;
-	status = "okay";
-
 	rave-sp {
 		compatible = "zii,rave-sp-rdu1";
 		current-speed = <38400>;
@@ -593,7 +366,7 @@
 	fsl,usbphy = <&usbh1phy>;
 	disable-over-current;
 	maximum-speed = "full-speed";
-	vbus-supply = <&reg_5p0v_main>;
+	vbus-supply = <&usb_vbus>;
 	status = "okay";
 };
 
@@ -604,20 +377,12 @@
 	phy_type = "ulpi";
 	fsl,usbphy = <&usbh2phy>;
 	disable-over-current;
-	vbus-supply = <&reg_5p0v_main>;
+	vbus-supply = <&usb_vbus>;
 	status = "okay";
 };
 
-&usbphy0 {
-	vcc-supply = <&vusb_reg>;
-};
-
-&usbotg {
-	dr_mode = "host";
-	disable-over-current;
-	phy_type = "utmi_wide";
-	vbus-supply = <&reg_5p0v_main>;
-	status = "okay";
+&sysled3 {
+	label = "system:green:status";
 };
 
 &iomuxc {
@@ -642,27 +407,6 @@
 		>;
 	};
 
-	pinctrl_ecspi1: ecspi1grp {
-		fsl,pins = <
-			MX51_PAD_CSPI1_MISO__ECSPI1_MISO	0x185
-			MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI	0x185
-			MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK	0x185
-			MX51_PAD_CSPI1_SS0__GPIO4_24		0x85
-			MX51_PAD_CSPI1_SS1__GPIO4_25		0x85
-		>;
-	};
-
-	pinctrl_esdhc1: esdhc1grp {
-		fsl,pins = <
-			MX51_PAD_SD1_CMD__SD1_CMD		0x400020d5
-			MX51_PAD_SD1_CLK__SD1_CLK		0x20d5
-			MX51_PAD_SD1_DATA0__SD1_DATA0		0x20d5
-			MX51_PAD_SD1_DATA1__SD1_DATA1		0x20d5
-			MX51_PAD_SD1_DATA2__SD1_DATA2		0x20d5
-			MX51_PAD_SD1_DATA3__SD1_DATA3		0x20d5
-		>;
-	};
-
 	pinctrl_fec: fecgrp {
 		fsl,pins = <
 			MX51_PAD_EIM_EB2__FEC_MDIO		0x1f5
@@ -696,13 +440,6 @@
 		>;
 	};
 
-	pinctrl_i2c2: i2c2grp {
-		fsl,pins = <
-			MX51_PAD_KEY_COL4__I2C2_SCL		0x400001ed
-			MX51_PAD_KEY_COL5__I2C2_SDA		0x400001ed
-		>;
-	};
-
 	pinctrl_ipu_disp1: ipudisp1grp {
 		fsl,pins = <
 			MX51_PAD_DISP1_DAT0__DISP1_DAT0		0x5
@@ -741,13 +478,6 @@
 		>;
 	};
 
-	pinctrl_pmic: pmicgrp {
-		fsl,pins = <
-			MX51_PAD_GPIO1_4__GPIO1_4		0x1e0
-			MX51_PAD_GPIO1_8__GPIO1_8		0x21e2
-		>;
-	};
-
 	pinctrl_sndgate26mhz: sndgate26mhzgrp {
 		fsl,pins = <
 			MX51_PAD_CSPI1_RDY__GPIO4_26		0x85
-- 
1.9.1


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

* [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board
  2018-06-21 17:44 [PATCH 0/3] ARM: dts: imx: add two ZII boards Andrey Gusakov
  2018-06-21 17:44 ` [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi Andrey Gusakov
@ 2018-06-21 17:44 ` Andrey Gusakov
  2018-06-26 15:45   ` Fabio Estevam
  2018-07-01  8:25   ` Shawn Guo
  2018-06-21 17:45 ` [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board Andrey Gusakov
  2 siblings, 2 replies; 16+ messages in thread
From: Andrey Gusakov @ 2018-06-21 17:44 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, cphealy,
	andrew.smirnov, l.stach
  Cc: linux-arm-kernel, devicetree, linux-kernel, andrey.gusakov

This adds support for the Zodiac Inflight Innovations SCU2 Ethernet
Switch Board, which is based on the i.MX51.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
---
 arch/arm/boot/dts/Makefile               |   3 +-
 arch/arm/boot/dts/imx51-zii-scu2-esb.dts | 178 +++++++++++++++++++++++++++++++
 2 files changed, 180 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx51-zii-scu2-esb.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de7..d8900f4 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -358,7 +358,8 @@ dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-digi-connectcore-jsk.dtb \
 	imx51-eukrea-mbimxsd51-baseboard.dtb \
 	imx51-ts4800.dtb \
-	imx51-zii-rdu1.dtb
+	imx51-zii-rdu1.dtb \
+	imx51-zii-scu2-esb.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
 	imx53-ard.dtb \
 	imx53-cx9020.dtb \
diff --git a/arch/arm/boot/dts/imx51-zii-scu2-esb.dts b/arch/arm/boot/dts/imx51-zii-scu2-esb.dts
new file mode 100644
index 0000000..e052133
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-zii-scu2-esb.dts
@@ -0,0 +1,178 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+// Copyright (C) 2018 Zodiac Inflight Innovations
+
+/dts-v1/;
+#include "imx51-zii-common.dtsi"
+
+/ {
+	model = "ZII SCU2 ESB board";
+	compatible = "zii,imx51-scu2-esb", "fsl,imx51";
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc1_4bit &pinctrl_esdhc1_8bit>;
+	bus-width = <8>;
+};
+
+&fec {
+	phy-reset-gpios = <&gpio4 21 GPIO_ACTIVE_LOW>;
+
+	fixed-link {
+		speed = <100>;
+		full-duplex;
+	};
+
+	fec_mdio: mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "okay";
+
+		switch@0 {
+			compatible = "marvell,mv88e6085";
+			reg = <0>;
+			dsa,member = <0 0>;
+			eeprom-length = <512>;
+			interrupt-parent = <&gpio4>;
+			interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					label = "port1";
+				};
+
+				port@1 {
+					reg = <1>;
+					label = "port2";
+				};
+
+				port@2 {
+					reg = <2>;
+					label = "port3";
+				};
+
+				port@3 {
+					reg = <3>;
+					label = "scu2scu";
+				};
+
+				port@4 {
+					reg = <4>;
+					label = "esb2host";
+				};
+				port@5 {
+					reg = <5>;
+					label = "esb2mezz";
+					phy-mode = "sgmii";
+
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+					};
+				};
+				port@6 {
+					reg = <6>;
+					label = "cpu";
+					phy-mode = "mii";
+					ethernet = <&fec>;
+
+					fixed-link {
+						speed = <100>;
+						full-duplex;
+					};
+				};
+			};
+		};
+	};
+};
+
+&i2c2 {
+	lm75@48 {
+		compatible = "national,lm75";
+		reg = <0x48>;
+	};
+};
+
+&i2c_gpio {
+	gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>, /* sda */
+		<&gpio3 0 GPIO_ACTIVE_HIGH>; /* scl */
+};
+
+&ipu {
+	status = "disabled";
+};
+
+&usb_vbus {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb_mmc_reset>;
+	gpio = <&gpio4 19 GPIO_ACTIVE_LOW>;
+	startup-delay-us = <150000>;
+};
+
+&iomuxc {
+	pinctrl_fec: fecgrp {
+		fsl,pins = <
+			MX51_PAD_DISP2_DAT15__FEC_TDATA0	0x2004
+			MX51_PAD_DISP2_DAT6__FEC_TDATA1		0x2004
+			MX51_PAD_DISP2_DAT7__FEC_TDATA2		0x2004
+			MX51_PAD_DISP2_DAT8__FEC_TDATA3		0x2004
+			MX51_PAD_DISP2_DAT9__FEC_TX_EN		0x2004
+			MX51_PAD_DISP2_DAT10__FEC_COL		0x0180
+			MX51_PAD_DISP2_DAT11__FEC_RX_CLK	0x0180
+			MX51_PAD_DISP2_DAT12__FEC_RX_DV		0x20a4
+			MX51_PAD_DISP2_DAT13__FEC_TX_CLK	0x2180
+			MX51_PAD_DISP2_DAT14__FEC_RDATA0	0x2180
+			MX51_PAD_DI2_DISP_CLK__FEC_RDATA1	0x0085
+			MX51_PAD_DI_GP4__FEC_RDATA2		0x0085
+			MX51_PAD_DISP2_DAT0__FEC_RDATA3		0x0085
+			MX51_PAD_DI2_PIN2__FEC_MDC		0x2004
+			MX51_PAD_DI2_PIN3__FEC_MDIO		0x01f5
+			MX51_PAD_DI2_PIN4__FEC_CRS		0x0180
+			MX51_PAD_AUD3_BB_FS__GPIO4_21		0x0000
+		>;
+	};
+
+	pinctrl_swi2c: swi2cgrp {
+		fsl,pins = <
+			MX51_PAD_DI1_PIN11__GPIO3_0		0x100
+			MX51_PAD_DI1_PIN12__GPIO3_1		0x100
+		>;
+	};
+
+	pinctrl_uart1: uart1grp {
+		fsl,pins = <
+			MX51_PAD_UART1_RXD__UART1_RXD		0x1c5
+			MX51_PAD_UART1_TXD__UART1_TXD		0x1c5
+			MX51_PAD_UART1_RTS__UART1_RTS		0x1c5
+			MX51_PAD_UART1_CTS__UART1_CTS		0x1c5
+		>;
+	};
+
+	pinctrl_uart2: uart2grp {
+		fsl,pins = <
+			MX51_PAD_UART2_RXD__UART2_RXD		0x1c5
+			MX51_PAD_UART2_TXD__UART2_TXD		0x1c5
+			MX51_PAD_USBH1_DATA0__UART2_CTS		0x1c5
+			MX51_PAD_USBH1_DATA3__UART2_RTS		0x1c5
+		>;
+	};
+
+	pinctrl_uart3: uart3grp {
+		fsl,pins = <
+			MX51_PAD_UART3_RXD__UART3_RXD		0x1c5
+			MX51_PAD_UART3_TXD__UART3_TXD		0x1c5
+		>;
+	};
+
+	pinctrl_usb_mmc_reset: usbmmcgrp {
+		fsl,pins = <
+			MX51_PAD_AUD3_BB_RXD__GPIO4_19		0x100
+		>;
+	};
+};
-- 
1.9.1


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

* [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board
  2018-06-21 17:44 [PATCH 0/3] ARM: dts: imx: add two ZII boards Andrey Gusakov
  2018-06-21 17:44 ` [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi Andrey Gusakov
  2018-06-21 17:44 ` [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board Andrey Gusakov
@ 2018-06-21 17:45 ` Andrey Gusakov
  2018-06-26 15:46   ` Fabio Estevam
  2018-07-01  8:44   ` Shawn Guo
  2 siblings, 2 replies; 16+ messages in thread
From: Andrey Gusakov @ 2018-06-21 17:45 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, cphealy,
	andrew.smirnov, l.stach
  Cc: linux-arm-kernel, devicetree, linux-kernel, andrey.gusakov

This adds support for the Zodiac Inflight Innovations SCU2 Mezz
board, which is based on the i.MX51.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
---
 arch/arm/boot/dts/Makefile                |   3 +-
 arch/arm/boot/dts/imx51-zii-scu2-mezz.dts | 190 ++++++++++++++++++++++++++++++
 2 files changed, 192 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx51-zii-scu2-mezz.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d8900f4..e0dc187 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -359,7 +359,8 @@ dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-eukrea-mbimxsd51-baseboard.dtb \
 	imx51-ts4800.dtb \
 	imx51-zii-rdu1.dtb \
-	imx51-zii-scu2-esb.dtb
+	imx51-zii-scu2-esb.dtb \
+	imx51-zii-scu2-mezz.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
 	imx53-ard.dtb \
 	imx53-cx9020.dtb \
diff --git a/arch/arm/boot/dts/imx51-zii-scu2-mezz.dts b/arch/arm/boot/dts/imx51-zii-scu2-mezz.dts
new file mode 100644
index 0000000..f58572a
--- /dev/null
+++ b/arch/arm/boot/dts/imx51-zii-scu2-mezz.dts
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+// Copyright (C) 2018 Zodiac Inflight Innovations
+
+/dts-v1/;
+#include "imx51-zii-common.dtsi"
+
+/ {
+	model = "ZII SCU2 Mezz Board";
+	compatible = "zii,imx51-scu2-mezz", "fsl,imx51";
+
+	aliases {
+		mdio-gpio0 = &mdio_gpio;
+	};
+
+	mdio_gpio: mdio-gpio {
+		compatible = "virtual,mdio-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_swmdio>;
+		gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>, /* mdc */
+			<&gpio2 6 GPIO_ACTIVE_HIGH>; /* mdio */
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		switch@0 {
+			compatible = "marvell,mv88e6085";
+			reg = <0>;
+			dsa,member = <0 0>;
+			eeprom-length = <512>;
+			interrupt-parent = <&gpio1>;
+			interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					label = "port4";
+				};
+
+				port@1 {
+					reg = <1>;
+					label = "port5";
+				};
+
+				port@2 {
+					reg = <2>;
+					label = "port6";
+				};
+
+				port@3 {
+					reg = <3>;
+					label = "port7";
+				};
+
+				port@4 {
+					reg = <4>;
+					label = "cpu";
+					ethernet = <&fec>;
+
+					fixed-link {
+						speed = <100>;
+						full-duplex;
+					};
+				};
+
+				port@5 {
+					reg = <5>;
+					label = "mezz2esb";
+					phy-mode = "sgmii";
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+					};
+				};
+			};
+		};
+	};
+};
+
+&usb_vbus {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb_mmc_reset>;
+	gpio = <&gpio3 13 GPIO_ACTIVE_LOW>;
+	startup-delay-us = <150000>;
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc1_4bit &pinctrl_esdhc1_8bit>;
+	bus-width = <8>;
+};
+
+&fec {
+	phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
+	phy-reset-duration = <1>;
+	phy-supply = <&vgen3_reg>;
+	phy-handle = <&ethphy>;
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethphy: ethernet-phy@0 {
+			reg = <0>;
+			max-speed = <100>;
+		};
+	};
+};
+
+
+&i2c_gpio {
+	gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>, /* sda */
+		<&gpio3 1 GPIO_ACTIVE_HIGH>; /* scl */
+};
+
+&uart2 {
+	status = "disabled";
+};
+
+&vsd_reg {
+	regulator-always-on;
+};
+
+&iomuxc {
+	pinctrl_fec: fecgrp {
+		fsl,pins = <
+			MX51_PAD_DISP2_DAT15__FEC_TDATA0	0x2004
+			MX51_PAD_DISP2_DAT6__FEC_TDATA1		0x2004
+			MX51_PAD_DISP2_DAT7__FEC_TDATA2		0x2004
+			MX51_PAD_DISP2_DAT8__FEC_TDATA3		0x2004
+			MX51_PAD_DISP2_DAT9__FEC_TX_EN		0x2004
+			MX51_PAD_DISP2_DAT10__FEC_COL		0x0180
+			MX51_PAD_DISP2_DAT11__FEC_RX_CLK	0x0180
+			MX51_PAD_DISP2_DAT12__FEC_RX_DV		0x20a4
+			MX51_PAD_DISP2_DAT1__FEC_RX_ER		0x20a4
+			MX51_PAD_DISP2_DAT13__FEC_TX_CLK	0x2180
+			MX51_PAD_DI_GP3__FEC_TX_ER		0x2004
+			MX51_PAD_DISP2_DAT14__FEC_RDATA0	0x2180
+			MX51_PAD_DI2_DISP_CLK__FEC_RDATA1	0x0085
+			MX51_PAD_DI_GP4__FEC_RDATA2		0x0085
+			MX51_PAD_DISP2_DAT0__FEC_RDATA3		0x0085
+			MX51_PAD_DI2_PIN2__FEC_MDC		0x2004
+			MX51_PAD_DI2_PIN3__FEC_MDIO		0x01f5
+			MX51_PAD_DI2_PIN4__FEC_CRS		0x0180
+			MX51_PAD_EIM_A20__GPIO2_14		0x0085
+			MX51_PAD_EIM_A21__GPIO2_15		0x00e5
+		>;
+	};
+
+	pinctrl_uart1: uart1grp {
+		fsl,pins = <
+			MX51_PAD_UART1_RXD__UART1_RXD		0x1c5
+			MX51_PAD_UART1_TXD__UART1_TXD		0x1c5
+		>;
+	};
+
+	pinctrl_uart2: uart2grp {
+	};
+
+	pinctrl_uart3: uart3grp {
+		fsl,pins = <
+			MX51_PAD_UART3_RXD__UART3_RXD		0x1c5
+			MX51_PAD_UART3_TXD__UART3_TXD		0x1c5
+		>;
+	};
+
+	pinctrl_usb_mmc_reset: usbmmcgrp {
+		fsl,pins = <
+			MX51_PAD_CSI1_D9__GPIO3_13		0x85
+		>;
+	};
+
+	pinctrl_swmdio: swmdiogrp {
+		fsl,pins = <
+			MX51_PAD_EIM_D22__GPIO2_6		0x100
+			MX51_PAD_EIM_D23__GPIO2_7		0x100
+		>;
+	};
+
+	pinctrl_swi2c: swi2cgrp {
+		fsl,pins = <
+			MX51_PAD_DI1_PIN12__GPIO3_1		0x100
+			MX51_PAD_DI1_PIN13__GPIO3_2		0x100
+		>;
+	};
+};
-- 
1.9.1


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

* Re: [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board
  2018-06-21 17:44 ` [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board Andrey Gusakov
@ 2018-06-26 15:45   ` Fabio Estevam
  2018-07-01  8:25   ` Shawn Guo
  1 sibling, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2018-06-26 15:45 UTC (permalink / raw)
  To: Andrey Gusakov
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, Chris Healy,
	Andrey Smirnov, Lucas Stach,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Thu, Jun 21, 2018 at 2:44 PM, Andrey Gusakov
<andrey.gusakov@cogentembedded.com> wrote:
> This adds support for the Zodiac Inflight Innovations SCU2 Ethernet
> Switch Board, which is based on the i.MX51.
>
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

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

* Re: [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board
  2018-06-21 17:45 ` [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board Andrey Gusakov
@ 2018-06-26 15:46   ` Fabio Estevam
  2018-07-01  8:44   ` Shawn Guo
  1 sibling, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2018-06-26 15:46 UTC (permalink / raw)
  To: Andrey Gusakov
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, Chris Healy,
	Andrey Smirnov, Lucas Stach,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, Jun 21, 2018 at 2:45 PM, Andrey Gusakov
<andrey.gusakov@cogentembedded.com> wrote:
> This adds support for the Zodiac Inflight Innovations SCU2 Mezz
> board, which is based on the i.MX51.
>
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

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

* Re: [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-21 17:44 ` [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi Andrey Gusakov
@ 2018-06-26 22:08   ` Fabio Estevam
  2018-06-27  7:11   ` [1/3] " Nikita Yushchenko
  2018-07-02  8:21   ` [PATCH 1/3] " Andrey Gusakov
  2 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2018-06-26 22:08 UTC (permalink / raw)
  To: Andrey Gusakov
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, Chris Healy,
	Andrey Smirnov, Lucas Stach,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, Jun 21, 2018 at 2:44 PM, Andrey Gusakov
<andrey.gusakov@cogentembedded.com> wrote:
> Make shared include file. Move common stuff from rdu1 dts file to
> dtsi for future reuse by other imx51 based boards from ZII.
>
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

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

* Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-21 17:44 ` [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi Andrey Gusakov
  2018-06-26 22:08   ` Fabio Estevam
@ 2018-06-27  7:11   ` Nikita Yushchenko
  2018-06-27 16:46     ` Andrey Smirnov
  2018-07-02  8:21   ` [PATCH 1/3] " Andrey Gusakov
  2 siblings, 1 reply; 16+ messages in thread
From: Nikita Yushchenko @ 2018-06-27  7:11 UTC (permalink / raw)
  To: Andrey Gusakov, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Rob Herring, Mark Rutland,
	cphealy, andrew.smirnov, l.stach
  Cc: devicetree, linux-kernel, linux-arm-kernel

> +	i2c_gpio: i2c-gpio {
> +		compatible = "i2c-gpio";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_swi2c>;
> +		i2c-gpio,delay-us = <50>;
> +		status = "okay";
> +
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +	};

You add i2c-gpio node to dtsi file without defining gpios, with reference
to pinctrl not defined inside your dtsi file or it's includes, and without
any usage inside dtsi file.

Saving several text lines that way is a bad idea. Please move it to where
it is fully defined and used.

> +&usb_vbus {
> +	regulator-always-on;

usb_vbus is regilator-fixed, what for is this?

> +&uart2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart2>;
> +	status = "okay";
> +};

In your further patches you include this and then revert by marking &uart2 as
disabled. Better to enable it in dts for boards that have it.

Same with ecspi2, ipu and maybe more.

> -	flash@1 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		compatible = "atmel,at45db642d", "atmel,at45", "atmel,dataflash";
> -		spi-max-frequency = <25000000>;
> -		reg = <1>;
> -	};

> +	flash@1 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "atmel,at45", "atmel,dataflash";
> +		spi-max-frequency = <25000000>;
> +		reg = <1>;
> +	};

Lost a compatible key?

> -			sysled0@3 {
> -				reg = <3>;
> -				label = "system:green:status";
> -				linux,default-trigger = "default-on";
> -			};

> +			sysled3: led3@3 {
> +				reg = <3>;
> +				label = "system:red:power";
> +				linux,default-trigger = "default-on";
> +			};

> +&sysled3 {
> +	label = "system:green:status";
 
What for this label games?
Maybe just define things for boards that use it?


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

* Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-27  7:11   ` [1/3] " Nikita Yushchenko
@ 2018-06-27 16:46     ` Andrey Smirnov
  2018-06-27 16:59       ` Nikita Yushchenko
  2018-06-27 17:00       ` Fabio Estevam
  0 siblings, 2 replies; 16+ messages in thread
From: Andrey Smirnov @ 2018-06-27 16:46 UTC (permalink / raw)
  To: nikita.yoush
  Cc: Andrey Gusakov, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, linux-imx, Rob Herring, Mark Rutland, Chris Healy,
	Lucas Stach,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, linux-arm-kernel

Nikita:

Since you are mostly arguing against the suggestions I made to Andrey
Gusakov in off-list review, I'll respond.

On Wed, Jun 27, 2018 at 12:11 AM Nikita Yushchenko
<nikita.yoush@yandex.ru> wrote:
>
> > +     i2c_gpio: i2c-gpio {
> > +             compatible = "i2c-gpio";
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&pinctrl_swi2c>;
> > +             i2c-gpio,delay-us = <50>;
> > +             status = "okay";
> > +
> > +             #address-cells = <1>;
> > +             #size-cells = <0>;
> > +     };
>
> You add i2c-gpio node to dtsi file without defining gpios, with reference
> to pinctrl not defined inside your dtsi file or it's includes, and without
> any usage inside dtsi file.
>
> Saving several text lines that way is a bad idea.

There are three boards that share that configuration almost to a T,
with the only difference is the particular GPIOs used. Putting it into
a common file avoids repeating the boilerplate and makes it explicit
to the reader that those settings are shared.

> Please move it to where it is fully defined and used.
>

We are now starting to give Andrey Gusakov conflicting
recommendations. For the sake of moving forward, can we agree that
this and similar comments are relatively minor and defer to the
maintainers to make a call which way to go?
This way Andrey has a clear way on how to move forward with this set.

> > +&usb_vbus {
> > +     regulator-always-on;
>
> usb_vbus is regilator-fixed, what for is this?
>
> > +&uart2 {
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&pinctrl_uart2>;
> > +     status = "okay";
> > +};
>
> In your further patches you include this and then revert by marking &uart2 as
> disabled. Better to enable it in dts for boards that have it.
>

There are at least two boards that use that UART2 as is. Same as above
this was done to reduce boilerplate.

> Same with ecspi2, ipu and maybe more.
>

Ditto.

> > -     flash@1 {
> > -             #address-cells = <1>;
> > -             #size-cells = <1>;
> > -             compatible = "atmel,at45db642d", "atmel,at45", "atmel,dataflash";
> > -             spi-max-frequency = <25000000>;
> > -             reg = <1>;
> > -     };
>
> > +     flash@1 {
> > +             #address-cells = <1>;
> > +             #size-cells = <1>;
> > +             compatible = "atmel,at45", "atmel,dataflash";
> > +             spi-max-frequency = <25000000>;
> > +             reg = <1>;
> > +     };
>
> Lost a compatible key?
>
> > -                     sysled0@3 {
> > -                             reg = <3>;
> > -                             label = "system:green:status";
> > -                             linux,default-trigger = "default-on";
> > -                     };
>
> > +                     sysled3: led3@3 {
> > +                             reg = <3>;
> > +                             label = "system:red:power";
> > +                             linux,default-trigger = "default-on";
> > +                     };
>
> > +&sysled3 {
> > +     label = "system:green:status";
>
> What for this label games?

Same as above. Avoiding unnecessary repetitions.

Thanks,
Andrey Smirnov

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

* Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-27 16:46     ` Andrey Smirnov
@ 2018-06-27 16:59       ` Nikita Yushchenko
  2018-06-27 17:33         ` Andrey Smirnov
  2018-06-27 17:00       ` Fabio Estevam
  1 sibling, 1 reply; 16+ messages in thread
From: Nikita Yushchenko @ 2018-06-27 16:59 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: Andrey Gusakov, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, linux-imx, Rob Herring, Mark Rutland, Chris Healy,
	Lucas Stach,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, linux-arm-kernel

> There are three boards that share that configuration almost to a T,
> with the only difference is the particular GPIOs used. Putting it into
> a common file avoids repeating the boilerplate and makes it explicit
> to the reader that those settings are shared.

I'd agree if that boilerplate was 100 lines.

But here it is small, and mostly containing lines that are required for
any i2c-gpio definition. It does not any value of itself.

Saving 5 lines at cost of loose of integrity is not something I agree with.

> There are at least two boards that use that UART2 as is. Same as above
> this was done to reduce boilerplate.

Here have choice between two logical blocks - definitions of uart2 in
two boards that use them, and two logical blocks - definition in dtsi
and undo in board that does not use it.

You trade a couple of saved dts lines against keeping things consistent.

Nikita

P.S.
In case of these zii boards I doubt that dtsi worths at all. Despite of
all being imx51 boards from ZII, these boards don't seem to have large
common logical blocks. Perhaos RDU1 and babbage have more in common - so
what, create a dtsi for them?

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

* Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-27 16:46     ` Andrey Smirnov
  2018-06-27 16:59       ` Nikita Yushchenko
@ 2018-06-27 17:00       ` Fabio Estevam
  2018-07-01  8:21         ` Shawn Guo
  1 sibling, 1 reply; 16+ messages in thread
From: Fabio Estevam @ 2018-06-27 17:00 UTC (permalink / raw)
  To: Andrey Smirnov, Shawn Guo
  Cc: nikita.yoush, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, Sascha Hauer, Andrey Gusakov, linux-kernel,
	Rob Herring, NXP Linux Team, Sascha Hauer, Fabio Estevam,
	Chris Healy, Lucas Stach

On Wed, Jun 27, 2018 at 1:46 PM, Andrey Smirnov
<andrew.smirnov@gmail.com> wrote:

> We are now starting to give Andrey Gusakov conflicting
> recommendations. For the sake of moving forward, can we agree that
> this and similar comments are relatively minor and defer to the
> maintainers to make a call which way to go?
> This way Andrey has a clear way on how to move forward with this set.

The approach in this patched looked fine to me as well.

Maybe we can have some feedback from Shawn?

Thanks

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

* Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-27 16:59       ` Nikita Yushchenko
@ 2018-06-27 17:33         ` Andrey Smirnov
  0 siblings, 0 replies; 16+ messages in thread
From: Andrey Smirnov @ 2018-06-27 17:33 UTC (permalink / raw)
  To: Nikita Yushchenko
  Cc: Andrey Gusakov, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, linux-imx, Rob Herring, Mark Rutland, Chris Healy,
	Lucas Stach,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, linux-arm-kernel

On Wed, Jun 27, 2018 at 9:59 AM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
>
> > There are three boards that share that configuration almost to a T,
> > with the only difference is the particular GPIOs used. Putting it into
> > a common file avoids repeating the boilerplate and makes it explicit
> > to the reader that those settings are shared.
>
> I'd agree if that boilerplate was 100 lines.
>

OK, so your threshold is 100 lines, mine is 3. Agree to disagree?

> But here it is small, and mostly containing lines that are required for
> any i2c-gpio definition. It does not any value of itself.
>
> Saving 5 lines at cost of loose of integrity is not something I agree with.
>

Can we maybe tone it down and not make this sound like a struggle of
"good vs. evil"?

> > There are at least two boards that use that UART2 as is. Same as above
> > this was done to reduce boilerplate.
>
> Here have choice between two logical blocks - definitions of uart2 in
> two boards that use them, and two logical blocks - definition in dtsi
> and undo in board that does not use it.
>
> You trade a couple of saved dts lines against keeping things consistent.

That's your POV, mine is that I save a couple of lines and things are
still consistent.

>
> Nikita
>
> P.S.
> In case of these zii boards I doubt that dtsi worths at all. Despite of
> all being imx51 boards from ZII, these boards don't seem to have large
> common logical blocks. Perhaos RDU1 and babbage have more in common - so
> what, create a dtsi for them?

Nope, that slippery slope doesn't exist at all. We have a clear
boundary/decision criteria of common vendor.

As I said, let's leave this decision up to the maintainers and avoid
continuing having this argument where neither party convinces another.

Thanks,
Andrey Smirnov

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

* Re: [1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-27 17:00       ` Fabio Estevam
@ 2018-07-01  8:21         ` Shawn Guo
  0 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2018-07-01  8:21 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Andrey Smirnov, nikita.yoush, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, Sascha Hauer, Andrey Gusakov, linux-kernel,
	Rob Herring, NXP Linux Team, Sascha Hauer, Fabio Estevam,
	Chris Healy, Lucas Stach

On Wed, Jun 27, 2018 at 02:00:11PM -0300, Fabio Estevam wrote:
> On Wed, Jun 27, 2018 at 1:46 PM, Andrey Smirnov
> <andrew.smirnov@gmail.com> wrote:
> 
> > We are now starting to give Andrey Gusakov conflicting
> > recommendations. For the sake of moving forward, can we agree that
> > this and similar comments are relatively minor and defer to the
> > maintainers to make a call which way to go?
> > This way Andrey has a clear way on how to move forward with this set.
> 
> The approach in this patched looked fine to me as well.
> 
> Maybe we can have some feedback from Shawn?

I'm overall fine with the approach as well.  But I agree with Nikita's
comment that having pinctrl definition and usage spread in different
files makes reader's life harder.  So I would suggest that we have the
following properties in imx51-zii-rdu1.dts as well.

	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_swi2c>;

Shawn

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

* Re: [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board
  2018-06-21 17:44 ` [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board Andrey Gusakov
  2018-06-26 15:45   ` Fabio Estevam
@ 2018-07-01  8:25   ` Shawn Guo
  1 sibling, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2018-07-01  8:25 UTC (permalink / raw)
  To: Andrey Gusakov
  Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, cphealy,
	andrew.smirnov, l.stach, linux-arm-kernel, devicetree,
	linux-kernel

On Thu, Jun 21, 2018 at 08:44:59PM +0300, Andrey Gusakov wrote:
> This adds support for the Zodiac Inflight Innovations SCU2 Ethernet
> Switch Board, which is based on the i.MX51.
> 
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
> ---
>  arch/arm/boot/dts/Makefile               |   3 +-
>  arch/arm/boot/dts/imx51-zii-scu2-esb.dts | 178 +++++++++++++++++++++++++++++++
>  2 files changed, 180 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/imx51-zii-scu2-esb.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 37a3de7..d8900f4 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -358,7 +358,8 @@ dtb-$(CONFIG_SOC_IMX51) += \
>  	imx51-digi-connectcore-jsk.dtb \
>  	imx51-eukrea-mbimxsd51-baseboard.dtb \
>  	imx51-ts4800.dtb \
> -	imx51-zii-rdu1.dtb
> +	imx51-zii-rdu1.dtb \
> +	imx51-zii-scu2-esb.dtb
>  dtb-$(CONFIG_SOC_IMX53) += \
>  	imx53-ard.dtb \
>  	imx53-cx9020.dtb \
> diff --git a/arch/arm/boot/dts/imx51-zii-scu2-esb.dts b/arch/arm/boot/dts/imx51-zii-scu2-esb.dts
> new file mode 100644
> index 0000000..e052133
> --- /dev/null
> +++ b/arch/arm/boot/dts/imx51-zii-scu2-esb.dts
> @@ -0,0 +1,178 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +// Copyright (C) 2018 Zodiac Inflight Innovations
> +
> +/dts-v1/;
> +#include "imx51-zii-common.dtsi"
> +
> +/ {
> +	model = "ZII SCU2 ESB board";
> +	compatible = "zii,imx51-scu2-esb", "fsl,imx51";
> +};
> +
> +&esdhc1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_esdhc1_4bit &pinctrl_esdhc1_8bit>;
> +	bus-width = <8>;
> +};
> +
> +&fec {
> +	phy-reset-gpios = <&gpio4 21 GPIO_ACTIVE_LOW>;
> +
> +	fixed-link {
> +		speed = <100>;
> +		full-duplex;
> +	};
> +
> +	fec_mdio: mdio {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		status = "okay";
> +
> +		switch@0 {
> +			compatible = "marvell,mv88e6085";
> +			reg = <0>;
> +			dsa,member = <0 0>;
> +			eeprom-length = <512>;
> +			interrupt-parent = <&gpio4>;
> +			interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +					label = "port1";
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +					label = "port2";
> +				};
> +
> +				port@2 {
> +					reg = <2>;
> +					label = "port3";
> +				};
> +
> +				port@3 {
> +					reg = <3>;
> +					label = "scu2scu";
> +				};
> +
> +				port@4 {
> +					reg = <4>;
> +					label = "esb2host";
> +				};

Please constantly have newline between nodes.

Shawn

> +				port@5 {
> +					reg = <5>;
> +					label = "esb2mezz";
> +					phy-mode = "sgmii";
> +
> +					fixed-link {
> +						speed = <1000>;
> +						full-duplex;
> +					};
> +				};
> +				port@6 {
> +					reg = <6>;
> +					label = "cpu";
> +					phy-mode = "mii";
> +					ethernet = <&fec>;
> +
> +					fixed-link {
> +						speed = <100>;
> +						full-duplex;
> +					};
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&i2c2 {
> +	lm75@48 {
> +		compatible = "national,lm75";
> +		reg = <0x48>;
> +	};
> +};
> +
> +&i2c_gpio {
> +	gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>, /* sda */
> +		<&gpio3 0 GPIO_ACTIVE_HIGH>; /* scl */
> +};
> +
> +&ipu {
> +	status = "disabled";
> +};
> +
> +&usb_vbus {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_usb_mmc_reset>;
> +	gpio = <&gpio4 19 GPIO_ACTIVE_LOW>;
> +	startup-delay-us = <150000>;
> +};
> +
> +&iomuxc {
> +	pinctrl_fec: fecgrp {
> +		fsl,pins = <
> +			MX51_PAD_DISP2_DAT15__FEC_TDATA0	0x2004
> +			MX51_PAD_DISP2_DAT6__FEC_TDATA1		0x2004
> +			MX51_PAD_DISP2_DAT7__FEC_TDATA2		0x2004
> +			MX51_PAD_DISP2_DAT8__FEC_TDATA3		0x2004
> +			MX51_PAD_DISP2_DAT9__FEC_TX_EN		0x2004
> +			MX51_PAD_DISP2_DAT10__FEC_COL		0x0180
> +			MX51_PAD_DISP2_DAT11__FEC_RX_CLK	0x0180
> +			MX51_PAD_DISP2_DAT12__FEC_RX_DV		0x20a4
> +			MX51_PAD_DISP2_DAT13__FEC_TX_CLK	0x2180
> +			MX51_PAD_DISP2_DAT14__FEC_RDATA0	0x2180
> +			MX51_PAD_DI2_DISP_CLK__FEC_RDATA1	0x0085
> +			MX51_PAD_DI_GP4__FEC_RDATA2		0x0085
> +			MX51_PAD_DISP2_DAT0__FEC_RDATA3		0x0085
> +			MX51_PAD_DI2_PIN2__FEC_MDC		0x2004
> +			MX51_PAD_DI2_PIN3__FEC_MDIO		0x01f5
> +			MX51_PAD_DI2_PIN4__FEC_CRS		0x0180
> +			MX51_PAD_AUD3_BB_FS__GPIO4_21		0x0000
> +		>;
> +	};
> +
> +	pinctrl_swi2c: swi2cgrp {
> +		fsl,pins = <
> +			MX51_PAD_DI1_PIN11__GPIO3_0		0x100
> +			MX51_PAD_DI1_PIN12__GPIO3_1		0x100
> +		>;
> +	};
> +
> +	pinctrl_uart1: uart1grp {
> +		fsl,pins = <
> +			MX51_PAD_UART1_RXD__UART1_RXD		0x1c5
> +			MX51_PAD_UART1_TXD__UART1_TXD		0x1c5
> +			MX51_PAD_UART1_RTS__UART1_RTS		0x1c5
> +			MX51_PAD_UART1_CTS__UART1_CTS		0x1c5
> +		>;
> +	};
> +
> +	pinctrl_uart2: uart2grp {
> +		fsl,pins = <
> +			MX51_PAD_UART2_RXD__UART2_RXD		0x1c5
> +			MX51_PAD_UART2_TXD__UART2_TXD		0x1c5
> +			MX51_PAD_USBH1_DATA0__UART2_CTS		0x1c5
> +			MX51_PAD_USBH1_DATA3__UART2_RTS		0x1c5
> +		>;
> +	};
> +
> +	pinctrl_uart3: uart3grp {
> +		fsl,pins = <
> +			MX51_PAD_UART3_RXD__UART3_RXD		0x1c5
> +			MX51_PAD_UART3_TXD__UART3_TXD		0x1c5
> +		>;
> +	};
> +
> +	pinctrl_usb_mmc_reset: usbmmcgrp {
> +		fsl,pins = <
> +			MX51_PAD_AUD3_BB_RXD__GPIO4_19		0x100
> +		>;
> +	};
> +};
> -- 
> 1.9.1
> 

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

* Re: [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board
  2018-06-21 17:45 ` [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board Andrey Gusakov
  2018-06-26 15:46   ` Fabio Estevam
@ 2018-07-01  8:44   ` Shawn Guo
  1 sibling, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2018-07-01  8:44 UTC (permalink / raw)
  To: Andrey Gusakov
  Cc: Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, cphealy,
	andrew.smirnov, l.stach, linux-arm-kernel, devicetree,
	linux-kernel

On Thu, Jun 21, 2018 at 08:45:00PM +0300, Andrey Gusakov wrote:
> This adds support for the Zodiac Inflight Innovations SCU2 Mezz
> board, which is based on the i.MX51.
> 
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
> ---
>  arch/arm/boot/dts/Makefile                |   3 +-
>  arch/arm/boot/dts/imx51-zii-scu2-mezz.dts | 190 ++++++++++++++++++++++++++++++
>  2 files changed, 192 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/imx51-zii-scu2-mezz.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index d8900f4..e0dc187 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -359,7 +359,8 @@ dtb-$(CONFIG_SOC_IMX51) += \
>  	imx51-eukrea-mbimxsd51-baseboard.dtb \
>  	imx51-ts4800.dtb \
>  	imx51-zii-rdu1.dtb \
> -	imx51-zii-scu2-esb.dtb
> +	imx51-zii-scu2-esb.dtb \
> +	imx51-zii-scu2-mezz.dtb
>  dtb-$(CONFIG_SOC_IMX53) += \
>  	imx53-ard.dtb \
>  	imx53-cx9020.dtb \
> diff --git a/arch/arm/boot/dts/imx51-zii-scu2-mezz.dts b/arch/arm/boot/dts/imx51-zii-scu2-mezz.dts
> new file mode 100644
> index 0000000..f58572a
> --- /dev/null
> +++ b/arch/arm/boot/dts/imx51-zii-scu2-mezz.dts
> @@ -0,0 +1,190 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +// Copyright (C) 2018 Zodiac Inflight Innovations
> +
> +/dts-v1/;
> +#include "imx51-zii-common.dtsi"
> +
> +/ {
> +	model = "ZII SCU2 Mezz Board";
> +	compatible = "zii,imx51-scu2-mezz", "fsl,imx51";
> +
> +	aliases {
> +		mdio-gpio0 = &mdio_gpio;
> +	};
> +
> +	mdio_gpio: mdio-gpio {
> +		compatible = "virtual,mdio-gpio";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_swmdio>;
> +		gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>, /* mdc */
> +			<&gpio2 6 GPIO_ACTIVE_HIGH>; /* mdio */
> +

The newline in middle of property list is not really necessary.

> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		switch@0 {
> +			compatible = "marvell,mv88e6085";
> +			reg = <0>;
> +			dsa,member = <0 0>;
> +			eeprom-length = <512>;
> +			interrupt-parent = <&gpio1>;
> +			interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +					label = "port4";
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +					label = "port5";
> +				};
> +
> +				port@2 {
> +					reg = <2>;
> +					label = "port6";
> +				};
> +
> +				port@3 {
> +					reg = <3>;
> +					label = "port7";
> +				};
> +
> +				port@4 {
> +					reg = <4>;
> +					label = "cpu";
> +					ethernet = <&fec>;
> +
> +					fixed-link {
> +						speed = <100>;
> +						full-duplex;
> +					};
> +				};
> +
> +				port@5 {
> +					reg = <5>;
> +					label = "mezz2esb";
> +					phy-mode = "sgmii";

Please have a newline between property list and child node.

> +					fixed-link {
> +						speed = <1000>;
> +						full-duplex;
> +					};
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&usb_vbus {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_usb_mmc_reset>;
> +	gpio = <&gpio3 13 GPIO_ACTIVE_LOW>;
> +	startup-delay-us = <150000>;
> +};

Please sort these labelled nodes alphabetically in label name.  &iomuxc
can be an exception though.

> +
> +&esdhc1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_esdhc1_4bit &pinctrl_esdhc1_8bit>;
> +	bus-width = <8>;
> +};
> +
> +&fec {
> +	phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
> +	phy-reset-duration = <1>;
> +	phy-supply = <&vgen3_reg>;
> +	phy-handle = <&ethphy>;
> +
> +	mdio {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ethphy: ethernet-phy@0 {
> +			reg = <0>;
> +			max-speed = <100>;
> +		};
> +	};
> +};
> +
> +
> +&i2c_gpio {
> +	gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>, /* sda */
> +		<&gpio3 1 GPIO_ACTIVE_HIGH>; /* scl */
> +};
> +
> +&uart2 {
> +	status = "disabled";
> +};
> +
> +&vsd_reg {
> +	regulator-always-on;
> +};
> +
> +&iomuxc {
> +	pinctrl_fec: fecgrp {
> +		fsl,pins = <
> +			MX51_PAD_DISP2_DAT15__FEC_TDATA0	0x2004
> +			MX51_PAD_DISP2_DAT6__FEC_TDATA1		0x2004
> +			MX51_PAD_DISP2_DAT7__FEC_TDATA2		0x2004
> +			MX51_PAD_DISP2_DAT8__FEC_TDATA3		0x2004
> +			MX51_PAD_DISP2_DAT9__FEC_TX_EN		0x2004
> +			MX51_PAD_DISP2_DAT10__FEC_COL		0x0180
> +			MX51_PAD_DISP2_DAT11__FEC_RX_CLK	0x0180
> +			MX51_PAD_DISP2_DAT12__FEC_RX_DV		0x20a4
> +			MX51_PAD_DISP2_DAT1__FEC_RX_ER		0x20a4
> +			MX51_PAD_DISP2_DAT13__FEC_TX_CLK	0x2180
> +			MX51_PAD_DI_GP3__FEC_TX_ER		0x2004
> +			MX51_PAD_DISP2_DAT14__FEC_RDATA0	0x2180
> +			MX51_PAD_DI2_DISP_CLK__FEC_RDATA1	0x0085
> +			MX51_PAD_DI_GP4__FEC_RDATA2		0x0085
> +			MX51_PAD_DISP2_DAT0__FEC_RDATA3		0x0085
> +			MX51_PAD_DI2_PIN2__FEC_MDC		0x2004
> +			MX51_PAD_DI2_PIN3__FEC_MDIO		0x01f5
> +			MX51_PAD_DI2_PIN4__FEC_CRS		0x0180
> +			MX51_PAD_EIM_A20__GPIO2_14		0x0085
> +			MX51_PAD_EIM_A21__GPIO2_15		0x00e5
> +		>;
> +	};
> +
> +	pinctrl_uart1: uart1grp {
> +		fsl,pins = <
> +			MX51_PAD_UART1_RXD__UART1_RXD		0x1c5
> +			MX51_PAD_UART1_TXD__UART1_TXD		0x1c5
> +		>;
> +	};
> +
> +	pinctrl_uart2: uart2grp {
> +	};

Why this empty pinctrl?

> +
> +	pinctrl_uart3: uart3grp {
> +		fsl,pins = <
> +			MX51_PAD_UART3_RXD__UART3_RXD		0x1c5
> +			MX51_PAD_UART3_TXD__UART3_TXD		0x1c5
> +		>;
> +	};
> +
> +	pinctrl_usb_mmc_reset: usbmmcgrp {
> +		fsl,pins = <
> +			MX51_PAD_CSI1_D9__GPIO3_13		0x85
> +		>;
> +	};
> +
> +	pinctrl_swmdio: swmdiogrp {
> +		fsl,pins = <
> +			MX51_PAD_EIM_D22__GPIO2_6		0x100
> +			MX51_PAD_EIM_D23__GPIO2_7		0x100
> +		>;
> +	};
> +
> +	pinctrl_swi2c: swi2cgrp {
> +		fsl,pins = <
> +			MX51_PAD_DI1_PIN12__GPIO3_1		0x100
> +			MX51_PAD_DI1_PIN13__GPIO3_2		0x100
> +		>;
> +	};

Please sort these pinctrl nodes alphabetically as well.

Shawn

> +};
> -- 
> 1.9.1
> 

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

* Re: [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi
  2018-06-21 17:44 ` [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi Andrey Gusakov
  2018-06-26 22:08   ` Fabio Estevam
  2018-06-27  7:11   ` [1/3] " Nikita Yushchenko
@ 2018-07-02  8:21   ` Andrey Gusakov
  2 siblings, 0 replies; 16+ messages in thread
From: Andrey Gusakov @ 2018-07-02  8:21 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Rob Herring, Mark Rutland, Chris Healy,
	Andrey Smirnov, Lucas Stach
  Cc: linux-arm-kernel, devicetree, linux-kernel, Andrey Gusakov

Hi all,

I'll rework this patchset without dtsi and resend.

Thanks for comments.

On Thu, Jun 21, 2018 at 8:44 PM, Andrey Gusakov
<andrey.gusakov@cogentembedded.com> wrote:
> Make shared include file. Move common stuff from rdu1 dts file to
> dtsi for future reuse by other imx51 based boards from ZII.
>
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
> ---
>  arch/arm/boot/dts/imx51-zii-common.dtsi | 317 ++++++++++++++++++++++++++++++
>  arch/arm/boot/dts/imx51-zii-rdu1.dts    | 330 +++-----------------------------
>  2 files changed, 347 insertions(+), 300 deletions(-)
>  create mode 100644 arch/arm/boot/dts/imx51-zii-common.dtsi
>
> diff --git a/arch/arm/boot/dts/imx51-zii-common.dtsi b/arch/arm/boot/dts/imx51-zii-common.dtsi
> new file mode 100644
> index 0000000..b0f0643
> --- /dev/null
> +++ b/arch/arm/boot/dts/imx51-zii-common.dtsi
> @@ -0,0 +1,317 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +// Copyright (C) 2018 Zodiac Inflight Innovations
> +
> +#include "imx51.dtsi"
> +
> +/ {
> +       chosen {
> +               stdout-path = &uart1;
> +       };
> +
> +       /* Will be filled by the bootloader */
> +       memory@90000000 {
> +               reg = <0x90000000 0>;
> +       };
> +
> +       i2c_gpio: i2c-gpio {
> +               compatible = "i2c-gpio";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_swi2c>;
> +               i2c-gpio,delay-us = <50>;
> +               status = "okay";
> +
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +       };
> +
> +       usb_vbus: regulator-usb-vbus {
> +               compatible = "regulator-fixed";
> +               regulator-name = "usb_vbus";
> +               regulator-min-microvolt = <5000000>;
> +               regulator-max-microvolt = <5000000>;
> +       };
> +};
> +
> +&cpu {
> +       cpu-supply = <&sw1_reg>;
> +};
> +
> +&ecspi1 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_ecspi1>;
> +       cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>,
> +                  <&gpio4 25 GPIO_ACTIVE_LOW>;
> +       status = "okay";
> +
> +       pmic@0 {
> +               compatible = "fsl,mc13892";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_pmic>;
> +               spi-max-frequency = <6000000>;
> +               spi-cs-high;
> +               reg = <0>;
> +               interrupt-parent = <&gpio1>;
> +               interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
> +               fsl,mc13xxx-uses-adc;
> +
> +               regulators {
> +                       sw1_reg: sw1 {
> +                               regulator-min-microvolt = <600000>;
> +                               regulator-max-microvolt = <1375000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       sw2_reg: sw2 {
> +                               regulator-min-microvolt = <900000>;
> +                               regulator-max-microvolt = <1850000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       sw3_reg: sw3 {
> +                               regulator-min-microvolt = <1100000>;
> +                               regulator-max-microvolt = <1850000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       sw4_reg: sw4 {
> +                               regulator-min-microvolt = <1100000>;
> +                               regulator-max-microvolt = <1850000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       vpll_reg: vpll {
> +                               regulator-min-microvolt = <1050000>;
> +                               regulator-max-microvolt = <1800000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       vdig_reg: vdig {
> +                               regulator-min-microvolt = <1650000>;
> +                               regulator-max-microvolt = <1650000>;
> +                               regulator-boot-on;
> +                       };
> +
> +                       vsd_reg: vsd {
> +                               regulator-min-microvolt = <1800000>;
> +                               regulator-max-microvolt = <3150000>;
> +                       };
> +
> +                       vusb_reg: vusb {
> +                               regulator-always-on;
> +                       };
> +
> +                       vusb2_reg: vusb2 {
> +                               regulator-min-microvolt = <2400000>;
> +                               regulator-max-microvolt = <2775000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       vvideo_reg: vvideo {
> +                               regulator-min-microvolt = <2775000>;
> +                               regulator-max-microvolt = <2775000>;
> +                       };
> +
> +                       vaudio_reg: vaudio {
> +                               regulator-min-microvolt = <2300000>;
> +                               regulator-max-microvolt = <3000000>;
> +                       };
> +
> +                       vcam_reg: vcam {
> +                               regulator-min-microvolt = <2500000>;
> +                               regulator-max-microvolt = <3000000>;
> +                       };
> +
> +                       vgen1_reg: vgen1 {
> +                               regulator-min-microvolt = <1200000>;
> +                               regulator-max-microvolt = <1200000>;
> +                       };
> +
> +                       vgen2_reg: vgen2 {
> +                               regulator-min-microvolt = <1200000>;
> +                               regulator-max-microvolt = <3150000>;
> +                               regulator-always-on;
> +                       };
> +
> +                       vgen3_reg: vgen3 {
> +                               regulator-min-microvolt = <1800000>;
> +                               regulator-max-microvolt = <2900000>;
> +                               regulator-always-on;
> +                       };
> +               };
> +
> +               leds {
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +                       led-control = <0x0 0x0 0x3f83f8 0x0>;
> +
> +                       sysled3: led3@3 {
> +                               reg = <3>;
> +                               label = "system:red:power";
> +                               linux,default-trigger = "default-on";
> +                       };
> +
> +                       sysled4: led4@4 {
> +                               reg = <4>;
> +                               label = "system:green:act";
> +                               linux,default-trigger = "heartbeat";
> +                       };
> +               };
> +       };
> +
> +       flash@1 {
> +               #address-cells = <1>;
> +               #size-cells = <1>;
> +               compatible = "atmel,at45", "atmel,dataflash";
> +               spi-max-frequency = <25000000>;
> +               reg = <1>;
> +       };
> +};
> +
> +&ecspi2 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_ecspi2>;
> +       cs-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>,
> +                  <&gpio3 28 GPIO_ACTIVE_LOW>;
> +       status = "okay";
> +};
> +
> +&esdhc1 {
> +       non-removable;
> +       no-1-8-v;
> +       no-sdio;
> +       no-sd;
> +       status = "okay";
> +};
> +
> +&esdhc4 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_esdhc4>;
> +       bus-width = <4>;
> +       no-1-8-v;
> +       no-sdio;
> +       cd-gpios = <&gpio4 8 GPIO_ACTIVE_LOW>;
> +       status = "okay";
> +};
> +
> +&fec {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_fec>;
> +       phy-mode = "mii";
> +       status = "okay";
> +};
> +
> +&i2c2 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_i2c2>;
> +       status = "okay";
> +
> +       eeprom@50 {
> +               compatible = "atmel,24c04";
> +               pagesize = <16>;
> +               reg = <0x50>;
> +       };
> +};
> +
> +&uart1 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_uart1>;
> +       status = "okay";
> +};
> +
> +&uart2 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_uart2>;
> +       status = "okay";
> +};
> +
> +&uart3 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_uart3>;
> +       status = "okay";
> +};
> +
> +&usbotg {
> +       dr_mode = "host";
> +       disable-over-current;
> +       phy_type = "utmi_wide";
> +       vbus-supply = <&usb_vbus>;
> +       status = "okay";
> +};
> +
> +&usbphy0 {
> +       vcc-supply = <&vusb2_reg>;
> +};
> +
> +&iomuxc {
> +       pinctrl_ecspi1: ecspi1grp {
> +               fsl,pins = <
> +                       MX51_PAD_CSPI1_MISO__ECSPI1_MISO        0x185
> +                       MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI        0x185
> +                       MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK        0x185
> +                       MX51_PAD_CSPI1_SS0__GPIO4_24            0x85
> +                       MX51_PAD_CSPI1_SS1__GPIO4_25            0x85
> +               >;
> +       };
> +
> +       pinctrl_ecspi2: ecspi2grp {
> +               fsl,pins = <
> +                       MX51_PAD_NANDF_RB2__ECSPI2_SCLK         0x185
> +                       MX51_PAD_NANDF_RB3__ECSPI2_MISO         0x185
> +                       MX51_PAD_NANDF_D15__ECSPI2_MOSI         0x185
> +                       MX51_PAD_NANDF_RDY_INT__GPIO3_24        0x85
> +                       MX51_PAD_NANDF_D12__GPIO3_28            0x85
> +               >;
> +       };
> +
> +       pinctrl_esdhc1_4bit: esdhc1grp_4bit {
> +               fsl,pins = <
> +                       MX51_PAD_SD1_CMD__SD1_CMD               0x400020d5
> +                       MX51_PAD_SD1_CLK__SD1_CLK               0x20d5
> +                       MX51_PAD_SD1_DATA0__SD1_DATA0           0x20d5
> +                       MX51_PAD_SD1_DATA1__SD1_DATA1           0x20d5
> +                       MX51_PAD_SD1_DATA2__SD1_DATA2           0x20d5
> +                       MX51_PAD_SD1_DATA3__SD1_DATA3           0x20d5
> +               >;
> +       };
> +
> +       pinctrl_esdhc1_8bit: esdhc1grp_8bit {
> +               fsl,pins = <
> +                       MX51_PAD_SD2_DATA0__SD1_DAT4            0x20d5
> +                       MX51_PAD_SD2_DATA1__SD1_DAT5            0x20d5
> +                       MX51_PAD_SD2_DATA2__SD1_DAT6            0x20d5
> +                       MX51_PAD_SD2_DATA3__SD1_DAT7            0x20d5
> +               >;
> +       };
> +
> +       pinctrl_esdhc4: esdhc4grp {
> +               fsl,pins = <
> +                       MX51_PAD_NANDF_RB1__SD4_CMD             0x400020d5
> +                       MX51_PAD_NANDF_CS2__SD4_CLK             0x20d5
> +                       MX51_PAD_NANDF_CS3__SD4_DAT0            0x20d5
> +                       MX51_PAD_NANDF_CS4__SD4_DAT1            0x20d5
> +                       MX51_PAD_NANDF_CS5__SD4_DAT2            0x20d5
> +                       MX51_PAD_NANDF_CS6__SD4_DAT3            0x20d5
> +                       MX51_PAD_NANDF_D0__GPIO4_8              0x100
> +               >;
> +       };
> +
> +       pinctrl_i2c2: i2c2grp {
> +               fsl,pins = <
> +                       MX51_PAD_KEY_COL4__I2C2_SCL             0x400001ed
> +                       MX51_PAD_KEY_COL5__I2C2_SDA             0x400001ed
> +               >;
> +       };
> +
> +       pinctrl_pmic: pmicgrp {
> +               fsl,pins = <
> +                       MX51_PAD_GPIO1_4__GPIO1_4               0x85
> +                       MX51_PAD_GPIO1_8__GPIO1_8               0xe5
> +               >;
> +       };
> +};
> diff --git a/arch/arm/boot/dts/imx51-zii-rdu1.dts b/arch/arm/boot/dts/imx51-zii-rdu1.dts
> index df9eca9..59a80da 100644
> --- a/arch/arm/boot/dts/imx51-zii-rdu1.dts
> +++ b/arch/arm/boot/dts/imx51-zii-rdu1.dts
> @@ -1,61 +1,14 @@
> -/*
> - * Copyright (C) 2017 Zodiac Inflight Innovations
> - *
> - * This file is dual-licensed: you can use it either under the terms
> - * of the GPL or the X11 license, at your option. Note that this dual
> - * licensing only applies to this file, and not this project as a
> - * whole.
> - *
> - *  a) This file is free software; you can redistribute it and/or
> - *     modify it under the terms of the GNU General Public License
> - *     version 2 as published by the Free Software Foundation.
> - *
> - *     This file 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.
> - *
> - * Or, alternatively,
> - *
> - *  b) Permission is hereby granted, free of charge, to any person
> - *     obtaining a copy of this software and associated documentation
> - *     files (the "Software"), to deal in the Software without
> - *     restriction, including without limitation the rights to use,
> - *     copy, modify, merge, publish, distribute, sublicense, and/or
> - *     sell copies of the Software, and to permit persons to whom the
> - *     Software is furnished to do so, subject to the following
> - *     conditions:
> - *
> - *     The above copyright notice and this permission notice shall be
> - *     included in all copies or substantial portions of the Software.
> - *
> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND,
> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> - *     OTHER DEALINGS IN THE SOFTWARE.
> - */
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +// Copyright (C) 2018 Zodiac Inflight Innovations
>
>  /dts-v1/;
> -#include "imx51.dtsi"
> +#include "imx51-zii-common.dtsi"
>  #include <dt-bindings/sound/fsl-imx-audmux.h>
>
>  / {
>         model = "ZII RDU1 Board";
>         compatible = "zii,imx51-rdu1", "fsl,imx51";
>
> -       chosen {
> -               stdout-path = &uart1;
> -       };
> -
> -       /* Will be filled by the bootloader */
> -       memory@90000000 {
> -               reg = <0x90000000 0>;
> -       };
> -
>         aliases {
>                 mdio-gpio0 = &mdio_gpio;
>                 rtc0 = &ds1341;
> @@ -94,14 +47,6 @@
>                 enable-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
>         };
>
> -       reg_5p0v_main: regulator-5p0v-main {
> -               compatible = "regulator-fixed";
> -               regulator-name = "5V_MAIN";
> -               regulator-min-microvolt = <5000000>;
> -               regulator-max-microvolt = <5000000>;
> -               regulator-always-on;
> -       };
> -
>         reg_3p3v: regulator-3p3v {
>                 compatible = "regulator-fixed";
>                 regulator-name = "3.3V";
> @@ -150,28 +95,6 @@
>                 };
>         };
>
> -       i2c_gpio: i2c-gpio {
> -               compatible = "i2c-gpio";
> -               pinctrl-names = "default";
> -               pinctrl-0 = <&pinctrl_swi2c>;
> -               gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>, /* sda */
> -                       <&gpio3 4 GPIO_ACTIVE_HIGH>; /* scl */
> -               i2c-gpio,delay-us = <50>;
> -               status = "okay";
> -
> -               #address-cells = <1>;
> -               #size-cells = <0>;
> -
> -               sgtl5000: codec@a {
> -                       compatible = "fsl,sgtl5000";
> -                       reg = <0x0a>;
> -                       clocks = <&clk_26M_snd>;
> -                       VDDA-supply = <&vdig_reg>;
> -                       VDDIO-supply = <&vvideo_reg>;
> -                       #sound-dai-cells = <0>;
> -               };
> -       };
> -
>         spi_gpio: spi-gpio {
>                 compatible = "spi-gpio";
>                 #address-cells = <1>;
> @@ -315,178 +238,30 @@
>         };
>  };
>
> -&cpu {
> -       cpu-supply = <&sw1_reg>;
> +&usb_vbus {
> +       regulator-always-on;
>  };
>
> -&ecspi1 {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_ecspi1>;
> -       cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>,
> -                  <&gpio4 25 GPIO_ACTIVE_LOW>;
> -       status = "okay";
> -
> -       pmic@0 {
> -               compatible = "fsl,mc13892";
> -               pinctrl-names = "default";
> -               pinctrl-0 = <&pinctrl_pmic>;
> -               spi-max-frequency = <6000000>;
> -               spi-cs-high;
> -               reg = <0>;
> -               interrupt-parent = <&gpio1>;
> -               interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
> -               fsl,mc13xxx-uses-adc;
> -
> -               regulators {
> -                       sw1_reg: sw1 {
> -                               regulator-min-microvolt = <600000>;
> -                               regulator-max-microvolt = <1375000>;
> -                               regulator-boot-on;
> -                               regulator-always-on;
> -                       };
> -
> -                       sw2_reg: sw2 {
> -                               regulator-min-microvolt = <900000>;
> -                               regulator-max-microvolt = <1850000>;
> -                               regulator-boot-on;
> -                               regulator-always-on;
> -                       };
> -
> -                       sw3_reg: sw3 {
> -                               regulator-min-microvolt = <1100000>;
> -                               regulator-max-microvolt = <1850000>;
> -                               regulator-boot-on;
> -                               regulator-always-on;
> -                       };
> -
> -                       sw4_reg: sw4 {
> -                               regulator-min-microvolt = <1100000>;
> -                               regulator-max-microvolt = <1850000>;
> -                               regulator-boot-on;
> -                               regulator-always-on;
> -                       };
> -
> -                       vpll_reg: vpll {
> -                               regulator-min-microvolt = <1050000>;
> -                               regulator-max-microvolt = <1800000>;
> -                               regulator-boot-on;
> -                               regulator-always-on;
> -                       };
> -
> -                       vdig_reg: vdig {
> -                               regulator-min-microvolt = <1650000>;
> -                               regulator-max-microvolt = <1650000>;
> -                               regulator-boot-on;
> -                       };
> -
> -                       vsd_reg: vsd {
> -                               regulator-min-microvolt = <1800000>;
> -                               regulator-max-microvolt = <3150000>;
> -                       };
> -
> -                       vusb_reg: vusb {
> -                               regulator-always-on;
> -                       };
> -
> -                       vusb2_reg: vusb2 {
> -                               regulator-min-microvolt = <2400000>;
> -                               regulator-max-microvolt = <2775000>;
> -                               regulator-boot-on;
> -                               regulator-always-on;
> -                       };
> -
> -                       vvideo_reg: vvideo {
> -                               regulator-min-microvolt = <2775000>;
> -                               regulator-max-microvolt = <2775000>;
> -                       };
> -
> -                       vaudio_reg: vaudio {
> -                               regulator-min-microvolt = <2300000>;
> -                               regulator-max-microvolt = <3000000>;
> -                       };
> -
> -                       vcam_reg: vcam {
> -                               regulator-min-microvolt = <2500000>;
> -                               regulator-max-microvolt = <3000000>;
> -                       };
> -
> -                       vgen1_reg: vgen1 {
> -                               regulator-min-microvolt = <1200000>;
> -                               regulator-max-microvolt = <1200000>;
> -                       };
> -
> -                       vgen2_reg: vgen2 {
> -                               regulator-min-microvolt = <1200000>;
> -                               regulator-max-microvolt = <3150000>;
> -                               regulator-always-on;
> -                       };
> -
> -                       vgen3_reg: vgen3 {
> -                               regulator-min-microvolt = <1800000>;
> -                               regulator-max-microvolt = <2900000>;
> -                               regulator-always-on;
> -                       };
> -               };
> -
> -               leds {
> -                       #address-cells = <1>;
> -                       #size-cells = <0>;
> -                       led-control = <0x0 0x0 0x3f83f8 0x0>;
> -
> -                       sysled0@3 {
> -                               reg = <3>;
> -                               label = "system:green:status";
> -                               linux,default-trigger = "default-on";
> -                       };
> -
> -                       sysled1@4 {
> -                               reg = <4>;
> -                               label = "system:green:act";
> -                               linux,default-trigger = "heartbeat";
> -                       };
> -               };
> -       };
> -
> -       flash@1 {
> -               #address-cells = <1>;
> -               #size-cells = <1>;
> -               compatible = "atmel,at45db642d", "atmel,at45", "atmel,dataflash";
> -               spi-max-frequency = <25000000>;
> -               reg = <1>;
> -       };
> +&ecspi2 {
> +       status = "disabled";
>  };
>
>  &esdhc1 {
>         pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_esdhc1>;
> +       pinctrl-0 = <&pinctrl_esdhc1_4bit>;
>         bus-width = <4>;
> -       no-1-8-v;
> -       non-removable;
> -       no-sdio;
> -       no-sd;
> -       status = "okay";
> +};
> +
> +&esdhc4 {
> +       status = "disabled";
>  };
>
>  &fec {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_fec>;
> -       phy-mode = "mii";
>         phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
>         phy-supply = <&vgen3_reg>;
> -       status = "okay";
>  };
>
>  &i2c2 {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_i2c2>;
> -       status = "okay";
> -
> -       eeprom@50 {
> -               compatible = "atmel,24c04";
> -               pagesize = <16>;
> -               reg = <0x50>;
> -       };
> -
>         hpa1: amp@60 {
>                 compatible = "ti,tpa6130a2";
>                 reg = <0x60>;
> @@ -550,31 +325,29 @@
>
>  };
>
> -&ipu_di0_disp1 {
> -       remote-endpoint = <&display_in>;
> -};
> +&i2c_gpio {
> +       gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>, /* sda */
> +               <&gpio3 4 GPIO_ACTIVE_HIGH>; /* scl */
>
> -&ssi2 {
> -       status = "okay";
> +       sgtl5000: codec@a {
> +               compatible = "fsl,sgtl5000";
> +               reg = <0x0a>;
> +               clocks = <&clk_26M_snd>;
> +               VDDA-supply = <&vdig_reg>;
> +               VDDIO-supply = <&vvideo_reg>;
> +               #sound-dai-cells = <0>;
> +       };
>  };
>
> -&uart1 {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_uart1>;
> -       status = "okay";
> +&ipu_di0_disp1 {
> +       remote-endpoint = <&display_in>;
>  };
>
> -&uart2 {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_uart2>;
> +&ssi2 {
>         status = "okay";
>  };
>
>  &uart3 {
> -       pinctrl-names = "default";
> -       pinctrl-0 = <&pinctrl_uart3>;
> -       status = "okay";
> -
>         rave-sp {
>                 compatible = "zii,rave-sp-rdu1";
>                 current-speed = <38400>;
> @@ -593,7 +366,7 @@
>         fsl,usbphy = <&usbh1phy>;
>         disable-over-current;
>         maximum-speed = "full-speed";
> -       vbus-supply = <&reg_5p0v_main>;
> +       vbus-supply = <&usb_vbus>;
>         status = "okay";
>  };
>
> @@ -604,20 +377,12 @@
>         phy_type = "ulpi";
>         fsl,usbphy = <&usbh2phy>;
>         disable-over-current;
> -       vbus-supply = <&reg_5p0v_main>;
> +       vbus-supply = <&usb_vbus>;
>         status = "okay";
>  };
>
> -&usbphy0 {
> -       vcc-supply = <&vusb_reg>;
> -};
> -
> -&usbotg {
> -       dr_mode = "host";
> -       disable-over-current;
> -       phy_type = "utmi_wide";
> -       vbus-supply = <&reg_5p0v_main>;
> -       status = "okay";
> +&sysled3 {
> +       label = "system:green:status";
>  };
>
>  &iomuxc {
> @@ -642,27 +407,6 @@
>                 >;
>         };
>
> -       pinctrl_ecspi1: ecspi1grp {
> -               fsl,pins = <
> -                       MX51_PAD_CSPI1_MISO__ECSPI1_MISO        0x185
> -                       MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI        0x185
> -                       MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK        0x185
> -                       MX51_PAD_CSPI1_SS0__GPIO4_24            0x85
> -                       MX51_PAD_CSPI1_SS1__GPIO4_25            0x85
> -               >;
> -       };
> -
> -       pinctrl_esdhc1: esdhc1grp {
> -               fsl,pins = <
> -                       MX51_PAD_SD1_CMD__SD1_CMD               0x400020d5
> -                       MX51_PAD_SD1_CLK__SD1_CLK               0x20d5
> -                       MX51_PAD_SD1_DATA0__SD1_DATA0           0x20d5
> -                       MX51_PAD_SD1_DATA1__SD1_DATA1           0x20d5
> -                       MX51_PAD_SD1_DATA2__SD1_DATA2           0x20d5
> -                       MX51_PAD_SD1_DATA3__SD1_DATA3           0x20d5
> -               >;
> -       };
> -
>         pinctrl_fec: fecgrp {
>                 fsl,pins = <
>                         MX51_PAD_EIM_EB2__FEC_MDIO              0x1f5
> @@ -696,13 +440,6 @@
>                 >;
>         };
>
> -       pinctrl_i2c2: i2c2grp {
> -               fsl,pins = <
> -                       MX51_PAD_KEY_COL4__I2C2_SCL             0x400001ed
> -                       MX51_PAD_KEY_COL5__I2C2_SDA             0x400001ed
> -               >;
> -       };
> -
>         pinctrl_ipu_disp1: ipudisp1grp {
>                 fsl,pins = <
>                         MX51_PAD_DISP1_DAT0__DISP1_DAT0         0x5
> @@ -741,13 +478,6 @@
>                 >;
>         };
>
> -       pinctrl_pmic: pmicgrp {
> -               fsl,pins = <
> -                       MX51_PAD_GPIO1_4__GPIO1_4               0x1e0
> -                       MX51_PAD_GPIO1_8__GPIO1_8               0x21e2
> -               >;
> -       };
> -
>         pinctrl_sndgate26mhz: sndgate26mhzgrp {
>                 fsl,pins = <
>                         MX51_PAD_CSPI1_RDY__GPIO4_26            0x85
> --
> 1.9.1
>

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

end of thread, other threads:[~2018-07-02  8:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21 17:44 [PATCH 0/3] ARM: dts: imx: add two ZII boards Andrey Gusakov
2018-06-21 17:44 ` [PATCH 1/3] ARM: dts: imx51-zii-common: create common include dtsi Andrey Gusakov
2018-06-26 22:08   ` Fabio Estevam
2018-06-27  7:11   ` [1/3] " Nikita Yushchenko
2018-06-27 16:46     ` Andrey Smirnov
2018-06-27 16:59       ` Nikita Yushchenko
2018-06-27 17:33         ` Andrey Smirnov
2018-06-27 17:00       ` Fabio Estevam
2018-07-01  8:21         ` Shawn Guo
2018-07-02  8:21   ` [PATCH 1/3] " Andrey Gusakov
2018-06-21 17:44 ` [PATCH 2/3] ARM: dts: imx: add ZII SCU2 ESB board Andrey Gusakov
2018-06-26 15:45   ` Fabio Estevam
2018-07-01  8:25   ` Shawn Guo
2018-06-21 17:45 ` [PATCH 3/3] ARM: dts: imx: add ZII SCU2 Mezz board Andrey Gusakov
2018-06-26 15:46   ` Fabio Estevam
2018-07-01  8:44   ` Shawn Guo

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