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:
parent
256ab0c919
commit
0ce32c963e
5 changed files with 150 additions and 0 deletions
|
|
@ -1 +1,3 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_LORA=y
|
||||
|
|
|
|||
44
tests/drivers/build_all/lora/sx1262.overlay
Normal file
44
tests/drivers/build_all/lora/sx1262.overlay
Normal 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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
47
tests/drivers/build_all/lora/sx1272.overlay
Normal file
47
tests/drivers/build_all/lora/sx1272.overlay
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -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
|
||||
|
|
|
|||
32
tests/drivers/build_all/lora/uart_devices.overlay
Normal file
32
tests/drivers/build_all/lora/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";
|
||||
|
||||
current-speed = <115200>;
|
||||
test_reyax_rylrxxxx: reyax_rylrxxxx {
|
||||
compatible = "reyax,rylrxxx";
|
||||
status = "okay";
|
||||
reset-gpios = <&test_gpio 0 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Loading…
Reference in a new issue