cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
2,509 Views
Registered: ‎05-22-2017

Using more than 16 UART Devices

Jump to solution

I'm trying to access more than 16 serial devices on our zynq board, but there seems to be an issue where any ports identified as serial16 or greater in the device tree is ignored.

 

so if I use

 

serial0 = (address of ps_uart0)

serial1 = (address of ps_uart1)

serial2 = (address of pl_uart0)

.

.

.

serial16 = (address of pl_uart14)

 

or

 

serial0 = (address of ps_uart0)

serial1 = (address of pl_uart0)

serial2 = (address of pl_uart1)

.

.

.

serial16 = (address of ps_uart1)

 

regardless of device in serial16, it will not be initialized in the kernel.

 

Is there a configuration file, do I need to modify a node in the device tree, or do I need to recompile petalinux to user more than 16 UART ports?

0 Kudos
1 Solution

Accepted Solutions
4,131 Views
Registered: ‎05-22-2017

The plot thickened when I found a sister version of our build where we used ttyS0 and ttyS1 in addition to ttyPS0 and ttyPS1. I opened that device-tree and found that several devices were missing from the alias list. It turns out, that specifying all serial ports using aliases, can lead to interesting behavior in the device-tree. Namely:

  • Can't use ttyS0 & ttyS1 with ttyPS0 & ttyPS1
  • Limited to a total of 16 serial devices, regardless of UARTPS or UARTNS

The solution is to stop enumerating aliases early and leave the serial ports otherwise detailed later on in the tree. For this project, I stopped enumerating at serial14, any later (serial15) and the device wouldn't boot, or wouldn't enumerate ttyS0 & ttyS1

View solution in original post

0 Kudos
3 Replies
rfs613
Scholar
Scholar
2,490 Views
Registered: ‎05-28-2013

There is a limit in the kernel, so you may need to recompile the kernel:

 

It depends which driver (in turn that depends on which IP core you are using for UARTS).

 

If you are using Xilinx UARTS:

https://github.com/Xilinx/linux-xlnx/commit/0f44bb058a40e26e99fdec7782c5db55a3c92d1a

 

If you are using standard 8250/16650 UARTS:

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/tty/serial/8250/Kconfig#L149

 

I have not tried adding so many UARTS. It's possible there are other limitations, eg. in device tree syntax, or in your root filesystem for generating the /dev/ttyS entries, etc.

0 Kudos
4,132 Views
Registered: ‎05-22-2017

The plot thickened when I found a sister version of our build where we used ttyS0 and ttyS1 in addition to ttyPS0 and ttyPS1. I opened that device-tree and found that several devices were missing from the alias list. It turns out, that specifying all serial ports using aliases, can lead to interesting behavior in the device-tree. Namely:

  • Can't use ttyS0 & ttyS1 with ttyPS0 & ttyPS1
  • Limited to a total of 16 serial devices, regardless of UARTPS or UARTNS

The solution is to stop enumerating aliases early and leave the serial ports otherwise detailed later on in the tree. For this project, I stopped enumerating at serial14, any later (serial15) and the device wouldn't boot, or wouldn't enumerate ttyS0 & ttyS1

View solution in original post

0 Kudos
ibra.hi
Visitor
Visitor
1,443 Views
Registered: ‎04-10-2018

Hi,Alex. I'm a newbie for petalinux and zynq.I want to enable UART0 as serial1(address of ps_uart1)on the zedboard and that doesn't work,and I don't know which progress I do was wrong.Do you have expriences to enable two UARTs on ZYNQ PS? Any word or tutorial will be helpful.

0 Kudos