Hi everyone,
I am trying to developer a v4l2 driver for our MIPI camera
We are using L4T 32.7.2
The driver is working great on TX2 (with vi4), but unfortunately we are not able to stream on the AGX Xavier (vi5), but the i2c access is ok
Here is the DTS for the TX2, where it’s working
/*
* Copyright (c) 2016-2019, 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; 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/>.
*/
#define CAM0_RST_L TEGRA_MAIN_GPIO(R, 5)
#define CAM0_PWDN TEGRA_MAIN_GPIO(R, 0)
/* camera control gpio definitions */
/ {
i2c@3180000 {
ati640_a@13 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
/* mclk-index indicates the index of the */
/* mclk-name with in the clock-names array */
clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>,
<&tegra_car TEGRA186_CLK_PLLP_OUT0>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
clock-frequency = <24000000>;
reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
vana-supply = <&en_vdd_cam_hv_2v8>;
vif-supply = <&en_vdd_cam>;
};
};
gpio@2200000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM0_RST_L 0 CAM0_PWDN 0>;
label = "cam0-rst", "cam0-pwdn";
status = "okay";
};
};
};
/ {
host1x {
vi@15700000 {
num-channels = <1>;
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
status = "okay";
ati640_vi_in0: endpoint {
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&ati640_csi_out0>;
status = "okay";
};
};
};
};
nvcsi@150c0000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
csi_chan0: channel@0 {
reg = <0>;
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
csi_chan0_port0: port@0 {
reg = <0>;
status = "okay";
ati640_csi_in0: endpoint@0 {
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&ati640_out0>;
status = "okay";
};
};
csi_chan0_port1: port@1 {
reg = <1>;
status = "okay";
ati640_csi_out0: endpoint@1 {
remote-endpoint = <&ati640_vi_in0>;
status = "okay";
};
};
};
};
};
};
i2c@3180000 {
ati640_single_cam0: ati640_a@13 {
compatible = "lynred,ati640";
/* I2C device address */
reg = <0x13>;
/* V4L2 device node location */
devnode = "video0";
/* Physical dimensions of sensor */
physical_w = "7.680";
physical_h = "5.760";
sensor_model = "ati640";
/* enable CID_SENSOR_MODE_ID for sensor modes selection */
use_sensor_mode_id = "true";
//Clock info: bitrate=660 Mbps, pix clk = 55 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode0 { /* ATI640_MODE_640x480_60FPS_12BIT 12-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "480";
dynamic_pixel_bit_depth="12";
csi_pixel_bit_depth = "12";
mode_type="gray12";
pixel_t="gray12";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=660 Mbps, pix clk = 22.5 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode1 { /* ATI640_MODE_640x480_60FPS_RGB888 */
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "480";
dynamic_pixel_bit_depth="24";
csi_pixel_bit_depth = "24";
mode_type="rgb_rgb88824";
pixel_t="rgb_rgb88824";
pixel_phase="rggb";
//pixel_phase="cccc";
//mode_type="bayer";
//pixel_t="bayer_rggb8";
//pixel_phase="rggb";
readout_orientation = "0";
line_length = "640";
inherent_gain = "1";
mclk_multiplier = "2";
//LUSA changed from 50000000 to 44357000
pix_clk_hz = "27500000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=660 Mbps, pix clk = 55 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode2 { /* ATI640_MODE_640x481_60FPS_12BIT 12-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "481";
dynamic_pixel_bit_depth="12";
csi_pixel_bit_depth = "12";
mode_type="gray12";
pixel_t="gray12";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=660 Mbps, pix clk = 22.5 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode3 { /* ATI640_MODE_640x481_60FPS_RGB888 */
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "481";
dynamic_pixel_bit_depth="24";
csi_pixel_bit_depth = "24";
mode_type="rgb_rgb88824";
pixel_t="rgb_rgb88824";
pixel_phase="rggb";
//pixel_phase="cccc";
//mode_type="bayer";
//pixel_t="bayer_rggb8";
//pixel_phase="rggb";
readout_orientation = "0";
line_length = "640";
inherent_gain = "1";
mclk_multiplier = "2";
//LUSA changed from 50000000 to 44357000
pix_clk_hz = "27500000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=440 Mbps, pix clk = 55 Mhz,
// byte clk = 55 Mhz, DPHY ref clk = 110 MHz
mode4 { /* ATI640_MODE_640x480_60FPS_8BIT 8-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "480";
dynamic_pixel_bit_depth="8";
csi_pixel_bit_depth = "8";
mode_type="gray";
pixel_t="gray";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=440 Mbps, pix clk = 55 Mhz,
// byte clk = 55 Mhz, DPHY ref clk = 110 MHz
mode5 { /* ATI640_MODE_640x481_60FPS_8BIT 8-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "481";
dynamic_pixel_bit_depth="8";
csi_pixel_bit_depth = "8";
mode_type="gray";
pixel_t="gray";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
ati640_out0: endpoint {
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&ati640_csi_in0>;
};
};
};
};
};
};
/ {
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <1>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <8>;
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>;
status = "okay";
modules {
status = "okay";
cam_module0: module0 {
badge = "ati640_front_123456";
position = "front";
orientation = "1";
status = "okay";
cam_module0_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "ati640 2-0013";
proc-device-tree = "/proc/device-tree/i2c@3180000/ati640_a@13";
};
};
};
};
};
And this is the DTS for the AGX Xavier, where there is no video
/*
* Copyright (c) 2016-2019, 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; 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/>.
*/
#define CAM0_RST_L TEGRA194_MAIN_GPIO(H, 3)
#define CAM0_PWDN TEGRA194_MAIN_GPIO(H, 6)
/* camera control gpio definitions */
/ {
i2c@3180000 {
ati640_a@13 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
/* mclk-index indicates the index of the */
/* mclk-name with in the clock-names array */
clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_PLLP_OUT0>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
clock-frequency = <24000000>;
reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
vana-supply = <&p2822_avdd_cam_2v8>;
vif-supply = <&p2822_vdd_1v8_cvb>;
};
};
gpio@2200000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM0_RST_L 0 CAM0_PWDN 0>;
label = "cam0-rst", "cam0-pwdn";
status = "okay";
};
};
};
/ {
host1x {
vi@15c10000 {
num-channels = <1>;
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
status = "okay";
ati640_vi_in0: endpoint {
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&ati640_csi_out0>;
status = "okay";
};
};
};
};
nvcsi@15a00000 {
num-channels = <1>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
csi_chan0: channel@0 {
status = "okay";
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
csi_chan0_port0: port@0 {
reg = <0>;
status = "okay";
ati640_csi_in0: endpoint@0 {
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&ati640_out0>;
status = "okay";
};
};
csi_chan0_port1: port@1 {
reg = <1>;
status = "okay";
ati640_csi_out0: endpoint@1 {
remote-endpoint = <&ati640_vi_in0>;
status = "okay";
};
};
};
};
};
};
i2c@3180000 {
ati640_single_cam0: ati640_a@13 {
compatible = "lynred,ati640";
/* I2C device address */
reg = <0x13>;
/* V4L2 device node location */
devnode = "video0";
/* Physical dimensions of sensor */
physical_w = "7.680";
physical_h = "5.760";
sensor_model = "ati640";
/* enable CID_SENSOR_MODE_ID for sensor modes selection */
use_sensor_mode_id = "true";
//Clock info: bitrate=660 Mbps, pix clk = 55 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode0 { /* ATI640_MODE_640x480_60FPS_12BIT 12-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "480";
dynamic_pixel_bit_depth="12";
csi_pixel_bit_depth = "12";
mode_type="gray12";
pixel_t="gray12";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=660 Mbps, pix clk = 22.5 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode1 { /* ATI640_MODE_640x480_60FPS_RGB888 */
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "480";
dynamic_pixel_bit_depth="24";
csi_pixel_bit_depth = "24";
mode_type="rgb_rgb88824";
pixel_t="rgb_rgb88824";
pixel_phase="rggb";
//pixel_phase="cccc";
//mode_type="bayer";
//pixel_t="bayer_rggb8";
//pixel_phase="rggb";
readout_orientation = "0";
line_length = "640";
inherent_gain = "1";
mclk_multiplier = "2";
//LUSA changed from 50000000 to 44357000
pix_clk_hz = "27500000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=660 Mbps, pix clk = 55 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode2 { /* ATI640_MODE_640x481_60FPS_12BIT 12-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "481";
dynamic_pixel_bit_depth="12";
csi_pixel_bit_depth = "12";
mode_type="gray12";
pixel_t="gray12";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=660 Mbps, pix clk = 22.5 Mhz,
// byte clk = 82.5 Mhz, DPHY ref clk = 110 MHz
mode3 { /* ATI640_MODE_640x481_60FPS_RGB888 */
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "481";
dynamic_pixel_bit_depth="24";
csi_pixel_bit_depth = "24";
mode_type="rgb_rgb88824";
pixel_t="rgb_rgb88824";
pixel_phase="rggb";
//pixel_phase="cccc";
//mode_type="bayer";
//pixel_t="bayer_rggb8";
//pixel_phase="rggb";
readout_orientation = "0";
line_length = "640";
inherent_gain = "1";
mclk_multiplier = "2";
//LUSA changed from 50000000 to 44357000
pix_clk_hz = "27500000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=440 Mbps, pix clk = 55 Mhz,
// byte clk = 55 Mhz, DPHY ref clk = 110 MHz
mode4 { /* ATI640_MODE_640x480_60FPS_8BIT 8-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "480";
dynamic_pixel_bit_depth="8";
csi_pixel_bit_depth = "8";
mode_type="gray";
pixel_t="gray";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
//Clock info: bitrate=440 Mbps, pix clk = 55 Mhz,
// byte clk = 55 Mhz, DPHY ref clk = 110 MHz
mode5 { /* ATI640_MODE_640x481_60FPS_8BIT 8-bit video*/
mclk_khz = "22000"; //LUSA: ATOM320 was 20000
num_lanes = "1";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "481";
dynamic_pixel_bit_depth="8";
csi_pixel_bit_depth = "8";
mode_type="gray";
pixel_t="gray";
pixel_phase="cccc";
readout_orientation = "90";
line_length = "640";
inherent_gain = "1";
mclk_multiplier= "2.5";
//mclk_multiplier = "2.625"; //LUSA - changed this
//LUSA changed from 50000000 to 44357000 for ATOM320
pix_clk_hz = "55000000";
//pix_clk_hz = "50000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
ati640_out0: endpoint {
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&ati640_csi_in0>;
};
};
};
};
};
};
/ {
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <1>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <8>;
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>;
status = "okay";
modules {
status = "okay";
cam_module0: module0 {
status = "okay";
badge = "ati640_front_123456";
position = "front";
orientation = "1";
cam_module0_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "ati640 2-0013";
proc-device-tree = "/proc/device-tree/i2c@3180000/ati640_a@13";
};
};
};
};
};
Do you see any evident problem?
Here are the logs
I saw those specific errors, how can I know what it means?
I started to look a the Xavier TRM but couldn’t find anything
kworker/0:1-28380 [000] .... 4638.984504: rtcpu_nvcsi_intr: tstamp:145386023169 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984505: rtcpu_nvcsi_intr: tstamp:145386023169 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
# tracer: nop
#
# entries-in-buffer/entries-written: 302779/302779 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
ldk-29347 [003] .n.. 4638.933768: tegra_channel_capture_setup: vnc_id 0 W 640 H 480 fmt c5
ldk-29347 [002] .... 4638.940673: tegra_channel_set_stream: enable : 0x1
ldk-29347 [000] .... 4638.943245: tegra_channel_set_stream: 15a00000.nvcsi--1 : 0x1
ldk-29347 [000] .... 4638.943249: csi_s_stream: enable : 0x1
ldk-29347 [000] .... 4638.943259: tegra_channel_set_stream: ati640 2-0013 : 0x1
kworker/0:1-28380 [000] .... 4638.984309: rtos_queue_peek_from_isr_failed: tstamp:145385892236 queue:0x0bcbb8b8
kworker/0:1-28380 [000] .... 4638.984314: rtcpu_start: tstamp:145385893805
kworker/0:1-28380 [000] .... 4638.984317: rtos_queue_send_from_isr_failed: tstamp:145385914748 queue:0x0bcb2b38
kworker/0:1-28380 [000] .... 4638.984318: rtos_queue_send_from_isr_failed: tstamp:145385914886 queue:0x0bcb73a0
kworker/0:1-28380 [000] .... 4638.984320: rtos_queue_send_from_isr_failed: tstamp:145385915023 queue:0x0bcb8f20
kworker/0:1-28380 [000] .... 4638.984321: rtos_queue_send_from_isr_failed: tstamp:145385915155 queue:0x0bcb9ce0
kworker/0:1-28380 [000] .... 4638.984322: rtos_queue_send_from_isr_failed: tstamp:145385915289 queue:0x0bcbaaa0
kworker/0:1-28380 [000] .... 4638.984324: rtcpu_string: tstamp:145385915692 id:0x04010000 str:"Configuring VI GoS.
"
kworker/0:1-28380 [000] .... 4638.984352: rtcpu_string: tstamp:145385915871 id:0x04010000 str:"VM GOS[#0] addr=0xc2100000
"
kworker/0:1-28380 [000] .... 4638.984367: rtcpu_string: tstamp:145385916111 id:0x04010000 str:"VM GOS[#1] addr=0xc2101000
"
kworker/0:1-28380 [000] .... 4638.984377: rtcpu_string: tstamp:145385916339 id:0x04010000 str:"VM GOS[#2] addr=0xc2102000
"
kworker/0:1-28380 [000] .... 4638.984416: rtcpu_string: tstamp:145385916557 id:0x04010000 str:"VM GOS[#3] addr=0xc2103000
"
kworker/0:1-28380 [000] .... 4638.984426: rtcpu_string: tstamp:145385916788 id:0x04010000 str:"VM GOS[#4] addr=0xc2104000
"
kworker/0:1-28380 [000] .... 4638.984436: rtcpu_string: tstamp:145385917007 id:0x04010000 str:"VM GOS[#5] addr=0xc2105000
"
kworker/0:1-28380 [000] .... 4638.984445: rtcpu_string: tstamp:145385918289 id:0x04010000 str:"vi5_hwinit: firmware CL2018101701 protocol vers"
kworker/0:1-28380 [000] .... 4638.984447: rtcpu_string: tstamp:145385918396 id:0x04010000 str:"on 2.2
"
kworker/0:1-28380 [000] .... 4638.984457: rtos_queue_send_from_isr_failed: tstamp:145385933576 queue:0x0bcb2b38
kworker/0:1-28380 [000] .... 4638.984458: rtos_queue_send_from_isr_failed: tstamp:145385933716 queue:0x0bcb73a0
kworker/0:1-28380 [000] .... 4638.984459: rtos_queue_send_from_isr_failed: tstamp:145385933856 queue:0x0bcb8f20
kworker/0:1-28380 [000] .... 4638.984485: rtos_queue_send_from_isr_failed: tstamp:145385933988 queue:0x0bcb9ce0
kworker/0:1-28380 [000] .... 4638.984486: rtos_queue_send_from_isr_failed: tstamp:145385934121 queue:0x0bcbaaa0
kworker/0:1-28380 [000] .... 4638.984487: rtcpu_string: tstamp:145385934944 id:0x04010000 str:"VI GOS[#0] set to VM GOS[4] base 0xc2104000
"
kworker/0:1-28380 [000] .... 4638.984498: rtos_queue_send_from_isr_failed: tstamp:145386016414 queue:0x0bcb2b38
kworker/0:1-28380 [000] .... 4638.984499: rtos_queue_send_from_isr_failed: tstamp:145386016552 queue:0x0bcb73a0
kworker/0:1-28380 [000] .... 4638.984500: rtos_queue_send_from_isr_failed: tstamp:145386016691 queue:0x0bcb8f20
kworker/0:1-28380 [000] .... 4638.984501: rtos_queue_send_from_isr_failed: tstamp:145386016824 queue:0x0bcb9ce0
kworker/0:1-28380 [000] .... 4638.984502: rtos_queue_send_from_isr_failed: tstamp:145386016955 queue:0x0bcbaaa0
kworker/0:1-28380 [000] .... 4638.984504: rtcpu_nvcsi_intr: tstamp:145386023169 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984505: rtcpu_nvcsi_intr: tstamp:145386023169 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984506: rtcpu_nvcsi_intr: tstamp:145386024110 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984507: rtcpu_nvcsi_intr: tstamp:145386024110 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984508: rtcpu_nvcsi_intr: tstamp:145386025050 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984509: rtcpu_nvcsi_intr: tstamp:145386025050 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984510: rtcpu_nvcsi_intr: tstamp:145386025998 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984511: rtcpu_nvcsi_intr: tstamp:145386025998 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984512: rtcpu_nvcsi_intr: tstamp:145386026943 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984512: rtcpu_nvcsi_intr: tstamp:145386026943 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984513: rtcpu_nvcsi_intr: tstamp:145386027887 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984514: rtcpu_nvcsi_intr: tstamp:145386027887 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984515: rtcpu_nvcsi_intr: tstamp:145386028831 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984516: rtcpu_nvcsi_intr: tstamp:145386028831 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984517: rtcpu_nvcsi_intr: tstamp:145386029775 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984518: rtcpu_nvcsi_intr: tstamp:145386029775 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984519: rtcpu_nvcsi_intr: tstamp:145386030719 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984539: rtcpu_nvcsi_intr: tstamp:145386030719 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984540: rtcpu_nvcsi_intr: tstamp:145386031665 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984541: rtcpu_nvcsi_intr: tstamp:145386031665 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984542: rtcpu_nvcsi_intr: tstamp:145386032609 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984543: rtcpu_nvcsi_intr: tstamp:145386032609 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984544: rtcpu_nvcsi_intr: tstamp:145386033551 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984545: rtcpu_nvcsi_intr: tstamp:145386033551 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984546: rtcpu_nvcsi_intr: tstamp:145386034499 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984547: rtcpu_nvcsi_intr: tstamp:145386034499 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
kworker/0:1-28380 [000] .... 4638.984548: rtcpu_nvcsi_intr: tstamp:145386035443 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0a000000
kworker/0:1-28380 [000] .... 4638.984549: rtcpu_nvcsi_intr: tstamp:145386035443 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000a00
And the dmesg output
[ 4139.521668] ati640_poweron entry
[ 4139.521678] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4139.628740] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4139.652140] ati640_poweron entry
[ 4139.652147] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4139.756594] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4139.785154] ati640_poweron entry
[ 4139.785168] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4139.892635] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4139.979471] ati640_poweron entry
[ 4139.979481] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4140.084645] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4140.119417] ati640_poweron entry
[ 4140.119433] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4140.224758] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4144.751105] ati640_poweron entry
[ 4144.751125] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4144.856777] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4149.104354] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 4149.129525] ati640_set_mode(): sensor_mode_id=0, mode_prop_idx=0, mode=0
[ 4149.236582] ati640_write_reg16(addr=0x2001, val=0x1)
[ 4149.344550] ati640_write_reg16(addr=0x308, val=0x0)
[ 4149.344560] ati640_start_streaming
[ 4149.452558] ati640_read_reg16(addr=0x0, val=0x3(0x3))
[ 4149.452568] ati640 system_status register = 0x3
[ 4149.452573] ati640 init complete (1)
[ 4149.452578] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4149.560516] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4149.560557] Enabled streaming(err=0x0)... reading registers
[ 4151.656333] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 4151.656496] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 4151.656657] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 4151.660373] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 4154.184377] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 4154.184538] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 4154.184717] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 4154.188352] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 4638.943277] ati640_set_mode(): sensor_mode_id=0, mode_prop_idx=0, mode=0
[ 4638.984344] [RCE] Configuring VI GoS.
[ 4638.984363] [RCE] VM GOS[#0] addr=0xc2100000
[ 4638.984374] [RCE] VM GOS[#1] addr=0xc2101000
[ 4638.984412] [RCE] VM GOS[#2] addr=0xc2102000
[ 4638.984422] [RCE] VM GOS[#3] addr=0xc2103000
[ 4638.984432] [RCE] VM GOS[#4] addr=0xc2104000
[ 4638.984442] [RCE] VM GOS[#5] addr=0xc2105000
[ 4638.984453] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 4638.984494] [RCE] VI GOS[#0] set to VM GOS[4] base 0xc2104000
[ 4639.048553] ati640_write_reg16(addr=0x2001, val=0x1)
[ 4639.158268] ati640_write_reg16(addr=0x308, val=0x0)
[ 4639.158279] ati640_start_streaming
[ 4639.264552] ati640_read_reg16(addr=0x0, val=0x3(0x3))
[ 4639.264562] ati640 system_status register = 0x3
[ 4639.264567] ati640 init complete (1)
[ 4639.264572] ati640_write_table(): USE_WRITE_TABLE=0 - Only writing the first register in the table!
[ 4639.372504] ati640_write_reg16(addr=0x2003, val=0x1)
[ 4639.372545] Enabled streaming(err=0x0)... reading registers
[ 4641.640341] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 4641.640483] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 4641.640631] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 4641.644404] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 4641.676615] [RCE] Configuring VI GoS.
[ 4641.676628] [RCE] VM GOS[#0] addr=0xc2100000
[ 4641.676637] [RCE] VM GOS[#1] addr=0xc2101000
[ 4641.676645] [RCE] VM GOS[#2] addr=0xc2102000
[ 4641.676654] [RCE] VM GOS[#3] addr=0xc2103000
[ 4641.676662] [RCE] VM GOS[#4] addr=0xc2104000
[ 4641.676670] [RCE] VM GOS[#5] addr=0xc2105000
[ 4644.180864] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 4644.181048] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 4644.181191] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 4644.186243] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 4644.196814] [RCE] Configuring VI GoS.
[ 4644.196828] [RCE] VM GOS[#0] addr=0xc2100000
[ 4644.196839] [RCE] VM GOS[#1] addr=0xc2101000
[ 4644.196849] [RCE] VM GOS[#2] addr=0xc2102000
[ 4644.196858] [RCE] VM GOS[#3] addr=0xc2103000
[ 4644.196884] [RCE] VM GOS[#4] addr=0xc2104000
[ 4644.196905] [RCE] VM GOS[#5] addr=0xc2105000
Thanks
Lucie