> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 更新 USB 和以太网控制器固件

## 简介

更新 USB 控制器固件可以解决 Dragonwing RB3 Gen 2 设备上的 USB 或以太网连接问题。

## 前提条件

* 在更新 Renesas 固件之前，请确保已按照[更新软件]()中的说明升级软件。
* 确保已安装 ADB 工具。Fastboot 会随之一起安装。
* 使用 USB Type-C 线缆将设备连接到 Ubuntu 主机。

## 操作步骤

* 注册并登录 [Renesas](https://www.renesas.com)。

* 从 [Renesas](https://www.renesas.com/us/en/products/interface/usb-switches-hubs/upd720201-usb-30-host-controller#design_development) 下载固件。

* 将下载的固件文件重命名为 `renesas_usb_fw.mem`。

* 使用 ADB 将设备连接到主机。

* 使用以下命令之一将固件推送到设备：

  ```bash theme={null}
  adb push renesas_usb_fw.mem /lib/firmware
  ```

  **或**

  ```bash theme={null}
  scp renesas_usb_fw.mem root@<ip-address-of-device>:/lib/firmware
  ```

  ```bash Sample command theme={null}
  scp renesas_usb_fw.mem root@10.92.175.138:/lib/firmware
  ```

* 使用以下任一方式激活固件：

  * 对于 USB Type-A 端口，重启目标设备。
  * 手动绑定 Renesas xHCI 驱动：

  ```bash theme={null}
  echo "0001:04:00.0" > /sys/bus/pci/drivers/xhci-pci-renesas/bind
  ```

* 获取设备 ID：

  ```bash theme={null}
  sh-5.3# lspci
  ```

  在以下示例输出中，`0001:04:00.0` 即为设备 ID：

  ```text Sample output theme={null}
  0001:00:00.0 PCI bridge: Qualcomm Technologies, Inc SM8250 PCIe Root Complex [Snapdragon 865/870 5G]
  0001:01:00.0 PCI bridge: Toshiba Corporation Device 0623
  0001:02:01.0 PCI bridge: Toshiba Corporation Device 0623
  0001:02:02.0 PCI bridge: Toshiba Corporation Device 0623
  0001:02:03.0 PCI bridge: Toshiba Corporation Device 0623
  0001:04:00.0 USB controller: Renesas Electronics Corp. uPD720201 USB 3.0 Host Controller (rev 03)
  0001:05:00.0 Ethernet controller: Toshiba Corporation Device 0220
  0001:05:00.1 Ethernet controller: Toshiba Corporation Device 0220
  ```

* 验证固件枚举：
  ```bash theme={null}
  dmesg
  ```
