Skip to content

Commit 8e18d23

Browse files
khoa-nguyen-18kartben
authored andcommitted
boards: renesas: Add I2C support for Renesas RA4, RA2 boards
Add I2C support for: ek_ra4w1, ek_ra4m2, ek_ra4m3, ek_ra2a1 Signed-off-by: Tri Nguyen <[email protected]> Signed-off-by: Khoa Nguyen <[email protected]>
1 parent b40307d commit 8e18d23

File tree

12 files changed

+88
-0
lines changed

12 files changed

+88
-0
lines changed

boards/renesas/ek_ra2a1/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ hardware features:
8686
+-----------+------------+-------------------------------+
8787
| ENTROPY | on-chip | entropy |
8888
+-----------+------------+-------------------------------+
89+
| I2C | on-chip | i2c |
90+
+-----------+------------+-------------------------------+
8991

9092
The default configuration can be found in
9193
:zephyr_file:`boards/renesas/ek_ra2a1/ek_ra2a1_defconfig`

boards/renesas/ek_ra2a1/ek_ra2a1-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,13 @@
3434
<RA_PSEL(RA_PSEL_GPT1, 4, 7)>;
3535
};
3636
};
37+
38+
iic0_default: iic0_default {
39+
group1 {
40+
/* SCL0 SDA0 */
41+
psels = <RA_PSEL(RA_PSEL_I2C, 0, 0)>,
42+
<RA_PSEL(RA_PSEL_I2C, 4, 1)>;
43+
drive-strength = "medium";
44+
};
45+
};
3746
};

boards/renesas/ek_ra2a1/ek_ra2a1.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,14 @@
9898
&trng {
9999
status = "okay";
100100
};
101+
102+
&iic0 {
103+
pinctrl-0 = <&iic0_default>;
104+
pinctrl-names = "default";
105+
#address-cells = <1>;
106+
#size-cells = <0>;
107+
clock-frequency = <DT_FREQ_M(1)>;
108+
interrupts = <0 1>, <1 1>, <2 1>, <3 1>;
109+
interrupt-names = "rxi", "txi", "tei", "eri";
110+
status = "okay";
111+
};

boards/renesas/ek_ra4m2/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ The below features are currently supported on Zephyr OS for EK-RA4M2 board:
106106
+-----------+------------+----------------------+
107107
| PWM | on-chip | pwm |
108108
+-----------+------------+----------------------+
109+
| I2C | on-chip | i2c |
110+
+-----------+------------+----------------------+
109111

110112
Other hardware features are currently not supported by the port.
111113

boards/renesas/ek_ra4m2/ek_ra4m2-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,13 @@
3737
<RA_PSEL(RA_PSEL_GPT1, 1, 4)>;
3838
};
3939
};
40+
41+
iic0_default: iic0_default {
42+
group1 {
43+
/* SCL0 SDA0 */
44+
psels = <RA_PSEL(RA_PSEL_I2C, 4, 0)>,
45+
<RA_PSEL(RA_PSEL_I2C, 4, 1)>;
46+
drive-strength = "medium";
47+
};
48+
};
4049
};

boards/renesas/ek_ra4m2/ek_ra4m2.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,14 @@
124124
interrupt-names = "gtioca", "overflow";
125125
status = "okay";
126126
};
127+
128+
&iic0 {
129+
pinctrl-0 = <&iic0_default>;
130+
pinctrl-names = "default";
131+
#address-cells = <1>;
132+
#size-cells = <0>;
133+
clock-frequency = <DT_FREQ_M(1)>;
134+
interrupts = <87 1>, <88 1>, <89 1>, <90 1>;
135+
interrupt-names = "rxi", "txi", "tei", "eri";
136+
status = "okay";
137+
};

boards/renesas/ek_ra4m3/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 EK-RA4M3 board:
108108
+-----------+------------+----------------------+
109109
| PWM | on-chip | pwm |
110110
+-----------+------------+----------------------+
111+
| I2C | on-chip | i2c |
112+
+-----------+------------+----------------------+
111113

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

boards/renesas/ek_ra4m3/ek_ra4m3-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,13 @@
3737
<RA_PSEL(RA_PSEL_GPT1, 1, 10)>;
3838
};
3939
};
40+
41+
iic0_default: iic0_default {
42+
group1 {
43+
/* SCL0 SDA0 */
44+
psels = <RA_PSEL(RA_PSEL_I2C, 4, 0)>,
45+
<RA_PSEL(RA_PSEL_I2C, 4, 1)>;
46+
drive-strength = "medium";
47+
};
48+
};
4049
};

boards/renesas/ek_ra4m3/ek_ra4m3.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,14 @@
124124
interrupt-names = "gtioca", "overflow";
125125
status = "okay";
126126
};
127+
128+
&iic0 {
129+
pinctrl-0 = <&iic0_default>;
130+
pinctrl-names = "default";
131+
#address-cells = <1>;
132+
#size-cells = <0>;
133+
clock-frequency = <DT_FREQ_M(1)>;
134+
interrupts = <87 1>, <88 1>, <89 1>, <90 1>;
135+
interrupt-names = "rxi", "txi", "tei", "eri";
136+
status = "okay";
137+
};

boards/renesas/ek_ra4w1/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ The below features are currently supported on Zephyr OS for EK-RA4W1 board:
100100
+-----------+------------+----------------------+
101101
| PWM | on-chip | pwm |
102102
+-----------+------------+----------------------+
103+
| I2C | on-chip | i2c |
104+
+-----------+------------+----------------------+
103105

104106
Other hardware features are currently not supported by the port.
105107

0 commit comments

Comments
 (0)