linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree
@ 2017-07-12  9:04 linux-kernel-dev
  2017-07-12  9:46 ` Mark Rutland
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-12  9:04 UTC (permalink / raw)
  To: robh+dt, mark.rutland
  Cc: shawnguo, kernel, linux, fabio.estevam, linux-arm-kernel,
	devicetree, linux-kernel, Patrick Brünn

From: Patrick Brünn <p.bruenn@beckhoff.com>

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc

Signed-off-by: Patrick Brünn <p.bruenn@beckhoff.com>
---
 arch/arm/boot/dts/Makefile         |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts | 377 +++++++++++++++++++++++++++++++++++++
 2 files changed, 378 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 9c5e1d944d1c..ea60698f9783 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX53) += \
 	imx53-ard.dtb \
 	imx53-m53evk.dtb \
 	imx53-mba53.dtb \
+	imx53-cx9020.dtb \
 	imx53-qsb.dtb \
 	imx53-qsrb.dtb \
 	imx53-smd.dtb \
diff --git a/arch/arm/boot/dts/imx53-cx9020.dts b/arch/arm/boot/dts/imx53-cx9020.dts
new file mode 100644
index 000000000000..e6d05ffa9022
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-cx9020.dts
@@ -0,0 +1,377 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * 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 "imx53.dtsi"
+
+#define MX53_PAD_EIM_D26__UART2_RXD_MUX    0x144 0x48c 0x880 0x2 0x0
+#define MX53_PAD_EIM_D27__UART2_TXD_MUX    0x148 0x490 0x000 0x2 0x0
+#define MX53_PAD_EIM_D28__UART2_RTS        0x14c 0x494 0x87c 0x2 0x0
+#define MX53_PAD_EIM_D29__UART2_CTS        0x150 0x498 0x000 0x2 0x0
+
+/ {
+	model = "Freescale i.MX53 based Beckhoff CX9020";
+	compatible = "fsl,imx53-qsb", "fsl,imx53";
+
+	chosen {
+		stdout-path = &uart2;
+	};
+
+	memory {
+		reg = <0x70000000 0x20000000>,
+		      <0xb0000000 0x20000000>;
+	};
+
+	ccat {
+		compatible = "bhf,emi-ccat";
+	};
+
+	display0: display@di0 {
+		#address-cells =<1>;
+		#size-cells = <0>;
+		compatible = "fsl,imx-parallel-display";
+		interface-pix-fmt = "rgb24";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu_disp0>;
+		status = "okay";
+
+		port@0 {
+			reg = <0>;
+			display0_in: endpoint {
+				remote-endpoint = <&ipu_di0_disp0>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			display0_out: endpoint {
+				remote-endpoint = <&panel_in>;
+			};
+		};
+	};
+
+	dvi_panel: display@0 {
+		#address-cells =<1>;
+		#size-cells = <0>;
+		compatible = "simple,ddc-only";
+		ddc-i2c-bus = <&i2c2>;
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&display0_out>;
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pwr_r {
+			gpios = <&gpio3 22 0>;
+			default-state = "off";
+		};
+		pwr_g {
+			gpios = <&gpio3 24 0>;
+			default-state = "on";
+		};
+		pwr_b {
+			gpios = <&gpio3 23 0>;
+			default-state = "off";
+		};
+	};
+
+	rtc: rtc@53fa4000 {
+		compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+		reg = <0x53fa4000 0x4000>;
+		interrupts = <24>;
+		interrupt-parent = <&tzic>;
+		clocks = <&clks IMX5_CLK_SRTC_GATE>;
+		clock-names = "ipg";
+	};
+
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg_3p2v: regulator@0 {
+			compatible = "regulator-fixed";
+			reg = <0>;
+			regulator-name = "3P2V";
+			regulator-min-microvolt = <3200000>;
+			regulator-max-microvolt = <3200000>;
+			regulator-always-on;
+		};
+
+		reg_usb_vbus: regulator@1 {
+			compatible = "regulator-fixed";
+			reg = <1>;
+			regulator-name = "usb_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			gpio = <&gpio7 8 0>;
+			enable-active-high;
+		};
+	};
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc1>;
+	cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&esdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc2>;
+	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&ipu_di0_disp0 {
+	remote-endpoint = <&display0_in>;
+};
+
+&ssi2 {
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	imx53-qsb {
+		pinctrl_hog: hoggrp {
+			fsl,pins = <
+				MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000
+				MX53_PAD_GPIO_8__GPIO1_8          0x80000000
+				MX53_PAD_PATA_DATA14__GPIO2_14    0x80000000
+				MX53_PAD_PATA_DATA15__GPIO2_15    0x80000000
+				MX53_PAD_GPIO_1__GPIO1_1          0x80000000
+				MX53_PAD_GPIO_4__GPIO1_4          0x80000000
+				MX53_PAD_PATA_DA_0__GPIO7_6       0x80000000
+				MX53_PAD_PATA_DA_2__GPIO7_8	  0x80000000
+				MX53_PAD_GPIO_16__GPIO7_11        0x80000000
+
+				MX53_PAD_EIM_OE__EMI_WEIM_OE            0x80000000
+				MX53_PAD_EIM_WAIT__EMI_WEIM_WAIT        0x80000000
+				MX53_PAD_EIM_LBA__EMI_WEIM_LBA          0x80000000
+				MX53_PAD_EIM_RW__EMI_WEIM_RW            0x80000000
+				MX53_PAD_EIM_EB0__EMI_WEIM_EB_0         0x80000000
+				MX53_PAD_EIM_EB1__EMI_WEIM_EB_1         0x80000000
+				MX53_PAD_EIM_EB2__EMI_WEIM_EB_2         0x80000000
+				MX53_PAD_EIM_EB3__EMI_WEIM_EB_3         0x80000000
+				MX53_PAD_EIM_CS0__EMI_WEIM_CS_0         0x80000000
+				MX53_PAD_EIM_CS1__EMI_WEIM_CS_1         0x80000000
+				MX53_PAD_EIM_A16__EMI_WEIM_A_16         0x80000000
+				MX53_PAD_EIM_A17__EMI_WEIM_A_17         0x80000000
+				MX53_PAD_EIM_A18__EMI_WEIM_A_18         0x80000000
+				MX53_PAD_EIM_A19__EMI_WEIM_A_19         0x80000000
+				MX53_PAD_EIM_A20__EMI_WEIM_A_20         0x80000000
+				MX53_PAD_EIM_A21__EMI_WEIM_A_21         0x80000000
+				MX53_PAD_EIM_A22__EMI_WEIM_A_22         0x80000000
+				MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0    0xa4
+				MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1    0xa4
+				MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2    0xa4
+				MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3    0xa4
+				MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4    0xa4
+				MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5    0xa4
+				MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6    0xa4
+				MX53_PAD_EIM_DA7__EMI_NAND_WEIM_DA_7    0xa4
+				MX53_PAD_EIM_DA8__EMI_NAND_WEIM_DA_8    0xa4
+				MX53_PAD_EIM_DA9__EMI_NAND_WEIM_DA_9    0xa4
+				MX53_PAD_EIM_DA10__EMI_NAND_WEIM_DA_10	0xa4
+				MX53_PAD_EIM_DA11__EMI_NAND_WEIM_DA_11  0xa4
+				MX53_PAD_EIM_DA12__EMI_NAND_WEIM_DA_12  0xa4
+				MX53_PAD_EIM_DA13__EMI_NAND_WEIM_DA_13  0xa4
+				MX53_PAD_EIM_DA14__EMI_NAND_WEIM_DA_14  0xa4
+				MX53_PAD_EIM_DA15__EMI_NAND_WEIM_DA_15  0xa4
+				MX53_PAD_PATA_DATA0__EMI_NANDF_D_0      0xa4
+				MX53_PAD_PATA_DATA1__EMI_NANDF_D_1      0xa4
+				MX53_PAD_PATA_DATA2__EMI_NANDF_D_2      0xa4
+				MX53_PAD_PATA_DATA3__EMI_NANDF_D_3      0xa4
+				MX53_PAD_PATA_DATA4__EMI_NANDF_D_4      0xa4
+				MX53_PAD_PATA_DATA5__EMI_NANDF_D_5      0xa4
+				MX53_PAD_PATA_DATA6__EMI_NANDF_D_6      0xa4
+				MX53_PAD_PATA_DATA7__EMI_NANDF_D_7      0xa4
+				MX53_PAD_PATA_DATA8__EMI_NANDF_D_8      0xa4
+				MX53_PAD_PATA_DATA9__EMI_NANDF_D_9      0xa4
+				MX53_PAD_PATA_DATA10__EMI_NANDF_D_10    0xa4
+				MX53_PAD_PATA_DATA11__EMI_NANDF_D_11    0xa4
+				MX53_PAD_PATA_DATA12__EMI_NANDF_D_12    0xa4
+				MX53_PAD_PATA_DATA13__EMI_NANDF_D_13    0xa4
+				MX53_PAD_PATA_DATA14__EMI_NANDF_D_14    0xa4
+				MX53_PAD_PATA_DATA15__EMI_NANDF_D_15    0xa4
+				MX53_PAD_NANDF_CLE__GPIO6_7             0x00000001
+				MX53_PAD_NANDF_WP_B__GPIO6_9            0x00000001
+				MX53_PAD_NANDF_ALE__GPIO6_8             0x00000001
+			>;
+		};
+
+		led_pin_gpio3_23: led_gpio3_23@0 {
+			fsl,pins = <
+				MX53_PAD_EIM_D23__GPIO3_23 0x80000000
+			>;
+		};
+
+		pinctrl_audmux: audmuxgrp {
+			fsl,pins = <
+				MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC	0x80000000
+				MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD	0x80000000
+				MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS	0x80000000
+				MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD	0x80000000
+			>;
+		};
+
+		pinctrl_esdhc1: esdhc1grp {
+			fsl,pins = <
+				MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1d5
+				MX53_PAD_SD1_DATA1__ESDHC1_DAT1		0x1d5
+				MX53_PAD_SD1_DATA2__ESDHC1_DAT2		0x1d5
+				MX53_PAD_SD1_DATA3__ESDHC1_DAT3		0x1d5
+				MX53_PAD_SD1_CMD__ESDHC1_CMD		0x1d5
+				MX53_PAD_SD1_CLK__ESDHC1_CLK		0x1d5
+			>;
+		};
+
+		pinctrl_esdhc2: esdhc2grp {
+			fsl,pins = <
+				MX53_PAD_SD2_DATA0__ESDHC2_DAT0		0x1d5
+				MX53_PAD_SD2_DATA1__ESDHC2_DAT1		0x1d5
+				MX53_PAD_SD2_DATA2__ESDHC2_DAT2		0x1d5
+				MX53_PAD_SD2_DATA3__ESDHC2_DAT3		0x1d5
+				MX53_PAD_SD2_CMD__ESDHC2_CMD		0x1d5
+				MX53_PAD_SD2_CLK__ESDHC2_CLK		0x1d5
+			>;
+		};
+
+		pinctrl_fec: fecgrp {
+			fsl,pins = <
+				MX53_PAD_FEC_MDC__FEC_MDC		0x80000000
+				MX53_PAD_FEC_MDIO__FEC_MDIO		0x80000000
+				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x80000000
+				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x80000000
+				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x80000000
+				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x80000000
+				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x80000000
+				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x80000000
+				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x80000000
+				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x80000000
+			>;
+		};
+
+		/* open drain */
+		pinctrl_i2c1: i2c1grp {
+			fsl,pins = <
+				MX53_PAD_CSI0_DAT8__I2C1_SDA		0x400001ec
+				MX53_PAD_CSI0_DAT9__I2C1_SCL		0x400001ec
+			>;
+		};
+
+		pinctrl_i2c2: i2c2grp {
+			fsl,pins = <
+				MX53_PAD_KEY_ROW3__I2C2_SDA             0xc0000000
+				MX53_PAD_KEY_COL3__I2C2_SCL             0xc0000000
+			>;
+		};
+
+		pinctrl_ipu_disp0: ipudisp0grp {
+			fsl,pins = <
+				MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK	0x5
+				MX53_PAD_DI0_PIN15__IPU_DI0_PIN15	0x5
+				MX53_PAD_DI0_PIN2__IPU_DI0_PIN2		0x5
+				MX53_PAD_DI0_PIN3__IPU_DI0_PIN3		0x5
+				MX53_PAD_DI0_PIN4__IPU_DI0_PIN4		0x5
+				MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0	0x5
+				MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1	0x5
+				MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2	0x5
+				MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3	0x5
+				MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4	0x5
+				MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5	0x5
+				MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6	0x5
+				MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7	0x5
+				MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8	0x5
+				MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9	0x5
+				MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10	0x5
+				MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11	0x5
+				MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12	0x5
+				MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13	0x5
+				MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14	0x5
+				MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15	0x5
+				MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16	0x5
+				MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17	0x5
+				MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18	0x5
+				MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19	0x5
+				MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20	0x5
+				MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21	0x5
+				MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22	0x5
+				MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23	0x5
+			>;
+		};
+
+		pinctrl_uart2: uart2grp {
+			fsl,pins = <
+				MX53_PAD_EIM_D26__UART2_RXD_MUX	0x1e4
+				MX53_PAD_EIM_D27__UART2_TXD_MUX 0x1e4
+				MX53_PAD_EIM_D28__UART2_RTS 0x1e4
+				MX53_PAD_EIM_D29__UART2_CTS 0x1e4
+			>;
+		};
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+};
+
+&audmux {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_audmux>;
+	status = "okay";
+};
+
+&fec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec>;
+	phy-mode = "rmii";
+	phy-reset-gpios = <&gpio7 6 0>;
+	status = "okay";
+};
+
+&sata {
+	status = "okay";
+};
+
+&vpu {
+	status = "okay";
+};
+
+&usbh1 {
+	vbus-supply = <&reg_usb_vbus>;
+	phy_type = "utmi";
+	status = "okay";
+};
+
+&usbotg {
+	dr_mode = "peripheral";
+	status = "okay";
+};
-- 
2.11.0

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

* Re: [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-12  9:04 [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
@ 2017-07-12  9:46 ` Mark Rutland
  2017-07-12 11:46   ` Patrick Brünn
  2017-07-12 14:42 ` Andrew Lunn
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Mark Rutland @ 2017-07-12  9:46 UTC (permalink / raw)
  To: linux-kernel-dev
  Cc: robh+dt, shawnguo, kernel, linux, fabio.estevam,
	linux-arm-kernel, devicetree, linux-kernel, Patrick Brünn

Hi,

