tests: build_all: ieee802154: added
Adds build_all for ieee802154 drivers. A substantial number of drivers are for SoC peripherals, so test cases are required many boards. Fixes #11519. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
82a6104808
commit
d16b96f88d
7 changed files with 249 additions and 0 deletions
8
tests/drivers/build_all/ieee802154/CMakeLists.txt
Normal file
8
tests/drivers/build_all/ieee802154/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.13.1)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(build_all)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
112
tests/drivers/build_all/ieee802154/app.overlay
Normal file
112
tests/drivers/build_all/ieee802154/app.overlay
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Commonwealth Scientific and Industrial Research
|
||||
* Organisation (CSIRO) ABN 41 687 119 230.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Application overlay for testing driver builds
|
||||
*
|
||||
* Names in this file should be chosen in a way that won't conflict
|
||||
* with real-world devicetree nodes, to allow these tests to run on
|
||||
* (and be extended to test) real hardware.
|
||||
*/
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
reg = <0xdeadbeef 0x1000>;
|
||||
#gpio-cells = <0x2>;
|
||||
label = "TEST_GPIO_1";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_spi: spi@33334444 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "vnd,spi";
|
||||
reg = <0x33334444 0x1000>;
|
||||
label = "TEST_SPI_CTLR";
|
||||
status = "okay";
|
||||
clock-frequency = <2000000>;
|
||||
|
||||
/* one entry for every devices at spi.dtsi */
|
||||
cs-gpios = <&test_gpio 0 0>, /* 0x00 */
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>, /* 0x10 */
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>, /* 0x20 */
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>, /* 0x30 */
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>; /* 0x40 */
|
||||
|
||||
#include "spi.dtsi"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* Put device specific modifications to properties or disabling of devices
|
||||
* here to keep the bus specific dtsi files (i2c.dtsi, spi.dtsi, etc..)
|
||||
* pristine
|
||||
*/
|
5
tests/drivers/build_all/ieee802154/external.conf
Normal file
5
tests/drivers/build_all/ieee802154/external.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
CONFIG_IEEE802154_CC1200=y
|
||||
CONFIG_IEEE802154_CC2520=y
|
||||
CONFIG_IEEE802154_CC2520_CRYPTO=y
|
||||
CONFIG_IEEE802154_DW1000=y
|
||||
CONFIG_IEEE802154_RF2XX=y
|
9
tests/drivers/build_all/ieee802154/prj.conf
Normal file
9
tests/drivers/build_all/ieee802154/prj.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_LOG=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_L2_IEEE802154=y
|
||||
CONFIG_NET_L2_IEEE802154_SECURITY=y
|
63
tests/drivers/build_all/ieee802154/spi.dtsi
Normal file
63
tests/drivers/build_all/ieee802154/spi.dtsi
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Commonwealth Scientific and Industrial Research
|
||||
* Organisation (CSIRO) ABN 41 687 119 230.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Application overlay for spi devices
|
||||
*/
|
||||
|
||||
test_spi_cc1200: cc1200@0 {
|
||||
compatible = "ti,cc1200";
|
||||
label = "CC1200";
|
||||
reg = <0x0>;
|
||||
spi-max-frequency = <0>;
|
||||
int-gpios = <&test_gpio 0 0>;
|
||||
status= "okay";
|
||||
};
|
||||
|
||||
test_spi_cc2520: cc2520@1 {
|
||||
compatible = "ti,cc2520";
|
||||
label = "CC2520";
|
||||
reg = <0x1>;
|
||||
spi-max-frequency = <0>;
|
||||
vreg-en-gpios = <&test_gpio 0 0>;
|
||||
reset-gpios = <&test_gpio 0 0>;
|
||||
fifo-gpios = <&test_gpio 0 0>;
|
||||
cca-gpios = <&test_gpio 0 0>;
|
||||
sfd-gpios = <&test_gpio 0 0>;
|
||||
fifop-gpios = <&test_gpio 0 0>;
|
||||
status= "okay";
|
||||
};
|
||||
|
||||
test_spi_dw1000: dw1000@2 {
|
||||
compatible = "decawave,dw1000";
|
||||
label = "DW1000";
|
||||
reg = <0x2>;
|
||||
spi-max-frequency = <0>;
|
||||
int-gpios = <&test_gpio 0 0>;
|
||||
reset-gpios =<&test_gpio 0 0>;
|
||||
status= "okay";
|
||||
};
|
||||
|
||||
test_spi_mcr20a: mcr20a@3 {
|
||||
compatible = "nxp,mcr20a";
|
||||
reg = <0x3>;
|
||||
label = "MCR20A";
|
||||
spi-max-frequency = <0>;
|
||||
irqb-gpios = <&test_gpio 0 0>;
|
||||
reset-gpios = <&test_gpio 0 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_spi_rf2xx: rf2xx@4 {
|
||||
compatible = "atmel,rf2xx";
|
||||
reg = <0x4>;
|
||||
label = "RF2XX";
|
||||
spi-max-frequency = <0>;
|
||||
irq-gpios = <&test_gpio 0 0>;
|
||||
reset-gpios = <&test_gpio 0 0>;
|
||||
slptr-gpios = <&test_gpio 0 0>;
|
||||
dig2-gpios = <&test_gpio 0 0>;
|
||||
status = "okay";
|
||||
};
|
20
tests/drivers/build_all/ieee802154/src/main.c
Normal file
20
tests/drivers/build_all/ieee802154/src/main.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Commonwealth Scientific and Industrial Research
|
||||
* Organisation (CSIRO) ABN 41 687 119 230.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <device.h>
|
||||
|
||||
void main(void)
|
||||
{
|
||||
}
|
||||
|
||||
#if DT_NODE_EXISTS(DT_INST(0, vnd_gpio))
|
||||
/* Fake GPIO device, needed for building drivers that use DEVICE_DT_GET()
|
||||
* to access GPIO controllers.
|
||||
*/
|
||||
DEVICE_DT_DEFINE(DT_INST(0, vnd_gpio), NULL, NULL, NULL, NULL,
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
|
||||
#endif
|
32
tests/drivers/build_all/ieee802154/testcase.yaml
Normal file
32
tests/drivers/build_all/ieee802154/testcase.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
common:
|
||||
tags: drivers ieee802154
|
||||
build_only: true
|
||||
tests:
|
||||
ieee802154.build.external:
|
||||
platform_allow: native_posix
|
||||
extra_args: OVERLAY_CONFIG=external.conf
|
||||
ieee802154.build.cc12xx_cc2520:
|
||||
platform_allow: cc1352_sensortag
|
||||
extra_configs:
|
||||
- CONFIG_IEEE802154_CC13XX_CC26XX=y
|
||||
- CONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ=y
|
||||
ieee802154.build.kw41z:
|
||||
platform_allow: frdm_kw41z
|
||||
extra_configs:
|
||||
- CONFIG_IEEE802154_KW41Z=y
|
||||
ieee802154.build.mcr20a:
|
||||
platform_allow: usb_kw24d512
|
||||
extra_configs:
|
||||
- CONFIG_IEEE802154_MCR20A=y
|
||||
ieee802154.build.nrf5:
|
||||
platform_allow: nrf52840dk_nrf52840
|
||||
extra_configs:
|
||||
- CONFIG_IEEE802154_NRF5=y
|
||||
ieee802154.build.telink_b91:
|
||||
platform_allow: tlsr9518adk80d
|
||||
extra_configs:
|
||||
- CONFIG_IEEE802154_TELINK_B91=y
|
||||
ieee802154.build.upipe:
|
||||
platform_allow: qemu_x86
|
||||
extra_configs:
|
||||
- CONFIG_IEEE802154_UPIPE=y
|
Loading…
Add table
Add a link
Reference in a new issue