there is a bug on Quartus, so you need to affect TDO and use it as OUTPUT only;
from ALTERA/Support
"Why can’t I access the MAX 10 device via JTAG even though JTAGEN is pulled high in user mode?"
https://www.altera.com/support/support-resources/knowledge-base/solutions/rd03222016_95.html "How do I gain access to the JTAG pins of my MAX 10 device if I have enabled the JTAG pin sharing option, and the Quartus Prime Programmer is unable to auto detect the device?"
https://www.altera.com/support/support-resources/knowledge-base/solutions/rd05192016_963.html