Skip to content

Commit 8c705ca

Browse files
soburihenrikbrixandersen
authored andcommitted
tests: drivers: build_all: Add a build_all test for wifi
The test targets the following devices at this time. - atmel,winc1500 - inventek,eswifi - inventek,eswifi-uart Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 3c4789a commit 8c705ca

File tree

6 files changed

+134
-0
lines changed

6 files changed

+134
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(build_all)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})

tests/drivers/build_all/wifi/prj.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_TEST=y
2+
CONFIG_TEST_USERSPACE=y
3+
CONFIG_WIFI=y
4+
CONFIG_GPIO=y
5+
CONFIG_NETWORKING=y
6+
CONFIG_NET_IPV4=y
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
test {
8+
#address-cells = <1>;
9+
#size-cells = <1>;
10+
11+
test_gpio: gpio@deadbeef {
12+
compatible = "vnd,gpio";
13+
gpio-controller;
14+
reg = <0xdeadbeef 0x1000>;
15+
#gpio-cells = <0x2>;
16+
status = "okay";
17+
};
18+
19+
test_spi: spi@33334444 {
20+
#address-cells = <1>;
21+
#size-cells = <0>;
22+
compatible = "vnd,spi";
23+
reg = <0x33334444 0x1000>;
24+
status = "okay";
25+
clock-frequency = <2000000>;
26+
27+
/* one entry for every devices at spi.dtsi */
28+
cs-gpios = <&test_gpio 0 0>,
29+
<&test_gpio 0 0>,
30+
<&test_gpio 0 0>,
31+
<&test_gpio 0 0>,
32+
<&test_gpio 0 0>;
33+
34+
test_spi_winc1500: winc1500@0 {
35+
compatible = "atmel,winc1500";
36+
status = "okay";
37+
reg = <0>;
38+
spi-max-frequency = <5000000>;
39+
irq-gpios = <&test_gpio 0 0>;
40+
reset-gpios = <&test_gpio 0 0>;
41+
enable-gpios = <&test_gpio 0 0>;
42+
};
43+
44+
test_spi_eswifi: eswifi@1 {
45+
compatible = "inventek,eswifi";
46+
status = "okay";
47+
reg = <1>;
48+
spi-max-frequency = <2000000>;
49+
resetn-gpios = <&test_gpio 0 0>;
50+
wakeup-gpios = <&test_gpio 0 0>;
51+
boot0-gpios = <&test_gpio 0 0>;
52+
data-gpios = <&test_gpio 0 0>;
53+
};
54+
};
55+
};
56+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright © 2024 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
int main(void)
8+
{
9+
return 0;
10+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
common:
2+
build_only: true
3+
tags:
4+
- drivers
5+
- wifi
6+
tests:
7+
drivers.wifi.build.spi:
8+
extra_args: DTC_OVERLAY_FILE="spi_devices.overlay"
9+
extra_configs:
10+
- CONFIG_SPI=y
11+
platform_allow:
12+
- native_sim
13+
- native_sim/native/64
14+
15+
drivers.wifi.build.uart:
16+
extra_args: DTC_OVERLAY_FILE="uart_devices.overlay"
17+
extra_configs:
18+
- CONFIG_SERIAL=y
19+
- CONFIG_WIFI_ESWIFI_BUS_UART=y
20+
platform_allow:
21+
- native_sim
22+
- native_sim/native/64
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
test {
8+
#address-cells = <1>;
9+
#size-cells = <1>;
10+
11+
test_gpio: gpio@deadbeef {
12+
compatible = "vnd,gpio";
13+
gpio-controller;
14+
reg = <0xdeadbeef 0x1000>;
15+
#gpio-cells = <0x2>;
16+
status = "okay";
17+
};
18+
19+
test_uart: uart@55556666 {
20+
compatible = "vnd,serial";
21+
reg = <0x55556666 0x1000>;
22+
status = "okay";
23+
24+
test_uart_eswifi: eswifi-uart {
25+
compatible = "inventek,eswifi-uart";
26+
status = "okay";
27+
wakeup-gpios = <&test_gpio 0 0>;
28+
resetn-gpios = <&test_gpio 0 0>;
29+
};
30+
};
31+
};
32+
};

0 commit comments

Comments
 (0)