Skip to content

Instantly share code, notes, and snippets.

@aharshac
Created April 7, 2019 08:40
Show Gist options
  • Save aharshac/1236e6dfd4236a1edba14536c1e8bfb1 to your computer and use it in GitHub Desktop.
Save aharshac/1236e6dfd4236a1edba14536c1e8bfb1 to your computer and use it in GitHub Desktop.
Waveshare screen config - Madhu N
1. use this /boot/cmdline.txt:
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
2. edit the end of /boot/config.txt to contain:
dtparam=audio=on
dtparam=spi=on
dtoverlay=ads7846,penirq=25,penirq_pull=2,xohms=150,swapxy=1,xmin=300,ymin=700,xmax=3800,ymax=3400,pmax=255
dtoverlay=waveshare35a
3. copy waveshare35a.dtb to the /boot/overlays directory as:
waveshare35a.dtbo
(note that the new kernel requires a '.dtbo' on overlays now!)
4. edit /usr/share/X11/xorg.conf.d/99-fbturbo.conf to contain:
Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"
Option "SwapbuffersWait" "true"
EndSection
5. create a file named 99-calibration.conf under /etc/X11/xorg.conf.d to contain:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3932 300 294 3801"
Option "SwapAxes" "1"
EndSection
6. reboot and enjoy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment