If the police ask you for your pass code to unlock your phone, you can invoke your 5th Amendment right and stay silent.
Yes, the government can't compel you to reveal your passcode.
But it can, under some circumstances, compel you to enter the passcode yourself and decrypt your phone. The law in this area isn't settled yet. We've had conflicting decisions with regard to the circumstances under which the government can compel you to use a passcode to decrypt things.
The issue is the proper application of the forgone conclusion rule. That rule applies when an act of production - e.g., turning over certain documents as might be required by a subpoena - involves an element of implied testimony. For instance, if retrieving the documents to turn them over necessarily implies that you know of the existence of the documents, and the government can't otherwise demonstrate that fact, then the government likely can't compel you to produce those documents. The government needs to be able to demonstrate that the (useful) information conveyed by the act of production is a foregone conclusion. (The law in this area is somewhat more nuanced than I suggest here, but I don't want to get lost in that.)
When it comes to decrypting things, the question is what is the relevant forgone conclusion. Is it, e.g., that particular information is on the device (or rather, would be if it were decrypted)? Or is it, e.g., just that the person (who might be compelled to use a passcode to decrypt it) knows how to decrypt the device? Different courts have come to different conclusions in this area. A federal district court in California recently concluded, in U.S. v Spencer, that it is the latter. That would mean that the government can compel you to enter your passcode to decrypt a smartphone if it can independently demonstrate that you know the passcode. I fear that is the standard which will ultimately be settled on (by, perhaps, the Supreme Court).
What citysnaps said is more or less correct. Generally speaking the government can't compel you to reveal your passcode, even if it can compel you to use your passcode to decrypt a device. The forgone conclusion rule is an exception within act of production doctrine. It doesn't apply when it comes to actual statements by defendants, it only applies to implied statements that are inherent in acts of production.