1ADC device binding
2
3There are no mandatory properties for ADC. However, if Voltage info is required,
4then there are two options:
5- use microvolts constraint or
6- use regulator phandle to enable/read supply's Voltage
7
8Properties and constraints:
9*optional and always checked, Voltage polarity info:
10- vdd-polarity-negative:  positive reference Voltage has a negative polarity
11- vss-polarity-negative:  negative reference Voltage has a negative polarity
12
13Chose one option, for each supply (Vdd/Vss):
14
15*optional and always checked, supply Voltage constants:
16- vdd-supply:            phandle to Vdd regulator's node
17- vss-supply:            phandle to Vss regulator's node
18
19*optional and checked only if the above corresponding, doesn't exist:
20- vdd-microvolts:        positive reference Voltage value [uV]
21- vss-microvolts:        negative reference Voltage value [uV]
22
23Example with constant 'Vdd' value:
24adc@1000000 {
25	compatible = "some-adc";
26	reg = <0xaabb000 0x100>;
27	status = "enabled";
28	vdd-microvolts = <1800000>;
29};
30
31Example of supply phandle usage, for the ADC's VDD/VSS references as below:
32   _______         _______
33  |Sandbox|       |Sandbox|
34  : PMIC  :       :  ADC  :
35  .       .       .       .
36  |       | (Vdd) |   AIN0|-->
37  |  BUCK2|-------|VDDref |
38  | (3.3V)|      _|VSSref |
39  |_______|     | |_______|
40               _|_
41
42For the above PMIC, the node can be defined as follows:
43sandbox_pmic {
44	compatible = "sandbox,pmic";
45	...
46	buck2: buck2 {
47		regulator-name = "SUPPLY_3.3V";
48		regulator-min-microvolt = <3300000>;
49		regulator-max-microvolt = <3300000>;
50	};
51	...
52};
53
54For the above ADC, the node can be defined as follows:
55adc@0 {
56	compatible = "sandbox,adc";
57	vdd-supply = <&buck2>;
58	vss-microvolts = <0>;
59};
60
61The ADC uclass code, will enable the supply before start of the conversion,
62but it will not configure the regulator settings.
63