brintos

brintos / linux-shallow public Read only

0
0
Text · 7.5 KiB · bdf3f7d Raw
259 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/regulator/active-semi,act8945a.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Active-semi ACT8945a regulator8 9maintainers:10  - Paul Cercueil <paul@crapouillou.net>11 12properties:13  compatible:14    const: active-semi,act8945a15 16  reg:17    maxItems: 118 19  system-power-controller:20    description:21      Indicates that the ACT8945a is responsible for powering OFF22      the system.23    type: boolean24 25  active-semi,vsel-high:26    description:27      Indicates the VSEL pin is high. If this property is missing,28      the VSEL pin is assumed to be low.29    type: boolean30 31  regulators:32    type: object33    additionalProperties: false34 35    properties:36      REG_DCDC1:37        type: object38        $ref: /schemas/regulator/regulator.yaml#39        unevaluatedProperties: false40 41        properties:42          vp1-supply:43            description: Handle to the VP1 input supply44 45      REG_DCDC2:46        type: object47        $ref: /schemas/regulator/regulator.yaml#48        unevaluatedProperties: false49 50        properties:51          vp2-supply:52            description: Handle to the VP2 input supply53 54      REG_DCDC3:55        type: object56        $ref: /schemas/regulator/regulator.yaml#57        unevaluatedProperties: false58 59        properties:60          vp3-supply:61            description: Handle to the VP3 input supply62 63    patternProperties:64      "^REG_LDO[1-2]$":65        type: object66        $ref: /schemas/regulator/regulator.yaml#67        unevaluatedProperties: false68 69        properties:70          inl45-supply:71            description: Handle to the INL45 input supply72 73      "^REG_LDO[3-4]$":74        type: object75        $ref: /schemas/regulator/regulator.yaml#76        unevaluatedProperties: false77 78        properties:79          inl67-supply:80            description: Handle to the INL67 input supply81 82  charger:83    type: object84    additionalProperties: false85 86    properties:87      compatible:88        const: active-semi,act8945a-charger89 90      interrupts:91        maxItems: 192 93      active-semi,chglev-gpios:94        description: CGHLEV GPIO95        maxItems: 196 97      active-semi,lbo-gpios:98        description: LBO GPIO99        maxItems: 1100 101      active-semi,input-voltage-threshold-microvolt:102        description: Input voltage threshold103        maxItems: 1104 105      active-semi,precondition-timeout:106        description: Precondition timeout107        $ref: /schemas/types.yaml#/definitions/uint32108 109      active-semi,total-timeout:110        description: Total timeout111        $ref: /schemas/types.yaml#/definitions/uint32112 113    required:114      - compatible115      - interrupts116 117additionalProperties: false118 119required:120  - reg121  - compatible122  - regulators123 124examples:125  - |126    #include <dt-bindings/gpio/gpio.h>127    #include <dt-bindings/interrupt-controller/irq.h>128    #include <dt-bindings/mfd/atmel-flexcom.h>129    #include <dt-bindings/regulator/active-semi,8945a-regulator.h>130 131    i2c {132      #address-cells = <1>;133      #size-cells = <0>;134 135      pmic@5b {136        compatible = "active-semi,act8945a";137        reg = <0x5b>;138        active-semi,vsel-high;139 140        regulators {141          REG_DCDC1 {142            regulator-name = "VDD_1V35";143            regulator-min-microvolt = <1350000>;144            regulator-max-microvolt = <1350000>;145            regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,146                                      <ACT8945A_REGULATOR_MODE_LOWPOWER>;147            regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;148            regulator-always-on;149 150            regulator-state-mem {151              regulator-on-in-suspend;152              regulator-suspend-min-microvolt = <1400000>;153              regulator-suspend-max-microvolt = <1400000>;154              regulator-changeable-in-suspend;155              regulator-mode = <ACT8945A_REGULATOR_MODE_LOWPOWER>;156            };157          };158 159          REG_DCDC2 {160            regulator-name = "VDD_1V2";161            regulator-min-microvolt = <1100000>;162            regulator-max-microvolt = <1300000>;163            regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,164                                      <ACT8945A_REGULATOR_MODE_LOWPOWER>;165            regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;166            regulator-always-on;167 168            regulator-state-mem {169              regulator-off-in-suspend;170            };171          };172 173          REG_DCDC3 {174            regulator-name = "VDD_3V3";175            regulator-min-microvolt = <3300000>;176            regulator-max-microvolt = <3300000>;177            regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,178                                      <ACT8945A_REGULATOR_MODE_LOWPOWER>;179            regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;180            regulator-always-on;181 182            regulator-state-mem {183              regulator-off-in-suspend;184            };185          };186 187          REG_LDO1 {188            regulator-name = "VDD_FUSE";189            regulator-min-microvolt = <2500000>;190            regulator-max-microvolt = <2500000>;191            regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,192                                      <ACT8945A_REGULATOR_MODE_LOWPOWER>;193            regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;194            regulator-always-on;195 196            regulator-state-mem {197              regulator-off-in-suspend;198            };199          };200 201          REG_LDO2 {202            regulator-name = "VDD_3V3_LP";203            regulator-min-microvolt = <3300000>;204            regulator-max-microvolt = <3300000>;205            regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,206                                      <ACT8945A_REGULATOR_MODE_LOWPOWER>;207            regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;208            regulator-always-on;209 210            regulator-state-mem {211              regulator-off-in-suspend;212            };213          };214 215          REG_LDO3 {216            regulator-name = "VDD_LED";217            regulator-min-microvolt = <3300000>;218            regulator-max-microvolt = <3300000>;219            regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,220                                      <ACT8945A_REGULATOR_MODE_LOWPOWER>;221            regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;222            regulator-always-on;223 224            regulator-state-mem {225              regulator-off-in-suspend;226            };227          };228 229          REG_LDO4 {230            regulator-name = "VDD_SDHC_1V8";231            regulator-min-microvolt = <1800000>;232            regulator-max-microvolt = <1800000>;233            regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,234                                      <ACT8945A_REGULATOR_MODE_LOWPOWER>;235            regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;236            regulator-always-on;237 238            regulator-state-mem {239              regulator-off-in-suspend;240            };241          };242        };243 244        charger {245          compatible = "active-semi,act8945a-charger";246          pinctrl-names = "default";247          pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;248          interrupt-parent = <&pioA>;249          interrupts = <45 IRQ_TYPE_EDGE_RISING>;250 251          active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;252          active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;253          active-semi,input-voltage-threshold-microvolt = <6600>;254          active-semi,precondition-timeout = <40>;255          active-semi,total-timeout = <3>;256        };257      };258    };259