Skip to content

Commit bec9952

Browse files
duynguyenxacarlescufi
authored andcommitted
driver: spi: Add initial support for spi driver on ra8
Add initial SPI driver support for RA8 MCUs Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
1 parent 4d5bf29 commit bec9952

File tree

24 files changed

+1084
-0
lines changed

24 files changed

+1084
-0
lines changed

boards/renesas/ek_ra8d1/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-RA8D1 board:
100100
+--------------+------------+------------------+
101101
| ENTROPY | on-chip | entropy |
102102
+--------------+------------+------------------+
103+
| SPI | on-chip | spi |
104+
+--------------+------------+------------------+
103105

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

boards/renesas/ek_ra8d1/ek_ra8d1-pinctrl.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@
1515
psels = <RA_PSEL(RA_PSEL_SCI_9, 10, 15)>;
1616
};
1717
};
18+
19+
spi0_default: spi0_default {
20+
group1 {
21+
/* MISO MOSI RSPCK SSL */
22+
psels = <RA_PSEL(RA_PSEL_SPI, 7, 0)>,
23+
<RA_PSEL(RA_PSEL_SPI, 7, 1)>,
24+
<RA_PSEL(RA_PSEL_SPI, 7, 2)>,
25+
<RA_PSEL(RA_PSEL_SPI, 7, 3)>;
26+
};
27+
};
1828
};

boards/renesas/ek_ra8d1/ek_ra8d1.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,9 @@
104104
&trng {
105105
status = "okay";
106106
};
107+
108+
&spi0 {
109+
pinctrl-0 = <&spi0_default>;
110+
pinctrl-names = "default";
111+
status = "okay";
112+
};

boards/renesas/ek_ra8m1/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ The below features are currently supported on Zephyr OS for EK-RA8M1 board:
102102
+-----------+------------+----------------------+
103103
| ENTROPY | on-chip | entropy |
104104
+-----------+------------+----------------------+
105+
| SPI | on-chip | spi |
106+
+-----------+------------+----------------------+
105107

106108
Other hardware features are currently not supported by the port.
107109

boards/renesas/ek_ra8m1/ek_ra8m1-pinctrl.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,14 @@
4343
renesas,analog-enable;
4444
};
4545
};
46+
47+
spi1_default: spi1_default {
48+
group1 {
49+
/* MISO MOSI RSPCK SSL*/
50+
psels = <RA_PSEL(RA_PSEL_SPI, 4, 10)>,
51+
<RA_PSEL(RA_PSEL_SPI, 4, 11)>,
52+
<RA_PSEL(RA_PSEL_SPI, 4, 12)>,
53+
<RA_PSEL(RA_PSEL_SPI, 4, 13)>;
54+
};
55+
};
4656
};

boards/renesas/ek_ra8m1/ek_ra8m1.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,9 @@ mikrobus_serial: &uart3 {};
163163
&trng {
164164
status = "okay";
165165
};
166+
167+
&spi1 {
168+
pinctrl-0 = <&spi1_default>;
169+
pinctrl-names = "default";
170+
status = "okay";
171+
};

boards/renesas/mck_ra8t1/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ The below features are currently supported on Zephyr OS for MCB-RA8T1 board:
9898
+--------------+------------+----------------------+
9999
| ENTROPY | on-chip | entropy |
100100
+--------------+------------+----------------------+
101+
| SPI | on-chip | spi |
102+
+--------------+------------+----------------------+
101103

102104
Other hardware features are currently not supported by the port.
103105

boards/renesas/mck_ra8t1/mck_ra8t1-pinctrl.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@
1515
psels = <RA_PSEL(RA_PSEL_SCI_3, 3, 9)>;
1616
};
1717
};
18+
19+
spi0_default: spi0_default {
20+
group1 {
21+
/* MISO MOSI RSPCK SSL*/
22+
psels = <RA_PSEL(RA_PSEL_SPI, 3, 13)>,
23+
<RA_PSEL(RA_PSEL_SPI, 2, 2)>,
24+
<RA_PSEL(RA_PSEL_SPI, 2, 3)>,
25+
<RA_PSEL(RA_PSEL_SPI, 2, 4)>;
26+
};
27+
};
1828
};

boards/renesas/mck_ra8t1/mck_ra8t1.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,9 @@
9898
&trng {
9999
status = "okay";
100100
};
101+
102+
&spi0 {
103+
pinctrl-0 = <&spi0_default>;
104+
pinctrl-names = "default";
105+
status = "okay";
106+
};

drivers/spi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ zephyr_library_sources_ifdef(CONFIG_SPI_AMBIQ spi_ambiq.c)
4949
zephyr_library_sources_ifdef(CONFIG_SPI_AMBIQ_BLEIF spi_ambiq_bleif.c)
5050
zephyr_library_sources_ifdef(CONFIG_SPI_RPI_PICO_PIO spi_rpi_pico_pio.c)
5151
zephyr_library_sources_ifdef(CONFIG_SPI_MCHP_MSS spi_mchp_mss.c)
52+
zephyr_library_sources_ifdef(CONFIG_SPI_RENESAS_RA8 spi_b_renesas_ra8.c)
5253
zephyr_library_sources_ifdef(CONFIG_SPI_RTIO spi_rtio.c)
5354
zephyr_library_sources_ifdef(CONFIG_SPI_ASYNC spi_signal.c)
5455
zephyr_library_sources_ifdef(CONFIG_USERSPACE spi_handlers.c)

0 commit comments

Comments
 (0)