xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/samsung,s2mps11.yaml (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/samsung,s2mps11.yaml#
58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
78cc087a1SEmmanuel Vadottitle: Samsung S2MPS11/13/14/15 and S2MPU02 Power Management IC
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
10*c9ccf3a3SEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
118cc087a1SEmmanuel Vadot
128cc087a1SEmmanuel Vadotdescription: |
138cc087a1SEmmanuel Vadot  This is a part of device tree bindings for S2M and S5M family of Power
148cc087a1SEmmanuel Vadot  Management IC (PMIC).
158cc087a1SEmmanuel Vadot
168cc087a1SEmmanuel Vadot  The Samsung S2MPS11/13/14/15 and S2MPU02 is a family of Power Management IC
178cc087a1SEmmanuel Vadot  which include voltage and current regulators, RTC, clock outputs and other
188cc087a1SEmmanuel Vadot  sub-blocks.
198cc087a1SEmmanuel Vadot
208cc087a1SEmmanuel Vadotproperties:
218cc087a1SEmmanuel Vadot  compatible:
228cc087a1SEmmanuel Vadot    enum:
238cc087a1SEmmanuel Vadot      - samsung,s2mps11-pmic
248cc087a1SEmmanuel Vadot      - samsung,s2mps13-pmic
258cc087a1SEmmanuel Vadot      - samsung,s2mps14-pmic
268cc087a1SEmmanuel Vadot      - samsung,s2mps15-pmic
278cc087a1SEmmanuel Vadot      - samsung,s2mpu02-pmic
288cc087a1SEmmanuel Vadot
298cc087a1SEmmanuel Vadot  clocks:
308cc087a1SEmmanuel Vadot    $ref: ../clock/samsung,s2mps11.yaml
318cc087a1SEmmanuel Vadot    description:
328cc087a1SEmmanuel Vadot      Child node describing clock provider.
338cc087a1SEmmanuel Vadot
348cc087a1SEmmanuel Vadot  interrupts:
358cc087a1SEmmanuel Vadot    maxItems: 1
368cc087a1SEmmanuel Vadot
378cc087a1SEmmanuel Vadot  reg:
388cc087a1SEmmanuel Vadot    maxItems: 1
398cc087a1SEmmanuel Vadot
408cc087a1SEmmanuel Vadot  regulators:
418cc087a1SEmmanuel Vadot    type: object
428cc087a1SEmmanuel Vadot    description:
438cc087a1SEmmanuel Vadot      List of child nodes that specify the regulators.
448cc087a1SEmmanuel Vadot
458cc087a1SEmmanuel Vadot  samsung,s2mps11-acokb-ground:
468cc087a1SEmmanuel Vadot    description: |
478cc087a1SEmmanuel Vadot      Indicates that ACOKB pin of S2MPS11 PMIC is connected to the ground so
488cc087a1SEmmanuel Vadot      the PMIC must manually set PWRHOLD bit in CTRL1 register to turn off the
498cc087a1SEmmanuel Vadot      power. Usually the ACOKB is pulled up to VBATT so when PWRHOLD pin goes
508cc087a1SEmmanuel Vadot      low, the rising ACOKB will trigger power off.
518cc087a1SEmmanuel Vadot    type: boolean
528cc087a1SEmmanuel Vadot
538cc087a1SEmmanuel Vadot  samsung,s2mps11-wrstbi-ground:
548cc087a1SEmmanuel Vadot    description: |
558cc087a1SEmmanuel Vadot      Indicates that WRSTBI pin of PMIC is pulled down. When the system is
568cc087a1SEmmanuel Vadot      suspended it will always go down thus triggerring unwanted buck warm
578cc087a1SEmmanuel Vadot      reset (setting buck voltages to default values).
588cc087a1SEmmanuel Vadot    type: boolean
598cc087a1SEmmanuel Vadot
608cc087a1SEmmanuel Vadot  wakeup-source: true
618cc087a1SEmmanuel Vadot
628cc087a1SEmmanuel Vadotrequired:
638cc087a1SEmmanuel Vadot  - compatible
648cc087a1SEmmanuel Vadot  - reg
658cc087a1SEmmanuel Vadot  - regulators
668cc087a1SEmmanuel Vadot
678cc087a1SEmmanuel VadotadditionalProperties: false
688cc087a1SEmmanuel Vadot
698cc087a1SEmmanuel VadotallOf:
708cc087a1SEmmanuel Vadot  - if:
718cc087a1SEmmanuel Vadot      properties:
728cc087a1SEmmanuel Vadot        compatible:
738cc087a1SEmmanuel Vadot          contains:
748cc087a1SEmmanuel Vadot            const: samsung,s2mps11-pmic
758cc087a1SEmmanuel Vadot    then:
768cc087a1SEmmanuel Vadot      properties:
778cc087a1SEmmanuel Vadot        regulators:
788cc087a1SEmmanuel Vadot          $ref: ../regulator/samsung,s2mps11.yaml
798cc087a1SEmmanuel Vadot        samsung,s2mps11-wrstbi-ground: false
808cc087a1SEmmanuel Vadot
818cc087a1SEmmanuel Vadot  - if:
828cc087a1SEmmanuel Vadot      properties:
838cc087a1SEmmanuel Vadot        compatible:
848cc087a1SEmmanuel Vadot          contains:
858cc087a1SEmmanuel Vadot            const: samsung,s2mps13-pmic
868cc087a1SEmmanuel Vadot    then:
878cc087a1SEmmanuel Vadot      properties:
888cc087a1SEmmanuel Vadot        regulators:
898cc087a1SEmmanuel Vadot          $ref: ../regulator/samsung,s2mps13.yaml
908cc087a1SEmmanuel Vadot        samsung,s2mps11-acokb-ground: false
918cc087a1SEmmanuel Vadot
928cc087a1SEmmanuel Vadot  - if:
938cc087a1SEmmanuel Vadot      properties:
948cc087a1SEmmanuel Vadot        compatible:
958cc087a1SEmmanuel Vadot          contains:
968cc087a1SEmmanuel Vadot            const: samsung,s2mps14-pmic
978cc087a1SEmmanuel Vadot    then:
988cc087a1SEmmanuel Vadot      properties:
998cc087a1SEmmanuel Vadot        regulators:
1008cc087a1SEmmanuel Vadot          $ref: ../regulator/samsung,s2mps14.yaml
1018cc087a1SEmmanuel Vadot        samsung,s2mps11-acokb-ground: false
1028cc087a1SEmmanuel Vadot        samsung,s2mps11-wrstbi-ground: false
1038cc087a1SEmmanuel Vadot
1048cc087a1SEmmanuel Vadot  - if:
1058cc087a1SEmmanuel Vadot      properties:
1068cc087a1SEmmanuel Vadot        compatible:
1078cc087a1SEmmanuel Vadot          contains:
1088cc087a1SEmmanuel Vadot            const: samsung,s2mps15-pmic
1098cc087a1SEmmanuel Vadot    then:
1108cc087a1SEmmanuel Vadot      properties:
1118cc087a1SEmmanuel Vadot        regulators:
1128cc087a1SEmmanuel Vadot          $ref: ../regulator/samsung,s2mps15.yaml
1138cc087a1SEmmanuel Vadot        samsung,s2mps11-acokb-ground: false
1148cc087a1SEmmanuel Vadot        samsung,s2mps11-wrstbi-ground: false
1158cc087a1SEmmanuel Vadot
1168cc087a1SEmmanuel Vadot  - if:
1178cc087a1SEmmanuel Vadot      properties:
1188cc087a1SEmmanuel Vadot        compatible:
1198cc087a1SEmmanuel Vadot          contains:
1208cc087a1SEmmanuel Vadot            const: samsung,s2mpu02-pmic
1218cc087a1SEmmanuel Vadot    then:
1228cc087a1SEmmanuel Vadot      properties:
1238cc087a1SEmmanuel Vadot        regulators:
1248cc087a1SEmmanuel Vadot          $ref: ../regulator/samsung,s2mpu02.yaml
1258cc087a1SEmmanuel Vadot        samsung,s2mps11-acokb-ground: false
1268cc087a1SEmmanuel Vadot        samsung,s2mps11-wrstbi-ground: false
1278cc087a1SEmmanuel Vadot
1288cc087a1SEmmanuel Vadotexamples:
1298cc087a1SEmmanuel Vadot  - |
1308cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
1318cc087a1SEmmanuel Vadot
1328cc087a1SEmmanuel Vadot    i2c {
1338cc087a1SEmmanuel Vadot        #address-cells = <1>;
1348cc087a1SEmmanuel Vadot        #size-cells = <0>;
1358cc087a1SEmmanuel Vadot
1368cc087a1SEmmanuel Vadot        pmic@66 {
1378cc087a1SEmmanuel Vadot            compatible = "samsung,s2mps11-pmic";
1388cc087a1SEmmanuel Vadot            reg = <0x66>;
1398cc087a1SEmmanuel Vadot
1408cc087a1SEmmanuel Vadot            interrupt-parent = <&gpx0>;
1418cc087a1SEmmanuel Vadot            interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
1428cc087a1SEmmanuel Vadot            pinctrl-names = "default";
1438cc087a1SEmmanuel Vadot            pinctrl-0 = <&s2mps11_irq>;
1448cc087a1SEmmanuel Vadot            samsung,s2mps11-acokb-ground;
1458cc087a1SEmmanuel Vadot            wakeup-source;
1468cc087a1SEmmanuel Vadot
1478cc087a1SEmmanuel Vadot            clocks {
1488cc087a1SEmmanuel Vadot                compatible = "samsung,s2mps11-clk";
1498cc087a1SEmmanuel Vadot                #clock-cells = <1>;
1508cc087a1SEmmanuel Vadot                clock-output-names = "s2mps11_ap", "s2mps11_cp", "s2mps11_bt";
1518cc087a1SEmmanuel Vadot            };
1528cc087a1SEmmanuel Vadot
1538cc087a1SEmmanuel Vadot            regulators {
1548cc087a1SEmmanuel Vadot                LDO1 {
1558cc087a1SEmmanuel Vadot                    regulator-name = "vdd_ldo1";
1568cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <1000000>;
1578cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1000000>;
1588cc087a1SEmmanuel Vadot                    regulator-always-on;
1598cc087a1SEmmanuel Vadot                };
1608cc087a1SEmmanuel Vadot
1618cc087a1SEmmanuel Vadot                LDO4 {
1628cc087a1SEmmanuel Vadot                    regulator-name = "vdd_adc";
1638cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <1800000>;
1648cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1800000>;
1658cc087a1SEmmanuel Vadot
1668cc087a1SEmmanuel Vadot                    regulator-state-mem {
1678cc087a1SEmmanuel Vadot                        regulator-off-in-suspend;
1688cc087a1SEmmanuel Vadot                    };
1698cc087a1SEmmanuel Vadot                };
1708cc087a1SEmmanuel Vadot
1718cc087a1SEmmanuel Vadot                // ....
1728cc087a1SEmmanuel Vadot
1738cc087a1SEmmanuel Vadot                BUCK1 {
1748cc087a1SEmmanuel Vadot                    regulator-name = "vdd_mif";
1758cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <800000>;
1768cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1300000>;
1778cc087a1SEmmanuel Vadot                    regulator-always-on;
1788cc087a1SEmmanuel Vadot                    regulator-boot-on;
1798cc087a1SEmmanuel Vadot
1808cc087a1SEmmanuel Vadot                    regulator-state-mem {
1818cc087a1SEmmanuel Vadot                        regulator-off-in-suspend;
1828cc087a1SEmmanuel Vadot                    };
1838cc087a1SEmmanuel Vadot                };
1848cc087a1SEmmanuel Vadot
1858cc087a1SEmmanuel Vadot                BUCK2 {
1868cc087a1SEmmanuel Vadot                    regulator-name = "vdd_arm";
1878cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <800000>;
1888cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1500000>;
1898cc087a1SEmmanuel Vadot                    regulator-always-on;
1908cc087a1SEmmanuel Vadot                    regulator-boot-on;
1918cc087a1SEmmanuel Vadot                    regulator-coupled-with = <&buck3_reg>;
1928cc087a1SEmmanuel Vadot                    regulator-coupled-max-spread = <300000>;
1938cc087a1SEmmanuel Vadot
1948cc087a1SEmmanuel Vadot                    regulator-state-mem {
1958cc087a1SEmmanuel Vadot                        regulator-off-in-suspend;
1968cc087a1SEmmanuel Vadot                    };
1978cc087a1SEmmanuel Vadot                };
1988cc087a1SEmmanuel Vadot
1998cc087a1SEmmanuel Vadot                BUCK3 {
2008cc087a1SEmmanuel Vadot                    regulator-name = "vdd_int";
2018cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <800000>;
2028cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1400000>;
2038cc087a1SEmmanuel Vadot                    regulator-always-on;
2048cc087a1SEmmanuel Vadot                    regulator-boot-on;
2058cc087a1SEmmanuel Vadot                    regulator-coupled-with = <&buck2_reg>;
2068cc087a1SEmmanuel Vadot                    regulator-coupled-max-spread = <300000>;
2078cc087a1SEmmanuel Vadot
2088cc087a1SEmmanuel Vadot                    regulator-state-mem {
2098cc087a1SEmmanuel Vadot                        regulator-off-in-suspend;
2108cc087a1SEmmanuel Vadot                    };
2118cc087a1SEmmanuel Vadot                };
2128cc087a1SEmmanuel Vadot
2138cc087a1SEmmanuel Vadot                // ...
2148cc087a1SEmmanuel Vadot            };
2158cc087a1SEmmanuel Vadot        };
2168cc087a1SEmmanuel Vadot    };
2178cc087a1SEmmanuel Vadot
2188cc087a1SEmmanuel Vadot  - |
2198cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
2208cc087a1SEmmanuel Vadot
2218cc087a1SEmmanuel Vadot    i2c {
2228cc087a1SEmmanuel Vadot        #address-cells = <1>;
2238cc087a1SEmmanuel Vadot        #size-cells = <0>;
2248cc087a1SEmmanuel Vadot
2258cc087a1SEmmanuel Vadot        pmic@66 {
2268cc087a1SEmmanuel Vadot            compatible = "samsung,s2mps14-pmic";
2278cc087a1SEmmanuel Vadot            reg = <0x66>;
2288cc087a1SEmmanuel Vadot
2298cc087a1SEmmanuel Vadot            interrupt-parent = <&gpx0>;
2308cc087a1SEmmanuel Vadot            interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
2318cc087a1SEmmanuel Vadot            wakeup-source;
2328cc087a1SEmmanuel Vadot
2338cc087a1SEmmanuel Vadot            clocks {
2348cc087a1SEmmanuel Vadot                compatible = "samsung,s2mps14-clk";
2358cc087a1SEmmanuel Vadot                #clock-cells = <1>;
2368cc087a1SEmmanuel Vadot                clock-output-names = "s2mps14_ap", "unused", "s2mps14_bt";
2378cc087a1SEmmanuel Vadot            };
2388cc087a1SEmmanuel Vadot
2398cc087a1SEmmanuel Vadot            regulators {
2408cc087a1SEmmanuel Vadot                LDO1 {
2418cc087a1SEmmanuel Vadot                    regulator-name = "VLDO1_1.0V";
2428cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <1000000>;
2438cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1000000>;
2448cc087a1SEmmanuel Vadot                    regulator-always-on;
2458cc087a1SEmmanuel Vadot
2468cc087a1SEmmanuel Vadot                    regulator-state-mem {
2478cc087a1SEmmanuel Vadot                        regulator-on-in-suspend;
2488cc087a1SEmmanuel Vadot                    };
2498cc087a1SEmmanuel Vadot                };
2508cc087a1SEmmanuel Vadot
2518cc087a1SEmmanuel Vadot                // ...
2528cc087a1SEmmanuel Vadot
2538cc087a1SEmmanuel Vadot                BUCK1 {
2548cc087a1SEmmanuel Vadot                    regulator-name = "VBUCK1_1.0V";
2558cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <800000>;
2568cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1000000>;
2578cc087a1SEmmanuel Vadot                    regulator-always-on;
2588cc087a1SEmmanuel Vadot
2598cc087a1SEmmanuel Vadot                    regulator-state-mem {
2608cc087a1SEmmanuel Vadot                        regulator-off-in-suspend;
2618cc087a1SEmmanuel Vadot                    };
2628cc087a1SEmmanuel Vadot                };
2638cc087a1SEmmanuel Vadot
2648cc087a1SEmmanuel Vadot                // ...
2658cc087a1SEmmanuel Vadot            };
2668cc087a1SEmmanuel Vadot        };
2678cc087a1SEmmanuel Vadot    };
268