MIPI Panel with NT35532 controller

Hello!
I am developing a driver for a panel that is connected through a NT35532 controller. Basing my code in the panel-simple.c and initialization codes from the panel’s manufacurer, I have a crash while the video moes are probed. This is my timing structure:

static const struct drm_display_mode default_mode = {
.clock = 148500,

.hdisplay = 1080,
.hsync_start = 1080 + 97,
.hsync_end = 1080 + 97 + 84,
.htotal = 1080 + 97 + 84 + 16,

.vdisplay = 1920,
.vsync_start = 1920 + 4,
.vsync_end = 1920 + 4 + 1,
.vtotal = 1920 + 4 + 1 + 2,

.vrefresh = 60,
.flags = 0

};

After a few tests, I have also detected than in the init function I can not read a simple value like the panel id:

char smallBuffer[20];
ret = mipi_dsi_dcs_read(dsi, 0x0A, smallBuffer, 1);
//ret is -22(-EINVAL).

Why would this function return an error?. Take into account that A)This read is the first command I invoke. B) The hardware is our own design, and if this error can be traced back to a hardware problem it would be very helpful.

Thanks in advance!

RaulHuertas,

If you want to use DSI panel on tx1, could you check if is has been detected?

When I saw “drm_display_mode default_mode”, I guess it does not use tegra display controller.

“could you check if is has been detected?”
by reading the ID? well, thatś the thing… I only get a -22(EINVAL) when using mipi_dsi_dcs_read(). What could it mean? My DSI HOST has the DSI-1 name, how elese can I check if teh panel is detected.
ANd no, is not for a NVIDIA board…, but I can’t find help anywhere else

RaulHuertas,

I think you should get to know the process of how tegra recognizes DSI panel first.

Tegra display controller is used for all tegra platform(tk1 ~ AGX). If your panel has been detected, there would be some info in kernel log after boot up.

Below log is example from my tx1, if you configure the panel correctly, there would be more log after tegradc tegradc.: probed

0.221713] platform tegradc.1: domain=ffffffc0fa235918 allocates as[0]=ffffffc0fa14c2b0
[    0.222340] platform tegradc.1: IOVA linear map 0x00000000c6000000(2a000000)
[    0.516163] tegradc tegradc.1: DT parsed successfully
[    0.516219] tegradc tegradc.1: Display dc.ffffff8000980000 registered with id=0
[    0.597254] tegradc tegradc.1: probed
[    5.031391] tegradc tegradc.1: fb registered

You also need to study the dsi driver and device tree. Please download our kernel source.
https://developer.nvidia.com/embedded/dlc/sources-r2821

Below is the flow you could follow to trace code.
Check “p2371-2180-devkit.conf” → What DTB_FILE is using → Convert that dtb file back to dts → Check which panel is using by default → Check the driver in kernel source by the panel name in dts.