This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SN65DSI83: SN65DSI83 MIPI DSI TO LVDS

Part Number: SN65DSI83

Tool/software:

Hi Ti:

  We used this chip.

kernel version: V6.1

device tree:

	bridge@2c {
            compatible = "ti,sn65dsi83";
            reg = <0x2c>;
        //     reg = <0x58>;

            enable = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
            vcc-supply = <&reg_sn65dsi83_1v8>;

	//     status = "disabled";
            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;

                   bridge_in:endpoint{
                        remote-endpoint = <&dsi_out_panel>;
                        data-lanes = <1 2 3 4>;
                    };
                };

                port@2 {
                    reg = <2>;

                    bridge_out:endpoint{
                        remote-endpoint = <&panel_in_dsi>;
                    };
                };
            };
        };
};
&dsi_out_panel{
	remote-endpoint = <&bridge_in>;
};
&panel_in_dsi{
	remote-endpoint = <&bridge_out>;
};

Add debug prints to sn65dsi83_parse_dt function.

static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model)
{
	struct drm_bridge *panel_bridge;
	struct device *dev = ctx->dev;

	ctx->lvds_dual_link = false;
	ctx->lvds_dual_link_even_odd_swap = false;
	if (model != MODEL_SN65DSI83) {
		struct device_node *port2, *port3;
		int dual_link;

		port2 = of_graph_get_port_by_id(dev->of_node, 2);
		port3 = of_graph_get_port_by_id(dev->of_node, 3);
		dual_link = drm_of_lvds_get_dual_link_pixel_order(port2, port3);
		of_node_put(port2);
		of_node_put(port3);

		if (dual_link == DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS) {
			ctx->lvds_dual_link = true;
			/* Odd pixels to LVDS Channel A, even pixels to B */
			ctx->lvds_dual_link_even_odd_swap = false;
		} else if (dual_link == DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS) {
			ctx->lvds_dual_link = true;
			/* Even pixels to LVDS Channel A, odd pixels to B */
			ctx->lvds_dual_link_even_odd_swap = true;
		}
	}

	panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 2, 0);
	printk("%s line = %d model = %d panel_bridge = %p \n",__FUNCTION__,__LINE__,model,panel_bridge);
	if (IS_ERR(panel_bridge))
		return PTR_ERR(panel_bridge);

	ctx->panel_bridge = panel_bridge;

	ctx->vcc = devm_regulator_get(dev, "vcc");
	if (IS_ERR(ctx->vcc))
		return dev_err_probe(dev, PTR_ERR(ctx->vcc),
				     "Failed to get supply 'vcc'\n");

	return 0;
}

output log:

[    8.105162] platform fde20000.dsi: Fixed dependency cycle(s) with /vop@fdd90000/ports/port@3/endpoint@0
[    8.733051] i2c 3-002c: Fixed dependency cycle(s) with /dsi@fde20000/panel@0/ports/port@0/endpoint
[    8.733064] i2c 3-002c: Fixed dependency cycle(s) with /dsi@fde20000/ports/port@1/endpoint
[   10.116646] mipi-dsi fde20000.dsi.0: Fixed dependency cycle(s) with /i2c@feab0000/bridge@2c/ports/port@2/endpoint
[   10.151563] sn65dsi83_parse_dt line = 609 model = 0 panel_bridge = fffffffffffffdfb 
[   10.151574] sn65dsi83_probe line = 701 ret = -517 
[   10.261043] sn65dsi83_parse_dt line = 609 model = 0 panel_bridge = fffffffffffffdfb 
[   10.261070] sn65dsi83_probe line = 701 ret = -517 
[   10.272907] sn65dsi83_parse_dt line = 609 model = 0 panel_bridge = fffffffffffffdfb 
[   10.272923] sn65dsi83_probe line = 701 ret = -517 
[   10.388702] sn65dsi83_parse_dt line = 609 model = 0 panel_bridge = fffffffffffffdfb 
[   10.388717] sn65dsi83_probe line = 701 ret = -517 
[   10.399740] sn65dsi83_parse_dt line = 609 model = 0 panel_bridge = fffffffffffffdfb 
[   10.399754] sn65dsi83_probe line = 701 ret = -517 
[   20.650585] sn65dsi83_parse_dt line = 609 model = 0 panel_bridge = fffffffffffffdfb 
[   20.650683] sn65dsi83_probe line = 701 ret = -517