Commit f5e9d31e 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 driver updates for
  6.19-rc1. Nothing major here, just lots of tiny updates for most of
  the common USB drivers. Included in here are:

   - more xhci driver updates and fixes

   - Thunderbolt driver cleanups

   - usb serial driver updates

   - typec driver updates

   - USB tracepoint additions

   - dwc3 driver updates, including support for Apple hardware

   - lots of other smaller driver updates and cleanups

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

* tag 'usb-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (161 commits)
  usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt
  USB: serial: option: move Telit 0x10c7 composition in the right place
  USB: serial: option: add Telit Cinterion FE910C04 new compositions
  usb: typec: ucsi: fix use-after-free caused by uec->work
  usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
  usb: dwc3: core: Remove redundant comment in core init
  usb: phy: Initialize struct usb_phy list_head
  USB: serial: option: add Foxconn T99W760
  usb: usb-storage: No additional quirks need to be added to the EL-R12 optical drive.
  usb: typec: hd3ss3220: Enable VBUS based on ID pin state
  dt-bindings: usb: ti,hd3ss3220: Add support for VBUS based on ID state
  usb: typec: anx7411: add WQ_PERCPU to alloc_workqueue users
  USB: add WQ_PERCPU to alloc_workqueue users
  dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform
  drivers/usb/storage: use min() instead of min_t()
  usb: raw-gadget: cap raw_io transfer length to KMALLOC_MAX_SIZE
  usb: ohci-da8xx: remove unused platform data
  usb: gadget: functionfs: use dma_buf_unmap_attachment_unlocked() helper
  usb: uas: reduce time under spinlock
  usb: dwc3: eic7700: Add EIC7700 USB driver
  ...
parents edf602a1 2585973c
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -254,3 +254,31 @@ Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Description:
		The PPS Power Limited bit indicates whether or not the source
		supply will exceed the rated output power if requested.

Standard Power Range (SPR) Adjustable Voltage Supplies

What:		/sys/class/usb_power_delivery/.../<capability>/<position>:spr_adjustable_voltage_supply
Date:		Oct 2025
Contact:	Badhri Jagan Sridharan <badhri@google.com>
Description:
		Adjustable Voltage Supply (AVS) Augmented PDO (APDO).

What:		/sys/class/usb_power_delivery/.../<capability>/<position>:spr_adjustable_voltage_supply/maximum_current_9V_to_15V
Date:		Oct 2025
Contact:	Badhri Jagan Sridharan <badhri@google.com>
Description:
		Maximum Current for 9V to 15V range in milliamperes.

What:		/sys/class/usb_power_delivery/.../<capability>/<position>:spr_adjustable_voltage_supply/maximum_current_15V_to_20V
Date:		Oct 2025
Contact:	Badhri Jagan Sridharan <badhri@google.com>
Description:
		Maximum Current for greater than 15V till 20V range in
		milliamperes.

What:		/sys/class/usb_power_delivery/.../<capability>/<position>:spr_adjustable_voltage_supply/peak_current
Date:		Oct 2025
Contact:	Badhri Jagan Sridharan <badhri@google.com>
Description:
		This file shows the value of the Adjustable Voltage Supply Peak Current
		Capability field.
+35 −15
Original line number Diff line number Diff line
@@ -203,10 +203,10 @@ host controller or a device, it is important that the firmware can be
upgraded to the latest where possible bugs in it have been fixed.
Typically OEMs provide this firmware from their support site.

There is also a central site which has links where to download firmware
for some machines:

  `Thunderbolt Updates <https://thunderbolttechnology.net/updates>`_
Currently, recommended method of updating firmware is through "fwupd" tool.
It uses LVFS (Linux Vendor Firmware Service) portal by default to get the
latest firmware from hardware vendors and updates connected devices if found
compatible. For details refer to: https://github.com/fwupd/fwupd.

Before you upgrade firmware on a device, host or retimer, please make
sure it is a suitable upgrade. Failing to do that may render the device
@@ -215,18 +215,40 @@ tools!

Host NVM upgrade on Apple Macs is not supported.

Once the NVM image has been downloaded, you need to plug in a
Thunderbolt device so that the host controller appears. It does not
matter which device is connected (unless you are upgrading NVM on a
device - then you need to connect that particular device).
Fwupd is installed by default. If you don't have it on your system, simply
use your distro package manager to get it.

To see possible updates through fwupd, you need to plug in a Thunderbolt
device so that the host controller appears. It does not matter which
device is connected (unless you are upgrading NVM on a device - then you
need to connect that particular device).

Note an OEM-specific method to power the controller up ("force power") may
be available for your system in which case there is no need to plug in a
Thunderbolt device.

After that we can write the firmware to the non-active parts of the NVM
of the host or device. As an example here is how Intel NUC6i7KYK (Skull
Canyon) Thunderbolt controller NVM is upgraded::
Updating firmware using fwupd is straightforward - refer to official
readme on fwupd github.

If firmware image is written successfully, the device shortly disappears.
Once it comes back, the driver notices it and initiates a full power
cycle. After a while device appears again and this time it should be
fully functional.

Device of interest should display new version under "Current version"
and "Update State: Success" in fwupd's interface.

