Skip to content

Commit

Permalink
drivers: stepper: test: build_all: tmc5041
Browse files Browse the repository at this point in the history
This commit add tmc5041 to stepper build all tests

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
  • Loading branch information
jilaypandya committed Oct 1, 2024
1 parent 7cf5dd9 commit a8dfbd9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/drivers/build_all/stepper/app.overlay
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Carl Zeiss Meditec AG
* SPDX-FileCopyrightText: Copyright (c) 2024 Carl Zeiss Meditec AG
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -17,5 +17,19 @@

#include "gpio.dtsi"
};

test_spi: spi@33334444 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "zephyr,spi-emul-controller";
reg = <0x33334444 0x1000>;
status = "okay";
clock-frequency = <2000000>;

/* one entry for every devices at spi.dtsi */
cs-gpios = <&test_gpio 0 0>; /* 0x00 */

#include "spi.dtsi"
};
};
};
2 changes: 2 additions & 0 deletions tests/drivers/build_all/stepper/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ CONFIG_TEST_USERSPACE=y
CONFIG_LOG=y
CONFIG_STEPPER_LOG_LEVEL_DBG=y
CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_STEPPER=y
CONFIG_EMUL=y
26 changes: 26 additions & 0 deletions tests/drivers/build_all/stepper/spi.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2024 Carl Zeiss Meditec AG
* SPDX-License-Identifier: Apache-2.0
*/
/****************************************
* PLEASE KEEP REG ADDRESSES SEQUENTIAL *
***************************************/

test_spi_tmc5041: tmc5041@0 {
compatible = "adi,tmc5041";
reg = <0x0>;
spi-max-frequency = <0>;
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <1>;

tmc5041_0: tmc5041_0@0 {
status = "okay";
reg=<0>;
};

tmc5041_1: tmc5041_1@1 {
status = "okay";
reg=<1>;
};
};

0 comments on commit a8dfbd9

Please sign in to comment.