I have almost read all the documents online and the discussion in the forums but still couldn't get through this pin muxing.
I changed the function of the UART 2 pads in the device tree file imx6ull-14x14-evk.dts located in the folder (yocto/build/tmp/work-shared/imx6ull14x14evk/kernel-source/arch/arm/boot/dts) as below,
MX6UL_PAD_UART2_RTS_B__FLEXCAN2_RX 0x1b020
MX6UL_PAD_UART2_CTS_B__FLEXCAN2_TX 0x1b020
--------------------------------to----------------------------------------
MX6UL_PAD_UART2_RTS_B__GPIO1_IO23 0x1b020
MX6UL_PAD_UART2_CTS_B__GPIO1_IO22 0x1b020
but still i couldnt change the value of the GPIO23 that i exported through sysfs. It remains low all the time. I'm looking for steps that I need perform in order to make UART 2 pin as GPIO.
Any help would be much appreciated.