Activate dsi on jetson nano som

I have tried to activate the dsi firstly in bootloader. After that experiment me was clear, that I should do it in kernel at fist and then in bootloader. That order because bootloader has no known possibilities to recognize that display driver is loaded properly. In kernel I know the tool dmesg, which I have used with followed result on our board:

wlad@ubuntu:~$ dmesg | grep tegradc
[    0.439114] iommu: Adding device tegradc.0 to group 13
[    0.439165] platform tegradc.0: domain=ffffffc0f94ba018 allocates as[0]=ffffffc0f9404248
[    0.443344] platform tegradc.0: IOVA linear map 0x0000000092cb4000(800000)
[    0.443736] platform tegradc.0: IOVA linear map 0x00000000d7000000(19000000)
[    0.444084] iommu: Adding device tegradc.1 to group 14
[    0.444137] platform tegradc.1: domain=ffffffc0f94ba258 allocates as[0]=ffffffc0f94042b0
[    0.448285] platform tegradc.1: IOVA linear map 0x0000000092cb4000(800000)
[    0.448676] platform tegradc.1: IOVA linear map 0x00000000d7000000(19000000)
[    1.080052] tegradc tegradc.0: disp0 connected to head0->/host1x/sor1
[    1.080359] tegradc tegradc.0: DT parsed successfully
[    1.080408] tegradc tegradc.0: Display dc.ffffff800ab00000 registered with id=0
[    1.080960] tegradc tegradc.0: Bootloader disp_param detected. Detected mode: 1920x1080 (on 0x0mm) pclk=148350781
[    1.089043] tegradc tegradc.0: probed
[    1.102918] tegradc tegradc.0: fb registered
[    1.108993] tegradc tegradc.0: DC initialized, skipping tegra_dc_program_mode.
[    1.109019] tegradc tegradc.0: hdmi: tmds rate:148351K prod-setting:prod_c_hdmi_75m_150m
[    1.109425] tegradc tegradc.0: hdmi: get RGB quant from REG programmed by BL.
[    1.109434] tegradc tegradc.0: hdmi: get YCC quant from REG programmed by BL.
[    1.136002] tegradc tegradc.1: disp1 connected to head1->/host1x/dsi
[    1.136009] tegradc tegradc.1: tegra_dc_parse_panel_ops: could not find panel for /host1x/dsi
[    1.144624] tegradc tegradc.1: err:-19 parsing panel_ops
[    1.164782] tegradc tegradc.0: nominal-pclk:148351648 parent:148350781 div:1.0 pclk:148350781 146868084~161703244
[    1.269947] tegradc tegradc.0: blank - powerdown
[    1.336291] tegradc tegradc.0: unblank
[    1.373780] tegradc tegradc.0: nominal-pclk:148500000 parent:148500000 div:1.0 pclk:148500000 147015000~161865000
[    1.373832] tegradc tegradc.0: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_75m_150m
[    1.375111] tegradc tegradc.0: hdmi: get YCC quant from EDID.
[    1.425380] tegradc tegradc.0: sync windows ret = 246
[    1.473869] tegradc tegradc.0: hdmi: plugged
[    5.556624] tegradc tegradc.0: unblank

I have modified the followed file:
tegra210-porg-p3448-common.dtsi (22.3 KB)
and added the file:
densitron2.dtsi (3.2 KB)

The added file has no right initialization commands until now. What should I do regarding the dmesg:

tegra_dc_parse_panel_ops: could not find panel for /host1x/dsi

I use Kernel4.9. In that kernel I have activated Makros:
DRM_PANEL_JDI_LT070ME05000 (as module).

I will change the status to “okay” in the file densitron2.dtsi, sorry for the mistake!
After changing to “okay” the make command (make -C Linux_for_Tegra/source/public/kernel/kernel-4.9 ARCH=arm64 O=~/nvidia/nvidia_sdk/Linux_for_Tegra/build LOCALVERSION
=-tegra CROSS_COMPILE=/opt/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -j32) throws errors:

/home/wlad/nvidia/nvidia_sdk/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c: In function ‘nvkm_device_tegra_power_up’:
/home/wlad/nvidia/nvidia_sdk/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:56:8: error: implicit declaration of function ‘tegra_powergate_remove_clamping’; did you mean ‘tegra_pmc_cpu_remove_clamping’? [-Werror=implicit-function-declaration]
  ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D);
/home/wlad/nvidia/nvidia_sdk/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:56:40: error: ‘TEGRA_POWERGATE_3D’ undeclared (first use in this function); did you mean ‘TEGRA_POWERGATE_3D0’?
  ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D);
