This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具与软件:
如何在 uBoot 中启用 USB0?
无论是使用默认的.dts、还是将 usb0配置从内核复制到 uBoot DTS。 与下面的结果相同、我在 AM62-SK-P1上得到
客户目标是将 uBoot 中的 USB0用作主机来支持 USB-MSC。
e2e.ti.com/.../0042.k3_2D00_am625_2D00_sk.dts
e2e.ti.com/.../0042.k3_2D00_am62_2D00_main.dtsi
U-Boot SPL 2023.04-dirty (Jun 05 2024 - 12:41:56 +0800) SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)') SPL initial stack usage: 13408 bytes Trying to boot from MMC2 Authentication passed Authentication passed Authentication passed Authentication passed Authentication passed Starting ATF on ARM64 core... NOTICE: BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty NOTICE: BL31: Built : 16:09:05, Feb 9 2024 U-Boot SPL 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000) SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)') SPL initial stack usage: 1856 bytes Trying to boot from MMC2 Authentication passed Authentication passed U-Boot 2023.04-dirty (Jun 05 2024 - 12:42:42 +0800) SoC: AM62X SR1.0 HS-FS Model: Texas Instruments AM625 SK EEPROM not available at 80, trying to read at 81 Board: AM62B-SKEVM-P1 rev A DRAM: 2 GiB Core: 72 devices, 32 uclasses, devicetree: separate MMC: mmc@fa10000: 0, mmc@fa00000: 1 Loading Environment from nowhere... OK In: serial Out: serial Err: serial Net: eth0: ethernet@8000000port@1 => => usb start starting USB... Bus usb@31100000: generic_phy_get_bulk : no phys property Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10
#2. uBoot DTS 未更新 USB 配置、但会在内核 DTS 中进行更新。
usbss0:dwc3-usb@f900000{
兼容="ti、am62-USB";
REG =<0x00 0x0f900000 0x00 0x800>
+ <0x00 0x0f908000 0x00 0x400>;
#3. 再次插入 U 闪存并打开电源、在 USB@31100000上找到2个 USB 器件、为什么在 USB1上有2个器件?
=> USB 开始
正在启动 USB...
总线 USB@31100000:寄存器1000840网络端口1
启动控制器
USB xHCI 1.10
正在扫描总线 USB@31100000设备... 找到2个 USB 设备
正在扫描存储设备的 USB ... 找到1个存储设备
=>
尊敬的 Tony:
qi yu1 说:usbss0:dwc3-usb@f900000 {
兼容="ti、am62-USB";
REG =<0x00 0x0f900000 0x00 0x800>
+ <0x00 0x0f908000 0x00 0x400>;
否、请勿触摸 k3-am62-main.dtsi 文件。
[quote userid="35100" url="~/support/processors-group/processors/f/processors-forum/1370740/am625-enable-usb0-in-uboot 为什么 USB1上有2个?"2"是指虚拟根集线器和 USB 设备。
这是 USB0处于主机模式的 SDK9.2 U-Boot 器件树补丁。
diff --git a/arch/arm/dts/k3-am625-sk.dts b/arch/arm/dts/k3-am625-sk.dts index 823e4320c3c4..4f559dbc2f4d 100644 --- a/arch/arm/dts/k3-am625-sk.dts +++ b/arch/arm/dts/k3-am625-sk.dts @@ -569,7 +569,7 @@ }; &usb0 { - dr_mode = "peripheral"; + dr_mode = "host"; }; &usb1 { diff --git a/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi b/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi index 4265b434168b..9db329975f06 100644 --- a/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi +++ b/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi @@ -122,7 +122,7 @@ }; &usb0 { - dr_mode = "peripheral"; + dr_mode = "host"; /* Since role switching is not supported in U-Boot */ /delete-property/ extcon; bootph-pre-ram;
这是 USB MSC 引导中的 U-Boot 引导日志。
U-Boot SPL 2023.04-00001-g0f287d63fb2d-dirty (Jun 05 2024 - 11:13:00 -0500) SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)') SPL initial stack usage: 13408 bytes Trying to boot from USB Bus usb@31000000: Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10 Bus usb@31100000: Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10 scanning bus usb@31000000 for devices... 2 USB Device(s) found scanning bus usb@31100000 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Authentication passed Authentication passed Authentication passed Authentication passed Authentication passed Starting ATF on ARM64 core... NOTICE: BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty NOTICE: BL31: Built : 16:09:05, Feb 9 2024 U-Boot SPL 2023.04-00001-g0f287d63fb2d-dirty (Jun 05 2024 - 11:13:06 -0500) SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)') SPL initial stack usage: 1856 bytes MMC: no card present ** Bad device specification mmc 1 ** Couldn't find partition mmc 1:1 Error: could not access storage. Trying to boot from USB Bus usb@31000000: Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10 Bus usb@31100000: Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10 scanning bus usb@31000000 for devices... 2 USB Device(s) found scanning bus usb@31100000 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Authentication passed Authentication passed U-Boot 2023.04-00001-g0f287d63fb2d-dirty (Jun 05 2024 - 11:13:06 -0500) SoC: AM62X SR1.0 HS-FS Model: Texas Instruments AM625 SK EEPROM not available at 80, trying to read at 81 Board: AM62B-SKEVM rev A DRAM: no bloblist found!2 GiB Core: 72 devices, 31 uclasses, devicetree: separate MMC: mmc@fa10000: 0, mmc@fa00000: 1 Loading Environment from nowhere... OK In: serial Out: serial Err: serial Net: eth0: ethernet@8000000port@1 Hit any key to stop autoboot: 0 =>
容器、
我们不使用 USB-MSC 引导、而是想在 uBoot 中使用 USB-MSC。
对于补丁、具有相同的结果
U-Boot 2023.04-dirty (Jun 06 2024 - 11:33:01 +0800) SoC: AM62X SR1.0 HS-FS Model: Texas Instruments AM625 SK EEPROM not available at 80, trying to read at 81 Board: AM62B-SKEVM-P1 rev A DRAM: 2 GiB Core: 72 devices, 32 uclasses, devicetree: separate MMC: mmc@fa10000: 0, mmc@fa00000: 1 Loading Environment from nowhere... OK In: serial Out: serial Err: serial Net: eth0: ethernet@8000000port@1 => => usb start starting USB... Bus usb@31100000: generic_phy_get_bulk : no phys property Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10 scanning bus usb@31100000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found =>
Tony、
此 U-Boot 补丁还会使 USB0处于主机模式以用于 SD 卡引导:
U-Boot SPL 2023.04-00001-g0f287d63fb2d-dirty (Jun 06 2024 - 10:49:43 -0500) SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)') SPL initial stack usage: 13408 bytes Trying to boot from MMC2 Authentication passed Authentication passed Authentication passed Authentication passed Authentication passed Starting ATF on ARM64 core... NOTICE: BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty NOTICE: BL31: Built : 16:09:05, Feb 9 2024 U-Boot SPL 2023.04-00001-g0f287d63fb2d-dirty (Jun 06 2024 - 10:49:49 -0500) SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)') SPL initial stack usage: 1856 bytes Trying to boot from MMC2 Authentication passed Authentication passed U-Boot 2023.04-00001-g0f287d63fb2d-dirty (Jun 06 2024 - 10:49:49 -0500) SoC: AM62X SR1.0 HS-FS Model: Texas Instruments AM625 SK EEPROM not available at 80, trying to read at 81 Board: AM62B-SKEVM rev A DRAM: 2 GiB Core: 72 devices, 31 uclasses, devicetree: separate MMC: mmc@fa10000: 0, mmc@fa00000: 1 Loading Environment from nowhere... OK In: serial Out: serial Err: serial Net: eth0: ethernet@8000000port@1 Hit any key to stop autoboot: 0 => => usb start starting USB... Bus usb@31000000: generic_phy_get_bulk : no phys property Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10 Bus usb@31100000: generic_phy_get_bulk : no phys property Register 1000840 NbrPorts 1 Starting the controller USB XHCI 1.10 scanning bus usb@31000000 for devices... 2 USB Device(s) found scanning bus usb@31100000 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found => => usb storage Device 0: Vendor: SanDisk Rev: 1.10 Prod: Cruzer Type: Removable Hard Disk Capacity: 7633.5 MB = 7.4 GB (15633408 x 512) =>
以下命令显示 USB0器件树将其配置为主机模式:
=> fdt addr $fdtcontroladdr Working FDT set to fd5e7840 => fdt print usb0 usb@31000000 { compatible = "snps,dwc3"; reg = <0x00000000 0x31000000 0x00000000 0x00050000>; interrupts = <0x00000000 0x000000bc 0x00000004 0x00000000 0x000000bc 0x00000004>; interrupt-names = "host", "peripheral"; maximum-speed = "high-speed"; dr_mode = "host"; bootph-pre-ram; phandle = <0x00000071>; };
您好,Bin,
我的错误是、我修改了 k3-am62x-sk-common.dtsi 文件、而不是 k3-am62x-sk-common-u-boot.dtsi 文件、该文件现在可以运行。
但我没找到 将 k3-am62x-sk-common-u-boot.dtsi 添加到 k3-am625-sk.dts 的位置