Jump to content

[BananaPro]: Jessie 3.4.112 spi-sun7i Not Loading


tink3r

Recommended Posts

Hello,

 

I am trying to switch from an older wheezy (lemaker) install to a newer Armbian Jessie install, (5.14 Armbian).By using the Legacy Kernel I can load ft5x drivers for the 5" PCAP Screen.

So Far, everything is working normally except much faster and reliable.

 

My Problem is that I can't read the analog voltage from my MCP3002 anymore using spidev python module.

 

I have spidev and spi-sun7i in  /etc/modules

ls /dev/spi*
 
/dev/spidev0.0
/dev/spidev0.1
 
dmesg | grep spi
 
[    1.202344] [spi-inf] Found 2 spi devices in config files
[    1.209170] [spi-inf] boards num modalias         max_spd_hz       bus_num  cs   mode
[    1.212928] [spi-inf] spi_board0 irq gpio not used
[    1.219895] [spi-inf] 0          spidev           12000000         0        0    0x3   
[    1.223651] [spi-inf] spi_board1 irq gpio not used
[    1.230615] [spi-inf] 1          spidev           12000000         0        1    0x3   
[    1.234711] [spi-inf] sun7i_spi_probe: sun7i spi probe
[    1.239335] [spi-inf] sun7i_spi_probe: spi0 dma type: normal
[    1.242909] [spi-inf] bus num = 0, spi used = 3
[    1.247368] [spi-inf] sun7i_spi_probe: spi0 cs bitmap: 0x3
[    1.255945] [spi-inf] sun7i_spi_set_mclk: spi0 source = sdram_pll_p, src_clk = 432000000, mclk 86400000
[    1.261869] sun7i-spi sun7i-spi.0: master is unqueued, this is deprecated
[    1.268004] [spi-inf] sun7i_spi_setup: enter, bpw: 8, mshz: 12000000, mode: 3
[    1.274193] [spi-inf] sun7i_spi_setup: enter, bpw: 8, mshz: 12000000, mode: 3
[    1.282984] [spi-inf] sun7i_spi_probe: reuuimlla's SoC SPI Driver loaded for Bus SPI0 with 2 Slaves at most
[    1.292384] [spi-inf] sun7i_spi_probe: spi0 driver probe succeed, base f051c000, irq 42, dma_id_rx 24, dma_id_tx 24

If I try to use wiringPI:

gpio load spi
 
gpio: Unable to load spi-sun7i

I've simplified my mcp3002 code to reproduce the error.

import spidev
s = spidev.SpiDev(0,0)
s.max_speed_hz = 12000000
reply = s.xfer2([160, 0])
 
-------~>
 
    reply = s.xfer2([160, 0])
IOError: [Errno 22] Invalid argument

However, the Exact same hardware Config on wheezy (3.4.103+) results in:

import spidev
 
s = spidev.SpiDev(0,0)
s.max_speed_hz = 12000000
reply = s.xfer2([160, 0])
 
[0, 2]

Anyone have an idea about why I keep getting the Invalid Argument? On the wheezy build, 3.4.103+ this code is functioning.

Link to comment
Share on other sites

SPI is build in and it's working (to some degree, apparently). I forgot details, but as far as I remember, there were two patches around so I guess the easiest way would be to rebuild a kernel with that other patch, not with our default one

 

Both things (display, SPI) might also be achievable with some tweaking on Vanilla kernel ...

Link to comment
Share on other sites

Thanks Igor, I had a similar feeling. If you can remember the other patch let me know. I'm hunting for it now.

 

I will definitely try again on Vanilla Kernel, I am switching hardware soon in the next version of my project, and want to start with a different pcap display anyway.

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