# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/renesas,raa215300.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas RAA215300 Power Management Integrated Circuit (PMIC)

maintainers:
  - Biju Das <biju.das.jz@bp.renesas.com>

description: |
  The RAA215300 is a high-performance, low-cost 9-channel PMIC designed for
  32-bit and 64-bit MCU and MPU applications. It supports DDR3, DDR3L, DDR4,
  and LPDDR4 memory power requirements. The internally compensated regulators,
  built-in Real-Time Clock (RTC), 32kHz crystal oscillator, and coin cell
  battery charger provide a highly integrated, small footprint power solution
  ideal for System-On-Module (SOM) applications. A spread spectrum feature
  provides an ease-of-use solution for noise-sensitive audio or RF applications.

  This device exposes two devices via I2C. One for the integrated RTC IP, and
  one for everything else.

  Link to datasheet:
  https://www.renesas.com/in/en/products/power-power-management/multi-channel-power-management-ics-pmics/ssdsoc-power-management-ics-pmic-and-pmus/raa215300-high-performance-9-channel-pmic-supporting-ddr-memory-built-charger-and-rtc

properties:
  compatible:
    enum:
      - renesas,raa215300

  reg:
    maxItems: 2

  reg-names:
    items:
      - const: main
      - const: rtc

  interrupts:
    maxItems: 1

  clocks:
    description: |
      The clocks are optional. The RTC is disabled, if no clocks are
      provided(either xin or clkin).
    maxItems: 1

  clock-names:
    description: |
      Use xin, if connected to an external crystal.
      Use clkin, if connected to an external clock signal.
    enum:
      - xin
      - clkin

required:
  - compatible
  - reg
  - reg-names

additionalProperties: false

examples:
  - |
    /* 32.768kHz crystal */
    x2: x2-clock {
        compatible = "fixed-clock";
        #clock-cells = <0>;
        clock-frequency = <32768>;
    };

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        raa215300: pmic@12 {
            compatible = "renesas,raa215300";
            reg = <0x12>, <0x6f>;
            reg-names = "main", "rtc";

            clocks = <&x2>;
            clock-names = "xin";
        };
    };