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.86k stars 494 forks source link

usage of gpio based SPI? #357

Closed 8bit-meiko closed 8 years ago

8bit-meiko commented 8 years ago

any chance of having the spi sck, miso and mosi lines to gpio?

perhaps with the use of this lib? : https://randomcoderdude.wordpress.com/2013/08/15/spi-over-gpio-in-openwrt/

notro commented 8 years ago

Linux has a builtin spi gpio driver:

config SPI_GPIO
        tristate "GPIO-based bitbanging SPI Master"
        depends on GPIOLIB || COMPILE_TEST
        select SPI_BITBANG
        help
          This simple GPIO bitbanging SPI master uses the arch-neutral GPIO
          interface to manage MOSI, MISO, SCK, and chipselect signals.  SPI
          slaves connected to a bus using this driver are configured as usual,
          except that the spi_board_info.controller_data holds the GPIO number
          for the chipselect used by this controller driver.

          Note that this driver often won't achieve even 1 Mbit/sec speeds,
          making it unusually slow for SPI.  If your platform can inline
          GPIO operations, you should be able to leverage that for better
          speed with a custom version of this driver; see the source code.

If you use a Pi, this module is not currently enabled in the official kernel binary:

~$ sudo modprobe configs
~$ zgrep SPI_GPIO /proc/config.gz
# CONFIG_SPI_GPIO is not set

https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-gpio.txt

notro commented 8 years ago

Closing old issues, reopen if needed.