- If you are using RPi Display module - you need it is necessary to throw a jumper between pins PD24 and PL10
- Add overlay:
sudo armbian-add-overlay sun50i-h6-ili9486-ads7846.dts
- Apply Xorg config (/etc/X11/xorg.conf.d/50-tft.conf)
- If touchscreen doesn't work - switch Kernel to "legacy":
sudo apt install linux-image-legacy-sunxi64
- For calibration use this guide: https://bttwiki.com/libinput_calibration.html
Last active
February 13, 2025 03:21
-
-
Save Ponywka/a075a0e59b2ae196f984f22a444fa731 to your computer and use it in GitHub Desktop.
TFT display (ILI9486 + XPT2046 (ADS7846)) on Orange Pi 3 LTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "Device" | |
Identifier "ILI9486 Screen" | |
Driver "fbdev" | |
Option "fbdev" "/dev/fb0" | |
EndSection | |
Section "InputClass" | |
Identifier "ADS7846 Touchscreen" | |
MatchIsTouchscreen "on" | |
MatchDevicePath "/dev/input/event*" | |
Driver "libinput" | |
Option "SwapAxes" "1" | |
EndSection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "allwinner,sun50i-h6"; | |
fragment@0 { | |
target = <&spi1>; | |
__overlay__ { | |
num-cs = <2>; | |
cs-gpios = <&pio 7 3 0>, <&r_pio 0 8 0>; | |
status = "okay"; | |
ili9486@0 { | |
compatible = "ilitek,ili9486"; | |
reg = <0>; | |
spi-max-frequency = <16000000>; | |
txbuflen = <0x8000>; | |
rotation = <90>; | |
bgr = <0x00>; | |
fps = <30>; | |
buswidth = <0x08>; | |
regwidth = <0x10>; | |
reset-gpios = <&pio 3 21 0>; | |
dc-gpios = <&pio 3 16 0>; | |
debug = <0x00>; | |
init = < | |
0x10000f1 0x36 0x04 0x00 0x3c 0x0f 0x8f | |
0x10000f2 0x18 0xa3 0x12 0x02 0xb2 0x12 0xff 0x10 0x00 | |
0x10000f8 0x21 0x04 | |
0x10000f9 0x00 0x08 | |
0x1000036 0x08 | |
0x10000b4 0x00 | |
0x10000c1 0x41 | |
0x10000c5 0x00 0x91 0x80 0x00 | |
0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 | |
0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 | |
0x100003a 0x55 | |
0x1000011 | |
0x1000036 0x28 | |
0x20000ff | |
0x1000029 | |
>; | |
}; | |
ads7846@0 { | |
compatible = "ti,ads7846"; | |
reg = <1>; | |
spi-max-frequency = <100000>; | |
interrupts = <0 10 2>; | |
interrupt-parent = <&r_pio>; | |
pendown-gpio = <&r_pio 0 10 0>; | |
ti,x-plate-ohms = /bits/ 16 <60>; | |
ti,pressure-max = /bits/ 16 <255>; | |
}; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment