Navigation Menu

Skip to content

Commit

Permalink
drivers: i2c: Add driver for smartbond DA1469x device family
Browse files Browse the repository at this point in the history
This adds the i2c driver for the Renesas SmartBond(tm) MCU family.
It supports blocking transfers and callback transfers.
Currently only supports controller mode.

Co-authored-by: Stan Geitel <stan@geitel.nl>

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
  • Loading branch information
blauret authored and MaureenHelm committed Apr 7, 2023
1 parent d312ce9 commit 6cf3fe1
Show file tree
Hide file tree
Showing 10 changed files with 615 additions and 1 deletion.
18 changes: 17 additions & 1 deletion boards/arm/da1469x_dk_pro/da1469x_dk_pro-pinctrl.dtsi
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Renesas Electronics Corporation
* Copyright (c) 2022 Renesas Electronics Corporation and/or its affiliates
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -15,4 +15,20 @@
bias-pull-up;
};
};

i2c_default: i2c_default {
group1 {
pinmux = <SMARTBOND_PINMUX(I2C_SDA, 0, 31)>,
<SMARTBOND_PINMUX(I2C_SCL, 0, 30)>;
bias-pull-up;
};
};

i2c2_default: i2c2_default {
group1 {
pinmux = <SMARTBOND_PINMUX(I2C2_SDA, 0, 19)>,
<SMARTBOND_PINMUX(I2C2_SCL, 0, 18)>;
bias-pull-up;
};
};
};
11 changes: 11 additions & 0 deletions boards/arm/da1469x_dk_pro/da1469x_dk_pro.dts
Expand Up @@ -138,3 +138,14 @@
&pll {
status = "okay";
};
&i2c {
status = "okay";
pinctrl-0 = <&i2c_default>;
pinctrl-names = "default";
};

&i2c2 {
status = "okay";
pinctrl-0 = <&i2c2_default>;
pinctrl-names = "default";
};
1 change: 1 addition & 0 deletions boards/arm/da1469x_dk_pro/da1469x_dk_pro.yaml
Expand Up @@ -11,3 +11,4 @@ supported:
- arduino_gpio
- gpio
- watchdog
- i2c
3 changes: 3 additions & 0 deletions boards/arm/da1469x_dk_pro/da1469x_dk_pro_defconfig
Expand Up @@ -13,3 +13,6 @@ CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y

CONFIG_BUILD_OUTPUT_HEX=n

CONFIG_I2C=y
CONFIG_I2C_CALLBACK=y
1 change: 1 addition & 0 deletions drivers/i2c/CMakeLists.txt
Expand Up @@ -40,6 +40,7 @@ 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_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)

zephyr_library_sources_ifdef(CONFIG_I2C_STM32_V1
i2c_ll_stm32_v1.c
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/Kconfig
Expand Up @@ -65,6 +65,7 @@ source "drivers/i2c/Kconfig.tca954x"
source "drivers/i2c/Kconfig.gd32"
source "drivers/i2c/Kconfig.andes_atciic100"
source "drivers/i2c/Kconfig.sc18im704"
source "drivers/i2c/Kconfig.smartbond"

config I2C_INIT_PRIORITY
int "Init priority"
Expand Down
9 changes: 9 additions & 0 deletions drivers/i2c/Kconfig.smartbond
@@ -0,0 +1,9 @@
# Copyright (c) 2022 Renesas Electronics Corporation and/or its affiliates
# SPDX-License-Identifier: Apache-2.0

config I2C_SMARTBOND
bool "Renesas SmartBond(tm) I2C driver"
default y
depends on DT_HAS_RENESAS_SMARTBOND_I2C_ENABLED
help
Enable I2C driver for Renesas SmartBond(tm) DA1469x series MCU.

0 comments on commit 6cf3fe1

Please sign in to comment.