Skip to contentSkip to conversation

Enable DisplayPort over USB Type-C on Qualcomm Eliza EVK

PATCH In review Vishnu Saini 4 participants 6 messages Nov 27 – Nov 29

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover Enable DisplayPort over USB Type-C on Qualcomm Eliza EVK

Qualcomm Eliza EVK routes DisplayPort 0 to its USB Type-C connector through pmic_glink. The board also uses an onsemi FSUSB43L10X GPIO-controlled SBU mux to route the DP AUX pair according to the cable orientation.

Add optional vcc regulator handling to the gpio-sbu-mux driver so boards that provide a vcc-supply can power the SBU mux during probe, while keeping existing boards without such a supply working as before. Then enable MDSS and DP0 on Qualcomm Eliza EVK and describe the SBU mux path needed for DisplayPort alt mode.

Tested with a DisplayPort sink on the Type-C port in both cable orientations.

---
Changes in v2:
- Add gpio-sbu-mux support for an optional vcc regulator.
- making it 2 patch series for driver vcc support and Eliza EVK DT enablement for DP over Type-C.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Vishnu Saini (2):
arm64: dts: qcom: eliza-evk: Enable DisplayPort over USB Type-C
usb: typec: mux: gpio-sbu: Enable optional vcc supply

 arch/arm64/boot/dts/qcom/eliza-evk.dtsi | 49 +++++++++++++++++++++++++++++++++
 drivers/usb/typec/mux/gpio-sbu-mux.c    |  6 ++++
 2 files changed, 55 insertions(+)

---
base-commit: 3191063649dbf7c0d0b768e1f3655e4c5fc6edb5
change-id: 20261125-eliza_evk_display-1285afd0624e

Best regards,

Signature · 1 line
Vishnu Saini <[email protected]>
#1 lore raw

PATCH v2 1/2 arm64: dts: qcom: eliza-evk: Enable DisplayPort over USB Type-C

The EVK routes DP0 to a USB Type-C connector driven by pmic_glink. Enable MDSS and DP0, and describe the SBU path needed for DP alt mode.

An onsemi FSUSB43L10X on the EVK board routes the DP AUX pair to the connector. Model it as a gpio-sbu-mux, with enable on TLMM 177, select on TLMM 178, and L17B as its supply.

Wire the pmic_glink SBU port to the mux and mark it as both a mode and orientation switch, so AUX follows the cable orientation.

Tested with a DP sink on the Type-C port in both cable orientations.

---
 arch/arm64/boot/dts/qcom/eliza-evk.dtsi | 49 +++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
arch/arm64/boot/dts/qcom/eliza-evk.dtsi +49 -0
index 02e58a4bc91d..8c663ef6718d 100644
@@ -61,6 +61,35 @@ pmic_glink_ss_in: endpoint {
 						remote-endpoint = <&usb_dp_qmpphy_out>;
 					};
 				};
+
+				port@2 {
+					reg = <2>;
+
+					pmic_glink_sbu: endpoint {
+						remote-endpoint = <&sbu_mux_in>;
+					};
+				};
+			};
+		};
+	};
+
+	sbu_mux: sbu-mux {
+		compatible = "onnn,fsusb43l10x", "gpio-sbu-mux";
+
+		enable-gpios = <&tlmm 177 GPIO_ACTIVE_LOW>;
+		select-gpios = <&tlmm 178 GPIO_ACTIVE_HIGH>;
+
+		vcc-supply = <&vreg_l17b>;
+
+		pinctrl-0 = <&sbu_mux_en_state>, <&sbu_mux_sel_state>;
+		pinctrl-names = "default";
+
+		mode-switch;
+		orientation-switch;
+
+		port {
+			sbu_mux_in: endpoint {
+				remote-endpoint = <&pmic_glink_sbu>;
 			};
 		};
 	};
@@ -491,4 +520,24 @@ m2_w_disable1: m2-w-disable1-state {
 		drive-strength = <2>;
 		bias-pull-up;
 	};
