Where was the royal court of Spain based during Philip III's reign?

Where exctly was the royal court of Spain based during Phillip III’s reign?

Philip III spent most of his reign in Castile. Lerma tried to promote Valladolid as the most favoured royal residence, but Philip increasingly favoured Madrid as the reign progressed. There is a good article on the subject.

Thanks APB. So I’m guessing that his predecessor/father Philip II’s court would have been based in Castille.

Philip II is the one who chose Madrid as a capital in 1561. An analysis why.

Thanks Tamerlane.