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

title: Microchip mcp4531 and similar potentiometers.

maintainers:
  - Peter Rosin <peda@axentia.se>

description: |
  Family of I2C digital potentiometer
  Datasheets at:
  * volatile https://ww1.microchip.com/downloads/en/DeviceDoc/22096b.pdf
  * non-volatile https://ww1.microchip.com/downloads/en/DeviceDoc/22107B.pdf
  Part numbers as follows: mcp4ABC-XXX where
  A =   5 (1 wiper), 6 (2 wipers)
  B =   3 (7-bit, volatile), 4 (7-bit, non-volatile),
        5 (8-bit, volatile), 6 (8-bit, non-volatile),
  C:    1 (potentiometer), 2 (rheostat)
  XXX = 502 (5 kOhms), 103 (10 kOhms), 503 (50 kOhms), 104 (100 kOhms)

properties:
  compatible:
    enum:
        # Ordering reflects part number + range, so 502 < 103 etc
      - microchip,mcp4531-502
      - microchip,mcp4531-103
      - microchip,mcp4531-503
      - microchip,mcp4531-104
      - microchip,mcp4532-502
      - microchip,mcp4532-103
      - microchip,mcp4532-503
      - microchip,mcp4532-104
      - microchip,mcp4541-502
      - microchip,mcp4541-103
      - microchip,mcp4541-503
      - microchip,mcp4541-104
      - microchip,mcp4542-502
      - microchip,mcp4542-103
      - microchip,mcp4542-503
      - microchip,mcp4542-104
      - microchip,mcp4551-502
      - microchip,mcp4551-103
      - microchip,mcp4551-503
      - microchip,mcp4551-104
      - microchip,mcp4552-502
      - microchip,mcp4552-103
      - microchip,mcp4552-503
      - microchip,mcp4552-104
      - microchip,mcp4561-502
      - microchip,mcp4561-103
      - microchip,mcp4561-503
      - microchip,mcp4561-104
      - microchip,mcp4562-502
      - microchip,mcp4562-103
      - microchip,mcp4562-503
      - microchip,mcp4562-104
      - microchip,mcp4631-502
      - microchip,mcp4631-103
      - microchip,mcp4631-503
      - microchip,mcp4631-104
      - microchip,mcp4632-502
      - microchip,mcp4632-103
      - microchip,mcp4632-503
      - microchip,mcp4632-104
      - microchip,mcp4641-502
      - microchip,mcp4641-103
      - microchip,mcp4641-503
      - microchip,mcp4641-104
      - microchip,mcp4642-502
      - microchip,mcp4642-103
      - microchip,mcp4642-503
      - microchip,mcp4642-104
      - microchip,mcp4651-502
      - microchip,mcp4651-103
      - microchip,mcp4651-503
      - microchip,mcp4651-104
      - microchip,mcp4652-502
      - microchip,mcp4652-103
      - microchip,mcp4652-503
      - microchip,mcp4652-104
      - microchip,mcp4661-502
      - microchip,mcp4661-103
      - microchip,mcp4661-503
      - microchip,mcp4661-104
      - microchip,mcp4662-502
      - microchip,mcp4662-103
      - microchip,mcp4662-503
      - microchip,mcp4662-104

  reg:
    maxItems: 1

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

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        dpot: dpot@28 {
            compatible = "microchip,mcp4651-104";
            reg = <0x28>;
            #io-channel-cells = <1>;
        };
    };
...


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

title: Texas Instruments LMP91000 series of potentiostats with I2C control

maintainers:
  - Matt Ranostay <matt.ranostay@konsulko.com>

description: |
  Typically used as a signal conditioner for chemical sensors.
  LMP91000: https://www.ti.com/lit/ds/symlink/lmp91000.pdf
  LMP91002: https://www.ti.com/lit/ds/symlink/lmp91002.pdf

properties:
  compatible:
    enum:
      - ti,lmp91000
      - ti,lmp91002

  reg:
    maxItems: 1

  io-channels:
    maxItems: 1

  ti,external-tia-resistor:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      If the property ti,tia-gain-ohm is not defined this needs to be set to
      signal that an external resistor value is being used.

  ti,tia-gain-ohm:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [2750, 3500, 7000, 14000, 35000, 120000, 350000]
    description:
      Internal resistor for the transimpedance amplifier.

  ti,rload-ohm:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [10, 33, 50, 100]
    description:
      Internal resistor load applied to the gas sensor.
      Default 100 Ohms.

required:
  - compatible
  - reg
  - io-channels

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        lmp91000@48 {
            compatible = "ti,lmp91000";
            reg = <0x48>;
            ti,tia-gain-ohm = <7000>;
            ti,rload-ohm = <100>;
            io-channels = <&adc>;
        };
    };
...

repo_name: angery/linux


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

title: All Sensors DLH series low voltage digital pressure sensors

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

description: |
  Bindings for the All Sensors DLH series pressure sensors.

  Specifications about the sensors can be found at:
    https://www.allsensors.com/cad/DS-0355_Rev_B.PDF

properties:
  compatible:
    enum:
      - asc,dlhl60d
      - asc,dlhl60g

  reg:
    description: I2C device address
    maxItems: 1

  interrupts:
    description: interrupt mapping for EOC(data ready) pin
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

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

        pressure@29 {
            compatible = "asc,dlhl60d";
            reg = <0x29>;
            interrupt-parent = <&gpio0>;
            interrupts = <10 IRQ_TYPE_EDGE_RISING>;
        };
    };
...


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

title: BMP085/BMP180/BMP280/BME280/BMP380 pressure iio sensors

maintainers:
  - Andreas Klinger <ak@it-klinger.de>

description: |
  Pressure, temperature and humidity iio sensors with i2c and spi interfaces

  Specifications about the sensor can be found at:
    https://www.bosch-sensortec.com/bst/products/all_products/bmp180
    https://www.bosch-sensortec.com/bst/products/all_products/bmp280
    https://www.bosch-sensortec.com/bst/products/all_products/bme280
    https://www.bosch-sensortec.com/bst/products/all_products/bmp380

properties:
  compatible:
    enum:
      - bosch,bmp085
      - bosch,bmp180
      - bosch,bmp280
      - bosch,bme280
      - bosch,bmp380

  reg:
    maxItems: 1

  vddd-supply:
    description:
      digital voltage regulator (see regulator/regulator.txt)

  vdda-supply:
    description:
      analog voltage regulator (see regulator/regulator.txt)

  reset-gpios:
    description:
      A GPIO line handling reset of the sensor. As the line is active low,
      it should be marked GPIO_ACTIVE_LOW (see gpio/gpio.txt)
    maxItems: 1

  interrupts:
    description:
      interrupt mapping for IRQ (BMP085 only)
    maxItems: 1

required:
  - compatible
  - vddd-supply
  - vdda-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c0 {
      #address-cells = <1>;
      #size-cells = <0>;
      pressure@77 {
          compatible = "bosch,bmp085";
          reg = <0x77>;
          interrupt-parent = <&gpio0>;
          interrupts = <25 IRQ_TYPE_EDGE_RISING>;
          reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
          vddd-supply = <&foo>;
          vdda-supply = <&bar>;
      };
    };


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

title: HopeRF HP03 digital pressure/temperature sensors

maintainers:
  - Marek Vasut <marex@denx.de>

description: |
  Digital pressure and temperature sensor with an I2C interface.

properties:
  compatible:
    const: hoperf,hp03

  reg:
    maxItems: 1

  xclr-gpios:
    description:
      The XCLR pin is a reset of the ADC in the chip, it must be pulled
      HI before the conversion and readout of the value from the ADC
      registers and pulled LO afterward.
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

        pressure@77 {
            compatible = "hoperf,hp03";
            reg = <0x77>;
            xclr-gpios = <&portc 0 0x0>;
        };
    };
...


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

title: Measurement Specialities ms5611 and similar pressure sensors

maintainers:
  - Tomasz Duszynski <tduszyns@gmail.com>

description: |
  Pressure sensors from MEAS Switzerland with SPI and I2C bus interfaces.

properties:
  compatible:
    enum:
      - meas,ms5607
      - meas,ms5611

  reg:
    maxItems: 1

  vdd-supply: true

  spi-max-frequency:
    maximum: 20000000

required:
  - compatible
  - reg

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

unevaluatedProperties: false

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

        pressure@77 {
            compatible = "meas,ms5607";
            reg = <0x77>;
            vdd-supply = <&ldo_3v3_gnss>;
        };
    };
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        pressure@0 {
            compatible = "meas,ms5611";
            reg = <0>;
            vdd-supply = <&ldo_3v3_gnss>;
            spi-max-frequency = <20000000>;
        };
    };
...


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

title: Murata ZPA2326 pressure sensor

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

description: |
  Pressure sensor from Murata with SPI and I2C bus interfaces.

