Re: [PATCH 1/3] dt-bindings: iio: adc: add AD4695 and similar ADCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/06/2024 21:20, David Lechner wrote:
> Add device tree bindings for AD4695 and similar ADCs.
> 
> Signed-off-by: David Lechner <dlechner@xxxxxxxxxxxx>
> ---
>  .../devicetree/bindings/iio/adc/adi,ad4695.yaml    | 297 +++++++++++++++++++++
>  MAINTAINERS                                        |   9 +
>  2 files changed, 306 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml
> new file mode 100644
> index 000000000000..8ff5bbbbef9f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml
> @@ -0,0 +1,297 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adi,ad4695.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices Easy Drive Multiplexed SAR Analog to Digital Converters
> +
> +maintainers:
> +  - Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>
> +  - Nuno Sá <nuno.sa@xxxxxxxxxx>
> +
> +description: |
> +  A family of similar multi-channel analog to digital converters with SPI bus.
> +
> +  * https://www.analog.com/en/products/ad4695.html
> +  * https://www.analog.com/en/products/ad4696.html
> +  * https://www.analog.com/en/products/ad4697.html
> +  * https://www.analog.com/en/products/ad4698.html
> +
> +$ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - enum:
> +          - adi,ad4695
> +          - adi,ad4697
> +      # same chips in WLCSP package with more pins
> +      - items:
> +          - const: adi,ad4695-wlcsp

Usually we do not add compatibles for such differences. Programming
model is the same. Same for all other wlcsp. Unless something differs?

> +          - const: adi,ad4695
> +      - items:
> +          - const: adi,ad4697-wlcsp
> +          - const: adi,ad4697
> +      # same chips with higher max sample rate
> +      - items:
> +          - const: adi,ad4696

Anyway, keep all fallbacked variants in one entry, so enum with const
fallback.

> +          - const: adi,ad4695
> +      - items:
> +          - const: adi,ad4698
> +          - const: adi,ad4697
> +      # same chips with higher max sample rate in WLCSP package
> +      - items:
> +          - const: adi,ad4696-wlcsp
> +          - const: adi,ad4696

That's wrong. ad4696 is compatible with 4695 as stated before. It is not
compatible with ad4695-wlcsp.

> +          - const: adi,ad4695-wlcsp
> +          - const: adi,ad4695
> +      - items:
> +          - const: adi,ad4698-wlcsp
> +          - const: adi,ad4698
> +          - const: adi,ad4697-wlcsp
> +          - const: adi,ad4697
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    maximum: 80000000
> +
> +  spi-cpol: true
> +  spi-cpha: true
> +
> +  spi-rx-bus-width:
> +    minimum: 1
> +    maximum: 4
> +
> +  avdd-supply:
> +    description: A 2.7 V to 5.5 V supply that powers the analog circuitry.
> +
> +  ldo-in-supply:
> +    description: A 2.4 V to 5.5 V supply connected to the internal LDO input.
> +
> +  vdd-supply:
> +    description: A 1.8V supply that powers the core circuitry.
> +
> +  vio-supply:
> +    description: A 1.2V to 1.8V supply for the digital inputs and outputs.
> +
> +  ref-supply:
> +    description: A 2.4 V to 5.1 V supply for the external reference voltage.
> +
> +  refin-supply:
> +    description: A 2.4 V to 5.1 V supply for the internal reference buffer input.
> +
> +  com-supply:
> +    description: Common voltage supply for pseudo-differential analog inputs.
> +
> +  adi,no-ref-current-limit:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      When this flag is present, the REF Overvoltage Reduced Current protection
> +      is disabled.
> +
> +  adi,no-ref-high-z:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      Enable this flag if the ref-supply requires Reference Input High-Z Mode
> +      to be disabled for proper operation.
> +
> +  cnv-gpios:
> +    description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS.
> +    maxItems: 1
> +
> +  reset-gpios:
> +    description: The Reset Input (RESET). Should be configured GPIO_ACTIVE_LOW.
> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 1
> +    items:
> +      - description:
> +          Signal coming from the BSY_ALT_GP0 or GP3 pin that indicates a busy
> +          condition.
> +      - description:
> +          Signal coming from the BSY_ALT_GP0 or GP2 pin that indicates an alert
> +          condition.
> +
> +  interrupt-names:
> +    minItems: 1
> +    items:
> +      - const: busy
> +      - const: alert
> +
> +  gpio-controller: true
> +
> +  "#gpio-cells":
> +    const: 2
> +    description: |
> +      The first cell is the GPn number: 0 to 3.
> +      The second cell takes standard GPIO flags.
> +
> +  "#address-cells":
> +    const: 1

Blank line

> +  "#size-cells":
> +    const: 0
> +


Best regards,
Krzysztof





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux