https://www.washingtonpost.com/news/volokh-conspiracy/wp/201...
I was surprised to read that he thinks (and previously thought) this would be the right ruling. My non-lawyer tl;dr is that your passcode isn't "testimony": the government knows the passcode exists and that you know passcode, and therefore it isn't subject to the same protection that would apply to telling the government some piece of information that may or may not exist and is inherently interesting. At the very least, he claims, the government is absolutely in the clear to compel you to enter your passcode and not reveal what it is.