Other Parts Discussed in Thread: SN65DSI86
Hello. I have a board with the NXP i.MX 8M Plus Processor and a 2-lane MIPI DSI-Connector and I am trying to use the DSI86 EVM. I am able to detect the bridge via i2c on the 0x2d address and also able to set the registers with i2cset in order to show the color bar on the display. However the bridge's driver doesn't seem to be able to identify the bridge and do something.
I added the panel description of my display to the panel-edp.c driver and wrote the following dts overlay:
&{/} {
sn65dsi86_refclk: sn65dsi86-refclk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
status = "okay";
};
panel: edp-panel {
compatible = "hp,e24-g4";
status = "okay";
dsi-lanes = <2>;
video-mode = <0>;
port {
panel_from_sn65: endpoint {
remote-endpoint = <&sn65_to_panel>;
};
};
};
};
&i2c2 {
status = "okay";
sn65dsi86@2d {
compatible = "ti,sn65dsi86";
status = "okay";
reg = <0x2d>;
ti,dsi-lanes = <2>;
max,dsi-channel = <1>;
ti,dp-lanes = <2>;
dsi-clocks;
clocks = <&sn65dsi86_refclk>;
clock-names = "refclk";
ports {
//IN(DSI===>SN65DSI)
port@0 {
reg = <0>;
sn65_in: endpoint {
remote-endpoint = <&dsim_to_sn65>;
};
};
//out
port@1 {
reg = <1>;
sn65_to_panel: endpoint {
data-lanes = <0 1 2 3>;
lane-polarities = <0 1 0 1>;
remote-endpoint = <&panel_from_sn65>;
};
};
};
};
};
&lcdif1 {
status = "okay";
};
&mipi_dsi {
status = "okay";
port@1 {
reg = <1>;
dsim_to_sn65: endpoint {
remote-endpoint = <&sn65_in>;
attach-bridge;
};
};
};
Most of the times, when inserting the ti-sn65dsi86.ko Kernel module (or after booting the board) I get just the following messages:
[ 544.693812] ti_sn65dsi86 1-002d: GPIO lookup for consumer enable [ 544.693829] ti_sn65dsi86 1-002d: using device tree for GPIO lookup [ 544.693841] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/soc@0/bus@30800000/i2c@30a30000/sn65dsi86@2d[0]' [ 544.693871] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/soc@0/bus@30800000/i2c@30a30000/sn65dsi86@2d[0]' [ 544.693897] ti_sn65dsi86 1-002d: using lookup tables for GPIO lookup [ 544.693902] ti_sn65dsi86 1-002d: No GPIO consumer enable found [ 544.693909] ti_sn65dsi86 1-002d: Looking up vcca-supply from device tree [ 544.693924] ti_sn65dsi86 1-002d: Looking up vcca-supply property in node /soc@0/bus@30800000/i2c@30a30000/sn65dsi86@2d failed [ 544.693956] ti_sn65dsi86 1-002d: supply vcca not found, using dummy regulator [ 544.694091] ti_sn65dsi86 1-002d: Looking up vcc-supply from device tree [ 544.694105] ti_sn65dsi86 1-002d: Looking up vcc-supply property in node /soc@0/bus@30800000/i2c@30a30000/sn65dsi86@2d failed [ 544.694131] ti_sn65dsi86 1-002d: supply vcc not found, using dummy regulator [ 544.694179] ti_sn65dsi86 1-002d: Looking up vccio-supply from device tree [ 544.694191] ti_sn65dsi86 1-002d: Looking up vccio-supply property in node /soc@0/bus@30800000/i2c@30a30000/sn65dsi86@2d failed [ 544.694215] ti_sn65dsi86 1-002d: supply vccio not found, using dummy regulator [ 544.694263] ti_sn65dsi86 1-002d: Looking up vpll-supply from device tree [ 544.694275] ti_sn65dsi86 1-002d: Looking up vpll-supply property in node /soc@0/bus@30800000/i2c@30a30000/sn65dsi86@2d failed [ 544.694299] ti_sn65dsi86 1-002d: supply vpll not found, using dummy regulator [ 544.700845] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops) [ 544.700978] imx_sec_dsim_drv 32e60000.mipi_dsi: version number is 0x1060200 [ 544.701032] imx_sec_dsim_drv 32e60000.mipi_dsi: [drm] *ERROR* modalias failure on /soc@0/bus@32c00000/mipi_dsi@32e60000/port@1 [ 544.712687] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e60000 to encoder DSI-34: -517 [ 544.724454] imx_sec_dsim_drv 32e60000.mipi_dsi: Failed to attach bridge: 32e60000.mipi_dsi [ 544.732748] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to bind sec dsim bridge: -517
sometimes (like once in 30 times) I get this. This occurs pretty randomly even when the bridge is not connected at all so I wonder where it comes from and why:
[ 710.460491] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops) [ 710.460639] imx_sec_dsim_drv 32e60000.mipi_dsi: version number is 0x1060200 [ 710.460677] imx_sec_dsim_drv 32e60000.mipi_dsi: [drm] *ERROR* modalias failure on /soc@0/bus@32c00000/mipi_dsi@32e60000/port@1 [ 710.472928] imx-drm display-subsystem: bound 32e60000.mipi_dsi (ops imx_sec_dsim_ops) [ 710.473235] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1 [ 710.473399] cma: cma_alloc(cma 0000000077aa1180, count 2025, align 8) [ 710.475231] cma: cma_alloc(): returned 00000000c106d400 [ 710.477453] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to get pmsk for: fin = 12000, fout = 0 [ 710.477486] Console: switching to colour frame buffer device 240x67 [ 710.477582] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to get pmsk for: fin = 12000, fout = 0 [ 710.506418] imx-drm display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device [ 710.828014] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to get pmsk for: fin = 12000, fout = 0 [ 711.263914] vgaarb: vga_arb_open [ 711.739995] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to get pmsk for: fin = 12000, fout = 0 [ 711.748773] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to get pmsk for: fin = 12000, fout = 0 [ 716.921122] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to get pmsk for: fin = 12000, fout = 0
And once I managed to get the error which means that the driver actually communicated with the bridge:
[ 2.170625] imx-drm display-subsystem: bound 32e60000.mipi_dsi (ops imx_sec_dsim_ops)
[ 2.840998] ti_sn65dsi86 1-002d: [drm:ti_sn_bridge_atomic_enable [ti_sn65dsi86]] *ERROR* Link training failed, link is off (-5)
[ 13.824711] ti_sn65dsi86 1-002d: [drm:ti_sn_bridge_atomic_enable [ti_sn65dsi86]] *ERROR* Link training failed, link is off (-5)
After that error message I also checked the registers:
~# i2cdump -y 1 0x2d
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 36 38 49 53 44 20 20 20 02 00 06 00 00 00 00 00 68ISD ?.?.....
10: 26 00 33 85 00 00 00 00 00 00 00 00 00 00 00 00 &.3?............
20: 80 07 00 00 38 04 00 00 00 00 00 00 2c 00 00 00 ??..8?......,...
30: 05 00 00 00 94 00 24 00 58 00 04 00 10 00 00 00 ?...?.$.X.?.?...
40: 01 00 00 00 80 00 98 08 65 04 c0 00 29 00 2c 00 ?...?.??e??.).,.
50: 05 00 80 07 38 04 20 00 40 e4 a4 00 11 00 b0 00 ?.??8? .@??.?.?.
60: a0 60 a4 00 00 06 00 06 00 00 00 00 00 00 00 00 ?`?..?.?........
70: 00 00 00 00 00 01 02 01 80 17 00 00 00 00 00 00 .....?????......
80: 00 00 00 00 00 00 00 00 00 1f 7c f0 c1 07 1f 7c .........?|????|
90: f0 c1 07 20 82 00 00 04 01 00 00 00 00 00 00 00 ??? ?..??.......
a0: 01 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 ?...............
b0: 04 78 ac ac 08 6c 9c 9c 0c 5c 5c 5c 0c 0c 0c 0c ?x???l???\\\????
c0: 3f 3f 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 ???.............
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 02 03 00 00 01 20 00 00 13 00 00 00 00 00 00 00 ??..? ..?.......
Unfortunately, I wasn't able to get the same error message to show ever again even though I didn't change anything
Maybe you have any suggestions?