Re: [PATCH 12/16] dt-bindings: iio: frequency: Add AD9523-1
From: Nuno Sá
Date: Thu Dec 03 2026 - 04:37:37 EST
On Wed, Dec 02, 2026 at 06:17:51PM +0000, Conor Dooley wrote:
> 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.
Alright! Fair enough
- Nuno Sá