Had the same issue. Got ROG Strix X570-F Gaming, was doing a clean reinstall with CPU upgrade from 3800 to 5800. Updated bios to 4002 and installed this little bugger asus tpm-spi for a future win11 upgrade. So, it was not detecting at all after multiple bios reflash, CMOS clearing and battery swapping. But I got it detected by the following way, which is not safe, so you should not do it. This is clearly a bug that bios does not detect the module after cold plug-in.
So, what I did. With BIOS running, unplug tpm-spi module, then plug it back. All this with PC running with BIOS on the screen. Then click reset in the bios menu. After that it reset not once but two times, there were two sounds of successful POST within 20 seconds. After that I got a new option in the advanced section - trusted computing. After that PC boots always normally with module being always detected. But I did not try to clear CMOS, may be CMOS clearing will make the module undetectable again.
In this case try enabling the TPM on the BIOS, follow the steps to do so: Ã¢â‚¬Â¢ Here you need to get into BIOS by pressing the F2 or Del key continuously when the PC boots Ã¢â‚¬Â¢ Once you get into BIOS, then click on the Advanced/Security section Ã¢â‚¬Â¢ Search for the TPM feature then click on the Enable icon Hope enabling the TPM on BIOS may work for you, but if still facing the error then check out other fixes to solve the TPM device not detected a problem.