3 There are no mandatory properties for ADC. However, if Voltage info is required,
4 then there are two options:
5 - use microvolts constraint or
6 - use regulator phandle to enable/read supply's Voltage
8 Properties 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
13 Chose one option, for each supply (Vdd/Vss):
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
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]
23 Example with constant 'Vdd' value:
25 compatible = "some-adc";
26 reg = <0xaabb000 0x100>;
28 vdd-microvolts = <1800000>;
31 Example of supply phandle usage, for the ADC's VDD/VSS references as below:
37 | BUCK2|-------|VDDref |
42 For the above PMIC, the node can be defined as follows:
44 compatible = "sandbox,pmic";
47 regulator-name = "SUPPLY_3.3V";
48 regulator-min-microvolt = <3300000>;
49 regulator-max-microvolt = <3300000>;
54 For the above ADC, the node can be defined as follows:
56 compatible = "sandbox,adc";
57 vdd-supply = <&buck2>;
61 The ADC uclass code, will enable the supply before start of the conversion,
62 but it will not configure the regulator settings.