[EHL] enable USB-dw3

Bug #1929902 reported by Chao Qin
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intel
Fix Committed
Undecided
Unassigned
Lookout-canyon-series
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Incomplete
Undecided
Unassigned
linux-intel (Ubuntu)
Fix Committed
High
Hsuan-Yu Lin

Bug Description

Description
Enable USB-dw3 for Elkhart Lake

Hardware: Elkhart Lake

Target Release: 21.04
Target Kernel: TBD

External links:
https://github.com/intel/linux-intel-quilt/tree/mainline-tracking-v5.11-yocto-210223T083754Z

Revision history for this message
Chao Qin (chaoqin) wrote :

Please find the following patches in the above external link

0003-usb-dwc3-pci-Fix-DEFINE-for-Intel-Elkhart-Lake.usb-typec

tags: added: lookout-canyon
Revision history for this message
Chao Qin (chaoqin) wrote (last edit ):

This patch is already upstreamed in linux-next and the tag is next-20210706 and should be included in the next mainline kernel v5.13.1

457d22850b27de3aea336108272d08602c55fdf7

Changed in linux-intel (Ubuntu):
assignee: nobody → Hsuan-Yu Lin (shanelin)
importance: Undecided → High
Hsuan-Yu Lin (shanelin)
Changed in linux-intel (Ubuntu):
status: New → In Progress
Revision history for this message
Hsuan-Yu Lin (shanelin) wrote :

Two additional patches need to be backported. [1]

457d22850b27 usb: dwc3: pci: Fix DEFINE for Intel Elkhart Lake
e492ce9bcaa1 usb: dwc3: pci: Register a software node for the dwc3 platform device
e68d0119e328 software node: Introduce device_add_software_node()

---
Reference:
[1] https://lore<email address hidden>/

Revision history for this message
Hsuan-Yu Lin (shanelin) wrote :

Patches are ready and under review.

Jesse Sung (wenchien)
information type: Private → Public
Revision history for this message
Jesse Sung (wenchien) wrote :

@Chao Qin:

I'm wondering if we need this commit in order to fulfill the goal of enabling USB-dw3?

