aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2015-07-07 11:06:50 -0400
committerMark Brown <broonie@kernel.org>2015-07-07 13:58:27 -0400
commit02258b8bcbb98b28064cc829f7062455da398633 (patch)
tree16f14db917c7e5d3d357a8edb2d11cff7ac15abc
parentf9178dad67952673b653315f92620b7a981466e5 (diff)
regulator: pwm-regulator: Re-write bindings
* Add support for continuous-voltage mode * Put more meat on the bones with regards to voltage-table mode * Sort out formatting for ease of consumption Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/regulator/pwm-regulator.txt68
1 files changed, 56 insertions, 12 deletions
diff --git a/Documentation/devicetree/bindings/regulator/pwm-regulator.txt b/Documentation/devicetree/bindings/regulator/pwm-regulator.txt
index ce91f61feb12..892b36655b3d 100644
--- a/Documentation/devicetree/bindings/regulator/pwm-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/pwm-regulator.txt
@@ -1,27 +1,71 @@
1pwm regulator bindings 1Bindings for the Generic PWM Regulator
2======================================
3
4Currently supports 2 modes of operation:
5
6voltage-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
16continuous-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.
2 25
3Required properties: 26Required properties:
4- compatible: Should be "pwm-regulator" 27--------------------
5- pwms: OF device-tree PWM specification (see PWM binding pwm.txt) 28- compatible: Should be "pwm-regulator"
6- voltage-table: voltage and duty table, include 2 members in each set of 29
7 brackets, first one is voltage(unit: uv), the next is duty(unit: percent) 30- pwms: PWM specification (See: ../pwm/pwm.txt)
31
32One of these must be provided:
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- max-duty-cycle: Maximum Duty-Cycle value -- this will normally be
38 255 (0xff) for an 8 bit PWM device
8 39
9Any property defined as part of the core regulator binding defined in 40If both are provided, the current default is voltage-table mode.
10regulator.txt can also be used.
11 41
12Example: 42Any property defined as part of the core regulator binding can also be used.
43(See: ../regulator/regulator.txt)
44
45Continuous Voltage Example:
13 pwm_regulator { 46 pwm_regulator {
14 compatible = "pwm-regulator; 47 compatible = "pwm-regulator;
15 pwms = <&pwm1 0 8448 0>; 48 pwms = <&pwm1 0 8448 0>;
49 regulator-min-microvolt = <1016000>;
50 regulator-max-microvolt = <1114000>;
51 regulator-name = "vdd_logic";
52
53 max-duty-cycle = <255>; /* 8bit PWM */
54 };
16 55
56Voltage Table Example:
57 pwm_regulator {
58 compatible = "pwm-regulator;
59 pwms = <&pwm1 0 8448 0>;
60 regulator-min-microvolt = <1016000>;
61 regulator-max-microvolt = <1114000>;
62 regulator-name = "vdd_logic";
63
64 /* Voltage Duty-Cycle */
17 voltage-table = <1114000 0>, 65 voltage-table = <1114000 0>,
18 <1095000 10>, 66 <1095000 10>,
19 <1076000 20>, 67 <1076000 20>,
20 <1056000 30>, 68 <1056000 30>,
21 <1036000 40>, 69 <1036000 40>,
22 <1016000 50>; 70 <1016000 50>;
23
24 regulator-min-microvolt = <1016000>;
25 regulator-max-microvolt = <1114000>;
26 regulator-name = "vdd_logic";
27 }; 71 };