Jump to content

SPI on Allwinner / Banana / Cubietruck ...


Recommended Posts

I am having the exact same hw configuration as described here.

 

banana-spi-display.jpg

 

I am using latest (stable) mainline kernel 4.0.5, SPI is enabled in DTB like this:

		spi0: spi@01c05000 {
			pinctrl-names = "default";
			pinctrl-0 = <&spi0_pins_a>;
			status = "okay";
			spi0_0 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "spidev";
				reg = <0>;
				spi-max-frequency = <50000000>;
			};
		};

I am loading the driver like this and the displays back light goes on - so far is o.k. 

modprobe fbtft_device name=adafruit22a rotate=90 speed=4800000 fps=30 gpios=reset:272,led:226,dc:245 busnum=32766

This way, with different GPIOS numbers and without busnum parameter works perfectly well on kernel 3.4.x

 

Kernel output when loading the driver on 4.0.5

[27880.540870] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[27880.549004] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[27880.551333] fbtft_device:  SPI devices registered:
[27880.551386] fbtft_device:      spidev spi32766.0 50000kHz 8 bits mode=0x00
[27880.551406] fbtft_device:  'fb' Platform devices registered:
[27880.551570] fbtft_device: Deleting spi32766.0
[27880.553696] fbtft_device:  GPIOS used by 'adafruit22a':
[27880.553735] fbtft_device:    'reset' = GPIO272
[27880.553756] fbtft_device:    'led' = GPIO226
[27880.553775] fbtft_device:    'dc' = GPIO245
[27880.553793] fbtft_device:  SPI devices registered:
[27880.553820] fbtft_device:      fb_ili9340 spi32766.0 4800kHz 8 bits mode=0x00
[27880.575688] fb_ili9340: module is from the staging directory, the quality is unknown, you have been warned.
[27880.819789] fb_ili9340 spi32766.0: SPI transfer failed: -22
[27880.819830] spi_master spi32766: failed to transfer one message from queue
[27880.819850] fb_ili9340 spi32766.0: fbtft_update_display: write_vmem failed to update display buffer
[27880.821093] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=33, spi32766.0 at 4 MHz

When I write some picture to the display I got this:

[28727.125092] fb_ili9340 spi32766.0: SPI transfer failed: -22
[28727.125141] spi_master spi32766: failed to transfer one message from queue
[28727.125162] fb_ili9340 spi32766.0: fbtft_update_display: write_vmem failed to update display buffer
[28727.154895] fb_ili9340 spi32766.0: SPI transfer failed: -22
[28727.154937] spi_master spi32766: failed to transfer one message from queue
[28727.154957] fb_ili9340 spi32766.0: fbtft_update_display: write_vmem failed to update display buffer

I haven't done the famous spi_test.c test and I also doesn't have any equipment to debug further. Is there any stupid thing that I am doing wrong or is this simply not done yet? Anyone got further on this?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines