Can somebody mathematically prove why $$\mathrm dq = T\,\mathrm dS$$ for a reversible process?

I realize I am supposed to provide some research but I can't find anything. The best I got is $\mathrm dE = T\,\mathrm dS$ which is basically $\mathrm dG = \mathrm dH - T\,\mathrm dS$ and it seems to be a circular argument (since for derivation of $G$ most proofs use the equation $\mathrm dq=T\,\mathrm dS$).