@agx at the moment i'm trying to figure out how to define an eDP panel in DTS
@mntmn this one should have all the dtb, mxsfb and nwl patches: https://source.puri.sm/guido.gunther/linux-imx8/tree/forward-upstream/next-20190823/mxsfb+nwl/v5 - i've only used panel_bridge with that but ti,sn65dsi86 should work instead of that by swapping the panel out and the bridge in in dt.
@agx thank you for this! i will attempt to integrate the code today. what is the role of mxsfb? is it a replacement/alternative to imx-drm? (i’m currently using a hacked up version of that with hdmi)
@mntmn mxsfb used the lcdif interface instead of dcss which is way simpler and has (with robert's patches that i pulled into my tree) mainline support which dcss hasn't.
@mntmn the version you picked is rather old and might not support bridge chaining.
@agx oh, thanks for the hint! not always easy for me to track where are the latest developments ;)
@agx hmm, what exactly does this do? https://source.puri.sm/guido.gunther/linux-imx8/commit/7aa90a0b575f9fc34c7f0369dbb1f16c13dc9de0
@agx OK, i have all the code integrated. but i struggle configuring the lcdif > mipi_dsi > sn65dsi > edp chain in dts. i think the main problem is i don’t know how to define a “panel” for the bridge chip... simple-panel and simple-panel-dsi don’t seem to be right. i can probe the sn65 with a simple-panel, but mipi_dsi host is never attached.
@mntmn you would just define a bridge for the sn65dsi as in the binding docs https://source.puri.sm/guido.gunther/linux-imx8/blob/forward-upstream/next-20190823/mxsfb+nwl/v5/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.txt#L46 and use that as remote-endpoint in
and drop the panel altogether. So sd65sdi would have the nwl at it's port@0 while the nwl has the sn65dsi at it's port@1
@agx ok i figured out that far, but i believe the sn65dsi doesn't work without a panel for its output, testing now
@agx ti-sn65dsi86.c fails with DRM_ERROR("could not find any panel node\n"); if there is no panel. so i'm using a simple-panel now as an edp output, and it makes sn65dsi probe. but the line with mipi_dsi_attach(dsi); in sn65dsi is never reached, and mipi_dsi is never added as a bridge, so mxsfb always fails to "create outputs", not finding mipi_dsi as a bridge.
@mntmn the sn64dsi86 wants your edp panel as output again (edp_panel_in) - i so far describe the chain only up to that. so its mxsfb -> nwl (drm bridge) -> ts65dsi86 (drm bridge) -> edp (drm panel). see ti_sn_bridge_probe. so your edp panel needs a panel entry within the ts65dsi86's dt node similar to what we do for our dsi panel within the nwl's bridge node: https://source.puri.sm/guido.gunther/linux-imx8/blob/imx8-5.x-drm/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts#L849 - just a guess since i've not used the ts65dsi86.
@agx yes, i think the panel part is ok now, but nobody is ever calling ti_sn_bridge_attach and so the whole chain does not finish setting up. i don't understand who is responsible for calling it. also there is this longer comment https://elixir.bootlin.com/linux/v5.3-rc7/source/drivers/gpu/drm/bridge/ti-sn65dsi86.c#L250
@agx ok so moving the dsi code after that TODO comment into the probe function actually makes it work
@mntmn nice, the bridge should be attached by this https://source.puri.sm/guido.gunther/linux-imx8/blob/forward-upstream/next-20190823/mxsfb+nwl/v5/drivers/gpu/drm/bridge/nwl-dsi/nwl-drv.c#L226
@mntmn it allows the mipi dsi host controller to use the iomuxc_gpr as mux controller since it needs to toggle between dcss and mxsfb input.
@agx good timing :) i'm currently hacking on it. i'm using TI SN65DSI86, which has a mainline driver and seems pretty simple. i also picked some of your patches like https://source.puri.sm/Librem5/linux-next/commit/1a92d1145ec8ee9c7fe0376ed154594e429edd94