DESK-MX8M-L/Peripherals/HDMI

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

2022/02/17

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
2024/04/11 DESK-MX8M-L-4.1.0 release


Peripheral HDMI[edit | edit source]

Device tree configuration[edit | edit source]

ORCA SOM[edit | edit source]

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

From imx8mp-mito8mplus-cb1001.dts:

...
...
	sound-hdmi {
		compatible = "fsl,imx-audio-cdnhdmi";
		model = "audio-hdmi";
		audio-cpu = <&aud2htx>;
		hdmi-out;
		constraint-rate = <44100>,
				<88200>,
				<176400>,
				<32000>,
				<48000>,
				<96000>,
				<192000>;
		status = "okay";
	};
...
...
&irqsteer_hdmi {
	status = "okay";
};

&hdmi_blk_ctrl {
	status = "okay";
};

&hdmi_pavi {
	status = "okay";
};

&hdmi {
	status = "okay";
};

&hdmiphy {
	status = "okay";
};

From imx8mp-mito8mplus.dtsi:


&iomuxc {
...
...
	pinctrl_hog: hoggrp {
		fsl,pins = <
			MX8MP_IOMUXC_HDMI_DDC_SCL__HDMIMIX_HDMI_SCL	0x400001c3
			MX8MP_IOMUXC_HDMI_DDC_SDA__HDMIMIX_HDMI_SDA	0x400001c3
			MX8MP_IOMUXC_HDMI_HPD__HDMIMIX_HDMI_HPD		0x40000019
			MX8MP_IOMUXC_HDMI_CEC__HDMIMIX_HDMI_CEC		0x40000019
		>;
	};
...
...
};

MITO 8M Mini[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the MITO 8M Mini SOM:

From imx8mm-mito8mmini.dtsi:

...
...
&i2c1 {
...
	mipi_to_lvds: sn65dsi83@2c {
		compatible = "ti,sn65dsi83";
		reg = <0x2c>;
		enable-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
		interrupts-extended = <&gpio1 5 GPIO_ACTIVE_HIGH>;
		clocks = <&mipi_dsi 0>, <&clk IMX8MM_CLK_LCDIF_PIXEL>;
		clock-names = "mipi_clk", "pixel_clock";
		display = <&display_subsystem>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c1_sn65dsi83>;
		sync-delay = <512>;
		dsi-lanes = <4>;
		status = "okay";

		lvds_ports: ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				lvds_in: endpoint {
					remote-endpoint = <&mipi_out>;
					data-lanes = <1 2 3 4>;
				};
			};
		};
	};
...
};

&lcdif {
	status = "okay";
};

&mipi_dsi {
	#clock-cells = <1>;
	status = "okay";

	port@1 {
		mipi_out: endpoint {
			remote-endpoint = <&lvds_in>;
			attach-bridge;
		};
	};
};

&vpu_g1 {
	status = "okay";
};

&vpu_g2 {
	status = "okay";
};

&vpu_h1 {
	status = "okay";
};

&gpu {
	status = "okay";
};
...
...

From imx8mm-mito8mmini-cb100a.dts :

...
&regulators {
	reg_lvds_pwr: lvds_pwr {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		regulator-name = "lvds_pwr_en";
		pinctrl-0 = <&pinctrl_lcd_3v3_enable>;
		gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-boot-on;
		regulator-always-on;
	};

	reg_5v_bl: 5v_bl {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		regulator-name = "5v_bl_en";
		pinctrl-0 = <&pinctrl_lcd_5v_enable>;
		gpio = <&gpio5 5 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-boot-on;
		regulator-always-on;
	};
};

&i2c3 {
	lvds-to-hdmi-bridge@4c {
		compatible = "ite,it6263";
		reg = <0x4c>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_it6263_en>;
		reset-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
		status = "okay";

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

&display_subsystem {
	status = "okay";
};

&lvds_ports {
	port@2 {
		reg = <2>;
		lvds_out: endpoint {
			remote-endpoint = <&it6263_in>;
			attach-bridge;
		};
	};
};

&iomuxc {
	pinctrl_lcd_3v3_enable: lcd_3v3_en {
		fsl,pins = <
			MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19
		>;
	};
	pinctrl_lcd_5v_enable: lcd_5v_en {
		fsl,pins = <
			MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x19
		>;
	};
	pinctrl_it6263_en: it6263_en {
		fsl,pins = <
			MX8MM_IOMUXC_SAI3_MCLK_GPIO5_IO2	0x19
		>;
	};
};

Accessing the peripheral in ORCA SOM[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    0.336013] platform 32fd8000.hdmi: Fixing up cyclic dependency with 32fc6000.lcd-controller
[    2.352266] dwhdmi-imx 32fd8000.hdmi: Detected HDMI TX controller v2.13a with HDCP (samsung_dw_hdmi_phy2)
[    2.352931] dwhdmi-imx 32fd8000.hdmi: registered DesignWare HDMI I2C bus driver
[    2.414060] imx-drm display-subsystem: bound 32fd8000.hdmi (ops dw_hdmi_imx_ops)
...
...

Additional information[edit | edit source]

HDMI framebuffer can be accessed through the modetest utility accessing the imx-drm DRM device for NXP i.MX SoCs.

Here below an example of SBC ORCA configured for HDMI and LVDS outputs:

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:~#

The connectors DRM names are: HDMI-A-1 and LVDS-1. The releated device card is:

root@desk-mx8mp:~# ls -la /dev/dri/card*
crw-rw---- 1 root video 226, 0 Jul 26 05:52 /dev/dri/card0
crw-rw---- 1 root video 226, 1 Jul 26 05:52 /dev/dri/card1
root@desk-mx8mp:~#

Accessing the peripheral in MITO 8M Mini[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    3.466020] imx-drm 32c00000.bus:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[    3.759770] imx-drm 32c00000.bus:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[    3.775867] imx-drm 32c00000.bus:display-subsystem: bound 32e10000.mipi_dsi (ops imx_sec_dsim_ops)
[    3.785440] [drm] Initialized imx-drm 1.0.0 20120507 for 32c00000.bus:display-subsystem on minor 1
...
[    6.341483] imx-drm 32c00000.bus:display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device
...
...

Additional information[edit | edit source]

HDMI framebuffer can be accessed through the modetest utility accessing the imx-drm DRM device for NXP i.MX SoCs.

Here below an example of MITO 8M Mini configured for HDMI and LVDS outputs:

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

Connectors:
id      encoder status          name            size (mm)       modes   encoders
35      34      connected       HDMI-A-1        340x190         2       34
  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:

CRTCs:
id      fb      pos     size
33      39      (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

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 RX24 RA24 AR15 XR15 AB15 XB15 BG16
  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

The connectors DRM names are: HDMI-A-1 and LVDS-1. The releated device card is:

root@desk-mx8mm:~# ls -la /dev/dri/card*
crw-rw---- 1 root video 226, 0 Apr 29 00:39 /dev/dri/card0
crw-rw---- 1 root video 226, 1 Apr 29 00:39 /dev/dri/card1