Skip to content

Commit 30d51f9

Browse files
committed
drivers: add I2C mspm0 driver
Includes driver and dts binding changes for I2C support Signed-off-by: Dylan Philpot <[email protected]>
1 parent f149118 commit 30d51f9

File tree

6 files changed

+933
-0
lines changed

6 files changed

+933
-0
lines changed

drivers/i2c/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ zephyr_library_sources_ifdef(CONFIG_I2C_LPC11U6X i2c_lpc11u6x.c)
4646
zephyr_library_sources_ifdef(CONFIG_I2C_MCHP_MSS i2c_mchp_mss.c)
4747
zephyr_library_sources_ifdef(CONFIG_I2C_MCUX i2c_mcux.c)
4848
zephyr_library_sources_ifdef(CONFIG_I2C_MCUX_FLEXCOMM i2c_mcux_flexcomm.c)
49+
zephyr_library_sources_ifdef(CONFIG_I2C_MSPM0 i2c_mspm0.c)
4950
zephyr_library_sources_ifdef(CONFIG_I2C_NIOS2 i2c_nios2.c)
5051
zephyr_library_sources_ifdef(CONFIG_I2C_NPCX i2c_npcx_controller.c)
5152
zephyr_library_sources_ifdef(CONFIG_I2C_NPCX i2c_npcx_port.c)

drivers/i2c/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ source "drivers/i2c/Kconfig.lpc11u6x"
139139
source "drivers/i2c/Kconfig.max32"
140140
source "drivers/i2c/Kconfig.mchp_mss"
141141
source "drivers/i2c/Kconfig.mcux"
142+
source "drivers/i2c/Kconfig.mspm0"
142143
source "drivers/i2c/Kconfig.npcx"
143144
source "drivers/i2c/Kconfig.nrfx"
144145
source "drivers/i2c/Kconfig.numaker"

drivers/i2c/Kconfig.mspm0

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright (c) 2024 Texas Instruments
3+
4+
config I2C_MSPM0
5+
bool "MSPM0 I2C driver"
6+
default y
7+
depends on DT_HAS_TI_MSPM0_I2C_ENABLED
8+
select USE_MSPM0_DL_I2C
9+
select PINCTRL
10+
help
11+
This option enables the TI MSPM0 I2C driver.
12+
13+
config I2C_SCL_LOW_TIMEOUT
14+
int "I2C SCL Timeout"
15+
default 0
16+
help
17+
Timeout in milliseconds that reflects acceptable
18+
cumulative low period in a transaction.
19+
0 means that the driver will use the K_FOREVER value,
20+
waiting as long as necessary.
21+
22+
config I2C_MSPM0_ALTERNATE_TARGET_ADDRESS
23+
int "I2C Target Alternate Address"
24+
default 0
25+
help
26+
Configures a 7-bit alternate address that a target will also respond to.
27+
0 means that the target will only respond to its primary address.
28+
29+
config I2C_MSPM0_ALTERNATE_TARGET_ADDRESS_MASK
30+
int "I2C Target Alternate Address Mask"
31+
default 0
32+
help
33+
Configures a 7-bit alternate address mask where a bit value of 1 will
34+
cause a corresponding incoming address bit to match regardless of the
35+
value set for the alternate address. This makes the bit for the target
36+
address a don't care.

0 commit comments

Comments
 (0)