DART-MX8M Display: Difference between revisions

From Variscite Wiki
 
(21 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{PageHeader|DART-MX8M Display}} {{DocImage|category1=Yocto|category2=DART-MX8M}}__toc__
{{INIT_RELEASE_PARAM|RELEASE_SUMO_V1.0_DART-MX8M}}<!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:Debian_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|DART-MX8M Display}} {{DocImage|category1=Yocto|category2=DART-MX8M}}__toc__
 
= Introduction =
= Introduction =
== MIPI-DSI, LVDS and HDMI ==
== MIPI-DSI, LVDS and HDMI ==
I.MX8M supports MIPI-DSI and HDMI displays. DART-MX8M can be optionally equipped with SN65DSI84 MIPI-DSI to LVDS bridge.<br>
i.MX8M supports MIPI-DSI, HDMI and DP displays. DART-MX8M can be optionally equipped with SN65DSI84 MIPI-DSI to LVDS bridge.<br>
DART-MX8M carrier board comes with LVDS and HDMI connectors, so you can connect either LVDS or HDMI display.<br>
DART-MX8M carrier board comes with LVDS, HDMI and DP connectors, so you can connect LVDS, HDMI or DP display.<br>
Dual LVDS+HDMI display configuration is also supported.<br>
Dual LVDS+HDMI or LVDS+DP display configurations are also supported.<br>
Connecting MIPI-DSI display to DART-MX8M carrier board requires designing a custom connector.<br>
Connecting MIPI-DSI display to DART-MX8M carrier board requires designing a custom connector.<br>


== DCSS vs LCDIF ==
== DCSS vs LCDIF ==
i.MX8M comes with 2 display controllers: DCSS and LCDIF.<br>
i.MX8M comes with 2 display controllers: DCSS and LCDIF.<br>
DCCS can be connected to either HDMI or MIPI-DSI and supports resolutions up to 4K.<br>
DCCS can be connected to HDMI, DP or MIPI-DSI and supports resolutions up to 4K.<br>
LCDIF can be connected only to MIPI-DSI and supports resolutions up to 1080p.
LCDIF can be connected only to MIPI-DSI and supports resolutions up to 1080p.


{{#vardefine:DTB_PREFIX |{{#var:DTB_PREFIX | fsl-imx8mq-var-dart }}}}
= Selecting display configuration =
= Selecting display configuration =
Selecting display configuration is a matter of selecting an appropriate DTB file.<br>
Selecting display configuration is a matter of selecting an appropriate DTB file.<br>
All available DTB files are listed in the table below.<br>
All available DTB files are listed in the table below.<br>
 
{{#lst:Yocto_Platform_Customization|{{#var:FDT_TABLE_SECTION}}}}
{| class="wikitable"
|-
! scope="col" | DTB File Name<br/>
! scope="col" | Description<br/>
|-
| style="padding: 5px;"| imx8m-var-dart-emmc-wifi-hdmi.dtb
| style="padding: 5px;"| Device tree blob for eMMC, WIFI and HDMI display configuration. SD card disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-emmc-wifi-hdmi-4k.dtb
| style="padding: 5px;"| Device tree blob for eMMC, WIFI and HDMI 4K display configuration. SD card disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-emmc-wifi-dcss-lvds.dtb
| style="padding: 5px;"| Device tree blob for for eMMC, WIFI and DCSS LVDS display configuration. SD card disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-emmc-wifi-lcdif-lvds.dtb
| style="padding: 5px;"| Device tree blob for for eMMC, WIFI and LCDIF LVDS display configuration. SD card disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-emmc-wifi-dual-display.dtb
| style="padding: 5px;"| Device tree blob for for eMMC, WIFI and dual LVDS+HDMI display configuration. SD card disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-sd-emmc-hdmi.dtb
| style="padding: 5px;"| Device tree blob for SD, eMMC and HDMI display configuration. WIFI disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-sd-emmc-hdmi-4k.dtb
| style="padding: 5px;"| Device tree blob for SD, eMMC and HDMI 4K display configuration. WIFI disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-sd-emmc-dcss-lvds.dtb
| style="padding: 5px;"| Device tree blob for SD, eMMC and DCSS LVDS display configuration. WIFI disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-sd-emmc-lcdif-lvds.dtb
| style="padding: 5px;"| Device tree blob for SD, eMMC and LCDIF LVDS display configuration. WIFI disabled.
|-
| style="padding: 5px;"| imx8m-var-dart-sd-emmc-dual-display.dtb
| style="padding: 5px;"| Device tree blob for SD, eMMC and dual LVDS+HDMI display configuration. WIFI disabled.
|-
|}
<br>
<br>
{{#ifeq: {{#var:YOCTO_NAME}} | Morty |
File /boot/imx8m-var-dart.dtb is a symbolic link to the active DTB file. By default DCSS+LVDS display is used.<br>
File /boot/imx8m-var-dart.dtb is a symbolic link to the active DTB file. By default DCSS+LVDS display is used.<br>
For example, to select HDMI display in EMMC+WIFI configuration, run the following commands:
For example, to select HDMI display in EMMC+WIFI configuration, run the following commands:
Line 58: Line 29:
  # cd /boot
  # cd /boot
  # ln -fs imx8m-var-dart-emmc-wifi-hdmi.dtb imx8m-var-dart.dtb
  # ln -fs imx8m-var-dart-emmc-wifi-hdmi.dtb imx8m-var-dart.dtb
|{{#ifeq: {{#var:FSL_BSP_VERSION}} | L4.14.78-1.0.0_ga |
File /boot/{{#var:DTB_PREFIX}}.dtb is a symbolic link to the active DTB file. By default LVDS display is used.<br>
For example, to select HDMI display in EMMC+WIFI configuration, run the following commands:
# cd /boot
# ln -fs {{#var:DTB_PREFIX}}-emmc-wifi-hdmi.dtb {{#var:DTB_PREFIX}}.dtb
|
File /boot/{{#var:DTB_PREFIX}}.dtb is a symbolic link to the active DTB file. By default LVDS display is used.<br>
For example, to select HDMI display in WIFI configuration, run the following commands:


# cd /boot
# ln -fs {{#var:DTB_PREFIX}}-wifi-hdmi.dtb {{#var:DTB_PREFIX}}.dtb
}}
}}
Reboot is required for new configuration to take effect.
Reboot is required for new configuration to take effect.


= Setting HDMI display resolution =
= Setting HDMI display resolution =
{{#ifeq: {{#var:YOCTO_NAME}} | Morty |
The default HDMI display resolution is 1080P. This setting is passed to the Linux kernel via "video" command line parameter.
|{{#ifeq: {{#var:FSL_BSP_VERSION}} | L4.14.78-1.0.0_ga |
The default HDMI display resolution is 1080P. This setting is passed to the Linux kernel via "video" command line parameter.
The default HDMI display resolution is 1080P. This setting is passed to the Linux kernel via "video" command line parameter.
|
By default the maximum resolution supported by HDMI display is used.
}}
}}


To check the current resolution, use fbset command:
To check the current resolution, use fbset command:
Line 76: Line 67:
</pre>
</pre>


{{#ifeq: {{#var:YOCTO_NAME}} | Morty |
To modify HDMI display resolution use fw_setenv command to set "video" parameter in the u-boot environment.<br>
For example, to set 4K@60fps resolution, run
# fw_setenv video HDMI-A-1:3840x2160-32@60
|{{#ifeq: {{#var:FSL_BSP_VERSION}} | L4.14.78-1.0.0_ga |
To modify HDMI display resolution use fw_setenv command to set "video" parameter in the u-boot environment.<br>
To modify HDMI display resolution use fw_setenv command to set "video" parameter in the u-boot environment.<br>
For example, to set 4K@60fps resolution, run
For example, to set 4K@60fps resolution, run


  # fw_setenv video HDMI-A-1:3840x2160-32@60
  # fw_setenv video HDMI-A-1:3840x2160-32@60
|
To modify HDMI display resolution use fw_setenv command to set "video" kernel parameter.<br>
For example, to set 1080P@60fps resolution, run
# fw_setenv kernelargs video=HDMI-A-1:1920x1080-32@60
}}
}}


The setting will take effect after reboot.
The setting will take effect after reboot.
{{#ifeq: {{#var:FSL_BSP_VERSION}} | L4.14.98-2.0.0_ga |
= Setting DP display resolution =
By default the maximum resolution supported by DP display is used.
To modify DP display resolution use fw_setenv command to set "video" kernel parameter.<br>
For example, to set 1080P@60fps resolution, run
# fw_setenv kernelargs video=DP-1:1920x1080-32@60
}}


= Setting Weston desktop resolution =
= Setting Weston desktop resolution =
The default Weston desktop resolution is 1080P. This setting is independent of actual display resolution.<br>
The default Weston desktop resolution is 1080P. This setting is independent of actual display resolution.<br>
{{#ifeq: {{#var:YOCTO_NAME}} | Morty |
To modify Weston resolution, edit /etc/default/weston and set DESKTOP_SHELL_WINDOW parameter.<br>
To modify Weston resolution, edit /etc/default/weston and set DESKTOP_SHELL_WINDOW parameter.<br>
For example, to set 4K resolution
For example, to set 4K resolution


  DESKTOP_SHELL_WINDOW=3840x2160
  DESKTOP_SHELL_WINDOW=3840x2160
|
To modify Weston resolution, edit /etc/xdg/weston/weston.ini and set size parameter in shell section.<br>
For example, to set 4K resolution


[shell]
size=3840x2160
}}
For new setting to take effect restart weston by running
For new setting to take effect restart weston by running


Line 98: Line 120:
To play video on HDMI display the following command can be used:
To play video on HDMI display the following command can be used:


  # gplay-1.0 --video-sink=kmssink video.mp4
  # {{#var: GPLAY_KMSSINK_CMD | gplay-1.0 --video-sink=kmssink video.mp4 }}


To play video on LVDS display the following command can be used:
To play video on LVDS display the following command can be used:


  # gplay-1.0 --video-sink=waylandsink video.mp4
# gplay-1.0 --video-sink=waylandsink video.mp4
 
= Adding custom LVDS panel =
DART-MX8M evaluation kit comes with 800x480 LCD panel. DART-MX8M DTS files were created with this panel in mind.
To support your custom LVDS panel, you should make several modifications
 
{{#ifeq: {{#var:YOCTO_NAME}} | Morty |
== Adding panel definitions to panel driver ==
The following code snippets define Variscite panel in drivers/gpu/drm/panel/panel-simple.c in Linux kernel source:
 
<pre>
static const struct drm_display_mode sgd_gktw70sdae4sd_mode = {
.clock = 29250,
.hdisplay = 800,
.hsync_start = 800 + 40,
.hsync_end = 800 + 40 + 48,
.htotal = 800 + 40 + 48 + 40,
.vdisplay = 480,
.vsync_start = 480 + 23,
.vsync_end = 480 + 23 + 3,
.vtotal = 480 + 23 + 3 + 39,
.vrefresh = 60,
.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
};
 
static const struct panel_desc_dsi sgd_gktw70sdae4sd = {
.desc = {
.modes = &sgd_gktw70sdae4sd_mode,
.num_modes = 1,
.bpc = 8,
.size = {
.width = 154,
.height = 87,
},
.bus_flags = DRM_BUS_FLAG_DE_LOW,
},
.flags = MIPI_DSI_MODE_VIDEO,
.format = MIPI_DSI_FMT_RGB888,
.lanes = 4,
};
 
static const struct of_device_id dsi_of_match[] = {
...
}, {
.compatible = "sgd,gktw70sdae4sd",
.data = &sgd_gktw70sdae4sd
}, {
/* sentinel */
}
};
</pre>
 
You should add definitions of your panel and rebuild the kernel.
 
== Referencing custom panel in the DTS file ==
The following code references Variscite panel in arch/arm64/boot/dts/variscite/imx8m-var-dart-common.dtsi under kernel source tree
 
<pre>
&mipi_dsi_bridge {
...
panel@0 {
                reg = <0>;
                status = "okay";
                compatible = "sgd,gktw70sdae4sd";
                backlight = <&backlight>;
dsi-lanes = <4>;
panel-width-mm  = <154>;
panel-height-mm = <87>;
 
port {
panel_in: endpoint {
remote-endpoint = <&mipi_dsi_bridge_out>;
};
};
};
        ...
};
</pre>
 
You should modify "compatible", "dsi-lanes", "panel-width-mm" and "panel-height-mm" properties to match your panel and rebuild DTB files.
 
== Configuring MIPI-DSI to LVDS bridge ==
MIPI-DSI to LVDS bridge configuration in arch/arm64/boot/dts/variscite/imx8m-var-dart-common.dtsi matches Variscite panel:
 
<pre>
dsi_lvds_bridge: sn65dsi84@2c {
        ...
sn65dsi84,addresses = < 0x09 0x0A 0x0B 0x0D 0x10 0x11 0x12 0x13
0x18 0x19 0x1A 0x1B 0x20 0x21 0x22 0x23
0x24 0x25 0x26 0x27 0x28 0x29 0x2A 0x2B
0x2C 0x2D 0x2E 0x2F 0x30 0x31 0x32 0x33
0x34 0x35 0x36 0x37 0x38 0x39 0x3A 0x3B
0x3C 0x3D 0x3E 0x0D>;
 
sn65dsi84,values =    < 0x00 0x01 0x10 0x00 0x26 0x00 0x11 0x00
0x7a 0x00 0x03 0x00 0x20 0x03 0x00 0x00
0x00 0x00 0x00 0x00 0x21 0x00 0x00 0x00
0x30 0x00 0x00 0x00 0x03 0x00 0x00 0x00
0x28 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x01>;
};
};
</pre>
 
Use TI DSI Tuner application http://www.ti.com/tool/DSI-TUNER to generate bridge configuration for your panel and rebuild DTB files.<br>
Documentation on MIPI-DSI to LVDS bridge is available here: http://www.ti.com/product/sn65dsi84
|
The following code references Variscite panel in arch/arm64/boot/dts/freescale/{{#var:DTB_PREFIX}}-common.dtsi under kernel source tree
 
{{#ifeq: {{#var:KERNEL_USE_COMMUNITY_DRV_SN65DSI83}}|true|
<pre>
&panel_lvds {
compatible = "panel-lvds";
data-mapping = "jeida-24";
width-mm = <154>;
height-mm = <87>;
 
panel-timing {
clock-frequency = <39000000>;
hactive = <800>;
vactive = <480>;
hback-porch = <40>;
hfront-porch = <40>;
vback-porch = <29>;
vfront-porch = <13>;
hsync-len = <48>;
vsync-len = <3>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
</pre>
 
You should modify the "data-mapping", "width-mm", "height-mm" and "display-timings" properties to match your panel specification and rebuild the DTB file.
|
<pre>
dsi_lvds_bridge: sn65dsi84@2c {
compatible = "ti,sn65dsi83";
reg = <0x2c>;
ti,dsi-lanes = <1>;
ti,lvds-format = <1>;
ti,lvds-bpp = <24>;
ti,width-mm = <154>;
ti,height-mm = <87>;
enable-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds>;
status = "okay";
 
display-timings {
lvds {
clock-frequency = <33000000>;
hactive = <800>;
vactive = <480>;
hback-porch = <40>;
hfront-porch = <40>;
vback-porch = <29>;
vfront-porch = <13>;
hsync-len = <48>;
vsync-len = <3>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
        ...
        };
</pre>
 
You should modify "ti,dsi-lanes", "ti,lvds-format", "ti,lvds-bpp", "ti,width-mm", "ti,height-mm" and "display-timings" properties to match your panel specification and rebuild the DTB file.<br>
To support dual channel LVDS panel, please add "ti,lvds-channels = <2>"property. Also, for dual channel LVDS panels clock frequency and horizontal parameters mentioned in panel datasheet should be doubled.
}}
}}

Latest revision as of 00:26, 14 March 2024

Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release RELEASE_SUMO_V1.0_DART-MX8M.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release
DART-MX8M Display

Introduction

MIPI-DSI, LVDS and HDMI

i.MX8M supports MIPI-DSI, HDMI and DP displays. DART-MX8M can be optionally equipped with SN65DSI84 MIPI-DSI to LVDS bridge.
DART-MX8M carrier board comes with LVDS, HDMI and DP connectors, so you can connect LVDS, HDMI or DP display.
Dual LVDS+HDMI or LVDS+DP display configurations are also supported.
Connecting MIPI-DSI display to DART-MX8M carrier board requires designing a custom connector.

DCSS vs LCDIF

i.MX8M comes with 2 display controllers: DCSS and LCDIF.
DCCS can be connected to HDMI, DP or MIPI-DSI and supports resolutions up to 4K.
LCDIF can be connected only to MIPI-DSI and supports resolutions up to 1080p.


Selecting display configuration

Selecting display configuration is a matter of selecting an appropriate DTB file.
All available DTB files are listed in the table below.

DTB File Name
Description
fsl-imx8mq-var-dart-emmc-wifi-hdmi.dtb Device tree blob for eMMC, WIFI and HDMI display configuration. SD card disabled.
fsl-imx8mq-var-dart-emmc-wifi-lvds.dtb Device tree blob for eMMC, WIFI and LVDS display configuration. SD card disabled.
fsl-imx8mq-var-dart-emmc-wifi-dual-display.dtb Device tree blob for eMMC, WIFI and dual LVDS+HDMI display configuration. SD card disabled.
fsl-imx8mq-var-dart-sd-emmc-hdmi.dtb Device tree blob for SD, eMMC and HDMI display configuration. WIFI disabled.
fsl-imx8mq-var-dart-sd-emmc-lvds.dtb Device tree blob for SD, eMMC and LVDS display configuration. WIFI disabled.
fsl-imx8mq-var-dart-sd-emmc-dual-display.dtb Device tree blob for SD, eMMC and dual LVDS+HDMI display configuration. WIFI disabled.


File /boot/fsl-imx8mq-var-dart.dtb is a symbolic link to the active DTB file. By default LVDS display is used.
For example, to select HDMI display in WIFI configuration, run the following commands:

# cd /boot
# ln -fs fsl-imx8mq-var-dart-wifi-hdmi.dtb fsl-imx8mq-var-dart.dtb

Reboot is required for new configuration to take effect.

Setting HDMI display resolution

By default the maximum resolution supported by HDMI display is used.

To check the current resolution, use fbset command:

root@imx8m-var-dart:~# fbset

mode "1920x1080"
    geometry 1920 1080 1920 1080 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode

To modify HDMI display resolution use fw_setenv command to set "video" kernel parameter.
For example, to set 1080P@60fps resolution, run

# fw_setenv kernelargs video=HDMI-A-1:1920x1080-32@60

The setting will take effect after reboot.


Setting Weston desktop resolution

The default Weston desktop resolution is 1080P. This setting is independent of actual display resolution.
To modify Weston resolution, edit /etc/xdg/weston/weston.ini and set size parameter in shell section.
For example, to set 4K resolution

[shell]
size=3840x2160

For new setting to take effect restart weston by running

# systemctl restart weston

Dual display configuration

In dual display configuration Weston desktop is running on LVDS display and HDMI display is blank.
To play video on HDMI display the following command can be used:

# gplay-1.0 --video-sink=kmssink video.mp4

To play video on LVDS display the following command can be used:

# gplay-1.0 --video-sink=waylandsink video.mp4

Adding custom LVDS panel

DART-MX8M evaluation kit comes with 800x480 LCD panel. DART-MX8M DTS files were created with this panel in mind. To support your custom LVDS panel, you should make several modifications

The following code references Variscite panel in arch/arm64/boot/dts/freescale/fsl-imx8mq-var-dart-common.dtsi under kernel source tree

	dsi_lvds_bridge: sn65dsi84@2c {
		compatible = "ti,sn65dsi83";
		reg = <0x2c>;
		ti,dsi-lanes = <1>;
		ti,lvds-format = <1>;
		ti,lvds-bpp = <24>;
		ti,width-mm = <154>;
		ti,height-mm = <87>;
		enable-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lvds>;
		status = "okay";

		display-timings {
			lvds {
				clock-frequency = <33000000>;
				hactive = <800>;
				vactive = <480>;
				hback-porch = <40>;
				hfront-porch = <40>;
				vback-porch = <29>;
				vfront-porch = <13>;
				hsync-len = <48>;
				vsync-len = <3>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <1>;
				pixelclk-active = <0>;
			};
		};
        ...
        };

You should modify "ti,dsi-lanes", "ti,lvds-format", "ti,lvds-bpp", "ti,width-mm", "ti,height-mm" and "display-timings" properties to match your panel specification and rebuild the DTB file.
To support dual channel LVDS panel, please add "ti,lvds-channels = <2>"property. Also, for dual channel LVDS panels clock frequency and horizontal parameters mentioned in panel datasheet should be doubled.