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