Hell consider what happens if you dont even know what the password/pin is. Can they hold you indefinately until you guess what it is or they beleive you don't know?
I’m in that situation now, I dont know most of my passwords anymore. Most of my passwords now are all generated random for me an locked in a vault with a master key for my protection. If I forget it welp I’m screwed and the device self-wipes. Even Apple wouldn’t be able to help me if I forgot my password.
Ultimately the government is on the loosing side of this argument. They cannot (without some very specific probable cause and direct witness of broken laws) hold you and compel you out of self-incrimination and your first right “the right to remain silent”. They may have a warrant to search your house, but they can force me to unlock the door.