From patchwork Mon Oct 19 20:06:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Pedrosa X-Patchwork-Id: 3678 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 C61B51C239D for ; Mon, 19 Oct 2026 22:11:53 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-26749-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-26749-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 91BEF2EA74 for ; Mon, 19 Oct 2026 20:06:55 +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=1792440414; b=Z62Hs/+vPR45FFw7UA/AwF/nYGYVxy+uSa1g35bs/5FvFZlvxswhJrLgPsPZTk7Pt0y7 pbwwwRmwfDEL/0hvUtPpKl7m82eNu33bfIHFBEPYvk+S+Byi8bSBxAXXyQt8KfXMNqmFu qEpEopT4FlvyXcLtydHg/dvLVulMfPr0+zCCst8pyKkwpADJ7dsiXJKekw3TSqsouldba VpedgG66tQlZIFkv4KDcHrn6SZnsn81MS6pDjBDwBq9cfcJ4j0LzbvmC55EngAdzLUDSY +w84+ggdMCWXyDi1C7obrZnJi132KSTIEHWwnj9xVu79m+hBG5SWN88Fcg3o0jYol0A== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440414; 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:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding; bh=bFBNSvs3JDos8tPW/MP3a/GFNwGRHv00G3UEulH7lLI=; b=bVptSvrNsmkVAOUs0W2XAmPAr51hwOr/wq5tEXxUFFVn87rXwdcIyLAwxGLGl7+6T/ex m0kg5/pPDVK4ZMgMPBXInP1qikr6bvTKEpJHoA2ohwuLclzHM1lFRlhCIZ7vxMiJf9Gfe +VRM04z2twKqFEgSCeRemjC5Ql4o+cL/evOUXDkMYtJKoUSvziCVA73258PwYlz+rTBFr t9NAV99W/qLs0NEkV4I7vVA4DCFWODKFayB1g3nyl1iox98O/dpxOOZiJcAQSFqAGwBqS y4NGkLJW0ZAavZlMu5NVWlzPtjGvvi2gGGZAqtUgXYkXhwm+iUwVTEg3PKFZTy1EDJw== 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=20251104 header.b=WCrL+TWm; 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 65EE9606A31A; Mon, 19 Oct 2026 20:06:54 +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=20251104 header.b=WCrL+TWm X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792440414; b=vTNiNJNYLKnL8oDmeZBQJRYKFRgl+uqU2zjY1T5oLIngf3AANXtepVqR0//GOYDPzVha 8m6fatpCQRX9U3kGVuCvW+9SrhFZ7AYNgxkvtUdKeSQmqM5lhbbiOTLPMVLZEBp4GRI5T 1hiPe5qnWbXIpM8cW9cDV4T/cu104LgFcjilTIm47jVEYFExFe/Wfp8H9Jje+ktdN29bF d2vOGP9Mm3Z8laLTrMDpPoqmzM4A8dqdfx4XHz/neYgRfNGtUvOwDpSpZtHEMAjSDgTHS mD2XSajK8kwyUr9wkdY+qkCQIYRy+utJ43VjYOzUgNWqv07Hc6w05QiSjGmDzvK9MfA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440414; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=bFBNSvs3JDos8tPW/MP3a/GFNwGRHv00G3UEulH7lLI=; b=3O6F+Hr2Jb/Wj5jRsWCjtkDZJ4ZvMnQqV6/43Wxa9mZjJetW0qbOpifQG9xMtHQE8HOU l7yHL0il9Zap0h2dGjCdJcMDdYdMULG7M+EqjtCmLN3kk7GHsZYNf2msuT/U0SoYmbpPp e/d2ZXDMYiEoaYwRgK7FpG0W1t+fUEwntgyFnLzxjjIxBVidBEOciZIGmD/c+oCUrGI5/ gVMrcHupMjRd8l9DrkmPDf/mdXbHrhQvIvRz3C6IRXTyKn8iuP8nhAOYcvcvMmeOfXYZD q24qlfjL5zylt5f+/kveGTQK7dndimoiNiGGx7DVN5W7/N/keKEUL/l5+/SH8soYZLQ== 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=20251104 header.b=WCrL+TWm; arc=none smtp.remote-ip=209.85.221.173 Received: from mail-vk1-f173.google.com (mail-vk1-f173.google.com [209.85.221.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 EE57B606A31E for ; Mon, 19 Oct 2026 20:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EE57B606A31E 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-vk1-f173.google.com with SMTP id 71dfb90a1353d-5eac48af23fso581792e0c.2 for ; Mon, 19 Oct 2026 13:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792440413; x=1793045213; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=bFBNSvs3JDos8tPW/MP3a/GFNwGRHv00G3UEulH7lLI=; b=WCrL+TWmgftN//o7VLBx7xAJgrFL6LfABv+PjGf043723Sl6Ux4lFT2su1WdTXmoDG 0sKRSkUUCxN18qDHIBFgPP7OJTnzxbRiN6hy+j5V2s4kQUNVU2z1rKObKjNJk65XPmzB DiHJCTbtOixetcQAjBPLqCC43D5e0NJYDr46EhANhbVHj6MYTWON5Wj8YhfJLYZry6Lh 71QAh/Bsqzcph763M9G5Tww1gF8otwIn6j6ZdPFSiXFEeygoxXJYymt7S5O7mH9QAaN7 6j+aosh9+WjddoKo+Ii1E+s94OetgMlrv+n6zJSjdrSqZcskxTME+icx7TXKIsMCVtAL y+LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792440413; x=1793045213; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=bFBNSvs3JDos8tPW/MP3a/GFNwGRHv00G3UEulH7lLI=; b=ufRoT5vdhmb5UfPo8EgBt7vv0PKxjfIGCXqnJYx2gj4cLTZHSDV2ZC9zD8OBaqZIFo D8JFuoViOMiU2Hy/wfcJJ2EM9TtmQuqdKGRAL0tlSKsfy+aD5uICdosnrPLXi/gGJvYB QSLoP/z/3acMVV2JceE0BPX3r6FNsLTY2TOOyWiCA0V8AL9O4h2sHOz5vlMPCIPElkL7 ePGxoGGf6LxeTwLwvTS844n38Tqu6I8HQhLUae21irZEpOYK/TdamhHSvs408LemlOLh BMvUe0WnGBlb9NQ4U/WDjj11PodR/OKtHhhpvWO+/3O5I658ACuxP018v2DKFdTBAn8y noaw== X-Forwarded-Encrypted: i=1; AKwUvBz9QrHJr7wRR49FVkx4HbGa7iEVVow1JjXYiCauD14FgykXRJza9GTR3CnoEqjqqVzQ0jjqHI2DvT7reA==@lists.linux.dev X-Gm-Message-State: AFq9FYISVioH5qzjBSXVVnTtpTeibmKAAywRuYpUwjxCFyGz+1ZshiTc I7S245C4FR62xfsCyHOnvRQ+E2/VDoUnzNdxpocrn64H4QWaT6B1t3BC X-Gm-Gg: AYBFou3CP4XRw9+HtNChLqm6P7RL+VXL9giwNlGtDE5MpLZB7FuU/4tGzejP13sBwhh G+DORdcUtNiZpVn2fYdvSztG4IGg0W5c3vrLG2FoCYxYD1g8H4w3ylvq5dlzTZBeuvtqnh9wS7j yUALVKEvwtWuqqDhPxKw4HxyrIREeGmqsKVDSulzKR689dm6PJ6yvfEgd9xHXw5mJAls56Udzfe jYczpl3Yg9FBRNxawkyam8nh1wcEsyUpP/X2DWBpghCtWSRVdmmQn7dRF5JQW9q95ZmW1KVGOP6 vq+YfwJ6Ldzs5uza5WuK0gN/QOwt+d8GlYCPc5gTr2vyrE12SPVRdQlvyHRFuQwtYbV6hEjUc4e 0MCDlDxEWzq+D4ZCuGjIJhJ3CC2usf/zu0iLUS92cizfoneC0hq0PXOStEBFK9Y/ZxezpvhFfc7 +RzU81dAfLX7uT3PtQ2VdEFxW1y9BJoTXJlaNcDxPTge5PI3BvbRcQC8C8klPiyLpcMvJsOw5xX ND88Fja5W4MGCEMsd3R3b6O988tALYxYmDcNLqCbCGD5xNJwlGPj+5jTWylfZAMTQGvuO9w1D6Y 7ydOsS0= X-Received: by 2002:a05:6122:1c02:b0:5de:ee96:75b with SMTP id 71dfb90a1353d-5eaaa68b961mr2904319e0c.12.1792440412948; Mon, 19 Oct 2026 13:06:52 -0700 (PDT) Received: from MaquinaLab.. ([179.179.244.163]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5ea9b4776b5sm10451611e0c.3.2026.10.19.13.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 13:06:52 -0700 (PDT) From: Vinicius Pedrosa To: linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andriy.shevchenko@linux.intel.com, ilpo.jarvinen@linux.intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Andre Przywara , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Enzo Adriano , stable@vger.kernel.org Subject: [PATCH v2 1/4] serial: 8250_dw: Keep the BUSY-safe divisor hook when DLF is present Date: Mon, 19 Oct 2026 17:06:10 -0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.81 / 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]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; 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]; FREEMAIL_CC(0.00)[linuxfoundation.org,kernel.org,linux.intel.com,vger.kernel.org,lists.linux.dev,arm.com,gmail.com,sholland.org]; FORGED_SENDER_MAILLIST(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; RCPT_COUNT_TWELVE(0.00)[17]; RCVD_COUNT_FIVE(0.00)[6]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TAGGED_FROM(0.00)[bounces-26749-noreply=patchwork.local]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,209.85.221.173:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; RECEIVED_SPAMHAUS_PBL(0.00)[179.179.244.163:received]; FROM_NEQ_ENVFROM(0.00)[viniciuseduardopedrosa@gmail.com,linux-sunxi@lists.linux.dev]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: C61B51C239D X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= dw8250_probe() installs dw8250_set_divisor(), which brackets the DLAB/DLL/DLH sequence with dw8250_idle_enter() and dw8250_idle_exit() so a BUSY UART cannot drop the divisor LCR write. dw8250_setup_port() runs afterwards and replaces that hook with the dwlib divisor hook whenever it detects DLF. The dwlib hook programs the divisor through serial8250_do_set_divisor() without entering idle, leaving the LCR|DLAB write exposed to BUSY. When termios changes while the UART is transmitting, that LCR|DLAB write can be ignored and dw8250_check_lcr() retries it between dw8250_idle_enter() and dw8250_idle_exit(). dw8250_idle_exit() then restores IER while DLAB is still set, so the value lands in DLH. The real IER stays at the zero written by dw8250_idle_enter(), and the port gets no further TX or RX interrupts while up->ier says they're enabled. Do not replace a divisor hook the driver has already installed. Program DLF from the BUSY-safe hook, inside the idle section, through a dwlib helper that checks dlf_size. Observed on an Allwinner A733 (Radxa Cubie A7Z), where dw8250_setup_port() mistakes the RS485 control register for DLF (see the next patch): the first interactive tcsetattr() during console output left hardware IER at 0 and up->ier at 0x07. The shell never printed its prompt or read input. With this change alone the same boot reached the prompt and echoed input, and hardware IER matched up->ier afterwards. Fixes: a7b9ce39fbe4 ("serial: 8250_dw: Ensure BUSY is deasserted") Cc: stable@vger.kernel.org Signed-off-by: Vinicius Pedrosa --- drivers/tty/serial/8250/8250_dw.c | 2 ++ drivers/tty/serial/8250/8250_dwlib.c | 16 ++++++++++++++-- drivers/tty/serial/8250/8250_dwlib.h | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index eca02e8bd6d1..4c86aaf9c121 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -197,6 +197,8 @@ static void dw8250_set_divisor(struct uart_port *p, unsigned int baud, if (ret < 0) return; + __dw8250_set_divisor(p, quot_frac); + serial_port_out(p, UART_LCR, up->lcr | UART_LCR_DLAB); if (!(serial_port_in(p, UART_LCR) & UART_LCR_DLAB)) goto idle_failed; diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c index 9bb02a4ab11f..325793f20256 100644 --- a/drivers/tty/serial/8250/8250_dwlib.c +++ b/drivers/tty/serial/8250/8250_dwlib.c @@ -36,10 +36,20 @@ static unsigned int dw8250_get_divisor(struct uart_port *p, unsigned int baud, return quot; } +/* Program the fractional part of the divisor, if the UART has one */ +void __dw8250_set_divisor(struct uart_port *p, unsigned int quot_frac) +{ + struct dw8250_port_data *d = p->private_data; + + if (d->dlf_size) + dw8250_writel_ext(p, DW_UART_DLF, quot_frac); +} +EXPORT_SYMBOL_GPL(__dw8250_set_divisor); + static void dw8250_set_divisor(struct uart_port *p, unsigned int baud, unsigned int quot, unsigned int quot_frac) { - dw8250_writel_ext(p, DW_UART_DLF, quot_frac); + __dw8250_set_divisor(p, quot_frac); serial8250_do_set_divisor(p, baud, quot); } @@ -218,7 +228,9 @@ void dw8250_setup_port(struct uart_port *p) if (reg) { pd->dlf_size = fls(reg); p->get_divisor = dw8250_get_divisor; - p->set_divisor = dw8250_set_divisor; + /* Keep a hook the driver has already installed */ + if (!p->set_divisor) + p->set_divisor = dw8250_set_divisor; } reg = dw8250_readl_ext(p, DW_UART_UCV); diff --git a/drivers/tty/serial/8250/8250_dwlib.h b/drivers/tty/serial/8250/8250_dwlib.h index 39fcb1b323ad..4bb0ccb3e8ef 100644 --- a/drivers/tty/serial/8250/8250_dwlib.h +++ b/drivers/tty/serial/8250/8250_dwlib.h @@ -99,6 +99,7 @@ struct dw8250_port_data { void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios, const struct ktermios *old); void dw8250_setup_port(struct uart_port *p); +void __dw8250_set_divisor(struct uart_port *p, unsigned int quot_frac); static inline u32 dw8250_readl_ext(struct uart_port *p, int offset) { From patchwork Mon Oct 19 20:06:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Pedrosa X-Patchwork-Id: 3677 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 D2F771C219B for ; Mon, 19 Oct 2026 22:11:43 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-26750-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-26750-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 94A7238D74 for ; Mon, 19 Oct 2026 20:07:02 +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=1792440422; b=TFpEnPdmQV16LtTyGdhkP+EJwLs9aCa0F60tMEh8/kQvQgTzTszSFgF8P3JjFWxTV/zd LFjHeh6bVyfrFKsLtp6jBedqIIotORm2vhY/XASgQfrPLAaK5PAvAxnLYlTYjJA7sGSr0 Zj4UWIkgE4XB+L8qRzzZ5eZkngMsueEoLmxo9mFwUX5Hcp7QqF26eJTcicg9nRjP7doeY ffopbqSalPEq/XFDXIwXY8qeKpz7uD5pDs3EIlUCN3Gf9RH3iLquIntHkz4T4O/5iCY62 NzrX6PVyXP7BfWnVPufLNxoxNdXg/3DgtAmSv5AzqKpclQL07t7T9LWBY/2hZE0npnA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440422; 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:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding; bh=MQXVI025privUEtANhdwM89LTKKhsWNz40cUmpuugYc=; b=VpXR3kQtJ2Pr4g5NYjXN+aXtjd93F/Kwtz6loeUJbEA+a36J5pSloVRpSTi7upI3Z6SQ f3FsiYFdrKd7PC0UlbW6C+Yo23aIngSiz1026RQ2/ZiT2Feqdasalssr6h96bZdaa9xa7 IROPvEcKQv//ALrGnSAEMi/megte1iRIoEjk80QUSu8sTu1D20DaCmDzC99z9IzesZt0b N/vsYPad536eNXIrA06sXFP+vNjcE2BMGpGV+gnBBBAcdvMQK1aJOgWu9fgNL5PoWaLgl dD49C/uReDRp3JtTwb6iPkk8rd4bxKWYSTSVxkZZd4AAe0wDIsozoBgZ0FT2IDki4DQ== 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=20251104 header.b=BHBBkb2+; 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 6A287606A320; Mon, 19 Oct 2026 20:07:02 +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=20251104 header.b=BHBBkb2+ X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792440422; b=VuMgiHCBw1zHnwY69oizUaOKYAkQS++iqOSsDVUt1ctD67h/RYnQcrzWuQCl3QufnZfb 8ad9xSWnj0Xd84FUCLnO63wXQjDDVGdRHm5iVLME26IFQNPqT36OKFHKfAfCumArAvU01 uAhosy2ciio0jJ1TU5ef0LBSJg7WfXFQfK0AwPBi+puFkwqLKNRI1EMoAN7Ib4D+SYek+ DzV2e40gSKG40FDJaV5xVfq275JKU84XlpuOe0Rr3luTeFrzRnxzNjQD5JNPAvX0KtV4o 6704qRtF/bbFF5SxR5bnTZdtLenjh4edHxfFqGwSAAH8+MsgTkMjsx83E8nz6WQGi+w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440422; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=MQXVI025privUEtANhdwM89LTKKhsWNz40cUmpuugYc=; b=koyzUHxdViWwDdzbHmZcBwMMOamuwz2pwxs8r/FrYFmPpeMsKu2hcfBrJSPUscdLUebm hHC/x3eZWlJIE9JtJAlRy6Y0QkO6Gq1AO9ZniLL2Sjj8XNVjXmxQHZpgHsN6FmTR5LRIN v/OguIh0ng1w4vYgE1pRzCv6VCSysE8Tw0Ep0Wff8IhjNoTQPgJVxM0hZoOSS9/WX7HPt OmJQkZdaUbTcPCkJEON5Wf4XvJnWf9jbXRHHIkAXdowk9NxxU7eXZRjyJzHy4UDbbkmH5 9FQpziEANbQWS9vekJNlPr8whGfympgu4S2HnOP5r8Sk+QPE8K4kyxZwmczwsLGsJWA== 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=20251104 header.b=BHBBkb2+; arc=none smtp.remote-ip=209.85.221.179 Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179]) (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 F2242606A31F for ; Mon, 19 Oct 2026 20:07:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F2242606A31F 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-vk1-f179.google.com with SMTP id 71dfb90a1353d-5eac7220e9cso681351e0c.3 for ; Mon, 19 Oct 2026 13:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792440421; x=1793045221; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MQXVI025privUEtANhdwM89LTKKhsWNz40cUmpuugYc=; b=BHBBkb2+hwIvmtwy9Orfk79/j7qL3s/SasNq5YEGhojsoO7j7SDvORwDaXhEREySrq m2CvMIxxFnAqtmzzm7y8KQKLw97essZ8Kje6R9/PkKVfCl77iQsAP5Mk89pF1mHI5L0r PNi06FZVsu8SrYhr6Ne/EOnwTMGB1ihqUF2KCQ75yzzTcvdM5N4P5FfW659JbyQ9Rl88 zIkQIBDWjZtyWQ77duUQonc/9PxCo5DIh4Oe3OeXY7vmNdtPNV+x2XtiMUhxOFCMCQTe /ySEJunip3DzxV8IKop/eb9MOGI18jhYQbVJxhT4Z2U637CsuU6XlPfXj0bflZkUUhEd JMPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792440421; x=1793045221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=MQXVI025privUEtANhdwM89LTKKhsWNz40cUmpuugYc=; b=tgkwsP61rJW/WiG2rYA9fJ2wijfYxF8RwPVjlxglzMh03Ena8eNIipfiY4a7AhdQM2 4vIfcfbsev3TVz1oJ++MsuuaoyNNpepVDvJ9e8GgsEZu1agCMLzjEcmRwOUO4AJgunhr UNCjOeQrr0vLxOodN+TI+SoY1iRejBcM9scgVFoLHo8fwm++bID1sUl6qUHO0nYsI7ml DPni1znLLLAGHK6Kq8t2cNFLAV+NeJFG9USLE2BZDFstDoBsN0xanpk7Eig9vb5B1nLO J28L+AktvloUWPhU/OTWoZm30k0qVhdwoYG4gOomaxeN2lCFNQVHnpyWWDfhBjn/bKT4 0CPQ== X-Forwarded-Encrypted: i=1; AKwUvBzCRUxXwJVVJbaiCX+50wekxjkCQEsqGSGSBwr6XohDqTHP/VKSqAtnv5I4adZ4uQt3jCwQBl3KH4nRaw==@lists.linux.dev X-Gm-Message-State: AFq9FYLKgWaR49TJYjJTKB7DBP3jJrdizZsuY0UTqxejL5JbkbZ7UmtG g4BrBgi82JNe4RDTykDLtF3+szM3Yl3xlWFtSg5ol7Q1aDPX+AcU8ZnM X-Gm-Gg: AYBFou1ZVEmtFobF/1Ikyw/BzBYS7PLrcN7yWMPSsk/VuXlBmPaSZl3+ut0FJ8yCGDz /Cfcx4Y0RhNGJt9d+kSqxm4mlHNGuspwhl34bJXoTWFIWKJVdDHC1defmxpUftiIdeLp3BkID3R p7FNVh+/RJgXpzYmsJ8a1MmFuM6uc66DojL3DOMgkKnXF7ZBgfubfXu8ZjUtIgV3jmLXb2fTqiq QIH0zjpFssLXNp22hdLJUT6EDmiG9sfH/TPv0ivkdWAhMKfYFad30CXWLqK8TA92OSOq9m80dud JyOm02dw1NlEB4WxZmW6ySp9FCur2LAjc4fNUCtGup9Ao4qTwyOFSfZH3wGc0yGubtWDX86UZHS 8bf4P1xKDg11d7+pnwBjr29JJ9vUVWChvAzpxxxNNF9ED90Pd2U4/19gUFGQ7kvbJHxK9Tot+PY TbsLRIR71JiVlXCk8qFHaHDf6YkuA/9N65by3ptCrQWPiF8de7T1sa2rn+VQEN5qnQjPYFSaStR PP9dKYyE60+p468bxV0A8vhdkNOC98WRX/UCtICp01jVKEuDgdqf2I9aOVl23vYQSxCm8vSC3g5 4bIWfjA= X-Received: by 2002:a05:6122:4004:b0:5ea:7126:38a7 with SMTP id 71dfb90a1353d-5eaaa62c43cmr2437882e0c.13.1792440421005; Mon, 19 Oct 2026 13:07:01 -0700 (PDT) Received: from MaquinaLab.. ([179.179.244.163]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5ea9b4776b5sm10451611e0c.3.2026.10.19.13.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 13:07:00 -0700 (PDT) From: Vinicius Pedrosa To: linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andriy.shevchenko@linux.intel.com, ilpo.jarvinen@linux.intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Andre Przywara , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Enzo Adriano Subject: [PATCH v2 2/4] serial: 8250_dw: Only accept a contiguous DLF readback Date: Mon, 19 Oct 2026 17:06:11 -0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.81 / 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]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; 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]; FREEMAIL_CC(0.00)[linuxfoundation.org,kernel.org,linux.intel.com,vger.kernel.org,lists.linux.dev,arm.com,gmail.com,sholland.org]; FORGED_SENDER_MAILLIST(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[arm.com:email,sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; 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-26750-noreply=patchwork.local]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[209.85.221.179:received,100.77.114.92:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; FROM_NEQ_ENVFROM(0.00)[viniciuseduardopedrosa@gmail.com,linux-sunxi@lists.linux.dev]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; RECEIVED_SPAMHAUS_PBL(0.00)[179.179.244.163:received]; MID_RHS_MATCH_FROM(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: D2F771C219B X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= dw8250_setup_port() writes all ones to offset 0xc0 and treats any nonzero readback as the DLF register. DLF is a bit field starting at bit 0, so a real one reads back as a contiguous 2^n - 1 mask. On some Allwinner SoCs offset 0xc0 is the RS485 control register instead (UART_485_CTL in the A733 User Manual), whose implemented bits are not contiguous. The probe still takes its readback for a DLF of fls(readback) bits, and every later divisor change writes the fractional divisor into the RS485 control register. Only accept a readback of the form 2^n - 1. The probe itself is unchanged: it still writes all ones to offset 0xc0 and then restores the old value, so this only changes how the readback is interpreted. The A733 reads back 0x19f, and Andre Przywara observed 0x9f on the A523. Without this check the A733 RS485 control register reads 0xb after boot; with it, the register stays 0 across 300 termios toggle and restore cycles. Suggested-by: Andre Przywara Signed-off-by: Vinicius Pedrosa --- drivers/tty/serial/8250/8250_dwlib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c index 325793f20256..1b0192efe162 100644 --- a/drivers/tty/serial/8250/8250_dwlib.c +++ b/drivers/tty/serial/8250/8250_dwlib.c @@ -225,7 +225,11 @@ void dw8250_setup_port(struct uart_port *p) reg = dw8250_readl_ext(p, DW_UART_DLF); dw8250_writel_ext(p, DW_UART_DLF, old_dlf); - if (reg) { + /* + * DLF is a bit field starting at bit 0, so a real one reads back as + * 2^n - 1. Any other value means this offset is something else. + */ + if (reg && !(reg & (reg + 1))) { pd->dlf_size = fls(reg); p->get_divisor = dw8250_get_divisor; /* Keep a hook the driver has already installed */ From patchwork Mon Oct 19 20:06:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Pedrosa X-Patchwork-Id: 3676 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mxe881.netcup.net (Postfix) with ESMTPS id 346061C219B for ; Mon, 19 Oct 2026 22:07:55 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.232.135.74) smtp.mailfrom=linux-sunxi+bounces-26751-noreply=patchwork.local@lists.linux.dev smtp.helo=sto.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.232.135.74 as permitted sender) client-ip=172.232.135.74; envelope-from=linux-sunxi+bounces-26751-noreply=patchwork.local@lists.linux.dev; helo=sto.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 1A3D960CA63 for ; Mon, 19 Oct 2026 20:07: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=1792440431; b=Om9y6FwT45OQon8IGNB54MZ4KdVmuIQu6cJD9B+qL67H4eFt0Tv/2Lles51J0kmim5C9 O1rKtPOCJ0R2bRFGQoAyuc3fi/VjowJo8UTUpZoJNxCEeC2Reazl3GNftk+ec1kBdLwvJ byXvdK110vGT64VC41jQItHvYdVZsCOqUA16IVVD9DP83uoon8sq8hmgP+jqomTsEWUdC lfPhHmTaBX3ytn6kssZiY77CQIBe7EAvXut2yF9QvQw1T7JCBR78er9NS3EoBMbdezWEP 7qOmpvWRXV9EBjj4SGTqP7kb6jL1RTYXQ1xqKegMPiKJTVZNNiGIroC1o9OZ36mDj9Q== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440431; 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:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding; bh=vseRokM4wlUiC0msrJS1ImPrMKPknh69JMExUys+m18=; b=JgMsUIO/bFz1hq0LZPXanVcfDzxLWbMOvag7b3X6QTByRsyo8odg6/LOFcV0fS8tqjKh 8lHNd8YsC62N0VKdlNcnloUMXIXhusb6rIsDomQGQ60aMJczbxVcFswo0lkGvKL4nsePq 4g6GNqXBxkwU/zKtUShiWaJObnOh/UB9jLnITN698POv4P95ovkk7PfMCfmz4y8f/eAqX 8PTQWZ4Lae0YTWbMt1xwGV0vsJFj1fTSvsc2Q0aO+IIoA27opeNiHx+NKBzfHrO0HtHc5 qNk6JMrCCBd2FYP9XoT18hy8ejPUMSUb61W13gTDiWK2C/v3+tft3N8lQ/ZZ6O6UsZg== 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=20251104 header.b=PztEwnJv; 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 33A3F606A325; Mon, 19 Oct 2026 20:07: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=20251104 header.b=PztEwnJv X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792440431; b=n86sshhDg4VX3RtxsFulXqiIpbGM3wU8Nn5+ZfYsiP3qPqKvwa09ATp76/bGhVCJTrE1 pwSXCrZ22HSI68PhQuEnO10soHrxvFqvG6OfrjYFuvhke8bWwlggz09GizcfRsClguX6R 6ctoUWoGKmeSlP+aIm6PyAxONt3TQbe8TKo6/dNIChbgPyLTR5vqNhnfINHkZcTKoTI7+ OOuGHepD84u3BnIAf49EMi9lEyheApP7uOSZsC3LHuuUwo2BWpZhLYcXlzlj2PpOv/2nS JlkgyM5cnkiHpNqdQKcMPWUWoqtYI3HVY+7aqYAhV6kxR2gWMNKouEYvAVy274in5tQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440431; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=vseRokM4wlUiC0msrJS1ImPrMKPknh69JMExUys+m18=; b=qdP4iIC2YX0MBvLfI2cLYHXUVTOZTWpQ8f4T7LkcLihuyXmK8B5128tSPnq3WmOurAQY U3enTukkFM/R/oIgzmAeV08lt6An7cBoAqgsmD2EhJnRSH5eG2wiCyTUW9RhdNOn7HlWG vSS/ANOPYU8vkNTi4BxIEwHiBla7PZbFojV3eIFmOrinUFpZnqwy75Uk8BXSv+ITsH2x0 No6tEG+Up+BbV5l2v0FytmN12Tzt/K2mW78AoCM5uP/e/qW6tkA62pcDVL56nmMhj+lHC 4aXjFlfjAVx3hiGgiTssXQLtxo7P+G+aG1AmXXqkmwySHg02Wvg05+PHEdVtlTDTjRg== 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=20251104 header.b=PztEwnJv; arc=none smtp.remote-ip=209.85.221.174 Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (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 24F35606A322 for ; Mon, 19 Oct 2026 20:07:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 24F35606A322 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-vk1-f174.google.com with SMTP id 71dfb90a1353d-5eabf243d05so706120e0c.2 for ; Mon, 19 Oct 2026 13:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792440429; x=1793045229; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=vseRokM4wlUiC0msrJS1ImPrMKPknh69JMExUys+m18=; b=PztEwnJva+h3aM5dSdpfk3T4yBAIbe6aP4mJn/v53kyycyV0HqZKFmZS5xUaBXUbct vjlhq/PV/aQWpyFaDia1k6dEy4NpKb4MH/huLDjchOTTl3Aa6Ie79McHPgXfV5elYe0l 6BV/broQ8/4SWGFY8qCLtuLu/+hdwS0PcXD/Ar9J+N9IKWUMXmoSuiDAaHTCvLyiv7KG mStTK5S82QI34JZVWGirwUCPSbUTskShybpsLp0apsIfJL0DlFxbQvF6IK3czwsBQv7p UdU0nQ7qVuOvAP+M/QgWlyrgSn7uc3VPr+OliNijgAOzVKUyBjX5nFREX8W19kWDWhRq 7S4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792440429; x=1793045229; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=vseRokM4wlUiC0msrJS1ImPrMKPknh69JMExUys+m18=; b=p0HM8s90MHFx9rsT3T7CIozifjiEAIGEl0IE5dXOlbraPRPz9Gj9GIFfGL2AIdEn7G 6JaUlNq+FJkeTi7Wy4VwHLKS28eCwnit6fuRyc6L8vNSpXsUcW+qtI2AElNv0jEMJx++ yWBNKY7Cw0RzDZ3heSb4j/kqZQvK2i+P7fzVdVerdBRna4pnGyN9yo27Woj8f1gK9Qdx FClzifxvJ5mI0IEpP2EoLozAJzseXXNH01dqEhXOSUFVLM8dBhnxop3/aDCwBOk+AX5b A0DXMVTeom56qCE24DqsjwCkUGTvOUon4B+oBOGob/gzTJGrF7paGqc//UKfEVz0aETS hARA== X-Forwarded-Encrypted: i=1; AKwUvBz7nhLzQcAaZKWNCwIuCb/HI9QrLB2yLRaJFsCp6pvSvH3p1lXv5sRr3y8miAmYFXElF+vW/OjGJyD7hA==@lists.linux.dev X-Gm-Message-State: AFq9FYKUv13I40elotXbsn5Vjco6ouHcFboA0j4h3zYKeIWPb1/9WatS rg47ZdymcxJqk4kmvpYVDBFmn5tRnHMQlnM08ppqzZnAQYX/SNfAiCB+ X-Gm-Gg: AYBFou3OJabGBNxzJ5n0G0+LuhbIls6x9NSt5qvQxCB1Kpjfv9AMLuhNwh8s3av7Y+A he6ruxbI+MJkv2Xh8mpnBhhQeGImgrZI8O55WOk//Wouo4DMgH9qx69lEwSO7a1Z/eK5bPyfk3R QP9oFED/qrxbtV3+ocHswxq6/0pHcxPuH4p1Ss6WPX2PSMUD8VXm2Catrw8wWucJsE3R+TfGk6K +NkDmVJekAuoGmBcxmjQCxtAAA/88xyOqn0J2ZnfE2KkmmuhkCfLFxoM/cGgKIcqSvRwv1YDuWf cIdAPWRcJEfOWrpgnfRGguaTgWHT0j239hD6fUXjwEbhs561UoLQUKsl3OxbV+bLXphYw943OAi svr02hMFDhDEd6AzQcMxqzNC/WXsySqdjBj/+4BpfEExJIb7tzSfTM3cNodjeC30BEeDYunv/TH DnHpiOelAAj2r2bebaGKzZ4h98rPl4tn7J6wzKIbvEVVx/CAOE1fDRlYs8mb/sZvYTKEfAKS0sj 5sdzFiQ7Fvr2UNMyg0NqDzHaMDxnoYHEBQQ8eZgCsHhPMMzvbPAAqs0VHP++tWr6MfnCk41qheL JwS+KAk= X-Received: by 2002:a05:6123:2eb:b0:5dc:d0cb:7d6b with SMTP id 71dfb90a1353d-5eaaa65aa82mr3039279e0c.14.1792440429039; Mon, 19 Oct 2026 13:07:09 -0700 (PDT) Received: from MaquinaLab.. ([179.179.244.163]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5ea9b4776b5sm10451611e0c.3.2026.10.19.13.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 13:07:07 -0700 (PDT) From: Vinicius Pedrosa To: linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andriy.shevchenko@linux.intel.com, ilpo.jarvinen@linux.intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Andre Przywara , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Enzo Adriano , Conor Dooley Subject: [PATCH v2 3/4] dt-bindings: serial: snps-dw-apb-uart: Add Allwinner A733 Date: Mon, 19 Oct 2026 17:06:12 -0300 Message-ID: <09f3a181436e6f19317224e583c2fdaa787797d7.1792439398.git.vinicius.eduardo.pedrosa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.69 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.232.135.74:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; R_MISSING_CHARSET(0.50)[]; 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)[sto.lore.kernel.org:helo,sto.lore.kernel.org:rdns,microchip.com:email]; FROM_HAS_DN(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; RCPT_COUNT_TWELVE(0.00)[17]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_CC(0.00)[linuxfoundation.org,kernel.org,linux.intel.com,vger.kernel.org,lists.linux.dev,arm.com,gmail.com,sholland.org,microchip.com]; TAGGED_RCPT(0.00)[dt]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[viniciuseduardopedrosa@gmail.com,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-26751-noreply=patchwork.local]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.232.135.74:c]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,209.85.221.174:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.232.135.74:from]; ASN(0.00)[asn:63949, ipnet:172.232.128.0/19, country:SG]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[179.179.244.163:received]; MID_RHS_MATCH_FROM(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 346061C219B X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= The Allwinner A733 UART is a DesignWare APB UART, but it needs SoC-specific handling so the driver can avoid stopping its clock during termios changes. Add an A733-specific compatible, with "snps,dw-apb-uart" as the fallback. Signed-off-by: Vinicius Pedrosa Acked-by: Conor Dooley --- 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..532392dd54cf 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,sun60i-a733-uart - anlogic,dr1v90-uart - brcm,bcm11351-dw-apb-uart - brcm,bcm21664-dw-apb-uart From patchwork Mon Oct 19 20:06:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Pedrosa X-Patchwork-Id: 3679 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 3682E1C2283 for ; Mon, 19 Oct 2026 22:12:02 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-26752-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-26752-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 0296843C9E for ; Mon, 19 Oct 2026 20:07:20 +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=1792440439; b=ufJpgcN8+Pf+/j33bsNXAj7Yd4sTTyzWJoXYBjPKiN66y5WXbdHLyuLJTjRD3wJv6tuj C+s0qGaOhUoew5KjeU5/sNFm/BfjeD46e8J8xX7nevBhIiyK1tbZFtWp0YDfWe9qISvEn Mbd3NVEBI6MlwAWQltOlb7EI+aUiQ+TquFVJfnHMDQUHO+RcWWZCPviFwa/QbrAK7cKlr UhSD8KJDkEyinlfl1VlnVrynsQVZ8o3ScZfdym78ObKLhkEBvNNpZ8VBckRBo5Aczucji dw8+DLpysWFJsLRW/u+puk0uRAIEjNtI0Kh+x8gr2ZYFU7FO7KgtW6TAUansw1dZttw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440439; 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:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding; bh=YPV1ND+Y5cr1ZRV7QTF9T5CIKQmib3RaWdAMyy6frHc=; b=Ow5ArZELfX9bZzSvwTULl6gK0af/DxCApinjGCEntulidv3i4jDD5JjYTk0xx9Rf/PHY emYcJcAkok01UAxEQEvGvYPEGzSxt0ZFyp3WdpyNWS2A0x1KOQYd8jI7Of4DOm9mBe8wM SI7aimQOcaOnkXie8oBM1IFMNQE4ykfeTrokLDWn6qw8stc5KOs3kqqobQSIA3xPMeZ9U jJ3wsb29yO5+JQM/qU2hl9D4kSaqGtjGe9ABDgCqbHGg9cSNFE8SwJHMHjgJjopId0O+V Ol8yeovenU0md0sN+fe18BZ9X1O9jQv7/DjaVou+PDkz/2tcW2YOmp3PURBU9C3tmdQ== 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=20251104 header.b=DAi697Xq; 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 B26C8606A321; Mon, 19 Oct 2026 20:07: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=20251104 header.b=DAi697Xq X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.175 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792440439; b=npEDIRR3ZVOWAzW/w3jXN1zukN/cQupIXdFS02Acd0pMm0MhIDtW7ITK83hrIH9BNWd+ By/qUpux2gCSYy5k7140UeZVgwZruKPkE5HXdO+T4EIaTDQS1owl6sf/TSQ+gm9D8Wrtl rrnSy5n6as4mvIR0+D37xVdVi0RhgXNKffjhcfdK/y9qFvI1z9/HebiuKo+nFElqcCeWT 0xhKKsvhdlKFNoqfZS17BqXm3pnihX+R1R4b51tiApwWkX/A8N8HDaFagK8Q/Z7yrNG9x Z2G5jmt5s01WPycr2dsOnpLwWRAsfGjWnOsM6esWxKBRORjfUZGJyt3FQPzR03Om5dw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792440439; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=YPV1ND+Y5cr1ZRV7QTF9T5CIKQmib3RaWdAMyy6frHc=; b=jhk3jS0BqCmSl7zmJIY5GigWbg+LcBGTxJqeuIPyxnn/cdyEzs43PWn0LGzFmSpJreyK qo8ER1Mnd2kUhb9JHgOpE7yEkc5GsSyghmfBaqyhAox4hWnbp3WzfL5vKEGrIoZiWuRNg MwyYn8QHwXQuwY/kW/hhFB2GXfB1oVRLU9ay+hga0n6r2zxC4iOW90nvnxbF523VoBGct JQlnmNXXvbVGUCOAZsAGh3zQfxRCyHzs3zFBdkoyIUWpH/+TM6rNT1f5q0wUKsv+ZeFbU uJnOyjr3gKkgZCIayDeWcHJvhj5A9oNdSv+wWj3RfutD3/s50VoUZDjxinPVvMMS+VQ== 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=20251104 header.b=DAi697Xq; arc=none smtp.remote-ip=209.85.221.175 Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) (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 4CDBA606A31A for ; Mon, 19 Oct 2026 20:07:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4CDBA606A31A 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-vk1-f175.google.com with SMTP id 71dfb90a1353d-5e948e56af3so831792e0c.2 for ; Mon, 19 Oct 2026 13:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792440438; x=1793045238; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YPV1ND+Y5cr1ZRV7QTF9T5CIKQmib3RaWdAMyy6frHc=; b=DAi697XqUyXqJu1Yts/6cUdMAKLiQa68K5crfUgYxBb6jEyZK2vLNPb9aDRVuoTScB P2lyYZrqACD5T/t4dEEqRMZDr1k/wo2VIHn4gDsDo3/t1psuqvO+EtUyC0XMfv2rFsHa wzgwDUbu687v3TPvWijRckWJWKS2AF32Ea5PJK2kIzUi0TMDq9wqGIW0PT1kvKaUjVvI 6YP+1gv3OOW5Mg/O0XX6Ayx83WgrcQ0KekWg9OEcC7zkqZUc/4WdDL63l5DJyBTcyLHl oZ4f8CUrBtUdq965V5vofZQcdQl75YGZOJ8xjPVZswvBAmpiI4Bro8UYoP/fVMyaUxdg tzRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792440438; x=1793045238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=YPV1ND+Y5cr1ZRV7QTF9T5CIKQmib3RaWdAMyy6frHc=; b=h1/1qJBTyWRUAbzYYEFfHv8QieFW309ilqeJF43UzbsWyUMtZ0h+WFbE4qWDpiDuxY xG1hoxy4JTbYFICO/ffUmoX6Aw75rL5l/eP0v/ziA5j+j5v2VpOVFo1IEEEAP9ZyTD26 ootKAavhlT9qWFvcesmMUGBnd/oDB9iVQYxCcgW0Tz2Ws93lnrtm2+bp53llcBQp20ZW /2V7EfG3dKZbmwEya0ccUY1IrSJzZGqEwrWdmTWNizK0768sLHirGUyWzntzkUtowP9s VBqHuO/81W4t47xnGBoGEUgIKRKqzQlg/j9QVP3qdJ7+fQZ0K5jhhtJg4GdIEKLFmYDF N32g== X-Forwarded-Encrypted: i=1; AKwUvBy9zBINGlADU6Hyl8jhV04xUlvacKFatIS+NCo4wS7ms9y+Vy8oQnndBSW3PJQ03h1gXBhBpGBiMjOUAQ==@lists.linux.dev X-Gm-Message-State: AFq9FYII3Z35NxQwFLubsJ2Ph44SGtmhxj5wgYIFjjK/vWf3JvDJCLaJ NVZZw2Afl8nJDIz4Dfaq4urTejaYT0v7odghi9rfghLiTcdtK5MzqaIvt2crWlvSImXgow== X-Gm-Gg: AYBFou3vS0RAqZQ3sH4DJB8Nioc42uaPZNqoZ7D8G3g6P3c4xEy2I71e7Onuij265i9 x+FfxLYwxPEb50jWXSNclNDkXtPWsYNWNZhU7v+GuPXHB1O9Ez93xiYNeeKGYlOmIlLtJJQL7fR wVobLBMGN2GrBNYUKYr7JHEwxEIsbzXbLDh6h8qKIoq3RJvnXVV3EZh57iDcmSRzFoJBmzZDO48 Yo0T9YwflDhqmCOGx18Fm3Per4vOdgXuBjaC/+Io0ye3JCh0QXDDOWu5t3kTbNVScFePbTYaXyI +BILHoCSPjAjs8ZlN4Mv2329dSTnoze0x83/TFy2AME9R5cflKSSDECPHCsng5/d30fDNOYkN21 YnbhLWAu6cRXNgTgHeLTkxd9JLWnjcDV+hTL0wOGv+o9NjppYgCATMViI2THFDBRXN+NDcqPyg3 O0FqtGv0EfWDRU5kOR7ftN3wV53dhlQVf4VFYrULvq+4vfowyLv/VApmMCzDO8IvjIVHsbDsp7H eqI5wfFIpuU9eUan2cWaC6ORpmakYY6HEWb5rccscVMCOyvhI5YHO+WaNCA6HjfR/C2icFsIHTm AYwKMAJ+/9LXCNU1Rg== X-Received: by 2002:a05:6123:12d:b0:5ea:c214:b5cf with SMTP id 71dfb90a1353d-5eac214b927mr1447944e0c.1.1792440438123; Mon, 19 Oct 2026 13:07:18 -0700 (PDT) Received: from MaquinaLab.. ([179.179.244.163]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5ea9b4776b5sm10451611e0c.3.2026.10.19.13.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 13:07:16 -0700 (PDT) From: Vinicius Pedrosa To: linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andriy.shevchenko@linux.intel.com, ilpo.jarvinen@linux.intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Andre Przywara , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Enzo Adriano Subject: [PATCH v2 4/4] serial: 8250_dw: Add Allwinner A733 UART Date: Mon, 19 Oct 2026 17:06:13 -0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.69 / 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]; R_MISSING_CHARSET(0.50)[]; 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)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; FORGED_SENDER_MAILLIST(0.00)[]; FREEMAIL_CC(0.00)[linuxfoundation.org,kernel.org,linux.intel.com,vger.kernel.org,lists.linux.dev,arm.com,gmail.com,sholland.org]; TAGGED_RCPT(0.00)[dt]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[viniciuseduardopedrosa@gmail.com,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-26752-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)[100.77.114.92:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_FROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[179.179.244.163:received]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 3682E1C2283 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= On the A733, dw8250_set_termios() stops the UART clock around clk_set_rate() on every termios change that reaches the driver. If TX is active at that moment, the character being shifted out is corrupted. No baud rate change is required to trigger the problem. Toggling only CLOCAL or CSTOPB 300 times during continuous console output corrupted bytes in every run without the quirk and in none with it. Use the existing SKIP_SET_RATE quirk, as the JH7100 and SG2044 UARTs do. Signed-off-by: Vinicius Pedrosa --- drivers/tty/serial/8250/8250_dw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 4c86aaf9c121..718ec44135e4 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -906,6 +906,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,sun60i-a733-uart", .data = &dw8250_skip_set_rate_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 },