coreboot icon indicating copy to clipboard operation
coreboot copied to clipboard

Sync dTBT changes from upstream

Open crawfxrd opened this issue 3 months ago • 12 comments

Sync changes from CB:75286 and CB:76584.

Need to test on:

  • bonw15-b (Barlow Ridge)
  • addw3, bonw15, oryp12, or serw13 (Maple Ridge)

crawfxrd avatar Sep 04 '25 17:09 crawfxrd

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:

dock-working-6982eaf.txt dock-not-working-eb87d4a.txt

jacobgkau avatar Oct 14 '25 20:10 jacobgkau

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?

crawfxrd avatar Oct 14 '25 21:10 crawfxrd

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.

jacobgkau avatar Oct 14 '25 21:10 jacobgkau

Can you get the output from cbmem -c as well with/without dock attached before boot?

crawfxrd avatar Oct 14 '25 21:10 crawfxrd

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.)

jacobgkau avatar Oct 14 '25 22:10 jacobgkau

Re-added the devicetree entries, which should hopefully fix hotplug.

crawfxrd avatar Oct 15 '25 15:10 crawfxrd

Just built & flashed with 876b0e1, and it's still not seeing the downstream devices on hotplug, only after rebooting.

jacobgkau avatar Oct 16 '25 17:10 jacobgkau

~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.

crawfxrd avatar Oct 17 '25 18:10 crawfxrd

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?

crawfxrd avatar Oct 17 '25 19:10 crawfxrd

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.

jacobgkau avatar Oct 24 '25 18:10 jacobgkau

Looks like the explicit PCI device is required in devicetree then.

And if it still doesn't work, then...I don't know.

crawfxrd avatar Oct 24 '25 18:10 crawfxrd

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.

jacobgkau avatar Oct 24 '25 19:10 jacobgkau