Enable SPI
sudo raspi-config
Go to: Interface Options → SPI → Enable
sudo reboot
Enable the XPT2046 driver (device tree overlay)
Edit config:
sudo nano /boot/firmware/config.txt
edit for Disable HDMI
hdmi_force_hotplug=0
Add this at the bottom:
dtoverlay=fb_ili9486,rotate=90
Save and reboot:
sudo reboot
Verify touch device is detected
Check:
dmesg | grep ads7846
You should see something like:
input: ADS7846 Touchscreen as /devices/...
Then list input devices:
ls /dev/input/
Look for:
event0, event1, ...