]> Pileus Git - ~andy/linux/commitdiff
Blackfin: document SPI CS limitations with CPHA=0
authorMichael Hennerich <michael.hennerich@analog.com>
Tue, 6 Jul 2010 13:57:12 +0000 (13:57 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 6 Aug 2010 16:55:52 +0000 (12:55 -0400)
With the Blackfin on-chip SPI peripheral, there is some logic tied to
the CPHA bit whether the Slave Select Line is controlled by hardware
(CPHA=0) or controlled by software (CPHA=1).  However, the Linux SPI
bus driver assumes that the Slave Select being asserted during the
entire SPI transfer.  So explain these small details for people who
need certain SPI modes with standard CS behavior.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Documentation/blackfin/00-INDEX
Documentation/blackfin/bfin-spi-notes.txt [new file with mode: 0644]

index 10391d3e9b56e6c5d29d54869223baa6bbb5e78b..2df0365f2dff0ec2a02fd35025f0565ae31648fa 100644 (file)
@@ -1,5 +1,8 @@
 00-INDEX
        - This file
 
-bfin-gpio-note.txt
+bfin-gpio-notes.txt
        - Notes in developing/using bfin-gpio driver.
+
+bfin-spi-notes.txt
+       - Notes for using bfin spi bus driver.
diff --git a/Documentation/blackfin/bfin-spi-notes.txt b/Documentation/blackfin/bfin-spi-notes.txt
new file mode 100644 (file)
index 0000000..556fa87
--- /dev/null
@@ -0,0 +1,14 @@
+SPI Chip Select behavior:
+
+With the Blackfin on-chip SPI peripheral, there is some logic tied to the CPHA
+bit whether the Slave Select Line is controlled by hardware (CPHA=0) or
+controlled by software (CPHA=1). However, the Linux SPI bus driver assumes that
+the Slave Select is always under software control and being asserted during
+the entire SPI transfer. - And not just bits_per_word duration.
+
+In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this
+behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2
+timing, you can utilize the GPIO controlled SPI Slave Select option instead.
+
+You can even use the same pin whose peripheral role is a SSEL,
+but use it as a GPIO instead.