Merge branch 'i2c/for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
[deliverable/linux.git] / Documentation / devicetree / bindings / regulator / pwm-regulator.txt
1 Bindings for the Generic PWM Regulator
2 ======================================
3
4 Currently supports 2 modes of operation:
5
6 Voltage Table: When in this mode, a voltage table (See below) of
7 predefined voltage <=> duty-cycle values must be
8 provided via DT. Limitations are that the regulator can
9 only operate at the voltages supplied in the table.
10 Intermediary duty-cycle values which would normally
11 allow finer grained voltage selection are ignored and
12 rendered useless. Although more control is given to
13 the user if the assumptions made in continuous-voltage
14 mode do not reign true.
15
16 Continuous Voltage: This mode uses the regulator's maximum and minimum
17 supplied voltages specified in the
18 regulator-{min,max}-microvolt properties to calculate
19 appropriate duty-cycle values. This allows for a much
20 more fine grained solution when compared with
21 voltage-table mode above. This solution does make an
22 assumption that a %50 duty-cycle value will cause the
23 regulator voltage to run at half way between the
24 supplied max_uV and min_uV values.
25
26 Required properties:
27 --------------------
28 - compatible: Should be "pwm-regulator"
29
30 - pwms: PWM specification (See: ../pwm/pwm.txt)
31
32 Only required for Voltage Table Mode:
33 - voltage-table: Voltage and Duty-Cycle table consisting of 2 cells
34 First cell is voltage in microvolts (uV)
35 Second cell is duty-cycle in percent (%)
36
37 NB: To be clear, if voltage-table is provided, then the device will be used
38 in Voltage Table Mode. If no voltage-table is provided, then the device will
39 be used in Continuous Voltage Mode.
40
41 Optional properties:
42 --------------------
43 - enable-gpios: GPIO to use to enable/disable the regulator
44
45 Any property defined as part of the core regulator binding can also be used.
46 (See: ../regulator/regulator.txt)
47
48 Continuous Voltage With Enable GPIO Example:
49 pwm_regulator {
50 compatible = "pwm-regulator;
51 pwms = <&pwm1 0 8448 0>;
52 enable-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
53 regulator-min-microvolt = <1016000>;
54 regulator-max-microvolt = <1114000>;
55 regulator-name = "vdd_logic";
56 };
57
58 Voltage Table Example:
59 pwm_regulator {
60 compatible = "pwm-regulator;
61 pwms = <&pwm1 0 8448 0>;
62 regulator-min-microvolt = <1016000>;
63 regulator-max-microvolt = <1114000>;
64 regulator-name = "vdd_logic";
65
66 /* Voltage Duty-Cycle */
67 voltage-table = <1114000 0>,
68 <1095000 10>,
69 <1076000 20>,
70 <1056000 30>,
71 <1036000 40>,
72 <1016000 50>;
73 };
This page took 0.03442 seconds and 5 git commands to generate.