Hi everyone,
I am working with the LI IMX568 GMSL2 camera connected to the LI-JXAV-MAX96712-ADP-8CAM - Leopard Imaging Inc. carrier board for the AGX Orin 64GB.
There is no driver yet for this particular combination of sensor and carrier board on 36.x and I am trying to get a first version running.
I am somewhat following the approach mentioned in Jetson Linux Release Notes for r36.4.4 of using the Jetson-IO tool to add my DTBO to the device tree.
As far as my DTBO file is concerned, I am only defining one imx568_a@1b with a single mode0 with an active image resolution of 2476px x 2064px:
imx568_a@1b {
status = "okay";
/* serializer I2C address taken from the IMX490 setup */
def-addr = <0x1b>;
/* EXTPERIPH1 (36) + PLLP_OUT0 (102) */
clocks = <&bpmp 36>, <&bpmp 102>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
channel = "a";
camera-index = "a";
/* GPIO_ACTIVE_HIGH -> 1 */
/* CAM0_RST_L -> TEGRA234_MAIN_GPIO(H, 3) -> 59 */
reset-gpios = <&gpio 0x3B 1>;
/* CAM1_PWDN -> TEGRA234_MAIN_GPIO(AC, 0) -> 224 */
pwdn-gpios = <&gpio 0x3E 1>;
/* PWR_EN -> TEGRA234_MAIN_GPIO(AC, 7) -> 231 */
pwr-gpios = <&gpio 0xA1 1>;
compatible = "sony,imx568";
reg = <0x1b>;
devnode = "video0";
physical_w = "15.0";
physical_h = "12.5";
sensor_model ="imx568";
post_crop_frame_drop = "0";
use_decibel_gain = "true";
use_sensor_mode_id = "true";
mode0 {/*mode imx568_MODE_2472x640_CROP1352_20FPS*/
mclk_khz = "37125";
num_lanes = "2";
tegra_sinterface = "serial_e";
discontinuous_clk = "no";
vc_id = "0";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "12";
csi_pixel_bit_depth = "12";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "2472";
active_h = "2064";
readout_orientation = "0";
line_length = "4876";
inherent_gain = "1";
pix_clk_hz = "200000000";
serdes_pix_clk_hz = "200000000";
gain_factor = "10";
min_gain_val = "1"; /* dB */
max_gain_val = "480"; /* 240dB */
step_gain_val = "1"; /* 0.3 */
default_gain = "1";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "20000000";
max_framerate = "20000000";
step_framerate = "1";
default_framerate = "20000000";
exposure_factor = "1000000";
min_exp_time = "44"; /*us, 2 lines*/
max_exp_time = "50000";
step_exp_time = "1";
default_exp_time = "3333";/* us */
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx568_out0: endpoint {
status = "okay";
vc-id = <0>;
port-index = <4>;
bus-width = <2>;
remote-endpoint = <&imx568_csi_in0>;
};
};
};
I perform the other steps for GMSL camera via argus (nvcsi, tegra-capture-vi, tegra-camera-platform).
At this point I can see a v4l2 device that seems to relate to my IMX568 camera:
$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, imx568 9-001b (platform:tegra-capture-vi:4):
/dev/video0
$ media-ctl -p
Media controller API version 5.15.148
Media device information
------------------------
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148
Device topology
- entity 1: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "imx568 9-001b":0 [ENABLED]
pad1: Source
-> "vi-output, imx568 9-001b":0 [ENABLED]
- entity 4: imx568 9-001b (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:SRGGB12_1X12/2472x2064@1/20 field:none colorspace:srgb]
-> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 6: vi-output, imx568 9-001b (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]
But for some reason when I run the oneShot sample from /usr/src/jetson_multimedia_api/argus, I get a list that contains a Camera Device 0 with a resolution up to 3840px x 2160px and 4 different SensorMode entries that aren’t close to what I defined in my device tree:
~/git/argus_build/samples/oneShot/argus_oneshot --listdevices
Executing Argus Sample: argus_oneshot
1 Available CameraDevices:
==== CameraDevice 0: =========================================
UUID: adca2c00,0f01,11e5,0001,00,00,00,00,00,00
MaxAeRegions: 64
MaxAwbRegions: 64
FocusPositionRange: [0, 0]
LensApertureRange:
2.400000
IspDigitalGainRange: [1.000000, 256.000000]
ExposureCompensationRange: [-2.000000, 2.000000]
NumSensorModes: 4
SensorMode 0:
Resolution: 3840x2160
HdrRatioRange: [1.000000, 1.000000]
ExposureTimeRange: [44000, 478696000]
FrameDurationRange: [16666667, 666667072]
(1.50 to 60.00 fps)
AnalogGainRange: [1.000000, 44.400002]
InputBitDepth: 10
OutputBitDepth: 10
SensorModeType: SENSOR_MODE_TYPE_BAYER
IS WDR Mode: No
SensorMode 1:
Resolution: 1920x1080
HdrRatioRange: [1.000000, 1.000000]
ExposureTimeRange: [58000, 184611000]
FrameDurationRange: [16666667, 666667072]
(1.50 to 60.00 fps)
AnalogGainRange: [1.000000, 177.000000]
InputBitDepth: 10
OutputBitDepth: 10
SensorModeType: SENSOR_MODE_TYPE_BAYER
IS WDR Mode: No
SensorMode 2:
Resolution: 3840x2160
HdrRatioRange: [32.000000, 32.000000]
ExposureTimeRange for long exposure:: [864000, 20480000]
ExposureTimeRange for short exposure: [27000, 640000]
FrameDurationRange: [33333334, 666667072]
(1.50 to 30.00 fps)
AnalogGainRange: [1.000000, 30.000000]
InputBitDepth: 10
OutputBitDepth: 10
SensorModeType: SENSOR_MODE_TYPE_BAYER_DOL
DOL WDR Mode Properties:
ExposureCount: 2
OpticalBlackRowCount: 14
VBPRowCounts: [50]
LineInfoMarkerWidth: 4
LeftMarginWidth: 12
RightMarginWidth: 0
PhysicalResolution: 3856x4448
SensorMode 3:
Resolution: 1920x1080
HdrRatioRange: [32.000000, 32.000000]
ExposureTimeRange for long exposure:: [859000, 15649000]
ExposureTimeRange for short exposure: [26843, 489031]
FrameDurationRange: [16666667, 666667072]
(1.50 to 60.00 fps)
AnalogGainRange: [1.000000, 177.000000]
InputBitDepth: 10
OutputBitDepth: 10
SensorModeType: SENSOR_MODE_TYPE_BAYER_DOL
DOL WDR Mode Properties:
ExposureCount: 2
OpticalBlackRowCount: 14
VBPRowCounts: [38]
LineInfoMarkerWidth: 4
LeftMarginWidth: 6
RightMarginWidth: 6
PhysicalResolution: 1936x2264
Where are these entries coming from?
I could not find any other enabled sensor devices or enabled modules on the tegra-camera-platform within the /proc/device-tree/ entries.
I checked my imx568_mode_tbls.h file and here I only define one sensor mode:
static const struct camera_common_frmfmt imx568_frmfmt[] = {
{{2472, 2064}, imx568_20fps, 1, 0, IMX568_MODE_2472X2064_20FPS},
};
Where is Argus getting these sensor modes from?
I read forum posts on changing the use_sensor_mode_id entry in the device tree, but this didn’t change the bug regardless of enabling or disabling this entry.
Find attached my full dts file as txt.
tegra234-imx568-test-overlay.txt (10.1 KB)
Looking forward to your help!
Thank you and best regards,
Peter
