1# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Parallax PING))) and LaserPING range finder 8 9maintainers: 10 - Andreas Klinger <ak@it-klinger.de> 11 12description: | 13 Bit-banging driver using one GPIO: 14 - ping-gpios is raised by the driver to start measurement 15 - direction of ping-gpio is then switched into input with an interrupt 16 for receiving distance value as PWM signal 17 18 Specifications about the devices can be found at: 19 http://parallax.com/sites/default/files/downloads/28041-LaserPING-2m-Rangefinder-Guide.pdf 20 http://parallax.com/sites/default/files/downloads/28015-PING-Documentation-v1.6.pdf 21 22properties: 23 compatible: 24 enum: 25 - parallax,ping 26 - parallax,laserping 27 28 ping-gpios: 29 description: 30 Definition of the GPIO for the triggering and echo (output and input) 31 This GPIO is set for about 5 us by the driver to tell the device it 32 should initiate the measurement cycle. Afterwards the GPIO is switched 33 to input direction with an interrupt. The device sets it and the 34 length of the input signal corresponds to the measured distance. 35 It needs to be an GPIO which is able to deliver an interrupt because 36 the time between two interrupts is measured in the driver. 37 See Documentation/devicetree/bindings/gpio/gpio.txt for information 38 on how to specify a consumer gpio. 39 maxItems: 1 40 41required: 42 - compatible 43 - ping-gpios 44 45additionalProperties: false 46 47examples: 48 - | 49 #include <dt-bindings/gpio/gpio.h> 50 proximity { 51 compatible = "parallax,laserping"; 52 ping-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; 53 }; 54