Commit 96e46dcf authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next



Felipe writes:

USB: Changes for v5.4 merge window

With only 45 non-merge commits, we have a small merge window from the
Gadget perspective.

The biggest change here is the addition of the Cadence USB3 DRD
Driver. All other changes are small, non-critical fixes or smaller new
features like the improvement to BESL handling in dwc3.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>

* tag 'usb-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (45 commits)
  usb: gadget: net2280: Add workaround for AB chip Errata 11
  usb: gadget: net2280: Move all "ll" registers in one structure
  usb: dwc3: gadget: Workaround Mirosoft's BESL check
  usb:cdns3 Fix for stuck packets in on-chip OUT buffer.
  usb: cdns3: Add Cadence USB3 DRD Driver
  usb: common: Simplify usb_decode_get_set_descriptor function.
  usb: common: Patch simplify usb_decode_set_clear_feature function.
  usb: common: Separated decoding functions from dwc3 driver.
  dt-bindings: add binding for USBSS-DRD controller.
  usb: gadget: composite: Set recommended BESL values
  usb: dwc3: gadget: Set BESL config parameter
  usb: dwc3: Separate field holding multiple properties
  usb: gadget: Export recommended BESL values
  usb: phy: phy-fsl-usb: Make structure fsl_otg_initdata constant
  usb: udc: lpc32xx: silence fall-through warning
  usb: dwc3: meson-g12a: fix suspend resume regulator unbalanced disables
  usb: udc: lpc32xx: remove set but not used 3 variables
  usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails
  usb: dwc3: st: Add of_dev_put() in probe function
  usb: dwc3: st: Add of_node_put() before return in probe function
  ...
parents b2fcb285 18a93cd3
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
Binding for the Cadence USBSS-DRD controller

Required properties:
 - reg: Physical base address and size of the controller's register areas.
	 Controller has 3 different regions:
	 - HOST registers area
	 - DEVICE registers area
	 - OTG/DRD registers area
 - reg-names - register memory area names:
	"xhci" - for HOST registers space
	"dev" - for DEVICE registers space
	"otg" - for OTG/DRD registers space
 - compatible: Should contain: "cdns,usb3"
 - interrupts: Interrupts used by cdns3 controller:
	"host" - interrupt used by XHCI driver.
	"peripheral" - interrupt used by device driver
	"otg" - interrupt used by DRD/OTG  part of driver

Optional properties:
 - maximum-speed : valid arguments are "super-speed", "high-speed" and
                   "full-speed"; refer to usb/generic.txt
 - dr_mode: Should be one of "host", "peripheral" or "otg".
 - phys: reference to the USB PHY
 - phy-names: from the *Generic PHY* bindings;
	Supported names are:
	- cdns3,usb2-phy
	- cdns3,usb3-phy

 - cdns,on-chip-buff-size : size of memory intended as internal memory for endpoints
	buffers expressed in KB

Example:
	usb@f3000000 {
		compatible = "cdns,usb3";
		interrupts = <GIC_USB_IRQ 7 IRQ_TYPE_LEVEL_HIGH>,
				<GIC_USB_IRQ  7 IRQ_TYPE_LEVEL_HIGH>,
				<GIC_USB_IRQ  8 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "host", "peripheral", "otg";
		reg = <0xf3000000 0x10000>,	/* memory area for HOST registers */
			<0xf3010000 0x10000>,	/* memory area for DEVICE registers */
			<0xf3020000 0x10000>;	/* memory area for OTG/DRD registers */
		reg-names = "xhci", "dev", "otg";
		phys = <&usb2_phy>, <&usb3_phy>;
		phy-names = "cdns3,usb2-phy", "cnds3,usb3-phy";
	};
+2 −0
Original line number Diff line number Diff line
@@ -112,6 +112,8 @@ source "drivers/usb/usbip/Kconfig"

endif

source "drivers/usb/cdns3/Kconfig"

source "drivers/usb/mtu3/Kconfig"

source "drivers/usb/musb/Kconfig"
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ obj-$(CONFIG_USB_DWC3) += dwc3/
obj-$(CONFIG_USB_DWC2)		+= dwc2/
obj-$(CONFIG_USB_ISP1760)	+= isp1760/

obj-$(CONFIG_USB_CDNS3)		+= cdns3/

obj-$(CONFIG_USB_MON)		+= mon/
obj-$(CONFIG_USB_MTU3)		+= mtu3/

+46 −0
Original line number Diff line number Diff line
config USB_CDNS3
	tristate "Cadence USB3 Dual-Role Controller"
	depends on USB_SUPPORT && (USB || USB_GADGET) && HAS_DMA
	select USB_XHCI_PLATFORM if USB_XHCI_HCD
	select USB_ROLE_SWITCH
	help
	  Say Y here if your system has a Cadence USB3 dual-role controller.
	  It supports: dual-role switch, Host-only, and Peripheral-only.

	  If you choose to build this driver is a dynamically linked
	  as module, the module will be called cdns3.ko.

if USB_CDNS3

config USB_CDNS3_GADGET
	bool "Cadence USB3 device controller"
	depends on USB_GADGET=y || USB_GADGET=USB_CDNS3
	help
	  Say Y here to enable device controller functionality of the
	  Cadence USBSS-DEV driver.

	  This controller supports FF, HS and SS mode. It doesn't support
	  LS and SSP mode.

config USB_CDNS3_HOST
	bool "Cadence USB3 host controller"
	depends on USB=y || USB=USB_CDNS3
	help
	  Say Y here to enable host controller functionality of the
	  Cadence driver.

	  Host controller is compliant with XHCI so it will use
	  standard XHCI driver.

config USB_CDNS3_PCI_WRAP
	tristate "Cadence USB3 support on PCIe-based platforms"
	depends on USB_PCI && ACPI
	default USB_CDNS3
	help
	  If you're using the USBSS Core IP with a PCIe, please say
	  'Y' or 'M' here.

	  If you choose to build this driver as module it will
	  be dynamically linked and module will be called cdns3-pci.ko

endif
+16 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# define_trace.h needs to know how to find our header
CFLAGS_trace.o				:= -I$(src)

cdns3-y					:= core.o drd.o

obj-$(CONFIG_USB_CDNS3)			+= cdns3.o
cdns3-$(CONFIG_USB_CDNS3_GADGET)	+= gadget.o ep0.o

ifneq ($(CONFIG_USB_CDNS3_GADGET),)
cdns3-$(CONFIG_TRACING)			+= trace.o
endif

cdns3-$(CONFIG_USB_CDNS3_HOST)		+= host.o

obj-$(CONFIG_USB_CDNS3_PCI_WRAP)	+= cdns3-pci-wrap.o
Loading