| Message ID | 20260702-a733-rtc-v3-0-eb2580374de6@baylibre.com (mailing list archive) |
|---|---|
| Headers |
Return-Path: <linux-sunxi+bounces-24059-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 07D1D1C3FF4
for <noreply@patchwork.local>; Thu, 2 Jul 2026 10:15:15 +0200 (CEST)
Authentication-Results: mxe881;
dkim=pass header.d=baylibre.com;
spf=pass (sender IP is 172.232.135.74)
smtp.mailfrom=linux-sunxi+bounces-24059-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-24059-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 A6FD1302D071
for <noreply@patchwork.local>; Thu, 2 Jul 2026 08:10:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 09F3D41C2EF;
Thu, 2 Jul 2026 08:10:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com
header.b="b4F4n5kA"
X-Original-To: linux-sunxi@lists.linux.dev
Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com
[209.85.128.51])
(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 5659341226B
for <linux-sunxi@lists.linux.dev>; Thu, 2 Jul 2026 08:10:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.client-ip=209.85.128.51
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1782979848; cv=none;
b=YOdIws67vRI44HMDgUty/nbiAm7o/BjV+YJOcIiEn0TDBPKX8GawXSH7lDOVDaxLiAYoAcWVzxII7GOa9Ol7W5ol/NLS24ld9M9knAeXar6hViSIkZG1JeoUodp+kBtjDjRU/QThDhIcBEpKfR/DUXs8Rs8to1ovC131iDKEgT8=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1782979848; c=relaxed/simple;
bh=RpYgXqcHniaYUqWf8mxFhxB+KJLte7VM9Vj154mX5v4=;
h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc;
b=jR6WKiIYx+iRL0kBHIk2f/PN0PIkFgzJUY0qCJw3oax3K0qXIUAsc19WbxTGPnsZvf3U9u4RW8/27H34D/hzXCVrB12PUw86VDrcUlTNxIQ+IY6TnbOcos6jFXDy9G2g+/EAuGenx1WWuKdKHliJQg+AEX6ZmtpgV1xVTElrMWk=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none (p=none dis=none) header.from=baylibre.com;
spf=pass smtp.mailfrom=baylibre.com;
dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com
header.b=b4F4n5kA; arc=none smtp.client-ip=209.85.128.51
Authentication-Results: smtp.subspace.kernel.org;
dmarc=none (p=none dis=none) header.from=baylibre.com
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=baylibre.com
Received: by mail-wm1-f51.google.com with SMTP id
5b1f17b1804b1-493ba701891so10543685e9.3
for <linux-sunxi@lists.linux.dev>;
Thu, 02 Jul 2026 01:10:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=baylibre.com; s=google; t=1782979844; x=1783584644;
darn=lists.linux.dev;
h=cc:to:content-transfer-encoding:content-type:mime-version
:message-id:date:subject:from:from:to:cc:subject:date:message-id
:reply-to:content-type;
bh=TStkowbQyn476cbj7sHzFF6Id3PxboxS4zTbnsp7ckA=;
b=b4F4n5kAlOwBblA8VxGiQLlwFGSUcboYGtwRw4i4VQRglOKMj6fgg3x+XjyYfLebwM
lYKcgPvzG/gqsF56sdSJkwUuDgefltOIV5O82+y/dUhocYqbHUudtD46sRUaJ1uSGpKe
6coC4egufbCscckYtPQxC60w1So6wJWBRQa1EotB7gF3oQk6mhl4GpFACyeMWHeoaXQK
e0xK8nxI9IE6Cp9J4ciTpZh5hmCulVptMIcVEX54uyAewJYRMJaOoaPrtKxglZXWEQKu
a+pcDs6rFp+6TrTiuhnYWeH3T1iOr+z12aVPPN5SuMHvl65ztE0NdITKnehqPV1ZcbSo
DvyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1782979844; x=1783584644;
h=cc:to:content-transfer-encoding:content-type:mime-version
:message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=TStkowbQyn476cbj7sHzFF6Id3PxboxS4zTbnsp7ckA=;
b=j/xhqQBHrulxTZAFbcnhBhZeQUaqyJqE7Udz16uFcGOET8Lsl5x+bMJVh93OodsZ4Q
ESizmuNRlZSJZlcW14tyQrm7u758hrt0cW7CBowkXUjggzhQrYd/xmYZ+AcV7I1pyHVn
736qERgyXJfi5JSiU0TCqatCs+VhOsOA0C0umnScbiZ1unzKSi4+F9Ko1WdEENrQ5tFe
4onxRgYE1yaiJFPVeSaRy773lwHyCDdIuVsqCLFt5Hlxl6GBdeAkWvAz0NecWiS/OPag
HMXigFD/x0EFg8WDFuf+UP8ZRNtqioy4mHcgGIHQXnm85GQwnLmCVLwq8jH4vsN8qKIL
upVA==
X-Forwarded-Encrypted: i=1;
AFNElJ8ehnYqojtd0RA51MF0uKOhkYKbZlgwYdlkZGMsVvyF8pXPPDju/v+61Am0QmUmcCLLCnCPhZfe7NgfBw==@lists.linux.dev
X-Gm-Message-State: AOJu0Yzvt+6qN7i4IEvzORF7xMC1M+pe9De0YpOUOf2yONkeT6TM3dIX
mGMAmtPEX9HGmsBEjx+BMWehLahqcAZD3bMRShiu8CxRAqMT+gWKRo4SAIi7v7LNwgr+445gXsa
xlBgJ
X-Gm-Gg: AfdE7ckmA25OhlamRoGsCNY0Joz1+D02wGz+skmYVq2NLlhl/QLlVz8Qf1nWVKaaRUY
TYrjcnurbVvhk4m0EcZOft1qSJ8AItHSwrqXd3awmF2nGZqltjfuevSOcE6vaMYha7TjiHCo1PD
u4dskT5at2ovfzFMJVtXbAeMQXs6ZJ6h4qctkPkUoHlDWGtVlMdh2fBefZNl6BnG63pGM4i3YDO
LlPbZWJ6/q1wEcnseGZRyHtV5yHVAQWbuB7L28XPwkjNrozkn/aYPnbQQKA8ZANuuQih9NGny5U
o7t68zFHVPlYfH+dMJTrRE29BorMr4We2c4F/+w1QOcIrmC6+VVwz6+dgHZCjkd11/nXj+6ndqQ
7Ne7aR/CV+H4BJGY4DU5tJu5nWtncDwA7nyeQGkPFs2+cI53zXsyCnRk81Ne5P9WRWHhjMLBD3G
XOnfej8RQh67I=
X-Received: by 2002:a05:600c:6c90:b0:493:bc4a:c6b4 with SMTP id
5b1f17b1804b1-493c3df6da3mr40899765e9.38.1782979843775;
Thu, 02 Jul 2026 01:10:43 -0700 (PDT)
Received: from localhost ([2a01:e0a:3c5:5fb1:2e3a:7dcd:d2a4:6556])
by smtp.gmail.com with UTF8SMTPSA id
ffacd0b85a97d-477db8a4a09sm6872510f8f.13.2026.07.02.01.10.42
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 02 Jul 2026 01:10:43 -0700 (PDT)
From: Jerome Brunet <jbrunet@baylibre.com>
Subject: [PATCH v3 0/8] clk: sun6i-rtc: Add support for Allwinner A733 SoC
Date: Thu, 02 Jul 2026 10:09:59 +0200
Message-Id: <20260702-a733-rtc-v3-0-eb2580374de6@baylibre.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-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-B4-Tracking: v=1; b=H4sIANccRmoC/0XMQQ6CMBCF4auQWVtDp9CiK+9hWLRlkEmUkpYQC
eHuFjYu/5eXb4NEkSnBvdgg0sKJw5hDXQrwgx1fJLjLDVhiLRG1sEYpEWcvfC216XpZkSbI9yl
Sz9+Tera5B05ziOspL3isB6JLjbc/sqAohXEGpUTTVH3zcHZ9s4t09eED7b7vP26UFU6jAAAA
X-Change-ID: 20251226-a733-rtc-c5167df14e6e
To: Junhui Liu <junhui.liu@pigmoral.tech>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Maxime Ripard <mripard@kernel.org>
Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
Sashiko <sashiko-bot@kernel.org>, Jerome Brunet <jbrunet@baylibre.com>
X-Mailer: b4 0.15.2
X-Developer-Signature: v=1; a=openpgp-sha256; l=2898; i=jbrunet@baylibre.com;
h=from:subject:message-id; bh=RpYgXqcHniaYUqWf8mxFhxB+KJLte7VM9Vj154mX5v4=;
b=owEBbQKS/ZANAwAKAeb8Dxw38tqFAcsmYgBqRhzxkwEf5Bdzyd27oCSpq4h7tdHUp+tEbg4VR
Z0jNuLTPyOJAjMEAAEKAB0WIQT04VmuGPP1bV8btxvm/A8cN/LahQUCakYc8QAKCRDm/A8cN/La
hbuHD/kB91kHGeDducer2jqe2ndIa28Z2E/EheBjt2qp2JsoIigd4k5m5R75RIFmdlinKyJ1TiI
0/EGurhWjxnk+ROvzRKA4X1dyoQKOH64035/X3k2ok+SSTLqtV/hmsHAr28/eBd6RyIcksBX04y
YMGQSVUt/wJ7zlKSFV4gahC/Q7tCKyXhrVMJjrC/EFBWiERd79iAssZ9VgUWoa/j72y2mN9I5NN
MmZQcWEe5Bco3mAxuSRa2WlHyepf76qy2D/48D2kGPXWlDrMRkVoyHN0FPIcZYD1DRzFbBfaKpS
MZSXEL2AryzIqyTsMWYnQm5volxnyscBI93VwkKgyCTqmLNt9oqqII8TcLnzuh53v1MaXb00MuF
ZL+XBFNGVzQHeeK7Kh8/2oicQJBRTzTPDVR3UJ9GTRtPPRWB94aunseTzQRvYiZdP9s43kNKJjJ
WBRFSQqkOr3t66a1JA7MEcp7cud4aE0ydX1GyJ+DFIbDc7jZnJRq471IlGThknIkiYVAStm1eSW
vYLP7PJf8DHwc/gI/3aWvidnfLbTw7HFO8q/vB9zHzzAAO+CEgfmgwbQidd6TJDwXdk6KcGuZNU
lHs4bLtfnng8szELfr2T7oUUEjtYNij6faySFglDp+Xc9eaFgVZj1QJ5+bMQayIstSANkjs35WC
EknFlM9LkeN26kQ==
X-Developer-Key: i=jbrunet@baylibre.com; a=openpgp;
fpr=F29F26CF27BAE1A9719AE6BDC3C92AAF3E60AED9
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 |
clk: sun6i-rtc: Add support for Allwinner A733 SoC
|
|
Message
Jerome Brunet
July 2, 2026, 8:09 a.m. UTC
Add support for the Allwinner A733 RTC and its internal Clock Control
Unit (CCU). Reuse the rtc-sun6i rtc driver while introducing a new
SoC-specific RTC CCU driver to handle the hardware's evolved clock
structure.
The A733 implementation supports hardware detection of three external
crystal frequencies (19.2MHz, 24MHz and 26MHz), which is represented in
the driver via read-only divider operations. Implement logic to derive a
normalized 32kHz reference from these DCXO sources using fixed
pre-dividers. Additionally, provide several new DCXO gate clocks for
peripherals, including SerDes, HDMI, and UFS.
This was tested on a Raxda Cubie A7A.
Changes in v3:
- Disallow clock-output-names DT property for h616/r329 chips
- Fix ccu probe helper to properly unregister clocks on error
- Implement .determine_rate for ccu divider RO ops
- Drop unused DCXO_CTRL_REG_EN define
- Link to v2: https://patch.msgid.link/20260629-a733-rtc-v2-0-7b72112784f8@baylibre.com
Changes in v2:
* Changed DT bindings as suggested. Those have changed significantly
since v1 so I did not pick up Rob's review trailer
* Support added in the existing RTC CCU driver rather than a separate driver
* Added DT parsing clean up of the existing driver
* Xtal detection exposed by RO divider rather than a MUX.
* Dropped conversion to aux device for now. This is not strictly related
the a733 support and will submitted again later on.
* Link to v1: https://lore.kernel.org/r/20260121-a733-rtc-v1-0-d359437f23a7@pigmoral.tech
---
Jerome Brunet (7):
dt-bindings: rtc: sun6i: no clock-output-names on h616/r329
dt-bindings: rtc: sun6i: add sun60i-a733 support
clk: sunxi-ng: fix ccu probe clock unregister on error
clk: sunxi-ng: sun6i-rtc: clean up DT usage
clk: sunxi-ng: div: add read-only operation support
clk: sunxi-ng: sun6i-rtc: split main oscillator div and gate.
clk: sunxi-ng: sun6i-rtc: add a733 support
Junhui Liu (1):
clk: sunxi-ng: sun6i-rtc: Add feature bit for IOSC calibration
.../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 13 +++
drivers/clk/sunxi-ng/ccu-sun6i-rtc.c | 123 +++++++++++++++------
drivers/clk/sunxi-ng/ccu-sun6i-rtc.h | 3 +-
drivers/clk/sunxi-ng/ccu_common.c | 12 +-
drivers/clk/sunxi-ng/ccu_common.h | 1 +
drivers/clk/sunxi-ng/ccu_div.c | 42 +++++++
drivers/clk/sunxi-ng/ccu_div.h | 1 +
drivers/clk/sunxi-ng/ccu_mux.c | 3 +-
drivers/clk/sunxi-ng/ccu_mux.h | 4 +
include/dt-bindings/clock/sun6i-rtc.h | 4 +
10 files changed, 163 insertions(+), 43 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20251226-a733-rtc-c5167df14e6e
Best regards,
--
Jerome
Comments
Hi Jerome, I gave v3 a spin on a Radxa Cubie A7S here: it applied cleanly to my local A733 stack, the RTC probes as rtc0, hwclock set and read-back work, and the oscillator tree in clk_summary looks as expected. If there are specific checks that would save you time for this or a future revision, tell me what you would like exercised and I will report back. For transparency, the test harness is AI-assisted (Claude Code) and results are verified against the captured serial logs. Thanks, Enzo