linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* How does the kernel assign ttySn to UARTs?
@ 2016-08-08 19:56 Patrick Doyle
  2016-08-08 21:03 ` Frank Rowand
  2016-08-09 14:55 ` Patrick Doyle
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Doyle @ 2016-08-08 19:56 UTC (permalink / raw)
  To: linux-arm-kernel

I am playing the the device tree for my (Atmel, SAMA5D2x) device and
find myself confused by the assignment of ttySn devices to UARTs and
FLEXCOM devices.

I started off assuming that the

    alias {
        serial0 = &uart2;
    };

stanza I put in my device tree resulted in ttyS0 being aliased to
uart2 (serial at f8024000).  But when I attempted to change the alias to
uart5 (the label for UART defined in flexcom at fc018000) I was surprised
and confused by the fact that the console continued to spew forth on
UART2.

So I tried removing the "alias" stanza from the device tree.  The
console still showed up on UART2.

I wondered if it might have something to do with the order that
devices show up in the device tree, so I swapped UART2 & UART3, but
the console still showed up on UART2.

Just to make sure I wasn't losing my mind, I decided to comment UART2
out completely... and then the console showed up on FLEXCOM4.  Not
UART3, but FLEXCOM4!

Now I'm really confused.  Now it is time to ask the experts.

FWIW, my kernel command line contains "console=ttyS0", while my device
tree enables UART2, UART3, and FLEXCOM4 (which us configured as a
UART).  Nowhere do I enable UART0, so I am also confused has to how
/dev/ttyS0 gets mapped to UART2 or FLEXCOM4.

Would any experts out there care to point me in the direction of some clues?

Thanks.

--wpd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-09 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08 19:56 How does the kernel assign ttySn to UARTs? Patrick Doyle
2016-08-08 21:03 ` Frank Rowand
2016-08-09 14:55 ` Patrick Doyle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).