Sync dTBT changes from upstream
Sync changes from CB:75286 and CB:76584.
Need to test on:
- bonw15-b (Barlow Ridge)
- addw3, bonw15, oryp12, or serw13 (Maple Ridge)
Confirmed Thunderbolt works on master firmware (with coreboot 6982eaf), so the regression is specific to this PR. Here's dmesg after plugging in the dock with the working and non-working firmware:
It's only allocating a single downstream bus for the TBT device itself, and failing to allocate any memory resources.
Does the dock work if the it's connected before booting?
Does the dock work if the it's connected before booting?
Yes, just tried rebooting while it was plugged in, and it started working on the next boot. Seems to then work if I unplug and re-plug on the same boot, too.
Can you get the output from cbmem -c as well with/without dock attached before boot?
Here you go: booted-without-afterplug.txt booted-with.txt
(I collected output both before and after plugging the dock in on the non-plugged boot, but they were identical.)
Re-added the devicetree entries, which should hopefully fix hotplug.
Just built & flashed with 876b0e1, and it's still not seeing the downstream devices on hotplug, only after rebooting.
~Can you provide cbmem output again?~
Nevermind, I see it. TR_4C_BRG is duplicated in pci_device_ids. One of them should be TR_DD_BRG, which happens to be the device on the oryp12.
Removed the explicit pci devicetree entries again and added TR_DD_BRG to pci_device_ids.
Check cbmem -c output to see if downstream port is scanned again ("subordinate bus PCI Express" for device 8086/15ef).
Also: What the hell? Why is it a TBT3 bridge ID?
It also looks like the oryp12 hangs with its fans spun up if I try to shut down with the dock plugged in after hotplugging.
Looks like the explicit PCI device is required in devicetree then.
And if it still doesn't work, then...I don't know.
Still not working after hotplug on a363ff7.
dmesg after hotplug: oryp12-dmesg-a363ff7.txt
cbmem -c after hotplug: oryp12-cbmem-a363ff7.txt
Also still hanging on shutdown with the dock hotplugged.
Let me know if any other output would be helpful.