JN30A 38346-3 sensor_common_parse_image_props:active_l propperty missing / Failed to read mode 0 / Failed to initialise imx219
I Got the JN30 Board with 4 Mipi Lanes
Flashing with the Attributes Nano and JN30/JN30D Worked
The DTSI is attached
tegra210-camera-vc-mipi-cam.zip
When powering on this is Displayed both when Mipi Camera is conected to port AB and CD:
CSI-AB
CSI-CD
This error message apears; sensor_common_parse_image_props:active_l propperty missing Failed to read mode0 Failed to initialise imx219
Is my Configuration wrong?
/*
* Copyright (c) 2020-2023, Vision Components GmbH. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <dt-bindings/media/camera.h>
#include <dt-bindings/platform/t210/t210.h>
// ------------------------------------------------------------------------------------------------
// Driver Configuration for NVIDIA Jetson Nano on Auvidea JNX30-LC-PD
// ------------------------------------------------------------------------------------------------
#define VC_MIPI_CAM_AB 1 // 1: Enabled, 0: Disabled (serial_a => CSI Port 0 => VI Stream 0)
#define VC_MIPI_CAM_CD 1 // 1: Enabled, 0: Disabled (serial_c => CSI Port 2 => VI Stream 2)
#define VC_MIPI_CAM_E 0 // 1: Enabled, 0: Disabled (serial_e => CSI Port 4 => VI Stream 4)
#define VC_MIPI_CAM_F 0 // 1: Enabled, 0: Disabled (serial_f => CSI Port 5 => VI Stream 5)
// ------------------------------------------------------------------------------------------------
// Supported number of lanes
// -----+------------------------------------------------------------------------------------------
// 1 | OV7251, IMX296, IMX297
// 2 | OV9281, IMX264, IMX265
// 2,4 | IMX178, IMX183, IMX226, IMX250, IMX252, IMX273, IMX290, IMX327, IMX335, IMX392,
// | IMX412, IMX415, IMX462, IMX565, IMX566, IMX567, IMX568
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_LANES 4 // 1, 2, 4 Lanes
// ------------------------------------------------------------------------------------------------
// Sensor Manufacturer
// -----+------------------------------------------------------------------------------------------
// 1 | Sony Sensor (IMX)
// 2 | Omni Vision Sensor (OV)
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_MANUFACTURER 1
// ------------------------------------------------------------------------------------------------
// GStreamer Support
// ------------------------------------------------------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc you have to adjust this settings in the
// device tree below. The sections which have to be modified are marked by a comment.
// To find the correct parameter values please follow the instruction in the main README.md of
// this repository https://github.com/VC-MIPI-modules/vc_mipi_nvidia#gstreamer-support
// ------------------------------------------------------------------------------------------------
#define VC_MIPI_METADATA_H "0"
#if VC_MIPI_LANES == 1
#define BUS_WIDTH 1
#define NUM_LANES "1"
#define NUM_CSI_LANES 2
#endif
#if VC_MIPI_LANES == 2
#define BUS_WIDTH 2
#define NUM_LANES "2"
#define NUM_CSI_LANES 4
#endif
#if VC_MIPI_LANES == 4
#define BUS_WIDTH 4
#define NUM_LANES "4"
#define NUM_CSI_LANES 8
#endif
#if VC_MIPI_CAM_AB == 1 && VC_MIPI_CAM_CD == 1
#define VC_MIPI_CAMERAS 2
#else
#define VC_MIPI_CAMERAS 1
#endif
/ {
host1x {
vc_vi_base: vi {
num-channels = <VC_MIPI_CAMERAS>;
ports {
#address-cells = <1>;
#size-cells = <0>;
#if VC_MIPI_CAM_AB == 1
vc_vi_port0: port@0 {
reg = <0>;
vc_vi_in0: endpoint {
port-index = <0>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_out0>;
};
};
#endif
#if VC_MIPI_CAM_CD == 1
vc_vi_port1: port@1 {
reg = <1>;
vc_vi_in1: endpoint {
port-index = <2>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_out1>;
};
};
#endif
#if VC_MIPI_CAM_E == 1
vc_vi_port2: port@2 {
reg = <2>;
vc_vi_in2: endpoint {
port-index = <4>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_out2>;
};
};
#endif
#if VC_MIPI_CAM_F == 1
vc_vi_port3: port@3 {
reg = <3>;
vc_vi_in3: endpoint {
port-index = <5>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_out3>;
};
};
#endif
};
};
vc_csi_base: nvcsi {
num-channels = <VC_MIPI_CAMERAS>;
#address-cells = <1>;
#size-cells = <0>;
#if VC_MIPI_CAM_AB == 1
vc_csi_chan0: channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vc_csi_chan0_port0: port@0 {
reg = <0>;
vc_csi_in0: endpoint@0 {
port-index = <0>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_mipi_out0>;
};
};
vc_csi_chan0_port1: port@1 {
reg = <1>;
vc_csi_out0: endpoint@1 {
remote-endpoint = <&vc_vi_in0>;
};
};
};
};
#endif
#if VC_MIPI_CAM_CD == 1
vc_csi_chan1: channel@1 {
reg = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vc_csi_chan1_port0: port@0 {
reg = <0>;
vc_csi_in1: endpoint@2 {
port-index = <2>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_mipi_out1>;
};
};
vc_csi_chan1_port1: port@1 {
reg = <1>;
vc_csi_out1: endpoint@3 {
remote-endpoint = <&vc_vi_in1>;
};
};
};
};
#endif
#if VC_MIPI_CAM_E == 1
vc_csi_chan2: channel@2 {
reg = <2>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vc_csi_chan2_port0: port@0 {
reg = <0>;
vc_csi_in2: endpoint@4 {
port-index = <4>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_mipi_out2>;
};
};
vc_csi_chan2_port1: port@1 {
reg = <1>;
vc_csi_out2: endpoint@5 {
remote-endpoint = <&vc_vi_in2>;
};
};
};
};
#endif
#if VC_MIPI_CAM_F == 1
vc_csi_chan3: channel@3 {
reg = <3>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vc_csi_chan3_port0: port@0 {
reg = <0>;
vc_csi_in3: endpoint@6 {
port-index = <5>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_mipi_out3>;
};
};
vc_csi_chan3_port1: port@1 {
reg = <1>;
vc_csi_out3: endpoint@7 {
remote-endpoint = <&vc_vi_in3>;
};
};
};
};
#endif
};
#if VC_MIPI_CAM_AB == 1
i2c@546c0000 {
#if VC_MIPI_MANUFACTURER == 1
vc_mipi_cam0: vc_mipi@1a {
reg = <0x1a>;
#else
vc_mipi_cam0: vc_mipi@60 {
reg = <0x60>;
#endif
compatible = "nvidia,vc_mipi";
devnode = "video0";
use_sensor_mode_id = "false";
sensor_model = "vc_mipi";
num_lanes = NUM_LANES;
trigger_mode = "0";
io_mode = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings
physical_w = "6.250";
physical_h = "4.712";
// ----------------------------------------------------
// This node is needed by the Tegra framework.
// You don't have to change any settings if just want to use the V4L API.
mode0 {
num_lanes = NUM_LANES;
tegra_sinterface = "serial_a";
embedded_metadata_height = VC_MIPI_METADATA_H;
readout_orientation = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings.
active_l = "0";
active_t = "0";
active_w = "4032";
active_h = "3040";
pixel_t = "bayer_rggb";
min_gain_val = "0"; // mdB
max_gain_val = "51000"; // mdB
step_gain_val = "50"; // mdB
default_gain = "0"; // mdB
min_exp_time = "1"; // us
max_exp_time = "1000000"; // us
step_exp_time = "1"; // us
default_exp_time = "10000"; // us
// For applications like argus_camera, there should
// be a minimal frame rate greater than zero!
min_framerate = "1000"; // mHz
max_framerate = "40000"; // mHz
step_framerate = "100"; // mHz
default_framerate = "40000"; // mHz
// ----------------------------------------------------
gain_factor = "1000";
exposure_factor = "1000000";
framerate_factor = "1000";
inherent_gain = "1";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
line_length = "0";
phy_mode = "DPHY";
discontinuous_clk = "no";
mclk_khz = "24000";
pix_clk_hz = "800000000";
mclk_multiplier = "9.33";
cil_settletime = "0";
dpcm_enable = "false";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
vc_mipi_out0: endpoint {
port-index = <0>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_in0>;
};
};
};
};
};
#endif
#if VC_MIPI_CAM_CD == 1
i2c@7000c000 {
#if VC_MIPI_MANUFACTURER == 1
vc_mipi_cam1: vc_mipi@1a {
reg = <0x1a>;
#else
vc_mipi_cam1: vc_mipi@60 {
reg = <0x60>;
#endif
compatible = "nvidia,vc_mipi";
devnode = "video1";
use_sensor_mode_id = "false";
sensor_model = "vc_mipi";
num_lanes = NUM_LANES;
trigger_mode = "0";
io_mode = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings
physical_w = "6.250";
physical_h = "4.712";
// ----------------------------------------------------
// This node is needed by the Tegra framework.
// You don't have to change any settings if just want to use the V4L API.
mode0 {
num_lanes = NUM_LANES;
tegra_sinterface = "serial_c";
embedded_metadata_height = VC_MIPI_METADATA_H;
readout_orientation = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings.
active_l = "0";
active_t = "0";
active_w = "4032";
active_h = "3040";
pixel_t = "bayer_rggb";
min_gain_val = "0"; // mdB
max_gain_val = "51000"; // mdB
step_gain_val = "50"; // mdB
default_gain = "0"; // mdB
min_exp_time = "1"; // us
max_exp_time = "1000000"; // us
step_exp_time = "1"; // us
default_exp_time = "10000"; // us
// For applications like argus_camera, there should
// be a minimal frame rate greater than zero!
min_framerate = "1000"; // mHz
max_framerate = "40000"; // mHz
step_framerate = "100"; // mHz
default_framerate = "40000"; // mHz
// ----------------------------------------------------
gain_factor = "1000";
exposure_factor = "1000000";
framerate_factor = "1000";
inherent_gain = "1";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
line_length = "0";
phy_mode = "DPHY";
discontinuous_clk = "no";
mclk_khz = "24000";
pix_clk_hz = "800000000";
mclk_multiplier = "9.33";
cil_settletime = "0";
dpcm_enable = "false";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
vc_mipi_out1: endpoint {
port-index = <2>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_in1>;
};
};
};
};
};
#endif
};
#if VC_MIPI_CAM_E == 1
i2c@7000c400 {
#if VC_MIPI_MANUFACTURER == 1
vc_mipi_cam2: vc_mipi@1a {
reg = <0x1a>;
#else
vc_mipi_cam2: vc_mipi@60 {
reg = <0x60>;
#endif
compatible = "nvidia,vc_mipi";
devnode = "video2";
use_sensor_mode_id = "false";
sensor_model = "vc_mipi";
num_lanes = NUM_LANES;
trigger_mode = "0";
io_mode = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings
physical_w = "1.000";
physical_h = "1.000";
// ----------------------------------------------------
// This node is needed by the Tegra framework.
// You don't have to change any settings if just want to use the V4L API.
mode0 {
num_lanes = NUM_LANES;
tegra_sinterface = "serial_e";
embedded_metadata_height = VC_MIPI_METADATA_H;
readout_orientation = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings.
active_l = "0";
active_t = "0";
active_w = "0";
active_h = "0";
pixel_t = "bayer_rggb";
min_gain_val = "0"; // mdB
max_gain_val = "48000"; // mdB
step_gain_val = "100"; // mdB
default_gain = "0"; // mdB
min_exp_time = "1"; // us
max_exp_time = "1000000"; // us
step_exp_time = "1"; // us
default_exp_time = "10000"; // us
// For applications like argus_camera, there should
// be a minimal frame rate greater than zero!
min_framerate = "1000"; // mHz
max_framerate = "60000"; // mHz
step_framerate = "100"; // mHz
default_framerate = "60000"; // mHz
// ----------------------------------------------------
gain_factor = "1000";
exposure_factor = "1000000";
framerate_factor = "1000";
inherent_gain = "1";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
line_length = "0";
phy_mode = "DPHY";
discontinuous_clk = "no";
mclk_khz = "24000";
pix_clk_hz = "800000000";
mclk_multiplier = "9.33";
cil_settletime = "0";
dpcm_enable = "false";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
vc_mipi_out2: endpoint {
port-index = <4>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_in2>;
};
};
};
};
};
#endif
#if VC_MIPI_CAM_F == 1
i2c@7000c500 {
#if VC_MIPI_MANUFACTURER == 1
vc_mipi_cam3: vc_mipi@1a {
reg = <0x1a>;
#else
vc_mipi_cam3: vc_mipi@60 {
reg = <0x60>;
#endif
compatible = "nvidia,vc_mipi";
devnode = "video3";
use_sensor_mode_id = "false";
sensor_model = "vc_mipi";
num_lanes = NUM_LANES;
trigger_mode = "0";
io_mode = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings
physical_w = "1.000";
physical_h = "1.000";
// ----------------------------------------------------
// This node is needed by the Tegra framework.
// You don't have to change any settings if just want to use the V4L API.
mode0 {
num_lanes = NUM_LANES;
tegra_sinterface = "serial_f";
embedded_metadata_height = VC_MIPI_METADATA_H;
readout_orientation = "0";
// ----------------------------------------------------
// If you want to use GStreamer with nvarguscamerasrc
// you have to adjust this settings.
active_l = "0";
active_t = "0";
active_w = "0";
active_h = "0";
pixel_t = "bayer_rggb";
min_gain_val = "0"; // mdB
max_gain_val = "48000"; // mdB
step_gain_val = "100"; // mdB
default_gain = "0"; // mdB
min_exp_time = "1"; // us
max_exp_time = "1000000"; // us
step_exp_time = "1"; // us
default_exp_time = "10000"; // us
// For applications like argus_camera, there should
// be a minimal frame rate greater than zero!
min_framerate = "1000"; // mHz
max_framerate = "60000"; // mHz
step_framerate = "100"; // mHz
default_framerate = "60000"; // mHz
// ----------------------------------------------------
gain_factor = "1000";
exposure_factor = "1000000";
framerate_factor = "1000";
inherent_gain = "1";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
line_length = "0";
phy_mode = "DPHY";
discontinuous_clk = "no";
mclk_khz = "24000";
pix_clk_hz = "800000000";
mclk_multiplier = "9.33";
cil_settletime = "0";
dpcm_enable = "false";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
vc_mipi_out3: endpoint {
port-index = <5>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&vc_csi_in3>;
};
};
};
};
};
#endif
lens@vc_mipi {
min_focus_distance = "0.0";
hyper_focal = "0.0";
focal_length = "6.0";
f_number = "2.0";
aperture = "0.0";
};
};
/ {
tcp: tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <NUM_CSI_LANES>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <240000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
#if VC_MIPI_CAM_AB == 1
cam_module0: module0 {
status = "okay";
badge = "porg_topleft_vc_mipi";
position = "topleft";
orientation = "1";
cam_module0_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
devname = "vc_mipi 6-001a";
proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/vc_mipi@1a";
#else
devname = "vc_mipi 6-0060";
proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/vc_mipi@60";
#endif
};
cam_module0_drivernode1: drivernode1 {
status = "okay";
pcl_id = "v4l2_lens";
proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
};
};
#endif
#if VC_MIPI_CAM_CD == 1
cam_module1: module1 {
status = "okay";
badge = "porg_topright_vc_mipi";
position = "topright";
orientation = "1";
cam_module1_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
devname = "vc_mipi 0-001a";
proc-device-tree = "/proc/device-tree/host1x/i2c@7000c000/vc_mipi@1a";
#else
devname = "vc_mipi 0-0060";
proc-device-tree = "/proc/device-tree/host1x/i2c@7000c000/vc_mipi@60";
#endif
};
cam_module1_drivernode1: drivernode1 {
status = "okay";
pcl_id = "v4l2_lens";
proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
};
};
#endif
#if VC_MIPI_CAM_E == 1
cam_module2: module2 {
status = "okay";
badge = "porg_bottomleft_vc_mipi";
position = "bottomleft";
orientation = "1";
cam_module2_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
devname = "vc_mipi 1-001a";
proc-device-tree = "/proc/device-tree/i2c@7000c400/vc_mipi@1a";
#else
devname = "vc_mipi 1-0060";
proc-device-tree = "/proc/device-tree/i2c@7000c400/vc_mipi@60";
#endif
};
cam_module2_drivernode1: drivernode1 {
status = "okay";
pcl_id = "v4l2_lens";
proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
};
};
#endif
#if VC_MIPI_CAM_F == 1
cam_module3: module3 {
status = "okay";
badge = "porg_bottomright_vc_mipi";
position = "bottomright";
orientation = "1";
cam_module3_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
devname = "vc_mipi 2-001a";
proc-device-tree = "/proc/device-tree/i2c@7000c500/vc_mipi@1a";
#else
devname = "vc_mipi 2-0060";
proc-device-tree = "/proc/device-tree/i2c@7000c500/vc_mipi@60";
#endif
};
cam_module3_drivernode1: drivernode1 {
status = "okay";
pcl_id = "v4l2_lens";
proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
};
};
#endif
};
};
};
#define CAM1_PWDN TEGRA_GPIO(S, 7)
#define CAM2_PWDN TEGRA_GPIO(T, 0)
#define CAM3_PWDN TEGRA_GPIO(S, 5)
#define CAM4_PWDN TEGRA_GPIO(T, 1)
#define CAM_TRIGGER TEGRA_GPIO(V, 0)
/ {
host1x {
#if VC_MIPI_CAM_AB == 1
i2c@546c0000 {
status = "okay";
#if VC_MIPI_MANUFACTURER == 1
vc_mipi@1a {
#else
vc_mipi@60 {
#endif
status = "okay";
reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
};
};
#endif
#if VC_MIPI_CAM_CD == 1
i2c@7000c000 {
status = "okay";
#if VC_MIPI_MANUFACTURER == 1
vc_mipi@1a {
#else
vc_mipi@60 {
#endif
status = "okay";
reset-gpios = <&gpio CAM2_PWDN GPIO_ACTIVE_HIGH>;
};
};
#endif
};
#if VC_MIPI_CAM_E == 1
i2c@7000c400 {
status = "okay";
#if VC_MIPI_MANUFACTURER == 1
vc_mipi@1a {
#else
vc_mipi@60 {
#endif
status = "okay";
reset-gpios = <&gpio CAM3_PWDN GPIO_ACTIVE_HIGH>;
};
};
#endif
#if VC_MIPI_CAM_F == 1
i2c@7000c500 {
status = "okay";
#if VC_MIPI_MANUFACTURER == 1
vc_mipi@1a {
#else
vc_mipi@60 {
#endif
status = "okay";
reset-gpios = <&gpio CAM4_PWDN GPIO_ACTIVE_HIGH>;
};
};
#endif
gpio@6000d000 {
camera-trigger-high {
status = "okay";
gpio-hog;
output-high;
gpios = <CAM_TRIGGER 0>;
label = "cam-trigger";
};
camera-control-output-low {
gpio-hog;
output-low;
gpios = < CAM1_PWDN 0 CAM2_PWDN 0>;
label = "cam1-pwdn", "cam2-pwdn";
};
};
};
Hello @Frennz ,
it seems, that the patches have not been applied correctly. The standard device driver IMX219 is being loaded. It states, that active_l property is missing, so the kernel_common patches have been applied -> that's ok. The dtsi file seems to be ok, but this dtsi is not being included. In the kernel_Nano_* folder are patches located, which remove the *-imx219.dtsi and adding the tegra210-camera-vc-mipi-cam.dtsi into the whole device tree of the system. This files are called 000*-Modified-tegra210-*.patch After the system has started, you can call
dmesg | grep "DTS File Name"
on your running target. This should give you the used device tree name with the path. Please tell me the dts name. One of the 000*-Modify*.patch files should modify your *.dts file. Please lookup your dts in the .../hardware/nvidia/platform/... path and have a look whether there is an #include directive like this:
#include "../../porg/kernel-dts/porg-platforms/tegra210-camera-vc-mipi-cam.dtsi"
If there isn't a patch file which modifies your *.dts file, then we must setup a patch for exactly this dts-file. We have tested the whole system with the JNX30D not the JNX30A, because providing all system combinations would mean a huge effort. But I cannot imagine, that the JNX30A is using a different *.dts file.
Btw: Have you used a complete new setup (a new folder with setup/build and flash.sh) for your board?
regards
Hello @Frennz ,
it seems, that the patches have not been applied correctly. The standard device driver IMX219 is being loaded. It states, that active_l property is missing, so the kernel_common patches have been applied -> that's ok. The dtsi file seems to be ok, but this dtsi is not being included. In the kernel_Nano_* folder are patches located, which remove the -imx219.dtsi and adding the tegra210-camera-vc-mipi-cam.dtsi into the whole device tree of the system. This files are called 000-Modified-tegra210-*.patch After the system has started, you can call
dmesg | grep "DTS File Name"on your running target. This should give you the used device tree name with the path. Please tell me the dts name. One of the 000*-Modify*.patch files should modify your *.dts file. Please lookup your dts in the .../hardware/nvidia/platform/... path and have a look whether there is an #include directive like this:
#include "../../porg/kernel-dts/porg-platforms/tegra210-camera-vc-mipi-cam.dtsi"If there isn't a patch file which modifies your *.dts file, then we must setup a patch for exactly this dts-file. We have tested the whole system with the JNX30D not the JNX30A, because providing all system combinations would mean a huge effort. But I cannot imagine, that the JNX30A is using a different *.dts file.
Btw: Have you used a complete new setup (a new folder with setup/build and flash.sh) for your board?
regards
Hello @bazo80, sorry for the late response, I was on vacation.
I Followed your described steps and looked up the DTS Files on my Target Machine with the Following output:
vc@nvidia:~$ dmesg | grep "DTS File Name"
[ 0.212326] DTS File Name: /home/ms/vc_mipi_nvidia/build/Nano_32.7.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-a02.dts
[ 0.416281] DTS File Name: /home/ms/vc_mipi_nvidia/build/Nano_32.7.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-a02.dts
So I think you want me to take a look at the file tegra210-p3448-0000-p3449-0000-a02.dts in my Build folder on my host machine.?
I flashed my board from a empty folder and a newly cloned repo with all tool chains and everything downloaded again.
This is the Content of the DTS file from the BUILD Folder on my HOST machine that was flashed
/*
* arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dts
*
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "tegra210-porg-p3448-common.dtsi"
#include "porg-platforms/tegra210-porg-camera-rbpcv3-imx477.dtsi"
#include "porg-platforms/tegra210-porg-camera-rbpcv2-imx219.dtsi"
#include "porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi"
#include "porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi"
#include "porg-platforms/tegra210-porg-p3448-emc-a00.dtsi"
/ {
model = "NVIDIA Jetson Nano Developer Kit";
compatible = "nvidia,p3449-0000-a02+p3448-0000-a02", "nvidia,jetson-nano", "nvidia,tegra210";
nvidia,dtsfilename = __FILE__;
spi@70410000 {
status = "okay";
spiflash@0 {
controller-data {
nvidia,x1-len-limit = <16>;
nvidia,x4-bus-speed = <104000000>;
nvidia,x4-dymmy-cycle = <8>;
};
};
};
gpio@6000d000 {
/* gpio-name for 40-pin header, gpio-name given as COL(10) x ROW(20) */
gpio-line-names = "", "", "", "", "", "", "", "", "", "",
"", "", "SPI1_MOSI", "SPI1_MISO", "SPI1_SCK", "SPI1_CS0", "SPI0_MOSI", "SPI0_MISO", "SPI0_SCK", "SPI0_CS0",
"SPI0_CS1", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "GPIO13", "",
"", "", "", "", "", "", "", "", "", "",
"UART1_RTS", "UART1_CTS", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "I2S0_FS", "I2S0_DIN", "I2S0_DOUT", "I2S0_SCLK",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "GPIO01",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "GPIO07", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "GPIO12", "", "", "", "", "",
"GPIO11", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "GPIO09", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "SPI1_CS1", "", "", "", "", "", "", "";
};
};
Also, A pended Here tegra210-p3448-0000-p3449-0000-a02.zip
So that is that. I Hoped I Followed your steps correctly, and you can help me to configure the device tree for my system and figure my problem out.
thanks for the help!
If I misunderstood something, I apologize, followup instructions could also be in German if it's also your mother language.
with the best regards
Hello @Frennz ,
if you have a look into the folder build/Nano_XX.Y.Z/Linux_for_Tegra/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/ you will find several dts files. Two of them are interesting for your use case: tegra210-p3448-0000-p3449-0000-a02.dts and tegra210-p3448-0000-p3449-0000-b00.dts The a02.dts file will be used for your board (JN30A), the b00.dts file is used for my setup (Nano on JNX30).
When you compare both files, you will see that the b00.dts has a compiler switch included, which removes both standard sensors (IMX219 and IMX477) from the device tree file and includes the vc_mipi dtsi (tegra210-camera-vc-mipi-cam.dtsi) like this:
...
#define VC_MIPI 1
#include "tegra210-porg-p3448-common.dtsi"
#if VC_MIPI
#include "porg-platforms/tegra210-camera-vc-mipi-cam.dtsi"
#else
#include "porg-platforms/tegra210-porg-camera-rbpcv3-dual-imx477.dtsi"
#include "porg-platforms/tegra210-porg-camera-rbpcv2-dual-imx219.dtsi"
#endif
#include "porg-platforms/tegra210-porg-pinmux-p3448-0000-b00.dtsi"
#include "porg-platforms/tegra210-porg-gpio-p3448-0000-b00.dtsi"
#include "porg-platforms/tegra210-porg-p3448-emc-a00.dtsi"
/ {
model = "NVIDIA Jetson Nano Developer Kit";
compatible = "nvidia,p3449-0000-b00+p3448-0000-b00", "nvidia,jetson-nano", "nvidia,tegra210";
nvidia,dtsfilename = __FILE__;
...
Your a02.dts file is not patched, so you have to insert the vc_mipi dtsi. When you apply this mechanism to your file, then it should look like this:
...
#define VC_MIPI 1
#include "tegra210-porg-p3448-common.dtsi"
#if VC_MIPI
#include "porg-platforms/tegra210-camera-vc-mipi-cam.dtsi"
#else
#include "porg-platforms/tegra210-porg-camera-rbpcv3-imx477.dtsi"
#include "porg-platforms/tegra210-porg-camera-rbpcv2-imx219.dtsi"
#endif
#include "porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi"
#include "porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi"
#include "porg-platforms/tegra210-porg-p3448-emc-a00.dtsi"
/ {
model = "NVIDIA Jetson Nano Developer Kit";
compatible = "nvidia,p3449-0000-a02+p3448-0000-a02", "nvidia,jetson-nano", "nvidia,tegra210";
nvidia,dtsfilename = __FILE__;
...
Please be careful, every number/letter, especially in the filenames is important! This process needs to be done one time. After that, you can modify your tegra210-camera-vc-mipi-cam.dtsi with ...
./setup.sh -c
... compile the device tree with ...
./build.sh -d
...and flash it with...
./flash.sh -d
After the system boot up, the mipi driver should be loaded.
Also prinzipielles Vorgehen ist, dass das setup Skript unsere Patches auf den Source-Code und auf die von NVIDIA bereits mitgelieferten Device-Tree-Dateien anwendet. Je nach Modul-Board Kombination wird das entsprechende vc-mipi-cam.dtsi (Device-Tree-Include-File) in den entsprechenden Device-Tree eingebunden. In Ihrem Fall wäre das die Datei tegra210-camera-vc-mipi-cam.dtsi aus dem Auvidea_JNX30_Nano Verzeichnis in den Device-Tree von dem JN30A tegra210-p3448-0000-p3449-0000-a02.dts. Wenn Sie sich diese Datei im Verzeichnis build/Nano_XX.Y.Z/Linux_for_Tegra/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/ anschauen, stehen darin zwei Kamera-Include Files (IMX219 und IMX477). Das sind Standard-Sensoren, respektive Beispiele. Diese müssen mittels Schalter rausgenommen werden und durch die Include-Direktive tegra210-camera-vc-mipi-cam.dtsi ersetzt werden. Ihre anzupassende Device-Tree-Datei (tegra210-p3448-0000-p3449-0000-a02.dts) muss dann wie folgt aussehen:
...
#define VC_MIPI 1
#include "tegra210-porg-p3448-common.dtsi"
#if VC_MIPI
#include "porg-platforms/tegra210-camera-vc-mipi-cam.dtsi"
#else
#include "porg-platforms/tegra210-porg-camera-rbpcv3-imx477.dtsi"
#include "porg-platforms/tegra210-porg-camera-rbpcv2-imx219.dtsi"
#endif
#include "porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi"
#include "porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi"
#include "porg-platforms/tegra210-porg-p3448-emc-a00.dtsi"
/ {
model = "NVIDIA Jetson Nano Developer Kit";
compatible = "nvidia,p3449-0000-a02+p3448-0000-a02", "nvidia,jetson-nano", "nvidia,tegra210";
nvidia,dtsfilename = __FILE__;
...
Das muss auch nur einmalig gemacht werden. Im Anschluss kann die tegra210-camera-vc-mipi-cam.dtsi Datei dann mittels ./setup.sh -c angepasst werden.
Der ./build.sh -d Befehl kopiert dann die tegra210-camera-vc-mipi-cam.dtsi Datei in das porg-platforms Verzeichnis, von wo aus sie eingebunden werden kann und der komplette Device-Tree wird gebaut.
Zur Kontrolle kann man den kompletten Device-Tree auch wieder zurückwandeln. Im Verzeichnis build/Nano_XX.Y.Z/Linux_for_Tegra/kernel/dtb wäre das in dem Fall die Datei tegra210-p3448-0000-p3449-0000-a02.dtb
Mit dem folgendem Befehl erhält man den zurückgewandelten Device-Tree:
dtc -I dtb -O dts tegra210-p3448-0000-p3449-0000-a02.dtb -o tegra210-p3448-0000-p3449-0000-a02.dts
In der darauf entstandenen tegra210-p3448-0000-p3449-0000-a02.dts Datei sollte weder IMX219 noch IMX477 vorkommen, sondern nur der Eintrag vc_mipi. Wenn das der Fall ist, können Sie mit ./flash.sh -d den Device-Tree flashen.
Ich kann es leider nicht selber testen, da ich das JN30A nicht zur Hand habe
Hi @bazo80 I followed your instructions and flashed the board with the modifications you instructed.
I think they applied correctly, but other things seem not to bind correctly, if you can give me insight how to patch these I would be very grateful!
These Errors arose after modifying the tegra210-p3448-0000-p3449-0000-a02.dts file.
(I followed your instructions and also used a fresh clone with build --all with the modifications same result)
On a different Note
The difference between the JN30 (JN30B probably because the patches only apply to b01 dts files) and my board is that the JN30A only support old A revision compute modules and not the newer B01 Compute modules from the B01 Development board that you support. I sadly cannot use the B01 Module on the 4- Lane Board because of the difference of the pin outs between these two revisions.
I hope this does not play a mayor role and is unrelated to the Boot errors I'm getting, and you can still help me out to get it working, and I hope that this isn't a big factor that would include too much work to get it working.
I acknowledge that it's a different chipset with a different pin structure, and I would understand if support for that platform from your side is limited.
The JN30a is a previous iteration before they switched to the JN30B and JNX30 boards with the B01 module.
The JNX30 board is also not available anymore and only on backorder. (It's probably replaced by the JNX30D and JNX30M) The JNX42 board is also not available for nano systems.
It's a little bit complicated for me to decide how to integrate your sensors with the nano chip right now since the only option seams to be to drop the nano modules for another system like the orin or Xavier nx if i want native support with 4 mipi lanes with the drivers you provide and not bother you guys all the time since all the boards you list support in the GitHub list are not available anymore in their original form.
If you can give me insight if the JNX30D would also work as JNX30 replacement if the A02 module is not supported anymore since this is the closest to an official board in your list with B01 support I might pick that up before switching to an orin system.
Edit: the JNX30D is Available als Flash Option in the script I was just looking at the GitHub readme where it is not mentioned. I would get the JNX30D if the current Board I have, is to old and is to complicated to get working.
Regards
@bazo80 is The JNX30D a board that is confirmed and tested with the B01 module? that is working with the IMx412?
Hello @Frennz ,
colleague of mine could make a statement about the JNX30D, but he is in vacation until monday. I can confirm the Nano B01 module (Model: P3448 180-13448-DAAA-B01) running on JNX30 - PSE SKU: 70803 (2 cams) and JNX42-LM SKU: 70784-LM (1 cam). The JNX42 is designed for the Orins, but you can also attach the Nano B01 with one single cam (cam0). https://auvidea.eu/download/manual/JNX42/JNX42_Manual.pdf page 6: "(Nano, TX2NX and Xavier NX will only support one USB 3.0 port and only one CSI-2 interface.)"
I've just tested the IMX412 with Nano B01 on JNX30 and JNX42 => 4 lanes, 40Hz, working.
BTW: your last dmesg stated, that the system tried to load two instances of the vc_mipi driver
vc_mipi 0-001a: vc_mod_setup(): Unable to get...
vc_mipi 6-001a: vc_mod_setup(): Unable to get...
That means, that the patch for the driver took effect. On the firmware site https://auvidea.eu/firmware/ I have seen a note which states: "JN30A: only 1x CSI-2 camera (imx219) is supported at this time."
You could try to define only one sensor in your dtsi, maybe the system behaves in another way. Hard to say, without having this old setup.
regards
Hello @Frennz ,
colleague of mine could make a statement about the JNX30D, but he is in vacation until monday.
I can confirm the Nano B01 module (Model: P3448 180-13448-DAAA-B01) running on
JNX30 - PSE SKU: 70803 (2 cams) and
JNX42-LM SKU: 70784-LM (1 cam).
The JNX42 is designed for the Orins, but you can also attach the Nano B01 with one single cam (cam0).
https://auvidea.eu/download/manual/JNX42/JNX42_Manual.pdf
page 6:
"(Nano, TX2NX and Xavier NX will only support one USB 3.0 port and only one CSI-2 interface.)"
I've just tested the IMX412 with Nano B01 on JNX30 and JNX42 => 4 lanes, 40Hz, working.
BTW: your last dmesg stated, that the system tried to load two instances of the vc_mipi driver
vc_mipi 0-001a: vc_mod_setup(): Unable to get... vc_mipi 6-001a: vc_mod_setup(): Unable to get...That means, that the patch for the driver took effect.
On the firmware site
https://auvidea.eu/firmware/
I have seen a note which states:
"JN30A: only 1x CSI-2 camera (imx219) is supported at this time."
You could try to define only one sensor in your dtsi, maybe the system behaves in another way. Hard to say, without having this old setup.
regards
Ok I will try it out by changing the dtsi by disabling VC Stream CD and only configuring the CAM 0 part I will update you as soon as possible in this code bit:
// ------------------------------------------------------------------------------------------------ // Driver Configuration for NVIDIA Jetson Nano on Auvidea JNX30-LC-PD // ------------------------------------------------------------------------------------------------ #define VC_MIPI_CAM_AB 1 // 1: Enabled, 0: Disabled (serial_a => CSI Port 0 => VI Stream 0) #define VC_MIPI_CAM_CD 1 // 1: Enabled, 0: Disabled (serial_c => CSI Port 2 => VI Stream 2) #define VC_MIPI_CAM_E 0 // 1: Enabled, 0: Disabled (serial_e => CSI Port 4 => VI Stream 4) #define VC_MIPI_CAM_F 0 // 1: Enabled, 0: Disabled (serial_f => CSI Port 5 => VI Stream 5)
@bazo80
Sadly It's still not working even with:
#define VC_MIPI_CAM_AB 1 // 1: Enabled, 0: Disabled (serial_a => CSI Port 0 => VI Stream 0) #define VC_MIPI_CAM_CD 0 // 1: Enabled, 0: Disabled (serial_c => CSI Port 2 => VI Stream 2) #define VC_MIPI_CAM_E 0 // 1: Enabled, 0: Disabled (serial_e => CSI Port 4 => VI Stream 4) #define VC_MIPI_CAM_F 0 // 1: Enabled, 0: Disabled (serial_f => CSI Port 5 => VI Stream 5)
as you see here
same output than before
If you can confirm the JNX30D with your colleague, that would be helpful, else I'll try to backorder the JNX30 I guess. Thanks for help in any case.
Hello @Frennz,
I repeated my test to confirm to you that the following setup works fine:
- Carrier board: Auvidea JNX30D
- SoM: NVIDIA Jetson Nano B01
- Camera: Vision Components IMX412
- Driver: VC MIPI NVIDIA Version 0.17.1
- Camera port: 1 + 2 with 2 and 4 lanes
Regards, Peter
Hello @Frennz,
I repeated my test to confirm to you that the following setup works fine:
Carrier board: Auvidea JNX30D
SoM: NVIDIA Jetson Nano B01
Camera: Vision Components IMX412
Driver: VC MIPI NVIDIA Version 0.17.1
Camera port: 1 + 2 with 2 and 4 lanes
Regards,
Peter
Thanks I will purchase this then. Thank you and bazo80 for the amazing support!