I have few questions about integrate cameras at TX2 NX.
I have a board with NVP6324 that is just an analogic camera aggregator. I have a driver for it that probe correctly through i2c.
The driver is a generic Linux driver that attach NVP6324 as a V4L2 subdev.
My questions:
-
This driver doesn’t use tegra_camera_platform (tegra_v4l2_camera.h) or any customization from Nvidia. Is mandatory use tegra_camera_platform to get it work at TX2 NX? Documentation makes it appear that it is not necessary, using imx185_v1 as sample, but the corresponding dtsi (tegra186-camera-imx185_v1-a00.dtsi) has a node for tegra_camera_platform and source imx185_v1.c uses it.
-
As NVP6324 is a camera aggregator it uses a MIPI_CSI2 with x4 lanes and virtual channel concept for connect 4 cameras. Unlike imx390 sample, that use GSML serializer and deserializer, and can control the remote sensors using a kind of virtual i2c, at NVP6324 I can’t control the remote sensors.
Connection is NVP6324 (x4 lanes) → NVCSI (Port4 and Port5, x2 lanes at each port) → VI
Could someone point me the correct way to create the DTSI at this configuration?
At VI node, I have to use only one channel and port or one for each virtual channel? The port index at this case is VI stream number or NVCSI port? For each VI input remote-endpoint is all the same NVCSI output (nvp6324_csi_out0), considering that connection is only at CSI 4 and 5?
vi@15700000 {
num-channels = <4>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
nvp6324_vi_in0: endpoint {
vc-id = <0>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_out0>;
};
};
port@1 {
reg = <1>;
nvp6324_vi_in1: endpoint {
vc-id = <1>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_out0>;
};
};
port@2 {
reg = <2>;
nvp6324_vi_in2: endpoint {
vc-id = <2>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_out0>;
};
};
port@3 {
reg = <3>;
nvp6324_vi_in3: endpoint {
vc-id = <3>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_out0>;
};
};
};
};
At sensor I2C node, is necessary create one port to each virtual channel and all with same NVCSI input (nvp6324_csi_in0)? Mode0 is mandatory?
i2c@3180000 {
ahd: nvp6324@30 {
compatible = "nextchip,nvp6324_mipi";
reg = <0x30>;
rst-gpios = <&tegra_aon_gpio VIDEO_DEC_RST GPIO_ACTIVE_HIGH>;
sensor_model ="nvp6324";
use_sensor_mode_id = "true";
mode0 {
mclk_khz = "27000";
num_lanes = "4";
tegra_sinterface = "serial_e";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "8";
csi_pixel_bit_depth = "8";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1280";
active_h = "720";
readout_orientation = "0";
line_length = "1080";
inherent_gain = "1";
mclk_multiplier = "2";
pix_clk_hz = "23040000";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
nvp6324_nvp6324_out0: endpoint {
//vc-id = <0>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_in0>;
};
};
port@1 {
reg = <1>;
nvp6324_nvp6324_out1: endpoint {
vc-id = <1>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_in0>;
};
};
port@2 {
reg = <2>;
nvp6324_nvp6324_out2: endpoint {
vc-id = <2>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_in0>;
};
};
port@3 {
reg = <3>;
nvp6324_nvp6324_out3: endpoint {
vc-id = <3>;
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_csi_in0>;
};
};
};
}; /*ahd: nvp6324@30 */
};
At NVCSI node I have to use only one channel? Considering that we’re using NVCSI port 4 at x4 lanes?
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>;
nvp6324_csi_in0: endpoint@0 {
port-index = <4>;
bus-width = <4>;
remote-endpoint = <&nvp6324_nvp6324_out0>;
};
};
port@1 {
reg = <1>;
nvp6324_csi_out0: endpoint@1 {
remote-endpoint = <&nvp6324_vi_in0>;
};
};
};
};
};