Hi,
We are attempting to use the Sony IMX273 in conjunction with the Lattice Crosslink FPGA doing SubLVDS to CSI conversion. However we are running into issues when trying to stream video from the system using our custom driver and device-tree.
Some context: we have the sensor setup in master mode (self triggering) running at 1440x1080 (which according to the sensor datasheet equates to 1456x1088 active pixels) and the clock is being generated from the fpga. Have attempted to pull a single frame with both a v4l-ctl call and using yavta with the same errors posted below.
Looking for more information about these error messages and/or possible solutions.
Device tree is here:
/*
/ {
host1x {
vi@15700000 {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liimx273_vi_in0: endpoint {
csi-port = <0>;
bus-width = <4>;
remote-endpoint = <&liimx273_csi_out0>;
};
};
};
};
nvcsi@150c0000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liimx273_csi_in0: endpoint@0 {
csi-port = <0>;
bus-width = <4>;
remote-endpoint = <&liimx273_imx273_out0>;
};
};
port@1 {
reg = <1>;
liimx273_csi_out0: endpoint@1 {
remote-endpoint = <&liimx273_vi_in0>;
};
};
};
};
};
};
i2c@3180000 {
imx273_a@36 {
compatible = "sony,imx273";
/* I2C device address */
reg = <0x36>;
/* V4L2 device node location */
devnode = "video0";
/* Physical dimensions of sensor */
physical_w = "3.674";
physical_h = "2.738";
sensor_model = "imx273";
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
avdd-reg = "vana";
iovdd-reg = "vif";
dvdd-reg = "vdig";
/* Defines number of frames to be dropped by driver internally after applying */
/* sensor crop settings. Some sensors send corrupt frames after applying */
/* crop co-ordinates */
/*post_crop_frame_drop = "0";*/
/* if true, delay gain setting by one frame to be in sync with exposure */
delayed_gain = "true";
/**
* A modeX node is required to support v4l2 driver
* implementation with NVIDIA camera software stack
*
* mclk_khz = "";
* Standard MIPI driving clock, typically 24MHz
*
* num_lanes = "";
* Number of lane channels sensor is programmed to output
*
* tegra_sinterface = "";
* The base tegra serial interface lanes are connected to
*
* discontinuous_clk = "";
* The sensor is programmed to use a discontinuous clock on MIPI lanes
*
* dpcm_enable = "true";
* The sensor is programmed to use a DPCM modes
*
* cil_settletime = "";
* MIPI lane settle time value.
* A "0" value attempts to autocalibrate based on mclk_multiplier
*
*
*
*
* active_w = "";
* Pixel active region width
*
* active_h = "";
* Pixel active region height
*
* pixel_t = "";
* The sensor readout pixel pattern
*
* readout_orientation = "0";
* Based on camera module orientation.
* Only change readout_orientation if you specifically
* Program a different readout order for this mode
*
* line_length = "";
* Pixel line length (width) for sensor mode.
* This is used to calibrate features in our camera stack.
*
* mclk_multiplier = "";
* Multiplier to MCLK to help time hardware capture sequence
* TODO: Assign to PLL_Multiplier as well until fixed in core
*
* pix_clk_hz = "";
* Sensor pixel clock used for calculations like exposure and framerate
*
*
*
*
* inherent_gain = "";
* Gain obtained inherently from mode (ie. pixel binning)
*
* min_gain_val = ""; (floor to 6 decimal places)
* max_gain_val = ""; (floor to 6 decimal places)
* Gain limits for mode
*
* min_exp_time = ""; (ceil to integer)
* max_exp_time = ""; (ceil to integer)
* Exposure Time limits for mode (us)
*
*
* min_hdr_ratio = "";
* max_hdr_ratio = "";
* HDR Ratio limits for mode
*
* min_framerate = "";
* max_framerate = "";
* Framerate limits for mode (fps)
*
* embedded_metadata_height = "";
* Sensor embedded metadata height in units of rows.
* If sensor does not support embedded metadata value should be 0.
*/
mode0 {
mclk_khz = "100000";
num_lanes = "4";
tegra_sinterface = "serial_a";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "18";
active_w = "1456";
active_h = "1088";
embedded_metadata_height = "0";
//pixel_t = "bayer_rggb"; //CHANGE
readout_orientation = "0";
line_length = "2208"; //CHANGE to 2208 or 2184
inherent_gain = "1";
mclk_multiplier = "24";
pix_clk_hz = "56250000";
mode_type = "bayer";
csi_pixel_bit_depth = "12";
pixel_phase = "rggb";
min_gain_val = "1.0";
max_gain_val = "22.2";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1.5";
max_framerate = "60";
min_exp_time = "44";
max_exp_time = "666637";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liimx273_imx273_out0: endpoint {
csi-port = <0>;
bus-width = <4>;
remote-endpoint = <&liimx273_csi_in0>;
};
};
};
};
};
};
/ {
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
/**
* Physical settings to calculate max ISO BW
*
* num_csi_lanes = <>;
* Total number of CSI lanes when all cameras are active
*
* max_lane_speed = <>;
* Max lane speed in Kbit/s
*
* min_bits_per_pixel = <>;
* Min bits per pixel
*
* vi_peak_byte_per_pixel = <>;
* Max byte per pixel for the VI ISO case
*
* vi_bw_margin_pct = <>;
* Vi bandwidth margin in percentage
*
* max_pixel_rate = <>;
* Max pixel rate in Kpixel/s for the ISP ISO case
*
* isp_peak_byte_per_pixel = <>;
* Max byte per pixel for the ISP ISO case
*
* isp_bw_margin_pct = <>;
* Isp bandwidth margin in percentage
*/
num_csi_lanes = <4>;
max_lane_speed = <450000>;
min_bits_per_pixel = <12>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <750000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
/**
* 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 vender.
*/
modules {
module0 {
badge = "imx273_bottom_A6V26";
position = "front";
orientation = "1";
drivernode0 {
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_sensor";
/* Driver v4l2 device name */
devname = "imx273 2-0036";
/* Declare the device-tree hierarchy to driver instance */
proc-device-tree = "/proc/device-tree/i2c@3180000/imx273_a@36";
};
};
};
};
};
The trace error log is here:
kworker/4:2-248 [004] ...1 113.602291: rtos_queue_peek_from_isr_failed: tstamp:3921607945 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 113.810294: rtos_queue_peek_from_isr_failed: tstamp:3926608411 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 113.966284: rtos_queue_peek_from_isr_failed: tstamp:3931608914 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 114.122295: rtos_queue_peek_from_isr_failed: tstamp:3936609422 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 114.278337: rtos_queue_peek_from_isr_failed: tstamp:3941609927 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 114.434312: rtos_queue_peek_from_isr_failed: tstamp:3946610491 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 114.540618: rtos_queue_peek_from_isr_failed: tstamp:3949688173 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 114.642298: rtos_queue_peek_from_isr_failed: tstamp:3952836626 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 114.642304: rtcpu_start: tstamp:3952837895
kworker/4:2-248 [004] ...1 114.642307: rtcpu_vinotify_handle_msg: tstamp:3953698378 tag:CSIMUX_FRAME channel:0x00 frame:2 vi_tstamp:3953697937 data:0x00000220
kworker/4:2-248 [004] ...1 114.694327: rtcpu_vinotify_handle_msg: tstamp:3954277297 tag:CHANSEL_PXL_SOF channel:0x00 frame:1 vi_tstamp:3954276523 data:0x00000001
kworker/4:2-248 [004] ...1 114.694338: rtcpu_vinotify_handle_msg: tstamp:3954277497 tag:ATOMP_FS channel:0x00 frame:1 vi_tstamp:3954276532 data:0x00000000
kworker/4:2-248 [004] ...1 114.694342: rtcpu_vinotify_handle_msg: tstamp:3954277633 tag:CHANSEL_FAULT channel:0x00 frame:1 vi_tstamp:3954276974 data:0x00000100
kworker/4:2-248 [004] ...1 114.694345: rtcpu_vinotify_handle_msg: tstamp:3954278454 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:1 vi_tstamp:3954277779 data:0x08000000
kworker/4:2-248 [004] ...1 114.694348: rtcpu_vinotify_handle_msg: tstamp:3954278585 tag:CHANSEL_FAULT_FE channel:0x01 frame:1 vi_tstamp:3954277781 data:0x00000001
kworker/4:2-248 [004] ...1 114.694351: rtcpu_vinotify_handle_msg: tstamp:3954278749 tag:ATOMP_FE channel:0x00 frame:1 vi_tstamp:3954277784 data:0x00000000
kworker/4:2-248 [004] ...1 114.798296: rtos_queue_peek_from_isr_failed: tstamp:3957837550 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 114.954323: rtos_queue_peek_from_isr_failed: tstamp:3962838050 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 115.110283: rtos_queue_peek_from_isr_failed: tstamp:3967838571 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 115.266376: rtos_queue_peek_from_isr_failed: tstamp:3972839086 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 115.422289: rtos_queue_peek_from_isr_failed: tstamp:3977839628 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 115.578311: rtos_queue_peek_from_isr_failed: tstamp:3982840137 queue:0x0b4a3c58
kworker/4:2-248 [004] ...1 115.682303: rtos_queue_peek_from_isr_failed: tstamp:3985986486 queue:0x0b4a3c58
The kernel log is here (note modified a couple of the csi/vi source files to log more):
[ 113.107693] nvcsi 150c0000.nvcsi: csi port:0
[ 113.120728] tegra-vi4 15700000.vi: Create Surface with imgW=1440, imgH=1080, memFmt=32
[ 113.132341] nvcsi 150c0000.nvcsi: csi4_start_streaming ports index=0, lanes=4
[ 113.139507] nvcsi 150c0000.nvcsi: csi4_stream_init
[ 113.144441] nvcsi 150c0000.nvcsi: csi4_stream_config
[ 113.149506] nvcsi 150c0000.nvcsi: csi4_stream_config (0) read VC0_DPCM_CTRL = 00000000
[ 113.157506] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 113.162225] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000000
[ 113.168012] nvcsi 150c0000.nvcsi: cil_settingtime is pulled from device
[ 113.174627] nvcsi 150c0000.nvcsi: cil core clock: 204, csi clock: 102
[ 113.181072] nvcsi 150c0000.nvcsi: csi settle time: 33, cil settle time: 18
[ 113.187967] imx273 2-0036: imx273_s_stream++ enable 1
[ 113.193023] Streaming value
[ 113.476727] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc1c8aa9800]
[ 114.482329] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 114.488834] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 114.499025] nvcsi 150c0000.nvcsi: csi4_error_recover: resetting nvcsi stream 0
[ 114.506452] nvcsi 150c0000.nvcsi: csi4_stop_streaming ports index=0, lanes=4
[ 114.513647] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 114.518514] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000004
[ 114.524378] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 114.529935] nvcsi 150c0000.nvcsi: CSI PORT: 0
[ 114.534386] nvcsi 150c0000.nvcsi: TEST: csi4_cil_check_status 366
[ 114.540648] nvcsi 150c0000.nvcsi: csi4_cil_check_status (0) CIL_INTR_STATUS 0x0400009d
[ 114.548719] nvcsi 150c0000.nvcsi: csi4_cil_check_status (0) CIL_ERR_INTR_STATUS 0x0400009d
[ 114.557160] nvcsi 150c0000.nvcsi: csi4_start_streaming ports index=0, lanes=4
[ 114.564374] nvcsi 150c0000.nvcsi: csi4_stream_init
[ 114.569258] nvcsi 150c0000.nvcsi: csi4_stream_config
[ 114.574267] nvcsi 150c0000.nvcsi: csi4_stream_config (0) read VC0_DPCM_CTRL = 00000000
[ 114.574276] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 114.574282] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000004
[ 114.574293] nvcsi 150c0000.nvcsi: cil_settingtime is pulled from device
[ 114.574297] nvcsi 150c0000.nvcsi: cil core clock: 204, csi clock: 102
[ 114.574302] nvcsi 150c0000.nvcsi: csi settle time: 33, cil settle time: 18
[ 114.613451] tegra-vi4 15700000.vi: Create Surface with imgW=1440, imgH=1080, memFmt=32
[ 114.621501] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc1c8aa8000]
[ 114.645898] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc1c8aab800]
[ 115.654341] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[ 115.660605] imx273 2-0036: imx273_s_stream++ enable 0
[ 115.665919] Streaming value
[ 115.670833] nvcsi 150c0000.nvcsi: csi4_stop_streaming ports index=0, lanes=4
[ 115.677976] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 115.682871] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000004
[ 115.688816] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 115.694438] nvcsi 150c0000.nvcsi: CSI PORT: 0
[ 115.698902] nvcsi 150c0000.nvcsi: TEST: csi4_cil_check_status 366
[ 115.705139] nvcsi 150c0000.nvcsi: csi4_cil_check_status (0) CIL_INTR_STATUS 0x0400009f
[ 115.713112] nvcsi 150c0000.nvcsi: csi4_cil_check_status (0) CIL_ERR_INTR_STATUS 0x0400009f
[ 115.728015] imx273 2-0036: imx273_power_off: power off
The yavta software is writing to a raw file and I can see about 20-30kb of “data” before it starts writing just blank lines.