* [PATCH v2 0/5] arm64: qcom: x1e78100-lenovo-thinkpad-t14s: add support for HDMI output
@ 2025-09-02 9:00 Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge Neil Armstrong
` (4 more replies)
0 siblings, 5 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 9:00 UTC (permalink / raw)
To: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy,
Neil Armstrong
The Thinkpad T14s embeds a transparent 4lanes DP->HDMI transceiver
connected to the third QMP Combo PHY 4 lanes.
The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
of a combo glue to route either lanes to the 4 shared physical lanes.
The routing of the lanes can be:
- 2 DP + 2 USB3
- 4 DP
- 2 USB3
Add the needed property to specify the lanes mapping and
use those in the driver to setup the right PHY mode and
orientation.
Finally Add all the data routing in DT, disable mode switching and specify
the QMP Combo PHY should be in DP-Only mode to route the 4 lanes to
the underlying DP phy.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- Model the HDMI transceiver as a simple bridge
- Switch to a static lanes mapping property
- Link to v1: https://lore.kernel.org/r/20250821-topic-x1e80100-hdmi-v1-0-f14ad9430e88@linaro.org
---
Neil Armstrong (5):
dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge
drm/bridge: simple: add Realtek RTD2171 DP-to-HDMI bridge
dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
phy: qcom: qmp-combo: get the static lanes mapping from DT
arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: add HDMI nodes
.../bindings/display/bridge/simple-bridge.yaml | 1 +
.../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 +++++
.../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 70 ++++++++++++
drivers/gpu/drm/bridge/simple-bridge.c | 5 +
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 118 +++++++++++++++++++--
5 files changed, 214 insertions(+), 9 deletions(-)
---
base-commit: 7fa4d8dc380fbd81a9d702a855c50690c9c6442c
change-id: 20250821-topic-x1e80100-hdmi-3bd5b5bd2d96
Best regards,
--
Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge
2025-09-02 9:00 [PATCH v2 0/5] arm64: qcom: x1e78100-lenovo-thinkpad-t14s: add support for HDMI output Neil Armstrong
@ 2025-09-02 9:00 ` Neil Armstrong
2025-09-02 9:51 ` Maud Spierings
2025-09-03 6:52 ` Krzysztof Kozlowski
2025-09-02 9:00 ` [PATCH v2 2/5] drm/bridge: simple: add " Neil Armstrong
` (3 subsequent siblings)
4 siblings, 2 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 9:00 UTC (permalink / raw)
To: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy,
Neil Armstrong
The Realtek RTD2171 chipset is a transparent DisplayPort 1.4 to
HDMI 2.0 bridge.
This chipset is usually found in USB-C To HDMI Adapters and Docks,
or laptops to provide HDMI display output.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml
index 43cf4df9811a5897843685727a49fd5a90096391..003a1c934f863864400d689cd784990cbc1de3de 100644
--- a/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml
@@ -28,6 +28,7 @@ properties:
- enum:
- adi,adv7123
- dumb-vga-dac
+ - realtek,rtd2171
- ti,opa362
- ti,ths8134
- ti,ths8135
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 2/5] drm/bridge: simple: add Realtek RTD2171 DP-to-HDMI bridge
2025-09-02 9:00 [PATCH v2 0/5] arm64: qcom: x1e78100-lenovo-thinkpad-t14s: add support for HDMI output Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge Neil Armstrong
@ 2025-09-02 9:00 ` Neil Armstrong
2025-09-02 9:23 ` Dmitry Baryshkov
2025-09-02 9:00 ` [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping Neil Armstrong
` (2 subsequent siblings)
4 siblings, 1 reply; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 9:00 UTC (permalink / raw)
To: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy,
Neil Armstrong
Add support for the transparent Realtek RTD2171 DP-to-HDMI bridge.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/gpu/drm/bridge/simple-bridge.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/bridge/simple-bridge.c b/drivers/gpu/drm/bridge/simple-bridge.c
index 3d15ddd394703a351c1a537e7ab5f1487e024ee4..acf8a6b639da4119f17e4a7c40605947495da0e5 100644
--- a/drivers/gpu/drm/bridge/simple-bridge.c
+++ b/drivers/gpu/drm/bridge/simple-bridge.c
@@ -261,6 +261,11 @@ static const struct of_device_id simple_bridge_match[] = {
.timings = &default_bridge_timings,
.connector_type = DRM_MODE_CONNECTOR_VGA,
},
+ }, {
+ .compatible = "realtek,rtd2171",
+ .data = &(const struct simple_bridge_info) {
+ .connector_type = DRM_MODE_CONNECTOR_HDMIA,
+ },
}, {
.compatible = "ti,opa362",
.data = &(const struct simple_bridge_info) {
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 9:00 [PATCH v2 0/5] arm64: qcom: x1e78100-lenovo-thinkpad-t14s: add support for HDMI output Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 2/5] drm/bridge: simple: add " Neil Armstrong
@ 2025-09-02 9:00 ` Neil Armstrong
2025-09-02 9:30 ` Dmitry Baryshkov
` (2 more replies)
2025-09-02 9:00 ` [PATCH v2 4/5] phy: qcom: qmp-combo: get the static lanes mapping from DT Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 5/5] arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: add HDMI nodes Neil Armstrong
4 siblings, 3 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 9:00 UTC (permalink / raw)
To: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy,
Neil Armstrong
The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
of a combo glue to route either lanes to the 4 shared physical lanes.
The routing of the lanes can be:
- 2 DP + 2 USB3
- 4 DP
- 2 USB3
The layout of the lanes was designed to be mapped and swapped
related to the USB-C Power Delivery negociation, so it supports
a finite set of mappings inherited by the USB-C Altmode layouts.
Nevertheless those QMP Comby PHY can be statically used to
drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
etc... without an USB-C connector and no PD events.
Add a property that documents the static lanes mapping to
each underlying PHY to allow supporting boards directly
connecting USB3 and DisplayPort lanes to the QMP Combo
lanes.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
.../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
@@ -76,6 +76,35 @@ properties:
mode-switch: true
orientation-switch: true
+ qcom,static-lanes-mapping:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 4
+ items:
+ enum:
+ - 0 # Unconnected (PHY_NONE)
+ - 4 # USB3 (PHY_TYPE_USB3)
+ - 6 # DisplayPort (PHY_TYPE_DP)
+ description:
+ Describes the static mapping of the Combo PHY lanes, when not used
+ a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
+ The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
+ Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
+ be connected to the DP PHY.
+ The numbers corresponds to the PHY Type the lanes are connected to.
+ The possible combinations are
+ <0 0 0 0> when none are connected
+ <4 4 0 6> USB3 and DP single lane
+ <4 4 6 6> USB3 and DP
+ <6 6 4 4> DP and USB3
+ <6 0 4 4> DP and USB3 single lane
+ <4 4 0 0> USB3 Only
+ <0 0 4 4> USB3 Only
+ <6 0 0 0> DP single lane
+ <0 0 0 6> DP single lane
+ <6 6 0 0> DP 2 lanes
+ <0 0 6 6> DP 2 lanes
+ <6 6 6 6> DP 4 lanes
+
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 4/5] phy: qcom: qmp-combo: get the static lanes mapping from DT
2025-09-02 9:00 [PATCH v2 0/5] arm64: qcom: x1e78100-lenovo-thinkpad-t14s: add support for HDMI output Neil Armstrong
` (2 preceding siblings ...)
2025-09-02 9:00 ` [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping Neil Armstrong
@ 2025-09-02 9:00 ` Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 5/5] arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: add HDMI nodes Neil Armstrong
4 siblings, 0 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 9:00 UTC (permalink / raw)
To: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy,
Neil Armstrong
The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
of a combo glue to route either lanes to the 4 shared physical lanes.
The routing of the lanes can be:
- 2 DP + 2 USB3
- 4 DP
- 2 USB3
Get the static lanes mapping from DT and stop registering the
USB-C muxes in favor of a static mode and orientation detemined
by the mapping.
This allows supporting boards with direct connection of USB3 and
DisplayPort lanes to the QMP Combo PHY lanes, not using the
USB-C Altmode feature.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 118 +++++++++++++++++++++++++++---
1 file changed, 109 insertions(+), 9 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 7b5af30f1d028c592500e723ecd27b54ed554709..9a121a61e77ed8a839fa0fb588ec379382fb63b2 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -24,6 +24,7 @@
#include <drm/bridge/aux-bridge.h>
+#include <dt-bindings/phy/phy.h>
#include <dt-bindings/phy/phy-qcom-qmp.h>
#include "phy-qcom-qmp-common.h"
@@ -1744,6 +1745,85 @@ static const u8 qmp_dp_v6_pre_emphasis_hbr_rbr[4][4] = {
{ 0x22, 0xff, 0xff, 0xff }
};
+static struct qmp_lanes_mapping {
+ u32 map[4];
+ enum qmpphy_mode mode;
+ enum typec_orientation orientation;
+} const qmpphy_lanes_mapping[] = {
+ /* No lanes connected, set 'safe' USB3 mode */
+ {
+ .map = {PHY_NONE, PHY_NONE, PHY_NONE, PHY_NONE},
+ .mode = QMPPHY_MODE_USB3_ONLY,
+ .orientation = TYPEC_ORIENTATION_NONE,
+ },
+ /* USB3 Only */
+ {
+ .map = {PHY_TYPE_USB3, PHY_TYPE_USB3, PHY_NONE, PHY_NONE},
+ .mode = QMPPHY_MODE_USB3_ONLY,
+ .orientation = TYPEC_ORIENTATION_NORMAL,
+ },
+ /* USB3 Only, reverted */
+ {
+ .map = {PHY_NONE, PHY_NONE, PHY_TYPE_USB3, PHY_TYPE_USB3},
+ .mode = QMPPHY_MODE_USB3_ONLY,
+ .orientation = TYPEC_ORIENTATION_REVERSE,
+ },
+ /* USB3 and DP single lane */
+ {
+ .map = {PHY_TYPE_USB3, PHY_TYPE_USB3, PHY_NONE, PHY_TYPE_DP},
+ .mode = QMPPHY_MODE_USB3DP,
+ .orientation = TYPEC_ORIENTATION_NORMAL,
+ },
+ /* USB3 and DP */
+ {
+ .map = {PHY_TYPE_USB3, PHY_TYPE_USB3, PHY_TYPE_DP, PHY_TYPE_DP},
+ .mode = QMPPHY_MODE_USB3DP,
+ .orientation = TYPEC_ORIENTATION_NORMAL,
+ },
+ /* DP single lane and USB3 */
+ {
+ .map = {PHY_TYPE_DP, PHY_NONE, PHY_TYPE_USB3, PHY_TYPE_USB3},
+ .mode = QMPPHY_MODE_USB3DP,
+ .orientation = TYPEC_ORIENTATION_REVERSE,
+ },
+ /* DP and USB3 */
+ {
+ .map = {PHY_TYPE_DP, PHY_TYPE_DP, PHY_TYPE_USB3, PHY_TYPE_USB3},
+ .mode = QMPPHY_MODE_USB3DP,
+ .orientation = TYPEC_ORIENTATION_REVERSE,
+ },
+ /* DP single lane */
+ {
+ .map = {PHY_TYPE_DP, PHY_NONE, PHY_NONE, PHY_NONE},
+ .mode = QMPPHY_MODE_DP_ONLY,
+ .orientation = TYPEC_ORIENTATION_REVERSE,
+ },
+ /* DP 2 lanes */
+ {
+ .map = {PHY_TYPE_DP, PHY_TYPE_DP, PHY_NONE, PHY_NONE},
+ .mode = QMPPHY_MODE_DP_ONLY,
+ .orientation = TYPEC_ORIENTATION_REVERSE,
+ },
+ /* DP 4 lanes */
+ {
+ .map = {PHY_TYPE_DP, PHY_TYPE_DP, PHY_TYPE_DP, PHY_TYPE_DP},
+ .mode = QMPPHY_MODE_DP_ONLY,
+ .orientation = TYPEC_ORIENTATION_NORMAL,
+ },
+ /* DP 2 lanes, reverted */
+ {
+ .map = {PHY_NONE, PHY_NONE, PHY_TYPE_DP, PHY_TYPE_DP},
+ .mode = QMPPHY_MODE_DP_ONLY,
+ .orientation = TYPEC_ORIENTATION_NORMAL,
+ },
+ /* DP single lane, reverted */
+ {
+ .map = {PHY_NONE, PHY_NONE, PHY_NONE, PHY_TYPE_DP},
+ .mode = QMPPHY_MODE_DP_ONLY,
+ .orientation = TYPEC_ORIENTATION_NORMAL,
+ },
+};
+
struct qmp_combo;
struct qmp_combo_offsets {
@@ -4123,7 +4203,7 @@ static int qmp_combo_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *dp_np, *usb_np;
struct phy_provider *phy_provider;
- int ret;
+ int ret, i;
qmp = devm_kzalloc(dev, sizeof(*qmp), GFP_KERNEL);
if (!qmp)
@@ -4167,9 +4247,34 @@ static int qmp_combo_probe(struct platform_device *pdev)
if (ret)
goto err_node_put;
- ret = qmp_combo_typec_register(qmp);
- if (ret)
- goto err_node_put;
+ qmp->qmpphy_mode = QMPPHY_MODE_USB3DP;
+
+ if (of_find_property(dev->of_node, "qcom,static-lanes-mapping", NULL)) {
+ u32 mapping[4];
+
+ ret = of_property_read_u32_array(dev->of_node, "qcom,static-lanes-mapping",
+ mapping, 4);
+ if (ret) {
+ dev_err(dev, "failed to read static lanes mapping: %d\n", ret);
+ goto err_node_put;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(qmpphy_lanes_mapping); ++i) {
+ if (memcmp(mapping, &qmpphy_lanes_mapping[i].map, sizeof(mapping)))
+ continue;
+
+ qmp->qmpphy_mode = qmpphy_lanes_mapping[i].mode;
+ qmp->orientation = qmpphy_lanes_mapping[i].orientation;
+
+ break;
+ }
+ if (i == ARRAY_SIZE(qmpphy_lanes_mapping))
+ dev_warn(dev, "invalid qcom,static-lanes-mapping, keeping default\n");
+ } else {
+ ret = qmp_combo_typec_register(qmp);
+ if (ret)
+ goto err_node_put;
+ }
ret = drm_aux_bridge_register(dev);
if (ret)
@@ -4189,11 +4294,6 @@ static int qmp_combo_probe(struct platform_device *pdev)
if (ret)
goto err_node_put;
- /*
- * The hw default is USB3_ONLY, but USB3+DP mode lets us more easily
- * check both sub-blocks' init tables for blunders at probe time.
- */
- qmp->qmpphy_mode = QMPPHY_MODE_USB3DP;
qmp->usb_phy = devm_phy_create(dev, usb_np, &qmp_combo_usb_phy_ops);
if (IS_ERR(qmp->usb_phy)) {
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 5/5] arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: add HDMI nodes
2025-09-02 9:00 [PATCH v2 0/5] arm64: qcom: x1e78100-lenovo-thinkpad-t14s: add support for HDMI output Neil Armstrong
` (3 preceding siblings ...)
2025-09-02 9:00 ` [PATCH v2 4/5] phy: qcom: qmp-combo: get the static lanes mapping from DT Neil Armstrong
@ 2025-09-02 9:00 ` Neil Armstrong
4 siblings, 0 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 9:00 UTC (permalink / raw)
To: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy,
Neil Armstrong
The Thinkpad T14s embeds a transparent 4lanes DP->HDMI transceiver
connected to the third QMP Combo PHY 4 lanes.
Add all the data routing, disable mode switching and specify the
QMP Combo PHY should be in DP-Only mode to route the 4 lanes to
the underlying DP phy.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
.../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 70 ++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
index 4cf61c2a34e31233b1adc93332bcabef22de3f86..1ff183844a48d67888a0f4cf8342575ce7f7af47 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/phy/phy.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
@@ -62,6 +63,45 @@ switch-lid {
};
};
+ hdmi-bridge {
+ compatible = "realtek,rtd2171";
+
+ 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>;
+ };
+ };
+
+ 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>;
+ };
+ };
+ };
+
pmic-glink {
compatible = "qcom,x1e80100-pmic-glink",
"qcom,sm8550-pmic-glink",
@@ -1007,6 +1047,14 @@ &mdss_dp1_out {
link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
};
+&mdss_dp2 {
+ status = "okay";
+};
+
+&mdss_dp2_out {
+ data-lanes = <0 1 2 3>;
+};
+
&mdss_dp3 {
/delete-property/ #sound-dai-cells;
@@ -1263,6 +1311,12 @@ &tlmm {
<72 2>, /* Secure EC I2C connection (?) */
<238 1>; /* UFS Reset */
+ hdmi_hpd_default: hdmi-hpd-default-state {
+ pins = "gpio126";
+ function = "usb2_dp";
+ bias-disable;
+ };
+
eusb3_reset_n: eusb3-reset-n-state {
pins = "gpio6";
function = "gpio";
@@ -1486,6 +1540,22 @@ &usb_1_ss0_qmpphy_out {
remote-endpoint = <&retimer_ss0_ss_in>;
};
+&usb_1_ss2_qmpphy {
+ vdda-phy-supply = <&vreg_l2j_1p2>;
+ vdda-pll-supply = <&vreg_l2d_0p9>;
+
+ qcom,static-lanes-mapping = <PHY_TYPE_DP PHY_TYPE_DP PHY_TYPE_DP PHY_TYPE_DP>;
+
+ /delete-property/ mode-switch;
+ /delete-property/ orientation-switch;
+
+ status = "okay";
+};
+
+&usb_1_ss2_qmpphy_out {
+ remote-endpoint = <&hdmi_bridge_dp_in>;
+};
+
&usb_1_ss1_hsphy {
vdd-supply = <&vreg_l3j_0p8>;
vdda12-supply = <&vreg_l2j_1p2>;
--
2.34.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2 2/5] drm/bridge: simple: add Realtek RTD2171 DP-to-HDMI bridge
2025-09-02 9:00 ` [PATCH v2 2/5] drm/bridge: simple: add " Neil Armstrong
@ 2025-09-02 9:23 ` Dmitry Baryshkov
0 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-09-02 9:23 UTC (permalink / raw)
To: Neil Armstrong
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On Tue, Sep 02, 2025 at 11:00:29AM +0200, Neil Armstrong wrote:
> Add support for the transparent Realtek RTD2171 DP-to-HDMI bridge.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> drivers/gpu/drm/bridge/simple-bridge.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 9:00 ` [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping Neil Armstrong
@ 2025-09-02 9:30 ` Dmitry Baryshkov
2025-09-02 9:35 ` Neil Armstrong
2025-09-02 11:50 ` Konrad Dybcio
2025-09-03 7:07 ` Krzysztof Kozlowski
2 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-09-02 9:30 UTC (permalink / raw)
To: Neil Armstrong
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote:
> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
> of a combo glue to route either lanes to the 4 shared physical lanes.
>
> The routing of the lanes can be:
> - 2 DP + 2 USB3
> - 4 DP
> - 2 USB3
>
> The layout of the lanes was designed to be mapped and swapped
> related to the USB-C Power Delivery negociation, so it supports
> a finite set of mappings inherited by the USB-C Altmode layouts.
>
> Nevertheless those QMP Comby PHY can be statically used to
> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
> etc... without an USB-C connector and no PD events.
>
> Add a property that documents the static lanes mapping to
> each underlying PHY to allow supporting boards directly
> connecting USB3 and DisplayPort lanes to the QMP Combo
> lanes.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> @@ -76,6 +76,35 @@ properties:
> mode-switch: true
> orientation-switch: true
>
> + qcom,static-lanes-mapping:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 4
> + items:
> + enum:
> + - 0 # Unconnected (PHY_NONE)
> + - 4 # USB3 (PHY_TYPE_USB3)
> + - 6 # DisplayPort (PHY_TYPE_DP)
> + description:
> + Describes the static mapping of the Combo PHY lanes, when not used
> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
> + be connected to the DP PHY.
It feels like this significantly duplicates existing data-lanes
definitions. Can we use that property to express the same semantics?
> + The numbers corresponds to the PHY Type the lanes are connected to.
> + The possible combinations are
> + <0 0 0 0> when none are connected
> + <4 4 0 6> USB3 and DP single lane
> + <4 4 6 6> USB3 and DP
> + <6 6 4 4> DP and USB3
> + <6 0 4 4> DP and USB3 single lane
> + <4 4 0 0> USB3 Only
> + <0 0 4 4> USB3 Only
> + <6 0 0 0> DP single lane
> + <0 0 0 6> DP single lane
> + <6 6 0 0> DP 2 lanes
> + <0 0 6 6> DP 2 lanes
> + <6 6 6 6> DP 4 lanes
> +
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
> properties:
>
> --
> 2.34.1
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 9:30 ` Dmitry Baryshkov
@ 2025-09-02 9:35 ` Neil Armstrong
2025-09-02 9:46 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 9:35 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On 02/09/2025 11:30, Dmitry Baryshkov wrote:
> On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote:
>> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
>> of a combo glue to route either lanes to the 4 shared physical lanes.
>>
>> The routing of the lanes can be:
>> - 2 DP + 2 USB3
>> - 4 DP
>> - 2 USB3
>>
>> The layout of the lanes was designed to be mapped and swapped
>> related to the USB-C Power Delivery negociation, so it supports
>> a finite set of mappings inherited by the USB-C Altmode layouts.
>>
>> Nevertheless those QMP Comby PHY can be statically used to
>> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
>> etc... without an USB-C connector and no PD events.
>>
>> Add a property that documents the static lanes mapping to
>> each underlying PHY to allow supporting boards directly
>> connecting USB3 and DisplayPort lanes to the QMP Combo
>> lanes.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
>> 1 file changed, 29 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> @@ -76,6 +76,35 @@ properties:
>> mode-switch: true
>> orientation-switch: true
>>
>> + qcom,static-lanes-mapping:
>> + $ref: /schemas/types.yaml#/definitions/uint32-array
>> + minItems: 4
>> + items:
>> + enum:
>> + - 0 # Unconnected (PHY_NONE)
>> + - 4 # USB3 (PHY_TYPE_USB3)
>> + - 6 # DisplayPort (PHY_TYPE_DP)
>> + description:
>> + Describes the static mapping of the Combo PHY lanes, when not used
>> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
>> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
>> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
>> + be connected to the DP PHY.
>
> It feels like this significantly duplicates existing data-lanes
> definitions. Can we use that property to express the same semantics?
Well yes it has the same semantics, but not really the same meaning. data-lanes is designed
to describes the lanes layout/ordering, not the type/mapping.
Here, we do not describe the ordering, i.e which source lane is connected to which endpoint splot,
but which lane is supposed to connect to which internal PHY.
Anyway, I'm open to suggestions.
Neil
>
>
>> + The numbers corresponds to the PHY Type the lanes are connected to.
>> + The possible combinations are
>> + <0 0 0 0> when none are connected
>> + <4 4 0 6> USB3 and DP single lane
>> + <4 4 6 6> USB3 and DP
>> + <6 6 4 4> DP and USB3
>> + <6 0 4 4> DP and USB3 single lane
>> + <4 4 0 0> USB3 Only
>> + <0 0 4 4> USB3 Only
>> + <6 0 0 0> DP single lane
>> + <0 0 0 6> DP single lane
>> + <6 6 0 0> DP 2 lanes
>> + <0 0 6 6> DP 2 lanes
>> + <6 6 6 6> DP 4 lanes
>> +
>> ports:
>> $ref: /schemas/graph.yaml#/properties/ports
>> properties:
>>
>> --
>> 2.34.1
>>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 9:35 ` Neil Armstrong
@ 2025-09-02 9:46 ` Dmitry Baryshkov
2025-09-02 10:05 ` Neil Armstrong
0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-09-02 9:46 UTC (permalink / raw)
To: Neil Armstrong
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On Tue, Sep 02, 2025 at 11:35:25AM +0200, Neil Armstrong wrote:
> On 02/09/2025 11:30, Dmitry Baryshkov wrote:
> > On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote:
> > > The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
> > > of a combo glue to route either lanes to the 4 shared physical lanes.
> > >
> > > The routing of the lanes can be:
> > > - 2 DP + 2 USB3
> > > - 4 DP
> > > - 2 USB3
> > >
> > > The layout of the lanes was designed to be mapped and swapped
> > > related to the USB-C Power Delivery negociation, so it supports
> > > a finite set of mappings inherited by the USB-C Altmode layouts.
> > >
> > > Nevertheless those QMP Comby PHY can be statically used to
> > > drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
> > > etc... without an USB-C connector and no PD events.
> > >
> > > Add a property that documents the static lanes mapping to
> > > each underlying PHY to allow supporting boards directly
> > > connecting USB3 and DisplayPort lanes to the QMP Combo
> > > lanes.
> > >
> > > Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> > > ---
> > > .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
> > > 1 file changed, 29 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> > > index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
> > > --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> > > +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> > > @@ -76,6 +76,35 @@ properties:
> > > mode-switch: true
> > > orientation-switch: true
> > > + qcom,static-lanes-mapping:
> > > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > > + minItems: 4
> > > + items:
> > > + enum:
> > > + - 0 # Unconnected (PHY_NONE)
> > > + - 4 # USB3 (PHY_TYPE_USB3)
> > > + - 6 # DisplayPort (PHY_TYPE_DP)
> > > + description:
> > > + Describes the static mapping of the Combo PHY lanes, when not used
> > > + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
> > > + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
> > > + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
> > > + be connected to the DP PHY.
> >
> > It feels like this significantly duplicates existing data-lanes
> > definitions. Can we use that property to express the same semantics?
>
> Well yes it has the same semantics, but not really the same meaning. data-lanes is designed
> to describes the lanes layout/ordering, not the type/mapping.
>
> Here, we do not describe the ordering, i.e which source lane is connected to which endpoint splot,
> but which lane is supposed to connect to which internal PHY.
>
> Anyway, I'm open to suggestions.
phy@abcdef {
ports {
port@1 {
endpoint {
remote-endpoint = <&&usb_1_dwc3_ss>;
data-lanes = <2 3>;
};
};
port@2 {
endpoint {
remote-endpoint = <&mdss_dp0_out>;
data-lanes = <1>;
};
};
};
};
phy@cafecafe {
ports {
port@1 {
endpoint {
remote-endpoint = <&&usb_1_dwc3_ss>;
status = "disabled";
};
};
port@2 {
endpoint {
remote-endpoint = <&mdss_dp0_out>;
data-lanes = <2 3 0 1>;
};
};
};
};
>
> Neil
>
> >
> >
> > > + The numbers corresponds to the PHY Type the lanes are connected to.
> > > + The possible combinations are
> > > + <0 0 0 0> when none are connected
> > > + <4 4 0 6> USB3 and DP single lane
> > > + <4 4 6 6> USB3 and DP
> > > + <6 6 4 4> DP and USB3
> > > + <6 0 4 4> DP and USB3 single lane
> > > + <4 4 0 0> USB3 Only
> > > + <0 0 4 4> USB3 Only
> > > + <6 0 0 0> DP single lane
> > > + <0 0 0 6> DP single lane
> > > + <6 6 0 0> DP 2 lanes
> > > + <0 0 6 6> DP 2 lanes
> > > + <6 6 6 6> DP 4 lanes
> > > +
> > > ports:
> > > $ref: /schemas/graph.yaml#/properties/ports
> > > properties:
> > >
> > > --
> > > 2.34.1
> > >
> >
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge
2025-09-02 9:00 ` [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge Neil Armstrong
@ 2025-09-02 9:51 ` Maud Spierings
2025-09-03 6:52 ` Krzysztof Kozlowski
1 sibling, 0 replies; 19+ messages in thread
From: Maud Spierings @ 2025-09-02 9:51 UTC (permalink / raw)
To: neil.armstrong
Cc: Laurent.pinchart, airlied, andersson, andrzej.hajda, conor+dt,
devicetree, dri-devel, jernej.skrabec, jonas, kishon, konradybcio,
krzk+dt, linux-arm-msm, linux-kernel, linux-phy,
maarten.lankhorst, mripard, rfoss, robh, simona, tzimmermann,
vkoul
Hello Neil,
> The Realtek RTD2171 chipset is a transparent DisplayPort 1.4 to
> HDMI 2.0 bridge.
>
> This chipset is usually found in USB-C To HDMI Adapters and Docks,
> or laptops to provide HDMI display output.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml
> index 43cf4df9811a5897843685727a49fd5a90096391..003a1c934f863864400d689cd784990cbc1de3de 100644
> --- a/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml
> +++ b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml
> @@ -28,6 +28,7 @@ properties:
> - enum:
> - adi,adv7123
> - dumb-vga-dac
> + - realtek,rtd2171
> - ti,opa362
> - ti,ths8134
> - ti,ths8135
>
> --
> 2.34.1
I think this has to be rebased on the latest next since [1] got merged.
I think we also need to consider maybe using a fallback compatible,
because I think there is going to be a couple of simple DP->HDMI bridges
on the mailing list.
Link:
https://lore.kernel.org/all/20250822063959.692098-6-andyshrk@163.com/ [1]
Kind regards,
Maud
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 9:46 ` Dmitry Baryshkov
@ 2025-09-02 10:05 ` Neil Armstrong
2025-09-02 12:22 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 10:05 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On 02/09/2025 11:46, Dmitry Baryshkov wrote:
> On Tue, Sep 02, 2025 at 11:35:25AM +0200, Neil Armstrong wrote:
>> On 02/09/2025 11:30, Dmitry Baryshkov wrote:
>>> On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote:
>>>> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
>>>> of a combo glue to route either lanes to the 4 shared physical lanes.
>>>>
>>>> The routing of the lanes can be:
>>>> - 2 DP + 2 USB3
>>>> - 4 DP
>>>> - 2 USB3
>>>>
>>>> The layout of the lanes was designed to be mapped and swapped
>>>> related to the USB-C Power Delivery negociation, so it supports
>>>> a finite set of mappings inherited by the USB-C Altmode layouts.
>>>>
>>>> Nevertheless those QMP Comby PHY can be statically used to
>>>> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
>>>> etc... without an USB-C connector and no PD events.
>>>>
>>>> Add a property that documents the static lanes mapping to
>>>> each underlying PHY to allow supporting boards directly
>>>> connecting USB3 and DisplayPort lanes to the QMP Combo
>>>> lanes.
>>>>
>>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>>> ---
>>>> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
>>>> 1 file changed, 29 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>>>> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
>>>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>>>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>>>> @@ -76,6 +76,35 @@ properties:
>>>> mode-switch: true
>>>> orientation-switch: true
>>>> + qcom,static-lanes-mapping:
>>>> + $ref: /schemas/types.yaml#/definitions/uint32-array
>>>> + minItems: 4
>>>> + items:
>>>> + enum:
>>>> + - 0 # Unconnected (PHY_NONE)
>>>> + - 4 # USB3 (PHY_TYPE_USB3)
>>>> + - 6 # DisplayPort (PHY_TYPE_DP)
>>>> + description:
>>>> + Describes the static mapping of the Combo PHY lanes, when not used
>>>> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
>>>> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
>>>> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
>>>> + be connected to the DP PHY.
>>>
>>> It feels like this significantly duplicates existing data-lanes
>>> definitions. Can we use that property to express the same semantics?
>>
>> Well yes it has the same semantics, but not really the same meaning. data-lanes is designed
>> to describes the lanes layout/ordering, not the type/mapping.
>>
>> Here, we do not describe the ordering, i.e which source lane is connected to which endpoint splot,
>> but which lane is supposed to connect to which internal PHY.
>>
>> Anyway, I'm open to suggestions.
>
> phy@abcdef {
> ports {
> port@1 {
> endpoint {
> remote-endpoint = <&&usb_1_dwc3_ss>;
> data-lanes = <2 3>;
> };
> };
>
> port@2 {
> endpoint {
> remote-endpoint = <&mdss_dp0_out>;
> data-lanes = <1>;
> };
> };
> };
> };
>
> phy@cafecafe {
> ports {
> port@1 {
> endpoint {
> remote-endpoint = <&&usb_1_dwc3_ss>;
> status = "disabled";
> };
> };
>
> port@2 {
> endpoint {
> remote-endpoint = <&mdss_dp0_out>;
> data-lanes = <2 3 0 1>;
> };
> };
> };
> };
This is wrong, those are the internal connections to the controllers,
those are fixed. I'm speaking about the external lanes, but there's only
a single port.
So, following your suggestion, we should use the Output port 0, but as it's
only a single port it would need to have 2 endpoints, one for USB3 and one for
DP.
For example:
\{
dp-connector {
compatible = "dp-connector";
type = "a";
port {
dp_con: endpoint {
remote-endpoint = <&usb_1_ss2_qmpphy_dp_out>;
};
};
};
usb-a-connector {
compatible = "usb-a-connector";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
usb_con_hs: endpoint {
remote-endpoint = <&usb_1_ss2_dwc3_hs>;
};
};
port@1 {
reg = <1>;
usb_con_ss: endpoint {
remote-endpoint = <&usb_1_ss2_qmpphy_usb3_out>;
};
};
};
};
};
&usb_1_ss2_dwc3_hs {
remote-endpoint = <&usb_1_ss2_dwc3_hs>;
};
&usb_1_ss2_qmpphy {
/delete-property/ mode-switch;
/delete-property/ orientation-switch;
ports {
port@0{
#address-cells = <1>;
#size-cells = <0>;
/delete-node/ endpoint;
usb_1_ss2_qmpphy_usb3_out: endpoint@0 {
reg = <0>;
remote-endpoint = <&usb_con_ss>;
data-lanes = <1 2 0 0>;
};
usb_1_ss2_qmpphy_dp_out: endpoint@1 {
reg = <1>;
remote-endpoint = <&dp_con>;
data-lanes = <0 0 1 2>;
};
};
};
};
So the driver logic would need to look at the port0/endpoint0 and port0/endpoint1
data-lanes to figure out the mode.
Is this what you were thinking ?
Neil
>
>
>>
>> Neil
>>
>>>
>>>
>>>> + The numbers corresponds to the PHY Type the lanes are connected to.
>>>> + The possible combinations are
>>>> + <0 0 0 0> when none are connected
>>>> + <4 4 0 6> USB3 and DP single lane
>>>> + <4 4 6 6> USB3 and DP
>>>> + <6 6 4 4> DP and USB3
>>>> + <6 0 4 4> DP and USB3 single lane
>>>> + <4 4 0 0> USB3 Only
>>>> + <0 0 4 4> USB3 Only
>>>> + <6 0 0 0> DP single lane
>>>> + <0 0 0 6> DP single lane
>>>> + <6 6 0 0> DP 2 lanes
>>>> + <0 0 6 6> DP 2 lanes
>>>> + <6 6 6 6> DP 4 lanes
>>>> +
>>>> ports:
>>>> $ref: /schemas/graph.yaml#/properties/ports
>>>> properties:
>>>>
>>>> --
>>>> 2.34.1
>>>>
>>>
>>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 9:00 ` [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping Neil Armstrong
2025-09-02 9:30 ` Dmitry Baryshkov
@ 2025-09-02 11:50 ` Konrad Dybcio
2025-09-02 11:59 ` Neil Armstrong
2025-09-03 7:07 ` Krzysztof Kozlowski
2 siblings, 1 reply; 19+ messages in thread
From: Konrad Dybcio @ 2025-09-02 11:50 UTC (permalink / raw)
To: Neil Armstrong, Andrzej Hajda, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy
On 9/2/25 11:00 AM, Neil Armstrong wrote:
> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
> of a combo glue to route either lanes to the 4 shared physical lanes.
>
> The routing of the lanes can be:
> - 2 DP + 2 USB3
> - 4 DP
> - 2 USB3
>
> The layout of the lanes was designed to be mapped and swapped
> related to the USB-C Power Delivery negociation, so it supports
> a finite set of mappings inherited by the USB-C Altmode layouts.
>
> Nevertheless those QMP Comby PHY can be statically used to
> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
> etc... without an USB-C connector and no PD events.
>
> Add a property that documents the static lanes mapping to
> each underlying PHY to allow supporting boards directly
> connecting USB3 and DisplayPort lanes to the QMP Combo
> lanes.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> @@ -76,6 +76,35 @@ properties:
> mode-switch: true
> orientation-switch: true
>
> + qcom,static-lanes-mapping:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 4
> + items:
> + enum:
> + - 0 # Unconnected (PHY_NONE)
> + - 4 # USB3 (PHY_TYPE_USB3)
> + - 6 # DisplayPort (PHY_TYPE_DP)
> + description:
> + Describes the static mapping of the Combo PHY lanes, when not used
> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
> + be connected to the DP PHY.
> + The numbers corresponds to the PHY Type the lanes are connected to.
> + The possible combinations are
> + <0 0 0 0> when none are connected
> + <4 4 0 6> USB3 and DP single lane
> + <4 4 6 6> USB3 and DP
> + <6 6 4 4> DP and USB3
> + <6 0 4 4> DP and USB3 single lane
> + <4 4 0 0> USB3 Only
> + <0 0 4 4> USB3 Only
> + <6 0 0 0> DP single lane
> + <0 0 0 6> DP single lane
> + <6 6 0 0> DP 2 lanes
> + <0 0 6 6> DP 2 lanes
> + <6 6 6 6> DP 4 lanes
Would
oneOf:
- [0, 0, 0, 0]
- ...
or something similar work here?
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 11:50 ` Konrad Dybcio
@ 2025-09-02 11:59 ` Neil Armstrong
0 siblings, 0 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 11:59 UTC (permalink / raw)
To: Konrad Dybcio, Andrzej Hajda, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, linux-phy
On 02/09/2025 13:50, Konrad Dybcio wrote:
> On 9/2/25 11:00 AM, Neil Armstrong wrote:
>> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
>> of a combo glue to route either lanes to the 4 shared physical lanes.
>>
>> The routing of the lanes can be:
>> - 2 DP + 2 USB3
>> - 4 DP
>> - 2 USB3
>>
>> The layout of the lanes was designed to be mapped and swapped
>> related to the USB-C Power Delivery negociation, so it supports
>> a finite set of mappings inherited by the USB-C Altmode layouts.
>>
>> Nevertheless those QMP Comby PHY can be statically used to
>> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
>> etc... without an USB-C connector and no PD events.
>>
>> Add a property that documents the static lanes mapping to
>> each underlying PHY to allow supporting boards directly
>> connecting USB3 and DisplayPort lanes to the QMP Combo
>> lanes.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
>> 1 file changed, 29 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> @@ -76,6 +76,35 @@ properties:
>> mode-switch: true
>> orientation-switch: true
>>
>> + qcom,static-lanes-mapping:
>> + $ref: /schemas/types.yaml#/definitions/uint32-array
>> + minItems: 4
>> + items:
>> + enum:
>> + - 0 # Unconnected (PHY_NONE)
>> + - 4 # USB3 (PHY_TYPE_USB3)
>> + - 6 # DisplayPort (PHY_TYPE_DP)
>> + description:
>> + Describes the static mapping of the Combo PHY lanes, when not used
>> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
>> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
>> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
>> + be connected to the DP PHY.
>> + The numbers corresponds to the PHY Type the lanes are connected to.
>> + The possible combinations are
>> + <0 0 0 0> when none are connected
>> + <4 4 0 6> USB3 and DP single lane
>> + <4 4 6 6> USB3 and DP
>> + <6 6 4 4> DP and USB3
>> + <6 0 4 4> DP and USB3 single lane
>> + <4 4 0 0> USB3 Only
>> + <0 0 4 4> USB3 Only
>> + <6 0 0 0> DP single lane
>> + <0 0 0 6> DP single lane
>> + <6 6 0 0> DP 2 lanes
>> + <0 0 6 6> DP 2 lanes
>> + <6 6 6 6> DP 4 lanes
>
> Would
>
> oneOf:
> - [0, 0, 0, 0]
> - ...
>
> or something similar work here?
I need to check, but I may need to do that instead:
oneOf:
- items:
- 0
- 0
- 0
- 0
- items:
- 4
- 4
- 6
- 6
...
But I want to be extra sure this is the right path before
Neil
>
> Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 10:05 ` Neil Armstrong
@ 2025-09-02 12:22 ` Dmitry Baryshkov
2025-09-02 12:29 ` Neil Armstrong
0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-09-02 12:22 UTC (permalink / raw)
To: Neil Armstrong
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On Tue, Sep 02, 2025 at 12:05:45PM +0200, Neil Armstrong wrote:
> On 02/09/2025 11:46, Dmitry Baryshkov wrote:
> > On Tue, Sep 02, 2025 at 11:35:25AM +0200, Neil Armstrong wrote:
> > > On 02/09/2025 11:30, Dmitry Baryshkov wrote:
> > > > On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote:
> > > > > The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
> > > > > of a combo glue to route either lanes to the 4 shared physical lanes.
> > > > >
> > > > > The routing of the lanes can be:
> > > > > - 2 DP + 2 USB3
> > > > > - 4 DP
> > > > > - 2 USB3
> > > > >
> > > > > The layout of the lanes was designed to be mapped and swapped
> > > > > related to the USB-C Power Delivery negociation, so it supports
> > > > > a finite set of mappings inherited by the USB-C Altmode layouts.
> > > > >
> > > > > Nevertheless those QMP Comby PHY can be statically used to
> > > > > drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
> > > > > etc... without an USB-C connector and no PD events.
> > > > >
> > > > > Add a property that documents the static lanes mapping to
> > > > > each underlying PHY to allow supporting boards directly
> > > > > connecting USB3 and DisplayPort lanes to the QMP Combo
> > > > > lanes.
> > > > >
> > > > > Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> > > > > ---
> > > > > .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
> > > > > 1 file changed, 29 insertions(+)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> > > > > index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
> > > > > --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> > > > > +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> > > > > @@ -76,6 +76,35 @@ properties:
> > > > > mode-switch: true
> > > > > orientation-switch: true
> > > > > + qcom,static-lanes-mapping:
> > > > > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > > > > + minItems: 4
> > > > > + items:
> > > > > + enum:
> > > > > + - 0 # Unconnected (PHY_NONE)
> > > > > + - 4 # USB3 (PHY_TYPE_USB3)
> > > > > + - 6 # DisplayPort (PHY_TYPE_DP)
> > > > > + description:
> > > > > + Describes the static mapping of the Combo PHY lanes, when not used
> > > > > + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
> > > > > + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
> > > > > + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
> > > > > + be connected to the DP PHY.
> > > >
> > > > It feels like this significantly duplicates existing data-lanes
> > > > definitions. Can we use that property to express the same semantics?
> > >
> > > Well yes it has the same semantics, but not really the same meaning. data-lanes is designed
> > > to describes the lanes layout/ordering, not the type/mapping.
> > >
> > > Here, we do not describe the ordering, i.e which source lane is connected to which endpoint splot,
> > > but which lane is supposed to connect to which internal PHY.
> > >
> > > Anyway, I'm open to suggestions.
> >
> > phy@abcdef {
> > ports {
> > port@1 {
> > endpoint {
> > remote-endpoint = <&&usb_1_dwc3_ss>;
> > data-lanes = <2 3>;
> > };
> > };
> >
> > port@2 {
> > endpoint {
> > remote-endpoint = <&mdss_dp0_out>;
> > data-lanes = <1>;
> > };
> > };
> > };
> > };
> >
> > phy@cafecafe {
> > ports {
> > port@1 {
> > endpoint {
> > remote-endpoint = <&&usb_1_dwc3_ss>;
> > status = "disabled";
> > };
> > };
> >
> > port@2 {
> > endpoint {
> > remote-endpoint = <&mdss_dp0_out>;
> > data-lanes = <2 3 0 1>;
> > };
> > };
> > };
> > };
>
> This is wrong, those are the internal connections to the controllers,
> those are fixed. I'm speaking about the external lanes, but there's only
> a single port.
>
> So, following your suggestion, we should use the Output port 0, but as it's
> only a single port it would need to have 2 endpoints, one for USB3 and one for
> DP.
>
> For example:
>
> \{
> dp-connector {
> compatible = "dp-connector";
> type = "a";
>
> port {
> dp_con: endpoint {
> remote-endpoint = <&usb_1_ss2_qmpphy_dp_out>;
> };
> };
> };
>
> usb-a-connector {
> compatible = "usb-a-connector";
>
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> reg = <0>;
> usb_con_hs: endpoint {
> remote-endpoint = <&usb_1_ss2_dwc3_hs>;
> };
> };
>
> port@1 {
> reg = <1>;
> usb_con_ss: endpoint {
> remote-endpoint = <&usb_1_ss2_qmpphy_usb3_out>;
> };
> };
> };
> };
>
> };
>
> &usb_1_ss2_dwc3_hs {
> remote-endpoint = <&usb_1_ss2_dwc3_hs>;
> };
>
> &usb_1_ss2_qmpphy {
> /delete-property/ mode-switch;
> /delete-property/ orientation-switch;
>
> ports {
>
> port@0{
> #address-cells = <1>;
> #size-cells = <0>;
>
> /delete-node/ endpoint;
>
> usb_1_ss2_qmpphy_usb3_out: endpoint@0 {
> reg = <0>;
>
> remote-endpoint = <&usb_con_ss>;
>
> data-lanes = <1 2 0 0>;
> };
>
> usb_1_ss2_qmpphy_dp_out: endpoint@1 {
> reg = <1>;
>
> remote-endpoint = <&dp_con>;
>
> data-lanes = <0 0 1 2>;
> };
> };
> };
> };
>
> So the driver logic would need to look at the port0/endpoint0 and port0/endpoint1
> data-lanes to figure out the mode.
>
> Is this what you were thinking ?
No, I was really thinking about the data-lanes in the PHY parts, so I
was incorrect there (which is incrrect as you've pointed out).
The endpoints approach looks interesting though.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 12:22 ` Dmitry Baryshkov
@ 2025-09-02 12:29 ` Neil Armstrong
0 siblings, 0 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-02 12:29 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On 02/09/2025 14:22, Dmitry Baryshkov wrote:
> On Tue, Sep 02, 2025 at 12:05:45PM +0200, Neil Armstrong wrote:
>> On 02/09/2025 11:46, Dmitry Baryshkov wrote:
<snip>
>>
>> This is wrong, those are the internal connections to the controllers,
>> those are fixed. I'm speaking about the external lanes, but there's only
>> a single port.
>>
>> So, following your suggestion, we should use the Output port 0, but as it's
>> only a single port it would need to have 2 endpoints, one for USB3 and one for
>> DP.
>>
>> For example:
>>
>> \{
>> dp-connector {
>> compatible = "dp-connector";
>> type = "a";
>>
>> port {
>> dp_con: endpoint {
>> remote-endpoint = <&usb_1_ss2_qmpphy_dp_out>;
>> };
>> };
>> };
>>
>> usb-a-connector {
>> compatible = "usb-a-connector";
>>
>> ports {
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> port@0 {
>> reg = <0>;
>> usb_con_hs: endpoint {
>> remote-endpoint = <&usb_1_ss2_dwc3_hs>;
>> };
>> };
>>
>> port@1 {
>> reg = <1>;
>> usb_con_ss: endpoint {
>> remote-endpoint = <&usb_1_ss2_qmpphy_usb3_out>;
>> };
>> };
>> };
>> };
>>
>> };
>>
>> &usb_1_ss2_dwc3_hs {
>> remote-endpoint = <&usb_1_ss2_dwc3_hs>;
>> };
>>
>> &usb_1_ss2_qmpphy {
>> /delete-property/ mode-switch;
>> /delete-property/ orientation-switch;
>>
>> ports {
>>
>> port@0{
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> /delete-node/ endpoint;
>>
>> usb_1_ss2_qmpphy_usb3_out: endpoint@0 {
>> reg = <0>;
>>
>> remote-endpoint = <&usb_con_ss>;
>>
>> data-lanes = <1 2 0 0>;
>> };
>>
>> usb_1_ss2_qmpphy_dp_out: endpoint@1 {
>> reg = <1>;
>>
>> remote-endpoint = <&dp_con>;
>>
>> data-lanes = <0 0 1 2>;
>> };
>> };
>> };
>> };
>>
>> So the driver logic would need to look at the port0/endpoint0 and port0/endpoint1
>> data-lanes to figure out the mode.
>>
>> Is this what you were thinking ?
>
> No, I was really thinking about the data-lanes in the PHY parts, so I
> was incorrect there (which is incrrect as you've pointed out).
>
> The endpoints approach looks interesting though.
>
Indeed this would accurately describe the data flow and lane mapping, but
I fear this would add a very complex logic in the driver.
Anyway I'll try to drop something.
Neil
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge
2025-09-02 9:00 ` [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge Neil Armstrong
2025-09-02 9:51 ` Maud Spierings
@ 2025-09-03 6:52 ` Krzysztof Kozlowski
1 sibling, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-03 6:52 UTC (permalink / raw)
To: Neil Armstrong
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On Tue, Sep 02, 2025 at 11:00:28AM +0200, Neil Armstrong wrote:
> The Realtek RTD2171 chipset is a transparent DisplayPort 1.4 to
> HDMI 2.0 bridge.
>
> This chipset is usually found in USB-C To HDMI Adapters and Docks,
> or laptops to provide HDMI display output.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-02 9:00 ` [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping Neil Armstrong
2025-09-02 9:30 ` Dmitry Baryshkov
2025-09-02 11:50 ` Konrad Dybcio
@ 2025-09-03 7:07 ` Krzysztof Kozlowski
2025-09-03 7:49 ` Neil Armstrong
2 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-03 7:07 UTC (permalink / raw)
To: Neil Armstrong
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote:
> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
> of a combo glue to route either lanes to the 4 shared physical lanes.
>
> The routing of the lanes can be:
> - 2 DP + 2 USB3
> - 4 DP
> - 2 USB3
>
> The layout of the lanes was designed to be mapped and swapped
> related to the USB-C Power Delivery negociation, so it supports
> a finite set of mappings inherited by the USB-C Altmode layouts.
>
> Nevertheless those QMP Comby PHY can be statically used to
> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
> etc... without an USB-C connector and no PD events.
What is the use case for static mapping? Embedded HDMI port on T14s
laptop?
>
> Add a property that documents the static lanes mapping to
> each underlying PHY to allow supporting boards directly
> connecting USB3 and DisplayPort lanes to the QMP Combo
> lanes.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
> @@ -76,6 +76,35 @@ properties:
> mode-switch: true
> orientation-switch: true
>
> + qcom,static-lanes-mapping:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 4
> + items:
> + enum:
> + - 0 # Unconnected (PHY_NONE)
> + - 4 # USB3 (PHY_TYPE_USB3)
> + - 6 # DisplayPort (PHY_TYPE_DP)
> + description:
> + Describes the static mapping of the Combo PHY lanes, when not used
> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
> + be connected to the DP PHY.
> + The numbers corresponds to the PHY Type the lanes are connected to.
> + The possible combinations are
> + <0 0 0 0> when none are connected
> + <4 4 0 6> USB3 and DP single lane
> + <4 4 6 6> USB3 and DP
> + <6 6 4 4> DP and USB3
> + <6 0 4 4> DP and USB3 single lane
> + <4 4 0 0> USB3 Only
> + <0 0 4 4> USB3 Only
Why do you need to handle here and in few other places mirrored case?
Isn't enough to just say you only want USB3? Maybe my first question
(what is usecase for this) answers this, though.
This looks similar to rockchip,dp-lane-mux, from the objective point of
view. Please look there and if it is really similar concept this would
warrant having it as generic property in video-interfaces for example.
I also wonder if this should not be stored in the endpoint.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping
2025-09-03 7:07 ` Krzysztof Kozlowski
@ 2025-09-03 7:49 ` Neil Armstrong
0 siblings, 0 replies; 19+ messages in thread
From: Neil Armstrong @ 2025-09-03 7:49 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Andrzej Hajda, Robert Foss, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
Kishon Vijay Abraham I, Bjorn Andersson, Konrad Dybcio, dri-devel,
devicetree, linux-kernel, linux-arm-msm, linux-phy
On 03/09/2025 09:07, Krzysztof Kozlowski wrote:
> On Tue, Sep 02, 2025 at 11:00:30AM +0200, Neil Armstrong wrote:
>> The QMP USB3/DP Combo PHY hosts an USB3 phy and a DP PHY on top
>> of a combo glue to route either lanes to the 4 shared physical lanes.
>>
>> The routing of the lanes can be:
>> - 2 DP + 2 USB3
>> - 4 DP
>> - 2 USB3
>>
>> The layout of the lanes was designed to be mapped and swapped
>> related to the USB-C Power Delivery negociation, so it supports
>> a finite set of mappings inherited by the USB-C Altmode layouts.
>>
>> Nevertheless those QMP Comby PHY can be statically used to
>> drive a DisplayPort connector, DP->HDMI bridge, USB3 A Connector,
>> etc... without an USB-C connector and no PD events.
>
> What is the use case for static mapping? Embedded HDMI port on T14s
> laptop?
>
>>
>> Add a property that documents the static lanes mapping to
>> each underlying PHY to allow supporting boards directly
>> connecting USB3 and DisplayPort lanes to the QMP Combo
>> lanes.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 29 ++++++++++++++++++++++
>> 1 file changed, 29 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> index c8bc512df08b5694c8599f475de78679a4438449..12511a462bc6245e0b82726d053d8605148c5047 100644
>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> @@ -76,6 +76,35 @@ properties:
>> mode-switch: true
>> orientation-switch: true
>>
>> + qcom,static-lanes-mapping:
>> + $ref: /schemas/types.yaml#/definitions/uint32-array
>> + minItems: 4
>> + items:
>> + enum:
>> + - 0 # Unconnected (PHY_NONE)
>> + - 4 # USB3 (PHY_TYPE_USB3)
>> + - 6 # DisplayPort (PHY_TYPE_DP)
>> + description:
>> + Describes the static mapping of the Combo PHY lanes, when not used
>> + a in a Type-C dynamic setup using USB-C PD Events to change the mapping.
>> + The 4 lanes can either routed to the underlying DP PHY or the USB3 PHY.
>> + Only 2 of the lanes can be connected to the USB3 PHY, but the 4 lanes can
>> + be connected to the DP PHY.
>> + The numbers corresponds to the PHY Type the lanes are connected to.
>> + The possible combinations are
>> + <0 0 0 0> when none are connected
>> + <4 4 0 6> USB3 and DP single lane
>> + <4 4 6 6> USB3 and DP
>> + <6 6 4 4> DP and USB3
>> + <6 0 4 4> DP and USB3 single lane
>
>> + <4 4 0 0> USB3 Only
>> + <0 0 4 4> USB3 Only
>
> Why do you need to handle here and in few other places mirrored case?
> Isn't enough to just say you only want USB3? Maybe my first question
> (what is usecase for this) answers this, though.
Usecase is larger than the HDMI on the T14s, we must handle boards directly
connected some USB-A and DP stuff directly on the combo lanes.
See https://lore.kernel.org/all/8A7C126C22789C9B+f30def47-302a-45ee-8f76-64ef277f773f@radxa.com/
>
> This looks similar to rockchip,dp-lane-mux, from the objective point of
> view. Please look there and if it is really similar concept this would
> warrant having it as generic property in video-interfaces for example.
Yes it's quite the same
>
> I also wonder if this should not be stored in the endpoint.
But I'm trying to store this in the endpoint as [1], the Bindings & DT part looks fine,
but the driver part looks horrible...
I'll probably post an RFC of that shortly
[1] https://lore.kernel.org/all/14f334fc-35de-4f21-8eb1-f6b41ac24704@linaro.org/
Neil
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2025-09-03 7:49 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 9:00 [PATCH v2 0/5] arm64: qcom: x1e78100-lenovo-thinkpad-t14s: add support for HDMI output Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 1/5] dt-bindings: display: bridge: simple: document the Realtek RTD2171 DP-to-HDMI bridge Neil Armstrong
2025-09-02 9:51 ` Maud Spierings
2025-09-03 6:52 ` Krzysztof Kozlowski
2025-09-02 9:00 ` [PATCH v2 2/5] drm/bridge: simple: add " Neil Armstrong
2025-09-02 9:23 ` Dmitry Baryshkov
2025-09-02 9:00 ` [PATCH v2 3/5] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document static lanes mapping Neil Armstrong
2025-09-02 9:30 ` Dmitry Baryshkov
2025-09-02 9:35 ` Neil Armstrong
2025-09-02 9:46 ` Dmitry Baryshkov
2025-09-02 10:05 ` Neil Armstrong
2025-09-02 12:22 ` Dmitry Baryshkov
2025-09-02 12:29 ` Neil Armstrong
2025-09-02 11:50 ` Konrad Dybcio
2025-09-02 11:59 ` Neil Armstrong
2025-09-03 7:07 ` Krzysztof Kozlowski
2025-09-03 7:49 ` Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 4/5] phy: qcom: qmp-combo: get the static lanes mapping from DT Neil Armstrong
2025-09-02 9:00 ` [PATCH v2 5/5] arm64: dts: qcom: x1e78100-lenovo-thinkpad-t14s: add HDMI nodes Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).