ADV7280m interfacing with Jetson Orin Nano Dev kit

Hello,

I’m working on interfacing ADV7280m video decoder (CVBS to CSI) with jetson orin nano dev kit. I’m using FPC flex (22 to 15 pin) and want to use the I2C and PWRDWN pins in the csi connector to connect with the ADV7280m chip. A reset control is also required, and would have to use a GPIO from the 40 pin header for that.

I have jetson linux version 36.3, tegra version 5.15.136 on the dev kit. My query is similar to this with some additional points. I have compiled the adv7180 (linux provided driver found at Linux_for_Tegra/source/kernel/kernel-jammy-src/drivers/media/i2c/) after enabling it and its dependencies from menuconfig. Afterwards, I placed the adv7180.ko file in /usr/lib/modules/5.15.136-tegra/kernel/drivers/media/i2c/ and included it in /etc/modules list, which loads the adv7180 module driver at boot time. Now when I run lsmod, I can see the adv7180 in the modules list. However, running the dmesg gives “adv7180: module verification failed: signature and/or required key missing - tainting kernel”.

This is the summary of where I am, and what I need to achieve. I have not made any changes in the device tree, nor have enable any GPIOs. Being unexperienced in jetson and linux, I have turned to this forum. I have gone through similar threads and understand that I might have to edit the device-tree, but I’m not sure. Kindly help me solve this problem.

Best regards.

P.S. adv7180.c is a linux driver compatible for a range of Advantech video decoders, ADV7280m is one of them.

hello tornado1100,

this failure is expected after replace your customize kernel module.
FYI, the signing key is automatically generated in each kernel build, which means the signing key is different from each kernel building, thus, the kernel module compiled by user has different sig_key with the release one.

hence, could you please give it a try…
To specify your own sig_key using CONFIG_MODULE_SIG_KEY in kernel config, rebuild the kernel and kernel modules, install the kernel image, dtbs and kernel modules to target. after that, please use your own sig_key to sign the tegra-camera.ko built later.
here’s developer guide for reference, Kernel Module Signing.

Hi JerryChang,

Thank you for responding.

I don’t have a host machine available, so can I update the kernel from the target itself?

Also, do I need to modify the device tree as well after compiling the module, or does the compilation process (or “make modules” command) does that for me?

hello tornado1100,

it’s doable.
please refer to developer guide, Kernel Customization.

hello JerryChang,

The kernel customization section provides overview of making a default kernel from the sources. What I want is to enable a video decoder module driver provided by the linux at (Linux_for_Tegra/source/kernel/kernel-jammy-src), which I found can be done by running make menuconfig in kernel-jammy-src directory. Also the Makefile in Linux_for_Tegra/source/kernel/kernel-jammy-src provides a large number of options including make modules_install, Image, dtbs et cetra.

I want to know if making a kernel image and dtbs compiled from here (kernel-jammy-src) are sufficient or do I need to fall back to Linux_for_Tegra/source and run make -C kernel after enabling the driver? I’ve noticed that whenever I run make -C kernel in Linux_for_Tegra/source, it says that default configuration is based on “defconfig” and overwrites the modified .config file.

I’d appreciate it if you could provide a detailed solution, targeting each of my points as I’m new to linux and jetson and this will clear a lot of points for me.

Thank you.

Is this still an issue to support? Any result can be shared?

Well, up till now I have generated the adv7180.ko file and installed the module by copying it in /lib/modules/5.15.136-tegra/kernel/drivers/media/i2c/ directory. Now I can see the module install when I run “lsmod | grep adv”.

Now, I’m working on device tree, seeking points from famous ADV7280m configuration and other threads. However, I’m facing certain issues. One such issue is that the CAM_PWDN pin of the csi connector does not become high even after the device is detected on the cam-i2c, which is probably from the driver side.

My latest question in this project is that would I need to modify the module driver (as it is provided by linux) or just writing a successful device tree would be enough? Kindly answer if possible.

hello tornado1100,

since you’re working with JP-6.
Please use libgpiod tools instead. https://lloydrochester.com/post/hardware/libgpiod-intro-rpi/ to toggle GPIO.

for using libgpiod,
Please make sure these setting are there in your pinmux BCT file for the pin you want to control. And please remember the function has to be rsvd.
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;

hi JerryChang,

I’m trying to write a device tree by modifying the imx219 dual device tree overlay, as done by others to make adv7280m work with jetson.

To control a gpio using gpiod, I would have to remove it from the device tree overlay. Following is the section of the device tree where gpios are configured.

	fragment-camera-imx219@0 {
		target-path = "/";

		__overlay__ {

			bus@0 {

				cam_i2cmux {
					status = "okay";
					compatible = "i2c-mux-gpio";
					#address-cells = <0x01>;
					#size-cells = <0x00>;
					i2c-parent = <0xffffffff>;
					mux-gpios = <0xffffffff 0x13 0x00>;

					i2c@0 {
						status = "okay";
						reg = <0x00>;
						#address-cells = <0x01>;
						#size-cells = <0x00>;

						rbpcv2_imx219_a@10 {
							reset-gpios = <0xffffffff 0x3e 0x00>;
						};
					};

					i2c@1 {
						status = "okay";
						reg = <0x01>;
						#address-cells = <0x01>;
						#size-cells = <0x00>;

						rbpcv2_imx219_c@10 {
							reset-gpios = <0xffffffff 0xa0 0x00>;
						};
					};
				};

		/*		gpio@2200000 {

					camera-control-output-low {
						gpio-hog;
						output-low;
						gpios = <0x3b 0x00 0x3e 0x00 0xa0 0x00>;
						label = "cam0-rst","cam0-pwdn","cam1-pwdn";
					};
				};  */

			}; 
		};
	}; 

If I comment the reset-gpios lines from this, then the jetson does not detect the device on i2c. However, if I leave these as currently, then I am not able to access the pins through gpiod library.

hello tornado1100,

did you meant you would like to control this reset pin manually after system boot into linux?
FYI, this is reset pin for IMX219, it’s sensor probing and registration which only run once during kernel initialization stage of system boot-up. that’s why removing this pin cannot register device correctly.

Yes, that’s what I meant. At the moment, following is the response of dmesg | grep adv7180.

jetson@ubuntu:~$ sudo dmesg | grep adv7180
[    9.008782] adv7180: module verification failed: signature and/or required key missing - tainting kernel
[   12.093265] adv7180 9-0021: chip id 0x42 found @ 0x21 (i2c-2-mux (chan_id 1))
[   12.168379] adv7180: probe of 10-0021 failed with error -121

Can you provide help on how to proceed further?

What if I remove the connectionn of CAM_PWDN pin of the csi connector to the PWRDWN pin of adv7280m, and configure the adv7280m required settings via external micro-controller, would it work then?

yes, it’s doable.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.