/home/wlad/nvidia/nvidia_sdk/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:56:40: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
/home/wlad/nvidia/nvidia_sdk/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/ recipe for target 'drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.o' failed

the above error is eliminated by Kernel Macro: TEGRA_SATA_IDLE_POWERGATE (only first basis macro to activate) and the question is the same:
What should I do regarding the dmesg:

tegra_dc_parse_panel_ops: could not find panel for /host1x/dsi

Parse panel is searching panel under the device tree.

You should read the driver code kernel/nvidia/drivers/video/tegra/dc/of_dc.c → tegra_dc_parse_panel_ops and see what is the exact thing this driver code is searching for. What you enabled (those DRM***) are not related to this dsi panel bring up either…

Thank you very much, for the help so far. The Display is working after this one will deactivated and activated in settings. I think that I should implement followed routine properly:


How can be done that in the bootloader?


We don’t support to add display in bootloader but only in kernel.

Please refer to the

And run your init cmd by adding

  • nvidia,dsi-init-cmd: panel required init command sequence.

I should of course say which bootloader: u-boot. Is it possible in that case to implement dsi in u-boot?

No experience about this. Maybe other users can share their experience.

Okay. How can then be done equivalent in NVidia-kernel4.9 :

	echo 168 > /sys/class/gpio/export
	sleep 1
	echo out > /sys/class/gpio/gpio168/direction
	echo 1 > /sys/class/gpio/gpio168/value
	#echo 0 > /sys/class/gpio/gpio168/value

I need this in order to switch backlight permanently on from beginning. I don’t know how to transform gpio168 to NVidia GPIO or Jetson Nano pin at SoM. Do yo have some information about this?

You can write a gpio hog inside the device tree and set this gpio to always-on.

yes I know, but I have to know to which port. I have tried to write high to TEGRA_GPIO(S, 0) but without success.

If you really “hog” the gpio, then /sys/kernel/debug/gpio will show it in use. You better check it is really get that configuration first.

If you are asking how to transform the pin to GPIO number, then check this table.

And calculate the number and add the offset. For example, if you are using Pin A08, then it is

TEGRA_GPIO_PORT_A 0 *8 + 8 =8. And add this 8 to another offset.

The offset will be shown inside /sys/kernel/debug/gpio

okay. After transforming I have got TEGRA_GPIO(V, 0) to activate. And this is done already but without improvement.
I have read in /sys/kernel/debug/gpio with “sudo cat /sys/kernel/debug/gpio”:

 gpio-168 (GPIO07              )
 gpio-169 (                    |tegra-panel-bl-enabl) out hi

is it means that I should have TEGRA_GPIO(V, 7) in device tree?

I am not sure what you are doing now. You should use your hardware to tell.
But not show me something and ask me if I should have TEGRA GPIO V7.

Honestly, I don’t know anything about your hardware and cannot answer.

You should check your hardware, see which pin is in use for your backlight, and check the pinmux spreadsheet and see what that gpio in A~Z group this pin belongs to… And then doing your calculation.

could you please explain via eg. a link what the meaning of “rsvd3” in pinmux-file

It means it could be used as GPIO.

and pwm0 ?

PWM means pulse width modulation. It means this pin is for SFIO and the function is PWM.

BTW, I don’t think PWM is related to your issue in enabling backlight. If you just want to know wht PWM stands for, then just check above comment.

But if you want to dig into PWM, then I think the direction would be wrong…

I understand it. But with this settings in pinmux-file, it works:

			lcd_bl_pwm_pv0 {
				nvidia,pins = "lcd_bl_pwm_pv0";
				nvidia,function = "pwm0";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;

any suggestions why it is so?
my modified files are:
densitron2.dtsi (15.7 KB)
tegra210-porg-p3448-common.dtsi (22.4 KB)
tegra210-porg-gpio-p3448-0002-b00.dtsi (2.0 KB)
tegra210-porg-pinmux-p3448-0002-b00.dtsi (38.1 KB)

Just want to say this again that, I am not your colleague. I don’t know anything about your intention or hardware design. It is a little pointless to just give me some dts and ask me whether this would work or not.

From the aspect that if you just want backlight work, then either pwm and gpio would work. You can think of PWM is more like a advanced function, which can let you adjust the brightness. While GPIO is just 0 and 1, it means you either see a totally blank screen, or you see the full brightness case.

If you set this pin to pwm and it worked, probably means you already assigned this pin to be controlled by the pwm driver.

My reason to say you don’t need to dig into PWM is because if you just want to control a backlight, then controlling GPIO is the easiest way and I don’t want you get into another difficulty (study pwm driver). However, if pwm works, then it is good.