Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Adafruit 2.8" TFT LCD with ILI9341? #400

Closed
pdp7 opened this issue Jun 22, 2016 · 7 comments
Closed

Support for Adafruit 2.8" TFT LCD with ILI9341? #400

pdp7 opened this issue Jun 22, 2016 · 7 comments

Comments

@pdp7
Copy link

pdp7 commented Jun 22, 2016

I'd like to get this display working with fbtft and have not had any success so far:

2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket - ILI9341
PRODUCT ID: 1770
https://www.adafruit.com/product/1770

This is the startup sequence that the Python library uses:
https://github.com/adafruit/Adafruit_Python_ILI9341/blob/master/Adafruit_ILI9341/ILI9341.py#L179

I thought I would post here in the hopes that someone might have a suggestion as to what steps try next.

thanks!

@notro
Copy link
Owner

notro commented Jun 22, 2016

I discovered recently that the PiTFT 2.8 (#1601) has got a MI0283QT-11 panel, the same as rpi-display. And I see that 1770 uses the same panel. So in theory it should work.
I assume you have closed the IM{1,2,3} jumpers if you're using SPI.

@wiihoffmann
Copy link

@pdp7 I have replied to your comment on my old question here, and it should hopefully help you out.

@pdp7
Copy link
Author

pdp7 commented Aug 20, 2016

@notro curious if you might have any thoughts.

This is an Adafruit display with ILI9341:

It works OK with your bone-debian-7.5-2014-05-14-2gb image and the pre-compiled fbtft drivers for Linux 3.8.13-bone50.

However, I can't seem to get it to work on newer images and/or newer kernels. For example, Debian 7.11 (2016-06-15) with 4.1.29-bone22:

fb_ili9340 spi1.0: fbtft_request_gpios: gpio_request_one('dc'=48) failed with -16
fb_ili9340: probe of spi1.0 failed with error -16

Any idea what the cause of that error could be?

thanks!

@notro
Copy link
Owner

notro commented Aug 20, 2016

-16 is -EBUSY so the gpio is claimed/requested already.

gpio_request_one() -> gpiod_request() -> __gpiod_request():

        if (test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0) {
                desc_set_label(desc, label ? : "?");
                status = 0;
        } else {
                status = -EBUSY;
                goto done;
        }

http://lxr.free-electrons.com/ident?i=gpio_request_one

#define EBUSY           16      /* Device or resource busy */

http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno-base.h

@notro
Copy link
Owner

notro commented Aug 20, 2016

If debugfs is enabled, have a look at /sys/kernel/debug/gpio. It should list all requested gpios.

@pdp7
Copy link
Author

pdp7 commented Aug 20, 2016

@notro thank you very much for the insights!

@pdp7
Copy link
Author

pdp7 commented Aug 21, 2016

I'll close this issue as I don't think the issue has do to do with fbtft.

I'll add a comment here once I've found a solution, in case anyone else runs into the issue, too.

@pdp7 pdp7 closed this as completed Aug 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants