Hi Jason,
On Fri, Mar 1, 2019 at 10:33 AM Jason Andryuk jandryuk@gmail.com wrote:
Hi,
I have a Lenovo Thinkpad t420s on which I've installed coreboot. However, the USB 3.0 port is not active and the controller is not listed under lspci.
Under the original Lenovo bios, the xhci device was at pci address 0d:00.0 behind bridge 00:1c.4.
It looks like the t420s devicetree.cb is set up for the xhci controller to be behind 00:1c.6. I changed that to 00:1c.4 and that got the xhci pci device to show up as 03:00.0. Strangely, booting into linux, it shows 001c.3 as the bridge to 03:00.0. Additionally, plugged in USB devices were not detected.
Note that the mainboard has pcie_port_coalesce set in the devicetree, so it can be wrong to just see the BDF address to know which port the XHCI device is connected to.
However, lspci also shows the port, it'll show `PCI Express Root Port X` where X is actually the port number (PCI function number + 1). The function number in the device tree is based on this port number.
Here's where it gets weird. I had a mouse plugged in, and I was looking in sysfs. cat /sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/enable 0 So the xhci pci device is disabled. I ran `lspci -vvnn` a few times in quick sucession - I was looking to see if it showed disabled - and the mouse lit up!
Plugging in a USB Flash drive, it was again not detected. The lspci trigger worked. Later, promptly switching USB devices resulted in the new USB device still being detected.
Is "PCH: PCIe map 1c.4 -> 1c.3" the remapping from the device tree 1c.4 to the 1c.3 that I see?
Below I've included the cbmem -c output and a snippet from an old lenovo BIOS dmesg w/ the pci address.
Does anyone have an idea of what is going on, or what I should investigate next? A total guess, but could poking the PCI device with lspci turn it on so that it may detect an attached device and then stay active? Maybe something with power management? Again, I'm just guessing. Any suggestions are appreciated.
Thanks, Jason