DESK-MX8M-L/Peripherals/LVDS

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes

2021/12/30

First DESK-MX8M-L release

2023/02/24

DESK-MX8M-L-2.0.0 release
2023/08/22 DESK-MX8M-L-4.0.0 release


Peripheral LVDS[edit | edit source]

Device tree configuration[edit | edit source]

ORCA SOM[edit | edit source]

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

Example of definition aboud LVDS to HDMI convert from imx8mp-mito8mplus-cb1008.dts

...
...
	reg_lvds_en: regulator_lcd_3V3_en {
		compatible = "regulator-fixed";
		regulator-name = "lvds_enable";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lcd_3v3_enable>;
		gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-boot-on;
		regulator-always-on;
	};

	reg_vccbkl_en: regulator_lcd_5V_en {
		compatible = "regulator-fixed";
		regulator-name = "vddbkl_enable";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lcd_5v_enable>;
		gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-boot-on;
		regulator-always-on;
	};
...
...
&i2c6 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c6>;
	status = "okay";

	lvds_bridge: lvds-to-hdmi-bridge@4c {
		compatible = "ite,it6263";
		reg = <0x4c>;
		reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
		status = "okay";

		port {
			it6263_in: endpoint {
				remote-endpoint = <&lvds0_out>;
			};
		};
	};
};
...
...

&lcdif2 {
	status = "okay";
};
...
...
&ldb {
	status = "okay";

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

		port@1 {
			reg = <1>;

			lvds0_out: endpoint {
				remote-endpoint = <&it6263_in>;
			};
		};
	};
};
...
...
&ldb_phy {
	status = "okay";
};
...
...
&iomuxc {
	pinctrl_lcd_3v3_enable: lcd_3v3_en {
		fsl,pins = <
			MX8MP_IOMUXC_GPIO1_IO06__GPIO1_IO06		0x19
		>;
	};


	pinctrl_lcd_5v_enable: lcd_5v_en {
		fsl,pins = <
			MX8MP_IOMUXC_GPIO1_IO08__GPIO1_IO08		0x19
		>;
	};
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    1.487645] [drm] Initialized vivante 1.0.0 20170808 for 40000000.mix_gpu_ml on minor 0
[    2.443613] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    2.453352] imx-drm display-subsystem: bound imx-lcdifv3-crtc.1 (ops lcdifv3_crtc_ops)
[    2.461529] imx-drm display-subsystem: bound 32c00000.bus:ldb@32ec005c (ops imx8mp_ldb_ops)
[    2.469910] imx-drm display-subsystem: bound 32fd8000.hdmi (ops dw_hdmi_imx_ops)
[    2.477563] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
[    3.377095] imx-drm display-subsystem: [drm] 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 -M imx-drm
Encoders:
id	crtc	type	possible crtcs	possible clones	
37	33	LVDS	0x00000001	0x00000001
39	0	TMDS	0x00000002	0x00000002

Connectors:
id	encoder	status		name		size (mm)	modes	encoders
38	37	connected	HDMI-A-1       	340x190		2	37
  modes:
	index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #1 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  props:
	1 EDID:
		flags: immutable blob
		blobs:

		value:
			00ffffffffffff002074560100000000
			141f010380221378fe6435a5544f9e27
			125054bfea0061400101010101010101
			010101010101021900a050d015203020
			780059c21000001e000000fc00543038
			30410a20202020202020000000ff0030
			303030303030300a20202020000000fd
			00304b545413010a20202020202001c9
			020334f1461202030401132309070783
			01000067030c001000384467d85dc401
			448001681a00000109283ce6e50f0000
			0600e200ff0000000000000000000000
			00000000000000000000000000000000
			00000000000000000000000000000000
			00000000000000000000000000000000
			000000000000000000000000000000ca
	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:
40	0	disconnected	HDMI-A-2       	0x0		0	39
  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:
	41 max bpc:
		flags: range
		values: 8 16
		value: 0

CRTCs:
id	fb	pos	size
33	46	(0,0)	(1280x720)
  #0 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  props:
	24 VRR_ENABLED:
		flags: range
		values: 0 1
		value: 0
36	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	33	46	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	0	0	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

Frame buffers:
id	size	pitch

root@desk-mx8mp:~#

Additional information[edit | edit source]

For some information on DRM/KMS framework, see the DRM-KMS kernel documentation.