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
CommitLineData
02258b8b
LJ
1Bindings for the Generic PWM Regulator
2======================================
3
4Currently supports 2 modes of operation:
5
a505bfb1 6Voltage Table: When in this mode, a voltage table (See below) of
02258b8b
LJ
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
a505bfb1 16Continuous Voltage: This mode uses the regulator's maximum and minimum
02258b8b
LJ
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.
fbf79744
CZ
25
26Required properties:
02258b8b
LJ
27--------------------
28- compatible: Should be "pwm-regulator"
29
30- pwms: PWM specification (See: ../pwm/pwm.txt)
31
f747a1fe 32Only required for Voltage Table Mode:
02258b8b
LJ
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
f747a1fe
LJ
37NB: To be clear, if voltage-table is provided, then the device will be used
38in Voltage Table Mode. If no voltage-table is provided, then the device will
39be used in Continuous Voltage Mode.
fbf79744 40
27bfa889
AC
41Optional properties:
42--------------------
43- enable-gpios: GPIO to use to enable/disable the regulator
44
02258b8b
LJ
45Any property defined as part of the core regulator binding can also be used.
46(See: ../regulator/regulator.txt)
47
27bfa889 48Continuous Voltage With Enable GPIO Example:
fbf79744
CZ
49 pwm_regulator {
50 compatible = "pwm-regulator;
51 pwms = <&pwm1 0 8448 0>;
27bfa889 52 enable-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
02258b8b
LJ
53 regulator-min-microvolt = <1016000>;
54 regulator-max-microvolt = <1114000>;
55 regulator-name = "vdd_logic";
02258b8b 56 };
fbf79744 57
02258b8b
LJ
58Voltage 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 */
fbf79744
CZ
67 voltage-table = <1114000 0>,
68 <1095000 10>,
69 <1076000 20>,
70 <1056000 30>,
71 <1036000 40>,
72 <1016000 50>;
fbf79744 73 };
This page took 0.18197 seconds and 5 git commands to generate.