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