DESK-MX9-L/Peripherals/LVDS

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2024/01/30 DESK-MX9-L-5.x.x 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 AURA SOM:

...
/ {
...
	regulators {
...
		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 10 GPIO_ACTIVE_HIGH>;
			enable-active-high;
		};
...
	};
...
	lvds_panel {
		compatible = "panel-lvds";
		power-supply = <&reg_lvds_en>;
		width-mm = <154>;
		height-mm = <87>;
		label = "am800480btmqw-tg0h-c";
		data-mapping = "vesa-24";
		status = "okay";

		panel-timing {
			clock-frequency = <35000000>;
			hactive = <800>;
			vactive = <480>;
			hback-porch = <88>;
			hfront-porch = <40>;
			vback-porch = <32>;
			vfront-porch = <13>;
			hsync-len = <48>;
			vsync-len = <3>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <1>;
		};

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

&lcdif {
	status = "okay";
	assigned-clock-rates = <498000000>, <71142857>, <400000000>, <133333333>;
};

&ldb {
	status = "okay";

	lvds-channel@0 {
		status = "okay";

		port@1 {
			reg = <1>;

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

&ldb_phy {
	status = "okay";
};
...
&iomuxc {
...
	pinctrl_lcd_3v3_enable: lcd_3v3_en {
		fsl,pins = <
			MX93_PAD_PDM_BIT_STREAM1__GPIO1_IO10	0x31e
		>;
	};
...
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

...
[    0.917991] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    1.714036] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    1.927160] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    1.935332] imx-drm display-subsystem: bound soc@0:ldb@4ac10020 (ops imx93_ldb_ops)
[    1.943254] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0
[    2.003273] imx-drm display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device
[    4.634721] systemd[1]: Starting Load Kernel Module drm...
...

DRM access[edit | edit source]

DRM framework can be accessed using the modetest DRM utility.

root@desk-mx93:~# modetest -M imx-drm
Encoders:
id      crtc    type    possible crtcs  possible clones
34      33      LVDS    0x00000001      0x00000001

Connectors:
id      encoder status          name            size (mm)       modes   encoders
35      34      connected       LVDS-1          154x87          1       34
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 800x480 67.92 800 840 888 976 480 493 496 528 35000 flags: nhsync, nvsync; 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:

CRTCs:
id      fb      pos     size
33      39      (0,0)   (800x480)
  #0 800x480 67.92 800 840 888 976 480 493 496 528 35000 flags: nhsync, nvsync; type: preferred, driver
  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      39      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

Frame buffers:
id      size    pitch

root@desk-mx93:~#

Additional information[edit | edit source]

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