All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes
@ 2016-07-06 23:36 Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 1/6] ARM: dts: imx6-sabrelite: add video capture devices and connections Steve Longerbeam
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Steve Longerbeam @ 2016-07-06 23:36 UTC (permalink / raw)
  To: linux-media; +Cc: Steve Longerbeam

Steve Longerbeam (6):
  ARM: dts: imx6-sabrelite: add video capture devices and connections
  ARM: dts: imx6-sabresd: add video capture devices and connections
  ARM: dts: imx6-sabreauto: create i2cmux for i2c3
  ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b
  ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture
  ARM: dts: imx6-sabreauto: add video capture devices and connections

 arch/arm/boot/dts/imx6dl-sabresd.dts     |  42 +++++++++
 arch/arm/boot/dts/imx6q-sabresd.dts      |  14 +++
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 154 ++++++++++++++++++++++++++-----
 arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |  95 +++++++++++++++++++
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi   | 130 +++++++++++++++++++++++++-
 5 files changed, 413 insertions(+), 22 deletions(-)

-- 
1.9.1


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

* [PATCH 1/6] ARM: dts: imx6-sabrelite: add video capture devices and connections
  2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
@ 2016-07-06 23:36 ` Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 2/6] ARM: dts: imx6-sabresd: " Steve Longerbeam
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Steve Longerbeam @ 2016-07-06 23:36 UTC (permalink / raw)
  To: linux-media; +Cc: Steve Longerbeam

Defines the host video capture device and the OV5642 parallel-bus sensor.
The host capture device connects to the OV5642 via the parallel-bus mux
input on the ipu1_csi0_mux.

Note there is a pin conflict with GPIO6. This pin functions as a power
input pin to the OV5642, but ENET requires it to wake-up the ARM cores
on normal RX and TX packet done events (see 6261c4c8). So by default,
capture from the OV5642 is disabled, enable by uncommenting __ENABLE_OV5642__
macro. Ethernet will still work just not quite as well.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 95 ++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
index c47fe6c..2ad3a03 100644
--- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
@@ -39,9 +39,20 @@
  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
+
+#include <dt-bindings/clock/imx6qdl-clock.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
+/*
+ * Uncomment the following macro to enable OV5642 video capture
+ * support. There is a pin conflict for GPIO6 between ENET wake-up
+ * interrupt function and power-down pin function for the OV5642.
+ * ENET will still work when enabling OV5642 capture, just not
+ * quite as well.
+ */
+/* #define __ENABLE_OV5642__ */
+
 / {
 	chosen {
 		stdout-path = &uart2;
@@ -218,7 +229,36 @@
 			};
 		};
 	};
+
+#ifdef __ENABLE_OV5642__
+	ipucap0: ipucap@0 {
+		compatible = "fsl,imx-video-capture";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu1_csi0>;
+		ports = <&ipu1_csi0>;
+		status = "okay";
+	};
+#endif
+};
+
+#ifdef __ENABLE_OV5642__
+&ipu1_csi0_from_ipu1_csi0_mux {
+	bus-width = <8>;
+	data-shift = <12>; /* Lines 19:12 used */
+	hsync-active = <1>;
+	vync-active = <1>;
+};
+
+&ipu1_csi0_mux_from_parallel_sensor {
+	remote-endpoint = <&ov5642_to_ipu1_csi0_mux>;
+};
+
+&ipu1_csi0_mux {
+	status = "okay";
 };
+#endif
 
 &audmux {
 	pinctrl-names = "default";
@@ -271,8 +311,11 @@
 	txd1-skew-ps = <0>;
 	txd2-skew-ps = <0>;
 	txd3-skew-ps = <0>;
+#ifndef __ENABLE_OV5642__
 	interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
 			      <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
+
+#endif
 	status = "okay";
 };
 
@@ -301,6 +344,30 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_i2c2>;
 	status = "okay";
+
+#ifdef __ENABLE_OV5642__
+	camera: ov5642@3c {
+		compatible = "ovti,ov5642";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ov5642>;
+		clocks = <&clks IMX6QDL_CLK_CKO2>;
+		clock-names = "xclk";
+		reg = <0x3c>;
+		xclk = <24000000>;
+		reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+		pwdn-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
+		gp-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
+
+		port {
+			ov5642_to_ipu1_csi0_mux: endpoint {
+				remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
+				bus-width = <8>;
+				hsync-active = <1>;
+				vsync-active = <1>;
+			};
+		};
+	};
+#endif
 };
 
 &i2c3 {
@@ -373,7 +440,9 @@
 				MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x1b0b0
 				/* Phy reset */
 				MX6QDL_PAD_EIM_D23__GPIO3_IO23		0x000b0
+#ifndef __ENABLE_OV5642__
 				MX6QDL_PAD_GPIO_6__ENET_IRQ		0x000b1
+#endif
 			>;
 		};
 
@@ -448,6 +517,32 @@
 			>;
 		};
 
+		pinctrl_ov5642: ov5642grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x80000000
+				MX6QDL_PAD_GPIO_6__GPIO1_IO06   0x80000000
+				MX6QDL_PAD_GPIO_8__GPIO1_IO08   0x80000000
+				MX6QDL_PAD_GPIO_3__CCM_CLKO2    0x80000000
+			>;
+		};
+
+		pinctrl_ipu1_csi0: ipu1grp-csi0 {
+			fsl,pins = <
+				MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12    0x80000000
+				MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13    0x80000000
+				MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14    0x80000000
+				MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15    0x80000000
+				MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16    0x80000000
+				MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17    0x80000000
+				MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18    0x80000000
+				MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19    0x80000000
+				MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x80000000
+				MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC      0x80000000
+				MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC     0x80000000
+				MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x80000000
+			>;
+		};
+
 		pinctrl_pwm1: pwm1grp {
 			fsl,pins = <
 				MX6QDL_PAD_SD1_DAT3__PWM1_OUT 0x1b0b1
-- 
1.9.1


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

* [PATCH 2/6] ARM: dts: imx6-sabresd: add video capture devices and connections
  2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 1/6] ARM: dts: imx6-sabrelite: add video capture devices and connections Steve Longerbeam
@ 2016-07-06 23:36 ` Steve Longerbeam
  2016-07-07  2:39   ` kbuild test robot
  2016-07-06 23:36 ` [PATCH 3/6] ARM: dts: imx6-sabreauto: create i2cmux for i2c3 Steve Longerbeam
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Steve Longerbeam @ 2016-07-06 23:36 UTC (permalink / raw)
  To: linux-media; +Cc: Steve Longerbeam

