If UART2 is needed, the LS1021A RCW should be changed. See the Section 3.4.1 of the LS1021A Reference Manual.
Usually u-boot provides console configuration. NXP SDK for the TWR-LS1021A board, LS1021A-IOT board support LPUART
See attached file. This file is available using the following path in u-boot source folder: /include/configs
Check UART ports under Linux on your board using the following commands:
dmesg | grep tty
and
setserial -g /dev/ttyS*
stty 9600 -F /dev/ttyS1
stty -F /dev/ttyS1
echo "HELLO" > /dev/ttyS1
Test serial ports on your board using the following page:
http://www.armadeus.com/wiki/index.php?title=Serial_ports_usage_on_Linux
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------