arm64: dts: qcom: qrb5165-rb5: Switch on TCPM usb-role-switching for usb_1
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Wed, 16 Aug 2023 11:51:50 +0000 (12:51 +0100)
committerBjorn Andersson <andersson@kernel.org>
Wed, 20 Sep 2023 01:19:32 +0000 (18:19 -0700)
Switch on usb-role-switching for usb_1 via TCPM. We need to declare
usb-role-switch in &usb_1 and associate with the remote-endpoint in TCPM
which provides the necessary signal.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20230816115151.501736-7-bryan.odonoghue@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
arch/arm64/boot/dts/qcom/sm8250.dtsi

index e20ad59303c2256cc1094a02724bd33f0e7c3cd6..c788133d23e84f8c6dc429aebda6030249af8577 100644 (file)
 };
 
 &usb_1_dwc3 {
-       dr_mode = "peripheral";
+       dr_mode = "otg";
+       usb-role-switch;
+};
+
+&usb_1_role_switch_out {
+       remote-endpoint = <&pm8150b_role_switch_in>;
 };
 
 &usb_1_hsphy {
                                         PDO_FIXED_DUAL_ROLE |
                                         PDO_FIXED_USB_COMM |
                                         PDO_FIXED_DATA_SWAP)>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               pm8150b_role_switch_in: endpoint {
+                                       remote-endpoint = <&usb_1_role_switch_out>;
+                               };
+                       };
+               };
        };
 };
index 42f37b9421d7262cb3eb58a4511b0bcb7b3dd366..28f977785dcc6ce33039107d3332e640f9977a4b 100644 (file)
                                snps,dis_enblslpm_quirk;
                                phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
                                phy-names = "usb2-phy", "usb3-phy";
+
+                               port {
+                                       usb_1_role_switch_out: endpoint {};
+                               };
                        };
                };