drivers: stepper: adi_tmc: Add tmc51xx support
Add tmc51xx support based on tmc50xx implementation. Signed-off-by: Anders Nielsen <anders.nielsen@prevas.dk>
This commit is contained in:
parent
242e6ea12a
commit
b98bd7c145
6 changed files with 967 additions and 2 deletions
|
@ -8,19 +8,115 @@
|
|||
|
||||
adi_tmc50xx: adi_tmc50xx@0 {
|
||||
compatible = "adi,tmc50xx";
|
||||
status = "okay";
|
||||
reg = <0x0>;
|
||||
spi-max-frequency = <0>;
|
||||
spi-max-frequency = <8000000>;
|
||||
label = "tmc5041_0";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clock-frequency = <1>;
|
||||
|
||||
poscmp-enable; test-mode; lock-gconf; /* ADI TMC Global configuration flags */
|
||||
clock-frequency = <16000000>; /* Internal/External Clock frequency */
|
||||
|
||||
tmc50xx_0: tmc50xx_0@0 {
|
||||
status = "okay";
|
||||
reg = <0>;
|
||||
|
||||
/* common stepper controller settings */
|
||||
invert-direction;
|
||||
micro-step-res = <256>;
|
||||
|
||||
/* ADI TMC stallguard settings specific to TMC50XX */
|
||||
activate-stallguard2;
|
||||
stallguard-velocity-check-interval-ms=<100>;
|
||||
stallguard2-threshold=<9>;
|
||||
stallguard-threshold-velocity=<500000>;
|
||||
|
||||
/* ADI TMC ramp generator as well as current settings */
|
||||
vstart = <10>;
|
||||
a1 = <20>;
|
||||
v1 = <30>;
|
||||
d1 = <40>;
|
||||
vmax = <50>;
|
||||
amax = <60>;
|
||||
dmax = <70>;
|
||||
tzerowait = <80>;
|
||||
vhigh = <90>;
|
||||
vcoolthrs = <100>;
|
||||
ihold = <1>;
|
||||
irun = <2>;
|
||||
iholddelay = <3>;
|
||||
};
|
||||
|
||||
tmc50xx_1: tmc50xx_1@1 {
|
||||
status = "okay";
|
||||
reg = <1>;
|
||||
|
||||
/* common stepper controller settings */
|
||||
invert-direction;
|
||||
micro-step-res = <256>;
|
||||
|
||||
/* ADI TMC stallguard settings specific to TMC50XX */
|
||||
activate-stallguard2;
|
||||
stallguard-velocity-check-interval-ms=<100>;
|
||||
stallguard2-threshold=<9>;
|
||||
stallguard-threshold-velocity=<500000>;
|
||||
|
||||
/* ADI TMC ramp generator as well as current settings */
|
||||
vstart = <10>;
|
||||
a1 = <20>;
|
||||
v1 = <30>;
|
||||
d1 = <40>;
|
||||
vmax = <50>;
|
||||
amax = <60>;
|
||||
dmax = <70>;
|
||||
tzerowait = <80>;
|
||||
vhigh = <90>;
|
||||
vcoolthrs = <100>;
|
||||
ihold = <1>;
|
||||
irun = <2>;
|
||||
iholddelay = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
adi_tmc51xx: adi_tmc51xx@1 {
|
||||
compatible = "adi,tmc51xx";
|
||||
status = "okay";
|
||||
reg = <0x01>;
|
||||
spi-max-frequency = <8000000>;
|
||||
label = "tmc5160_1";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
en-pwm-mode; test-mode; /* ADI TMC Global configuration flags */
|
||||
clock-frequency = <16000000>; /* Internal/External Clock frequency */
|
||||
|
||||
/* common stepper controller settings */
|
||||
invert-direction;
|
||||
micro-step-res = <256>;
|
||||
|
||||
/* ADI TMC stallguard settings specific to TMC5160 */
|
||||
activate-stallguard2;
|
||||
stallguard-velocity-check-interval-ms=<100>;
|
||||
stallguard2-threshold=<9>;
|
||||
stallguard-threshold-velocity=<50000>;
|
||||
|
||||
/* ADI TMC ramp generator as well as current settings */
|
||||
vstart = <10>;
|
||||
a1 = <20>;
|
||||
v1 = <30>;
|
||||
d1 = <40>;
|
||||
vmax = <50>;
|
||||
amax = <60>;
|
||||
dmax = <70>;
|
||||
tzerowait = <80>;
|
||||
thigh = <90>;
|
||||
tcoolthrs = <100>;
|
||||
tpwmthrs = <110>;
|
||||
tpowerdown = <120>;
|
||||
ihold = <1>;
|
||||
irun = <2>;
|
||||
iholddelay = <3>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue