1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/avia-hx711.yaml# 5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: AVIA HX711 ADC chip for weight cells 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Andreas Klinger <ak@it-klinger.de> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotdescription: | 13c66ec88fSEmmanuel Vadot Bit-banging driver using two GPIOs: 14c66ec88fSEmmanuel Vadot - sck-gpio gives a clock to the sensor with 24 cycles for data retrieval 15c66ec88fSEmmanuel Vadot and up to 3 cycles for selection of the input channel and gain for the 16c66ec88fSEmmanuel Vadot next measurement 17c66ec88fSEmmanuel Vadot - dout-gpio is the sensor data the sensor responds to the clock 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadot Specifications about the driver can be found at: 20c66ec88fSEmmanuel Vadot http://www.aviaic.com/ENProducts.aspx 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadotproperties: 23c66ec88fSEmmanuel Vadot compatible: 24c66ec88fSEmmanuel Vadot enum: 25c66ec88fSEmmanuel Vadot - avia,hx711 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadot sck-gpios: 28c66ec88fSEmmanuel Vadot description: 29c66ec88fSEmmanuel Vadot Definition of the GPIO for the clock (output). In the datasheet it is 30c66ec88fSEmmanuel Vadot named PD_SCK 31c66ec88fSEmmanuel Vadot maxItems: 1 32c66ec88fSEmmanuel Vadot 33c66ec88fSEmmanuel Vadot dout-gpios: 34c66ec88fSEmmanuel Vadot description: 35c66ec88fSEmmanuel Vadot Definition of the GPIO for the data-out sent by the sensor in 36c66ec88fSEmmanuel Vadot response to the clock (input). 37c66ec88fSEmmanuel Vadot See Documentation/devicetree/bindings/gpio/gpio.txt for information 38c66ec88fSEmmanuel Vadot on how to specify a consumer gpio. 39c66ec88fSEmmanuel Vadot maxItems: 1 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot avdd-supply: 42c66ec88fSEmmanuel Vadot description: 43c66ec88fSEmmanuel Vadot Definition of the regulator used as analog supply 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot clock-frequency: 46c66ec88fSEmmanuel Vadot minimum: 20000 47c66ec88fSEmmanuel Vadot maximum: 2500000 48c66ec88fSEmmanuel Vadot default: 400000 49c66ec88fSEmmanuel Vadot 50c66ec88fSEmmanuel Vadotrequired: 51c66ec88fSEmmanuel Vadot - compatible 52c66ec88fSEmmanuel Vadot - sck-gpios 53c66ec88fSEmmanuel Vadot - dout-gpios 54c66ec88fSEmmanuel Vadot - avdd-supply 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel VadotadditionalProperties: false 57c66ec88fSEmmanuel Vadot 58c66ec88fSEmmanuel Vadotexamples: 59c66ec88fSEmmanuel Vadot - | 60c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 61c66ec88fSEmmanuel Vadot weight { 62c66ec88fSEmmanuel Vadot compatible = "avia,hx711"; 63c66ec88fSEmmanuel Vadot sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; 64c66ec88fSEmmanuel Vadot dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; 65c66ec88fSEmmanuel Vadot avdd-supply = <&avdd>; 66c66ec88fSEmmanuel Vadot clock-frequency = <100000>; 67c66ec88fSEmmanuel Vadot }; 68