Cannot access Trezor Model T with passphrases enabled
Using the latest electrum and trezorlib code, the Trezor Model T works in Electrum as long as passphrases are not enabled.

If passphrases are enabled, then the device asks you to choose whether to enter the passphrase on the device or the "host" (i.e. Electrum).
-If you choose to enter the passphrase on the device, the device screen goes blank and Electrum shows a prompt for a passphrase. When anything is entered Electrum gives an error: "Passphrase entered when it should not be"
-if you choose to enter the passphrase on the host. the device shows "Please type passphrase on connected host" and Electrum shows a prompt for a passphrase.  When anything is entered Electrum gives an error: "Got <class 'trezorlib.messages.PassphraseStateRequest.PassphraseStateRequest>, expected (<class ' trezorlib.messages.PublicKey.PublicKey'>,)"

I am able to use trezorlib directly to get addresses from the device while passphrases are enabled, in which case passphrases are correctly accepted on either the device or host as per the user's choice.
diff --git a/plugins/trezor/clientbase.py b/plugins/trezor/clientbase.py
index 687d31c4d..6e10d4c49 100644
--- a/plugins/trezor/clientbase.py
+++ b/plugins/trezor/clientbase.py
@@ -55,6 +55,9 @@ class GuiMixin(object):
         return self.proto.PinMatrixAck(pin=pin)
 
     def callback_PassphraseRequest(self, req):
+        if req and hasattr(req, 'on_device') and req.on_device is True:
+            return self.proto.PassphraseAck()
+
         if self.creating_wallet:
             msg = _("Enter a passphrase to generate this wallet.  Each time "
                     "you use this wallet your {} will prompt you for the "
@@ -68,6 +71,9 @@ class GuiMixin(object):
         passphrase = bip39_normalize_passphrase(passphrase)
         return self.proto.PassphraseAck(passphrase=passphrase)
 
+    def callback_PassphraseStateRequest(self, msg):
+        return self.proto.PassphraseStateAck()
+
     def callback_WordRequest(self, msg):
         self.step += 1
         msg = _("Step {}/24.  Enter seed word as explained on "
['plugins/trezor/clientbase.py']