xref: /freebsd/sys/contrib/device-tree/Bindings/iio/adc/ingenic,adc.yaml (revision 77013d11e6483b970af25e13c9b892075742f7e5)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright 2019-2020 Artur Rojek
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/iio/adc/ingenic,adc.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: Ingenic JZ47xx ADC controller IIO bindings
9
10maintainers:
11  - Artur Rojek <contact@artur-rojek.eu>
12
13description: >
14  Industrial I/O subsystem bindings for ADC controller found in
15  Ingenic JZ47xx SoCs.
16
17  ADC clients must use the format described in
18  https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml,
19  giving a phandle and IIO specifier pair ("io-channels") to the ADC controller.
20
21properties:
22  compatible:
23    enum:
24      - ingenic,jz4725b-adc
25      - ingenic,jz4740-adc
26      - ingenic,jz4770-adc
27
28  '#io-channel-cells':
29    const: 1
30    description:
31      Must be set to <1> to indicate channels are selected by index.
32
33  reg:
34    maxItems: 1
35
36  clocks:
37    maxItems: 1
38
39  clock-names:
40    items:
41      - const: adc
42
43  interrupts:
44    maxItems: 1
45
46required:
47  - compatible
48  - '#io-channel-cells'
49  - reg
50  - clocks
51  - clock-names
52  - interrupts
53
54additionalProperties: false
55
56examples:
57  - |
58    #include <dt-bindings/clock/jz4740-cgu.h>
59    #include <dt-bindings/iio/adc/ingenic,adc.h>
60
61    adc@10070000 {
62            compatible = "ingenic,jz4740-adc";
63            #io-channel-cells = <1>;
64
65            reg = <0x10070000 0x30>;
66
67            clocks = <&cgu JZ4740_CLK_ADC>;
68            clock-names = "adc";
69
70            interrupt-parent = <&intc>;
71            interrupts = <18>;
72    };
73