| Message ID | 20261005172538.398522-3-vinicius.eduardo.pedrosa@gmail.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-26508-sunxi=pue.re@lists.linux.dev>
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 A665F1C2C5A
for <noreply@patchwork.local>; Mon, 5 Oct 2026 19:40:17 +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-26508-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-26508-noreply=patchwork.local@lists.linux.dev;
helo=sto.lore.kernel.org;
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.90.174.1])
by sto.lore.kernel.org (Postfix) with ESMTP id 1429D60CC89
for <noreply@patchwork.local>; Mon, 5 Oct 2026 17:34:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A57D84E1C65;
Mon, 5 Oct 2026 17:26:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b="ETV9wHJ8"
X-Original-To: linux-sunxi@lists.linux.dev
Received: from mail-yx2-f12.google.com (mail-yx2-f12.google.com
[74.125.224.140])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2113D4E06C2
for <linux-sunxi@lists.linux.dev>; Mon, 5 Oct 2026 17:26:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.client-ip=74.125.224.140
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791221176; cv=none;
b=sPcG5rulTgat0Lgm6yywqCgQnUnYRrPWu9bZ6GGMbMjd9TAGMQPKsaZFUNFNmsbR7R7Qa2gSMeBhs5FAJSYjY1I0r5k68FnRdh11OK8TielnW3uBVqr+V9Y/y/P5nzUzV48gWybFEEapWpnt1WgIWejGCAP+sNQl4gcEsrZCiuA=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791221176; c=relaxed/simple;
bh=RteOrGLlQTXAnYWg5zjbSnYFrD1pgoJ54/qMOu/aInU=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version;
b=S4iBSDMKwUHDR2Ph42xeGP4iWTxe6M66GkGeBWrBRq4WueffgXovYRaWToCfdixyGKLg0A7MVNVuKTHJPNOWJbBqp4IIe4s/3B7Lm6iFdTbMsjjoqnzcz8gpsCovOtLE+MYnkW1dxVeESkFQ2ORJdp3zhfgvQ3hq8gZkM0cfvYI=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b=ETV9wHJ8; arc=none smtp.client-ip=74.125.224.140
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-yx2-f12.google.com with SMTP id
956f58d0204a3-66e4aa8d881so1828361d50.1
for <linux-sunxi@lists.linux.dev>;
Mon, 05 Oct 2026 10:26:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1791221174; x=1791825974;
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=mcdQtERBvEEEhQkX7i6RjlhDSgKxE0CpVxD5Gi87UTw=;
b=ETV9wHJ8mRP7DxaN01ZgbZRMRSpMruwEorQnb4Vhl4C6tP9nSqTmTmoB/LvHjQ0BOm
rt7FAoa+UaAgMnYboxYa65Dt9eV2dCcaulGdTuNBq15ab8V+HpuCLGJ9IvH1s+HXozYb
/E5QSJsbWOIhmLzhLjSnV7WkdR6WMDLl5nk5S4vM4J6t1Q9DrAY9uWc7C/SB2i3SoBDi
11hmPykLuVLPuta43EeZ5gJeJrEKW5LJzeYe1EhpRJ/6BZGHEGcVEgr8/we/tmxmL04h
pp9zFKG474yH3y3FPJc/r6qNGNTVuNhicB7tXnJQ22T3G689309Z2NWf5snbD2zLDmSS
LJjA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791221174; x=1791825974;
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=mcdQtERBvEEEhQkX7i6RjlhDSgKxE0CpVxD5Gi87UTw=;
b=h1hQBTuzCdnz5awx0AaIFy8BgjM+8bCS0i1r/HUs/X4Xcr20qqHLGnGP7JpvMht2Qq
iuMi9LzwxXljScVCYbMfP5F5uJeT95j7lAvoP/XfXTCAzR7fS3eTKH0XyX+M6hpxHJyM
x+ppL7l0VdocvpbDWUigQJXNBDK+uSgYSVTqTrpBTJtHa8wJgVMpUlPsnmjecISWS1gb
XwExtWyAcdMsAT6qILtaddq0YfX7s89C25WNk4b+Ko2VkFYzuF18ecLS6IedWhI5b7RZ
LPzne7y2VUucnDgS+xXgMgV/KL/NJfd9BIVqduUYai6rutNef++kE4fu/DWbX/qv3j3v
utnw==
X-Forwarded-Encrypted: i=1;
AKwUvBwI56CFRpM0BXVPcdibcp/jZSEhZL9Tes2gfcdzuiih5s5cp+wE3cGywyDiqGnDL2D1efHusAnPaa04WQ==@lists.linux.dev
X-Gm-Message-State: AFq9FYIkgMEtzoFJLXUbbFtybbeopp0eoJS97GCfOz2mPopdvk66llJ9
wVuplDttGLUyPOpq/WSbcs70ptI3Q/cukb9JIlNpnJZzWDWUZidUn+MN
X-Gm-Gg: AYBFou1AgXiNnsnyBEBi1mWwTRO5XtzCbNrY1kMoqrn6uuI0v2ddsdOa+pDu/V5POS5
ytO917zm38GzrJlPCsgvrv5hiUgRQvWPO1NsVEB5noPLFhtyHb5Jf0daq/8cBqPfkCObihivFIZ
gx6qFz3RmLxq7YHZAZbrasI7+T3E2DQf2n9uiOM6auj4PBat8X5qd/Wo8twyUy8YHTXTFsIoqMw
ylg33m4xdbHI29pbdeEljml2QUwqxd6YQ4PZ7WvSHrehPm5tU8VA897dmeb2tGzn8Lvzml1lHWS
2je+2I6EwubZwU8jPxzsGOifhpunVaAp/VIO1sWJ05E9DyxdknGVc+Oq2Zpj4g4sKD2/DGjXdWP
wyG1kUHG1gWWJEiQAakw0kRG0tiyRdyI3Y+rQvm+T7LjroeLpZVPpAjaDxjBm8xFjy/ykrNqogR
3x69GMvyYMyxTV+2rYAUd5GxkY8KTDz34gr7mgYWx2FvSXvLhUDgLgaH7x9pFY6GZQ3hDaBZZZF
Te6UDbXfuk7OT4p6X3V8a8hghHA3gGE1k+fPqywhTwn3+cXiIhUzKLt4JLHOXAGbTgjfzqPf183
I0kVYQ==
X-Received: by 2002:a05:690e:11ca:b0:675:5ce8:f037 with SMTP id
956f58d0204a3-677abf9bb0cmr4946331d50.35.1791221173929;
Mon, 05 Oct 2026 10:26:13 -0700 (PDT)
Received: from MaquinaLab.. ([179.179.237.181])
by smtp.gmail.com with ESMTPSA id
956f58d0204a3-677c1b1b585sm3449969d50.5.2026.10.05.10.26.09
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 05 Oct 2026 10:26:13 -0700 (PDT)
From: Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com>
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,
Enzo Adriano <enzo.adriano.code@gmail.com>
Subject: [PATCH 2/3] dt-bindings: serial: snps-dw-apb-uart: Add Allwinner A733
Date: Mon, 5 Oct 2026 14:25:37 -0300
Message-ID: <20261005172538.398522-3-vinicius.eduardo.pedrosa@gmail.com>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20261005172538.398522-1-vinicius.eduardo.pedrosa@gmail.com>
References: <20261005172538.398522-1-vinicius.eduardo.pedrosa@gmail.com>
Precedence: bulk
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Server: rspamd-worker-8404
X-Spamd-Result: default: False [4.84 / 15.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.15)[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=arc-20240116:i=1];
DBL_BLOCKED_OPENRESOLVER(0.00)[sto.lore.kernel.org:rdns,sto.lore.kernel.org:helo];
FROM_HAS_DN(0.00)[];
PRECEDENCE_BULK(0.00)[];
TAGGED_RCPT(0.00)[dt];
FORGED_SENDER_MAILLIST(0.00)[];
RCPT_COUNT_TWELVE(0.00)[12];
FREEMAIL_CC(0.00)[linuxfoundation.org,kernel.org,linux.intel.com,vger.kernel.org,lists.linux.dev,gmail.com];
RCVD_COUNT_FIVE(0.00)[6];
FROM_NEQ_ENVFROM(0.00)[viniciuseduardopedrosa@gmail.com,linux-sunxi@lists.linux.dev];
TAGGED_FROM(0.00)[bounces-26508-noreply=patchwork.local];
TO_DN_SOME(0.00)[];
FREEMAIL_FROM(0.00)[gmail.com];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.90.174.1:received,74.125.224.140: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];
R_SPF_ALLOW(0.00)[+ip4:172.232.135.74];
RECEIVED_SPAMHAUS_PBL(0.00)[179.179.237.181: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: A665F1C2C5A
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?=
|
| Series |
serial: 8250_dw: Allwinner A733 UART support
|
|
Commit Message
Vinicius Pedrosa
Oct. 5, 2026, 5:25 p.m. UTC
The Allwinner A733 UART is a DesignWare APB UART with two SoC-specific
differences. Its baud clock is the bus clock gate, which can't change
rate, and offset 0xc0 holds an RS485 control register instead of DLF.
Add a SoC-specific compatible, with "snps,dw-apb-uart" as the fallback.
Signed-off-by: Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com>
---
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 +
1 file changed, 1 insertion(+)
Comments
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] dt-bindings: Invalid snps,dw-apb-uart fallback for Allwinner A733 -- commit 51cd638ddbc823709bc6b8874d8c1f36411d5573 Author: Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com> dt-bindings: serial: snps-dw-apb-uart: Add Allwinner A733 This commit adds the Allwinner A733 UART compatible string to the DesignWare APB UART bindings, specifying "snps,dw-apb-uart" as a fallback. It mentions that the baud clock cannot change rate and offset 0xc0 is an RS485 control register rather than a DLF register. > diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml > index 86dc259193112..aa8cab5ba3d33 100644 > --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml > +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml > @@ -51,6 +51,7 @@ properties: > - const: renesas,rzn1-uart > - items: > - enum: > + - allwinner,sun60i-a733-uart [Severity: High] Is it safe to use "snps,dw-apb-uart" as a fallback for the A733? When an OS binds to the generic "snps,dw-apb-uart" fallback, the 8250_dwlib driver auto-probes offset 0xc0 (DW_UART_DLF) to detect DLF support: drivers/tty/serial/8250/8250_dwlib.c:dw8250_setup_port() { ... old_dlf = dw8250_readl_ext(p, DW_UART_DLF); dw8250_writel_ext(p, DW_UART_DLF, ~0U); ... } Because 0xc0 is an active R/W RS485 register on the A733, the auto-probe will falsely succeed. The generic driver will then set p->set_divisor = dw8250_set_divisor, which blindly overwrites the RS485 bits with fractional divisor calculations on every baud rate change. Can this corrupt the RS485 configuration and potentially trigger unintended hardware states (such as bus collisions) on the RS485 line? Furthermore, the generic fallback lacks the DW_UART_QUIRK_SKIP_SET_RATE quirk, so it will erroneously attempt to call clk_set_rate() on the bus clock gate during baud rate changes: drivers/tty/serial/8250/8250_dw.c:dw8250_set_termios() { ... ret = clk_set_rate(d->clk, newrate); ... } Given that the generic fallback driver actively misbehaves on this hardware, should the compatible definition omit the fallback string so that unmodified kernels do not attempt to drive the A733 incorrectly?
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml index 86dc25919311..aa8cab5ba3d3 100644 --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml @@ -51,6 +51,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