Commit e33a6d83 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB / Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt changes for 6.13-rc1.

  Overall, a pretty slow development cycle, the majority of the work
  going into the debugfs interface for the thunderbolt (i.e. USB4) code,
  to help with debugging the myrad ways that hardware vendors get their
  interfaces messed up. Other than that, here's the highlights:

   - thunderbolt changes and additions to debugfs interfaces

   - lots of device tree updates for new and old hardware

   - UVC configfs gadget updates and new apis for features

   - xhci driver updates and fixes

   - dwc3 driver updates and fixes

   - typec driver updates and fixes

   - lots of other small updates and fixes, full details in the shortlog

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'usb-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (148 commits)
  usb: typec: tcpm: Add support for sink-bc12-completion-time-ms DT property
  dt-bindings: usb: maxim,max33359: add usage of sink bc12 time property
  dt-bindings: connector: Add time property for Sink BC12 detection completion
  usb: dwc3: gadget: Remove dwc3_request->needs_extra_trb
  usb: dwc3: gadget: Cleanup SG handling
  usb: dwc3: gadget: Fix looping of queued SG entries
  usb: dwc3: gadget: Fix checking for number of TRBs left
  usb: dwc3: ep0: Don't clear ep0 DWC3_EP_TRANSFER_STARTED
  Revert "usb: gadget: composite: fix OS descriptors w_value logic"
  usb: ehci-spear: fix call balance of sehci clk handling routines
  USB: make to_usb_device_driver() use container_of_const()
  USB: make to_usb_driver() use container_of_const()
  USB: properly lock dynamic id list when showing an id
  USB: make single lock for all usb dynamic id lists
  drivers/usb/storage: refactor min with min_t
  drivers/usb/serial: refactor min with min_t
  drivers/usb/musb: refactor min/max with min_t/max_t
  drivers/usb/mon: refactor min with min_t
  drivers/usb/misc: refactor min with min_t
  drivers/usb/host: refactor min/max with min_t/max_t
  ...
parents 93e064ce 237d4e0f
Loading
Loading
Loading
Loading
+64 −0
Original line number Diff line number Diff line
@@ -342,6 +342,70 @@ Description: Specific uncompressed frame descriptors
					   support
		=========================  =====================================

What:           /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased
Date:           Sept 2024
KernelVersion:  5.15
Description:    Framebased format descriptors

What:           /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name
Date:           Sept 2024
KernelVersion:  5.15
Description:    Specific framebased format descriptors

                ==================      =======================================
                bFormatIndex            unique id for this format descriptor;
                                        only defined after parent header is
                                        linked into the streaming class;
                                        read-only
                bmaControls             this format's data for bmaControls in
                                        the streaming header
                bmInterlaceFlags        specifies interlace information,
                                        read-only
                bAspectRatioY           the X dimension of the picture aspect
                                        ratio, read-only
                bAspectRatioX           the Y dimension of the picture aspect
                                        ratio, read-only
                bDefaultFrameIndex      optimum frame index for this stream
                bBitsPerPixel           number of bits per pixel used to
                                        specify color in the decoded video
                                        frame
                guidFormat              globally unique id used to identify
                                        stream-encoding format
                ==================      =======================================

What:           /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name/name
Date:           Sept 2024
KernelVersion:  5.15
Description:    Specific framebased frame descriptors

                =========================  =====================================
                bFrameIndex                unique id for this framedescriptor;
                                           only defined after parent format is
                                           linked into the streaming header;
                                           read-only
                dwFrameInterval            indicates how frame interval can be
                                           programmed; a number of values
                                           separated by newline can be specified
                dwDefaultFrameInterval     the frame interval the device would
                                           like to use as default
                dwBytesPerLine             Specifies the number of bytes per line
                                           of video for packed fixed frame size
                                           formats, allowing the receiver to
                                           perform stride alignment of the video.
                                           If the bVariableSize value (above) is
                                           TRUE (1), or if the format does not
                                           permit such alignment, this value shall
                                           be set to zero (0).
                dwMaxBitRate               the maximum bit rate at the shortest
                                           frame interval in bps
                dwMinBitRate               the minimum bit rate at the longest
                                           frame interval in bps
                wHeight                    height of decoded bitmap frame in px
                wWidth                     width of decoded bitmam frame in px
                bmCapabilities             still image support, fixed frame-rate
                                           support
                =========================  =====================================

What:		/config/usb-gadget/gadget/functions/uvc.name/streaming/header
Date:		Dec 2014
KernelVersion:	4.0
+27 −0
Original line number Diff line number Diff line
@@ -149,6 +149,19 @@ Description:
		advertise to the partner. The currently used capabilities are in
		brackets. Selection happens by writing to the file.

What:		/sys/class/typec/<port>/usb_capability
Date:		November 2024
Contact:	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Description:	Lists the supported USB Modes. The default USB mode that is used
		next time with the Enter_USB Message is in brackets. The default
		mode can be changed by writing to the file when supported by the
		driver.

		Valid values:
		- usb2 (USB 2.0)
		- usb3 (USB 3.2)
		- usb4 (USB4)

USB Type-C partner devices (eg. /sys/class/typec/port0-partner/)

