Skip to content

Commit e4791a3

Browse files
committed
drivers: spi: it51xxx: fifo mode support
This commit adds shared/group fifo mode support. Tested with: samples/drivers/spi_flash Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
1 parent 4852719 commit e4791a3

File tree

2 files changed

+414
-6
lines changed

2 files changed

+414
-6
lines changed

drivers/spi/Kconfig.it51xxx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,31 @@ config SPI_ITE_IT51XXX
88
select PINCTRL
99
help
1010
Enable support for the ITE IT51XXX SPI host (SSPI) driver.
11+
12+
if SPI_ITE_IT51XXX
13+
14+
config SPI_ITE_IT51XXX_FIFO_MODE
15+
bool "ITE IT51XXX Shared/Group FIFO Mode Support"
16+
select SOC_IT51XXX_CPU_IDLE_GATING
17+
default y
18+
help
19+
Enable ITE IT51XXX shared and group FIFO mode. Due to hardware
20+
limitations, FIFO mode is only supported under the following
21+
conditions: (1) SPI mode 0 (CPOL = 0, CPHA = 0) (2) chip select
22+
0 is used (3) the number of bytes in both TX and RX transactions
23+
is even and less than SPI_ITE_IT51XXX_FIFO_SIZE (the FIFO size
24+
setting) (4) the clock source is set to the PLL frequency for
25+
group fifo mode. If the transaction doesn't meet these
26+
requirements, the driver automatically switches to PIO mode for
27+
the transfer.
28+
29+
config SPI_ITE_IT51XXX_FIFO_SIZE
30+
int "ITE IT51XXX Shared/Group FIFO Size"
31+
depends on SPI_ITE_IT51XXX_FIFO_MODE
32+
range 2 2046
33+
default 128
34+
help
35+
Set IT51XXX FIFO size. The maximum settable value, as per the
36+
hardware design, is 2046.
37+
38+
endif # SPI_ITE_IT51XXX

0 commit comments

Comments
 (0)