brintos

brintos / linux-shallow public Read only

0
0
Text · 11.4 KiB · 2cb6d17 Raw
394 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/rockchip,rk817.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: RK809/RK817 Power Management Integrated Circuit8 9maintainers:10  - Chris Zhong <zyw@rock-chips.com>11  - Zhang Qing <zhangqing@rock-chips.com>12 13description: |14  Rockchip RK809/RK817 series PMIC. This device consists of an i2c controlled15  MFD that includes regulators, an RTC, a power button and an audio codec.16  The RK817 variant also provides a battery charger manager.17 18properties:19  compatible:20    enum:21      - rockchip,rk80922      - rockchip,rk81723 24  reg:25    maxItems: 126 27  interrupts:28    maxItems: 129 30  '#clock-cells':31    description:32      See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.33    minimum: 034    maximum: 135 36  clocks:37    maxItems: 138 39  clock-names:40    items:41      - const: mclk42 43  clock-output-names:44    description:45      From common clock binding to override the default output clock name.46 47  rockchip,system-power-controller:48    type: boolean49    deprecated: true50    description:51      Telling whether or not this PMIC is controlling the system power.52 53  '#sound-dai-cells':54    const: 055 56  system-power-controller: true57 58  wakeup-source:59    type: boolean60    description:61      Device can be used as a wakeup source.62 63  vcc1-supply:64    description:65      The input supply for DCDC_REG1.66 67  vcc2-supply:68    description:69      The input supply for DCDC_REG2.70 71  vcc3-supply:72    description:73      The input supply for DCDC_REG3.74 75  vcc4-supply:76    description:77      The input supply for DCDC_REG4.78 79  vcc5-supply:80    description:81      The input supply for LDO_REG1, LDO_REG2, and LDO_REG3.82 83  vcc6-supply:84    description:85      The input supply for LDO_REG4, LDO_REG5, and LDO_REG6.86 87  vcc7-supply:88    description:89      The input supply for LDO_REG7, LDO_REG8, and LDO_REG9.90 91  vcc8-supply:92    description:93      The input supply for BOOST on RK817, or for SWITCH_REG2 on RK809.94 95  vcc9-supply:96    description:97      The input supply for OTG_SWITCH on RK817,98      or for DCDC_REG5 and SWITCH_REG1 on RK809.99 100  regulators:101    type: object102    patternProperties:103      "^(LDO_REG[1-9]|DCDC_REG[1-5]|BOOST|OTG_SWITCH|SWITCH_REG[1-2])$":104        $ref: /schemas/regulator/regulator.yaml105        unevaluatedProperties: false106    additionalProperties: false107 108  codec:109    type: object110    additionalProperties: false111    properties:112      rockchip,mic-in-differential:113        type: boolean114        description:115          Describes if the microphone uses differential mode.116 117  charger:118    type: object119    $ref: /schemas/power/supply/power-supply.yaml120 121    properties:122      monitored-battery:123        description: |124          A phandle to a monitored battery node that contains a valid125          value for:126          charge-full-design-microamp-hours,127          charge-term-current-microamp,128          constant-charge-current-max-microamp,129          constant-charge-voltage-max-microvolt,130          voltage-max-design-microvolt,131          voltage-min-design-microvolt,132          and a valid ocv-capacity table.133 134      rockchip,resistor-sense-micro-ohms:135        description: |136          Value in microohms of the battery sense resistor. This value is137          used by the driver to set the correct divisor value to translate138          ADC readings into the proper units of measure.139        enum: [10000, 20000]140 141      rockchip,sleep-enter-current-microamp:142        description: |143          Value in microamps of the sleep enter current for the charger.144          Value is used by the driver to calibrate the relax threshold.145 146      rockchip,sleep-filter-current-microamp:147        description:148          Value in microamps of the sleep filter current for the charger.149          Value is used by the driver to derive the sleep sample current.150 151    required:152      - monitored-battery153      - rockchip,resistor-sense-micro-ohms154      - rockchip,sleep-enter-current-microamp155      - rockchip,sleep-filter-current-microamp156 157    additionalProperties: false158 159allOf:160  - $ref: /schemas/sound/dai-common.yaml#161  - if:162      properties:163        '#clock-cells':164          const: 0165 166    then:167      properties:168        clock-output-names:169          maxItems: 1170 171    else:172      properties:173        clock-output-names:174          maxItems: 2175 176  - if:177      properties:178        compatible:179          contains:180            const: rockchip,rk817181    then:182      properties:183        regulators:184          patternProperties:185            "^(DCDC_REG5|SWITCH_REG[1-2])$": false186    else:187      properties:188        regulators:189          patternProperties:190            "^(BOOST|OTG_SWITCH)$": false191 192required:193  - compatible194  - reg195  - interrupts196  - "#clock-cells"197 198additionalProperties: false199 200examples:201  - |202    #include <dt-bindings/clock/px30-cru.h>203    #include <dt-bindings/pinctrl/rockchip.h>204    #include <dt-bindings/interrupt-controller/irq.h>205    #include <dt-bindings/gpio/gpio.h>206    i2c {207        #address-cells = <1>;208        #size-cells = <0>;209 210        rk817: pmic@20 {211            compatible = "rockchip,rk817";212            reg = <0x20>;213            interrupt-parent = <&gpio0>;214            interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;215            clock-output-names = "rk808-clkout1", "xin32k";216            clock-names = "mclk";217            clocks = <&cru SCLK_I2S1_OUT>;218            pinctrl-names = "default";219            pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>;220            wakeup-source;221            #clock-cells = <1>;222            #sound-dai-cells = <0>;223 224            vcc1-supply = <&vccsys>;225            vcc2-supply = <&vccsys>;226            vcc3-supply = <&vccsys>;227            vcc4-supply = <&vccsys>;228            vcc5-supply = <&vccsys>;229            vcc6-supply = <&vccsys>;230            vcc7-supply = <&vccsys>;231 232            regulators {233                vdd_logic: DCDC_REG1 {234                    regulator-name = "vdd_logic";235                    regulator-min-microvolt = <950000>;236                    regulator-max-microvolt = <1150000>;237                    regulator-ramp-delay = <6001>;238                    regulator-always-on;239                    regulator-boot-on;240 241                    regulator-state-mem {242                        regulator-on-in-suspend;243                        regulator-suspend-microvolt = <950000>;244                    };245                };246 247                vdd_arm: DCDC_REG2 {248                    regulator-name = "vdd_arm";249                    regulator-min-microvolt = <950000>;250                    regulator-max-microvolt = <1350000>;251                    regulator-ramp-delay = <6001>;252                    regulator-always-on;253                    regulator-boot-on;254 255                    regulator-state-mem {256                        regulator-off-in-suspend;257                        regulator-suspend-microvolt = <950000>;258                    };259                };260 261                vcc_ddr: DCDC_REG3 {262                    regulator-name = "vcc_ddr";263                    regulator-always-on;264                    regulator-boot-on;265 266                    regulator-state-mem {267                        regulator-on-in-suspend;268                    };269                };270 271                vcc_3v3: DCDC_REG4 {272                    regulator-name = "vcc_3v3";273                    regulator-min-microvolt = <3300000>;274                    regulator-max-microvolt = <3300000>;275                    regulator-always-on;276                    regulator-boot-on;277 278                    regulator-state-mem {279                        regulator-off-in-suspend;280                        regulator-suspend-microvolt = <3300000>;281                    };282                };283 284                vcc_1v8: LDO_REG2 {285                    regulator-name = "vcc_1v8";286                    regulator-min-microvolt = <1800000>;287                    regulator-max-microvolt = <1800000>;288                    regulator-always-on;289                    regulator-boot-on;290 291                    regulator-state-mem {292                        regulator-on-in-suspend;293                        regulator-suspend-microvolt = <1800000>;294                    };295                };296 297                vdd_1v0: LDO_REG3 {298                    regulator-name = "vdd_1v0";299                    regulator-min-microvolt = <1000000>;300                    regulator-max-microvolt = <1000000>;301                    regulator-always-on;302                    regulator-boot-on;303 304                    regulator-state-mem {305                        regulator-on-in-suspend;306                        regulator-suspend-microvolt = <1000000>;307                    };308                };309 310                vcc3v3_pmu: LDO_REG4 {311                    regulator-name = "vcc3v3_pmu";312                    regulator-min-microvolt = <3300000>;313                    regulator-max-microvolt = <3300000>;314                    regulator-always-on;315                    regulator-boot-on;316 317                    regulator-state-mem {318                        regulator-on-in-suspend;319                        regulator-suspend-microvolt = <3300000>;320                    };321                };322 323                vccio_sd: LDO_REG5 {324                    regulator-name = "vccio_sd";325                    regulator-min-microvolt = <1800000>;326                    regulator-max-microvolt = <3300000>;327                    regulator-always-on;328                    regulator-boot-on;329 330                    regulator-state-mem {331                        regulator-on-in-suspend;332                        regulator-suspend-microvolt = <3300000>;333                    };334                };335 336                vcc_sd: LDO_REG6 {337                    regulator-name = "vcc_sd";338                    regulator-min-microvolt = <3300000>;339                    regulator-max-microvolt = <3300000>;340                    regulator-boot-on;341 342                    regulator-state-mem {343                        regulator-on-in-suspend;344                        regulator-suspend-microvolt = <3300000>;345                    };346                };347 348                vcc_bl: LDO_REG7 {349                    regulator-name = "vcc_bl";350                    regulator-min-microvolt = <3300000>;351                    regulator-max-microvolt = <3300000>;352 353                    regulator-state-mem {354                        regulator-off-in-suspend;355                        regulator-suspend-microvolt = <3300000>;356                    };357                };358 359                vcc_lcd: LDO_REG8 {360                    regulator-name = "vcc_lcd";361                    regulator-min-microvolt = <2800000>;362                    regulator-max-microvolt = <2800000>;363 364                    regulator-state-mem {365                        regulator-off-in-suspend;366                        regulator-suspend-microvolt = <2800000>;367                    };368                };369 370                vcc_cam: LDO_REG9 {371                    regulator-name = "vcc_cam";372                    regulator-min-microvolt = <3000000>;373                    regulator-max-microvolt = <3000000>;374 375                    regulator-state-mem {376                        regulator-off-in-suspend;377                        regulator-suspend-microvolt = <3000000>;378                    };379                };380            };381 382            rk817_charger: charger {383                monitored-battery = <&battery>;384                rockchip,resistor-sense-micro-ohms = <10000>;385                rockchip,sleep-enter-current-microamp = <300000>;386                rockchip,sleep-filter-current-microamp = <100000>;387            };388 389            rk817_codec: codec {390                rockchip,mic-in-differential;391            };392        };393    };394