diff mbox series

[v2,7/7] arm64: dts: rockchip: Enable DP2HDMI for ROCK 5 ITX

Message ID 20250312104214.525242-8-andyshrk@163.com (mailing list archive)
State New
Headers show
Series Add support for RK3588 DisplayPort Controller | expand

Commit Message

Andy Yan March 12, 2025, 10:42 a.m. UTC
From: Andy Yan <andy.yan@rock-chips.com>

The HDMI Port next to Headphone Jack is drived by
DP1 on rk3588 via a dp2hdmi converter.

Add related dt nodes to enable it.

Note: ROCKCHIP_VOP2_EP_DP1 is defined as 11 in dt-binding header,
but it will trigger a dtc warning like "graph node unit address
error, expected "b"" if we use it directly after endpoint, so we
use "b" instead here.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
---

(no changes since v1)

 .../boot/dts/rockchip/rk3588-rock-5-itx.dts   | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Dmitry Baryshkov March 12, 2025, 12:39 p.m. UTC | #1
On Wed, Mar 12, 2025 at 06:42:08PM +0800, Andy Yan wrote:
> From: Andy Yan <andy.yan@rock-chips.com>
> 
> The HDMI Port next to Headphone Jack is drived by
> DP1 on rk3588 via a dp2hdmi converter.
> 
> Add related dt nodes to enable it.
> 
> Note: ROCKCHIP_VOP2_EP_DP1 is defined as 11 in dt-binding header,
> but it will trigger a dtc warning like "graph node unit address
> error, expected "b"" if we use it directly after endpoint, so we
> use "b" instead here.
> 
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> ---
> 
> (no changes since v1)
> 
>  .../boot/dts/rockchip/rk3588-rock-5-itx.dts   | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
> index 67b886329248..29f10ec9f0c1 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
> @@ -57,6 +57,18 @@ analog-sound {
>  			  "Headphone", "Headphones";
>  	};
>  
> +	dp-con {
> +		compatible = "dp-connector";

You've written that it is an HDMI connector. Could you possibly clarify,
why is it being registered as a DP connector? Is there any kind of
a bridge between the DP controller and the HDMI connector?

> +		label = "DP OUT";
> +		type = "full-size";
> +
> +		port {
> +			dp_con_in: endpoint {
> +				remote-endpoint = <&dp1_out_con>;
> +			};
> +		};
> +	};
> +
>  	gpio-leds {
>  		compatible = "gpio-leds";
>  		pinctrl-names = "default";
> @@ -268,6 +280,24 @@ &cpu_l3 {
>  	cpu-supply = <&vdd_cpu_lit_s0>;
>  };
>  
> +&dp1 {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&dp1m0_pins>;
> +};
> +
> +&dp1_in {
> +	dp1_in_vp2: endpoint {
> +		remote-endpoint = <&vp2_out_dp1>;
> +	};
> +};
> +
> +&dp1_out {
> +	dp1_out_con: endpoint {
> +		remote-endpoint = <&dp_con_in>;
> +	};
> +};
> +
>  &gpu {
>  	mali-supply = <&vdd_gpu_s0>;
>  	status = "okay";
> @@ -1262,3 +1292,10 @@ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
>  		remote-endpoint = <&hdmi1_in_vp1>;
>  	};
>  };
> +
> +&vp2 {
> +	vp2_out_dp1: endpoint@b {
> +		reg = <ROCKCHIP_VOP2_EP_DP1>;
> +		remote-endpoint = <&dp1_in_vp2>;
> +	};
> +};
> -- 
> 2.34.1
>
Andy Yan March 13, 2025, 12:32 a.m. UTC | #2
Hi Dmitry,