properties:
  compatible:
    const: murata,zpa2326

  reg:
    maxItems: 1

  vdd-supply: true
  vref-supply: true

  interrupts:
    maxItems: 1

  spi-max-frequency:
    maximum: 1000000

required:
  - compatible
  - reg

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

unevaluatedProperties: false

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

        pressure@5c {
            compatible = "murata,zpa2326";
            reg = <0x5c>;
            interrupt-parent = <&gpio>;
            interrupts = <12>;
            vdd-supply = <&ldo_1v8_gnss>;
        };
    };
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        pressure@0 {
            compatible = "murata,zpa2326";
            reg = <0>;
            spi-max-frequency = <500000>;
        };
    };
...


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

title: Austrian Microsystems AS3935 Franklin lightning sensor

maintainers:
  - Matt Ranostay <matt.ranostay@konsulko.com>

description:
  This lightening distance sensor uses an I2C or SPI interface. The
  binding currently only covers the SPI option.

properties:
  compatible:
    const: ams,as3935

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 2000000

  spi-cpha: true

  interrupts:
    maxItems: 1

  ams,tuning-capacitor-pf:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Calibration tuning capacitor stepping value. This will require using
      the calibration data from the manufacturer.
    minimum: 0
    maximum: 120

  ams,nflwdth:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Set the noise and watchdog threshold register on startup. This will
      need to set according to the noise from the MCU board, and possibly
      the local environment. Refer to the datasheet for the threshold settings.

required:
  - compatible
  - reg
  - spi-cpha
  - interrupts

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

unevaluatedProperties: false

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

    lightning@0 {
            compatible = "ams,as3935";
            reg = <0>;
            spi-max-frequency = <400000>;
            spi-cpha;
            interrupt-parent = <&gpio1>;
            interrupts = <16 1>;
            ams,tuning-capacitor-pf = <80>;
            ams,nflwdth = <0x44>;
        };
    };
...


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

title: Devantech SRF04 and Maxbotix mb1000 ultrasonic range finder

maintainers:
  - Andreas Klinger <ak@it-klinger.de>

description: |
  Bit-banging driver using two GPIOs:
  - trigger-gpio is raised by the driver to start sending out an ultrasonic
    burst
  - echo-gpio is held high by the sensor after sending ultrasonic burst
    until it is received once again

  Specifications about the devices can be found at:
  https://www.robot-electronics.co.uk/htm/srf04tech.htm

  https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf

properties:
  compatible:
    enum:
      - devantech,srf04
      - maxbotix,mb1000
      - maxbotix,mb1010
      - maxbotix,mb1020
      - maxbotix,mb1030
      - maxbotix,mb1040

  trig-gpios:
    description:
      Definition of the GPIO for the triggering (output)
      This GPIO is set for about 10 us by the driver to tell the device it
      should initiate the measurement cycle.
      See Documentation/devicetree/bindings/gpio/gpio.txt for information
      on how to specify a consumer gpio.
    maxItems: 1

  echo-gpios:
    description:
      Definition of the GPIO for the echo (input)
      This GPIO is set by the device as soon as an ultrasonic burst is sent
      out and reset when the first echo is received.
      Thus this GPIO is set while the ultrasonic waves are doing one round
      trip.
      It needs to be an GPIO which is able to deliver an interrupt because
      the time between two interrupts is measured in the driver.
    maxItems: 1

  power-gpios:
    description:
      Definition of the GPIO for power management of connected peripheral
      (output).
      This GPIO can be used by the external hardware for power management.
      When the device gets suspended it's switched off and when it resumes
      it's switched on again. After some period of inactivity the driver
      get suspended automatically (autosuspend feature).
    maxItems: 1

  startup-time-ms:
    description:
      This is the startup time the device needs after a resume to be up and
      running.
    minimum: 0
    maximum: 1000
    default: 100

required:
  - compatible
  - trig-gpios
  - echo-gpios

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    proximity {
        compatible = "devantech,srf04";
        trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
        echo-gpios = <&gpio2  6 GPIO_ACTIVE_HIGH>;
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---

$id: http://devicetree.org/schemas/iio/proximity/google,cros-ec-mkbp-proximity.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ChromeOS EC MKBP Proximity Sensor

maintainers:
  - Stephen Boyd <swboyd@chromium.org>
  - Benson Leung <bleung@chromium.org>

description: |
  Google's ChromeOS EC sometimes has the ability to detect user proximity.
  This is implemented on the EC as near/far logic and exposed to the OS
  via an MKBP switch bit.

properties:
  compatible:
    const: google,cros-ec-mkbp-proximity

  label:
    description: Name for proximity sensor

required:
  - compatible

additionalProperties: false

examples:
  - |
    proximity {
      compatible = "google,cros-ec-mkbp-proximity";
      label = "proximity-wifi-lte";
    };


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

title: MaxBotix I2CXL-MaxSonar ultrasonic distance sensor

maintainers:
  - Andreas Klinger <ak@it-klinger.de>

description: |
  MaxBotix I2CXL-MaxSonar ultrasonic distance sensor of type  mb1202,
  mb1212, mb1222, mb1232, mb1242, mb7040 or mb7137 using the i2c interface
  for ranging

  Specifications about the devices can be found at:
  https://www.maxbotix.com/documents/I2CXL-MaxSonar-EZ_Datasheet.pdf

properties:
  compatible:
    enum:
      - maxbotix,mb1202
      - maxbotix,mb1212
      - maxbotix,mb1222
      - maxbotix,mb1232
      - maxbotix,mb1242
      - maxbotix,mb7040
      - maxbotix,mb7137

  reg:
    maxItems: 1

  interrupts:
    description:
      Interrupt used to announce the preceding reading request has finished
      and that data is available.  If no interrupt is specified the device
      driver falls back to wait a fixed amount of time until data can be
      retrieved.
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      proximity@70 {
        compatible = "maxbotix,mb1232";
        reg = <0x70>;
        interrupt-parent = <&gpio2>;
        interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
      };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Parallax PING))) and LaserPING range finder

maintainers:
  - Andreas Klinger <ak@it-klinger.de>

description: |
  Bit-banging driver using one GPIO:
  - ping-gpios is raised by the driver to start measurement
  - direction of ping-gpio is then switched into input with an interrupt
    for receiving distance value as PWM signal

  Specifications about the devices can be found at:
  http://parallax.com/sites/default/files/downloads/28041-LaserPING-2m-Rangefinder-Guide.pdf
  http://parallax.com/sites/default/files/downloads/28015-PING-Documentation-v1.6.pdf

properties:
  compatible:
    enum:
      - parallax,ping
      - parallax,laserping

  ping-gpios:
    description:
      Definition of the GPIO for the triggering and echo (output and input)
      This GPIO is set for about 5 us by the driver to tell the device it
      should initiate the measurement cycle. Afterwards the GPIO is switched
      to input direction with an interrupt. The device sets it and the
      length of the input signal corresponds to the measured distance.
      It needs to be an GPIO which is able to deliver an interrupt because
      the time between two interrupts is measured in the driver.
      See Documentation/devicetree/bindings/gpio/gpio.txt for information
      on how to specify a consumer gpio.
    maxItems: 1

required:
  - compatible
  - ping-gpios

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    proximity {
        compatible = "parallax,laserping";
        ping-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
    };


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

title: Semtech's SX9310 capacitive proximity sensor

maintainers:
  - Daniel Campello <campello@chromium.org>

description: |
  Semtech's SX9310/SX9311 capacitive proximity/button solution.

  Specifications about the devices can be found at:
  https://www.semtech.com/products/smart-sensing/sar-sensors/sx9310

properties:
  compatible:
    enum:
      - semtech,sx9310
      - semtech,sx9311

  reg:
    maxItems: 1

  interrupts:
    description:
      The sole interrupt generated by the device used to announce the
      preceding reading request has finished and that data is
      available or that a close/far proximity event has happened.
    maxItems: 1

  vdd-supply:
    description: Main power supply

  svdd-supply:
    description: Host interface power supply

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

  semtech,cs0-ground:
    description: Indicates the CS0 sensor is connected to ground.
    type: boolean

  semtech,combined-sensors:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: |
      List of which sensors are combined and represented by CS3.
      Possible values are -
      3        - CS3 (internal)
      0 1      - CS0 + CS1
      1 2      - CS1 + CS2 (default)
      0 1 2 3  - CS0 + CS1 + CS2 + CS3
    items:
      enum: [ 0, 1, 2, 3 ]
    minItems: 1
    maxItems: 4

  semtech,resolution:
    description:
      Capacitance measure resolution. Refer to datasheet for more details.
    enum:
      - coarsest
      - very-coarse
      - coarse
      - medium-coarse
      - medium
      - fine
      - very-fine
      - finest

  semtech,startup-sensor:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]
    default: 0
    description:
      Sensor used for start-up proximity detection. The combined
      sensor is represented by the value 3. This is used for initial
      compensation.

  semtech,proxraw-strength:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 2, 4, 8]
    default: 2
    description:
      PROXRAW filter strength. A value of 0 represents off, and other values
      represent 1-1/N.

  semtech,avg-pos-strength:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
    default: 16
    description:
      Average positive filter strength. A value of 0 represents off and
      UINT_MAX (4294967295) represents infinite. Other values
      represent 1-1/N.

