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.

Signed-off-by: Luca Weiss <[email protected]>
---
 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 67 +++++++++++++++++++++-
 arch/arm64/boot/dts/qcom/sc7280.dtsi               |  2 +
 2 files changed, 67 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts 
b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 
b3fc37dba51523ce5678ae6d73f7d835f8b26d9e..1e04c7ec7163538d93543f36094203e58212f600
 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>;
                                        };
                                };
                        };
@@ -758,6 +766,16 @@ typec-mux@42 {
                interrupts-extended = <&tlmm 7 IRQ_TYPE_LEVEL_LOW>;
 
                vcc-supply = <&vreg_bob>;
+
+               mode-switch;
+               orientation-switch;
+
+               port {
+                       ocp96011_sbu_mux: endpoint {
+                               remote-endpoint = <&pmic_glink_sbu>;
+                               data-lanes = <1 0>;
+                       };
+               };
        };
 
        /* AW86927FCR haptics @ 5a */
@@ -778,6 +796,30 @@ typec-mux@1a {
                reg = <0x1a>;
 
                vdd18-supply = <&vreg_usb_redrive_1v8>;
+
+               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>;
+                               };
+                       };
+               };
        };
 };
 
@@ -799,6 +841,15 @@ &mdss {
        status = "okay";
 };
 
+&mdss_dp {
+       status = "okay";
+};
+
+&mdss_dp_out {
+       data-lanes = <0 1>;
+       remote-endpoint = <&usb_dp_qmpphy_dp_in>;
+};
+
 &mdss_dsi {
        vdda-supply = <&vreg_l6b>;
        status = "okay";
@@ -1297,7 +1348,7 @@ &usb_1_dwc3_hs {
 };
 
 &usb_1_dwc3_ss {
-       remote-endpoint = <&pmic_glink_ss_in>;
+       remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
 };
 
 &usb_1_hsphy {
@@ -1326,6 +1377,18 @@ &usb_1_qmpphy {
        status = "okay";
 };
 
+&usb_dp_qmpphy_dp_in {
+       remote-endpoint = <&mdss_dp_out>;
+};
+
+&usb_dp_qmpphy_out {
+       remote-endpoint = <&redriver_ss_in>;
+};
+
+&usb_dp_qmpphy_usb_ss_in {
+       remote-endpoint = <&usb_1_dwc3_ss>;
+};
+
 &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 
0f2caf36910b65c398c9e03800a8ce0a8a1f8fc7..4880d26e745566fa7ef906a0489e3772f2426ab6
 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3639,6 +3639,8 @@ usb_1_qmpphy: phy@88e8000 {
                        #clock-cells = <1>;
                        #phy-cells = <1>;
 
+                       orientation-switch;
+
                        ports {
                                #address-cells = <1>;
                                #size-cells = <0>;

-- 
2.48.1


Reply via email to