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
2026/03/26 DESK-MX8M-L-6.x.x 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      36      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      39      connected       HDMI-A-2        600x340         33      39
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: preferred, driver
  #1 3840x2160 30.00 3840 4016 4104 4400 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #2 3840x2160 25.00 3840 4896 4984 5280 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #3 3840x2160 24.00 3840 5116 5204 5500 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
  #4 2560x1080 60.00 2560 2808 2852 3000 1080 1084 1089 1100 198000 flags: phsync, pvsync; type: driver
  #5 2560x1080 50.00 2560 3108 3152 3300 1080 1084 1089 1125 185625 flags: phsync, pvsync; type: driver
  #6 2560x1080 30.00 2560 3328 3372 3520 1080 1084 1089 1125 118800 flags: phsync, pvsync; type: driver
  #7 2560x1080 25.00 2560 3008 3052 3200 1080 1084 1089 1125 90000 flags: phsync, pvsync; type: driver
  #8 2560x1080 24.00 2560 3558 3602 3750 1080 1084 1089 1100 99000 flags: phsync, pvsync; type: driver
  #9 2048x1152 60.00 2048 2074 2154 2250 1152 1153 1156 1200 162000 flags: phsync, pvsync; type: driver
  #10 1920x1200 59.95 1920 1968 2000 2080 1200 1203 1209 1235 154000 flags: phsync, nvsync; type: driver
  #11 1920x1080 120.00 1920 2008 2052 2200 1080 1084 1089 1125 297000 flags: phsync, pvsync; type: driver
  #12 1920x1080 59.94 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver
  #13 1920x1080 50.00 1920 2448 2492 2640 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
  #14 1920x1080 30.00 1920 2008 2052 2200 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
  #15 1920x1080 29.97 1920 2008 2052 2200 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
  #16 1920x1080 25.00 1920 2448 2492 2640 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
  #17 1920x1080 24.00 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
  #18 1920x1080 23.98 1920 2558 2602 2750 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
  #19 1280x1024 75.02 1280 1296 1440 1688 1024 1025 1028 1066 135000 flags: phsync, pvsync; type: driver
  #20 1280x1024 60.02 1280 1328 1440 1688 1024 1025 1028 1066 108000 flags: phsync, pvsync; type: driver
  #21 1152x864 75.00 1152 1216 1344 1600 864 865 868 900 108000 flags: phsync, pvsync; type: driver
  #22 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #23 1280x720 59.94 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver
  #24 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #25 1440x576 50.00 1440 1464 1592 1728 576 581 586 625 54000 flags: nhsync, nvsync; type: driver
  #26 800x600 60.32 800 840 968 1056 600 601 605 628 40000 flags: phsync, pvsync; type: driver
  #27 800x600 56.25 800 824 896 1024 600 601 603 625 36000 flags: phsync, pvsync; type: driver
  #28 720x576 50.00 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
  #29 720x480 60.00 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
  #30 720x480 59.94 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
  #31 640x480 60.00 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync; type: driver
  #32 640x480 59.94 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
                        00ffffffffffff00588f666601010101
                        06200103803c22782e3f3ba95047b025
                        105155bfef80e1c0d1fcd100d1c0b300
                        9500818081c0023a801871382d40582c
                        450058542100001e000000ff00363656
                        4944454f0a2020202020000000fd0018
                        4b0f8c3c000a202020202020000000fc
                        00504154482e4844520a2020202001e9
                        020353f35961605f5e5d100504030213
                        1f203f22215a595857561d1e11122c09
                        17071117503d07c0510700830100006d
                        030c002000107820006001020367d85d
                        c401788801e305e001e20f17e6060701
                        61600008e80030f2705a80b0588a00b9
                        882100001e565e00a0a0a02950302035
                        0055502100001e000000000000000058
        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: 16

CRTCs:
id      fb      pos     size
33      49      (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      52      (0,0)   (1920x1080)
  #0 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; 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      49      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      52      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         5       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
  #2 800x600 75.00 800 816 896 1056 600 601 604 625 49500 flags: phsync, pvsync; type: driver
  #3 640x480 75.00 640 656 720 840 480 481 484 500 31500 flags: nhsync, nvsync; type: driver
  #4 640x480 72.81 640 664 704 832 480 489 492 520 31500 flags: nhsync, nvsync; 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

root@desk-mx8mm:~#

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