18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/mfd/rohm,bd71837-pmic.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: ROHM BD71837 Power Management Integrated Circuit bindings
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cidescription: |
138c2ecf20Sopenharmony_ci  BD71837MWV is programmable Power Management ICs for powering single-core,
148c2ecf20Sopenharmony_ci  dual-core, and quad-core SoCs such as NXP-i.MX 8M. It is optimized for low
158c2ecf20Sopenharmony_ci  BOM cost and compact solution footprint. BD71837MWV  integrates 8 Buck
168c2ecf20Sopenharmony_ci  regulators and 7 LDOs.
178c2ecf20Sopenharmony_ci  Datasheet for BD71837 is available at
188c2ecf20Sopenharmony_ci  https://www.rohm.com/products/power-management/power-management-ic-for-system/industrial-consumer-applications/nxp-imx/bd71837amwv-product
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciproperties:
218c2ecf20Sopenharmony_ci  compatible:
228c2ecf20Sopenharmony_ci    const: rohm,bd71837
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci  reg:
258c2ecf20Sopenharmony_ci    description:
268c2ecf20Sopenharmony_ci      I2C slave address.
278c2ecf20Sopenharmony_ci    maxItems: 1
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci  interrupts:
308c2ecf20Sopenharmony_ci    maxItems: 1
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci  clocks:
338c2ecf20Sopenharmony_ci    maxItems: 1
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci  "#clock-cells":
368c2ecf20Sopenharmony_ci    const: 0
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci# The BD718x7 supports two different HW states as reset target states. States
398c2ecf20Sopenharmony_ci# are called as SNVS and READY. At READY state all the PMIC power outputs go
408c2ecf20Sopenharmony_ci# down and OTP is reload. At the SNVS state all other logic and external
418c2ecf20Sopenharmony_ci# devices apart from the SNVS power domain are shut off. Please refer to NXP
428c2ecf20Sopenharmony_ci# i.MX8 documentation for further information regarding SNVS state. When a
438c2ecf20Sopenharmony_ci# reset is done via SNVS state the PMIC OTP data is not reload. This causes
448c2ecf20Sopenharmony_ci# power outputs that have been under SW control to stay down when reset has
458c2ecf20Sopenharmony_ci# switched power state to SNVS. If reset is done via READY state the power
468c2ecf20Sopenharmony_ci# outputs will be returned to HW control by OTP loading. Thus the reset
478c2ecf20Sopenharmony_ci# target state is set to READY by default. If SNVS state is used the boot
488c2ecf20Sopenharmony_ci# crucial regulators must have the regulator-always-on and regulator-boot-on
498c2ecf20Sopenharmony_ci# properties set in regulator node.
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci  rohm,reset-snvs-powered:
528c2ecf20Sopenharmony_ci    description: |
538c2ecf20Sopenharmony_ci      Transfer PMIC to SNVS state at reset
548c2ecf20Sopenharmony_ci    type: boolean
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci# Configure the "short press" and "long press" timers for the power button.
578c2ecf20Sopenharmony_ci# Values are rounded to what hardware supports
588c2ecf20Sopenharmony_ci# Short-press:
598c2ecf20Sopenharmony_ci#   Shortest being 10ms, next 500ms and then multiple of 500ms up to 7,5s
608c2ecf20Sopenharmony_ci# Long-press:
618c2ecf20Sopenharmony_ci#   Shortest being 10ms, next 1000ms and then multiple of 1000ms up to 15s
628c2ecf20Sopenharmony_ci# If these properties are not present the existing configuration (from
638c2ecf20Sopenharmony_ci# bootloader or OTP) is not touched.
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci  rohm,short-press-ms:
668c2ecf20Sopenharmony_ci    description:
678c2ecf20Sopenharmony_ci      Short press duration in milliseconds
688c2ecf20Sopenharmony_ci    enum:
698c2ecf20Sopenharmony_ci      - 10
708c2ecf20Sopenharmony_ci      - 500
718c2ecf20Sopenharmony_ci      - 1000
728c2ecf20Sopenharmony_ci      - 1500
738c2ecf20Sopenharmony_ci      - 2000
748c2ecf20Sopenharmony_ci      - 2500
758c2ecf20Sopenharmony_ci      - 3000
768c2ecf20Sopenharmony_ci      - 3500
778c2ecf20Sopenharmony_ci      - 4000
788c2ecf20Sopenharmony_ci      - 4500
798c2ecf20Sopenharmony_ci      - 5000
808c2ecf20Sopenharmony_ci      - 5500
818c2ecf20Sopenharmony_ci      - 6000
828c2ecf20Sopenharmony_ci      - 6500
838c2ecf20Sopenharmony_ci      - 7000
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci  rohm,long-press-ms:
868c2ecf20Sopenharmony_ci    description:
878c2ecf20Sopenharmony_ci      Long press duration in milliseconds
888c2ecf20Sopenharmony_ci    enum:
898c2ecf20Sopenharmony_ci      - 10
908c2ecf20Sopenharmony_ci      - 1000
918c2ecf20Sopenharmony_ci      - 2000
928c2ecf20Sopenharmony_ci      - 3000
938c2ecf20Sopenharmony_ci      - 4000
948c2ecf20Sopenharmony_ci      - 5000
958c2ecf20Sopenharmony_ci      - 6000
968c2ecf20Sopenharmony_ci      - 7000
978c2ecf20Sopenharmony_ci      - 8000
988c2ecf20Sopenharmony_ci      - 9000
998c2ecf20Sopenharmony_ci      - 10000
1008c2ecf20Sopenharmony_ci      - 11000
1018c2ecf20Sopenharmony_ci      - 12000
1028c2ecf20Sopenharmony_ci      - 13000
1038c2ecf20Sopenharmony_ci      - 14000
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci  regulators:
1068c2ecf20Sopenharmony_ci    $ref: ../regulator/rohm,bd71837-regulator.yaml
1078c2ecf20Sopenharmony_ci    description:
1088c2ecf20Sopenharmony_ci      List of child nodes that specify the regulators.
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_cirequired:
1118c2ecf20Sopenharmony_ci  - compatible
1128c2ecf20Sopenharmony_ci  - reg
1138c2ecf20Sopenharmony_ci  - interrupts
1148c2ecf20Sopenharmony_ci  - clocks
1158c2ecf20Sopenharmony_ci  - "#clock-cells"
1168c2ecf20Sopenharmony_ci  - regulators
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ciadditionalProperties: false
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ciexamples:
1218c2ecf20Sopenharmony_ci  - |
1228c2ecf20Sopenharmony_ci    #include <dt-bindings/interrupt-controller/irq.h>
1238c2ecf20Sopenharmony_ci    #include <dt-bindings/leds/common.h>
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci    i2c {
1268c2ecf20Sopenharmony_ci        #address-cells = <1>;
1278c2ecf20Sopenharmony_ci        #size-cells = <0>;
1288c2ecf20Sopenharmony_ci        pmic: pmic@4b {
1298c2ecf20Sopenharmony_ci            compatible = "rohm,bd71837";
1308c2ecf20Sopenharmony_ci            reg = <0x4b>;
1318c2ecf20Sopenharmony_ci            interrupt-parent = <&gpio1>;
1328c2ecf20Sopenharmony_ci            interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
1338c2ecf20Sopenharmony_ci            #clock-cells = <0>;
1348c2ecf20Sopenharmony_ci            clocks = <&osc 0>;
1358c2ecf20Sopenharmony_ci            rohm,reset-snvs-powered;
1368c2ecf20Sopenharmony_ci            rohm,short-press-ms = <10>;
1378c2ecf20Sopenharmony_ci            rohm,long-press-ms = <2000>;
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci            regulators {
1408c2ecf20Sopenharmony_ci                buck1: BUCK1 {
1418c2ecf20Sopenharmony_ci                    regulator-name = "buck1";
1428c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <700000>;
1438c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1300000>;
1448c2ecf20Sopenharmony_ci                    regulator-boot-on;
1458c2ecf20Sopenharmony_ci                    regulator-always-on;
1468c2ecf20Sopenharmony_ci                    regulator-ramp-delay = <1250>;
1478c2ecf20Sopenharmony_ci                    rohm,dvs-run-voltage = <900000>;
1488c2ecf20Sopenharmony_ci                    rohm,dvs-idle-voltage = <850000>;
1498c2ecf20Sopenharmony_ci                    rohm,dvs-suspend-voltage = <800000>;
1508c2ecf20Sopenharmony_ci                };
1518c2ecf20Sopenharmony_ci                buck2: BUCK2 {
1528c2ecf20Sopenharmony_ci                    regulator-name = "buck2";
1538c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <700000>;
1548c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1300000>;
1558c2ecf20Sopenharmony_ci                    regulator-boot-on;
1568c2ecf20Sopenharmony_ci                    regulator-always-on;
1578c2ecf20Sopenharmony_ci                    regulator-ramp-delay = <1250>;
1588c2ecf20Sopenharmony_ci                    rohm,dvs-run-voltage = <1000000>;
1598c2ecf20Sopenharmony_ci                    rohm,dvs-idle-voltage = <900000>;
1608c2ecf20Sopenharmony_ci                };
1618c2ecf20Sopenharmony_ci                buck3: BUCK3 {
1628c2ecf20Sopenharmony_ci                    regulator-name = "buck3";
1638c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <700000>;
1648c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1300000>;
1658c2ecf20Sopenharmony_ci                    regulator-boot-on;
1668c2ecf20Sopenharmony_ci                    rohm,dvs-run-voltage = <1000000>;
1678c2ecf20Sopenharmony_ci                };
1688c2ecf20Sopenharmony_ci                buck4: BUCK4 {
1698c2ecf20Sopenharmony_ci                    regulator-name = "buck4";
1708c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <700000>;
1718c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1300000>;
1728c2ecf20Sopenharmony_ci                    regulator-boot-on;
1738c2ecf20Sopenharmony_ci                    rohm,dvs-run-voltage = <1000000>;
1748c2ecf20Sopenharmony_ci                };
1758c2ecf20Sopenharmony_ci                buck5: BUCK5 {
1768c2ecf20Sopenharmony_ci                    regulator-name = "buck5";
1778c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <700000>;
1788c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1350000>;
1798c2ecf20Sopenharmony_ci                    regulator-boot-on;
1808c2ecf20Sopenharmony_ci                };
1818c2ecf20Sopenharmony_ci                buck6: BUCK6 {
1828c2ecf20Sopenharmony_ci                    regulator-name = "buck6";
1838c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <3000000>;
1848c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <3300000>;
1858c2ecf20Sopenharmony_ci                    regulator-boot-on;
1868c2ecf20Sopenharmony_ci                };
1878c2ecf20Sopenharmony_ci                buck7: BUCK7 {
1888c2ecf20Sopenharmony_ci                    regulator-name = "buck7";
1898c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <1605000>;
1908c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1995000>;
1918c2ecf20Sopenharmony_ci                    regulator-boot-on;
1928c2ecf20Sopenharmony_ci                };
1938c2ecf20Sopenharmony_ci                buck8: BUCK8 {
1948c2ecf20Sopenharmony_ci                    regulator-name = "buck8";
1958c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <800000>;
1968c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1400000>;
1978c2ecf20Sopenharmony_ci                };
1988c2ecf20Sopenharmony_ci
1998c2ecf20Sopenharmony_ci                ldo1: LDO1 {
2008c2ecf20Sopenharmony_ci                    regulator-name = "ldo1";
2018c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <3000000>;
2028c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <3300000>;
2038c2ecf20Sopenharmony_ci                    regulator-boot-on;
2048c2ecf20Sopenharmony_ci                };
2058c2ecf20Sopenharmony_ci                ldo2: LDO2 {
2068c2ecf20Sopenharmony_ci                    regulator-name = "ldo2";
2078c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <900000>;
2088c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <900000>;
2098c2ecf20Sopenharmony_ci                    regulator-boot-on;
2108c2ecf20Sopenharmony_ci                };
2118c2ecf20Sopenharmony_ci                ldo3: LDO3 {
2128c2ecf20Sopenharmony_ci                    regulator-name = "ldo3";
2138c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <1800000>;
2148c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <3300000>;
2158c2ecf20Sopenharmony_ci                };
2168c2ecf20Sopenharmony_ci                ldo4: LDO4 {
2178c2ecf20Sopenharmony_ci                    regulator-name = "ldo4";
2188c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <900000>;
2198c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1800000>;
2208c2ecf20Sopenharmony_ci                };
2218c2ecf20Sopenharmony_ci                ldo5: LDO5 {
2228c2ecf20Sopenharmony_ci                    regulator-name = "ldo5";
2238c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <1800000>;
2248c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <3300000>;
2258c2ecf20Sopenharmony_ci                };
2268c2ecf20Sopenharmony_ci                ldo6: LDO6 {
2278c2ecf20Sopenharmony_ci                    regulator-name = "ldo6";
2288c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <900000>;
2298c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <1800000>;
2308c2ecf20Sopenharmony_ci                };
2318c2ecf20Sopenharmony_ci                ldo7_reg: LDO7 {
2328c2ecf20Sopenharmony_ci                    regulator-name = "ldo7";
2338c2ecf20Sopenharmony_ci                    regulator-min-microvolt = <1800000>;
2348c2ecf20Sopenharmony_ci                    regulator-max-microvolt = <3300000>;
2358c2ecf20Sopenharmony_ci                };
2368c2ecf20Sopenharmony_ci            };
2378c2ecf20Sopenharmony_ci        };
2388c2ecf20Sopenharmony_ci    };
239