1/ { 2 aliases { 3 stepper = &tmc_stepper; 4 }; 5}; 6 7&spi1 { 8 pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 9 pinctrl-names = "default"; 10 cs-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>; 11 status = "okay"; 12 tmc50xx: tmc50xx@0 { 13 compatible = "adi,tmc50xx"; 14 reg = <0>; 15 spi-max-frequency = <DT_FREQ_M(1)>; /* Maximum SPI bus frequency */ 16 17 #address-cells = <1>; 18 #size-cells = <0>; 19 20 clock-frequency = <DT_FREQ_M(10)>; /* Internal/External Clock frequency */ 21 22 tmc_stepper: tmc_stepper@0 { 23 status = "okay"; 24 reg = <0>; 25 26 /* common stepper controller settings */ 27 micro-step-res = <256>; 28 29 /* ADI TMC stallguard settings specific to TMC50XX */ 30 activate-stallguard2; 31 stallguard-velocity-check-interval-ms=<1000>; 32 stallguard2-threshold=<30>; 33 stallguard-threshold-velocity=<200000>; 34 35 /* ADI TMC ramp generator as well as current settings */ 36 vstart = <1000>; 37 vstop = <10>; 38 a1 = <10000>; 39 v1 = <50000>; 40 d1 = <14000>; 41 vmax = <900000>; 42 amax = <50000>; 43 dmax = <7000>; 44 tzerowait = <100>; 45 vhigh = <900000>; 46 vcoolthrs = <900000>; 47 ihold = <1>; 48 irun = <10>; 49 iholddelay = <1>; 50 }; 51 }; 52}; 53