Use the pl011 as console uart instead of the 'mini uart' a quirky
8250 alike.  By default the pl011 is used for bluetooth.

When com(4) takes over the console with the mini uart on rpi3 I see
a bunch of noise before output resumes and can't interact with the
console after it has booted.  With pluart(4) as console everything is
fine.

Quoting https://www.raspberrypi.org/documentation/configuration/uart.md

"Relevant differences between PL011 and mini UART
The mini UART has smaller FIFOs. Combined with the lack of flow
control, this makes it more prone to losing characters at higher
baudrates. It is also generally less capable than the PL011, mainly
due to its baud rate link to the VPU clock speed.

The particular deficiencies of the mini UART compared to the PL011 are:

- No break detection
- No framing errors detection
- No parity bit
- No receive timeout interrupt
- No DCD, DSR, DTR or RI signals"

One of the differences of the mini uart to 8250 is noted in
http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-June/006619.html

I've built a release with this diff and installed the result on rpi3b.

Index: ramdisk/Makefile
===================================================================
RCS file: /cvs/src/distrib/arm64/ramdisk/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- ramdisk/Makefile    3 Oct 2019 10:26:38 -0000       1.16
+++ ramdisk/Makefile    22 Oct 2019 10:22:57 -0000
@@ -36,6 +36,9 @@ PIFILES=\
        bcm2710-rpi-3-b-plus.dtb \
        bcm2710-rpi-cm3.dtb
 
+PIDTBO=\
+       disable-bt.dtbo
+
 all: ${FS}
 
 ${FS}: bsd.rd
@@ -49,11 +52,15 @@ ${FS}: bsd.rd
 .for FILE in ${PIFILES}
        cp ${PRPI}/${FILE} ${MOUNT_POINT}/
 .endfor
+       mkdir -p ${MOUNT_POINT}/overlays
+.for FILE in ${PIDTBO}
+       cp ${PRPI}/overlays/${FILE} ${MOUNT_POINT}/overlays/
+.endfor
        cp ${PUBOOT}/rpi_3/u-boot.bin ${MOUNT_POINT}/
        mkdir -p ${MOUNT_POINT}/efi/boot
        cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi
        echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh
-       echo 'arm_64bit=1\nenable_uart=1\nkernel=u-boot.bin' > 
${MOUNT_POINT}/config.txt
+       echo 
'arm_64bit=1\nenable_uart=1\ndtoverlay=disable-bt\nkernel=u-boot.bin' > 
${MOUNT_POINT}/config.txt
        dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \
            of=/dev/r`cat vnd`c bs=1024 seek=8
        umount ${MOUNT_POINT}
Index: ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/arm64/ramdisk/install.md,v
retrieving revision 1.13
diff -u -p -r1.13 install.md
--- ramdisk/install.md  3 Oct 2019 10:26:38 -0000       1.13
+++ ramdisk/install.md  22 Oct 2019 10:22:57 -0000
@@ -60,9 +60,12 @@ md_installboot() {
        rpi)
                cp $_mdec/{bootcode.bin,start.elf,fixup.dat,*.dtb} /mnt/mnt/
                cp $_mdec/u-boot.bin /mnt/mnt/
+               mkdir -p /mnt/mnt/overlays
+               cp $_mdec/disable-bt.dtbo /mnt/mnt/overlays
                cat > /mnt/mnt/config.txt<<-__EOT
                        arm_64bit=1
                        enable_uart=1
+                       dtoverlay=disable-bt
                        kernel=u-boot.bin
                __EOT
                ;;
Index: ramdisk/list
===================================================================
RCS file: /cvs/src/distrib/arm64/ramdisk/list,v
retrieving revision 1.11
diff -u -p -r1.11 list
--- ramdisk/list        7 Jun 2019 14:39:56 -0000       1.11
+++ ramdisk/list        22 Oct 2019 10:22:57 -0000
@@ -97,6 +97,7 @@ COPY  /usr/local/share/raspberrypi-firmwa
 COPY   /usr/local/share/raspberrypi-firmware/boot/bootcode.bin 
usr/mdec/rpi/bootcode.bin
 COPY   /usr/local/share/raspberrypi-firmware/boot/start.elf 
usr/mdec/rpi/start.elf
 COPY   /usr/local/share/raspberrypi-firmware/boot/fixup.dat 
usr/mdec/rpi/fixup.dat
+COPY   /usr/local/share/raspberrypi-firmware/boot/overlays/disable-bt.dtbo 
usr/mdec/rpi/disable-bt.dtbo
 COPY   /usr/local/share/u-boot/rpi_3/u-boot.bin usr/mdec/rpi/u-boot.bin
 
 COPY   /usr/local/share/u-boot/pine64_plus/u-boot-sunxi-with-spl.bin 
usr/mdec/pine64/u-boot-sunxi-with-spl.bin

Reply via email to