Skip to content

Commit 6cf3fe1

Browse files
blauretMaureenHelm
authored andcommitted
drivers: i2c: Add driver for smartbond DA1469x device family
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>
1 parent d312ce9 commit 6cf3fe1

File tree

10 files changed

+615
-1
lines changed

10 files changed

+615
-1
lines changed

boards/arm/da1469x_dk_pro/da1469x_dk_pro-pinctrl.dtsi

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Renesas Electronics Corporation
2+
* Copyright (c) 2022 Renesas Electronics Corporation and/or its affiliates
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -15,4 +15,20 @@
1515
bias-pull-up;
1616
};
1717
};
18+
19+
i2c_default: i2c_default {
20+
group1 {
21+
pinmux = <SMARTBOND_PINMUX(I2C_SDA, 0, 31)>,
22+
<SMARTBOND_PINMUX(I2C_SCL, 0, 30)>;
23+
bias-pull-up;
24+
};
25+
};
26+
27+
i2c2_default: i2c2_default {
28+
group1 {
29+
pinmux = <SMARTBOND_PINMUX(I2C2_SDA, 0, 19)>,
30+
<SMARTBOND_PINMUX(I2C2_SCL, 0, 18)>;
31+
bias-pull-up;
32+
};
33+
};
1834
};

boards/arm/da1469x_dk_pro/da1469x_dk_pro.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,14 @@
138138
&pll {
139139
status = "okay";
140140
};
141+
&i2c {
142+
status = "okay";
143+
pinctrl-0 = <&i2c_default>;
144+
pinctrl-names = "default";
145+
};
146+
147+
&i2c2 {
148+
status = "okay";
149+
pinctrl-0 = <&i2c2_default>;
150+
pinctrl-names = "default";
151+
};

boards/arm/da1469x_dk_pro/da1469x_dk_pro.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ supported:
1111
- arduino_gpio
1212
- gpio
1313
- watchdog
14+
- i2c

boards/arm/da1469x_dk_pro/da1469x_dk_pro_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ CONFIG_UART_CONSOLE=y
1313
CONFIG_SERIAL=y
1414

1515
CONFIG_BUILD_OUTPUT_HEX=n
16+
17+
CONFIG_I2C=y
18+
CONFIG_I2C_CALLBACK=y

drivers/i2c/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ zephyr_library_sources_ifdef(CONFIG_I2C_XEC_V2 i2c_mchp_xec_v2.c)
4040
zephyr_library_sources_ifdef(CONFIG_I2C_GD32 i2c_gd32.c)
4141
zephyr_library_sources_ifdef(CONFIG_I2C_ANDES_ATCIIC100 i2c_andes_atciic100.c)
4242
zephyr_library_sources_ifdef(CONFIG_I2C_SC18IM704 i2c_sc18im704.c)
43+
zephyr_library_sources_ifdef(CONFIG_I2C_SMARTBOND i2c_smartbond.c)
4344

4445
zephyr_library_sources_ifdef(CONFIG_I2C_STM32_V1
4546
i2c_ll_stm32_v1.c

drivers/i2c/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ source "drivers/i2c/Kconfig.tca954x"
6565
source "drivers/i2c/Kconfig.gd32"
6666
source "drivers/i2c/Kconfig.andes_atciic100"
6767
source "drivers/i2c/Kconfig.sc18im704"
68+
source "drivers/i2c/Kconfig.smartbond"
6869

6970
config I2C_INIT_PRIORITY
7071
int "Init priority"

drivers/i2c/Kconfig.smartbond

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2022 Renesas Electronics Corporation and/or its affiliates
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config I2C_SMARTBOND
5+
bool "Renesas SmartBond(tm) I2C driver"
6+
default y
7+
depends on DT_HAS_RENESAS_SMARTBOND_I2C_ENABLED
8+
help
9+
Enable I2C driver for Renesas SmartBond(tm) DA1469x series MCU.

0 commit comments

Comments
 (0)