123 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/regulator/gpio-regulator.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: GPIO controlled regulators8 9maintainers:10 - Liam Girdwood <lgirdwood@gmail.com>11 - Mark Brown <broonie@kernel.org>12 13description:14 Any property defined as part of the core regulator binding, defined in15 regulator.txt, can also be used.16 17allOf:18 - $ref: regulator.yaml#19 20properties:21 compatible:22 const: regulator-gpio23 24 regulator-name: true25 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 is29 controlled solely by the presence of "enable-active-high" DT property.30 This is due to compatibility with old DTs.31 maxItems: 132 33 gpios:34 description: Array of one or more GPIO pins used to select the regulator35 voltage/current listed in "states".36 minItems: 137 maxItems: 8 # Should be enough...38 39 gpios-states:40 description: |41 On operating systems, that don't support reading back gpio values in42 output mode (most notably linux), this array provides the state of GPIO43 pins set when requesting them from the gpio controller. Systems, that are44 capable of preserving state when requesting the lines, are free to ignore45 this property.46 0: LOW47 1: HIGH48 Default is LOW if nothing else is specified.49 $ref: /schemas/types.yaml#/definitions/uint32-array50 minItems: 151 maxItems: 852 items:53 enum: [0, 1]54 default: 055 56 states:57 description: Selection of available voltages/currents provided by this58 regulator and matching GPIO configurations to achieve them. If there are59 no states in the "states" array, use a fixed regulator instead.60 $ref: /schemas/types.yaml#/definitions/uint32-matrix61 minItems: 262 maxItems: 25663 items:64 items:65 - description: Voltage in microvolts66 - description: GPIO group state value67 68 startup-delay-us:69 description: startup time in microseconds70 71 enable-active-high:72 description: Polarity of "enable-gpio" GPIO is active HIGH. Default is73 active LOW.74 type: boolean75 76 gpio-open-drain:77 description:78 GPIO is open drain type. If this property is missing then default79 assumption is false.80 type: boolean81 82 regulator-type:83 description: Specifies what is being regulated.84 $ref: /schemas/types.yaml#/definitions/string85 enum:86 - voltage87 - current88 default: voltage89 90 vin-supply:91 description: Input supply phandle.92 93required:94 - compatible95 - regulator-name96 - gpios97 - states98 99unevaluatedProperties: false100 101examples: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 0x4113 &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...123