1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Devantech SRF04 ultrasonic range finder 8 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 ultrasonic 15 burst 16 - echo-gpio is held high by the sensor after sending ultrasonic burst 17 until it is received once again 18 19 Specifications about the driver can be found at: 20 http://www.robot-electronics.co.uk/htm/srf04tech.htm 21 22properties: 23 compatible: 24 items: 25 - const: devantech,srf04 26 27 trig-gpios: 28 description: 29 Definition of the GPIO for the triggering (output) This GPIO is set 30 for about 10 us by the driver to tell the device it should initiate 31 the measurement cycle. 32 maxItems: 1 33 34 echo-gpios: 35 description: 36 Definition of the GPIO for the echo (input) 37 This GPIO is set by the device as soon as an ultrasonic burst is sent 38 out and reset when the first echo is received. 39 Thus this GPIO is set while the ultrasonic waves are doing one round 40 trip. 41 It needs to be an GPIO which is able to deliver an interrupt because 42 the time between two interrupts is measured in the driver. 43 See Documentation/devicetree/bindings/gpio/gpio.txt for information 44 on how to specify a consumer gpio. 45 maxItems: 1 46 47required: 48 - compatible 49 - trig-gpios 50 - echo-gpios 51 52examples: 53 - | 54 #include <dt-bindings/gpio/gpio.h> 55 proximity { 56 compatible = "devantech,srf04"; 57 trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 58 echo-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; 59 }; 60