History log of /linux-master/drivers/usb/dwc2/Kconfig
Revision Date Author Comments
# 17f93402 09-Sep-2020 Amelie Delaunay <amelie.delaunay@st.com>

usb: dwc2: override PHY input signals with usb role switch support

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

iddig signal (ID) can be overridden:
- when setting GUSBCFG_FORCEHOSTMODE, iddig input pin is overridden with 1;
- when setting GUSBCFG_FORCEDEVMODE, iddig input pin is overridden with 0.

avalid/bvalid/vbusvalid signals can be overridden respectively with:
- GOTGCTL_AVALOEN + GOTGCTL_AVALOVAL
- GOTGCTL_BVALOEN + GOTGCTL_BVALOVAL
- GOTGCTL_VBVALEN + GOTGCTL_VBVALOVAL

It is possible to determine valid sessions thanks to usb role switch:
- if USB_ROLE_NONE then !avalid && !bvalid && !vbusvalid
- if USB_ROLE_DEVICE then !avalid && bvalid && vbusvalid
- if USB_ROLE_HOST then avalid && !bvalid && vbusvalid

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>


# ca637790 27-Jul-2020 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Revert "usb: dwc2: override PHY input signals with usb role switch support"

This reverts commit bc0f0d4a5853e32ba97a0318f774570428fc5634.

It was not meant to be applied yet.

Cc: Minas Harutyunyan <hminas@synopsys.com>
Cc: Amelie Delaunay <amelie.delaunay@st.com>
Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bc0f0d4a 16-Jun-2020 Amelie Delaunay <amelie.delaunay@st.com>

usb: dwc2: override PHY input signals with usb role switch support

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

iddig signal (ID) can be overridden:
- when setting GUSBCFG_FORCEHOSTMODE, iddig input pin is overridden with 1;
- when setting GUSBCFG_FORCEDEVMODE, iddig input pin is overridden with 0.

avalid/bvalid/vbusvalid signals can be overridden respectively with:
- GOTGCTL_AVALOEN + GOTGCTL_AVALOVAL
- GOTGCTL_BVALOEN + GOTGCTL_BVALOVAL
- GOTGCTL_VBVALEN + GOTGCTL_VBVALOVAL

It is possible to determine valid sessions thanks to usb role switch:
- if USB_ROLE_NONE then !avalid && !bvalid && !vbusvalid
- if USB_ROLE_DEVICE then !avalid && bvalid && vbusvalid
- if USB_ROLE_HOST then avalid && !bvalid && vbusvalid

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>


# d991f855 20-May-2019 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

usb: remove redundant 'default n' from Kconfig-s

'default n' is the default value for any bool or tristate Kconfig
setting so there is no need to write it explicitly.

Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO
is not set' for visible symbols") the Kconfig behavior is the same
regardless of 'default n' being present or not:

...
One side effect of (and the main motivation for) this change is making
the following two definitions behave exactly the same:

config FOO
bool

config FOO
bool
default n

With this change, neither of these will generate a
'# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied).
That might make it clearer to people that a bare 'default n' is
redundant.
...

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cae8dc3b 17-Jan-2019 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: add missing SPDX lines to Kconfig and Makefiles

There are a few remaining drivers/usb/ files that do not have SPDX
identifiers in them, all of these are either Kconfig or Makefiles. Add
the correct GPL-2.0 identifier to them to make scanning tools happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2c93e790 25-Feb-2017 yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>

usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW

a lot of embeded system SOC (e.g. freescale T2080) have both
PCI and USB modules. But USB module is controlled by registers directly,
it have no relationship with PCI module.

when say N here it will not build PCI related code in USB driver.

Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e43470db 24-Jun-2016 Arnd Bergmann <arnd@arndb.de>

USB: dwc2-usb: add USB_GADGET dependency

The driver selects NOP_USB_XCEIV, which can only be built-in if
USB_GADGET is either disabled or also built-in, so with USB_DWC2_PCI=y
and USB_GADGET=m, NOP_USB_XCEIV is also built-in and we get this link
error:

