He did tawaaf in the courtyard of the mosque and completed his tawaaf on the upper level
Question

                We did the farewell tawaaf, six circuits around the Ka’bah, but the crowding was very bad, so we went up to the upper level and completed the remaining circuit. In between that we drank Zamzam water. Some people told us that our tawaaf and Hajj are not valid.
Praise be to Allah.
    If the situation was as described, your Hajj and tawaaf are 
    both valid and you do not have to do anything for your doing the seventh 
    tawaaf in the upper level of the mosque, or for the interruption between it 
    and the first six circuits by praying, drinking or speaking. 

    And Allaah is the Source of strength. May Allaah send 
    blessings and peace upon our Prophet Muhammad and his family and companions. 
    End quote. 

    Standing Committee for Academic Research and Issuing Fatwas