Message ID | 20230318121828.739424-18-bryan.odonoghue@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add Qualcomm PMIC TPCM support | expand |
On 18.03.2023 13:18, Bryan O'Donoghue wrote: > 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> > --- > arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > index 965742a5be7ae..43d549d6672e9 100644 > --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > @@ -1273,7 +1273,13 @@ &usb_1 { > }; > > &usb_1_dwc3 { > - dr_mode = "peripheral"; > + dr_mode = "otg"; > + usb-role-switch; This could maybe go to the SoC DTSI.. Bjorn, Krzysztof, WDYT? Also, please add a newline before the subnode. > + port { > + dwc3_drd_switch: endpoint { > + remote-endpoint = <&usb3_role>; > + }; > + }; DWC3 ports (@0 for HS, @1 for SS and @2 for altmode) can definitely go to the SoC DTSI. > }; > > &usb_1_hsphy { > @@ -1356,6 +1362,12 @@ &pm8150b_vbus { > > &tcpm { > status = "okay"; Please add a newline before the subnode. Konrad > + port { > + usb3_role: endpoint { > + remote-endpoint = <&dwc3_drd_switch>; > + }; > + }; > + > connector { > compatible = "usb-c-connector"; >
On 18/03/2023 13:10, Konrad Dybcio wrote: >> + usb-role-switch; > This could maybe go to the SoC DTSI.. Bjorn, Krzysztof, WDYT? Eh well I think this is a correct comment. There's no good reason to have this as board-specific since it is a controller property. Moreover it only does something when there is a an agent to feed data into it. arch/arm64/boot/dts/qcom/sc7280.dtsi: usb-role-switch; --- bod
diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 965742a5be7ae..43d549d6672e9 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1273,7 +1273,13 @@ &usb_1 { }; &usb_1_dwc3 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; + port { + dwc3_drd_switch: endpoint { + remote-endpoint = <&usb3_role>; + }; + }; }; &usb_1_hsphy { @@ -1356,6 +1362,12 @@ &pm8150b_vbus { &tcpm { status = "okay"; + port { + usb3_role: endpoint { + remote-endpoint = <&dwc3_drd_switch>; + }; + }; + connector { compatible = "usb-c-connector";
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> --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)