I2C communication to ISP of GMSL Camera

I have a GMSL camera connected and working through the bottom port of the AGX Xavier. I need to be able to write and read I2C registers of the ISP. Can anyone point me in the correct direction? Is there any way I can do this through terminal commands? i2cdetect -r 2 shows the gmsl serdes addresses with UU showing they are in use. I do not see the ISP address there.

Any help would be appreciated.

hello mvanhoe3,

please access the application note of Jetson Virtual Channel with GMSL Framework Guide, for the details of GMSL protocol, the hardware connection, the software programming framework, and also the configurations.

you should also set serdes_pix_clk_hz for sensor modules that use serializer/deserializer chips (i.e. GMSL or FPD link), please also check SerDes Pixel Clock session for descriptions. thanks

Thank you,
I reviewed that but unless I am missing something I do not think that helps. I am using the reference hardware mipi adapter board and deserializer board. The camera is configured correctly and is working fine. For development reasons I have the need to send individual I2C register reads and writes to the ISP over the GMSL link. I need to be able to set certain registers and read back status registers of the ISP.

As the reference design MIPI adapter board uses an I2C expander IC to communicate to the 8 different cameras I am struggling how to communicate with the ISP. Do you have any example code that shows I2C communication to either sensor or ISP on a GMSL link through the reference mipi adapter board?

hello mvanhoe3,

you should refer to [DEVICE TREE PROGRAMMING] session from GMSL Framework Guide for the sample code.
please note that,
your sensor driver need to add vc-id=<N> property to let camera stack recognize the stream as camera sources.
you may also access L4T sources and check reference driver for more details.
for example,
$L4T_Sources/r32.4.3/Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-imx390-a00.dtsi

Hi Jerry,
I just want to make sure here. The camera is working and streaming fine to Xavier. I can open with OpenCV, QV4l2, Gstreamer etc. I have no problem detecting or streaming camera video from the camera to the Xavier. Do I still need to add the vc-id=? where?

My request is while I am streaming video I want to be able to manually send individual I2C commands to the ISP and read back status registers. I can add a definition for the ISP in the dtsi file? If I do so it still builds but when doing i2cdetect command from terminal I still do not see the ISP detected. The GMSL framework guide shows how to define serializer, deserializer, sensor, but not ISP. If I look at any of the sample drivers I do not see ISP definitions.

even though I2Cdetect detects the serializer/deserializer/I2CMux I2C addresses I cannot communicate through i2cget or i2cset from terminal as the devices are in use.

Add ISP definition like this?

i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
dser: max9296@48 {
compatible = “nvidia,max9296”;
reg = <0x48>;
csi-mode = “2x4”;
max-src = <2>;
reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
};
ser_prim: max9295_prim@62 {
compatible = “nvidia,max9295”;
reg = <0x62>;
is-prim-ser;
};
ser_a: max9295_a@40 {
compatible = “nvidia,max9295”;
reg = <0x40>;
nvidia,gmsl-dser-device = <&dser>;
};
isp_a: gw5200_a@6d {
compatible = “nvidia,gw5200”;
reg = <0x6d>;
nvidia,gmsl-isp-device = <&isp>;
};

imx390_a@1b {
def-addr = <0x1a>;
/* Define any required hw resources needed by driver /
/
ie. clocks, io pins, power sources */
clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_EXTPERIPH1>;
clock-names = “extperiph1”, “pllp_grtba”;
mclk = “extperiph1”;
nvidia,gmsl-ser-device = <&ser_a>;
nvidia,gmsl-dser-device = <&dser>;
nvidia,gmsl-isp-device = <&isp>;
};

hello mvanhoe3,

it looks you’re already enable camera streaming, several comments above were related to GMSL sensor bring-up.

we don’t expose ISP address, may I know what’s the actual use-cases here.
you may access L4T Multimedia API Reference, to enable argus_camera, there’re user-interface for some camera controls.
thanks