[PATCH 4/4] arm64: dts: mediatek: cherry: Add edptx and dptx support

Bo-Chen Chen posted 4 patches 2 years ago
There is a newer version of this series
[PATCH 4/4] arm64: dts: mediatek: cherry: Add edptx and dptx support
Posted by Bo-Chen Chen 2 years ago
- Add pinctrl for edptx and dptx.
- Add port for edptx and dptx.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
---
 .../boot/dts/mediatek/mt8195-cherry.dtsi      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
index 303dc32c64dc..560103e29017 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
@@ -125,6 +125,7 @@
 
 	port {
 		dp_intf0_out: endpoint {
+			remote-endpoint = <&edp_in>;
 		};
 	};
 };
@@ -134,6 +135,59 @@
 
 	port {
 		dp_intf1_out: endpoint {
+			remote-endpoint = <&dptx_in>;
+		};
+	};
+};
+
+&edp_tx {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&edptx_pins_default>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			edp_in: endpoint {
+				remote-endpoint = <&dp_intf0_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			edp_out: endpoint {
+				data-lanes = <0 1 2 3>;
+			};
+		};
+	};
+};
+
+&dp_tx {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dptx_pin>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			dptx_in: endpoint {
+				remote-endpoint = <&dp_intf1_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+			dptx_out: endpoint {
+				data-lanes = <0 1 2 3>;
+			};
 		};
 	};
 };
@@ -497,6 +551,20 @@
 		};
 	};
 
+	edptx_pins_default: edptx-default-pins {
+		pins-cmd-dat {
+			pinmux = <PINMUX_GPIO7__FUNC_EDP_TX_HPD>;
+			bias-pull-up;
+		};
+	};
+
+	dptx_pin: dptx-default-pins {
+		pins-cmd-dat {
+			pinmux = <PINMUX_GPIO18__FUNC_DP_TX_HPD>;
+			bias-pull-up;
+		};
+	};
+
 	i2c0_pins: i2c0-default-pins {
 		pins-bus {
 			pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
-- 
2.18.0
Re: [PATCH 4/4] arm64: dts: mediatek: cherry: Add edptx and dptx support
Posted by AngeloGioacchino Del Regno 2 years ago
Il 15/09/22 09:58, Bo-Chen Chen ha scritto:
> - Add pinctrl for edptx and dptx.
> - Add port for edptx and dptx.
> 

The commit description is not great: explain why this board needs eDP/DP
(so, explain that eDP is connected to internal panel, DP for external display)

Thanks,
Angelo

> Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Re: [PATCH 4/4] arm64: dts: mediatek: cherry: Add edptx and dptx support
Posted by Bo-Chen Chen 2 years ago
On Thu, 2022-09-15 at 16:13 +0800, AngeloGioacchino Del Regno wrote:
> Il 15/09/22 09:58, Bo-Chen Chen ha scritto:
> > - Add pinctrl for edptx and dptx.
> > - Add port for edptx and dptx.
> > 
> 
> The commit description is not great: explain why this board needs
> eDP/DP
> (so, explain that eDP is connected to internal panel, DP for external
> display)
> 
> Thanks,
> Angelo
> 

Hello Angelo,

OK, I will improve the commit message in next version.

BRs,
Bo-Chen

> > Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
> 
>