i.MX8MP Changing default uart from UART2 to UART4 for u-boot console logs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX8MP Changing default uart from UART2 to UART4 for u-boot console logs

4,037件の閲覧回数
harsh1621
Contributor II

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:

  1. include/configs/imx
    • Change CONFIG_MXC_UART_BASE to UART4_BASE_ADDR
    • Change console in environment variables to console=ttymxc3,115200\0
  2. imx8mp-var-som-symphony-u-boot.dtsi:
    • Changes all instances of uart2 to uart4 /arch/arm/dts/imx8mp-var-som-symphony.dts:
    • Change stdout-path to uart4
    • Change bootargs to include ttymxc3
    • replace uart2 instances with uart4, replace the pin macros for UART2 with UART4

What more changes should I need to make?

タグ(3)
0 件の賞賛
返信
4 返答(返信)

9件の閲覧回数
rob_mclean
Contributor IV

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.  

0 件の賞賛
返信

3,649件の閲覧回数
justincobb
Contributor III

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

0 件の賞賛
返信

3,644件の閲覧回数
Rita_Wang
NXP TechSupport
NXP TechSupport

You can see the patch modify and How to Change i.MX8MM evk Linux Debug UART.pdf

0 件の賞賛
返信

4,026件の閲覧回数
Rita_Wang
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信