diff options
author | Tom Rini <trini@konsulko.com> | 2020-04-16 08:56:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-16 08:56:37 -0400 |
commit | dba0a6ae1907bbff3ebda06e4874d006f10db1bb (patch) | |
tree | 61d65db08c42dcf0d64d8c084c026d52c9beb3af /include/spi.h | |
parent | 66b8669d7709cecedf2e0403bb17b48bab86f644 (diff) | |
parent | 1f4431e46120ef913fc9f83c78a734d910d00b3f (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Provide serial base clock speed via getinfo() for ACPI SPCR
- Initial ACPI support from DM core by leveraging existing ACPI support
in x86
Diffstat (limited to 'include/spi.h')
-rw-r--r-- | include/spi.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/spi.h b/include/spi.h index 852f570eaa..2b4929fc79 100644 --- a/include/spi.h +++ b/include/spi.h @@ -67,6 +67,39 @@ struct dm_spi_slave_platdata { #endif /* CONFIG_DM_SPI */ /** + * enum spi_clock_phase - indicates the clock phase to use for SPI (CPHA) + * + * @SPI_CLOCK_PHASE_FIRST: Data sampled on the first phase + * @SPI_CLOCK_PHASE_SECOND: Data sampled on the second phase + */ +enum spi_clock_phase { + SPI_CLOCK_PHASE_FIRST, + SPI_CLOCK_PHASE_SECOND, +}; + +/** + * enum spi_wire_mode - indicates the number of wires used for SPI + * + * @SPI_4_WIRE_MODE: Normal bidirectional mode with MOSI and MISO + * @SPI_3_WIRE_MODE: Unidirectional version with a single data line SISO + */ +enum spi_wire_mode { + SPI_4_WIRE_MODE, + SPI_3_WIRE_MODE, +}; + +/** + * enum spi_polarity - indicates the polarity of the SPI bus (CPOL) + * + * @SPI_POLARITY_LOW: Clock is low in idle state + * @SPI_POLARITY_HIGH: Clock is high in idle state + */ +enum spi_polarity { + SPI_POLARITY_LOW, + SPI_POLARITY_HIGH, +}; + +/** * struct spi_slave - Representation of a SPI slave * * For driver model this is the per-child data used by the SPI bus. It can |