1/*
2 * Copyright (c) 2024 Navimatix GmbH
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#include <zephyr/dt-bindings/gpio/gpio.h>
7
8/ {
9	zephyr,user {
10		stepper-motors = <&drv8424 0>;
11	};
12};
13
14&lpi2c1 {
15	status = "okay";
16
17	mikroe_stepper_gpios: mikroe_stepper_ctrl_tca9538a@70 {
18		status = "okay";
19		compatible = "ti,tca9538";
20
21		reg = <0x70>;
22
23		gpio-controller;
24		ngpios = <8>;
25		#gpio-cells = <2>;
26
27		gpio-reserved-ranges = <7 1>;
28
29		gpio-line-names =
30			"M0",
31			"M1",
32			"DEC0",
33			"DEC1",
34			"TOFF",
35			"STP",
36			"DIR";
37	};
38};
39
40/ {
41	drv8424: drv8424 {
42		status = "okay";
43		compatible = "ti,drv8424";
44
45		dir-gpios = <&arduino_header 9 0>; /* D3 */
46		step-gpios = <&arduino_header 10 0>; /* D4 */
47		sleep-gpios = <&arduino_header 8 GPIO_ACTIVE_LOW>; /* D2 */
48		en-gpios  = <&arduino_header 11 0>; /* D5 */
49		m0-gpios = <&mikroe_stepper_gpios 0 0>;
50		m1-gpios = <&mikroe_stepper_gpios 1 0>;
51		counter = <&pit0_channel0>;
52
53		#address-cells = <1>;
54		#size-cells = <0>;
55		#stepper-motor-cells = <0>;
56	};
57};
58
59&pit0_channel0 {
60	status = "okay";
61};
62