Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/1] Implement BCM2835 AUX RTS/CTS auto flow control
@ 2026-08-06 15:42 Jan Čermák
  2026-08-06 15:42 ` [PATCH 1/1] serial: 8250_bcm2835aux: Add support for " Jan Čermák
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Čermák @ 2026-08-06 15:42 UTC (permalink / raw)
  To: gregkh, jirislaby, florian.fainelli, rjui, sbranden
  Cc: Jan Čermák, phil, stefan, bcm-kernel-feedback-list,
	linux-serial, linux-rpi-kernel, linux-arm-kernel, linux-kernel

Hi everyone,

this is my attempt at adding hardware flow control to the BCM2835 AUX UART
driver. The hardware supports it and the driver source has always noted
that, but it was never implemented.

The driving factor for this contribution was that this peripheral is used
on Raspberry Pi as the alternative muxable UART for the BCM43455 Bluetooth
chip, should the user decide to use the "full" PL011 UART on the pin
header. But this always led to some compromises, as the mini UART wasn't as
robust as PL011, mainly because of the missing flow control. We use it for
Home Assistant Yellow, which is essentially a carrier board for CM4/CM5,
and with the recent update of the (downstream) Linux kernel to 6.18, the
Bluetooth started to be significantly flaky and failing to initialize on
boot [1]. Diagnostics showed that these failures are caused by RX buffer
overruns during the initialization, which were probably always present, but
some other changes apparently added up to greater instability of the
driver, leading to overrun errors in approximately 40% of boots when using
the mini UART for the Bluetooth link at 230400 baud.

I've originally tested this patch applied in the downstream rpi-6.18.y
branch, using the mini UART for Bluetooth, which improved stability of the
Bluetooth initialization greatly and allowed clean initialization even when
bumping the baud rate to 1.5M. Then I applied this patch to latest mainline
and did a couple of simulations forcing the UART to throttle by filling the
LDISC buffer, with an FTDI adapter connected on the other side of the line.

Note that for this to come into effect, the uart-has-rtscts property needs
to be present in the DTS. No in-tree device tree sets it on uart1 - the
property only appears on the PL011 nodes (uart0 on bcm2711, uarta on
bcm2712) used for the Bluetooth link. Raspberry Pi has the CTS and RTS
lines hooked up and muxable though, so it can be easily enabled when
wanted.

At this point, the implementation seems to be fully working in my tests,
but there may be some subtle issues I don't see, as I'm not fully familiar
with the subsystem. I used an LLM extensively during the implementation (as
I properly disclose with the Assisted-by tag) though at this point I hope
the patch is far from a one-shot vibe-coded mess, but please review
carefully.

Regards,
Jan

[1] https://github.com/home-assistant/operating-system/issues/4898

Jan Čermák (1):
  serial: 8250_bcm2835aux: Add support for RTS/CTS auto flow control

 drivers/tty/serial/8250/8250_bcm2835aux.c | 160 +++++++++++++++++++++-
 1 file changed, 156 insertions(+), 4 deletions(-)


base-commit: 0d839570765118029aa8bf4a95444c6a11aacf85
-- 
2.55.0


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

end of thread, other threads:[~2026-08-06 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 15:42 [PATCH 0/1] Implement BCM2835 AUX RTS/CTS auto flow control Jan Čermák
2026-08-06 15:42 ` [PATCH 1/1] serial: 8250_bcm2835aux: Add support for " Jan Čermák

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