linux/Documentation/devicetree/bindings/spmi/hisilicon,hisi-spmi-controller.yaml

# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/spmi/hisilicon,hisi-spmi-controller.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: HiSilicon SPMI controller

maintainers:
  - Mauro Carvalho Chehab <[email protected]>

description: |
  The HiSilicon SPMI BUS controller is found on some Kirin-based designs.
  It is a MIPI System Power Management (SPMI) controller.

  The PMIC part is provided by
  Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml.

allOf:
  - $ref: spmi.yaml#

properties:

  $nodename:
    pattern: "spmi@[0-9a-f]"

  compatible:
    const: hisilicon,kirin970-spmi-controller

  reg:
    maxItems: 1

  hisilicon,spmi-channel:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      number of the Kirin 970 SPMI channel where the SPMI devices are connected.

required:
  - compatible
  - reg
  - hisilicon,spmi-channel

patternProperties:
  "@[0-9a-f]$":
    type: object

    description: |
      PMIC properties, which are specific to the used SPMI PMIC device(s).
      When used in combination with HiSilicon 6421v600, the properties
      are documented at
      Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/spmi/spmi.h>

    spmi@fff24000 {
        compatible = "hisilicon,kirin970-spmi-controller";
        reg = <0xfff24000 0x1000>;
        #address-cells = <2>;
        #size-cells = <0>;
        hisilicon,spmi-channel = <2>;

        pmic@0 {
            reg = <0 SPMI_USID>;
            /* pmic properties */
        };
    };