Upgrading firmware manually
---------------------------------------------------------------
If possible, use fwupd to updated the firmware. However, if your device OEM
has not uploaded the firmware to LVFS, but it is available for download
from their side, you can use method below to directly upgrade the
firmware.

Manual firmware update can be done with 'dd' tool. To update firmware
using this method, you need to write it to the non-active parts of NVM
of the host or device. Example on how to update Intel NUC6i7KYK
(Skull Canyon) Thunderbolt controller NVM::

  # dd if=KYK_TBT_FW_0018.bin of=/sys/bus/thunderbolt/devices/0-0/nvm_non_active0/nvmem

@@ -235,10 +257,8 @@ upgrade process as follows::

  # echo 1 > /sys/bus/thunderbolt/devices/0-0/nvm_authenticate

If no errors are returned, the host controller shortly disappears. Once
it comes back the driver notices it and initiates a full power cycle.
After a while the host controller appears again and this time it should
be fully functional.
If no errors are returned, device should behave as described in previous
section.

We can verify that the new NVM firmware is active by running the following
commands::
+80 −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/apple,dwc3.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple Silicon DWC3 USB controller

maintainers:
  - Sven Peter <sven@kernel.org>

description:
  Apple Silicon SoCs use a Synopsys DesignWare DWC3 based controller for each of
  their Type-C ports.

allOf:
  - $ref: snps,dwc3-common.yaml#

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - apple,t6000-dwc3
              - apple,t6020-dwc3
              - apple,t8112-dwc3
          - const: apple,t8103-dwc3
      - const: apple,t8103-dwc3

  reg:
    items:
      - description: Core DWC3 region
      - description: Apple-specific DWC3 region

  reg-names:
    items:
      - const: dwc3-core
      - const: dwc3-apple

  interrupts:
    maxItems: 1

  iommus:
    maxItems: 2

  resets:
    maxItems: 1

  power-domains:
    maxItems: 1

required:
  - compatible
  - reg
  - reg-names
  - interrupts
  - iommus
  - resets
  - power-domains
  - usb-role-switch

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/apple-aic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    usb@82280000 {
      compatible = "apple,t8103-dwc3";
      reg = <0x82280000 0xcd00>, <0x8228cd00 0x3200>;
      reg-names = "dwc3-core", "dwc3-apple";
      interrupts = <AIC_IRQ 777 IRQ_TYPE_LEVEL_HIGH>;
      iommus = <&dwc3_0_dart_0 0>, <&dwc3_0_dart_1 1>;

      power-domains = <&ps_atc0_usb>;
      resets = <&atcphy0>;

      usb-role-switch;
    };
+22 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ properties:
      - const: ref_clk

  resets:
    minItems: 1
    description:
      A list of phandles for resets listed in reset-names.

@@ -56,6 +57,7 @@ properties:
      - description: USB APB reset

  reset-names:
    minItems: 1
    items:
      - const: usb_crst
      - const: usb_hibrst
@@ -95,6 +97,26 @@ required:
  - resets
  - reset-names

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - xlnx,versal-dwc3
    then:
      properties:
        resets:
          maxItems: 1
        reset-names:
          maxItems: 1
    else:
      properties:
        resets:
          minItems: 3
        reset-names:
          minItems: 3

additionalProperties: false

examples:
+94 −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/eswin,eic7700-usb.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ESWIN EIC7700 SoC Usb Controller

maintainers:
  - Wei Yang <yangwei1@eswincomputing.com>
  - Senchuan Zhang <zhangsenchuan@eswincomputing.com>
  - Hang Cao <caohang@eswincomputing.com>

description:
  The Usb controller on EIC7700 SoC.

allOf:
  - $ref: snps,dwc3-common.yaml#

properties:
  compatible:
    const: eswin,eic7700-dwc3

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  interrupt-names:
    items:
      - const: peripheral

  clocks:
    maxItems: 3

  clock-names:
    items:
      - const: aclk
      - const: cfg
      - const: usb_en

  resets:
    maxItems: 2

  reset-names:
    items:
      - const: vaux
      - const: usb_rst

  eswin,hsp-sp-csr:
    description:
      HSP CSR is to control and get status of different high-speed peripherals
      (such as Ethernet, USB, SATA, etc.) via register, which can tune
      board-level's parameters of PHY, etc.
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      - items:
          - description: phandle to HSP Register Controller hsp_sp_csr node.
          - description: USB bus register offset.
          - description: AXI low power register offset.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts
  - interrupt-names
  - resets
  - reset-names
  - eswin,hsp-sp-csr

unevaluatedProperties: false

examples:
  - |
    usb@50480000 {
        compatible = "eswin,eic7700-dwc3";
        reg = <0x50480000 0x10000>;
        clocks = <&clock 135>,
                 <&clock 136>,
                 <&hspcrg 18>;
        clock-names = "aclk", "cfg", "usb_en";
        interrupt-parent = <&plic>;
        interrupts = <85>;
        interrupt-names = "peripheral";
        resets = <&reset 84>, <&hspcrg 2>;
        reset-names = "vaux", "usb_rst";
        dr_mode = "peripheral";
        maximum-speed = "high-speed";
        phy_type = "utmi";
        eswin,hsp-sp-csr = <&hsp_sp_csr 0x800 0x818>;
    };
Loading