Skip to content

Commit a123178

Browse files
dipakgmxkartben
authored andcommitted
tests: drivers: build_all: stepper: add diag0 test case
Added second tmc51xx node with diag0 interrupt pin. Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
1 parent 6b02a61 commit a123178

File tree

1 file changed

+46
-4
lines changed

1 file changed

+46
-4
lines changed

tests/drivers/build_all/stepper/spi.dtsi

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ adi_tmc50xx: adi_tmc50xx@0 {
8080
};
8181
};
8282

83-
adi_tmc51xx: adi_tmc51xx@1 {
83+
adi_tmc51xx_1: adi_tmc51xx@1 {
8484
compatible = "adi,tmc51xx";
8585
status = "okay";
8686
reg = <0x01>;
@@ -99,9 +99,51 @@ adi_tmc51xx: adi_tmc51xx@1 {
9999

100100
/* ADI TMC stallguard settings specific to TMC5160 */
101101
activate-stallguard2;
102-
stallguard-velocity-check-interval-ms=<100>;
103-
stallguard2-threshold=<9>;
104-
stallguard-threshold-velocity=<50000>;
102+
stallguard-velocity-check-interval-ms = <100>;
103+
stallguard2-threshold = <9>;
104+
stallguard-threshold-velocity = <50000>;
105+
106+
/* ADI TMC ramp generator as well as current settings */
107+
vstart = <10>;
108+
a1 = <20>;
109+
v1 = <30>;
110+
d1 = <40>;
111+
vmax = <50>;
112+
amax = <60>;
113+
dmax = <70>;
114+
tzerowait = <80>;
115+
thigh = <90>;
116+
tcoolthrs = <100>;
117+
tpwmthrs = <110>;
118+
tpowerdown = <120>;
119+
ihold = <1>;
120+
irun = <2>;
121+
iholddelay = <3>;
122+
};
123+
124+
adi_tmc51xx_2: adi_tmc51xx@2 {
125+
compatible = "adi,tmc51xx";
126+
status = "okay";
127+
reg = <0x01>;
128+
spi-max-frequency = <8000000>;
129+
label = "tmc5160_2";
130+
131+
#address-cells = <1>;
132+
#size-cells = <0>;
133+
diag0-gpios = <&test_gpio 0x01 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* DIAG pin @0x01 */
134+
135+
en-pwm-mode; test-mode; /* ADI TMC Global configuration flags */
136+
clock-frequency = <16000000>; /* Internal/External Clock frequency */
137+
138+
/* common stepper controller settings */
139+
invert-direction;
140+
micro-step-res = <256>;
141+
142+
/* ADI TMC stallguard settings specific to TMC5160 */
143+
activate-stallguard2;
144+
stallguard-velocity-check-interval-ms = <100>;
145+
stallguard2-threshold = <9>;
146+
stallguard-threshold-velocity = <50000>;
105147

106148
/* ADI TMC ramp generator as well as current settings */
107149
vstart = <10>;

0 commit comments

Comments
 (0)