Path: blob/master/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
26309 views
# SPDX-License-Identifier: GPL-2.01%YAML 1.22---3$id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Devantech SRF04 and Maxbotix mb1000 ultrasonic range finder78maintainers:9- Andreas Klinger <ak@it-klinger.de>1011description: |12Bit-banging driver using two GPIOs:13- trigger-gpio is raised by the driver to start sending out an ultrasonic14burst15- echo-gpio is held high by the sensor after sending ultrasonic burst16until it is received once again1718Specifications about the devices can be found at:19https://www.robot-electronics.co.uk/htm/srf04tech.htm2021https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf2223properties:24compatible:25enum:26- devantech,srf0427- maxbotix,mb100028- maxbotix,mb101029- maxbotix,mb102030- maxbotix,mb103031- maxbotix,mb10403233trig-gpios:34description:35Definition of the GPIO for the triggering (output)36This GPIO is set for about 10 us by the driver to tell the device it37should initiate the measurement cycle.38See Documentation/devicetree/bindings/gpio/gpio.txt for information39on how to specify a consumer gpio.40maxItems: 14142echo-gpios:43description:44Definition of the GPIO for the echo (input)45This GPIO is set by the device as soon as an ultrasonic burst is sent46out and reset when the first echo is received.47Thus this GPIO is set while the ultrasonic waves are doing one round48trip.49It needs to be an GPIO which is able to deliver an interrupt because50the time between two interrupts is measured in the driver.51maxItems: 15253power-gpios:54description:55Definition of the GPIO for power management of connected peripheral56(output).57This GPIO can be used by the external hardware for power management.58When the device gets suspended it's switched off and when it resumes59it's switched on again. After some period of inactivity the driver60get suspended automatically (autosuspend feature).61maxItems: 16263startup-time-ms:64description:65This is the startup time the device needs after a resume to be up and66running.67minimum: 068maximum: 100069default: 1007071required:72- compatible73- trig-gpios74- echo-gpios7576additionalProperties: false7778examples:79- |80#include <dt-bindings/gpio/gpio.h>81proximity {82compatible = "devantech,srf04";83trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;84echo-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;85};868788