I know this question has been asked many times, but I can't find a solution that works anywhere to rotate the official raspberry pi touch screen (not the display part as this is working, just the touch panel) on my raspberry pi 3 90 degrees to the left. I commented out dtoverlay=vc4-kms-v3d as display_lcd_rotate=1 does not work when enabled.
My /boot/config.txt changes...
#dtoverlay=vc4-kms-v3d [ALL] display_lcd_rotate=1 xinput set-prop 'raspberrypi-ts' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
Edit: I'm using the official raspbian lite version and starting Xorg-server in systemd if that matters.
Edit: I ended up finding a solution, I changed /boot/config.txt to:
#dtoverlay=vc4-kms-v3d dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-x=1 [ALL] display_lcd_rotate=1