Skip to contentSkip to conversation

arm64: dts: imx8mp: Enable HDMI on i.MX8MP DHCOM PDK2 and PDK3

PATCH Applied Marek Vasut 6 participants 11 messages May 14, 2024 – Jun 15, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: imx8mp: Enable HDMI on i.MX8MP DHCOM PDK2 and PDK3

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses. The pinctrl_hdmi node is part of the SoM DTSI already.

---
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 .../boot/dts/freescale/imx8mp-dhcom-pdk2.dts  | 39 +++++++++++++++++++
 .../boot/dts/freescale/imx8mp-dhcom-pdk3.dts  | 39 +++++++++++++++++++
 2 files changed, 78 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dts +39 -0
index 3b1c940860e02..ebdf13e97b4e2 100644
@@ -69,6 +69,18 @@ button-3 {
 		};
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		label = "X38";
+		type = "a";
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&hdmi_tx_out>;
+			};
+		};
+	};
+
 	led {
 		compatible = "gpio-leds";
 
@@ -184,6 +196,33 @@ &flexcan1 {
 	status = "okay";
 };
 
+&hdmi_pvi {
+	status = "okay";
+};
+
+&hdmi_tx {
+	ddc-i2c-bus = <&i2c5>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hdmi>;
+	status = "okay";
+
+	ports {
+		port@1 {
+			hdmi_tx_out: endpoint {
+				remote-endpoint = <&hdmi_connector_in>;
+			};
+		};
+	};
+};
+
+&hdmi_tx_phy {
+	status = "okay";
+};
+
+&lcdif3 {
+	status = "okay";
+};
+
 &pcie_phy {
 	clock-names = "ref";
 	clocks = <&hsio_blk_ctrl>;
arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dts +39 -0
index ac7ec7533a3c8..ef012e8365b1f 100644
@@ -75,6 +75,18 @@ button-3 {
 		};
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		label = "X28";
+		type = "a";
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&hdmi_tx_out>;
+			};
+		};
+	};
+
 	led {
 		compatible = "gpio-leds";
 
@@ -248,6 +260,33 @@ &flexcan1 {
 	status = "okay";
 };
 
+&hdmi_pvi {
+	status = "okay";
+};
+
+&hdmi_tx {
+	ddc-i2c-bus = <&i2cmuxed1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hdmi>;
+	status = "okay";
+
+	ports {
+		port@1 {
+			hdmi_tx_out: endpoint {
+				remote-endpoint = <&hdmi_connector_in>;
+			};
+		};
+	};
+};
+
+&hdmi_tx_phy {
+	status = "okay";
+};
+
+&lcdif3 {
+	status = "okay";
+};
+
 &pcie_phy {
 	clocks = <&pcieclk 1>;
 	clock-names = "ref";
Signature · 1 line
2.43.0
#1 lore raw
Quoted 19 lines · Marek Vasut

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses. The pinctrl_hdmi node is part of the SoM DTSI already.

---
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Quoted 5 lines
---
 .../boot/dts/freescale/imx8mp-dhcom-pdk2.dts  | 39 +++++++++++++++++++
 .../boot/dts/freescale/imx8mp-dhcom-pdk3.dts  | 39 +++++++++++++++++++
 2 files changed, 78 insertions(+)

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

New warnings running 'make CHECK_DTBS=y freescale/imx8mp-dhcom-pdk2.dtb freescale/imx8mp-dhcom-pdk3.dtb' for [email protected]:

arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dtb: hdmi@32fd8000: Unevaluated properties are not allowed ('ddc-i2c-bus' was unexpected)
from schema $id: http://devicetree.org/schemas/display/bridge/fsl,imx8mp-hdmi-tx.yaml#
arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dtb: hdmi@32fd8000: Unevaluated properties are not allowed ('ddc-i2c-bus' was unexpected)
from schema $id: http://devicetree.org/schemas/display/bridge/fsl,imx8mp-hdmi-tx.yaml#

#2 lore raw
Quoted 42 lines · Rob Herring (Arm)
Quoted 19 lines · Marek Vasut

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses. The pinctrl_hdmi node is part of the SoM DTSI already.

---
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Quoted 5 lines
---
  .../boot/dts/freescale/imx8mp-dhcom-pdk2.dts  | 39 +++++++++++++++++++
  .../boot/dts/freescale/imx8mp-dhcom-pdk3.dts  | 39 +++++++++++++++++++
  2 files changed, 78 insertions(+)

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

   pip3 install dtschema --upgrade
Quoted 6 lines

New warnings running 'make CHECK_DTBS=y freescale/imx8mp-dhcom-pdk2.dtb freescale/imx8mp-dhcom-pdk3.dtb' for [email protected]:

arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dtb: hdmi@32fd8000: Unevaluated properties are not allowed ('ddc-i2c-bus' was unexpected)
from schema $id: http://devicetree.org/schemas/display/bridge/fsl,imx8mp-hdmi-tx.yaml#
arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dtb: hdmi@32fd8000: Unevaluated properties are not allowed ('ddc-i2c-bus' was unexpected)
from schema $id: http://devicetree.org/schemas/display/bridge/fsl,imx8mp-hdmi-tx.yaml#

Should be fixed in:
[PATCH] dt-bindings: display: synopsys,dw-hdmi: Document ddc-i2c-bus in core

#3 lore raw
In reply to Marek Vasut

Hello Marek,

Quoted 3 lines · Marek Vasut

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses.

Are you able to read the HDMI EDID with such configuration? I have the patch ready for verdin imx8mp, I just did not have time to figure out this last details.

Francesco

#4 lore raw
Quoted 1 line · Francesco Dolcini

Hello Marek,

Hi,

Quoted 8 lines · Marek Vasut
Quoted 3 lines

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses.

Are you able to read the HDMI EDID with such configuration? I have the patch ready for verdin imx8mp, I just did not have time to figure out this last details.

Yes with ddc-i2c-bus in hdmi_tx{} node, no with ddc-i2c-bus in connector node. Maybe that's what you're running into ? The DW HDMI core needs the ddc-i2c-bus property in hdmi_tx{} node if you use non-native I2C bus for the DDC channel.

#5 lore raw

Hello Marek,

Quoted 10 lines · Marek Vasut
Quoted 1 line · Francesco Dolcini

Hello Marek,

Hi,

Quoted 5 lines · Marek Vasut
Quoted 3 lines

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses.

Quoted 5 lines
Quoted 3 lines

Are you able to read the HDMI EDID with such configuration? I have the patch ready for verdin imx8mp, I just did not have time to figure out this last details.

Yes with ddc-i2c-bus in hdmi_tx{} node, no with ddc-i2c-bus in connector node. Maybe that's what you're running into ? The DW HDMI core needs the ddc-i2c-bus property in hdmi_tx{} node if you use non-native I2C bus for the DDC channel.

What benefit does the hdmi-connector provide over just omitting it? Just for documentation purposes?

Thanks,
Ahmad

Quoted 2 lines
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#6 lore raw
Quoted 1 line · Ahmad Fatoum

Hello Marek,

Hi,

Quoted 11 lines · Marek Vasut
Quoted 10 lines · Francesco Dolcini
Quoted 1 line

Hello Marek,

Hi,

Quoted 5 lines · Marek Vasut
Quoted 3 lines

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Are you able to read the HDMI EDID with such configuration? I have the patch ready for verdin imx8mp, I just did not have time to figure out this last details.

Yes with ddc-i2c-bus in hdmi_tx{} node, no with ddc-i2c-bus in connector node. Maybe that's what you're running into ? The DW HDMI core needs the ddc-i2c-bus property in hdmi_tx{} node if you use non-native I2C bus for the DDC channel.

What benefit does the hdmi-connector provide over just omitting it? Just for documentation purposes?

I was under the impression describing the hardware in DT in full was the best practice (TM), hence it is in full here.

#7 lore raw
Quoted 20 lines · Marek Vasut
Quoted 1 line · Ahmad Fatoum

Hello Marek,

Hi,

Quoted 15 lines · Marek Vasut
Quoted 14 lines · Francesco Dolcini
Quoted 1 line

Hello Marek,

Hi,

Quoted 8 lines · Marek Vasut
Quoted 3 lines

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses.

Are you able to read the HDMI EDID with such configuration? I have the patch ready for verdin imx8mp, I just did not have time to figure out this last details.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Yes with ddc-i2c-bus in hdmi_tx{} node, no with ddc-i2c-bus in connector node. Maybe that's what you're running into ? The DW HDMI core needs the ddc-i2c-bus property in hdmi_tx{} node if you use non-native I2C bus for the DDC channel.

What benefit does the hdmi-connector provide over just omitting it? Just for documentation purposes?

I was under the impression describing the hardware in DT in full was the best practice (TM), hence it is in full here.

Sure, I am just wondering what effect, if any, it has in how Linux interprets the device tree. I have an i.MX8MP board with HDMI as well, but without connector (yet).

Cheers,
Ahmad

Quoted 1 line
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#8 lore raw

Hi everyone,

Am Donnerstag, 16. Mai 2024, 13:46:33 CEST schrieb Ahmad Fatoum:

Quoted 23 lines · Marek Vasut
Quoted 22 lines · Ahmad Fatoum
Quoted 1 line

Hello Marek,

Hi,

Quoted 17 lines · Marek Vasut
Quoted 15 lines · Francesco Dolcini
Quoted 1 line

Hello Marek,

Hi,

Quoted 8 lines · Marek Vasut
Quoted 3 lines

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses.

Are you able to read the HDMI EDID with such configuration? I have the patch ready for verdin imx8mp, I just did not have time to figure out this last details.

Yes with ddc-i2c-bus in hdmi_tx{} node, no with ddc-i2c-bus in connector node. Maybe that's what you're running into ? The DW HDMI core needs the ddc-i2c-bus property in hdmi_tx{} node if you use non-native I2C bus for the DDC channel.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

What benefit does the hdmi-connector provide over just omitting it? Just for documentation purposes?

I was under the impression describing the hardware in DT in full was the best practice (TM), hence it is in full here.

Sure, I am just wondering what effect, if any, it has in how Linux interprets the device tree. I have an i.MX8MP board with HDMI as well, but without connector (yet).

AFAICT having a hdmi-connector has no effect at all. Linux drivers are not using it.

Best regards,
Alexander

Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
#9 lore raw
In reply to Marek Vasut

Hello,

Quoted 6 lines · Marek Vasut
Quoted 5 lines · Francesco Dolcini
Quoted 3 lines · Marek Vasut

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses.

Quoted 8 lines
Quoted 3 lines

Are you able to read the HDMI EDID with such configuration? I have the patch ready for verdin imx8mp, I just did not have time to figure out this last details.

Yes with ddc-i2c-bus in hdmi_tx{} node, no with ddc-i2c-bus in connector node. Maybe that's what you're running into ? The DW HDMI core needs the ddc-i2c-bus property in hdmi_tx{} node if you use non-native I2C bus for the DDC channel.

Yes, that's it. Thanks!

Francesco

Applied
#10 lore raw
In reply to Marek Vasut
Quoted 6 lines · Marek Vasut

Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses. The pinctrl_hdmi node is part of the SoM DTSI already.

Applied, thanks!