~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/regulator/pwm-regulator.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: GPL-2.0
  2 %YAML 1.2
  3 ---
  4 $id: http://devicetree.org/schemas/regulator/pwm-regulator.yaml#
  5 $schema: http://devicetree.org/meta-schemas/core.yaml#
  6 
  7 title: Generic PWM Regulator
  8 
  9 maintainers:
 10   - Brian Norris <briannorris@chromium.org>
 11   - Lee Jones <lee@kernel.org>
 12   - Alexandre Courbot <acourbot@nvidia.com>
 13 
 14 description: |
 15   Currently supports 2 modes of operation:
 16 
 17   Voltage Table:
 18     When in this mode, a voltage table (See below) of predefined voltage <=>
 19     duty-cycle values must be provided via DT. Limitations are that the
 20     regulator can only operate at the voltages supplied in the table.
 21     Intermediary duty-cycle values which would normally allow finer grained
 22     voltage selection are ignored and rendered useless.  Although more control
 23     is given to the user if the assumptions made in continuous-voltage mode do
 24     not reign true.
 25 
 26   Continuous Voltage:
 27     This mode uses the regulator's maximum and minimum supplied voltages
 28     specified in the regulator-{min,max}-microvolt properties to calculate
 29     appropriate duty-cycle values.  This allows for a much more fine grained
 30     solution when compared with voltage-table mode above.  This solution does
 31     make an assumption that a %50 duty-cycle value will cause the regulator
 32     voltage to run at half way between the supplied max_uV and min_uV values.
 33 
 34   If voltage-table is provided, then the device will be used in Voltage Table
 35   Mode.  If no voltage-table is provided, then the device will be used in
 36   Continuous Voltage Mode.
 37 
 38 allOf:
 39   - $ref: regulator.yaml#
 40 
 41 properties:
 42   compatible:
 43     const: pwm-regulator
 44 
 45   pwms:
 46     maxItems: 1
 47 
 48   voltage-table:
 49     description: Voltage and Duty-Cycle table.
 50     $ref: /schemas/types.yaml#/definitions/uint32-matrix
 51     items:
 52       items:
 53         - description: voltage in microvolts (uV)
 54         - description: duty-cycle in percent (%)
 55 
 56   enable-gpios:
 57     description: Regulator enable GPIO
 58     maxItems: 1
 59 
 60    # Optional properties for Continuous mode:
 61   pwm-dutycycle-unit:
 62     description:
 63       Integer value encoding the duty cycle unit. If not
 64         defined, <100> is assumed, meaning that
 65         pwm-dutycycle-range contains values expressed in
 66         percent.
 67     $ref: /schemas/types.yaml#/definitions/uint32
 68     default: 100
 69 
 70   pwm-dutycycle-range:
 71     description:
 72       Should contain 2 entries. The first entry is encoding
 73         the dutycycle for regulator-min-microvolt and the
 74         second one the dutycycle for regulator-max-microvolt.
 75         Duty cycle values are expressed in pwm-dutycycle-unit.
 76         If not defined, <0 100> is assumed.
 77     $ref: /schemas/types.yaml#/definitions/uint32-array
 78     items:
 79       - description: the dutycycle for regulator-min-microvolt
 80       - description: the dutycycle for regulator-max-microvolt
 81     default: [ 0 100 ]
 82 
 83 required:
 84   - compatible
 85   - pwms
 86 
 87 unevaluatedProperties: false
 88 
 89 examples:
 90   - |
 91     #include <dt-bindings/gpio/gpio.h>
 92 
 93     // Continuous Voltage With Enable GPIO Example:
 94     regulator {
 95         compatible = "pwm-regulator";
 96         pwms = <&pwm1 0 8448 0>;
 97         enable-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
 98         regulator-min-microvolt = <1016000>;
 99         regulator-max-microvolt = <1114000>;
100         regulator-name = "vdd_logic";
101         /* unit == per-mille */
102         pwm-dutycycle-unit = <1000>;
103         /*
104         * Inverted PWM logic, and the duty cycle range is limited
105         * to 30%-70%.
106         */
107         pwm-dutycycle-range = <700 300>; /* */
108     };
109 
110   - |
111     // Voltage Table Example:
112     regulator {
113         compatible = "pwm-regulator";
114         pwms = <&pwm1 0 8448 0>;
115         regulator-min-microvolt = <1016000>;
116         regulator-max-microvolt = <1114000>;
117         regulator-name = "vdd_logic";
118 
119                 /* Voltage Duty-Cycle */
120         voltage-table = <1114000 0>,
121             <1095000 10>,
122             <1076000 20>,
123             <1056000 30>,
124             <1036000 40>,
125             <1016000 50>;
126     };
127 ...

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php