152f171abSAndreas Klinger# SPDX-License-Identifier: GPL-2.0
252f171abSAndreas Klinger%YAML 1.2
352f171abSAndreas Klinger---
452f171abSAndreas Klinger$id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml#
552f171abSAndreas Klinger$schema: http://devicetree.org/meta-schemas/core.yaml#
652f171abSAndreas Klinger
7d6edf95aSAndreas Klingertitle: Devantech SRF04 and Maxbotix mb1000 ultrasonic range finder
852f171abSAndreas Klinger
952f171abSAndreas Klingermaintainers:
1052f171abSAndreas Klinger  - Andreas Klinger <ak@it-klinger.de>
1152f171abSAndreas Klinger
1252f171abSAndreas Klingerdescription: |
1352f171abSAndreas Klinger  Bit-banging driver using two GPIOs:
1452f171abSAndreas Klinger  - trigger-gpio is raised by the driver to start sending out an ultrasonic
1552f171abSAndreas Klinger    burst
1652f171abSAndreas Klinger  - echo-gpio is held high by the sensor after sending ultrasonic burst
1752f171abSAndreas Klinger    until it is received once again
1852f171abSAndreas Klinger
19d6edf95aSAndreas Klinger  Specifications about the devices can be found at:
2052f171abSAndreas Klinger  http://www.robot-electronics.co.uk/htm/srf04tech.htm
2152f171abSAndreas Klinger
22d6edf95aSAndreas Klinger  http://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf
23d6edf95aSAndreas Klinger
2452f171abSAndreas Klingerproperties:
2552f171abSAndreas Klinger  compatible:
26d6edf95aSAndreas Klinger    enum:
27d6edf95aSAndreas Klinger      - devantech,srf04
28d6edf95aSAndreas Klinger      - maxbotix,mb1000
29d6edf95aSAndreas Klinger      - maxbotix,mb1010
30d6edf95aSAndreas Klinger      - maxbotix,mb1020
31d6edf95aSAndreas Klinger      - maxbotix,mb1030
32d6edf95aSAndreas Klinger      - maxbotix,mb1040
3352f171abSAndreas Klinger
3452f171abSAndreas Klinger  trig-gpios:
3552f171abSAndreas Klinger    description:
36d6edf95aSAndreas Klinger      Definition of the GPIO for the triggering (output)
37d6edf95aSAndreas Klinger      This GPIO is set for about 10 us by the driver to tell the device it
38d6edf95aSAndreas Klinger      should initiate the measurement cycle.
39d6edf95aSAndreas Klinger      See Documentation/devicetree/bindings/gpio/gpio.txt for information
40d6edf95aSAndreas Klinger      on how to specify a consumer gpio.
4152f171abSAndreas Klinger    maxItems: 1
4252f171abSAndreas Klinger
4352f171abSAndreas Klinger  echo-gpios:
4452f171abSAndreas Klinger    description:
4552f171abSAndreas Klinger      Definition of the GPIO for the echo (input)
4652f171abSAndreas Klinger      This GPIO is set by the device as soon as an ultrasonic burst is sent
4752f171abSAndreas Klinger      out and reset when the first echo is received.
4852f171abSAndreas Klinger      Thus this GPIO is set while the ultrasonic waves are doing one round
4952f171abSAndreas Klinger      trip.
5052f171abSAndreas Klinger      It needs to be an GPIO which is able to deliver an interrupt because
5152f171abSAndreas Klinger      the time between two interrupts is measured in the driver.
5252f171abSAndreas Klinger    maxItems: 1
5352f171abSAndreas Klinger
5452f171abSAndreas Klingerrequired:
5552f171abSAndreas Klinger  - compatible
5652f171abSAndreas Klinger  - trig-gpios
5752f171abSAndreas Klinger  - echo-gpios
5852f171abSAndreas Klinger
5952f171abSAndreas Klingerexamples:
6052f171abSAndreas Klinger  - |
6152f171abSAndreas Klinger    #include <dt-bindings/gpio/gpio.h>
6252f171abSAndreas Klinger    proximity {
6352f171abSAndreas Klinger        compatible = "devantech,srf04";
6452f171abSAndreas Klinger        trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
6552f171abSAndreas Klinger        echo-gpios = <&gpio2  6 GPIO_ACTIVE_HIGH>;
6652f171abSAndreas Klinger    };
67