Defines two host video capture devices and two camera sensors:
parallel-bus OV5642 and MIPI CSI-2 OV5640.

One host capture device connects to the OV5642 via the parallel-bus
mux input on the ipu1_csi0_mux.

The other host capture device connects to the OV5640 via the MIPI CSI-2
receiver (directly on virtual channel 1 to ipu1_csi1 on imx6q, and
indirectly via the ipu1_csi1_mux on imx6dl).

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 arch/arm/boot/dts/imx6dl-sabresd.dts   |  42 +++++++++++
 arch/arm/boot/dts/imx6q-sabresd.dts    |  14 ++++
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 130 ++++++++++++++++++++++++++++++++-
 3 files changed, 185 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6dl-sabresd.dts b/arch/arm/boot/dts/imx6dl-sabresd.dts
index 1e45f2f..04ec884 100644
--- a/arch/arm/boot/dts/imx6dl-sabresd.dts
+++ b/arch/arm/boot/dts/imx6dl-sabresd.dts
@@ -15,3 +15,45 @@
 	model = "Freescale i.MX6 DualLite SABRE Smart Device Board";
 	compatible = "fsl,imx6dl-sabresd", "fsl,imx6dl";
 };
+
+&ipu1_csi1_from_ipu1_csi1_mux {
+	data-lanes = <0 1>;
+	clock-lanes = <2>;
+};
+
+&ipu1_csi1_mux {
+	status = "okay";
+};
+
+/*
+ * when the OV5642 sensor is enabled, the ipu1_csi0_mux is also enabled,
+ * but we don't want to find the OV5640 through ipu1_csi0_mux path to the
+ * mipi-csi2 receiver, so shutdown the link to the mipi-csi2 receiver at
+ * all virtual channels.
+*/
+&ipu1_csi0_mux_from_mipi_vc0 {
+	remote-endpoint = <>;
+};
+&ipu1_csi0_mux_from_mipi_vc1 {
+	remote-endpoint = <>;
+};
+&ipu1_csi0_mux_from_mipi_vc2 {
+	remote-endpoint = <>;
+};
+&ipu1_csi0_mux_from_mipi_vc3 {
+	remote-endpoint = <>;
+};
+
+/*
+ * shutdown links to mipi-csi2 channels 0,2,3 through ipu1_csi1_mux. The
+ * OV5640 is on VC1, so it must be found only on that ipu1_csi1_mux input.
+ */
+&ipu1_csi1_mux_from_mipi_vc0 {
+	remote-endpoint = <>;
+};
+&ipu1_csi1_mux_from_mipi_vc2 {
+	remote-endpoint = <>;
+};
+&ipu1_csi1_mux_from_mipi_vc3 {
+	remote-endpoint = <>;
+};
diff --git a/arch/arm/boot/dts/imx6q-sabresd.dts b/arch/arm/boot/dts/imx6q-sabresd.dts
index 9cbdfe7..03ae085 100644
--- a/arch/arm/boot/dts/imx6q-sabresd.dts
+++ b/arch/arm/boot/dts/imx6q-sabresd.dts
@@ -23,3 +23,17 @@
 &sata {
 	status = "okay";
 };
