Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Devantech SRF04 and Maxbotix mb1000 ultrasonic range finder
0008 
0009 maintainers:
0010   - Andreas Klinger <ak@it-klinger.de>
0011 
0012 description: |
0013   Bit-banging driver using two GPIOs:
0014   - trigger-gpio is raised by the driver to start sending out an ultrasonic
0015     burst
0016   - echo-gpio is held high by the sensor after sending ultrasonic burst
0017     until it is received once again
0018 
0019   Specifications about the devices can be found at:
0020   https://www.robot-electronics.co.uk/htm/srf04tech.htm
0021 
0022   https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf
0023 
0024 properties:
0025   compatible:
0026     enum:
0027       - devantech,srf04
0028       - maxbotix,mb1000
0029       - maxbotix,mb1010
0030       - maxbotix,mb1020
0031       - maxbotix,mb1030
0032       - maxbotix,mb1040
0033 
0034   trig-gpios:
0035     description:
0036       Definition of the GPIO for the triggering (output)
0037       This GPIO is set for about 10 us by the driver to tell the device it
0038       should initiate the measurement cycle.
0039       See Documentation/devicetree/bindings/gpio/gpio.txt for information
0040       on how to specify a consumer gpio.
0041     maxItems: 1
0042 
0043   echo-gpios:
0044     description:
0045       Definition of the GPIO for the echo (input)
0046       This GPIO is set by the device as soon as an ultrasonic burst is sent
0047       out and reset when the first echo is received.
0048       Thus this GPIO is set while the ultrasonic waves are doing one round
0049       trip.
0050       It needs to be an GPIO which is able to deliver an interrupt because
0051       the time between two interrupts is measured in the driver.
0052     maxItems: 1
0053 
0054   power-gpios:
0055     description:
0056       Definition of the GPIO for power management of connected peripheral
0057       (output).
0058       This GPIO can be used by the external hardware for power management.
0059       When the device gets suspended it's switched off and when it resumes
0060       it's switched on again. After some period of inactivity the driver
0061       get suspended automatically (autosuspend feature).
0062     maxItems: 1
0063 
0064   startup-time-ms:
0065     description:
0066       This is the startup time the device needs after a resume to be up and
0067       running.
0068     minimum: 0
0069     maximum: 1000
0070     default: 100
0071 
0072 required:
0073   - compatible
0074   - trig-gpios
0075   - echo-gpios
0076 
0077 additionalProperties: false
0078 
0079 examples:
0080   - |
0081     #include <dt-bindings/gpio/gpio.h>
0082     proximity {
0083         compatible = "devantech,srf04";
0084         trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
0085         echo-gpios = <&gpio2  6 GPIO_ACTIVE_HIGH>;
0086     };