87 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Devantech SRF04 and Maxbotix mb1000 ultrasonic range finder8 9maintainers:10 - Andreas Klinger <ak@it-klinger.de>11 12description: |13 Bit-banging driver using two GPIOs:14 - trigger-gpio is raised by the driver to start sending out an ultrasonic15 burst16 - echo-gpio is held high by the sensor after sending ultrasonic burst17 until it is received once again18 19 Specifications about the devices can be found at:20 https://www.robot-electronics.co.uk/htm/srf04tech.htm21 22 https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf23 24properties:25 compatible:26 enum:27 - devantech,srf0428 - maxbotix,mb100029 - maxbotix,mb101030 - maxbotix,mb102031 - maxbotix,mb103032 - maxbotix,mb104033 34 trig-gpios:35 description:36 Definition of the GPIO for the triggering (output)37 This GPIO is set for about 10 us by the driver to tell the device it38 should initiate the measurement cycle.39 See Documentation/devicetree/bindings/gpio/gpio.txt for information40 on how to specify a consumer gpio.41 maxItems: 142 43 echo-gpios:44 description:45 Definition of the GPIO for the echo (input)46 This GPIO is set by the device as soon as an ultrasonic burst is sent47 out and reset when the first echo is received.48 Thus this GPIO is set while the ultrasonic waves are doing one round49 trip.50 It needs to be an GPIO which is able to deliver an interrupt because51 the time between two interrupts is measured in the driver.52 maxItems: 153 54 power-gpios:55 description:56 Definition of the GPIO for power management of connected peripheral57 (output).58 This GPIO can be used by the external hardware for power management.59 When the device gets suspended it's switched off and when it resumes60 it's switched on again. After some period of inactivity the driver61 get suspended automatically (autosuspend feature).62 maxItems: 163 64 startup-time-ms:65 description:66 This is the startup time the device needs after a resume to be up and67 running.68 minimum: 069 maximum: 100070 default: 10071 72required:73 - compatible74 - trig-gpios75 - echo-gpios76 77additionalProperties: false78 79examples:80 - |81 #include <dt-bindings/gpio/gpio.h>82 proximity {83 compatible = "devantech,srf04";84 trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;85 echo-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;86 };87