Adv7280-m problem with Apalis iMX8

I’m trying to capture video with ADV7280m, I added related kernel driver to yocto multimedia image but there is no /dev/video including video, although I can see I2C port on line 5 but it has not been registered.
it seems that I have to add a device -tree overlay in /boot/overlay.txt to make it work properly but I don’t find related file in my resources.
what should I do exactly to make ADV7280m work and capture video?

my resources versions:

Ixora motherboard V1.2A
Apalis iMX8QM 4GB IT V1.1C
BSP V5.7
adv7280-m

Dear @ramin_rad,

You may have a look at this file: device-trees/imx6q-apalis-ixora-v1.2.dts at toradex_5.4-2.3.x-imx · toradex/device-trees · GitHub. It shows how this device was configured for the Apalis iMX6Q on the Ixora V1.2. You may need to create your own overlay (Device Tree Overlays (Linux) | Toradex Developer Center), compile it and then add it to your image as it’s not present on the Apalis iMX8 Device-trees by default.

Can you please have a look at it and tell us if this helps?

Best regards,

hello gclaudino,

thank you for your respond,
I wrote this device tree overlay, using iMX6Q device tree:

/dts-v1/;
/plugin/;
/ {
	compatible = "toradex,apalis-imx8";
};

&i2c5 {
	status = "okay";

	adv7280: adv7280@20 {
		compatible = "adv7280";
		reg = <0x20>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
		clocks = <&xtal24m>;
		clock-names = "csi_mclk";
		DOVDD-supply = <&reg_3p3v>;
		AVDD-supply = <&reg_3p3v>;
		DVDD-supply = <&reg_3p3v>;
		PVDD-supply = <&reg_3p3v>;
		csi_id = <0>;
		mclk = <24000000>;
		mclk_source = <1>;
		status = "okay";
	};
};

I changed &i2c3 to i2c5 because I find i2c on line 5 (i2cdetect -y 5)
and changed adv7280@21 and reg = <0x21> to adv7280@20 and reg = <0x20> because I use address 0x20 on i2c port
then I compiled my dts and added final dtbo to /boot/overlays.txt
but after rebooting I got this error on uboot:

Applying Overlay: adv7280_overlay.dtbo
1194 bytes read in 50 ms (22.5 KiB/s)
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
10649014 bytes read in 334 ms (30.4 MiB/s)
Uncompressed size: 25704960 = 0x1883A00
Bootargs: pci=nomsi root=PARTUUID=adb3e59a-02 ro rootwait
ERROR: Did not find a cmdline Flattened Device Tree
FDT and ATAGS support not compiled in - hanging
### ERROR ### Please RESET the board ###

Dear @ramin_rad,

Thanks for the update. In order for your device tree to work, you should have it both on the overlays.txt file and on the overlays folder. As a check, what are the outputs of the following commands?

  • cat /boot/overlays.txt
  • ls /boot/overlays

Can you please also share the full dmesg output?

Also, it seems that, for instance, these pinctrls and power supplies are not defined on the Apalis iMX8 Device Trees. They may have other names:

On Apalis iMX8, there is for instance, &reg_3v3_vmmc. So please have a look at it.

Best regards,

Best regards,

I updated names and tried this one:

/dts-v1/;
/plugin/;
/ {
	compatible = "toradex,apalis-imx8";
};

&i2c5 {
	status = "okay";

	adv7280: adv7280@20 {
		compatible = "adv7280";
		reg = <0x20>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_mipi_csi0>;
		clocks = <&xtal24m>;
		clock-names = "xclk";
		DOVDD-supply = <&reg_3v3_vmmc>;
		AVDD-supply = <&reg_3v3_vmmc>;
		DVDD-supply = <&reg_3v3_vmmc>;
		PVDD-supply = <&reg_3v3_vmmc>;
		csi_id = <0>;
		mclk = <24000000>;
		mclk_source = <1>;
		status = "okay";
	};
};

but still no success, same error appears on u-boot

most recent changes, according to ov5640 official dto:

/dts-v1/;
/plugin/;

#include <dt-bindings/clock/imx8-clock.h>
#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "toradex,apalis-imx8";
};

/* Apalis I2C3 (CAM) */
&i2c3 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	adv7280_mipi@20 {
		compatible = "adv7280,adv7280_tvin";
		reg = <0x20>;
		clocks = <&xtal24m>;
		clock-names = "xclk";
		csi_id = <0>;
		mclk = <24000000>;
		mclk_source = <0>;
		mipi_csi;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio1>, <&pinctrl_gpio2>;
		powerdown-gpios = <&lsio_gpio0 9 GPIO_ACTIVE_HIGH>;	/* Apalis GPIO2 */
		reset-gpios = <&lsio_gpio0 8 GPIO_ACTIVE_LOW>;		/* Apalis GPIO1 */
		status = "okay";

		port {
			adv7280_mipi_1_ep: endpoint {
				clocks-lanes = <0>;
				data-lanes = <1 2>;
				remote-endpoint = <&mipi_csi1_ep>;
			};
		};
	};
};

