mbox series

[v3,0/3] Add USB role switch support to DWC2

Message ID 20200724104711.5474-1-amelie.delaunay@st.com (mailing list archive)
Headers show
Series Add USB role switch support to DWC2 | expand

Message

Amelie Delaunay July 24, 2020, 10:47 a.m. UTC
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

Comments

Amelie Delaunay July 24, 2020, 12:43 p.m. UTC | #1
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
>
Felipe Balbi July 24, 2020, 1:50 p.m. UTC | #2
(no top-posting, please)

Hi,

Amelie DELAUNAY <amelie.delaunay@st.com> writes:
> Series dropped.

what do you mean with this? Should I drop all patches related with this series?
Amelie Delaunay July 24, 2020, 1:58 p.m. UTC | #3
Hi,

On 7/24/20 3:50 PM, Felipe Balbi wrote:
> 
> (no top-posting, please)
> 
> Hi,
> 
> Amelie DELAUNAY <amelie.delaunay@st.com> 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 ?
Felipe Balbi July 24, 2020, 4:16 p.m. UTC | #4
Amelie DELAUNAY <amelie.delaunay@st.com> writes:

> Hi,
>
> On 7/24/20 3:50 PM, Felipe Balbi wrote:
>> 
>> (no top-posting, please)
>> 
>> Hi,
>> 
>> Amelie DELAUNAY <amelie.delaunay@st.com> 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.
Amelie Delaunay July 27, 2020, 9:37 a.m. UTC | #5
Hi,

On 7/24/20 6:16 PM, Felipe Balbi wrote:
> Amelie DELAUNAY <amelie.delaunay@st.com> writes:
> 
>> Hi,
>>
>> On 7/24/20 3:50 PM, Felipe Balbi wrote:
>>>
>>> (no top-posting, please)
>>>
>>> Hi,
>>>
>>> Amelie DELAUNAY <amelie.delaunay@st.com> 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