1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/iio/afe/voltage-divider.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Peter Rosin <peda@axentia.se>
13 When an io-channel measures the midpoint of a voltage divider, the
14 interesting voltage is often the voltage over the full resistance
15 of the divider. This binding describes the voltage divider in such
35 const: voltage-divider
40 Channel node of a voltage io-channel.
44 Resistance Rout over which the output voltage is measured. See full-ohms.
48 Resistance R + Rout for the full divider. The io-channel is scaled by
49 the Rout / (R + Rout) quotient.
57 additionalProperties: false
61 #include <dt-bindings/interrupt-controller/irq.h>
63 * The system voltage is circa 12V, but divided down with a 22/222
64 * voltage divider (R = 200 Ohms, Rout = 22 Ohms) and fed to an ADC.
70 compatible = "maxim,max1027";
72 #io-channel-cells = <1>;
73 interrupt-parent = <&gpio5>;
74 interrupts = <15 IRQ_TYPE_EDGE_RISING>;
75 spi-max-frequency = <1000000>;
79 compatible = "voltage-divider";
80 io-channels = <&maxadc 1>;
82 /* Scale the system voltage by 22/222 to fit the ADC range. */
84 full-ohms = <222>; /* 200 + 22 */