diff --git a/tests/drivers/build_all/wifi/CMakeLists.txt b/tests/drivers/build_all/wifi/CMakeLists.txt new file mode 100644 index 00000000000000..518596a02f7800 --- /dev/null +++ b/tests/drivers/build_all/wifi/CMakeLists.txt @@ -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}) diff --git a/tests/drivers/build_all/wifi/prj.conf b/tests/drivers/build_all/wifi/prj.conf new file mode 100644 index 00000000000000..68df2c4472119f --- /dev/null +++ b/tests/drivers/build_all/wifi/prj.conf @@ -0,0 +1,6 @@ +CONFIG_TEST=y +CONFIG_TEST_USERSPACE=y +CONFIG_WIFI=y +CONFIG_GPIO=y +CONFIG_NETWORKING=y +CONFIG_NET_IPV4=y diff --git a/tests/drivers/build_all/wifi/spi_devices.overlay b/tests/drivers/build_all/wifi/spi_devices.overlay new file mode 100644 index 00000000000000..152480815a4ee7 --- /dev/null +++ b/tests/drivers/build_all/wifi/spi_devices.overlay @@ -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>; + }; + }; + }; +}; diff --git a/tests/drivers/build_all/wifi/src/main.c b/tests/drivers/build_all/wifi/src/main.c new file mode 100644 index 00000000000000..16e3d7c8a68696 --- /dev/null +++ b/tests/drivers/build_all/wifi/src/main.c @@ -0,0 +1,10 @@ +/* + * Copyright © 2024 TOKITA Hiroshi + * + * SPDX-License-Identifier: Apache-2.0 + */ + +int main(void) +{ + return 0; +} diff --git a/tests/drivers/build_all/wifi/testcase.yaml b/tests/drivers/build_all/wifi/testcase.yaml new file mode 100644 index 00000000000000..248fbad32e1a87 --- /dev/null +++ b/tests/drivers/build_all/wifi/testcase.yaml @@ -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 diff --git a/tests/drivers/build_all/wifi/uart_devices.overlay b/tests/drivers/build_all/wifi/uart_devices.overlay new file mode 100644 index 00000000000000..ca112c9d0d5cf0 --- /dev/null +++ b/tests/drivers/build_all/wifi/uart_devices.overlay @@ -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>; + }; + }; + }; +};