Hello. I am using the ORIN NX Devkit.
The version of Jetpack is 6.2.2+b24
I have purchased the IMX415 MIPI module and want to use it with ORIN NX. The module is functional, and I have tested it on RK35xx modules.
However, to use it with ORIN NX, you need to write your own driver. I have adapted the existing IMX477 driver by removing unnecessary features and focusing on receiving images in a single mode.
The power supply and transfer of configuration registers to the module are successful, but there is a problem with the CSI data transfer (as far as I understand).
I am using 4-lane mode (CSI2, CSI3).
The camera is connected to CAM1 (J21).
I am currently receiving the following errors:
kworker/2:2-21771 [002] ....... 763418.459221: rtcpu_string: tstamp:23857395397773 id:0x04010000 str:"VM0 deactivating."
kworker/2:2-21771 [002] ....... 763428.490920: rtcpu_string: tstamp:23857710134368 id:0x04010000 str:"VM0 activating."
kworker/2:2-21771 [002] ....... 763428.546922: rtcpu_vinotify_event: tstamp:23857710777563 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:763446728803168 data:0x799e300010000000
kworker/2:2-21771 [002] ....... 763428.546924: rtcpu_vinotify_event: tstamp:23857710777699 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:763446728809568 data:0x0000000031000001
kworker/2:2-21771 [002] ....... 763428.546925: rtcpu_vinotify_event: tstamp:23857710777856 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:763446728812608 data:0x0000000007020001
kworker/2:2-21771 [002] ....... 763428.546925: rtcpu_vinotify_event: tstamp:23857710777991 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:763446728855264 data:0x799e2d0010000000
kworker/2:2-21771 [002] ....... 763428.546926: rtcpu_vinotify_event: tstamp:23857710778143 cch:0 vi:1 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:763446728861760 data:0x0000000031000002
kworker/2:2-21771 [002] ....... 763428.602910: rtcpu_nvcsi_intr: tstamp:23857713154914 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602911: rtcpu_nvcsi_intr: tstamp:23857713154914 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602912: rtcpu_nvcsi_intr: tstamp:23857713172043 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602913: rtcpu_nvcsi_intr: tstamp:23857713172043 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602913: rtcpu_nvcsi_intr: tstamp:23857713177598 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602914: rtcpu_nvcsi_intr: tstamp:23857713177598 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602915: rtcpu_nvcsi_intr: tstamp:23857713215097 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602915: rtcpu_nvcsi_intr: tstamp:23857713215097 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602916: rtcpu_nvcsi_intr: tstamp:23857713229910 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602916: rtcpu_nvcsi_intr: tstamp:23857713229910 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602917: rtcpu_nvcsi_intr: tstamp:23857713261855 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602918: rtcpu_nvcsi_intr: tstamp:23857713261855 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602918: rtcpu_nvcsi_intr: tstamp:23857713267410 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602919: rtcpu_nvcsi_intr: tstamp:23857713267410 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602920: rtcpu_nvcsi_intr: tstamp:23857713299355 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602920: rtcpu_nvcsi_intr: tstamp:23857713299355 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602921: rtcpu_nvcsi_intr: tstamp:23857713357223 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602922: rtcpu_nvcsi_intr: tstamp:23857713357223 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602922: rtcpu_nvcsi_intr: tstamp:23857713389163 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602923: rtcpu_nvcsi_intr: tstamp:23857713389163 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602923: rtcpu_nvcsi_intr: tstamp:23857713411850 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602924: rtcpu_nvcsi_intr: tstamp:23857713411850 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602925: rtcpu_nvcsi_intr: tstamp:23857713464162 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602925: rtcpu_nvcsi_intr: tstamp:23857713464162 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602926: rtcpu_nvcsi_intr: tstamp:23857713509067 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602927: rtcpu_nvcsi_intr: tstamp:23857713509067 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602927: rtcpu_nvcsi_intr: tstamp:23857713516476 class:GLOBAL type:PHY_INTR0 phy:1 cil:0 st:0 vc:0 status:0x00000080
kworker/2:2-21771 [002] ....... 763428.602928: rtcpu_nvcsi_intr: tstamp:23857713516476 class:CORRECTABLE_ERR type:PHY_INTR phy:1 cil:0 st:0 vc:0 status:0x00000080
Here is my dtsi file, which was made according to imx415 datasheet and imx477 dtsi example:
#define CAM0_PWDN TEGRA234_MAIN_GPIO(H, 6)
#define CAM1_PWDN TEGRA234_MAIN_GPIO(AC, 0)
#define CAM_I2C_MUX TEGRA234_AON_GPIO(CC, 3)
#include <dt-bindings/tegra234-p3767-0000-common.h>
// here we describe sequence imx415 -> NVCSI -> VI
/ {
overlay-name = "Camera IMX415-A";
jetson-header-name = "Jetson 22pin CSI Connector";
compatible = JETSON_COMPATIBLE_P3768;
/* IMX415 connected to cam1 port */
fragment@0 {
target-path = "/";
__overlay__ {
tegra-capture-vi {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
// exit is not described here, because it's final element and data moves to dma memory for user
port@0 {
reg = <0>;
iki_imx415_vi_in0: endpoint {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&iki_imx415_csi_out0>;
};
};
};
};
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
/**
* The general guideline for naming badge_info contains 3 parts, and is as follows,
* The first part is the camera_board_id for the module; if the module is in a FFD
* platform, then use the platform name for this part.
* The second part contains the position of the module, ex. "rear" or "front".
* The third part contains the last 6 characters of a part number which is found
* in the module's specsheet from the vendor.
*/
modules {
module0 {
badge = "waveshare_front_IMX415";
position = "front";
orientation = "1";
drivernode0 {
pcl_id = "v4l2_sensor";
sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/cam_i2cmux/i2c@1/iki_imx415_a@1a";
};
};
};
};
bus@0 {
host1x@13e00000 {
nvcsi@15a00000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
iki_imx415_csi_in0: endpoint@0 {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&iki_imx415_out0>;
};
};
port@1 {
reg = <1>;
iki_imx415_csi_out0: endpoint@1 {
remote-endpoint = <&iki_imx415_vi_in0>;
};
};
};
};
};
};
cam_i2cmux {
status = "okay";
compatible = "i2c-mux-gpio";
#address-cells = <1>;
#size-cells = <0>;
mux-gpios = <&gpio_aon CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
i2c-parent = <&cam_i2c>;
i2c@0 {
status = "okay";
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
rbpcv2_imx219_a@10 {
status = "disabled";
};
};
i2c@1 {
status = "okay";
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
rbpcv2_imx219_c@10 {
status = "disabled";
};
iki_imx415_a@1a {
reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
compatible = "iki_ran,imx415";
/* I2C device address */
reg = <0x1a>;
/* V4L2 device node location */
/* clocks = <&bpmp_clks TEGRA234_CLK_EXTPERIPH1>, <&bpmp_clks TEGRA234_CLK_PLLP_OUT0>;*/
/* clock-names = "extperiph1", "pllp_grtba";*/
/* mclk = "extperiph1";*/
devnode = "video0";
physical_w = "5.600";
physical_h = "3.232";
sensor_model = "imx415";
use_sensor_mode_id = "true";
mode0 { /* IMX415_MODE_3840x2160 */
mclk_khz = "37125";
num_lanes = "4";
tegra_sinterface = "serial_c";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
lane_polarity = "0";
active_w = "3840";
active_h = "2160";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "12";
readout_orientation = "0";
line_length = "4400";
inherent_gain = "1";
mclk_multiplier = "8";
pix_clk_hz = "297000000";
gain_factor = "10";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "0";
max_gain_val = "722";
step_gain_val = "1";
default_gain = "0";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1000000"; /* 1.0 fps */
max_framerate = "30000000"; /* 30.0 fps */
step_framerate = "1";
default_framerate = "30000000"; /* 30.0 fps */
min_exp_time = "30"; /* us */
max_exp_time = "33200"; /* us */
step_exp_time = "1";
default_exp_time = "5000"; /* us */
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
iki_imx415_out0: endpoint {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&iki_imx415_csi_in0>;
};
};
};
};
};
};
gpio@6000d000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM1_PWDN 0 CAM0_PWDN 0>;
label = "cam1-pwdn", "cam0-pwdn";
};
};
};
};
};
};
I’ve tried various dtsi config settings, but I don’t know what else to try. I hope you can help me.