Use extperiph3 on CAM2_MCLK and CAM3_MCLK

Hi,
we have a four camera carrier board setup where we want to use CAM_AF_EN (GPIO3_PS.05) and GPIO_PZ0 (GPIO3_PZ.00) as MCLK pins using clk_out_3 (extperiph3_clk) for cam2 and cam3. Cam0 and Cam1 are using CAM0_MCLK and CAM1_MCLK, and they are working.

Changes done so far:
tegra210-porg-pinmux-p3448-0002-b00.dtsi:

cam_af_en_ps5 {
nvidia,pins = “cam_af_en_ps5”;
nvidia,function = “extperiph3”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};

pz0 {
nvidia,pins = “pz0”;
nvidia,function = “extperiph3”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};

Also tried to set then high in sensor device tree:
gpio: gpio@6000d000 {
cam2-mclk-output-high {
status = “okay”;
gpio-hog;
output-high;
gpios = <TEGRA_GPIO(S, 5) GPIO_ACTIVE_HIGH>;
label = “cam2-mclk”;
};
cam3-mclk-output-high {
status = “okay”;
gpio-hog;
output-high;
gpios = <TEGRA_GPIO(Z, 0) GPIO_ACTIVE_HIGH>;
label = “cam3-mclk”;
};
};

But no clock signal in those pins.

According to Nano’s pinmux spreadsheet pin customer usage is “GPIO #1 or Camera MCLK #3” and “GPIO #11 or Camera MCLK #3”, but for example nvidia,function “extperiph3” is not available by default for these pins. We had to change pinctrl-tegra210.c to allow “extperiph3” function for cam_af_en_ps5 and pz0, or does this mean extperiph3 can’t be used with them?

hello henrik571,

please refer to [Table 8-3. CSI Configuration] in the Jetson Nano Product Design Guide.
you must have all your camera sensors as 2-lane configuration to enable four cameras together; it also shows the clock usage for multi-cam use-case in the design guide.
thanks

Thanks for reply. We are using 2x4 + 2x2 configuration, which is ok as we use all four cameras only with very low fps.

But about pinmux function “extperiph3”: is it possible to use it with other than GPIO3_PS.00 and GPIO3_PS.01 pins? Pins CAM_AF_EN (GPIO3_PS.05) and GPIO_PZ0 (GPIO3_PZ.00) are using vimclk and vimclk2 by default, and seems that extperiph3 is not available for them. What are corresponding clock-names for vimclk and vimclk2, when clk_out_3 is the clock name for extperiph3.

hello henrik571,

ya, two quad-lane plus two dual-lane camera streams is supported.

please refer to pinmux spreadsheets, it’s by default configure as GPIO#01 and GPIO#11 for the 40-pin expansion header, you may have customization to update the pin configurations,
or, if you’re using SD-card series platforms. you may use the Jetson-IO to Configuring Jetson Expansion Header, but Jetson-IO doesn’t support with eMMC modules.
thanks

Removed GPIO01 and GPIO11 from tegra210-p3448-0002-p3449-0000-b00.dts. Still no luck. Tried with extperiph3 and vimctl functions. Not sure what is the clock name of vimctl though.

But can you confirm should it be possible to use CAM_AF_EN (GPIO3_PS.05) and GPIO_PZ0 (GPIO3_PZ.00) as camera mclk?

According to,

And,

According to “Nano and Jetson Xavier NX Camera Design Guide” GPIO01 and GPIO11 can be used as mclk to support two more cameras:

hello henrik571,

had you customize the pin configuration with pinmux spreadsheets?
you should update [Customer Usage] to toggle the GPIO01 functions, then it’ll create dtsi file to define the pin settings.
for example,

			cam_af_en_ps5 {
				nvidia,pins = "cam_af_en_ps5";
				nvidia,function = "vimclk";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};

you should integrate the code into device tree sources and compile another new dtb binary,
after that, please flash the device to update DTB partition to include the changes.
here’s developer guide for your reference, pinmux changes.
thanks