All of lore.kernel.org
 help / color / mirror / Atom feed
From: frowand.list@gmail.com (Frank Rowand)
To: linux-arm-kernel@lists.infradead.org
Subject: How does the kernel assign ttySn to UARTs?
Date: Mon, 8 Aug 2016 14:03:39 -0700	[thread overview]
Message-ID: <57A8F3AB.70306@gmail.com> (raw)
In-Reply-To: <CAF_dkJD5MEfNzrRqM3H_LkOmXC3XYjUYLe2=ZtzCjAS1A2TDmg@mail.gmail.com>

On 08/08/16 12:56, Patrick Doyle wrote:
> 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?

Try stdout-path in the device tree chosen node.
See Documentation/devicetree/bindings/chosen.txt

I'm not sure whether "console=ttyS0" will conflict with stdout-path.

> 
> Thanks.
> 
> --wpd
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

  reply	other threads:[~2016-08-08 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 19:56 How does the kernel assign ttySn to UARTs? Patrick Doyle
2016-08-08 21:03 ` Frank Rowand [this message]
2016-08-09 14:55 ` Patrick Doyle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57A8F3AB.70306@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.