+
+&ipu1_csi1_from_mipi_vc1 {
+	data-lanes = <0 1>;
+	clock-lanes = <2>;
+};
+
+/*
+ * when the OV5642 sensor is enabled, the ipu1_csi0_mux is also enabled,
+ * but we don't want to find the OV5640 through ipu1_csi0_mux path, so
+ * shutdown the link to the mipi-csi2 receiver.
+*/
+&ipu1_csi0_mux_from_mipi_vc0 {
+	remote-endpoint = <>;
+};
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 5248e7b..3d39d4c 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -10,6 +10,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#include <dt-bindings/clock/imx6qdl-clock.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
@@ -144,6 +145,50 @@
 			};
 		};
 	};
+
+	ipucap0: ipucap@0 {
+		compatible = "fsl,imx-video-capture";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu1_csi0>;
+		ports = <&ipu1_csi0>;
+		status = "okay";
+	};
+
+	ipucap1: ipucap@1 {
+		compatible = "fsl,imx-video-capture";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		ports = <&ipu1_csi1>;
+		status = "okay";
+	};
+};
+
+&ipu1_csi0_from_ipu1_csi0_mux {
+	bus-width = <8>;
+	data-shift = <12>; /* Lines 19:12 used */
+	hsync-active = <1>;
+	vsync-active = <1>;
+};
+
+&ipu1_csi0_mux_from_parallel_sensor {
+	remote-endpoint = <&ov5642_to_ipu1_csi0_mux>;
+};
+
+&ipu1_csi0_mux {
+	status = "okay";
+};
+
+&mipi_csi {
+	status = "okay";
+};
+
+/* Incoming port from sensor */
+&mipi_csi_from_mipi_sensor {
+	remote-endpoint = <&ov5640_to_mipi_csi>;
+	data-lanes = <0 1>;
+	clock-lanes = <2>;
 };
 
 &audmux {
@@ -214,7 +259,32 @@
 			0x8014 /* 4:FN_DMICCDAT */
 			0x0000 /* 5:Default */
 		>;
-       };
+	};
+
+	camera: ov5642@3c {
+		compatible = "ovti,ov5642";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ov5642>;
+		clocks = <&clks IMX6QDL_CLK_CKO>;
+		clock-names = "xclk";
+		reg = <0x3c>;
+		xclk = <24000000>;
+		DOVDD-supply = <&vgen4_reg>; /* 1.8v */
+		AVDD-supply = <&vgen5_reg>;  /* 2.8v, rev C board is VGEN3
+			      		     	rev B board is VGEN5 */
+		DVDD-supply = <&vgen2_reg>;  /* 1.5v*/
+		pwdn-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; /* SD1_DAT0 */
+		reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; /* SD1_DAT1 */
+
+		port {
+			ov5642_to_ipu1_csi0_mux: endpoint {
+				remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
+				bus-width = <8>;
+				hsync-active = <1>;
+				vsync-active = <1>;
+			};
+		};
+	};
 };
 
 &i2c2 {
@@ -322,6 +392,34 @@
 			};
 		};
 	};
