Hi JerryChang
We have a custom board and using CAM0_MCLK for all cameras. We use diffrent PowerDown GPIO than reported at Jetson Orin NX Series and Jetson Orin Nano Series. Our PowerDown pins are connected with the reset GPIO of the image sensor and we use the following pins:
DT extract:
#include "tegra234-camera-ar0234-a00.dtsi"
#include "dt-bindings/clock/tegra234-clock.h"
#define CAM0_RESET TEGRA234_MAIN_GPIO(A, 6) // Pin 222
#define CAM1_RESET TEGRA234_MAIN_GPIO(I, 1) // Pin 195
#define CAM2_RESET TEGRA234_MAIN_GPIO(AC, 0) // Pin 120
#define CAM3_RESET TEGRA234_MAIN_GPIO(H, 6) // Pin 141
#define CAMERA_I2C_MUX_BUS(x) (0x1E + x)
/ {
i2c@3180000 {
status = "okay";
tca9546@70 {
status = "okay";
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
#size-cells = <0>;
skip_mux_detect = "yes";
force_bus_start = <CAMERA_I2C_MUX_BUS(0)>;
i2c@0 {
status = "okay";
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
ar0234_b@18 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
clocks = <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA234_CLK_EXTPERIPH1>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
reset-gpios = <&tegra_main_gpio CAM1_RESET GPIO_ACTIVE_HIGH>;
};
};
i2c@1 {
status = "okay";
reg = <1>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
ar0234_a@18 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
clocks = <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA234_CLK_EXTPERIPH1>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
reset-gpios = <&tegra_main_gpio CAM0_RESET GPIO_ACTIVE_HIGH>;
};
};
i2c@2 {
status = "okay";
reg = <2>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
ar0234_c@18 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
clocks = <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA234_CLK_EXTPERIPH1>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
reset-gpios = <&tegra_main_gpio CAM2_RESET GPIO_ACTIVE_HIGH>;
};
};
i2c@3 {
status = "okay";
reg = <3>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
ar0234_d@18 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
clocks = <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA234_CLK_EXTPERIPH1>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
reset-gpios = <&tegra_main_gpio CAM3_RESET GPIO_ACTIVE_HIGH>;
};
};
};
};
gpio@6000d000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM0_RESET 0 CAM1_RESET 0 CAM2_RESET 0 CAM3_RESET 0>;
label = "cam0-rst","cam1-rst","cam2-rst","cam3-rst";
};
};
};
But I guess that this behavior has nothing to do with GPIO toggling because the specific ar0234 kernel driver instance power_on function isn’t called, that is verified with dmesg logs. The gst pipline does crash before. The crash appears at createCaptureSession from nvargus daemon. We tried to find the source code of createCaptureSession function for further debugging but couldn’t find it. We guess the code is not open source.
The error output of nvargus daemon from /var/log/syslog is:
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/fusaCsiStreamHandler.cpp 248
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/fusaViHandler.cpp 328
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/fusaViHandler.cpp 124
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon: Module_id 30 Severity 2 : (fusa) Error: BadParameter propagating from:/capture/src/core.cpp 76
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: === gst-launch-1.0[1798]: Connection established (FFFF471F0900)=== gst-launch-1.0[1798]: CameraProvider initialized (0xffff10000c20)SCF: Error BadParameter: (propagating from src/services/capture/FusaCaptureViCsiHw.cpp, function openViCsi(), line 390)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDeviceViCsi.cpp, function open(), line 336)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDevice.cpp, function openSource(), line 398)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function openSource(), line 501)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: SCF: Error BadParameter: (propagating from src/api/Session.cpp, function initialize(), line 294)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function createSession(), line 645)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: (Argus) Error BadParameter: (propagating from src/api/CaptureSessionImpl.cpp, function initialize(), line 177)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: (Argus) Error BadParameter: (propagating from src/api/CameraProviderImpl.cpp, function createCaptureSessionInternal(), line 305)
Mar 27 17:54:53 tegra-ubuntu nvargus-daemon[1390]: (Argus) Error InvalidState: Element not found (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamerautils/inc/Vector.h, function remove(), line 172)
GST Error is:
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:762 Failed to create CaptureSession
Can you provide further debugging tools/ideas? Or any other suggestions?
Thanks for helping us.
BR
Kris