dts: bindings: spi: add support to set CPOL, CPHA, and HOLD_CS in dts file
Add support to set SPI clock polarity (CPOL), clock phase (CPHA), and hold-on-cs in a dts file to get rid of using related macros in spi.c driver since each board may work on a different SPI mode rather than the default one (based on CPOL and CPHA). Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
This commit is contained in:
parent
339cd5a45f
commit
eb2f5ceb19
1 changed files with 18 additions and 0 deletions
|
@ -40,3 +40,21 @@ properties:
|
|||
enum:
|
||||
- 0
|
||||
- 32768
|
||||
spi-cpol:
|
||||
type: boolean
|
||||
description: |
|
||||
SPI clock polarity which indicates the clock idle state.
|
||||
If it is used, the clock idle state is logic high; otherwise, low.
|
||||
spi-cpha:
|
||||
type: boolean
|
||||
description: |
|
||||
SPI clock phase that indicates on which edge data is sampled.
|
||||
If it is used, data is sampled on the second edge; otherwise, on the first edge.
|
||||
spi-hold-cs:
|
||||
type: boolean
|
||||
description: |
|
||||
In some cases, it is necessary for the master to manage SPI chip select
|
||||
under software control, so that multiple spi transactions can be performed
|
||||
without releasing it. A typical use case is variable length SPI packets
|
||||
where the first spi transaction reads the length and the second spi transaction
|
||||
reads length bytes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue