All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] raspberrypi3: fix serial console (load pi3-miniuart-bt overlay)
Date: Mon, 9 May 2016 22:51:50 +0200	[thread overview]
Message-ID: <20160509225150.7f4f40e7@gmx.net> (raw)
In-Reply-To: <CAFGQKxc63EUZX8RNL_NE=VWnsVf_CoyK5b9K_SWyk2rgc4CutA@mail.gmail.com>

Hello Martin,

On Mon, 9 May 2016 14:19:48 +0100, Martin Bark <martin@barkynet.com> wrote:

> Peter,
> 
> On 3 May 2016 at 20:02, Peter Seiderer <ps.report@gmx.net> wrote:
> > Hello Martin,
> >
> > On Tue, 3 May 2016 11:23:50 +0100, Martin Bark <martin@barkynet.com> wrote:
> >
> >> All,
> >>
> >> On 3 May 2016 at 07:18, Peter Korsgaard <peter@korsgaard.com> wrote:
> >> >>>>>> "Oscar" == Oscar Gomez Fuente <oscargomezf@gmail.com> writes:
> >> >
> >> >  > Hi Peter Seiderer,
> >> >  > What's the difference between enabling pi3-miniuart-bt instead of
> >> >  > pi3-disable-bt?
> >> >
> >> >  > With pi3-disable-bt enables it works fine the serial console on (14 [TxD] &
> >> >  > 15 [RxD] pins).
> >> >
> >> > From the names I would guess it is the difference between completely
> >> > disabling access to the bluetooth module and providing access to it
> >> > though the secondary (mini) uart.
> >> >
> >> > The miniuart has some limitations, but I guess basic bluetooth stuff
> >> > should work with it.
> >>
> >> I've got a bit lost in the rpi3 serial console issues but as i
> >> understand the current situation all you need to do is set
> >> enable_uart=1 in config.txt.  See
> >> https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644.
> >> I've not tested this.
> >>
> >> I think you also need to change cmdline.txt to use console=serial0 as
> >> the pi3-miniuart-bt will replace it with the correct serial device
> >> (ttyAMA0 or ttyS0) depending if it's enabled or not.  See the comments
> >> in https://github.com/raspberrypi/linux/blob/rpi-4.1.y/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts.
> >>
> >
> > This works too, not sure whats the better solution, explicit via device tree overlay
> > or some firmware magic....
> >
> > - pi3-miniuart-bt 'dmesg | grep tty':
> > [    0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200
> > [    0.001320] console [tty1] enabled
> > [    0.318181] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550
> > [    2.008162] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
> > [    3.296233] console [ttyAMA0] enabled
> >
> > - enable-uart=1, serial0 dmesg | grep tty':
> > [    0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xa60340 smsc95xx.macaddr=B8:27:EB:A6:03:40 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyS0,115200
> > [    0.001318] console [tty1] enabled
> > [    0.318270] console [ttyS0] disabled
> > [    0.318389] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550
> > [    1.042714] console [ttyS0] enabled
> > [    3.020277] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
> >
> 
> I wonder if the solution is to just document the situation in
> board/raspberrypi/readme.txt.  The documentation could just detail the
> available choices for Bluetooth and serial console on the rpi3 and how
> to configure each manually.  A summary of the available choices is:
> 
> 1) Default setup - Serial console does not work, Bluetooth works
> 2) Add enable-uart=1 - Serial console works but the core frequency is
> fixed.  Serial console max baud rate is less than the rpi2. Bluetooth
> works.
> 3) Use pi3-miniuart-bt - Serial console works the same as the rpi2 but
> Bluetooth runs slow.
> 4) Use pi3-disable-bt - Serial console works the same as the rpi2 but
> Bluetooth is disabled.
> 
> What do you think?

Agreed, with bias to 3) as the default (or one of the other solutions with
serial console enabled)...

Regards,
Peter

> 
> Thanks
> 
> Martin
> 
> > Regards,
> > Peter
> >
> >
> >> Thanks
> >>
> >> Martin
> >>
> >> >
> >> > --
> >> > Venlig hilsen,
> >> > Peter Korsgaard
> >> > _______________________________________________
> >> > buildroot mailing list
> >> > buildroot at busybox.net
> >> > http://lists.busybox.net/mailman/listinfo/buildroot
> >

  reply	other threads:[~2016-05-09 20:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02 20:25 [Buildroot] [PATCH v2] raspberrypi3: fix serial console (load pi3-miniuart-bt overlay) Peter Seiderer
2016-05-03  5:58 ` Oscar Gomez Fuente
2016-05-03  6:18   ` Peter Korsgaard
2016-05-03 10:23     ` Martin Bark
2016-05-03 19:02       ` Peter Seiderer
2016-05-09 13:19         ` Martin Bark
2016-05-09 20:51           ` Peter Seiderer [this message]
2016-05-09 20:53             ` Thomas Petazzoni
2016-06-09 20:46         ` Thomas Petazzoni
2016-08-11 22:02           ` Peter Seiderer
2016-09-18 17:23 ` Thomas Petazzoni
2016-09-19 21:57   ` Peter Seiderer

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=20160509225150.7f4f40e7@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /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.