2020-07-24 10:50:41

by Amelie Delaunay

[permalink] [raw]
Subject: [PATCH v3 0/3] Add USB role switch support to DWC2

When using usb-c connector (but it can also be the case with a micro-b
connector), iddig, avalid, bvalid, vbusvalid input signals may not be
connected to the DWC2 OTG controller.
DWC2 OTG controller features an overriding control of the PHY voltage valid
and ID input signals.
So, missing signals can be forced using usb role from usb role switch and
this override feature.

This series adds support for usb role switch to dwc2, by using overriding
control of the PHY voltage valid and ID input signals.

It has been tested on stm32mp157c-dk2 [1], which has a Type-C connector
managed by a Type-C port controller, and connected to USB OTG controller.

[1] https://www.st.com/en/evaluation-tools/stm32mp157c-dk2.html

Amelie Delaunay (3):
usb: dwc2: override PHY input signals with usb role switch support
dt-bindings: usb: dwc2: add optional usb-role-switch property
usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15
SoCs
---
Changes in v3:
- Fix build issue reported by kernel test robot in drd.c
Changes in v2:
- Previous DT patch already in stm32-next branch so removed from v2 patchset
"ARM: dts: stm32: enable usb-role-switch on USB OTG on stm32mp15xx-dkx"
- DWC2 DT bindings update added
- Build issue reported by kernel test robot fixed
- Martin's comments taken into account
---
.../devicetree/bindings/usb/dwc2.yaml | 4 +
drivers/usb/dwc2/Kconfig | 1 +
drivers/usb/dwc2/Makefile | 2 +-
drivers/usb/dwc2/core.h | 9 +
drivers/usb/dwc2/drd.c | 181 ++++++++++++++++++
drivers/usb/dwc2/gadget.c | 2 +-
drivers/usb/dwc2/params.c | 4 +-
drivers/usb/dwc2/platform.c | 15 ++
8 files changed, 215 insertions(+), 3 deletions(-)
create mode 100644 drivers/usb/dwc2/drd.c

--
2.17.1


2020-07-24 12:45:01

by Amelie Delaunay

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add USB role switch support to DWC2

Series dropped.

On 7/24/20 12:47 PM, Amelie Delaunay wrote:
> When using usb-c connector (but it can also be the case with a micro-b
> connector), iddig, avalid, bvalid, vbusvalid input signals may not be
> connected to the DWC2 OTG controller.
> DWC2 OTG controller features an overriding control of the PHY voltage valid
> and ID input signals.
> So, missing signals can be forced using usb role from usb role switch and
> this override feature.
>
> This series adds support for usb role switch to dwc2, by using overriding
> control of the PHY voltage valid and ID input signals.
>
> It has been tested on stm32mp157c-dk2 [1], which has a Type-C connector
> managed by a Type-C port controller, and connected to USB OTG controller.
>
> [1] https://www.st.com/en/evaluation-tools/stm32mp157c-dk2.html
>
> Amelie Delaunay (3):
> usb: dwc2: override PHY input signals with usb role switch support
> dt-bindings: usb: dwc2: add optional usb-role-switch property
> usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15
> SoCs
> ---
> Changes in v3:
> - Fix build issue reported by kernel test robot in drd.c
> Changes in v2:
> - Previous DT patch already in stm32-next branch so removed from v2 patchset
> "ARM: dts: stm32: enable usb-role-switch on USB OTG on stm32mp15xx-dkx"
> - DWC2 DT bindings update added
> - Build issue reported by kernel test robot fixed
> - Martin's comments taken into account
> ---
> .../devicetree/bindings/usb/dwc2.yaml | 4 +
> drivers/usb/dwc2/Kconfig | 1 +
> drivers/usb/dwc2/Makefile | 2 +-
> drivers/usb/dwc2/core.h | 9 +
> drivers/usb/dwc2/drd.c | 181 ++++++++++++++++++
> drivers/usb/dwc2/gadget.c | 2 +-
> drivers/usb/dwc2/params.c | 4 +-
> drivers/usb/dwc2/platform.c | 15 ++
> 8 files changed, 215 insertions(+), 3 deletions(-)
> create mode 100644 drivers/usb/dwc2/drd.c
>

2020-07-24 13:53:36

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add USB role switch support to DWC2


(no top-posting, please)

Hi,

Amelie DELAUNAY <[email protected]> writes:
> Series dropped.

what do you mean with this? Should I drop all patches related with this series?

--
balbi


Attachments:
signature.asc (847.00 B)

2020-07-24 14:01:58

by Amelie Delaunay

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add USB role switch support to DWC2

Hi,

On 7/24/20 3:50 PM, Felipe Balbi wrote:
>
> (no top-posting, please)
>
> Hi,
>
> Amelie DELAUNAY <[email protected]> writes:
>> Series dropped.
>
> what do you mean with this? Should I drop all patches related with this series?
>

As v1 patches were in your next branch, I've prepared a new patchset
which contains fixes, on top of you next branch :
https://lore.kernel.org/patchwork/project/lkml/list/?series=454959


What do you prefer ? Drop all patches related to the v1 "Add USB role
switch support to DWC2" series and I send a v4 in replacement or keep
all patches and wait for new series review ?

2020-07-24 16:17:19

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add USB role switch support to DWC2

Amelie DELAUNAY <[email protected]> writes:

> Hi,
>
> On 7/24/20 3:50 PM, Felipe Balbi wrote:
>>
>> (no top-posting, please)
>>
>> Hi,
>>
>> Amelie DELAUNAY <[email protected]> writes:
>>> Series dropped.
>>
>> what do you mean with this? Should I drop all patches related with this series?
>>
>
> As v1 patches were in your next branch, I've prepared a new patchset
> which contains fixes, on top of you next branch :
> https://lore.kernel.org/patchwork/project/lkml/list/?series=454959
>
>
> What do you prefer ? Drop all patches related to the v1 "Add USB role
> switch support to DWC2" series and I send a v4 in replacement or keep
> all patches and wait for new series review ?

I've dropped those because they caused the build breakage :-) I can take
a new series, let's take the opportunity to avoid the build regression.

--
balbi


Attachments:
signature.asc (847.00 B)

2020-07-27 09:38:50

by Amelie Delaunay

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add USB role switch support to DWC2

Hi,

On 7/24/20 6:16 PM, Felipe Balbi wrote:
> Amelie DELAUNAY <[email protected]> writes:
>
>> Hi,
>>
>> On 7/24/20 3:50 PM, Felipe Balbi wrote:
>>>
>>> (no top-posting, please)
>>>
>>> Hi,
>>>
>>> Amelie DELAUNAY <[email protected]> writes:
>>>> Series dropped.
>>>
>>> what do you mean with this? Should I drop all patches related with this series?
>>>
>>
>> As v1 patches were in your next branch, I've prepared a new patchset
>> which contains fixes, on top of you next branch :
>> https://lore.kernel.org/patchwork/project/lkml/list/?series=454959
>>
>>
>> What do you prefer ? Drop all patches related to the v1 "Add USB role
>> switch support to DWC2" series and I send a v4 in replacement or keep
>> all patches and wait for new series review ?
>
> I've dropped those because they caused the build breakage :-) I can take
> a new series, let's take the opportunity to avoid the build regression.
>

Sure! I've sent the v4, rebased on your testing/next because your next
still contains the v1 patches, with the fix for build issue, and
adressing Martin's comments. I drop the fixes series.

Regards,
Amelie