notro / fbtft

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
1.84k stars 495 forks source link

Connect LCD TFT SPI ili9486 to raspberry pi zero #528

Closed tallpid closed 2 years ago

tallpid commented 5 years ago

Hello, I am trying to connect LCD to the RPi Zero with no result. Only white screen Here is full information about my current setup. Photos: https://revspace.nl/kiekjes/view/20181118/P1010921.JPG https://revspace.nl/kiekjes/view/20181118/P1010920.JPG

Xorg log: X.Org X Server 1.19.2 Release Date: 2017-03-02 [ 701.027] X Protocol Version 11, Revision 0 [ 701.027] Build Operating System: Linux 4.9.41-v7+ armv7l Raspbian [ 701.027] Current Operating System: Linux raspberrypi 4.14.80+ #1161 Mon Nov$ [ 701.028] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=720 bcm270$ [ 701.029] Build Date: 18 October 2017 04:55:30PM [ 701.029] xorg-server 2:1.19.2-1+rpt1+deb9u2 (https://www.debian.org/support$ [ 701.029] Current version of pixman: 0.34.0 [ 701.029] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 701.029] Markers: (--) probed, () from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 701.031] (==) Log file: "/var/log/Xorg.1.log", Time: Sun Nov 18 11:57:26 20$ [ 701.032] (==) Using config directory: "/etc/X11/xorg.conf.d" [ 701.033] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 701.034] (==) ServerLayout "TFT" [ 701.029] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 701.029] Markers: (--) probed, () from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 701.031] (==) Log file: "/var/log/Xorg.1.log", Time: Sun Nov 18 11:57:26 20$ [ 701.032] (==) Using config directory: "/etc/X11/xorg.conf.d" [ 701.033] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 701.034] (==) ServerLayout "TFT" [ 701.035] () |-->Screen "ScreenTFT" (0) [ 701.035] () | |-->Monitor "MonitorTFT" [ 701.036] () | |-->Device "DeviceTFT" [ 701.036] () | |-->GPUDevice "DeviceHDMI" [ 701.036] () | |-->GPUDevice "DeviceTFT" [ 701.037] () Option "BlankTime" "10" [ 701.037] (==) Automatically adding devices [ 701.037] (==) Automatically enabling devices [ 701.037] (==) Automatically adding GPU devices [ 701.037] (==) Max clients allowed: 256, resource mask: 0x1fffff [ 701.037] (==) Automatically adding GPU devices [ 701.037] (==) Max clients allowed: 256, resource mask: 0x1fffff [ 701.037] (WW) The directory "/usr/share/fonts/X11/misc" does not exist. [ 701.037] Entry deleted from font path. [ 701.038] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist. [ 701.038] Entry deleted from font path. [ 701.038] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist. [ 701.038] Entry deleted from font path. [ 701.038] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist. [ 701.038] Entry deleted from font path. [ 701.038] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist. [ 701.038] Entry deleted from font path. [ 701.039] (==) FontPath set to: /usr/share/fonts/X11/100dpi/:unscaled, /usr/share/fonts/X11/100dpi, built-ins [ 701.039] (==) ModulePath set to "/usr/lib/xorg/modules" [ 701.039] (II) The server relies on udev to provide the list of input device$ If no devices become available, reconfigure udev or disable AutoAddDevi [ 701.039] (II) The server relies on udev to provide the list of input device$ If no devices become available, reconfigure udev or disable AutoAddDevi$ [ 701.039] (II) Loader magic: 0x1fbf40 [ 701.039] (II) Module ABI versions: [ 701.039] X.Org ANSI C Emulation: 0.4 [ 701.039] X.Org Video Driver: 23.0 [ 701.039] X.Org XInput driver : 24.1 [ 701.039] X.Org Server Extension : 10.0 [ 701.048] (--) using VT number 2

[ 701.048] (II) systemd-logind: logind integration requires -keeptty and -kee$ [ 701.049] (II) no primary bus or device found [ 701.049] (II) LoadModule: "glx" [ 701.051] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so [ 701.069] (II) Module glx: vendor="X.Org Foundation" [ 701.069] compiled for 1.19.2, module version = 1.0.0 [ 701.069] ABI class: X.Org Server Extension, version 10.0 [ 701.069] (II) LoadModule: "fbturbo" [ 701.070] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so