required:
  - compatible
  - reg
  - "#io-channel-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      proximity@28 {
        compatible = "semtech,sx9310";
        reg = <0x28>;
        interrupt-parent = <&pio>;
        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
        vdd-supply = <&pp3300_a>;
        svdd-supply = <&pp1800_prox>;
        #io-channel-cells = <1>;
        semtech,cs0-ground;
        semtech,combined-sensors = <1 2 3>;
        semtech,resolution = "fine";
        semtech,startup-sensor = <1>;
        semtech,proxraw-strength = <2>;
        semtech,avg-pos-strength = <64>;
      };
    };


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

title: Semtech's SX9324 capacitive proximity sensor

maintainers:
  - Gwendal Grignou <gwendal@chromium.org>
  - Daniel Campello <campello@chromium.org>

description: |
  Semtech's SX9324 proximity sensor.

properties:
  compatible:
    const: semtech,sx9324

  reg:
    maxItems: 1

  interrupts:
    description:
      Generated by device to announce preceding read request has finished
      and data is available or that a close/far proximity event has happened.
    maxItems: 1

  vdd-supply:
    description: Main power supply

  svdd-supply:
    description: Host interface power supply

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

  semtech,ph0-pin:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: |
      Array of 3 entries. Index represent the id of the CS pin.
      Value indicates how each CS pin is used during phase 0.
      Each of the 3 pins have the following value -
      0 : unused (high impedance)
      1 : measured input
      2 : dynamic shield
      3 : grounded.
      For instance, CS0 measured, CS1 shield and CS2 ground is [1, 2, 3]
    items:
      enum: [ 0, 1, 2, 3 ]
    minItems: 3
    maxItems: 3

  semtech,ph1-pin:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: Same as ph0-pin for phase 1.
    items:
      enum: [ 0, 1, 2, 3 ]
    minItems: 3
    maxItems: 3

  semtech,ph2-pin:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: Same as ph0-pin for phase 2.
    items:
      enum: [ 0, 1, 2, 3 ]
    minItems: 3
    maxItems: 3

  semtech,ph3-pin:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: Same as ph0-pin for phase 3.
    items:
      enum: [ 0, 1, 2, 3 ]
    minItems: 3
    maxItems: 3

  semtech,ph01-resolution:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
    description:
      Capacitance measurement resolution. For phase 0 and 1.
      Higher the number, higher the resolution.
    default: 128

  semtech,ph23-resolution:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
    description:
      Capacitance measurement resolution. For phase 2 and 3
    default: 128

  semtech,startup-sensor:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]
    default: 0
    description: |
      Phase used for start-up proximity detection.
      It is used when we enable a phase to remove static offset and measure
      only capacitance changes introduced by the user.

  semtech,ph01-proxraw-strength:
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 7
    default: 1
    description:
      PROXRAW filter strength for phase 0 and 1. A value of 0 represents off,
      and other values represent 1-1/2^N.

  semtech,ph23-proxraw-strength:
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 7
    default: 1
    description:
      Same as proxraw-strength01, for phase 2 and 3.

  semtech,avg-pos-strength:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
    default: 16
    description: |
      Average positive filter strength. A value of 0 represents off and
      UINT_MAX (4294967295) represents infinite. Other values
      represent 1-1/N.

  semtech,cs-idle-sleep:
    description:
      State of CS pins during sleep mode and idle time.
    enum:
      - hi-z
      - gnd
      - vdd

  semtech,int-comp-resistor:
    description:
      Internal resistor setting for compensation.
    enum:
      - lowest
      - low
      - high
      - highest

  semtech,input-precharge-resistor-ohms:
    default: 4000
    multipleOf: 2000
    minimum: 0
    maximum: 30000
    description:
      Pre-charge input resistance in Ohm.

  semtech,input-analog-gain:
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 3
    description: |
      Defines the input antenna analog gain
      0: x1.247
      1: x1 (default)
      2: x0.768
      3: x0.552

required:
  - compatible
  - reg
  - "#io-channel-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      proximity@28 {
        compatible = "semtech,sx9324";
        reg = <0x28>;
        interrupt-parent = <&pio>;
        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
        vdd-supply = <&pp3300_a>;
        svdd-supply = <&pp1800_prox>;
        #io-channel-cells = <1>;
        semtech,ph0-pin = <1 2 3>;
        semtech,ph1-pin = <3 2 1>;
        semtech,ph2-pin = <1 2 3>;
        semtech,ph3-pin = <3 2 1>;
        semtech,ph01-resolution = <256>;
        semtech,ph23-resolution = <256>;
        semtech,startup-sensor = <1>;
        semtech,ph01-proxraw-strength = <2>;
        semtech,ph23-proxraw-strength = <2>;
        semtech,avg-pos-strength = <64>;
        semtech,int-comp-resistor = "lowest";
        semtech,input-precharge-resistor-ohms = <2000>;
        semtech,cs-idle-sleep = "gnd";
      };
    };


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

title: Semtech's SX9360 capacitive proximity sensor

maintainers:
  - Gwendal Grignou <gwendal@chromium.org>
  - Daniel Campello <campello@chromium.org>

description: |
  Semtech's SX9360 proximity sensor.

properties:
  compatible:
    const: semtech,sx9360

  reg:
    maxItems: 1

  interrupts:
    description:
      Generated by device to announce preceding read request has finished
      and data is available or that a close/far proximity event has happened.
    maxItems: 1

  vdd-supply:
    description: Main power supply

  svdd-supply:
    description: Host interface power supply

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

  semtech,resolution:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
    description:
      Capacitance measurement resolution. For both phases, "reference" and
      "measurement". Higher the number, higher the resolution.
    default: 128

  semtech,proxraw-strength:
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 7
    default: 1
    description:
      PROXRAW filter strength for both phases. A value of 0 represents off,
      and other values represent 1-1/2^N.

  semtech,avg-pos-strength:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
    default: 16
    description: |
      Average positive filter strength. A value of 0 represents off and
      UINT_MAX (4294967295) represents infinite. Other values
      represent 1-1/N.

  semtech,input-precharge-resistor-ohms:
    default: 0
    multipleOf: 2000
    minimum: 0
    maximum: 30000
    description:
      Pre-charge input resistance in Ohm.

required:
  - compatible
  - reg
  - "#io-channel-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      proximity@28 {
        compatible = "semtech,sx9360";
        reg = <0x28>;
        interrupt-parent = <&pio>;
        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
        vdd-supply = <&pp3300_a>;
        svdd-supply = <&pp1800_prox>;
        #io-channel-cells = <1>;
        semtech,resolution = <256>;
        semtech,proxraw-strength = <2>;
        semtech,avg-pos-strength = <64>;
        semtech,input-precharge-resistor-ohms = <4000>;
      };
    };


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

title: Semtech's SX9500 capacitive proximity button device

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

properties:
  compatible:
    const: semtech,sx9500

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  reset-gpios:
    description:
      GPIO connected to the active low reset pin.
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

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

        proximity@28 {
            compatible = "semtech,sx9500";
            reg = <0x28>;
            interrupt-parent = <&gpio2>;
            interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
            reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
        };
    };
...


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

title: ST VL53L0X ToF ranging sensor

maintainers:
  - Song Qiang <songqiang1304521@gmail.com>

properties:
  compatible:
    const: st,vl53l0x

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  reset-gpios:
    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>;

        proximity@29 {
            compatible = "st,vl53l0x";
            reg = <0x29>;
            interrupt-parent = <&gpio>;
            interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
        };
    };
...


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

title: Integrated Proximity Sensor With Infrared Emitter

maintainers:
  - Ivan Mikhaylov <i.mikhaylov@yadro.com>

description: |
  The VCNL3020 is a fully integrated proximity sensor. Fully integrated means
  that the infrared emitter is included in the package. It has 16-bit
  resolution. It includes a signal processing IC and features standard I2C
  communication interface. It features an interrupt function.

  Specifications about the devices can be found at:
  https://www.vishay.com/docs/84150/vcnl3020.pdf

properties:
  compatible:
    enum:
      - vishay,vcnl3020

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

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

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

  vishay,led-current-microamp:
    description:
      The driver current for the LED used in proximity sensing.
    enum: [0, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000,
           100000, 110000, 120000, 130000, 140000, 150000, 160000, 170000,
           180000, 190000, 200000]
    default: 20000

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {

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

        proximity@13 {
              compatible = "vishay,vcnl3020";
              reg = <0x13>;
              vishay,led-current-microamp = <200000>;
        };
    };


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

