Hello,

On 4 June 2016 at 19:26, 'Eckhardt Ulrich' via linux-sunxi
<[email protected]> wrote:
> Hi,
>
> I managed to get the SPI devices /dev/spidev0.0 and /dev/spidev0.1 to be
> visible using the mainline kernel 4.4.11 on my BananaPi R1 (Allwinner A20)
> with the attached patch to spidev.c and the dts. But the SPI device is not
> working. When I send some data for example with echo "test" > /dev/spidev0.0
> I could see some activity on both chip select lines SPI_CS0 and SPI_CS1, but
> no reaction on SPI0_CLK. Is this a bug somewhere or is there additional
> tweaking in the dts required?
>

There is a comment in the SPI driver regarding CS polarity which boils
down to 'changing CS polarity affects all CS lines'. I cannot test
this on the board I am working with since it has only one CS
available.

You can always try to export all the SPI pins as GPIO and change the
level on them using sysfs for testing. Also writing to spidev probably
does not necessarily cause a transfer. SPI transfers are ordinarily
done with an IOCTL. Even if you send a few bytes it might be
challenging to measure the level change unless you are using an
oscilloscope.

Finally, the driver in 4.4.11 is likely broken and will do nothing or
lock up if you send more than 63 bytes at once. Try to modify the
testprogramm to not do that of STFW for a patch that adds support for
arbitrarily long transfers. There are a few floating around.

HTH

Michal

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to