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 <tokita.hiroshi@gmail.com>
This commit is contained in:
parent
3c4789aca3
commit
8c705cabab
6 changed files with 134 additions and 0 deletions
8
tests/drivers/build_all/wifi/CMakeLists.txt
Normal file
8
tests/drivers/build_all/wifi/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||||
|
project(build_all)
|
||||||
|
|
||||||
|
FILE(GLOB app_sources src/*.c)
|
||||||
|
target_sources(app PRIVATE ${app_sources})
|
||||||
6
tests/drivers/build_all/wifi/prj.conf
Normal file
6
tests/drivers/build_all/wifi/prj.conf
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
CONFIG_TEST=y
|
||||||
|
CONFIG_TEST_USERSPACE=y
|
||||||
|
CONFIG_WIFI=y
|
||||||
|
CONFIG_GPIO=y
|
||||||
|
CONFIG_NETWORKING=y
|
||||||
|
CONFIG_NET_IPV4=y
|
||||||
56
tests/drivers/build_all/wifi/spi_devices.overlay
Normal file
56
tests/drivers/build_all/wifi/spi_devices.overlay
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024 TOKITA Hiroshi
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
test {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
test_gpio: gpio@deadbeef {
|
||||||
|
compatible = "vnd,gpio";
|
||||||
|
gpio-controller;
|
||||||
|
reg = <0xdeadbeef 0x1000>;
|
||||||
|
#gpio-cells = <0x2>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
test_spi: spi@33334444 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
compatible = "vnd,spi";
|
||||||
|
reg = <0x33334444 0x1000>;
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <2000000>;
|
||||||
|
|
||||||
|
/* one entry for every devices at spi.dtsi */
|
||||||
|
cs-gpios = <&test_gpio 0 0>,
|
||||||
|
<&test_gpio 0 0>,
|
||||||
|
<&test_gpio 0 0>,
|
||||||
|
<&test_gpio 0 0>,
|
||||||
|
<&test_gpio 0 0>;
|
||||||
|
|
||||||
|
test_spi_winc1500: winc1500@0 {
|
||||||
|
compatible = "atmel,winc1500";
|
||||||
|
status = "okay";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <5000000>;
|
||||||
|
irq-gpios = <&test_gpio 0 0>;
|
||||||
|
reset-gpios = <&test_gpio 0 0>;
|
||||||
|
enable-gpios = <&test_gpio 0 0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
test_spi_eswifi: eswifi@1 {
|
||||||
|
compatible = "inventek,eswifi";
|
||||||
|
status = "okay";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <2000000>;
|
||||||
|
resetn-gpios = <&test_gpio 0 0>;
|
||||||
|
wakeup-gpios = <&test_gpio 0 0>;
|
||||||
|
boot0-gpios = <&test_gpio 0 0>;
|
||||||
|
data-gpios = <&test_gpio 0 0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
10
tests/drivers/build_all/wifi/src/main.c
Normal file
10
tests/drivers/build_all/wifi/src/main.c
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2024 TOKITA Hiroshi
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
22
tests/drivers/build_all/wifi/testcase.yaml
Normal file
22
tests/drivers/build_all/wifi/testcase.yaml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
common:
|
||||||
|
build_only: true
|
||||||
|
tags:
|
||||||
|
- drivers
|
||||||
|
- wifi
|
||||||
|
tests:
|
||||||
|
drivers.wifi.build.spi:
|
||||||
|
extra_args: DTC_OVERLAY_FILE="spi_devices.overlay"
|
||||||
|
extra_configs:
|
||||||
|
- CONFIG_SPI=y
|
||||||
|
platform_allow:
|
||||||
|
- native_sim
|
||||||
|
- native_sim/native/64
|
||||||
|
|
||||||
|
drivers.wifi.build.uart:
|
||||||
|
extra_args: DTC_OVERLAY_FILE="uart_devices.overlay"
|
||||||
|
extra_configs:
|
||||||
|
- CONFIG_SERIAL=y
|
||||||
|
- CONFIG_WIFI_ESWIFI_BUS_UART=y
|
||||||
|
platform_allow:
|
||||||
|
- native_sim
|
||||||
|
- native_sim/native/64
|
||||||
32
tests/drivers/build_all/wifi/uart_devices.overlay
Normal file
32
tests/drivers/build_all/wifi/uart_devices.overlay
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024 TOKITA Hiroshi
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
test {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
test_gpio: gpio@deadbeef {
|
||||||
|
compatible = "vnd,gpio";
|
||||||
|
gpio-controller;
|
||||||
|
reg = <0xdeadbeef 0x1000>;
|
||||||
|
#gpio-cells = <0x2>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
test_uart: uart@55556666 {
|
||||||
|
compatible = "vnd,serial";
|
||||||
|
reg = <0x55556666 0x1000>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
test_uart_eswifi: eswifi-uart {
|
||||||
|
compatible = "inventek,eswifi-uart";
|
||||||
|
status = "okay";
|
||||||
|
wakeup-gpios = <&test_gpio 0 0>;
|
||||||
|
resetn-gpios = <&test_gpio 0 0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
Loading…
Reference in a new issue