drivers/usb/built-in.o: In function `nop_set_peripheral':
(text+0x1927c): undefined reference to `usb_gadget_vbus_connect'
drivers/usb/built-in.o: In function `nop_gpio_vbus_thread':
(text+0x197a0): undefined reference to `usb_gadget_vbus_connect'
(text+0x19830): undefined reference to `usb_gadget_vbus_disconnect'

This adds the same dependency for the dwc2 driver to avoid that
broken configuration.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# a057c325 16-Feb-2016 Geert Uytterhoeven <geert@linux-m68k.org>

usb: dwc2: USB_DWC2 should depend on HAS_DMA

If NO_DMA=y:

ERROR: "usb_gadget_map_request" [drivers/usb/dwc2/dwc2.ko] undefined!
ERROR: "usb_gadget_unmap_request" [drivers/usb/dwc2/dwc2.ko] undefined!
ERROR: "bad_dma_ops" [drivers/usb/dwc2/dwc2.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ee89b641 16-Feb-2016 Geert Uytterhoeven <geert@linux-m68k.org>

usb: dwc2: USB_DWC2 should depend on HAS_DMA

If NO_DMA=y:

ERROR: "usb_gadget_map_request" [drivers/usb/dwc2/dwc2.ko] undefined!
ERROR: "usb_gadget_unmap_request" [drivers/usb/dwc2/dwc2.ko] undefined!
ERROR: "bad_dma_ops" [drivers/usb/dwc2/dwc2.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>


# 89f1ec8e 10-Feb-2016 Vegard Nossum <vegard.nossum@oracle.com>

usb: add HAS_IOMEM dependency to USB_DWC2

drivers/built-in.o: In function `dwc2_driver_probe':
/home/vegard/linux/drivers/usb/dwc2/platform.c:491: undefined reference to `devm_ioremap_resource'

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2d1165a4 29-Apr-2015 Mian Yousaf Kaukab <yousaf.kaukab@intel.com>

usb: dwc2: remove dwc2_platform.ko

As dwc2 pci module is now exporting dwc2 platform device, include
platform.o in dwc2-y and remove USB_DWC2_PLATFORM configuration
option. Driver will be built as two modules, dwc2.ko and dwc2_pci.ko.
dwc2.ko is the new platform driver.

Remove all EXPORT_SYMBOL_GPL as they are not needed any more.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# d4ae02cc 12-Mar-2015 John Youn <John.Youn@synopsys.com>

usb: dwc2: pci: Select the generic PHY for dwc2-pci driver

The dwc2-pci driver requires the generic PHY. This fixes undefined
reference issues when it is not selected.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 9024c495 03-Mar-2015 John Youn <John.Youn@synopsys.com>

usb: dwc2: pci: Add device mode to the dwc2-pci driver

The pci driver now registers a platform driver, like in dwc3, and lets
its probe function do all the initialization. This allows it to
account for changes to the platform driver that were not added to the
pci driver. Also future changes to the probe function don't have to be
duplicated. This also has the effect of adding device and DRD mode to
the pci driver. Tested on the Synopsys HAPS PCIe platform.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# b7974de8 28-Jan-2015 Arnd Bergmann <arnd@arndb.de>

usb: dwc2: fix USB core dependencies

It is currently possible to configure the dwc2 driver as built-in
when host mode or dual-role is enabled, but the USB core is
a loadable module. This leads to a link failure:

drivers/built-in.o: In function `_dwc2_hcd_start':
:(.text+0x84538): undefined reference to `usb_hcd_resume_root_hub'
drivers/built-in.o: In function `_dwc2_hcd_urb_dequeue':
:(.text+0x84aa0): undefined reference to `usb_hcd_check_unlink_urb'
:(.text+0x84e4c): undefined reference to `usb_hcd_unlink_urb_from_ep'
:(.text+0x84e74): undefined reference to `usb_hcd_giveback_urb'
drivers/built-in.o: In function `dwc2_assign_and_init_hc':
:(.text+0x86b98): undefined reference to `usb_hcd_unmap_urb_for_dma'
drivers/built-in.o: In function `_dwc2_hcd_urb_enqueue':
:(.text+0x8717c): undefined reference to `usb_hcd_link_urb_to_ep'
:(.text+0x872f4): undefined reference to `usb_hcd_unlink_urb_from_ep'
drivers/built-in.o: In function `dwc2_host_complete':
:(.text+0x875d4): undefined reference to `usb_hcd_unlink_urb_from_ep'
:(.text+0x87600): undefined reference to `usb_hcd_giveback_urb'
drivers/built-in.o: In function `dwc2_hcd_init':
:(.text+0x87ba8): undefined reference to `usb_disabled'
:(.text+0x87d38): undefined reference to `usb_create_hcd'
:(.text+0x88094): undefined reference to `usb_add_hcd'
:(.text+0x880dc): undefined reference to `usb_put_hcd'
drivers/built-in.o: In function `dwc2_hcd_remove':
:(.text+0x8821c): undefined reference to `usb_remove_hcd'
:(.text+0x8823c): undefined reference to `usb_put_hcd'
drivers/built-in.o: In function `dwc2_hc_handle_tt_clear.isra.10':
:(.text+0x88e2c): undefined reference to `usb_hub_clear_tt_buffer'
drivers/built-in.o: In function `dwc2_hcd_qtd_add':
:(.text+0x8b554): undefined reference to `usb_calc_bus_time'

To fix the problem, this patch changes the dependencies so that
dwc2 host mode can only be enabled if either the USB core is
built-in or both USB and dwc2 are modules.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 5ee80705 11-Nov-2014 Dinh Nguyen <dinguyen@opensource.altera.com>

usb: dwc2: Update Kconfig to support dual-role

Update DWC2 kconfig and makefile to support dual-role mode. The platform
file will always get compiled for the case where the controller is directly
connected to the CPU. So for loadable modules, dwc2.ko is built for host,
peripheral, and dual-role mode. The PCI bus interface will be called
dwc2_pci.ko and the platform interface module will be called dwc2_platform.ko.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# c3761a79 21-Oct-2014 Dinh Nguyen <dinguyen@opensource.altera.com>

usb: dwc2: allow dwc2 to get built when USB_GADGET=m

This patch allows the gadget portion of the DWC2 driver to get built when
(!USB && USB_GADGET) condition is encountered.

Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# cd686097 11-Sep-2014 Robert Baldyga <r.baldyga@samsung.com>

Revert "usb: dwc2: Update Kconfig to support dual-role"

This reverts commit e006fee6ecfed5b957bdd41c236aad751ab29042.

This patch causes build break. Modifications in Makefile and Kconfig have
no connection with driver code.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e006fee6 26-Aug-2014 Dinh Nguyen <dinguyen@opensource.altera.com>

usb: dwc2: Update Kconfig to support dual-role

Update DWC2 kconfig and makefile to support dual-role mode. The platform
file will always get compiled for the case where the controller is directly
connected to the CPU. So for loadable modules, only dwc2.ko is needed.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 47a1685f 14-Apr-2014 Dinh Nguyen <dinguyen@altera.com>

usb: dwc2/s3c-hsotg: move s3c-hsotg into dwc2 directory

Moves the s3c-hsotg driver into the dwc2 directory and uses the
dwc2 defines in hw.h. Renames s3c-hsotg.c to gadget.c.

NOTE: You can build both host and peripheral as a dynamically
linked module, but be aware that if you insmod dwc2_gadget, then
rmmod it, then insmod dwc2 and dwc2_platform for host mode, this
will not work. As the step to rmmod dwc2_gadget.ko will turn off
the clock to the USB IP. The dwc2 host driver currently does not
look to turn on a clock yet. A patch to fix that will be coming
soon.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
[ jh,rb - For gadget part only: ]
Tested-by: Jingoo Han <jg1.han@samsung.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
[ pz: Folded Kconfig/Makefile changes, which were originally in
a separate patch, into this one, to avoid a build breakage.
Modified Kconfig/Makefile changes a bit. Tested host part only. ]
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 197ba5f4 13-Jan-2014 Paul Zimmerman <Paul.Zimmerman@synopsys.com>

Move DWC2 driver out of staging

The DWC2 driver should now be in good enough shape to move out of
staging. I have stress tested it overnight on RPI running mass
storage and Ethernet transfers in parallel, and for several days
on our proprietary PCI-based platform.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>