title: Analog Devices AD2S90 Resolver-to-Digital Converter

maintainers:
  - Matheus Tavares <matheus.bernardino@usp.br>

description: |
  Datasheet: https://www.analog.com/en/products/ad2s90.html

properties:
  compatible:
    const: adi,ad2s90

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 830000
    description: |
      Chip's max frequency, as specified in its datasheet, is 2Mhz. But a 600ns
      delay is expected between the application of a logic LO to CS and the
      application of SCLK, as also specified. And since the delay is not
      implemented in the spi code, to satisfy it, SCLK's period should be at
      most 2 * 600ns, so the max frequency should be 1 / (2 * 6e-7), which gives
      roughly 830000Hz.

  spi-cpol: true

  spi-cpha: true

required:
  - compatible
  - reg

dependencies:
  spi-cpol: [ spi-cpha ]
  spi-cpha: [ spi-cpol ]

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

unevaluatedProperties: false

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

        resolver@0 {
            compatible = "adi,ad2s90";
            reg = <0>;
            spi-max-frequency = <830000>;
            spi-cpol;
            spi-cpha;
        };
    };
...


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

title: Samsung Sensorhub driver

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

description: |
  Sensorhub is a MCU which manages several sensors and also plays the role
  of a virtual sensor device.

properties:
  compatible:
    enum:
      - samsung,sensorhub-rinato
      - samsung,sensorhub-thermostat

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  ap-mcu-gpios:
    maxItems: 1
    description:
      Application Processor to sensorhub line - used during communication

  mcu-ap-gpios:
    maxItems: 1
    description:
      Sensorhub to Application Processor - used during communication

  mcu-reset-gpios:
    maxItems: 1
    description:
      Reset the sensorhub.

required:
  - compatible
  - reg
  - interrupts
  - ap-mcu-gpios
  - mcu-ap-gpios
  - mcu-reset-gpios

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

unevaluatedProperties: false

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

        sensorhub@0 {
            compatible = "samsung,sensorhub-rinato";
            reg = <0>;
            spi-max-frequency = <5000000>;
            interrupt-parent = <&gpx0>;
            interrupts = <2 0>;
            ap-mcu-gpios = <&gpx0 0 0>;
            mcu-ap-gpios = <&gpx0 4 0>;
            mcu-reset-gpios = <&gpx0 5 0>;
        };
    };
...


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

title: STMicroelectronics MEMS sensors

description: The STMicroelectronics sensor devices are pretty straight-forward
  I2C or SPI devices, all sharing the same device tree descriptions no matter
  what type of sensor it is.
  Note that whilst this covers many STMicro MEMs sensors, some more complex
  IMUs need their own bindings.
  The STMicroelectronics sensor devices are pretty straight-forward I2C or
  SPI devices, all sharing the same device tree descriptions no matter what
  type of sensor it is.

maintainers:
  - Denis Ciocca <denis.ciocca@st.com>
  - Linus Walleij <linus.walleij@linaro.org>

properties:
  compatible:
    oneOf:
      - description: STMicroelectronics Accelerometers
        enum:
          - st,h3lis331dl-accel
          - st,lis2de12
          - st,lis2dw12
          - st,lis2hh12
          - st,lis2dh12-accel
          - st,lis302dl
          - st,lis331dl-accel
          - st,lis331dlh-accel
          - st,lis3de
          - st,lis3dh-accel
          - st,lis3dhh
          - st,lis3l02dq
          - st,lis3lv02dl-accel
          - st,lng2dm-accel
          - st,lsm303agr-accel
          - st,lsm303dl-accel
          - st,lsm303dlh-accel
          - st,lsm303dlhc-accel
          - st,lsm303dlm-accel
          - st,lsm330-accel
          - st,lsm330d-accel
          - st,lsm330dl-accel
          - st,lsm330dlc-accel
      - description: Silan Accelerometers
        enum:
          - silan,sc7a20
      - description: STMicroelectronics Gyroscopes
        enum:
          - st,l3g4200d-gyro
          - st,l3g4is-gyro
          - st,l3gd20-gyro
          - st,l3gd20h-gyro
          - st,lsm330-gyro
          - st,lsm330d-gyro
          - st,lsm330dl-gyro
          - st,lsm330dlc-gyro
          - st,lsm9ds0-gyro
      - description: STMicroelectronics Magnetometers
        enum:
          - st,lis2mdl
          - st,lis3mdl-magn
          - st,lsm303agr-magn
          - st,lsm303dlh-magn
          - st,lsm303dlhc-magn
          - st,lsm303dlm-magn
          - st,lsm9ds1-magn
      - description: STMicroelectronics Pressure Sensors
        enum:
          - st,lps001wp-press
          - st,lps22df
          - st,lps22hb-press
          - st,lps22hh
          - st,lps25h-press
          - st,lps331ap-press
          - st,lps33hw
          - st,lps35hw
      - description: IMUs
        enum:
          - st,lsm9ds0-imu
      - description: Deprecated bindings
        enum:
          - st,lis302dl-spi
          - st,lis3lv02d
        deprecated: true

  reg:
    maxItems: 1

  interrupts:
    description: interrupt line(s) connected to the DRDY line(s) and/or the
      Intertial interrupt lines INT1 and INT2 if these exist. This means up to
      three interrupts, and the DRDY must be the first one if it exists on
      the package. The trigger edge of the interrupts is sometimes software
      configurable in the hardware so the operating system should parse this
      flag and set up the trigger edge as indicated in the device tree.
    minItems: 1
    maxItems: 2

  vdd-supply: true
  vddio-supply: true

  st,drdy-int-pin:
    description: the pin on the package that will be used to signal
      "data ready" (valid values 1 or 2). This property is not configurable
      on all sensors.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [1, 2]

  drive-open-drain:
    $ref: /schemas/types.yaml#/definitions/flag
    description: the interrupt/data ready line will be configured
      as open drain, which is useful if several sensors share the same
      interrupt line. (This binding is taken from pinctrl.)

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

allOf:
  - if:
      properties:
        compatible:
          enum:
            # These have no interrupts
            - st,lps001wp
    then:
      properties:
        interrupts: false
        st,drdy-int-pin: false
        drive-open-drain: false

  - if:
      properties:
        compatible:
          enum:
            # These have only DRDY
            - st,lis2mdl
            - st,lis3l02dq
            - st,lis3lv02dl-accel
            - st,lps22df
            - st,lps22hb-press
            - st,lps22hh
            - st,lps25h-press
            - st,lps33hw
            - st,lps35hw
            - st,lsm303agr-magn
            - st,lsm303dlh-magn
            - st,lsm303dlhc-magn
            - st,lsm303dlm-magn
    then:
      properties:
        interrupts:
          maxItems: 1
        st,drdy-int-pin: false

required:
  - compatible
  - reg

additionalProperties: false

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

      accelerometer@1c {
        compatible = "st,lis331dl-accel";
        reg = <0x1c>;
        st,drdy-int-pin = <1>;
        vdd-supply = <&ldo1>;
        vddio-supply = <&ldo2>;
        interrupt-parent = <&gpio>;
        interrupts = <18 IRQ_TYPE_EDGE_RISING>, <19 IRQ_TYPE_EDGE_RISING>;
      };
    };
    spi {
      #address-cells = <1>;
      #size-cells = <0>;
      num-cs = <1>;

      l3g4200d: gyroscope@0 {
        compatible = "st,l3g4200d-gyro";
        st,drdy-int-pin = <2>;
        reg = <0>;
        vdd-supply = <&vcc_io>;
        vddio-supply = <&vcc_io>;
      };
    };
...


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

title: Analog Devices LTC2983, LTC2986, LTM2985 Multi-sensor Temperature system

maintainers:
  - Nuno Sá <nuno.sa@analog.com>

description: |
  Analog Devices LTC2983, LTC2984, LTC2986, LTM2985 Multi-Sensor Digital
  Temperature Measurement Systems

  https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/2984fb.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/29861fa.pdf
  https://www.analog.com/media/en/technical-documentation/data-sheets/ltm2985.pdf

properties:
  compatible:
    oneOf:
      - enum:
          - adi,ltc2983
          - adi,ltc2986
          - adi,ltm2985
      - items:
          - const: adi,ltc2984
          - const: adi,ltc2983

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  adi,mux-delay-config-us:
    description: |
      Extra delay prior to each conversion, in addition to the internal 1ms
      delay, for the multiplexer to switch input configurations and
      excitation values.

      This property is supposed to be in microseconds, but to maintain
      compatibility, this value will be multiplied by 100 before usage.
    maximum: 255
    default: 0

  adi,filter-notch-freq:
    description:
      Notch frequency of the digital filter.
      0 - 50/60Hz rejection
      1 - 60Hz rejection
      2 - 50Hz rejection
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 2
    default: 0

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

