[SOLVED] DSI-MIPI panel on TX1, DSI panel node selection problems

Hello,
Im building a DSI-MIPI panel interface for the TX1 J23 display connector.
The final plan is to run 2x DSI channels from (dc.0 and dc.1).
For now/testing im just trying to get one DSI panel running (in parallel with HDMI is fine).
I am running 28.1 kernel on the TX1 and have read just about every DSI post on this forum.
I also have been through all of the included L4t docs such as the host1x.txt and dc.txt.
I see some discrepancies as those txt docs mainly in the DC and DSI node description sections which declare that all of the DSI parameters are ‘required’, but i rearely see anyone using ‘nvidia,dsi-lp00-pre-panel-wakeup’ (i dont require that feature but noticed it might not be ‘required’ as the tegra210-dsi.txt suggests) some of these are clearly optional parameters. which raises the question what is the required node minimum for DC->DSI->panel nodes?

i have added tons of debug to the console output, and have seemed to find that, even though my DTB (de-compiled and attached here) shows the correct nodes as i expected to see from the DTS/DTSI flattening into the blob.

so far my steps involved

  1. modding the DTS/DTSI to produce the flat DTS i posted here, which looks correct based on what ive read about the DC->DSI->panel nodes from the docs as well as this forum. it also included the <panels/panel-dsi-25x16.dtsi> file which i have modified parameter values to match my panel. this info appear correct in the flattened & de-compiled dtb-> dts i have attached

  2. modded board-panel.c ( i assume we have to get this file to select the appropriate panel node to load) so i have modified and put many debug into the function “available_internal_panel_select”

  3. modded board-panel.c/ internal_panel_select_by_disp_board_id, by adding the following in the 'default’switch case (as my board id comes up as 0xffff).

np_panel = of_find_compatible_node(NULL, NULL, "dsi,25x16");
		if (np_panel && pdata && dc_out){
			tegra_panel_register_ops(dc_out,
				&dsi_s_wqxga_10_1_ops);

my debug (in board.panel.c / available_internal_panel_select ) shows it cant locate the panel nodes as children of the DSI nodes, the below code returns output confirming there are zero child nodes in the dsi node.

np_dsi = of_find_node_by_path(DSI_NODE);
pr_info("** IT HAS:%d  CHILD NODES**\n", of_get_available_child_count(np_dsi));

this results in the flowing code never running as the np_panel is always 0

if (np_panel){
				default_out = of_get_child_by_name
						(np_panel, "disp-default-out");

i believe the nodes are present as the following code produces what looks to be a valid panel address ‘0xffffffc0ffce8a48’

(long unsigned int)of_find_node_by_path("/host1x/dsi/panel-s-wqxga-10-1")

after all this the SOR node gets registered and all hope of DSI is lost.
one more note:
it appears that my device tree is represented correctly in the /proc/device-tree hierarchy, but the DSI folders (or panel nodes below) ‘status’ does not match my de-compiled DTB file in /boot/dtb (which is tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb). the ‘status’ binary will show ‘disabled’ not ‘okay’, for the dsi and both panel nodes (which look correct in the flattened dtb). I have also noticed that the /sys/bus/platform/drivers/tegradc folder only ever contains the HDMI/SOR driver tegradc.1 (in my case). dont know if any of this helps , but im hoping someone can shed some light… or provide any suggestions/guide.

tegra210-jetson-tx1-p2597-2180-a01-devkit.dts.tar (661 KB)

aaron.miller,

tegra210-jetson-cv-base-p2597-2180-a00.dtb is a dtb that enables DSI panel by default.

Did you mean the node “status” of “dsi” is still “disabled” in /proc/device-tree in runtime?

If yes, could you share how you update your dtb?

Yes the run time /proc/device-tree, shows the dsi node disabled along with the sqxga node disabled.

To update the dtb. I manually edit above mentioned edits in multiple dts and dtsi. Then run a ‘make dtbs’ and the dtb gets copied into /boot/btd. I do this in conjunction with a full build script that builds the image and zimage. Along with modules and dtbs and places all of those into /boot.

i should add, at this point our DSI display panel board is NOT connected to J23, i have a scope on the dsiA clk line and have never seen a rising edge or clk tick. i dont we are at the point of panel probing or initialization without a clock tick, but wanted to add that fact. We also boot the tx1 with the HDMI disconnected.

aaron.miller,

dtb cannot be updated as kernel image. Directly copying to /boot/dtb folder on device would not work.

You need to use below flash command from host pc.

sudo ./flash -r -k DTB jetson-tx1 mmcblk0p1

Your new dtb should be put (replace old one) under Linux_for_Tegra/kernel/dtb in your jetpack. We should get device tree changed successfully first.

Ok i can give that a try.
Just to confirm… all my steps above are performed locally on the tx1… once boot/dtb is updated i jusr reboot the tx1. I can swap the dc node addresses in my dts and with my process can watch the console dmesg at the next boot and i verify the reported dc node address appears to change. Is this not correct?

aaron.miller,

After rel-28, the correct way to update dtb is through flash. We don’t guarantee the correctness of updating dtb on local device anymore. It is an unpredictable method.

ok Great! that was the trick. Apparently as stated you cannot compile DTBs locally (on TX1) and expect it to work. We had to follow the cross compile environment instructions and flash with flash.sh script. Once we were able to set up the cross compile properly and flash over, we were able to register our second DC.0 for DSI on our custom panel!
we just had to

  1. create a custom panel.DTSI and panel.C (based off panel-s-wuxga-8-0)
  2. modify the devkit.dtsi, and cv-base.dtsi to set status of related dc.0, dsi, and our new panel nodes properly with correct specifications. and set all status to ‘okay’ and ensure all compatible parameters are correct to match the node
  3. add the new panel information in the panel selection logic in board-panel.c and add defines in board-panel.h
  4. add new files to panels make file.
  5. cross-compile using EXACT instructions step by step from the kernel documentation file to build and flash kernel.

I would like to add most of our issues seem to have first been related to us trying to locally compile on the TX1, and second, our screen panel we worked with is fairly new and the manufacture provided us with some incorrect data which lead to some incorrect power-on and initialization sequence mistakes. once we cleared up the dsi-init-cmd and had the correct commands (and matched the command count to the dsi-n-init-cmd parameter) the new kernel would load and after GUI login and terminal ‘xrandr’ command verified the second display settings were all correct. then our new panel was working!
thanks WayneWWW