diff mbox series

[2/2] arm64: dts: qcom: qrb4210-rb2: set role-switch-default-mode

Message ID 20240619-rb2-fixes-v1-2-1d2b1d711969@linaro.org
State New
Headers show
Series [1/2] arm64: dts: qcom: sm6115: add iommu for sdhc_1 | expand

Commit Message

Caleb Connolly June 19, 2024, 8:33 p.m. UTC
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(+)

Comments

Dmitry Baryshkov June 21, 2024, 3:26 p.m. UTC | #1
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 mbox series

Patch

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>;
 };