| Message ID | 20260925225112.14081-3-andre.przywara@arm.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-26257-sunxi=pue.re@lists.linux.dev> 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 5B0A51C1C7C for <noreply@patchwork.local>; Sat, 26 Sep 2026 00:57:24 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=arm.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-26257-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-26257-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 141C2407E0 for <noreply@patchwork.local>; Fri, 25 Sep 2026 22:56:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E8CE509F04; Fri, 25 Sep 2026 22:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ch2MCgeR" X-Original-To: linux-sunxi@lists.linux.dev Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A4C8501F42 for <linux-sunxi@lists.linux.dev>; Fri, 25 Sep 2026 22:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790376975; cv=none; b=dR1/2agm5D+/I3jBzFYLcjw1T+JkBs2NfcPJpbHycsbvr1NuIdNPcvZ4p3BqwzWktaKdSd4d5NZVHaKVyTgfEH7DzjDwL0lIBIfXlR8p51+/K+kLwRliUFG7wK/CGudQH7GLlmIh5hKYa2tivDB136W1xaKufYFEuUzCBLhDfmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790376975; c=relaxed/simple; bh=3blP0nDMtGN6vIpTbQx5TZFpZ7wvhmdDuk7aLl94D6A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=faW4z6s+N6/N5/9LSbk24Q2DuhSO1hLoS3mKFaHuaS+LgYrRpCqqX5UyA8Q6S4VkbQ4tEdhEa/96KtXlZe6y7t17IULgYraeU420RWSDLjsnfj/1ajUg65XTPDz8zBehBqoZ8nXT6zhfk7hNdbnDISQG4hrRXL7oTfzLkn6S4qs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ch2MCgeR; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D055C169C; Fri, 25 Sep 2026 15:56:06 -0700 (PDT) Received: from ryzen.fritz.box (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 847D13F632; Fri, 25 Sep 2026 15:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1790376970; bh=3blP0nDMtGN6vIpTbQx5TZFpZ7wvhmdDuk7aLl94D6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ch2MCgeRNQuiON+68rcbbb1+lleArxnuaZiRb/vxJl69WhNsvrBnGE+afWZP6d3kr 9qlTxF4HXyAlE1Xfi8rwBIGbAT4phq4kPTy/oj4mLFMjpF1aRl061uZus9VuNiObNr B4LXW0zlGp+GmcFVxcBoJTW+nZCvvglCa2NTgctk= From: Andre Przywara <andre.przywara@arm.com> To: Stephen Boyd <sboyd@kernel.org>, Brian Masney <bmasney+clk@redhat.com>, Jerome Brunet <jbrunet+clk@baylibre.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> Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH v3 2/4] dt-bindings: clock: sun55i-a523-ccu: Add A523 CPU CCU clock controller Date: Sat, 26 Sep 2026 00:51:10 +0200 Message-ID: <20260925225112.14081-3-andre.przywara@arm.com> X-Mailer: git-send-email 2.46.4 In-Reply-To: <20260925225112.14081-1-andre.przywara@arm.com> References: <20260925225112.14081-1-andre.przywara@arm.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-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 |
arm64: allwinner: a523: Enable CPU clocks
|
|
Commit Message
Andre Przywara
Sept. 25, 2026, 10:51 p.m. UTC
There are four clock controllers in the A523 SoC, but only three are
described in the DT binding so far.
Add a description for the CPU CCU, which provides separate clocks for
the two CPU clusters and the DSU interconnect.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
.../clock/allwinner,sun55i-a523-ccu.yaml | 38 ++++++++++++++++++-
.../dt-bindings/clock/sun55i-a523-cpu-ccu.h | 13 +++++++
2 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 include/dt-bindings/clock/sun55i-a523-cpu-ccu.h
Comments
On Sat, Sep 26, 2026 at 12:51:10AM +0200, Andre Przywara wrote: > There are four clock controllers in the A523 SoC, but only three are > described in the DT binding so far. > > Add a description for the CPU CCU, which provides separate clocks for > the two CPU clusters and the DSU interconnect. > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > .../clock/allwinner,sun55i-a523-ccu.yaml | 38 ++++++++++++++++++- > .../dt-bindings/clock/sun55i-a523-cpu-ccu.h | 13 +++++++ > 2 files changed, 50 insertions(+), 1 deletion(-) > create mode 100644 include/dt-bindings/clock/sun55i-a523-cpu-ccu.h > > diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml > index 58be701a720ea..8d5481fb63ae8 100644 > --- a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml > +++ b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml > @@ -19,6 +19,7 @@ properties: > compatible: > enum: > - allwinner,sun55i-a523-ccu > + - allwinner,sun55i-a523-cpu-ccu > - allwinner,sun55i-a523-mcu-ccu > - allwinner,sun55i-a523-r-ccu > > @@ -35,12 +36,23 @@ properties: > > required: > - "#clock-cells" > - - "#reset-cells" > - compatible > - reg > - clocks > - clock-names > > +if: This goes to the allOf block. > + properties: > + compatible: > + contains: > + const: allwinner,sun55i-a523-cpu-ccu > +then: > + properties: > + "#reset-cells": false > +else: > + required: > + - "#reset-cells" > + > allOf: > - if: > properties: > @@ -64,6 +76,30 @@ allOf: > - const: iosc > - const: losc-fanout > > + - if: > + properties: > + compatible: > + enum: > + - allwinner,sun55i-a523-cpu-ccu > + > + then: > + properties: > + clocks: > + items: > + - description: High Frequency Oscillator (usually at 24MHz) > + - description: Low Frequency Oscillator (usually at 32kHz) > + - description: Internal Oscillator > + - description: Peripherals PLL 0 (1200 MHz output) > + - description: Peripherals PLL 0 (600 MHz output) > + > + clock-names: > + items: > + - const: hosc > + - const: losc > + - const: iosc > + - const: pll-periph0-2x > + - const: pll-periph0-600m > + > - if: > properties: > compatible: > diff --git a/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h > new file mode 100644 > index 0000000000000..042f2310f64de > --- /dev/null > +++ b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h Filename should match compatible. > @@ -0,0 +1,13 @@ > +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ > +/* > + * Copyright 2025 Arm Ltd. > + */ > + > +#ifndef _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ > +#define _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ > + > +#define CLK_CPU_L 7 Indices start from 0 or 1 Best regards, Krzysztof
On Tue, 29 Sep 2026 10:42:29 +0200 Krzysztof Kozlowski <krzk@kernel.org> wrote: Hi Krzysztof, thanks for the review! > On Sat, Sep 26, 2026 at 12:51:10AM +0200, Andre Przywara wrote: > > There are four clock controllers in the A523 SoC, but only three are > > described in the DT binding so far. > > > > Add a description for the CPU CCU, which provides separate clocks for > > the two CPU clusters and the DSU interconnect. > > > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > --- > > .../clock/allwinner,sun55i-a523-ccu.yaml | 38 ++++++++++++++++++- > > .../dt-bindings/clock/sun55i-a523-cpu-ccu.h | 13 +++++++ > > 2 files changed, 50 insertions(+), 1 deletion(-) > > create mode 100644 include/dt-bindings/clock/sun55i-a523-cpu-ccu.h > > > > diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml > > index 58be701a720ea..8d5481fb63ae8 100644 > > --- a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml > > +++ b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml > > @@ -19,6 +19,7 @@ properties: > > compatible: > > enum: > > - allwinner,sun55i-a523-ccu > > + - allwinner,sun55i-a523-cpu-ccu > > - allwinner,sun55i-a523-mcu-ccu > > - allwinner,sun55i-a523-r-ccu > > > > @@ -35,12 +36,23 @@ properties: > > > > required: > > - "#clock-cells" > > - - "#reset-cells" > > - compatible > > - reg > > - clocks > > - clock-names > > > > +if: > > This goes to the allOf block. OK. > > + properties: > > + compatible: > > + contains: > > + const: allwinner,sun55i-a523-cpu-ccu > > +then: > > + properties: > > + "#reset-cells": false > > +else: > > + required: > > + - "#reset-cells" > > + > > allOf: > > - if: > > properties: > > @@ -64,6 +76,30 @@ allOf: > > - const: iosc > > - const: losc-fanout > > > > + - if: > > + properties: > > + compatible: > > + enum: > > + - allwinner,sun55i-a523-cpu-ccu > > + > > + then: > > + properties: > > + clocks: > > + items: > > + - description: High Frequency Oscillator (usually at 24MHz) > > + - description: Low Frequency Oscillator (usually at 32kHz) > > + - description: Internal Oscillator > > + - description: Peripherals PLL 0 (1200 MHz output) > > + - description: Peripherals PLL 0 (600 MHz output) > > + > > + clock-names: > > + items: > > + - const: hosc > > + - const: losc > > + - const: iosc > > + - const: pll-periph0-2x > > + - const: pll-periph0-600m > > + > > - if: > > properties: > > compatible: > > diff --git a/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h > > new file mode 100644 > > index 0000000000000..042f2310f64de > > --- /dev/null > > +++ b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h > > Filename should match compatible. Is that a new requirement? We never did this for the Allwinner clock or reset bindings, all headers are named like sun<x>i-<soc>-<name>-ccu.h. And I think especially since we have sun55i-a523-mcu-ccu.h and sun55i-a523-r-ccu.h, I think we should stay consistent, at least for the existing SoCs. > > @@ -0,0 +1,13 @@ > > +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ > > +/* > > + * Copyright 2025 Arm Ltd. > > + */ > > + > > +#ifndef _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ > > +#define _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ > > + > > +#define CLK_CPU_L 7 > > Indices start from 0 or 1 This is also something very common for Allwinner clocks: the CCU has clocks that are not exposed to the DT, because they are internal clocks we need to model the clock tree. We number them logically, and often the basic clocks are not exposed. See sun50i-a64-ccu.h, sun50i-h616-ccu.h, sun8i-h3-ccu.h, to just name a few (there are many more). The other clocks are named in the internal headers, in the clock driver directory. Cheers, Andre > > Best regards, > Krzysztof > >
On 05/10/2026 00:50, Andre Przywara wrote: > On Tue, 29 Sep 2026 10:42:29 +0200 > Krzysztof Kozlowski <krzk@kernel.org> wrote: > > Hi Krzysztof, > > thanks for the review! > >> On Sat, Sep 26, 2026 at 12:51:10AM +0200, Andre Przywara wrote: >>> There are four clock controllers in the A523 SoC, but only three are >>> described in the DT binding so far. >>> >>> Add a description for the CPU CCU, which provides separate clocks for >>> the two CPU clusters and the DSU interconnect. >>> >>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> >>> --- >>> .../clock/allwinner,sun55i-a523-ccu.yaml | 38 ++++++++++++++++++- >>> .../dt-bindings/clock/sun55i-a523-cpu-ccu.h | 13 +++++++ >>> 2 files changed, 50 insertions(+), 1 deletion(-) >>> create mode 100644 include/dt-bindings/clock/sun55i-a523-cpu-ccu.h >>> >>> diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml >>> index 58be701a720ea..8d5481fb63ae8 100644 >>> --- a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml >>> +++ b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml >>> @@ -19,6 +19,7 @@ properties: >>> compatible: >>> enum: >>> - allwinner,sun55i-a523-ccu >>> + - allwinner,sun55i-a523-cpu-ccu >>> - allwinner,sun55i-a523-mcu-ccu >>> - allwinner,sun55i-a523-r-ccu >>> >>> @@ -35,12 +36,23 @@ properties: >>> >>> required: >>> - "#clock-cells" >>> - - "#reset-cells" >>> - compatible >>> - reg >>> - clocks >>> - clock-names >>> >>> +if: >> >> This goes to the allOf block. > > OK. > >>> + properties: >>> + compatible: >>> + contains: >>> + const: allwinner,sun55i-a523-cpu-ccu >>> +then: >>> + properties: >>> + "#reset-cells": false >>> +else: >>> + required: >>> + - "#reset-cells" >>> + >>> allOf: >>> - if: >>> properties: >>> @@ -64,6 +76,30 @@ allOf: >>> - const: iosc >>> - const: losc-fanout >>> >>> + - if: >>> + properties: >>> + compatible: >>> + enum: >>> + - allwinner,sun55i-a523-cpu-ccu >>> + >>> + then: >>> + properties: >>> + clocks: >>> + items: >>> + - description: High Frequency Oscillator (usually at 24MHz) >>> + - description: Low Frequency Oscillator (usually at 32kHz) >>> + - description: Internal Oscillator >>> + - description: Peripherals PLL 0 (1200 MHz output) >>> + - description: Peripherals PLL 0 (600 MHz output) >>> + >>> + clock-names: >>> + items: >>> + - const: hosc >>> + - const: losc >>> + - const: iosc >>> + - const: pll-periph0-2x >>> + - const: pll-periph0-600m >>> + >>> - if: >>> properties: >>> compatible: >>> diff --git a/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h >>> new file mode 100644 >>> index 0000000000000..042f2310f64de >>> --- /dev/null >>> +++ b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h >> >> Filename should match compatible. > > Is that a new requirement? We never did this for the Allwinner clock or > reset bindings, all headers are named like sun<x>i-<soc>-<name>-ccu.h. I say EXACTLY the same thing for ~4 years, so yes. New requirement since 4 years. Allwinner for sure received same feedback already. > And I think especially since we have sun55i-a523-mcu-ccu.h and > sun55i-a523-r-ccu.h, I think we should stay consistent, at least for > the existing SoCs. > >>> @@ -0,0 +1,13 @@ >>> +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ >>> +/* >>> + * Copyright 2025 Arm Ltd. >>> + */ >>> + >>> +#ifndef _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ >>> +#define _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ >>> + >>> +#define CLK_CPU_L 7 >> >> Indices start from 0 or 1 > > This is also something very common for Allwinner clocks: the CCU has > clocks that are not exposed to the DT, because they are internal > clocks we need to model the clock tree. We number them logically, They are not ABI thus do not create impression they should be and you prepare some placeholder for them. These are not IDs of your clocks in the hardware. This is only the ABI. Again, same feedback I repeat for 4 years. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml index 58be701a720ea..8d5481fb63ae8 100644 --- a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml +++ b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml @@ -19,6 +19,7 @@ properties: compatible: enum: - allwinner,sun55i-a523-ccu + - allwinner,sun55i-a523-cpu-ccu - allwinner,sun55i-a523-mcu-ccu - allwinner,sun55i-a523-r-ccu @@ -35,12 +36,23 @@ properties: required: - "#clock-cells" - - "#reset-cells" - compatible - reg - clocks - clock-names +if: + properties: + compatible: + contains: + const: allwinner,sun55i-a523-cpu-ccu +then: + properties: + "#reset-cells": false +else: + required: + - "#reset-cells" + allOf: - if: properties: @@ -64,6 +76,30 @@ allOf: - const: iosc - const: losc-fanout + - if: + properties: + compatible: + enum: + - allwinner,sun55i-a523-cpu-ccu + + then: + properties: + clocks: + items: + - description: High Frequency Oscillator (usually at 24MHz) + - description: Low Frequency Oscillator (usually at 32kHz) + - description: Internal Oscillator + - description: Peripherals PLL 0 (1200 MHz output) + - description: Peripherals PLL 0 (600 MHz output) + + clock-names: + items: + - const: hosc + - const: losc + - const: iosc + - const: pll-periph0-2x + - const: pll-periph0-600m + - if: properties: compatible: diff --git a/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h new file mode 100644 index 0000000000000..042f2310f64de --- /dev/null +++ b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright 2025 Arm Ltd. + */ + +#ifndef _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ +#define _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ + +#define CLK_CPU_L 7 +#define CLK_CPU_DSU 8 +#define CLK_CPU_B 9 + +#endif /* _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_ */