diff mbox series

arm64: dts: qcom: qrb2210-rb1: use USB host mode

Message ID 20231025-b4-rb1-usb-host-v1-1-522616c575ef@linaro.org
State Accepted
Commit e0cee8dc6757f9f18718eec553be9fffa503e103
Headers show
Series arm64: dts: qcom: qrb2210-rb1: use USB host mode | expand

Commit Message

Caleb Connolly Oct. 25, 2023, 11:58 a.m. UTC
The default for the QCM2290 platform that this board is based on is OTG
mode, however the role detection logic is not hooked up for this board
and the dwc3 driver is configured to not allow role switching from
userspace.

Force this board to host mode as this is the preferred usecase until we
get role switching hooked up.

Fixes: e18771961336 ("arm64: dts: qcom: Add initial QTI RB1 device tree")
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
base-commit: 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1

// Caleb (they/them)
---
 arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Konrad Dybcio Oct. 26, 2023, 6:56 p.m. UTC | #1
On 10/25/23 13:58, Caleb Connolly wrote:
> The default for the QCM2290 platform that this board is based on is OTG
> mode, however the role detection logic is not hooked up for this board
> and the dwc3 driver is configured to not allow role switching from
> userspace.
> 
> Force this board to host mode as this is the preferred usecase until we
> get role switching hooked up.
Does that not kill usb internet and similar?

Konrad
Caleb Connolly Oct. 26, 2023, 7:04 p.m. UTC | #2
On 26/10/2023 19:56, Konrad Dybcio wrote:
> 
> 
> On 10/25/23 13:58, Caleb Connolly wrote:
>> The default for the QCM2290 platform that this board is based on is OTG
>> mode, however the role detection logic is not hooked up for this board
>> and the dwc3 driver is configured to not allow role switching from
>> userspace.
>>
>> Force this board to host mode as this is the preferred usecase until we
>> get role switching hooked up.
> Does that not kill usb internet and similar?

like rndis gadget? yes, it does kill that. But in return you get real
ethernet ;P

This is the preferred default configuration for these boards (I sent a
similar patch for rb2 before). The usb_role framework does have support
for letting userspace change the role via sysfs, but it's disabled for
dwc3. The plan is to enable role switching properly by reading the DIP
switch state in the future.
> 
> Konrad
Konrad Dybcio Oct. 26, 2023, 7:05 p.m. UTC | #3
On 10/26/23 21:04, Caleb Connolly wrote:
> 
> 
> On 26/10/2023 19:56, Konrad Dybcio wrote:
>>
>>
>> On 10/25/23 13:58, Caleb Connolly wrote:
>>> The default for the QCM2290 platform that this board is based on is OTG
>>> mode, however the role detection logic is not hooked up for this board
>>> and the dwc3 driver is configured to not allow role switching from
>>> userspace.
>>>
>>> Force this board to host mode as this is the preferred usecase until we
>>> get role switching hooked up.
>> Does that not kill usb internet and similar?
> 
> like rndis gadget? yes, it does kill that. But in return you get real
> ethernet ;P
> 
> This is the preferred default configuration for these boards (I sent a
> similar patch for rb2 before). The usb_role framework does have support
> for letting userspace change the role via sysfs, but it's disabled for
> dwc3. The plan is to enable role switching properly by reading the DIP
> switch state in the future.
Ok all that sounds reasonable

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
Dmitry Baryshkov Oct. 30, 2023, 3:58 p.m. UTC | #4
On Wed, 25 Oct 2023 at 14:58, Caleb Connolly <caleb.connolly@linaro.org> wrote:
>
> The default for the QCM2290 platform that this board is based on is OTG
> mode, however the role detection logic is not hooked up for this board
> and the dwc3 driver is configured to not allow role switching from
> userspace.
>
> Force this board to host mode as this is the preferred usecase until we
> get role switching hooked up.
>
> Fixes: e18771961336 ("arm64: dts: qcom: Add initial QTI RB1 device tree")
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>

As a side note, I think we should drop maximum-speed and dr_mode from
qcm2290's usb_dwc3 device node.

> ---
> base-commit: 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1
>
> // Caleb (they/them)
> ---
>  arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++
>  1 file changed, 4 insertions(+)
Bjorn Andersson Dec. 8, 2023, 2:57 a.m. UTC | #5
On Wed, 25 Oct 2023 12:58:00 +0100, Caleb Connolly wrote:
> The default for the QCM2290 platform that this board is based on is OTG
> mode, however the role detection logic is not hooked up for this board
> and the dwc3 driver is configured to not allow role switching from
> userspace.
> 
> Force this board to host mode as this is the preferred usecase until we
> get role switching hooked up.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: qcom: qrb2210-rb1: use USB host mode
      commit: e0cee8dc6757f9f18718eec553be9fffa503e103

Best regards,
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index eadba066972e..f1961a07c9a3 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -366,6 +366,10 @@  &usb {
 	status = "okay";
 };
 
+&usb_dwc3 {
+	dr_mode = "host";
+};
+
 &usb_hsphy {
 	vdd-supply = <&pm2250_l12>;
 	vdda-pll-supply = <&pm2250_l13>;