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: Bridge attach fail 6.6 linux kernel on imx8mp

Part Number: SN65DSI83


Hi,
 
I have a linux kernel which is ported from 5.4 to 6.6 (yocto nanbield). Now trying to bringup MIPI-DSI using SN65DSI83 on the ported 6.6 kernel. Processor used in imx8mp.
But it is failing. The same dts works all fine in 5.4 kernel. Can you pls help me here.
There looks like cyclic dependency between sec_mipi_dsim_bind () and sn65dsi83_probe(). 
sec_mipi_dsim_bind() fails due to attach failure as the bridge has still not come-up. sn65dsi83_probe() fails as there is no dsi host.
Pls let me know how to avoid this ?. Is there any configuration missing ?. Inform if you need more info.
sn65dsi83_probe logs
[ 21.626617] device_node host_node name mipi_dsi full_name mipi_dsi@32e60000
[ 21.633598] no host
[ 21.636227] failed to attach DSI host
imx_sec_dsim_probe logs
[ 21.831150] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e60000 to encoder DSI-37: -517
[ 21.842856] imx_sec_dsim_drv 32e60000.mipi_dsi: Failed to attach bridge: 32e60000.mipi_dsi
[ 21.851141] Failed to attach bridge: 32e60000.mipi_dsi
[ 21.856300] mipi_dsi_host_unregister
[ 21.859901] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 21.867666] failed to bind sec dsim bridge: -517
[ 21.872851] bind ret -517
 
Below is dts file changes
 
/dts-v1/;
 
#include <dt-bindings/phy/phy-imx8-pcie.h>
#include <dt-bindings/usb/pd.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/gpio-keys.h>
#include "imx8mp.dtsi"
 
/ {
    model = "NXP i.MX8MPlus GX2 board";
    compatible = "fsl,imx8mp-evk", "fsl,imx8mp";
    
    chosen {
        stdout-path = &uart2;
    };
    
    lvds_backlight: lvds_backlight {
        compatible = "pwm-backlight";
        pwms = <&pwm2 0 100000>;
        status = "okay";
        
        brightness-levels = < 0  1  2  3  4  5  6  7  8  9
             10 11 12 13 14 15 16 17 18 19
             20 21 22 23 24 25 26 27 28 29
             30 31 32 33 34 35 36 37 38 39
             40 41 42 43 44 45 46 47 48 49
             50 51 52 53 54 55 56 57 58 59
             60 61 62 63 64 65 66 67 68 69
             70 71 72 73 74 75 76 77 78 79
             80 81 82 83 84 85 86 87 88 89
             90 91 92 93 94 95 96 97 98 99
            100>;
        default-brightness-level = <80>;
    };
    
    lvds0_panel {
        compatible = "ampire,am-1280720l2tzqw-00h";
        backlight = <&lvds_backlight>;
        power-supply = <&reg_panel_shlr>;
        
        port {
            panel_lvds_in: endpoint {
                remote-endpoint = <&lvds_out>;
            };
        };
    };
};
 
&i2c3 {
    clock-frequency = <100000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c3>;
    status = "okay";
    
    dsi_lvds_bridge: sn65dsi83@2d {
    compatible = "ti,sn65dsi83";
    reg = <0x2d>;
    ti,dsi-lanes = <4>;
    ti,lvds-format = <1>;
    ti,lvds-bpp = <24>;
    ti,width-mm = <177>;
    ti,height-mm = <100>;
    enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;
    interrupt-parent = <&gpio2>;
    interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
    status = "okay";
        
    display-timings {
    lvds {
        //clock-frequency = <62500000>;
        clock-frequency = <71150000>;
        hactive = <1280>;
        vactive = <720>;
        hback-porch = <120>;
        hfront-porch = <120>;
        vback-porch = <25>;
        vfront-porch = <25>;
        //hsync-len = <30>;
    hsync-len = <2>;
    //vsync-len = <5>;
    vsync-len = <1>;
    hsync-active = <0>; 
    vsync-active = <0>;
    de-active = <1>;
    pixelclk-active = <0>;
    };
       };
 
port {
dsi_lvds_bridge_in: endpoint {
remote-endpoint = <&mipi_dsi_out>;
    };
    };
};
 
 
&lcdif1 {
    status = "okay";
};
 
&lcdif2 {
    status = "okay";
};
 
&ldb {
    status = "okay";
    
    lvds-channel@0 {
        fsl,data-mapping = "jeida";
        fsl,data-width = <24>;
        status = "okay";
        
        port@1 {
            reg = <1>;
            lvds_out: endpoint {
                remote-endpoint = <&panel_lvds_in>;
            };
        };
    };
};
 
&ldb_phy {
    status = "okay";
};
 
&mipi_dsi {
    status = "okay";
    
    port@1 {
        mipi_dsi_out: endpoint {
            remote-endpoint = <&dsi_lvds_bridge_in>;
            attach-bridge;
        };
    };
};
 
 
Below config is enabled in defconfig
CONFIG_DRM_TI_SN65DSI83=y
  • Hey Prashant,

    Unfortunately, software debug is outside of the scope of my expertise. We do not support software. Are you able to get I2C communication with the device?

  • Thanks for the reply.

    I2C communication works with the device.

    Observation is if the port node (dsi_lvds_bridge_in) is added under i2c3/sn65dsi83@2d node, then bridge-attach fails and device is not seen with i2cdetect.
    Without port node, device is seen with i2cdetect and communication works.
    port {
        dsi_lvds_bridge_in: endpoint {
        remote-endpoint = <&mipi_dsi_out>;
    };

    We also tried by testing adv7535 bridge on same linux 6.6 and it works fine.
    So not sure, what is making sn65dsi83 bridge to fail.

            adv_bridge: adv7535@3d {
                    compatible = "adi,adv7535";
                    reg = <0x3d>;
                    adi,addr-cec = <0x3b>;
                    adi,dsi-lanes = <4>;
                    status = "okay";

     

                    port {
                            adv7535_from_dsim: endpoint {
                                    remote-endpoint = <&dsim_to_adv7535>;
                            };
                    };

  • Hey Prashant,

    Like I mentioned I am unable to support driver software for our devices. We have some reference code for these device, but It seems you already used some of the source material. 

    Source Code: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/video/omap2/dss/dsi.c?id=c16fa4f2ad19908a47c63d8fa436a1178438c7e7

    Let me know if this helps!

    Unfortunately, there isn't much else I can provide in terms of support, but if you have any hardware/ implementation question feel free to reopen this thread.