Skip to content

Commit 10ba888

Browse files
ExaltZephyrkartben
authored andcommitted
drivers: i3c: Support I3C driver for STM32.
This commit introduces support for the I3C driver on STM32, enabling functionality APIs for I3C controllers. Signed-off-by: Mohammad Badawi <[email protected]> Signed-off-by: Sara Touqan <[email protected]>
1 parent 3b33aa5 commit 10ba888

File tree

4 files changed

+2213
-0
lines changed

4 files changed

+2213
-0
lines changed

drivers/i3c/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ zephyr_library_sources_ifdef(
4141
i3c_npcx.c
4242
)
4343

44+
zephyr_library_sources_ifdef(
45+
CONFIG_I3C_STM32
46+
i3c_stm32.c
47+
)
48+
4449
zephyr_library_sources_ifdef(
4550
CONFIG_I3C_TEST
4651
i3c_test.c

drivers/i3c/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,6 @@ rsource "Kconfig.nxp"
123123
rsource "Kconfig.cdns"
124124
rsource "Kconfig.npcx"
125125
rsource "Kconfig.test"
126+
rsource "Kconfig.stm32"
126127

127128
endif # I3C

drivers/i3c/Kconfig.stm32

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2024 EXALT Technologies.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
module = I3C_STM32
6+
module-str = i3c_stm32
7+
8+
source "subsys/logging/Kconfig.template.log_config"
9+
config I3C_STM32
10+
bool "STM32 I3C driver support"
11+
depends on DT_HAS_ST_STM32_I3C_ENABLED
12+
select I3C_IBI_WORKQUEUE if I3C_USE_IBI
13+
default y
14+
help
15+
Enable support for I3C on STM32 microcontrollers.
16+
17+
if I3C_STM32
18+
19+
config I3C_STM32_DMA
20+
bool "STM32 I3C DMA driver support"
21+
select DMA
22+
help
23+
Enables support for I3C DMA mode on STM32 microcontrollers.
24+
25+
config I3C_STM32_DMA_FIFO_HEAP_SIZE
26+
int "Status FIFO and control FIFO heap"
27+
depends on I3C_STM32_DMA
28+
default 2048
29+
help
30+
Configures the heap size for dynamically allocating the regions for
31+
storing status FIFO and control FIFO words which will be used by the DMA.
32+
This value depends on the maximum number of messages that will be sent
33+
during a single transfer. 2KB guarantees enough heap size for sending 256
34+
messages on a single transfer.
35+
36+
endif # I3C_STM32

0 commit comments

Comments
 (0)