A lack of ankle mobility is often one of the contributing components to a less than optimal squat. As a general measuring stick, you want to be able to squat with your thighs parallel to the floor.
Unfortunately, this is very difficult for many. If you were to examine lower body squatting mechanics: the hips, knees and ankles should all move at the same time with right amount of range or motion. If one or more of these areas are dysfunctional, you may end up with the inability to do the motion in addition to pain if you don't take care of it.
So let's focus on the foot/ankle for a little bit. The talocrural joint (consisting of the Fibula, Tibia & Talus) is the main "hinge" joint of the ankle and gives you the most amount of range of motion. BUT... you also have to take into consideration the actual foot which is right below it.
The foot itself consists of 26 bones! Can you imagine how mobile it is without muscular support? The role of the foot itself is to STABILIZE so the Talocrural "Hinge" joint can stay MOBILE.
If you want that amazing depth with your squat, be sure you have both components assessed and corrected!