code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/st,stm32-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: I2C controller embedded in STMicroelectronics STM32 I2C platform

maintainers:
  - Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>

allOf:
  - $ref: /schemas/i2c/i2c-controller.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - st,stm32f7-i2c
              - st,stm32mp13-i2c
              - st,stm32mp15-i2c
    then:
      properties:
        i2c-scl-rising-time-ns:
          default: 25

        i2c-scl-falling-time-ns:
          default: 10
    else:
      properties:
        st,syscfg-fmp: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - st,stm32f4-i2c
    then:
      properties:
        clock-frequency:
          enum: [100000, 400000]

properties:
  compatible:
    enum:
      - st,stm32f4-i2c
      - st,stm32f7-i2c
      - st,stm32mp13-i2c
      - st,stm32mp15-i2c

  reg:
    maxItems: 1

  interrupts:
    items:
      - description: interrupt ID for I2C event
      - description: interrupt ID for I2C error

  interrupt-names:
    items:
      - const: event
      - const: error

  resets:
    maxItems: 1

  clocks:
    maxItems: 1

  dmas:
    items:
      - description: RX DMA Channel phandle
      - description: TX DMA Channel phandle

  dma-names:
    items:
      - const: rx
      - const: tx

  clock-frequency:
    description: Desired I2C bus clock frequency in Hz. If not specified,
                 the default 100 kHz frequency will be used.
                 For STM32F7, STM32H7 and STM32MP1 SoCs, if timing parameters
                 match, the bus clock frequency can be from 1Hz to 1MHz.
    default: 100000
    minimum: 1
    maximum: 1000000

  st,syscfg-fmp:
    description: Use to set Fast Mode Plus bit within SYSCFG when Fast Mode
      Plus speed is selected by slave.
    $ref: "/schemas/types.yaml#/definitions/phandle-array"
    items:
      - items:
          - description: phandle to syscfg
          - description: register offset within syscfg
          - description: register bitmask for FMP bit

  wakeup-source: true

required:
  - compatible
  - reg
  - interrupts
  - resets
  - clocks

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/mfd/stm32f7-rcc.h>
    #include <dt-bindings/clock/stm32fx-clock.h>
    //Example 1 (with st,stm32f4-i2c compatible)
      i2c@40005400 {
          compatible = "st,stm32f4-i2c";
          #address-cells = <1>;
          #size-cells = <0>;
          reg = <0x40005400 0x400>;
          interrupts = <31>,
                       <32>;
          resets = <&rcc 277>;
          clocks = <&rcc 0 149>;
      };

  - |
    #include <dt-bindings/mfd/stm32f7-rcc.h>
    #include <dt-bindings/clock/stm32fx-clock.h>
    //Example 2 (with st,stm32f7-i2c compatible)
      i2c@40005800 {
          compatible = "st,stm32f7-i2c";
          #address-cells = <1>;
          #size-cells = <0>;
          reg = <0x40005800 0x400>;
          interrupts = <31>,
                       <32>;
          resets = <&rcc STM32F7_APB1_RESET(I2C1)>;
          clocks = <&rcc 1 CLK_I2C1>;
      };

  - |
    #include <dt-bindings/mfd/stm32f7-rcc.h>
    #include <dt-bindings/clock/stm32fx-clock.h>
    //Example 3 (with st,stm32mp15-i2c compatible on stm32mp)
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/clock/stm32mp1-clks.h>
    #include <dt-bindings/reset/stm32mp1-resets.h>
      i2c@40013000 {
          compatible = "st,stm32mp15-i2c";
          #address-cells = <1>;
          #size-cells = <0>;
          reg = <0x40013000 0x400>;
          interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
                       <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
          clocks = <&rcc I2C2_K>;
          resets = <&rcc I2C2_R>;
          i2c-scl-rising-time-ns = <185>;
          i2c-scl-falling-time-ns = <20>;
          st,syscfg-fmp = <&syscfg 0x4 0x2>;
      };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/ti,omap4-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bindings for I2C controllers on TI's OMAP and K3 SoCs

maintainers:
  - Vignesh Raghavendra <vigneshr@ti.com>

properties:
  compatible:
    oneOf:
      - enum:
          - ti,omap2420-i2c
          - ti,omap2430-i2c
          - ti,omap3-i2c
          - ti,omap4-i2c
      - items:
          - enum:
              - ti,am4372-i2c
              - ti,am64-i2c
              - ti,am654-i2c
              - ti,j721e-i2c
          - const: ti,omap4-i2c

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    const: fck

  clock-frequency: true

  power-domains: true

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

  ti,hwmods:
    description:
      Must be "i2c<n>", n being the instance number (1-based).
      This property is applicable only on legacy platforms mainly omap2/3
      and ti81xx and should not be used on other platforms.
    $ref: /schemas/types.yaml#/definitions/string
    deprecated: true

# subnode's properties
patternProperties:
  "@[0-9a-f]+$":
    type: object
    description:
      Flash device uses the below defined properties in the subnode.

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

if:
  properties:
    compatible:
      enum:
        - ti,omap2420-i2c
        - ti,omap2430-i2c
        - ti,omap3-i2c
        - ti,omap4-i2c

then:
  properties:
    ti,hwmods:
      items:
        - pattern: "^i2c([1-9])$"

else:
  properties:
    ti,hwmods: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    main_i2c0: i2c@2000000 {
            compatible = "ti,j721e-i2c", "ti,omap4-i2c";
            reg = <0x2000000 0x100>;
            interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
            #address-cells = <1>;
            #size-cells = <0>;
         };

repo_name: angery/linux


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/i2c/xlnx,xps-iic-2.00.a.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Xilinx IIC controller

maintainers:
  - info@mocean-labs.com

allOf:
  - $ref: /schemas/i2c/i2c-controller.yaml#

properties:
  compatible:
    const: xlnx,xps-iic-2.00.a

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 1

  clock-name:
    const: pclk
    description: |
      Input clock name.

required:
  - compatible
  - reg
  - interrupts
  - clocks

unevaluatedProperties: false