+
+	mipi_camera: ov5640@3c {
+		compatible = "ovti,ov5640_mipi";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ov5640>;
+		reg = <0x3c>;
+		clocks = <&clks IMX6QDL_CLK_CKO>;
+		clock-names = "xclk";
+		xclk = <24000000>;
+		DOVDD-supply = <&vgen4_reg>; /* 1.8v */
+		AVDD-supply = <&vgen5_reg>;  /* 2.8v, rev C board is VGEN3
+			      		     	rev B board is VGEN5 */
+		DVDD-supply = <&vgen2_reg>;  /* 1.5v*/
+		pwdn-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; /* SD1_DAT2 */
+		reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; /* SD1_CLK */
+
+		port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ov5640_to_mipi_csi: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&mipi_csi_from_mipi_sensor>;
+				data-lanes = <0 1>;
+				clock-lanes = <2>;
+			};
+		};
+	};
 };
 
 &i2c3 {
@@ -426,6 +524,36 @@
 			>;
 		};
 
+		pinctrl_ov5640: ov5640grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD1_DAT2__GPIO1_IO19 0x80000000
+				MX6QDL_PAD_SD1_CLK__GPIO1_IO20  0x80000000
+			>;
+		};
+
+		pinctrl_ov5642: ov5642grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x80000000
+				MX6QDL_PAD_SD1_DAT1__GPIO1_IO17 0x80000000
+			>;
+		};
+
+		pinctrl_ipu1_csi0: ipu1grp-csi0 {
+			fsl,pins = <
+				MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12    0x80000000
+				MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13    0x80000000
+				MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14    0x80000000
+				MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15    0x80000000
+				MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16    0x80000000
+				MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17    0x80000000
+				MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18    0x80000000
+				MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19    0x80000000
+				MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x80000000
+				MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC      0x80000000
+				MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC     0x80000000
+			>;
+		};
+
 		pinctrl_pcie: pciegrp {
 			fsl,pins = <
 				MX6QDL_PAD_GPIO_17__GPIO7_IO12	0x1b0b0
-- 
1.9.1


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

* [PATCH 3/6] ARM: dts: imx6-sabreauto: create i2cmux for i2c3
  2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 1/6] ARM: dts: imx6-sabrelite: add video capture devices and connections Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 2/6] ARM: dts: imx6-sabresd: " Steve Longerbeam
@ 2016-07-06 23:36 ` Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 4/6] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b Steve Longerbeam
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Steve Longerbeam @ 2016-07-06 23:36 UTC (permalink / raw)
  To: linux-media; +Cc: Steve Longerbeam

The sabreauto uses a steering pin to select between the SDA signal on
i2c3 bus, and a data-in pin for an SPI NOR chip. Use i2cmux to control
this steering pin. Idle state of the i2cmux selects SPI NOR. This is not
a classic way to use i2cmux, since one side of the mux selects something
other than an i2c bus, but it works and is probably the cleanest
solution. Note that if one thread is attempting to access SPI NOR while
another thread is accessing i2c3, the SPI NOR access will fail since the
i2cmux has selected the SDA pin rather than SPI NOR data-in. This couldn't
be avoided in any case, the board is not designed to allow concurrent
i2c3 and SPI NOR functions (and the default device-tree does not enable
SPI NOR anyway).

Devices hanging off i2c3 should now be defined under i2cmux, so
that the steering pin can be properly controlled to access those
devices. The port expanders (MAX7310) are thus moved into i2cmux.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 65 +++++++++++++++++++++-----------
 1 file changed, 44 insertions(+), 21 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index d354d40..13f50e8 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -108,6 +108,44 @@
 		default-brightness-level = <7>;
 		status = "okay";
 	};
+
+	i2cmux {
+		compatible = "i2c-mux-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_i2c3mux>;
+		mux-gpios = <&gpio5 4 0>;
+		i2c-parent = <&i2c3>;
+		idle-state = <0>;
+
+		i2c@1 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <1>;
+
+			max7310_a: gpio@30 {
+				compatible = "maxim,max7310";
+				reg = <0x30>;
+				gpio-controller;
+				#gpio-cells = <2>;
+			};
+
+			max7310_b: gpio@32 {
+				compatible = "maxim,max7310";
+				reg = <0x32>;
+				gpio-controller;
+				#gpio-cells = <2>;
+			};
+
+			max7310_c: gpio@34 {
+				compatible = "maxim,max7310";
+				reg = <0x34>;
+				gpio-controller;
+				#gpio-cells = <2>;
+			};
+		};
+	};
 };
 
 &clks {
@@ -290,27 +328,6 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_i2c3>;
 	status = "okay";
-
-	max7310_a: gpio@30 {
-		compatible = "maxim,max7310";
-		reg = <0x30>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
-
-	max7310_b: gpio@32 {
-		compatible = "maxim,max7310";
-		reg = <0x32>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
-
-	max7310_c: gpio@34 {
-		compatible = "maxim,max7310";
-		reg = <0x34>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
 };
 
 &iomuxc {
@@ -418,6 +435,12 @@
 			>;
 		};
 
+		pinctrl_i2c3mux: i2c3muxgrp {
+			fsl,pins = <
+				MX6QDL_PAD_EIM_A24__GPIO5_IO04 0x80000000
+			>;
+		};
+
 		pinctrl_pwm3: pwm1grp {
 			fsl,pins = <
 				MX6QDL_PAD_SD4_DAT1__PWM3_OUT		0x1b0b1
-- 
1.9.1


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

* [PATCH 4/6] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b
  2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
                   ` (2 preceding siblings ...)
  2016-07-06 23:36 ` [PATCH 3/6] ARM: dts: imx6-sabreauto: create i2cmux for i2c3 Steve Longerbeam
@ 2016-07-06 23:36 ` Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 5/6] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Steve Longerbeam
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Steve Longerbeam @ 2016-07-06 23:36 UTC (permalink / raw)
  To: linux-media; +Cc: Steve Longerbeam

The reset pin to the port expander chip (MAX7310) is controlled by a gpio,
so define a reset-gpios property to control it. There are three MAX7310's
on the SabreAuto CPU card (max7310_[abc]), but all use the same pin for
their reset. Since all can't acquire the same pin, assign it to max7310_b,
that chip is needed by more functions (usb and adv7180).

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 13f50e8..3f12d74 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -136,6 +136,9 @@
 				reg = <0x32>;
 				gpio-controller;
 				#gpio-cells = <2>;
+				pinctrl-names = "default";	
+				pinctrl-0 = <&pinctrl_max7310>;
+				reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 			};
 
 			max7310_c: gpio@34 {
@@ -441,6 +444,12 @@
 			>;
 		};
 
