Skip to content

Commit 4f63592

Browse files
le-quang168kartben
authored andcommitted
drivers: spi: Initial support for RZ/G3S
Add SPI driver support for Renesas RZ/G3S Signed-off-by: Quang Le <[email protected]> Signed-off-by: Binh Nguyen <[email protected]>
1 parent c0a4234 commit 4f63592

File tree

7 files changed

+878
-0
lines changed

7 files changed

+878
-0
lines changed

drivers/spi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ zephyr_library_sources_ifdef(CONFIG_SPI_PSOC6 spi_psoc6.c)
4949
zephyr_library_sources_ifdef(CONFIG_SPI_PW spi_pw.c)
5050
zephyr_library_sources_ifdef(CONFIG_SPI_RENESAS_RA spi_renesas_ra.c)
5151
zephyr_library_sources_ifdef(CONFIG_SPI_RENESAS_RA8 spi_b_renesas_ra8.c)
52+
zephyr_library_sources_ifdef(CONFIG_SPI_RENESAS_RZ_RSPI spi_renesas_rz_rspi.c)
5253
zephyr_library_sources_ifdef(CONFIG_SPI_RPI_PICO_PIO spi_rpi_pico_pio.c)
5354
zephyr_library_sources_ifdef(CONFIG_SPI_RV32M1_LPSPI spi_rv32m1_lpspi.c)
5455
zephyr_library_sources_ifdef(CONFIG_SPI_SAM spi_sam.c)

drivers/spi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ source "drivers/spi/Kconfig.psoc6"
126126
source "drivers/spi/Kconfig.pw"
127127
source "drivers/spi/Kconfig.renesas_ra"
128128
source "drivers/spi/Kconfig.renesas_ra8"
129+
source "drivers/spi/Kconfig.renesas_rz"
129130
source "drivers/spi/Kconfig.rpi_pico"
130131
source "drivers/spi/Kconfig.rv32m1_lpspi"
131132
source "drivers/spi/Kconfig.sam"

drivers/spi/Kconfig.renesas_rz

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SPI_RENESAS_RZ_RSPI
5+
bool "Renesas RZ RSPI SPI"
6+
default y
7+
depends on DT_HAS_RENESAS_RZ_RSPI_ENABLED
8+
select USE_RZ_FSP_RSPI_SPI
9+
select PINCTRL
10+
help
11+
Enable Renesas RZ RSPI SPI Driver.
12+
13+
if SPI_RENESAS_RZ_RSPI
14+
15+
config SPI_RENESAS_RZ_RSPI_INTERRUPT
16+
bool "RZ RSPI Interrupt Support"
17+
help
18+
Enable Interrupt support for the RSPI.
19+
20+
config SPI_RENESAS_RZ_RSPI_DMAC
21+
bool "RZ SPI DMA Support"
22+
select USE_RZ_FSP_DMA
23+
help
24+
Enable the SPI DMA mode for SPI instances
25+
26+
if SPI_RTIO
27+
config SPI_RTIO_SQ_SIZE
28+
int "Number of available submission queue entries"
29+
default 8 # Sensible default that covers most common spi transactions
30+
help
31+
When RTIO is use with SPI each driver holds a context with which blocking
32+
API calls use to perform SPI transactions. This queue needs to be as deep
33+
as the longest set of spi_buf_sets used, where normal SPI operations are
34+
used (equal length buffers). It may need to be slightly deeper where the
35+
spi buffer sets for transmit/receive are not always matched equally in
36+
length as these are transformed into normal transceives.
37+
38+
config SPI_RTIO_CQ_SIZE
39+
int "Number of available completion queue entries"
40+
default 8 # Sensible default that covers most common spi transactions
41+
42+
endif # SPI_RTIO
43+
44+
endif # SPI_RENESAS_RZ_RSPI

0 commit comments

Comments
 (0)