DESK-MX8M-L/Peripherals/LVDS

From DAVE Developer's Wiki
< DESK-MX8M-L
Revision as of 15:59, 30 December 2021 by U0007 (talk | contribs) (Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
History
Version Issue Date Notes
1.0.0 Jan 2022 First DESK-MX8M release


Peripheral LVDS[edit | edit source]

Device tree configuration[edit | edit source]

Here below an example of device tree modification on standard DAVE's kit for the ORCA SOM:

From imx8mp-mito8mplus-cb1001.dts

	reg_lvds_en: regulator-lvds-en {
		compatible = "regulator-fixed";
		regulator-name = "lvds_enable";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lvds_enable>;
		gpio = <&gpio4 31 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	panel0: lvds0_panel {
		compatible = "avic,tm070ddh03";
		power-supply = <&reg_lvds_en>;

		backlight = <&lvds_backlight>;

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_panel_enable>;
		enable-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>, <&gpio4 2 GPIO_ACTIVE_HIGH>;

		port {
			panel_lvds_in: endpoint {
				remote-endpoint = <&lvds_out>;
			};
		};
	};
...
...
&ldb {
	status = "okay";

	lvds-channel@0 {
		fsl,data-mapping = "spwg";
		fsl,data-width = <24>;
		status = "okay";

		port@1 {
			reg = <1>;

			lvds_out: endpoint {
				remote-endpoint = <&panel_lvds_in>;
			};
		};
	};
};

&ldb_phy {
	status = "okay";
};
...
...
&iomuxc {
...
...
	pinctrl_panel_enable: panelgrp {
		fsl,pins = <
			MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01         0x19
			MX8MP_IOMUXC_SAI1_RXD0__GPIO4_IO02        0x19
		>;
	};

	pinctrl_lvds_enable: lvds_en {
		fsl,pins = <
			MX8MP_IOMUXC_SAI3_TXFS__GPIO4_IO31     0x19
		>;
	};

	pinctrl_vddbkl_enable: vddbkl_en {
		fsl,pins = <
			MX8MP_IOMUXC_GPIO1_IO08__GPIO1_IO08     0x19
		>;
	};

	pinctrl_bkl_enable: bkl_en {
		fsl,pins = <
			MX8MP_IOMUXC_GPIO1_IO09__GPIO1_IO09     0x19
		>;
	};
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    2.283274] [drm] Initialized vivante 1.0.0 20170808 for 40000000.mix_gpu_ml on minor 0
[    2.597328] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.608536] [drm] No driver support for vblank timestamp query.
[    2.608611] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    2.620086] imx-drm display-subsystem: bound imx-lcdifv3-crtc.1 (ops lcdifv3_crtc_ops)
[    2.634281] imx-drm display-subsystem: bound imx-lcdifv3-crtc.2 (ops lcdifv3_crtc_ops)
[    3.308628] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.315303] [drm] No driver support for vblank timestamp query.
[    3.321287] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    3.329236] imx-drm display-subsystem: bound imx-lcdifv3-crtc.1 (ops lcdifv3_crtc_ops)
[    3.337202] imx-drm display-subsystem: bound imx-lcdifv3-crtc.2 (ops lcdifv3_crtc_ops)
[    3.345269] imx-drm display-subsystem: bound 32c00000.bus:ldb@32ec005c (ops imx8mp_ldb_ops)
[    3.375041] imx-drm display-subsystem: bound 32fd8000.hdmi (ops dw_hdmi_imx_ops)
[    3.383378] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
[    3.673870] imx-drm display-subsystem: fb0: imx-drmdrmfb frame buffer device
...
...

DRM access[edit | edit source]

DRM framework can be accessed using the modetest DRM utility.

root@desk-mx8mp:~# modetest
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...failed
trying to open device 'msm'...failed
trying to open device 'sti'...failed
trying to open device 'tegra'...failed
trying to open device 'imx-drm'...done
Encoders:
id      crtc    type    possible crtcs  possible clones
40      36      LVDS    0x00000002      0xffffffff
41      0       TMDS    0x00000004      0x00000000

Connectors:
id      encoder status          name            size (mm)       modes   encoders
42      40      connected       LVDS-1          154x90          1       40
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  #0 1024x600 59.99 1024 1184 1188 1344 600 617 618 635 51200 flags: ; type: preferred, driver
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0
        5 link-status:
                flags: enum
                enums: Good=0 Bad=1
                value: 0
        6 non-desktop:
                flags: immutable range
                values: 0 1
                value: 0
        4 TILE:
                flags: immutable blob
                blobs:

                value:
43      0       disconnected    HDMI-A-1        0x0             0       41
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0
        5 link-status:
                flags: enum
                enums: Good=0 Bad=1
                value: 0
        6 non-desktop:
                flags: immutable range
                values: 0 1
                value: 0
        4 TILE:
                flags: immutable blob
                blobs:

                value:

CRTCs:
id      fb      pos     size
33      0       (0,0)   (0x0)
  #0  nan 0 0 0 0 0 0 0 0 0 flags: ; type:
  props:
        24 VRR_ENABLED:
                flags: range
                values: 0 1
                value: 0
36      47      (0,0)   (1024x600)
  #0 1024x600 59.99 1024 1184 1188 1344 600 617 618 635 51200 flags: ; type: preferred, driver
  props:
        24 VRR_ENABLED:
                flags: range
                values: 0 1
                value: 0
39      0       (0,0)   (0x0)
  #0  nan 0 0 0 0 0 0 0 0 0 flags: ; type:
  props:
        24 VRR_ENABLED:
                flags: range
                values: 0 1
                value: 0

Planes:
id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
31      0       0       0,0             0,0     0               0x00000001
  formats: XR24 AR24 RG16 XB24 AB24 AR15 XR15
  props:
        8 type:
                flags: immutable enum
                enums: Overlay=0 Primary=1 Cursor=2
                value: 1
        32 zpos:
                flags: immutable range
                values: 0 0
                value: 0
34      36      47      0,0             0,0     0               0x00000002
  formats: XR24 AR24 RG16 XB24 AB24 AR15 XR15
  props:
        8 type:
                flags: immutable enum
                enums: Overlay=0 Primary=1 Cursor=2
                value: 1
        35 zpos:
                flags: immutable range
                values: 0 0
                value: 0
37      0       0       0,0             0,0     0               0x00000004
  formats: XR24 AR24 RG16 XB24 AB24 AR15 XR15
  props:
        8 type:
                flags: immutable enum
                enums: Overlay=0 Primary=1 Cursor=2
                value: 1
        38 zpos:
                flags: immutable range
                values: 0 0
                value: 0

Frame buffers:
id      size    pitch

root@desk-mx8mp:~#

Additional information[edit | edit source]

For some information on DRM/KMS framework, see the STM DRM overview presentation.