Additional UART in u-boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Additional UART in u-boot

Jump to solution
4,556 Views
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 Kudos
1 Solution
3,743 Views
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.

View solution in original post

2 Replies
3,744 Views
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.

3,743 Views
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 Kudos