From 06186e71e19cee4291fbd8f7a4993f925615daeb Mon Sep 17 00:00:00 2001 From: Jorge Marques Date: Fri, 1 Nov 2024 14:03:33 -0300 Subject: [PATCH] dt-bindings: iio: adc: Add adi,ad4052.yaml Add documentation for devicetree bindings for AD4052 ADC family. Signed-off-by: Jorge Marques --- .../bindings/iio/adc/adi,ad4052.yaml | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4052.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4052.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4052.yaml new file mode 100644 index 00000000000000..a7943694463b11 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4052.yaml @@ -0,0 +1,132 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2024 Analog Devices Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad4052.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD4052 ADC family device driver + +maintainers: + - Jorge Marques + +description: | + Analog Devices AD4052 Single Channel Precision SAR ADC family + + https://www.analog.com/media/en/technical-documentation/data-sheets/ad4050.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ad4052.pdf + +properties: + + compatible: + enum: + - adi,ad4050 + - adi,ad4052 + - adi,ad4056 + - adi,ad4058 + + reg: + maxItems: 1 + + clocks: + description: + Reference clock + + clock-names: + const: ref_clk + + interrupts: + description: IRQ line for the ADC GP0 + maxItems: 1 + + dmas: + maxItems: 1 + + dma-names: + const: rx + + pwms: + maxItems: 1 + + pwm-names: + oneOf: + - items: + - const: cnv + + cnv-gpios: + description: GPIO line for the ADC CNV + maxItems: 1 + + spi-max-frequency: + maximum: 25000000 + + vdd-supply: true + vdd_1_8-supply: true + vio-supply: true + + adi,functional-mode: + description: + The device supports functional modes, granuality depends on the device. + + 0 - Sample is 12 or 16 bit. + 1 - Sample is 24 or 16-bit burst average of n-samples. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + default: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - dmas + - dma-names + - pwms + - pwm-names + - interrupts + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + - if: + properties: + compatible: + contains: + enum: + - adi,ad4050 + - adi,ad4052 + - adi,ad4056 + - adi,ad4058 + then: + properties: + adi,functional-mode: + enum: [0, 1] + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad4052"; + reg = <0>; + spi-max-frequency = <25000000>; + + clocks = <&clk0>; + clock-names = "ref_clk"; + dmas = <&dma 0>; + dma-names = "rx"; + pwm-names = "cnv"; + pwms = <&adc_trigger 0 0>; + cnv-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + interrupts = <0 2>; + interrupt-parent = <&gpio>; + + adi,functional-mode = <0>; + }; + }; +...