+		pinctrl_max7310: max7310grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD2_DAT0__GPIO1_IO15 0x80000000
+			>;
+		};
+
 		pinctrl_pwm3: pwm1grp {
 			fsl,pins = <
 				MX6QDL_PAD_SD4_DAT1__PWM3_OUT		0x1b0b1
-- 
1.9.1


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

* [PATCH 5/6] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture
  2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
                   ` (3 preceding siblings ...)
  2016-07-06 23:36 ` [PATCH 4/6] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b Steve Longerbeam
@ 2016-07-06 23:36 ` Steve Longerbeam
  2016-07-06 23:36 ` [PATCH 6/6] ARM: dts: imx6-sabreauto: add video capture devices and connections Steve Longerbeam
  2016-07-07 13:24 ` [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Tim Harvey
  6 siblings, 0 replies; 10+ messages in thread
From: Steve Longerbeam @ 2016-07-06 23:36 UTC (permalink / raw)
  To: linux-media; +Cc: Steve Longerbeam

Add pinctrl groups for both GPT input capture channels.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 3f12d74..737bb54 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -456,6 +456,18 @@
 			>;
 		};
 
+		pinctrl_gpt_input_capture0: gptinputcapture0grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD1_DAT0__GPT_CAPTURE1	0x80000000
+			>;
+		};
+
+		pinctrl_gpt_input_capture1: gptinputcapture1grp {
+			fsl,pins = <
+				MX6QDL_PAD_SD1_DAT1__GPT_CAPTURE2	0x80000000
+			>;
+		};
+
 		pinctrl_spdif: spdifgrp {
 			fsl,pins = <
 				MX6QDL_PAD_KEY_COL3__SPDIF_IN 0x1b0b0
-- 
1.9.1


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

* [PATCH 6/6] ARM: dts: imx6-sabreauto: add video capture devices and connections
  2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
                   ` (4 preceding siblings ...)
  2016-07-06 23:36 ` [PATCH 5/6] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Steve Longerbeam
@ 2016-07-06 23:36 ` Steve Longerbeam
  2016-07-07  3:38   ` kbuild test robot
  2016-07-07 13:24 ` [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Tim Harvey
  6 siblings, 1 reply; 10+ messages in thread
From: Steve Longerbeam @ 2016-07-06 23:36 UTC (permalink / raw)
  To: linux-media; +Cc: Steve Longerbeam

Defines the host video capture device node and the ADV7180 decoder
sensor. The host capture device connects to the ADV7180 via the
parallel-bus mux input on the ipu1_csi0_mux.

On the sabreauto, two analog video inputs are routed to the ADV7180,
composite on Ain1, and composite on Ain3. Those inputs are defined
via inputs and input-names under the endpoint node
ipu1_csi0_from_ipu1_csi0_mux. The ADV7180 power pin is via max7310_b
port expander.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 68 ++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 737bb54..ec952b1 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -147,10 +147,54 @@
 				gpio-controller;
 				#gpio-cells = <2>;
 			};
+
+			camera: adv7180@21 {
+				compatible = "adi,adv7180";
+				reg = <0x21>;
+				pwdn-gpios = <&max7310_b 2 GPIO_ACTIVE_LOW>;
+				interrupt-parent = <&gpio1>;
+				interrupts = <27 0x8>;
+
+				port {
+					adv7180_to_ipu1_csi0_mux: endpoint {
+						remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
+						bus-width = <8>;
+					};
+				};
+			};
+		};
+	};
+
+	ipucap0: ipucap0 {
+		compatible = "fsl,imx-video-capture";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu1_csi0>;
+		ports = <&ipu1_csi0>;
+		status = "okay";
+
+		fim {
+			enable = <1>;
 		};
 	};
 };
 
+&ipu1_csi0_from_ipu1_csi0_mux {
+	bus-width = <8>;
+};
+
+&ipu1_csi0_mux_from_parallel_sensor {
+	remote-endpoint = <&adv7180_to_ipu1_csi0_mux>;
+	inputs = <0x00 0x02>;
+	input-names = "ADV7180 Composite on Ain1",
+			"ADV7180 Composite on Ain3";
+};
+
+&ipu1_csi0_mux {
+	status = "okay";
+};
+
 &clks {
 	assigned-clocks = <&clks IMX6QDL_PLL4_BYPASS_SRC>,
 			  <&clks IMX6QDL_PLL4_BYPASS>,
@@ -450,6 +494,30 @@
 			>;
 		};
 