On Wed, Jul 12, 2017 at 11:04:08AM +0200, linux-kernel-dev@beckhoff.com wrote:
> +/dts-v1/;
> +#include "imx53.dtsi"
> +
> +#define MX53_PAD_EIM_D26__UART2_RXD_MUX    0x144 0x48c 0x880 0x2 0x0
> +#define MX53_PAD_EIM_D27__UART2_TXD_MUX    0x148 0x490 0x000 0x2 0x0
> +#define MX53_PAD_EIM_D28__UART2_RTS        0x14c 0x494 0x87c 0x2 0x0
> +#define MX53_PAD_EIM_D29__UART2_CTS        0x150 0x498 0x000 0x2 0x0
> +
> +/ {
> +	model = "Freescale i.MX53 based Beckhoff CX9020";
> +	compatible = "fsl,imx53-qsb", "fsl,imx53";
> +
> +	chosen {
> +		stdout-path = &uart2;

No baud-rate or bits configuration?

> +	};
> +
> +	memory {
> +		reg = <0x70000000 0x20000000>,
> +		      <0xb0000000 0x20000000>;
> +	};
> +
> +	ccat {
> +		compatible = "bhf,emi-ccat";
> +	};
> +
> +	display0: display@di0 {

This unit-address (the bit after the @) isn't valid, as that should
match a reg or ranges, but this node has neither.

Just call this display-0.

> +		#address-cells =<1>;
> +		#size-cells = <0>;
> +		compatible = "fsl,imx-parallel-display";
> +		interface-pix-fmt = "rgb24";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_ipu_disp0>;
> +		status = "okay";
> +
> +		port@0 {
> +			reg = <0>;
> +			display0_in: endpoint {
> +				remote-endpoint = <&ipu_di0_disp0>;
> +			};
> +		};
> +
> +		port@1 {
> +			reg = <1>;
> +			display0_out: endpoint {
> +				remote-endpoint = <&panel_in>;
> +			};
> +		};
> +	};
> +
> +	dvi_panel: display@0 {

Likewise you have no reg here, so the unit address isn't valid.

Surely panel-0?

> +		#address-cells =<1>;
> +		#size-cells = <0>;
> +		compatible = "simple,ddc-only";

I don't see that compatible string in my Linux tree, and it doesn't make
sense to me -- "simple" isn't a vendor-prefix.

Where has this come from?

> +		ddc-i2c-bus = <&i2c2>;
> +
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&display0_out>;
> +			};
> +		};
> +	};

[...]

> +	regulators {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		reg_3p2v: regulator@0 {
> +			compatible = "regulator-fixed";
> +			reg = <0>;

Meaningless reg entry.

> +			regulator-name = "3P2V";
> +			regulator-min-microvolt = <3200000>;
> +			regulator-max-microvolt = <3200000>;
> +			regulator-always-on;
> +		};
> +
> +		reg_usb_vbus: regulator@1 {
> +			compatible = "regulator-fixed";
> +			reg = <1>;

Likewise.

> +			regulator-name = "usb_vbus";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			gpio = <&gpio7 8 0>;
> +			enable-active-high;
> +		};
> +	};

There's no need for a simple-bus here. It doesn't represent HW, and you
can nothing. You can put these directly under the root node, without a
synthetic reg or unnecessary container:

	reg_3p2v: regulator-3p2v {
		compatible = "regulator-fixed";
		regulator-name = "3P2V";
		regulator-min-microvolt = <3200000>;
		regulator-max-microvolt = <3200000>;
		regulator-always-on;
	};

	reg_usb_vbus: regulator-usb-vbus {
		compatible = "regulator-fixed";
		regulator-name = "usb_vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&gpio7 8 0>;
		enable-active-high;
	}

Otherwise, looks fine to me.

Thanks,
Mark.

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

