mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out
@ 2026-01-03  9:00 Jens Glathe via B4 Relay
  2026-01-03  9:00 ` [PATCH v2 1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3 Jens Glathe via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-01-03  9:00 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Val Packett, Jens Glathe

This patch set enables the HDMI port on the Lenovo ThinkBook 16 G7 QOY. 
The definitions have been derived from the T14s device tree, with some
necessary changes. The HDMI bridge seems to utilize the enable pin. 
The required GPIO was derived from the AeoB dump of the Windows GPU 
driver, and then actually guessed with comparision to pinctrl-x1e80100.c.

Since the qmpphy involved is usb_1_ss2_qmpphy, and that usb_1_ss2 block 
is also used to operate the fingerprint reader, there's some possible
interference. The explicit port configuration on usb_1_ss2_dwc3 minimizes
this, however it works more reliable with the pipe_clk patch [1] that 
is discussed. Booting with HDMI cable cold-plugged results in the 
fingerprint reader not enumerating. Hot-plug and suspend doesn't kill it,
though.

[1]: https://lore.kernel.org/all/2564cdec-9726-4efa-ba07-a2f2646168c6@packett.cool/

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
Changes in v2:
- reviewed and discovered / verified hdmi bridge enable is gpio120, 
  resolving the previous clash. Also, configured the gpio120 with 
  pull-down to avoid a floating pin.
- Link to v1: https://lore.kernel.org/r/20251220-tb16-hdmi-v1-0-18b1e20b396e@oldschoolsolutions.biz

---
Jens Glathe (2):
      arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3
      arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin

 .../boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 90 ++++++++++++++++++++++
 1 file changed, 90 insertions(+)
---
base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20251220-tb16-hdmi-371648c80397

Best regards,
-- 
Jens Glathe <jens.glathe@oldschoolsolutions.biz>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3
  2026-01-03  9:00 [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out Jens Glathe via B4 Relay
@ 2026-01-03  9:00 ` Jens Glathe via B4 Relay
  2026-01-03 13:25   ` Dmitry Baryshkov
  2026-01-03  9:00 ` [PATCH v2 2/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin Jens Glathe via B4 Relay
  2026-01-03 16:02 ` [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-01-03  9:00 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Val Packett, Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

The usb_1_ss2 complex has 2 phys, usb_1_ss2_hsphy and usb_1_ss2_qmpphy. On this
laptop, they are used for different peripherals: The hsphy for the fingerprint
reader, the qmpphy to drive a hdmi bridge. The normal logical wiring for the dwc3
controller is to both phys. Delete the port@1 to the qmpphy.

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
index 3186e79e862de67cbda48a4b85a459e6e965ba65..b4a40904f0a01b36ff2fc72e801a5fe7d6971e2a 100644
--- a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
+++ b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
@@ -1560,6 +1560,8 @@ &usb_1_ss2_dwc3 {
 	maximum-speed = "high-speed";
 	phys = <&usb_1_ss2_hsphy>;
 	phy-names = "usb2-phy";
+
+	/delete-property/ port@1;
 };
 
 &usb_1_ss2_hsphy {

-- 
2.51.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin
  2026-01-03  9:00 [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out Jens Glathe via B4 Relay
  2026-01-03  9:00 ` [PATCH v2 1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3 Jens Glathe via B4 Relay
@ 2026-01-03  9:00 ` Jens Glathe via B4 Relay
  2026-01-13 14:43   ` Konrad Dybcio
  2026-01-03 16:02 ` [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-01-03  9:00 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Val Packett, Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

Add TLMM 120 for hdmi bridge enable.
In general this is the same setup as on the T14s. Since its using simple-bridge
and also is Lenovo, we also use the same realtek,rtd2171 compatible.
The real chip identity is not known yet. The bridge is wired with un-swapped
lanes, though.

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 .../boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 88 ++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
index b4a40904f0a01b36ff2fc72e801a5fe7d6971e2a..1e5eb8c5dc988c3c4655f0019e53fc19e0884e4e 100644
--- a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
+++ b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
@@ -78,6 +78,47 @@ camera {
 		vdd-supply = <&vreg_cam_5p0>;
 	};
 
+	hdmi-bridge {
+		compatible = "realtek,rtd2171";
+
+		enable-gpios = <&tlmm 120 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-0 = <&hdmi_hpd_default>;
+		pinctrl-names = "default";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				hdmi_bridge_dp_in: endpoint {
+					remote-endpoint = <&usb_1_ss2_qmpphy_out_dp>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				hdmi_bridge_tmds_out: endpoint {
+					remote-endpoint = <&hdmi_con>;
+				};
+			};
+		};
+	};
+
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi_con: endpoint {
+				remote-endpoint = <&hdmi_bridge_tmds_out>;
+			};
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -1038,6 +1079,14 @@ &mdss_dp1_out {
 	link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
 };
 
+&mdss_dp2 {
+	status = "okay";
+};
+
+&mdss_dp2_out {
+	link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
+};
+
 &mdss_dp3 {
 	/delete-property/ #sound-dai-cells;
 
@@ -1327,6 +1376,19 @@ hall_int_n_default: hall-int-n-state {
 		bias-disable;
 	};
 
+	hdmi_bridge_en: hdmi-bridge-en-state {
+		pins = "gpio120";
+		function = "gpio";
+		drive-strength = <16>;
+		bias-pull-down;
+	};
+
+	hdmi_hpd_default: hdmi-hpd-default-state {
+		pins = "gpio126";
+		function = "usb2_dp";
+		bias-disable;
+	};
+
 	kybd_default: kybd-default-state {
 		pins = "gpio67";
 		function = "gpio";
@@ -1573,6 +1635,32 @@ &usb_1_ss2_hsphy {
 	status = "okay";
 };
 
+&usb_1_ss2_qmpphy {
+	vdda-phy-supply = <&vreg_l2j_1p2>;
+	vdda-pll-supply = <&vreg_l2d_0p9>;
+
+	/delete-property/ mode-switch;
+	/delete-property/ orientation-switch;
+
+	status = "okay";
+
+	ports {
+		port@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			/delete-node/ endpoint;
+
+			usb_1_ss2_qmpphy_out_dp: endpoint@0 {
+				reg = <0>;
+
+				data-lanes = <0 1 2 3>;
+				remote-endpoint = <&hdmi_bridge_dp_in>;
+			};
+		};
+	};
+};
+
 &usb_2 {
 	status = "okay";
 };

-- 
2.51.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3
  2026-01-03  9:00 ` [PATCH v2 1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3 Jens Glathe via B4 Relay
@ 2026-01-03 13:25   ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2026-01-03 13:25 UTC (permalink / raw)
  To: jens.glathe
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	Val Packett

On Sat, Jan 03, 2026 at 10:00:23AM +0100, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> The usb_1_ss2 complex has 2 phys, usb_1_ss2_hsphy and usb_1_ss2_qmpphy. On this
> laptop, they are used for different peripherals: The hsphy for the fingerprint
> reader, the qmpphy to drive a hdmi bridge. The normal logical wiring for the dwc3
> controller is to both phys. Delete the port@1 to the qmpphy.
> 
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> ---
>  arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out
  2026-01-03  9:00 [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out Jens Glathe via B4 Relay
  2026-01-03  9:00 ` [PATCH v2 1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3 Jens Glathe via B4 Relay
  2026-01-03  9:00 ` [PATCH v2 2/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin Jens Glathe via B4 Relay
@ 2026-01-03 16:02 ` Bjorn Andersson
  2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2026-01-03 16:02 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jens Glathe
  Cc: linux-arm-msm, devicetree, linux-kernel, Val Packett


On Sat, 03 Jan 2026 10:00:22 +0100, Jens Glathe wrote:
> This patch set enables the HDMI port on the Lenovo ThinkBook 16 G7 QOY.
> The definitions have been derived from the T14s device tree, with some
> necessary changes. The HDMI bridge seems to utilize the enable pin.
> The required GPIO was derived from the AeoB dump of the Windows GPU
> driver, and then actually guessed with comparision to pinctrl-x1e80100.c.
> 
> Since the qmpphy involved is usb_1_ss2_qmpphy, and that usb_1_ss2 block
> is also used to operate the fingerprint reader, there's some possible
> interference. The explicit port configuration on usb_1_ss2_dwc3 minimizes
> this, however it works more reliable with the pipe_clk patch [1] that
> is discussed. Booting with HDMI cable cold-plugged results in the
> fingerprint reader not enumerating. Hot-plug and suspend doesn't kill it,
> though.
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3
      commit: 3802966a9c489708228b98b7265d8db87d8f6db3
[2/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin
      commit: 67ce203eee94946768397a6fa16c43ee5292f31a

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin
  2026-01-03  9:00 ` [PATCH v2 2/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin Jens Glathe via B4 Relay
@ 2026-01-13 14:43   ` Konrad Dybcio
  0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-01-13 14:43 UTC (permalink / raw)
  To: jens.glathe, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Val Packett

On 1/3/26 10:00 AM, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> Add TLMM 120 for hdmi bridge enable.
> In general this is the same setup as on the T14s. Since its using simple-bridge
> and also is Lenovo, we also use the same realtek,rtd2171 compatible.
> The real chip identity is not known yet. The bridge is wired with un-swapped
> lanes, though.
> 
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> ---

[...]

>  .../boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 88 ++++++++++++++++++++++
>  1 file changed, 88 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
> index b4a40904f0a01b36ff2fc72e801a5fe7d6971e2a..1e5eb8c5dc988c3c4655f0019e53fc19e0884e4e 100644
> --- a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
> +++ b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
> @@ -78,6 +78,47 @@ camera {
>  		vdd-supply = <&vreg_cam_5p0>;
>  	};
>  
> +	hdmi-bridge {
> +		compatible = "realtek,rtd2171";

Since we're not sure, a comment to draw attention to it would be neat

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-13 14:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-03  9:00 [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out Jens Glathe via B4 Relay
2026-01-03  9:00 ` [PATCH v2 1/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: force usb2-only mode on usb_1_ss2_dwc3 Jens Glathe via B4 Relay
2026-01-03 13:25   ` Dmitry Baryshkov
2026-01-03  9:00 ` [PATCH v2 2/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: add hdmi bridge with enable pin Jens Glathe via B4 Relay
2026-01-13 14:43   ` Konrad Dybcio
2026-01-03 16:02 ` [PATCH v2 0/2] arm64: dts: qcom: x1p42100-lenovo-thinkbook-16: enable HDMI out Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®