How to merge two 4-lanes of CSI on the TX2 carrier board

I am wondering how I can merge two 4-lanes (8 lanes) on the TX2 Developer Carrier Board for the 4K HDMI input (HDMI2CSI). I read the spec as well as technical reference. But I don’t know how to use CSIMUX or merge CSI lanes to set the registers on the board. Thanks.

hello ysjeong,

may I know which JetPack release you’re currently working with.
you should check below kernel sources to parse 8-lane device tree settings and also the configuration.


int tegra_vi_get_port_info(struct tegra_channel *chan, struct device_node *node, unsigned int index)

you might also check TC358840 bridge driver as below for more details.

Thank you. I am working with JetPack-L4T-3.2.1.
Where I should change the code on graph.c/tegra186-camera-imx274.dtsi to use 8-lanes?

hello ysjeong,

you should define the 8-lane configuration in your sensor device tree.
kernel driver will parse the settings and choose gang mode to handle a 8-lane device.

Hi, JerryChang. Thanks.
Maybe the below code(tegra186-quill-p3310-1000-c03-00-base-hdmi2csi.dts) is what you mentioned.
Do I have to fix this code to adjust something like HDMI input sync?

i2c@3180000 {
status = “okay”;

	#address-cells = <1>;
	#size-cells = <0>;

	/* HDMI IN A (4K) */
	tc358840@0f {
		compatible = "toshiba,tc358840";
		reg = <0x0f>;
		status = "okay";
		devnode = "video0";

		/* Power Supply */
		vdig-supply = <&en_vdd_cam_1v2>;
		vif-supply = <&en_vdd_cam>;

		/* Reset */
		reset-gpios = <&tegra_main_gpio TEGRA_MAIN_GPIO(R, 5) GPIO_ACTIVE_LOW>;

		/* Interrupt */
		interrupt-parent = <&tegra_main_gpio>;

		refclk_hz = <48000000>; /* 40 - 50 MHz */

		ddc5v_delay = <1>;		/* 50 ms */

		/* HDCP */
		/* TODO: Not yet implemented */
		enable_hdcp = <0>;

		/* CSI Output */
		/* Enable TX0 (4 lanes) & TX1 (4 lanes) */
		csi_port = <3>;

		lineinitcnt = <0x00000FA0>;
		lptxtimecnt = <0x00000004>;
		tclk_headercnt = <0x00180203>;
		tclk_trailcnt = <0x00040005>;
		ths_headercnt = <0x000D0004>;
		twakeup = <0x00003E80>;
		tclk_postcnt = <0x0000000A>;
		ths_trailcnt = <0x00080006>;
		hstxvregcnt = <0x00000020>;

		/* PLL */
		/* Bps per lane is (refclk_hz / pll_prd) * pll_fbd */
		pll_prd = <10>;
		pll_fbd = <125>;

		port@0 {
			ret = <0>;
			hdmi2csi_tc358840_out0: endpoint {
				csi-port = <0>;
				bus-width = <8>;
				remote-endpoint = <&hdmi2csi_csi_in0>;

hello ysjeong,

please create a sensor device tree for your customize device.
please check tutorials page and refer to [V4L2 Sensor Driver Development Tutorial] for implementation hands-on video.
you may also refer to Sensor Driver Programming Guide for the details.

Hi,Jerry .In tutorials page,can’t find [V4L2 Sensor Driver Development Tutorial]

hello sunzhongmeng,

there’re several tutorial files.
you’ll need to expand [DEVELOPER TOOLS] block, and click [+SHOW MORE] to browse all contents.

thank you,I got it.