SK-AM62A-LP: What wrong in LT9211 dtsi

Part Number: SK-AM62A-LP
Other Parts Discussed in Thread: AM62A7,

Tool/software:

Dear TI,

I used the sdk 10.01 and want to enable the LT9211 to transfer camera data from camera mipi to board.

But now seems the in LT9211 dtsi' port, the pannel and bridge is not right.

Is there some example for me to write the LT9211 DTSI?

This is my dtsi, how to correct it?

  

Thanks!

  • Hi,

    Can you provide a simple block diagram of your system to show how LT9211 is used?

    Thank you.

    Jianzhong

  • It just like this:

    camera ----4lane csi2-----LT9211-----4lane csi2---am62a7
                                                        -----4lane csi2---serdes

    So the LT9211 make 1mipi to 2mipi .

  • Now if I just want to make the SOC AM62A7 could receive the raw data from camera through LT9211. How to set the LT9211's dtsi?

  • Any update?

  • Hello,

    According to your block diagram, LT9211 is just a 4-lane CSI-2 sensor to AM62A7. So it should be connected to AM62A through I2C switch at address 0x71.

    git.ti.com/.../k3-am62x-sk-csi2-imx219.dtso

    
    

    Regards,

    Jianzhong

  • In dtso, it seems 0x71 is the imx219 camera. Not the LT9211. The dtso you share is the camera connect am62a7 with mipi only.

    But I needed is camera's mipi connect to LT9211 and then LT9211 connect to am6a27.
    And now it seems the lt9211 driver could not parse my dts port , I want to know How to config the lt9211 dtsi .

  • it seems 0x71 is the imx219 camera.

    0x71 is the I2C switch address. You'll need to use this if you connect the LT9211 to AM62A board through the 22-pin flex connector.

    You'll need to modify this section for your LT9211: git.ti.com/.../k3-am62x-sk-csi2-imx219.dtso


  • sry I have a mistake, the 0x71 is the I2C switch address. But now the camera and the LT9211 is not on the same I2Cbus. camera is on I2C2 and LT9211 is on I2C3.
    This dtsi's endpoint seems camera's mipi connect to am62a7's mipi port directly, but my hardware, the camera'mipi firstly connect to LT9211 and LT9211's output mipi connect to am62a7.
    So I want to know how to config the LT9211's dtsi. I post my last dtsi on case, but it seems LT9211's driver could not prase the bridge/

  • Are you using the SK-AM62A-LP board or your custom board?

  • CUSTOM BOARD. But now I found the error happen at dt_prase.  The drm_of_find_panel_or_bridge could not return right.


    So I think it maybe something wrong in dts. But I don't know where.Maybe you could help to check it.

    #include <dt-bindings/gpio/gpio.h>
    
    &{/} {
    	clk_imx728_fixed: imx728-xclk {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <24000000>;
    	};
    };
    
    &main_i2c2 {
    	#address-cells = <1>;
    	#size-cells = <0>;
    	status = "okay";
    
    	imx728: camera@1a {
    		compatible = "sony,imx728";
    		reg = <0x1A>;
    
    		clocks = <&clk_imx728_fixed>;
    		clock-names = "xclk";
    
    		reset-gpios = <&main_gpio0 90 GPIO_ACTIVE_HIGH>;
    		err-gpios = <&main_gpio1 1 GPIO_ACTIVE_LOW>;
    
    		port {
    			csi2_cam0: endpoint {
    				remote-endpoint = <&lt9211_a>;
    				link-frequencies = /bits/ 64 <307500000>;
    				clock-lanes = <0>;
    				data-lanes = <1 2 3 4>;
    			};
    		};
    	};
    };
    
    
    &main_i2c3 {
    	#address-cells = <1>;
        #size-cells = <0>;
        status = "okay";
          lt9211@29 {
            compatible = "lontium,lt9211";
            reg = <0x29>;
            reset-gpios = <&main_gpio1 5 GPIO_ACTIVE_HIGH>;
            /*interrupts-extended = <&tlmm 84 IRQ_TYPE_EDGE_FALLING>;*/
            /*vccio-supply = <&main_gpio1 6 GPIO_ACTIVE_HIGH>;*/
    
            ports {
              #address-cells = <1>;
              #size-cells = <0>;
    
              port@1 {
                reg = <1>;
                lt9211_a:endpoint {
    		          remote-endpoint = <&csi2_cam0>;/*csi2_cam0*/
                };
              };
    
              port@2 {
                reg = <2>;
                lt9211_out:endpoint {
    				   remote-endpoint = <&csi2rx0_in_sensor>;/*csi2rx0_in_sensor*/
                };
              };
            };
          };
    };
    
    &csi0_port0 {
    	status = "okay";
    	csi2rx0_in_sensor: endpoint {
    		remote-endpoint = <&lt9211_out>;
    		bus-type = <4>;
    		clock-lanes = <0>;
    		data-lanes = <1 2 3 4>;
    	};
    };
    
    
    &ti_csi2rx0 {
    	status = "okay";
    };
    
    &dphy0 {
    	status = "okay";
    };
    


  • int drm_of_find_panel_or_bridge(const struct device_node *np,
    				int port, int endpoint,
    				struct drm_panel **panel,
    				struct drm_bridge **bridge)
    {
    	int ret = -EPROBE_DEFER;
    	struct device_node *remote;
    	if (!panel && !bridge)
    		return -EINVAL;
    	if (panel)
    		*panel = NULL;
    	/*
    	 * of_graph_get_remote_node() produces a noisy error message if port
    	 * node isn't found and the absence of the port is a legit case here,
    	 * so at first we silently check whether graph presents in the
    	 * device-tree node.
    	 */
    	if (!of_graph_is_present(np))
    		return -ENODEV;
    
    	remote = of_graph_get_remote_node(np, port, endpoint);
    	if (!remote){
    		return -ENODEV;
    	}
    
    	if (panel) {
    		*panel = of_drm_find_panel(remote);
    		if (!IS_ERR(*panel)){
    			ret = 0;
    		}
    		else{
    			printk("TXHXTHXTHXpanel2222");
    			*panel = NULL;
    		}
    	}
    	/* No panel found yet, check for a bridge next. */
    	if (bridge) {
    		if (ret) {
    			printk("TXHXTHXTHXpanel33333");
    			*bridge = of_drm_find_bridge(remote);
    			if (*bridge){
    				ret = 0;
    			}
    		} else {
    			*bridge = NULL;
    		}
    
    	}
    
    	of_node_put(remote);
    	printk("TXHXTHXTHXpanel666");
    	return ret;
    }

    The error happens in drm_of_find_panel_or_bridge, it could not find right panel or bridge through my lt9211 dts.
    So I think ti could give me a sample about how to config the mipi bridge of 9211 in dts file.

    The right dts sample maybe could correct the issue.

    Thank!

  • According to the driver instructions, it support 1DSI to 1LVDS. Could you provide the driver souce code about 1 mipi (4lane CSI-2) to 2 mipi(4lane CSI-2)? 

  • Hi Tong,

    pls reach out to LT for the driver. Thanks.

    BR,

    Biao