IMX8MM + sn65dsi83 + yocto scarthgap = devicetree problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMX8MM + sn65dsi83 + yocto scarthgap = devicetree problem

跳至解决方案
1,111 次查看
pavelko
Contributor III

Hello,

back to 4.19 warrior I have used this configuration of sn65dsi84 DSI to LVDS bridge in device tree:

&i2c1 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";

dsi_lvds_bridge: sn65dsi84@2c {
compatible = "ti,sn65dsi83";
reg = <0x2c>;
ti,dsi-lanes = <4>;
ti,lvds-format = <2>;
ti,lvds-channels = <1>;
ti,lvds-bpp = <24>;
ti,width-mm = <210>;
ti,height-mm = <157>;
ti,burst-mode;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds>;
enable-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
status = "okay";

display-timings {
lvds {
clock-frequency = <65000000>;
hactive = <1024>;
vactive = <768>;
/* */
hfront-porch = <24>;
hsync-len = <136>;
hback-porch = <160>;
/* */
vfront-porch = <3>;
vsync-len = <6>;
vback-porch = <29>;
/* */
vsync-active = <0>;
hsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};
};

port {
lvds_from_dsi: endpoint {
remote-endpoint = <&dsi_to_lvds>;
};
};
};
};

&mipi_dsi {
status = "okay";

port@1 {
dsi_to_lvds: endpoint {
remote-endpoint = <&lvds_from_dsi>;
};
};
};

&iomuxc {
pinctrl_i2c1: i2c1grp {
fsl,pins = <
MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3
MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3
>;
};

pinctrl_lvds: lvdsgrp {
fsl,pins = <
MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x16
>;
};
};

However, when I ported the device tree to yocto scarthgap (Linux 6.6) this definition is not working anymore:

[ 1.290572] imx-drm display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[ 1.298317] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[ 1.305343] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e10000 to encoder DSI-34: -19
[ 1.316955] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[ 1.325231] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -19
[ 1.332903] imx-drm display-subsystem: bound 32e10000.mipi_dsi (ops imx_sec_dsim_ops)
[ 1.341048] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0
[ 1.348908] imx-drm display-subsystem: [drm] Cannot find any crtc or sizes


Could anyone point me an example device tree setup for sn65dsi8(3/4/5) + imx8mm + Linux 6.6

Thanks in advance.

 

0 项奖励
回复
1 解答
1,099 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @pavelko 

 

I hope you are doing very well.

You can take a look into the sn65dsi83 binding in the linux kernel.

Also, you can try with this modified device tree:

 

&i2c1 {
    clock-frequency = <400000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c1>;
    status = "okay";

    dsi_lvds_bridge: sn65dsi84@2c {
        compatible = "ti,sn65dsi83";
        reg = <0x2c>;
        enable-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
        status = "okay";

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

            port@0 {
                reg = <0>;
                bridge_in: endpoint {
                    remote-endpoint = <&mipi_dsi_out>;
                    data-lanes = <1 2 3 4>;
                };
            };

            port@2 {
                reg = <2>;
                bridge_out: endpoint {
                    remote-endpoint = <&panel_in>;
                };
            };
        };
    };
};

&mipi_dsi {
    status = "okay";

    port@1 {
        reg = <1>;
        mipi_dsi_out: endpoint {
            remote-endpoint = <&bridge_in>;
            data-lanes = <1 2 3 4>;
        };
    };
};

panel_lvds: panel {
    compatible = "panel-lvds";
    data-mapping = "jeida-24";
    width-mm = <210>;
    height-mm = <157>;

    panel-timing {
        clock-frequency = <65000000>;
        hactive = <1024>;
        vactive = <768>;
        hfront-porch = <24>;
        hsync-len = <136>;
        hback-porch = <160>;
        vfront-porch = <3>;
        vsync-len = <6>;
        vback-porch = <29>;
        hsync-active = <0>;
        vsync-active = <0>;
        de-active = <1>;
        pixelclk-active = <1>;
    };

    port {
        panel_in: endpoint {
            remote-endpoint = <&bridge_out>;
        };
    };
};

 

 

It should align with the 6.6 kernel version.

 

Best regards,

Salas.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,069 次查看
pavelko
Contributor III

Thank you for your solution!

 

Best Regards,

Pavel

0 项奖励
回复
1,075 次查看
pavelko
Contributor III

Thank you for the answer.

To accept it as an answer "port 1" in sn65dsi declaration shall be renamed to "port 2", as port 1 is used foe 2nd DSI output channel. and correct reg =<1> to reg=<2> accordingly.

 

Thank you!

 

 

1,074 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @pavelko 

 

I updated the post, please check it, also, thank you for the feedback!

 

Best regards,

Salas.

0 项奖励
回复
1,100 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @pavelko 

 

I hope you are doing very well.

You can take a look into the sn65dsi83 binding in the linux kernel.

Also, you can try with this modified device tree:

 

&i2c1 {
    clock-frequency = <400000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c1>;
    status = "okay";

    dsi_lvds_bridge: sn65dsi84@2c {
        compatible = "ti,sn65dsi83";
        reg = <0x2c>;
        enable-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
        status = "okay";

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

            port@0 {
                reg = <0>;
                bridge_in: endpoint {
                    remote-endpoint = <&mipi_dsi_out>;
                    data-lanes = <1 2 3 4>;
                };
            };

            port@2 {
                reg = <2>;
                bridge_out: endpoint {
                    remote-endpoint = <&panel_in>;
                };
            };
        };
    };
};

&mipi_dsi {
    status = "okay";

    port@1 {
        reg = <1>;
        mipi_dsi_out: endpoint {
            remote-endpoint = <&bridge_in>;
            data-lanes = <1 2 3 4>;
        };
    };
};

panel_lvds: panel {
    compatible = "panel-lvds";
    data-mapping = "jeida-24";
    width-mm = <210>;
    height-mm = <157>;

    panel-timing {
        clock-frequency = <65000000>;
        hactive = <1024>;
        vactive = <768>;
        hfront-porch = <24>;
        hsync-len = <136>;
        hback-porch = <160>;
        vfront-porch = <3>;
        vsync-len = <6>;
        vback-porch = <29>;
        hsync-active = <0>;
        vsync-active = <0>;
        de-active = <1>;
        pixelclk-active = <1>;
    };

    port {
        panel_in: endpoint {
            remote-endpoint = <&bridge_out>;
        };
    };
};

 

 

It should align with the 6.6 kernel version.

 

Best regards,

Salas.

0 项奖励
回复