I'm trying to obtain U-Boot Serial Console logs over UART4. By default, for var-som-symphony board, the stdout uart is uart2. I can obtain serial logs over uart2, but I need to change it to uart4. I'm attaching a diff file summarizing the changes I have made to get logs on uart4. For an overview the changes are:
What more changes should I need to make?
Our custom hardware made use of all the i.MX8MP UART1 muxable pins for other things. So we needed to move the serial console for both U-Boot and Linux to UART2. For reference, the version of u-boot seems to derive from an intial branch that is circa mid 2022. Specifically our u-boot was a Variscite curated/maintained version that is labeled "lf_v2022.04_var02".
To move the linux console from uart 1 to uart 2 involved changing the command line argument that is passed from u-boot to linux when u-boot starts linux. That can be done with a boot script or by changing the u-boot environment, and that has been the same or similar for a very long time.
To move the u-boot serial console involved changing the u-boot "top level" device tree which included a node called "chosen" that has a parameter called "stdout-path" which was set to "&uart1". It also involved making sure that uart2 was enabled in more places than you think it needs to be enabled, and making sure that the pins are properly muxed. To do that I started at that top level "dts" file, and found all the "uart1" references and changed them to "uart2". Then edited all the #include files in the top level dts (and below) to find all the "uart1" references and changed them to "uart2". Lastly, make sure that you mux the proper pins for the uart2 that you need as well.
Hello, Where you ever able to get your switch from UART2 over to UART4 to work?
Which version of uboot are you using?
I am also developing using a imx8mp and need to switch debug ports in uboot and am using uboot-2020-10.
I did not find the suggested blog useful.
Thank you
You can see the patch modify and How to Change i.MX8MM evk Linux Debug UART.pdf