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&i2c1 { 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 18 0>; /* D12 */ 46 step-gpios = <&arduino_header 19 0>; /* D13 */ 47 sleep-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */ 48 en-gpios = <&arduino_header 14 0>; /* D8 */ 49 m0-gpios = <&mikroe_stepper_gpios 0 0>; 50 m1-gpios = <&mikroe_stepper_gpios 1 0>; 51 counter = <&counter2>; 52 53 #address-cells = <1>; 54 #size-cells = <0>; 55 #stepper-motor-cells = <0>; 56 }; 57}; 58 59&timers2 { 60 status = "okay"; 61 counter2: counter { 62 status = "okay"; 63 }; 64}; 65