Skip to contentSkip to conversation

arm64: dts: allwinner: pinetab: Add HDMI support

PATCH Applied Dang Huynh 3 participants 5 messages Sep 14, 2021 – Sep 16, 2021

Subsystems (2)
lore
Share & tools
lore

Dang Huynh

author
#0 lore raw

PATCH 1/1 arm64: dts: allwinner: pinetab: Add HDMI support

This patch enables HDMI display on PINE64 PineTab.

The PineTab has a HDMI Type C (mini) port.

---
 .../boot/dts/allwinner/sun50i-a64-pinetab.dts | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +26 -0
index 6a4af14718f5..adb0b28b06d8 100644
@@ -35,6 +35,17 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "c";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	i2c-csi {
 		compatible = "i2c-gpio";
 		sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* PE13 */
@@ -410,6 +421,21 @@ &reg_rtc_ldo {
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
+};
+
+&hdmi {
+	hvcc-supply = <&reg_dldo1>;
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &sound {
 	status = "okay";
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
Signature · 1 line
2.33.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi!

Dne torek, 14. september 2021 ob 21:37:32 CEST je Dang Huynh napisal(a):

arch/

Quoted 10 lines

This patch enables HDMI display on PINE64 PineTab.

The PineTab has a HDMI Type C (mini) port.

---
 .../boot/dts/allwinner/sun50i-a64-pinetab.dts | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/ renamed from arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +0 -0

arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts

Quoted 22 lines

index 6a4af14718f5..adb0b28b06d8 100644

arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +11 -0
@@ -35,6 +35,17 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "c";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	i2c-csi {
 		compatible = "i2c-gpio";
 		sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* PE13 */

arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts &reg_rtc_ldo { · line 425

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +2 -0
@@ -410,6 +421,21 @@ &reg_rtc_ldo {
 	regulator-name = "vcc-rtc";
 };
 
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;

You have to set status to okay here.

With that fixed, you can add:

Best regards,
Jernej

Quoted 20 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +13 -0
+};
+
+&hdmi {
+	hvcc-supply = <&reg_dldo1>;
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &sound {
 	status = "okay";
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
Signature · 1 line
2.33.0
author
#2 lore raw
Quoted 11 lines · On Wednesday, September 15, 2021 3:26:51 AM +07 Jernej Škrabec wrote:

arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts &reg_rtc_ldo { · line 425

Quoted 2 lines

+&simplefb_hdmi {

arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +1 -0
+	vcc-hdmi-supply = <&reg_dldo1>;

You have to set status to okay here.

With that fixed, you can add:

Best regards,
Jernej

Is it really needed? The DE2 HDMI driver can be loaded and make this pretty much obsolete.

maintainer
#3 lore raw

Dne sreda, 15. september 2021 ob 07:47:31 CEST je Dang Huynh napisal(a):

Quoted 5 lines · On Wednesday, September 15, 2021 3:26:51 AM +07 Jernej Škrabec wrote:
Quoted 4 lines

arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts &reg_rtc_ldo { · line 425

Quoted 2 lines

+&simplefb_hdmi {

arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts +1 -0
+	vcc-hdmi-supply = <&reg_dldo1>;

You have to set status to okay here.

Sorry, this is actually the job of bootloader, so it's all good.

Quoted 2 lines
Quoted 2 lines

With that fixed, you can add:

No fixing needed for R-b tag.

Quoted 8 lines
Quoted 5 lines

Best regards,
Jernej

Is it really needed? The DE2 HDMI driver can be loaded and make this pretty much obsolete.

DE2 and HDMI driver could read current settings from that node and implement flicker free transition. However, that's not supported yet. Another use case is to optimize kernel size to minimum for storing it in SPI flash by removing DRM driver if simplefb is good enough.

Anyway, patch looks good. Thanks!

Best regards,
Jernej