R32.3.1 mipi dsi lcd

Missing the dsi clocks.

What software/dmesg device tree is needed to activate the dsi clock?
mydmesg.gz (24.7 KB)
mydtb.gz (66.5 KB)

You could check whether there is any error from “void tegra_dsi_clk_enable(…)” in dsi.c with kernel source (./nvidia/drivers/video/tegra/dc/dsi.c).

put a printk in that routine and never saw it being called.

Next suggestion please

missing /sys/kernel/debug/tegra_dsi missing also, so how is the tegra_dsi started

Hi Terry,

I think you didn’t enable the dsi in your device tree.

This is pointed out in your previous thread.
https://devtalk.nvidia.com/default/topic/1071552/r32-3-1-how-to-make-a-mipi-dsi-display-work-/

IMO, you could just use one thread to track your issue. It does not help to file so many topics to ask same problem.

Also, for such issue, generally you need to share your current dmesg and dts file converted from dtb.
You already read many other posts here so I think you may already saw other users shared their log.

so what line in the device tree enables dsi

attachments attached to #1

Standard sdkmanager build and install of the tx2(3310) does not have dsi enabled.

Since dsi is completely supplied by nvidia, then nvidia owes me a device tree that enables dsi, or a dts snippet that enables dsi.

Trying to access dsi hardware configuration registers.

sudo devmem2 0x5420c000
[sudo] password for tbuckley:
/dev/mem opened.
Memory mapped at address 0x7fa23e0000.
Value at address 0x5420C000 (0x7fa23e0000): 0xDEAD2009

Messages on the tty console

[16567.988225] CPU5: SError detected, daif=1c0, spsr=0x800000c5, mpidr=80000103, esr=bf40c000
[16567.988238] CPU3: SError detected, daif=140, spsr=0x40000045, mpidr=80000101, esr=bf000002
[16567.989959] ROC:IOB Machine Check Error:

will this be corrected when dsi is enable

also /sys/kernel/debug/tegra_dsi directory is missing.

Question?

If I have multiple problems reported in one topic, how do I know if you will answer all the problems.

If they are in separate topics multiple problems can be easier to track.

I HAVE rebuilt the kernel and changed the dtb trying to get mipi dsi to work.

I HAVE FIXED THIS, MY FAULT, MESSED UP AND DID NOT COPY MODULES TO THE SYSTEM AFTER REBUILDING THE KERNEL

SORRY

Now I get:
sudo nvpmodel -m 0
NVPM ERROR: Error opening /sys/devices/gpu.0/power/control: 2
NVPM ERROR: failed to write PARAM GPU_POWER_CONTROL_ENABLE: ARG GPU_PWR_CNTL_EN: PATH: /sys/devices/gpu.0/power/control VAL: on
NVPM ERROR: Error opening /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/available_frequencies: 2
NVPM ERROR: failed to read PARAM GPU: ARG FREQ_TABLE: PATH /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/available_frequencies
NVPM ERROR: Error opening /sys/devices/gpu.0/power/control: 2
NVPM ERROR: failed to write PARAM GPU_POWER_CONTROL_DISABLE: ARG GPU_PWR_CNTL_DIS: PATH: /sys/devices/gpu.0/power/control VAL: auto
NVPM ERROR: failed to set power mode!
NVPM ERROR: optMask is 1, no request for power mode

Looks like gpu is not being configured into the system, yes I must of messed up the dtb, can you give me a pointer to what might be missing, of course you can determine this from the attached files in #1

SECOND PROBLEM:

sudo jtop
[sudo] password for tbuckley:
Traceback (most recent call last):
File “/usr/local/bin/jtop”, line 11, in
sys.exit(main())
File “/usr/local/lib/python2.7/dist-packages/jtop/main.py”, line 60, in main
with jtop(interval=args.refresh) as jetson:
File “/usr/local/lib/python2.7/dist-packages/jtop/jtop.py”, line 116, in init
self.nvp = NVPmodel(os.environ[“JETSON_TYPE”], jetson_clocks=self.jc)
File “/usr/local/lib/python2.7/dist-packages/jtop/core/nvpmodel.py”, line 93, in init
self.selected = self.num
AttributeError: NVPmodel instance has no attribute ‘num’

Hi,

For your dsi issue, you need to enable nvdisplay@15200000 status to “okay” and you shall see the dsi driver start to probe in dmesg.

As for your error pasted in #9, sorry that I am not 100% sure what is going on, but for DSI issue, you should not need to modify the gpu driver. I think the fastest way to resolve it is restore the change you have made in your driver/modules.

As for your second python problem, I am sorry that jtop is not a tool released by NV. Maybe you could file a problem to Bonghi’s github.

https://github.com/rbonghi/jetson_stats/wiki/jtop

And if you want to understand what is nvdisplay, you could refer to the jetson TX2 technical reference manual on download center.

If I have multiple problems reported in one topic, how do I know if you will answer all the problems.

If they are in separate topics multiple problems can be easier to track.

You could tell us you don’t understand or we missed to reply some questions in that topic. I agree with you that sometimes separate topics are easy to track but it has to be based on the condition that you are not asking the same questions.

