Skip to content

Commit 27572ea

Browse files
jilaypandyafabiobaltieri
authored andcommitted
drivers: stepper: test: build_all: tmc5041
This commit add tmc5041 to stepper build all tests Signed-off-by: Jilay Pandya <[email protected]>
1 parent 52c6a28 commit 27572ea

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

tests/drivers/build_all/stepper/app.overlay

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023 Carl Zeiss Meditec AG
2+
* SPDX-FileCopyrightText: Copyright (c) 2024 Carl Zeiss Meditec AG
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -17,5 +17,19 @@
1717

1818
#include "gpio.dtsi"
1919
};
20+
21+
test_spi: spi@33334444 {
22+
#address-cells = <1>;
23+
#size-cells = <0>;
24+
compatible = "zephyr,spi-emul-controller";
25+
reg = <0x33334444 0x1000>;
26+
status = "okay";
27+
clock-frequency = <2000000>;
28+
29+
/* one entry for every devices at spi.dtsi */
30+
cs-gpios = <&test_gpio 0 0>; /* 0x00 */
31+
32+
#include "spi.dtsi"
33+
};
2034
};
2135
};

tests/drivers/build_all/stepper/prj.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ CONFIG_TEST_USERSPACE=y
33
CONFIG_LOG=y
44
CONFIG_STEPPER_LOG_LEVEL_DBG=y
55
CONFIG_GPIO=y
6+
CONFIG_SPI=y
67
CONFIG_STEPPER=y
8+
CONFIG_EMUL=y
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* SPDX-FileCopyrightText: Copyright (c) 2024 Carl Zeiss Meditec AG
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
/****************************************
6+
* PLEASE KEEP REG ADDRESSES SEQUENTIAL *
7+
***************************************/
8+
9+
test_spi_tmc5041: tmc5041@0 {
10+
compatible = "adi,tmc5041";
11+
reg = <0x0>;
12+
spi-max-frequency = <0>;
13+
#address-cells = <1>;
14+
#size-cells = <0>;
15+
clock-frequency = <1>;
16+
17+
tmc5041_0: tmc5041_0@0 {
18+
status = "okay";
19+
reg = <0>;
20+
};
21+
22+
tmc5041_1: tmc5041_1@1 {
23+
status = "okay";
24+
reg = <1>;
25+
};
26+
};

0 commit comments

Comments
 (0)