AnsweredAssumed Answered

IPU2 parallel port on IMX6Q

Question asked by Omar Pighi on Sep 16, 2014
Latest reply on Feb 24, 2015 by Daiane Angolini

Dear All,

 

Now we are working to our custom board. The hardware is close to nitrogen6x board from boundary, but with the phytec flexboard as module on it.

We would like to use the second parallel sensor board because we already have another sensor (well a video converter) on the first parallel (IPU1/CSI0)

so we need another parallel sensor interface.

we are using as a base the 3.10.17-1.0.1-GA

 

I wrote my own driver for the sensor we planned to use , but basically it is the same of ov5640.c (parallel version)

i modify the DTS files adding our sensor and using the nitrogen6x as reference with minor change on pin mux.

from DTS:

pin muxing:

 

ar0134  {
     pinctrl_ar0134: pinctrl_ar0134 {
   fsl,pins = <
   MX6QDL_PAD_EIM_A17__IPU2_CSI1_DATA12    0xb0b1
   MX6QDL_PAD_EIM_A18__IPU2_CSI1_DATA13    0xb0b1
   MX6QDL_PAD_EIM_A19__IPU2_CSI1_DATA14    0xb0b1
   MX6QDL_PAD_EIM_A20__IPU2_CSI1_DATA15    0xb0b1
   MX6QDL_PAD_EIM_A21__IPU2_CSI1_DATA16    0xb0b1
   MX6QDL_PAD_EIM_A22__IPU2_CSI1_DATA17    0xb0b1
   MX6QDL_PAD_EIM_A23__IPU2_CSI1_DATA18    0xb0b1
   MX6QDL_PAD_EIM_A24__IPU2_CSI1_DATA19    0xb0b1
   MX6QDL_PAD_EIM_DA10__IPU2_CSI1_DATA_EN    0xb0b1
   MX6QDL_PAD_EIM_A16__IPU2_CSI1_PIXCLK    0xb0b1
   MX6QDL_PAD_EIM_DA11__IPU2_CSI1_HSYNC    0xb0b1
   MX6QDL_PAD_EIM_DA12__IPU2_CSI1_VSYNC    0xb0b1
   >;
   };

    };

 

from DTS add the sensor on I2c:

 

&i2c3 {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c3>;

    clock-frequency = <100000>;

    status = "okay";

 

    ar0134: ar0134@10 {

        compatible = "apti,ar0134";

        reg = <0x10>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ar0134>;

        //pinctrl-0 = <&pinctrl_ipu1_2>;

        clocks = <&clk27m 0>;

        clock-names = "csi_mclk";

        //DOVDD-supply = <&vgen4_reg>;

        //AVDD-supply = <&vgen3_reg>; 

        //DVDD-supply = <&vgen2_reg>; 

        //pwn-gpios = <&gpio1 16 1>;  

        //rst-gpios = <&gpio1 17 0>;  

        ipu_id = <1>;

        csi_id = <1>;

        mclk = <27000000>;

        mclk_source = <0>;

    };

};

 

 

the driver is loaded correctly, it see the sensor and the v4l2 create the /dev/video3 , when i try to acquire something from that device (with gstreamer or just cat it).

I always have back "ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0"

 

attached here you can see the DTS files I'm using and also the driver.

it seems the something is still not configured proprely on the second CSI parallel port so it dosn't acquire.

 

the signal from the sensor are correct (Vsync,Hsync,pixclk) and also the data_en seems to be ok, i tried also to negate it in the SENS_CONF register of the IPU_CSI

I would like to know which are the changes needed to be made in order to get IPU2/CSI1 working as the device is being correctly loaded, however it cannot be feed by any frame.

 

Thanks to all

Omar

Original Attachment has been moved to: ar0134.c.zip

Original Attachment has been moved to: Kconfig.zip

Original Attachment has been moved to: Makefile.zip

Original Attachment has been moved to: imx6q-phytec-pbab01.dts.zip

Original Attachment has been moved to: imx6qdl-phytec-pfla02.dtsi.zip

Outcomes