Skip to content

Commit

Permalink
drivers: i2c: Add Infineon CAT1 i2c driver
Browse files Browse the repository at this point in the history
 - Add initial version of Infineon CAT1 i2c driver.
 - Add initial version of binding file for Infineon
   CAT1 I2C driver

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
  • Loading branch information
sreeramIfx authored and carlescufi committed Apr 20, 2023
1 parent 1b2942f commit 185aa1c
Show file tree
Hide file tree
Showing 9 changed files with 716 additions and 1 deletion.
7 changes: 7 additions & 0 deletions boards/arm/cy8cproto_062_4343w/cy8cproto_062_4343w.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

aliases {
uart-5 = &uart5;
i2c-0 = &i2c3;
};

chosen {
Expand Down Expand Up @@ -91,3 +92,9 @@
&clk_peri {
clock-div = <1>;
};

&i2c3 {
/* I2C pins */
pinctrl-0 = <&p6_0_scb3_i2c_scl &p6_1_scb3_i2c_sda>;
pinctrl-names = "default";
};
1 change: 1 addition & 0 deletions boards/arm/cy8cproto_062_4343w/cy8cproto_062_4343w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ toolchain:
supported:
- gpio
- uart
- i2c
1 change: 1 addition & 0 deletions drivers/i2c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ zephyr_library_sources_ifdef(CONFIG_I2C_RCAR i2c_rcar.c)
zephyr_library_sources_ifdef(CONFIG_I2C_TCA954X i2c_tca954x.c)
zephyr_library_sources_ifdef(CONFIG_I2C_XEC_V2 i2c_mchp_xec_v2.c)
zephyr_library_sources_ifdef(CONFIG_I2C_GD32 i2c_gd32.c)
zephyr_library_sources_ifdef(CONFIG_I2C_INFINEON_CAT1 i2c_ifx_cat1.c)
zephyr_library_sources_ifdef(CONFIG_I2C_ANDES_ATCIIC100 i2c_andes_atciic100.c)
zephyr_library_sources_ifdef(CONFIG_I2C_SC18IM704 i2c_sc18im704.c)
zephyr_library_sources_ifdef(CONFIG_I2C_SMARTBOND i2c_smartbond.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ source "drivers/i2c/Kconfig.test"
source "drivers/i2c/Kconfig.rcar"
source "drivers/i2c/Kconfig.tca954x"
source "drivers/i2c/Kconfig.gd32"
source "drivers/i2c/Kconfig.ifx_cat1"
source "drivers/i2c/Kconfig.andes_atciic100"
source "drivers/i2c/Kconfig.sc18im704"
source "drivers/i2c/Kconfig.smartbond"
Expand Down
29 changes: 29 additions & 0 deletions drivers/i2c/Kconfig.ifx_cat1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Infineon CAT1 I2C configuration options

# Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or
# an affiliate of Cypress Semiconductor Corporation
#
# SPDX-License-Identifier: Apache-2.0

config I2C_INFINEON_CAT1
bool "Infineon CAT1 I2C driver"
default y
depends on DT_HAS_INFINEON_CAT1_I2C_ENABLED
select USE_INFINEON_I2C
help
This option enables the I2C driver for Infineon CAT1 family.

config I2C_INFINEON_CAT1_TARGET_BUF
int "I2C Target data buffer length"
depends on I2C_INFINEON_CAT1
range 1 1024
default 64
help
Buffer to receive data as an I2C Target.

config I2C_INFINEON_CAT1_ASYNC
bool "Support Asynchronous I2C driver"
default y
depends on I2C_INFINEON_CAT1
help
Configure the I2C driver to be non-blocking/Asynchronous mode.
Loading

0 comments on commit 185aa1c

Please sign in to comment.