patternProperties:
  "@([0-9a-f]+)$":
    type: object
    description: Sensor.

    properties:
      reg:
        description:
          Channel number. Connects the sensor to the channel with this number
          of the device.
        minimum: 1
        maximum: 20

      adi,sensor-type:
        description: Type of sensor connected to the device.
        $ref: /schemas/types.yaml#/definitions/uint32

    required:
      - reg
      - adi,sensor-type

  "^thermocouple@":
    type: object
    description: Thermocouple sensor.

    properties:
      adi,sensor-type:
        description: |
          1 - Type J Thermocouple
          2 - Type K Thermocouple
          3 - Type E Thermocouple
          4 - Type N Thermocouple
          5 - Type R Thermocouple
          6 - Type S Thermocouple
          7 - Type T Thermocouple
          8 - Type B Thermocouple
          9 - Custom Thermocouple
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 1
        maximum: 9

      adi,single-ended:
        description: Whether the sensor is single-ended.
        type: boolean

      adi,sensor-oc-current-microamp:
        description: Pulsed current value applied during open-circuit detect.
        enum: [10, 100, 500, 1000]
        default: 10

      adi,cold-junction-handle:
        description:
          Sensor responsible for measuring the thermocouple cold junction
          temperature.
        $ref: /schemas/types.yaml#/definitions/phandle

      adi,custom-thermocouple:
        description:
          Used for digitizing custom thermocouples.
          See Page 59 of the datasheet.
        $ref: /schemas/types.yaml#/definitions/uint64-matrix
        minItems: 3
        maxItems: 64
        items:
          items:
            - description: Voltage point in nV, signed.
            - description: Temperature point in uK.

    allOf:
      - if:
          properties:
            adi,sensor-type:
              const: 9
        then:
          required:
            - adi,custom-thermocouple

  "^diode@":
    type: object
    description: Diode sensor.

    properties:
      adi,sensor-type:
        description: Sensor type for diodes.
        $ref: /schemas/types.yaml#/definitions/uint32
        const: 28

      adi,single-ended:
        description: Whether the sensor is single-ended.
        type: boolean

      adi,three-conversion-cycles:
        description:
          Whether to use three conversion cycles to remove parasitic
          resistance between the device and the diode.
        type: boolean

      adi,average-on:
        description:
          Whether to use a running average of the diode temperature
          reading to reduce the noise when the diode is used as a cold
          junction temperature element on an isothermal block where
          temperatures change slowly.
        type: boolean

      adi,excitation-current-microamp:
        description:
          Magnitude of the 1l excitation current applied to the diode.
          4l excitation current will be 4 times this value, and 8l
          excitation current will be 8 times value.
        enum: [10, 20, 40, 80]
        default: 10

      adi,ideal-factor-value:
        description:
          Diode ideality factor.
          Set this property to 1000000 times the real value.
        $ref: /schemas/types.yaml#/definitions/uint32
        default: 0

  "^rtd@":
    type: object
    description: RTD sensor.

    properties:
      reg:
        minimum: 2
        maximum: 20

      adi,sensor-type:
        description: |
          10 - RTD PT-10
          11 - RTD PT-50
          12 - RTD PT-100
          13 - RTD PT-200
          14 - RTD PT-500
          15 - RTD PT-1000
          16 - RTD PT-1000 (0.00375)
          17 - RTD NI-120
          18 - RTD Custom
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 10
        maximum: 18

      adi,rsense-handle:
        description: Associated sense resistor sensor.
        $ref: /schemas/types.yaml#/definitions/phandle

      adi,number-of-wires:
        description:
          Number of wires used by the RTD.
          5 means 4 wires with Kelvin sense resistor.
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [2, 3, 4, 5]
        default: 2

      adi,rsense-share:
        description:
          Whether to enable sense resistor sharing, where one sense
          resistor is used by multiple sensors.
        type: boolean

      adi,excitation-current-microamp:
        description: Excitation current applied to the RTD.
        enum: [5, 10, 25, 50, 100, 250, 500, 1000]
        default: 5

      adi,rtd-curve:
        description: |
          RTD curve and the corresponding Callendar-VanDusen constants.
          0 - European
          1 - American
          2 - Japanese
          3 - ITS-90
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 3
        default: 0

      adi,custom-rtd:
        description:
          Used for digitizing custom RTDs.
          See Page 62 of the datasheet.
        $ref: /schemas/types.yaml#/definitions/uint64-matrix
        minItems: 3
        maxItems: 64
        items:
          items:
            - description: Resistance point in uOhms.
            - description: Temperature point in uK.

    required:
      - adi,rsense-handle

    allOf:
      - if:
          properties:
            adi,number-of-wires:
              const: 4
        then:
          properties:
            adi,current-rotate:
              description:
                Whether to enable excitation current rotation to automatically
                remove parasitic thermocouple effects.
              type: boolean

          dependencies:
            adi,current-rotate: [ "adi,rsense-share" ]

      - if:
          properties:
            adi,sensor-type:
              const: 18
        then:
          required:
            - adi,custom-rtd

  "^thermistor@":
    type: object
    description: Thermistor sensor.

    properties:
      adi,sensor-type:
        description:
          19 - Thermistor 44004/44033 2.252kohm at 25°C
          20 - Thermistor 44005/44030 3kohm at 25°C
          21 - Thermistor 44007/44034 5kohm at 25°C
          22 - Thermistor 44006/44031 10kohm at 25°C
          23 - Thermistor 44008/44032 30kohm at 25°C
          24 - Thermistor YSI 400 2.252kohm at 25°C
          25 - Thermistor Spectrum 1003k 1kohm
          26 - Thermistor Custom Steinhart-Hart
          27 - Custom Thermistor
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 19
        maximum: 27

      adi,rsense-handle:
        description: Associated sense resistor sensor.
        $ref: /schemas/types.yaml#/definitions/phandle

      adi,single-ended:
        description: Whether the sensor is single-ended.
        type: boolean

      adi,rsense-share:
        description:
          Whether to enable sense resistor sharing, where one sense
          resistor is used by multiple sensors.
        type: boolean

      adi,current-rotate:
        description:
          Whether to enable excitation current rotation to automatically
          remove parasitic thermocouple effects.
        type: boolean

      adi,excitation-current-nanoamp:
        description:
          Excitation current applied to the thermistor.
          0 sets the sensor in auto-range mode.
        enum: [0, 250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 250000,
               500000, 1000000]
        default: 0

      adi,custom-thermistor:
        description:
          Used for digitizing custom thermistors.
          See Page 65 of the datasheet.
        $ref: /schemas/types.yaml#/definitions/uint64-matrix
        minItems: 3
        maxItems: 64
        items:
          items:
            - description: Resistance point in uOhms.
            - description: Temperature point in uK.

      adi,custom-steinhart:
        description:
          Steinhart-Hart coefficients in raw format, used for digitizing
          custom thermistors.
          See Page 68 of the datasheet.
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 6
        maxItems: 6

    required:
      - adi,rsense-handle

    dependencies:
      adi,current-rotate: [ "adi,rsense-share" ]

    allOf:
      - if:
          properties:
            adi,sensor-type:
              const: 26
        then:
          properties:
            adi,excitation-current-nanoamp:
              enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000,
                     250000, 500000, 1000000]
              default: 1000
          required:
            - adi,custom-steinhart
      - if:
          properties:
            adi,sensor-type:
              const: 27
        then:
          properties:
            adi,excitation-current-nanoamp:
              enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000,
                     250000, 500000, 1000000]
              default: 1000
          required:
            - adi,custom-thermistor

  "^adc@":
    type: object
    description: Direct ADC sensor.

    properties:
      adi,sensor-type:
        description: Sensor type for direct ADC sensors.
        $ref: /schemas/types.yaml#/definitions/uint32
        const: 30

      adi,single-ended:
        description: Whether the sensor is single-ended.
        type: boolean

  "^temp@":
    type: object
    description: Active analog temperature sensor.

    properties:
      adi,sensor-type:
        description: Sensor type for active analog temperature sensors.
        $ref: /schemas/types.yaml#/definitions/uint32
        const: 31

      adi,single-ended:
        description: Whether the sensor is single-ended.
        type: boolean

      adi,custom-temp:
        description:
          Used for digitizing active analog temperature sensors.
          See Page 67 of the LTM2985 datasheet.
        $ref: /schemas/types.yaml#/definitions/uint64-matrix
        minItems: 3
        maxItems: 64
        items:
          items:
            - description: Voltage point in nV, signed.
            - description: Temperature point in uK.

    required:
      - adi,custom-temp

  "^rsense@":
    type: object
    description: Sense resistor sensor.

    properties:
      reg:
        minimum: 2
        maximum: 20

      adi,sensor-type:
        description: Sensor type sense resistor sensors.
        $ref: /schemas/types.yaml#/definitions/uint32
        const: 29

      adi,rsense-val-milli-ohms:
        description: Value of the sense resistor.

    required:
      - adi,rsense-val-milli-ohms

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,ltc2983
              - adi,ltc2984
    then:
      patternProperties:
        "^temp@": false

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

        temperature-sensor@0 {
                compatible = "adi,ltc2983";
                reg = <0>;

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

                interrupts = <20 IRQ_TYPE_EDGE_RISING>;
                interrupt-parent = <&gpio>;

                thermocouple@18 {
                        reg = <18>;
                        adi,sensor-type = <8>; //Type B
                        adi,sensor-oc-current-microamp = <10>;
                        adi,cold-junction-handle = <&diode5>;
                };

                diode5: diode@5 {
                        reg = <5>;
                        adi,sensor-type = <28>;
                };

                rsense2: rsense@2 {
                        reg = <2>;
                        adi,sensor-type = <29>;
                        adi,rsense-val-milli-ohms = <1200000>; //1.2Kohms
                };

                rtd@14 {
                        reg = <14>;
                        adi,sensor-type = <15>; //PT1000
                        /*2-wire, internal gnd, no current rotation*/
                        adi,number-of-wires = <2>;
                        adi,rsense-share;
                        adi,excitation-current-microamp = <500>;
                        adi,rsense-handle = <&rsense2>;
                };

                adc@10 {
                        reg = <10>;
                        adi,sensor-type = <30>;
                        adi,single-ended;
                };

                thermistor@12 {
                        reg = <12>;
                        adi,sensor-type = <26>; //Steinhart
                        adi,rsense-handle = <&rsense2>;
                        adi,custom-steinhart = <0x00F371EC 0x12345678
                                        0x2C0F8733 0x10018C66 0xA0FEACCD
                                        0x90021D99>; //6 entries
                };

                thermocouple@20 {
                        reg = <20>;
                        adi,sensor-type = <9>; //custom thermocouple
                        adi,single-ended;
                        adi,custom-thermocouple =
                                 /bits/ 64 <(-50220000) 0>,
                                 /bits/ 64 <(-30200000) 99100000>,
                                 /bits/ 64 <(-5300000) 135400000>,
                                 /bits/ 64 <0 273150000>,
                                 /bits/ 64 <40200000 361200000>,
                                 /bits/ 64 <55300000 522100000>,
                                 /bits/ 64 <88300000 720300000>,
                                 /bits/ 64 <132200000 811200000>,
                                 /bits/ 64 <188700000 922500000>,
                                 /bits/ 64 <460400000 1000000000>; //10 pairs
               };

        };
    };
