arm64: dts: qcom: qcs6490-rb3gen2: Enable USB Type-C display
authorBjorn Andersson <quic_bjorande@quicinc.com>
Wed, 27 Mar 2024 02:04:22 +0000 (19:04 -0700)
committerBjorn Andersson <andersson@kernel.org>
Wed, 3 Apr 2024 18:49:50 +0000 (13:49 -0500)
With the ADSP remoteproc loaded pmic_glink can be introduced and
together with the redriver wired up to provide role and orientation
switching signals as well as USB Type-C display on the RB3gen2.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-By: Krishna Kurapati PSSNV <quic_kriskura@quicinc.com>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240326-rb3gen2-dp-connector-v2-5-a9f1bc32ecaf@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts

index 2f94b1b865e74f3f378a350a9f5c62ee978ec4ad..3cc19ccff90cbb3ff8ab86888cb33ba53b08542a 100644 (file)
                };
        };
 
+       pmic-glink {
+               compatible = "qcom,qcm6490-pmic-glink", "qcom,pmic-glink";
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               connector@0 {
+                       compatible = "usb-c-connector";
+                       reg = <0>;
+                       power-role = "dual";
+                       data-role = "dual";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+
+                                       pmic_glink_hs_in: endpoint {
+                                               remote-endpoint = <&usb_1_dwc3_hs>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+
+                                       pmic_glink_ss_in: endpoint {
+                                               remote-endpoint = <&redriver_usb_con_ss>;
+                                       };
+                               };
+
+                               port@2 {
+                                       reg = <2>;
+
+                                       pmic_glink_sbu_in: endpoint {
+                                               remote-endpoint = <&redriver_usb_con_sbu>;
+                                       };
+                               };
+                       };
+               };
+       };
+
        vph_pwr: vph-pwr-regulator {
                compatible = "regulator-fixed";
                regulator-name = "vph_pwr";
 
                retimer-switch;
                orientation-switch;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+
+                               redriver_usb_con_ss: endpoint {
+                                       remote-endpoint = <&pmic_glink_ss_in>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+
+                               redriver_phy_con_ss: endpoint {
+                                       remote-endpoint = <&usb_dp_qmpphy_out>;
+                                       data-lanes = <0 1 2 3>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+
+                               redriver_usb_con_sbu: endpoint {
+                                       remote-endpoint = <&pmic_glink_sbu_in>;
+                               };
+                       };
+               };
        };
 };
 
        status = "okay";
 };
 
+&mdss_dp {
+       status = "okay";
+};
+
+&mdss_dp_out {
+       data-lanes = <0 1>;
+       remote-endpoint = <&usb_dp_qmpphy_dp_in>;
+};
+
 &mdss_edp {
        status = "okay";
 };
 };
 
 &usb_1_dwc3 {
-       dr_mode = "peripheral";
+       dr_mode = "otg";
+       usb-role-switch;
+};
+
+&usb_1_dwc3_hs {
+       remote-endpoint = <&pmic_glink_hs_in>;
+};
+
+&usb_1_dwc3_ss {
+       remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>;
 };
 
 &usb_1_hsphy {
        vdda-phy-supply = <&vreg_l6b_1p2>;
        vdda-pll-supply = <&vreg_l1b_0p912>;
 
+       orientation-switch;
+
        status = "okay";
 };
 
+&usb_dp_qmpphy_out {
+       remote-endpoint = <&redriver_phy_con_ss>;
+};
+
+&usb_dp_qmpphy_usb_ss_in {
+       remote-endpoint = <&usb_1_dwc3_ss>;
+};
+
+&usb_dp_qmpphy_dp_in {
+       remote-endpoint = <&mdss_dp_out>;
+};
+
 &wifi {
        memory-region = <&wlan_fw_mem>;
 };