[ 701.069] (II) LoadModule: "fbturbo" [ 701.070] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so [ 701.071] (II) Module fbturbo: vendor="X.Org Foundation" [ 701.071] compiled for 1.19.2, module version = 0.5.1 [ 701.072] Module class: X.Org Video Driver [ 701.072] ABI class: X.Org Video Driver, version 23.0 [ 701.072] (II) FBTURBO: driver for framebuffer: fbturbo [ 701.127] (WW) Falling back to old probe method for fbturbo [ 701.127] (II) Loading sub module "fbdevhw" [ 701.128] (II) LoadModule: "fbdevhw" [ 701.128] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 701.129] (II) Module fbdevhw: vendor="X.Org Foundation" [ 701.129] compiled for 1.19.2, module version = 0.0.2 [ 701.130] ABI class: X.Org Video Driver, version 23.0 [ 701.131] (II) FBTURBO(0): using /dev/fb1 [ 701.131] (II) FBTURBO(1): using /dev/fb0 [ 701.131] (II) FBTURBO(2): using /dev/fb1 [ 701.131] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support [ 701.131] (EE) Screen 1 deleted because of no matching config section. [ 701.131] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support [ 701.131] (EE) Screen 1 deleted because of no matching config section. [ 701.132] (II) UnloadModule: "fbturbo" [ 701.132] (II) UnloadSubModule: "fbdevhw" [ 701.132] (EE) Screen 1 deleted because of no matching config section. [ 701.132] (II) UnloadModule: "fbturbo" [ 701.132] (II) UnloadSubModule: "fbdevhw" [ 701.135] (II) FBTURBO(0): Creating default Display subsection in Screen sec$ "ScreenTFT" for depth/fbbpp 16/16 [ 701.135] (==) FBTURBO(0): Depth 16, (==) framebuffer bpp 16 [ 701.135] (==) FBTURBO(0): RGB weight 565 [ 701.136] (==) FBTURBO(0): Default visual is TrueColor
[ 701.136] (==) FBTURBO(0): Using gamma correction (1.0, 1.0, 1.0) [ 701.136] (II) FBTURBO(0): hardware: flexfb (video memory: 300kB) [ 701.136] () FBTURBO(0): Option "fbdev" "/dev/fb1" [ 701.142] (II) FBTURBO(0): processor: ARM1176 [ 701.142] (II) FBTURBO(0): checking modes against framebuffer device... [ 701.142] (II) FBTURBO(0): checking modes against monitor... [ 701.142] (--) FBTURBO(0): Virtual size is 480x320 (pitch 480) [ 701.142] (II) FBTURBO(0): checking modes against monitor... [ 701.142] (--) FBTURBO(0): Virtual size is 480x320 (pitch 480) [ 701.143] () FBTURBO(0): Built-in mode "current" [ 701.143] (==) FBTURBO(0): DPI set to (96, 96) [ 701.143] (II) Loading sub module "fb" [ 701.143] (II) LoadModule: "fb" [ 701.143] (II) Loading /usr/lib/xorg/modules/libfb.so [ 701.150] (II) Module fb: vendor="X.Org Foundation" [ 701.150] compiled for 1.19.2, module version = 1.0.0 [ 701.150] ABI class: X.Org ANSI C Emulation, version 0.4 [ 701.156] (II) FBTURBO(0): FBIOBLANK: Invalid argument (Screen blanking not $ [ 701.157] (II) FBTURBO(0): using backing store heuristics [ 701.194] (II) FBTURBO(0): can't load 'g2d_23' kernel module [ 701.194] (II) FBTURBO(0): failed to enable the use of sunxi display control$ [ 701.195] (II) FBTURBO(0): No sunxi-g2d hardware detected (check /dev/disp a$ [ 701.195] (II) FBTURBO(0): G2D hardware acceleration can't be enabled [ 701.195] (II) FBTURBO(0): enabled VFP/NEON optimizations [ 701.196] (==) FBTURBO(0): Backing store enabled [ 701.197] (==) FBTURBO(0): DPMS enabled [ 701.197] (II) FBTURBO(0): failed to enable hardware cursor [ 701.197] (II) FBTURBO(0): no 3D acceleration because the driver has been co$ [ 701.197] (II) FBTURBO(0): if this is wrong and needs to be fixed, please ch$ [ 701.197] (==) RandR enabled
[ 701.254] (II) SELinux: Disabled on system [ 701.263] (II) AIGLX: Screen 0 is not DRI2 capable [ 701.263] (EE) AIGLX: reverting to software rendering
[ 701.806] (II) IGLX: enabled GLX_MESA_copy_sub_buffer [ 701.810] (II) IGLX: Loaded and initialized swrast [ 701.810] (II) GLX: Initialized DRISWRAST GL provider for screen 0 [ 707.984] (II) Server terminated successfully (0). Closing log file.

Screen info: TFT SPI LCD 320x480 Driver: ili9486l

MOS -> MOSI (PIN19) MIS -> MISO (PIN21) CLK -> SCLK (PIN23) VCC -> 3.3V BL (BACKLIGHT) -> 56hm -> PIN12 (GPIO18) PWM0 DC -> PIN 18 (GPIO24) RES -> PIN 22 (GPIO25)

dmesg:

[ 4.615392] fbtft_device: spi_busnum_to_master(0) returned NULL [ 4.734132] spi-bcm2835 20204000.spi: chipselect 1 already in use [ 4.734396] spi_master spi0: spi_device register error /soc/spi@7e204000/ads7846@1 [ 4.734660] spi_master spi0: Failed to create SPI device for /soc/spi@7e204000/ads7846@1 [ 4.901284] spi spi0.1: ads7846 spi0.1 2000kHz 8 bits mode=0x00 [ 4.901311] spi spi0.0: ili9341 spi0.0 32000kHz 8 bits mode=0x00 [ 4.901435] spi spi0.0: Deleting spi0.0 [ 4.902555] flexfb spi0.0: fbtft_request_gpios: 'reset' = GPIO25 [ 4.902591] flexfb spi0.0: fbtft_request_gpios: 'dc' = GPIO24 [ 4.902604] flexfb spi0.0: flexfb_verify_gpios_dc() [ 4.902620] flexfb spi0.0: fbtft_reset() [ 5.073194] flexfb spi0.0: init: write(0xB0) 0x00 [ 5.073316] flexfb spi0.0: init: write(0x11) [ 5.073354] flexfb spi0.0: init: mdelay(250) [ 5.323436] flexfb spi0.0: init: write(0x3A) 0x55 [ 6.273362] flexfb spi0.0: init: write(0xC2) 0x44 [ 6.285731] flexfb spi0.0: init: write(0xC5) 0x00 0x00 0x00 0x00 [ 6.285892] flexfb spi0.0: init: write(0xE0) 0x0F 0x1F 0x1C 0x0C 0x0F 0x08 0x48 0x98 0x37 0x0A 0x13 0x04 0x11 0x0D 0x00 [ 6.286057] flexfb spi0.0: init: write(0xE1) 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 [ 6.286221] flexfb spi0.0: init: write(0xE2) 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 [ 6.286363] flexfb spi0.0: init: write(0x36) 0x28 [ 6.286477] flexfb spi0.0: init: write(0x11) [ 6.286548] flexfb spi0.0: init: write(0x29) [ 6.569091] flexfb spi0.0: Display update: 1061 kB/s, fps=0 [ 6.569117] flexfb spi0.0: fbtft_register_backlight(): led pin not set, exiting. [ 6.831402] graphics fb1: flexfb frame buffer, 480x320, 300 KiB video memory, 4 KiB buffer memory, fps=20, spi0.0 at 16 MHz [ 6.831633] spi spi0.1: ads7846 spi0.1 2000kHz 8 bits mode=0x00 [ 6.831649] flexfb spi0.0: flexfb spi0.0 16000kHz 8 bits mode=0x00 [ 8.178048] ads7846 spi0.1: failed to request/setup pendown GPIO25: -16 [ 8.178110] ads7846: probe of spi0.1 failed with error -16

etc/modules

i2c-dev spi-bcm2835 snd-bcm2835 i2c-bcm2708 fbtft_device flexfb ads7846_device

/boot/config.txt

dtparam=spi=on

dtparam=audio=on dtoverlay=dwc2

dtparam=audio=on dtparam=spi=on dtoverlay=ads7846,bl=12,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900 dtparam=i2c_arm=on dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1

dtoverlay=rpi-display,speed=32000000,rotate=270

pi@raspberrypi:~$ cat /boot/cmdline.txt dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=34ca9997-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_serial quiet splash plymouth.ignore-serial-consoles fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

tallpid commented 5 years ago

I also tried modprobe fbtft_device name=ili9486 gpios=reset:25,dc:24,led:18 directly with no result

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.