Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/samsung,s2mps11.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Samsung S2MPS11/13/14/15 and S2MPU02 Power Management IC
0008 
0009 maintainers:
0010   - Krzysztof Kozlowski <krzk@kernel.org>
0011 
0012 description: |
0013   This is a part of device tree bindings for S2M and S5M family of Power
0014   Management IC (PMIC).
0015 
0016   The Samsung S2MPS11/13/14/15 and S2MPU02 is a family of Power Management IC
0017   which include voltage and current regulators, RTC, clock outputs and other
0018   sub-blocks.
0019 
0020 properties:
0021   compatible:
0022     enum:
0023       - samsung,s2mps11-pmic
0024       - samsung,s2mps13-pmic
0025       - samsung,s2mps14-pmic
0026       - samsung,s2mps15-pmic
0027       - samsung,s2mpu02-pmic
0028 
0029   clocks:
0030     $ref: ../clock/samsung,s2mps11.yaml
0031     description:
0032       Child node describing clock provider.
0033 
0034   interrupts:
0035     maxItems: 1
0036 
0037   reg:
0038     maxItems: 1
0039 
0040   regulators:
0041     type: object
0042     description:
0043       List of child nodes that specify the regulators.
0044 
0045   samsung,s2mps11-acokb-ground:
0046     description: |
0047       Indicates that ACOKB pin of S2MPS11 PMIC is connected to the ground so
0048       the PMIC must manually set PWRHOLD bit in CTRL1 register to turn off the
0049       power. Usually the ACOKB is pulled up to VBATT so when PWRHOLD pin goes
0050       low, the rising ACOKB will trigger power off.
0051     type: boolean
0052 
0053   samsung,s2mps11-wrstbi-ground:
0054     description: |
0055       Indicates that WRSTBI pin of PMIC is pulled down. When the system is
0056       suspended it will always go down thus triggerring unwanted buck warm
0057       reset (setting buck voltages to default values).
0058     type: boolean
0059 
0060   wakeup-source: true
0061 
0062 required:
0063   - compatible
0064   - reg
0065   - regulators
0066 
0067 additionalProperties: false
0068 
0069 allOf:
0070   - if:
0071       properties:
0072         compatible:
0073           contains:
0074             const: samsung,s2mps11-pmic
0075     then:
0076       properties:
0077         regulators:
0078           $ref: ../regulator/samsung,s2mps11.yaml
0079         samsung,s2mps11-wrstbi-ground: false
0080 
0081   - if:
0082       properties:
0083         compatible:
0084           contains:
0085             const: samsung,s2mps13-pmic
0086     then:
0087       properties:
0088         regulators:
0089           $ref: ../regulator/samsung,s2mps13.yaml
0090         samsung,s2mps11-acokb-ground: false
0091 
0092   - if:
0093       properties:
0094         compatible:
0095           contains:
0096             const: samsung,s2mps14-pmic
0097     then:
0098       properties:
0099         regulators:
0100           $ref: ../regulator/samsung,s2mps14.yaml
0101         samsung,s2mps11-acokb-ground: false
0102         samsung,s2mps11-wrstbi-ground: false
0103 
0104   - if:
0105       properties:
0106         compatible:
0107           contains:
0108             const: samsung,s2mps15-pmic
0109     then:
0110       properties:
0111         regulators:
0112           $ref: ../regulator/samsung,s2mps15.yaml
0113         samsung,s2mps11-acokb-ground: false
0114         samsung,s2mps11-wrstbi-ground: false
0115 
0116   - if:
0117       properties:
0118         compatible:
0119           contains:
0120             const: samsung,s2mpu02-pmic
0121     then:
0122       properties:
0123         regulators:
0124           $ref: ../regulator/samsung,s2mpu02.yaml
0125         samsung,s2mps11-acokb-ground: false
0126         samsung,s2mps11-wrstbi-ground: false
0127 
0128 examples:
0129   - |
0130     #include <dt-bindings/interrupt-controller/irq.h>
0131 
0132     i2c {
0133         #address-cells = <1>;
0134         #size-cells = <0>;
0135 
0136         pmic@66 {
0137             compatible = "samsung,s2mps11-pmic";
0138             reg = <0x66>;
0139 
0140             interrupt-parent = <&gpx0>;
0141             interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
0142             pinctrl-names = "default";
0143             pinctrl-0 = <&s2mps11_irq>;
0144             samsung,s2mps11-acokb-ground;
0145             wakeup-source;
0146 
0147             clocks {
0148                 compatible = "samsung,s2mps11-clk";
0149                 #clock-cells = <1>;
0150                 clock-output-names = "s2mps11_ap", "s2mps11_cp", "s2mps11_bt";
0151             };
0152 
0153             regulators {
0154                 LDO1 {
0155                     regulator-name = "vdd_ldo1";
0156                     regulator-min-microvolt = <1000000>;
0157                     regulator-max-microvolt = <1000000>;
0158                     regulator-always-on;
0159                 };
0160 
0161                 LDO4 {
0162                     regulator-name = "vdd_adc";
0163                     regulator-min-microvolt = <1800000>;
0164                     regulator-max-microvolt = <1800000>;
0165 
0166                     regulator-state-mem {
0167                         regulator-off-in-suspend;
0168                     };
0169                 };
0170 
0171                 // ....
0172 
0173                 BUCK1 {
0174                     regulator-name = "vdd_mif";
0175                     regulator-min-microvolt = <800000>;
0176                     regulator-max-microvolt = <1300000>;
0177                     regulator-always-on;
0178                     regulator-boot-on;
0179 
0180                     regulator-state-mem {
0181                         regulator-off-in-suspend;
0182                     };
0183                 };
0184 
0185                 BUCK2 {
0186                     regulator-name = "vdd_arm";
0187                     regulator-min-microvolt = <800000>;
0188                     regulator-max-microvolt = <1500000>;
0189                     regulator-always-on;
0190                     regulator-boot-on;
0191                     regulator-coupled-with = <&buck3_reg>;
0192                     regulator-coupled-max-spread = <300000>;
0193 
0194                     regulator-state-mem {
0195                         regulator-off-in-suspend;
0196                     };
0197                 };
0198 
0199                 BUCK3 {
0200                     regulator-name = "vdd_int";
0201                     regulator-min-microvolt = <800000>;
0202                     regulator-max-microvolt = <1400000>;
0203                     regulator-always-on;
0204                     regulator-boot-on;
0205                     regulator-coupled-with = <&buck2_reg>;
0206                     regulator-coupled-max-spread = <300000>;
0207 
0208                     regulator-state-mem {
0209                         regulator-off-in-suspend;
0210                     };
0211                 };
0212 
0213                 // ...
0214             };
0215         };
0216     };
0217 
0218   - |
0219     #include <dt-bindings/interrupt-controller/irq.h>
0220 
0221     i2c {
0222         #address-cells = <1>;
0223         #size-cells = <0>;
0224 
0225         pmic@66 {
0226             compatible = "samsung,s2mps14-pmic";
0227             reg = <0x66>;
0228 
0229             interrupt-parent = <&gpx0>;
0230             interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
0231             wakeup-source;
0232 
0233             clocks {
0234                 compatible = "samsung,s2mps14-clk";
0235                 #clock-cells = <1>;
0236                 clock-output-names = "s2mps14_ap", "unused", "s2mps14_bt";
0237             };
0238 
0239             regulators {
0240                 LDO1 {
0241                     regulator-name = "VLDO1_1.0V";
0242                     regulator-min-microvolt = <1000000>;
0243                     regulator-max-microvolt = <1000000>;
0244                     regulator-always-on;
0245 
0246                     regulator-state-mem {
0247                         regulator-on-in-suspend;
0248                     };
0249                 };
0250 
0251                 // ...
0252 
0253                 BUCK1 {
0254                     regulator-name = "VBUCK1_1.0V";
0255                     regulator-min-microvolt = <800000>;
0256                     regulator-max-microvolt = <1000000>;
0257                     regulator-always-on;
0258 
0259                     regulator-state-mem {
0260                         regulator-off-in-suspend;
0261                     };
0262                 };
0263 
0264                 // ...
0265             };
0266         };
0267     };