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.we...@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


Reply via email to