Skip to content

Commit 19c2c33

Browse files
XenuIsWatchingkartben
authored andcommitted
tests: drivers: spi: add build all for cadence spi
As there is no currently known board that has the cadence spi, add a test to just build it under the qemu cortex m3. Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
1 parent 8c5c74c commit 19c2c33

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(build_all)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2025 Meta Platforms
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
spi0: spi@88888888 {
9+
compatible = "cdns,spi";
10+
#address-cells = <1>;
11+
#size-cells = <0>;
12+
reg = <0x88888888 0x400>;
13+
interrupt-parent = <&nvic>;
14+
interrupts = <4 1>;
15+
fifo-width = <8>;
16+
rx-fifo-depth = <256>;
17+
tx-fifo-depth = <256>;
18+
clock-frequency = <100000000>;
19+
};
20+
};

tests/drivers/build_all/spi/prj.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_TEST=y
2+
CONFIG_TEST_USERSPACE=y
3+
CONFIG_SPI=y
4+
CONFIG_SPI_SLAVE=y
5+
CONFIG_SPI_CDNS=y
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2025 Meta Platforms
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
int main(void)
8+
{
9+
return 0;
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
common:
2+
build_only: true
3+
tags:
4+
- drivers
5+
- spi
6+
tests:
7+
drivers.spi.build:
8+
# will cover drivers without in-tree boards
9+
platform_allow: qemu_cortex_m3
10+
tags: spi_cdns
11+
extra_args: "CONFIG_SPI=y"

0 commit comments

Comments
 (0)