Install tmc2130 stepper drivers with SPI interface
Install latest marlin with tmc2130 driver support and enable it in configuration_adv.h
One of the extra pin on the driver is wired to the endstop pins.
NB it only detects lack of movement in the direction of movement, so good for endstops and some skip detection
See toms guide for ramps... [
toms3d.org]
NB if you have a LCD its harder, as you need to get to the SPI pins, which is used by the LCD cables (depending on the controller)