examples:
  - |
    axi_iic_0: i2c@40800000 {
      compatible = "xlnx,xps-iic-2.00.a";
      clocks = <&clkc 15>;
      interrupts = < 1 2 >;
      reg = < 0x40800000 0x10000 >;

      #size-cells = <0>;
      #address-cells = <1>;
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/i3c/cdns,i3c-master.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cadence I3C master block

maintainers:
  - Boris Brezillon <bbrezillon@kernel.org>

allOf:
  - $ref: i3c.yaml#

properties:
  compatible:
    const: cdns,i3c-master

  reg:
    maxItems: 1

  clocks:
    maxItems: 2

  clock-names:
    items:
      - const: pclk
      - const: sysclk

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts

unevaluatedProperties: false

examples:
  - |
    i3c-master@d040000 {
        compatible = "cdns,i3c-master";
        clocks = <&coreclock>, <&i3csysclock>;
        clock-names = "pclk", "sysclk";
        interrupts = <3 0>;
        reg = <0x0d040000 0x1000>;
        #address-cells = <3>;
        #size-cells = <0>;
        i2c-scl-hz = <100000>;

        eeprom@57{
            compatible = "atmel,24c01";
            reg = <0x57 0x0 0x10>;
            pagesize = <0x8>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i3c/i3c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: I3C bus binding

maintainers:
  - Alexandre Belloni <alexandre.belloni@bootlin.com>
  - Miquel Raynal <miquel.raynal@bootlin.com>

description: |
  I3C busses can be described with a node for the primary I3C controller device
  and a set of child nodes for each I2C or I3C slave on the bus. Each of them
  may, during the life of the bus, request mastership.

properties:
  $nodename:
    pattern: "^i3c-master@[0-9a-f]+$"

  "#address-cells":
    const: 3
    description: |
      Each I2C device connected to the bus should be described in a subnode.

      All I3C devices are supposed to support DAA (Dynamic Address Assignment),
      and are thus discoverable. So, by default, I3C devices do not have to be
      described in the device tree. This being said, one might want to attach
      extra resources to these devices, and those resources may have to be
      described in the device tree, which in turn means we have to describe
      I3C devices.

      Another use case for describing an I3C device in the device tree is when
      this I3C device has a static I2C address and we want to assign it a
      specific I3C dynamic address before the DAA takes place (so that other
      devices on the bus can't take this dynamic address).

  "#size-cells":
    const: 0

  i3c-scl-hz:
    description: |
      Frequency of the SCL signal used for I3C transfers. When undefined, the
      default value should be 12.5MHz.

      May not be supported by all controllers.

  i2c-scl-hz:
    description: |
      Frequency of the SCL signal used for I2C transfers. When undefined, the
      default should be to look at LVR (Legacy Virtual Register) values of
      I2C devices described in the device tree to determine the maximum I2C
      frequency.

      May not be supported by all controllers.

required:
  - "#address-cells"
  - "#size-cells"

patternProperties:
  "@[0-9a-f]+$":
    type: object
    description: |
      I2C child, should be named: <device-type>@<i2c-address>

      All properties described in Documentation/devicetree/bindings/i2c/i2c.txt
      are valid here, except the reg property whose content is changed.

    properties:
      compatible:
        description:
          Compatible of the I2C device.

      reg:
        items:
          - items:
              - description: |
                  I2C address. 10 bit addressing is not supported. Devices with
                  10-bit address can't be properly passed through DEFSLVS
                  command.
                minimum: 0
                maximum: 0x7f
              - const: 0
              - description: |
                  Shall encode the I3C LVR (Legacy Virtual Register):
                    bit[31:8]: unused/ignored
                    bit[7:5]: I2C device index. Possible values:
                      * 0: I2C device has a 50 ns spike filter
                      * 1: I2C device does not have a 50 ns spike filter but
                           supports high frequency on SCL
                      * 2: I2C device does not have a 50 ns spike filter and is
                           not tolerant to high frequencies
                      * 3-7: reserved
                    bit[4]: tell whether the device operates in FM (Fast Mode)
                            or FM+ mode:
                      * 0: FM+ mode
                      * 1: FM mode
                    bit[3:0]: device type
                      * 0-15: reserved

    required:
      - compatible
      - reg

  "@[0-9a-f]+,[0-9a-f]+$":
    type: object
    description: |
      I3C child, should be named: <device-type>@<static-i2c-address>,<i3c-pid>

    properties:
      reg:
        items:
          - items:
              - description: |
                  Encodes the static I2C address. Should be 0 if the device does
                  not have one (0 is not a valid I2C address).
                minimum: 0
                maximum: 0x7f
              - description: |
                  First half of the Provisional ID (following the PID
                  definition provided by the I3C specification).

                  Contains the manufacturer ID left-shifted by 1.
              - description: |
                  Second half of the Provisional ID (following the PID
                  definition provided by the I3C specification).

                  Contains the ORing of the part ID left-shifted by 16,
                  the instance ID left-shifted by 12 and extra information.

      assigned-address:
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0x1
        maximum: 0xff
        description: |
          Dynamic address to be assigned to this device. This property is only
          valid if the I3C device has a static address (first cell of the reg
          property != 0).

    required:
      - reg

additionalProperties: true

examples:
  - |
    i3c-master@d040000 {
        compatible = "cdns,i3c-master";
        clocks = <&coreclock>, <&i3csysclock>;
        clock-names = "pclk", "sysclk";
        interrupts = <3 0>;
        reg = <0x0d040000 0x1000>;
        #address-cells = <3>;
        #size-cells = <0>;
        i2c-scl-hz = <100000>;

        /* I2C device. */
        eeprom@57 {
            compatible = "atmel,24c01";
            reg = <0x57 0x0 0x10>;
            pagesize = <0x8>;
        };

        /* I3C device with a static I2C address. */
        thermal_sensor: sensor@68,39200144004 {
            reg = <0x68 0x392 0x144004>;
            assigned-address = <0xa>;
        };

        /*
         * I3C device without a static I2C address but requiring
         * resources described in the DT.
         */
        sensor@0,39200154004 {
            reg = <0x0 0x392 0x154004>;
            clocks = <&clock_provider 0>;
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/i3c/mipi-i3c-hci.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: MIPI I3C HCI

maintainers:
  - Nicolas Pitre <npitre@baylibre.com>

allOf:
  - $ref: /schemas/i3c/i3c.yaml#

description: |
  MIPI I3C Host Controller Interface

  The MIPI I3C HCI (Host Controller Interface) specification defines
  a common software driver interface to support compliant MIPI I3C
  host controller hardware implementations from multiple vendors.

  The hardware is self-advertising for differences in implementation
  capabilities, including the spec version it is based on, so there
  isn't much to describe here (yet).

  For details, please see:
  https://www.mipi.org/specifications/i3c-hci

properties:
  compatible:
    const: mipi-i3c-hci
  reg:
    maxItems: 1
  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

unevaluatedProperties: false

examples:
  - |
    i3c-master@a0000000 {
      compatible = "mipi-i3c-hci";
      reg = <0xa0000000 0x2000>;
      interrupts = <89>;
      #address-cells = <3>;
      #size-cells = <0>;
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/i3c/silvaco,i3c-master.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Silvaco I3C master

maintainers:
  - Conor Culhane <conor.culhane@silvaco.com>

allOf:
  - $ref: "i3c.yaml#"

properties:
  compatible:
    const: silvaco,i3c-master-v1

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: system clock
      - description: bus clock
      - description: other (slower) events clock

  clock-names:
    items:
      - const: pclk
      - const: fast_clk
      - const: slow_clk

  resets:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts
  - clock-names
  - clocks

additionalProperties: true

examples:
  - |
    i3c-master@a0000000 {
        compatible = "silvaco,i3c-master-v1";
        clocks = <&zynqmp_clk 71>, <&fclk>, <&sclk>;
        clock-names = "pclk", "fast_clk", "slow_clk";
        interrupt-parent = <&gic>;
        interrupts = <0 89 4>;
        reg = <0xa0000000 0x1000>;
        #address-cells = <3>;
        #size-cells = <0>;
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/i3c/snps,dw-i3c-master.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Synopsys DesignWare I3C master block

maintainers:
  - Alexandre Belloni <alexandre.belloni@bootlin.com>

allOf:
  - $ref: i3c.yaml#

properties:
  compatible:
    const: snps,dw-i3c-master-1.00a

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - clocks
  - interrupts

unevaluatedProperties: false

examples:
  - |
    i3c-master@2000 {
        compatible = "snps,dw-i3c-master-1.00a";
        #address-cells = <3>;
        #size-cells = <0>;
        reg = <0x02000 0x1000>;
        interrupts = <0>;
        clocks = <&i3cclk>;

        eeprom@57{
            compatible = "atmel,24c01";
            reg = <0x57 0x0 0x10>;
            pagesize = <0x8>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/adi,adis16201.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ADIS16201 Dual Axis Inclinometer and similar

maintainers:
  - Jonathan Cameron <Jonathan.Cameron@huawei.com>

description: |
  Two similar parts from external interface point of view.
  SPI interface.
    https://www.analog.com/en/products/adis16201.html
    https://www.analog.com/en/products/adis16209.html

properties:
  compatible:
    enum:
      - adi,adis16201
      - adi,adis16209

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdd-supply: true

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        accelerometer@0 {
            compatible = "adi,adis16201";
            reg = <0>;
            spi-max-frequency = <2500000>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/adi,adis16240.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ADIS16240 Programmable Impact Sensor and Recorder driver

maintainers:
  - Alexandru Tachici <alexandru.tachici@analog.com>

description: |
  ADIS16240 Programmable Impact Sensor and Recorder driver that supports
  SPI interface.
    https://www.analog.com/en/products/adis16240.html

properties:
  compatible:
    enum:
      - adi,adis16240

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        /* Example for a SPI device node */
        accelerometer@0 {
            compatible = "adi,adis16240";
            reg = <0>;
            spi-max-frequency = <2500000>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
        };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/adi,adxl313.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADXL312, ADXL313, and ADXL314 3-Axis Digital Accelerometers

maintainers:
  - Lucas Stankus <lucas.p.stankus@gmail.com>

description: |
  Analog Devices ADXL312, ADXL313, and ADXL314 3-Axis Digital Accelerometer that
  support both I2C & SPI interfaces.
    https://www.analog.com/en/products/adxl312.html
    https://www.analog.com/en/products/adxl313.html
    https://www.analog.com/en/products/adxl314.html

properties:
  compatible:
    enum:
      - adi,adxl312
      - adi,adxl313
      - adi,adxl314

  reg:
    maxItems: 1

  spi-3wire: true

  vs-supply:
    description: Regulator that supplies power to the accelerometer

  vdd-supply:
    description: Regulator that supplies the digital interface supply voltage

  interrupts:
    minItems: 1
    maxItems: 2

  interrupt-names:
    minItems: 1
    maxItems: 2
    items:
      enum:
        - INT1
        - INT2

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        /* Example for a I2C device node */
        accelerometer@53 {
            compatible = "adi,adxl313";
            reg = <0x53>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "INT1";
        };
    };
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        /* Example for a SPI device node */
        accelerometer@0 {
            compatible = "adi,adxl313";
            reg = <0>;
            spi-max-frequency = <5000000>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "INT1";
        };
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/adi,adxl345.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADXL345/ADXL375 3-Axis Digital Accelerometers

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices ADXL345/ADXL375 3-Axis Digital Accelerometers that supports
  both I2C & SPI interfaces.
    https://www.analog.com/en/products/mems/accelerometers/adxl345.html
    https://www.analog.com/en/products/sensors-mems/accelerometers/adxl375.html

properties:
  compatible:
    oneOf:
      - items:
          - const: adi,adxl346
          - const: adi,adxl345
      - enum:
          - adi,adxl345
          - adi,adxl375

  reg:
    maxItems: 1

  spi-cpha: true

  spi-cpol: true

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        /* Example for a I2C device node */
        accelerometer@2a {
            compatible = "adi,adxl345";
            reg = <0x2a>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
        };
    };
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    spi0 {
        #address-cells = <1>;
        #size-cells = <0>;

        /* Example for a SPI device node */
        accelerometer@0 {
            compatible = "adi,adxl345";
            reg = <0>;
            spi-max-frequency = <5000000>;
            spi-cpol;
            spi-cpha;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
        };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/adi,adxl355.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADXL355 and ADXL359 3-Axis, Low noise MEMS Accelerometers

maintainers:
  - Puranjay Mohan <puranjay12@gmail.com>

description: |
  Analog Devices ADXL355 and ADXL359 3-Axis, Low noise MEMS Accelerometers that
  support both I2C & SPI interfaces
    https://www.analog.com/en/products/adxl355.html
    https://www.analog.com/en/products/adxl359.html

properties:
  compatible:
    enum:
      - adi,adxl355
      - adi,adxl359

  reg:
    maxItems: 1

  interrupts:
    minItems: 1
    maxItems: 3
    description: |
      Type for DRDY should be IRQ_TYPE_EDGE_RISING.
      Three configurable interrupt lines exist.

  interrupt-names:
    description: Specify which interrupt line is in use.
    items:
      enum:
        - INT1
        - INT2
        - DRDY
    minItems: 1
    maxItems: 3

  vdd-supply:
    description: Regulator that provides power to the sensor

  vddio-supply:
    description: Regulator that provides power to the bus

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

                /* Example for a I2C device node */
                accelerometer@1d {
                        compatible = "adi,adxl355";
                        reg = <0x1d>;
                        interrupt-parent = <&gpio>;
                        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
                        interrupt-names = "DRDY";
                };
        };
  - |
        #include <dt-bindings/gpio/gpio.h>
        #include <dt-bindings/interrupt-controller/irq.h>
        spi {
                #address-cells = <1>;
                #size-cells = <0>;

                accelerometer@0 {
                        compatible = "adi,adxl355";
                        reg = <0>;
                        spi-max-frequency = <1000000>;
                        interrupt-parent = <&gpio>;
                        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
                        interrupt-names = "DRDY";
                };
        };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/adi,adxl367.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADXL367 3-Axis Digital Accelerometer

maintainers:
  - Cosmin Tanislav <cosmin.tanislav@analog.com>

description: |
  The ADXL367 is an ultralow power, 3-axis MEMS accelerometer.

  The ADXL367 does not alias input signals by to achieve ultralow power
  consumption, it samples the full bandwidth of the sensor at all
  data rates. Measurement ranges of +-2g, +-4g, and +-8g are available,
  with a resolution of 0.25mg/LSB on the +-2 g range.

  In addition to its ultralow power consumption, the ADXL367
  has many features to enable true system level power reduction.
  It includes a deep multimode output FIFO, a built-in micropower
  temperature sensor, and an internal ADC for synchronous conversion
  of an additional analog input.
    https://www.analog.com/en/products/adxl367.html

properties:
  compatible:
    enum:
      - adi,adxl367

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdd-supply: true
  vddio-supply: true

required:
  - compatible
  - reg
  - interrupts

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      accelerometer@53 {
        compatible = "adi,adxl367";
        reg = <0x53>;
        interrupt-parent = <&gpio>;
        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
      };
    };
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      accelerometer@0 {
        compatible = "adi,adxl367";
        reg = <0>;
        spi-max-frequency = <1000000>;
        interrupt-parent = <&gpio>;
        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/adi,adxl372.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer

maintainers:
  - Stefan Popa <stefan.popa@analog.com>

description: |
  Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer that supports
  both I2C & SPI interfaces
    https://www.analog.com/en/products/adxl372.html

properties:
  compatible:
    enum:
      - adi,adxl372

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

                /* Example for a I2C device node */
                accelerometer@53 {
                        compatible = "adi,adxl372";
                        reg = <0x53>;
                        interrupt-parent = <&gpio>;
                        interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
                };
        };
  - |
        #include <dt-bindings/gpio/gpio.h>
        #include <dt-bindings/interrupt-controller/irq.h>
        spi0 {
                #address-cells = <1>;
                #size-cells = <0>;

                accelerometer@0 {
                        compatible = "adi,adxl372";
                        reg = <0>;
                        spi-max-frequency = <1000000>;
                        interrupt-parent = <&gpio>;
                        interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
                };
        };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/bosch,bma220.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bosch BMA220 Trixial Acceleration Sensor

maintainers:
  - Jonathan Cameron <Jonathan.Cameron@huawei.com>

properties:
  compatible:
    enum:
      - bosch,bma220

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdda-supply: true
  vddd-supply: true
  vddio-supply: true

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        accelerometer@0 {
            compatible = "bosch,bma220";
            reg = <0>;
            spi-max-frequency = <2500000>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/bosch,bma255.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bosch BMA255 and Similar Accelerometers

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>
  - Stephan Gerhold <stephan@gerhold.net>

description:
  3 axis accelerometers with varying range and I2C or SPI
  4-wire interface.

properties:
  compatible:
    enum:
      # bmc150-accel driver in Linux
      - bosch,bma222
      - bosch,bma222e
      - bosch,bma250e
      - bosch,bma253
      - bosch,bma254
      - bosch,bma255
      - bosch,bma280
      - bosch,bmc150_accel
      - bosch,bmc156_accel
      - bosch,bmi055_accel

      # bma180 driver in Linux
      - bosch,bma023
      - bosch,bma150
      - bosch,bma180
      - bosch,bma250
      - bosch,smb380

  reg:
    maxItems: 1

  vdd-supply: true
  vddio-supply: true

  interrupts:
    minItems: 1
    maxItems: 2
    description: |
      Without interrupt-names, the first interrupt listed must be the one
      connected to the INT1 pin, the second (optional) interrupt listed must be
      the one connected to the INT2 pin (if available). The type should be
      IRQ_TYPE_EDGE_RISING.

      BMC156 does not have an INT1 pin, therefore the first interrupt pin is
      always treated as INT2.

  interrupt-names:
    minItems: 1
    maxItems: 2
    items:
      enum:
        - INT1
        - INT2

  mount-matrix:
    description: an optional 3x3 mounting rotation matrix.

  spi-max-frequency:
    maximum: 10000000

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        accelerometer@8 {
            compatible = "bosch,bma222";
            reg = <0x08>;
            vddio-supply = <&vddio>;
            vdd-supply = <&vdd>;
            interrupts = <57 IRQ_TYPE_EDGE_RISING>;
            interrupt-names = "INT1";
        };
    };
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        accelerometer@10 {
            compatible = "bosch,bmc156_accel";
            reg = <0x10>;
            vddio-supply = <&vddio>;
            vdd-supply = <&vdd>;
            interrupts = <116 IRQ_TYPE_EDGE_RISING>;
            interrupt-names = "INT2";
        };
    };
  - |
    # include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        accel@0 {
            compatible = "bosch,bma222";
            reg = <0>;
            spi-max-frequency = <10000000>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/bosch,bma400.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bosch BMA400 triaxial acceleration sensor

maintainers:
  - Dan Robertson <dan@dlrobertson.com>

description: |
  Acceleration and temperature iio sensors with an i2c interface

  Specifications about the sensor can be found at:
    https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMA400-DS000.pdf

properties:
  compatible:
    enum:
      - bosch,bma400

  reg:
    maxItems: 1

  vdd-supply:
    description: phandle to the regulator that provides power to the accelerometer

  vddio-supply:
    description: phandle to the regulator that provides power to the sensor's IO

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      accelerometer@14 {
        compatible = "bosch,bma400";
        reg = <0x14>;
        vdd-supply = <&vdd>;
        vddio-supply = <&vddio>;
        interrupt-parent = <&gpio0>;
        interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
      };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/bosch,bmi088.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bosch BMI088 IMU accelerometer part

maintainers:
  - Mike Looijmans <mike.looijmans@topic.nl>

description: |
  Acceleration part of the IMU sensor with an SPI interface
  Specifications about the sensor can be found at:
    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi088-ds001.pdf

properties:
  compatible:
    enum:
      - bosch,bmi085-accel
      - bosch,bmi088-accel
      - bosch,bmi090l-accel

  reg:
    maxItems: 1

  vdd-supply: true

  vddio-supply: true

  interrupts:
    minItems: 1
    maxItems: 2
    description: |
      Type should be either IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_LEVEL_LOW.
      Two configurable interrupt lines exist.

  interrupt-names:
    description: Specify which interrupt line is in use.
    items:
      enum:
        - INT1
        - INT2
    minItems: 1
    maxItems: 2

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    spi {
      #address-cells = <1>;
      #size-cells = <0>;
      bmi088-accel@1 {
        compatible = "bosch,bmi088-accel";
        reg = <1>;
        spi-max-frequency = <10000000>;
        interrupt-parent = <&gpio6>;
        interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
        interrupt-names = "INT2";
      };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/fsl,mma7455.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Freescale MMA7455 and MMA7456 three axis accelerometers

maintainers:
  - Jonathan Cameron <jic23@kernel.org>

description:
  Devices support both SPI and I2C interfaces.

properties:
  compatible:
    enum:
      - fsl,mma7455
      - fsl,mma7456
  reg:
    maxItems: 1

  avdd-supply: true
  vddio-supply: true

  interrupts:
    minItems: 1
    maxItems: 2

  interrupt-names:
    description:
      Data ready is only available on INT1, but events can use either or
      both pins.  If not specified, first element assumed to correspond
      to INT1 and second (where present) to INT2.
    minItems: 1
    maxItems: 2
    items:
      enum:
        - "INT1"
        - "INT2"

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        accelerometer@18 {
            compatible = "fsl,mma7455";
            reg = <0x18>;
            vddio-supply = <&iovdd>;
            avdd-supply = <&avdd>;
            interrupts = <57 IRQ_TYPE_EDGE_FALLING>, <58 IRQ_TYPE_EDGE_FALLING>;
            interrupt-names = "INT2", "INT1";
        };
    };
  - |
    # include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        accelerometer@0 {
            compatible = "fsl,mma7456";
            reg = <0>;
            spi-max-frequency = <10000000>;
            vddio-supply = <&iovdd>;
            avdd-supply = <&avdd>;
            interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
            interrupt-names = "INT1";
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/fsl,mma8452.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title:
  Freescale MMA8451Q, MMA8452Q, MMA8453Q, MMA8652FC, MMA8653FC or FXLS8471Q
  triaxial accelerometer

maintainers:
  - Martin Kepplinger <martin.kepplinger@theobroma-systems.com>

properties:
  compatible:
    enum:
      - fsl,mma8451
      - fsl,mma8452
      - fsl,mma8453
      - fsl,mma8652
      - fsl,mma8653
      - fsl,fxls8471

  reg:
    maxItems: 1

  interrupts:
    description:
      2 highly configurable interrupt lines exist.
    minItems: 1
    maxItems: 2

  interrupt-names:
    description: Specify which interrupt line is in use.
    items:
      enum:
        - INT1
        - INT2
    minItems: 1
    maxItems: 2

  vdd-supply: true
  vddio-supply: true

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        accel@1d {
            compatible = "fsl,mma8453";
            reg = <0x1d>;
            interrupt-parent = <&gpio1>;
            interrupts = <5 0>;
            interrupt-names = "INT2";
        };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ROHM/Kionix KX022A Accelerometer

maintainers:
  - Matti Vaittinen <mazziesaccount@gmail.com>

description: |
  KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges,
  output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering.
  KX022A can be accessed either via I2C or SPI.

properties:
  compatible:
    const: kionix,kx022a

  reg:
    maxItems: 1

  interrupts:
    minItems: 1
    maxItems: 2

  interrupt-names:
    minItems: 1
    items:
      - enum: [INT1, INT2]
      - const: INT2

  vdd-supply: true
  io-vdd-supply: true

  mount-matrix:
    description: |
      an optional 3x3 mounting rotation matrix.

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        accel@1f {
            compatible = "kionix,kx022a";
            reg = <0x1f>;

            interrupt-parent = <&gpio1>;
            interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
            interrupt-names = "INT1";

            io-vdd-supply = <&iovdd>;
            vdd-supply = <&vdd>;
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/kionix,kxcjk1013.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Kionix KXCJK-1013 Accelerometer

maintainers:
  - Robert Yang <decatf@gmail.com>

properties:
  compatible:
    enum:
      - kionix,kxcjk1013
      - kionix,kxcj91008
      - kionix,kxtj21009
      - kionix,kxtf9
      - kionix,kx023-1025

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdd-supply: true
  vddio-supply: true

  mount-matrix:
    description: an optional 3x3 mounting rotation matrix.

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        accel@f {
            compatible = "kionix,kxtf9";
            reg = <0x0F>;
            mount-matrix = "0", "1", "0",
                           "1", "0", "0",
                           "0", "0", "1";
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/kionix,kxsd9.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Kionix KXSD9 Accelerometer

maintainers:
  - Jonathan Cameron <jic23@kernel.org>

description: |
  3 axis 12 bit accelerometer with +-8G range on all axes. Also has a
  12 bit auxiliary ADC channel. Interface is either SPI or I2C.

properties:
  compatible:
    const: kionix,kxsd9

  reg:
    maxItems: 1

  vdd-supply: true
  iovdd-supply: true

  interrupts:
    maxItems: 1

  mount-matrix:
    description: an optional 3x3 mounting rotation matrix.

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        accel@18 {
            compatible = "kionix,kxsd9";
            reg = <0x18>;
            iovdd-supply = <&iovdd>;
            vdd-supply = <&vdd>;
            interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
            mount-matrix = "-0.984807753012208", "0",  "-0.173648177666930",
                           "0",                  "-1", "0",
                           "-0.173648177666930", "0",  "0.984807753012208";
        };
    };
  - |
    # include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        accel@0 {
            compatible = "kionix,kxsd9";
            reg = <0>;
            spi-max-frequency = <10000000>;
        };
    };
...


code:
LIS302 accelerometer devicetree bindings

This device is matched via its bus drivers, and has a number of properties
that apply in on the generic device (independent from the bus).

Required properties for the SPI bindings:
 - compatible: 		should be set to "st,lis3lv02d-spi"
 - reg:			the chipselect index
 - spi-max-frequency:	maximal bus speed, should be set to 1000000 unless
			constrained by external circuitry
 - interrupts:		the interrupt generated by the device

Required properties for the I2C bindings:
 - compatible:		should be set to "st,lis3lv02d"
 - reg:			i2c slave address
 - Vdd-supply:		The input supply for Vdd
 - Vdd_IO-supply:	The input supply for Vdd_IO

Optional properties for all bus drivers:

 - st,click-single-{x,y,z}:	if present, tells the device to issue an
				interrupt on single click events on the
				x/y/z axis.
 - st,click-double-{x,y,z}:	if present, tells the device to issue an
				interrupt on double click events on the
				x/y/z axis.
 - st,click-thresh-{x,y,z}:	set the x/y/z axis threshold
 - st,click-click-time-limit:	click time limit, from 0 to 127.5msec
				with step of 0.5 msec
 - st,click-latency:		click latency, from 0 to 255 msec with
				step of 1 msec.
 - st,click-window:		click window, from 0 to 255 msec with
				step of 1 msec.
 - st,irq{1,2}-disable:		disable IRQ 1/2
 - st,irq{1,2}-ff-wu-1:		raise IRQ 1/2 on FF_WU_1 condition
 - st,irq{1,2}-ff-wu-2:		raise IRQ 1/2 on FF_WU_2 condition
 - st,irq{1,2}-data-ready:	raise IRQ 1/2 on data ready contition
 - st,irq{1,2}-click:		raise IRQ 1/2 on click condition
 - st,irq-open-drain:		consider IRQ lines open-drain
 - st,irq-active-low:		make IRQ lines active low
 - st,wu-duration-1:		duration register for Free-Fall/Wake-Up
				interrupt 1
 - st,wu-duration-2:		duration register for Free-Fall/Wake-Up
				interrupt 2
 - st,wakeup-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
				upper/lower limit
 - st,wakeup-threshold:		set wakeup threshold
 - st,wakeup2-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
				upper/lower limit for second wakeup
				engine.
 - st,wakeup2-threshold:	set wakeup threshold for second wakeup
				engine.
 - st,highpass-cutoff-hz=:	1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
				highpass cut-off frequency
 - st,hipass{1,2}-disable:	disable highpass 1/2.
 - st,default-rate=:		set the default rate
 - st,axis-{x,y,z}=:		set the axis to map to the three coordinates.
				Negative values can be used for inverted axis.
 - st,{min,max}-limit-{x,y,z}	set the min/max limits for x/y/z axis
				(used by self-test)

Example for a SPI device node:

	accelerometer@0 {
		compatible = "st,lis302dl-spi";
		reg = <0>;
		spi-max-frequency = <1000000>;
		interrupt-parent = <&gpio>;
		interrupts = <104 0>;

		st,click-single-x;
		st,click-single-y;
		st,click-single-z;
		st,click-thresh-x = <10>;
		st,click-thresh-y = <10>;
		st,click-thresh-z = <10>;
		st,irq1-click;
		st,irq2-click;
		st,wakeup-x-lo;
		st,wakeup-x-hi;
		st,wakeup-y-lo;
		st,wakeup-y-hi;
		st,wakeup-z-lo;
		st,wakeup-z-hi;
	};

Example for a I2C device node:

	lis331dlh: accelerometer@18 {
		compatible = "st,lis331dlh", "st,lis3lv02d";
		reg = <0x18>;
		Vdd-supply = <&lis3_reg>;
		Vdd_IO-supply = <&lis3_reg>;

		st,click-single-x;
		st,click-single-y;
		st,click-single-z;
		st,click-thresh-x = <10>;
		st,click-thresh-y = <10>;
		st,click-thresh-z = <10>;
		st,irq1-click;
		st,irq2-click;
		st,wakeup-x-lo;
		st,wakeup-x-hi;
		st,wakeup-y-lo;
		st,wakeup-y-hi;
		st,wakeup-z-lo;
		st,wakeup-z-hi;
		st,min-limit-x = <120>;
		st,min-limit-y = <120>;
		st,min-limit-z = <140>;
		st,max-limit-x = <550>;
		st,max-limit-y = <550>;
		st,max-limit-z = <750>;
	};


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

%YAML 1.2
---
$id: "http://devicetree.org/schemas/iio/accel/memsensing,msa311.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: MEMSensing digital 3-Axis accelerometer

maintainers:
  - Dmitry Rokosov <ddrokosov@sberdevices.ru>

description: |
  MSA311 is a tri-axial, low-g accelerometer with I2C digital output for
  sensitivity consumer applications. It has dynamical user selectable full
  scales range of +-2g/+-4g/+-8g/+-16g and allows acceleration measurements
  with output data rates from 1Hz to 1000Hz.
  Datasheet can be found at following URL
  https://cdn-shop.adafruit.com/product-files/5309/MSA311-V1.1-ENG.pdf

properties:
  compatible:
    const: memsensing,msa311

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdd-supply: true

required:
  - compatible
  - reg

additionalProperties: false

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

        accelerometer@62 {
            compatible = "memsensing,msa311";
            reg = <0x62>;
            interrupt-parent = <&gpio_intc>;
            interrupts = <29 IRQ_TYPE_EDGE_RISING>;
            vdd-supply = <&vcc_5v>;
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/murata,sca3300.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Murata SCA3300 Accelerometer

description: |
  3-axis industrial accelerometer with digital SPI interface
  https://www.murata.com/en-global/products/sensor/accel/sca3300

maintainers:
  - Tomas Melin <tomas.melin@vaisala.com>

properties:
  compatible:
    enum:
      - murata,sca3300
      - murata,scl3300

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 8000000

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        accelerometer@0 {
            compatible = "murata,sca3300";
            reg = <0x0>;
            spi-max-frequency = <4000000>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/accel/nxp,fxls8962af.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP FXLS8962AF/FXLS8964AF Accelerometer driver

maintainers:
  - Sean Nyekjaer <sean@geanix.com>

description: |
  NXP FXLS8962AF/FXLS8964AF Accelerometer driver that supports
  SPI and I2C interface.
    https://www.nxp.com/docs/en/data-sheet/FXLS8962AF.pdf
    https://www.nxp.com/docs/en/data-sheet/FXLS8964AF.pdf

properties:
  compatible:
    enum:
      - nxp,fxls8962af
      - nxp,fxls8964af

  reg:
    maxItems: 1

  vdd-supply:
    description: phandle to the regulator that provides power to the accelerometer

  interrupts:
    maxItems: 1

  interrupt-names:
    enum:
      - INT1
      - INT2

  drive-open-drain:
    type: boolean

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        /* Example for a I2C device node */
        accelerometer@62 {
            compatible = "nxp,fxls8962af";
            reg = <0x62>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "INT1";
        };
    };
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    spi0 {
        #address-cells = <1>;
        #size-cells = <0>;

        /* Example for a SPI device node */
        accelerometer@0 {
            compatible = "nxp,fxls8962af";
            reg = <0>;
            spi-max-frequency = <4000000>;
            interrupt-parent = <&gpio0>;
            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "INT1";
        };
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Generic IIO bindings for ADC channels

maintainers:
  - Jonathan Cameron <jic23@kernel.org>

description:
  A few properties are defined in a common way ADC channels.

properties:
  $nodename:
    pattern: "^channel(@[0-9a-f]+)?$"
    description:
      A channel index should match reg.

  reg:
    maxItems: 1

  label:
    $ref: /schemas/types.yaml#/definitions/string
    description: Unique name to identify which channel this is.

  bipolar:
    $ref: /schemas/types.yaml#/definitions/flag
    description: If provided, the channel is to be used in bipolar mode.

  diff-channels:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    maxItems: 2
    minItems: 2
    description:
      Many ADCs have dual Muxes to allow different input pins to be routed
      to both the positive and negative inputs of a differential ADC.
      The first value specifies the positive input pin, the second
      specifies the negative input pin.

  settling-time-us:
    description:
      Time between enabling the channel and first stable readings.

  oversampling-ratio:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Oversampling is used as replacement of or addition to the low-pass filter.
      In some cases, the desired filtering characteristics are a function the
      device design and can interact with other characteristics such as
      settling time.

additionalProperties: true


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2022 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad4130.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD4130 ADC device driver

maintainers:
  - Cosmin Tanislav <cosmin.tanislav@analog.com>

description: |
  Bindings for the Analog Devices AD4130 ADC. Datasheet can be found here:
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD4130-8.pdf

properties:
  compatible:
    enum:
      - adi,ad4130

  reg:
    maxItems: 1

  clocks:
    maxItems: 1
    description: phandle to the master clock (mclk)

  clock-names:
    items:
      - const: mclk

  interrupts:
    maxItems: 1

  interrupt-names:
    description: |
      Specify which interrupt pin should be configured as Data Ready / FIFO
      interrupt.
      Default if not supplied is int.
    enum:
      - int
      - clk
      - p2
      - dout

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  '#clock-cells':
    const: 0

  clock-output-names:
    maxItems: 1

  refin1-supply:
    description: refin1 supply. Can be used as reference for conversion.

  refin2-supply:
    description: refin2 supply. Can be used as reference for conversion.

  avdd-supply:
    description: AVDD voltage supply. Can be used as reference for conversion.

  iovdd-supply:
    description: IOVDD voltage supply. Used for the chip interface.

  spi-max-frequency:
    maximum: 5000000

  adi,ext-clk-freq-hz:
    description: Specify the frequency of the external clock.
    enum: [76800, 153600]
    default: 76800

  adi,bipolar:
    description: Specify if the device should be used in bipolar mode.
    type: boolean

  adi,vbias-pins:
    description: Analog inputs to apply a voltage bias of (AVDD − AVSS) / 2 to.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 16
    items:
      minimum: 0
      maximum: 15

required:
  - compatible
  - reg
  - interrupts

patternProperties:
  "^channel@([0-9a-f])$":
    type: object
    $ref: adc.yaml
    unevaluatedProperties: false

    properties:
      reg:
        description: The channel number.
        minimum: 0
        maximum: 15

      diff-channels:
        description: |
          Besides the analog inputs available, internal inputs can be used.
          16: Internal temperature sensor.
          17: AVSS
          18: Internal reference
          19: DGND
          20: (AVDD − AVSS)/6+
          21: (AVDD − AVSS)/6-
          22: (IOVDD − DGND)/6+
          23: (IOVDD − DGND)/6-
          24: (ALDO − AVSS)/6+
          25: (ALDO − AVSS)/6-
          26: (DLDO − DGND)/6+
          27: (DLDO − DGND)/6-
          28: V_MV_P
          29: V_MV_M
        items:
          minimum: 0
          maximum: 29

      adi,reference-select:
        description: |
          Select the reference source to use when converting on the
          specific channel. Valid values are:
          0: REFIN1(+)/REFIN1(−)
          1: REFIN2(+)/REFIN2(−)
          2: REFOUT/AVSS (Internal reference)
          3: AVDD/AVSS
          If not specified, REFIN1 is used.
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0

      adi,excitation-pin-0:
        description: |
          Analog input to apply excitation current to while the channel
          is active.
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 15
        default: 0

      adi,excitation-pin-1:
        description: |
          Analog input to apply excitation current to while this channel
          is active.
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 15
        default: 0

      adi,excitation-current-0-nanoamp:
        description: |
          Excitation current in nanoamps to be applied to pin specified in
          adi,excitation-pin-0 while this channel is active.
        enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000]
        default: 0

      adi,excitation-current-1-nanoamp:
        description: |
          Excitation current in nanoamps to be applied to pin specified in
          adi,excitation-pin-1 while this channel is active.
        enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000]
        default: 0

      adi,burnout-current-nanoamp:
        description: |
          Burnout current in nanoamps to be applied for this channel.
        enum: [0, 500, 2000, 4000]
        default: 0

      adi,buffered-positive:
        description: Enable buffered mode for positive input.
        type: boolean

      adi,buffered-negative:
        description: Enable buffered mode for negative input.
        type: boolean

    required:
      - reg
      - diff-channels

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      adc@0 {
        compatible = "adi,ad4130";
        reg = <0>;

        #address-cells = <1>;
        #size-cells = <0>;

        spi-max-frequency = <5000000>;
        interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
        interrupt-parent = <&gpio>;

        channel@0 {
          reg = <0>;

          adi,reference-select = <2>;

          /* AIN8, AIN9 */
          diff-channels = <8 9>;
        };

        channel@1 {
          reg = <1>;

          adi,reference-select = <2>;

          /* AIN10, AIN11 */
          diff-channels = <10 11>;
        };

        channel@2 {
          reg = <2>;

          adi,reference-select = <2>;

          /* Temperature Sensor, DGND */
          diff-channels = <16 19>;
        };

        channel@3 {
          reg = <3>;

          adi,reference-select = <2>;

          /* Internal reference, DGND */
          diff-channels = <18 19>;
        };

        channel@4 {
          reg = <4>;

          adi,reference-select = <2>;

          /* DGND, DGND */
          diff-channels = <19 19>;
        };
      };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7091r5.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7091R5 4-Channel 12-Bit ADC

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices AD7091R5 4-Channel 12-Bit ADC
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7091r-5.pdf

properties:
  compatible:
    enum:
      - adi,ad7091r5

  reg:
    maxItems: 1

  vref-supply:
    description:
      Phandle to the vref power supply

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

        adc@2f {
                compatible = "adi,ad7091r5";
                reg = <0x2f>;

                interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
                interrupt-parent = <&gpio>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7124.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7124 ADC device driver

maintainers:
  - Stefan Popa <stefan.popa@analog.com>

description: |
  Bindings for the Analog Devices AD7124 ADC device. Datasheet can be
  found here:
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD7124-8.pdf

properties:
  compatible:
    enum:
      - adi,ad7124-4
      - adi,ad7124-8

  reg:
    description: SPI chip select number for the device
    maxItems: 1

  clocks:
    maxItems: 1
    description: phandle to the master clock (mclk)

  clock-names:
    items:
      - const: mclk

  interrupts:
    description: IRQ line for the ADC
    maxItems: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  refin1-supply:
    description: refin1 supply can be used as reference for conversion.

  refin2-supply:
    description: refin2 supply can be used as reference for conversion.

  avdd-supply:
    description: avdd supply can be used as reference for conversion.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts

patternProperties:
  "^channel@([0-9]|1[0-5])$":
    $ref: "adc.yaml"
    type: object
    description: |
      Represents the external channels which are connected to the ADC.

    properties:
      reg:
        description: |
          The channel number. It can have up to 8 channels on ad7124-4
          and 16 channels on ad7124-8, numbered from 0 to 15.
        items:
          minimum: 0
          maximum: 15

      adi,reference-select:
        description: |
          Select the reference source to use when converting on
          the specific channel. Valid values are:
          0: REFIN1(+)/REFIN1(−).
          1: REFIN2(+)/REFIN2(−).
          3: AVDD
          If this field is left empty, internal reference is selected.
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 3]

      diff-channels: true

      bipolar: true

      adi,buffered-positive:
        description: Enable buffered mode for positive input.
        type: boolean

      adi,buffered-negative:
        description: Enable buffered mode for negative input.
        type: boolean

    required:
      - reg
      - diff-channels

    additionalProperties: false

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      adc@0 {
        compatible = "adi,ad7124-4";
        reg = <0>;
        spi-max-frequency = <5000000>;
        interrupts = <25 2>;
        interrupt-parent = <&gpio>;
        refin1-supply = <&adc_vref>;
        clocks = <&ad7124_mclk>;
        clock-names = "mclk";

        #address-cells = <1>;
        #size-cells = <0>;

        channel@0 {
          reg = <0>;
          diff-channels = <0 1>;
          adi,reference-select = <0>;
          adi,buffered-positive;
        };

        channel@1 {
          reg = <1>;
          bipolar;
          diff-channels = <2 3>;
          adi,reference-select = <0>;
          adi,buffered-positive;
          adi,buffered-negative;
        };

        channel@2 {
          reg = <2>;
          diff-channels = <4 5>;
        };

        channel@3 {
          reg = <3>;
          diff-channels = <6 7>;
        };
      };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7192.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7192 ADC device driver

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Bindings for the Analog Devices AD7192 ADC device. Datasheet can be
  found here:
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7192.pdf

properties:
  compatible:
    enum:
      - adi,ad7190
      - adi,ad7192
      - adi,ad7193
      - adi,ad7195

  reg:
    maxItems: 1

  spi-cpol: true

  spi-cpha: true

  clocks:
    maxItems: 1
    description: phandle to the master clock (mclk)

  clock-names:
    items:
      - const: mclk

  interrupts:
    maxItems: 1

  dvdd-supply:
    description: DVdd voltage supply

  avdd-supply:
    description: AVdd voltage supply

  adi,rejection-60-Hz-enable:
    description: |
      This bit enables a notch at 60 Hz when the first notch of the sinc
      filter is at 50 Hz. When REJ60 is set, a filter notch is placed at
      60 Hz when the sinc filter first notch is at 50 Hz. This allows
      simultaneous 50 Hz/ 60 Hz rejection.
    type: boolean

  adi,refin2-pins-enable:
    description: |
      External reference applied between the P1/REFIN2(+) and P0/REFIN2(−) pins.
    type: boolean

  adi,buffer-enable:
    description: |
      Enables the buffer on the analog inputs. If cleared, the analog inputs
      are unbuffered, lowering the power consumption of the device. If this
      bit is set, the analog inputs are buffered, allowing the user to place
      source impedances on the front end without contributing gain errors to
      the system.
    type: boolean

  adi,burnout-currents-enable:
    description: |
      When this bit is set to 1, the 500 nA current sources in the signal
      path are enabled. When BURN = 0, the burnout currents are disabled.
      The burnout currents can be enabled only when the buffer is active
      and when chop is disabled.
    type: boolean

  bipolar:
    description: see Documentation/devicetree/bindings/iio/adc/adc.yaml
    type: boolean

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts
  - dvdd-supply
  - avdd-supply
  - spi-cpol
  - spi-cpha

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi0 {
      #address-cells = <1>;
      #size-cells = <0>;

      adc@0 {
        compatible = "adi,ad7192";
        reg = <0>;
        spi-max-frequency = <1000000>;
        spi-cpol;
        spi-cpha;
        clocks = <&ad7192_mclk>;
        clock-names = "mclk";
        interrupts = <25 0x2>;
        interrupt-parent = <&gpio>;
        dvdd-supply = <&dvdd>;
        avdd-supply = <&avdd>;

        adi,refin2-pins-enable;
        adi,rejection-60-Hz-enable;
        adi,buffer-enable;
        adi,burnout-currents-enable;
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7280a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7280a Lithium Ion Battery Monitoring System

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>
  - Jonathan Cameron <jic23@kernel.org>

description: |
  Bindings for the Analog Devices AD7280a Battery Monitoring System.
  Used in devices such as hybrid electric cars, battery backup and power tools.
  Multiple chips can be daisy chained and accessed via a single SPI interface.
  Data sheet found here:
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD7280A.pdf

properties:
  compatible:
    const: adi,ad7280a

  reg:
    maxItems: 1

  interrupts:
    description: IRQ line for the ADC
    maxItems: 1

  adi,voltage-alert-last-chan:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Allows limiting of scope of which channels are considered for voltage
      alerts, typically because not all are wired to anything. Only applies to
      last device in the daisy chain.
    default: 5
    enum: [3, 4, 5]

  adi,acquisition-time-ns:
    description:
      Additional time may be needed to charge the sampling capacitors depending
      on external writing.
    default: 400
    enum: [400, 800, 1200, 1600]

  adi,thermistor-termination:
    type: boolean
    description:
      Enable the thermistor termination function.

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      adc@0 {
        compatible = "adi,ad7280a";
        reg = <0>;
        spi-max-frequency = <700000>;
        interrupt-parent = <&gpio>;
        interrupts = <25 2>;
        adi,thermistor-termination;
        adi,acquisition-time-ns = <800>;
        adi,voltage-alert-last-chan = <5>;
      };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7291.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: AD7291 8-Channel, I2C, 12-Bit SAR ADC with Temperature Sensor

maintainers:
  - Michael Auchter <michael.auchter@ni.com>

description: |
  Analog Devices AD7291 8-Channel I2C 12-Bit SAR ADC with Temperature Sensor
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7291.pdf

properties:
  compatible:
    enum:
      - adi,ad7291

  reg:
    maxItems: 1

  vref-supply:
    description: |
      The regulator supply for ADC reference voltage.

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      ad7291: adc@0 {
        compatible = "adi,ad7291";
        reg = <0>;
        vref-supply = <&adc_vref>;
      };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7292.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7292 10-Bit Monitor and Control System

maintainers:
  - Marcelo Schmitt <marcelo.schmitt1@gmail.com>

description: |
  Analog Devices AD7292 10-Bit Monitor and Control System with ADC, DACs,
  Temperature Sensor, and GPIOs

  Specifications about the part can be found at:
    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7292.pdf

properties:
  compatible:
    enum:
      - adi,ad7292

  reg:
    maxItems: 1

  vref-supply:
    description: |
      The regulator supply for ADC and DAC reference voltage.

  spi-cpha: true

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

required:
  - compatible
  - reg
  - spi-cpha

patternProperties:
  "^channel@[0-7]$":
    $ref: "adc.yaml"
    type: object
    description: |
      Represents the external channels which are connected to the ADC.

    properties:
      reg:
        description: |
          The channel number. It can have up to 8 channels numbered from 0 to 7.
        items:
          - minimum: 0
            maximum: 7

      diff-channels: true

    required:
      - reg

    additionalProperties: true

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      ad7292: adc@0 {
        compatible = "adi,ad7292";
        reg = <0>;
        spi-max-frequency = <25000000>;
        vref-supply = <&adc_vref>;
        spi-cpha;

        #address-cells = <1>;
        #size-cells = <0>;

        channel@0 {
          reg = <0>;
          diff-channels = <0 1>;
        };
        channel@2 {
          reg = <2>;
        };
        channel@3 {
          reg = <3>;
        };
        channel@4 {
          reg = <4>;
        };
        channel@5 {
          reg = <5>;
        };
        channel@6 {
          reg = <6>;
        };
        channel@7 {
          reg = <7>;
        };
      };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7298.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7298 ADC

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Bindings for the Analog Devices AD7298 ADC device. Datasheet can be
  found here:
    https://www.analog.com/en/products/ad7298.html

properties:
  compatible:
    const: adi,ad7298

  reg:
    maxItems: 1

  vref-supply: true
  vdd-supply: true

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      adc@0 {
        compatible = "adi,ad7298";
        reg = <0>;
        spi-max-frequency = <5000000>;
        vref-supply = <&adc_vref>;
      };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7476.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: AD7476 and similar simple SPI ADCs from multiple manufacturers.

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  A lot of simple SPI ADCs have very straight forward interfaces.
  They typically don't provide a MOSI pin, simply reading out data
  on MISO when the clock toggles.

properties:
  compatible:
    enum:
      - adi,ad7091
      - adi,ad7091r
      - adi,ad7273
      - adi,ad7274
      - adi,ad7276
      - adi,ad7277
      - adi,ad7278
      - adi,ad7466
      - adi,ad7467
      - adi,ad7468
      - adi,ad7475
      - adi,ad7476
      - adi,ad7476a
      - adi,ad7477
      - adi,ad7477a
      - adi,ad7478
      - adi,ad7478a
      - adi,ad7495
      - adi,ad7910
      - adi,ad7920
      - adi,ad7940
      - ti,adc081s
      - ti,adc101s
      - ti,adc121s
      - ti,ads7866
      - ti,ads7867
      - ti,ads7868
      - lltc,ltc2314-14

  reg:
    maxItems: 1

  vcc-supply:
    description:
      Main powersupply voltage for the chips, sometimes referred to as VDD on
      datasheets.  If there is no separate vref-supply, then this is needed
      to establish channel scaling.

  vdrive-supply:
    description:
      Some devices have separate supply for their digital control side.

  vref-supply:
    description:
      Some devices have a specific reference voltage supplied on a different pin
      to the other supplies. Needed to be able to establish channel scaling
      unless there is also an internal reference available (e.g. ad7091r)

  adi,conversion-start-gpios:
    description: A GPIO used to trigger the start of a conversion
    maxItems: 1

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

  # Devices where reference is vcc
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,ad7091
              - adi,ad7276
              - adi,ad7277
              - adi,ad7278
              - adi,ad7466
              - adi,ad7467
              - adi,ad7468
              - adi,ad7940
              - ti,adc081s
              - ti,adc101s
              - ti,adc121s
              - ti,ads7866
              - ti,ads7868
    then:
      required:
        - vcc-supply
  # Devices with a vref
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,ad7091r
              - adi,ad7273
              - adi,ad7274
              - adi,ad7475
              - lltc,ltc2314-14
    then:
      properties:
        vref-supply: true
    else:
      properties:
        vref-supply: false
  # Devices with a vref where it is not optional
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,ad7273
              - adi,ad7274
              - adi,ad7475
              - lltc,ltc2314-14
    then:
      required:
        - vref-supply
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,ad7475
              - adi,ad7495
    then:
      properties:
        vdrive-supply: true
    else:
      properties:
        vdrive-supply: false
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,ad7091
              - adi,ad7091r
    then:
      properties:
        adi,conversion-start-gpios: true
    else:
      properties:
        adi,conversion-start-gpios: false

unevaluatedProperties: false

examples:
  - |
    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      adc@0 {
        compatible = "adi,ad7091r";
        reg = <0>;
        spi-max-frequency = <5000000>;
        vcc-supply = <&adc_vcc>;
        vref-supply = <&adc_vref>;
      };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7606 Simultaneous Sampling ADC

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices AD7606 Simultaneous Sampling ADC
  https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf

properties:
  compatible:
    enum:
      - adi,ad7605-4
      - adi,ad7606-8
      - adi,ad7606-6
      - adi,ad7606-4
      - adi,ad7606b
      - adi,ad7616

  reg:
    maxItems: 1

  spi-cpha: true

  spi-cpol: true

  avcc-supply: true

  interrupts:
    maxItems: 1

  adi,conversion-start-gpios:
    description:
      Must be the device tree identifier of the CONVST pin.
      This logic input is used to initiate conversions on the analog
      input channels. As the line is active high, it should be marked
      GPIO_ACTIVE_HIGH.
    maxItems: 1

  reset-gpios:
    description:
      Must be the device tree identifier of the RESET pin. If specified,
      it will be asserted during driver probe. As the line is active high,
      it should be marked GPIO_ACTIVE_HIGH.
    maxItems: 1

  standby-gpios:
    description:
      Must be the device tree identifier of the STBY pin. This pin is used
      to place the AD7606 into one of two power-down modes, Standby mode or
      Shutdown mode. As the line is active low, it should be marked
      GPIO_ACTIVE_LOW.
    maxItems: 1

  adi,first-data-gpios:
    description:
      Must be the device tree identifier of the FRSTDATA pin.
      The FRSTDATA output indicates when the first channel, V1, is
      being read back on either the parallel, byte or serial interface.
      As the line is active high, it should be marked GPIO_ACTIVE_HIGH.
    maxItems: 1

  adi,range-gpios:
    description:
      Must be the device tree identifier of the RANGE pin. The polarity on
      this pin determines the input range of the analog input channels. If
      this pin is tied to a logic high, the analog input range is ±10V for
      all channels. If this pin is tied to a logic low, the analog input range
      is ±5V for all channels. As the line is active high, it should be marked
      GPIO_ACTIVE_HIGH.
    maxItems: 1

  adi,oversampling-ratio-gpios:
    description:
      Must be the device tree identifier of the over-sampling
      mode pins. As the line is active high, it should be marked
      GPIO_ACTIVE_HIGH.
    maxItems: 3

  adi,sw-mode:
    description:
      Software mode of operation, so far available only for ad7616 and ad7606b.
      It is enabled when all three oversampling mode pins are connected to
      high level. The device is configured by the corresponding registers. If the
      adi,oversampling-ratio-gpios property is defined, then the driver will set the
      oversampling gpios to high. Otherwise, it is assumed that the pins are hardwired
      to VDD.
    type: boolean

required:
  - compatible
  - reg
  - spi-cpha
  - avcc-supply
  - interrupts
  - adi,conversion-start-gpios

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        adc@0 {
                compatible = "adi,ad7606-8";
                reg = <0>;
                spi-max-frequency = <1000000>;
                spi-cpol;
                spi-cpha;

                avcc-supply = <&adc_vref>;

                interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
                interrupt-parent = <&gpio>;

                adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
                reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
                adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
                adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
                                               <&gpio 23 GPIO_ACTIVE_HIGH>,
                                               <&gpio 26 GPIO_ACTIVE_HIGH>;
                standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
                adi,sw-mode;
        };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7768-1 ADC device driver

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Datasheet at:
    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf

properties:
  compatible:
    const: adi,ad7768-1

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    const: mclk

  interrupts:
    maxItems: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  vref-supply:
    description:
      ADC reference voltage supply

  adi,sync-in-gpios:
    maxItems: 1
    description:
      Enables synchronization of multiple devices that require simultaneous
      sampling. A pulse is always required if the configuration is changed
      in any way, for example if the filter decimation rate changes.
      As the line is active low, it should be marked GPIO_ACTIVE_LOW.

  reset-gpios:
    maxItems: 1

  spi-cpol: true

  spi-cpha: true

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

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - vref-supply
  - spi-cpol
  - spi-cpha
  - adi,sync-in-gpios

patternProperties:
  "^channel@([0-9]|1[0-5])$":
    type: object
    description: |
      Represents the external channels which are connected to the device.

    properties:
      reg:
        maxItems: 1
        description: |
          The channel number.

      label:
        description: |
          Unique name to identify which channel this is.
    required:
      - reg
    additionalProperties: false

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

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

        adc@0 {
            compatible = "adi,ad7768-1";
            reg = <0>;
            spi-max-frequency = <2000000>;
            spi-cpol;
            spi-cpha;
            vref-supply = <&adc_vref>;
            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
            interrupt-parent = <&gpio>;
            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
            clocks = <&ad7768_mclk>;
            clock-names = "mclk";

            #address-cells = <1>;
            #size-cells = <0>;

            channel@0 {
                reg = <0>;
                label = "channel_0";
            };
        };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7780.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7170/AD7171/AD7780/AD7781 analog to digital converters

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  The ad7780 is a sigma-delta analog to digital converter. This driver provides
  reading voltage values and status bits from both the ad778x and ad717x series.
  Its interface also allows writing on the FILTER and GAIN GPIO pins on the
  ad778x.

  Specifications on the converters can be found at:
    AD7170:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7170.pdf
    AD7171:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7171.pdf
    AD7780:
      https://www.analog.com/media/en/technical-documentation/data-sheets/ad7780.pdf
    AD7781:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7781.pdf

properties:
  compatible:
    enum:
      - adi,ad7170
      - adi,ad7171
      - adi,ad7780
      - adi,ad7781

  reg:
    maxItems: 1

  avdd-supply:
    description:
      The regulator supply for the ADC reference voltage.

  powerdown-gpios:
    description:
      Must be the device tree identifier of the PDRST pin. If
      specified, it will be asserted during driver probe. As the
      line is active high, it should be marked GPIO_ACTIVE_HIGH.
    maxItems: 1

  adi,gain-gpios:
    description:
      Must be the device tree identifier of the GAIN pin. Only for
      the ad778x chips. If specified, it will be asserted during
      driver probe. As the line is active low, it should be marked
      GPIO_ACTIVE_LOW.
    maxItems: 1

  adi,filter-gpios:
    description:
      Must be the device tree identifier of the FILTER pin. Only
      for the ad778x chips. If specified, it will be asserted
      during driver probe. As the line is active low, it should be
      marked GPIO_ACTIVE_LOW.
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    spi0 {
        #address-cells = <1>;
        #size-cells = <0>;

        adc@0 {
            compatible = "adi,ad7780";
            reg = <0>;

            avdd-supply      = <&vdd_supply>;
            powerdown-gpios  = <&gpio0 12 GPIO_ACTIVE_HIGH>;
            adi,gain-gpios   = <&gpio1  5 GPIO_ACTIVE_LOW>;
            adi,filter-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7923.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7923 and similars with 4 and 8 Channel ADCs.

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices AD7904, AD7914, AD7923, AD7924 4 Channel ADCs, and AD7908,
   AD7918, AD7927, AD7928 8 Channels ADCs.

  Specifications about the part can be found at:
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD7923.pdf
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD7904_7914_7924.pdf
    https://www.analog.com/media/en/technical-documentation/data-sheets/AD7908_7918_7928.pdf

properties:
  compatible:
    oneOf:
      - enum:
          - adi,ad7904
          - adi,ad7908
          - adi,ad7914
          - adi,ad7918
          - adi,ad7923
          - adi,ad7928
      - const: adi,ad7924
        deprecated: true
      - items:
          - const: adi,ad7924
          - const: adi,ad7923
      - items:
          - const: adi,ad7927
          - const: adi,ad7928

  reg:
    maxItems: 1

  refin-supply:
    description: |
      The regulator supply for ADC reference voltage.

  adi,range-double:
    description: Sets the analog input range from 0 to 2xVREF.
    type: boolean

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      ad7928: adc@0 {
        compatible = "adi,ad7928";
        reg = <0>;
        spi-max-frequency = <25000000>;
        refin-supply = <&adc_vref>;

        #address-cells = <1>;
        #size-cells = <0>;
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad7949.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD7949/AD7682/AD7689 analog to digital converters

maintainers:
  - Charles-Antoine Couret <charles-antoine.couret@essensium.com>

description: |
  Specifications on the converters can be found at:
    AD7949:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7949.pdf
    AD7682/AD7698:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7682_7689.pdf

properties:
  compatible:
    enum:
      - adi,ad7682
      - adi,ad7689
      - adi,ad7949

  reg:
    maxItems: 1

  vrefin-supply:
    description:
      Buffered ADC reference voltage supply.

  vref-supply:
    description:
      Unbuffered ADC reference voltage supply.

  adi,internal-ref-microvolt:
    description: |
      Internal reference voltage selection in microvolts.

      If no internal reference is specified, the channel will default to the
      external reference defined by vrefin-supply (or vref-supply).
      vrefin-supply will take precedence over vref-supply if both are defined.

      If no supplies are defined, the reference selection will default to
      4096mV internal reference.

    enum: [2500000, 4096000]
    default: 4096000

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

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        adc@0 {
            #address-cells = <1>;
            #size-cells = <0>;

            compatible = "adi,ad7949";
            reg = <0>;
            vref-supply = <&vdd_supply>;
        };

        adc@1 {
            #address-cells = <1>;
            #size-cells = <0>;

            compatible = "adi,ad7949";
            reg = <1>;
            vrefin-supply = <&vdd_supply>;
        };

        adc@2 {
            #address-cells = <1>;
            #size-cells = <0>;

            compatible = "adi,ad7949";
            reg = <2>;
            adi,internal-ref-microvolt = <4096000>;
        };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad799x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD799x analog to digital converters

maintainers:
  - Michael Hennerich <Michael.Hennerich@analog.com>

description: |
    Support for Analog Devices AD7991, AD7992, AD7993, AD7994, AD7995, AD7997, AD7998,
    AD7999 and similar analog to digital converters.
    Specifications on the converters can be found at:
    AD7991, AD7995, AD7999:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7991_7995_7999.pdf
    AD7992:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7992.pdf
    AD7993, AD7994:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7993_7994.pdf
    AD7997, AD7998:
      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7997_7998.pdf

properties:
  compatible:
    enum:
      - adi,ad7991
      - adi,ad7992
      - adi,ad7993
      - adi,ad7994
      - adi,ad7995
      - adi,ad7997
      - adi,ad7998
      - adi,ad7999

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vcc-supply:
    description:
      ADC power supply

  vref-supply:
    description:
      ADC reference voltage supply, optional for AD7991, AD7995 and AD7999

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

       adc1: adc@28 {
               reg = <0x28>;
               compatible = "adi,ad7991";
               interrupts = <13 2>;
               interrupt-parent = <&gpio6>;

               vcc-supply = <&vcc_3v3>;
               vref-supply = <&adc_vref>;
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,ad9467.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD9467 and similar High-Speed ADCs

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  The AD9467 and the parts similar with it, are high-speed analog-to-digital
  converters (ADCs), operating in the range of 100 to 500 mega samples
  per second (MSPS). Some parts support higher MSPS and some
  lower MSPS, suitable for the intended application of each part.

  All the parts support the register map described by Application Note AN-877
   https://www.analog.com/media/en/technical-documentation/application-notes/AN-877.pdf

  https://www.analog.com/media/en/technical-documentation/data-sheets/AD9265.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/AD9467.pdf

properties:
  compatible:
    enum:
      - adi,ad9265
      - adi,ad9434
      - adi,ad9467

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: adc-clk

  powerdown-gpios:
    description:
      Pin that controls the powerdown mode of the device.
    maxItems: 1

  reset-gpios:
    description:
      Reset pin for the device.
    maxItems: 1

required:
  - compatible
  - reg
  - clocks
  - clock-names

additionalProperties: false

examples:
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        adc@0 {
          compatible = "adi,ad9467";
          reg = <0>;
          clocks = <&adc_clk>;
          clock-names = "adc-clk";
        };
    };
...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,axi-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AXI ADC IP core

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices Generic AXI ADC IP core for interfacing an ADC device
  with a high speed serial (JESD204B/C) or source synchronous parallel
  interface (LVDS/CMOS).
  Usually, some other interface type (i.e SPI) is used as a control
  interface for the actual ADC, while this IP core will interface
  to the data-lines of the ADC and handle the streaming of data into
  memory via DMA.

  https://wiki.analog.com/resources/fpga/docs/axi_adc_ip

properties:
  compatible:
    enum:
      - adi,axi-adc-10.0.a

  reg:
    maxItems: 1

  dmas:
    maxItems: 1

  dma-names:
    items:
      - const: rx

  adi,adc-dev:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      A reference to a the actual ADC to which this FPGA ADC interfaces to.

required:
  - compatible
  - dmas
  - reg
  - adi,adc-dev

additionalProperties: false

examples:
  - |
    axi-adc@44a00000 {
          compatible = "adi,axi-adc-10.0.a";
          reg = <0x44a00000 0x10000>;
          dmas = <&rx_dma 0>;
          dma-names = "rx";

          adi,adc-dev = <&spi_adc>;
    };
...