Commit 686b2bd9 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

dt-bindings: iio: adc: ti,adc128s052 yaml conversion.



Simple binding.  Only addition to txt version is
as a provider of channels to other devices using the consumer
binding.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-10-jic23@kernel.org
parent e6d2aaa9
Loading
Loading
Loading
Loading
+59 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/ti,adc128s052.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments ADC128S052 and similar ADCs

maintainers:
  - Angelo Compagnucci <angelo.compagnucci@gmail.com>

description: |
  Family of 12 bit SPI ADCs with 2 to 8 channels with a range of different
  target sample rates.

properties:
  compatible:
    enum:
      - ti,adc122s021
      - ti,adc122s051
      - ti,adc122s101
      - ti,adc124s021
      - ti,adc124s051
      - ti,adc124s101
      - ti,adc128s052

  reg:
    maxItems: 1

  spi-max-frequency: true

  vref-supply: true

  "#io-channel-cells":
    const: 1

required:
  - compatible
  - reg
  - vref-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        adc@0 {
            compatible = "ti,adc128s052";
            reg = <0>;
            vref-supply = <&vdd_supply>;
            spi-max-frequency = <1000000>;
            #io-channel-cells = <1>;
        };
    };
...
+0 −25
Original line number Diff line number Diff line
* Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip

Required properties:
 - compatible: Should be one of:
   - "ti,adc128s052"
   - "ti,adc122s021"
   - "ti,adc122s051"
   - "ti,adc122s101"
   - "ti,adc124s021"
   - "ti,adc124s051"
   - "ti,adc124s101"
 - reg: spi chip select number for the device
 - vref-supply: The regulator supply for ADC reference voltage

Recommended properties:
 - spi-max-frequency: Definition as per
		Documentation/devicetree/bindings/spi/spi-bus.txt

Example:
adc@0 {
	compatible = "ti,adc128s052";
	reg = <0>;
	vref-supply = <&vdd_supply>;
	spi-max-frequency = <1000000>;
};