Igor Posted June 16, 2015 Posted June 16, 2015 I am having the exact same hw configuration as described here. 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?
Evgeniy Posted September 21, 2015 Posted September 21, 2015 Have same problem on kernel 4.2 maybe this help http://www.spinics.net/lists/linux-spi/msg04822.html
Ivan Voronov Posted October 28, 2015 Posted October 28, 2015 Dear Colleagues, Do you have any update or patch on the "SPI transfer failed: -22" issue? We are working on 4.2.1 and have the same issue. Thank you in advance!
zador.blood.stained Posted October 30, 2015 Posted October 30, 2015 -22 is -EINVAL error. One of possible reasons may be transfer size limitation here: https://github.com/torvalds/linux/blob/master/drivers/spi/spi-sun4i.c#L178 This patch removes this limit http://lists.infradead.org/pipermail/linux-arm-kernel/2015-August/363074.html but I don't have proper hardware to test it. 1
ChrisArena52 Posted June 24, 2016 Posted June 24, 2016 So did the limit removal patch fix it? Is that patch incorporated into anything?
Recommended Posts