Additional UART in u-boot

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

Additional UART in u-boot

ソリューションへジャンプ
5,249件の閲覧回数
david_schmidt
Contributor II

Hi,

I need to use an additional UART interface (UART2) in my case during u-boot to send and recevice data to a peripheral. My u-boot console should still work with my current UART interface (UART1).

I have added my UART2 to my dtsi file:

&uart2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart2>;
    status = "okay";
};

I suppose I need 3 functions, uart_init, uart_putc and uart_getc.

Can I use the routines from /drivers/serial/serial_mxc.c?

It allows only using one UART interface, defined by

#define UART_PHYS   CONFIG_MXC_UART_BASE

Thanks for the help.

0 件の賞賛
返信
1 解決策
4,436件の閲覧回数
david_schmidt
Contributor II

To use an additional UART interface in u-boot, one can copy the functions from /drivers/serial/serial_mxc.c.

The thing I missed was the 

imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));

pin initialization in the board.c, but this only works in board_init or board_late_init, and not in board_early_init_f

After that, the send and receive functions work properly.

元の投稿で解決策を見る

2 返答(返信)
4,437件の閲覧回数
david_schmidt
Contributor II

To use an additional UART interface in u-boot, one can copy the functions from /drivers/serial/serial_mxc.c.

The thing I missed was the 

imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));

pin initialization in the board.c, but this only works in board_init or board_late_init, and not in board_early_init_f

After that, the send and receive functions work properly.

4,436件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi David

one can look at implementation of this feature on other boards and post

issue on uboot mail list

[U-Boot] [PATCH 02/18] Blackfin: uart: add multiple serial support 

lists.denx.de Mailing Lists 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信