The TMC2041 does not have internal ramping so this would have to be handled by the microcontroller. Alternatively the TMC5041 is a pin compatible version that does have internal ramping, and there is an excel spreadsheet available on the product page which allows calculations for target velocities and optimal acceleration values:
https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC50XX_Calculations.xlsx