MX8 Display: Difference between revisions

From Variscite Wiki
No edit summary
(Add Debian Platform Customization)
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX8X as default
<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX8X as default
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!--
--> {{INIT_RELEASE_PARAM|RELEASE_SUMO_V1.0_VAR-SOM-MX8X}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_SUMO_V1.0_VAR-SOM-MX8X}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|{{#var:HARDWARE_NAME}} Display}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}}__toc__
--> {{#lst:Debian_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|{{#var:HARDWARE_NAME}} Display}} {{DocImage|category1=Yocto|category2=Debian}} [[Category:{{#var:HARDWARE_NAME}}]] __toc__


{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8|
{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8|
{{#varexists:DTB_PREFIX | | {{#vardefine:DTB_PREFIX|fsl-imx8qm-var-som}} }}
{{#varexists:DTB_PREFIX_SP8 | | {{#vardefine:DTB_PREFIX_SP8|fsl-imx8qm-var-spear}} }}
<!-- Create device trees for QP -->
{{#vardefine:DTB_PREFIX_QP|{{#replace:{{#var:DTB_PREFIX}}|imx8qm|imx8qp}}}}
{{#vardefine:DTB_PREFIX_SP8_QP|{{#replace:{{#var:DTB_PREFIX_SP8}}|imx8qm|imx8qp}}}}


= Selecting display type =
= Selecting display type =
VAR-SOM-MX8 supports DP, HDMI and LVDS displays. DP and HDMI require Variscite extension boards VAR-EXT-DP and VAR-EXT-HDMI.<br>
VAR-SOM-MX8 and SPEAR-MX8 support DP, HDMI and LVDS displays. To use DP and HDMI on VAR-SOM-MX8 carrier board one should attach Variscite extension boards VAR-EXT-DP and VAR-EXT-HDMI respectively.<br>
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.
 
{{#lst:Yocto_Platform_Customization|{{#var:FDT_TABLE_SECTION}}}}
On VAR-SOM-MX8 /boot/{{#var:DTB_PREFIX}}.dtb is a symbolic link to the active dtb file. By default it points to LVDS dtb.<br>
<br>
To select HDMI display, run the following commands:
File /boot/fsl-imx8qm-var-som.dtb is a symbolic link to the active DTB file. By default LVDS display is used.<br>
 
For example, to select HDMI display, run the following commands:
# cd /boot
# ln -fs {{#var:DTB_PREFIX}}-hdmi.dtb {{#var:DTB_PREFIX}}.dtb
# ln -fs {{#var:DTB_PREFIX_QP}}-hdmi.dtb {{#var:DTB_PREFIX_QP}}.dtb (For i.MX8QP SoC)
 
To select DP display, run the following commands:
 
# cd /boot
# ln -fs {{#var:DTB_PREFIX}}-dp.dtb {{#var:DTB_PREFIX}}.dtb
# ln -fs {{#var:DTB_PREFIX_QP}}-dp.dtb {{#var:DTB_PREFIX_QP}}.dtb (For i.MX8QP SoC)
 
On SPEAR-MX8 /boot/{{#var:DTB_PREFIX_SP8}}.dtb is a symbolic link to the active dtb file. By default it points to LVDS dtb.<br>
To select HDMI display, run the following commands:


  # cd /boot
  # cd /boot
  # ln -fs fsl-imx8qm-var-som-hdmi.dtb fsl-imx8qm-var-som.dtb
  # ln -fs {{#var:DTB_PREFIX_SP8}}-hdmi.dtb {{#var:DTB_PREFIX_SP8}}.dtb
# ln -fs {{#var:DTB_PREFIX_SP8_QP}}-hdmi.dtb {{#var:DTB_PREFIX_SP8_QP}}.dtb (For i.MX8QP SoC)
 
To select DP display, run the following commands:
 
# cd /boot
# ln -fs {{#var:DTB_PREFIX_SP8}}-dp.dtb {{#var:DTB_PREFIX_SP8}}.dtb
# ln -fs {{#var:DTB_PREFIX_SP8_QP}}-dp.dtb {{#var:DTB_PREFIX_SP8_QP}}.dtb (For i.MX8QP SoC)


The change will be effective after reboot.<br>
The change will be effective after reboot.<br>


= Loading HDMI and DP firmware =
= Loading HDMI and DP firmware =
HDMI and DP displays require appropriate firmware to be loaded by u-boot. The firmware files are installed under /boot.<br>
HDMI and DP displays require appropriate firmware to be loaded by U-Boot. The firmware files are installed under /boot.<br>
The HDMI display firmware blob is hdmitxfw.bin, the DP firmware blob is dpfw.bin. U-Boot environment variable hdp_file selects the blob.<br>
The HDMI display firmware blob is hdmitxfw.bin, the DP firmware blob is dpfw.bin. U-Boot environment variable hdp_file selects the blob.<br>
By default HDMI firmware is loaded. To switch to DP firmware run the following command:
By default HDMI firmware is being loaded. To switch to DP firmware, run the following command:


  # fw_setenv hdp_file dpfw.bin
  # fw_setenv hdp_file dpfw.bin
Line 29: Line 55:
The change will be effective after reboot.<br>
The change will be effective after reboot.<br>


{{Note|Both firmware blob and DTB file should be set before rebooting the system, otherwise the boot process will be stuck.}}
{{Note|Both firmware blob and dtb file should be set before rebooting the system, otherwise the boot process will get stuck.}}


= Setting HDMI and DP resolution =
= Setting HDMI and DP resolution =


By default the maximum resolution supported by HDMI/DP display is used.<br>
By default the maximum resolution supported by HDMI/DP display is being used.<br>
To check the current resolution, run fbset command.
To check the current resolution, run fbset command.
<pre>
<pre>
Line 59: Line 85:
= LVDS =
= LVDS =
{{#var:HARDWARE_NAME}} supports one dual-channel LVDS interface.<br>
{{#var:HARDWARE_NAME}} supports one dual-channel LVDS interface.<br>
Variscite {{#var:HARDWARE_NAME}} evaluation kit comes with two LVDS connectors, one connector per LVDS channel.<br>
{{#var:HARDWARE_NAME}} evaluation kit comes with two LVDS connectors, one connector per LVDS channel.<br>
By default Variscite panel is attached to LVDS#A connector.<br>
By default Variscite panel is attached to LVDS#A connector.<br>


Line 67: Line 93:
To support different LVDS panel, several modifications may be required.
To support different LVDS panel, several modifications may be required.


The following code configures LVDS panel in arch/arm64/boot/dts/freescale/{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8X|fsl-imx8qxp-var-som-common.dtsi|fsl-imx8qm-var-som-lvds.dtsi}} under kernel source tree
{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8X|
The following code configures LVDS panel in arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-som-common.dtsi under kernel source tree:


{{#ifeq: {{#var:HARDWARE_NAME}}|VAR-SOM-MX8X|
<pre>
<pre>
&ldb1_phy {
&ldb1_phy {
Line 103: Line 129:
</pre>
</pre>
|
|
On VAR-SOM-MX8 LVDS panel is configured in arch/arm64/boot/dts/freescale/{{#var:DTB_PREFIX}}-lvds.dtsi <br>
On SPEAR-MX8 LVDS panel is configured in arch/arm64/boot/dts/freescale/{{#var:DTB_PREFIX_SP8}}-lvds.dtsi
<pre>
<pre>
&ldb1_phy {
&ldb1_phy {
Line 143: Line 171:
The default Weston uses maximum resolution supported by display.<br>
The default Weston uses maximum resolution supported by display.<br>
To modify Weston resolution, edit /etc/xdg/weston/weston.ini and set size parameter in shell section.<br>
To modify Weston resolution, edit /etc/xdg/weston/weston.ini and set size parameter in shell section.<br>
For example, to set 1080P resolution
For example:


  [shell]
  [shell]

Latest revision as of 15:15, 6 June 2023

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

This page is using the default release RELEASE_SUMO_V1.0_VAR-SOM-MX8X.
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
VAR-SOM-MX8X Display


LVDS

VAR-SOM-MX8X supports one dual-channel LVDS interface.
VAR-SOM-MX8X evaluation kit comes with two LVDS connectors, one connector per LVDS channel.
By default Variscite panel is attached to LVDS#A connector.

Adding custom LVDS panel

VAR-SOM-MX8X evaluation kit comes with 800x480 LVDS panel.
VAR-SOM-MX8X DTS file was created with this panel in mind.
To support different LVDS panel, several modifications may be required.

The following code configures LVDS panel in arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-som-common.dtsi under kernel source tree:

&ldb1_phy {
	status = "ok";
};

&ldb1 {
	status = "ok";
	lvds-channel@0 {
		fsl,data-mapping = "jeida";
		fsl,data-width = <24>;
		status = "ok";

		display-timings {
			lvds {
				clock-frequency = <29232000>;
				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 may need to modify "fsl,data-mapping", "fsl,data-width" and "display-timings" properties to match your panel specification.
For more information see Documentation/devicetree/bindings/display/imx/ldb.txt in the kernel source tree.

Setting Weston Desktop Resolution

The default Weston uses maximum resolution supported by display.
To modify Weston resolution, edit /etc/xdg/weston/weston.ini and set size parameter in shell section.
For example:

[shell]
size=3840x2160

For new settings to take effect restart weston by running

# systemctl restart weston