| Message ID | 20250105181525.1370822-5-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBTEY5O5QMGQELHRAPAQ@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com
[209.85.218.71])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B1D393F1CD
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 5 Jan 2025 19:15:41 +0100 (CET)
Received: by mail-ej1-f71.google.com with SMTP id
a640c23a62f3a-aa6704ffcaesf352246066b.2
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 05 Jan 2025 10:15:41 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1736100941; cv=pass;
d=google.com; s=arc-20240605;
b=GQ9PVl2qhSWgINIqHKtQHyM3p390addzfA3JkY5XKOF7YfLLwBWKjM3A7VFUEgErrn
as2jBoW7LpL6ma5qiRNdcKydWlsHORohLvbyBNFpNHispXafJl7k6/gAHD9dj21eJTEs
68u9zMOhYtbFVL0VgQweMy9itcZuLIS7HzFn+huWy1zOnWVQcM/OtFM53sxPurSNpHhY
a25NNv6PstgxO7B62Uy+BedUc2xtkAcZRSqVWVSyYpoLRptoZ/guhGCRFcsLTcwl10RH
BE6RYZpIKYoNaEQaGbdn77t06ZJxCqkxZ5uO6Y+y7MgmkfEN3VSpu5j5E8X+e9gGpxGw
hJog==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=yIXnmtF5+xzRgLIucQKfKr4od7wc835UwbRYDiUCH5o=;
fh=QalqAcKvy1zXfZAYCS3kvTUGgr1fPOEuU2wq5dkvPnw=;
b=JZWNzbJHwuJJMqUOBN0Kv06NzlOc3VxPGKdnDcEotGDgJz6NNPZMTK04RFJ8RJ0tKM
UudG9tr489Su2Eh2w08H4EJZmy5w94fQW8KLz3UPaW8UIDkuOIqAO8QV9fRXRo1BaLMy
hPnzC6yt8pBMadmb5DiQhIhDb0xZWsaJp5X0CQBUEYgbmIRk0s0Aww2JERZ1/wr3V/2Z
bU48Mnbc2v2N92Xhi4C8KOFWnlwbVR+QqfV+35hYDBcq5TMfOovFb5dEZnvGPwWm5NiC
68l32Qz5F48tWTUj2OSdQBuPqjveNwRgowcH1dYLazC1MVeLfqjdK9FcyhJIRoY6Rwja
xA5g==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=YytcGPe4;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1736100941; x=1736705741;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:references:in-reply-to:message-id
:date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=yIXnmtF5+xzRgLIucQKfKr4od7wc835UwbRYDiUCH5o=;
b=miVvsGjnySw5vxAPmFZGZLRjsmnQoJHSv4laYufBCOdmWis+Xw+HeG1l+kdkqwGLZF
rh0NO3DDQtYFJfkX63a5wsck6WTKgPDWyUhOU/ek8gOoKdRS5mT1GrYMTRdq1ecU5lEx
8/tWfrVr9S0RiAhVrSSyd1fvxSOwvyr0cebXc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1736100941; x=1736705741;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:references:in-reply-to:message-id:date:subject:cc:to:from
:x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=yIXnmtF5+xzRgLIucQKfKr4od7wc835UwbRYDiUCH5o=;
b=ZGxMXY/sZCChcJ29j4oOI71tMZA5qz7/1LRSAbDbsxreHZTOiDD0lRDnRIBYo09yCo
cnJCKVs0NDI3lhTmelI/UhMZxX10Hl2FeZVUUjUwE3+eK3R9BhEfAJHejZxXD8ChC+az
rG93vQX4emF+N7FlB0v1vNEC+XFLdQQZ0tGbPmseSpqo5U1pOp+6xrK99D9nUVxjTM4s
m1GdXVGsY02YPmjeKEhz0ZdRx+UzXQsKYluxjwcn5c+POPS6/cTZWkMLoyxEPl0n5vPb
KyQ+FF3Yn93GD9Sxw/YhUCC7jtY7KrruAD7Oo4+wPp787nWxvQsVRTjDV2h74J9/zF2W
j3pw==
X-Forwarded-Encrypted: i=2;
AJvYcCXXwCFg0lot/xEXCpL5llK72259MWkXtc/oXDj634/JAokw9VPRCq7JxEBi82MsZpRQNQDs4c+AQ59zaMBV@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0Yzv2frze3HNDUhrkLgQOe2izJ1N9xoMK5azVyahUxXJrYeOX96x
lDxx42CzOms8xjeHdZfjL3QZuD6z+bFYctUKEm3qkoy/KM+e6LuLqK+7reavRQu4tg==
X-Google-Smtp-Source:
AGHT+IE3a+R3ge0V4u8Qd4hpenOg4x5QpL4K7iZk6M0hGu9Hmk9S3p7z/Kf3traRQIZpBJFpUvf1Mw==
X-Received: by 2002:a50:cb8d:0:b0:5d9:ad1:db25 with SMTP id
4fb4d7f45d1cf-5d90ad1dbaamr10036587a12.28.1736100941281;
Sun, 05 Jan 2025 10:15:41 -0800 (PST)
X-BeenThere: linux-amarula@amarulasolutions.com
Received: by 2002:a50:8e4f:0:b0:5d3:e99c:a4c9 with SMTP id
4fb4d7f45d1cf-5d91daa5790ls839994a12.1.-pod-prod-06-eu;
Sun, 05 Jan 2025 10:15:39 -0800 (PST)
X-Received: by 2002:a05:6402:3204:b0:5d0:c801:560 with SMTP id
4fb4d7f45d1cf-5d81ddb3aacmr53734551a12.20.1736100939346;
Sun, 05 Jan 2025 10:15:39 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1736100939; cv=none;
d=google.com; s=arc-20240605;
b=GplQitT4rfBAg9o2G67bXkjVpmRp+7fzx211H8FY5BmX0C+VHrGM/SqXyWcIdrs6XN
xtVboYrEtq9oWA8w7uYM62JS2qjl1+S0zqbJUibqJSR22DJJZ7YL5ksx2IgS9BOpw2cU
bXpuaWJBmVhKIpM0hKhS/+a5jV3t9PJozZlw8zNsqdWCtIBr8bGXC0BPge76plr+mrx0
REaNTWHqcYr6W2hOVO04rgMAacmod6caCE01DsTvfC3hkMu/v5gsq9F3KGoGIOKNbkNV
ctO0E2HT+ppU0+Hwc8R0MK9VDvJJNz6QkwSxmlI7JwaJgxf1HVdJlobVgzb4EnHY/hQG
3yfQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=DBSWyldngVnQclvBLd3GqHALlVJ1Kxh3yvgFvrg0xjA=;
fh=eH+0Y7Diz6V5mR4yjTADWqq/BPeQ1lWG3GpSj4kCN9U=;
b=FNnJXpAB6EVdHD2r/h4Hm/2ylhodU5KXMqXVf/zvhKvRv2mha4WA36jlQ5tH5RhYj2
pFMDwtoYzWnb80X7wuHUdnWyMdQ0+h3rMFKazvBhfQ8pIruEXJ5logsa4o8L30t8oMjc
nu6Z7r9sGGz9VfBDb3LLhEOkpJ25HXHoB7JtfQFbp+QCmpSJgTwu0gIlyc1apNtvprC+
JcsvsAkCu+LjZ6MLo5YnRzK6dRq18sCJtXzcn8IByBqsZiNY/MU6n9tVfStyJSckYFvi
TZGknU7Pg82QabDWq9wA6bE+6tw1U9hJowKUXlj8YlbtAe92XrtbCdM5yIMMfO78Wy7F
jILw==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=YytcGPe4;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
a640c23a62f3a-aac0e7e9c32sor1111529666b.1.2025.01.05.10.15.39
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Sun, 05 Jan 2025 10:15:39 -0800 (PST)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Gm-Gg: ASbGncvYQNV3kyMb0qqmcbvkJysxw1qGnpbUIT9Kq5yw2V59oUzCCdsbRbICf1jIy9z
b4PCTMapXzi/swK0B86H4ExeTj7StOOlNyTRU/etCMlxuap8ygV14sXpd+rUI45uF6HSS9jRXUJ
Ny0b/qUfBWB/rcQLN2E7fh5BnPuM5p4tYP7UoKGBVGMewu3/+Ez5Eqnv3PBdhZr5W2cB/5ibff0
kVMH7LD4LCUAPZ6lNkuH5xG4QQ12K/CfXxb82vCwZi3bFp1Wf4M2Esa/dJBA+MfeiLxK5dJrYym
WaIzR35zxNa0gPkeEGRjMFz03xp6KWETLZOW/rAGmaC4PDwGKVsV5m8blR2gsT63eXEpftbqReY
+F/8iYiGbK8DVaOD3QQ==
X-Received: by 2002:a17:907:3e90:b0:aa6:abb2:be12 with SMTP id
a640c23a62f3a-aac3354ff4dmr3925314866b.37.1736100938804;
Sun, 05 Jan 2025 10:15:38 -0800 (PST)
Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it
(host-79-41-6-15.retail.telecomitalia.it. [79.41.6.15])
by smtp.gmail.com with ESMTPSA id
a640c23a62f3a-aac0e82f178sm2138185066b.38.2025.01.05.10.15.37
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 05 Jan 2025 10:15:38 -0800 (PST)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: linux-amarula@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Rob Herring <robh@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-clk@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: [PATCH 4/6] dt-bindings: clock: st,stm32-rcc: support spread spectrum
clocking
Date: Sun, 5 Jan 2025 19:14:16 +0100
Message-ID: <20250105181525.1370822-5-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com>
References: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com>
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b=YytcGPe4;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
Support spread spectrum clocking for stm32f{4,7} platforms
|
|
Commit Message
Dario Binacchi
Jan. 5, 2025, 6:14 p.m. UTC
The addition of DT bindings for enabling and tuning spread spectrum
clocking generation is available only for the main PLL.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
.../bindings/clock/st,stm32-rcc.yaml | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
Comments
On Sun, Jan 05, 2025 at 07:14:16PM +0100, Dario Binacchi wrote: > The addition of DT bindings for enabling and tuning spread spectrum > clocking generation is available only for the main PLL. > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > --- > > .../bindings/clock/st,stm32-rcc.yaml | 27 +++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml > index ae9e5b26d876..c345d3ff3fc4 100644 > --- a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml > +++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml > @@ -77,6 +77,26 @@ properties: > Phandle to system configuration controller. It can be used to control the > power domain circuitry. > > + st,ssc-modfreq-hz: > + description: > + The modulation frequency for main PLL (in Hz) No constraints? > + > + st,ssc-moddepth-permyriad: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + The modulation rate for main PLL (in permyriad, i.e. 0.01%) > + minimum: 25 > + maximum: 200 > + > + st,ssc-modmethod: > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > + description: > + The modulation techniques for main PLL. > + items: > + enum: > + - center-spread > + - down-spread What's the default? If there's only 2 possibilities, then you can use a boolean instead. Though I assume you want to support spread-spectrum disabled. Are there dependencies between these properties? > + > required: > - compatible > - reg > @@ -97,6 +117,10 @@ allOf: > const: 1 > description: | > The clock index for the specified type. > + st,ssc-modfreq-hz: false > + st,ssc-moddepth-permyriad: false > + st,ssc-modmethod: false > + > else: > properties: > '#clock-cells': > @@ -118,6 +142,9 @@ examples: > reg = <0x40023800 0x400>; > clocks = <&clk_hse>, <&clk_i2s_ckin>; > st,syscfg = <&pwrcfg>; > + st,ssc-modfreq-hz = <10000>; > + st,ssc-moddepth-permyriad = <200>; > + st,ssc-modmethod = "center-spread"; > }; > > - | > -- > 2.43.0 > To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
Hello Rob, On Thu, Jan 9, 2025 at 12:48 AM Rob Herring <robh@kernel.org> wrote: > > On Sun, Jan 05, 2025 at 07:14:16PM +0100, Dario Binacchi wrote: > > The addition of DT bindings for enabling and tuning spread spectrum > > clocking generation is available only for the main PLL. > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > --- > > > > .../bindings/clock/st,stm32-rcc.yaml | 27 +++++++++++++++++++ > > 1 file changed, 27 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml > > index ae9e5b26d876..c345d3ff3fc4 100644 > > --- a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml > > +++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml > > @@ -77,6 +77,26 @@ properties: > > Phandle to system configuration controller. It can be used to control the > > power domain circuitry. > > > > + st,ssc-modfreq-hz: > > + description: > > + The modulation frequency for main PLL (in Hz) > > No constraints? They vary depending on the HSE clock frequency used. > > > + > > + st,ssc-moddepth-permyriad: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + The modulation rate for main PLL (in permyriad, i.e. 0.01%) > > + minimum: 25 > > + maximum: 200 > > + > > + st,ssc-modmethod: > > + $ref: /schemas/types.yaml#/definitions/non-unique-string-array > > + description: > > + The modulation techniques for main PLL. > > + items: > > + enum: > > + - center-spread > > + - down-spread > > What's the default? If there's only 2 possibilities, then you can use a > boolean instead. Though I assume you want to support spread-spectrum > disabled. Generally, there can also be more than two options. For example, in the case of the imx8m platform, there are three possibilities: - down-spread - center-spread - up-spread In our case, using a boolean would hide one of the two pieces of information, meaning that if I'm not using center-spread, what am I using? IMHO, I would keep the string type, changing it from on-unique-string-array to string. > > Are there dependencies between these properties? The values moddepth and modfreq are used to calculate, according to specific relationships, two values MODPER and INCSTEP, which are bit fields of a suitable register for managing the SSCG. There is a constraint between these two values, namely that MODPER * INCSTEP < 32768. This constraint will be managed at the driver level. Thanks and regards, Dario > > > + > > required: > > - compatible > > - reg > > @@ -97,6 +117,10 @@ allOf: > > const: 1 > > description: | > > The clock index for the specified type. > > + st,ssc-modfreq-hz: false > > + st,ssc-moddepth-permyriad: false > > + st,ssc-modmethod: false > > + > > else: > > properties: > > '#clock-cells': > > @@ -118,6 +142,9 @@ examples: > > reg = <0x40023800 0x400>; > > clocks = <&clk_hse>, <&clk_i2s_ckin>; > > st,syscfg = <&pwrcfg>; > > + st,ssc-modfreq-hz = <10000>; > > + st,ssc-moddepth-permyriad = <200>; > > + st,ssc-modmethod = "center-spread"; > > }; > > > > - | > > -- > > 2.43.0 > >
diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml index ae9e5b26d876..c345d3ff3fc4 100644 --- a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml +++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml @@ -77,6 +77,26 @@ properties: Phandle to system configuration controller. It can be used to control the power domain circuitry. + st,ssc-modfreq-hz: + description: + The modulation frequency for main PLL (in Hz) + + st,ssc-moddepth-permyriad: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The modulation rate for main PLL (in permyriad, i.e. 0.01%) + minimum: 25 + maximum: 200 + + st,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + The modulation techniques for main PLL. + items: + enum: + - center-spread + - down-spread + required: - compatible - reg @@ -97,6 +117,10 @@ allOf: const: 1 description: | The clock index for the specified type. + st,ssc-modfreq-hz: false + st,ssc-moddepth-permyriad: false + st,ssc-modmethod: false + else: properties: '#clock-cells': @@ -118,6 +142,9 @@ examples: reg = <0x40023800 0x400>; clocks = <&clk_hse>, <&clk_i2s_ckin>; st,syscfg = <&pwrcfg>; + st,ssc-modfreq-hz = <10000>; + st,ssc-moddepth-permyriad = <200>; + st,ssc-modmethod = "center-spread"; }; - |