* [PATCH v2] usb: dwc3: qcom: enable vbus override when in OTG dr-mode
@ 2023-01-24 8:31 Neil Armstrong
2023-01-30 13:37 ` Konrad Dybcio
0 siblings, 1 reply; 3+ messages in thread
From: Neil Armstrong @ 2023-01-24 8:31 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Thinh Nguyen,
Greg Kroah-Hartman
Cc: Bryan O'Donoghue, linux-arm-msm, linux-usb, linux-kernel,
Neil Armstrong
With vbus override enabled when in OTG dr_mode, Host<->Peripheral
switch now works on SM8550, otherwise the DWC3 seems to be stuck
in Host mode only.
Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- Added Bryan's reviewed-by
- Added Fixes tag
- Link to v1: https://lore.kernel.org/r/20230123-topic-sm8550-upstream-dwc3-qcom-otg-v1-1-e287a418aa5f@linaro.org
---
drivers/usb/dwc3/dwc3-qcom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index b0a0351d2d8b..959fc925ca7c 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -901,7 +901,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
qcom->mode = usb_get_dr_mode(&qcom->dwc3->dev);
/* enable vbus override for device mode */
- if (qcom->mode == USB_DR_MODE_PERIPHERAL)
+ if (qcom->mode != USB_DR_MODE_HOST)
dwc3_qcom_vbus_override_enable(qcom, true);
/* register extcon to override sw_vbus on Vbus change later */
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230123-topic-sm8550-upstream-dwc3-qcom-otg-81795ea148db
Best regards,
--
Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] usb: dwc3: qcom: enable vbus override when in OTG dr-mode
2023-01-24 8:31 [PATCH v2] usb: dwc3: qcom: enable vbus override when in OTG dr-mode Neil Armstrong
@ 2023-01-30 13:37 ` Konrad Dybcio
2023-01-30 13:51 ` Neil Armstrong
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Dybcio @ 2023-01-30 13:37 UTC (permalink / raw)
To: Neil Armstrong, Andy Gross, Bjorn Andersson, Thinh Nguyen,
Greg Kroah-Hartman
Cc: Bryan O'Donoghue, linux-arm-msm, linux-usb, linux-kernel
On 24.01.2023 09:31, Neil Armstrong wrote:
> With vbus override enabled when in OTG dr_mode, Host<->Peripheral
> switch now works on SM8550, otherwise the DWC3 seems to be stuck
> in Host mode only.
>
> Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
Required for SM6115P Lenovo Tab P11 to switch to peripheral
with otg dr_mode as well!
Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> Changes in v2:
> - Added Bryan's reviewed-by
> - Added Fixes tag
> - Link to v1: https://lore.kernel.org/r/20230123-topic-sm8550-upstream-dwc3-qcom-otg-v1-1-e287a418aa5f@linaro.org
> ---
> drivers/usb/dwc3/dwc3-qcom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index b0a0351d2d8b..959fc925ca7c 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -901,7 +901,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
> qcom->mode = usb_get_dr_mode(&qcom->dwc3->dev);
>
> /* enable vbus override for device mode */
> - if (qcom->mode == USB_DR_MODE_PERIPHERAL)
> + if (qcom->mode != USB_DR_MODE_HOST)
> dwc3_qcom_vbus_override_enable(qcom, true);
>
> /* register extcon to override sw_vbus on Vbus change later */
>
> ---
> base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
> change-id: 20230123-topic-sm8550-upstream-dwc3-qcom-otg-81795ea148db
>
> Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] usb: dwc3: qcom: enable vbus override when in OTG dr-mode
2023-01-30 13:37 ` Konrad Dybcio
@ 2023-01-30 13:51 ` Neil Armstrong
0 siblings, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2023-01-30 13:51 UTC (permalink / raw)
To: Konrad Dybcio, Andy Gross, Bjorn Andersson, Thinh Nguyen,
Greg Kroah-Hartman
Cc: Bryan O'Donoghue, linux-arm-msm, linux-usb, linux-kernel
On 30/01/2023 14:37, Konrad Dybcio wrote:
>
>
> On 24.01.2023 09:31, Neil Armstrong wrote:
>> With vbus override enabled when in OTG dr_mode, Host<->Peripheral
>> switch now works on SM8550, otherwise the DWC3 seems to be stuck
>> in Host mode only.
>>
>> Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
> Required for SM6115P Lenovo Tab P11 to switch to peripheral
> with otg dr_mode as well!
Thanks for testing, seems it was applied by Greg
Neil
>
> Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>
> Konrad
>> Changes in v2:
>> - Added Bryan's reviewed-by
>> - Added Fixes tag
>> - Link to v1: https://lore.kernel.org/r/20230123-topic-sm8550-upstream-dwc3-qcom-otg-v1-1-e287a418aa5f@linaro.org
>> ---
>> drivers/usb/dwc3/dwc3-qcom.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
>> index b0a0351d2d8b..959fc925ca7c 100644
>> --- a/drivers/usb/dwc3/dwc3-qcom.c
>> +++ b/drivers/usb/dwc3/dwc3-qcom.c
>> @@ -901,7 +901,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
>> qcom->mode = usb_get_dr_mode(&qcom->dwc3->dev);
>>
>> /* enable vbus override for device mode */
>> - if (qcom->mode == USB_DR_MODE_PERIPHERAL)
>> + if (qcom->mode != USB_DR_MODE_HOST)
>> dwc3_qcom_vbus_override_enable(qcom, true);
>>
>> /* register extcon to override sw_vbus on Vbus change later */
>>
>> ---
>> base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
>> change-id: 20230123-topic-sm8550-upstream-dwc3-qcom-otg-81795ea148db
>>
>> Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-30 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 8:31 [PATCH v2] usb: dwc3: qcom: enable vbus override when in OTG dr-mode Neil Armstrong
2023-01-30 13:37 ` Konrad Dybcio
2023-01-30 13:51 ` Neil Armstrong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.