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

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/regulator/gpio-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/gpio-regulator.yaml#
  5 $schema: http://devicetree.org/meta-schemas/core.yaml#
  6 
  7 title: GPIO controlled regulators
  8 
  9 maintainers:
 10   - Liam Girdwood <lgirdwood@gmail.com>
 11   - Mark Brown <broonie@kernel.org>
 12 
 13 description:
 14   Any property defined as part of the core regulator binding, defined in
 15   regulator.txt, can also be used.
 16 
 17 allOf:
 18   - $ref: regulator.yaml#
 19 
 20 properties:
 21   compatible:
 22     const: regulator-gpio
 23 
 24   regulator-name: true
 25 
 26   enable-gpios:
 27     description: GPIO to use to enable/disable the regulator.
 28       Warning, the GPIO phandle flags are ignored and the GPIO polarity is
 29       controlled solely by the presence of "enable-active-high" DT property.
 30       This is due to compatibility with old DTs.
 31     maxItems: 1
 32 
 33   gpios:
 34     description: Array of one or more GPIO pins used to select the regulator
 35       voltage/current listed in "states".
 36     minItems: 1
 37     maxItems: 8  # Should be enough...
 38 
 39   gpios-states:
 40     description: |
 41       On operating systems, that don't support reading back gpio values in
 42       output mode (most notably linux), this array provides the state of GPIO
 43       pins set when requesting them from the gpio controller. Systems, that are
 44       capable of preserving state when requesting the lines, are free to ignore
 45       this property.
 46         0: LOW
 47         1: HIGH
 48       Default is LOW if nothing else is specified.
 49     $ref: /schemas/types.yaml#/definitions/uint32-array
 50     minItems: 1
 51     maxItems: 8
 52     items:
 53       enum: [0, 1]
 54       default: 0
 55 
 56   states:
 57     description: Selection of available voltages/currents provided by this
 58       regulator and matching GPIO configurations to achieve them. If there are
 59       no states in the "states" array, use a fixed regulator instead.
 60     $ref: /schemas/types.yaml#/definitions/uint32-matrix
 61     minItems: 2
 62     maxItems: 256
 63     items:
 64       items:
 65         - description: Voltage in microvolts
 66         - description: GPIO group state value
 67 
 68   startup-delay-us:
 69     description: startup time in microseconds
 70 
 71   enable-active-high:
 72     description: Polarity of "enable-gpio" GPIO is active HIGH. Default is
 73       active LOW.
 74     type: boolean
 75 
 76   gpio-open-drain:
 77     description:
 78       GPIO is open drain type. If this property is missing then default
 79       assumption is false.
 80     type: boolean
 81 
 82   regulator-type:
 83     description: Specifies what is being regulated.
 84     $ref: /schemas/types.yaml#/definitions/string
 85     enum:
 86       - voltage
 87       - current
 88     default: voltage
 89 
 90   vin-supply:
 91     description: Input supply phandle.
 92 
 93 required:
 94   - compatible
 95   - regulator-name
 96   - gpios
 97   - states
 98 
 99 unevaluatedProperties: false
100 
101 examples:
102   - |
103     gpio-regulator {
104       compatible = "regulator-gpio";
105 
106       regulator-name = "mmci-gpio-supply";
107       regulator-min-microvolt = <1800000>;
108       regulator-max-microvolt = <2600000>;
109       regulator-boot-on;
110 
111       enable-gpios = <&gpio0 23 0x4>;
112       gpios = <&gpio0 24 0x4
113         &gpio0 25 0x4>;
114       states = <1800000 0x3>,
115         <2200000 0x2>,
116         <2600000 0x1>,
117         <2900000 0x0>;
118 
119       startup-delay-us = <100000>;
120       enable-active-high;
121     };
122 ...

~ [ 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