
Am 02.04.2017 um 10:26 schrieb Alex Deymo:
The Raspberry Pi 3 has two UART interfaces that can be pinmuxed to the header pins. The PL011 is by default muxed to the Bluetooth chip and the mini-UART can be muxed to the pin headers passing "enabled_uart=1"
"enable_uart=1"
in the config.txt file.
Passing "enable_uart=1" has other implications, since the baudrate of the miniuart depends on the clock frequency of the main core, which is normally dynamic unless enable_uart=1 is set. If Bluetooth is not used or not required, it is possible to set the PL011 UART to the header pins passing either "dtoverlay=pi3-disable-bt" or "dtoverlay=pi3-miniuart-bt" to disable Bluetooth or use it via the miniuart respectively.
This patch disables (for U-Boot) the UARTs modules not muxed to the
"UART modules" or "UARTs"
header pins so the serial port is used only if available in the header pins, avoiding writing to the Bluetooth chip if needed. This allows to enable the PL01X driver for the Raspberry Pi 3, previously disabled for that board, which can be used for the U-Boot console if properly configured in the device tree.
Note that in order to get the PL01X driver in the Raspberry Pi 3 to work with U-Boot the device tree must set "skip-init" in the uart0 block, for example this device tree fragment would do it:
fragment@0 { target = <&uart0>; __overlay__ { skip-init; }; };
Test: Booted a rpi3 with either UART output. Signed-off-by: Alex Deymo deymo@google.com
board/raspberrypi/rpi/rpi.c | 78 +++++++++++++++++++++++---------- drivers/serial/serial_pl01x.c | 3 ++ include/configs/rpi.h | 8 +++- include/dm/platform_data/serial_pl01x.h | 2 + 4 files changed, 66 insertions(+), 25 deletions(-)
I've given this patch a shot on the Zero W with rpi_defconfig, but no luck. I tried with and without enable_uart=1, and I enabled uart1 in the -b.dts. With vanilla U-Boot I got the rainbow screen; the patched master branch shows a black screen and some activity on the ACT LED.
Does the W require a new defconfig after all?
Regards, Andreas