You can use both expressions fine.
Eg, Say you were explaining to a foreigner in Japan on using a vending machine who had never used one before. You could say something like this,
> All you have to do is ,press the button and a drink will come out.
>
>
>
> All you have to do is study and you will pass.
>
>
I see where "only" is implied and using "all you have to do" as the meaning "you only have to do...."
Hope that helps.