...


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

title: Maxim MAX31855 and similar thermocouples

maintainers:
  - Matt Ranostay <matt.ranostay@konsulko.com>

description: |
  https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf
  https://datasheets.maximintegrated.com/en/ds/MAX31855.pdf

properties:
  compatible:
    description:
      The generic maxim,max31855 compatible is deprecated in favour of
      the thermocouple type specific variants.
    enum:
      - maxim,max6675
      - maxim,max31855
      - maxim,max31855k
      - maxim,max31855j
      - maxim,max31855n
      - maxim,max31855s
      - maxim,max31855t
      - maxim,max31855e
      - maxim,max31855r

  reg:
    maxItems: 1

  spi-cpha: true

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - maxim,max6675
    then:
      required:
        - spi-cpha
    else:
      properties:
        spi-cpha: false

unevaluatedProperties: false

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

        temp-sensor@0 {
            compatible = "maxim,max31855k";
            reg = <0>;
            spi-max-frequency = <4300000>;
        };
        temp-sensor@1 {
            compatible = "maxim,max6675";
            reg = <1>;
            spi-max-frequency = <4300000>;
            spi-cpha;
        };
    };
...


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

title: Maxim MAX31856 thermocouple support

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

description: |
  https://datasheets.maximintegrated.com/en/ds/MAX31856.pdf

properties:
  compatible:
    const: maxim,max31856

  reg:
    maxItems: 1

  spi-cpha: true

  thermocouple-type:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Type of thermocouple (THERMOCOUPLE_TYPE_K if omitted).
      Use defines in dt-bindings/iio/temperature/thermocouple.h.
      Supported types are B, E, J, K, N, R, S, T.

required:
  - compatible
  - reg
  - spi-cpha

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

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/iio/temperature/thermocouple.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        temp-sensor@0 {
            compatible = "maxim,max31856";
            reg = <0>;
            spi-max-frequency = <5000000>;
            spi-cpha;
            thermocouple-type = <THERMOCOUPLE_TYPE_K>;
        };
    };
...


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

title: Maxim MAX31865 Resistance Temperature Detector.

maintainers:
  - Navin Sankar Velliangiri <navin@linumiz.com>

description: |
  https://datasheets.maximintegrated.com/en/ds/MAX31865.pdf

properties:
  compatible:
    const: maxim,max31865

  reg:
    maxItems: 1

  maxim,3-wire:
    description:
      Identifies the number of wires used by the RTD. Setting this property
      enables 3-wire RTD connection. Else 2-wire or 4-wire RTD connection.
    type: boolean

  spi-cpha: true

required:
  - compatible
  - reg
  - spi-cpha

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

unevaluatedProperties: false

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

       temp_sensor@0 {
         compatible = "maxim,max31865";
         reg = <0>;
         spi-max-frequency = <400000>;
         spi-cpha;
         maxim,3-wire;
       };
    };
...


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

title: Melexis MLX90614 contactless IR temperature sensor

maintainers:
  - Peter Meerwald <pmeerw@pmeerw.net>
  - Crt Mori <cmo@melexis.com>

description: |
  http://melexis.com/Infrared-Thermometer-Sensors/Infrared-Thermometer-Sensors/MLX90614-615.aspx

properties:
  compatible:
    const: melexis,mlx90614

  reg:
    maxItems: 1

  wakeup-gpios:
    description:
      GPIO connected to the SDA line to hold low in order to wake up the
      device.  In normal operation, the GPIO is set as input and will
      not interfere in I2C communication.  There is no need for a GPIO
      driving the SCL line.  If no GPIO is given, power management is disabled.
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

        temp-sensor@5a {
            compatible = "melexis,mlx90614";
            reg = <0x5a>;
            wakeup-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
        };
    };
...


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

title: Melexis MLX90632 contactless Infra Red temperature sensor

maintainers:
  - Crt Mori <cmo@melexis.com>

description: |
  https://www.melexis.com/en/documents/documentation/datasheets/datasheet-mlx90632

  There are various applications for the Infra Red contactless temperature
  sensor and MLX90632 is most suitable for consumer applications where
  measured object temperature is in range between -20 to 200 degrees
  Celsius with relative error of measurement below 1 degree Celsius in
  object temperature range for industrial applications. Since it can
  operate and measure ambient temperature in range of -20 to 85 degrees
  Celsius it is suitable also for outdoor use.

  Be aware that electronics surrounding the sensor can increase ambient
  temperature. MLX90632 can be calibrated to reduce the housing effect via
  already existing EEPROM parameters.

  Since measured object emissivity effects Infra Red energy emitted,
  emissivity should be set before requesting the object temperature.

properties:
  compatible:
    const: melexis,mlx90632

  reg:
    maxItems: 1
    description: Default is 0x3a, but can be reprogrammed.

  vdd-supply:
    description: provide VDD power to the sensor.

required:
  - compatible
  - reg

additionalProperties: false

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

        temp-sensor@3a {
            compatible = "melexis,mlx90632";
            reg = <0x3a>;
            vdd-supply = <&ldo4_reg>;
        };
    };
...


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

title: IR thermopile sensor with integrated math engine

maintainers:
  - Manivannan Sadhasivam <manivannanece23@gmail.com>

description: |
  http://www.ti.com/lit/ds/symlink/tmp007.pdf

properties:
  compatible:
    const: ti,tmp007

  reg:
    description: |
      The I2C address of the sensor (changeable via ADR pins)
      ------------------------------
      |ADR1 | ADR0 | Device Address|
      ------------------------------
         0      0        0x40
         0      1        0x41
         0     SDA       0x42
         0     SCL       0x43
         1      0        0x44
         1      1        0x45
         1     SDA       0x46
         1     SCL       0x47
    maxItems: 1

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

        temp-sensor@40 {
            compatible = "ti,tmp007";
            reg = <0x40>;
            interrupt-parent = <&gpio0>;
            interrupts = <5 0x08>;
        };
    };
...


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

title: "TI TMP117 - Digital temperature sensor with integrated NV memory"

description: |
    TI TMP117 - Digital temperature sensor with integrated NV memory that supports
    I2C interface.
      https://www.ti.com/lit/gpn/tmp1

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

