Hi.
I’m porting the Ridgerun imx708 driver from JP6 to JP7 and I have some issues with convincing the system to connect the nodes.
We are using a pca9544 i2c-mux instead of the mux the dev kit is using. Everything worked back with JP5, so the hardware should be okay.
I’m using the following device tree overlay:
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target-path = "/";
__overlay__ {
bus@0{
i2c@3180000{
#address-cells = <0x1>;
#size-cells = <0x0>;
pca9544@70 {
compatible = "nxp,pca9544";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0x70>;
i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
imx708_cam0: rpicam3_imx708_a@1a{
status = "okay";
reg = <0x1a>;
compatible = "sony,imx708";
devnode = "video0";
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx708";
use_sensor_mode_id = "true";
reset-gpios = <&gpio 62 0>;
mode0 {
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0";
lane_polarity = "6";
active_w = "4608";
active_h = "2592";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "10";
readout_orientation = "90";
line_length = "4808";
inherent_gain = "1";
pix_clk_hz = "297600000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16";
max_gain_val = "256";
step_gain_val = "1";
default_gain = "16";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000";
max_framerate = "14000000";
step_framerate = "1";
default_framerate = "14000000";
min_exp_time = "500";
max_exp_time = "65487";
step_exp_time = "1";
default_exp_time = "1600";
embedded_metadata_height = "4";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
rpicam3_imx708_out0: endpoint {
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&rpicam3_imx708_csi_in0>;
};
};
};
};
};
i2c@1 {
reg = <1>;
i2c-mux,deselect-on-exit;
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
imx708_cam1: rpicam3_imx708_c@1a {
status = "okay";
compatible = "sony,imx708";
reg = <0x1a>;
devnode = "video1";
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx708";
use_sensor_mode_id = "true";
//reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio 160 0>;
/* IMX708_MODE_4608x2592_14fps */
mode0 {
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_c";
phy_mode = "DPHY";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0";
lane_polarity = "0";
active_w = "4608";
active_h = "2592";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "10";
readout_orientation = "90";
line_length = "4808";
inherent_gain = "1";
pix_clk_hz = "297600000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16";
max_gain_val = "256";
step_gain_val = "1";
default_gain = "16";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000";
max_framerate = "14000000";
step_framerate = "1";
default_framerate = "14000000";
min_exp_time = "500";
max_exp_time = "65487";
step_exp_time = "1";
default_exp_time = "1600";
embedded_metadata_height = "4";
};
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
port@0 {
reg = <0>;
rpicam3_imx708_out1: endpoint {
status = "okay";
port-index = <2>;
bus-width = <2>;
remote-endpoint = <&rpicam3_imx708_csi_in1>;
};
};
};
};
};
// i2c@2 {
// reg = <2>;
// i2c-mux,deselect-on-exit;
// #address-cells = <0x1>;
// #size-cells = <0x0>;
// status = "okay";
// };
// i2c@3 {
// reg = <3>;
// i2c-mux,deselect-on-exit;
// #address-cells = <0x1>;
// #size-cells = <0x0>;
// status = "disabled";
// };
};
};
host1x@13e00000 {
nvcsi@15a00000 {
num-channels = <2>;
#address-cells = <0x1>;
#size-cells = <0x0>;
csi_chan0: channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
csi_chan0_port0: port@0 {
reg = <0>;
rpicam3_imx708_csi_in0: endpoint@0 {
status = "okay";
port-index = <1>;
bus-width = <2>;
remote-endpoint = <&rpicam3_imx708_out0>;
};
};
csi_chan0_port1: port@1 {
reg = <1>;
rpicam3_imx708_csi_out0: endpoint@1 {
status = "okay";
remote-endpoint = <&rpicam3_imx708_vi_in0>;
};
};
};
};
csi_chan1: channel@1 {
reg = <1>;
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
csi_chan1_port0: port@0 {
reg = <0>;
rpicam3_imx708_csi_in1: endpoint@2 {
status = "okay";
port-index = <2>;
bus-width = <2>;
remote-endpoint = <&rpicam3_imx708_out1>;
};
};
csi_chan1_port1: port@1 {
reg = <1>;
rpicam3_imx708_csi_out1: endpoint@3 {
status = "okay";
remote-endpoint = <&rpicam3_imx708_vi_in1>;
};
};
};
};
};
};
};
tegra-capture-vi {
num-channels = <2>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vi_port0: port@0 {
reg = <0>;
rpicam3_imx708_vi_in0: endpoint {
status="okay";
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&rpicam3_imx708_csi_out0>;
};
};
vi_port1: port@1 {
reg = <1>;
rpicam3_imx708_vi_in1: endpoint {
status="okay";
port-index = <2>;
bus-width = <2>;
remote-endpoint = <&rpicam3_imx708_csi_out1>;
};
};
};
};
tcp: tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
// num_csi_lanes = <4>;
// max_lane_speed = <2500000>;
// min_bits_per_pixel = <10>;
// vi_peak_byte_per_pixel = <2>;
// vi_bw_margin_pct = <25>;
// max_pixel_rate = <7500000>;
// isp_peak_byte_per_pixel = <5>;
// isp_bw_margin_pct = <25>;
modules {
cam_module0: module0 {
status = "okay";
badge = "jakku_front_RBPCV3";
position = "rear";
orientation = "1";
cam_module0_drivernode0: drivernode0 {
pcl_id = "v4l2_sensor";
//devname = "imx708 9-001a";
sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/pca9544@70/i2c@0/rpicam3_imx708_a@1a";
};
};
cam_module1: module1 {
status = "okay";
badge = "jakku_rear_RBPCV3";
position = "front";
orientation = "1";
cam_module1_drivernode0: drivernode0 {
pcl_id = "v4l2_sensor";
//devname = "imx708 10-001a";
sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/pca9544@70/i2c@1/rpicam3_imx708_c@1a";
};
};
};
};
};
};
};
That works so far, the I2Cs show up, the driver gets loaded.
[ 4.768054] /bus@0/i2c@3180000/pca9544@70/i2c@1/rpicam3_imx708_c@1a: Fixed dependency cycle(s) with /bus@0/host1x@13e00000/nvcsi@15a00000/channel@1
[ 4.779684] /bus@0/i2c@3180000/pca9544@70/i2c@0/rpicam3_imx708_a@1a: Fixed dependency cycle(s) with /bus@0/host1x@13e00000/nvcsi@15a00000/channel@0
[ 4.800140] /bus@0/host1x@13e00000/nvcsi@15a00000/channel@0: Fixed dependency cycle(s) with /bus@0/i2c@3180000/pca9544@70/i2c@0/rpicam3_imx708_a@1a
[ 4.813042] /bus@0/i2c@3180000/pca9544@70/i2c@0/rpicam3_imx708_a@1a: Fixed dependency cycle(s) with /bus@0/host1x@13e00000/nvcsi@15a00000/channel@0
[ 4.831132] /bus@0/host1x@13e00000/nvcsi@15a00000/channel@1: Fixed dependency cycle(s) with /bus@0/i2c@3180000/pca9544@70/i2c@1/rpicam3_imx708_c@1a
[ 4.844471] /bus@0/i2c@3180000/pca9544@70/i2c@1/rpicam3_imx708_c@1a: Fixed dependency cycle(s) with /bus@0/host1x@13e00000/nvcsi@15a00000/channel@1
[ 10.051670] /bus@0/host1x@13e00000/nvcsi@15a00000/channel@1: Fixed dependency cycle(s) with /bus@0/i2c@3180000/pca9544@70/i2c@1/rpicam3_imx708_c@1a
[ 10.075082] /bus@0/host1x@13e00000/nvcsi@15a00000/channel@0: Fixed dependency cycle(s) with /bus@0/i2c@3180000/pca9544@70/i2c@0/rpicam3_imx708_a@1a
[ 10.503630] imx708 9-001a: probing v4l2 sensor at addr 0x1a
[ 10.511342] imx708 9-001a: tegracam sensor driver:imx708_v2.0.6
[ 10.839530] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx708 9-001a bound
[ 10.846769] imx708 10-001a: probing v4l2 sensor at addr 0x1a
[ 10.860970] imx708 10-001a: tegracam sensor driver:imx708_v2.0.6
[ 11.178660] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx708 10-001a bound
however I’m missing the /dev/video1 and video2 notes.
media-ctl reports
Media controller API version 6.8.12
Media device information
------------------------
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info platform:tegra-capture-vi
hw revision 0x3
driver version 6.8.12
Device topology
- entity 1: imx708 9-001a (1 pad, 0 link, 0 routes)
type V4L2 subdev subtype Sensor flags 0
pad0: Source
- entity 3: imx708 10-001a (1 pad, 0 link, 0 routes)
type V4L2 subdev subtype Sensor flags 0
pad0: Source
I looked at the dual camera overlays for imx477 and imx219 and can’t see any problems. Anybody an idea?