pwm frequency to digital hi low
What you describe is not PWM, it's BFSK. 

It can be solved with an edge interrupt: Count the number of rising or falling edges in a timeframe. The number you get will tell you whether it's a 0 or a 1.

If you want a hardware-only solution, you could build an analog low-pass filter that suppresses everything above 2.5 kHz. If you get a signal you know it's the 2.5 kHz one (or DC), and if you don't, it's either the 5 kHz signal (or no signal). If you want to distinguish between 5 kHz and no signal, you need to build two filters.

There are probably many more ways to skin this cat, but there you have two of them.