* [PATCH v3 1/4] dt-bindings: usb: usb-switch: Allow data-lanes property in port
2025-04-25 7:08 [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support Luca Weiss
@ 2025-04-25 7:08 ` Luca Weiss
2025-04-25 7:08 ` [PATCH v3 2/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver Luca Weiss
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Luca Weiss @ 2025-04-25 7:08 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Dmitry Baryshkov, Conor Dooley, cros-qcom-dts-watchers,
Greg Kroah-Hartman
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, devicetree,
linux-kernel, Krzysztof Kozlowski, linux-usb, Luca Weiss
The ref /schemas/graph.yaml#/properties/port forbids extra properties
which might be specified in subschemas, e.g. like in
usb/fcs,fsa4480.yaml.
Switch to port-base (and specify the endpoint with properties) to allow
such properties.
Fixes: fd2a052ccd69 ("dt-bindings: usb: add common Type-C USB Switch schema")
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/usb/usb-switch.yaml | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/usb-switch.yaml b/Documentation/devicetree/bindings/usb/usb-switch.yaml
index da76118e73a53c0e1c255ff115ff959d256816ba..89620191263023bec800dec114c0017c41b7c056 100644
--- a/Documentation/devicetree/bindings/usb/usb-switch.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-switch.yaml
@@ -26,11 +26,24 @@ properties:
type: boolean
port:
- $ref: /schemas/graph.yaml#/properties/port
+ $ref: /schemas/graph.yaml#/$defs/port-base
description:
A port node to link the device to a TypeC controller for the purpose of
handling altmode muxing and orientation switching.
+ properties:
+ endpoint:
+ $ref: /schemas/graph.yaml#/$defs/endpoint-base
+ unevaluatedProperties: false
+ properties:
+ data-lanes:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 8
+ uniqueItems: true
+ items:
+ maximum: 8
+
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver
2025-04-25 7:08 [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support Luca Weiss
2025-04-25 7:08 ` [PATCH v3 1/4] dt-bindings: usb: usb-switch: Allow data-lanes property in port Luca Weiss
@ 2025-04-25 7:08 ` Luca Weiss
2025-04-25 7:08 ` [PATCH v3 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch Luca Weiss
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Luca Weiss @ 2025-04-25 7:08 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Dmitry Baryshkov, Conor Dooley, cros-qcom-dts-watchers,
Greg Kroah-Hartman
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, devicetree,
linux-kernel, Krzysztof Kozlowski, linux-usb, Luca Weiss,
Konrad Dybcio
Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo
redriver" found on this device.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 35 +++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 0f1c83822f66f95b05d851a5d28b418ff048b09d..ea9f5517e8a083e37c4b7432322bd6d18fea84a5 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -166,6 +166,23 @@ vreg_oled_vci: regulator-oled-vci {
regulator-boot-on;
};
+ vreg_usb_redrive_1v8: regulator-usb-redrive-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "USB_REDRIVE_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ gpio = <&tlmm 61 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ vin-supply = <&vreg_bob>;
+
+ regulator-boot-on;
+
+ pinctrl-0 = <&usb_redrive_1v8_en_default>;
+ pinctrl-names = "default";
+ };
+
reserved-memory {
cont_splash_mem: cont-splash@e1000000 {
reg = <0x0 0xe1000000 0x0 0x2300000>;
@@ -747,7 +764,15 @@ &i2c2 {
&i2c4 {
status = "okay";
- /* PTN36502 USB redriver @ 1a */
+ typec-mux@1a {
+ compatible = "nxp,ptn36502";
+ reg = <0x1a>;
+
+ vdd18-supply = <&vreg_usb_redrive_1v8>;
+
+ retimer-switch;
+ orientation-switch;
+ };
};
&i2c9 {
@@ -1182,6 +1207,14 @@ sw_ctrl_default: sw-ctrl-default-state {
function = "gpio";
bias-pull-down;
};
+
+ usb_redrive_1v8_en_default: usb-redrive-1v8-en-default-state {
+ pins = "gpio61";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ output-high;
+ };
};
&uart5 {
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch
2025-04-25 7:08 [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support Luca Weiss
2025-04-25 7:08 ` [PATCH v3 1/4] dt-bindings: usb: usb-switch: Allow data-lanes property in port Luca Weiss
2025-04-25 7:08 ` [PATCH v3 2/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver Luca Weiss
@ 2025-04-25 7:08 ` Luca Weiss
2025-04-25 7:08 ` [PATCH v3 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C Luca Weiss
2025-05-11 23:01 ` (subset) [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support Bjorn Andersson
4 siblings, 0 replies; 7+ messages in thread
From: Luca Weiss @ 2025-04-25 7:08 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Dmitry Baryshkov, Conor Dooley, cros-qcom-dts-watchers,
Greg Kroah-Hartman
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, devicetree,
linux-kernel, Krzysztof Kozlowski, linux-usb, Luca Weiss,
Konrad Dybcio
Add a node for the OCP96011 on the board which is used to handle USB-C
analog audio switch and handles the SBU mux for DisplayPort-over-USB-C.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index ea9f5517e8a083e37c4b7432322bd6d18fea84a5..e0470be9142caa4bac4285a191725bbd60e706fa 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -750,7 +750,19 @@ vreg_l7p: ldo7 {
};
/* Pixelworks @ 26 */
- /* FSA4480 USB audio switch @ 42 */
+
+ typec-mux@42 {
+ compatible = "ocs,ocp96011", "fcs,fsa4480";
+ reg = <0x42>;
+
+ interrupts-extended = <&tlmm 7 IRQ_TYPE_LEVEL_LOW>;
+
+ vcc-supply = <&vreg_bob>;
+
+ mode-switch;
+ orientation-switch;
+ };
+
/* AW86927FCR haptics @ 5a */
};
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C
2025-04-25 7:08 [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support Luca Weiss
` (2 preceding siblings ...)
2025-04-25 7:08 ` [PATCH v3 3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch Luca Weiss
@ 2025-04-25 7:08 ` Luca Weiss
2025-04-25 9:17 ` Dmitry Baryshkov
2025-05-11 23:01 ` (subset) [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support Bjorn Andersson
4 siblings, 1 reply; 7+ messages in thread
From: Luca Weiss @ 2025-04-25 7:08 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Dmitry Baryshkov, Conor Dooley, cros-qcom-dts-watchers,
Greg Kroah-Hartman
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, devicetree,
linux-kernel, Krzysztof Kozlowski, linux-usb, Luca Weiss
Extend the USB graph to connect the OCP96011 switch, the PTN36502
redriver, the USB controllers and the MDSS, so that DisplayPort over
USB-C is working.
Connect some parts of the graph directly in the SoC dtsi since those
parts are wired up like this in the SoC directly.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 54 ++++++++++++++++++++--
arch/arm64/boot/dts/qcom/sc7280.dtsi | 9 +++-
2 files changed, 57 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index e0470be9142caa4bac4285a191725bbd60e706fa..9e8f9fb57c4723a24704a8239a86c6081910916b 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -101,7 +101,15 @@ port@1 {
reg = <1>;
pmic_glink_ss_in: endpoint {
- remote-endpoint = <&usb_1_dwc3_ss>;
+ remote-endpoint = <&redriver_ss_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ pmic_glink_sbu: endpoint {
+ remote-endpoint = <&ocp96011_sbu_mux>;
};
};
};
@@ -761,6 +769,13 @@ typec-mux@42 {
mode-switch;
orientation-switch;
+
+ port {
+ ocp96011_sbu_mux: endpoint {
+ remote-endpoint = <&pmic_glink_sbu>;
+ data-lanes = <1 0>;
+ };
+ };
};
/* AW86927FCR haptics @ 5a */
@@ -784,6 +799,27 @@ typec-mux@1a {
retimer-switch;
orientation-switch;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ redriver_ss_out: endpoint {
+ remote-endpoint = <&pmic_glink_ss_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ redriver_ss_in: endpoint {
+ remote-endpoint = <&usb_dp_qmpphy_out>;
+ };
+ };
+ };
};
};
@@ -805,6 +841,14 @@ &mdss {
status = "okay";
};
+&mdss_dp {
+ status = "okay";
+};
+
+&mdss_dp_out {
+ data-lanes = <0 1>;
+};
+
&mdss_dsi {
vdda-supply = <&vreg_l6b>;
status = "okay";
@@ -1301,10 +1345,6 @@ &usb_1_dwc3_hs {
remote-endpoint = <&pmic_glink_hs_in>;
};
-&usb_1_dwc3_ss {
- remote-endpoint = <&pmic_glink_ss_in>;
-};
-
&usb_1_hsphy {
vdda-pll-supply = <&vreg_l10c>;
vdda18-supply = <&vreg_l1c>;
@@ -1331,6 +1371,10 @@ &usb_1_qmpphy {
status = "okay";
};
+&usb_dp_qmpphy_out {
+ remote-endpoint = <&redriver_ss_in>;
+};
+
&venus {
firmware-name = "qcom/qcm6490/fairphone5/venus.mbn";
status = "okay";
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 8e86d75cc6b4929f6cf9592a3f1ae591a19e6d78..ea87bf360ca0ac723e1dcd8ec263d0ca9a96f02e 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3640,6 +3640,8 @@ usb_1_qmpphy: phy@88e8000 {
#clock-cells = <1>;
#phy-cells = <1>;
+ orientation-switch;
+
ports {
#address-cells = <1>;
#size-cells = <0>;
@@ -3655,6 +3657,7 @@ port@1 {
reg = <1>;
usb_dp_qmpphy_usb_ss_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_ss>;
};
};
@@ -3662,6 +3665,7 @@ port@2 {
reg = <2>;
usb_dp_qmpphy_dp_in: endpoint {
+ remote-endpoint = <&mdss_dp_out>;
};
};
};
@@ -4268,6 +4272,7 @@ port@1 {
reg = <1>;
usb_1_dwc3_ss: endpoint {
+ remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
};
};
};
@@ -4993,7 +4998,9 @@ dp_in: endpoint {
port@1 {
reg = <1>;
- mdss_dp_out: endpoint { };
+ mdss_dp_out: endpoint {
+ remote-endpoint = <&usb_dp_qmpphy_dp_in>;
+ };
};
};
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C
2025-04-25 7:08 ` [PATCH v3 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C Luca Weiss
@ 2025-04-25 9:17 ` Dmitry Baryshkov
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-04-25 9:17 UTC (permalink / raw)
To: Luca Weiss
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, cros-qcom-dts-watchers, Greg Kroah-Hartman,
~postmarketos/upstreaming, phone-devel, linux-arm-msm, devicetree,
linux-kernel, Krzysztof Kozlowski, linux-usb
On Fri, Apr 25, 2025 at 09:08:15AM +0200, Luca Weiss wrote:
> Extend the USB graph to connect the OCP96011 switch, the PTN36502
> redriver, the USB controllers and the MDSS, so that DisplayPort over
> USB-C is working.
>
> Connect some parts of the graph directly in the SoC dtsi since those
> parts are wired up like this in the SoC directly.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 54 ++++++++++++++++++++--
> arch/arm64/boot/dts/qcom/sc7280.dtsi | 9 +++-
> 2 files changed, 57 insertions(+), 6 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (subset) [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support
2025-04-25 7:08 [PATCH v3 0/4] Fairphone 5 DisplayPort over USB-C support Luca Weiss
` (3 preceding siblings ...)
2025-04-25 7:08 ` [PATCH v3 4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C Luca Weiss
@ 2025-05-11 23:01 ` Bjorn Andersson
4 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2025-05-11 23:01 UTC (permalink / raw)
To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Dmitry Baryshkov,
Conor Dooley, cros-qcom-dts-watchers, Greg Kroah-Hartman,
Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm, devicetree,
linux-kernel, Krzysztof Kozlowski, linux-usb, Konrad Dybcio
On Fri, 25 Apr 2025 09:08:11 +0200, Luca Weiss wrote:
> This series adds all the necessary bits to enable DisplayPort-out over
> USB-C on Fairphone 5.
>
> Devicetree (patch 2-4) patches go via qcom tree
>
>
Applied, thanks!
[2/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver
commit: 90485e48b8889deec74cf2ce07df174da84b1ac1
[3/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch
commit: 1efa79c7536896b6fcd71760c3d4f0a0d40a9e1c
[4/4] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C
commit: 6b51f5e1811398dce5c1d67b746dde74c75f6ce7
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread