Official touchscreen is upside down
Open the config.txt file by using the following command in a terminal window:
sudo nano /boot/config.txt
Then add the line at the bottom:
lcd_rotate=2
press enter
save
This will rotate both the LCD and the touch coordinates back to the right rotation.
Don't use the documented display_rotate, it performs a performance expensive rotation of the screen and does not rotate the touch input.