It looks like PCI-Express gen 4.0 is possibly on older socket AM4 motherboards based on AMD’s 400-series chipsets, at least according to ASUS. In their latest BIOS updates there is now a PCI-Express gen 4.0 toggle in the PCIe settings, which does in fact enable PCIe gen 4.0 to all devices that are directly wired to the SoC. This would be the PCI-Express x16 slots meant for graphics and one of the M.2 slots that has wiring to the SoC. Below is a list of motherboards which details which have PCIe gen 4 support.
Apparently AMD did not block PCIe gen 4.0 on older chipsets, they just discouraged manufacturers from enabling it, since new AMD 500-series motherboards are built to new PCB specifications to ensure proper PCIe gen 4.0 stability and signal-integrity. It seems as if ASUS is letting users choose, if enabling PCIe 4.0 makes their system unstable they can just revert back to PCIe gen 3.0.
To test if this actually works MyDrivers used a PCIe gen 4.0 SSD on an M.2 slot that was directly wired to the SoC on an ASUS TUF B450M Pro Gaming motherboard. Running CrystalDiskMark the results are the same as what they would achieve on a newer X570 motherboard, and keep in mind these speeds are impossible with PCIe gen 3.0!
Apparently AMD is not very happy that ASUS is marketing PCIe gen 4.0 on their 400 series motherboards and is reportedly trying to block the option in updates to the AGESA microcode.