1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/adc/sprd,sc2720-adc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Spreadtrum SC27XX series PMICs ADC binding
8
9maintainers:
10  - Baolin Wang <baolin.wang7@gmail.com>
11
12description:
13  Supports the ADC found on these PMICs.
14
15properties:
16  compatible:
17    enum:
18      - sprd,sc2720-adc
19      - sprd,sc2721-adc
20      - sprd,sc2723-adc
21      - sprd,sc2730-adc
22      - sprd,sc2731-adc
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    maxItems: 1
29
30  "#io-channel-cells":
31    const: 1
32
33  hwlocks:
34    maxItems: 1
35
36  nvmem-cells:
37    maxItems: 2
38
39  nvmem-cell-names:
40    items:
41      - const: big_scale_calib
42      - const: small_scale_calib
43
44required:
45  - compatible
46  - reg
47  - interrupts
48  - "#io-channel-cells"
49  - hwlocks
50  - nvmem-cells
51  - nvmem-cell-names
52
53additionalProperties: false
54
55examples:
56  - |
57    #include <dt-bindings/interrupt-controller/irq.h>
58    pmic {
59        #address-cells = <1>;
60        #size-cells = <0>;
61        adc@480 {
62            compatible = "sprd,sc2731-adc";
63            reg = <0x480>;
64            interrupt-parent = <&sc2731_pmic>;
65            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
66            #io-channel-cells = <1>;
67            hwlocks = <&hwlock 4>;
68            nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
69            nvmem-cell-names = "big_scale_calib", "small_scale_calib";
70        };
71    };
72...
73