ARM: dts: imx: sabrelite: add video capture ports and endpoints

Defines the host v4l2-capture device node and an OV5642 camera sensor
node on i2c2. The host capture device is a child of ipu1. An OV5642
parallel-bus endpoint is defined that connects to the host parallel-bus
endpoint on CSI0, using the OF graph bindings described in
Documentation/devicetree/bindings/media/video-interfaces.txt.

ote 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 is disabled, enable by uncommenting __OV5642_CAPTURE__ macro.
Ethernet will still work just not quite as well.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
ARM: dts: imx6-sabresd: add video capture ports and endpoints

Defines the host v4l2-capture device node and two camera sensors:
parallel-bus OV5642 and MIPI CSI-2 OV5640. The host capture device
is a child of ipu1. The MIPI CSI-2 receiver device is also defined.

The OV5642 is connected to the host parallel-bus endpoint on CSI0,
and the OV5640 is connected to the host MIPI CSI-2 endpoint on CSI1,
over virtual channel 0.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
ARM: dts: imx6-sabreauto: add video capture ports and endpoints

Defines the host v4l2-capture device node and the ADV7180 decoder
sensor. The host capture device is a child of ipu1. The ADV7180 is
connected to the host parallel-bus endpoint on CSI0.

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 host endpoint node on CSI0.

Regulators and port expanders are defined which are required for the
ADV7180 (power pin is via port expander gpio on i2c3). The reset pin
to the port expander chip (MAX7310) is controlled by a gpio, so define
the reset-gpios property to control it.

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).

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
ARM: imx6dl: Add iomux field defines for imx6dl

Start adding iomux field defines for imx6dl. Adds GPR13 fields for
MIPI-CSI2/Parallel video mux selection.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
ARM: imx: Add imx6 video capture platform_data

Adds platform_data for imx6 v4l2 video capture device. Implements
set_video_mux(), which sets the video capture mux in IOMUXC, which
selects between MIPI CSI-2 gasket and Parallel camera sensor
interface.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
gpio: pca953x: Add reset-gpios property

Add optional reset-gpios property. If present, de-assert the
specified reset gpio pin to bring the chip out of reset.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
media: imx6: Add device tree binding documentation

Add device tree binding documentation for i.MX6 media devices.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
media: Add new camera interface driver for i.MX6

This is a V4L2 camera interface driver for i.MX6. See
Documentation/video4linux/mx6_camera.txt.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>