&isi_4 {
	status = "okay";

	cap_device {
		status = "okay";
	};
};

&mipi_csi_1 {
	#address-cells = <1>;
	#size-cells = <0>;
	/delete-property/virtual-channel;
	status = "okay";

	/* Camera 1 MIPI CSI-2 (CSIS0) */
	port@1 {
		reg = <1>;

		mipi_csi1_ep: endpoint {
			bus-type = <4>;
			data-lanes = <1 2>;
			remote-endpoint = <&adv7280_mipi_1_ep>;
		};
	};
};

but still no success and i2c is not registerred :frowning:
any help?

Hello everyone,

I added multiple lines of printk(KERN_ALERT “some message”); in adv7280.c file and recompiled kernel but can’t see my messages in dmesg neither in /var/log/message.
what causes this problem? is it because my dts overlay can’t interconnect with the driver?
I appreciate any help.

BR

Hi @ramin_rad,

We’ve been made aware that there may be a problem with the driver for the adv7280 and we’re waiting for a development board to arrive in our office so that we could test it and ensure we can make it work. We’ll update you once it is here and tested.

Best regards,

Hi @gclaudino.tx ,
thank you for your response, I’m looking forward to hearing from you.
BR

Hi @gclaudino.tx ,

any news about driver?

now I’m using this driver linux/adv7180.c at v5.4 · torvalds/linux · GitHub which supports MIPI CSI and I attached my device tree overlay file.
adv7280.dts (1.7 KB)
now chip has been detected and all three I2C ports related to register maps, I2P and CSI sub maps has been registered and has UU symbol.

$ i2cdetect -y 5

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- UU -- UU -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

I also have a video device at /dev/video0 which is linked to my CSI input but I can’t capture video and I got an error related to ISI CAP:

mxc-mipi-csi2.1: is_entity_link_setup, No remote pad found!

this is from is_entity_link_setup function in imx8-isi-cap.c that fails. but I can’t see why.
here is my full dmesg:
dmesg.txt (40.0 KB) there are some of my own debug messages in dmesg starting with “adv7280”.
it seems that my dts overlay has some kind of problem.

any help is appreciated :pray:
Best Regards,
Ramin

Hi @ramin_rad,

We’re still waiting for the board to arrive at our office. We’ll be checking your overlay in the meantime.

1 Like

Hi @ramin_rad,

Just to keep you updated, we received the board and will start to test somethings today.

Best regards,

1 Like

Hi @gclaudino.tx ,
thank you for keeping me informed and thank you for helping me drive this chip.
BR

I tried my adv7280m module with iMX6Q, the main dts has been defined with 0x21 I2C address but my module I2C address is 0x20 so I had to add a dts overlay; then replaced my driver with original driver due to lacking of MIPI CSI in original one.
but still no success.

Hi @ramin_rad, how are you?

Have you been able to do any progress on the topic? I’ve been doing some tests on my side without much success. Could you please share with me the latest overlay that you have for the Apalis iMX8Q?

It would be also nice to have your Image.gz file for me to compare our kernel configurations.

Best regards,

Hi @gclaudino.tx ,
I hope you are doing well,
I still can’t capture any video on iMX8Q neither on iMX6Q, I really got stuck in setting this module up.
here is my latest dts overlay for iMX8Q: adv7280.dts (1.8 KB)
and this is my Image.gz file:

let me know if you get any progress,

Best Regards,
Ramin

Hi @gclaudino.tx , how are you?
could you please check out my device tree, I think my problem is kinda related to that.
thanks

Hi @ramin_rad,

I’ve still not been able to make it work on my side. I’ll retest it with another module just to try to check that the camera and everything that I’m using works properly so I can retest it on Apalis iMX8. I can’t still promise you a timeframe to check it.

Best regards,

Hi @gclaudino.tx ,
thanks for your help anyway. I’m getting some progress on my side.
BR,
Ramin

by the way may I ask you what kind of adv7280-m module are you working with? is it some kind of evaluation board or a custom module?
I’m working with a custom module and there are possibilities of hardware malfunction and maybe your module can help me compare schematics.
and another question, what SoM besides iMX8 are you going to check your camera with? is there a Toradex module with proper support and device tree?

BR,
Ramin