2023-05-05 16:45:12

by Yang Xiwen

[permalink] [raw]
Subject: [PATCH] arm64: dts: qcom: msm8916-ufi: make UDC dual mode

It's possible to use this device with a (non-standard) hub to get USB
working in host mode, but dr_mode="peripheral" prevents the UDC to
do so.
Remove dr_mode="peripheral" and add usb-role-switch so that it defaults
to otg mode and can be switched to host mode in userspace.

Signed-off-by: Yang Xiwen <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
index 50bae6f214f1f..08ecd901c1af6 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi
@@ -109,7 +109,7 @@ &sdhc_1 {

&usb {
extcon = <&pm8916_usbin>;
- dr_mode = "peripheral";
+ usb-role-switch;

status = "okay";
};
--
2.39.1


--
Best regards,
Yang Xiwen


2023-05-25 05:38:29

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: msm8916-ufi: make UDC dual mode

On Sat, 6 May 2023 00:32:51 +0800, Yang Xiwen wrote:
> It's possible to use this device with a (non-standard) hub to get USB
> working in host mode, but dr_mode="peripheral" prevents the UDC to
> do so.
> Remove dr_mode="peripheral" and add usb-role-switch so that it defaults
> to otg mode and can be switched to host mode in userspace.
>
>
> [...]

Applied, thanks!

[1/1] arm64: dts: qcom: msm8916-ufi: make UDC dual mode
commit: 06a9f50c20b5d5fcec9cb0d44b759c4183c7bbd5

Best regards,
--
Bjorn Andersson <[email protected]>