more likely up to 32Mhz. Internal osc can go up to 8 MHZ, then you multiply it X4 (PLL)...

40MHz is when you're using an external 10MHz crystal + PLL enabled.