+		pinctrl_ipu1_csi0: ipu1grp-csi0 {
+			fsl,pins = <
+				MX6QDL_PAD_CSI0_DAT4__IPU1_CSI0_DATA04   0x80000000
+				MX6QDL_PAD_CSI0_DAT5__IPU1_CSI0_DATA05   0x80000000
+				MX6QDL_PAD_CSI0_DAT6__IPU1_CSI0_DATA06   0x80000000
+				MX6QDL_PAD_CSI0_DAT7__IPU1_CSI0_DATA07   0x80000000
+				MX6QDL_PAD_CSI0_DAT8__IPU1_CSI0_DATA08   0x80000000
+				MX6QDL_PAD_CSI0_DAT9__IPU1_CSI0_DATA09   0x80000000
+				MX6QDL_PAD_CSI0_DAT10__IPU1_CSI0_DATA10  0x80000000
+				MX6QDL_PAD_CSI0_DAT11__IPU1_CSI0_DATA11  0x80000000
+				MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12  0x80000000
+				MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13  0x80000000
+				MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14  0x80000000
+				MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15  0x80000000
+				MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16  0x80000000
+				MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17  0x80000000
+				MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18  0x80000000
+				MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19  0x80000000
+				MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK 0x80000000
+				MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC    0x80000000
+				MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC   0x80000000
+			>;
+		};
+
 		pinctrl_pwm3: pwm1grp {
 			fsl,pins = <
 				MX6QDL_PAD_SD4_DAT1__PWM3_OUT		0x1b0b1
-- 
1.9.1


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

* Re: [PATCH 2/6] ARM: dts: imx6-sabresd: add video capture devices and connections
  2016-07-06 23:36 ` [PATCH 2/6] ARM: dts: imx6-sabresd: " Steve Longerbeam
@ 2016-07-07  2:39   ` kbuild test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2016-07-07  2:39 UTC (permalink / raw)
  To: Steve Longerbeam; +Cc: kbuild-all, linux-media, Steve Longerbeam

[-- Attachment #1: Type: text/plain, Size: 3486 bytes --]

Hi,

[auto build test ERROR on v4.7-rc6]
[cannot apply to shawnguo/for-next next-20160706]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Steve-Longerbeam/ARM-dts-imx6-sabre-add-video-capture-nodes/20160707-074043
config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:168.1-30 Label or path ipu1_csi0_from_ipu1_csi0_mux not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:175.1-36 Label or path ipu1_csi0_mux_from_parallel_sensor not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:179.1-15 Label or path ipu1_csi0_mux not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:188.1-27 Label or path mipi_csi_from_mipi_sensor not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:19.1-30 Label or path ipu1_csi1_from_ipu1_csi1_mux not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:24.1-15 Label or path ipu1_csi1_mux not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:34.1-29 Label or path ipu1_csi0_mux_from_mipi_vc0 not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:37.1-29 Label or path ipu1_csi0_mux_from_mipi_vc1 not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:40.1-29 Label or path ipu1_csi0_mux_from_mipi_vc2 not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:43.1-29 Label or path ipu1_csi0_mux_from_mipi_vc3 not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:51.1-29 Label or path ipu1_csi1_mux_from_mipi_vc0 not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:54.1-29 Label or path ipu1_csi1_mux_from_mipi_vc2 not found
>> Error: arch/arm/boot/dts/imx6dl-sabresd.dts:57.1-29 Label or path ipu1_csi1_mux_from_mipi_vc3 not found
   FATAL ERROR: Syntax error parsing input tree
--
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:168.1-30 Label or path ipu1_csi0_from_ipu1_csi0_mux not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:175.1-36 Label or path ipu1_csi0_mux_from_parallel_sensor not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:179.1-15 Label or path ipu1_csi0_mux not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:188.1-27 Label or path mipi_csi_from_mipi_sensor not found
>> Error: arch/arm/boot/dts/imx6q-sabresd.dts:27.1-25 Label or path ipu1_csi1_from_mipi_vc1 not found
>> Error: arch/arm/boot/dts/imx6q-sabresd.dts:37.1-29 Label or path ipu1_csi0_mux_from_mipi_vc0 not found
   FATAL ERROR: Syntax error parsing input tree
--
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:168.1-30 Label or path ipu1_csi0_from_ipu1_csi0_mux not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:175.1-36 Label or path ipu1_csi0_mux_from_parallel_sensor not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:179.1-15 Label or path ipu1_csi0_mux not found
>> Error: arch/arm/boot/dts/imx6qdl-sabresd.dtsi:188.1-27 Label or path mipi_csi_from_mipi_sensor not found
   FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37733 bytes --]

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

* Re: [PATCH 6/6] ARM: dts: imx6-sabreauto: add video capture devices and connections
  2016-07-06 23:36 ` [PATCH 6/6] ARM: dts: imx6-sabreauto: add video capture devices and connections Steve Longerbeam
@ 2016-07-07  3:38   ` kbuild test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2016-07-07  3:38 UTC (permalink / raw)
  To: Steve Longerbeam; +Cc: kbuild-all, linux-media, Steve Longerbeam

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

Hi,

[auto build test ERROR on v4.7-rc6]
[cannot apply to shawnguo/for-next next-20160706]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Steve-Longerbeam/ARM-dts-imx6-sabre-add-video-capture-nodes/20160707-074043
config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/imx6qdl-sabreauto.dtsi:183.1-30 Label or path ipu1_csi0_from_ipu1_csi0_mux not found
>> Error: arch/arm/boot/dts/imx6qdl-sabreauto.dtsi:187.1-36 Label or path ipu1_csi0_mux_from_parallel_sensor not found
>> Error: arch/arm/boot/dts/imx6qdl-sabreauto.dtsi:194.1-15 Label or path ipu1_csi0_mux not found
   FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37733 bytes --]

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

