Skip to content

Commit 33afd01

Browse files
le-quang168tiennguyenzg
authored andcommitted
tests: drivers: spi: Add support for RZN2L, T2M
Enable SPI driver tests for RZN2L, T2M Signed-off-by: Quang Le <[email protected]> Signed-off-by: Tien Nguyen <[email protected]>
1 parent 2b212e2 commit 33afd01

File tree

8 files changed

+157
-0
lines changed

8 files changed

+157
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_SPI_RENESAS_RZ_INTERRUPT=y
2+
CONFIG_TESTED_SPI_MODE=1
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&pinctrl {
7+
/omit-if-no-ref/ spi2_pins: spi2 {
8+
spi2-pinmux {
9+
pinmux = <RZN_PINMUX(PORT_18, 4, 3)>, /* CK2 */
10+
<RZN_PINMUX(PORT_18, 5, 3)>, /* MOSI2 */
11+
<RZN_PINMUX(PORT_18, 6, 5)>; /* MISO2 */
12+
drive-strength = "high";
13+
slew-rate = "fast";
14+
};
15+
};
16+
17+
/omit-if-no-ref/ spi3_pins: spi3 {
18+
spi3-pinmux {
19+
pinmux = <RZN_PINMUX(PORT_01, 7, 7)>, /* CK3 */
20+
<RZN_PINMUX(PORT_02, 2, 7)>, /* MOSI3 */
21+
<RZN_PINMUX(PORT_02, 0, 6)>, /* MISO3 */
22+
<RZN_PINMUX(PORT_02, 3, 8)>; /* SSL3_0 */
23+
drive-strength = "high";
24+
slew-rate = "fast";
25+
};
26+
};
27+
};
28+
29+
&gpio3 {
30+
status = "okay";
31+
};
32+
33+
&spi2 {
34+
status = "okay";
35+
pinctrl-0 = <&spi2_pins>;
36+
pinctrl-names = "default";
37+
cs-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
38+
39+
dut_spi_dt: test-spi-dev@0 {
40+
compatible = "vnd,spi-device";
41+
reg = <0>;
42+
spi-max-frequency = <1000000>;
43+
spi-cs-setup-delay-ns = <180000>;
44+
spi-cs-hold-delay-ns = <180000>;
45+
};
46+
};
47+
48+
dut_spis: &spi3 {
49+
status = "okay";
50+
pinctrl-0 = <&spi3_pins>;
51+
pinctrl-names = "default";
52+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_SPI_RENESAS_RZ_INTERRUPT=y
2+
CONFIG_TESTED_SPI_MODE=1
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&pinctrl {
7+
8+
/omit-if-no-ref/ spi2_pins: spi2 {
9+
spi2-pinmux {
10+
pinmux = <RZT_PINMUX(PORT_18, 4, 3)>, /* CK2 */
11+
<RZT_PINMUX(PORT_18, 5, 3)>, /* MOSI2 */
12+
<RZT_PINMUX(PORT_18, 6, 5)>; /* MISO2 */
13+
drive-strength = "high";
14+
slew-rate = "fast";
15+
};
16+
};
17+
18+
/omit-if-no-ref/ spi3_pins: spi3 {
19+
spi3-pinmux {
20+
pinmux = <RZT_PINMUX(PORT_01, 7, 7)>, /* CK3 */
21+
<RZT_PINMUX(PORT_02, 2, 7)>, /* MOSI3 */
22+
<RZT_PINMUX(PORT_02, 0, 6)>, /* MISO3 */
23+
<RZT_PINMUX(PORT_02, 3, 8)>; /* SSL3 */
24+
drive-strength = "high";
25+
slew-rate = "fast";
26+
};
27+
};
28+
};
29+
30+
&gpio1 {
31+
status = "okay";
32+
};
33+
34+
&spi2 {
35+
status = "okay";
36+
pinctrl-0 = <&spi2_pins>;
37+
pinctrl-names = "default";
38+
cs-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
39+
40+
dut_spi_dt: test-spi-dev@0 {
41+
compatible = "vnd,spi-device";
42+
reg = <0>;
43+
spi-max-frequency = <1000000>;
44+
spi-cs-setup-delay-ns = <180000>;
45+
spi-cs-hold-delay-ns = <180000>;
46+
};
47+
};
48+
49+
dut_spis: &spi3 {
50+
status = "okay";
51+
pinctrl-0 = <&spi3_pins>;
52+
pinctrl-names = "default";
53+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_SPI_ASYNC=y
2+
CONFIG_SPI_RENESAS_RZ_INTERRUPT=y
3+
CONFIG_SPI_RTIO=n
4+
CONFIG_SPI_LOOPBACK_MODE_LOOP=n
5+
CONFIG_SPI_LARGE_BUFFER_SIZE=2048
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&spi2 {
8+
slow@2 {
9+
compatible = "test-spi-loopback-slow";
10+
reg = <2>;
11+
spi-max-frequency = <500000>;
12+
};
13+
14+
fast@2 {
15+
compatible = "test-spi-loopback-fast";
16+
reg = <2>;
17+
spi-max-frequency = <2500000>;
18+
};
19+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_SPI_ASYNC=y
2+
CONFIG_SPI_RENESAS_RZ_INTERRUPT=y
3+
CONFIG_SPI_RTIO=n
4+
CONFIG_SPI_LOOPBACK_MODE_LOOP=n
5+
CONFIG_SPI_LARGE_BUFFER_SIZE=2048
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&spi2 {
8+
slow@2 {
9+
compatible = "test-spi-loopback-slow";
10+
reg = <2>;
11+
spi-max-frequency = <500000>;
12+
};
13+
14+
fast@2 {
15+
compatible = "test-spi-loopback-fast";
16+
reg = <2>;
17+
spi-max-frequency = <2500000>;
18+
};
19+
};

0 commit comments

Comments
 (0)