The upstream of the Titan Ridge at 09:00.0 is the only one that needs to say g2 (5GT/s) - it matches the max of your PCIe slot at 02:04.0. On the MacPro5,1 with the latest firmware that you have, it should boot that way - as reported in the pcitree.txt output.
The setpci commands shown in the pcitree.txt output only show the current value of CAP_EXP+30.w. You need to add "=newvalue:mask" to change the value of the register. Paste the following into a file called "fast.sh", add the execute permission to the file, and use the script to change the link speed of a root port.
Code:
speed=$1
rootport=$2
linkstatus=$(sudo setpci -s $rootport CAP_EXP+12.w); echo '# Before: PCIe' $(( 0x$linkstatus & 15)).0 x$(( 0x$linkstatus >> 4 & 31))
sudo setpci -s $rootport CAP_EXP+30.w=$speed:F # Set Link Speed
sudo setpci -s $rootport CAP_EXP+10.w=20:20 # Start Retrain
linkstatus=$(sudo setpci -s $rootport CAP_EXP+12.w); echo '# After: PCIe' $(( 0x$linkstatus & 15)).0 x$(( 0x$linkstatus >> 4 & 31))
Execute it like this ("2" is for 5 GT/s, change it to "1" to try 2.5 GT/s, run pcitree.sh to see the change which should affect the slot at 02:04.0 and the Titan Ridge upstream at 09:00.0):
The Titan Ridge downstream bridges/devices (NHI, USB, and their bridges) are reported as g1 (2.5GT/s) but that doesn't mean anything since they are internal to the Titan Ridge chip. g1 is the expected value and doesn't change.
Did you run update-pciids after installing pciutils? Some of the device names seem strange or missing.
The Thunderbolt 1 device having upstream at 0c:00.0 seems strange. The downstream at 0d:00.0 is the PCIe link to the PCIe endpoint device at 0e:00.0 (RME Fireface UFX+). The device is g1x2 but appears to only negotiate a link width of x1. Did RME only wire one of the two PCIe lanes or does Thunderbolt 1 not support x2 devices? g1x1 is limited to 250 MB/s. I think that's sufficient for audio? USB 3.0 is 500 MB/s.
Ignore PCIe speed reported by System Info. That info is not current. The output from pciutils as reported by lspci, setpci, or pcitree.sh are current values. System Info is correct if it's reporting the speed of the RME Fireface UFX+ (pcie1d18,1).