From: Conor Dooley <conor@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Michael Hennerich <Michael.Hennerich@analog.com>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
linux@analog.com
Subject: Re: [PATCH 12/16] dt-bindings: iio: frequency: Add AD9523-1
Date: Wed, 2 Dec 2026 18:17:51 +0000 [thread overview]
Message-ID: <20261202-hardwired-cabdriver-797a7d18a61b@spud> (raw)
In-Reply-To: <aw_wbiQ2qDMBuqHx@nsa>
[-- Attachment #1: Type: text/plain, Size: 2842 bytes --]
On Wed, Dec 02, 2026 at 11:29:57AM +0000, Nuno Sá wrote:
> >
> > > + adi,pll2-m1-frequency-hz:
> > > + description:
> > > + Output frequency of the VCO divider M1, which feeds all output channels.
> > > + M1 divides the VCO frequency (2940 MHz to 3100 MHz) by 3, 4 or 5, so the
> > > + valid ranges are 588 MHz to 620 MHz, 735 MHz to 775 MHz and 980 MHz to
> > > + 1033.33 MHz. It sets the frequencies the outputs can provide and,
> > > + together with the PFD frequency, the PLL2 feedback divider the loop
> > > + filter is designed for.
> > > + minimum: 588000000
> > > + maximum: 1033333333
> > > +
> > > + adi,pll2-m2-frequency-hz:
> > > + description:
> > > + Output frequency of the VCO divider M2, which can feed output channels 4
> > > + to 9. The VCO frequency divided by this value must be 3, 4 or 5. If not
> > > + present, the M2 divider is powered down.
> > > + minimum: 588000000
> > > + maximum: 1033333333
> >
> > I note that these properties are exceptional in that they don't have a
> > comment noting that they depend on hardware characteristics of the
> > board.
> > Why are these not computable?
>
> So the above is a bit like (a bit more complex though:
>
> https://elixir.bootlin.com/linux/v7.4-rc2/source/Documentation/devicetree/bindings/clock/fsl,plldig.yaml#L30
>
> M1 and M2 are the VCO output dividers, and the M1 frequency is what fixes
> the VCO frequency. Changing the VCO requires recalibrating it, and both
> the VCO and the M dividers are shared by all outputs, so they can only be
> set at startup. Every output is then M1 (or M2) divided by an integer, so
> these properties define which output frequencies the board can provide,
> depending on whatever is consuming these clocks. Depending on M, that's
> one of three frequency ranges.
>
> Basically, the internal dividers are fixed and not exposed, so the
> frequency plan has to come from somewhere else. On SoCs it often comes
> from u-boot (and linux just dumps in the clk_summary), which is not the case
> here.
>
> I know we could model pll2-m1 and pll2-m2 (and maybe the VCO) as clocks,
> but I'm not sure that would make things simpler: we would need
> assigned-clock-rates to fix these dividers at startup, and there's still
> the IIO case, where the device is not a clock provider.
>
> Anyways, I agree these properties are a bit on the limit of what makes
> sense for DT, but I believe there's still a case (and precedent, which
> does not make it right of course) for them.
I find the problem here isn't so much the property itself, it's the lack
of a comment noting what it depends on or why it should be used. You've
provided a lot of that info here in this mail that I think needs to move
into the binding.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-12-02 18:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 17:36 [PATCH 00/16] iio: frequency: ad9523: add firmware support Nuno Sá
2026-11-30 17:36 ` [PATCH 01/16] iio: frequency: ad9523: fix out of bounds access of vco_out_map Nuno Sá
2026-11-30 17:37 ` [PATCH 02/16] iio: frequency: ad9523: don't select a powered down M2 divider Nuno Sá
2026-11-30 17:37 ` [PATCH 03/16] iio: frequency: ad9523: fix the M2 divider selection Nuno Sá
2026-12-03 12:16 ` Andy Shevchenko
2026-11-30 17:37 ` [PATCH 04/16] iio: frequency: ad9523: fix GPIO polarity handling Nuno Sá
2026-11-30 17:44 ` sashiko-bot
2026-11-30 17:37 ` [PATCH 05/16] iio: frequency: ad9523: factor out the channel divider calculation Nuno Sá
2026-12-03 12:18 ` Andy Shevchenko
2026-11-30 17:37 ` [PATCH 06/16] MAINTAINERS: add an entry for the AD9523 driver Nuno Sá
2026-11-30 17:37 ` [PATCH 07/16] iio: frequency: ad9523: move the platform data into the driver Nuno Sá
2026-12-03 12:19 ` Andy Shevchenko
2026-11-30 17:37 ` [PATCH 08/16] iio: frequency: ad9523: rename the platform data to config Nuno Sá
2026-12-03 12:20 ` Andy Shevchenko
2026-11-30 17:37 ` [PATCH 09/16] iio: frequency: ad9523: always bypass PLL1 Nuno Sá
2026-12-03 12:21 ` Andy Shevchenko
2026-11-30 17:37 ` [PATCH 10/16] iio: frequency: ad9523: drop unused channel options Nuno Sá
2026-11-30 17:37 ` [PATCH 11/16] iio: frequency: ad9523: use read_label() for channel names Nuno Sá
2026-11-30 17:37 ` [PATCH 12/16] dt-bindings: iio: frequency: Add AD9523-1 Nuno Sá
2026-11-30 18:50 ` Conor Dooley
2026-12-02 11:29 ` Nuno Sá
2026-12-02 18:17 ` Conor Dooley [this message]
2026-12-03 9:37 ` Nuno Sá
2026-11-30 17:37 ` [PATCH 13/16] iio: frequency: ad9523: add firmware support and drop platform data Nuno Sá
2026-11-30 17:37 ` [PATCH 14/16] iio: frequency: ad9523: sync the dividers at the end of probe Nuno Sá
2026-11-30 17:54 ` sashiko-bot
2026-11-30 17:37 ` [PATCH 15/16] iio: frequency: ad9523: split the clock source selection Nuno Sá
2026-11-30 17:37 ` [PATCH 16/16] iio: frequency: ad9523: add clock provider support Nuno Sá
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202-hardwired-cabdriver-797a7d18a61b@spud \
--to=conor@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.