public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/7] RPi: Properly handle dynamic serial configuration
@ 2018-01-17  8:54 Alexander Graf
  2018-01-17  8:54 ` [U-Boot] [PATCH v2 1/7] serial: Use next serial device if probing fails Alexander Graf
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Alexander Graf @ 2018-01-17  8:54 UTC (permalink / raw)
  To: u-boot

The RPi has proprietary firmware that can be configured (using config.txt)
to expose either the PL11, Mini-UART or no serial device to the UART pins
on the GPIO pin bar of the RPi.

So far we've only half-heartedly dealt with that, with lost of heuristics
that ended up falling apart at times. For example the RPi3 CM uses PL011
when serial is enabled in config.txt, but we disabled PL11 support for BCM2837
because the RPi3 uses the Mini-UART with enable_uart=1 is set in config.txt.

This patch set always enables both serial outputs and determines at probe
time whether a serial device is actually muxed to the UART pins on the board.
Only in that case, it will be probed and thus used for in- and output in
U-Boot.

With this patch set applied, I have successfully used the same U-Boot binary
with CONFIG_OF_BOARD=y and a RPi firmware provided device tree with both
enable_uart=1 and without on both a RPi3 and RPi3 CM.

This patch set depends on the patch set "Rpi: Add support for second sd host
controller".

v1 -> v2:

  - Make search logic easier to follow

Alexander Graf (7):
  serial: Use next serial device if probing fails
  serial: Allow boards to determine whether a serial device is usable
  rpi: Remove runtime disabling support for serial
  serial: bcm283x_mu: Remove support for post-init disabling
  rpi: Properly detect which serial device is active
  rpi: Determine PL011/Mini-UART availability at runtime
  rpi: Force skip_init on serial devices

 arch/arm/mach-bcm283x/include/mach/gpio.h    |  1 -
 board/raspberrypi/rpi/rpi.c                  | 91 +++++++++++++++++++---------
 drivers/gpio/bcm2835_gpio.c                  |  2 +-
 drivers/serial/serial-uclass.c               | 36 +++++++++--
 drivers/serial/serial_bcm283x_mu.c           | 20 +-----
 drivers/serial/serial_pl01x.c                |  2 +-
 include/configs/rpi.h                        |  5 +-
 include/dm/platform_data/serial_bcm283x_mu.h |  1 -
 include/serial.h                             | 11 ++++
 9 files changed, 108 insertions(+), 61 deletions(-)

-- 
2.12.3

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

end of thread, other threads:[~2018-01-17 23:18 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17  8:54 [U-Boot] [PATCH v2 0/7] RPi: Properly handle dynamic serial configuration Alexander Graf
2018-01-17  8:54 ` [U-Boot] [PATCH v2 1/7] serial: Use next serial device if probing fails Alexander Graf
2018-01-17 10:54   ` Heinrich Schuchardt
2018-01-17 19:34   ` Simon Glass
2018-01-17 22:02     ` Alexander Graf
2018-01-17  8:54 ` [U-Boot] [PATCH v2 2/7] serial: Allow boards to determine whether a serial device is usable Alexander Graf
2018-01-17 19:39   ` Simon Glass
2018-01-17 22:03     ` Alexander Graf
2018-01-17 22:11       ` Simon Glass
2018-01-17 22:37         ` Alexander Graf
2018-01-17 23:18           ` Simon Glass
2018-01-17  8:54 ` [U-Boot] [PATCH v2 3/7] rpi: Remove runtime disabling support for serial Alexander Graf
2018-01-17  8:54 ` [U-Boot] [PATCH v2 4/7] serial: bcm283x_mu: Remove support for post-init disabling Alexander Graf
2018-01-17  8:54 ` [U-Boot] [PATCH v2 5/7] rpi: Properly detect which serial device is active Alexander Graf
2018-01-17 19:46   ` Simon Glass
2018-01-17 22:05     ` Alexander Graf
2018-01-17 23:18       ` Simon Glass
2018-01-17  8:54 ` [U-Boot] [PATCH v2 6/7] rpi: Determine PL011/Mini-UART availability at runtime Alexander Graf
2018-01-17  8:54 ` [U-Boot] [PATCH v2 7/7] rpi: Force skip_init on serial devices Alexander Graf
2018-01-17 19:40   ` Simon Glass
2018-01-17 22:08     ` Alexander Graf
2018-01-17 23:18       ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox