Page 496 of Collins Cobuild English Usage reads
WARNING: many people use used to instead of use to in questions. However, some people consider that this use is incorrect.
Did you used to play with your trains?
If the 'wh'-word is the object of the clause, or part of the object, you use the auxiliary do after it, followed by the subject and used to.
What did you used to do on Sundays?
EDIT
You form 'yes/no'-questions with used to by putting did in front of the subject, followed by use to: Did you use to do that, when you were a kid?
Why isn't use to possible in the second structure?