From: "Kryštof Černý via B4 Relay" <devnull+cleverline1mc.gmail.com@kernel.org>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Heiko Stuebner" <heiko@sntech.de>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
"Kryštof Černý" <cleverline1mc@gmail.com>,
"Miroslav Ondra" <ondra@faster.cz>
Subject: [PATCH 2/2] serial: 8250_dw: Select U6_16550A for 64-byte FIFO
Date: Mon, 09 Nov 2026 15:41:00 +0100 [thread overview]
Message-ID: <20261109-8250-select-u6-64bit-v1-2-04bc8332fa34@gmail.com> (raw)
In-Reply-To: <20261109-8250-select-u6-64bit-v1-0-04bc8332fa34@gmail.com>
From: Kryštof Černý <cleverline1mc@gmail.com>
DesignWare 8250 ports that describe their FIFO in the CPR register are
always configured as PORT_16550A, regardless of the FIFO depth. On
UARTs with a 64-byte FIFO, such as those on the Rockchip RK3328, this
selects the 16-byte rxtrig_bytes table {1, 4, 8, 14}. The rx_trig_bytes
sysfs attribute then reports 8 bytes while the hardware triggers at 32,
and writes to it program the wrong trigger level.
Select PORT_U6_16550A when the CPR reports a 64-byte FIFO. Generic
autoconfig already assigns this type to a 16550A with a 64-byte FIFO,
and its rxtrig_bytes table matches the DesignWare FCR RT encoding.
The FIFO size, TX load size and capabilities are still taken from the
CPR, and the default FCR value is the same for both types, so the
hardware is programmed exactly as before. The port type reported to
userspace changes from 16550A to U6_16550A.
Co-developed-by: Miroslav Ondra <ondra@faster.cz>
Signed-off-by: Miroslav Ondra <ondra@faster.cz>
Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
---
drivers/tty/serial/8250/8250_dwlib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c
index 9bb02a4ab11f..ae556b06b03a 100644
--- a/drivers/tty/serial/8250/8250_dwlib.c
+++ b/drivers/tty/serial/8250/8250_dwlib.c
@@ -236,9 +236,9 @@ void dw8250_setup_port(struct uart_port *p)
/* Select the type based on FIFO */
if (reg & DW_UART_CPR_FIFO_MODE) {
- p->type = PORT_16550A;
p->flags |= UPF_FIXED_TYPE;
p->fifosize = DW_UART_CPR_FIFO_SIZE(reg);
+ p->type = (p->fifosize == 64) ? PORT_U6_16550A : PORT_16550A;
up->capabilities = UART_CAP_FIFO | UART_CAP_NOTEMT;
}
--
2.47.3
prev parent reply other threads:[~2026-11-09 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 14:40 [PATCH 0/2] serial: 8250_dw: Fix RX trigger levels for 64-byte FIFOs Kryštof Černý via B4 Relay
2026-11-09 14:40 ` [PATCH 1/2] serial: 8250: Add RX trigger levels for U6_16550A Kryštof Černý via B4 Relay
2026-11-09 14:55 ` Ilpo Järvinen
2026-11-09 14:41 ` Kryštof Černý via B4 Relay [this message]
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=20261109-8250-select-u6-64bit-v1-2-04bc8332fa34@gmail.com \
--to=devnull+cleverline1mc.gmail.com@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=cleverline1mc@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=ondra@faster.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®