Adding some more info on the issue seen.
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>;
};
};
Hello,
Thank you for sharing more information, please share your updated device tree so I can take a look.
Also, I found the exact commit for the enablement of the same bridge on a similar platform, please have a look:
https://github.com/nxp-imx/linux-imx/commit/3f89845698b7deecb3ea1e25a21d92b376796873
Best regards/Saludos,
Aldo.
Hi Aldo,
Thanks for the reply. The changes suggested in patch are already part of Kernel 6.6.
Some more debug, it is observed that SN65DSI83 probe is getting failed due to remote node not available. Not sure, what is causing for remote not being detected.
here are print
[ 2.771955] i2c 2-002d: Fixed dependency cycle(s) with /soc@0/bus@32c00000/mipi_dsi@32e60000/port@0/endpoint
[ 2.782041] sn65dsi83_probe ++
[ 2.796731] sn65dsi83_parse_dt ++
[ 2.800582] drm_of_find_panel_or_bridge
[ 2.804955] no remote node
[ 2.808184] Parse dt fail
Hello,
This information does help a lot, thank you for sharing, if it is failing while parsing the device tree then it may be some changes on the bindings with respect to the driver, I would suggest to refer to the foloowing device tree and try with a similar configuration:
https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mm-phg.dts
Best regards/Saludos,
Aldo.
Thank you. I followed the dts as suggested in the link. But further seeing synchronization issue between DSI and bridge. Bridge start and does other initialization. But fails on not finding host. On other hand, DSI starts and does initialzation. But fails during bridge attach. Any info here would be of great help.
Sharing log snippet below.
[ 21.985787] sn65dsi83_probe ++
[ 22.000762] sn65dsi83_parse_dt ++
[ 22.008915] dev node name bridge full_name bridge@2d
[ 22.014417] devm_drm_of_get_bridge
[ 22.018363] drm_of_find_panel_or_bridge ++
[ 22.022999] of_graph_get_remote_node ++
[ 22.027369] of_graph_get_endpoint_by_regs ++
[ 22.032173] parent name bridge full_name bridge@2d
[ 22.037499] of_graph_parse_endpoint ++
[ 22.041786] of_graph_parse_endpoint --
[ 22.046069] port_reg 2 endpoint.port 0
[ 22.050350] reg 0 endpoint.id 0
[ 22.054034] of_graph_get_remote_node return remote --
[ 22.059617] remote name mipi_dsi
[ 22.063379] of_drm_find_panel ++
[ 22.067141] Node mipi_dsi
[ 22.073193] panel found
[ 22.079488] drm_of_find_panel_or_bridge ret 0 --
[ 22.084638] devm_drm_panel_bridge_add ++--
[ 22.088746] devm_drm_panel_bridge_add_typed ++
[ 22.093209] drm_bridge_add ++
[ 22.096700] bridge to add name panel full_name panel
[ 22.102201] drm_bridge_add --
[ 22.105709] devm_drm_panel_bridge_add_typed --
[ 22.121088] drm_bridge_add ++
[ 22.124584] bridge to add name bridge full_name bridge@2d
[ 22.130532] drm_bridge_add --
[ 22.134035] sn65dsi83_host_attach ++
[ 22.138143] of_graph_get_endpoint_by_regs ++
[ 22.142950] parent name bridge full_name bridge@2d
[ 22.148277] of_graph_parse_endpoint ++
[ 22.152564] of_graph_parse_endpoint --
[ 22.156849] port_reg 0 endpoint.port 0
[ 22.161133] reg -1 endpoint.id 0
[ 22.164894] of_find_mipi_dsi_host_by_node ++
[ 22.169180] Node mipi_dsi
[ 22.172327] of_find_mipi_dsi_host_by_node --
[ 22.176613] no host
[ 22.179262] failed to attach DSI host
[ 22.182941] drm_bridge_remove ++
[ 22.186187] drm_bridge_remove --
[ 22.189624] drm_bridge_remove ++
[ 22.192860] drm_bridge_remove --
[ 22.117154] sn65dsi83_parse_dt --
[ 22.196836] imx_sec_dsim_probe
[ 22.200536] adding component (ops imx_sec_dsim_ops)
[ 22.206007] try_to_bring_up_aggregate_device
[ 22.217896] found component 32e60000.mipi_dsi, duplicate 0
[ 22.223836] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[ 22.231801] imx_sec_dsim_bind: dsim bind begin
[ 22.236264] imx_drm_encoder_parse_of
[ 22.240375] drm_of_find_possible_crtcsi ++
[ 22.244493] port name mipi_dsi fullname mipi_dsi@32e60000 ep name endpoint fullname endpoint
[ 22.253471] remoteport name port fullname port@0
[ 22.258622] drm_of_crtc_port_mask ++
[ 22.262208] tmp->port name port tmp->full_name port tmp->port 7f47b5e8
[ 22.268835] port name port full_name port@0
[ 22.274248] index 0
[ 22.276350] drm_of_find_possible_crtcsi -possible_crtcs 2 --
[ 22.282029] sec-dsim bridge bind begin sec_mipi_dsim_bind
[ 22.332472] imx_sec_dsim_drv 32e60000.mipi_dsi: version number is 0x1060200
[ 22.339466] version number is 0x1060200
[ 22.343359] mipi_dsi_host_register ++
[ 22.347558] Add node mipi_dsi
[ 22.351062] in loop add host node mipi_dsi full_name mipi_dsi@32e60000 node port full_name port@2
[ 22.360470] continue
[ 22.363191] in loop add host node mipi_dsi full_name mipi_dsi@32e60000 node ports full_name ports
[ 22.372606] continue
[ 22.375328] mipi_dsi_host_register --
[ 22.379525] drm_bridge_attach
[ 22.382505] sec_mipi_dsim_bridge_attach
[ 22.386877] endpoint node name endpoint full_name endpoint
[ 22.392382] of_drm_find_bridge ++
[ 22.396232] Node name bridge full_name bridge@2d
[ 22.401384] of_drm_find_bridge return NULL
[ 22.405498] probe defer
[ 22.408467] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e60000 to encoder DSI-34: -517
[ 22.420163] imx_sec_dsim_drv 32e60000.mipi_dsi: Failed to attach bridge: 32e60000.mipi_dsi
[ 22.428444] Failed to attach bridge: 32e60000.mipi_dsi
[ 22.433600] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to bind sec dsim bridge: -517
[ 22.441360] failed to bind sec dsim bridge: -517
[ 22.446527] bind ret -517
[ 22.449179] sec_dsim_of_put_resets
[ 22.453119] Failed to add component
[ 22.457277] i2c 2-002d: deferred probe pending
[ 22.461798] platform 32e60000.mipi_dsi: deferred probe pending