In order to apply for CS in college, how many years of Physics is recommended in HS?

My son took only AP Physics C in HS with no prior physics class. First semester was Mechanics and second E&M. Scored 5 on both in 2020 on the abbreviated AP test.
This was good enough to fulfill the physics requirement for CS at Stanford.
If the student has enough study time and inclination, in our experience, taking the algebra based AP Physics 1 is not required. However, Apc mechanics and e&m in one year is tough. Since 2021, our high school now offers a full year APC mechanics as an alternative