Commit 457d22850b27de3aea336108272d08602c55fdf7 does nothing but `s/PCI_DEVICE_ID_INTEL_EHLLP/PCI_DEVICE_ID_INTEL_EHL/'. Although the commit makes it more clear, it should not affect the functionality of the driver?

Revision history for this message
Chao Qin (chaoqin) wrote :

@Jesse Sung I am confirming with the feature owner and will update once I get reply.

Revision history for this message
Chao Qin (chaoqin) wrote :

@Jesse Sung
The following is the response from the feature owner

1. This patch doesn’t change the functionality on the usb-dw3 for EHL, it mainly renames the PCI device define to ensure no misunderstanding on there’s an LP (low power version) available.

2. As for the effect on changing this, EHL will allow the PM runtime & other logic within dwc3 to use the ACPI DSM to put the IP into low power, as it depends on the specific PMU registers programming to truly set it to low power. Meanwhile, the other dwc3-pci functionality remains unaffected.

I prefer to merge it into your kernel tree and it can run into low power mode if the platform has the capability.

Revision history for this message
Jesse Sung (wenchien) wrote :

@Chao Qin:

Since the patch itself doesn't change the functionality or PM capabilities, do you mean that there are other patches (other than 457d22850b27de3aea336108272d08602c55fdf7) need to be merged in order to make the platform switch to low power mode when it can do so?

Revision history for this message
Chao Qin (chaoqin) wrote :

@Jesse Sung

Yes, there is another commit (a609ce2a1336 usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality) for this feature and it's already included in upstream v5.11 kernel.

Jesse Sung (wenchien)
Changed in linux-intel (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Brad Figg (brad-figg)
Changed in intel:
status: New → Fix Committed
Revision history for this message
Hsuan-Yu Lin (shanelin) wrote :

Hi @chaoqin,

The patch "0003-usb-dwc3-pci-Fix-DEFINE-for-Intel-Elkhart-Lake.usb-typec" has been backported to 5.11.0-1012.14 on proposed. [1]

Could you provide how to verify it?
Thanks!

---
[1] https://launchpad.net/ubuntu/+source/linux-intel/5.11.0-1012.14

Revision history for this message
Chao Qin (chaoqin) wrote :

@shanelin, you can verify as following steps.

[Step 1] dmesg
BIOS pass pci device info as below :
[ 4.534064] pci 0000:00:14.0: [8086:4b7d] type 00 class 0x0c0330
[ 4.553963] pci 0000:00:14.1: [8086:4b7e] type 00 class 0x0c03fe => dwc3 device

[Step 2] modprobe dwc3_pci

[Step 3] lspci -v
0000:00:14.1 USB controller: Intel Corporation Device 4b7e (prog-if fe [USB Device])
               Subsystem: Intel Corporation Device 7270
               Flags: bus master, fast devsel, latency 0, IRQ 17
               Memory at 6080000000 (64-bit, non-prefetchable) [size=2M]
               Memory at 60805e5000 (64-bit, non-prefetchable) [size=4K]
               Capabilities: <access denied>
               Kernel driver in use: dwc3-pci

Revision history for this message
Hsuan-Yu Lin (shanelin) wrote :
Download full text (7.0 KiB)

Hi @chaoqin,

I can't find the device "8086:4b7e", I have also tried the mainline kernel v5.14-rc6 but no luck.

I also tried to boot into the UEFI shell and use the 'pci' command to list the devices, but still no luck. [1]

Do I need to enable some settings in BIOS so that I can see the device "8086:4b7e"?
Thanks!

BIOS version: EHLSFWI1.R00.3044.A01.2101210945

--
[1]
Shell> pci
   Seg Bus Dev Func
   --- --- --- ----
    00 00 00 00 ==> Bridge Device - Host/PCI bridge
             Vendor 8086 Device 452E Prog Interface 0
    00 00 02 00 ==> Display Controller - VGA/8514 controller
             Vendor 8086 Device 4571 Prog Interface 0
    00 00 08 00 ==> Base System Peripherals - Other system peripheral
             Vendor 8086 Device 4511 Prog Interface 0
    00 00 10 00 ==> Serial Bus Controllers - Other bus type
             Vendor 8086 Device 4B44 Prog Interface 0
    00 00 10 01 ==> Serial Bus Controllers - Other bus type
             Vendor 8086 Device 4B45 Prog Interface 0
    00 00 11 00 ==> Simple Communications Controllers - Other communication device
             Vendor 8086 Device 4B96 Prog Interface 8
    00 00 11 01 ==> Simple Communications Controllers - Other communication device
             Vendor 8086 Device 4B97 Prog Interface 9
    00 00 13 00 ==> Serial Bus Controllers - Other bus type
             Vendor 8086 Device 4B84 Prog Interface 14
    00 00 14 00 ==> Serial Bus Controllers - USB
             Vendor 8086 Device 4B7D Prog Interface 30
    00 00 14 02 ==> Memory Controller - RAM memory controller
             Vendor 8086 Device 4B7F Prog Interface 0
    00 00 15 00 ==> Serial Bus Controllers - Other bus type
             Vendor 8086 Device 4B78 Prog Interface 0
    00 00 15 02 ==> Serial Bus Controllers - Other bus type
             Vendor 8086 Device 4B7A Prog Interface 0
    00 00 15 03 ==> Serial Bus Controllers - Other bus type ...

Read more...

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1929902

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: hirsute
Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :

@chaoqin

Tried the latest BIOS and ubuntu desktop image[1].
But, I didnt' see 0x0c03fe in dmesg log.
Do I need to enable USB-dw3 in BIOS? How to enable it in BIOS settings?

$ dmesg | grep -e c0330 -e c03fe
[ 1.043065] pci 0000:00:14.0: [8086:4b7d] type 00 class 0x0c0330

$ sudo dmidecode -s bios-version
EHLSFWI1.R00.3162.A01.2104131432

$ sudo modprobe dwc3_pci
$ sudo modprobe dwc3
$ lsmod | grep dwc3
dwc3 143360 0
ulpi 20480 1 dwc3
udc_core 69632 1 dwc3
dwc3_pci 20480 0

$ sudo lspci -v
00:14.0 USB controller: Intel Corporation Device 4b7d (rev 11) (prog-if 30 [XHCI])
 Subsystem: Intel Corporation Device 7270
 Flags: bus master, medium devsel, latency 0, IRQ 127
 Memory at 6001340000 (64-bit, non-prefetchable) [size=64K]
 Capabilities: [70] Power Management version 2
 Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
 Capabilities: [90] Vendor Specific Information: Len=14 <?>
 Capabilities: [b0] Vendor Specific Information: Len=00 <?>
 Kernel driver in use: xhci_hcd
 Kernel modules: xhci_pci

$ dpkg -l | grep linux-image
ii linux-image-5.11.0-1012-intel 5.11.0-1012.14 amd64 Signed kernel image generic
ii linux-image-intel 5.11.0.1012.15 amd64 Generic Linux kernel image

$ uname -a
Linux u-ehl 5.11.0-1012-intel #14-Ubuntu SMP Wed Aug 11 08:52:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

---
[1] https://private-fileshare.canonical.com/~brian/iotg-focal-desktop-20210813.img

Revision history for this message
Chao Qin (chaoqin) wrote :

Please go to BIOS and enable xDCI as below :

Intel Advanced Menu -> PCH-IO Configuration -> USB Configuration-> xDCI Support -> [Enabled]

Revision history for this message
Kelsey Steele (kelsey-steele) wrote :

Hi Chao or Hsuan-Yu, may you please verify the kernel in -proposed for Focal-intel resolves this bug? Thank you.

Revision history for this message
Kent Lin (kent-jclin) wrote :

Test Steps:
1. In BIOS setup, enable xDCI as below :
Intel Advanced Menu -> PCH-IO Configuration -> USB Configuration-> xDCI Support -> [Enabled]
2. Boot to OS
3. Check dmesg to see if BIOS pass pci device info as below :
[ 4.534064] pci 0000:00:14.0: [8086:4b7d] type 00 class 0x0c0330
[ 4.553963] pci 0000:00:14.1: [8086:4b7e] type 00 class 0x0c03fe => dwc3 device
4. Check lspci -v
0000:00:14.1 USB controller: Intel Corporation Device 4b7e (prog-if fe [USB Device])
               Subsystem: Intel Corporation Device 7270
               Flags: bus master, fast devsel, latency 0, IRQ 17
               Memory at 6080000000 (64-bit, non-prefetchable) [size=2M]
               Memory at 60805e5000 (64-bit, non-prefetchable) [size=4K]
               Capabilities: <access denied>
               Kernel driver in use: dwc3-pci
5. Connect Target device to a PC or Notebook via OTG Cable, check if PC or Notebook could see Target device as Mass Storage.

Revision history for this message
Pierre Equoy (pieq) wrote :

Following Kent's comment #18, a few additional steps are required to complete the test, as described to me by Jacob Wu from Asus. The following steps are a more detailed "step 5" from previous comment, if you will:

1. Create a device image for partition, in this case 400MB memory space:
    [Command]
    $ sudo dd if=/dev/zero of=/temp.img bs=1M count=400
    [Return]
    400+0 records in
    400+0 records out

2. Format partition as FAT32
    [Command]
    $ sudo mkdosfs -F 32 /temp.img
    [Return]
    mkfs.fat 4.1 (2017-01-24)

3. Load g_mass_storage for partition
    [Command]
    $ sudo modprobe g_mass_storage file=/temp.img stall=0

4. From an Ubuntu (or Windows) host, connect a cable to the USB OTG port (on Aaeon EHL board, it's the USB type C connector) of the device under test (DUT), and a new mass storage should be available in the host.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.