For example, topic 1071552 is totally the same question as this one to me.

Also, we need your kind reply if we cannot get your current status or error. Just like you attached the dmesg and dtb file here. It helps me immediately know that your dsi driver is not probing.

So now have nvdisplay@1520000 status=okay

Now getting

[ 0.573362] avdd_dsi_csi: 1200 mV
[ 1.180132] tegradc 15200000.nvdisplay: disp0 connected to head0->/host1x/dsi
[ 1.180140] tegradc 15200000.nvdisplay: tegra_dc_parse_panel_ops: could not find panel for /host1x/dsi

Still no clock being supplied to my mipi dsi lcd board.

how about an answer for #7 also.

WayneWWW what are your hours, and when should I expect to hear from you again, really need a working device tree for mipi dsi so I can copy it for my device.

This is completely nvidia tegra code so you should have a complete device tree to give to your customers. There is no documentation and no way a customer can figure out how to create a device tree for your internal code.

Hi,

The current error is “tegra_dc_parse_panel_ops: could not find panel for /host1x/dsi”. However, I saw this part is already defined in your dtb in #1.

You could check kernel/nvidia/drivers/video/tegra/dc/of_dc.c -> tegra_dc_parse_panel_ops()
This is a search for phandle of “nvidia,active-panel” and use Linux API.

if (!panel_np) {
  		panel_np = of_parse_phandle(conn_np, "nvidia,active-panel", 0);
  		if (IS_ERR_OR_NULL(panel_np)) {
  			dev_err(&ndev->dev, "%s: could not find panel for %s\n",
  				__func__, of_node_full_name(conn_np));
  			ret = -ENODEV;
  			goto exit;
  		}
  	}

Please check your dtb and see why the phandle search is failed there.

Also, here is the device tree we used to enable dsi + dual HDMI case.

#include "tegra186-quill-p3310-1000-c03-00-base.dts"

/ {
	nvidia,dtsfilename = __FILE__;
	nvidia,dtbbuildtime = __DATE__, __TIME__;

	host1x {
		nvdisplay@15200000 {
			status = "okay";
			win-mask = <0x7>;
			nvidia,fb-win = <0x0>;
			nvidia,dc-or-node = "/host1x/dsi";
		};
		nvdisplay@15210000 {
			status = "okay";
			win-mask = <0x18>;
			nvidia,fb-win = <0x3>;
			nvidia,dc-or-node = "/host1x/sor1";
		};
		nvdisplay@15220000 {
			status = "okay";
			win-mask = <0x20>;
			nvidia,fb-win = <0x5>;
			nvidia,dc-or-node = "/host1x/sor";
			/delete-property/ vdd-dp-pwr-supply;
			/delete-property/ avdd-dp-pll-supply;
			/delete-property/ vdd-edp-sec-mode-supply;
			/delete-property/ vdd-dp-pad-supply;
			/delete-property/ vdd_hdmi_5v0-supply;
			avdd_hdmi-supply = <&spmic_ldo7>;
			avdd_hdmi_pll-supply = <&spmic_sd2>;
			vdd_hdmi_5v0-supply = <&vdd_hdmi>;
		};

		dsi {
			status = "okay";
			nvidia,active-panel = <&panel_s_wuxga_8_0>;
			panel-s-wuxga-8-0 {
				bootloader-status = "disabled";
				status = "okay";
			};
		};

		sor {
			status = "okay";
			nvidia,active-panel = <&sor0_hdmi_display>;
			dp-display {
				bootloader-status = "disabled";
				status = "disabled";
			};
			hdmi-display {
				status = "okay";
			};
		};

		sor1 {
			status = "okay";
			nvidia,active-panel = <&sor1_hdmi_display>;
			dp-display {
				bootloader-status = "disabled";
				status = "disabled";
			};
			hdmi-display {
				status = "okay";
			};
		};

		dpaux@155c0000 {
			status = "okay";
		};
	};

	i2c@3160000 {
		e3320_tca_gpio: tca9539@75 {
			compatible = "ti,tca9539";
			status = "okay";
			reg = <0x75>;
			gpio-controller;
			#gpio-cells = <2>;
			vcc-supply = <&battery_reg>;
			5v0_hdmi_en {
				gpio-hog;
				gpios = <14 0>;
				output-high;
				label = "hdmi_en";
			};
		};

		gpio_i2c_0_21: gpio@21 {
			compatible = "ti,tca6408";
			status = "okay";
			reg = <0x21>;
			gpio-controller;
			#gpio-cells = <2>;
			vcc-supply = <&battery_reg>;
			vpp-vmm-rails {
				gpio-hog;
				gpios = <2 0 3 0>;
				output-high;
				label = "vmm-en-rail", "vmm-en-rail";
			};
		};

		tps65132@3e {
			reg = <0x3e>;
			compatible = "ti,tps65132";
			status = "okay";
			outp {
				ti,enable-gpio = <&gpio_i2c_0_77 4 0>;
				/* WAR: remove the constrains due to bug 200479061 */
				/delete-property/ regulator-min-microvolt;
				/delete-property/ regulator-max-microvolt;
			};

			outn {
				delete-target-property = "ti,disable-active-discharge";
				ti,enable-gpio = <&gpio_i2c_0_21 2 0>;
				ti,active-discharge-gpio = <&gpio_i2c_0_21 3 0>;
				ti,active-discharge-time = <2000>; /* in us */
				/* WAR: remove the constrains due to bug 200479061 */
				/delete-property/ regulator-min-microvolt;
				/delete-property/ regulator-max-microvolt;
			};
		};

		lp8557-backlight-s-wuxga-8-0@2c {
			status = "okay";
		};
	};

	fixed-regulators {
		regulator@10 {
			gpio = <&gpio_i2c_0_21 0 0>;
		};
	};

	plugin-manager {
		/delete-node/ fragment-e3320-dp;
	};
};

