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

title: Spreadtrum SC27XX PMIC eFuse

maintainers:
  - Orson Zhai <orsonzhai@gmail.com>
  - Baolin Wang <baolin.wang7@gmail.com>
  - Chunyan Zhang <zhang.lyra@gmail.com>

properties:
  compatible:
    enum:
      - sprd,sc2720-efuse
      - sprd,sc2721-efuse
      - sprd,sc2723-efuse
      - sprd,sc2730-efuse
      - sprd,sc2731-efuse

  reg:
    maxItems: 1

  hwlocks:
    maxItems: 1

required:
  - compatible
  - reg
  - hwlocks

allOf:
  - $ref: nvmem.yaml#
  - $ref: nvmem-deprecated-cells.yaml#

unevaluatedProperties: false

examples:
  - |
    pmic {
      #address-cells = <1>;
      #size-cells = <0>;

      efuse@380 {
        compatible = "sprd,sc2731-efuse";
        reg = <0x380>;
        hwlocks = <&hwlock 12>;
        #address-cells = <1>;
        #size-cells = <1>;

        /* Data cells */
        fgu_calib: calib@6 {
          reg = <0x6 0x2>;
          bits = <0 9>;
        };

        adc_big_scale: calib@24 {
          reg = <0x24 0x2>;
        };

        adc_small_scale: calib@26 {
          reg = <0x26 0x2>;
        };
      };
    };
...