+
+	sbu_mux_en_state: sbu-mux-en-state {
+		pins = "gpio177";
+		function = "gpio";
+		bias-disable;
+	};
+
+	sbu_mux_sel_state: sbu-mux-sel-state {
+		pins = "gpio178";
+		function = "gpio";
+		bias-disable;
+	};
+};
+
+&mdss {
+	status = "okay";
+};
+
+&mdss_dp0 {
+	status = "okay";
 };
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v2 1/2] arm64: dts: qcom: eliza-evk: Enable DisplayPort over USB Type-C

Quoted 6 lines · Vishnu Saini

The EVK routes DP0 to a USB Type-C connector driven by pmic_glink. Enable MDSS and DP0, and describe the SBU path needed for DP alt mode.

An onsemi FSUSB43L10X on the EVK board routes the DP AUX pair to the connector. Model it as a gpio-sbu-mux, with enable on TLMM 177, select on TLMM 178, and L17B as its supply.

[...]

arch/arm64/boot/dts/qcom/eliza-evk.dtsi m2_w_disable1: m2-w-disable1-state { · line 543

Quoted 8 lines

+&mdss {

arch/arm64/boot/dts/qcom/eliza-evk.dtsi +5 -0
+	status = "okay";
+};
+
+&mdss_dp0 {
+	status = "okay";
 };

Please keep the label references sorted

Konrad

#3 lore raw

Re: [PATCH v2 1/2] arm64: dts: qcom: eliza-evk: Enable DisplayPort over USB Type-C

In reply to Vishnu Saini
Quoted 7 lines · Vishnu Saini

The EVK routes DP0 to a USB Type-C connector driven by pmic_glink. Enable MDSS and DP0, and describe the SBU path needed for DP alt mode.

An onsemi FSUSB43L10X on the EVK board routes the DP AUX pair to the connector. Model it as a gpio-sbu-mux, with enable on TLMM 177, select on TLMM 178, and L17B as its supply.

Quoted 7 lines

Wire the pmic_glink SBU port to the mux and mark it as both a mode and orientation switch, so AUX follows the cable orientation.

Tested with a DP sink on the Type-C port in both cable orientations.

---

DTS cannot be combined in this patchset and must be split. Don't mix patches from independent subsystems when you send something explicitly targeting only one subsystem.
See also: Documentation/devicetree/bindings/submitting-patches.rst

Best regards,
Krzysztof

#4 lore raw

PATCH v2 2/2 usb: typec: mux: gpio-sbu: Enable optional vcc supply

In reply to Vishnu Saini

Some GPIO-controlled SBU muxes need their supply to be enabled before the AUX path can be switched reliably. One such platform is Qualcomm Eliza EVK, which uses an onsemi FSUSB43L10X mux.

Enable an optional vcc regulator during probe so boards that describe a vcc-supply can power the mux before registering the Type-C switch and mux devices. Keep existing designs without a vcc-supply property working by treating the missing optional supply as success.

Return probe errors other than the absent optional supply so deferred probe and regulator failures are still reported.

---
 drivers/usb/typec/mux/gpio-sbu-mux.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/usb/typec/mux/gpio-sbu-mux.c +6 -0
index 8a8aa7470df4..7aad3f738a5a 100644
@@ -8,6 +8,7 @@
 #include <linux/mutex.h>
 #include <linux/gpio/consumer.h>
 #include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
 #include <linux/usb/typec_dp.h>
 #include <linux/usb/typec_mux.h>
 
@@ -104,6 +105,7 @@ static int gpio_sbu_mux_probe(struct platform_device *pdev)
 	struct typec_mux_desc mux_desc = { };
 	struct device *dev = &pdev->dev;
 	struct gpio_sbu_mux *sbu_mux;
+	int ret;
 
 	sbu_mux = devm_kzalloc_obj(dev, *sbu_mux);
 	if (!sbu_mux)
@@ -111,6 +113,10 @@ static int gpio_sbu_mux_probe(struct platform_device *pdev)
 
 	mutex_init(&sbu_mux->lock);
 
+	ret = devm_regulator_get_enable_optional(dev, "vcc");
+	if (ret && ret != -ENODEV)
+		return dev_err_probe(dev, ret, "failed to enable vcc supply\n");
+
 	sbu_mux->enable_gpio = devm_gpiod_get_optional(dev, "enable",
 						       GPIOD_OUT_LOW);
 	if (IS_ERR(sbu_mux->enable_gpio))
Signature · 1 line
2.34.1