Hi Chayma
one can look at documentation
for example MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140, value 0x140 is described in
sect.8.2.5.291 Pad Control Register (IOMUXC_SW_PAD_CTL_PAD_UART1_RXD)
i.MX 8M Mini Applications Processor Reference Manual
Direction can be set in uboot.
Best regards
igor