From patchwork Tue Nov 3 21:39:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3843 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 5461A1C73E4 for ; Tue, 3 Nov 2026 22:42:40 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27147-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27147-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id D8EDE27B78 for ; Tue, 3 Nov 2026 21:40:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742007; b=yYd8TR8brlHg/YWCOm8JKoC89L70deqx0SAqRqHeu1VJzl7MGqnSI5sTwTD5wrsJwQwS m+07MrPyNMi5sH8C+fYMWjv5Ic2jFXI9s2BywYpm7nzotbrAyli4pJjmTdknYbRgFP2Th 5uPIhwpV0adV5YK1CfvIfytb4wuRzmnpwvJahAhcHeXqNhvWHqL3ebw6U0gIYsKcBUkOX YLy3zis/0di5d2HHoSxEPV9XIPazZTnu5GTHTJc1xYaIugIK3GKtI9fKLbDN1yi5iCfrd BuJQr0nWKLL3Y4BmByDcMZNQu4X9k9GaUA2Jnhhxa2MIQIvM126eZfVJlv8ubCJWLFw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742007; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=AaGB+sHBwtYVccxB8PUJWA10dOr1SqV2RJG8RV3nZJ8=; b=4lENs1axbhMRa1UteaBH1al+8wY7gMD59RB2ZxEkJrP4raOzeb3ZuPNrmAxeEspuextf 4g0hrekhS2YgGbtOXl2EpZTdDjZXFJudZg1Brf5P3LE8Ydnqyar0x73TaV1CXmBWzXZpy ZtCCsIlx7jliq4r5kZc8L8Uw7Tf4+ttElGQr/vDZqOsEujBnJtq4o3w8ngQJIU7q/DvTZ TKe69Ihpk+3rnlq1c3Kf2x8uow04U3qq6TrWgiWSK5FGBexwJim8s7LoOd7dB3o+OoXoB SeYY+zT6loXFDtVoEM4N0x2QeuEeHGQRgEO2xDnAhSHm19IJlJTjLq8lfFv4NR0bAMg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jNsg7CoK; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B4F8606A337; Tue, 3 Nov 2026 21:40:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jNsg7CoK X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742007; b=xndm/oe4RyO2kZ+YxCOA7le6+hTOgnze2d/zXRCwNVoklh/IFVQwZaj7BeH7T+ODt+rC P2+lebf2p6kiHdceaqBcHE8xGaRytAGlm+fdgfT1XUh5pzMbpsZz04quLmpZBXgX/6Qyh pTn38uE6MSvKI1xD2lq3qbSO7ZSeo/4YoFm3hcj6nQ9I1/XFSevpv7f+/+oHKVzQ6Kfu9 Bc2XsKkhE7ANH47Jno1fn+vPOg27U3D1gb/JZifA0UIj1kxsMoxjAIyF1ViSMlanPRHhO AtmzzIpTmdKnG+tDH7/0ThokHLs855/NKxsyK2kNmQaFtVwB5QRjZQ5gC6lR1hHpr0Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742007; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=AaGB+sHBwtYVccxB8PUJWA10dOr1SqV2RJG8RV3nZJ8=; b=r1RbzOwvbWEqCyxirNiqnJvSdfXbQiI87pSw1nWmwOuA6FSpCqCgaWCTdbLhEJuD+0dc 0ZAfNlQrtjZ+PHarG5KNW4G/YVXMpOadr8PRbNOHFNPHWkORORmC8Nqo3vK2Dun3WDl97 ntFrw1pJXXnHP3snajdyWVDbUNxdA36yBYcspivqnxiwQ2ZCqI7OEZIkrY3lqi4c4BLv2 Ydu6Ehnf/qOroJ5d7Si3+vqB8TCEbl6ywT1aBqaYFotBcORYqa8oog8V2aeQl5RgyDbT6 mxIERJvm3fc/ywcZ8o9/aO5ReiZRG0xcGTJvovEFv685sqc8M2EK4icmzLjcSa05M5Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jNsg7CoK; arc=none smtp.remote-ip=209.85.210.41 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21A83606A31B for ; Tue, 3 Nov 2026 21:40:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21A83606A31B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-84a248254f4so19475a34.0 for ; Tue, 03 Nov 2026 13:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742006; x=1794346806; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=AaGB+sHBwtYVccxB8PUJWA10dOr1SqV2RJG8RV3nZJ8=; b=jNsg7CoKfUXXvFhbzc7PWC9JWbzIc6rgXmAnoZszr7LjaKwaq9axjXz5Ickcx0a2ak GdM9XZw9HBKPqesuUQNd4ZNdlAPqJqWhVFQy8ZrItO3pRMUpawBNeeCMII8s759QdfFU pA6X6fGTNh2OWiJtd06IcYn9LVyzS8I0MIwfyjtizJ7CmDrgxs12qn0PLJMm7vyypQX7 Z+fSREINzGe8+vOz+CCY9BA52wryBnitjV9HVgSSv5StVsl2c1aqLjk7syf5fA2eTGJ5 1B7XQGh8EgdnWyF54yhqVH9f8FdHkMRu3si+m8M+Jz8opGQ40NhQGY9hS6fZIzVSRtfb dqDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742006; x=1794346806; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=AaGB+sHBwtYVccxB8PUJWA10dOr1SqV2RJG8RV3nZJ8=; b=UjA2GKRzkUcaSmfaxoJN7MGkhtBdYRMrX9IES2cGMLddQlcklF63rHPsBOIYJLGLrp cihQeLNftI3uMElE8hD8+hcDznpkrHzTTH9ziSllKZDR0uoVUlBW9le9N4VD1QJQfRsK Cq6gXP0XtNzu4gI7m+MsBvIpYoYccgucIwtF7IV4M/fqBOhOV8O0CnaKh44dHf6oTcCP zrf7OHjhBNWLENUcb2diikUQjxojmA4g9HXTp/Vxzh7130g0I03d8cYHh0Nal+C+6b5C AX15j2XPPz703jOY4szgpeYZsaIcsbKxKWPLTvA62zRppAU8ZeIRHy1hg6ai43uYxJZ4 +oEQ== X-Forwarded-Encrypted: i=1; AKwUvByrwqTEULKJ/AlCWei1Wj/lx+b3vR66zAwr1C4I9WlmqBCatggPfZwEucBVCerfPsgEQDXSnSdE+WZfDA==@lists.linux.dev X-Gm-Message-State: APuU4Z/ahR0nByckZYqratqOZ+uqHXK4LWBRiS54w45AzZlpTO295USV 9FK5veT8RM3Up8EJd2NTNWkyK/JyWIRK11FSCRV0GncjX7q68wKNb1p0 X-Gm-Gg: AYBFou3czXJPWmnwpjgmiAWjdbYfTh6jDGdi2ZWos7toMAjqBp348Y/JjlmW1MxCUiV e0wszImQaO8B3OZXDxyY3Osl39CKDefwOGuU0y2/3iJCNT5sF7iQL9n7Roi2GY/Oir06zeEpKBX Z27o8f/WuCN7l6Oa/uoRBNkNiBZS9NGrSo1OKopUDhr6Wf4U5UOv9k3T8DzV7jJojTP1xfwnk1o mKy59U/0NyT8YalvyCJ6VRyWDPxHJ9T6Asm8FUorWjHHildOVbUts+j6Lclkqxl9E6RqJQ2NOcQ frbJNiovFkxIcdiroQcE+vK6cOVrZwpJEtgE7rclrk+rRl2x4fV5g3fCkrraDJyWYR/9PRoHHmg J1p8OChuPkXgPcLFd9Ie9f+9yTQaPgs3oHAqWdV/rJhtKgvB0oDCFBcAGPBJ9PMx1MRtZqTp1EQ n9t9YgiRuJUzveRhIDrgMgoblrdeB+xdT7pfFctiyai6eG+9L5KEGqC4VCI0u9x1rBuT+Ofoudb drNEEupWosXUgdw0rVTYnpJvZ9ICr41BNqa00fAQOd01X3glJBh1ikNGnMSC9wtKbMGUEu/RMIj ArWgR/8Ap5riQ6uUFRwRrv6gQKWsn+GzrWYBJAMPgwDX0ulK6ASvwk1LhvhQgFgw5XxrU4b/dsW irVDg9qZJ3M4CiqFEoN4ir0JSDjbboh5/7CPouoYQ1Rdls/RHtirMmkghNAf0QIAFrYDaN//5Jg i/uZTs4b/KlJPbF3TQxMCz/FXLxctMDxx2CclZqrSkLTybM5rkgCf2 X-Received: by 2002:a05:6808:1a0f:b0:4cb:26a3:a0dc with SMTP id 5614622812f47-5640deea675mr10671861b6e.20.1793742005972; Tue, 03 Nov 2026 13:40:05 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:05 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:39:54 -0700 Subject: [PATCH v7 01/12] serial: 8250_dw: select port setup through platform data X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-1-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[dt]; RCPT_COUNT_TWELVE(0.00)[16]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email,sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[174.29.1.49:received,100.77.114.92:received]; RCVD_COUNT_FIVE(0.00)[6]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[bounces-27147-noreply=patchwork.local]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: 5461A1C73E4 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX Select feature discovery and DMA attachment through a platform-data setup callback. The generic callback probes the optional registers and attaches DMA when a FIFO size is available. Integrations with a fixed configuration can supply their own setup before the port is registered. Allow setup to return an error so integrations can reject invalid configuration before registration. Replace skip_autocfg with the Octeon setup selection. Octeon is a 64-bit platform and continues to skip optional-register probing while preserving its existing conditional DMA attachment. Select the DMA setup helper directly for this integration. Keep generic setup for devices without matched platform data as well. Reviewed-by: Ilpo Järvinen Signed-off-by: James Hilliard Reviewed-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_dw.c | 41 ++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 9cbe076463e0..a546cf2de7b6 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -64,6 +64,7 @@ struct dw8250_platform_data { u8 usr_reg; u32 cpr_value; unsigned int quirks; + int (*setup)(struct uart_port *p); }; struct dw8250_data { @@ -76,7 +77,6 @@ struct dw8250_data { struct clk *pclk; struct reset_control *rst; - unsigned int skip_autocfg:1; unsigned int uart_16550_compatible:1; unsigned int in_idle:1; @@ -596,7 +596,6 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) p->serial_out = dw8250_serial_outq; p->flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_FIXED_TYPE; p->type = PORT_OCTEON; - data->skip_autocfg = true; } #endif @@ -631,6 +630,28 @@ static void dw8250_shutdown(struct uart_port *port) d->no_int_count = 0; } +static int dw8250_setup_dma(struct uart_port *p) +{ + struct dw8250_data *data = to_dw8250_data(p->private_data); + struct uart_8250_port *up = up_to_u8250p(p); + + /* DMA setup requires a FIFO */ + if (!p->fifosize) + return 0; + + data->data.dma.rxconf.src_maxburst = p->fifosize / 4; + data->data.dma.txconf.dst_maxburst = p->fifosize / 4; + up->dma = &data->data.dma; + + return 0; +} + +static int dw8250_setup(struct uart_port *p) +{ + dw8250_setup_port(p); + return dw8250_setup_dma(p); +} + static int dw8250_probe(struct platform_device *pdev) { struct uart_8250_port uart = {}, *up = &uart; @@ -765,19 +786,16 @@ static int dw8250_probe(struct platform_device *pdev) dw8250_setup_dma_filter(p, data); - if (!data->skip_autocfg) - dw8250_setup_port(p); + if (data->pdata && data->pdata->setup) + err = data->pdata->setup(p); + else + err = dw8250_setup(p); + if (err) + return err; /* Use the BUSY-safe sequence for both integer and fractional divisors. */ p->set_divisor = dw8250_set_divisor; - /* If we have a valid fifosize, try hooking up DMA */ - if (p->fifosize) { - data->data.dma.rxconf.src_maxburst = p->fifosize / 4; - data->data.dma.txconf.dst_maxburst = p->fifosize / 4; - up->dma = &data->data.dma; - } - data->data.uport = serial8250_register_8250_port(up); if (IS_ERR(data->data.uport)) return PTR_ERR(data->data.uport); @@ -860,6 +878,7 @@ static const struct dw8250_platform_data dw8250_dw_apb = { static const struct dw8250_platform_data dw8250_octeon_3860_data = { .usr_reg = OCTEON_UART_USR, .quirks = DW_UART_QUIRK_OCTEON, + .setup = dw8250_setup_dma, }; static const struct dw8250_platform_data dw8250_armada_38x_data = { From patchwork Tue Nov 3 21:39:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3848 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id CC0A01C7350 for ; Tue, 3 Nov 2026 22:44:38 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27148-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27148-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id DFD4B2F8EF for ; Tue, 3 Nov 2026 21:40:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1793742013; b=PQmTxM5w3sSoM0CECXrsNhZAfbgJyBCCMicIaZZgM4eLi/uLXfqtZZQNeu2cwZiwx52y xoITjhA0GVutCk2juCdeWsCATNHMOKeoLIlk7/0hb/RNueuDfn9thbyxsAM+1AZ1XjAHO gBhB9INqPE95qDoLlcCkU53IHc18M7210iRNI8R65J5yPtzMYOm8VBL2KYHniQGpog+5S NrDYk71tk1lCnKCYsvcyhtpvhHN4KVzjJpz2rnHbdL7OdU0x3hMQ3G9zXk4/W7vMox7p1 H/pV2UMKl69EvnKDXWUDT5rPCP6Of8QqmynmI8IGcSZv8+v+3ZcY9kQUu3vzEED4kWw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742013; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=E9UoBDBjwLLwDb4WmV28avfpsh+5/w/6UybGFvQ6fZk=; b=n+ZM1GNhJwVR2tAEV5jaAbk5z6UIdJG1EYDMPwREPH+PcAFmcSm+/herTkmJR75YvO1v EClyfccivPczzTnP2QzFL7TBfi6C6GLz1DI2VZ9Q4NdSoAQnO2MNc5RsmidV9Es0z0+TM uBoHdzXuvAfKP5J9L2XKBEuJywLyXkD5qEF46V+78zFkAwfLhznMPC5VuNe9PxGUSIxi/ Bvm8sidxr/61duHtMcmyTLvHYtkczyj8Z0ZCv8Z6AGrcb9Sh/OAnDUsEhK2cPXwEVhI54 UDK6/ea09NFyBjK5VItpcTKaXuk2AdOgs5QrjdZazsr5zHeYjh2u4f/4v9Y+7oesKow== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Wbd5WXfi; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=fail smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A083D606A32D; Tue, 3 Nov 2026 21:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Wbd5WXfi X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742008; b=JKob8xD9VwwHdePcb7ZBE0Cf8e+R5aGvsTS/U92YsIQywfnqaiRcFRE27y6WtrPUiL0F s4W0C5fGKxvo2zXlhMlZ3xkIyClzD9YuJVszZ5jOGgMIj3PamKYjurRmVQxaE6k4BGT0b E/jOiWrGx0j3F3CwBiOEBrh89MTunav/TzqzGHNDl2MGEAxGJn9F7hC6k1L/YKUYetYgp i0NSfM1qBO0r0P/zyzguTjdRu+H5zvehJwEV9spG/+ukHCBSqR12ULEYNmzcj09OlY3eb yrdHYxwmMl+cWAgWelcytVLRbGTMaCXg+EUPv7nSfaRLRbbCYWKw7rQqdGR2lWN+GCg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742008; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=E9UoBDBjwLLwDb4WmV28avfpsh+5/w/6UybGFvQ6fZk=; b=JCggnkXoibgEk7BJmtuvSlijgUuhwTVxRZ7hbpuSi6MZQK/V9abbjjF35qiX7gCM3AjM 4ulvHzgP/6G7uxoIa9cK1FlGBtDDNeEPHv6voMd2uiWlwgedMRSMeOgrCazUurfh2rcOp bZ9BnIZaYodWbVRvCZktlZT3YaG5TMcMJSl/X/n7HjEI6V4B2w7Gn8KKUgFJFiRy4ULqD DDuRITBskbShv7tW4mJTQa3eGdVJwqSTRSzKjQM/rq/AXfLQGptIi20WNAcoCKu6ANB/Q 4Ur0uKhX9DwriybkpMKgR//sEk7tmNaW0UDVbzr1fd6g1hrMh2An9JuZLUbUYjPuNnA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Wbd5WXfi; arc=none smtp.remote-ip=209.85.167.173 Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CE02606A33E for ; Tue, 3 Nov 2026 21:40:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2CE02606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f173.google.com with SMTP id 5614622812f47-56431524c22so31129b6e.0 for ; Tue, 03 Nov 2026 13:40:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742007; x=1794346807; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=E9UoBDBjwLLwDb4WmV28avfpsh+5/w/6UybGFvQ6fZk=; b=Wbd5WXfiwtN9mRkNCJnAcd7ipo/vkGPvGPxaef5aRyDhM6MALUbAed1Pu0DDBSWeHC O/xK8b2lj8y9ylH2yZYsuUVGugQl1BnU0dzhB2XyBNe+5KtsKE9knlrKwraLo/nMKahH QOtFHfPqUrrtrjKdsj8MFirWL2wDsHZNXwDl9x2sEyI1YzDLSaMKIDQU6nZFsiRixv9G wKDmqXF+opTwKWNz2TXTt4KsUbwI5Ip0RxpLP2G6fMHU5Jivp6meGEThA1M++Ykxraau wNo/K/qTDOwOrCPC0+340Kqi9jMo3XrcTv6C0IXrdACMEU0EDvC3tpAaxqZ7LS0y7Fjt mHKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742007; x=1794346807; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=E9UoBDBjwLLwDb4WmV28avfpsh+5/w/6UybGFvQ6fZk=; b=p3J182dTZ3AhV+3YEiedm8mpFxP746bG0Y+b3e726ANZ2OPj+Lstde5ypYoo3kAsPB sr2GAjE4zLOSHhdFL9SARLlN3Yqg4sik5RjFQJnYN4UhB9ijiTHygRAFYZkHp0Zc5acn 39T8Hb2gaL7CamGgxBWXZPEwrlLZNVyXBEomTzXXgfFsZW0CH+mgiqI3blNvXsSfsTdP DolKJQK8XWTOdbaJdi312i88xzH38c+MRz6KfPlHfbjbCgKWVPpkMDpL/lrZaEBolcwz mGe/8bOPC/M/ob7Or5I1jRRxqoaCcppGuYeD3QvcM7CZzaYb6nDQ6tmYY6+ZGFmVhfAl rDag== X-Forwarded-Encrypted: i=1; AKwUvBwLMAu+LFhQjROq7gWOez0gtuFE5NQwFmkburIlAfayZpy0JhIgzSCfVIn9yxWdR55aiLzMtRwOR1HfVA==@lists.linux.dev X-Gm-Message-State: APuU4Z+Ky+OWGOr3LN9BEojhGIiYmc+WaF7w4yqiYziGwtJT6+FBNrwn AWZDNqvZ6Iadv9QunQyktiVYEQCFo2muhJAkAgGL5DbGaJTx2LThUY4z X-Gm-Gg: AYBFou2iH0cS0VF5segznfC0OGm4GWAHSlczCZX5+lXgWy/CfAhnCkj7aC7Yv6d886w GWEmy2I5gV01nyQcoLgkbGGJdSbrTxzkrpWjDZmedtX1F/ASloufDXFWAbn5IDiHE0Y3CZhEDLH Y0VLKjzMtpfLhYYKCfRA61klxrfMAD6IJ2vAjp9DeJdXJtJAlgfBeDQh8smtbUjjWV8tU79LQVj rUIjzInx3xjhfhvY1Fn0NTX5HSvmtuGad8gbovNtb6ctZRwBNjU0LVSiBZpMPD7A9O4VdfIVMGq V3zs7mqfdesuTxE7rDq81FBkSlg88q4ii9rYtM7m6ZvafwVVOCKIliDdS0gEjSt5/7Mw65hItMJ aFTBfO1JuT6cmZx5YjV9L4/OEvisZB9sOTTFgG6F21i3DcOFQ+rARssw51oy0dcV3kr12hIhgh+ NdJrFB5n+1XwtNfvjcfBwA2sYgPjf4vpPPsylvUxbPb1PPtycwEjUYFaPo7G3BvMjQPDjYoV7hL Bj7PljbDene7e6xWadH2NdY+z0RB8hDvwbw+bE27EspcsMrVZOZYhvrkP3XoK72h08AHtqVNcOY PZkDxQUWgP0PjSA364EXCvOb9RqC1FhBZCHyp6UK61Yxpf1VTONlDb1QGsok+AAMX7i0gdtDJzB LL8bFIa/crjlafrbdeb0otLvk5hkFOGkoIt6Q5/HaObr2OveXimlp6fj+4I/HN4iRhwGOzgTaDW xCe0AMqZx0mBO0N/UCmqzCEtxNwMtZc+ZWNeNnvxqNS1EyhZoMMsM+ X-Received: by 2002:a05:6808:11c9:b0:4ec:d580:2440 with SMTP id 5614622812f47-5640de5a472mr9799943b6e.54.1793742007017; Tue, 03 Nov 2026 13:40:07 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:06 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:39:55 -0700 Subject: [PATCH v7 02/12] serial: 8250: widen RX trigger byte counts to 16 bits X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-2-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; ARC_REJECT(1.00)[cv is fail on i=2]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; FORGED_SENDER_MAILLIST(0.00)[]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[dt]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_FIVE(0.00)[6]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TAGGED_FROM(0.00)[bounces-27148-noreply=patchwork.local]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[174.29.1.49:received,209.85.167.173:received,100.77.114.92:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: CC0A01C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX DesignWare UARTs can have 2048-byte FIFOs, with receive thresholds as large as 2046 bytes. The byte-sized threshold tables, setter argument and sysfs parser cannot represent these values. Use u16 for the threshold tables and byte counts throughout the 8250 conversion and sysfs paths, including the uart_port callback interface. Keep the FCR encoding byte-sized and preserve the existing threshold selection. The Moxa setter continues to validate against its 128-byte FIFO before writing the byte-sized trigger register. Signed-off-by: James Hilliard --- drivers/tty/serial/8250/8250.h | 2 +- drivers/tty/serial/8250/8250_mxpcie.c | 2 +- drivers/tty/serial/8250/8250_port.c | 12 ++++++------ include/linux/serial_core.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index 21ed9c41b751..939b7d4209f1 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -69,7 +69,7 @@ struct serial8250_config { unsigned short fifo_size; unsigned short tx_loadsz; unsigned char fcr; - unsigned char rxtrig_bytes[UART_FCR_R_TRIG_MAX_STATE]; + u16 rxtrig_bytes[UART_FCR_R_TRIG_MAX_STATE]; unsigned int flags; }; diff --git a/drivers/tty/serial/8250/8250_mxpcie.c b/drivers/tty/serial/8250/8250_mxpcie.c index 4935a5d1c1a3..4f0b881b4f83 100644 --- a/drivers/tty/serial/8250/8250_mxpcie.c +++ b/drivers/tty/serial/8250/8250_mxpcie.c @@ -257,7 +257,7 @@ static int mxpcie8250_get_rxtrig(struct uart_port *port) return serial_port_in(port, MOXA_PUART_RTL); } -static int mxpcie8250_set_rxtrig(struct uart_port *port, unsigned char bytes) +static int mxpcie8250_set_rxtrig(struct uart_port *port, u16 bytes) { struct mxpcie8250 *priv = dev_get_drvdata(port->dev); diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 36b2b0a2c05c..452851815ffc 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -3008,14 +3008,14 @@ static int serial8250_request_port(struct uart_port *port) static int fcr_get_rxtrig_bytes(struct uart_8250_port *up) { const struct serial8250_config *conf_type = &uart_config[up->port.type]; - unsigned char bytes; + u16 bytes; bytes = conf_type->rxtrig_bytes[UART_FCR_R_TRIG_BITS(up->fcr)]; return bytes ? bytes : -EOPNOTSUPP; } -static int bytes_to_fcr_rxtrig(struct uart_8250_port *up, unsigned char bytes) +static int bytes_to_fcr_rxtrig(struct uart_8250_port *up, u16 bytes) { const struct serial8250_config *conf_type = &uart_config[up->port.type]; int i; @@ -3073,7 +3073,7 @@ static ssize_t rx_trig_bytes_show(struct device *dev, return sysfs_emit(buf, "%d\n", rxtrig_bytes); } -static int do_set_rxtrig(struct tty_port *port, unsigned char bytes) +static int do_set_rxtrig(struct tty_port *port, u16 bytes) { struct uart_state *state = container_of(port, struct uart_state, port); struct uart_port *uport = state->uart_port; @@ -3094,7 +3094,7 @@ static int do_set_rxtrig(struct tty_port *port, unsigned char bytes) return 0; } -static int do_serial8250_set_rxtrig(struct tty_port *port, unsigned char bytes) +static int do_serial8250_set_rxtrig(struct tty_port *port, u16 bytes) { int ret; @@ -3111,13 +3111,13 @@ static ssize_t rx_trig_bytes_store(struct device *dev, struct tty_port *port = dev_get_drvdata(dev); struct uart_state *state = container_of(port, struct uart_state, port); struct uart_port *uport = state->uart_port; - unsigned char bytes; + u16 bytes; int ret; if (!count) return -EINVAL; - ret = kstrtou8(buf, 10, &bytes); + ret = kstrtou16(buf, 10, &bytes); if (ret < 0) return ret; diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 4eeb8253752a..97301ef66af0 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -461,7 +461,7 @@ struct uart_port { unsigned int quot, unsigned int quot_frac); int (*get_rxtrig)(struct uart_port *port); - int (*set_rxtrig)(struct uart_port *port, unsigned char bytes); + int (*set_rxtrig)(struct uart_port *port, u16 bytes); int (*startup)(struct uart_port *port); void (*shutdown)(struct uart_port *port); void (*throttle)(struct uart_port *port); From patchwork Tue Nov 3 21:39:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3844 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id B09761C7350 for ; Tue, 3 Nov 2026 22:42:56 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27149-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27149-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id DB73D29349 for ; Tue, 3 Nov 2026 21:40:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742009; b=FByC/uCc+/AEKLw0dnJWmmzFzoiEcwQfwnIlfqigsL2AUzaAm9HFhmIOAbacGiLiTQV/ 7BCdU3A09hEGbP8ourrcphq5aOIp3GaCSgj21tWLcRgTTQhihb61pIys7OQS7zpX1+JnE nwU2CgIj7DbaRqs7hxNGgXZvgHC/44H1MxS80djPbJrEvnbvbrVtMiaw1f6c3AWB+5EQo cjSk6AXObpLwAuh2dUIsZmFa7G4vQc80bhPsVJHqc0hBu8ZXcIw3uIGX43Pzy4EUiNdE2 rlJFdI+0DJx9vwyy47ov2Krjt6c79R6hWDtqTfFCLN6gZGi9E20FiV9mDNEWrzFwiNQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742009; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=wQd2y5d3c9Xle1BZoXd9DRgnl2+Av/870a5uei8ZYeo=; b=Uubl7oR/wS1tn8hU7C0yO4sU4tZvTkglvhv2TE1KXDBq7Tv4VtfoU3eomnhbmJI93USO d1kdY1ReKe0SwMtbVWVYKu4hf1t0t1MMJVcL4UySJJIxCnhnGzSsxNWGTKU9uVYrkz9zf FZIdcdCZjJiur2iaPvzpJlq8/Nq5itYUhEuks4uSrxm3UwiRTuoD8t0Tlw+hiyQJ0wDMu 2Ue0vKhsoNn9EeycD/4NnJCdBEKGdbhBZ6b2DEse/WKx2J4Eb5RbmSrNqLnLuUztiGB/E dWl5mHfOXGNHxOwaJrh6MV7Bn1mMQZuoENkPNS56VpX9+JPO6fKc0j/en42YDBOas2g== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hSeTSBIh; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B1B6606D807; Tue, 3 Nov 2026 21:40:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hSeTSBIh X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742009; b=l1gXOpY9wAG/0/H3HC4scMxby5d7ui+TBLcEm0BAYmOajnc/o+/mizIxTOB7ZIZwIytz HAWdSfmu7mZ4eM2rc0lfoD/sTZ3jGjSgpKMGMsC/ZTQF+ORJMgjM88NyoLVJaQbkHwYhH LlXOdXvElBF71glov7hRN1mRp/FnaTnmwzpdICRqpHsDZ6yfjI9Oy7VN+75S2Hjw8GDkb AMmdhfxFo0oabF4GF8sQHqbO+AS5mqQMtIAb5NfSTarRbx9it+P6UpyvkZwbNlO5D6DmN 8GJr8SVnWOSXs7MiR/SX2Kr9VN1mgm4OCt8nKyD+u1PWtu6qRKzm/Xb4+dOiRa5g7kA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742009; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=wQd2y5d3c9Xle1BZoXd9DRgnl2+Av/870a5uei8ZYeo=; b=d0oFGuyB98j6ln11jD/SQ4VhRhol9TzXRIK176M1SEuEE2hyRpLNNkhe10uXZsA3OsdE YEK5PtLQSIQAQBQfB8QB71D2BUivi+UNiqhhX35EFJCTCYziS8grOFj/ztaWbm/9ZVkKw /FYRG398+EHHh+sj+hIN09XSGIUI/Ta4ir1Yf9PoKU6x/MKd4RVeGxieH/UFc5UvUeclG BLGuAytv6/Ir6sWDUj4j1xTGBmXWtolv9iLjwsKhxtDzHMfAUB084JP4s31Wu/DF9TQ3+ +PHkH0QdYwpA7AIou3RKsmhiJg0Hbb2gSMdpcA+Jc5q08crfkz1KNVrlDIFH5sM/6sA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hSeTSBIh; arc=none smtp.remote-ip=209.85.167.169 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21854606A33F for ; Tue, 3 Nov 2026 21:40:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21854606A33F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-55e02e89f78so28447b6e.0 for ; Tue, 03 Nov 2026 13:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742008; x=1794346808; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=wQd2y5d3c9Xle1BZoXd9DRgnl2+Av/870a5uei8ZYeo=; b=hSeTSBIh5p4X/Nd2+YAH3xAiGdk60U+T1PWswsMKQE73xKdCQ/1u3ZNboPWAfLxidb Vba4usCiFcE7OEgKnyLF15FItLQjkXuVKs70oapYz9kysmCmquwEAANoCQkG3/3ZsSJH jNgmgt0NYRHFOZ1f4rEBvzHZgb18azo9msNmeZxyYxXAMqCPIvUyRvrI5Y6dxTcvFjTU KRUcquaM4z4wSDA6eDEnl4b6PxEek8zHXimu3lZV7cNagl8iz2QUZ6841D/v7Os3n3Yz NzHHXWEEWcaZwVY0zOGasnFcLg6mXhqxAUQZp+lvhbxG7k26e4kPsWCFWzflyhDdI4Lq QMKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742008; x=1794346808; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=wQd2y5d3c9Xle1BZoXd9DRgnl2+Av/870a5uei8ZYeo=; b=mkXO7SEgIGNo97YyUNFJ9loTBWqGEnjII0LNGjfN3VuH3WjFB1p6Yrkrn9nT9orSFj ErSlcch7Sg/8OkXDudCcCwAQ/KHMAXmbFcSiqH/E/VeIBNB8RUdct5sQ11LLu6a9cYfw 7niKl8vuczCiwq5CDe4dqbLduyoO8tIIJ9QWWhhQFA6GdG42kL1vRxJabUKeRkqiWhvw DLVwrHXiiHCBG1ezpk7fQouHa0cYHx2AqzqFROwc5dQYhqUGJ5nrKtenquP/vyne4340 4jZEi9quYsD5/SURcnb8hBCBtUWwVHwD//+YEXWj1VLxSo2hc1OAMgdzyFhyfSp+gJ8h cYLQ== X-Forwarded-Encrypted: i=1; AKwUvBxvUzaCqSzndE0ClzK7at99C08kS1noVvoY2VkG486E0rMLMH3zEjxYLa9EEW/4uj+QoVi/hGUxdtm9BQ==@lists.linux.dev X-Gm-Message-State: APuU4Z9dpEgBAQI0DYtNIUP8YSCrPl8bybIxRu3wtowgrzaYBw5i+KXm s1ekKG8/UvqkimfDja9zxUnmSmpbjrlJpNG0gpSLlTSje3JlUPfTx7GN X-Gm-Gg: AYBFou3XXw3nZT2pUk8t+ThC+Cn6lVBiuUyb7vJQNynn+V2TAAiQWCOqY8cWEH4Hopx xGW+0nbv/9xrbjAg4lT1DS78Igqld7AjAXCXmitTIImhhNKmKxqblCfR+POIKcjdu+8YoarCTmt tXtkUms/tyQMCgqHv09m+G4gJPy/tp+Z1vtqIK/fz9MIN30Z/OZp5LgOkTFzaLtB5M/8qu11b7V KwNJXWXn6CMXqrwAwVPY7By++ooPG/zDq2KoGiLQLsx18s+hWTG48m4D10TVrtA+vLpMQ/HYIcb XMD6y5mhKirljNAaGgXVFzGrHC+pey0jhhPWSE0jJvhjkYfRtokuU26HJb0QSqy7YDfn9gKJTu3 CJtbDTxXY4NMWpEMDUFPQpq62OGBZwmOO7k2GMwtw3ystztOgTPZVSgJgo0dmNlPvTewpf6CM0q Yg44kaFAPucTSmSlYB2efvWodrz7HLDw/mXOc7fipdsYyMUlfaLSmnvZ90QFOh2fJWmUPNt/UCv vHpwLi0ZPQwOuqQzi/SpckQly3AB9bm83zXhypPUzz01W0SWPBhQ4fHOsTiLLZBbjYDz8QSWN7E VfPd1Npn9qJal8D6zd8P9b3vsrUCV8JL6QbDVEoij5UBmT0P9yCYxDq0F/IrqURibmfjlrg/wyR bHVVKLby1W3IRC+S7aV+MovenaYR/x4SqcOGMRR99dn+x+vYDdaTn7pYl0iN6P4OMY29EQEeU6W BO8MmtTZU7tWKNDKHzATIZoinjEhumfJlrzAH0WABSSjWBjhJHLMzI X-Received: by 2002:a05:6808:4fce:b0:54c:7ce7:33ba with SMTP id 5614622812f47-5640dc9006emr9815263b6e.28.1793742008124; Tue, 03 Nov 2026 13:40:08 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:07 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:39:56 -0700 Subject: [PATCH v7 03/12] serial: 8250: share the RX trigger conversion helper X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-3-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email,sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; RCPT_COUNT_TWELVE(0.00)[16]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; TAGGED_RCPT(0.00)[dt]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,209.85.167.169:received,174.29.1.49:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; TAGGED_FROM(0.00)[bounces-27149-noreply=patchwork.local]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: B09761C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX Drivers can supply receive-trigger thresholds through the RX trigger callbacks without adding a legacy port type to uart_config[]. Extract the threshold search into serial8250_bytes_to_fcr() so those drivers can use the same conversion as the generic 8250 implementation. Keep the implementation in 8250_port.c and share it within 8250_base. Include the unsupported-table check and preserve the existing nearest-lower selection and highest-encoding fallback. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: James Hilliard --- drivers/tty/serial/8250/8250.h | 2 ++ drivers/tty/serial/8250/8250_port.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index 939b7d4209f1..8729619160ea 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -73,6 +73,8 @@ struct serial8250_config { unsigned int flags; }; +int serial8250_bytes_to_fcr(const u16 *rxtrig_bytes, u16 bytes); + enum uart_port_type { /* Internal 8250 only */ UART_PORT_AIROHA = 124, diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 452851815ffc..73bc9e7ab703 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -3015,16 +3015,15 @@ static int fcr_get_rxtrig_bytes(struct uart_8250_port *up) return bytes ? bytes : -EOPNOTSUPP; } -static int bytes_to_fcr_rxtrig(struct uart_8250_port *up, u16 bytes) +int serial8250_bytes_to_fcr(const u16 *rxtrig_bytes, u16 bytes) { - const struct serial8250_config *conf_type = &uart_config[up->port.type]; int i; - if (!conf_type->rxtrig_bytes[UART_FCR_R_TRIG_BITS(UART_FCR_R_TRIG_00)]) + if (!rxtrig_bytes[UART_FCR_R_TRIG_BITS(UART_FCR_R_TRIG_00)]) return -EOPNOTSUPP; for (i = 1; i < UART_FCR_R_TRIG_MAX_STATE; i++) { - if (bytes < conf_type->rxtrig_bytes[i]) + if (bytes < rxtrig_bytes[i]) /* Use the nearest lower value */ return (--i) << UART_FCR_R_TRIG_SHIFT; } @@ -3032,6 +3031,13 @@ static int bytes_to_fcr_rxtrig(struct uart_8250_port *up, u16 bytes) return UART_FCR_R_TRIG_11; } +static int bytes_to_fcr_rxtrig(struct uart_8250_port *up, u16 bytes) +{ + const struct serial8250_config *conf_type = &uart_config[up->port.type]; + + return serial8250_bytes_to_fcr(conf_type->rxtrig_bytes, bytes); +} + static int do_get_rxtrig(struct tty_port *port) { struct uart_state *state = container_of(port, struct uart_state, port); From patchwork Tue Nov 3 21:39:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3845 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 165761C7350 for ; Tue, 3 Nov 2026 22:43:31 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27150-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27150-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id C1D5E2BD16 for ; Tue, 3 Nov 2026 21:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742011; b=Ep2Wsy/dEB/cRV6mCRWKbZPDZkUZBEDIlAZMQ9liDWMbzu4vHPnMCJE0YQligdno/NKo hSd2a7p1W0i4BGwCpaInNQp5cgleIG57HZAD5o/F3TMDCLp/9Y3pBjFrpJv1+L8b6NUuT 08KqhavnXpJDs4Jktk+C1a5nN6TQ3H8QKQ6R09fjLovEsiMnH4OWwOuenw74dPnRa/2ap WExeBECU6D6aEgLO0jXIkQEvRhIbYgqPB1Qf00ybrw8F/Wl8CX9OFA6pMTOIhuFfgZbLA aBs8aUsfmqpB4rcBn48AsQhUnIoIM3KVJVuItxJDUwKifeET96Pn3bDd250dJ7UBrPw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742011; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=9v6fhE64vJST/e4wIKc/qZZ4G1qcfWVja1/2g7y5JFA=; b=5fVZ5tDJR4iBVXPOrnPmDtc3eUptll6CVtk+7y/iO34HQiPiObKbF5XZ1vjy+ef8ohEM bcL+wRbSIvt7Uw/836LVFVaGRwCBX5Pzq0glwvvyLLyn/KtLGvHN+UQmrouMHVRqbHkEd CwALaUz+CwOR6UK2sOpV66fdCd82SEwfbbU/mm674GPMd4+nU8q3JX+k519AhB4iCHqpx 35N2vyqhJ8htfk3Xlb1qTLA5md8F34LTfl+sq05k7g8ECIjnFpsgpQ3Pu6s+g8tATldMu q8r45yHSR/dqgkQl6rSxsgX1qSTF9FFF5aP3RSkwp/4RfgXSmc7wLTa9/upaY+Yi4eA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AdCeMtH5; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 024FC606D80E; Tue, 3 Nov 2026 21:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AdCeMtH5 X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.176 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742010; b=m6UEdbQCZf9VXewNzNqM+s4md0T3V9xM1zRQRQVvQyOupfQpIikVDOOPcSk4dEIHWZfL OWMowecEgYeWQb5p3MHR/SAoJrHNLPQzYzqXWQMkk1jL+1BHQA4pD4RwGDJs+Vawy3BTc SDgXAnnun1BiM2MhMz4wGGRDf77G2/xNn6pTiFTODL07l2e0hBDn6UtxDRGx667iim+2R hXcP54FvKjHC26LlxkPDMWi+2pE46/4B3l/gVtEg1/nCFHpFQf5961ExfuF9oH7YSoJWW cAOAkdCq6tL3QlMnVgCk8LkjYlAI12Ggutpcoow9CyHKK/E2ugV41njbzLkUNPib0Ig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742010; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=9v6fhE64vJST/e4wIKc/qZZ4G1qcfWVja1/2g7y5JFA=; b=JZ9Y7teZXIFuuLX+Fcrif6froGp8yq2oLGMPRsEU0plRnMnfdEd+SRxAXheatSVScXo5 pvSJ9HdZOMdch6yxEpVu58V/JbOyh+dU22MMOZXheay2dTCcHiXIspMIWHvL7+5L9K6JY uoKeas7gIa2MCF1G5fCyZdsz/zr4DYu6rLIYPei2IQB+7rbqxIdgCg6/6UOWcBPD8aiOt zR7znlvcTi7TcoOf2AVtpTJ0uimvppRLU1rWlRS9VNydVd6NSjTELvaO9C7letkV3cUOc cWFtllbnBO7xE91rgdOZpicKH1kNzQwYnWSEYv8yOTISd6Xw1Y9b0CJCntEhUCHEucg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AdCeMtH5; arc=none smtp.remote-ip=209.85.167.176 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BA0B606D808 for ; Tue, 3 Nov 2026 21:40:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3BA0B606D808 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-4af173320f9so46663b6e.2 for ; Tue, 03 Nov 2026 13:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742009; x=1794346809; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9v6fhE64vJST/e4wIKc/qZZ4G1qcfWVja1/2g7y5JFA=; b=AdCeMtH5EFUfNfZOzhRw8G8WL6H91LhRPI+kDTwE5TEz5wQUY1/5YdBScaHrLXYtfX sCB2tV0+UZp8tweyaT/wppr1GifouGOFW3rwBkVnVBeoh44CEq62xTn2g3VCF/CDyD+8 4JOqzF4AhvEI1Tw0aj2Pn1PaiYV0JlyYa4rfAZ368PLzedNKTOn6egbYScjS7KrZdXp2 uP7Ezsp7p4VEyxjcU953lZDJNn0Td6/PuHRUJI9P4KrwEJLvtKY5of8ovaRjEE3zvj8K bM6t9v8UBYvWNlWfknpGveAOPETttaTsmnjczp3WjSu23VCf9ybkIjAXHxAQK9M4vu0S EUbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742009; x=1794346809; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9v6fhE64vJST/e4wIKc/qZZ4G1qcfWVja1/2g7y5JFA=; b=iOKq0RkQ0Szzg+oWnnJPNehHejk1dz72PDNnin4FPPWkExoRU8FSvYVrZE5Ps4SwGV WPSLhnhACQ9lr1HyFm3Ye7LZDgRnUUFD3p8BmtIit2pO5nEfJfCCMCq+TTHYXpmhAwvm CK/ki+yTDlzIJY5HfK/0aIfnRcPWViVdVZviBL2/xhVFHInW2OqneOA/9MkESb2HPDM9 Nyt0wBXtQsncB5kgsUeWRsPuO+ADItVKL3xgzV5sIYsdNJV9cQoQkUZy5rB822jPZm0R VFfVXr8lf9p/1vi/2/2r79RDIw/IUjK4AKILVmYfzB84x197DtysT8rZoFbwVd0cdS0/ Ho8w== X-Forwarded-Encrypted: i=1; AKwUvBw5SNaU0WCQ6rxK2FjMi9h3t8R2fo5IpLVtnrjN0eBJIXd15zWyDXYqCjtZsJv/XNXeqHBprcVGLavSbA==@lists.linux.dev X-Gm-Message-State: APuU4Z80RsiRG+J0kvlIWxvqv63V2csVGfNghaFqFeoA3ke8baTE6YWK TdPdP5FZr0aIx1CLQvkYKKYt4PqRJAzzM2terGB926x5CD3Bj3eBPLu45k+mWuAJ X-Gm-Gg: AYBFou0Mq2dJt9nDFaCp+r8MOGo0D6hK4SB+xmXtsS4LdTNrQsIQV6U+tyyXWVWGA2S WrDPCM1h/lmqMsARfwePWKQRu+7kJEfn/+oj3VbomH26notzoMV1UJM0DxkUMlJMSwStmrNqj6x d0J189O0Dz0/MM8t5cMDRn5M1woguo44S3p9QeZ1rFL9wWVfQ5LQIfuPqPCdkg2ajXbhCEIMc9w HcwGaX8Op1b32o5TjE8uqz5HyVRrRC5YrxLFzqQBeFI+P311yjnWG7Hn/lrFSSb9T6ZiNSYWvQO fIGrhA52K3hZI6OwmV3ZwH5zkdRbV7U9RFB30w8V37uUr39DaLSy5S6n17HYttfEWevK+HKSOPK +FFnlmRMpvIUAAbuszyhEB/C1ccT6GN8mwJWRrZE2NuHmTc9nRe5XXDdl468fRQ3sDR8Y1YHRyu 7AOqVIecJXBy549Emgf5Ao7TUQwgeNytzbmmtk8VgCrQx8bSLzOFjMjt3u6a7X4ICXb7Tt2huQu 8j8o9nkPiXSxeFppgKIQojX8LUIqd5PeOUvnIqcCXZrmQDERsRWb4t167pAb35VLEdhTmceRdpK HVu3pnmcUTEoxAIg8+rNVP0zvvgWIh7EWK6wB8OInhUIcsYOnTtc/gbcgFJN1oi2U8LA7EiPt3P /rf6cUUZ9dxsOWaXZ6ds2+JK2xVZqBCvK8C6PG/PGIqMOgPvxKeNVWZUSSZYYIn/ytxSqueJq9M yu5J7MTmSb2YXgkZ/FFa+QT+1S2jW/+WHcQrR87D7nSl61sqtkEw8gEQ== X-Received: by 2002:a05:6808:1715:b0:55c:836:5950 with SMTP id 5614622812f47-5640de0af62mr9879107b6e.27.1793742009246; Tue, 03 Nov 2026 13:40:09 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:08 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:39:57 -0700 Subject: [PATCH v7 04/12] serial: 8250: expose RX trigger controls for custom callbacks X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-4-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; RCPT_COUNT_TWELVE(0.00)[16]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; TAGGED_RCPT(0.00)[dt]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[174.29.1.49:received,100.77.114.92:received,209.85.167.176:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; TAGGED_FROM(0.00)[bounces-27150-noreply=patchwork.local]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 165761C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX The rx_trig_bytes attribute dispatches to a port's get_rxtrig and set_rxtrig callbacks when present, but the attribute group is registered only when the port type has a static receive-trigger table. Allow a port that supplies both callbacks to expose the attribute without a static table. This lets integrations such as Octeon provide their FIFO-relative thresholds through callbacks while retaining their existing port type. Require both callbacks because the attribute is read/write; ports with a static table continue to use the existing fallback handlers. Signed-off-by: James Hilliard --- drivers/tty/serial/8250/8250_port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 73bc9e7ab703..d87e2b852c3c 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -3152,7 +3152,8 @@ static void register_dev_spec_attr_grp(struct uart_8250_port *up) { const struct serial8250_config *conf_type = &uart_config[up->port.type]; - if (conf_type->rxtrig_bytes[0]) + if (conf_type->rxtrig_bytes[0] || + (up->port.get_rxtrig && up->port.set_rxtrig)) up->port.attr_group = &serial8250_dev_attr_group; } From patchwork Tue Nov 3 21:39:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3846 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 78ED71C7350 for ; Tue, 3 Nov 2026 22:44:03 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27151-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27151-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 896D02E99B for ; Tue, 3 Nov 2026 21:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742012; b=BB4vi/wTU7eNHk9a4NnQCznxeNJV2r/aQF5yGcBNz7S5bRyX1y0EwxEhC5BnOAQAGgti QXpIRKwjL8pmMQ2k5Ba6Qz4f2X3+jWmx1aKrWgKhYzHUJNqt33f9rYPBASzSAr1pTtymQ 8EZT4l62OEAZI659DKLMxk8ZfXfv0qSo5dSLEUjkKcQSpni7U7z9wD3YC1ybRS9yJlWDE b6GcIJyJ8pNYYoqoOAuz5/+kSC7tfKgtqgXjU62Vk85cCcHH7vBxEdNO3uYx6eRYddIV9 KmWduEGH2yQGEfFSYJyC3QzeAY34ZS4yAIe9ErSs6bgA3DtWj1bqCPbxrikb3/tsDlw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742012; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=MGRVzz2uqo92qo+Znv2w+QUjl1qrr60r4fm0Dgku23s=; b=eNGdBF71C0+yFPIzJ2SZUnQKb3VgJfEZ5nV0C8dEGUUNQ56lkuiJW+LhK2YUC+PI81Lt 3O/R6/foFF8dmkKCRcolI9mINZRVkA7UV2KS2vujrxtxMhVKGBmrqJhvX++Z4X0WIuI7b H9N8g71uD9KiztNM5/u0nZD/D5NFP4MX1zIs7BNZzMfFk+aUZ0L55ia8CcaQoHz3IAXi4 A2Kuaesqv0y/bvSa7qVEi/aX6s0n4jkqxNpi7p8+m/fXhamLuNLvtNBJj5OlKDEKibpO8 3/knXyFdxN8jTGkY9w/hDG2br/AJwuLabL4MsBru42BKvHCkNkbMzw7T94hqUT03D7Q== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=zunyP87d; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81BAB606D822; Tue, 3 Nov 2026 21:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=zunyP87d X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.42 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742012; b=PGKprkix9M8rn2SWzVNmr3ZIXu5ljWiCDjS/yVVItorB9mKacK8471RxqL6dCVUEQTWL 1KcfExHmk1M9kObqYkgE/20vvGHHyVsvC+2m9VSydtGUJ27+S4Ayckbf0CI5oBTb9HdoU GQSeiAVrTN4YFqjrK3i06LkFBWvOz+kTiM5TQvaT3jLKuS/9NRaXQ9se6F/v8VxdVKtcW iZyoegKQOZ8SC26Oi8eetDm2Nk0wOYOSseTafm8B2ojekMCH+IGfpBUqLlWRsEYF045CV W11bXS5lm9wKLf7l3rRh515EGi7v5VMfYB3dOmAILc481loeCPzi773XVQw8zlJwFdQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742012; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=MGRVzz2uqo92qo+Znv2w+QUjl1qrr60r4fm0Dgku23s=; b=tv+edXyfdxgIHiEhiCbwMXJxVQu1YW+gm9+N1GvhWR8xi5EUA5WNTX34CSBG4NxU1TLz lAPfzGwE0PieIUxqAjSnnxp0Y67YyH0jfDybJoVTx4kD1IlvqkCuI9ihAAyogkDgXlXvb M368zMCC9Wd4J39TKtHxcqV3YbljXjmmsoGEqu8zhQ6sChD2HaGRKFL1yONF1zqu+q0vL UnXF4nCA+C3zRJF/Fd9Ifb/Bj1Ofzcs5b3ZXkPjCXtJBys3FhddL17nOD5dEYAQTp5MFI RAU+o3ksf+HK94iuR4yVoRGZWsefUQq9maitv0Rc3vwfmeN2F1/YCfyB2fLPHY/hDKA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=zunyP87d; arc=none smtp.remote-ip=209.85.210.42 Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63617606D813 for ; Tue, 3 Nov 2026 21:40:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63617606D813 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-843b6f8e2c7so29924a34.1 for ; Tue, 03 Nov 2026 13:40:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742010; x=1794346810; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MGRVzz2uqo92qo+Znv2w+QUjl1qrr60r4fm0Dgku23s=; b=zunyP87dHarUT24RBLFdaS5Xsr3kDWdKXU9zkAym53b1Is5WziISJZ5jtyTml/TvYS UCMwlm0/PpFZZNL0jMiQMnyGEumjAX/hx+1sTeLsiO0ZEXlBoXiAFsjv9nxM8LvApPI5 ryuyLriY1sEThZkPY3TJghWPzmfNYAS3c0Pi98qqsmANg6Wn6GC5pfJ8JsUkscqgwfNU +GLa/zx0Q3ejTPd8iNiV3abH4Bx1tmSDYHp1eiahl2ruY8RZ6G/hkzvMCMKgMV8sN9yX MGkQ3+vgpF5cS8qKE+L/qg06I8uPLu+uQwLrMqK5jwewEp7H0dyvonAV27RmOEhtEvmb xvVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742010; x=1794346810; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MGRVzz2uqo92qo+Znv2w+QUjl1qrr60r4fm0Dgku23s=; b=ktJGmz9CDgKMlbMrZr91es3vgAXyZsIdawPEPA0g9uR4NRSzAwBLxjcPeDwpAn/5gf oKkF8G/bMobVqkDODmkQzKUeg2ByZwp2CeJ4GhFGV9nwwqrHj2Aak5ehxcWTthU7gcCU afUR3rcW9l74rF1HmOY6z7rIv4olrx2BelLAKBfLcqhqOVjqKwFI/+ZuKOGodYkRmu1g h5tdDnEId2w9Psk+ts9u4QstgnD0inPFR22AcqYeYZVVdwQ5TYSUuVUaVsHsv2OgzBff m+e40m2FEkY5dlc7kNjlbhX2U1hsDWodvbfrErwX/+ByxJinBKE6Zp9zJQu5Qmj7H8GO 4eVw== X-Forwarded-Encrypted: i=1; AKwUvBxhZUKBaZl9ULFWMvQxQTS8UDgf1mLzhlJzpA0n9ldEXVgnh2fhIMVhiJQqLB9G56gSTTELT1KV3Ed4pw==@lists.linux.dev X-Gm-Message-State: APuU4Z8J2kZA5+6mq4cG7aeb83dUNRih8SfjYzNpG999Ogxi2PL+UCMy NFJqBD6zNvUubqbDqcQSeVaV4d3f5tWkKfDtjy5Rv4Fj031M+dFDwY5M X-Gm-Gg: AYBFou2o7Mn50Kh/XVXPhwgOSbTapJ7xyccBoNnEULvffi3ZUDzF/3/te4dulbuADNj UQ+ogTBIwzYNLulhY9y04lmBnS9giclOCpT2iqRY+D/5lUCsHrUCET788NUSGD9jrHjthtG4V7q y1Wc8LKh5ncwghUJvM7PlDSNHYtbzE6tK8cispNjiy6dZw5JnbDUx5rwC+ZYboPpBTXFjU7j3nm FTmlv4RrLKQNTkRfiS6W+DUxc4H4ri6rtnb9X+JOCMxZ0nLUs3CXL4maT3CpPGg96VNtyJlwn0P hzSpKX7gXsEiivisBxOmA9SuvXltOfs9EhYd0bVUYBGCXqm4BgVpiX8OJ/jXgVYEAqjhSPF4ug6 dvZnsFy5YS5Nmg80E7BLDkS0hZuDVwWXs0j7Eowq3ojU6jOx1Vvb/X+Qi4ZDVyb3lKAP433RPcf n0uvDzcfQtVNI4ukYHmI793w7f4kHeDIqsNL5S3VvD1a8y9syo+ARfMN3Z/jyIX//N30aKXB2Pq VaOFAiNp9qwkJFkVQb+hGYNA9C4b7RtkfjOv0x9AV9+A0nKE+a3w9I+NDFAGg1DnYz9mD/rkskg 9WPx6YraQqLIr8lfT35Ez0O6nA2XHs+M7L77xafTorLUlgYRgQqmQUrSCP1WMEmD/El5ArG4kNg MDSgCSuf8dIyD53vPMxRY3oiphQLu2Mm0P6koGMzHztibKf9NtRgV0MEwaPhZTdv58pY2JIHiOw DbKescjQ/toPPsNQHMhcCA8d+WoCefPcd+f2K7b9+6yO3zG/ahbwxk X-Received: by 2002:a05:6808:4fce:b0:4d6:9222:99f7 with SMTP id 5614622812f47-5640dde6011mr10618870b6e.55.1793742010259; Tue, 03 Nov 2026 13:40:10 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:09 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:39:58 -0700 Subject: [PATCH v7 05/12] serial: 8250_dw: derive RX trigger thresholds from the FIFO depth X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-5-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FROM_HAS_DN(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; TAGGED_RCPT(0.00)[dt]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-27151-noreply=patchwork.local]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[174.29.1.49:received,100.77.114.92:received,209.85.210.42:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_FROM(0.00)[gmail.com]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 78ED71C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX DW_apb_uart uses receive thresholds of one byte, one quarter full, one half full and two bytes below full. The generic 16550A table describes these encodings only for a 16-byte FIFO. For example, the half-full setting on a 64-byte DW FIFO is reported as eight bytes instead of 32, and a sysfs request for 32 bytes selects the 62-byte encoding. Build a per-port threshold table from the discovered FIFO depth in dwlib and install receive-trigger callbacks for CPR-described FIFOs, including LPSS ports. Keep the setup helper available to integrations which obtain the depth without probing the optional DW registers. Validate that each threshold is positive and representable before constructing the table. Serialize FCR updates with termios and the port lock, acquire a runtime PM reference before accessing the device, and propagate resume errors without changing the shadow or hardware. Update only the trigger field so changing the threshold preserves the FIFO contents. The FCR mapping is documented in the DW_apb_uart databook, section 6, FIFO Control Register. The existing default FCR encoding is unchanged. Signed-off-by: James Hilliard --- drivers/tty/serial/8250/8250_dw.c | 7 ++- drivers/tty/serial/8250/8250_dwlib.c | 94 +++++++++++++++++++++++++++++++++++- drivers/tty/serial/8250/8250_dwlib.h | 4 +- drivers/tty/serial/8250/8250_lpss.c | 4 +- 4 files changed, 104 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index a546cf2de7b6..613907b8a40f 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -648,7 +648,12 @@ static int dw8250_setup_dma(struct uart_port *p) static int dw8250_setup(struct uart_port *p) { - dw8250_setup_port(p); + int ret; + + ret = dw8250_setup_port(p); + if (ret) + return ret; + return dw8250_setup_dma(p); } diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c index 91b3607b64e6..004817cc8f28 100644 --- a/drivers/tty/serial/8250/8250_dwlib.c +++ b/drivers/tty/serial/8250/8250_dwlib.c @@ -1,18 +1,27 @@ // SPDX-License-Identifier: GPL-2.0+ /* Synopsys DesignWare 8250 library. */ +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include #include "8250_dwlib.h" +/* DesignWare FIFO-relative receive thresholds */ +#define DW_UART_RXTRIG_QUARTER_DIV 4 +#define DW_UART_RXTRIG_HALF_DIV 2 +#define DW_UART_RXTRIG_FULL_MARGIN 2 + /* * divisor = div(I) + div(F) * "I" means integer, "F" means fractional @@ -208,11 +217,86 @@ static const struct serial_rs485 dw8250_rs485_supported = { SER_RS485_ADDR_DEST, }; -void dw8250_setup_port(struct uart_port *p) +/* The trigger is the masked FCR receive trigger field, in register position */ +static unsigned int dw8250_rxtrig_bytes(struct uart_port *p, unsigned int trigger) +{ + switch (trigger) { + case UART_FCR_TRIGGER_1: + return 1; + case UART_FCR_TRIGGER_4: + return p->fifosize / DW_UART_RXTRIG_QUARTER_DIV; + case UART_FCR_TRIGGER_8: + return p->fifosize / DW_UART_RXTRIG_HALF_DIV; + default: + return p->fifosize - DW_UART_RXTRIG_FULL_MARGIN; + } +} + +static int dw8250_get_rxtrig(struct uart_port *p) +{ + struct dw8250_port_data *pd = p->private_data; + struct uart_8250_port *up = up_to_u8250p(p); + + guard(uart_port_lock_irqsave)(p); + + return pd->rxtrig_bytes[UART_FCR_R_TRIG_BITS(up->fcr)]; +} + +static int dw8250_set_rxtrig(struct uart_port *p, u16 bytes) +{ + struct dw8250_port_data *pd = p->private_data; + struct uart_8250_port *up = up_to_u8250p(p); + int fcr, ret; + + fcr = serial8250_bytes_to_fcr(pd->rxtrig_bytes, bytes); + if (fcr < 0) + return fcr; + + guard(mutex)(&p->state->port.mutex); + + PM_RUNTIME_ACQUIRE_IF_ENABLED(p->dev, pm); + ret = PM_RUNTIME_ACQUIRE_ERR(&pm); + if (ret) + return ret; + + guard(uart_port_lock_irqsave)(p); + + up->fcr &= ~UART_FCR_TRIGGER_MASK; + up->fcr |= fcr; + /* Changing the trigger alone preserves the FIFO contents */ + serial_port_out(p, UART_FCR, up->fcr); + + return 0; +} + +int dw8250_setup_rxtrig(struct uart_port *p) +{ + struct dw8250_port_data *pd = p->private_data; + + /* Each FIFO-relative threshold must be positive and fit in the table */ + if (p->fifosize < DW_UART_RXTRIG_QUARTER_DIV || + p->fifosize - DW_UART_RXTRIG_FULL_MARGIN > U16_MAX) + return dev_err_probe(p->dev, -EINVAL, + "invalid FIFO size %u\n", p->fifosize); + + for (unsigned int i = 0; i < ARRAY_SIZE(pd->rxtrig_bytes); i++) { + unsigned int trigger = FIELD_PREP(UART_FCR_TRIGGER_MASK, i); + + pd->rxtrig_bytes[i] = dw8250_rxtrig_bytes(p, trigger); + } + p->get_rxtrig = dw8250_get_rxtrig; + p->set_rxtrig = dw8250_set_rxtrig; + + return 0; +} +EXPORT_SYMBOL_NS_GPL(dw8250_setup_rxtrig, "SERIAL_8250"); + +int dw8250_setup_port(struct uart_port *p) { struct dw8250_port_data *pd = p->private_data; struct uart_8250_port *up = up_to_u8250p(p); u32 reg, old_dlf; + int ret; pd->hw_rs485_support = dw8250_detect_rs485_hw(p); if (pd->hw_rs485_support) { @@ -250,7 +334,7 @@ void dw8250_setup_port(struct uart_port *p) dev_dbg(p->dev, "CPR is not available, using 0x%08x instead\n", reg); } if (!reg) - return; + return 0; /* Select the type based on FIFO */ if (reg & DW_UART_CPR_FIFO_MODE) { @@ -258,6 +342,10 @@ void dw8250_setup_port(struct uart_port *p) p->flags |= UPF_FIXED_TYPE; p->fifosize = DW_UART_CPR_FIFO_SIZE(reg); up->capabilities = UART_CAP_FIFO | UART_CAP_NOTEMT; + + ret = dw8250_setup_rxtrig(p); + if (ret) + return ret; } if (reg & DW_UART_CPR_AFCE_MODE) @@ -270,5 +358,7 @@ void dw8250_setup_port(struct uart_port *p) pd->srbr = DW_UART_SRBR_0; else pd->srbr = UART_RX; + + return 0; } EXPORT_SYMBOL_GPL(dw8250_setup_port); diff --git a/drivers/tty/serial/8250/8250_dwlib.h b/drivers/tty/serial/8250/8250_dwlib.h index 7191cabfb086..44a5d0c2feba 100644 --- a/drivers/tty/serial/8250/8250_dwlib.h +++ b/drivers/tty/serial/8250/8250_dwlib.h @@ -88,6 +88,7 @@ struct dw8250_port_data { /* Hardware configuration */ u32 cpr_value; u8 dlf_size; + u16 rxtrig_bytes[UART_FCR_R_TRIG_MAX_STATE]; /* RS485 variables */ bool hw_rs485_support; @@ -100,7 +101,8 @@ struct dw8250_port_data { unsigned int dw8250_get_divisor_dlf(struct uart_port *p, unsigned int baud, unsigned int *frac); void dw8250_set_divisor_dlf(struct uart_port *p, unsigned int quot_frac); void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios, const struct ktermios *old); -void dw8250_setup_port(struct uart_port *p); +int dw8250_setup_rxtrig(struct uart_port *p); +int dw8250_setup_port(struct uart_port *p); static inline u32 dw8250_readl_ext(struct uart_port *p, int offset) { diff --git a/drivers/tty/serial/8250/8250_lpss.c b/drivers/tty/serial/8250/8250_lpss.c index f1b4b975571a..7ace0515038e 100644 --- a/drivers/tty/serial/8250/8250_lpss.c +++ b/drivers/tty/serial/8250/8250_lpss.c @@ -350,7 +350,9 @@ static int lpss8250_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ret) return ret; - dw8250_setup_port(&uart.port); + ret = dw8250_setup_port(&uart.port); + if (ret) + goto err_exit; ret = lpss8250_dma_setup(lpss, &uart); if (ret) From patchwork Tue Nov 3 21:39:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3847 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 577621C735E for ; Tue, 3 Nov 2026 22:44:13 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27152-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27152-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 466EF2ECDA for ; Tue, 3 Nov 2026 21:40:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742012; b=WjzeEWT3aZU9XwjLboynBa/LDY0LqAQx64YPwVazo0L94zFESCRoY/9KYGpHLMsOrA28 hnRol7jUwS5r2GVP44LolEvACV9yNffXw58lgsm6LRenH+cyQFB4+OloJ+X2tS5CeAOPS 6CEJdRy+/IZzIQ1mDBSLutxs9zDma28deallV0fHXtZaL9V8Zz6S+BQ/DkrAyvAdvq2Mr 3+Nt9mV3Uohk960XCMVSeooFfEEOKujzqiP2xO0vmpIG0TFMB7ybu9ncOq3qPKkKJo82A hOrhuMWpRXw5tjRFXSAYmq+K8gA+Lg2Wj56BjaIEgp4LQpvR2+SiZmH3WMmju7VNVNQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742012; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=HRoIIA2wpujQ0+Dd3LKXeU40GCpk4ukouOoolwO0ux0=; b=R0cczgz3F4MolbUsFaGPj18AYP5+fT9g2CYzmtbK5wTKzGvc41pt9EHOeT1zN8No434h ZrtUecmfSL94EgGpmMSfB4UeMprSuyZCKkQAeEYYBCo3nL0EwNGVx/SdkKT4WcQaGRDYW Bih74TRDhU0TeSy664fmp6lD6OcMCFsE3qbUlvawCqxRVyHNz/Sopo0aS7fmO5MG3Lqhr hyuSTBMZL7caiHAy3llHRjIWddyc9G8S8fWbybbuVjPHA37z/f0NK4KgVy77pH91fqiBR S5qBZXqrlPbu78pQIjS//qkx4EvGEEFQnxMOgt4ZpyKK+yUQZDShPDdLPI2bT7kDh6g== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=QMz9CHbG; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8D91606D80E; Tue, 3 Nov 2026 21:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=QMz9CHbG X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742012; b=oovD+fRL5hBcYtTXQ/QOmkxr7Ti0aNYSTl0BWdwSvGw9pHTfJxF8RO6FTPlc25xcwJPY eMg3Rw5+FLO+x8DKG6uiyC6ukRW2qBKBzs7F/Z3aYEN3VeSTgnrH0hlIM8Wzbg5xizikL VNdrV5lq7szjiqqJNW0jp2Jeyq2es4JZRya5u/XdjRUi0bfKGvquRMx63pz5uQmVdZeQl 7T9CwKd0RZSa/LLWUKX+syZnnvgAKHRQl7ItCOsw5avRHpok3TIwouyxcNkYP/dltGhDn Su73I/cFNZH0PWXGe6YWW94a7nM1ACtT2SZcodwG0AkteRO2e7BtsJYCoYKURp1V4+w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742012; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=HRoIIA2wpujQ0+Dd3LKXeU40GCpk4ukouOoolwO0ux0=; b=AgHZ+S+Eksyn8bA4I43DT3YAyQ0LUqn9X8Qn1b3R9HCK6p5OyqI2Yrtf6prLJhOWzyqq tcJCY9M9iHdCN7Z+RArItd5hBH1K2cJDOXwgpL5MoUvASDkQSlUHsAIhphZlx7RHZ8x5V /jAwl5qeCsTc/cSIn5EX5NN4bLqXIVkT7qeOC8GPIPKhWQ9UPXR5Dlve7rht36dXf/oBy iMnGn278KYqrSX9MejLMyL27sal64jEDYUn+l4cukI7jmCHTW0iV0lqkbAt5kOAK+iMTC QBc+Y+aGT5JoZqM1SQetLVVePz+YfTQQye2ZHz8hUeqvyzivZv7uV94uT703TKmsdMA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=QMz9CHbG; arc=none smtp.remote-ip=209.85.210.45 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58288606D80A for ; Tue, 3 Nov 2026 21:40:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 58288606D80A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-843a4ca671eso19127a34.2 for ; Tue, 03 Nov 2026 13:40:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742011; x=1794346811; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=HRoIIA2wpujQ0+Dd3LKXeU40GCpk4ukouOoolwO0ux0=; b=QMz9CHbGvzGtVlrB7/xD9oP46wErG2xbCkbLE2fsNnCGAwBHaTirFUKq5ldNb4j9+O vEQmXVADkU/1SIhT0trRjJWqGbKgGFZ+64wXldr2TLzRKwI5swMAWWyHZwD1lpS1rGo5 ATQJ4aLZHlq+EnsRi7+WZ2yFsG6R6XCWcJ73HtHYmPsWk4lFMaY20LqyGCUYh4GfrZHN hdwIPyC/IvNzjFk3uIfqfeHnBu912d+w3XeXogBVI7ikOqS0ZJk1pN7z3a0HO5P7lc1W +R0ObjoyM1OEkCD6o6b3Q2GscNnyqkYF8R+ddKzHSxRSYenDOyYjNoFN6MHW9YbLdanw 2Wjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742011; x=1794346811; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=HRoIIA2wpujQ0+Dd3LKXeU40GCpk4ukouOoolwO0ux0=; b=JTFcpm5yU5znslhJiUq6PESTY6OIa9+bYjFRflwcbWh8leNtXPeuUWni9TIaJpXjdU 4nkYkFA9j51z9CHEzJ21ma40PlzeofLvV+qRZpnv88uaOaCJfJ0ahgHSF5VIym+ydBZd It4913WyE0yTAnYMFTdkkAkffp6UJe+9x63lyb+T/MbqrIswuGU5+biN6OYktRXZOyiY fGurrF/N5Xta5v+2V2ldPhjkyq1mmFq8uAuBIgBLclPdSrPCMdl5J9oD01UgNwNwocKO xhQs7SRGr7fPRpl2ZL6B/jo/hGihyFh2UeZHmzTZsA9cHegFkMjyrR1tl+TdwvTlkq4l Aexw== X-Forwarded-Encrypted: i=1; AKwUvBx7n8afIe9Rk/nr3Bg8D7JvLsKeRLGBhp2pvASd9vpx1f/9REx+6cKj1o0NTfLvZaCAuDch+PHObRvMuw==@lists.linux.dev X-Gm-Message-State: APuU4Z+elCjqCW3FbszGOk725SLfKKXA7Sc9exqMx0uAqTmEvxMMVAS1 YsnyUDY4wkRk0VjRFI27PkH/EN9QEI/GY7H/d5jIY5oLztv4kWpNRvYr X-Gm-Gg: AYBFou0h0dSdGCT3theqWDrBqWMRCBsPFApFTuaWEC5imfxf1wODwR9BPD7Uowq5+Pr aOjdDkntU5/ZJlI9Naeafu9agLM0msFMRo0TBg+q7wG1sGvJuwNq9cyBUnPjCAWqNxdtb+ycb36 R8fiInIJqtaEu5P3LEQLR4pPPFIy3J8b5NYMeHnEG6OrmA2ASgzcyQa0D29dca8CxlEra0kY8nf eGbpidQ63gVOgAOkiedZlxXrg2SJBreDdcuR/6V/VAsVQHaozvTkYS/WsNSycWufBdyp33DrBxO 3vpxgtbzDRy/SozcOHsWrqm/oIndI4msSFbAFPY3erGEBbzdPpruYWv9+EQ1odpc9B3AxbMpNRD uSTW13pe3/U45RPgxfS+qapgldMac6Zx+F+9XODnHiO+K4xBLd8+dWlVCouIOaitSEISgDDc6qV ZSYsO7rOijuTVOIC/0+L5KAejib+mRPjygqHBGY0YKg9nz7ObaNWkTSBE4kRcT3UCsRdsLhIV4+ GTsB0I/Y81fu8BXBtu4i8ZZ0BAo/Hx/wVpr9geUVdvNapu1Ku0o9pyM+NX8xCtJ4ded2L2HiqHc XA7lNmpBDVp85UuNR3jtAD4JT/O58QqxqUiwIr3lvw64QdCEqsiVn76BTWWwUwc567pokN4JW+1 L3o2emt5q6dCoL95aMlblnlSofitSV0hj8GbMA06fWJukBDhBjA2Q/cOsE+e9wjI7WhvkpRr379 0r9fFHbffA+dKMvf/fNntqTNGJgZIgPCh9zShNDdkcXxrxBfp5hXMO X-Received: by 2002:a05:6808:2507:b0:4d6:90d4:6bb with SMTP id 5614622812f47-5640dd9d63emr10403938b6e.45.1793742011356; Tue, 03 Nov 2026 13:40:11 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:10 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:39:59 -0700 Subject: [PATCH v7 06/12] dt-bindings: serial: snps-dw-apb-uart: add Allwinner H616 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-6-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard , Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.31 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; TAGGED_RCPT(0.00)[dt]; FROM_HAS_DN(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWELVE(0.00)[17]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com,oss.qualcomm.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns,qualcomm.com:email]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; TAGGED_FROM(0.00)[bounces-27152-noreply=patchwork.local]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,209.85.210.45:received,174.29.1.49:received]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; MIME_TRACE(0.00)[0:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: 577621C735E X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX The H616 UART has 256-byte transmit and receive FIFOs, but its DesignWare component parameter register does not report the FIFO depth. Its optional register layout also differs from the generic DesignWare integration. Add a specific compatible to identify this fixed configuration, retaining snps,dw-apb-uart as a fallback. Signed-off-by: James Hilliard Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml index e2ca126d58ba..fc1289073241 100644 --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml @@ -60,6 +60,7 @@ properties: - const: renesas,rzn1-uart - items: - enum: + - allwinner,sun50i-h616-uart - anlogic,dr1v90-uart - brcm,bcm11351-dw-apb-uart - brcm,bcm21664-dw-apb-uart From patchwork Tue Nov 3 21:40:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3849 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 7C8811C7350 for ; Tue, 3 Nov 2026 22:45:07 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27153-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27153-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id BE1D530039 for ; Tue, 3 Nov 2026 21:40:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742014; b=Lte9Xb0jebrtiqy35j4/zskpUG669AOZqPGYR6Y+XVohGyW3GVo0eQ0zvWSfbspinoh6 TeFxdlb2MXXKvP0SMInH0RDl3PN4Tig1s3ziPczdfmZFn3LoUVMyDh1ot9VJcI2ZNUScF KPKKnX5EzvzxX9f1HfsYGXAMsjHMhBzGtal3bHyA+ejlB69rpYH5DyYiq2v7GJv/RGMS+ ttct8bHHun9lI1ab9NwrE2rEERcAlzgrrSLOofUYs0Xq5xP9WLDF5V3KxeSm1CJWpzu6n Qne+KxDpVDhNGQb4iW36tzX5NBDGpovgcrnvOQ8HzBnlLwEExaWIJ9lX8y1DUT4h3Hg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742014; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=JhZegKXTLoM0aFpusHdkE4137WJUIfV1PRTu3QP4cf8=; b=VnRGYZoFD/FiBrILVEY0A6o0mFEIeip390M1kfHVYRbrHmnVNjF2XdYSP+i5200BB6/E 8UMpKHF9jlC6uwZIB5VNUPGNoKd8CC+kZy8iZ8Gb+PKXHbjsasurpAUSWSc1cLaYJMHOu 4Izr5kgILruVvvXPs99yCwn6JM0uWXlHUDtYDo9gSQtOjgaTxQhGJQ+Fo0HQMkKnwjr7A NcA2+0b6xQwtVZOqlx+LGsUywVZV8PX/TFaB1JKn4/BXp2h6FOwlA9xJwprYJ3+I58bb3 E7g/+E5XM8GOuwb+DjYfTZ/NKTNWaiN3tuOzwU45NiOzRDrf/YqOAe4uErNOcTfeijw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=l93Z9ofE; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 294DD606D83B; Tue, 3 Nov 2026 21:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=l93Z9ofE X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742014; b=GUlIZHYhPyq83GZN1SomQTtqlvLHM+/G7KGQLcHiW1aSMWjdYYONpi+4iqf9r8zXu5Bo nWJMKx8Ec/2imjBOLwWw9k4RKJZez3By1gOTKZW7dIHLokMP2/dUPLPAJ+oA8L8OJChyG 1NJCw8kmCkkEIwono6EMlKn264XfxKwQrunNqkOE3tNoajlbM8x4CQT0ignOFDlUusp78 /U/tb2kNMzQ57EBGRQIIwFFGDFgG1FTiPHKyBKL6aO4d24Vms+45SoGTAXogseJ+y8Ucq NJ7swJOC5ns3gefxx0lgIrqfZ7HG2ZNFL7r1y6Jfio1czFJ8VPuUlWoo5dylimqksmg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742014; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=JhZegKXTLoM0aFpusHdkE4137WJUIfV1PRTu3QP4cf8=; b=vMT2eKZutsebdEWySGa9VtAMpX3YP5vuiFw8bXX9YkoN2cyD2Ha5DwsZuUYRRkQHAfgs eRWj8zUIn5EhkrE81qIflLR9Yh16Vu6b01W2GnvizShnzJuWvPupRs9ijqjGcv4JpP+O/ N5Zf4YGx8CvmXn/RskXw9BDnzW78gHQvgSexS+iAY/EChlal6B9kLQhBdQuJYGzovflPZ MF5LsZHTS0H/67VPzHjBkEgkR2MFXwB21x5k/Fk7uAukP5dHL5BeNtm0ybA9Xta6G4FEc rmDayWggEkKoWXSV2fFEZ0yhiZ5QdrtRqFGPFZP+Sp/QCACs3p8HaMhMIk9DTKYcWhA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=l93Z9ofE; arc=none smtp.remote-ip=209.85.161.50 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61E27606D829 for ; Tue, 3 Nov 2026 21:40:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 61E27606D829 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-6df5e315bd1so22986eaf.2 for ; Tue, 03 Nov 2026 13:40:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742012; x=1794346812; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JhZegKXTLoM0aFpusHdkE4137WJUIfV1PRTu3QP4cf8=; b=l93Z9ofE+Jp3TIxshsruc2Et5O9IZnceFo6pBzcGFfdyM54WBXfYv2+SSol09/zmWT itVt1pHGEhbA9RSvbE0ySM8NSaIFk1yRP6oyy8yeNYmbKmHpqHYfnC6wBQNDno8aGz/1 8YrzjwTvsNzMbxMogtIb2ia3hNlCFY37bN/94BYlWMRsN4r9A200kFEzPN6+XPJKvq3J uJAohmfBYJgI6aL63inA2Iy2kiTV4eyDvO1msMuzqW2D6HBUEbynoXvxCOS5H2TxrnAh SIw/QCbLFphzIzNDlDwNffgfB9iOahE/EXMqTNR0gvz4Jy18PtNh5vO41LbHolGhpbyM VQtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742012; x=1794346812; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JhZegKXTLoM0aFpusHdkE4137WJUIfV1PRTu3QP4cf8=; b=KilhJZrys0Y0Zv3LT1cSxHcr0jdU6DTOmQgSKHAmGmGrgve+ulAlmhxmctoifGchBp a11MTz+STIgLHIxJb16u47/lYhqqiv8H7/C86AfUlM3JTsyTDlMfLFLcZPWtED9/69Kg pf7+o8ps87BNtEItru090Mxuzign1LRkc0pFxYWuE/X0k7qlaIokkmVslLXesa0Xo2fX pYHfrW/XWREhr35fKRSRM71dIkuBQvwtUyqS4XYsSrmd2wAjmFVjEabsDEX9sOmM0fUY nmXgU5bG0t+t3yw17k6+SWZms7RJSy5PfCLgYUOgBFlmLu+Vh8EriSUsylk5MMXt/Mfl x/Qg== X-Forwarded-Encrypted: i=1; AKwUvBwxmjRu0R8n4nfsMNo4Fa/DBgxYkizaWwoS1T/Fa0Rr0qCKtjtKbSNXsd8MaMt62gagyWJDyfcgkwpNgQ==@lists.linux.dev X-Gm-Message-State: APuU4Z9fQ6StfG3Dd9aJt6iCTT8Jntw65kPCLeFSCz9x01t6k8eLkGes 5HAkifmGuPfJDzIT7f2gN4385xIztl+CCqf8OWht4hMS3lz7veofkDdo X-Gm-Gg: AYBFou2/az+rYIWorys1IBYhtWBZLsMywE+H+ouT+98zXWUJa4ISr0s2WlE377g5t6h jBQFm+j5sX/HJUzkkhpqGSZ2haOhymqMX7ChMnQoFFZbS180sb+sJQ4w+SPyMTACO4D7VVjuXwW WGTRV8CvrOsG7YMxVwsB4F15bsymFzvHPCyHNFGHmIbj4VvJzd/ESbjcKVokYn76O6qXC2kMsoz hkecsyh/3IeChpMgx5vwiBZqMejBV3GfxO5xlhYz3Hu9G2rnTJB1hYVsEoipGbrSy92AuH+a7Yr 3ji8yXmeC1+56GKCzRupyjavmN1pfTZNkJXRTRuLG5FfylaEg6ipbeRMH9Wgkp8x542XMvIeOWX aMKk0Mi0Ya2EWvz37EpWapHs+CYoNQThTTz4cDxU5egFypIeRA0lE/YRoYNQ3S4RXxd6aSWX75z 6+4LEzgTbiaDMljm6Vhwf9qhjCtNOgCNV2BpEW4iaynEkxUOkIPY5rjrIL+1fC26AbuHjSD58qH wXF0xckRpsBS8TkhRAQgzsift/bYpOCzOfUeBHIrretM2/ieAxUyOflFd4Xufbk7xNPvClVbAjp dDbAoivDvGFSTmYxjyzkXnrAQIb1ZvIYFE4CtWHBnJ8Vbnag+CE7+treiCX+zoG1t+Zc0Nz9Qqu t9dukWLfxgR8L81d0o1wOQw0qpilaB9sR5zIpmMyVrGzK9VrqTM/pt5pvmUO54X5/uDafOhXj6E ZV8i06zoBVbfp5PRRPEpIrAXdDuDN0yeCvkvdieG1P6wjP/sQk5YRq X-Received: by 2002:a05:6808:191f:b0:4f4:3790:6615 with SMTP id 5614622812f47-5640deea416mr11125036b6e.11.1793742012357; Tue, 03 Nov 2026 13:40:12 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:11 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:40:00 -0700 Subject: [PATCH v7 07/12] serial: 8250_dw: configure the Allwinner H616 UART X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-7-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[dt]; RCPT_COUNT_TWELVE(0.00)[16]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,174.29.1.49:received,209.85.161.50:received]; RCVD_COUNT_FIVE(0.00)[6]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[bounces-27153-noreply=patchwork.local]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: 7C8811C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX H616 has 256-byte transmit and receive FIFOs, but its optional DesignWare component parameter register reads as zero. Generic 16550 probing leaves the port using the 16-byte FIFO configuration and its trigger-level table. Keep PORT_16550A and supply the fixed FIFO depth through platform data. The 8250 core derives the transmit load from that depth. Use the shared DesignWare receive-trigger setup to describe the 1, 64, 128 and 254-byte thresholds, with the normal half-full FCR setting selecting 128 bytes. Advertise automatic flow control so CRTSCTS enables MCR.AFCE, matching the DesignWare termios path for hardware CTS handling. Select this configuration through the platform setup callback. H616 has debug-divisor and RS485 control registers overlapping the optional DesignWare feature probes. Use the fixed configuration with BUSY-safe integer divisor programming and software RS485 handling. Keep the UART clock enabled during termios changes with SKIP_SET_RATE. Its clock is a gate on the shared APB2 source rather than an independent baud-rate generator. Signed-off-by: James Hilliard Reviewed-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_dw.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 613907b8a40f..0e7367ba872e 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -63,6 +63,7 @@ struct dw8250_platform_data { u8 usr_reg; u32 cpr_value; + unsigned int fifo_size; unsigned int quirks; int (*setup)(struct uart_port *p); }; @@ -657,6 +658,30 @@ static int dw8250_setup(struct uart_port *p) return dw8250_setup_dma(p); } +static int dw8250_sunxi_setup(struct uart_port *p) +{ + struct dw8250_data *data = to_dw8250_data(p->private_data); + struct uart_8250_port *up = up_to_u8250p(p); + int ret; + + p->type = PORT_16550A; + p->flags |= UPF_FIXED_TYPE; + p->fifosize = data->pdata->fifo_size; + up->capabilities = UART_CAP_FIFO | UART_CAP_NOTEMT | UART_CAP_AFE; + + ret = dw8250_setup_rxtrig(p); + if (ret) + return ret; + + /* Use software RS485 with the Allwinner register layout */ + p->rs485_config = serial8250_em485_config; + p->rs485_supported = serial8250_em485_supported; + up->rs485_start_tx = serial8250_em485_start_tx; + up->rs485_stop_tx = serial8250_em485_stop_tx; + + return 0; +} + static int dw8250_probe(struct platform_device *pdev) { struct uart_8250_port uart = {}, *up = &uart; @@ -880,6 +905,13 @@ static const struct dw8250_platform_data dw8250_dw_apb = { .usr_reg = DW_UART_USR, }; +static const struct dw8250_platform_data dw8250_h616_data = { + .usr_reg = DW_UART_USR, + .fifo_size = 256, + .quirks = DW_UART_QUIRK_SKIP_SET_RATE, + .setup = dw8250_sunxi_setup, +}; + static const struct dw8250_platform_data dw8250_octeon_3860_data = { .usr_reg = OCTEON_UART_USR, .quirks = DW_UART_QUIRK_OCTEON, @@ -931,6 +963,7 @@ static const struct dw8250_platform_data dw8250_tda54 = { static const struct of_device_id dw8250_of_match[] = { { .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb }, + { .compatible = "allwinner,sun50i-h616-uart", .data = &dw8250_h616_data }, { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data }, { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data }, { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data }, From patchwork Tue Nov 3 21:40:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3850 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id E8C761C735E for ; Tue, 3 Nov 2026 22:45:52 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27154-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27154-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id C20C631682 for ; Tue, 3 Nov 2026 21:40:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742015; b=Hto8Pc6tPkHJe6q+NMbhrq4e994OcpaCDzL3DlEQAeLQwIilEquQRG2Fh89fA3H66NjQ GVgamFF7B6gnoEArPJYmMmXFpsEl9/2+KOFbhr8NrCq/tds3xWihKbJCUtFPulLThp48A NzqmTuiv+AMmMk2upV7r5RJiaj8mRTV2Hy28vDUATMpv9rAwQLA9vz+XHlrNCKrtgAtk+ ul+Q2GY82MHAnjlc/8ZsC/A4xRHvNsBdqePA6o2I1RAQBCKN7QmtOyehqHlHUqic7Y5w6 cmrqba7lvryw+H96Gn/j6rDJnNaB8a6LrmohWgkwiDERf1a8LB/lNaY+SiUl2q0tJ+Q== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742015; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=0g1OT4dACORpc1EFN+wgx+XwdWT726Bj1M4N83rR7xA=; b=ukFoC9J3P/c4raBkAgx8YDdfCnIE/JHxdXQCCiYh6ozfZcfb7zw7SzVKbNQq3CqR0n++ QCX9RsO3bb5yfwaNDPBu4TJ95JFsevdWwI9zJnHecoVhCarp53Q27+R9XhUzQuiM5cndf bweJ84WhK4s20OdLUhS1Ma2GAVQxCc0f5MTXqeTcbKOGw8yyNjIi93dbx+RF7Kz/IJnXr Vv0SA0iSkzlPQEGC5GVMLKGVlexN5H6Vlum+fCnT/B+vBJqhwje3LgmC1K7EfC+bp2gSk 9+SVB6jLypNfj4gna0AREvJfyhwuFr/D2kOgcxo4gQfSsjqxCYZxkvCJvUssd7qj3Yg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=n5pyhaD2; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63213606D80B; Tue, 3 Nov 2026 21:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=n5pyhaD2 X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.178 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742015; b=1WQFVAvftxRoFeT0Tf2R/hs5pBUYmeNepFkFgxd1mUI3U5Z4tanJ86G3bfYluOsqflcV zWj1vpXWa3XRK6wK1CLv5s1YOOUU+L+7GBROnOtTOGkuQ2OdkOXasGmn82FYHAoGVSyBU EdYjjtfZ2aylyiwTbPRcLlw62LnxTYf6uI4TqD5IwhOjU4Ifc7wsWc/mW633IXY+BJ7lD mYbfI4pslocidmnoJ02adk4Y3Bqno20gmamZmudtAc7vzxyV9Ct2UZ32zOg17gp8hMekO puSJR1YEogsyZ+D2W4z3ZlCPNfzb49lnWOZR5jOPSSV/uwkOLSAqL1cvNKNC++JPIlw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742015; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=0g1OT4dACORpc1EFN+wgx+XwdWT726Bj1M4N83rR7xA=; b=twPAolFiGupNSd3MRx4QAPW1ecdAPomkZ2jx4zCTtIovfJX9fwZr2atFfqyqP96hd458 6FueDo11xT7MVLa3dgp2HB4Yvp7/Y9cFXOeYPAxB52RSDUdXUcREi7rRx4Adfpt2YJIug Il2AH7/LW25dG3Uxg1dQkrPL37cQ0dODPb2aj64xhc0FCe2iBat3ydgqkxumtLz2Eh3MR s9/x1Md19LOKHzP5DkuD7dZLI5dw86IqHkZHQ7m4BogEjecThFzfIiix6Kk63HQ3+ChBQ FsC5VAIBTOcGzcgLb9qokw9BK9rluHRbZP8OiN8E+8sYSnMckHg7pImK1q1gSJBHa3w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=n5pyhaD2; arc=none smtp.remote-ip=209.85.167.178 Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FF53606EE83 for ; Tue, 3 Nov 2026 21:40:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7FF53606EE83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-4ed6d69bdfaso47650b6e.3 for ; Tue, 03 Nov 2026 13:40:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742013; x=1794346813; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=0g1OT4dACORpc1EFN+wgx+XwdWT726Bj1M4N83rR7xA=; b=n5pyhaD2VRQ3AhfxZyXF1sAwEL+FzV0BmTFuAbopV2bH/3NLsWXVPmvHmGyeiaddOB 1YIJN3deiHuu8lPUPwnD9z7/AZHXV3pS06E0N8rE+XeHRVqvWhqnFIIDzoKpWhyXKXlQ AA9bo9NwjOVzSYMCXPAhmE6NgxlJOP2pA8GJmXSW7UX8NmN3LwjcGzb5JJ7wZeas52so X0ZUfAKzAQEbGPywdAvpzQAIGWtczmkYF6VzKiCtD0//Qtag7WZwxdf0nrKm/Faxf7kd m/4/ffrmfEp5Ef1YGqqbmooGDqVLcNsLF06keNAkJkN55P4FXvCwxvSlBFpGnu+Qftg2 RTjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742013; x=1794346813; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=0g1OT4dACORpc1EFN+wgx+XwdWT726Bj1M4N83rR7xA=; b=pE7ovH63U/9DG/n0ocFqQc4ukUA/5b4+6RQurzpGyjpv2s8ML/ZBjlR7ce7mrJPR9m 75XqKNIXnig485u5gbodM02Tuh4+zvG9XmgwtbX/nfWr0gdza9bf64eIAmAt4inYX9GF HO4T33LvaNUuow7MVdWZaQoEXYeHMgvyFouYUOFgGPpxchfnGugRFB/22wmzg4IPxS8C 3CBtpfXwvGDLHkrLRejBrVYSUmwwp3BzRdqT7LvbraTin644m4fS+akHS3rabJ7d2e8S 0c7KpT+PibJc9VLcmgOwu8ZX5D39GR7DY0HysVj3G3LGaeo5c1lb8Kcf5eXdCeBr43+y eAjA== X-Forwarded-Encrypted: i=1; AKwUvBwV6VIrxN9w4QWcOgNR0dt7tUHAOWuo4vzIX4UddBfe5HsXx2RGKND/X5ga6bbWY/FS3E64ozcbbEK0mA==@lists.linux.dev X-Gm-Message-State: APuU4Z+V7oRsSJvJ7nl9DFJ7CzVKdk2Xi496BfXHmp9p6qxtyigIAGT5 fCJd6pcoe1P/OC3PEM7Tliws4XkpcGMNbujAsoIPO9b4obQP/1hfLwd5 X-Gm-Gg: AYBFou37bQxqY4Z5XHuE9yP0gAXPx3oDvuA/Lmr3mTcWOGDct8kC7JDrA2L+0ib7CzD AoU1ERA71DOSepbcWy6s+hq0XAhVQsARmZxFfkRSFnzXIBaw7fldyX+rS76rm9a7E/5E6ecBc8e tmxbVq563B0+7I2q1PCjHB78YtOED60ZqlG/bmpJ8g21MEfJrNa1iS1oEhsoWDS2azetQDX9EFk LU0kOK0NHb/tQPQlPWQSFG4ZQoutLPxzdo1LXSyCa9RAbBATASXHjQVPm1EiUJsFUoDq/RpvY7y VgakScdTmbwwNmBe3tB7DFEVDNGPaLcP70+7M4KVkhjw3nBWGc4TqU8Yj8aC+2M6gl0AI4YUbT4 BRTeNKVLDtvxdzkhYZRcK0F6gUkJsFc5ngaXAl4GMQzVGg1g19LBZl5DwiEcarujYvztmuQaEfo Acom3pUT3fmpG3cEED2EyOOOTzlRbWqFJdz4I7J3t2T7BCoS8+RKT5VbNV4o7+mku9N++23/fZ3 YLa0XYvcHuvIq8lr7Mau1MYL6xXw+96MWiiRSjsfNoyw375Z7xLgtYZ7M/TNCm4AbZKq16/W2gn qdYMPVyKKasuzzJ3XURXDEdnvGdpxrVke8fodNh1A9v2JyJtROobgxCFDCynW6SAyRYm+Cl9ol7 8LKqQNbwQnOOreC5WbodRlk0UppNp++R+uMSpo3s6fCAvTjBhDq7ZOixkGOApnR6UHK7DjT/bTC CLG3ncC6NNd5EsczS/JFTKS29nyDIgv3k8iH3/J4sQjGDujRHom63q X-Received: by 2002:a05:6808:6f87:b0:55c:859:adc with SMTP id 5614622812f47-5640def4593mr9802652b6e.55.1793742013486; Tue, 03 Nov 2026 13:40:13 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:13 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:40:01 -0700 Subject: [PATCH v7 08/12] arm64: dts: allwinner: h616: describe the UART integration X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-8-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.31 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; TAGGED_RCPT(0.00)[dt]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[0.61.94.240:email,0.76.79.40:email,0.76.80.184:email,0.76.76.208:email,0.76.75.64:email]; DBL_PROHIBIT(0.00)[0.76.78.96:email]; FORGED_SENDER_MAILLIST(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; TO_DN_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[bounces-27154-noreply=patchwork.local]; MID_RHS_MATCH_FROM(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: E8C761C735E X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX Identify the H616 UART integration on each of the six controllers. The specific compatible selects its fixed FIFO depth and integration-specific register setup. The driver uses that depth to derive the shared DesignWare receive thresholds. Retain snps,dw-apb-uart as the generic fallback. H618 includes this DTSI and uses the same UART integration. Signed-off-by: James Hilliard --- arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi index c6b3a3f8359a..b4b2f85726e0 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi @@ -550,7 +550,7 @@ mmc2: mmc@4022000 { }; uart0: serial@5000000 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun50i-h616-uart", "snps,dw-apb-uart"; reg = <0x05000000 0x400>; interrupts = ; reg-shift = <2>; @@ -563,7 +563,7 @@ uart0: serial@5000000 { }; uart1: serial@5000400 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun50i-h616-uart", "snps,dw-apb-uart"; reg = <0x05000400 0x400>; interrupts = ; reg-shift = <2>; @@ -576,7 +576,7 @@ uart1: serial@5000400 { }; uart2: serial@5000800 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun50i-h616-uart", "snps,dw-apb-uart"; reg = <0x05000800 0x400>; interrupts = ; reg-shift = <2>; @@ -589,7 +589,7 @@ uart2: serial@5000800 { }; uart3: serial@5000c00 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun50i-h616-uart", "snps,dw-apb-uart"; reg = <0x05000c00 0x400>; interrupts = ; reg-shift = <2>; @@ -602,7 +602,7 @@ uart3: serial@5000c00 { }; uart4: serial@5001000 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun50i-h616-uart", "snps,dw-apb-uart"; reg = <0x05001000 0x400>; interrupts = ; reg-shift = <2>; @@ -615,7 +615,7 @@ uart4: serial@5001000 { }; uart5: serial@5001400 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun50i-h616-uart", "snps,dw-apb-uart"; reg = <0x05001400 0x400>; interrupts = ; reg-shift = <2>; From patchwork Tue Nov 3 21:40:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3851 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 51C8F1C7350 for ; Tue, 3 Nov 2026 22:46:17 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27155-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27155-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 3B13D31E87 for ; Tue, 3 Nov 2026 21:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742016; b=fDlFzxHMhYKTwuSzqp7db3ctgIb8iwTirF9CkHO/kpz7m4AcGeLWR22e8mzpXZ5DSCVP i+WncPG8hhjU7V25lCox1OdnwPmGzckAScdJC6cIptU1wj8XL3XdWBVZ0Pw6zo5yAPVoy 7bgllxbUG5ln/xmFlO9lCnBchEbNFSdlA0X2rSHY9FGaN/tHqH87swGaEclYs0VhcIJJV TKkJWG1x0EX1TW185S4C4x3C6izFC17Yyn7/I4Jmu9HSJ8Imt6aTeQ2ZIrnA8tIsOx3xu wj5zvdDGar+XvvF79sPT9QwdrGswuGBwDjpi4dNen196v7kNmmRzIFW1g5PJkK4vLEw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742016; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=ZsGYkHSaF8D1INVVG7IqcJD0MRHplG6cSUzvau3umEk=; b=jfXhEib3/gppYYp037hzPuC2DQUD/kBUBFe7M7rXBrcpzT5bmu9n2cXEKm55OjBSj2C4 yD0j1+0gxUNNcZnPbcGJjWdWvoteR4DeIghRYAFM2WWCZzuc/3k8npqngHlguCtlfa0FZ aBVn7uXuzjjgzW1w/ZpL51NcsgyNjXEobk/EuebNgalPjdGS3gFW0KuDLVsTUEQtcOelE sBw1hr2gKdINlHvSLGNfE0gXkDi9HhJzkDuK+fkJ5twN1/EGi8P/i/LCcyxvZVAtHUWA9 4MWVmJxvOBKb9Zt+TvGdare2QTbG9LNHi3GhwgUPAIPGvDHi8um4JheUosTa+jmHBfg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JuvrfX25; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 189F7606EEA1; Tue, 3 Nov 2026 21:40:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JuvrfX25 X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742016; b=nToCvIXpIvl2wZrnwwceh9d0uv5vCfro5Ur85fAPT9vKXXAatjTID23NldhOiF9sduBn /y2nHfIOc2LQoeOCIvbFVRNXZ7bYcezNbRgFgS2Ztfb0wFbtUdTrrHkbCB3iJrVUzy40v V95pcp6GLg06qowPw+eUnWLG+/9RRUSLgR0VvtXiJ0LnWYafcKFrmP627/f6vT4zcTxbl jGiAgmaGPLanijfrCWvBl7fviv5+6kKuZNbylpLHb7rnvpwE3VGTin++BWOT8jExwrx3+ 8TsPaSv6BFFp31cbZnGHGkPcZYJvIkzVPOXLcyLH8ycDZFL5keWeVuQb6GcowzmLuRQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742016; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=ZsGYkHSaF8D1INVVG7IqcJD0MRHplG6cSUzvau3umEk=; b=jIeo4jI4tKMYBEQgTITN8vKxDdosNJ7zwqjcd1AJ0XPe7VeBfcFSl9mjd+jHUHcus01G zxfxIQVp0oqHJ9o/72QQ4MTGRaT0RlA3CtdbtWDr5UIR12PA6O1sPHeApmGE5v/4CSsGS A0H6ZAMlCZlE+nh0WRfB7oZ6RFzmDd08F6jdtC8y1GIRSvbjfSc8aH0H+0k24V3NEzx7Z MIB4tNZoIGG3gau3VvLDR89yzzaqSjM2gISIZOyGKa+Cn2HMMQ8/Z3mf245w3Gqq8srtQ WNw0vBUHOYhU+QuzPv8k8LZFSKHXuNCQ5HnQNfA6g8GX3+gfD7LCHs1OFzAsRx/+B2g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JuvrfX25; arc=none smtp.remote-ip=209.85.160.43 Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3F27606A33B for ; Tue, 3 Nov 2026 21:40:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A3F27606A33B Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-483a66818edso71968fac.0 for ; Tue, 03 Nov 2026 13:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742014; x=1794346814; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ZsGYkHSaF8D1INVVG7IqcJD0MRHplG6cSUzvau3umEk=; b=JuvrfX252/MS5nwiIqY9iW7FG3Lyi7W/gULk+ejqxE2gYm8dlxS+XSjVtCjclgT0k5 tAmPID1OW2M0L7kJpPlLQwCZEzSFp7XDc3QPWkZY8CRu6GlV5A/lcglpPgtsbF+4gKwf rcCju6uJv2R4vIRn/p/+V+7A8LQI7XvSMjdkgH/4WpKyO7IYTL4hGSI+oABbXaHCcPKZ Ip+diT5bmAYY4eo5Dm6SboT7nDOkuYzNkETuSRq03oCNgCuarFTESLrfPw2ID/4BgFcx 7mm2Bd/MoIOVBv40ysguD2YLMP3rzbV/sqCNhj918/dHEfwIgNxbj3U186j96mFOnIz+ qrbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742014; x=1794346814; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ZsGYkHSaF8D1INVVG7IqcJD0MRHplG6cSUzvau3umEk=; b=qpdo/pa9ih+Tlh4QvEuRh5lcSLYm2Y7sDCCwHXZMmMubQufxG/trPTCLLJ8f6jsBlc LEKB5bg8ezspRI7RiEIwWOknHO351EzITusPbl62SxCA7qLsG6zRbVy7Sx4KM8DjemT2 wvq4ro/tarZ74zxldQ6UCybDytXt8wAtuxYoUezj7V2TYf1Xe4+YMfQMe0awPsIAdbZG HbCkYQyHU5V2fcPsyzZt5UYCPtTmHYYrk+QZX/CIJHIHxGwZW2IjYfv2es0I9GzWAM6E YTbxSHur1AqnqaYh1mkcnnFD/9plJZvyOZSC3Xe4S9m/9typQGeImdDrpyWk1Pg6JRKL ilew== X-Forwarded-Encrypted: i=1; AKwUvByqNYcNzuYmeZ8jY4SEhlyCzzysGRwIv3C6FvxQquqirdUkEjvnN9szcoZ7II0/xRMr9OBZ1crc4H/DbQ==@lists.linux.dev X-Gm-Message-State: APuU4Z/yAOWbx2uClB0DvXn2PyopXh8QXtwdL+zdsJ4TuKgixV/nVHWM Qzd7ZAny0PoNCAFLpvcaVoE1iyLDlm3X5s1WNIYkSPCDLA892ONfy2Fs X-Gm-Gg: AYBFou2W0mEsJ8HsNApus+4xgvFVFyq/QXSgSMS4N89mTqi/Acnd0RgPAQgyKc8Q+f+ JFs2OATEDvFTUt9KVSxRh2sjt6VeS1pabNQHHZUmUWm/Av+84YIQt+lGa7jmFB10cy6yodYftv0 tO3hZxI0dqmP15yiwKiimyox8Tup3jyBZZAws9tOqqERKkH6h7bJZj+29QK+JIrOP5OXr2lhjfn dZ5QH7gb6tYuI9oCqHCkR2AMQf1On6iIscoEkVwq6kNbDuiENQ24dzYIu2sWYtAekTF/Obebat7 IGObmNigaUMLfG1pVex5anHm34eATOCrjH8m82vOy/q9UOSdMYziRb/0jlubsX/mJlYoTDuW+ni +GzxuG4qJrBgA7D9NO+44MfpIy0Yi6HS2/GEbnCgerdNo3PT6LZNPRBdGpSBj8ccklQgWLQKkOn ypLT3MZ/AZCf4kZ3znuA6RpRqTpQ/1ovSv8SoZvBuHNvpMdUXLMZOhc/gP2e3Pju062EWSRgKm/ xdhQus4rx2YjaB8t1pXkdfjqZ63d4uok9Xu7JCoq22MSu/S2m5X8dienYuXWpBEQ47+guCmBs3f Osl39jioTQsis9WuJ+tbJTOJCJi4ttSJrZIgfIUnr8XQqL+z9A4fvfB8LJqMimMnSAFJsMmsKdc /mVKU8cz/fIQ8BUC1fUqgVKHqTs4QXdBWKK9txUm1L+EFLXWQRnbO2FRDbJkBcSCGg3nmV8xEJj A5expU/vTvre5ZqE3ciuOcq2S/7xZLpWs2ekfx1Pdr2/Sxb68dTTuW X-Received: by 2002:a05:6808:148c:b0:4b9:e65b:8c36 with SMTP id 5614622812f47-5640dddd764mr9603574b6e.36.1793742014606; Tue, 03 Nov 2026 13:40:14 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:14 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:40:02 -0700 Subject: [PATCH v7 09/12] dt-bindings: serial: snps-dw-apb-uart: add Allwinner A523 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-9-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard , Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns,qualcomm.com:email]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; RCPT_COUNT_TWELVE(0.00)[17]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com,oss.qualcomm.com]; TAGGED_RCPT(0.00)[dt]; TAGGED_FROM(0.00)[bounces-27155-noreply=patchwork.local]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,174.29.1.49:received,209.85.160.43:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 51C8F1C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX The A523 UART integration has different FIFO depths across its controllers and reports each controller's depth in the FIFO Clock Control register. The receive thresholds follow the standard DesignWare FIFO-relative mapping, while the optional-register layout differs from the generic DesignWare integration. Add a compatible for this integration, also used by A527 and T527, with snps,dw-apb-uart as a fallback. Acked-by: Krzysztof Kozlowski Signed-off-by: James Hilliard --- Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml index fc1289073241..ea6ce99178e3 100644 --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml @@ -61,6 +61,7 @@ properties: - items: - enum: - allwinner,sun50i-h616-uart + - allwinner,sun55i-a523-uart - anlogic,dr1v90-uart - brcm,bcm11351-dw-apb-uart - brcm,bcm21664-dw-apb-uart From patchwork Tue Nov 3 21:40:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3842 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 767BB1C7350 for ; Tue, 3 Nov 2026 22:40:41 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-27156-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-27156-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 9414F21E14 for ; Tue, 3 Nov 2026 21:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742017; b=3KMicWMlNRzA8NM3hRYPVjHm0YqqjDWYI/sYJwvZsCxFg1JpEn0LgscPT0ix6o2Ivq24 BtOU7Oi1BX6P4jhZCYVe01shoTz10IIUmQBwo19mAKgRYX3dGo1JAHfPc2FVG03TtcdVy eOpoZOtztJIBrXntdbh3hd0b5lg57x1R1dV3vS6IiFFULN+ROnGHeXDfXT2brUZmoIZvC qs2qPqNB5eORVluiHlqWYA9ZuYiBokDFzd3ITR/3cquaCOUZMG+kNkRLwxRaSKnvq9NQi tXczVISOrHAm12AYj7j99uNptgLfIPtTnVtslLVL8HENc5QMV5EqqQr2N5WE0Mzh1fg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742017; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=mOkByMgIh23Ng8hqFybijqEgXApYqjm77yLCSksIVRY=; b=f1yxYG22ISSRDHpB0EC9lx2jkkBjHoNJGN4tdbQA92tILkm6Nw8HNlpHV/dnX0HNG3NK nuPAMsnLvmaaAl0a8sS4Vaz1/4LSSx2dvO+lRQaKT28G1jGZrWrjRaL5Acny/xWZzMhHi uXzxlw4MxxlmnjU1wWSM/ReW8LXc6JS6Keb6fpuuZkQz+LXoTUnQ91c1ctRxVo3FclFpb oKrvLlfrGSbCeSqgW3capnpo8fHal3xMzTQdZdhZQPyL3i1APlMhLaAFOvAphvEV6Ypiu KkyrItfXS7Z0E3ZeM1lBQNcGmrTULQKzyxBnGp0OiNXQYvlypQ/kvDBh8CpUsBAdOEA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=DIfrxqHS; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B451606EEAD; Tue, 3 Nov 2026 21:40:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=DIfrxqHS X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742017; b=i4DnRTjMinuA4O3r0rlk6YRUXLCTCnFZrzC/55w6Z8lY46W5oBf7fydd0dKOzxg0HFXQ LibAZygSdwRQKQyiOVVsF6nEN9oKLDDyo1wYo5I8KZNJ6O39Y6kIv/907hLKoBoZ7QzSj G2XB1fkdSrY4te3d9FZgjW/T7NNWpWmSAXP9NMLA5PrQizHeWopO7lmYs58vz1rldiTwR Ycrmm/7yG3XG2zP+9sQXD9392RXYW3DkbfoztB/cw6qv7qUxMMn4t6049koNzCH4lyEPn KXFCDQ66joZoT9gDaAvdF+xVWUeCUOgbF0M8cXNiBZGn8FjFCWLqkXsfH97i29O23cQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742017; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=mOkByMgIh23Ng8hqFybijqEgXApYqjm77yLCSksIVRY=; b=gBh52U50KXYs6cgeynkq1p+esS2NItetZdGCWRiK04KR8Dy7d5GYM6TOMvNlmOZP6Viw EQI4SM8RGXP592RRIObn++lSRHbmhyIW4UqcvAVK8/ZVPGWbCvtO/QtXIU1ooJsgbyO7t LMhisrrl1At5ltvpwbM81yPNuUO/u3LNoPCSP6RqZzX7qk/DEQsoyJpD3YgATrPpCYBZu YVl4L8Rfw3IQiFBMLAtxRvA/eNAdFOEGNZLk3WR68o+SJ0j8xI16dg0H+RN+H8Z6vJDr3 ZnZXW0hvQQOTOnjcTO7sdgNPP7HSXhiXYGYzAZXeHD4Oou37FJr2QtD8d951vCBYLsw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=DIfrxqHS; arc=none smtp.remote-ip=209.85.167.169 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A01D3606EE81 for ; Tue, 3 Nov 2026 21:40:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A01D3606EE81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-563a0462094so39201b6e.1 for ; Tue, 03 Nov 2026 13:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742016; x=1794346816; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=mOkByMgIh23Ng8hqFybijqEgXApYqjm77yLCSksIVRY=; b=DIfrxqHSDeDkI2m9HiVgCKUq1myJ4c1RKcUX5DArSZQMeSAbFU4lxZLLY2m7msbEpy Gp93MfEDzeMwz8o9atqGawR3UNNHn6LJS9FoPRn4XSz3rIec6YECBhMbCkDMHDcAMooJ aDTh9RNd0LX5VYQbHQ0Oy9+mYaQAK/57XAgfaFIcabf+XsUlVqYGneS+6jz6CosSTmr9 D/3eOHi6qMVmQJ8dCRiAO/ktJk/eLW03l6BMbRgjTcMpAmv47KmvkPgGznvCeIFwUXnC Acl2u0IrCVxOfTgvs7DU4NiuiQr400dH1SrvkS+WuMAUGqaFzNMPyaRguZ0z6dhshECW HjoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742016; x=1794346816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=mOkByMgIh23Ng8hqFybijqEgXApYqjm77yLCSksIVRY=; b=ADi9IVbE+ii+25XDu+24nAyfQLX1NU57QNv3nEQQySxvv6nKj6C+NAgwu1oYhJJeK+ UUgZY/NuRzx4gf9NUg19lDQ3N0c7esfdNWIWEpwGzt367BkZSoUajj+PylP3N+aN1PFd jqI9ZW5cl9T9om/jrkVNIE/+JuczHhr7+ripEubHT0f8HHxgtciWOKBTrPzAijZC8Duk tIQFjAWLKPNcDPT3LPcPpg+O7KXphLLsi3N4Hoy45B0H9XYD+HKbW9XM15iF6R11UGpK xIzemiVrATFgN9YS1rc4IQbNje61hteucTRbK21eGskRm6sCdafWbErQErkJAzWm6xL6 cz+g== X-Forwarded-Encrypted: i=1; AKwUvBwNSdTx44K1bpkUomyhsAyomVPUYcwLDWflbvhCxgNKYyT4OLC5GnHOX3DGuOLvn1SDYdhYk0gcvpa9Bg==@lists.linux.dev X-Gm-Message-State: APuU4Z97i59QLXajpk2fLcyQX2DCfOQoip2p+1SBa0v1ELPgHS57ybkD tz5gaZZW1rA5boSDMcD4UFXnq98FKf1juq8qpRsoegEdGiIhCkqsKWe4 X-Gm-Gg: AYBFou3q8s2pb5azNTxxPy5nj0pzkXxJKq3awNGbNRwuGeaMoFUMOJJkt8jCk2sIHbJ Pto6MIBibJpWSF/Wydy9r5e2+UAvaqpytSOo0shyDikowvp4YvMIYxJVuDxSDI9hwpG8/PtpAA7 8SO0itShCt0pMHTQN+mWdg9VL2O+SPDHzPHDHJWjaebXwUYHtv/HZh+jg/JhVuHmFLA/5PbBCHJ hHyesxpVLtheuoCTrNsLEdBIBZYaSmjB929bVoRm2oaG3REnp6XqjrR22IN3wMMO0dDCbJDBLNY sGV+vFZIM4PoQHOpduQWilOGS3YgroO6/BXnbeRLSKxsz0FeO7qceOVRdNchUulzlb58u6944xW LgObzcvzOmLX75AHqDN0A7aOjcwMtba8uPbbnIvhhEmHrSt84t5JgX2R6xCus1syx+auCpQNfuF rhPjZVosFA0kXZIhkLaXTLHNF6h5vbUZP8uZ1jr4DfIy3T/3bS2gNx0Z2r9T1ufZ2PLBpAOt/Tr Yp/S2xijRBxqyzSKQqFIlXwa7JCmaJthJS7b5Ykd8itv6lKIUqyuUPinzfnFbDu9mjJdkdyDs/S mXLOkf3mg8POQfGJG7etkBUUw7cPGxpIYp+eXWXWfWTRUeB7YrYPvRfy+9AoyqxaBwtnqZThvEa fxWnRpFXx2SEsH4yZSBlyZOZsyKoI6qFaFBWkxrY5iWDuM+Sl9mcXTGkhuebNZDAMvxjLe6BiZ3 XsurYdnPJQCv0PBIzSPq8l/FKqCD4XphkgWACcLJNCpg7OgUSe/iy4 X-Received: by 2002:a05:6808:151f:b0:53a:e153:e8e6 with SMTP id 5614622812f47-5640de7d903mr9983750b6e.59.1793742015715; Tue, 03 Nov 2026 13:40:15 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:15 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:40:03 -0700 Subject: [PATCH v7 10/12] serial: 8250_dw: discover Allwinner A523 FIFO depths through FCC X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-10-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.31 / 15.00]; RBL_SENDERSCORE(2.00)[104.64.211.4:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; TAGGED_FROM(0.00)[bounces-27156-noreply=patchwork.local]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; RCPT_COUNT_TWELVE(0.00)[16]; TAGGED_RCPT(0.00)[dt]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[sin.lore.kernel.org:helo,sin.lore.kernel.org:rdns]; FORGED_SENDER_MAILLIST(0.00)[]; ASN(0.00)[asn:63949, ipnet:104.64.192.0/19, country:SG]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,174.29.1.49:received,209.85.167.169:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[104.64.211.4:from]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; R_SPF_ALLOW(0.00)[+ip4:104.64.211.4]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 767BB1C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX The A523 UART integration, also used by A527 and T527, has 64-byte FIFOs on UART0 and 128-byte FIFOs on UART1 through UART7. Each controller reports its TX/RX FIFO depth in bits 31:8 of the FIFO Clock Control register at offset 0xf0. The field holds a byte count, not a logarithmic encoding. Read this field in the sunxi setup callback when platform data does not provide a fixed FIFO size. A fixed size takes precedence, so H616 retains its 256-byte configuration without accessing FCC. The probe has already enabled the clocks and deasserted reset before invoking the callback. Leave the FIFO clock-control bits untouched. Use the shared DesignWare trigger setup to validate the depth and build the FIFO-relative threshold table. Invalid depths fail probe before registration instead of producing zero or truncated thresholds. The 8250 core derives the transmit load from the discovered depth. Select this setup for the A523 compatible. Like H616, this integration has Allwinner-specific debug-divisor and RS485 registers overlapping the generic DesignWare feature probes. Use the common sunxi PIO setup, BUSY-safe integer divisor programming and software RS485 handling. Keep the APB clock gate enabled during termios updates with SKIP_SET_RATE. Signed-off-by: James Hilliard --- drivers/tty/serial/8250/8250_dw.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 0e7367ba872e..cdd3a62dfa7e 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -44,6 +44,10 @@ #define RZN1_UART_xDMACR_8_WORD_BURST (2 << 1) #define RZN1_UART_xDMACR_BLK_SZ(x) ((x) << 3) +/* Allwinner FIFO Clock Control register */ +#define SUNXI_UART_FCC 0xf0 +#define SUNXI_UART_FCC_FIFO_DEPTH GENMASK(31, 8) + /* Quirks */ #define DW_UART_QUIRK_OCTEON BIT(0) #define DW_UART_QUIRK_ARMADA_38X BIT(1) @@ -63,6 +67,7 @@ struct dw8250_platform_data { u8 usr_reg; u32 cpr_value; + /* Fixed FIFO depth; zero selects discovery during setup */ unsigned int fifo_size; unsigned int quirks; int (*setup)(struct uart_port *p); @@ -666,7 +671,13 @@ static int dw8250_sunxi_setup(struct uart_port *p) p->type = PORT_16550A; p->flags |= UPF_FIXED_TYPE; - p->fifosize = data->pdata->fifo_size; + if (data->pdata->fifo_size) { + p->fifosize = data->pdata->fifo_size; + } else { + u32 fcc = dw8250_readl_ext(p, SUNXI_UART_FCC); + + p->fifosize = FIELD_GET(SUNXI_UART_FCC_FIFO_DEPTH, fcc); + } up->capabilities = UART_CAP_FIFO | UART_CAP_NOTEMT | UART_CAP_AFE; ret = dw8250_setup_rxtrig(p); @@ -912,6 +923,12 @@ static const struct dw8250_platform_data dw8250_h616_data = { .setup = dw8250_sunxi_setup, }; +static const struct dw8250_platform_data dw8250_a523_data = { + .usr_reg = DW_UART_USR, + .quirks = DW_UART_QUIRK_SKIP_SET_RATE, + .setup = dw8250_sunxi_setup, +}; + static const struct dw8250_platform_data dw8250_octeon_3860_data = { .usr_reg = OCTEON_UART_USR, .quirks = DW_UART_QUIRK_OCTEON, @@ -964,6 +981,7 @@ static const struct dw8250_platform_data dw8250_tda54 = { static const struct of_device_id dw8250_of_match[] = { { .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb }, { .compatible = "allwinner,sun50i-h616-uart", .data = &dw8250_h616_data }, + { .compatible = "allwinner,sun55i-a523-uart", .data = &dw8250_a523_data }, { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data }, { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data }, { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data }, From patchwork Tue Nov 3 21:40:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3853 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 7C3DB1C735E for ; Tue, 3 Nov 2026 22:46:54 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27157-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27157-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id D121732864 for ; Tue, 3 Nov 2026 21:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742018; b=MYIbQ+ODyJqtPX68e3tH1hPe1cbu7n031j+FyFeD41YbgRaeNhf8IApqnTxyRIZT9vY8 O5WBs5LzIwy0hBzXXQo17gobRFf5WSpXgubg8V0HJGPT5rnC75Gf+wBInP/PTVujqvVeI WZcLBOvGbRKeYfseT+rutWZGRK9jzMxiHdbyMyCgafwW9gnt9XAPVQosdklNNrIo2apQs zH2AW++8q1EYz4LOZJJvwpafVAUMZwACwqx+4kTZqnCZQxXgiPHA//yjb2Ka3QXiqKz9U JbA+M62RYXhNJ7JzA/V9C1UdWQZwsvBYzfe4NX8U81vRVqLntIlTn1jt9GbGITs5BmA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742018; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=aRqQDgQhXtc2io8t2nwzRELQbWhBlZAnTMTGCqc8nfs=; b=BswQdGOHLI5vsE2lJ2facH25Q80J6VvcZi/L9Rh3VM5axTZoGVkXoH/VdR0H7P93gmID kntSYZjgdnP9lxGgDu98Somq+U2rCUB7k3R3aq6eg2D5NeNu1VO1gnxx1GyfJuWBqIeBX eFIWvOWtZa0dXfZEtPCS3t0pK9jfjhrF+Drrc8/Ufpz/M7ghxNjdEkKJ9iqFUV/lai/AJ WL4CkZhIHZGJvvWu5J05/kaK/OL7DkRXXY1LheRJ11FcRB1oQbkEOzhCs9nmP5HyC240m Pjz1gy93QadHBTrnPxDGr3VHufduEReaSYihljPY2IUKHIrbMYEAdPqrjC1C48J6+xg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=RdaHGvjK; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8423A606EEBF; Tue, 3 Nov 2026 21:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=RdaHGvjK X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.177 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742018; b=XQ7q1LYYFn688ez2L0QIti72IskAnzI53MfIsrjZ9/Mltop1+TQyuA/RlZKcAQ469TmY W8xZF8/fdAiWWGZTl4AL1XZv8c8OOA2Xy5PslbBMT3XGVTNNjjZD0lRcTYQr34ZXzmzSp NHWSE27DICFwrw4tULPdUP3YELKZkPZ2aC0jX4A5JK95PbFI0D/oKtjNtkqkdgSy5H4o5 /LMLaVmJvDO4RDCrive2JefDhKFg4EbGB1ZBUCXDlDNBHWdt7pKceP+5YTWXyQd+bDFQl u7coy75y5VI9uhsM4mzBX1OgoG/MNraMYLoDKqfXsQeeVS4UnM6lVO59hmf/LKii/gQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742018; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=aRqQDgQhXtc2io8t2nwzRELQbWhBlZAnTMTGCqc8nfs=; b=UyYLa37lvZUdFfLRng3Vd5d8djmpk6EVcXjCUKnA7w3E6+5X8u5dwG8dXmG3hSiJ97iE o7hRDdtSC7LslMkPsTuxnOWk3cJfkXUrHAU2U5cLWpKdlFAz2dWfPquD/p4iaO8QTVUgK CL0/PHRt2e6/jj/swReJRSQ+qAuzHAdqG2pH+CQ+L5sAOFQOBKSEOTd5zoaBwEBM+Yzy1 pTjqpQZ76oO5MKydI+B3JqVAC/BBKzD/Jfz0OcE2YRAlX6uW7AFp0oRbQnVJmLG3N/Qgh 8BRKuyGmyz9zuqABcd5Jslwb4FGzAQpPV3dXOgB3WtDgABdH1wuIXFUuqT6jGZD2rTg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=RdaHGvjK; arc=none smtp.remote-ip=209.85.167.177 Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BB81606EEB6 for ; Tue, 3 Nov 2026 21:40:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1BB81606EEB6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-4f699fe49b3so52720b6e.3 for ; Tue, 03 Nov 2026 13:40:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742017; x=1794346817; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=aRqQDgQhXtc2io8t2nwzRELQbWhBlZAnTMTGCqc8nfs=; b=RdaHGvjK4f8bIWPPEBLKKicdPIfy/0ipExuHTi4gy2Pq+oixslshbS/Y3OkMO8Klem Bimp+Kp5vZCpHV30yX8m59UjEU2hZRWQrxkInH6aOGW9P5F4Y2ar9Fy04Sck2tYdSb05 vUj+dSCLXixgXhHzGlpIdMThMTHGocgzRjVPDR3cETiTdb2NWc2MLqIl4JzAs47hw50/ oAimk2Lochv7D59XLQqSwKN4FHLioWzBRxBdwhfOjq//+k2cDQcLvM1/G+NbUZq+XYZL gOfMmefpNYFRBSX2MlPR2PFrxkg7rxuAAs9VuOdRuWU6zOBnZ1sl3qQd+NUsq3kq+Ksg n0dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742017; x=1794346817; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=aRqQDgQhXtc2io8t2nwzRELQbWhBlZAnTMTGCqc8nfs=; b=bPjev//QJ/iS6ngw/FrVwB5qCQEz2hDlt8EULem8CvnRUxA2lfxWYT6aTiv1U4OxFn rSjFYZUj9s97PDwVOqLfm1ehm4nTAwaUv8KlXZt9K3Q+z3j5sp7dp0LXF4o3Rb+x41Zd MPg3IwJf9i9KFt+PZae5exPiefiEW7HihB962GKSLbbTisW4NWmoHX8QPlQUFNxwRfDD zOxyz7d/dlkR43OCl3gcptoNBJZ6ZPlJd/oE9xKiGRaZopkQm5MNPyyEG1FHHJG/EpbE MqFl8d1efGiQmAMYivQOX3pstDvSt0IsW1AcS5qNLce919F+wYSv8WiJAh/Q3TM/3s+s NvAw== X-Forwarded-Encrypted: i=1; AKwUvBzSSHT/pXtEYm8UTCB+W3T9vBMrLCZq3tdbVy+NVw9A+a8axRzmNkbCRUnzeVyixTZho9Hp+O55enAihQ==@lists.linux.dev X-Gm-Message-State: APuU4Z9FAN9lAtNwNq4TZGqL6uQuGxhDKERtjq4T4VKK+fww9gsDHdjZ G6NHbFb6fphGLQrvzoZCLd2NjDOIF99dzMuBdo/2fOIJ5NVa2feWy+Xd X-Gm-Gg: AYBFou0NltIcgqKt11K8BHUlSxj6YolBSYY9cKJ2ktClffA1MIztTh0fqWLrbKfKc0O eQZru+MbBDoYOMbf7X9OF4MTgOWfArxUsArCgEstIje8K4koAC7i75cBWhuPFPw+HQB/tuqIJl9 iVr88dIe9JPT5f3YXUpu68UcLX3h0nKFKqsmNKHbSkIevcoSqrIeBbyqHTVA/eaMYBJK7FuYAvD y3/nubYJMcol8LbDuSAJKrONy/Ynj21YcSpvHjIN2J0TsvUhC/d6U6Uzh6dV53dYnrMja0mhBDz r2oTPY5/klP4dvY2F1XvBGnAc092k2EHPoXathDb/SxF3QTLG677SVpYt/zj6eMwPRR+X+T2Mei VqVfxsGUMGWH2Neqov776sSIYGbeFjihH9jSWh1p6eu4ziZS6hdL46VSH35UlRtpzO/n6dm/y/S qmeCU/G33rl+t5CXbtLv3s18f0oNgmaLnvYCi7zroyqg98DLJ90iExFcXAz8roH7TNW8lVb00gL w8F5FVEFgNxLjPQaP4nEkkWxA00e9kAxLJn19/YpyWr/2rW8XvF3T14MU1yvi3spUq/PBs9dl7G 7HFMG5JpM/MuoG4TGJNbqokBNP168gjWE8JcSWJFmL2/PDbZVqhqfpiDAoBrvwmEr3/esX9Np8v u1yayFgBD17NNeI0foD05zPElck5GFzekmO4tB8DClGQfCoNPcYF+kz8L8AFaCkM5ZfIzrJyry+ OkvV+cGYYG6mkJwCqrP4sCEaByoxvlAwIsnQmVxwY8oN7j3sTuzvGC X-Received: by 2002:a05:6808:66c5:b0:567:605a:b8a6 with SMTP id 5614622812f47-567605ac3f9mr743665b6e.41.1793742017040; Tue, 03 Nov 2026 13:40:17 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:16 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:40:04 -0700 Subject: [PATCH v7 11/12] arm64: dts: allwinner: a523: describe the UART integration X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-11-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX Identify the Allwinner UART integration on all eight CPUX controllers. The specific compatible selects FIFO-depth discovery through FCC, allowing the driver to derive the shared DesignWare receive thresholds from each controller's FIFO capacity. Retain snps,dw-apb-uart as a fallback. The common SoC description supplies these UART nodes to the A527 and T527 boards as well. Signed-off-by: James Hilliard --- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi index 85ef492ffeae..23340b9f58cb 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -390,7 +390,7 @@ wdt: watchdog@2050000 { }; uart0: serial@2500000 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02500000 0x400>; interrupts = ; reg-shift = <2>; @@ -403,7 +403,7 @@ uart0: serial@2500000 { }; uart1: serial@2500400 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02500400 0x400>; interrupts = ; reg-shift = <2>; @@ -416,7 +416,7 @@ uart1: serial@2500400 { }; uart2: serial@2500800 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02500800 0x400>; interrupts = ; reg-shift = <2>; @@ -429,7 +429,7 @@ uart2: serial@2500800 { }; uart3: serial@2500c00 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02500c00 0x400>; interrupts = ; reg-shift = <2>; @@ -442,7 +442,7 @@ uart3: serial@2500c00 { }; uart4: serial@2501000 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02501000 0x400>; interrupts = ; reg-shift = <2>; @@ -455,7 +455,7 @@ uart4: serial@2501000 { }; uart5: serial@2501400 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02501400 0x400>; interrupts = ; reg-shift = <2>; @@ -468,7 +468,7 @@ uart5: serial@2501400 { }; uart6: serial@2501800 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02501800 0x400>; interrupts = ; reg-shift = <2>; @@ -481,7 +481,7 @@ uart6: serial@2501800 { }; uart7: serial@2501c00 { - compatible = "snps,dw-apb-uart"; + compatible = "allwinner,sun55i-a523-uart", "snps,dw-apb-uart"; reg = <0x02501c00 0x400>; interrupts = ; reg-shift = <2>; From patchwork Tue Nov 3 21:40:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 3852 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 1DD141C7350 for ; Tue, 3 Nov 2026 22:46:40 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27158-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27158-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 075102B22F for ; Tue, 3 Nov 2026 21:40:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793742019; b=CS8rqKkqTr4PfhctdvY2ztl5pHRUfK+VMqObzbuSWsoQ9GqEbyW3G7PkPPkWLVOnwRGc gWGsaNDoLPrCbYk3xoSFq4znEMs8oOamR0lhJ+FtQF1PIoEMSBbJJw1JNm3ZzEAmRVflU FJYwFQbpK4bldazPOPUmnuQzPt2HOjrHi3hDbteZPI2PdJ6knYw4sBhObaNkjzmfYKwyB xI+t2p91MX/qBfjUKIifOQKcJcIcK1IjS5iX1T1duJSXPTLqWlafpuMqjwm8bkbozYiWU 5NxIY0O3F3v/ohbkEwBwsKd/JBAGrxzpM/g5Te5feywSsAen9Vul/drALG0UIvz/4VQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742019; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=M2rzwl/OUiuhx7dhKJQxUK0UVCKf7xbOI2dH9gpFv6M=; b=WgIqdRp6hDUmXlPpFNqfWjH2G2q/Ag0f7W9Ro2S+2DJvHcXUwIgiLSJwUqfgZ2rYJjeS JVyfHgkbirYCkPn2hpc+WMRtoI06Cpwg99iKfXKfEcCPMO4tisKg+kEISnJGOy9UW2AJv oo6o47JamL3QEmKP9/sZ6D4cEyoalcyVkXow3wkW0RzrwbvdlTfTihLxD0MrV0G8ZoDhL YcBmnl4KMEQwH+OjrUhWOwo/OdE+LvZ8smGwOLvFSfOfdCjHbPpoawaEm8XfSmu51/5DQ B7vULph3mKqj+wyAHxFHR21Td0v0F28gsSegPB0J2HG268u/DUW9Tz2eb0Ckh5tHcBg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bSPFWdR2; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E152606D838; Tue, 3 Nov 2026 21:40:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bSPFWdR2 X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.177 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793742019; b=IQtOFRPtBygHtoSSAx8qoTohJbPjMWLYdN4ekVr0riHe/3vXpFbYFahobg+vofeJ/78L tATT9+vdFizBXQU3n0Kme9vrrAk82GasCGLoEC8bJF1KLNJhQf+xj2FLsnta1rdokuFjx +LUFKt+zgm0XzQWwfGqk+diD1lrHkqlFDyn6oZEKLemH8fMAH6t8dZD6iexTMF1AavrlM zBpEATm44P15iSRJu8UN2o31/QQjtzxuE8KP4VQ5RfxVPT1MMpYgfFmar701b4p4T5tGM WQY1d1+nwzPs03c25A+JZrYGh/34xJRa06gnAa39xQimZPMWbbpIdnYb3QmUZpMT2KA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793742019; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer; bh=M2rzwl/OUiuhx7dhKJQxUK0UVCKf7xbOI2dH9gpFv6M=; b=NSduoAAp1YYlghJj5Kn4/O2+GPcW4ATcXtx0zh4XDz49bJIZE6HrtfKrDoRNFiXjszjY CmsHG2hKKKgry6xjqwhmkSu8Izk7yd8GfYoMtFKdZC1XwAKY2z23idVH8Oi26OPFSN/m8 8jDnrLyQIKKeOgRM95BQr3RrI7IUNLP0OBDlo7x/bBop2nFQ5cp9i7d79c1w7nPLtOHg5 W/cHtBTRPjmtofR34XBNuM0A3scd7eRbCz5sZuw1vIvVe24DK0sBqE5+Fz9CjdOyDxCGv CAZtmcce3x+oq/t6MMEF7JC+6Neq9yv1ymI/9oMJS2SZ8rxU7fIS1nBG+Nr57FelVQQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bSPFWdR2; arc=none smtp.remote-ip=209.85.167.177 Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E00976082BC6 for ; Tue, 3 Nov 2026 21:40:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E00976082BC6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-5641f26ce05so32194b6e.2 for ; Tue, 03 Nov 2026 13:40:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793742018; x=1794346818; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M2rzwl/OUiuhx7dhKJQxUK0UVCKf7xbOI2dH9gpFv6M=; b=bSPFWdR2j6dZFCVUt5oADf3eQ3C0OUD12xdIVlMNY5Vo2oLapQEHxdSooWS2AZxVur 4nfWbdPTcRbMvTYN6Q4U7vcxVRjW7o7k7XAbubgxYqnqQr6Fz6gKHNZYcbU2MhzT9qAC /3H8O7MKYVILxan71vKw45R8e+rR9Eb1WXIIGq5wbPjOj/HqHB25evl6TTwQz4XF9KB4 01WQd/hmv94fh99gjKmwLuzAeubxD8LzVp+kyWw5GI3c5RXzkgg+geJxKYrisaNwXX9n TnUprq12uZE280+m3m0o4pMQW3EWmYupRvQ0AKsggzQH938UmPAp2ufhm6Z1AOK5GQih YWvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793742018; x=1794346818; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=M2rzwl/OUiuhx7dhKJQxUK0UVCKf7xbOI2dH9gpFv6M=; b=HRtiYN4unmlzMK0/WwyeXCiTq+i6R8Sa3ZQiFXlY6YvYLtDFg/WgReFtROS/QFpL4e Fc0I7T9e9txOj/y2La+MqmeyrRdkq3dZmPTnF2khQyFRffYsMny10ud9sWfZGDzF0mA/ gQZLer2deKbKip01FKQON8ctor1iMDDEBhTNnT9oLsn1CoWr+VquPViYH3Ew54G3Zh8a +QC9a1/re1a6nfHgxSHBBIoHuzzbNVbfj6QFlzCY4C5Oq7H+7u4iDr33cjBe17/93UBn BgwItS7zFCA6MK/jrI/nzfRUUS1b+2jGKjSpoBnd3wqaA8OEYsRYFqLuqD3U8TEoMpVM BkRw== X-Forwarded-Encrypted: i=1; AKwUvByDL6E7aFIJeIKAq2pMgLRuVedmjpT3j6i/SMgdxShpN3I45cBQj4cZTa/y0SMuA9/CEiyhCUOmUE/vdQ==@lists.linux.dev X-Gm-Message-State: APuU4Z+iXI6vWipdjtYoSryF7Tg5heRIfHO4uWnhvN55umW0sd3eYR+3 9EaMAS2M5FlpnWvIlhF7Ivq8y/4HYgl+HqxcF1+e1vwtCMUBXy4a/rQ5qLXPAczn X-Gm-Gg: AYBFou0B9x6W1VAnG+Jtgdnrtt1jMpNGZzvK+Z+Y4tQOiNkuqMfBePQhXYfL5vT+l38 iAponVhFeETNRVIPRnYR2v4gTfh4we/iVgY+sYKtU4jHPmXKlWLjgwCmc7j9R3ga+wytag1aM2d +BkXD/MmlmYzlcAbyf6wk7OatB+8eugl/tp1urJiGLr8QqlvlbpqadNXJ17f5a0r4+QDZEK8aqr BmDXdSmvGj1Otr7XMnTbiV3087OwOm8QmYQVBbKGy6njAzoTEnGBS9y45WwIBJ3QNatMaHzqE88 lQpqHPFvETTX55A4Wwt+bblpDLPjL3Cf9bJ4ejI6FVxs6QSPnQtVGSf6V2d0S0TpIaet6exCDuu yv8cn6lOK8FkCQl7q1RAmBTaScdAa4hbu39TOsfAPALiZJsOfw0asRMbhjv/aTtIgMvt2te5BaZ NaDvvfjFDC0beG/jf+ToVfjuzr/zAa+XkGUNnRt/9aBm0sAfEhlqWemWwi1nPKiD331ZdzfpZ1S J3NmcAHQLsBQpbeNXf4pjptBUFbcgYCCuPbKQPBzNkmzUiWA/EEsuNqulrsmXUXRqNwifI8+5xp P0OktjfurY0sdjubmAj9iObxPNwMbAp/J48Y8FY73dWwZARqeZMFSd0k1iueHO33j7OufuOieMq F/4RAQjAO0vwDhcVBsJtHM+jJOJ1RopbxTQ2BPjQbp5WY7odINgY4nhmigjRfONOgJLOniFHqYt YSsGXpUij2SVCOkTx4KTnjmC6HEebraKTbxswx/uD4bUTuSFCwHVuRMS6RwONJ7gQNzNRgkcBQR Q== X-Received: by 2002:a05:6808:1997:b0:4f5:d3bf:edf3 with SMTP id 5614622812f47-5640e035525mr10789884b6e.59.1793742017956; Tue, 03 Nov 2026 13:40:17 -0800 (PST) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-567a9f9115csm27060b6e.11.2026.11.03.13.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2026 13:40:17 -0800 (PST) From: James Hilliard Date: Tue, 03 Nov 2026 14:40:05 -0700 Subject: [PATCH v7 12/12] serial: 8250_dw: configure RX trigger thresholds for Octeon X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261103-submit-h616-uart-fifo-v1-v7-12-c9e248d685c1@gmail.com> References: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> In-Reply-To: <20261103-submit-h616-uart-fifo-v1-v7-0-c9e248d685c1@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.31 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; TAGGED_RCPT(0.00)[dt]; FROM_HAS_DN(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; TAGGED_FROM(0.00)[bounces-27158-noreply=patchwork.local]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,174.29.1.49:received,209.85.167.177:received]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_TO(0.00)[linux.intel.com,linuxfoundation.org,kernel.org,gmail.com,sholland.org]; MIME_TRACE(0.00)[0:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: 1DD141C7350 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX Octeon uses the DesignWare receive-trigger mapping with a 64-byte FIFO, giving thresholds of 1, 16, 32 and 62 bytes. Its setup bypasses dw8250_setup_port(), so it does not install the common trigger callbacks. PORT_OCTEON also has no static trigger table, so rx_trig_bytes is not exposed. Supply the fixed depth from platform data when firmware has not provided one and initialize the common trigger table before port registration. This makes rx_trig_bytes available while preserving the Octeon port type and register accessors. Select DMA before filling in the default depth, as before when the 8250 core supplied that default during registration. Thus the new trigger setup preserves which ports attach DMA and their existing burst sizes. Signed-off-by: James Hilliard --- drivers/tty/serial/8250/8250_dw.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index cdd3a62dfa7e..063441923864 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -663,6 +663,22 @@ static int dw8250_setup(struct uart_port *p) return dw8250_setup_dma(p); } +static int dw8250_octeon_setup(struct uart_port *p) +{ + struct dw8250_data *data = to_dw8250_data(p->private_data); + int ret; + + /* Preserve DMA selection before supplying the fixed FIFO depth */ + ret = dw8250_setup_dma(p); + if (ret) + return ret; + + if (!p->fifosize) + p->fifosize = data->pdata->fifo_size; + + return dw8250_setup_rxtrig(p); +} + static int dw8250_sunxi_setup(struct uart_port *p) { struct dw8250_data *data = to_dw8250_data(p->private_data); @@ -931,8 +947,9 @@ static const struct dw8250_platform_data dw8250_a523_data = { static const struct dw8250_platform_data dw8250_octeon_3860_data = { .usr_reg = OCTEON_UART_USR, + .fifo_size = 64, .quirks = DW_UART_QUIRK_OCTEON, - .setup = dw8250_setup_dma, + .setup = dw8250_octeon_setup, }; static const struct dw8250_platform_data dw8250_armada_38x_data = {