Commit 21c949b2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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

Felipe writes:

USB: changes for v5.10 merge window

Most of changes are on dwc3 (38.8%) with cdns3 falling close
behind (24.1%).

The biggest changes here are a series of non-critical fixes to corner
cases on dwc3, produced by Thinh N, and a series of major improvements
to cdns3 produced by Peter C.

We also have the traditional set of new device support (Intel Keem
Bay, Hikey 970) on dwc3. A series of sparse/coccinelle and checkpatch
fixes on dwc3 by yours truly and a set of minor changes all over the
stack.

* tag 'usb-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (117 commits)
  usb: dwc2: Fix INTR OUT transfers in DDMA mode.
  usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs
  usb: dwc2: override PHY input signals with usb role switch support
  dt-bindings: usb: dwc2: add optional usb-role-switch property
  usb: dwc3: of-simple: Add compatible string for Intel Keem Bay platform
  dt-bindings: usb: Add Intel Keem Bay USB controller bindings
  usb: dwc3: gadget: Support up to max stream id
  usb: dwc3: gadget: Return early if no TRB update
  usb: dwc3: gadget: Keep TRBs in request order
  usb: dwc3: gadget: Revise setting IOC when no TRB left
  usb: dwc3: gadget: Look ahead when setting IOC
  usb: dwc3: gadget: Allow restarting a transfer
  usb: bdc: remove duplicated error message
  usb: dwc3: Stop active transfers before halting the controller
  usb: cdns3: gadget: enlarge the TRB ring length
  usb: cdns3: gadget: sg_support is only for DEV_VER_V2 or above
  usb: cdns3: gadget: need to handle sg case for workaround 2 case
  usb: cdns3: gadget: handle sg list use case at completion correctly
  usb: cdns3: gadget: add CHAIN and ISP bit for sg list use case
  usb: cdns3: gadget: improve the dump TRB operation at cdns3_ep_run_transfer
  ...
parents 97b65223 b2c586eb
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -25,13 +25,14 @@ description: |
  The Amlogic A1 embeds a DWC3 USB IP Core configured for USB2 in
  host-only mode.

  The Amlogic GXL & GXM SoCs doesn't embed an USB3 PHY.
  The Amlogic GXL, GXM & AXG SoCs doesn't embed an USB3 PHY.

properties:
  compatible:
    enum:
      - amlogic,meson-gxl-usb-ctrl
      - amlogic,meson-gxm-usb-ctrl
      - amlogic,meson-axg-usb-ctrl
      - amlogic,meson-g12a-usb-ctrl
      - amlogic,meson-a1-usb-ctrl

@@ -151,6 +152,25 @@ allOf:

      required:
        - clock-names
  - if:
      properties:
        compatible:
          enum:
            - amlogic,meson-axg-usb-ctrl

    then:
      properties:
        phy-names:
          items:
            - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
        clocks:
          minItems: 2
        clock-names:
          items:
            - const: usb_ctrl
            - const: ddr
      required:
        - clock-names
  - if:
      properties:
        compatible:
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ Required properties:
	       "atmel,at91sam9rl-udc"
	       "atmel,at91sam9g45-udc"
	       "atmel,sama5d3-udc"
	       "microchip,sam9x60-udc"
 - reg: Address and length of the register set for the device
 - interrupts: Should contain usba interrupt
 - clocks: Should reference the peripheral and host clocks
+96 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/cdns,usb3.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cadence USBSS-DRD controller bindings

maintainers:
  - Pawel Laszczak <pawell@cadence.com>

properties:
  compatible:
    const: cdns,usb3

  reg:
    items:
      - description: OTG controller registers
      - description: XHCI Host controller registers
      - description: DEVICE controller registers

  reg-names:
    items:
      - const: otg
      - const: xhci
      - const: dev

  interrupts:
    items:
      - description: OTG/DRD controller interrupt
      - description: XHCI host controller interrupt
      - description: Device controller interrupt

  interrupt-names:
    items:
      - const: host
      - const: peripheral
      - const: otg

  dr_mode:
    enum: [host, otg, peripheral]

  maximum-speed:
    enum: [super-speed, high-speed, full-speed]

  phys:
   minItems: 1
   maxItems: 2

  phy-names:
    minItems: 1
    maxItems: 2
    items:
      anyOf:
        - const: cdns3,usb2-phy
        - const: cdns3,usb3-phy

  cdns,on-chip-buff-size:
    description:
      size of memory intended as internal memory for endpoints
      buffers expressed in KB
    $ref: /schemas/types.yaml#/definitions/uint32

  cdns,phyrst-a-enable:
    description: Enable resetting of PHY if Rx fail is detected
    type: boolean

required:
  - compatible
  - reg
  - reg-names
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    bus {
        #address-cells = <2>;
        #size-cells = <2>;

        usb@6000000 {
            compatible = "cdns,usb3";
            reg = <0x00 0x6000000 0x00 0x10000>,
                  <0x00 0x6010000 0x00 0x10000>,
                  <0x00 0x6020000 0x00 0x10000>;
            reg-names = "otg", "xhci", "dev";
            interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "host", "peripheral", "otg";
            maximum-speed = "super-speed";
            dr_mode = "otg";
        };
    };
+0 −45
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";
	};
+5 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ properties:
              - amlogic,meson-g12a-usb
          - const: snps,dwc2
      - const: amcc,dwc-otg
      - const: apm,apm82181-dwc-otg
      - const: snps,dwc2
      - const: st,stm32f4x9-fsotg
      - const: st,stm32f4x9-hsotg
@@ -102,6 +103,10 @@ properties:
  dr_mode:
    enum: [host, peripheral, otg]

  usb-role-switch:
    $ref: /schemas/types.yaml#/definitions/flag
    description: Support role switch.

  g-rx-fifo-size:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: size of rx fifo size in gadget mode.
Loading