Skip to content

Commit 8e46d26

Browse files
khoa-nguyen-18nashif
authored andcommitted
drivers: i2c: Add config I2C for EK-RA8D1 and MCK-RA8T1
Add config support I2C for EK-RA8D1 and MCK-RA8T1. Signed-off-by: Khoa Nguyen <[email protected]>
1 parent c893873 commit 8e46d26

File tree

10 files changed

+68
-0
lines changed

10 files changed

+68
-0
lines changed

boards/renesas/ek_ra8d1/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ The below features are currently supported on Zephyr OS for EK-RA8D1 board:
110110
+--------------+------------+------------------+
111111
| CAN | on-chip | canfd |
112112
+--------------+------------+------------------+
113+
| I2C | on-chip | i2c |
114+
+--------------+------------+------------------+
113115

114116
Other hardware features are currently not supported by the port.
115117

boards/renesas/ek_ra8d1/ek_ra8d1-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@
4545
drive-strength = "high";
4646
};
4747
};
48+
49+
iic1_default: iic1_default {
50+
group1 {
51+
/* SCL1 SDA1*/
52+
psels = <RA_PSEL(RA_PSEL_I2C, 5, 12)>,<RA_PSEL(RA_PSEL_I2C, 5, 11)>;
53+
drive-strength = "medium";
54+
};
55+
};
4856
};

boards/renesas/ek_ra8d1/ek_ra8d1.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,11 @@
152152
status = "okay";
153153
};
154154
};
155+
156+
&iic1 {
157+
#address-cells = <1>;
158+
#size-cells = <0>;
159+
clock-frequency = <DT_FREQ_M(1)>;
160+
pinctrl-0 = <&iic1_default>;
161+
pinctrl-names = "default";
162+
};

boards/renesas/mck_ra8t1/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ The below features are currently supported on Zephyr OS for MCB-RA8T1 board:
108108
+--------------+------------+----------------------+
109109
| CAN | on-chip | canfd |
110110
+--------------+------------+----------------------+
111+
| I2C | on-chip | i2c |
112+
+--------------+------------+----------------------+
111113

112114
Other hardware features are currently not supported by the port.
113115

boards/renesas/mck_ra8t1/mck_ra8t1-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@
4545
drive-strength = "high";
4646
};
4747
};
48+
49+
iic1_default: iic1_default {
50+
group1 {
51+
/* SCL1 SDA1*/
52+
psels = <RA_PSEL(RA_PSEL_I2C, 2, 5)>,<RA_PSEL(RA_PSEL_I2C, 2, 6)>;
53+
drive-strength = "medium";
54+
};
55+
};
4856
};

boards/renesas/mck_ra8t1/mck_ra8t1.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,11 @@
145145
status = "okay";
146146
};
147147
};
148+
149+
&iic1 {
150+
#address-cells = <1>;
151+
#size-cells = <0>;
152+
clock-frequency = <DT_FREQ_M(1)>;
153+
pinctrl-0 = <&iic1_default>;
154+
pinctrl-names = "default";
155+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_SENSOR_GY271_QMC=y
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
aliases {
8+
i2c-0 = &iic1;
9+
gy271 = &iic1;
10+
};
11+
};
12+
13+
&iic1 {
14+
status = "okay";
15+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_SENSOR_GY271_QMC=y
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
aliases {
8+
i2c-0 = &iic1;
9+
gy271 = &iic1;
10+
};
11+
};
12+
13+
&iic1 {
14+
status = "okay";
15+
};

0 commit comments

Comments
 (0)