iMX 6 parallel video input

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX 6 parallel video input

1,097 Views
john_schluechte
Contributor I

I have an iMX6 SOM from Variscite that is connected to cameras with a TW9990 sensor.  At the moment I have no measurable output from the sensor on the D0 data line into the SOM.  Is it possible that I do not have the SOM pins set correctly and this is preventing that chip from being able to drive anything other than a 200 mV level on that data line.

I have modified the device tree as follows

--- a/arch/arm/boot/dts/imx6qdl-var-som.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-var-som.dtsi
@@ -166,7 +166,7 @@
v4l2_cap_0 {
compatible = "fsl,imx6q-v4l2-capture";
ipu_id = <0>;
- csi_id = <1>;
+ csi_id = <0>;
mclk_source = <0>;
status = "okay";
};
@@ -256,23 +256,6 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1_2>;
status = "okay";
-
- ov564x_mipi: ov564x_mipi@3c {
- compatible = "ovti,ov564x_mipi";
- reg = <0x3c>;
- clocks = <&clks 200>;
- clock-names = "csi_mclk";
-#if 0
- DOVDD-supply = <&vgen4_reg>; /* 1.8v */
- AVDD-supply = <&vgen3_reg>; /* 2.8v, rev C board is VGEN3 rev B board is VGEN5 */
- DVDD-supply = <&vgen2_reg>; /* 1.5v*/
-#endif
- pwn-gpios = <&gpio3 13 1>;
- rst-gpios = <&gpio4 10 0>;
- csi_id = <1>;
- mclk = <24000000>;
- mclk_source = <0>;
- };
};

&i2c2 {
@@ -284,6 +284,21 @@
5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */
>;
};
+
+ tw9990: tw9990@44 {
+ compatible = "intersil,tw9990";
+ reg = <0x44>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ipu1_2>;
+ clocks = <&clks 200>;
+ clock-names = "csi_mclk";
+ rst-gpios = <&gpio5 16 1>;
+ csi_id = <0>;
+ mclk = <27000000>;
+ mclk_source = <0>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <29 0>;
+ };
};

&i2c3 {
@@ -489,7 +455,6 @@
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_DATA_EN__IPU1_CSI0_DATA_EN 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
@@ -467,6 +469,7 @@
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_DISP0_DAT22__GPIO5_IO16 0x80000000
>;
};

I have also made the following modifications to the kernal.

--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -230,13 +230,13 @@ put_node:
}

static void __init imx6q_csi_mux_init(void)
{
/*
- * MX6Q SabreSD board:
+ * MX6Q SabreSD/VAR-SOM-MX6 boards:
* IPU1 CSI0 connects to parallel interface.
* Set GPR1 bit 19 to 0x1.
*
- * MX6DL SabreSD board:
+ * MX6DL SabreSD/VAR-SOM-MX6 boards:
* IPU1 CSI0 connects to parallel interface.
* Set GPR13 bit 0-2 to 0x4.
* IPU1 CSI1 connects to MIPI CSI2 virtual channel 1.
@@ -247,10 +246,12 @@ static void __init imx6q_csi_mux_init(void)
gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
if (!IS_ERR(gpr)) {
if (of_machine_is_compatible("fsl,imx6q-sabresd") ||
- of_machine_is_compatible("fsl,imx6q-sabreauto"))
+ of_machine_is_compatible("fsl,imx6q-sabreauto") ||
+ of_machine_is_compatible("fsl,imx6q-var-som"))
regmap_update_bits(gpr, IOMUXC_GPR1, 1 << 19, 1 << 19);
else if (of_machine_is_compatible("fsl,imx6dl-sabresd") ||
- of_machine_is_compatible("fsl,imx6dl-sabreauto"))
+ of_machine_is_compatible("fsl,imx6dl-sabreauto") ||
+ of_machine_is_compatible("fsl,imx6dl-var-som"))
regmap_update_bits(gpr, IOMUXC_GPR13, 0x3F, 0x0C);
} else {
pr_err("%s(): failed to find fsl,imx6q-iomux-gpr regmap\n",

I am able to talk to the TVIN chip and it is able to detect the type of camera input NTSC or PAL properly.  I am not able see any video using gstreamer or my custom program.  I am also unable to measure any output on VD0 into the SOM, that just stays at a 200 mV level.

Thanks

 - John

0 Kudos
1 Reply

689 Views
igorpadykov
NXP Employee
NXP Employee

Hi John

one can look at OV5642 example for parallel CSI connection in sabre sd spf-27392

schematic p.8:

Schematics (1)
"Design files, including hardware schematics, Gerbers, and OrCAD files."
SABRE Platform for Smart Devices|NXP 

and i.MX6DQ Datasheet Table 66. Camera Input Signal Cross Reference, Format, and Bits Per Cycle

http://www.nxp.com/docs/en/data-sheet/IMX6DQCEC.pdf 

dts example of ipu  parallel port
pinctrl_ipu1_1: ipu1grp-1 {

linux/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi

linux-imx.git - i.MX Linux Kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos