tests: drivers: build_all: lora: Add devices build tests

Add build tests for the following devices.

- semtech,sx1262
- semtech,sx1272
- reyax,rylrxxx

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2024-09-17 12:55:52 +09:00 committed by Anas Nashif
parent 256ab0c919
commit 0ce32c963e
5 changed files with 150 additions and 0 deletions

View file

@ -1 +1,3 @@
CONFIG_TEST=y
CONFIG_GPIO=y
CONFIG_LORA=y

View file

@ -0,0 +1,44 @@
/*
* 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";
cs-gpios = <&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;
test_semtech_sx1262: sx1262@0 {
compatible = "semtech,sx1262";
status = "okay";
reg = <0>;
spi-max-frequency = <16000000>;
reset-gpios = <&test_gpio 0 0>;
busy-gpios = <&test_gpio 9 0>;
antenna-enable-gpios = <&test_gpio 0 0>;
dio1-gpios = <&test_gpio 11 0>;
dio2-tx-enable;
tcxo-power-startup-delay-ms = <5>;
};
};
};
};

View file

@ -0,0 +1,47 @@
/*
* 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";
cs-gpios = <&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;
test_semtech_sx1272: sx1272@1 {
compatible = "semtech,sx1272";
status = "okay";
reg = <0x1>;
spi-max-frequency = <3000000>;
reset-gpios = <&test_gpio 0 0>;
dio-gpios = <&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;
power-amplifier-output = "rfo";
};
};
};
};

View file

@ -2,3 +2,28 @@ tests:
sample.driver.lora.rylr.send:
extra_args: SHIELD=reyax_lora
platform_allow: cy8ckit_062s4
sample.driver.lora.build.uart:
build_only: true
extra_args: DTC_OVERLAY_FILE="uart_devices.overlay"
extra_configs:
- CONFIG_SERIAL=y
- CONFIG_UART_INTERRUPT_DRIVEN=y
platform_allow:
- native_sim
- native_sim/native/64
sample.driver.lora.build.sx1262:
build_only: true
extra_args: DTC_OVERLAY_FILE="sx1262.overlay"
extra_configs:
- CONFIG_SPI=y
platform_allow:
- native_sim
- native_sim/native/64
sample.driver.lora.build.sx1272:
build_only: true
extra_args: DTC_OVERLAY_FILE="sx1272.overlay"
extra_configs:
- CONFIG_SPI=y
platform_allow:
- native_sim
- native_sim/native/64

View 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";
current-speed = <115200>;
test_reyax_rylrxxxx: reyax_rylrxxxx {
compatible = "reyax,rylrxxx";
status = "okay";
reset-gpios = <&test_gpio 0 0>;
};
};
};
};