Why do UART2 and UART5 print logs when the system boots up?

The log is as follows:

How can I modify it to remove this log?

Because I need to communicate with the microcontroller through these two serial ports.

Hi Chip-Richard,

The UARTs enabled in UEFI DTB will be used for console output.
You can keep UEFI and Kernel DTB separate.
By default, kernel and UEFI use the similar DTB as following(snippet from jetson-agx-thor-devkit.conf )

DTB_FILE="tegra264-p4071-0000+p3834-0008-nv.dtb";
TBCDTB_FILE="${DTB_FILE}";