brintos

brintos / linux-shallow public Read only

0
0
Text · 8.0 KiB · 51612dc Raw
328 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/dlg,da9063.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Dialog DA906{3L,3,2,1} Power Management Integrated Circuit (PMIC)8 9maintainers:10  - Steve Twiss <stwiss.opensource@diasemi.com>11 12description: |13  For device-tree bindings of other sub-modules refer to the binding documents14  under the respective sub-system directories.15  Using regulator-{uv,ov}-{warn,error,protection}-microvolt requires special16  handling: First, when GP_FB2 is used, it must be ensured that there is no17  moment where all voltage monitors are disabled. Next, as da9063 only supports18  UV *and* OV monitoring, both must be set to the same severity and value19  (0: disable, 1: enable).20  Product information for the DA906{3L,3,2,1} devices can be found here:21  - https://www.dialog-semiconductor.com/products/da9063l22  - https://www.dialog-semiconductor.com/products/da906323  - https://www.dialog-semiconductor.com/products/da906224  - https://www.dialog-semiconductor.com/products/da906125 26properties:27  compatible:28    enum:29      - dlg,da906130      - dlg,da906231      - dlg,da906332      - dlg,da9063l33 34  reg:35    maxItems: 136 37  interrupts:38    maxItems: 139 40  interrupt-controller: true41 42  "#interrupt-cells":43    const: 244 45  gpio-controller: true46 47  "#gpio-cells":48    const: 249 50  gpio:51    type: object52    additionalProperties: false53    properties:54      compatible:55        const: dlg,da9062-gpio56 57  onkey:58    $ref: /schemas/input/dlg,da9062-onkey.yaml59 60  regulators:61    type: object62    additionalProperties: false63    patternProperties:64      "^(ldo([1-9]|1[01])|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck[1-4])$":65        $ref: /schemas/regulator/regulator.yaml66        unevaluatedProperties: false67 68  rtc:69    type: object70    $ref: /schemas/rtc/rtc.yaml#71    unevaluatedProperties: false72    properties:73      compatible:74        enum:75          - dlg,da9062-rtc76          - dlg,da9063-rtc77 78  thermal:79    $ref: /schemas/thermal/dlg,da9062-thermal.yaml80 81  watchdog:82    $ref: /schemas/watchdog/dlg,da9062-watchdog.yaml83 84patternProperties:85  "^(.+-hog(-[0-9]+)?)$":86    type: object87 88    required:89      - gpio-hog90 91required:92  - compatible93  - reg94 95allOf:96  - if:97      properties:98        compatible:99          contains:100            enum:101              - dlg,da9063102              - dlg,da9063l103    then:104      properties:105        gpio-controller: false106        "#gpio-cells": false107        gpio: false108        regulators:109          patternProperties:110            "^buck[1-4]$": false111        thermal: false112      required:113        - interrupts114        - interrupt-controller115        - '#interrupt-cells'116 117  - if:118      properties:119        compatible:120          contains:121            enum:122              - dlg,da9062123    then:124      properties:125        regulators:126          patternProperties:127            "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged)$": false128      required:129        - gpio130        - onkey131        - rtc132        - thermal133        - watchdog134 135  - if:136      properties:137        compatible:138          contains:139            enum:140              - dlg,da9061141    then:142      properties:143        gpio-controller: false144        "#gpio-cells": false145        gpio: false146        regulators:147          patternProperties:148            "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck4)$": false149        rtc: false150      required:151        - onkey152        - thermal153        - watchdog154 155additionalProperties: false156 157examples:158  - |159    #include <dt-bindings/interrupt-controller/irq.h>160    i2c {161      #address-cells = <1>;162      #size-cells = <0>;163      pmic@58 {164        compatible = "dlg,da9063";165        reg = <0x58>;166        interrupt-parent = <&gpio6>;167        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;168        interrupt-controller;169        #interrupt-cells = <2>;170 171        rtc {172          compatible = "dlg,da9063-rtc";173        };174 175        watchdog {176          compatible = "dlg,da9063-watchdog";177        };178 179        onkey {180          compatible = "dlg,da9063-onkey";181          dlg,disable-key-power;182        };183 184        regulators {185          bcore1 {186            regulator-name = "BCORE1";187            regulator-min-microvolt = <300000>;188            regulator-max-microvolt = <1570000>;189            regulator-min-microamp = <500000>;190            regulator-max-microamp = <2000000>;191            regulator-boot-on;192          };193          ldo6 {194            /* UNUSED */195            regulator-name = "LDO_6";196            regulator-uv-protection-microvolt = <0>;197            regulator-ov-protection-microvolt = <0>;198          };199          ldo11 {200            regulator-name = "LDO_11";201            regulator-min-microvolt = <900000>;202            regulator-max-microvolt = <900000>;203            regulator-uv-protection-microvolt = <1>;204            regulator-ov-protection-microvolt = <1>;205            regulator-always-on;206          };207        };208      };209    };210 211  - |212    #include <dt-bindings/interrupt-controller/irq.h>213    #include <dt-bindings/regulator/dlg,da9063-regulator.h>214    i2c {215      #address-cells = <1>;216      #size-cells = <0>;217      pmic@58 {218        compatible = "dlg,da9062";219        reg = <0x58>;220        gpio-controller;221        #gpio-cells = <2>;222 223        sd0-pwr-sel-hog {224          gpio-hog;225          gpios = <1 0>;226          input;227          line-name = "SD0_PWR_SEL";228        };229 230        sd1-pwr-sel-hog {231          gpio-hog;232          gpios = <2 0>;233          input;234          line-name = "SD1_PWR_SEL";235        };236 237        sw-et0-en-hog {238          gpio-hog;239          gpios = <3 0>;240          input;241          line-name = "SW_ET0_EN#";242        };243 244        pmic-good-hog {245          gpio-hog;246          gpios = <4 0>;247          output-high;248          line-name = "PMIC_PGOOD";249        };250 251        gpio {252          compatible = "dlg,da9062-gpio";253        };254 255        onkey {256          compatible = "dlg,da9062-onkey";257        };258 259        regulators {260          buck1 {261            regulator-name = "vdd_arm";262            regulator-min-microvolt = <925000>;263            regulator-max-microvolt = <1380000>;264            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;265            regulator-always-on;266          };267          buck2 {268            regulator-name = "vdd_soc";269            regulator-min-microvolt = <1150000>;270            regulator-max-microvolt = <1380000>;271            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;272            regulator-always-on;273          };274          buck3 {275            regulator-name = "vdd_ddr3";276            regulator-min-microvolt = <1500000>;277            regulator-max-microvolt = <1500000>;278            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;279            regulator-always-on;280          };281          buck4 {282            regulator-name = "vdd_eth";283            regulator-min-microvolt = <1200000>;284            regulator-max-microvolt = <1200000>;285            regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>;286            regulator-always-on;287          };288          ldo1 {289            regulator-name = "vdd_snvs";290            regulator-min-microvolt = <3000000>;291            regulator-max-microvolt = <3000000>;292            regulator-always-on;293          };294          ldo2 {295            regulator-name = "vdd_high";296            regulator-min-microvolt = <3000000>;297            regulator-max-microvolt = <3000000>;298            regulator-always-on;299          };300          ldo3 {301            regulator-name = "vdd_eth_io";302            regulator-min-microvolt = <2500000>;303            regulator-max-microvolt = <2500000>;304          };305          ldo4 {306            regulator-name = "vdd_emmc";307            regulator-min-microvolt = <1800000>;308            regulator-max-microvolt = <1800000>;309            regulator-always-on;310          };311        };312 313        rtc {314          compatible = "dlg,da9062-rtc";315        };316 317        thermal {318          compatible = "dlg,da9062-thermal";319        };320 321        watchdog {322          compatible = "dlg,da9062-watchdog";323          dlg,use-sw-pm;324        };325      };326    };327...328