brintos

brintos / linux-shallow public Read only

0
0
Text · 10.1 KiB · 14ab367 Raw
419 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/x-powers,axp152.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: X-Powers AXP PMIC8 9maintainers:10  - Chen-Yu Tsai <wens@csie.org>11 12allOf:13  - if:14      properties:15        compatible:16          contains:17            enum:18              - x-powers,axp15219              - x-powers,axp20220              - x-powers,axp20921 22    then:23      properties:24        regulators:25          properties:26            x-powers,dcdc-freq:27              minimum: 75028              maximum: 187529              default: 150030 31    else:32      properties:33        regulators:34          properties:35            x-powers,dcdc-freq:36              minimum: 180037              maximum: 405038              default: 300039 40  - if:41      properties:42        compatible:43          contains:44            enum:45              - x-powers,axp15246              - x-powers,axp20247              - x-powers,axp20948 49    then:50      properties:51        x-powers,drive-vbus-en: false52 53  - if:54      not:55        properties:56          compatible:57            contains:58              const: x-powers,axp80659 60    then:61      properties:62        x-powers,self-working-mode: false63        x-powers,master-mode: false64 65  - if:66      not:67        properties:68          compatible:69            contains:70              enum:71                - x-powers,axp1506072                - x-powers,axp30573                - x-powers,axp313a74 75    then:76      required:77        - interrupts78 79  - if:80      properties:81        compatible:82          contains:83            enum:84              - x-powers,axp313a85              - x-powers,axp1506086              - x-powers,axp71787 88    then:89      properties:90        x-powers,dcdc-freq: false91 92properties:93  compatible:94    oneOf:95      - enum:96          - x-powers,axp15297          - x-powers,axp19298          - x-powers,axp20299          - x-powers,axp209100          - x-powers,axp221101          - x-powers,axp223102          - x-powers,axp313a103          - x-powers,axp717104          - x-powers,axp803105          - x-powers,axp806106          - x-powers,axp809107          - x-powers,axp813108          - x-powers,axp15060109      - items:110          - const: x-powers,axp228111          - const: x-powers,axp221112      - items:113          - const: x-powers,axp805114          - const: x-powers,axp806115      - items:116          - const: x-powers,axp305117          - const: x-powers,axp805118          - const: x-powers,axp806119      - items:120          - const: x-powers,axp818121          - const: x-powers,axp813122 123  reg:124    maxItems: 1125 126  interrupts:127    maxItems: 1128 129  interrupt-controller: true130 131  "#interrupt-cells":132    const: 1133 134  x-powers,drive-vbus-en:135    type: boolean136    description: >137      Set this when the N_VBUSEN pin is used as an output pin to control an138      external regulator to drive the OTG VBus, rather then as an input pin139      which signals whether the board is driving OTG VBus or not.140 141  x-powers,self-working-mode:142    type: boolean143    description: >144      Set this when the PMIC is wired for self-working mode through the MODESET145      pin.146 147  x-powers,master-mode:148    type: boolean149    description: >150      Set this when the PMIC is wired for master mode through the MODESET pin.151 152  vin1-supply:153    description: >154      DCDC1 power supply node, if present.155 156  vin2-supply:157    description: >158      DCDC2 power supply node, if present.159 160  vin3-supply:161    description: >162      DCDC3 power supply node, if present.163 164  vin4-supply:165    description: >166      DCDC4 power supply node, if present.167 168  vin5-supply:169    description: >170      DCDC5 power supply node, if present.171 172  vin6-supply:173    description: >174      DCDC6 power supply node, if present.175 176  vin7-supply:177    description: >178      DCDC7 power supply node, if present.179 180  vina-supply:181    description: >182      DCDCA power supply node, if present.183 184  vinb-supply:185    description: >186      DCDCB power supply node, if present.187 188  vinc-supply:189    description: >190      DCDCC power supply node, if present.191 192  vind-supply:193    description: >194      DCDCD power supply node, if present.195 196  vine-supply:197    description: >198      DCDCE power supply node, if present.199 200  acin-supply:201    description: >202      LDO1 power supply node, if present.203 204  ldo24in-supply:205    description: >206      LDO2 and LDO4 power supply node, if present.207 208  ldo3in-supply:209    description: >210      LDO3 power supply node, if present.211 212  ldo5in-supply:213    description: >214      LDO5 power supply node, if present.215 216  aldoin-supply:217    description: >218      ALDO* power supply node, if present.219 220  bldoin-supply:221    description: >222      BLDO* power supply node, if present.223 224  cldoin-supply:225    description: >226      CLDO* power supply node, if present.227 228  dldoin-supply:229    description: >230      DLDO* power supply node, if present.231 232  eldoin-supply:233    description: >234      ELDO* power supply node, if present.235 236  fldoin-supply:237    description: >238      FLDO* power supply node, if present.239 240  ips-supply:241    description: >242      LDO_IO0, LDO_IO1 and RTC_LDO power supply node, if present.243 244  drivevbus-supply:245    description: >246      DRIVEVBUS power supply node, if present.247 248  swin-supply:249    description: >250      SW power supply node, if present.251 252  adc:253    $ref: /schemas/iio/adc/x-powers,axp209-adc.yaml#254 255  gpio:256    $ref: /schemas/gpio/x-powers,axp209-gpio.yaml#257 258  ac-power:259    $ref: /schemas/power/supply/x-powers,axp20x-ac-power-supply.yaml#260 261  battery-power:262    $ref: /schemas/power/supply/x-powers,axp20x-battery-power-supply.yaml#263 264  usb-power:265    $ref: /schemas/power/supply/x-powers,axp20x-usb-power-supply.yaml#266 267  regulators:268    type: object269 270    properties:271      x-powers,dcdc-freq:272        $ref: /schemas/types.yaml#/definitions/uint32273        description: >274          Defines the work frequency of DC-DC in kHz.275 276    patternProperties:277      "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|cpusldo|drivevbus|dc5ldo|boost)$":278        $ref: /schemas/regulator/regulator.yaml#279        type: object280        unevaluatedProperties: false281 282        properties:283          regulator-ramp-delay:284            description: >285              Only 800 and 1600 are valid for the DCDC2 and LDO3 regulators on286              the AXP209.287 288          regulator-soft-start:289            description: >290              Only valid for the LDO3 regulator.291 292          x-powers,dcdc-workmode:293            $ref: /schemas/types.yaml#/definitions/uint32294            enum: [0, 1]295            description: >296              Only valid for DCDC regulators. Setup 1 for PWM mode, 0297              for AUTO (PWM/PFM) mode. The DCDC regulators work in a298              mixed PWM/PFM mode, using PFM under light loads and299              switching to PWM for heavier loads. Forcing PWM mode300              trades efficiency under light loads for lower output301              noise. This probably makes sense for HiFi audio related302              applications that aren't battery constrained.303 304    additionalProperties: false305 306required:307  - compatible308  - reg309  - "#interrupt-cells"310  - interrupt-controller311 312additionalProperties: false313 314examples:315  - |316      i2c {317          #address-cells = <1>;318          #size-cells = <0>;319 320          pmic@30 {321              compatible = "x-powers,axp152";322              reg = <0x30>;323              interrupts = <0>;324              interrupt-controller;325              #interrupt-cells = <1>;326          };327      };328 329  - |330      #include <dt-bindings/interrupt-controller/irq.h>331 332      i2c {333          #address-cells = <1>;334          #size-cells = <0>;335 336          pmic@34 {337              compatible = "x-powers,axp209";338              reg = <0x34>;339              interrupt-parent = <&nmi_intc>;340              interrupts = <0 IRQ_TYPE_LEVEL_LOW>;341              interrupt-controller;342              #interrupt-cells = <1>;343 344              ac_power_supply: ac-power {345                  compatible = "x-powers,axp202-ac-power-supply";346              };347 348              axp_adc: adc {349                  compatible = "x-powers,axp209-adc";350                  #io-channel-cells = <1>;351              };352 353              axp_gpio: gpio {354                  compatible = "x-powers,axp209-gpio";355                  gpio-controller;356                  #gpio-cells = <2>;357 358                  gpio0-adc-pin {359                      pins = "GPIO0";360                      function = "adc";361                  };362              };363 364              battery_power_supply: battery-power {365                  compatible = "x-powers,axp209-battery-power-supply";366              };367 368              regulators {369                  /* Default work frequency for buck regulators */370                  x-powers,dcdc-freq = <1500>;371 372                  reg_dcdc2: dcdc2 {373                      regulator-always-on;374                      regulator-min-microvolt = <1000000>;375                      regulator-max-microvolt = <1450000>;376                      regulator-name = "vdd-cpu";377                  };378 379                  reg_dcdc3: dcdc3 {380                      regulator-always-on;381                      regulator-min-microvolt = <1000000>;382                      regulator-max-microvolt = <1400000>;383                      regulator-name = "vdd-int-dll";384                  };385 386                  reg_ldo1: ldo1 {387                      /* LDO1 is a fixed output regulator */388                      regulator-always-on;389                      regulator-min-microvolt = <1300000>;390                      regulator-max-microvolt = <1300000>;391                      regulator-name = "vdd-rtc";392                  };393 394                  reg_ldo2: ldo2 {395                      regulator-always-on;396                      regulator-min-microvolt = <3000000>;397                      regulator-max-microvolt = <3000000>;398                      regulator-name = "avcc";399                  };400 401                  reg_ldo3: ldo3 {402                      regulator-name = "ldo3";403                  };404 405                  reg_ldo4: ldo4 {406                      regulator-name = "ldo4";407                  };408 409                  reg_ldo5: ldo5 {410                      regulator-name = "ldo5";411                  };412              };413 414              usb_power_supply: usb-power {415                  compatible = "x-powers,axp202-usb-power-supply";416              };417          };418      };419