Jetpack 5.1.2 - Use PCC.02 for CSI camera interrupt pin

Hi,

I am porting the CSI camera driver from Jetson Xavier NX to Jetson Orin NX (same Jetpack 5.1.2).
In my driver, I use PCC.02 for an interrupt pin on our custom carrier board.

In the setup for Jetson Xavier NX, I need to disable the PCC.02 pin for “Wifi disable” before using for my CSI camera.
I can find this define in tegra194-p3668-common.dtsi

  // w-disable1 {
  // 	gpio-hog;
  // 	output-high;
  // 	gpios = <TEGRA194_AON_GPIO(CC, 2) GPIO_ACTIVE_HIGH>;
  // 	label = "w-disable1";
  // 	status = "okay";
  // };

But in the setup for Jetson Orin NX, I can not find the definition of PCC.02 on the kernel device tree.
So, where is the definition for “Wifi Disable” on the device tree for Jetson Orin NX ?

Thank for your help.

Maybe search “TEGRA234_AON_GPIO(CC, 2)” in the source.

I tried, but no luck.
I’m using tegra234-p3767-0000-p3768-0000-a0.dts
I don not why I can not find to disable PCC.02 for custom purpose.

For Jetson Xavier NX, it’s easy to find them on tegra194-p3668-common.dtsi
But on Jetson Orin NX, there is no luck for me.

Is there anything I must to focus ?

You can check by below command if any define for this pin. If not you can just use it.

sudo cat /sys/kernel/debug/gpio

Hi,
This is the result

You can see the PCC.02 was assigned for an interrupt pin, which is use in the csi camera driver.
Here is the dts for the csi camera

#define CAM_I2C_INT 	TEGRA234_AON_GPIO(CC, 2)
i2c@3180000 {
		clock-frequency = <100000>;

		lt6911uxc_c@2b {
			compatible = "lontium,lt6911uxc";
			reg = <0x2b>;
			status = "okay";
			devnode = "video0";
			/* Mux */
			mux-gpios = <&tegra_aon_gpio CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
			/* Reset */
			reset-gpio = <&tegra_aon_gpio CAM_I2C_RST GPIO_ACTIVE_LOW>;
			/* Interrupt */
			interrupt-parent = <&tegra_aon_gpio>;
			interrupts = <CAM_I2C_INT IRQ_TYPE_LEVEL_HIGH>;
			
			port@0 {
				ret = <0>;
				status = "okay";
				hdmi2csi_lt6911_out0: endpoint {
					status = "okay";
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&hdmi2csi_csi_in0>;
				};
			};
		};
	};

But the PCC.02 looks like can not works as an interrupt.
So i think this pin maybe in use for Wifi disable pin (same with the Jetson Xavier NX). Is it correct ?

You can disable lt6911uxc_c to release this pin to try.

Hi

After disable my camera driver, here is the result

Looks like the PCC.02 is ready for my driver. Is it correct ?
If yes, can you help me to take a look into my define for the interrupt pin
It works in Jetson Xavier NX, but no works in Jetson Orin NX. Is there anything changed ?

Wait, lt6911uxc_c is your driver and implement the interrupt?

You can verify the pin by sysfs to confirm the functionality first.

lt6911uxc_c is your driver and implement the interrupt?
→ Yes, correct.
I’m using the HDMI to CSI converter chip. The chip will trigger an interrupt pin when the input HDMI was detected. It’s active HIGH

You can verify the pin by sysfs to confirm the functionality first.
→ How can I do that ?

Reference to this doc.

https://www.kernel.org/doc/Documentation/gpio/sysfs.txt

Hi

I can see all assigned pin all the driver correct

But when I try to verify the pin by sysfs, those pin look like not exported

Here is my define dts

#define CAM_I2C_MUX 	TEGRA234_AON_GPIO(CC, 0)
#define CAM_I2C_RST 	TEGRA234_AON_GPIO(CC, 3)
#define CAM_I2C_INT 	TEGRA234_AON_GPIO(CC, 2)

i2c@3180000 {
		clock-frequency = <100000>;

		lt6911uxc_c@2b {
			compatible = "lontium,lt6911uxc";
			reg = <0x2b>;
			status = "okay";
			devnode = "video0";
			/* Mux */
			mux-gpios = <&tegra_aon_gpio CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
			/* Reset */
			reset-gpio = <&tegra_aon_gpio CAM_I2C_RST GPIO_ACTIVE_LOW>;
			/* Interrupt */
			interrupt-parent = <&tegra_aon_gpio>;
			interrupts = <CAM_I2C_INT IRQ_TYPE_LEVEL_HIGH>;
			
			port@0 {
				ret = <0>;
				status = "okay";
				hdmi2csi_lt6911_out0: endpoint {
					status = "okay";
					port-index = <2>;
					bus-width = <4>;
					remote-endpoint = <&hdmi2csi_csi_in0>;
				};
			};
		};
	};

	gpio@c2f0000 {
		cam-mux-output-high {
			gpio-hog;
			output-high;
			gpios = <CAM_I2C_MUX GPIO_ACTIVE_HIGH >;
			label = "cammux-pwup";
		};
		cam-reset-output-high {
			gpio-hog;
			output-high;
			gpios = <CAM_I2C_RST GPIO_ACTIVE_HIGH >;
			label = "cam-rst-pwup";
		};

		camera-control-input {
			status = "okay";
			gpio-hog;
			gpios = <CAM_I2C_INT GPIO_ACTIVE_LOW>;
			input;
			label = "6911uxc-int";
		};
	};

I can confirm the define code works with Jetson Xavier NX
What wrong with Jetson Orin NX ?

How do you confirm it works or not?
You can try export the pin by yourself for debug.

Hi,

How do you confirm it works or not?
→ I can confirm the code in device work with Jetson Xavier NX. I tried with the same carrier for Jetson Xavier NX, same Jetpack 5.1.2, and the Jetson Xavier NX works.

You can try export the pin by yourself for debug.
→ I tried, but no luck

Also, I check with “cat /proc/interrupts”, the result show me that the interrupt was initial done, but the interrupt still not work when I try to change the input voltage from High to Low, from Low to High.

I think, for now, the question is how to enable the interrupt for gpio PCC.02 in the device tree ?

Did you probe the GPIO to confirm the pin status?

Hi,
My bad, I found that this issue come from our carrier board. Some gpio pins was assigned to wrong position.
Thank you very much for your time.

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