Can all TTLs be used both for input and output?

Yes. There are two types of gateware I/O, one output-only and one that can be switched between output and input mode at runtime. The type of I/O is defined at compilation time and changing it requires rebuilding the bitstream and reflashing the board. What board/variant are you using and where did you get it from?
With the Sinara cards, you also need to set the direction DIP switch accordingly.

    3 years later

    sb10q

    If I use the kasli-SoC, how do I refresh my reflashing the board?

    I purchased the 2128 SMA-TTL board from m-labs, originally configured with channels 0-3 as input and channels 4-7 as output. I want to change all channels to input. I have already updated my device_db.py file, switched the DIP switch, and the panel shows a red light. However, channels 4-7 are unable to receive signals. Am I missing any steps? (PS: Channels 0-3 are working fine.) thx !!!