That's a serious constitutional question that's still making its way through the courts.
The more practical question is, if you do get stopped, is, is it worth it to refuse?
If you've got actual incriminating data on your phone, or phone that's easily misconstrued as incriminating, then the answer is probably Yes. It's worth risking arrest to refuse to decrypt your phone. (It bears noting that people have been threatened with sex offender raps for pretty damn innocuous comics on their laptops.)
But if your data's boring, it might be worth it to you to play along. Especially if you're not a clean-cut white guy.
I don't like advising people to submit to what I consider to be a clear case of unreasonable search and seizure. But I also know that, realistically, going to jail and potentially spending years on a wrongful arrest suit are not worth the trouble for most people -- and, again, I realize that it's a sign of privilege that I personally probably wouldn't get arrested just for refusing to unlock my phone.