Skip to content

Commit 3322c7b

Browse files
mhennerichvapier
authored andcommitted
Blackfin: document SPI CS limitations with CPHA=0
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>
1 parent 58b0e22 commit 3322c7b

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎Documentation/blackfin/00-INDEX‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
00-INDEX
22
- This file
33

4-
bfin-gpio-note.txt
4+
bfin-gpio-notes.txt
55
- Notes in developing/using bfin-gpio driver.
6+
7+
bfin-spi-notes.txt
8+
- Notes for using bfin spi bus driver.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
SPI Chip Select behavior:
2+
3+
With the Blackfin on-chip SPI peripheral, there is some logic tied to the CPHA
4+
bit whether the Slave Select Line is controlled by hardware (CPHA=0) or
5+
controlled by software (CPHA=1). However, the Linux SPI bus driver assumes that
6+
the Slave Select is always under software control and being asserted during
7+
the entire SPI transfer. - And not just bits_per_word duration.
8+
9+
In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this
10+
behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2
11+
timing, you can utilize the GPIO controlled SPI Slave Select option instead.
12+
13+
You can even use the same pin whose peripheral role is a SSEL,
14+
but use it as a GPIO instead.

0 commit comments

Comments
 (0)