Analogue camera module / imx7 colibri / colibri eval board 3.2

Hi Toradex,

I am trying to test the analogue camera adapter on the colibri eval board 3.2 using the colibri imx7 CPU module , following this tutorial. Unfortunately, I have a kernel stack trace after adding the entry in the device tree:

[    2.958205] ERROR: v4l2 capture: get invalid ipu
[    2.963065] Unable to handle kernel NULL pointer dereference at virtual address 00000034
...
[    3.360580] [<7f01c3e4>] (mxc_v4l2_probe [mxc_v4l2_capture]) from [<804b2b58>] (platform_drv_probe+0x50/0xac)
...

Luckily, I also have an imx6 CPU module that works and could compare few things. First I can see the ADV7280 on the i2c bus (0x42):

root@colibri-imx6:~# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- 42 -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --      

On the imx7, I have no i2c bus3 where the ADV is connected and I guess this should be the source of all my trouble:

root@colibri-imx7:~# i2cdetect -y 2
Error: Could not open file `/dev/i2c-2' or `/dev/i2c/2': No such file or directory

I didn’t see any reference to the i2c bus 3 in the device tree.

  • How can I enable the i2c bus 2 on colibri imx7?
  • Is there a way to change the i2c bus on the X22 interface of the colibri evalboard?
  • Has someone succesfully made it work on the colibri imx7?
  • Is there something I’m doing wrong?

hi @morandg

Could you provide the version of the hardware and software of your module?
Have you done any changes to the kernel and the device tree?

Could you please also share the complete dmesg log and the output of the following command: i2cdetect -r 30a20000.i2c

Thanks and best regards, Jaski

Thanks @jaski.tx for considering my request! I went a little further by using a custom cable and connecting the i2c bus on the forth bus of the i.mx (0x30a50000). i2cdetect finds the adv device:

root@scewo-bro:~# i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

However not using the bus address as suggested … ??

root@scewo-bro:~# i2cdetect -y -r 30a50000.i2c
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                        

I added the following in my device tree by copying the example from the i.mx6 and adapt some reference that were not found:

/ {
  v4l2_cap_0 {
		compatible = "fsl,imx6q-v4l2-capture";
		ipu_id = <0>;
		csi_id = <1>;
		mclk_source = <0>;
		status = "okay";
	};
};

&i2c4 {
	adv7280: adv7280@21 {
		compatible = "adv7280";
		reg = <0x21>;
		pinctrl-names = "default";
		pinctrl-0 = <&mipi_csi &pinctrl_sai1_mclk>;
		clocks = <&clks 200>;
		clock-names = "csi_mclk";
		DOVDD-supply = <&reg_module_3v3>;
		AVDD-supply = <&reg_module_3v3>;
		DVDD-supply = <&reg_module_3v3>;
		PVDD-supply = <&reg_module_3v3>;
		csi_id = <1>;
		mclk = <24000000>;
		mclk_source = <1>;
		status = "okay";
	};

	max9526: max9526@20 {
		compatible = "maxim,max9526";
		reg = <0x20>;
		pinctrl-names = "default";
		pinctrl-0 = <&mipi_csi &pinctrl_sai1_mclk>;
		clocks = <&clks 200>;
		clock-names = "csi_mclk";
		DVDDIO-supply = <&reg_module_3v3>; /* 3.3v */
		AVDD-suplsply = <&reg_module_3v3>;  /* 1.8v */
		DVDD-supply = <&reg_module_3v3>;  /* 1.8v */
		csi_id = <1>;
		mclk = <24000000>;
		mclk_source = <0>;
		cvbs = <1>;
		status = "okay";
	};
};

However this device tree thing looks a bit magic to me and there is for sure something wrong here too. The kernel modules also have a different name that I could not find in the wiki, such as :

  • adv7280 → adv7280_tvin
  • max9526 → max9526_tvin

This is also why I’m wondering if this was tested with the hardware combination I have…

As requested, here is the complete kernel log. The hardware I use is:

  • Colibri imx7D 512Mb V 1.1D
  • Colibri eval board V3.2B
  • Analogue Camera Adapter V2.0B

On the software side, I use a custom Yocto image but this should not matter, right? The kernel was branched from yours using the tag Colibri-iMX7_LXDE-Image_2.8b2.97-20180331.

Regards,

Please note that the Colibri iMX7 is not a camera enabled module:

https://developer.toradex.com/software/linux/linux-software/release-details?view=all&issue=16128

Thank you @marcel.tx for your annwer, now I uderstand why I’m struggling so much :p!

Consequently, I would not list the imx7 on the list of the compatible products

Regards!

Thanks, I forwarded this to be updated ASAP.