In the US, he could have refused to give the pin and that's protected under the 5th Amendment. They would have nothing because they couldn't get into the encrypted phone.

In many countries other then the US like Ireland, they have key disclosure laws which require you to testify against yourself.

In the UK, police can even require key disclosure without a judge.

Wait 'till you hear about the special criminal court...