Message ID | 20240619-rb2-fixes-v1-2-1d2b1d711969@linaro.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | qcom: dts: qrb4210-rb2 usb/emmc fixes | expand |
On Wed, 19 Jun 2024 at 23:33, Caleb Connolly <caleb.connolly@linaro.org> wrote: > > Give a hint to the OS which role we prefer. Host mode generally makes > the most sense. Why? > > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > --- > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > 1 file changed, 4 insertions(+) Would it make sense to set this for all the RB and HDK boards?
On 20/06/2024 15:15, Dmitry Baryshkov wrote: > On Wed, 19 Jun 2024 at 23:33, Caleb Connolly <caleb.connolly@linaro.org> wrote: >> >> Give a hint to the OS which role we prefer. Host mode generally makes >> the most sense. > > Why? I guess this is subjective, but on these boards the more common usecase is host mode (before we had role switching we forced them to host mode...). > >> >> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> >> --- >> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ >> 1 file changed, 4 insertions(+) > > Would it make sense to set this for all the RB and HDK boards? The rb1/2 are the only boards which lack multiple USB controllers. For others it's fine to leave the default (peripheral mode). >
On Thu, Jun 20, 2024 at 03:30:29PM GMT, Caleb Connolly wrote: > > > On 20/06/2024 15:15, Dmitry Baryshkov wrote: > > On Wed, 19 Jun 2024 at 23:33, Caleb Connolly <caleb.connolly@linaro.org> wrote: > > > > > > Give a hint to the OS which role we prefer. Host mode generally makes > > > the most sense. > > > > Why? > > I guess this is subjective, but on these boards the more common usecase is > host mode (before we had role switching we forced them to host mode...). > > > > > > > > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > > > --- > > > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > Would it make sense to set this for all the RB and HDK boards? > > The rb1/2 are the only boards which lack multiple USB controllers. For > others it's fine to leave the default (peripheral mode). SM8450-HDK and SM8650-HDK also have just a single USB-C port. My logic was slightly different. We consider these devices to be SBCs, so I'd expect that they act as hosts _by_default_. If somebody plugs RB board into a laptop, then it's logical that it should work as a device, but between the phone and the RB board the RB is a host.
On 20/06/2024 17:07, Dmitry Baryshkov wrote: > On Thu, Jun 20, 2024 at 03:30:29PM GMT, Caleb Connolly wrote: >> >> >> On 20/06/2024 15:15, Dmitry Baryshkov wrote: >>> On Wed, 19 Jun 2024 at 23:33, Caleb Connolly <caleb.connolly@linaro.org> wrote: >>>> >>>> Give a hint to the OS which role we prefer. Host mode generally makes >>>> the most sense. >>> >>> Why? >> >> I guess this is subjective, but on these boards the more common usecase is >> host mode (before we had role switching we forced them to host mode...). >>> >>>> >>>> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> >>>> --- >>>> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>> >>> Would it make sense to set this for all the RB and HDK boards? >> >> The rb1/2 are the only boards which lack multiple USB controllers. For >> others it's fine to leave the default (peripheral mode). > > SM8450-HDK and SM8650-HDK also have just a single USB-C port. My logic > was slightly different. We consider these devices to be SBCs, so I'd > expect that they act as hosts _by_default_. If somebody plugs RB board > into a laptop, then it's logical that it should work as a device, but > between the phone and the RB board the RB is a host. Ahh I see, then yes perhaps it makes sense. I can send v2 with patches for other boards too. * qrb2210-rb1 * qrb4210-rb2 * sm8450-hdk * sm8650-hdk Any others? >
On Thu, 20 Jun 2024 at 19:49, Caleb Connolly <caleb.connolly@linaro.org> wrote: > > > > On 20/06/2024 17:07, Dmitry Baryshkov wrote: > > On Thu, Jun 20, 2024 at 03:30:29PM GMT, Caleb Connolly wrote: > >> > >> > >> On 20/06/2024 15:15, Dmitry Baryshkov wrote: > >>> On Wed, 19 Jun 2024 at 23:33, Caleb Connolly <caleb.connolly@linaro.org> wrote: > >>>> > >>>> Give a hint to the OS which role we prefer. Host mode generally makes > >>>> the most sense. > >>> > >>> Why? > >> > >> I guess this is subjective, but on these boards the more common usecase is > >> host mode (before we had role switching we forced them to host mode...). > >>> > >>>> > >>>> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > >>>> --- > >>>> arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > >>>> 1 file changed, 4 insertions(+) > >>> > >>> Would it make sense to set this for all the RB and HDK boards? > >> > >> The rb1/2 are the only boards which lack multiple USB controllers. For > >> others it's fine to leave the default (peripheral mode). > > > > SM8450-HDK and SM8650-HDK also have just a single USB-C port. My logic > > was slightly different. We consider these devices to be SBCs, so I'd > > expect that they act as hosts _by_default_. If somebody plugs RB board > > into a laptop, then it's logical that it should work as a device, but > > between the phone and the RB board the RB is a host. > > Ahh I see, then yes perhaps it makes sense. I can send v2 with patches > for other boards too. > > * qrb2210-rb1 > * qrb4210-rb2 > * sm8450-hdk > * sm8650-hdk > > Any others? I checked, sm8550-hdk also doesn't seem to have the USB-A port. I think that's it for now.
On Thu, Jun 20, 2024 at 06:49:46PM GMT, Caleb Connolly wrote: > > > On 20/06/2024 17:07, Dmitry Baryshkov wrote: > > On Thu, Jun 20, 2024 at 03:30:29PM GMT, Caleb Connolly wrote: > > > > > > > > > On 20/06/2024 15:15, Dmitry Baryshkov wrote: > > > > On Wed, 19 Jun 2024 at 23:33, Caleb Connolly <caleb.connolly@linaro.org> wrote: > > > > > > > > > > Give a hint to the OS which role we prefer. Host mode generally makes > > > > > the most sense. > > > > > > > > Why? > > > > > > I guess this is subjective, but on these boards the more common usecase is > > > host mode (before we had role switching we forced them to host mode...). > > > > > > > > > > > > > > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > > > > > --- > > > > > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > > > > > 1 file changed, 4 insertions(+) > > > > > > > > Would it make sense to set this for all the RB and HDK boards? > > > > > > The rb1/2 are the only boards which lack multiple USB controllers. For > > > others it's fine to leave the default (peripheral mode). > > > > SM8450-HDK and SM8650-HDK also have just a single USB-C port. My logic > > was slightly different. We consider these devices to be SBCs, so I'd > > expect that they act as hosts _by_default_. If somebody plugs RB board > > into a laptop, then it's logical that it should work as a device, but > > between the phone and the RB board the RB is a host. > > Ahh I see, then yes perhaps it makes sense. I can send v2 with patches for > other boards too. > > * qrb2210-rb1 > * qrb4210-rb2 > * sm8450-hdk > * sm8650-hdk > > Any others? qcs6490-rb3gen2 please. I'm picking patch 1 for v6.10, no need to repost it. Regards, Bjorn > > > > -- > // Caleb (they/them)
On Fri, 21 Jun 2024 at 08:32, Bjorn Andersson <andersson@kernel.org> wrote: > > On Thu, Jun 20, 2024 at 06:49:46PM GMT, Caleb Connolly wrote: > > > > > > On 20/06/2024 17:07, Dmitry Baryshkov wrote: > > > On Thu, Jun 20, 2024 at 03:30:29PM GMT, Caleb Connolly wrote: > > > > > > > > > > > > On 20/06/2024 15:15, Dmitry Baryshkov wrote: > > > > > On Wed, 19 Jun 2024 at 23:33, Caleb Connolly <caleb.connolly@linaro.org> wrote: > > > > > > > > > > > > Give a hint to the OS which role we prefer. Host mode generally makes > > > > > > the most sense. > > > > > > > > > > Why? > > > > > > > > I guess this is subjective, but on these boards the more common usecase is > > > > host mode (before we had role switching we forced them to host mode...). > > > > > > > > > > > > > > > > > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > > > > > > --- > > > > > > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ > > > > > > 1 file changed, 4 insertions(+) > > > > > > > > > > Would it make sense to set this for all the RB and HDK boards? > > > > > > > > The rb1/2 are the only boards which lack multiple USB controllers. For > > > > others it's fine to leave the default (peripheral mode). > > > > > > SM8450-HDK and SM8650-HDK also have just a single USB-C port. My logic > > > was slightly different. We consider these devices to be SBCs, so I'd > > > expect that they act as hosts _by_default_. If somebody plugs RB board > > > into a laptop, then it's logical that it should work as a device, but > > > between the phone and the RB board the RB is a host. > > > > Ahh I see, then yes perhaps it makes sense. I can send v2 with patches for > > other boards too. > > > > * qrb2210-rb1 > > * qrb4210-rb2 > > * sm8450-hdk > > * sm8650-hdk > > > > Any others? > > qcs6490-rb3gen2 please. Seeing the list grow on and on. What about making a policy decision that all non-phone-factor ARCH_QCOM devices should use the host role by default? So HDK, IDP, RBn, DragonBoard, laptops => host. QRD, phones => peripheral. Not sure about the tablets. Probably peripheral too (unless it's a convertible / 2-in-1). > > I'm picking patch 1 for v6.10, no need to repost it. > > Regards, > Bjorn > > > > > > > > -- > > // Caleb (they/them)
diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index 2c39bb1b97db..e9a63956b8b7 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -648,8 +648,12 @@ &uart4 { &usb { status = "okay"; }; +&usb_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_dwc3_hs { remote-endpoint = <&pmi632_hs_in>; };
Give a hint to the OS which role we prefer. Host mode generally makes the most sense. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> --- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ 1 file changed, 4 insertions(+)