* Re: [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes
  2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
                   ` (5 preceding siblings ...)
  2016-07-06 23:36 ` [PATCH 6/6] ARM: dts: imx6-sabreauto: add video capture devices and connections Steve Longerbeam
@ 2016-07-07 13:24 ` Tim Harvey
  6 siblings, 0 replies; 10+ messages in thread
From: Tim Harvey @ 2016-07-07 13:24 UTC (permalink / raw)
  To: Steve Longerbeam; +Cc: linux-media, Steve Longerbeam

On Wed, Jul 6, 2016 at 4:36 PM, Steve Longerbeam <slongerbeam@gmail.com> wrote:
> Steve Longerbeam (6):
>   ARM: dts: imx6-sabrelite: add video capture devices and connections
>   ARM: dts: imx6-sabresd: add video capture devices and connections
>   ARM: dts: imx6-sabreauto: create i2cmux for i2c3
>   ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b
>   ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture
>   ARM: dts: imx6-sabreauto: add video capture devices and connections
>
>  arch/arm/boot/dts/imx6dl-sabresd.dts     |  42 +++++++++
>  arch/arm/boot/dts/imx6q-sabresd.dts      |  14 +++
>  arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 154 ++++++++++++++++++++++++++-----
>  arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |  95 +++++++++++++++++++
>  arch/arm/boot/dts/imx6qdl-sabresd.dtsi   | 130 +++++++++++++++++++++++++-
>  5 files changed, 413 insertions(+), 22 deletions(-)
>

Steve,

These should wait until your drivers make it to staging (or at least
reference that series to be clear they are somewhat dependent on
them).

Regards,

Tim

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

end of thread, other threads:[~2016-07-07 13:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 23:36 [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Steve Longerbeam
2016-07-06 23:36 ` [PATCH 1/6] ARM: dts: imx6-sabrelite: add video capture devices and connections Steve Longerbeam
2016-07-06 23:36 ` [PATCH 2/6] ARM: dts: imx6-sabresd: " Steve Longerbeam
2016-07-07  2:39   ` kbuild test robot
2016-07-06 23:36 ` [PATCH 3/6] ARM: dts: imx6-sabreauto: create i2cmux for i2c3 Steve Longerbeam
2016-07-06 23:36 ` [PATCH 4/6] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b Steve Longerbeam
2016-07-06 23:36 ` [PATCH 5/6] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Steve Longerbeam
2016-07-06 23:36 ` [PATCH 6/6] ARM: dts: imx6-sabreauto: add video capture devices and connections Steve Longerbeam
2016-07-07  3:38   ` kbuild test robot
2016-07-07 13:24 ` [PATCH 0/6] ARM: dts: imx6-sabre*: add video capture nodes Tim Harvey

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