Skip to content

Commit 9de529c

Browse files
committed
tests: drivers: build_all: stepper: update tmc51xx nodes
The dts layout is updated for tmc51xx nodes, since the motor is now made a child of the parent controller. Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
1 parent 4310bad commit 9de529c

File tree

2 files changed

+100
-82
lines changed

2 files changed

+100
-82
lines changed

tests/drivers/build_all/stepper/spi.dtsi

Lines changed: 72 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ adi_tmc50xx: adi_tmc50xx@0 {
1616
#address-cells = <1>;
1717
#size-cells = <0>;
1818

19-
poscmp-enable; test-mode; lock-gconf; /* ADI TMC Global configuration flags */
19+
poscmp-enable;
20+
test-mode;
21+
lock-gconf; /* ADI TMC Global configuration flags */
2022
clock-frequency = <16000000>; /* Internal/External Clock frequency */
2123

2224
tmc50xx_0: tmc50xx_0@0 {
@@ -29,9 +31,9 @@ adi_tmc50xx: adi_tmc50xx@0 {
2931

3032
/* ADI TMC stallguard settings specific to TMC50XX */
3133
activate-stallguard2;
32-
stallguard-velocity-check-interval-ms=<100>;
33-
stallguard2-threshold=<9>;
34-
stallguard-threshold-velocity=<500000>;
34+
stallguard-velocity-check-interval-ms = <100>;
35+
stallguard2-threshold = <9>;
36+
stallguard-threshold-velocity = <500000>;
3537

3638
/* ADI TMC ramp generator as well as current settings */
3739
vstart = <10>;
@@ -59,9 +61,9 @@ adi_tmc50xx: adi_tmc50xx@0 {
5961

6062
/* ADI TMC stallguard settings specific to TMC50XX */
6163
activate-stallguard2;
62-
stallguard-velocity-check-interval-ms=<100>;
63-
stallguard2-threshold=<9>;
64-
stallguard-threshold-velocity=<500000>;
64+
stallguard-velocity-check-interval-ms = <100>;
65+
stallguard2-threshold = <9>;
66+
stallguard-threshold-velocity = <500000>;
6567

6668
/* ADI TMC ramp generator as well as current settings */
6769
vstart = <10>;
@@ -90,35 +92,39 @@ adi_tmc51xx_1: adi_tmc51xx@1 {
9092
#address-cells = <1>;
9193
#size-cells = <0>;
9294

93-
en-pwm-mode; test-mode; /* ADI TMC Global configuration flags */
95+
en-pwm-mode;
96+
test-mode; /* ADI TMC Global configuration flags */
9497
clock-frequency = <16000000>; /* Internal/External Clock frequency */
9598

96-
/* common stepper controller settings */
97-
invert-direction;
98-
micro-step-res = <256>;
99-
100-
/* ADI TMC stallguard settings specific to TMC5160 */
101-
activate-stallguard2;
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>;
99+
tmc51xx_1_motor: motor@0 {
100+
status = "okay";
101+
reg = <0>;
102+
invert-direction;
103+
micro-step-res = <256>;
104+
105+
/* ADI TMC stallguard settings specific to TMC5160 */
106+
activate-stallguard2;
107+
stallguard-velocity-check-interval-ms = <100>;
108+
stallguard2-threshold = <9>;
109+
stallguard-threshold-velocity = <50000>;
110+
111+
/* ADI TMC ramp generator as well as current settings */
112+
vstart = <10>;
113+
a1 = <20>;
114+
v1 = <30>;
115+
d1 = <40>;
116+
vmax = <50>;
117+
amax = <60>;
118+
dmax = <70>;
119+
tzerowait = <80>;
120+
thigh = <90>;
121+
tcoolthrs = <100>;
122+
tpwmthrs = <110>;
123+
tpowerdown = <120>;
124+
ihold = <1>;
125+
irun = <2>;
126+
iholddelay = <3>;
127+
};
122128
};
123129

124130
adi_tmc51xx_2: adi_tmc51xx@2 {
@@ -132,33 +138,38 @@ adi_tmc51xx_2: adi_tmc51xx@2 {
132138
#size-cells = <0>;
133139
diag0-gpios = <&test_gpio 0x01 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* DIAG pin @0x01 */
134140

135-
en-pwm-mode; test-mode; /* ADI TMC Global configuration flags */
141+
en-pwm-mode;
142+
test-mode; /* ADI TMC Global configuration flags */
136143
clock-frequency = <16000000>; /* Internal/External Clock frequency */
137144

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>;
147-
148-
/* ADI TMC ramp generator as well as current settings */
149-
vstart = <10>;
150-
a1 = <20>;
151-
v1 = <30>;
152-
d1 = <40>;
153-
vmax = <50>;
154-
amax = <60>;
155-
dmax = <70>;
156-
tzerowait = <80>;
157-
thigh = <90>;
158-
tcoolthrs = <100>;
159-
tpwmthrs = <110>;
160-
tpowerdown = <120>;
161-
ihold = <1>;
162-
irun = <2>;
163-
iholddelay = <3>;
145+
tmc51xx_2_motor: motor@0 {
146+
status = "okay";
147+
reg = <0>;
148+
/* common stepper controller settings */
149+
invert-direction;
150+
micro-step-res = <256>;
151+
152+
/* ADI TMC stallguard settings specific to TMC5160 */
153+
activate-stallguard2;
154+
stallguard-velocity-check-interval-ms = <100>;
155+
stallguard2-threshold = <9>;
156+
stallguard-threshold-velocity = <50000>;
157+
158+
/* ADI TMC ramp generator as well as current settings */
159+
vstart = <10>;
160+
a1 = <20>;
161+
v1 = <30>;
162+
d1 = <40>;
163+
vmax = <50>;
164+
amax = <60>;
165+
dmax = <70>;
166+
tzerowait = <80>;
167+
thigh = <90>;
168+
tcoolthrs = <100>;
169+
tpwmthrs = <110>;
170+
tpowerdown = <120>;
171+
ihold = <1>;
172+
irun = <2>;
173+
iholddelay = <3>;
174+
};
164175
};

tests/drivers/build_all/stepper/uart.dtsi

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,44 @@
88

99
adi_tmc51xx_uart: adi_tmc51xx {
1010
compatible = "adi,tmc51xx";
11+
#address-cells = <1>;
12+
#size-cells = <0>;
1113
status = "okay";
1214

1315
label = "tmc5160_uart_1";
1416

15-
en-pwm-mode; test-mode; /* ADI TMC Global configuration flags */
17+
en-pwm-mode;
18+
test-mode; /* ADI TMC Global configuration flags */
1619
clock-frequency = <16000000>; /* Internal/External Clock frequency */
1720

1821
/* common stepper controller settings */
1922
invert-direction;
2023
micro-step-res = <256>;
2124

2225
/* ADI TMC stallguard settings specific to TMC5160 */
23-
activate-stallguard2;
24-
stallguard-velocity-check-interval-ms = <100>;
25-
stallguard2-threshold = <9>;
26-
stallguard-threshold-velocity = <50000>;
26+
adi_tmc51xx_uart_motor: motor@0 {
27+
status = "okay";
28+
reg = <0>;
29+
activate-stallguard2;
30+
stallguard-velocity-check-interval-ms = <100>;
31+
stallguard2-threshold = <9>;
32+
stallguard-threshold-velocity = <50000>;
2733

28-
/* ADI TMC ramp generator as well as current settings */
29-
vstart = <10>;
30-
a1 = <20>;
31-
v1 = <30>;
32-
d1 = <40>;
33-
vmax = <50>;
34-
amax = <60>;
35-
dmax = <70>;
36-
tzerowait = <80>;
37-
thigh = <90>;
38-
tcoolthrs = <100>;
39-
tpwmthrs = <110>;
40-
tpowerdown = <120>;
41-
ihold = <1>;
42-
irun = <2>;
43-
iholddelay = <3>;
34+
/* ADI TMC ramp generator as well as current settings */
35+
vstart = <10>;
36+
a1 = <20>;
37+
v1 = <30>;
38+
d1 = <40>;
39+
vmax = <50>;
40+
amax = <60>;
41+
dmax = <70>;
42+
tzerowait = <80>;
43+
thigh = <90>;
44+
tcoolthrs = <100>;
45+
tpwmthrs = <110>;
46+
tpowerdown = <120>;
47+
ihold = <1>;
48+
irun = <2>;
49+
iholddelay = <3>;
50+
};
4451
};

0 commit comments

Comments
 (0)