properties:
  compatible:
    enum:
      - ti,tmp117

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

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

        tmp117@48 {
             compatible = "ti,tmp117";
             reg = <0x48>;
        };
    };


code:
.. SPDX-License-Identifier: GPL-2.0

.. toctree::
   :maxdepth: 1

   ABI
   writing-bindings
   writing-schema
   submitting-patches


code:
Hisilicon RoCE DT description

Hisilicon RoCE engine is a part of network subsystem.
It works depending on other part of network subsystem, such as gmac and
dsa fabric.

Additional properties are described here:

Required properties:
- compatible: Should contain "hisilicon,hns-roce-v1".
- reg: Physical base address of the RoCE driver and
length of memory mapped region.
- eth-handle: phandle, specifies a reference to a node
representing a ethernet device.
- dsaf-handle: phandle, specifies a reference to a node
representing a dsaf device.
- node_guid: a number that uniquely identifies a device or component
- #address-cells: must be 2
- #size-cells: must be 2
Optional properties:
- dma-coherent: Present if DMA operations are coherent.
- interrupts: should contain 32 completion event irq,1 async event irq
and 1 event overflow irq.
- interrupt-names:should be one of 34 irqs for roce device
  - hns-roce-comp-0 ~ hns-roce-comp-31: 32 complete event irq
  - hns-roce-async: 1 async event irq
  - hns-roce-common: named common exception warning irq
Example:
	infiniband@c4000000 {
			compatible = "hisilicon,hns-roce-v1";
			reg = <0x0 0xc4000000 0x0 0x100000>;
			dma-coherent;
			eth-handle = <&eth2 &eth3 &eth4 &eth5 &eth6 &eth7>;
			dsaf-handle = <&soc0_dsa>;
			node-guid = [00 9A CD 00 00 01 02 03];
			#address-cells = <2>;
			#size-cells = <2>;
			interrupt-parent = <&mbigen_dsa>;
			interrupts = <722 1>,
					<723 1>,
					<724 1>,
					<725 1>,
					<726 1>,
					<727 1>,
					<728 1>,
					<729 1>,
					<730 1>,
					<731 1>,
					<732 1>,
					<733 1>,
					<734 1>,
					<735 1>,
					<736 1>,
					<737 1>,
					<738 1>,
					<739 1>,
					<740 1>,
					<741 1>,
					<742 1>,
					<743 1>,
					<744 1>,
					<745 1>,
					<746 1>,
					<747 1>,
					<748 1>,
					<749 1>,
					<750 1>,
					<751 1>,
					<752 1>,
					<753 1>,
					<785 1>,
					<754 4>;

			interrupt-names = "hns-roce-comp-0",
					"hns-roce-comp-1",
					"hns-roce-comp-2",
					"hns-roce-comp-3",
					"hns-roce-comp-4",
					"hns-roce-comp-5",
					"hns-roce-comp-6",
					"hns-roce-comp-7",
					"hns-roce-comp-8",
					"hns-roce-comp-9",
					"hns-roce-comp-10",
					"hns-roce-comp-11",
					"hns-roce-comp-12",
					"hns-roce-comp-13",
					"hns-roce-comp-14",
					"hns-roce-comp-15",
					"hns-roce-comp-16",
					"hns-roce-comp-17",
					"hns-roce-comp-18",
					"hns-roce-comp-19",
					"hns-roce-comp-20",
					"hns-roce-comp-21",
					"hns-roce-comp-22",
					"hns-roce-comp-23",
					"hns-roce-comp-24",
					"hns-roce-comp-25",
					"hns-roce-comp-26",
					"hns-roce-comp-27",
					"hns-roce-comp-28",
					"hns-roce-comp-29",
					"hns-roce-comp-30",
					"hns-roce-comp-31",
					"hns-roce-async",
					"hns-roce-common";
		};


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019-2020 Artur Rojek
%YAML 1.2
---
$id: "http://devicetree.org/schemas/input/adc-joystick.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: ADC attached joystick

maintainers:
  - Artur Rojek <contact@artur-rojek.eu>

description: >
  Bindings for joystick devices connected to ADC controllers supporting
  the Industrial I/O subsystem.

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    const: adc-joystick

  io-channels:
    minItems: 1
    maxItems: 1024
    description: >
      List of phandle and IIO specifier pairs.
      Each pair defines one ADC channel to which a joystick axis is connected.
      See
      https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
      for details.

  poll-interval: true

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

required:
  - compatible
  - io-channels
  - '#address-cells'
  - '#size-cells'

additionalProperties: false

patternProperties:
  "^axis@[0-9a-f]+$":
    type: object
    $ref: input.yaml#
    description: >
      Represents a joystick axis bound to the given ADC channel.
      For each entry in the io-channels list, one axis subnode with a matching
      reg property must be specified.

    properties:
      reg:
        minimum: 0
        maximum: 1023
        description: Index of an io-channels list entry bound to this axis.

      linux,code:
        description: EV_ABS specific event code generated by the axis.

      abs-range:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        items:
          - description: minimum value
          - description: maximum value
        description: >
          Minimum and maximum values produced by the axis.
          For an ABS_X axis this will be the left-most and right-most
          inclination of the joystick. If min > max, it is left to userspace to
          treat the axis as inverted.
          This property is interpreted as two signed 32 bit values.

      abs-fuzz:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: >
          Amount of noise in the input value.
          Omitting this property indicates the axis is precise.

      abs-flat:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: >
          Axial "deadzone", or area around the center position, where the axis
          is considered to be at rest.
          Omitting this property indicates the axis always returns to exactly
          the center position.

    required:
      - reg
      - linux,code
      - abs-range

    additionalProperties: false

examples:
  - |
    #include <dt-bindings/iio/adc/ingenic,adc.h>
    #include <dt-bindings/input/input.h>

    joystick: adc-joystick {
      compatible = "adc-joystick";
      io-channels = <&adc INGENIC_ADC_TOUCH_XP>,
                    <&adc INGENIC_ADC_TOUCH_YP>;
      #address-cells = <1>;
      #size-cells = <0>;

      axis@0 {
              reg = <0>;
              linux,code = <ABS_X>;
              abs-range = <3300 0>;
              abs-fuzz = <4>;
              abs-flat = <200>;
      };
      axis@1 {
              reg = <1>;
              linux,code = <ABS_Y>;
              abs-range = <0 3300>;
              abs-fuzz = <4>;
              abs-flat = <200>;
      };
    };


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

title: ADC attached resistor ladder buttons

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

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    const: adc-keys

  io-channels:
    maxItems: 1

  io-channel-names:
    const: buttons

  keyup-threshold-microvolt:
    description:
      Voltage above or equal to which all the keys are considered up.

  poll-interval: true
  autorepeat: true

patternProperties:
  '^button-':
    type: object
    $ref: input.yaml#
    additionalProperties: false
    description:
      Each button (key) is represented as a sub-node.

    properties:
      label: true

      linux,code: true

      press-threshold-microvolt:
        description:
          Voltage above or equal to which this key is considered pressed. No
          two values of press-threshold-microvolt may be the same. All values
          of press-threshold-microvolt must be less than
          keyup-threshold-microvolt.

    required:
      - linux,code
      - press-threshold-microvolt

required:
  - compatible
  - io-channels
  - io-channel-names
  - keyup-threshold-microvolt

additionalProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>
    // +--------------------------------+------------------------+
    // | 2.000.000 <= value             | no key pressed         |
    // +--------------------------------+------------------------+
    // | 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed   |
    // +--------------------------------+------------------------+
    // | 1.000.000 <= value < 1.500.000 | KEY_VOLUMEDOWN pressed |
    // +--------------------------------+------------------------+
    // |   500.000 <= value < 1.000.000 | KEY_ENTER pressed      |
    // +--------------------------------+------------------------+
    // |              value <   500.000 | no key pressed         |
    // +--------------------------------+------------------------+

    adc-keys {
        compatible = "adc-keys";
        io-channels = <&lradc 0>;
        io-channel-names = "buttons";
        keyup-threshold-microvolt = <2000000>;

        button-up {
            label = "Volume Up";
            linux,code = <KEY_VOLUMEUP>;
            press-threshold-microvolt = <1500000>;
        };

        button-down {
            label = "Volume Down";
            linux,code = <KEY_VOLUMEDOWN>;
            press-threshold-microvolt = <1000000>;
        };

        button-enter {
            label = "Enter";
            linux,code = <KEY_ENTER>;
            press-threshold-microvolt = <500000>;
        };
    };
...


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

title: Analog Devices ADP5588 Keypad Controller

maintainers:
  - Nuno Sá <nuno.sa@analog.com>

description: |
  Analog Devices Mobile I/O Expander and QWERTY Keypad Controller
  https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf

allOf:
  - $ref: matrix-keymap.yaml#
  - $ref: input.yaml#

properties:
  compatible:
    enum:
      - adi,adp5587
      - adi,adp5588

  reg:
    maxItems: 1

  vcc-supply:
    description: Supply Voltage Input

  reset-gpios:
    description:
      If specified, it will be asserted during driver probe. As the line is
      active low, it should be marked GPIO_ACTIVE_LOW.
    maxItems: 1

  interrupts:
    maxItems: 1

  gpio-controller:
    description:
      This property applies if either keypad,num-rows lower than 8 or
      keypad,num-columns lower than 10.

  '#gpio-cells':
    const: 2

  interrupt-controller:
    description:
      This property applies if either keypad,num-rows lower than 8 or
      keypad,num-columns lower than 10.

  '#interrupt-cells':
    const: 2

  adi,unlock-keys:
    description:
      Specifies a maximum of 2 keys that can be used to unlock the keypad.
      If this property is set, the keyboard will be locked and only unlocked
      after these keys are pressed. If only one key is set, a double click is
      needed to unlock the keypad. The value of this property cannot be bigger
      or equal than keypad,num-rows * keypad,num-columns.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 2

required:
  - compatible
  - reg
  - interrupts
  - keypad,num-rows
  - keypad,num-columns
  - linux,keymap

unevaluatedProperties: false

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

        keys@34 {
            compatible = "adi,adp5588";
            reg = <0x34>;

            vcc-supply = <&vcc>;
            interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
            interrupt-parent = <&gpio>;
            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;

            keypad,num-rows = <1>;
            keypad,num-columns = <9>;
            linux,keymap = <
                MATRIX_KEY(0x00, 0x00, KEY_1)
                MATRIX_KEY(0x00, 0x01, KEY_2)
                MATRIX_KEY(0x00, 0x02, KEY_3)
                MATRIX_KEY(0x00, 0x03, KEY_4)
                MATRIX_KEY(0x00, 0x04, KEY_5)
                MATRIX_KEY(0x00, 0x05, KEY_6)
                MATRIX_KEY(0x00, 0x06, KEY_7)
                MATRIX_KEY(0x00, 0x07, KEY_8)
                MATRIX_KEY(0x00, 0x08, KEY_9)
            >;
        };
    };
...


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/allwinner,sun4i-a10-lradc-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner A10 LRADC

maintainers:
  - Chen-Yu Tsai <wens@csie.org>
  - Maxime Ripard <mripard@kernel.org>

properties:
  compatible:
    oneOf:
      - const: allwinner,sun4i-a10-lradc-keys
      - const: allwinner,sun8i-a83t-r-lradc
      - items:
          - enum:
              - allwinner,suniv-f1c100s-lradc
              - allwinner,sun50i-a64-lradc
          - const: allwinner,sun8i-a83t-r-lradc
      - const: allwinner,sun50i-r329-lradc
      - items:
          - const: allwinner,sun20i-d1-lradc
          - const: allwinner,sun50i-r329-lradc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  resets:
    maxItems: 1

  interrupts:
    maxItems: 1

  vref-supply:
    description:
      Regulator for the LRADC reference voltage

  wakeup-source: true

patternProperties:
  "^button-[0-9]+$":
    type: object
    $ref: input.yaml#
    properties:
      label:
        $ref: /schemas/types.yaml#/definitions/string
        description: Descriptive name of the key

      linux,code: true

      channel:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1]
        description: ADC Channel this key is attached to

      voltage:
        $ref: /schemas/types.yaml#/definitions/uint32
        description:
          Voltage in microvolts at LRADC input when this key is
          pressed

    required:
      - label
      - linux,code
      - channel
      - voltage

    additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - vref-supply

if:
  properties:
    compatible:
      contains:
        enum:
          - allwinner,sun50i-r329-lradc

then:
  required:
    - clocks
    - resets

additionalProperties: false

examples:
  - |
    lradc: lradc@1c22800 {
        compatible = "allwinner,sun4i-a10-lradc-keys";
        reg = <0x01c22800 0x100>;
        interrupts = <31>;
        vref-supply = <&reg_vcc3v0>;

        button-191 {
            label = "Volume Up";
            linux,code = <115>;
            channel = <0>;
            voltage = <191274>;
        };

        button-392 {
            label = "Volume Down";
            linux,code = <114>;
            channel = <0>;
            voltage = <392644>;
        };
    };

...


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

title: Dell Wyse 3020 a.k.a. "Ariel" Power Button

maintainers:
  - Lubomir Rintel <lkundrak@v3.sk>

description: |
  The ENE Embedded Controller on the Ariel board has an interface to the
  SPI bus that is capable of sending keyboard and mouse data. A single
  power button is attached to it. This binding describes this
  configuration.

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

properties:
  compatible:
    items:
      - const: dell,wyse-ariel-ec-input
      - const: ene,kb3930-input

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  spi-max-frequency: true

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

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

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

        power-button@0 {
            compatible = "dell,wyse-ariel-ec-input", "ene,kb3930-input";
            reg = <0>;
            interrupt-parent = <&gpio>;
            interrupts = <60 IRQ_TYPE_EDGE_RISING>;
            spi-max-frequency = <33000000>;
        };
    };


code:
Device tree bindings for Atmel capacitive touch device, typically
an Atmel touch sensor connected to AtmegaXX MCU running firmware
based on Qtouch library.

The node for this device must be a child of a I2C controller node, as the
device communicates via I2C.

Required properties:

	compatible:	Must be "atmel,captouch".
	reg:		The I2C slave address of the device.
	interrupts:	Property describing the interrupt line the device
			is connected to. The device only has one interrupt
			source.
	linux,keycodes:	Specifies an array of numeric keycode values to
			be used for reporting button presses. The array can
			contain up to 8 entries.

Optional properties:

	autorepeat:	Enables the Linux input system's autorepeat
			feature on the input device.

Example:

	atmel-captouch@51 {
		compatible = "atmel,captouch";
		reg = <0x51>;
		interrupt-parent = <&tlmm>;
		interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
		linux,keycodes = <BTN_0>, <BTN_1>,
			<BTN_2>, <BTN_3>,
			<BTN_4>, <BTN_5>,
			<BTN_6>, <BTN_7>;
		autorepeat;
	};


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

title: Atmel maXTouch touchscreen/touchpad

maintainers:
  - Nick Dyer <nick@shmanahar.org>
  - Linus Walleij <linus.walleij@linaro.org>

description: |
  Atmel maXTouch touchscreen or touchpads such as the mXT244
  and similar devices.

properties:
  compatible:
    const: atmel,maxtouch

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdda-supply:
    description:
      Optional regulator for the AVDD analog voltage.

  vdd-supply:
    description:
      Optional regulator for the VDD digital voltage.

  reset-gpios:
    maxItems: 1
    description:
      Optional GPIO specifier for the touchscreen's reset pin
      (active low). The line must be flagged with
      GPIO_ACTIVE_LOW.

  wake-gpios:
    maxItems: 1
    description:
      Optional GPIO specifier for the touchscreen's wake pin
      (active low). The line must be flagged with
      GPIO_ACTIVE_LOW.

  linux,gpio-keymap:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: |
      When enabled, the SPT_GPIOPWN_T19 object sends messages
      on GPIO bit changes. An array of up to 8 entries can be provided
      indicating the Linux keycode mapped to each bit of the status byte,
      starting at the LSB. Linux keycodes are defined in
      <dt-bindings/input/input.h>.

      Note: the numbering of the GPIOs and the bit they start at varies
      between maXTouch devices. You must either refer to the documentation,
      or experiment to determine which bit corresponds to which input. Use
      KEY_RESERVED for unused padding values.

  atmel,wakeup-method:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      The WAKE line is an active-low input that is used to wake up the touch
      controller from deep-sleep mode before communication with the controller
      could be started. This optional feature used to minimize current
      consumption when the controller is in deep sleep mode. This feature is
      relevant only to some controller families, like mXT1386 controller for
      example.

      The WAKE pin can be connected in one of the following ways:
       1) left permanently low
       2) connected to the I2C-compatible SCL pin
       3) connected to a GPIO pin on the host
    enum:
      - 0 # ATMEL_MXT_WAKEUP_NONE
      - 1 # ATMEL_MXT_WAKEUP_I2C_SCL
      - 2 # ATMEL_MXT_WAKEUP_GPIO
    default: 0

  wakeup-source:
    type: boolean

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/input/atmel-maxtouch.h>
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      touchscreen@4a {
        compatible = "atmel,maxtouch";
        reg = <0x4a>;
        interrupt-parent = <&gpio>;
        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
        reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
        vdda-supply = <&ab8500_ldo_aux2_reg>;
        vdd-supply = <&ab8500_ldo_aux5_reg>;
        atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
      };
    };

...