* RE: [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-12  9:46 ` Mark Rutland
@ 2017-07-12 11:46   ` Patrick Brünn
  0 siblings, 0 replies; 19+ messages in thread
From: Patrick Brünn @ 2017-07-12 11:46 UTC (permalink / raw)
  To: Mark Rutland, linux-kernel-dev
  Cc: robh+dt, shawnguo, kernel, linux, fabio.estevam,
	linux-arm-kernel, devicetree, linux-kernel


Hi Mark,
Thanks, for the fast feedback.

>From: Mark Rutland [mailto:mark.rutland@arm.com]
>Sent: Mittwoch, 12. Juli 2017 11:47
>> +/ {
>> +    model = "Freescale i.MX53 based Beckhoff CX9020";
>> +    compatible = "fsl,imx53-qsb", "fsl,imx53";
>> +
>> +    chosen {
>> +            stdout-path = &uart2;
>
>No baud-rate or bits configuration?

The default config from imx53.dtsi works fine for us.

>> +    ccat {
>> +            compatible = "bhf,emi-ccat";
>> +    };
>> +
>> +    display0: display@di0 {
>
>This unit-address (the bit after the @) isn't valid, as that should
>match a reg or ranges, but this node has neither.
>
>Just call this display-0.
>
Okay, I will fix this

>> +            #address-cells =<1>;
>> +            #size-cells = <0>;
>> +            compatible = "fsl,imx-parallel-display";
>> +            interface-pix-fmt = "rgb24";
>> +            pinctrl-names = "default";
>> +            pinctrl-0 = <&pinctrl_ipu_disp0>;
>> +            status = "okay";
>> +
>> +            port@0 {
>> +                    reg = <0>;
>> +                    display0_in: endpoint {
>> +                            remote-endpoint = <&ipu_di0_disp0>;
>> +                    };
>> +            };
>> +
>> +            port@1 {
>> +                    reg = <1>;
>> +                    display0_out: endpoint {
>> +                            remote-endpoint = <&panel_in>;
>> +                    };
>> +            };
>> +    };
>> +
>> +    dvi_panel: display@0 {
>
>Likewise you have no reg here, so the unit address isn't valid.
>
>Surely panel-0?
>
Okay, I will have a closer look, too.

>> +            #address-cells =<1>;
>> +            #size-cells = <0>;
>> +            compatible = "simple,ddc-only";
>
>I don't see that compatible string in my Linux tree, and it doesn't make
>sense to me -- "simple" isn't a vendor-prefix.
>
>Where has this come from?
>
Out-of-tree, sorry. Our device has a DVI connector bound to the imx
parallel interface. So my idea was to reuse the panel-simple driver and
add a very simple panel with only ddc options.
Unfortunately, I was too shy to post that upstream[1].
Is there a more elegant solution? Or should I remove all display related
nodes from imx53-cx9020.dts?

>> +            ddc-i2c-bus = <&i2c2>;
>> +
>> +            port {
>> +                    panel_in: endpoint {
>> +                            remote-endpoint = <&display0_out>;
>> +                    };
>> +            };
>> +    };
>
>[...]
>
>> +    regulators {
>> +            compatible = "simple-bus";
>> +            #address-cells = <1>;
>> +            #size-cells = <0>;
>> +
>> +            reg_3p2v: regulator@0 {
>> +                    compatible = "regulator-fixed";
>> +                    reg = <0>;
>
>Meaningless reg entry.
>
Okay, I will remove this.
>> +                    regulator-name = "3P2V";
>> +                    regulator-min-microvolt = <3200000>;
>> +                    regulator-max-microvolt = <3200000>;
>> +                    regulator-always-on;
>> +            };
>> +
>> +            reg_usb_vbus: regulator@1 {
>> +                    compatible = "regulator-fixed";
>> +                    reg = <1>;
>
>Likewise.
>
this, too.
>> +                    regulator-name = "usb_vbus";
>> +                    regulator-min-microvolt = <5000000>;
>> +                    regulator-max-microvolt = <5000000>;
>> +                    gpio = <&gpio7 8 0>;
>> +                    enable-active-high;
>> +            };
>> +    };
>
>There's no need for a simple-bus here. It doesn't represent HW, and you
>can nothing. You can put these directly under the root node, without a
>synthetic reg or unnecessary container:
>
>       reg_3p2v: regulator-3p2v {
>               compatible = "regulator-fixed";
>               regulator-name = "3P2V";
>               regulator-min-microvolt = <3200000>;
>               regulator-max-microvolt = <3200000>;
>               regulator-always-on;
>       };
>
>       reg_usb_vbus: regulator-usb-vbus {
>               compatible = "regulator-fixed";
>               regulator-name = "usb_vbus";
>               regulator-min-microvolt = <5000000>;
>               regulator-max-microvolt = <5000000>;
>               gpio = <&gpio7 8 0>;
>               enable-active-high;
>       }
>
Thanks, I will send a v2 with your simplified version. As soon as I get the display/
panel thing right.

>Otherwise, looks fine to me.
>
>Thanks,
>Mark.

[1] https://github.com/Beckhoff/CX9020/blob/master/kernel-patches/0003-drm-panel-simple-Add-support-for-ddc-only-panel.patch
Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075

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

* Re: [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-12  9:04 [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
  2017-07-12  9:46 ` Mark Rutland
@ 2017-07-12 14:42 ` Andrew Lunn
  2017-07-13  3:00   ` Patrick Brünn
  2017-07-13 11:04 ` [PATCH v2 0/2] Add CX9020 " linux-kernel-dev
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Andrew Lunn @ 2017-07-12 14:42 UTC (permalink / raw)
  To: linux-kernel-dev
  Cc: robh+dt, mark.rutland, devicetree, Patrick Brünn, linux,
	linux-kernel, kernel, fabio.estevam, shawnguo, linux-arm-kernel

On Wed, Jul 12, 2017 at 11:04:08AM +0200, linux-kernel-dev@beckhoff.com wrote:
> From: Patrick Brünn <p.bruenn@beckhoff.com>
> 
> The CX9020 differs from i.MX53 Quick Start Board by:
> - use uart2 instead of uart1
> - DVI-D connector instead of VGA
> - no audio
> - CCAT FPGA connected to emi
> - enable rtc
> 
> Signed-off-by: Patrick Brünn <p.bruenn@beckhoff.com>
> ---
>  arch/arm/boot/dts/Makefile         |   1 +
>  arch/arm/boot/dts/imx53-cx9020.dts | 377 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 378 insertions(+)
>  create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 9c5e1d944d1c..ea60698f9783 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX53) += \
>  	imx53-ard.dtb \
>  	imx53-m53evk.dtb \
>  	imx53-mba53.dtb \
> +	imx53-cx9020.dtb \
>  	imx53-qsb.dtb \
>  	imx53-qsrb.dtb \
>  	imx53-smd.dtb \

Hi Patrick

It appears this list is in alphabetic order...

   Andrew

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

* RE: [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-12 14:42 ` Andrew Lunn
@ 2017-07-13  3:00   ` Patrick Brünn
  0 siblings, 0 replies; 19+ messages in thread
From: Patrick Brünn @ 2017-07-13  3:00 UTC (permalink / raw)
  To: Andrew Lunn, linux-kernel-dev
  Cc: robh+dt, mark.rutland, devicetree, linux, linux-kernel, kernel,
	fabio.estevam, shawnguo, linux-arm-kernel

>From: Andrew Lunn [mailto:andrew@lunn.ch]
>Sent: Mittwoch, 12. Juli 2017 16:43
>
>On Wed, Jul 12, 2017 at 11:04:08AM +0200, linux-kernel-dev@beckhoff.com
>wrote:
>> From: Patrick Brünn <p.bruenn@beckhoff.com>
>>
>> The CX9020 differs from i.MX53 Quick Start Board by:
>> - use uart2 instead of uart1
>> - DVI-D connector instead of VGA
>> - no audio
>> - CCAT FPGA connected to emi
>> - enable rtc
>>
>> Signed-off-by: Patrick Brünn <p.bruenn@beckhoff.com>
>> ---
>>  arch/arm/boot/dts/Makefile         |   1 +
>>  arch/arm/boot/dts/imx53-cx9020.dts | 377
>+++++++++++++++++++++++++++++++++++++
>>  2 files changed, 378 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 9c5e1d944d1c..ea60698f9783 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX53) += \
>>      imx53-ard.dtb \
>>      imx53-m53evk.dtb \
>>      imx53-mba53.dtb \
>> +    imx53-cx9020.dtb \
>>      imx53-qsb.dtb \
>>      imx53-qsrb.dtb \
>>      imx53-smd.dtb \
>
>Hi Patrick
>
>It appears this list is in alphabetic order...
>
Ops, thanks for the hint, will fix this with the next version.
Patrick

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075

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

* [PATCH v2 0/2] Add CX9020 device tree
  2017-07-12  9:04 [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
  2017-07-12  9:46 ` Mark Rutland
  2017-07-12 14:42 ` Andrew Lunn
@ 2017-07-13 11:04 ` linux-kernel-dev
  2017-07-13 11:04   ` [PATCH v2 1/2] ARM: dts: imx: add CX9020 Embedded PC " linux-kernel-dev
  2017-07-13 11:04   ` [PATCH v2 2/2] drm/panel: simple: Add support for ddc-only panel linux-kernel-dev
  2017-07-13 11:13 ` [PATCH v3 0/2] Add CX9020 device tree linux-kernel-dev
       [not found] ` <20170721040640.31424-1-linux-kernel-dev@beckhoff.com>
  4 siblings, 2 replies; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-13 11:04 UTC (permalink / raw)
  To: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:DRM PANEL DRIVERS
  Cc: Patrick Bruenn, Rob Herring, Mark Rutland, Russell King,
	Shawn Guo, Sascha Hauer, Thierry Reding, David Airlie,
	Fabio Estevam, moderated list:ARM PORT, open list

From: Patrick Bruenn <p.bruenn@beckhoff.com>

Add device tree for Beckhoff CX9020 Embedded PC.

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc

Patrick Bruenn (2):
  ARM: dts: imx: add CX9020 Embedded PC device tree
  drm/panel: simple: Add support for ddc-only panel

 arch/arm/boot/dts/Makefile           |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts   | 370 +++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c |   6 +
 3 files changed, 377 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

-- 
2.11.0

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

* [PATCH v2 1/2] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-13 11:04 ` [PATCH v2 0/2] Add CX9020 " linux-kernel-dev
@ 2017-07-13 11:04   ` linux-kernel-dev
  2017-07-13 11:04   ` [PATCH v2 2/2] drm/panel: simple: Add support for ddc-only panel linux-kernel-dev
  1 sibling, 0 replies; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-13 11:04 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Shawn Guo, Sascha Hauer,
	Fabio Estevam,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, open list
  Cc: Patrick Bruenn

From: Patrick Bruenn <p.bruenn@beckhoff.com>

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
---
 arch/arm/boot/dts/Makefile         |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts | 370 +++++++++++++++++++++++++++++++++++++
 2 files changed, 371 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 9c5e1d944d1c..590cdb77d972 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -338,6 +338,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-ts4800.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
 	imx53-ard.dtb \
+	imx53-cx9020.dtb \
 	imx53-m53evk.dtb \
 	imx53-mba53.dtb \
 	imx53-qsb.dtb \
diff --git a/arch/arm/boot/dts/imx53-cx9020.dts b/arch/arm/boot/dts/imx53-cx9020.dts
new file mode 100644
index 000000000000..0c3de61a5f4f
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-cx9020.dts
@@ -0,0 +1,370 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * 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 "imx53.dtsi"
+
+#define MX53_PAD_EIM_D26__UART2_RXD_MUX    0x144 0x48c 0x880 0x2 0x0
+#define MX53_PAD_EIM_D27__UART2_TXD_MUX    0x148 0x490 0x000 0x2 0x0
+#define MX53_PAD_EIM_D28__UART2_RTS        0x14c 0x494 0x87c 0x2 0x0
+#define MX53_PAD_EIM_D29__UART2_CTS        0x150 0x498 0x000 0x2 0x0
+
+/ {
+	model = "Freescale i.MX53 based Beckhoff CX9020";
+	compatible = "fsl,imx53-qsb", "fsl,imx53";
+
+	chosen {
+		stdout-path = &uart2;
+	};
+
+	memory {
+		reg = <0x70000000 0x20000000>,
+		      <0xb0000000 0x20000000>;
+	};
+
+	ccat {
+		compatible = "bhf,emi-ccat";
+	};
+
+	display-0 {
+		#address-cells =<1>;
+		#size-cells = <0>;
+		compatible = "fsl,imx-parallel-display";
+		interface-pix-fmt = "rgb24";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu_disp0>;
+		status = "okay";
+
+		port@0 {
+			reg = <0>;
+			display0_in: endpoint {
+				remote-endpoint = <&ipu_di0_disp0>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			display0_out: endpoint {
+				remote-endpoint = <&panel_in>;
+			};
+		};
+	};
+
+	panel-0 {
+		#address-cells =<1>;
+		#size-cells = <0>;
+		compatible = "simple,ddc-only";
+		ddc-i2c-bus = <&i2c2>;
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&display0_out>;
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pwr_r {
+			gpios = <&gpio3 22 0>;
+			default-state = "off";
+		};
+		pwr_g {
+			gpios = <&gpio3 24 0>;
+			default-state = "on";
+		};
+		pwr_b {
+			gpios = <&gpio3 23 0>;
+			default-state = "off";
+		};
+	};
+
+	rtc: rtc@53fa4000 {
+		compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+		reg = <0x53fa4000 0x4000>;
+		interrupts = <24>;
+		interrupt-parent = <&tzic>;
+		clocks = <&clks IMX5_CLK_SRTC_GATE>;
+		clock-names = "ipg";
+	};
+
+	reg_3p2v: regulator@0 {
+		compatible = "regulator-fixed";
+		regulator-name = "3P2V";
+		regulator-min-microvolt = <3200000>;
+		regulator-max-microvolt = <3200000>;
+		regulator-always-on;
+	};
+
+	reg_usb_vbus: regulator@1 {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio7 8 0>;
+		enable-active-high;
+	};
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc1>;
+	cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&esdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc2>;
+	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&ipu_di0_disp0 {
+	remote-endpoint = <&display0_in>;
+};
+
+&ssi2 {
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	imx53-qsb {
+		pinctrl_hog: hoggrp {
+			fsl,pins = <
+				MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000
+				MX53_PAD_GPIO_8__GPIO1_8          0x80000000
+				MX53_PAD_PATA_DATA14__GPIO2_14    0x80000000
+				MX53_PAD_PATA_DATA15__GPIO2_15    0x80000000
+				MX53_PAD_GPIO_1__GPIO1_1          0x80000000
+				MX53_PAD_GPIO_4__GPIO1_4          0x80000000
+				MX53_PAD_PATA_DA_0__GPIO7_6       0x80000000
+				MX53_PAD_PATA_DA_2__GPIO7_8	  0x80000000
+				MX53_PAD_GPIO_16__GPIO7_11        0x80000000
+
+				MX53_PAD_EIM_OE__EMI_WEIM_OE            0x80000000
+				MX53_PAD_EIM_WAIT__EMI_WEIM_WAIT        0x80000000
+				MX53_PAD_EIM_LBA__EMI_WEIM_LBA          0x80000000
+				MX53_PAD_EIM_RW__EMI_WEIM_RW            0x80000000
+				MX53_PAD_EIM_EB0__EMI_WEIM_EB_0         0x80000000
+				MX53_PAD_EIM_EB1__EMI_WEIM_EB_1         0x80000000
+				MX53_PAD_EIM_EB2__EMI_WEIM_EB_2         0x80000000
+				MX53_PAD_EIM_EB3__EMI_WEIM_EB_3         0x80000000
+				MX53_PAD_EIM_CS0__EMI_WEIM_CS_0         0x80000000
+				MX53_PAD_EIM_CS1__EMI_WEIM_CS_1         0x80000000
+				MX53_PAD_EIM_A16__EMI_WEIM_A_16         0x80000000
+				MX53_PAD_EIM_A17__EMI_WEIM_A_17         0x80000000
+				MX53_PAD_EIM_A18__EMI_WEIM_A_18         0x80000000
+				MX53_PAD_EIM_A19__EMI_WEIM_A_19         0x80000000
+				MX53_PAD_EIM_A20__EMI_WEIM_A_20         0x80000000
+				MX53_PAD_EIM_A21__EMI_WEIM_A_21         0x80000000
+				MX53_PAD_EIM_A22__EMI_WEIM_A_22         0x80000000
+				MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0    0xa4
+				MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1    0xa4
+				MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2    0xa4
+				MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3    0xa4
+				MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4    0xa4
+				MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5    0xa4
+				MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6    0xa4
+				MX53_PAD_EIM_DA7__EMI_NAND_WEIM_DA_7    0xa4
+				MX53_PAD_EIM_DA8__EMI_NAND_WEIM_DA_8    0xa4
+				MX53_PAD_EIM_DA9__EMI_NAND_WEIM_DA_9    0xa4
+				MX53_PAD_EIM_DA10__EMI_NAND_WEIM_DA_10	0xa4
+				MX53_PAD_EIM_DA11__EMI_NAND_WEIM_DA_11  0xa4
+				MX53_PAD_EIM_DA12__EMI_NAND_WEIM_DA_12  0xa4
+				MX53_PAD_EIM_DA13__EMI_NAND_WEIM_DA_13  0xa4
+				MX53_PAD_EIM_DA14__EMI_NAND_WEIM_DA_14  0xa4
+				MX53_PAD_EIM_DA15__EMI_NAND_WEIM_DA_15  0xa4
+				MX53_PAD_PATA_DATA0__EMI_NANDF_D_0      0xa4
+				MX53_PAD_PATA_DATA1__EMI_NANDF_D_1      0xa4
+				MX53_PAD_PATA_DATA2__EMI_NANDF_D_2      0xa4
+				MX53_PAD_PATA_DATA3__EMI_NANDF_D_3      0xa4
+				MX53_PAD_PATA_DATA4__EMI_NANDF_D_4      0xa4
+				MX53_PAD_PATA_DATA5__EMI_NANDF_D_5      0xa4
+				MX53_PAD_PATA_DATA6__EMI_NANDF_D_6      0xa4
+				MX53_PAD_PATA_DATA7__EMI_NANDF_D_7      0xa4
+				MX53_PAD_PATA_DATA8__EMI_NANDF_D_8      0xa4
+				MX53_PAD_PATA_DATA9__EMI_NANDF_D_9      0xa4
+				MX53_PAD_PATA_DATA10__EMI_NANDF_D_10    0xa4
+				MX53_PAD_PATA_DATA11__EMI_NANDF_D_11    0xa4
+				MX53_PAD_PATA_DATA12__EMI_NANDF_D_12    0xa4
+				MX53_PAD_PATA_DATA13__EMI_NANDF_D_13    0xa4
+				MX53_PAD_PATA_DATA14__EMI_NANDF_D_14    0xa4
+				MX53_PAD_PATA_DATA15__EMI_NANDF_D_15    0xa4
+				MX53_PAD_NANDF_CLE__GPIO6_7             0x00000001
+				MX53_PAD_NANDF_WP_B__GPIO6_9            0x00000001
+				MX53_PAD_NANDF_ALE__GPIO6_8             0x00000001
+			>;
+		};
+
+		led_pin_gpio3_23: led_gpio3_23@0 {
+			fsl,pins = <
+				MX53_PAD_EIM_D23__GPIO3_23 0x80000000
+			>;
+		};
+
+		pinctrl_audmux: audmuxgrp {
+			fsl,pins = <
+				MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC	0x80000000
+				MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD	0x80000000
+				MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS	0x80000000
+				MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD	0x80000000
+			>;
+		};
+
+		pinctrl_esdhc1: esdhc1grp {
+			fsl,pins = <
+				MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1d5
+				MX53_PAD_SD1_DATA1__ESDHC1_DAT1		0x1d5
+				MX53_PAD_SD1_DATA2__ESDHC1_DAT2		0x1d5
+				MX53_PAD_SD1_DATA3__ESDHC1_DAT3		0x1d5
+				MX53_PAD_SD1_CMD__ESDHC1_CMD		0x1d5
+				MX53_PAD_SD1_CLK__ESDHC1_CLK		0x1d5
+			>;
+		};
+
+		pinctrl_esdhc2: esdhc2grp {
+			fsl,pins = <
+				MX53_PAD_SD2_DATA0__ESDHC2_DAT0		0x1d5
+				MX53_PAD_SD2_DATA1__ESDHC2_DAT1		0x1d5
+				MX53_PAD_SD2_DATA2__ESDHC2_DAT2		0x1d5
+				MX53_PAD_SD2_DATA3__ESDHC2_DAT3		0x1d5
+				MX53_PAD_SD2_CMD__ESDHC2_CMD		0x1d5
+				MX53_PAD_SD2_CLK__ESDHC2_CLK		0x1d5
+			>;
+		};
+
+		pinctrl_fec: fecgrp {
+			fsl,pins = <
+				MX53_PAD_FEC_MDC__FEC_MDC		0x80000000
+				MX53_PAD_FEC_MDIO__FEC_MDIO		0x80000000
+				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x80000000
+				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x80000000
+				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x80000000
+				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x80000000
+				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x80000000
+				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x80000000
+				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x80000000
+				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x80000000
+			>;
+		};
+
+		/* open drain */
+		pinctrl_i2c1: i2c1grp {
+			fsl,pins = <
+				MX53_PAD_CSI0_DAT8__I2C1_SDA		0x400001ec
+				MX53_PAD_CSI0_DAT9__I2C1_SCL		0x400001ec
+			>;
+		};
+
+		pinctrl_i2c2: i2c2grp {
+			fsl,pins = <
+				MX53_PAD_KEY_ROW3__I2C2_SDA             0xc0000000
+				MX53_PAD_KEY_COL3__I2C2_SCL             0xc0000000
+			>;
+		};
+
+		pinctrl_ipu_disp0: ipudisp0grp {
+			fsl,pins = <
+				MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK	0x5
+				MX53_PAD_DI0_PIN15__IPU_DI0_PIN15	0x5
+				MX53_PAD_DI0_PIN2__IPU_DI0_PIN2		0x5
+				MX53_PAD_DI0_PIN3__IPU_DI0_PIN3		0x5
+				MX53_PAD_DI0_PIN4__IPU_DI0_PIN4		0x5
+				MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0	0x5
+				MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1	0x5
+				MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2	0x5
+				MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3	0x5
+				MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4	0x5
+				MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5	0x5
+				MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6	0x5
+				MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7	0x5
+				MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8	0x5
+				MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9	0x5
+				MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10	0x5
+				MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11	0x5
+				MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12	0x5
+				MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13	0x5
+				MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14	0x5
+				MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15	0x5
+				MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16	0x5
+				MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17	0x5
+				MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18	0x5
+				MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19	0x5
+				MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20	0x5
+				MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21	0x5
+				MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22	0x5
+				MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23	0x5
+			>;
+		};
+
+		pinctrl_uart2: uart2grp {
+			fsl,pins = <
+				MX53_PAD_EIM_D26__UART2_RXD_MUX	0x1e4
+				MX53_PAD_EIM_D27__UART2_TXD_MUX 0x1e4
+				MX53_PAD_EIM_D28__UART2_RTS 0x1e4
+				MX53_PAD_EIM_D29__UART2_CTS 0x1e4
+			>;
+		};
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	fsl,dte-mode;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+};
+
+&audmux {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_audmux>;
+	status = "okay";
+};
+
+&fec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec>;
+	phy-mode = "rmii";
+	phy-reset-gpios = <&gpio7 6 0>;
+	status = "okay";
+};
+
+&sata {
+	status = "okay";
+};
+
+&vpu {
+	status = "okay";
+};
+
+&usbh1 {
+	vbus-supply = <&reg_usb_vbus>;
+	phy_type = "utmi";
+	status = "okay";
+};
+
+&usbotg {
+	dr_mode = "peripheral";
+	status = "okay";
+};
-- 
2.11.0

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

* [PATCH v2 2/2] drm/panel: simple: Add support for ddc-only panel
  2017-07-13 11:04 ` [PATCH v2 0/2] Add CX9020 " linux-kernel-dev
  2017-07-13 11:04   ` [PATCH v2 1/2] ARM: dts: imx: add CX9020 Embedded PC " linux-kernel-dev
@ 2017-07-13 11:04   ` linux-kernel-dev
  2017-07-14 14:15     ` Rob Herring
  1 sibling, 1 reply; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-13 11:04 UTC (permalink / raw)
  To: Thierry Reding, David Airlie, open list:DRM PANEL DRIVERS, open list
  Cc: Patrick Bruenn

From: Patrick Bruenn <p.bruenn@beckhoff.com>

This is a fix for the CX9020 Embedded PC. On that device the 24-bit
parallel-display signal of the imx53 is combined with an I2C channel
and converted to DVI-D port. Devicetree magic always requires a panel
connected to the parallel-display port.
We add an empty panel_desc, to get recognized by the panel-simple
driver, which can then use the ddc bus to read the panels configuration.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index c4566ce8fda7..52b2a7fb59ed 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1856,6 +1856,9 @@ static const struct panel_desc winstar_wf35ltiacd = {
 	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 };
 
+static const struct panel_desc simple_ddc_only = {
+};
+
 static const struct of_device_id platform_of_match[] = {
 	{
 		.compatible = "ampire,am-480272h3tmqw-t01h",
@@ -2050,6 +2053,9 @@ static const struct of_device_id platform_of_match[] = {
 		.compatible = "winstar,wf35ltiacd",
 		.data = &winstar_wf35ltiacd,
 	}, {
+		.compatible = "simple,ddc-only",
+		.data = &simple_ddc_only,
+	}, {
 		/* sentinel */
 	}
 };
-- 
2.11.0

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

* [PATCH v3 0/2] Add CX9020 device tree
  2017-07-12  9:04 [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
                   ` (2 preceding siblings ...)
  2017-07-13 11:04 ` [PATCH v2 0/2] Add CX9020 " linux-kernel-dev
@ 2017-07-13 11:13 ` linux-kernel-dev
  2017-07-13 11:13   ` [PATCH v3 1/2] ARM: dts: imx: add CX9020 Embedded PC " linux-kernel-dev
  2017-07-13 11:13   ` [PATCH v3 2/2] drm/panel: simple: Add support for ddc-only panel linux-kernel-dev
       [not found] ` <20170721040640.31424-1-linux-kernel-dev@beckhoff.com>
  4 siblings, 2 replies; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-13 11:13 UTC (permalink / raw)
  To: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:DRM PANEL DRIVERS
  Cc: Patrick Bruenn, Rob Herring, Mark Rutland, Russell King,
	Shawn Guo, Sascha Hauer, Thierry Reding, David Airlie,
	Fabio Estevam, moderated list:ARM PORT, open list

From: Patrick Bruenn <p.bruenn@beckhoff.com>

Add device tree for Beckhoff CX9020 Embedded PC.

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc

v3: add missing changelog, sorry about the noise
v2:
- include simple ddc-only panel patch
- keep alphabetic order of dts/Makefile
- configure uart2 with 'fsl,dte-mode'
- use display-0 and panel-0 as node names
- remove unnecessary "simple-bus" for fixed regulators


Patrick Bruenn (2):
  ARM: dts: imx: add CX9020 Embedded PC device tree
  drm/panel: simple: Add support for ddc-only panel

 arch/arm/boot/dts/Makefile           |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts   | 370 +++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c |   6 +
 3 files changed, 377 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

-- 
2.11.0

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

* [PATCH v3 1/2] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-13 11:13 ` [PATCH v3 0/2] Add CX9020 device tree linux-kernel-dev
@ 2017-07-13 11:13   ` linux-kernel-dev
  2017-07-14  2:16     ` Shawn Guo
  2017-07-13 11:13   ` [PATCH v3 2/2] drm/panel: simple: Add support for ddc-only panel linux-kernel-dev
  1 sibling, 1 reply; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-13 11:13 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Shawn Guo, Sascha Hauer,
	Fabio Estevam,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, open list
  Cc: Patrick Bruenn, Andrew Lunn

From: Patrick Bruenn <p.bruenn@beckhoff.com>

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>

---
Cc: Andrew Lunn <andrew@lunn.ch>

v3: add missig changelog
v2:
- keep alphabetic order of dts/Makefile
- configure uart2 with 'fsl,dte-mode'
- use display-0 and panel-0 as node names
- remove unnecessary "simple-bus" for fixed regulators
---
 arch/arm/boot/dts/Makefile         |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts | 370 +++++++++++++++++++++++++++++++++++++
 2 files changed, 371 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 9c5e1d944d1c..590cdb77d972 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -338,6 +338,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-ts4800.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
 	imx53-ard.dtb \
+	imx53-cx9020.dtb \
 	imx53-m53evk.dtb \
 	imx53-mba53.dtb \
 	imx53-qsb.dtb \
diff --git a/arch/arm/boot/dts/imx53-cx9020.dts b/arch/arm/boot/dts/imx53-cx9020.dts
new file mode 100644
index 000000000000..0c3de61a5f4f
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-cx9020.dts
@@ -0,0 +1,370 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * 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 "imx53.dtsi"
+
+#define MX53_PAD_EIM_D26__UART2_RXD_MUX    0x144 0x48c 0x880 0x2 0x0
+#define MX53_PAD_EIM_D27__UART2_TXD_MUX    0x148 0x490 0x000 0x2 0x0
+#define MX53_PAD_EIM_D28__UART2_RTS        0x14c 0x494 0x87c 0x2 0x0
+#define MX53_PAD_EIM_D29__UART2_CTS        0x150 0x498 0x000 0x2 0x0
+
+/ {
+	model = "Freescale i.MX53 based Beckhoff CX9020";
+	compatible = "fsl,imx53-qsb", "fsl,imx53";
+
+	chosen {
+		stdout-path = &uart2;
+	};
+
+	memory {
+		reg = <0x70000000 0x20000000>,
+		      <0xb0000000 0x20000000>;
+	};
+
+	ccat {
+		compatible = "bhf,emi-ccat";
+	};
+
+	display-0 {
+		#address-cells =<1>;
+		#size-cells = <0>;
+		compatible = "fsl,imx-parallel-display";
+		interface-pix-fmt = "rgb24";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu_disp0>;
+		status = "okay";
+
+		port@0 {
+			reg = <0>;
+			display0_in: endpoint {
+				remote-endpoint = <&ipu_di0_disp0>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			display0_out: endpoint {
+				remote-endpoint = <&panel_in>;
+			};
+		};
+	};
+
+	panel-0 {
+		#address-cells =<1>;
+		#size-cells = <0>;
+		compatible = "simple,ddc-only";
+		ddc-i2c-bus = <&i2c2>;
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&display0_out>;
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pwr_r {
+			gpios = <&gpio3 22 0>;
+			default-state = "off";
+		};
+		pwr_g {
+			gpios = <&gpio3 24 0>;
+			default-state = "on";
+		};
+		pwr_b {
+			gpios = <&gpio3 23 0>;
+			default-state = "off";
+		};
+	};
+
+	rtc: rtc@53fa4000 {
+		compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+		reg = <0x53fa4000 0x4000>;
+		interrupts = <24>;
+		interrupt-parent = <&tzic>;
+		clocks = <&clks IMX5_CLK_SRTC_GATE>;
+		clock-names = "ipg";
+	};
+
+	reg_3p2v: regulator@0 {
+		compatible = "regulator-fixed";
+		regulator-name = "3P2V";
+		regulator-min-microvolt = <3200000>;
+		regulator-max-microvolt = <3200000>;
+		regulator-always-on;
+	};
+
+	reg_usb_vbus: regulator@1 {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio7 8 0>;
+		enable-active-high;
+	};
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc1>;
+	cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&esdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc2>;
+	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&ipu_di0_disp0 {
+	remote-endpoint = <&display0_in>;
+};
+
+&ssi2 {
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	imx53-qsb {
+		pinctrl_hog: hoggrp {
+			fsl,pins = <
+				MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000
+				MX53_PAD_GPIO_8__GPIO1_8          0x80000000
+				MX53_PAD_PATA_DATA14__GPIO2_14    0x80000000
+				MX53_PAD_PATA_DATA15__GPIO2_15    0x80000000
+				MX53_PAD_GPIO_1__GPIO1_1          0x80000000
+				MX53_PAD_GPIO_4__GPIO1_4          0x80000000
+				MX53_PAD_PATA_DA_0__GPIO7_6       0x80000000
+				MX53_PAD_PATA_DA_2__GPIO7_8	  0x80000000
+				MX53_PAD_GPIO_16__GPIO7_11        0x80000000
+
+				MX53_PAD_EIM_OE__EMI_WEIM_OE            0x80000000
+				MX53_PAD_EIM_WAIT__EMI_WEIM_WAIT        0x80000000
+				MX53_PAD_EIM_LBA__EMI_WEIM_LBA          0x80000000
+				MX53_PAD_EIM_RW__EMI_WEIM_RW            0x80000000
+				MX53_PAD_EIM_EB0__EMI_WEIM_EB_0         0x80000000
+				MX53_PAD_EIM_EB1__EMI_WEIM_EB_1         0x80000000
+				MX53_PAD_EIM_EB2__EMI_WEIM_EB_2         0x80000000
+				MX53_PAD_EIM_EB3__EMI_WEIM_EB_3         0x80000000
+				MX53_PAD_EIM_CS0__EMI_WEIM_CS_0         0x80000000
+				MX53_PAD_EIM_CS1__EMI_WEIM_CS_1         0x80000000
+				MX53_PAD_EIM_A16__EMI_WEIM_A_16         0x80000000
+				MX53_PAD_EIM_A17__EMI_WEIM_A_17         0x80000000
+				MX53_PAD_EIM_A18__EMI_WEIM_A_18         0x80000000
+				MX53_PAD_EIM_A19__EMI_WEIM_A_19         0x80000000
+				MX53_PAD_EIM_A20__EMI_WEIM_A_20         0x80000000
+				MX53_PAD_EIM_A21__EMI_WEIM_A_21         0x80000000
+				MX53_PAD_EIM_A22__EMI_WEIM_A_22         0x80000000
+				MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0    0xa4
+				MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1    0xa4
+				MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2    0xa4
+				MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3    0xa4
+				MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4    0xa4
+				MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5    0xa4
+				MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6    0xa4
+				MX53_PAD_EIM_DA7__EMI_NAND_WEIM_DA_7    0xa4
+				MX53_PAD_EIM_DA8__EMI_NAND_WEIM_DA_8    0xa4
+				MX53_PAD_EIM_DA9__EMI_NAND_WEIM_DA_9    0xa4
+				MX53_PAD_EIM_DA10__EMI_NAND_WEIM_DA_10	0xa4
+				MX53_PAD_EIM_DA11__EMI_NAND_WEIM_DA_11  0xa4
+				MX53_PAD_EIM_DA12__EMI_NAND_WEIM_DA_12  0xa4
+				MX53_PAD_EIM_DA13__EMI_NAND_WEIM_DA_13  0xa4
+				MX53_PAD_EIM_DA14__EMI_NAND_WEIM_DA_14  0xa4
+				MX53_PAD_EIM_DA15__EMI_NAND_WEIM_DA_15  0xa4
+				MX53_PAD_PATA_DATA0__EMI_NANDF_D_0      0xa4
+				MX53_PAD_PATA_DATA1__EMI_NANDF_D_1      0xa4
+				MX53_PAD_PATA_DATA2__EMI_NANDF_D_2      0xa4
+				MX53_PAD_PATA_DATA3__EMI_NANDF_D_3      0xa4
+				MX53_PAD_PATA_DATA4__EMI_NANDF_D_4      0xa4
+				MX53_PAD_PATA_DATA5__EMI_NANDF_D_5      0xa4
+				MX53_PAD_PATA_DATA6__EMI_NANDF_D_6      0xa4
+				MX53_PAD_PATA_DATA7__EMI_NANDF_D_7      0xa4
+				MX53_PAD_PATA_DATA8__EMI_NANDF_D_8      0xa4
+				MX53_PAD_PATA_DATA9__EMI_NANDF_D_9      0xa4
+				MX53_PAD_PATA_DATA10__EMI_NANDF_D_10    0xa4
+				MX53_PAD_PATA_DATA11__EMI_NANDF_D_11    0xa4
+				MX53_PAD_PATA_DATA12__EMI_NANDF_D_12    0xa4
+				MX53_PAD_PATA_DATA13__EMI_NANDF_D_13    0xa4
+				MX53_PAD_PATA_DATA14__EMI_NANDF_D_14    0xa4
+				MX53_PAD_PATA_DATA15__EMI_NANDF_D_15    0xa4
+				MX53_PAD_NANDF_CLE__GPIO6_7             0x00000001
+				MX53_PAD_NANDF_WP_B__GPIO6_9            0x00000001
+				MX53_PAD_NANDF_ALE__GPIO6_8             0x00000001
+			>;
+		};
+
+		led_pin_gpio3_23: led_gpio3_23@0 {
+			fsl,pins = <
+				MX53_PAD_EIM_D23__GPIO3_23 0x80000000
+			>;
+		};
+
+		pinctrl_audmux: audmuxgrp {
+			fsl,pins = <
+				MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC	0x80000000
+				MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD	0x80000000
+				MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS	0x80000000
+				MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD	0x80000000
+			>;
+		};
+
+		pinctrl_esdhc1: esdhc1grp {
+			fsl,pins = <
+				MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1d5
+				MX53_PAD_SD1_DATA1__ESDHC1_DAT1		0x1d5
+				MX53_PAD_SD1_DATA2__ESDHC1_DAT2		0x1d5
+				MX53_PAD_SD1_DATA3__ESDHC1_DAT3		0x1d5
+				MX53_PAD_SD1_CMD__ESDHC1_CMD		0x1d5
+				MX53_PAD_SD1_CLK__ESDHC1_CLK		0x1d5
+			>;
+		};
+
+		pinctrl_esdhc2: esdhc2grp {
+			fsl,pins = <
+				MX53_PAD_SD2_DATA0__ESDHC2_DAT0		0x1d5
+				MX53_PAD_SD2_DATA1__ESDHC2_DAT1		0x1d5
+				MX53_PAD_SD2_DATA2__ESDHC2_DAT2		0x1d5
+				MX53_PAD_SD2_DATA3__ESDHC2_DAT3		0x1d5
+				MX53_PAD_SD2_CMD__ESDHC2_CMD		0x1d5
+				MX53_PAD_SD2_CLK__ESDHC2_CLK		0x1d5
+			>;
+		};
+
+		pinctrl_fec: fecgrp {
+			fsl,pins = <
+				MX53_PAD_FEC_MDC__FEC_MDC		0x80000000
+				MX53_PAD_FEC_MDIO__FEC_MDIO		0x80000000
+				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x80000000
+				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x80000000
+				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x80000000
+				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x80000000
+				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x80000000
+				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x80000000
+				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x80000000
+				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x80000000
+			>;
+		};
+
+		/* open drain */
+		pinctrl_i2c1: i2c1grp {
+			fsl,pins = <
+				MX53_PAD_CSI0_DAT8__I2C1_SDA		0x400001ec
+				MX53_PAD_CSI0_DAT9__I2C1_SCL		0x400001ec
+			>;
+		};
+
+		pinctrl_i2c2: i2c2grp {
+			fsl,pins = <
+				MX53_PAD_KEY_ROW3__I2C2_SDA             0xc0000000
+				MX53_PAD_KEY_COL3__I2C2_SCL             0xc0000000
+			>;
+		};
+
+		pinctrl_ipu_disp0: ipudisp0grp {
+			fsl,pins = <
+				MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK	0x5
+				MX53_PAD_DI0_PIN15__IPU_DI0_PIN15	0x5
+				MX53_PAD_DI0_PIN2__IPU_DI0_PIN2		0x5
+				MX53_PAD_DI0_PIN3__IPU_DI0_PIN3		0x5
+				MX53_PAD_DI0_PIN4__IPU_DI0_PIN4		0x5
+				MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0	0x5
+				MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1	0x5
+				MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2	0x5
+				MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3	0x5
+				MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4	0x5
+				MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5	0x5
+				MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6	0x5
+				MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7	0x5
+				MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8	0x5
+				MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9	0x5
+				MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10	0x5
+				MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11	0x5
+				MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12	0x5
+				MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13	0x5
+				MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14	0x5
+				MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15	0x5
+				MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16	0x5
+				MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17	0x5
+				MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18	0x5
+				MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19	0x5
+				MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20	0x5
+				MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21	0x5
+				MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22	0x5
+				MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23	0x5
+			>;
+		};
+
+		pinctrl_uart2: uart2grp {
+			fsl,pins = <
+				MX53_PAD_EIM_D26__UART2_RXD_MUX	0x1e4
+				MX53_PAD_EIM_D27__UART2_TXD_MUX 0x1e4
+				MX53_PAD_EIM_D28__UART2_RTS 0x1e4
+				MX53_PAD_EIM_D29__UART2_CTS 0x1e4
+			>;
+		};
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	fsl,dte-mode;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+};
+
+&audmux {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_audmux>;
+	status = "okay";
+};
+
+&fec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec>;
+	phy-mode = "rmii";
+	phy-reset-gpios = <&gpio7 6 0>;
+	status = "okay";
+};
+
+&sata {
+	status = "okay";
+};
+
+&vpu {
+	status = "okay";
+};
+
+&usbh1 {
+	vbus-supply = <&reg_usb_vbus>;
+	phy_type = "utmi";
+	status = "okay";
+};
+
+&usbotg {
+	dr_mode = "peripheral";
+	status = "okay";
+};
-- 
2.11.0

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

* [PATCH v3 2/2] drm/panel: simple: Add support for ddc-only panel
  2017-07-13 11:13 ` [PATCH v3 0/2] Add CX9020 device tree linux-kernel-dev
  2017-07-13 11:13   ` [PATCH v3 1/2] ARM: dts: imx: add CX9020 Embedded PC " linux-kernel-dev
@ 2017-07-13 11:13   ` linux-kernel-dev
  1 sibling, 0 replies; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-13 11:13 UTC (permalink / raw)
  To: Thierry Reding, David Airlie, open list:DRM PANEL DRIVERS, open list
  Cc: Patrick Bruenn

From: Patrick Bruenn <p.bruenn@beckhoff.com>

This is a fix for the CX9020 Embedded PC. On that device the 24-bit
parallel-display signal of the imx53 is combined with an I2C channel
and converted to DVI-D port. Devicetree magic always requires a panel
connected to the parallel-display port.
We add an empty panel_desc, to get recognized by the panel-simple
driver, which can then use the ddc bus to read the panels configuration.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index c4566ce8fda7..52b2a7fb59ed 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1856,6 +1856,9 @@ static const struct panel_desc winstar_wf35ltiacd = {
 	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 };
 
+static const struct panel_desc simple_ddc_only = {
+};
+
 static const struct of_device_id platform_of_match[] = {
 	{
 		.compatible = "ampire,am-480272h3tmqw-t01h",
@@ -2050,6 +2053,9 @@ static const struct of_device_id platform_of_match[] = {
 		.compatible = "winstar,wf35ltiacd",
 		.data = &winstar_wf35ltiacd,
 	}, {
+		.compatible = "simple,ddc-only",
+		.data = &simple_ddc_only,
+	}, {
 		/* sentinel */
 	}
 };
-- 
2.11.0

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

* Re: [PATCH v3 1/2] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-13 11:13   ` [PATCH v3 1/2] ARM: dts: imx: add CX9020 Embedded PC " linux-kernel-dev
@ 2017-07-14  2:16     ` Shawn Guo
  0 siblings, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2017-07-14  2:16 UTC (permalink / raw)
  To: linux-kernel-dev
  Cc: Rob Herring, Mark Rutland, Russell King, Sascha Hauer,
	Fabio Estevam,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, open list, Patrick Bruenn, Andrew Lunn

On Thu, Jul 13, 2017 at 01:13:38PM +0200, linux-kernel-dev@beckhoff.com wrote:
> From: Patrick Bruenn <p.bruenn@beckhoff.com>
> 
> The CX9020 differs from i.MX53 Quick Start Board by:
> - use uart2 instead of uart1
> - DVI-D connector instead of VGA
> - no audio
> - CCAT FPGA connected to emi
> - enable rtc
> 
> Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
> 
> ---
> Cc: Andrew Lunn <andrew@lunn.ch>
> 
> v3: add missig changelog
> v2:
> - keep alphabetic order of dts/Makefile
> - configure uart2 with 'fsl,dte-mode'
> - use display-0 and panel-0 as node names
> - remove unnecessary "simple-bus" for fixed regulators
> ---
>  arch/arm/boot/dts/Makefile         |   1 +
>  arch/arm/boot/dts/imx53-cx9020.dts | 370 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 371 insertions(+)
>  create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 9c5e1d944d1c..590cdb77d972 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -338,6 +338,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
>  	imx51-ts4800.dtb
>  dtb-$(CONFIG_SOC_IMX53) += \
>  	imx53-ard.dtb \
> +	imx53-cx9020.dtb \
>  	imx53-m53evk.dtb \
>  	imx53-mba53.dtb \
>  	imx53-qsb.dtb \
> diff --git a/arch/arm/boot/dts/imx53-cx9020.dts b/arch/arm/boot/dts/imx53-cx9020.dts
> new file mode 100644
> index 000000000000..0c3de61a5f4f
> --- /dev/null
> +++ b/arch/arm/boot/dts/imx53-cx9020.dts
> @@ -0,0 +1,370 @@
> +/*
> + * Copyright 2011 Freescale Semiconductor, Inc.
> + * Copyright 2011 Linaro Ltd.
> + *
> + * 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 "imx53.dtsi"
> +
> +#define MX53_PAD_EIM_D26__UART2_RXD_MUX    0x144 0x48c 0x880 0x2 0x0
> +#define MX53_PAD_EIM_D27__UART2_TXD_MUX    0x148 0x490 0x000 0x2 0x0
> +#define MX53_PAD_EIM_D28__UART2_RTS        0x14c 0x494 0x87c 0x2 0x0
> +#define MX53_PAD_EIM_D29__UART2_CTS        0x150 0x498 0x000 0x2 0x0

Why cannot these be defined in imx53-pinfunc.h?

> +
> +/ {
> +	model = "Freescale i.MX53 based Beckhoff CX9020";

This isn't a board manufactured by Freescale, right?

> +	compatible = "fsl,imx53-qsb", "fsl,imx53";

Don't you need a compatible for Beckhoff CX9020 rather than using
fsl,imx53-qsb?

> +
> +	chosen {
> +		stdout-path = &uart2;
> +	};
> +
> +	memory {
> +		reg = <0x70000000 0x20000000>,
> +		      <0xb0000000 0x20000000>;
> +	};
> +
> +	ccat {
> +		compatible = "bhf,emi-ccat";

Undocumented bindings?

> +	};
> +
> +	display-0 {
> +		#address-cells =<1>;
> +		#size-cells = <0>;
> +		compatible = "fsl,imx-parallel-display";
> +		interface-pix-fmt = "rgb24";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_ipu_disp0>;
> +		status = "okay";
> +
> +		port@0 {
> +			reg = <0>;

Please a newline between property list and child node.

> +			display0_in: endpoint {
> +				remote-endpoint = <&ipu_di0_disp0>;
> +			};
> +		};
> +
> +		port@1 {
> +			reg = <1>;
> +			display0_out: endpoint {
> +				remote-endpoint = <&panel_in>;
> +			};
> +		};
> +	};
> +
> +	panel-0 {
> +		#address-cells =<1>;
> +		#size-cells = <0>;
> +		compatible = "simple,ddc-only";

Send me the dts change only after the bindings and driver parts land on
mainline.

> +		ddc-i2c-bus = <&i2c2>;
> +
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&display0_out>;
> +			};
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";

newline

> +		pwr_r {

We prefer to use hyphen than underscore in node name.

> +			gpios = <&gpio3 22 0>;

Use the polarity defines in include/dt-bindings/gpio/gpio.h.

> +			default-state = "off";
> +		};

Please have a newline between child nodes.

> +		pwr_g {
> +			gpios = <&gpio3 24 0>;
> +			default-state = "on";
> +		};
> +		pwr_b {
> +			gpios = <&gpio3 23 0>;
> +			default-state = "off";
> +		};
> +	};
> +
> +	rtc: rtc@53fa4000 {
> +		compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
> +		reg = <0x53fa4000 0x4000>;
> +		interrupts = <24>;
> +		interrupt-parent = <&tzic>;
> +		clocks = <&clks IMX5_CLK_SRTC_GATE>;
> +		clock-names = "ipg";
> +	};

It should be added to imx53.dtsi.

> +
> +	reg_3p2v: regulator@0 {

name@unit-address only applies to device nodes under bus with 'reg'
property.  You should go regulator-3p2v in your case.

> +		compatible = "regulator-fixed";
> +		regulator-name = "3P2V";
> +		regulator-min-microvolt = <3200000>;
> +		regulator-max-microvolt = <3200000>;
> +		regulator-always-on;
> +	};
> +
> +	reg_usb_vbus: regulator@1 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "usb_vbus";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		gpio = <&gpio7 8 0>;
> +		enable-active-high;
> +	};
> +};
> +
> +&esdhc1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_esdhc1>;
> +	cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
> +	bus-width = <4>;
> +	status = "okay";
> +};
> +
> +&esdhc2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_esdhc2>;
> +	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
> +	bus-width = <4>;
> +	status = "okay";
> +};
> +
> +&ipu_di0_disp0 {
> +	remote-endpoint = <&display0_in>;
> +};
> +
> +&ssi2 {
> +	status = "okay";
> +};
> +
> +&iomuxc {

We generally sort these labelled nodes alphabetically.  Considering
iomuxc usually contains a lot of pinctrl data which might impact the
readability of the file, it can be put at the bottom of the file.

> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_hog>;
> +
> +	imx53-qsb {

This container node can be dropped to save one level of indent.

> +		pinctrl_hog: hoggrp {
> +			fsl,pins = <
> +				MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000

Please use a proper configuration value rather than relying on the value
coming out of reset or firmware setup.

> +				MX53_PAD_GPIO_8__GPIO1_8          0x80000000
> +				MX53_PAD_PATA_DATA14__GPIO2_14    0x80000000
> +				MX53_PAD_PATA_DATA15__GPIO2_15    0x80000000
> +				MX53_PAD_GPIO_1__GPIO1_1          0x80000000
> +				MX53_PAD_GPIO_4__GPIO1_4          0x80000000
> +				MX53_PAD_PATA_DA_0__GPIO7_6       0x80000000
> +				MX53_PAD_PATA_DA_2__GPIO7_8	  0x80000000
> +				MX53_PAD_GPIO_16__GPIO7_11        0x80000000
> +

Drop this newline.

> +				MX53_PAD_EIM_OE__EMI_WEIM_OE            0x80000000
> +				MX53_PAD_EIM_WAIT__EMI_WEIM_WAIT        0x80000000
> +				MX53_PAD_EIM_LBA__EMI_WEIM_LBA          0x80000000
> +				MX53_PAD_EIM_RW__EMI_WEIM_RW            0x80000000
> +				MX53_PAD_EIM_EB0__EMI_WEIM_EB_0         0x80000000
> +				MX53_PAD_EIM_EB1__EMI_WEIM_EB_1         0x80000000
> +				MX53_PAD_EIM_EB2__EMI_WEIM_EB_2         0x80000000
> +				MX53_PAD_EIM_EB3__EMI_WEIM_EB_3         0x80000000
> +				MX53_PAD_EIM_CS0__EMI_WEIM_CS_0         0x80000000
> +				MX53_PAD_EIM_CS1__EMI_WEIM_CS_1         0x80000000
> +				MX53_PAD_EIM_A16__EMI_WEIM_A_16         0x80000000
> +				MX53_PAD_EIM_A17__EMI_WEIM_A_17         0x80000000
> +				MX53_PAD_EIM_A18__EMI_WEIM_A_18         0x80000000
> +				MX53_PAD_EIM_A19__EMI_WEIM_A_19         0x80000000
> +				MX53_PAD_EIM_A20__EMI_WEIM_A_20         0x80000000
> +				MX53_PAD_EIM_A21__EMI_WEIM_A_21         0x80000000
> +				MX53_PAD_EIM_A22__EMI_WEIM_A_22         0x80000000
> +				MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0    0xa4
> +				MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1    0xa4
> +				MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2    0xa4
> +				MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3    0xa4
> +				MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4    0xa4
> +				MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5    0xa4
> +				MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6    0xa4
> +				MX53_PAD_EIM_DA7__EMI_NAND_WEIM_DA_7    0xa4
> +				MX53_PAD_EIM_DA8__EMI_NAND_WEIM_DA_8    0xa4
> +				MX53_PAD_EIM_DA9__EMI_NAND_WEIM_DA_9    0xa4
> +				MX53_PAD_EIM_DA10__EMI_NAND_WEIM_DA_10	0xa4
> +				MX53_PAD_EIM_DA11__EMI_NAND_WEIM_DA_11  0xa4
> +				MX53_PAD_EIM_DA12__EMI_NAND_WEIM_DA_12  0xa4
> +				MX53_PAD_EIM_DA13__EMI_NAND_WEIM_DA_13  0xa4
> +				MX53_PAD_EIM_DA14__EMI_NAND_WEIM_DA_14  0xa4
> +				MX53_PAD_EIM_DA15__EMI_NAND_WEIM_DA_15  0xa4
> +				MX53_PAD_PATA_DATA0__EMI_NANDF_D_0      0xa4
> +				MX53_PAD_PATA_DATA1__EMI_NANDF_D_1      0xa4
> +				MX53_PAD_PATA_DATA2__EMI_NANDF_D_2      0xa4
> +				MX53_PAD_PATA_DATA3__EMI_NANDF_D_3      0xa4
> +				MX53_PAD_PATA_DATA4__EMI_NANDF_D_4      0xa4
> +				MX53_PAD_PATA_DATA5__EMI_NANDF_D_5      0xa4
> +				MX53_PAD_PATA_DATA6__EMI_NANDF_D_6      0xa4
> +				MX53_PAD_PATA_DATA7__EMI_NANDF_D_7      0xa4
> +				MX53_PAD_PATA_DATA8__EMI_NANDF_D_8      0xa4
> +				MX53_PAD_PATA_DATA9__EMI_NANDF_D_9      0xa4
> +				MX53_PAD_PATA_DATA10__EMI_NANDF_D_10    0xa4
> +				MX53_PAD_PATA_DATA11__EMI_NANDF_D_11    0xa4
> +				MX53_PAD_PATA_DATA12__EMI_NANDF_D_12    0xa4
> +				MX53_PAD_PATA_DATA13__EMI_NANDF_D_13    0xa4
> +				MX53_PAD_PATA_DATA14__EMI_NANDF_D_14    0xa4
> +				MX53_PAD_PATA_DATA15__EMI_NANDF_D_15    0xa4
> +				MX53_PAD_NANDF_CLE__GPIO6_7             0x00000001
> +				MX53_PAD_NANDF_WP_B__GPIO6_9            0x00000001
> +				MX53_PAD_NANDF_ALE__GPIO6_8             0x00000001

Do you really need so many pin setups in hog group?  The hog group is
only for those pins that do not have a clear client device.

> +			>;
> +		};
> +
> +		led_pin_gpio3_23: led_gpio3_23@0 {

How is this being used?

> +			fsl,pins = <
> +				MX53_PAD_EIM_D23__GPIO3_23 0x80000000
> +			>;
> +		};
> +
> +		pinctrl_audmux: audmuxgrp {
> +			fsl,pins = <
> +				MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC	0x80000000
> +				MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD	0x80000000
> +				MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS	0x80000000
> +				MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD	0x80000000
> +			>;
> +		};
> +
> +		pinctrl_esdhc1: esdhc1grp {
> +			fsl,pins = <
> +				MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1d5
> +				MX53_PAD_SD1_DATA1__ESDHC1_DAT1		0x1d5
> +				MX53_PAD_SD1_DATA2__ESDHC1_DAT2		0x1d5
> +				MX53_PAD_SD1_DATA3__ESDHC1_DAT3		0x1d5
> +				MX53_PAD_SD1_CMD__ESDHC1_CMD		0x1d5
> +				MX53_PAD_SD1_CLK__ESDHC1_CLK		0x1d5
> +			>;
> +		};
> +
> +		pinctrl_esdhc2: esdhc2grp {
> +			fsl,pins = <
> +				MX53_PAD_SD2_DATA0__ESDHC2_DAT0		0x1d5
> +				MX53_PAD_SD2_DATA1__ESDHC2_DAT1		0x1d5
> +				MX53_PAD_SD2_DATA2__ESDHC2_DAT2		0x1d5
> +				MX53_PAD_SD2_DATA3__ESDHC2_DAT3		0x1d5
> +				MX53_PAD_SD2_CMD__ESDHC2_CMD		0x1d5
> +				MX53_PAD_SD2_CLK__ESDHC2_CLK		0x1d5
> +			>;
> +		};
> +
> +		pinctrl_fec: fecgrp {
> +			fsl,pins = <
> +				MX53_PAD_FEC_MDC__FEC_MDC		0x80000000
> +				MX53_PAD_FEC_MDIO__FEC_MDIO		0x80000000
> +				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x80000000
> +				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x80000000
> +				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x80000000
> +				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x80000000
> +				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x80000000
> +				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x80000000
> +				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x80000000
> +				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x80000000
> +			>;
> +		};
> +
> +		/* open drain */
> +		pinctrl_i2c1: i2c1grp {
> +			fsl,pins = <
> +				MX53_PAD_CSI0_DAT8__I2C1_SDA		0x400001ec
> +				MX53_PAD_CSI0_DAT9__I2C1_SCL		0x400001ec
> +			>;
> +		};
> +
> +		pinctrl_i2c2: i2c2grp {
> +			fsl,pins = <
> +				MX53_PAD_KEY_ROW3__I2C2_SDA             0xc0000000
> +				MX53_PAD_KEY_COL3__I2C2_SCL             0xc0000000
> +			>;
> +		};
> +
> +		pinctrl_ipu_disp0: ipudisp0grp {
> +			fsl,pins = <
> +				MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK	0x5
> +				MX53_PAD_DI0_PIN15__IPU_DI0_PIN15	0x5
> +				MX53_PAD_DI0_PIN2__IPU_DI0_PIN2		0x5
> +				MX53_PAD_DI0_PIN3__IPU_DI0_PIN3		0x5
> +				MX53_PAD_DI0_PIN4__IPU_DI0_PIN4		0x5
> +				MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0	0x5
> +				MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1	0x5
> +				MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2	0x5
> +				MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3	0x5
> +				MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4	0x5
> +				MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5	0x5
> +				MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6	0x5
> +				MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7	0x5
> +				MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8	0x5
> +				MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9	0x5
> +				MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10	0x5
> +				MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11	0x5
> +				MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12	0x5
> +				MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13	0x5
> +				MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14	0x5
> +				MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15	0x5
> +				MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16	0x5
> +				MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17	0x5
> +				MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18	0x5
> +				MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19	0x5
> +				MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20	0x5
> +				MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21	0x5
> +				MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22	0x5
> +				MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23	0x5
> +			>;
> +		};
> +
> +		pinctrl_uart2: uart2grp {
> +			fsl,pins = <
> +				MX53_PAD_EIM_D26__UART2_RXD_MUX	0x1e4
> +				MX53_PAD_EIM_D27__UART2_TXD_MUX 0x1e4
> +				MX53_PAD_EIM_D28__UART2_RTS 0x1e4
> +				MX53_PAD_EIM_D29__UART2_CTS 0x1e4
> +			>;
> +		};
> +	};
> +};
> +
> +&uart2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_uart2>;
> +	fsl,dte-mode;
> +	status = "okay";
> +};
> +
> +&i2c2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c2>;
> +	status = "okay";
> +};
> +
> +&audmux {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_audmux>;
> +	status = "okay";
> +};
> +
> +&fec {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_fec>;
> +	phy-mode = "rmii";
> +	phy-reset-gpios = <&gpio7 6 0>;
> +	status = "okay";
> +};
> +
> +&sata {
> +	status = "okay";
> +};
> +
> +&vpu {
> +	status = "okay";
> +};
> +
> +&usbh1 {
> +	vbus-supply = <&reg_usb_vbus>;
> +	phy_type = "utmi";
> +	status = "okay";
> +};
> +
> +&usbotg {
> +	dr_mode = "peripheral";
> +	status = "okay";
> +};

Sort these labelled nodes alphabetically.

Shawn

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

* Re: [PATCH v2 2/2] drm/panel: simple: Add support for ddc-only panel
  2017-07-13 11:04   ` [PATCH v2 2/2] drm/panel: simple: Add support for ddc-only panel linux-kernel-dev
@ 2017-07-14 14:15     ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2017-07-14 14:15 UTC (permalink / raw)
  To: linux-kernel-dev
  Cc: Thierry Reding, David Airlie, open list:DRM PANEL DRIVERS,
	open list, Patrick Bruenn

On Thu, Jul 13, 2017 at 6:04 AM,  <linux-kernel-dev@beckhoff.com> wrote:
> From: Patrick Bruenn <p.bruenn@beckhoff.com>
>
> This is a fix for the CX9020 Embedded PC. On that device the 24-bit
> parallel-display signal of the imx53 is combined with an I2C channel
> and converted to DVI-D port. Devicetree magic always requires a panel
> connected to the parallel-display port.

Then fix this. It's not the DT that requires this, but limitations in
the i.MX driver.

> We add an empty panel_desc, to get recognized by the panel-simple
> driver, which can then use the ddc bus to read the panels configuration.
>
> Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index c4566ce8fda7..52b2a7fb59ed 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -1856,6 +1856,9 @@ static const struct panel_desc winstar_wf35ltiacd = {
>         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
>  };
>
> +static const struct panel_desc simple_ddc_only = {
> +};
> +
>  static const struct of_device_id platform_of_match[] = {
>         {
>                 .compatible = "ampire,am-480272h3tmqw-t01h",
> @@ -2050,6 +2053,9 @@ static const struct of_device_id platform_of_match[] = {
>                 .compatible = "winstar,wf35ltiacd",
>                 .data = &winstar_wf35ltiacd,
>         }, {
> +               .compatible = "simple,ddc-only",

If you notice the rest of the file, we require compatibles be specific
for the panels.

What you want here is a "dvi-connector" node.

Rob

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

* [PATCH v4 1/2] dt-bindings: arm: Add entry for Beckhoff CX9020
       [not found] ` <20170721040640.31424-1-linux-kernel-dev@beckhoff.com>
@ 2017-07-21  4:06   ` linux-kernel-dev
  2017-07-24 20:28     ` Rob Herring
  2017-07-21  4:06   ` [PATCH v4 2/2] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
  1 sibling, 1 reply; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-21  4:06 UTC (permalink / raw)
  To: Patrick Bruenn, Rob Herring, Mark Rutland, Kevin Hilman,
	Jonathan Cameron, Thierry Reding, Maxime Ripard,
	Andreas Färber, Marek Vasut, Rask Ingemann Lambertsen,
	Greg Kroah-Hartman, David S. Miller, Mauro Carvalho Chehab,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

From: Patrick Bruenn <p.bruenn@beckhoff.com>

- add vendor prefix bhf for Beckhoff
- add new board binding bhf,cx9020

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
---
 Documentation/devicetree/bindings/arm/bhf.txt         | 6 ++++++
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 MAINTAINERS                                           | 5 +++++
 3 files changed, 12 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bhf.txt

diff --git a/Documentation/devicetree/bindings/arm/bhf.txt b/Documentation/devicetree/bindings/arm/bhf.txt
new file mode 100644
index 000000000000..886b503caf9c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bhf.txt
@@ -0,0 +1,6 @@
+Beckhoff Automation Platforms Device Tree Bindings
+--------------------------------------------------
+
+CX9020 Embedded PC
+Required root node properties:
+    - compatible = "bhf,cx9020", "fsl,imx53";
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index daf465bef758..20c2cf57ebc9 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -47,6 +47,7 @@ avic	Shanghai AVIC Optoelectronics Co., Ltd.
 axentia	Axentia Technologies AB
 axis	Axis Communications AB
 bananapi BIPAI KEJI LIMITED
+bhf	Beckhoff Automation GmbH & Co. KG
 boe	BOE Technology Group Co., Ltd.
 bosch	Bosch Sensortec GmbH
 boundary	Boundary Devices Inc.
diff --git a/MAINTAINERS b/MAINTAINERS
index 205d3977ac46..1bf282843dc2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1172,6 +1172,11 @@ M:	Boris Brezillon <boris.brezillon@free-electrons.com>
 S:	Maintained
 F:	drivers/clk/at91
 
+ARM/BECKHOFF SUPPORT
+M:	Patrick Bruenn <p.bruenn@beckhoff.com>
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/bhf.txt
+
 ARM/CALXEDA HIGHBANK ARCHITECTURE
 M:	Rob Herring <robh@kernel.org>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
-- 
2.11.0

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

* [PATCH v4 2/2] ARM: dts: imx: add CX9020 Embedded PC device tree
       [not found] ` <20170721040640.31424-1-linux-kernel-dev@beckhoff.com>
  2017-07-21  4:06   ` [PATCH v4 1/2] dt-bindings: arm: Add entry for Beckhoff CX9020 linux-kernel-dev
@ 2017-07-21  4:06   ` linux-kernel-dev
  2017-07-25  7:59     ` Shawn Guo
  1 sibling, 1 reply; 19+ messages in thread
From: linux-kernel-dev @ 2017-07-21  4:06 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Patrick Bruenn, Greg Kroah-Hartman,
	David S. Miller, Mauro Carvalho Chehab, open list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT
  Cc: Andrew Lunn

From: Patrick Bruenn <p.bruenn@beckhoff.com>

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- no SATA connector
- CCAT FPGA connected to emi
- enable rtc

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>

---

v4:
- move alternative UART2 pinmux settings to imx53-pinfunc.h
- fix copyright notice and model name to clearify cx9020 is a
  Beckhoff board and not from Freescale/NXP/Qualcomm
- add "bhf,cx9020" compatible
- remove ccat node and pin configuration as long as the ccat
  driver is not mainlined
- use dvi-connector + ti,tfp410 instead of panel-simple
- add newlines between property list and child nodes
- replace underscores in node names with hypens
- replace magic number 0 with polarity defines from
  include/dt-bindings/gpio/gpio.h
- move rtc node into imx53.dtsi, change it's name into 'srtc',
  to avoid a conflict with 'rtc' node in imx53-m53.dtsi
- rename regulator-3p2v
- drop imx53-qsb container node
- make iomux configuration explicit
- remove unused audmux
- remove unused led_pin_gpio3_23 configuration
- use blue gpio-leds as disk-activity indicators for mmc0 and mmc1
- add mmc indicator leds to sdhc pingroups
- keep node names in alphabetical order
- remove unused sata and ssi2
- remove unused pin configs from hoggrp
- add entry for imx53-cx9020.dts to MAINTAINERS

v3: add missig changelog
v2:
- keep alphabetic order of dts/Makefile
- configure uart2 with 'fsl,dte-mode'
- use display-0 and panel-0 as node names
- remove unnecessary "simple-bus" for fixed regulators

Cc: Andrew Lunn <andrew@lunn.ch>
---
 MAINTAINERS                        |   1 +
 arch/arm/boot/dts/Makefile         |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts | 295 +++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx53-pinfunc.h  |   4 +
 arch/arm/boot/dts/imx53.dtsi       |   9 ++
 5 files changed, 310 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

diff --git a/MAINTAINERS b/MAINTAINERS
index 1bf282843dc2..1bd06328f79b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1176,6 +1176,7 @@ ARM/BECKHOFF SUPPORT
 M:	Patrick Bruenn <p.bruenn@beckhoff.com>
 S:	Maintained
 F:	Documentation/devicetree/bindings/arm/bhf.txt
+F:	arch/arm/boot/dts/imx53-cx9020.dts
 
 ARM/CALXEDA HIGHBANK ARCHITECTURE
 M:	Rob Herring <robh@kernel.org>
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4b17f35dc9a7..f0ba9be523e0 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-ts4800.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
 	imx53-ard.dtb \
+	imx53-cx9020.dtb \
 	imx53-m53evk.dtb \
 	imx53-mba53.dtb \
 	imx53-qsb.dtb \
diff --git a/arch/arm/boot/dts/imx53-cx9020.dts b/arch/arm/boot/dts/imx53-cx9020.dts
new file mode 100644
index 000000000000..c4f9c89668c2
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-cx9020.dts
@@ -0,0 +1,295 @@
+/*
+ * Copyright 2017 Beckhoff Automation GmbH & Co. KG
+ * based on imx53-qsb.dts
+ *
+ * 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 "imx53.dtsi"
+
+/ {
+	model = "Beckhoff CX9020 Embedded PC";
+	compatible = "bhf,cx9020", "fsl,imx53";
+
+	chosen {
+		stdout-path = &uart2;
+	};
+
+	memory {
+		reg = <0x70000000 0x20000000>,
+		      <0xb0000000 0x20000000>;
+	};
+
+	display-0 {
+		#address-cells =<1>;
+		#size-cells = <0>;
+		compatible = "fsl,imx-parallel-display";
+		interface-pix-fmt = "rgb24";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu_disp0>;
+		status = "okay";
+
+		port@0 {
+			reg = <0>;
+
+			display0_in: endpoint {
+				remote-endpoint = <&ipu_di0_disp0>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			display0_out: endpoint {
+				remote-endpoint = <&tfp410_in>;
+			};
+		};
+	};
+
+	dvi-connector {
+		compatible = "dvi-connector";
+		ddc-i2c-bus = <&i2c2>;
+		digital;
+
+		port {
+			dvi_connector_in: endpoint {
+				remote-endpoint = <&tfp410_out>;
+			};
+		};
+	};
+
+	dvi-converter {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "ti,tfp410";
+
+		port@0 {
+			reg = <0>;
+
+			tfp410_in: endpoint {
+				remote-endpoint = <&display0_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			tfp410_out: endpoint {
+				remote-endpoint = <&dvi_connector_in>;
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		pwr-r {
+			gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		pwr-g {
+			gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+		};
+
+		pwr-b {
+			gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		sd1-b {
+			linux,default-trigger = "mmc0";
+			gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
+		};
+
+		sd2-b {
+			linux,default-trigger = "mmc1";
+			gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	regulator-3p2v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P2V";
+		regulator-min-microvolt = <3200000>;
+		regulator-max-microvolt = <3200000>;
+		regulator-always-on;
+	};
+
+	reg_usb_vbus: regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc1>;
+	cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&esdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc2>;
+	cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	status = "okay";
+};
+
+&fec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec>;
+	phy-mode = "rmii";
+	phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+};
+
+&ipu_di0_disp0 {
+	remote-endpoint = <&display0_in>;
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	fsl,dte-mode;
+	status = "okay";
+};
+
+&usbh1 {
+	vbus-supply = <&reg_usb_vbus>;
+	phy_type = "utmi";
+	status = "okay";
+};
+
+&usbotg {
+	dr_mode = "peripheral";
+	status = "okay";
+};
+
+&vpu {
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	pinctrl_hog: hoggrp {
+		fsl,pins = <
+			MX53_PAD_GPIO_0__CCM_CLKO               0x1a4
+			MX53_PAD_GPIO_16__I2C3_SDA              0x1a4
+		>;
+	};
+
+	pinctrl_esdhc1: esdhc1grp {
+		fsl,pins = <
+			MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1d5
+			MX53_PAD_SD1_DATA1__ESDHC1_DAT1		0x1d5
+			MX53_PAD_SD1_DATA2__ESDHC1_DAT2		0x1d5
+			MX53_PAD_SD1_DATA3__ESDHC1_DAT3		0x1d5
+			MX53_PAD_SD1_CMD__ESDHC1_CMD		0x1d5
+			MX53_PAD_SD1_CLK__ESDHC1_CLK		0x1d5
+			MX53_PAD_GPIO_1__ESDHC1_CD              0x1a4
+			MX53_PAD_EIM_D17__GPIO3_17              0x1e4
+			MX53_PAD_GPIO_3__GPIO1_3                0x1e4
+		>;
+	};
+
+	pinctrl_esdhc2: esdhc2grp {
+		fsl,pins = <
+			MX53_PAD_SD2_DATA0__ESDHC2_DAT0		0x1d5
+			MX53_PAD_SD2_DATA1__ESDHC2_DAT1		0x1d5
+			MX53_PAD_SD2_DATA2__ESDHC2_DAT2		0x1d5
+			MX53_PAD_SD2_DATA3__ESDHC2_DAT3		0x1d5
+			MX53_PAD_SD2_CMD__ESDHC2_CMD		0x1d5
+			MX53_PAD_SD2_CLK__ESDHC2_CLK		0x1d5
+			MX53_PAD_GPIO_4__ESDHC2_CD              0x1e4
+			MX53_PAD_EIM_D20__GPIO3_20              0x1e4
+			MX53_PAD_GPIO_8__GPIO1_8                0x1a4
+		>;
+	};
+
+	pinctrl_fec: fecgrp {
+		fsl,pins = <
+			MX53_PAD_FEC_MDC__FEC_MDC		0x4
+			MX53_PAD_FEC_MDIO__FEC_MDIO		0x1fc
+			MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x180
+			MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x180
+			MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x180
+			MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x180
+			MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x180
+			MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x4
+			MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x4
+			MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x4
+		>;
+	};
+
+	pinctrl_i2c2: i2c2grp {
+		fsl,pins = <
+			MX53_PAD_KEY_ROW3__I2C2_SDA             0xc0000000
+			MX53_PAD_KEY_COL3__I2C2_SCL             0xc0000000
+		>;
+	};
+
+	pinctrl_ipu_disp0: ipudisp0grp {
+		fsl,pins = <
+			MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK	0x5
+			MX53_PAD_DI0_PIN15__IPU_DI0_PIN15	0x5
+			MX53_PAD_DI0_PIN2__IPU_DI0_PIN2		0x5
+			MX53_PAD_DI0_PIN3__IPU_DI0_PIN3		0x5
+			MX53_PAD_DI0_PIN4__IPU_DI0_PIN4		0x5
+			MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0	0x5
+			MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1	0x5
+			MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2	0x5
+			MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3	0x5
+			MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4	0x5
+			MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5	0x5
+			MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6	0x5
+			MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7	0x5
+			MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8	0x5
+			MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9	0x5
+			MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10	0x5
+			MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11	0x5
+			MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12	0x5
+			MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13	0x5
+			MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14	0x5
+			MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15	0x5
+			MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16	0x5
+			MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17	0x5
+			MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18	0x5
+			MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19	0x5
+			MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20	0x5
+			MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21	0x5
+			MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22	0x5
+			MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23	0x5
+		>;
+	};
+
+	pinctrl_uart2: uart2grp {
+		fsl,pins = <
+			MX53_PAD_EIM_D26__UART2_RXD_MUX	0x1e4
+			MX53_PAD_EIM_D27__UART2_TXD_MUX 0x1e4
+			MX53_PAD_EIM_D28__UART2_RTS 0x1e4
+			MX53_PAD_EIM_D29__UART2_CTS 0x1e4
+		>;
+	};
+};
diff --git a/arch/arm/boot/dts/imx53-pinfunc.h b/arch/arm/boot/dts/imx53-pinfunc.h
index aec406bc65eb..59f9c29e3fe2 100644
--- a/arch/arm/boot/dts/imx53-pinfunc.h
+++ b/arch/arm/boot/dts/imx53-pinfunc.h
@@ -524,6 +524,7 @@
 #define MX53_PAD_EIM_D25__UART1_DSR				0x140 0x488 0x000 0x7 0x0
 #define MX53_PAD_EIM_D26__EMI_WEIM_D_26				0x144 0x48c 0x000 0x0 0x0
 #define MX53_PAD_EIM_D26__GPIO3_26				0x144 0x48c 0x000 0x1 0x0
+#define MX53_PAD_EIM_D26__UART2_RXD_MUX				0x144 0x48c 0x880 0x2 0x0
 #define MX53_PAD_EIM_D26__UART2_TXD_MUX				0x144 0x48c 0x000 0x2 0x0
 #define MX53_PAD_EIM_D26__FIRI_RXD				0x144 0x48c 0x80c 0x3 0x0
 #define MX53_PAD_EIM_D26__IPU_CSI0_D_1				0x144 0x48c 0x000 0x4 0x0
@@ -533,6 +534,7 @@
 #define MX53_PAD_EIM_D27__EMI_WEIM_D_27				0x148 0x490 0x000 0x0 0x0
 #define MX53_PAD_EIM_D27__GPIO3_27				0x148 0x490 0x000 0x1 0x0
 #define MX53_PAD_EIM_D27__UART2_RXD_MUX				0x148 0x490 0x880 0x2 0x1
+#define MX53_PAD_EIM_D27__UART2_TXD_MUX				0x148 0x490 0x000 0x2 0x0
 #define MX53_PAD_EIM_D27__FIRI_TXD				0x148 0x490 0x000 0x3 0x0
 #define MX53_PAD_EIM_D27__IPU_CSI0_D_0				0x148 0x490 0x000 0x4 0x0
 #define MX53_PAD_EIM_D27__IPU_DI1_PIN13				0x148 0x490 0x000 0x5 0x0
@@ -541,6 +543,7 @@
 #define MX53_PAD_EIM_D28__EMI_WEIM_D_28				0x14c 0x494 0x000 0x0 0x0
 #define MX53_PAD_EIM_D28__GPIO3_28				0x14c 0x494 0x000 0x1 0x0
 #define MX53_PAD_EIM_D28__UART2_CTS				0x14c 0x494 0x000 0x2 0x0
+#define MX53_PAD_EIM_D28__UART2_RTS				0x14c 0x494 0x87c 0x2 0x0
 #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO			0x14c 0x494 0x82c 0x3 0x1
 #define MX53_PAD_EIM_D28__CSPI_MOSI				0x14c 0x494 0x788 0x4 0x1
 #define MX53_PAD_EIM_D28__I2C1_SDA				0x14c 0x494 0x818 0x5 0x1
@@ -548,6 +551,7 @@
 #define MX53_PAD_EIM_D28__IPU_DI0_PIN13				0x14c 0x494 0x000 0x7 0x0
 #define MX53_PAD_EIM_D29__EMI_WEIM_D_29				0x150 0x498 0x000 0x0 0x0
 #define MX53_PAD_EIM_D29__GPIO3_29				0x150 0x498 0x000 0x1 0x0
+#define MX53_PAD_EIM_D29__UART2_CTS				0x150 0x498 0x000 0x2 0x0
 #define MX53_PAD_EIM_D29__UART2_RTS				0x150 0x498 0x87c 0x2 0x1
 #define MX53_PAD_EIM_D29__IPU_DISPB0_SER_RS			0x150 0x498 0x000 0x3 0x0
 #define MX53_PAD_EIM_D29__CSPI_SS0				0x150 0x498 0x78c 0x4 0x2
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 2e516f4985e4..8bf0d89cdd35 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,6 +433,15 @@
 				clock-names = "ipg", "per";
 			};
 
+			srtc: srtc@53fa4000 {
+				compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+				reg = <0x53fa4000 0x4000>;
+				interrupts = <24>;
+				interrupt-parent = <&tzic>;
+				clocks = <&clks IMX5_CLK_SRTC_GATE>;
+				clock-names = "ipg";
+			};
+
 			iomuxc: iomuxc@53fa8000 {
 				compatible = "fsl,imx53-iomuxc";
 				reg = <0x53fa8000 0x4000>;
-- 
2.11.0

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

* Re: [PATCH v4 1/2] dt-bindings: arm: Add entry for Beckhoff CX9020
  2017-07-21  4:06   ` [PATCH v4 1/2] dt-bindings: arm: Add entry for Beckhoff CX9020 linux-kernel-dev
@ 2017-07-24 20:28     ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2017-07-24 20:28 UTC (permalink / raw)
  To: linux-kernel-dev
  Cc: Patrick Bruenn, Mark Rutland, Kevin Hilman, Jonathan Cameron,
	Thierry Reding, Maxime Ripard, Andreas Färber, Marek Vasut,
	Rask Ingemann Lambertsen, Greg Kroah-Hartman, David S. Miller,
	Mauro Carvalho Chehab,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

On Fri, Jul 21, 2017 at 06:06:39AM +0200, linux-kernel-dev@beckhoff.com wrote:
> From: Patrick Bruenn <p.bruenn@beckhoff.com>
> 
> - add vendor prefix bhf for Beckhoff
> - add new board binding bhf,cx9020
> 
> Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
> ---
>  Documentation/devicetree/bindings/arm/bhf.txt         | 6 ++++++
>  Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
>  MAINTAINERS                                           | 5 +++++
>  3 files changed, 12 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/bhf.txt

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v4 2/2] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-21  4:06   ` [PATCH v4 2/2] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
@ 2017-07-25  7:59     ` Shawn Guo
  2017-07-25 11:41       ` Patrick Brünn
  0 siblings, 1 reply; 19+ messages in thread
From: Shawn Guo @ 2017-07-25  7:59 UTC (permalink / raw)
  To: linux-kernel-dev
  Cc: Rob Herring, Mark Rutland, Russell King, Sascha Hauer,
	Fabio Estevam, Patrick Bruenn, Greg Kroah-Hartman,
	David S. Miller, Mauro Carvalho Chehab, open list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, Andrew Lunn

On Fri, Jul 21, 2017 at 06:06:40AM +0200, linux-kernel-dev@beckhoff.com wrote:
> From: Patrick Bruenn <p.bruenn@beckhoff.com>
> 
> The CX9020 differs from i.MX53 Quick Start Board by:
> - use uart2 instead of uart1
> - DVI-D connector instead of VGA
> - no audio
> - no SATA connector
> - CCAT FPGA connected to emi
> - enable rtc
> 
> Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>

Where is the patch 1/2?

> 
> ---
> 
> v4:
> - move alternative UART2 pinmux settings to imx53-pinfunc.h
> - fix copyright notice and model name to clearify cx9020 is a
>   Beckhoff board and not from Freescale/NXP/Qualcomm
> - add "bhf,cx9020" compatible
> - remove ccat node and pin configuration as long as the ccat
>   driver is not mainlined
> - use dvi-connector + ti,tfp410 instead of panel-simple
> - add newlines between property list and child nodes
> - replace underscores in node names with hypens
> - replace magic number 0 with polarity defines from
>   include/dt-bindings/gpio/gpio.h
> - move rtc node into imx53.dtsi, change it's name into 'srtc',
>   to avoid a conflict with 'rtc' node in imx53-m53.dtsi
> - rename regulator-3p2v
> - drop imx53-qsb container node
> - make iomux configuration explicit
> - remove unused audmux
> - remove unused led_pin_gpio3_23 configuration
> - use blue gpio-leds as disk-activity indicators for mmc0 and mmc1
> - add mmc indicator leds to sdhc pingroups
> - keep node names in alphabetical order
> - remove unused sata and ssi2
> - remove unused pin configs from hoggrp
> - add entry for imx53-cx9020.dts to MAINTAINERS
> 
> v3: add missig changelog
> v2:
> - keep alphabetic order of dts/Makefile
> - configure uart2 with 'fsl,dte-mode'
> - use display-0 and panel-0 as node names
> - remove unnecessary "simple-bus" for fixed regulators
> 
> Cc: Andrew Lunn <andrew@lunn.ch>
> ---
>  MAINTAINERS                        |   1 +

I do not take the changes on this file.

>  arch/arm/boot/dts/Makefile         |   1 +
>  arch/arm/boot/dts/imx53-cx9020.dts | 295 +++++++++++++++++++++++++++++++++++++
>  arch/arm/boot/dts/imx53-pinfunc.h  |   4 +
>  arch/arm/boot/dts/imx53.dtsi       |   9 ++

Please have separate patches for imx53-pinfunc.h and imx53.dtsi.  Do not
mix them up with board support dts changes.

>  5 files changed, 310 insertions(+)
>  create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1bf282843dc2..1bd06328f79b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1176,6 +1176,7 @@ ARM/BECKHOFF SUPPORT
>  M:	Patrick Bruenn <p.bruenn@beckhoff.com>
>  S:	Maintained
>  F:	Documentation/devicetree/bindings/arm/bhf.txt
> +F:	arch/arm/boot/dts/imx53-cx9020.dts
>  
>  ARM/CALXEDA HIGHBANK ARCHITECTURE
>  M:	Rob Herring <robh@kernel.org>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 4b17f35dc9a7..f0ba9be523e0 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
>  	imx51-ts4800.dtb
>  dtb-$(CONFIG_SOC_IMX53) += \
>  	imx53-ard.dtb \
> +	imx53-cx9020.dtb \
>  	imx53-m53evk.dtb \
>  	imx53-mba53.dtb \
>  	imx53-qsb.dtb \
> diff --git a/arch/arm/boot/dts/imx53-cx9020.dts b/arch/arm/boot/dts/imx53-cx9020.dts
> new file mode 100644
> index 000000000000..c4f9c89668c2
> --- /dev/null
> +++ b/arch/arm/boot/dts/imx53-cx9020.dts
> @@ -0,0 +1,295 @@
> +/*
> + * Copyright 2017 Beckhoff Automation GmbH & Co. KG
> + * based on imx53-qsb.dts
> + *
> + * 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 "imx53.dtsi"
> +
> +/ {
> +	model = "Beckhoff CX9020 Embedded PC";
> +	compatible = "bhf,cx9020", "fsl,imx53";
> +
> +	chosen {
> +		stdout-path = &uart2;
> +	};
> +
> +	memory {
> +		reg = <0x70000000 0x20000000>,
> +		      <0xb0000000 0x20000000>;
> +	};
> +
> +	display-0 {
> +		#address-cells =<1>;
> +		#size-cells = <0>;
> +		compatible = "fsl,imx-parallel-display";
> +		interface-pix-fmt = "rgb24";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_ipu_disp0>;
> +		status = "okay";

This status line is not necessary.  We usually use "okay" to toggle the
status which is set "disabled" in <soc>.dtsi.

> +
> +		port@0 {
> +			reg = <0>;
> +
> +			display0_in: endpoint {
> +				remote-endpoint = <&ipu_di0_disp0>;
> +			};
> +		};
> +
> +		port@1 {
> +			reg = <1>;
> +
> +			display0_out: endpoint {
> +				remote-endpoint = <&tfp410_in>;
> +			};
> +		};
> +	};
> +
> +	dvi-connector {
> +		compatible = "dvi-connector";
> +		ddc-i2c-bus = <&i2c2>;
> +		digital;
> +
> +		port {
> +			dvi_connector_in: endpoint {
> +				remote-endpoint = <&tfp410_out>;
> +			};
> +		};
> +	};
> +
> +	dvi-converter {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		compatible = "ti,tfp410";
> +
> +		port@0 {
> +			reg = <0>;
> +
> +			tfp410_in: endpoint {
> +				remote-endpoint = <&display0_out>;
> +			};
> +		};
> +
> +		port@1 {
> +			reg = <1>;
> +
> +			tfp410_out: endpoint {
> +				remote-endpoint = <&dvi_connector_in>;
> +			};
> +		};
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		pwr-r {
> +			gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
> +			default-state = "off";
> +		};
> +
> +		pwr-g {
> +			gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>;
> +			default-state = "on";
> +		};
> +
> +		pwr-b {
> +			gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
> +			default-state = "off";
> +		};
> +
> +		sd1-b {
> +			linux,default-trigger = "mmc0";
> +			gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		sd2-b {
> +			linux,default-trigger = "mmc1";
> +			gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +
> +	regulator-3p2v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "3P2V";
> +		regulator-min-microvolt = <3200000>;
> +		regulator-max-microvolt = <3200000>;
> +		regulator-always-on;
> +	};
> +
> +	reg_usb_vbus: regulator {

The node name "regulator" is too generic.  The "regulator-vbus"
might be the one you want to use.

Shawn

> +		compatible = "regulator-fixed";
> +		regulator-name = "usb_vbus";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +};

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

* RE: [PATCH v4 2/2] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-25  7:59     ` Shawn Guo
@ 2017-07-25 11:41       ` Patrick Brünn
  2017-07-25 13:17         ` Shawn Guo
  0 siblings, 1 reply; 19+ messages in thread
From: Patrick Brünn @ 2017-07-25 11:41 UTC (permalink / raw)
  To: Shawn Guo, linux-kernel-dev
  Cc: Rob Herring, Mark Rutland, Russell King, Sascha Hauer,
	Fabio Estevam, Greg Kroah-Hartman, David S. Miller,
	Mauro Carvalho Chehab, open list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, Andrew Lunn

>From: Shawn Guo [mailto:shawnguo@kernel.org]
>On Fri, Jul 21, 2017 at 06:06:40AM +0200, linux-kernel-dev@beckhoff.com
>wrote:
>> From: Patrick Bruenn <p.bruenn@beckhoff.com>
>>
>> The CX9020 differs from i.MX53 Quick Start Board by:
>> - use uart2 instead of uart1
>> - DVI-D connector instead of VGA
>> - no audio
>> - no SATA connector
>> - CCAT FPGA connected to emi
>> - enable rtc
>>
>> Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
>
>Where is the patch 1/2?
>
You can find a copy here [1], or wait for the next revision, I will try to improve my git send-mail skills until then.
I used git send-email with "--to-cmd ./scripts/get_maintainer.pl" to send the series. I just
discovered it would have been better to use To: and Cc: in the cover letter and send with
"--to-cover --cc-cover".
I will drop "--in-reply-to" for the next revision, too...
Is there something like patman [2] from the u-boot project for the kernel, that I am missing?
>>
>> ---
>>
>> v4:
>> - move alternative UART2 pinmux settings to imx53-pinfunc.h
>> - fix copyright notice and model name to clearify cx9020 is a
>>   Beckhoff board and not from Freescale/NXP/Qualcomm
>> - add "bhf,cx9020" compatible
>> - remove ccat node and pin configuration as long as the ccat
>>   driver is not mainlined
>> - use dvi-connector + ti,tfp410 instead of panel-simple
>> - add newlines between property list and child nodes
>> - replace underscores in node names with hypens
>> - replace magic number 0 with polarity defines from
>>   include/dt-bindings/gpio/gpio.h
>> - move rtc node into imx53.dtsi, change it's name into 'srtc',
>>   to avoid a conflict with 'rtc' node in imx53-m53.dtsi
>> - rename regulator-3p2v
>> - drop imx53-qsb container node
>> - make iomux configuration explicit
>> - remove unused audmux
>> - remove unused led_pin_gpio3_23 configuration
>> - use blue gpio-leds as disk-activity indicators for mmc0 and mmc1
>> - add mmc indicator leds to sdhc pingroups
>> - keep node names in alphabetical order
>> - remove unused sata and ssi2
>> - remove unused pin configs from hoggrp
>> - add entry for imx53-cx9020.dts to MAINTAINERS
>>
>> v3: add missig changelog
>> v2:
>> - keep alphabetic order of dts/Makefile
>> - configure uart2 with 'fsl,dte-mode'
>> - use display-0 and panel-0 as node names
>> - remove unnecessary "simple-bus" for fixed regulators
>>
>> Cc: Andrew Lunn <andrew@lunn.ch>
>> ---
>>  MAINTAINERS                        |   1 +
>
>I do not take the changes on this file.
>
Do you mean you keep maintainership for imx53-cx9020.dts, or do you
mean I should group it in the patch which adds imx53-cx9020.dts?
I am fine with both and would be glad to have your guidance. I just
didn't understand clearly what was meant.

>>  arch/arm/boot/dts/Makefile         |   1 +
>>  arch/arm/boot/dts/imx53-cx9020.dts | 295
>+++++++++++++++++++++++++++++++++++++
>>  arch/arm/boot/dts/imx53-pinfunc.h  |   4 +
>>  arch/arm/boot/dts/imx53.dtsi       |   9 ++
>
>Please have separate patches for imx53-pinfunc.h and imx53.dtsi.  Do not
>mix them up with board support dts changes.
>
Okay, I will split it into three patches?
1. Adding SRTC to imx53.dtsi
2. Adding UART2 pinmux settings to imx53-pinfunc.h
3. Adding CX9020 board support

>>  5 files changed, 310 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 1bf282843dc2..1bd06328f79b 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -1176,6 +1176,7 @@ ARM/BECKHOFF SUPPORT
>>  M:  Patrick Bruenn <p.bruenn@beckhoff.com>
>>  S:  Maintained
>>  F:  Documentation/devicetree/bindings/arm/bhf.txt
>> +F:  arch/arm/boot/dts/imx53-cx9020.dts
>>
>>  ARM/CALXEDA HIGHBANK ARCHITECTURE
>>  M:  Rob Herring <robh@kernel.org>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 4b17f35dc9a7..f0ba9be523e0 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
>>      imx51-ts4800.dtb
>>  dtb-$(CONFIG_SOC_IMX53) += \
>>      imx53-ard.dtb \
>> +    imx53-cx9020.dtb \
>>      imx53-m53evk.dtb \
>>      imx53-mba53.dtb \
>>      imx53-qsb.dtb \
>> diff --git a/arch/arm/boot/dts/imx53-cx9020.dts
>b/arch/arm/boot/dts/imx53-cx9020.dts
>> new file mode 100644
>> index 000000000000..c4f9c89668c2
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/imx53-cx9020.dts
>> @@ -0,0 +1,295 @@
>> +/*
>> + * Copyright 2017 Beckhoff Automation GmbH & Co. KG
>> + * based on imx53-qsb.dts
>> + *
>> + * 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 "imx53.dtsi"
>> +
>> +/ {
>> +    model = "Beckhoff CX9020 Embedded PC";
>> +    compatible = "bhf,cx9020", "fsl,imx53";
>> +
>> +    chosen {
>> +            stdout-path = &uart2;
>> +    };
>> +
>> +    memory {
>> +            reg = <0x70000000 0x20000000>,
>> +                  <0xb0000000 0x20000000>;
>> +    };
>> +
>> +    display-0 {
>> +            #address-cells =<1>;
>> +            #size-cells = <0>;
>> +            compatible = "fsl,imx-parallel-display";
>> +            interface-pix-fmt = "rgb24";
>> +            pinctrl-names = "default";
>> +            pinctrl-0 = <&pinctrl_ipu_disp0>;
>> +            status = "okay";
>
>This status line is not necessary.  We usually use "okay" to toggle the
>status which is set "disabled" in <soc>.dtsi.
>
I will drop it in v5
>> +
>> +            port@0 {
>> +                    reg = <0>;
>> +
>> +                    display0_in: endpoint {
>> +                            remote-endpoint = <&ipu_di0_disp0>;
>> +                    };
>> +            };
>> +
>> +            port@1 {
>> +                    reg = <1>;
>> +
>> +                    display0_out: endpoint {
>> +                            remote-endpoint = <&tfp410_in>;
>> +                    };
>> +            };
>> +    };
>> +
>> +    dvi-connector {
>> +            compatible = "dvi-connector";
>> +            ddc-i2c-bus = <&i2c2>;
>> +            digital;
>> +
>> +            port {
>> +                    dvi_connector_in: endpoint {
>> +                            remote-endpoint = <&tfp410_out>;
>> +                    };
>> +            };
>> +    };
>> +
>> +    dvi-converter {
>> +            #address-cells = <1>;
>> +            #size-cells = <0>;
>> +            compatible = "ti,tfp410";
>> +
>> +            port@0 {
>> +                    reg = <0>;
>> +
>> +                    tfp410_in: endpoint {
>> +                            remote-endpoint = <&display0_out>;
>> +                    };
>> +            };
>> +
>> +            port@1 {
>> +                    reg = <1>;
>> +
>> +                    tfp410_out: endpoint {
>> +                            remote-endpoint = <&dvi_connector_in>;
>> +                    };
>> +            };
>> +    };
>> +
>> +    leds {
>> +            compatible = "gpio-leds";
>> +
>> +            pwr-r {
>> +                    gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
>> +                    default-state = "off";
>> +            };
>> +
>> +            pwr-g {
>> +                    gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>;
>> +                    default-state = "on";
>> +            };
>> +
>> +            pwr-b {
>> +                    gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
>> +                    default-state = "off";
>> +            };
>> +
>> +            sd1-b {
>> +                    linux,default-trigger = "mmc0";
>> +                    gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
>> +            };
>> +
>> +            sd2-b {
>> +                    linux,default-trigger = "mmc1";
>> +                    gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>;
>> +            };
>> +    };
>> +
>> +    regulator-3p2v {
>> +            compatible = "regulator-fixed";
>> +            regulator-name = "3P2V";
>> +            regulator-min-microvolt = <3200000>;
>> +            regulator-max-microvolt = <3200000>;
>> +            regulator-always-on;
>> +    };
>> +
>> +    reg_usb_vbus: regulator {
>
>The node name "regulator" is too generic.  The "regulator-vbus"
>might be the one you want to use.
>
Okay, I will call it " regulator-vbus" in the next version
>Shawn
>
Thanks a lot for your time and patience,
Patrick

[1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1450310.html
[2] http://git.denx.de/?p=u-boot.git;a=blob;f=tools/patman/README
Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075

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

* Re: [PATCH v4 2/2] ARM: dts: imx: add CX9020 Embedded PC device tree
  2017-07-25 11:41       ` Patrick Brünn
@ 2017-07-25 13:17         ` Shawn Guo
  0 siblings, 0 replies; 19+ messages in thread
From: Shawn Guo @ 2017-07-25 13:17 UTC (permalink / raw)
  To: Patrick Brünn
  Cc: linux-kernel-dev, Rob Herring, Mark Rutland, Russell King,
	Sascha Hauer, Fabio Estevam, Greg Kroah-Hartman, David S. Miller,
	Mauro Carvalho Chehab, open list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, Andrew Lunn

On Tue, Jul 25, 2017 at 11:41:56AM +0000, Patrick Brünn wrote:
> >From: Shawn Guo [mailto:shawnguo@kernel.org]
> >On Fri, Jul 21, 2017 at 06:06:40AM +0200, linux-kernel-dev@beckhoff.com
> >wrote:
> >> From: Patrick Bruenn <p.bruenn@beckhoff.com>
> >>
> >> The CX9020 differs from i.MX53 Quick Start Board by:
> >> - use uart2 instead of uart1
> >> - DVI-D connector instead of VGA
> >> - no audio
> >> - no SATA connector
> >> - CCAT FPGA connected to emi
> >> - enable rtc
> >>
> >> Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
> >
> >Where is the patch 1/2?
> >
> You can find a copy here [1], or wait for the next revision, I will try to improve my git send-mail skills until then.
> I used git send-email with "--to-cmd ./scripts/get_maintainer.pl" to send the series. I just
> discovered it would have been better to use To: and Cc: in the cover letter and send with
> "--to-cover --cc-cover".
> I will drop "--in-reply-to" for the next revision, too...
> Is there something like patman [2] from the u-boot project for the kernel, that I am missing?

I do not use anything like that, but always manually edit recipients.
It's a bit silly, but can make the recipients more precise and limited.

> >>
> >> ---
> >>
> >> v4:
> >> - move alternative UART2 pinmux settings to imx53-pinfunc.h
> >> - fix copyright notice and model name to clearify cx9020 is a
> >>   Beckhoff board and not from Freescale/NXP/Qualcomm
> >> - add "bhf,cx9020" compatible
> >> - remove ccat node and pin configuration as long as the ccat
> >>   driver is not mainlined
> >> - use dvi-connector + ti,tfp410 instead of panel-simple
> >> - add newlines between property list and child nodes
> >> - replace underscores in node names with hypens
> >> - replace magic number 0 with polarity defines from
> >>   include/dt-bindings/gpio/gpio.h
> >> - move rtc node into imx53.dtsi, change it's name into 'srtc',
> >>   to avoid a conflict with 'rtc' node in imx53-m53.dtsi
> >> - rename regulator-3p2v
> >> - drop imx53-qsb container node
> >> - make iomux configuration explicit
> >> - remove unused audmux
> >> - remove unused led_pin_gpio3_23 configuration
> >> - use blue gpio-leds as disk-activity indicators for mmc0 and mmc1
> >> - add mmc indicator leds to sdhc pingroups
> >> - keep node names in alphabetical order
> >> - remove unused sata and ssi2
> >> - remove unused pin configs from hoggrp
> >> - add entry for imx53-cx9020.dts to MAINTAINERS
> >>
> >> v3: add missig changelog
> >> v2:
> >> - keep alphabetic order of dts/Makefile
> >> - configure uart2 with 'fsl,dte-mode'
> >> - use display-0 and panel-0 as node names
> >> - remove unnecessary "simple-bus" for fixed regulators
> >>
> >> Cc: Andrew Lunn <andrew@lunn.ch>
> >> ---
> >>  MAINTAINERS                        |   1 +
> >
> >I do not take the changes on this file.
> >
> Do you mean you keep maintainership for imx53-cx9020.dts, or do you
> mean I should group it in the patch which adds imx53-cx9020.dts?
> I am fine with both and would be glad to have your guidance. I just
> didn't understand clearly what was meant.

I meant that I do not have the authority to take patches that update
MAINTAINERS file.  But now I think we do not even need to update
MAINTAINERS just for imx53-cx9020.dts, since we already have IMX
maintainer-ship covering all IMX dts files.

ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
...
F:      arch/arm/boot/dts/imx*

Shawn

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

end of thread, other threads:[~2017-07-25 13:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  9:04 [PATCH] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
2017-07-12  9:46 ` Mark Rutland
2017-07-12 11:46   ` Patrick Brünn
2017-07-12 14:42 ` Andrew Lunn
2017-07-13  3:00   ` Patrick Brünn
2017-07-13 11:04 ` [PATCH v2 0/2] Add CX9020 " linux-kernel-dev
2017-07-13 11:04   ` [PATCH v2 1/2] ARM: dts: imx: add CX9020 Embedded PC " linux-kernel-dev
2017-07-13 11:04   ` [PATCH v2 2/2] drm/panel: simple: Add support for ddc-only panel linux-kernel-dev
2017-07-14 14:15     ` Rob Herring
2017-07-13 11:13 ` [PATCH v3 0/2] Add CX9020 device tree linux-kernel-dev
2017-07-13 11:13   ` [PATCH v3 1/2] ARM: dts: imx: add CX9020 Embedded PC " linux-kernel-dev
2017-07-14  2:16     ` Shawn Guo
2017-07-13 11:13   ` [PATCH v3 2/2] drm/panel: simple: Add support for ddc-only panel linux-kernel-dev
     [not found] ` <20170721040640.31424-1-linux-kernel-dev@beckhoff.com>
2017-07-21  4:06   ` [PATCH v4 1/2] dt-bindings: arm: Add entry for Beckhoff CX9020 linux-kernel-dev
2017-07-24 20:28     ` Rob Herring
2017-07-21  4:06   ` [PATCH v4 2/2] ARM: dts: imx: add CX9020 Embedded PC device tree linux-kernel-dev
2017-07-25  7:59     ` Shawn Guo
2017-07-25 11:41       ` Patrick Brünn
2017-07-25 13:17         ` 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).