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

FBtft on slackware / error spi-bcm2708 #145

Closed maxy04 closed 9 years ago

maxy04 commented 10 years ago

I have a raspberry with slackware 14.1 and adafruit 2.8 resistive. i'm trying to make it work, but i'm still having white screen. with raspbian it works, but in slackware using the notro firmware with rpi-update it doesn't work. there is fb1, but if i put data on it, it still remain white. i notice that dmesg tells "spi-bcm2708 "setup: invalid bits_per_word 9 (must be 8)". i see that is in spi-bcm2708.c. there is a way to solve it?

notro commented 10 years ago

How do you load the driver (fbtft_device)?

maxy04 commented 10 years ago

i used your firmware https://github.com/notro/rpi-firmware BRANCH=builtin and https://github.com/notro/rpi-firmware and i tried to load all driver manually with modprobe.

but with the kernel with inner driver i see

bcm2708_spi bcm2708_spi.0: DMA channel 2 at address 0xf2007200 with irq 77 [ 1.488638] bcm2708_spi bcm2708_spi.0: DMA channel 4 at address 0xf2007400 with irq 20 [ 1.503937] fb_hx8340bn spi0.0: setup: invalid bits_per_word 9 (must be 8) [ 1.517699] fb_hx8340bn spi0.0: 9-bit SPI not available, emulating using 8-bit. [ 1.960002] graphics fb1: fb_hx8340bn frame buffer, 176x220, 75 KiB video memory, 16 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz [ 1.998901] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80) [ 2.020205] bcm2708_spi bcm2708_spi.0: SPI Controller running in dma mode

i see /dev/fb1, but can't use it and screen still remain white.

UPDATE i red http://raspberrypi.znix.com/hipidocs/topic_spidev.htm

i noticed that there are no dev/spidev0.* devices both on my slackware and on raspbian. what devices must be present?

UPDATE 2: lsmod give me no spi_2708 driver loaded.

maxy04 commented 10 years ago

Recompiled the kernel (3.12.26). now i see /dev/spidev but screen still not working. fb1 don't exists

dmesg tells [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1814 bcm2708_fb.fbheight=974 bcm2708.boardrev=0xd bcm2708.s$ dwc_otg.lpm_enable=0 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait ro fbtft_device name=adafruit22

[ 0.032649] bcm2708.uart_clock = 0

[ 0.535884] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3

[ 0.580581] bcm2708_dma: DMA manager at f2007000 [ 0.580722] bcm2708_gpio: bcm2708_gpio_probe c0645f90

[ 0.767730] BCM2708FB: allocated DMA memory 5ec00000 [ 0.767837] BCM2708FB: allocated DMA channel 0 @ f2007000 [ 0.805266] bcm2708_fb_pan_display(0,0) returns=0 [ 0.820564] Console: switching to colour frame buffer device 226x60 [ 0.838605] bcm2708_fb_pan_display(0,0) returns=0 [ 0.853513] uart-pl011 dev:f1: no DMA platform data

[ 0.872976] bcm2708_spi bcm2708_spi.0: master is unqueued, this is deprecated [ 0.874162] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)

[ 1.276660] WARN::dwc_otg_hcd_init:1042: FIQ DMA bounce buffers: virt = 0xdec14000 dma = 0x5ec14000 len=9024

[ 1.377617] bcm2708_i2c_init_pinmode(1,2) [ 1.381804] bcm2708_i2c_init_pinmode(1,3) [ 1.386697] bcm2708_i2c bcm2708_i2c.1: BSC1 Controller at 0x20804000 (irq 79) (baudrate 100000)

[ 5.911519] pcm512x 1-004c: Failed to reset device: -5 [ 5.928817] bcm2708-i2s bcm2708-i2s.0: Failed to create debugfs directory [ 5.941722] pcm512x: probe of 1-004c failed with error -5

i copied /boot and /lib/modules from raspbian to slack, but nothing happens after modprobe fbtft_device

[ 461.425572] fbtft_device: SPI devices registered: [ 461.425615] fbtft_device: 'fb' Platform devices registered: [ 461.425644] fbtft_device: bcm2708_fb id=-1 pdata? no [ 461.425676] fbtft_device: I2C devices registered: [ 461.425692] fbtft_device: i2c-0 addr 48896 IRQ 0 [ 461.425705] fbtft_device: i2c-1 addr 48896 IRQ 1 [ 461.425959] fbtft_device: GPIOS used by 'adafruit22': [ 461.425979] fbtft_device: 'reset' = GPIO25 [ 461.425991] fbtft_device: 'led' = GPIO23 [ 461.425999] fbtft_device: SPI devices registered: [ 461.426017] fbtft_device: fb_hx8340bn spi0.0 16000kHz 8 bits mode=0x00

but no fb1

notro commented 10 years ago

but nothing happens after modprobe fbtft_device

The device is registered:

[ 461.426017] fbtft_device: fb_hx8340bn spi0.0 16000kHz 8 bits mode=0x00

But the driver seem to be missing (not initialized at least). Did you build the driver as a loadable module? If so try: modprobe fb_hx8340bn

maxy04 commented 10 years ago

i built driver in kernel. i also tried to modprobe the 8340.

notro commented 10 years ago

Reading your reports a bit more closely, tells me you are probably using the Adafruit fork of FBTFT:

[ 461.425676] fbtft_device: I2C devices registered:
[ 461.425692] fbtft_device: i2c-0 addr 48896 IRQ 0
[ 461.425705] fbtft_device: i2c-1 addr 48896 IRQ 1

They have their own fbtft_device name for the display.

Regular fbtft_device uses pitft as the name for the resistive 2.8.

maxy04 commented 10 years ago

It worked! I'll make a donation, for your patience!

now, this is my recipe for "raw linux" users:

now i will try to put all drivers into kernel.

notro commented 10 years ago

Glad you're making progress :-)

notro commented 9 years ago

Closing issue since there has been no activity for more than 2 months. Reopen if needed.