At 2025-03-12 20:39:17, "Dmitry Baryshkov" <lumag@kernel.org> wrote:
>On Wed, Mar 12, 2025 at 06:42:08PM +0800, Andy Yan wrote:
>> From: Andy Yan <andy.yan@rock-chips.com>
>> 
>> The HDMI Port next to Headphone Jack is drived by
>> DP1 on rk3588 via a dp2hdmi converter.
>> 
>> Add related dt nodes to enable it.
>> 
>> Note: ROCKCHIP_VOP2_EP_DP1 is defined as 11 in dt-binding header,
>> but it will trigger a dtc warning like "graph node unit address
>> error, expected "b"" if we use it directly after endpoint, so we
>> use "b" instead here.
>> 
>> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>> ---
>> 
>> (no changes since v1)
>> 
>>  .../boot/dts/rockchip/rk3588-rock-5-itx.dts   | 37 +++++++++++++++++++
>>  1 file changed, 37 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
>> index 67b886329248..29f10ec9f0c1 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
>> @@ -57,6 +57,18 @@ analog-sound {
>>  			  "Headphone", "Headphones";
>>  	};
>>  
>> +	dp-con {
>> +		compatible = "dp-connector";
>
>You've written that it is an HDMI connector. Could you possibly clarify,
>why is it being registered as a DP connector? Is there any kind of
>a bridge between the DP controller and the HDMI connector?

When I was preparing this patch at that time, I also had some doubts. 
Whether it should be registered as a DP connector or an HDMI connector. 
There is a DP2HDMI conversion chip between the DP of RK3588 and this hdmi 
interface, but this conversion chip does not require a software driver. 
If the current writing is incorrect, I will change it to hdmi-connector in the next version.

Thanks
>
>> +		label = "DP OUT";
>> +		type = "full-size";
>> +
>> +		port {
>> +			dp_con_in: endpoint {
>> +				remote-endpoint = <&dp1_out_con>;
>> +			};
>> +		};
>> +	};
>> +
>>  	gpio-leds {
>>  		compatible = "gpio-leds";
>>  		pinctrl-names = "default";
>> @@ -268,6 +280,24 @@ &cpu_l3 {
>>  	cpu-supply = <&vdd_cpu_lit_s0>;
>>  };
>>  
>> +&dp1 {
>> +	status = "okay";
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&dp1m0_pins>;
>> +};
>> +
>> +&dp1_in {
>> +	dp1_in_vp2: endpoint {
>> +		remote-endpoint = <&vp2_out_dp1>;
>> +	};
>> +};
>> +
>> +&dp1_out {
>> +	dp1_out_con: endpoint {
>> +		remote-endpoint = <&dp_con_in>;
>> +	};
>> +};
>> +
>>  &gpu {
>>  	mali-supply = <&vdd_gpu_s0>;
>>  	status = "okay";
>> @@ -1262,3 +1292,10 @@ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
>>  		remote-endpoint = <&hdmi1_in_vp1>;
>>  	};
>>  };
>> +
>> +&vp2 {
>> +	vp2_out_dp1: endpoint@b {
>> +		reg = <ROCKCHIP_VOP2_EP_DP1>;
>> +		remote-endpoint = <&dp1_in_vp2>;
>> +	};
>> +};
>> -- 
>> 2.34.1
>> 
>
>-- 
>With best wishes
>Dmitry
Dmitry Baryshkov March 13, 2025, 8:10 a.m. UTC | #3
On Thu, Mar 13, 2025 at 08:32:55AM +0800, Andy Yan wrote:
> 
> Hi Dmitry,
> 
> At 2025-03-12 20:39:17, "Dmitry Baryshkov" <lumag@kernel.org> wrote:
> >On Wed, Mar 12, 2025 at 06:42:08PM +0800, Andy Yan wrote:
> >> From: Andy Yan <andy.yan@rock-chips.com>
> >> 
> >> The HDMI Port next to Headphone Jack is drived by
> >> DP1 on rk3588 via a dp2hdmi converter.
> >> 
> >> Add related dt nodes to enable it.
> >> 
> >> Note: ROCKCHIP_VOP2_EP_DP1 is defined as 11 in dt-binding header,
> >> but it will trigger a dtc warning like "graph node unit address
> >> error, expected "b"" if we use it directly after endpoint, so we
> >> use "b" instead here.
> >> 
> >> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> >> ---
> >> 
> >> (no changes since v1)
> >> 
> >>  .../boot/dts/rockchip/rk3588-rock-5-itx.dts   | 37 +++++++++++++++++++
> >>  1 file changed, 37 insertions(+)
> >> 
> >> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
> >> index 67b886329248..29f10ec9f0c1 100644
> >> --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
> >> +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
> >> @@ -57,6 +57,18 @@ analog-sound {
> >>  			  "Headphone", "Headphones";
> >>  	};
> >>  
> >> +	dp-con {
> >> +		compatible = "dp-connector";
> >
> >You've written that it is an HDMI connector. Could you possibly clarify,
> >why is it being registered as a DP connector? Is there any kind of
> >a bridge between the DP controller and the HDMI connector?
> 
> When I was preparing this patch at that time, I also had some doubts. 
> Whether it should be registered as a DP connector or an HDMI connector. 
> There is a DP2HDMI conversion chip between the DP of RK3588 and this hdmi 
> interface, but this conversion chip does not require a software driver. 
> If the current writing is incorrect, I will change it to hdmi-connector in the next version.

Yes. Please add the RA620 chip to simple-bridge.c and simple-bridge.yaml
and use HDMI connector here.

> 
> Thanks
> >
> >> +		label = "DP OUT";
> >> +		type = "full-size";
> >> +
> >> +		port {
> >> +			dp_con_in: endpoint {
> >> +				remote-endpoint = <&dp1_out_con>;
> >> +			};
> >> +		};
> >> +	};
> >> +
> >>  	gpio-leds {
> >>  		compatible = "gpio-leds";
> >>  		pinctrl-names = "default";
> >> @@ -268,6 +280,24 @@ &cpu_l3 {
> >>  	cpu-supply = <&vdd_cpu_lit_s0>;
> >>  };
> >>  
> >> +&dp1 {
> >> +	status = "okay";
> >> +	pinctrl-names = "default";
> >> +	pinctrl-0 = <&dp1m0_pins>;
> >> +};
> >> +
> >> +&dp1_in {
> >> +	dp1_in_vp2: endpoint {
> >> +		remote-endpoint = <&vp2_out_dp1>;
> >> +	};
> >> +};
> >> +
> >> +&dp1_out {
> >> +	dp1_out_con: endpoint {
> >> +		remote-endpoint = <&dp_con_in>;
> >> +	};
> >> +};
> >> +
> >>  &gpu {
> >>  	mali-supply = <&vdd_gpu_s0>;
> >>  	status = "okay";
> >> @@ -1262,3 +1292,10 @@ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
> >>  		remote-endpoint = <&hdmi1_in_vp1>;
> >>  	};
> >>  };
> >> +
> >> +&vp2 {
> >> +	vp2_out_dp1: endpoint@b {
> >> +		reg = <ROCKCHIP_VOP2_EP_DP1>;
> >> +		remote-endpoint = <&dp1_in_vp2>;
> >> +	};
> >> +};
> >> -- 
> >> 2.34.1
> >> 
> >
> >-- 
> >With best wishes
> >Dmitry
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
index 67b886329248..29f10ec9f0c1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
@@ -57,6 +57,18 @@  analog-sound {
 			  "Headphone", "Headphones";
 	};
 
+	dp-con {
+		compatible = "dp-connector";
+		label = "DP OUT";
+		type = "full-size";
+
+		port {
+			dp_con_in: endpoint {
+				remote-endpoint = <&dp1_out_con>;
+			};
+		};
+	};
+
 	gpio-leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -268,6 +280,24 @@  &cpu_l3 {
 	cpu-supply = <&vdd_cpu_lit_s0>;
 };
 
+&dp1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dp1m0_pins>;
+};
+
+&dp1_in {
+	dp1_in_vp2: endpoint {
+		remote-endpoint = <&vp2_out_dp1>;
+	};
+};
+
+&dp1_out {
+	dp1_out_con: endpoint {
+		remote-endpoint = <&dp_con_in>;
+	};
+};
+
 &gpu {
 	mali-supply = <&vdd_gpu_s0>;
 	status = "okay";
@@ -1262,3 +1292,10 @@  vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
 		remote-endpoint = <&hdmi1_in_vp1>;
 	};
 };
+
+&vp2 {
+	vp2_out_dp1: endpoint@b {
+		reg = <ROCKCHIP_VOP2_EP_DP1>;
+		remote-endpoint = <&dp1_in_vp2>;
+	};
+};