xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/samsung,s5m8767.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/samsung,s5m8767.yaml#
58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
78cc087a1SEmmanuel Vadottitle: Samsung S5M8767 Power Management IC
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel 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 S5M8767 is a Power Management IC which includes voltage
178cc087a1SEmmanuel Vadot  and current regulators, RTC, clock outputs and other sub-blocks.
188cc087a1SEmmanuel Vadot
198cc087a1SEmmanuel Vadotproperties:
208cc087a1SEmmanuel Vadot  compatible:
218cc087a1SEmmanuel Vadot    const: samsung,s5m8767-pmic
228cc087a1SEmmanuel Vadot
238cc087a1SEmmanuel Vadot  clocks:
248cc087a1SEmmanuel Vadot    $ref: ../clock/samsung,s2mps11.yaml
258cc087a1SEmmanuel Vadot    description:
268cc087a1SEmmanuel Vadot      Child node describing clock provider.
278cc087a1SEmmanuel Vadot
288cc087a1SEmmanuel Vadot  interrupts:
298cc087a1SEmmanuel Vadot    maxItems: 1
308cc087a1SEmmanuel Vadot
318cc087a1SEmmanuel Vadot  reg:
328cc087a1SEmmanuel Vadot    maxItems: 1
338cc087a1SEmmanuel Vadot
348cc087a1SEmmanuel Vadot  regulators:
358cc087a1SEmmanuel Vadot    $ref: ../regulator/samsung,s5m8767.yaml
368cc087a1SEmmanuel Vadot    description:
378cc087a1SEmmanuel Vadot      List of child nodes that specify the regulators.
388cc087a1SEmmanuel Vadot
398cc087a1SEmmanuel Vadot  s5m8767,pmic-buck2-dvs-voltage:
408cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
418cc087a1SEmmanuel Vadot    minItems: 8
428cc087a1SEmmanuel Vadot    maxItems: 8
438cc087a1SEmmanuel Vadot    description: |
448cc087a1SEmmanuel Vadot      A set of 8 voltage values in micro-volt (uV) units for buck2 when
458cc087a1SEmmanuel Vadot      changing voltage using gpio dvs.
468cc087a1SEmmanuel Vadot
478cc087a1SEmmanuel Vadot  s5m8767,pmic-buck3-dvs-voltage:
488cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
498cc087a1SEmmanuel Vadot    minItems: 8
508cc087a1SEmmanuel Vadot    maxItems: 8
518cc087a1SEmmanuel Vadot    description: |
528cc087a1SEmmanuel Vadot      A set of 8 voltage values in micro-volt (uV) units for buck3 when
538cc087a1SEmmanuel Vadot      changing voltage using gpio dvs.
548cc087a1SEmmanuel Vadot
558cc087a1SEmmanuel Vadot  s5m8767,pmic-buck4-dvs-voltage:
568cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
578cc087a1SEmmanuel Vadot    minItems: 8
588cc087a1SEmmanuel Vadot    maxItems: 8
598cc087a1SEmmanuel Vadot    description: |
608cc087a1SEmmanuel Vadot      A set of 8 voltage values in micro-volt (uV) units for buck4 when
618cc087a1SEmmanuel Vadot      changing voltage using gpio dvs.
628cc087a1SEmmanuel Vadot
638cc087a1SEmmanuel Vadot  s5m8767,pmic-buck-ds-gpios:
648cc087a1SEmmanuel Vadot    minItems: 3
658cc087a1SEmmanuel Vadot    maxItems: 3
668cc087a1SEmmanuel Vadot    description: |
678cc087a1SEmmanuel Vadot      GPIO specifiers for three host gpio's used for selecting GPIO DVS lines.
688cc087a1SEmmanuel Vadot      It is one-to-one mapped to dvs gpio lines.
698cc087a1SEmmanuel Vadot
708cc087a1SEmmanuel Vadot  s5m8767,pmic-buck2-uses-gpio-dvs:
718cc087a1SEmmanuel Vadot    type: boolean
728cc087a1SEmmanuel Vadot    description: buck2 can be controlled by gpio dvs.
738cc087a1SEmmanuel Vadot
748cc087a1SEmmanuel Vadot  s5m8767,pmic-buck3-uses-gpio-dvs:
758cc087a1SEmmanuel Vadot    type: boolean
768cc087a1SEmmanuel Vadot    description: buck3 can be controlled by gpio dvs.
778cc087a1SEmmanuel Vadot
788cc087a1SEmmanuel Vadot  s5m8767,pmic-buck4-uses-gpio-dvs:
798cc087a1SEmmanuel Vadot    type: boolean
808cc087a1SEmmanuel Vadot    description: buck4 can be controlled by gpio dvs.
818cc087a1SEmmanuel Vadot
828cc087a1SEmmanuel Vadot  s5m8767,pmic-buck-default-dvs-idx:
838cc087a1SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
848cc087a1SEmmanuel Vadot    minimum: 0
858cc087a1SEmmanuel Vadot    maximum: 7
868cc087a1SEmmanuel Vadot    default: 0
878cc087a1SEmmanuel Vadot    description: |
888cc087a1SEmmanuel Vadot      Default voltage setting selected from the possible 8 options selectable
898cc087a1SEmmanuel Vadot      by the dvs gpios. The value of this property should be between 0 and 7.
908cc087a1SEmmanuel Vadot      If not specified or if out of range, the default value of this property
918cc087a1SEmmanuel Vadot      is set to 0.
928cc087a1SEmmanuel Vadot
938cc087a1SEmmanuel Vadot  s5m8767,pmic-buck-dvs-gpios:
948cc087a1SEmmanuel Vadot    minItems: 3
958cc087a1SEmmanuel Vadot    maxItems: 3
968cc087a1SEmmanuel Vadot    description: |
978cc087a1SEmmanuel Vadot      GPIO specifiers for three host gpio's used for dvs.
988cc087a1SEmmanuel Vadot
998cc087a1SEmmanuel Vadot  vinb1-supply:
1008cc087a1SEmmanuel Vadot    description: Power supply for buck1
1018cc087a1SEmmanuel Vadot  vinb2-supply:
1028cc087a1SEmmanuel Vadot    description: Power supply for buck2
1038cc087a1SEmmanuel Vadot  vinb3-supply:
1048cc087a1SEmmanuel Vadot    description: Power supply for buck3
1058cc087a1SEmmanuel Vadot  vinb4-supply:
1068cc087a1SEmmanuel Vadot    description: Power supply for buck4
1078cc087a1SEmmanuel Vadot  vinb5-supply:
1088cc087a1SEmmanuel Vadot    description: Power supply for buck5
1098cc087a1SEmmanuel Vadot  vinb6-supply:
1108cc087a1SEmmanuel Vadot    description: Power supply for buck6
1118cc087a1SEmmanuel Vadot  vinb7-supply:
1128cc087a1SEmmanuel Vadot    description: Power supply for buck7
1138cc087a1SEmmanuel Vadot  vinb8-supply:
1148cc087a1SEmmanuel Vadot    description: Power supply for buck8
1158cc087a1SEmmanuel Vadot  vinb9-supply:
1168cc087a1SEmmanuel Vadot    description: Power supply for buck9
1178cc087a1SEmmanuel Vadot
1188cc087a1SEmmanuel Vadot  vinl1-supply:
1198cc087a1SEmmanuel Vadot    description: Power supply for LDO3, LDO10, LDO26, LDO27
1208cc087a1SEmmanuel Vadot  vinl2-supply:
1218cc087a1SEmmanuel Vadot    description: Power supply for LDO13, LDO16, LDO25, LDO28
1228cc087a1SEmmanuel Vadot  vinl3-supply:
1238cc087a1SEmmanuel Vadot    description: Power supply for LDO11, LDO14
1248cc087a1SEmmanuel Vadot  vinl4-supply:
1258cc087a1SEmmanuel Vadot    description: Power supply for LDO4, LDO9
1268cc087a1SEmmanuel Vadot  vinl5-supply:
1278cc087a1SEmmanuel Vadot    description: Power supply for LDO12, LDO17, LDO19, LDO23
1288cc087a1SEmmanuel Vadot  vinl6-supply:
1298cc087a1SEmmanuel Vadot    description: Power supply for LDO18, LDO20, LDO21, LDO24
1308cc087a1SEmmanuel Vadot  vinl7-supply:
1318cc087a1SEmmanuel Vadot    description: Power supply for LDO5, LDO22
1328cc087a1SEmmanuel Vadot  vinl8-supply:
1338cc087a1SEmmanuel Vadot    description: Power supply for LDO1, LDO6, LDO7, LDO8, LDO15
1348cc087a1SEmmanuel Vadot  vinl9-supply:
1358cc087a1SEmmanuel Vadot    description: Power supply for LDO2
1368cc087a1SEmmanuel Vadot
1378cc087a1SEmmanuel Vadot  wakeup-source: true
1388cc087a1SEmmanuel Vadot
1398cc087a1SEmmanuel Vadotrequired:
1408cc087a1SEmmanuel Vadot  - compatible
1418cc087a1SEmmanuel Vadot  - reg
1428cc087a1SEmmanuel Vadot  - regulators
1438cc087a1SEmmanuel Vadot  - s5m8767,pmic-buck-ds-gpios
1448cc087a1SEmmanuel Vadot
1458cc087a1SEmmanuel Vadotdependencies:
1468cc087a1SEmmanuel Vadot  s5m8767,pmic-buck2-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ]
1478cc087a1SEmmanuel Vadot  s5m8767,pmic-buck3-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ]
1488cc087a1SEmmanuel Vadot  s5m8767,pmic-buck4-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ]
1498cc087a1SEmmanuel Vadot  s5m8767,pmic-buck2-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck2-dvs-voltage' ]
1508cc087a1SEmmanuel Vadot  s5m8767,pmic-buck3-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck3-dvs-voltage' ]
1518cc087a1SEmmanuel Vadot  s5m8767,pmic-buck4-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck4-dvs-voltage' ]
1528cc087a1SEmmanuel Vadot
1538cc087a1SEmmanuel VadotadditionalProperties: false
1548cc087a1SEmmanuel Vadot
1558cc087a1SEmmanuel VadotallOf:
156*f126890aSEmmanuel Vadot  - not:
1578cc087a1SEmmanuel Vadot      required:
1588cc087a1SEmmanuel Vadot        - s5m8767,pmic-buck2-uses-gpio-dvs
159*f126890aSEmmanuel Vadot        - s5m8767,pmic-buck3-uses-gpio-dvs
160*f126890aSEmmanuel Vadot  - not:
161*f126890aSEmmanuel Vadot      required:
162*f126890aSEmmanuel Vadot        - s5m8767,pmic-buck2-uses-gpio-dvs
163*f126890aSEmmanuel Vadot        - s5m8767,pmic-buck4-uses-gpio-dvs
164*f126890aSEmmanuel Vadot  - not:
1658cc087a1SEmmanuel Vadot      required:
1668cc087a1SEmmanuel Vadot        - s5m8767,pmic-buck3-uses-gpio-dvs
1678cc087a1SEmmanuel Vadot        - s5m8767,pmic-buck4-uses-gpio-dvs
1688cc087a1SEmmanuel Vadot
1698cc087a1SEmmanuel Vadotexamples:
1708cc087a1SEmmanuel Vadot  - |
1718cc087a1SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
1728cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
1738cc087a1SEmmanuel Vadot
1748cc087a1SEmmanuel Vadot    i2c {
1758cc087a1SEmmanuel Vadot        #address-cells = <1>;
1768cc087a1SEmmanuel Vadot        #size-cells = <0>;
1778cc087a1SEmmanuel Vadot
1788cc087a1SEmmanuel Vadot        pmic@66 {
1798cc087a1SEmmanuel Vadot            compatible = "samsung,s5m8767-pmic";
1808cc087a1SEmmanuel Vadot            reg = <0x66>;
1818cc087a1SEmmanuel Vadot
1828cc087a1SEmmanuel Vadot            interrupt-parent = <&gpx3>;
1838cc087a1SEmmanuel Vadot            interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
1848cc087a1SEmmanuel Vadot            pinctrl-names = "default";
1858cc087a1SEmmanuel Vadot            pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;
1868cc087a1SEmmanuel Vadot            wakeup-source;
1878cc087a1SEmmanuel Vadot
1888cc087a1SEmmanuel Vadot            s5m8767,pmic-buck-default-dvs-idx = <3>;
1898cc087a1SEmmanuel Vadot            s5m8767,pmic-buck2-uses-gpio-dvs;
1908cc087a1SEmmanuel Vadot
1918cc087a1SEmmanuel Vadot            s5m8767,pmic-buck-dvs-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>,
1928cc087a1SEmmanuel Vadot                                          <&gpd1 1 GPIO_ACTIVE_LOW>,
1938cc087a1SEmmanuel Vadot                                          <&gpd1 2 GPIO_ACTIVE_LOW>;
1948cc087a1SEmmanuel Vadot
1958cc087a1SEmmanuel Vadot            s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>,
1968cc087a1SEmmanuel Vadot                                         <&gpx2 4 GPIO_ACTIVE_LOW>,
1978cc087a1SEmmanuel Vadot                                         <&gpx2 5 GPIO_ACTIVE_LOW>;
1988cc087a1SEmmanuel Vadot
1998cc087a1SEmmanuel Vadot            s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
2008cc087a1SEmmanuel Vadot                                             <1250000>, <1200000>,
2018cc087a1SEmmanuel Vadot                                             <1150000>, <1100000>,
2028cc087a1SEmmanuel Vadot                                             <1000000>, <950000>;
2038cc087a1SEmmanuel Vadot
2048cc087a1SEmmanuel Vadot            s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
2058cc087a1SEmmanuel Vadot                                             <1100000>, <1100000>,
2068cc087a1SEmmanuel Vadot                                             <1000000>, <1000000>,
2078cc087a1SEmmanuel Vadot                                             <1000000>, <1000000>;
2088cc087a1SEmmanuel Vadot
2098cc087a1SEmmanuel Vadot            s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
2108cc087a1SEmmanuel Vadot                                             <1200000>, <1200000>,
2118cc087a1SEmmanuel Vadot                                             <1200000>, <1200000>,
2128cc087a1SEmmanuel Vadot                                             <1200000>, <1200000>;
2138cc087a1SEmmanuel Vadot
2148cc087a1SEmmanuel Vadot            clocks {
2158cc087a1SEmmanuel Vadot                compatible = "samsung,s5m8767-clk";
2168cc087a1SEmmanuel Vadot                #clock-cells = <1>;
2178cc087a1SEmmanuel Vadot                clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt";
2188cc087a1SEmmanuel Vadot            };
2198cc087a1SEmmanuel Vadot
2208cc087a1SEmmanuel Vadot            regulators {
2218cc087a1SEmmanuel Vadot                LDO1 {
2228cc087a1SEmmanuel Vadot                    regulator-name = "VDD_ALIVE";
2238cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <1100000>;
2248cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1100000>;
2258cc087a1SEmmanuel Vadot                    regulator-always-on;
2268cc087a1SEmmanuel Vadot                    regulator-boot-on;
2278cc087a1SEmmanuel Vadot                    op_mode = <1>; /* Normal Mode */
2288cc087a1SEmmanuel Vadot                };
2298cc087a1SEmmanuel Vadot
2308cc087a1SEmmanuel Vadot                // ...
2318cc087a1SEmmanuel Vadot
2328cc087a1SEmmanuel Vadot                BUCK1 {
2338cc087a1SEmmanuel Vadot                    regulator-name = "VDD_MIF";
2348cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <950000>;
2358cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1100000>;
2368cc087a1SEmmanuel Vadot                    regulator-always-on;
2378cc087a1SEmmanuel Vadot                    regulator-boot-on;
2388cc087a1SEmmanuel Vadot                    op_mode = <1>; /* Normal Mode */
2398cc087a1SEmmanuel Vadot                };
2408cc087a1SEmmanuel Vadot
2418cc087a1SEmmanuel Vadot                BUCK2 {
2428cc087a1SEmmanuel Vadot                    regulator-name = "VDD_ARM";
2438cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <900000>;
2448cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1350000>;
2458cc087a1SEmmanuel Vadot                    regulator-always-on;
2468cc087a1SEmmanuel Vadot                    regulator-boot-on;
2478cc087a1SEmmanuel Vadot                    op_mode = <1>; /* Normal Mode */
2488cc087a1SEmmanuel Vadot                };
2498cc087a1SEmmanuel Vadot
2508cc087a1SEmmanuel Vadot                // ...
2518cc087a1SEmmanuel Vadot            };
2528cc087a1SEmmanuel Vadot        };
2538cc087a1SEmmanuel Vadot    };
2548cc087a1SEmmanuel Vadot
2558cc087a1SEmmanuel Vadot  - |
2568cc087a1SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
2578cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
2588cc087a1SEmmanuel Vadot
2598cc087a1SEmmanuel Vadot    i2c {
2608cc087a1SEmmanuel Vadot        #address-cells = <1>;
2618cc087a1SEmmanuel Vadot        #size-cells = <0>;
2628cc087a1SEmmanuel Vadot
2638cc087a1SEmmanuel Vadot        pmic@66 {
2648cc087a1SEmmanuel Vadot            compatible = "samsung,s5m8767-pmic";
2658cc087a1SEmmanuel Vadot            reg = <0x66>;
2668cc087a1SEmmanuel Vadot
2678cc087a1SEmmanuel Vadot            interrupt-parent = <&gpx3>;
2688cc087a1SEmmanuel Vadot            interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
2698cc087a1SEmmanuel Vadot            pinctrl-names = "default";
2708cc087a1SEmmanuel Vadot            pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;
2718cc087a1SEmmanuel Vadot            wakeup-source;
2728cc087a1SEmmanuel Vadot
2738cc087a1SEmmanuel Vadot            s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>,
2748cc087a1SEmmanuel Vadot                                         <&gpx2 4 GPIO_ACTIVE_LOW>,
2758cc087a1SEmmanuel Vadot                                         <&gpx2 5 GPIO_ACTIVE_LOW>;
2768cc087a1SEmmanuel Vadot
2778cc087a1SEmmanuel Vadot            clocks {
2788cc087a1SEmmanuel Vadot                compatible = "samsung,s5m8767-clk";
2798cc087a1SEmmanuel Vadot                #clock-cells = <1>;
2808cc087a1SEmmanuel Vadot                clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt";
2818cc087a1SEmmanuel Vadot            };
2828cc087a1SEmmanuel Vadot
2838cc087a1SEmmanuel Vadot            regulators {
2848cc087a1SEmmanuel Vadot                LDO1 {
2858cc087a1SEmmanuel Vadot                    regulator-name = "VDD_ALIVE";
2868cc087a1SEmmanuel Vadot                    regulator-min-microvolt = <1100000>;
2878cc087a1SEmmanuel Vadot                    regulator-max-microvolt = <1100000>;
2888cc087a1SEmmanuel Vadot                    regulator-always-on;
2898cc087a1SEmmanuel Vadot                    regulator-boot-on;
2908cc087a1SEmmanuel Vadot                    op_mode = <1>; /* Normal Mode */
2918cc087a1SEmmanuel Vadot                };
2928cc087a1SEmmanuel Vadot
2938cc087a1SEmmanuel Vadot                // ...
2948cc087a1SEmmanuel Vadot            };
2958cc087a1SEmmanuel Vadot        };
2968cc087a1SEmmanuel Vadot    };
297