I agree with the above: it is not a written rule that you attend a different university for your PhD, but it is typically advised to go somewhere else. And I think you are not yet in a position to be concerned about this; if you perform well during undergraduate, your concentration, and the respective PhD program strengths will become more apparent to you. Undergraduate faculty advising will help you determine the best options. You may end up submitting an application to Berkeley for graduate school, but you will certainly be submitting applications to other programs.