Message ID | 20240624-b4-rb2-fixes-v1-3-8d763ee4e42e@linaro.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | arm64: dts: qcom: make dev boards prefer usb host mode | expand |
On 24/06/2024 14:23, Caleb Connolly wrote: > Generally, when given the choice these boards should prefer host mode > since they're SBCs. When attached to a laptop (which is host-only) they > should still fall back to peripheral mode. It's really not what I observed on sm8550/sm8650 QRD/HDK, as the power is setup for peripheral by the bootloader and without an actual UCSI/PD negociation it would only be functionnal as peripheral mode. So this is definitely untrue on sm8450/sm8550/sm8650 HDK/QRD/MTP. Neil > > Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > --- > arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 1 + > arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 1 + > arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ > arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 + > arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++++ > arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++++ > arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 4 ++++ > arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++++ > arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++++ > arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ++++ > 12 files changed, 39 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > index c4cde4328e3d..bac4ed5874b6 100644 > --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > @@ -657,8 +657,9 @@ &usb_1 { > > &usb_1_dwc3 { > dr_mode = "otg"; > usb-role-switch; > + role-switch-default-mode = "host"; > }; > > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > index e19790464a11..bece4896ca23 100644 > --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > @@ -593,8 +593,12 @@ &uart4 { > &usb { > status = "okay"; > }; > > +&usb_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_dwc3_hs { > remote-endpoint = <&pm4125_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > index 1c7de7f2db79..17d36f0ef5ab 100644 > --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > @@ -661,8 +661,12 @@ &uart4 { > &usb { > status = "okay"; > }; > > +&usb_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_dwc3_hs { > remote-endpoint = <&pmi632_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > index bac08f00b303..fe548d795490 100644 > --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > @@ -695,8 +695,9 @@ &usb_2 { > > &usb_1_dwc3 { > dr_mode = "otg"; > usb-role-switch; > + role-switch-default-mode = "host"; > }; > > &usb_1_dwc3_hs { > remote-endpoint = <&pm8150b_hs_in>; > diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > index e031ad4c19f4..20d5c54cfcf9 100644 > --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > @@ -847,8 +847,12 @@ &ufs_mem_phy { > &usb_1 { > status = "okay"; > }; > > +&usb_1_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > index a754b8fe9167..ebafcbe6859e 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > @@ -1098,8 +1098,9 @@ &usb_1 { > > &usb_1_dwc3 { > dr_mode = "otg"; > usb-role-switch; > + role-switch-default-mode = "host"; > }; > > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > index e0dc03a97771..1efda478b7b9 100644 > --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > @@ -1252,8 +1252,12 @@ &ufs_mem_phy { > &usb_1 { > status = "okay"; > }; > > +&usb_1_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > index 26dfca0c3e05..7b05932f9c36 100644 > --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > @@ -945,8 +945,12 @@ &ufs_mem_phy { > &usb_1 { > status = "okay"; > }; > > +&usb_1_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > index 361b0792db4f..744bdc846e70 100644 > --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > @@ -1211,8 +1211,12 @@ &ufs_mem_phy { > &usb_1 { > status = "okay"; > }; > > +&usb_1_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > index 092b78fd8a3b..f07a56583e7d 100644 > --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > @@ -1300,8 +1300,12 @@ &ufs_mem_phy { > &usb_1 { > status = "okay"; > }; > > +&usb_1_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > index d6f91580ba8d..1a9a31423af4 100644 > --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > @@ -839,8 +839,12 @@ &ufs_mem_phy { > &usb_1 { > status = "okay"; > }; > > +&usb_1_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > > diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > index bd60c2770da2..031b7ada8eb1 100644 > --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > @@ -1285,8 +1285,12 @@ &ufs_mem_phy { > &usb_1 { > status = "okay"; > }; > > +&usb_1_dwc3 { > + role-switch-default-mode = "host"; > +}; > + > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > >
On Mon, 24 Jun 2024 at 15:28, <neil.armstrong@linaro.org> wrote: > > On 24/06/2024 14:23, Caleb Connolly wrote: > > Generally, when given the choice these boards should prefer host mode > > since they're SBCs. When attached to a laptop (which is host-only) they > > should still fall back to peripheral mode. > > It's really not what I observed on sm8550/sm8650 QRD/HDK, as the power > is setup for peripheral by the bootloader and without an actual UCSI/PD > negociation it would only be functionnal as peripheral mode. > > So this is definitely untrue on sm8450/sm8550/sm8650 HDK/QRD/MTP. But we now have the UCSI support for those platforms, don't we? > > Neil > > > > > Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > > --- > > arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 1 + > > arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 1 + > > arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 + > > arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++++ > > arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ++++ > > 12 files changed, 39 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > > index c4cde4328e3d..bac4ed5874b6 100644 > > --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > > +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > > @@ -657,8 +657,9 @@ &usb_1 { > > > > &usb_1_dwc3 { > > dr_mode = "otg"; > > usb-role-switch; > > + role-switch-default-mode = "host"; > > }; > > > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > > index e19790464a11..bece4896ca23 100644 > > --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > > +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > > @@ -593,8 +593,12 @@ &uart4 { > > &usb { > > status = "okay"; > > }; > > > > +&usb_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_dwc3_hs { > > remote-endpoint = <&pm4125_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > > index 1c7de7f2db79..17d36f0ef5ab 100644 > > --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > > +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > > @@ -661,8 +661,12 @@ &uart4 { > > &usb { > > status = "okay"; > > }; > > > > +&usb_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_dwc3_hs { > > remote-endpoint = <&pmi632_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > > index bac08f00b303..fe548d795490 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > > @@ -695,8 +695,9 @@ &usb_2 { > > > > &usb_1_dwc3 { > > dr_mode = "otg"; > > usb-role-switch; > > + role-switch-default-mode = "host"; > > }; > > > > &usb_1_dwc3_hs { > > remote-endpoint = <&pm8150b_hs_in>; > > diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > > index e031ad4c19f4..20d5c54cfcf9 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > > @@ -847,8 +847,12 @@ &ufs_mem_phy { > > &usb_1 { > > status = "okay"; > > }; > > > > +&usb_1_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > > index a754b8fe9167..ebafcbe6859e 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > > @@ -1098,8 +1098,9 @@ &usb_1 { > > > > &usb_1_dwc3 { > > dr_mode = "otg"; > > usb-role-switch; > > + role-switch-default-mode = "host"; > > }; > > > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > > index e0dc03a97771..1efda478b7b9 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > > @@ -1252,8 +1252,12 @@ &ufs_mem_phy { > > &usb_1 { > > status = "okay"; > > }; > > > > +&usb_1_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > > index 26dfca0c3e05..7b05932f9c36 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > > @@ -945,8 +945,12 @@ &ufs_mem_phy { > > &usb_1 { > > status = "okay"; > > }; > > > > +&usb_1_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > > index 361b0792db4f..744bdc846e70 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > > @@ -1211,8 +1211,12 @@ &ufs_mem_phy { > > &usb_1 { > > status = "okay"; > > }; > > > > +&usb_1_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > > index 092b78fd8a3b..f07a56583e7d 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > > @@ -1300,8 +1300,12 @@ &ufs_mem_phy { > > &usb_1 { > > status = "okay"; > > }; > > > > +&usb_1_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > > index d6f91580ba8d..1a9a31423af4 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > > @@ -839,8 +839,12 @@ &ufs_mem_phy { > > &usb_1 { > > status = "okay"; > > }; > > > > +&usb_1_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > }; > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > > index bd60c2770da2..031b7ada8eb1 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > > +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > > @@ -1285,8 +1285,12 @@ &ufs_mem_phy { > > &usb_1 { > > status = "okay"; > > }; > > > > +&usb_1_dwc3 { > > + role-switch-default-mode = "host"; > > +}; > > + > > &usb_1_dwc3_hs { > > remote-endpoint = <&pmic_glink_hs_in>; > > }; > > > > >
On 24/06/2024 14:31, Dmitry Baryshkov wrote: > On Mon, 24 Jun 2024 at 15:28, <neil.armstrong@linaro.org> wrote: >> >> On 24/06/2024 14:23, Caleb Connolly wrote: >>> Generally, when given the choice these boards should prefer host mode >>> since they're SBCs. When attached to a laptop (which is host-only) they >>> should still fall back to peripheral mode. >> >> It's really not what I observed on sm8550/sm8650 QRD/HDK, as the power >> is setup for peripheral by the bootloader and without an actual UCSI/PD >> negociation it would only be functionnal as peripheral mode. >> >> So this is definitely untrue on sm8450/sm8550/sm8650 HDK/QRD/MTP. > > But we now have the UCSI support for those platforms, don't we? UCSI doesn't care about role-switch-default-mode, it's the default fallback role to set when no role was explicitely set by UCSI. Setting host won't make it work because the power support is handled by the UCSI firmware. setting role-switch-default-mode = "host" will make the USB port unusable if UCSI fails to start since it's physically set to peripheral mode. Neil > >> >> Neil >> >>> >>> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> >>> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> >>> --- >>> arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 1 + >>> arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 1 + >>> arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 + >>> arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++++ >>> arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ++++ >>> 12 files changed, 39 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts >>> index c4cde4328e3d..bac4ed5874b6 100644 >>> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts >>> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts >>> @@ -657,8 +657,9 @@ &usb_1 { >>> >>> &usb_1_dwc3 { >>> dr_mode = "otg"; >>> usb-role-switch; >>> + role-switch-default-mode = "host"; >>> }; >>> >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts >>> index e19790464a11..bece4896ca23 100644 >>> --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts >>> +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts >>> @@ -593,8 +593,12 @@ &uart4 { >>> &usb { >>> status = "okay"; >>> }; >>> >>> +&usb_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_dwc3_hs { >>> remote-endpoint = <&pm4125_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts >>> index 1c7de7f2db79..17d36f0ef5ab 100644 >>> --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts >>> +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts >>> @@ -661,8 +661,12 @@ &uart4 { >>> &usb { >>> status = "okay"; >>> }; >>> >>> +&usb_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_dwc3_hs { >>> remote-endpoint = <&pmi632_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts >>> index bac08f00b303..fe548d795490 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts >>> @@ -695,8 +695,9 @@ &usb_2 { >>> >>> &usb_1_dwc3 { >>> dr_mode = "otg"; >>> usb-role-switch; >>> + role-switch-default-mode = "host"; >>> }; >>> >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pm8150b_hs_in>; >>> diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >>> index e031ad4c19f4..20d5c54cfcf9 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >>> @@ -847,8 +847,12 @@ &ufs_mem_phy { >>> &usb_1 { >>> status = "okay"; >>> }; >>> >>> +&usb_1_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >>> index a754b8fe9167..ebafcbe6859e 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >>> @@ -1098,8 +1098,9 @@ &usb_1 { >>> >>> &usb_1_dwc3 { >>> dr_mode = "otg"; >>> usb-role-switch; >>> + role-switch-default-mode = "host"; >>> }; >>> >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts >>> index e0dc03a97771..1efda478b7b9 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts >>> @@ -1252,8 +1252,12 @@ &ufs_mem_phy { >>> &usb_1 { >>> status = "okay"; >>> }; >>> >>> +&usb_1_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts >>> index 26dfca0c3e05..7b05932f9c36 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts >>> @@ -945,8 +945,12 @@ &ufs_mem_phy { >>> &usb_1 { >>> status = "okay"; >>> }; >>> >>> +&usb_1_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >>> index 361b0792db4f..744bdc846e70 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >>> @@ -1211,8 +1211,12 @@ &ufs_mem_phy { >>> &usb_1 { >>> status = "okay"; >>> }; >>> >>> +&usb_1_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts >>> index 092b78fd8a3b..f07a56583e7d 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts >>> @@ -1300,8 +1300,12 @@ &ufs_mem_phy { >>> &usb_1 { >>> status = "okay"; >>> }; >>> >>> +&usb_1_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >>> index d6f91580ba8d..1a9a31423af4 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >>> @@ -839,8 +839,12 @@ &ufs_mem_phy { >>> &usb_1 { >>> status = "okay"; >>> }; >>> >>> +&usb_1_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> }; >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts >>> index bd60c2770da2..031b7ada8eb1 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts >>> +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts >>> @@ -1285,8 +1285,12 @@ &ufs_mem_phy { >>> &usb_1 { >>> status = "okay"; >>> }; >>> >>> +&usb_1_dwc3 { >>> + role-switch-default-mode = "host"; >>> +}; >>> + >>> &usb_1_dwc3_hs { >>> remote-endpoint = <&pmic_glink_hs_in>; >>> }; >>> >>> >> > >
On 24/06/2024 14:28, neil.armstrong@linaro.org wrote: > On 24/06/2024 14:23, Caleb Connolly wrote: >> Generally, when given the choice these boards should prefer host mode >> since they're SBCs. When attached to a laptop (which is host-only) they >> should still fall back to peripheral mode. > > It's really not what I observed on sm8550/sm8650 QRD/HDK, as the power > is setup for peripheral by the bootloader and without an actual UCSI/PD > negociation it would only be functionnal as peripheral mode. > > So this is definitely untrue on sm8450/sm8550/sm8650 HDK/QRD/MTP. Hmm, yeah in that case this change could break U-Boot. Let me re-send and split out the rb1/2 since those are much more clear cut. > > Neil > >> >> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> >> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> >> --- >> arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 1 + >> arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 1 + >> arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 + >> arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++++ >> arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ++++ >> 12 files changed, 39 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts >> b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts >> index c4cde4328e3d..bac4ed5874b6 100644 >> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts >> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts >> @@ -657,8 +657,9 @@ &usb_1 { >> &usb_1_dwc3 { >> dr_mode = "otg"; >> usb-role-switch; >> + role-switch-default-mode = "host"; >> }; >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts >> b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts >> index e19790464a11..bece4896ca23 100644 >> --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts >> +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts >> @@ -593,8 +593,12 @@ &uart4 { >> &usb { >> status = "okay"; >> }; >> +&usb_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_dwc3_hs { >> remote-endpoint = <&pm4125_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts >> b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts >> index 1c7de7f2db79..17d36f0ef5ab 100644 >> --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts >> +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts >> @@ -661,8 +661,12 @@ &uart4 { >> &usb { >> status = "okay"; >> }; >> +&usb_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_dwc3_hs { >> remote-endpoint = <&pmi632_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts >> b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts >> index bac08f00b303..fe548d795490 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts >> @@ -695,8 +695,9 @@ &usb_2 { >> &usb_1_dwc3 { >> dr_mode = "otg"; >> usb-role-switch; >> + role-switch-default-mode = "host"; >> }; >> &usb_1_dwc3_hs { >> remote-endpoint = <&pm8150b_hs_in>; >> diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >> b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >> index e031ad4c19f4..20d5c54cfcf9 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >> @@ -847,8 +847,12 @@ &ufs_mem_phy { >> &usb_1 { >> status = "okay"; >> }; >> +&usb_1_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >> b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >> index a754b8fe9167..ebafcbe6859e 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >> @@ -1098,8 +1098,9 @@ &usb_1 { >> &usb_1_dwc3 { >> dr_mode = "otg"; >> usb-role-switch; >> + role-switch-default-mode = "host"; >> }; >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts >> b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts >> index e0dc03a97771..1efda478b7b9 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts >> @@ -1252,8 +1252,12 @@ &ufs_mem_phy { >> &usb_1 { >> status = "okay"; >> }; >> +&usb_1_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts >> b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts >> index 26dfca0c3e05..7b05932f9c36 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts >> @@ -945,8 +945,12 @@ &ufs_mem_phy { >> &usb_1 { >> status = "okay"; >> }; >> +&usb_1_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >> b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >> index 361b0792db4f..744bdc846e70 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts >> @@ -1211,8 +1211,12 @@ &ufs_mem_phy { >> &usb_1 { >> status = "okay"; >> }; >> +&usb_1_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts >> b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts >> index 092b78fd8a3b..f07a56583e7d 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts >> @@ -1300,8 +1300,12 @@ &ufs_mem_phy { >> &usb_1 { >> status = "okay"; >> }; >> +&usb_1_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >> b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >> index d6f91580ba8d..1a9a31423af4 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts >> @@ -839,8 +839,12 @@ &ufs_mem_phy { >> &usb_1 { >> status = "okay"; >> }; >> +&usb_1_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts >> b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts >> index bd60c2770da2..031b7ada8eb1 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts >> @@ -1285,8 +1285,12 @@ &ufs_mem_phy { >> &usb_1 { >> status = "okay"; >> }; >> +&usb_1_dwc3 { >> + role-switch-default-mode = "host"; >> +}; >> + >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> >
On Mon, 24 Jun 2024 at 15:33, <neil.armstrong@linaro.org> wrote: > > On 24/06/2024 14:31, Dmitry Baryshkov wrote: > > On Mon, 24 Jun 2024 at 15:28, <neil.armstrong@linaro.org> wrote: > >> > >> On 24/06/2024 14:23, Caleb Connolly wrote: > >>> Generally, when given the choice these boards should prefer host mode > >>> since they're SBCs. When attached to a laptop (which is host-only) they > >>> should still fall back to peripheral mode. > >> > >> It's really not what I observed on sm8550/sm8650 QRD/HDK, as the power > >> is setup for peripheral by the bootloader and without an actual UCSI/PD > >> negociation it would only be functionnal as peripheral mode. > >> > >> So this is definitely untrue on sm8450/sm8550/sm8650 HDK/QRD/MTP. > > > > But we now have the UCSI support for those platforms, don't we? > > UCSI doesn't care about role-switch-default-mode, it's the default > fallback role to set when no role was explicitely set by UCSI. > > Setting host won't make it work because the power support is handled > by the UCSI firmware. setting role-switch-default-mode = "host" will > make the USB port unusable if UCSI fails to start since it's > physically set to peripheral mode. Let's not mix the source/sink and host/peripheral, those are independent. But I see your point. Neither TCPM nor UCSI check this property. So it seems it's incorrect to set it even for the TCPM hosts. > > Neil > > > > >> > >> Neil > >> > >>> > >>> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > >>> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > >>> --- > >>> arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 1 + > >>> arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 1 + > >>> arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 + > >>> arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++++ > >>> arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ++++ > >>> 12 files changed, 39 insertions(+) > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > >>> index c4cde4328e3d..bac4ed5874b6 100644 > >>> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > >>> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts > >>> @@ -657,8 +657,9 @@ &usb_1 { > >>> > >>> &usb_1_dwc3 { > >>> dr_mode = "otg"; > >>> usb-role-switch; > >>> + role-switch-default-mode = "host"; > >>> }; > >>> > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > >>> index e19790464a11..bece4896ca23 100644 > >>> --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > >>> +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts > >>> @@ -593,8 +593,12 @@ &uart4 { > >>> &usb { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_dwc3_hs { > >>> remote-endpoint = <&pm4125_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > >>> index 1c7de7f2db79..17d36f0ef5ab 100644 > >>> --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > >>> +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > >>> @@ -661,8 +661,12 @@ &uart4 { > >>> &usb { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_dwc3_hs { > >>> remote-endpoint = <&pmi632_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > >>> index bac08f00b303..fe548d795490 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts > >>> @@ -695,8 +695,9 @@ &usb_2 { > >>> > >>> &usb_1_dwc3 { > >>> dr_mode = "otg"; > >>> usb-role-switch; > >>> + role-switch-default-mode = "host"; > >>> }; > >>> > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pm8150b_hs_in>; > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > >>> index e031ad4c19f4..20d5c54cfcf9 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts > >>> @@ -847,8 +847,12 @@ &ufs_mem_phy { > >>> &usb_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_1_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > >>> index a754b8fe9167..ebafcbe6859e 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > >>> @@ -1098,8 +1098,9 @@ &usb_1 { > >>> > >>> &usb_1_dwc3 { > >>> dr_mode = "otg"; > >>> usb-role-switch; > >>> + role-switch-default-mode = "host"; > >>> }; > >>> > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > >>> index e0dc03a97771..1efda478b7b9 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts > >>> @@ -1252,8 +1252,12 @@ &ufs_mem_phy { > >>> &usb_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_1_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > >>> index 26dfca0c3e05..7b05932f9c36 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts > >>> @@ -945,8 +945,12 @@ &ufs_mem_phy { > >>> &usb_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_1_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > >>> index 361b0792db4f..744bdc846e70 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts > >>> @@ -1211,8 +1211,12 @@ &ufs_mem_phy { > >>> &usb_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_1_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > >>> index 092b78fd8a3b..f07a56583e7d 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts > >>> @@ -1300,8 +1300,12 @@ &ufs_mem_phy { > >>> &usb_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_1_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > >>> index d6f91580ba8d..1a9a31423af4 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts > >>> @@ -839,8 +839,12 @@ &ufs_mem_phy { > >>> &usb_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_1_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> }; > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > >>> index bd60c2770da2..031b7ada8eb1 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > >>> +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts > >>> @@ -1285,8 +1285,12 @@ &ufs_mem_phy { > >>> &usb_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&usb_1_dwc3 { > >>> + role-switch-default-mode = "host"; > >>> +}; > >>> + > >>> &usb_1_dwc3_hs { > >>> remote-endpoint = <&pmic_glink_hs_in>; > >>> }; > >>> > >>> > >> > > > > >
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts index c4cde4328e3d..bac4ed5874b6 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -657,8 +657,9 @@ &usb_1 { &usb_1_dwc3 { dr_mode = "otg"; usb-role-switch; + role-switch-default-mode = "host"; }; &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts index e19790464a11..bece4896ca23 100644 --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts @@ -593,8 +593,12 @@ &uart4 { &usb { status = "okay"; }; +&usb_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_dwc3_hs { remote-endpoint = <&pm4125_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index 1c7de7f2db79..17d36f0ef5ab 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -661,8 +661,12 @@ &uart4 { &usb { status = "okay"; }; +&usb_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_dwc3_hs { remote-endpoint = <&pmi632_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts index bac08f00b303..fe548d795490 100644 --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts @@ -695,8 +695,9 @@ &usb_2 { &usb_1_dwc3 { dr_mode = "otg"; usb-role-switch; + role-switch-default-mode = "host"; }; &usb_1_dwc3_hs { remote-endpoint = <&pm8150b_hs_in>; diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts index e031ad4c19f4..20d5c54cfcf9 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts @@ -847,8 +847,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts index a754b8fe9167..ebafcbe6859e 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts @@ -1098,8 +1098,9 @@ &usb_1 { &usb_1_dwc3 { dr_mode = "otg"; usb-role-switch; + role-switch-default-mode = "host"; }; &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts index e0dc03a97771..1efda478b7b9 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts @@ -1252,8 +1252,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts index 26dfca0c3e05..7b05932f9c36 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -945,8 +945,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index 361b0792db4f..744bdc846e70 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -1211,8 +1211,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts index 092b78fd8a3b..f07a56583e7d 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts @@ -1300,8 +1300,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts index d6f91580ba8d..1a9a31423af4 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts @@ -839,8 +839,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts index bd60c2770da2..031b7ada8eb1 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts @@ -1285,8 +1285,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; };
Generally, when given the choice these boards should prefer host mode since they're SBCs. When attached to a laptop (which is host-only) they should still fall back to peripheral mode. Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> --- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 1 + arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 1 + arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 + arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ++++ 12 files changed, 39 insertions(+)