Why does #define OF_DC_DEBUG cause compile errors? Really disappointed in your code, really need to debug what is happening in the module to get my mipi dsi display to work.

of_dc.c: In function ‘parse_disp_default_out’:
/home/tbuckley/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/sources/kernel/nvidia/drivers/video/tegra/dc/of_dc.c:578:31: error: ‘default_out’ undeclared (first use in this function); did you mean ‘default_cmu’?
OF_DC_LOG(“out_width %d\n”, default_out->width);
^
./include/linux/printk.h:294:34: note: in definition of macro ‘pr_info’
printk(KERN_INFO pr_fmt(fmt), ##VA_ARGS)
^~~~~~~~~~~
/home/tbuckley/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/sources/kernel/nvidia/drivers/video/tegra/dc/of_dc.c:578:3: note: in expansion of macro ‘OF_DC_LOG’
OF_DC_LOG(“out_width %d\n”, default_out->width);
^~~~~~~~~
/home/tbuckley/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/sources/kernel/nvidia/drivers/video/tegra/dc/of_dc.c:578:31: note: each undeclared identifier is reported only once for each function it appears in
OF_DC_LOG(“out_width %d\n”, default_out->width);
^
./include/linux/printk.h:294:34: note: in definition of macro ‘pr_info’
printk(KERN_INFO pr_fmt(fmt), ##VA_ARGS)
^~~~~~~~~~~

Need information/documentation on using tegra drivers to send dsi commands to my device.

Hi,

The OF_DC_LOG is not in use so has some issues.

I just made a patch to fix it.

diff --git a/drivers/video/tegra/dc/of_dc.c b/drivers/video/tegra/dc/of_dc.c
index a905381..64c92ed 100644
--- a/drivers/video/tegra/dc/of_dc.c
+++ b/drivers/video/tegra/dc/of_dc.c
@@ -574,11 +574,11 @@ static int parse_disp_default_out(struct platform_device *ndev,
 	 */
 	if (!of_property_read_u32(out_np, "nvidia,out-width", &temp)) {
 		pdata->default_out->width = (unsigned) temp;
-		OF_DC_LOG("out_width %d\n", default_out->width);
+		OF_DC_LOG("out_width %d\n", pdata->default_out->width);
 	}
 	if (!of_property_read_u32(out_np, "nvidia,out-height", &temp)) {
 		pdata->default_out->height = (unsigned) temp;
-		OF_DC_LOG("out_height %d\n", default_out->height);
+		OF_DC_LOG("out_height %d\n", pdata->default_out->height);
 	}
 	if (!of_property_read_u32(out_np, "nvidia,out-rotation", &temp)) {
 		pdata->default_out->rotation = (unsigned) temp;
@@ -650,7 +650,7 @@ static int parse_disp_default_out(struct platform_device *ndev,
 
 	if (!of_property_read_u32(out_np, "nvidia,out-hdcp-policy", &temp)) {
 		pdata->default_out->hdcp_policy = (unsigned)temp;
-		OF_DC_LOG("hdcp_policy = %u\n", default_out->hdcp_policy);
+		OF_DC_LOG("hdcp_policy = %u\n", pdata->default_out->hdcp_policy);
 	} else {
 		pdata->default_out->hdcp_policy =
 #if defined(CONFIG_ANDROID)
@@ -2949,7 +2949,7 @@ struct tegra_dc_platform_data *of_dc_parse_platform_data(
 
 	if (!of_property_read_u32(np, "nvidia,fbmem-size", &temp)) {
 		pdata->fb->fbmem_size = temp;
-		OF_DC_LOG("fbmem size %u\n", pdata->fb->fbmem_size);
+		OF_DC_LOG("fbmem size %zu\n", pdata->fb->fbmem_size);
 	}
 
 	if (!of_property_read_u32(np, "nvidia,fb-flags", &temp)) {
-- 
2.7.4

However, this should not block your development. If you hit any further issue in OF_DC_LOG again, just use printk directly to check the variable you care at this moment.

what is the proper way to use trace_display_writel and trace_display_readl

also found this is very helpful

Please download the old rel-28 source code and check the file “nvidia,tegra210-dsi.txt” at this moment.

The file was missing on k4.9 and we are adding it back.