[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250813232401.GA1035450-robh@kernel.org>
Date: Wed, 13 Aug 2025 18:24:01 -0500
From: Rob Herring <robh@...nel.org>
To: Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc: jic23@...nel.org, conor+dt@...nel.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v3 2/4] dt-bindings: iio: adc: add ade9000
On Fri, Aug 08, 2025 at 02:10:14PM +0000, Antoniu Miclaus wrote:
> Add devicetree bindings support for ade9000.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@...log.com>
> ---
> changes in v3:
> - fix $id schema URL format
> - remove address/size-cells and channel subnodes
> - add dready interrupt support
> - add clock input/output support
> - simplify device tree structure
> .../bindings/iio/adc/adi,ade9000.yaml | 110 ++++++++++++++++++
> 1 file changed, 110 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ade9000.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ade9000.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ade9000.yaml
> new file mode 100644
> index 000000000000..07bc49acc920
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ade9000.yaml
> @@ -0,0 +1,110 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2025 Analog Devices Inc.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adi,ade9000.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices ADE9000 High Performance, Polyphase Energy Metering driver
> +
> +maintainers:
> + - Antoniu Miclaus <antoniu.miclaus@...log.com>
> +
> +description: |
> + The ADE9000 s a highly accurate, fully integrated, multiphase energy and power
> + quality monitoring device. Superior analog performance and a digital signal
> + processing (DSP) core enable accurate energy monitoring over a wide dynamic
> + range. An integrated high end reference ensures low drift over temperature
> + with a combined drift of less than ±25 ppm/°C maximum for the entire channel
> + including a programmable gain amplifier (PGA) and an analog-to- digital
> + converter (ADC).
> +
> + https://www.analog.com/media/en/technical-documentation/data-sheets/ADE9000.pdf
> +
> +$ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - adi,ade9000
> +
> + reg:
> + maxItems: 1
> +
> + spi-max-frequency:
> + maximum: 20000000
> +
> + interrupts:
> + maxItems: 3
> +
> + interrupt-names:
> + items:
> + - const: irq0
> + - const: irq1
> + - const: dready
> +
> + reset-gpios:
> + description: |
Don't need '|'.
> + Must be the device tree identifier of the RESET pin. As the line is
> + active low, it should be marked GPIO_ACTIVE_LOW.
> + maxItems: 1
> +
> + vdd-supply: true
> +
> + vref-supply: true
> +
> + clocks:
> + description: External clock source when not using crystal
> + maxItems: 1
> +
> + clock-names:
> + items:
> + - const: clkin
> +
> + "#clock-cells":
> + description: ADE9000 can provide clock output via CLKOUT pin with external buffer
Wrap at 80 char. Or start on the next line.
> + const: 0
> +
> + clock-output-names:
> + items:
> + - const: clkout
> +
> +required:
> + - compatible
> + - reg
> + - reset-gpios
> + - interrupts
> + - interrupt-names
> + - vdd-supply
> +
> +allOf:
> + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + spi {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + adc@0 {
> + compatible = "adi,ade9000";
> + reg = <0>;
> + spi-max-frequency = <7000000>;
> +
> + #clock-cells = <0>;
> + reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
> + interrupts = <2 IRQ_TYPE_EDGE_FALLING>, <3 IRQ_TYPE_EDGE_FALLING>, <4 IRQ_TYPE_EDGE_FALLING>;
> + interrupt-names = "irq0", "irq1", "dready";
> + interrupt-parent = <&gpio>;
> + /* Optional: external clock instead of crystal */
> + /* clocks = <&ext_clock_24576khz>; */
> + /* clock-names = "clkin"; */
> + clock-output-names = "clkout";
> + vdd-supply = <&vdd_reg>;
> + };
> + };
> --
> 2.43.0
>
Powered by blists - more mailing lists