What:		/sys/class/typec/<port>-partner/accessory_mode
@@ -220,6 +233,20 @@ Description:
		directory exists, it will have an attribute file for every VDO
		in Discover Identity command result.

What:		/sys/class/typec/<port>-partner/usb_mode
Date:		November 2024
Contact:	Heikki Krogerus <heikki.krogerus@linux.intel.com>
Description:	The USB Modes that the partner device supports. The active mode
		is displayed in brackets. The active USB mode can be changed by
		writing to this file when the port driver is able to send Data
		Reset Message to the partner. That requires USB Power Delivery
		contract between the partner and the port.

		Valid values:
		- usb2 (USB 2.0)
		- usb3 (USB 3.2)
		- usb4 (USB4)

USB Type-C cable devices (eg. /sys/class/typec/port0-cable/)

Note: Electronically Marked Cables will have a device also for one cable plug
+45 −1
Original line number Diff line number Diff line
@@ -253,6 +253,46 @@ properties:

    additionalProperties: false

  sink-wait-cap-time-ms:
    description: Represents the max time in ms that USB Type-C port (in sink
      role) should wait for the port partner (source role) to send source caps.
      SinkWaitCap timer starts when port in sink role attaches to the source.
      This timer will stop when sink receives PD source cap advertisement before
      timeout in which case it'll move to capability negotiation stage. A
      timeout leads to a hard reset message by the port.
    minimum: 310
    maximum: 620
    default: 310

  ps-source-off-time-ms:
    description: Represents the max time in ms that a DRP in source role should
      take to turn off power after the PsSourceOff timer starts. PsSourceOff
      timer starts when a sink's PHY layer receives EOP of the GoodCRC message
      (corresponding to an Accept message sent in response to a PR_Swap or a
      FR_Swap request). This timer stops when last bit of GoodCRC EOP
      corresponding to the received PS_RDY message is transmitted by the PHY
      layer. A timeout shall lead to error recovery in the type-c port.
    minimum: 750
    maximum: 920
    default: 920

  cc-debounce-time-ms:
    description: Represents the max time in ms that a port shall wait to
      determine if it's attached to a partner.
    minimum: 100
    maximum: 200
    default: 200

  sink-bc12-completion-time-ms:
    description: Represents the max time in ms that a port in sink role takes
      to complete Battery Charger (BC1.2) Detection. BC1.2 detection is a
      hardware mechanism, which in some TCPC implementations, can run in
      parallel once the Type-C connection state machine reaches the "potential
      connect as sink" state. In TCPCs where this causes delays to respond to
      the incoming PD messages, sink-bc12-completion-time-ms is used to delay
      PD negotiation till BC1.2 detection completes.
    default: 0

dependencies:
  sink-vdos-v1: [ sink-vdos ]
  sink-vdos: [ sink-vdos-v1 ]
@@ -380,7 +420,7 @@ examples:
    };

  # USB-C connector attached to a typec port controller(ptn5110), which has
  # power delivery support and enables drp.
  # power delivery support, explicitly defines time properties and enables drp.
  - |
    #include <dt-bindings/usb/pd.h>
    typec: ptn5110 {
@@ -393,6 +433,10 @@ examples:
            sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)
                         PDO_VAR(5000, 12000, 2000)>;
            op-sink-microwatt = <10000000>;
            sink-wait-cap-time-ms = <465>;
            ps-source-off-time-ms = <835>;
            cc-debounce-time-ms = <101>;
            sink-bc12-completion-time-ms = <500>;
        };
    };

+37 −5
Original line number Diff line number Diff line
@@ -11,12 +11,17 @@ maintainers:

properties:
  compatible:
    enum:
    oneOf:
      - enum:
          - fsl,imx8mq-usb-phy
          - fsl,imx8mp-usb-phy
      - items:
          - const: fsl,imx95-usb-phy
          - const: fsl,imx8mp-usb-phy

  reg:
    maxItems: 1
    minItems: 1
    maxItems: 2

  "#phy-cells":
    const: 0
@@ -89,7 +94,34 @@ required:
  - clocks
  - clock-names

additionalProperties: false
allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - fsl,imx95-usb-phy
    then:
      properties:
        reg:
          items:
            - description: USB PHY Control range
            - description: USB PHY TCA Block range
    else:
      properties:
        reg:
          maxItems: 1

  - if:
      properties:
        compatible:
          contains:
            enum:
              - fsl,imx95-usb-phy
    then:
      $ref: /schemas/usb/usb-switch.yaml#

unevaluatedProperties: false

examples:
  - |
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ properties:
    enum:
      - qcom,msm8998-qmp-usb3-phy
      - qcom,qcm2290-qmp-usb3-phy
      - qcom,qcs615-qmp-usb3-phy
      - qcom,sdm660-qmp-usb3-phy
      - qcom,sm6115-qmp-usb3-phy

@@ -96,6 +97,7 @@ allOf:
          contains:
            enum:
              - qcom,msm8998-qmp-usb3-phy
              - qcom,qcs615-qmp-usb3-phy
              - qcom,sdm660-qmp-usb3-phy
    then:
      properties:
Loading