9341 正常的訊息
-----------
[ 1.664021] ili9341@0 enforce active low on GPIO handle
[ 6.580043] fb_ili9341: module is from the staging directory, the quality is
unknown, you have been warned.
[ 6.580648] fb_ili9341 spi0.0: fbtft_property_value: width = 240
[ 6.580674] fb_ili9341 spi0.0: fbtft_property_value: height = 320
[ 6.580685] fb_ili9341 spi0.0: fbtft_property_value: buswidth = 8
[ 6.580697] fb_ili9341 spi0.0: fbtft_property_value: debug = 4
[ 6.580706] fb_ili9341 spi0.0: fbtft_property_value: rotate = 90
[ 6.580716] fb_ili9341 spi0.0: fbtft_property_value: fps = 30
[ 6.580973] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'reset' GPIO
[ 6.581032] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'dc' GPIO
[ 6.581067] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'rd' GPIO
........... 一直重複 -----------
[ 6.581590] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'db' GPIO
...
[ 6.887247] fb_ili9341 spi0.0: Display update: 3837 kB/s, fps=0
[ 6.888155] Console: switching to colour frame buffer device 40x30
[ 6.888772] graphics fb0: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 16 KiB buffer memory, fps=31, spi0.0 at 40 MHz
[ 6.999727] systemd[1]: Starting systemd-backlight@backlight:fb_ili9341.service - Load/Save Screen Backlight Brightness of backlight:fb_ili9341...
[ 7.003913] systemd[1]: Finished systemd-binfmt.service - Set Up Additional Binary Formats.
[ 7.023356] usb 2-1: Firmware revision 11.1 (signature 0x88e1)
[ 7.080231] systemd[1]: Finished systemd-backlight@backlight:fb_ili9341.service - Load/Save Screen Backlight Brightness of backlight:fb_ili9341.
--------------使用 lsmod
-------------
fb_ili9341 12288 1
fbtft 36864 1 fb_ili9341
-------------
https://mjmwired.net/kernel/Documentation/devicetree/bindings/display/ilitek,ili9486.yaml
參考 Using GPIO from a Linux Shell
--------------
$ dmesg | grep -i ads
[ 7.067079] ads7846 spi0.1: supply vcc not found, using dummy regulator
[ 7.072789] ads7846 spi0.1: touchscreen, irq 47
[ 7.073534] input: ADS7846 Touchscreen as /devices/platform/soc/1c68000.spi/spi_master/spi0/spi0.1/input/input1
$ cat /proc/interrupts | grep ads
47: 22 0 0 0 sunxi_pio_edge 6 Edge ads7846
$ sudo gpiodetect
gpiochip0 [1c20800.pinctrl] (224 lines)
gpiochip1 [1f02c00.pinctrl] (32 lines)
$ sudo gpioinfo
gpiochip0 - 224 lines:
line 0: unnamed unused input active-high
.....
line 5: unnamed unused input active-high
line 6: unnamed "pendown" input active-low [used]
line 7: unnamed "led" output active-high [used]
line 8: unnamed "dc" output active-high [used]
line 9: unnamed "reset" output active-low [used]
line 10: unnamed "spi0 CS0" output active-low [used]
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed "orangepi:red:status" output active-high [used]
line 16: unnamed unused input active-high
.....
line 20: unnamed "spi0 CS1" output active-high [used]
.....
line 165: unnamed unused input active-high
line 166: unnamed "cd" input active-low [used]
.....
line 204: unnamed "usb0_id_det" input active-high [used]
line 205: unnamed unused input active-high
--------------https://www.kernel.org/doc/Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
https://github.com/raspberrypi/linux/pull/6029 (Mar 13, 2024)
The driver has been converted to use gpiod, which will normalise polarity based on DT.
The piscreen overlay (and others) incorrectly defines the pendown GPIO as being ACTIVE_HIGH (0), althought triggering on the high-low edge for pen down. It therefore tries reading the pen position when not being touched, and stops when it is touched.
Tested with piscreen and ads7846 overlays. Also fixed on others where the interrupt says high->low but the polarity was ACTIVE_HIGH.
ADS7846 Touch controller does not work anymore after upgrade to the latest kernel 6.6.20 on 64-bit Raspberry Pi OS Bookworm. It works well with the older kernel 6.1.0.
https://github.com/raspberrypi/linux/blob/rpi-6.6.y/arch/arm/boot/dts/overlays/ads7846-overlay.dts
-----------
pendown-gpio = <&pio 0 19 0>;
line 19: unnamed "pendown" input active-high [used]
pendown-gpio = <&pio 0 19 1>;
line 19: unnamed "pendown" input active-low [used]
---------------