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