Hi all,
I’m using a video decoder ISL79987 connected to the BUS I2C2 (gen2_i2c), this latter is being detected using the i2cdetect tool, i back ported the driver from Linux 5.18 to Linux 5.10 version, the driver probe successfully, and it registers the device to sysfs as video node without errors (Creating the /dev/video0)
The device tree was created following the scheamtic below :
Also the description of the DT below :
/ {
tegra-capture-vi {
status = "okay";
num-channels = <2>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0>;
isl79987_vi_in0: endpoint {
status = "okay";
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&isl79987_csi_out0>;
};
};
port@1 {
status = "okay";
reg = <1>;
isl79987_vi_in1: endpoint {
status = "okay";
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&isl79987_csi_out1>;
};
};
};
};
host1x@13e00000
{
nvcsi@15a00000
{
num-channels = <2>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
channel@0 {
status = "okay";
reg = <0>;
ports {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0>;
isl79987_csi_in0: endpoint@0 {
status = "okay";
port-index = <0>;
bus-width = <1>;
// TODO slave mode ?
slave-mode;
remote-endpoint = <&isl79987_out0>;
};
};
port@1 {
status = "okay";
reg = <1>;
isl79987_csi_out0: endpoint@1 {
status = "okay";
remote-endpoint = <&isl79987_vi_in0>;
};
};
};
};
// TODO
channel@1
{
status = "okay";
reg = <1>;
ports
{
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
// Define Port coming from Renesas and going to nvcsi
port@0
{
status = "okay";
reg = <0>;
isl79987_csi_in1: endpoint@2 {
status = "okay";
port-index = <0>;
bus-width = <1>;
remote-endpoint = <&isl79987_vin0>;
};
};
// Define Port coming from nvcsi and going to vi
port@1 {
status = "okay";
reg = <1>;
isl79987_csi_out1: endpoint@3 {
remote-endpoint = <&isl79987_vi_in1>;
};
};
};
};
}; // end nvcsi
}; // end host1x
// Board is connected to I2C-2 Instance = Port Name Gen2-i2C = Bus number 1
i2c@c240000
{
// Device Tree node for first ISL79987 chip.
// Physical address of the chip is 0x45
isl79987_a@45
{
status = "okay";
// Device identifier. The Linux kernel uses this keyword to bind the device driver to a specific device.
// This should be exactly the same than in cpp driver code
compatible = "isil,isl79987";
// I2C Slave Address
reg = <0x45>;
// TODO: Should we set other properties ?
ports {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
// Define port for Renesas output CSI-2 (Control Renesas Chip)
port@0
{
status = "okay";
reg = <0>;
// Define one endpoint going from Renesas Board to CSI2
isl79987_out0: endpoint
{
status = "okay";
// TODO write possibles values.
// 1 Camera setup: 1 Channel, 1 data lane
data-lanes = <1>;
bus-width = <1>;
// Renesas chip is connected to CSI_A
port-index = <0>;
// TODO find those values
clock-lanes = <0>;
link-frequencies = /bits/ 64 <108000000 216000000 432000000>;
// Link device to NVCSI
remote-endpoint = <&isl79987_csi_in0>;
};
};
// Define sink endpoints for all analog stream coming into Renesas chip.
port@1 {
status="okay";
reg = <1>;
isl79987_vin0: endpoint
{
// TODO find how to model analog input
remote-endpoint = <&isl79987_csi_in1>;
};
};
}; // end ports
}; // end isl79987_a
}; // end i2c
};
/ {
tegra-camera-platform
{
compatible = "nvidia, tegra-camera-platform";
status = "okay";
// TODO Total number of CSI lanes when all cameras are active
num_csi_lanes = <1>;
// TODO Max lane speed in Kbit/s
max_lane_speed = <15000000>;
// TODO Min bits per pixelnum_csi_lanes
min_bits_per_pixel = <10>;
// TODO Max byte per pixel for the VI ISO case
vi_peak_byte_per_pixel = <2>;
// TODO Vi bandwidth margin in percentage
vi_bw_margin_pct = <25>;
// TODO Max byte per pixel for the ISP ISO case
isp_peak_byte_per_pixel = <5>;
// TODO Isp bandwidth margin in percentage
isp_bw_margin_pct = <25>;
modules {
// Module for ISL79987 Front
cam_module0: module0
{
status="okay";
// A unique name that identifies this module. The name must consist of three parts, separated by underscores:
// - The module’s camera board ID (camera_board_id).
// - The position of the module, for example, rear or front.
// - The module’s part number, which you can find in the module datasheet. If the part number is not available, use a unique identifier. Only the last six characters of the part number are significant.
// If your system has multiple identical modules, each module must have a different position, making the module name unique.
badge = "isl79987_rear";
// Camera position. Values supported depend on the number of cameras in the system:
// - In a two-camera system: rear and front.
// - In a three-camera system: bottom, top, and center.
// - In a six-camera system: bottomleft, bottomright, centerleft, centerright, topleft, and topright.
position = "rear";
// Sensor orientation: a numeric index representing the orientation of the sensor.
// The relation between indices and orientations is arbitrary, but typically in two-camera systems 0 is “rear facing” and 1 is “front facing.”
orientation = "0";
// Driver node definition for sensor
cam_module0_drivernode0: drivernode0
{
status="okay";
// Declare PCL support driver (classically known as guid)
pcl_id = "v4l2_sensor";
// <Driver v4l2 device name> <i2cbus>-<i2cPhysicalAddress>
devname = "isl79987 1-0045";
// Declare the device-tree hierarchy to driver instance
proc-device-tree = "/proc/device-tree/i2c@c240000/isl79987_a@45";
}; // end drivernode0
}; // end module0
}; // end modules
}; // end tegra-camera-platform
};
I tested the capture using v4l2 but this latter is failing
conti@conti-desktop:~$ GST_DEBUG=1 gst-launch-1.0 v4l2src ! 'video/x-raw,format=UYVY,with=720,height=480,interlace-mode=interleaved' ! videoconvert ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.027313984 2409 0xaaaaf3d56e40 ERROR v4l2 gstv4l2object.c:1944:gst_v4l2_object_get_interlace_mode: Unknown enum v4l2_field 6
0:00:00.027347648 2409 0xaaaaf3d56e40 ERROR v4l2 gstv4l2object.c:1944:gst_v4l2_object_get_interlace_mode: Unknown enum v4l2_field 6
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.027612128 2409 0xaaaaf3d56e40 ERROR v4l2 gstv4l2object.c:1944:gst_v4l2_object_get_interlace_mode: Unknown enum v4l2_field 6
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' does not support interleaved interlacing
Additional debug info:
gstv4l2object.c(3828): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Device wants interleaved interlacing
Execution ended after 0:00:00.000482720
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Can you please give some suggestions about the Device tree, is it correct for a video decoder using MIPI CSI interface ?
Also I’m wondering why the gst is failing ?
Thanks