5V input on Portenta Machine control

Hello,
I would like to read a digital dial indicator with my Portenta machine control.

I followed this tutorial and got it working on an UNO, reading clock and data at 3V.
Porting it over to the PMC, it requires 24V (12V min) for the digital inputs.
If I power the programable input/output pins with 5V, can I read the calipers data at 5V instead of level shifting to 24V (it shifts right back down to 3.3V on the board. )