All of lore.kernel.org
 help / color / mirror / Atom feed
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: Mon, 30 Nov 2026 18:50:55 +0000	[thread overview]
Message-ID: <20261130-vindicate-sitter-469f8822d728@spud> (raw)
In-Reply-To: <20261130-iio-ad9523-fw-v1-12-9aee15b7a7a2@analog.com>

[-- Attachment #1: Type: text/plain, Size: 11590 bytes --]

On Mon, Nov 30, 2026 at 05:37:10PM +0000, Nuno Sá wrote:
> Document the Analog Devices AD9523-1 jitter cleaner and clock generator.
> 
> Only single loop operation is described for now, with PLL1 bypassed and
> the VCXO on OSC_IN directly feeding PLL2. This is how the known boards
> use it. REFA/REFB and the PLL1 properties can be added later without
> breaking anything, as a missing reference clock keeps meaning that PLL1
> is bypassed.
> 
> The PLL2 frequency plan is described by the M1 (and optionally M2)
> output frequency, which also sets the VCO frequency. Like for other
> PLLs, the reference divider and doubler can be given as they affect the
> PFD frequency, and with it the loop filter design. The charge pump
> current and the loop filter components are given in physical units.
> 
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
>  .../bindings/iio/frequency/adi,ad9523-1.yaml       | 289 +++++++++++++++++++++
>  MAINTAINERS                                        |   1 +
>  2 files changed, 290 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/frequency/adi,ad9523-1.yaml b/Documentation/devicetree/bindings/iio/frequency/adi,ad9523-1.yaml
> new file mode 100644
> index 000000000000..e0f328866859
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/frequency/adi,ad9523-1.yaml
> @@ -0,0 +1,289 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/frequency/adi,ad9523-1.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices AD9523-1 low jitter clock generator
> +
> +maintainers:
> +  - Michael Hennerich <michael.hennerich@analog.com>
> +  - Nuno Sá <nuno.sa@analog.com>
> +
> +description:
> +  Jitter cleaner and clock generator with 14 differential (or up to 29 LVCMOS)
> +  outputs. It has two cascaded PLLs. PLL1 cleans up a reference on REFA/REFB
> +  using an external VCXO on OSC_IN, and PLL2 multiplies the OSC_IN clock up to
> +  the VCO frequency. The VCO output goes through the M1 and M2 dividers to the
> +  output channels, each with its own divider.
> +
> +  Only single loop operation is described for now, with PLL1 bypassed and the
> +  VCXO on OSC_IN directly feeding PLL2.
> +
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/AD9523-1.pdf
> +
> +properties:
> +  compatible:
> +    const: adi,ad9523-1
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    maximum: 25000000
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +  clocks:
> +    items:
> +      - description: VCXO connected to OSC_IN.
> +
> +  clock-names:
> +    items:
> +      - const: oscin
> +
> +  "#clock-cells":
> +    const: 1
> +
> +  clock-output-names:
> +    minItems: 1
> +    maxItems: 14
> +
> +  vdd3-pll-supply:
> +    description: 3.3 V supply for PLL1 and PLL2 (VDD3_PLL).
> +
> +  vdd3-vco-supply:
> +    description: 3.3 V supply for the VCO and VCO divider M1 (VDD3_VCO).
> +
> +  vdd3-ref-supply:
> +    description:
> +      3.3 V supply for the output drivers reference and VCO divider M2
> +      (VDD3_REF).
> +
> +  vdd3-out-supply:
> +    description: 3.3 V supply for the output drivers (VDD3_OUT[x:y]).
> +
> +  vdd18-out-supply:
> +    description: 1.8 V supply for the output dividers (VDD1.8_OUT[x:y]).
> +
> +  powerdown-gpios:
> +    description: GPIO connected to the active low PD pin.
> +    maxItems: 1
> +
> +  reset-gpios:
> +    description: GPIO connected to the active low RESET pin.
> +    maxItems: 1
> +
> +  sync-gpios:
> +    description: GPIO connected to the active low SYNC pin.
> +    maxItems: 1
> +
> +  adi,oscin-mode:
> +    description:
> +      How the OSC_IN receiver is used. In single-ended mode, either the
> +      positive (OSC_IN) or the negative (OSC_IN complement) pin is used.
> +    enum: [single-ended-positive, single-ended-negative, differential]
> +    default: single-ended-positive
> +
> +  adi,pll2-charge-pump-current-nanoamp:
> +    description:
> +      PLL2 charge pump current, in steps of 3.5 uA. This value depends on the
> +      PLL2 loop filter design.
> +    minimum: 3500
> +    maximum: 892500
> +

> +  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?

Cheers,
Conor.

> +
> +  adi,pll2-reference-div-factor:
> +    description:
> +      PLL2 reference divider (R2). Together with the reference doubler, it
> +      sets the PLL2 PFD frequency, which must not exceed 259 MHz. The VCO
> +      frequency must be an integer multiple N of the PFD frequency, where the
> +      feedback divider supports N = 12, 16 to 17, 20 to 22, 24 to 26 and 28 to
> +      255. As it affects the PFD frequency, this value depends on the PLL2
> +      loop filter design.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 1
> +    maximum: 31
> +    default: 1
> +
> +  adi,pll2-reference-doubler-enable:
> +    description:
> +      Enable the frequency doubler at the PLL2 input. As it affects the PFD
> +      frequency, this value depends on the PLL2 loop filter design.
> +    type: boolean
> +
> +  adi,pll2-loop-filter-rzero-ohms:
> +    description:
> +      Internal PLL2 loop filter zero resistor (RZERO). The PLL2 loop filter is
> +      made of these internal components and an external capacitor on the
> +      board, and together with the charge pump current they set the loop
> +      bandwidth and phase margin. So their values come from the loop filter
> +      design of the board. 0 bypasses the internal resistor, which requires an
> +      external series zero resistor.
> +    enum: [0, 1850, 2000, 2100, 2250, 2500, 2750, 3000, 3250]
> +    default: 3250
> +
> +  adi,pll2-loop-filter-rpole2-ohms:
> +    description:
> +      Internal PLL2 loop filter pole 2 resistor (RPOLE2). Like the other loop
> +      filter components, its value depends on the loop filter design.
> +    enum: [225, 300, 450, 900]
> +    default: 900
> +
> +  adi,pll2-loop-filter-cpole1-picofarads:
> +    description:
> +      Internal PLL2 loop filter pole 1 capacitor (CPOLE1). Like the other loop
> +      filter components, its value depends on the loop filter design.
> +    enum: [0, 8, 16, 24, 32, 40, 48]
> +    default: 0
> +
> +patternProperties:
> +  "^channel@([0-9]|1[0-3])$":
> +    type: object
> +    description: Output channel.
> +
> +    properties:
> +      reg:
> +        description: Output channel number.
> +        maximum: 13
> +
> +      label: true
> +
> +      adi,driver-mode:
> +        description:
> +          Output driver mode. The CMOS modes are named cmos-<pos>-<neg>, where
> +          each pin is either true or complement phase relative to the divider
> +          output, or high-Z.
> +        enum:
> +          - lvpecl-8ma
> +          - lvds-3.5ma
> +          - lvds-7ma
> +          - hstl0-16ma
> +          - hstl1-8ma
> +          - cmos-true-true
> +          - cmos-true-complement
> +          - cmos-true-hiz
> +          - cmos-hiz-true
> +          - cmos-hiz-hiz
> +          - cmos-complement-complement
> +          - cmos-complement-true
> +          - cmos-complement-hiz
> +          - cmos-hiz-complement
> +
> +      adi,divider-output-invert-enable:
> +        description: Invert the polarity of the channel output.
> +        type: boolean
> +
> +      always-on:
> +        description: Keep the output running even if no consumer uses it.
> +        type: boolean
> +
> +    required:
> +      - reg
> +      - adi,driver-mode
> +
> +    additionalProperties: false
> +
> +dependencies:
> +  clock-output-names: [ "#clock-cells" ]
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - vdd3-pll-supply
> +  - vdd3-vco-supply
> +  - vdd3-ref-supply
> +  - vdd3-out-supply
> +  - vdd18-out-supply
> +  - adi,pll2-charge-pump-current-nanoamp
> +  - adi,pll2-m1-frequency-hz
> +
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +  - if:
> +      not:
> +        required:
> +          - "#clock-cells"
> +    then:
> +      patternProperties:
> +        "^channel@([0-9]|1[0-3])$":
> +          properties:
> +            always-on: false
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        clock-controller@0 {
> +            compatible = "adi,ad9523-1";
> +            reg = <0>;
> +            spi-max-frequency = <10000000>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +            #clock-cells = <1>;
> +
> +            clocks = <&vcxo>;
> +            clock-names = "oscin";
> +
> +            vdd3-pll-supply = <&vdd3>;
> +            vdd3-vco-supply = <&vdd3>;
> +            vdd3-ref-supply = <&vdd3>;
> +            vdd3-out-supply = <&vdd3>;
> +            vdd18-out-supply = <&vdd18>;
> +
> +            powerdown-gpios = <&gpio 93 GPIO_ACTIVE_LOW>;
> +            reset-gpios = <&gpio 91 GPIO_ACTIVE_LOW>;
> +            sync-gpios = <&gpio 92 GPIO_ACTIVE_LOW>;
> +
> +            adi,oscin-mode = "differential";
> +            adi,pll2-charge-pump-current-nanoamp = <413000>;
> +            adi,pll2-m1-frequency-hz = <1000000000>;
> +            adi,pll2-loop-filter-rzero-ohms = <1850>;
> +            adi,pll2-loop-filter-rpole2-ohms = <900>;
> +            adi,pll2-loop-filter-cpole1-picofarads = <16>;
> +
> +            channel@1 {
> +                reg = <1>;
> +                label = "dac-clk";
> +                adi,driver-mode = "lvds-7ma";
> +            };
> +
> +            channel@5 {
> +                reg = <5>;
> +                label = "fpga-clk";
> +                adi,driver-mode = "lvds-7ma";
> +                always-on;
> +            };
> +        };
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d747e10ef125..3edb552c50ea 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1765,6 +1765,7 @@ L:	linux@analog.com
>  L:	linux-iio@vger.kernel.org
>  S:	Supported
>  W:	https://ez.analog.com/linux-software-drivers
> +F:	Documentation/devicetree/bindings/iio/frequency/adi,ad9523-1.yaml
>  F:	drivers/iio/frequency/ad9523.c
>  
>  ANALOG DEVICES INC AD9739a DRIVER
> 
> -- 
> 2.56.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-11-30 18:51 UTC|newest]

Thread overview: 20+ 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-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-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-11-30 17:37 ` [PATCH 08/16] iio: frequency: ad9523: rename the platform data to config Nuno Sá
2026-11-30 17:37 ` [PATCH 09/16] iio: frequency: ad9523: always bypass PLL1 Nuno Sá
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 [this message]
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=20261130-vindicate-sitter-469f8822d728@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.