mbox series

[SRU,Eoan,linux-raspi2,0/1] set USB_DWC2_DUAL_ROLE=y

Message ID 20200210023658.12999-1-hui.wang@canonical.com
Headers show
Series set USB_DWC2_DUAL_ROLE=y | expand

Message

Hui Wang Feb. 10, 2020, 2:36 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1861070

[Impact]
On the RPI4B board, the usb-c power port could also work as a USB
OTG mode, but we set the dwc2 driver to the host mode
unconditionally, now set it to dual_role mode, then it could work
in host/otg/peripheal mode.

[Fix]
Set USB_DWC2_DUAL_ROLE=y, USB_DWC2_HOST=n


[Test Case]
set the dtoverlay=dwc2,dr_mode=[otg|peripheral] in the config.txt,
and isnmod the g_ether or g_cdc, on the host machine, we could see
RPI4B work as a usb device.

Because physical port limitation, could test dr_mode=host.

[Regression Risk]
Low, our eoan kernel choose dwc_otg driver for this port by default,
very very few users will choose dwc2 driver, and the dwc2 driver is
not enabled by default in our kernel.

And bug reporter and I already tested that the peripheral mode works
after this change.


Hui Wang (1):
  UBUNTU: [Config] raspi2: USB_DWC2_DUAL_ROLE=y

 debian.raspi2/config/annotations          | 7 +++++--
 debian.raspi2/config/config.common.ubuntu | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

Comments

Sultan Alsawaf Feb. 11, 2020, 12:50 a.m. UTC | #1
On Mon, Feb 10, 2020 at 10:36:57AM +0800, Hui Wang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1861070
> 
> [Impact]
> On the RPI4B board, the usb-c power port could also work as a USB
> OTG mode, but we set the dwc2 driver to the host mode
> unconditionally, now set it to dual_role mode, then it could work
> in host/otg/peripheal mode.
> 
> [Fix]
> Set USB_DWC2_DUAL_ROLE=y, USB_DWC2_HOST=n
> 
> 
> [Test Case]
> set the dtoverlay=dwc2,dr_mode=[otg|peripheral] in the config.txt,
> and isnmod the g_ether or g_cdc, on the host machine, we could see
> RPI4B work as a usb device.
> 
> Because physical port limitation, could test dr_mode=host.
> 
> [Regression Risk]
> Low, our eoan kernel choose dwc_otg driver for this port by default,
> very very few users will choose dwc2 driver, and the dwc2 driver is
> not enabled by default in our kernel.
> 
> And bug reporter and I already tested that the peripheral mode works
> after this change.
> 
> 
> Hui Wang (1):
>   UBUNTU: [Config] raspi2: USB_DWC2_DUAL_ROLE=y
> 
>  debian.raspi2/config/annotations          | 7 +++++--
>  debian.raspi2/config/config.common.ubuntu | 4 ++--
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Acked-by: Sultan Alsawaf <sultan.alsawaf@canonical.com>
Kleber Sacilotto de Souza Feb. 14, 2020, 3:56 p.m. UTC | #2
On 10.02.20 03:36, Hui Wang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1861070
> 
> [Impact]
> On the RPI4B board, the usb-c power port could also work as a USB
> OTG mode, but we set the dwc2 driver to the host mode
> unconditionally, now set it to dual_role mode, then it could work
> in host/otg/peripheal mode.
> 
> [Fix]
> Set USB_DWC2_DUAL_ROLE=y, USB_DWC2_HOST=n
> 
> 
> [Test Case]
> set the dtoverlay=dwc2,dr_mode=[otg|peripheral] in the config.txt,
> and isnmod the g_ether or g_cdc, on the host machine, we could see
> RPI4B work as a usb device.
> 
> Because physical port limitation, could test dr_mode=host.
> 
> [Regression Risk]
> Low, our eoan kernel choose dwc_otg driver for this port by default,
> very very few users will choose dwc2 driver, and the dwc2 driver is
> not enabled by default in our kernel.
> 
> And bug reporter and I already tested that the peripheral mode works
> after this change.
> 
> 
> Hui Wang (1):
>   UBUNTU: [Config] raspi2: USB_DWC2_DUAL_ROLE=y
> 
>  debian.raspi2/config/annotations          | 7 +++++--
>  debian.raspi2/config/config.common.ubuntu | 4 ++--
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 

Applied to eoan/linux-raspi2.

Thanks,
Kleber