162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/mfd/rohm,bd9576-pmic.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: ROHM BD9576MUF and BD9573MUF Power Management Integrated Circuit
862306a36Sopenharmony_ci
962306a36Sopenharmony_cimaintainers:
1062306a36Sopenharmony_ci  - Matti Vaittinen <mazziesaccount@gmail.com>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_cidescription: |
1362306a36Sopenharmony_ci  BD9576MUF and BD9573MUF are power management ICs primarily intended for
1462306a36Sopenharmony_ci  powering the R-Car series processors.
1562306a36Sopenharmony_ci  The IC provides 6 power outputs with configurable sequencing and safety
1662306a36Sopenharmony_ci  monitoring. A watchdog logic with slow ping/windowed modes is also included.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciproperties:
1962306a36Sopenharmony_ci  compatible:
2062306a36Sopenharmony_ci    enum:
2162306a36Sopenharmony_ci      - rohm,bd9576
2262306a36Sopenharmony_ci      - rohm,bd9573
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci  reg:
2562306a36Sopenharmony_ci    description:
2662306a36Sopenharmony_ci      I2C slave address.
2762306a36Sopenharmony_ci    maxItems: 1
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci  interrupts:
3062306a36Sopenharmony_ci    maxItems: 1
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci  rohm,vout1-en-low:
3362306a36Sopenharmony_ci    description:
3462306a36Sopenharmony_ci      BD9576 and BD9573 VOUT1 regulator enable state can be individually
3562306a36Sopenharmony_ci      controlled by a GPIO. This is dictated by state of vout1-en pin during
3662306a36Sopenharmony_ci      the PMIC startup. If vout1-en is LOW during PMIC startup then the VOUT1
3762306a36Sopenharmony_ci      enable state is controlled via this pin. Set this property if vout1-en
3862306a36Sopenharmony_ci      is wired to be down at PMIC start-up.
3962306a36Sopenharmony_ci    type: boolean
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci  rohm,vout1-en-gpios:
4262306a36Sopenharmony_ci    description:
4362306a36Sopenharmony_ci      GPIO specifier to specify the GPIO connected to vout1-en for vout1 ON/OFF
4462306a36Sopenharmony_ci      state control.
4562306a36Sopenharmony_ci    maxItems: 1
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci  rohm,ddr-sel-low:
4862306a36Sopenharmony_ci    description:
4962306a36Sopenharmony_ci      The BD9576 and BD9573 output voltage for DDR can be selected by setting
5062306a36Sopenharmony_ci      the ddr-sel pin low or high. Set this property if ddr-sel is grounded.
5162306a36Sopenharmony_ci    type: boolean
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci  rohm,watchdog-enable-gpios:
5462306a36Sopenharmony_ci    description: The GPIO line used to enable the watchdog.
5562306a36Sopenharmony_ci    maxItems: 1
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci  rohm,watchdog-ping-gpios:
5862306a36Sopenharmony_ci    description: The GPIO line used to ping the watchdog.
5962306a36Sopenharmony_ci    maxItems: 1
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci  rohm,hw-timeout-ms:
6262306a36Sopenharmony_ci    maxItems: 2
6362306a36Sopenharmony_ci    description:
6462306a36Sopenharmony_ci      Watchdog timeout in milliseconds. If single value is given it is
6562306a36Sopenharmony_ci      the maximum timeout. Eg. if pinging watchdog is not done within this time
6662306a36Sopenharmony_ci      limit the watchdog will be triggered. If two values are given watchdog
6762306a36Sopenharmony_ci      is configured in "window mode". Then first value is limit for short-ping
6862306a36Sopenharmony_ci      Eg. if watchdog is pinged sooner than that the watchdog will trigger.
6962306a36Sopenharmony_ci      When two values is given the second value is the maximum timeout.
7062306a36Sopenharmony_ci      # (HW) minimum for short timeout is 2ms, maximum 220 ms.
7162306a36Sopenharmony_ci      # (HW) minimum for max timeout is 4ms, maximum 4416 ms.
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci  regulators:
7462306a36Sopenharmony_ci    $ref: ../regulator/rohm,bd9576-regulator.yaml
7562306a36Sopenharmony_ci    description:
7662306a36Sopenharmony_ci      List of child nodes that specify the regulators.
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_cirequired:
7962306a36Sopenharmony_ci  - compatible
8062306a36Sopenharmony_ci  - reg
8162306a36Sopenharmony_ci  - regulators
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ciadditionalProperties: false
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciexamples:
8662306a36Sopenharmony_ci  - |
8762306a36Sopenharmony_ci    #include <dt-bindings/gpio/gpio.h>
8862306a36Sopenharmony_ci    #include <dt-bindings/leds/common.h>
8962306a36Sopenharmony_ci    i2c {
9062306a36Sopenharmony_ci        #address-cells = <1>;
9162306a36Sopenharmony_ci        #size-cells = <0>;
9262306a36Sopenharmony_ci        pmic: pmic@30 {
9362306a36Sopenharmony_ci            compatible = "rohm,bd9576";
9462306a36Sopenharmony_ci            reg = <0x30>;
9562306a36Sopenharmony_ci            rohm,vout1-en-low;
9662306a36Sopenharmony_ci            rohm,vout1-en-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
9762306a36Sopenharmony_ci            rohm,ddr-sel-low;
9862306a36Sopenharmony_ci            rohm,watchdog-enable-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
9962306a36Sopenharmony_ci            rohm,watchdog-ping-gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
10062306a36Sopenharmony_ci            rohm,hw-timeout-ms = <150>, <2300>;
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci            regulators {
10362306a36Sopenharmony_ci                boost1: regulator-vd50 {
10462306a36Sopenharmony_ci                    regulator-name = "VD50";
10562306a36Sopenharmony_ci                };
10662306a36Sopenharmony_ci                buck1: regulator-vd18 {
10762306a36Sopenharmony_ci                    regulator-name = "VD18";
10862306a36Sopenharmony_ci                };
10962306a36Sopenharmony_ci                buck2: regulator-vdddr {
11062306a36Sopenharmony_ci                    regulator-name = "VDDDR";
11162306a36Sopenharmony_ci                };
11262306a36Sopenharmony_ci                buck3: regulator-vd10 {
11362306a36Sopenharmony_ci                    regulator-name = "VD10";
11462306a36Sopenharmony_ci                };
11562306a36Sopenharmony_ci                ldo: regulator-voutl1 {
11662306a36Sopenharmony_ci                    regulator-name = "VOUTL1";
11762306a36Sopenharmony_ci                };
11862306a36Sopenharmony_ci                sw: regulator-vouts1 {
11962306a36Sopenharmony_ci                    regulator-name = "VOUTS1";
12062306a36Sopenharmony_ci                };
12162306a36Sopenharmony_ci            };
12262306a36Sopenharmony_ci        };
12362306a36Sopenharmony_ci    };
124