AnsweredAssumed Answered

iMX7D : MIPI CSI : ADV7280-M

Question asked by dh29 on May 30, 2018
Latest reply on Jun 15, 2018 by dh29

I have just starting to try and bring up a ADV7280-M video grabber interfaced via MIPI-CSI interface using a iMX7D. I am using kernel v4.9.x (Freescale/NXP).

 

Upon delving in it looks like there are two possible driver options:

  • /drivers/media/platform/mxc/subdev/adv7180.c
  • /drivers/media/i2c/adv7180.c

 

It seems that /drivers/media/platform/mxc/subdev/adv7180.c is provided by NXP so seems the logical way to go, so I have enabled MXC_TVIN_ADV7180 in my kernel options and made sure that VIDEO_ADV7180 option is disabled.

 

I have put together a device-tree, but I am not sure if I have everything, and I am struggling to understand some of the fields. I have also read that I may need parts of the OV5640 (MIPI camera) driver? At the moment I have not attempted this.

 

This is the relevant parts of my device tree so far:

 

adv7280m@21 {
   status = "okay";
   compatible = "adi,adv7280-m";
   reg = <0x20>;
   pwn-gpios = <&tca6424_sb_23 13 GPIO_ACTIVE_HIGH>;
   csi_id =<0>; /* ?? */
   cvbs = <8>; /* Analogue channel: input 8 */
   clocks = <&clks IMX7D_CSI_MCLK_ROOT_CLK>;
   clock-names = "csi_mclk";
   mipi_camera = <1>; /* ?? */
   ipu_id = <0>; /* ?? */

 

   adv7280m_out: endpoint {
      clock-lanes = <0>;
      data-lanes = <1>;
      remote-endpoint = <&mipi_sensor_ep>;
      };
};

 

&mipi_csi {
   clock_frequency = <24000000>;
   status = "okay";

   port {
      mipi_sensor_ep: endpoint1 {
      remote-endpoint = <&adv7280m_out>;
      clock-lanes = <0>;
      data-lanes = <1>;
      csis-hs-settle = <13>;
      csis-clk-settle = <2>;
      };

 

         csi_mipi_ep: endpoint2 {
            remote-endpoint = <&csi_ep>;
         };
   };

 

&csi1 {
   csi-mux-mipi = <&gpr 0x14 4>;   /* ?? */
   status = "okay";

   port {
      csi_ep: endpoint {
      remote-endpoint = <&csi_mipi_ep>;
   };
};

 

On boot I see the following:

MIPI CSI2 driver module loaded

mxc_mipi-csi 30750000.mipi-csi: mipi csi v4l2 device registered
CSI: Registered sensor subdevice: mxc_mipi-csi.0
mxc_mipi-csi 30750000.mipi-csi: lanes: 1, hs_settle: 13, clk_settle: 2, wclk: 0, freq: 166000000

But nothing regarding the ADV7280. I have placed some diags in the driver and its not being probed, so I'm missing something (probably obvious!).

 

Any help would be appreciated.

Outcomes