blob: 099235b5fd548213e6a3b0599fa0c974557bfe9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/avia-hx711.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AVIA HX711 ADC chip for weight cells
maintainers:
- Andreas Klinger <ak@it-klinger.de>
description: |
The HX711 is a 24-bit ADC with selectable gain (32/64/128) and two
differential input channels. Channel A supports gain 64 and 128;
channel B supports gain 32.
properties:
compatible:
enum:
- avia,hx711
sck-gpios:
description:
GPIO for the clock output (PD_SCK in the datasheet).
maxItems: 1
dout-gpios:
description:
GPIO for the data output from the sensor (DOUT in the datasheet).
maxItems: 1
avdd-supply:
description:
Analog supply voltage (AVDD).
vsup-supply:
description:
Supply voltage for the on-chip regulator (VSUP).
dvdd-supply:
description:
Digital supply voltage (DVDD). On the HX711, DVDD is a
board-supplied digital rail; it was missing from the original
binding. On the HX710B, DVDD must be greater than or equal to
AVDD; when DVDD is a battery rail and AVDD is a regulated supply,
one channel monitors the DVDD-AVDD difference for battery level
detection.
rate-gpios:
description:
GPIO connected to the RATE pin. When driven low the output data
rate is 10 SPS; when driven high it is 80 SPS. If omitted the
RATE pin state is determined by the board wiring.
maxItems: 1
clock-frequency:
description:
Controls the SCK bit-bang timing. The value is used to derive the
delay between SCK edges; keep the SCK high time below 60 us to
avoid triggering chip power-down mode.
minimum: 20000
maximum: 2500000
default: 400000
required:
- compatible
- sck-gpios
- dout-gpios
- avdd-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
weight {
compatible = "avia,hx711";
sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
rate-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
avdd-supply = <&avdd>;
clock-frequency = <100000>;
};
|