xref: /freebsd/sys/contrib/device-tree/Bindings/iio/adc/rockchip-saradc.yaml (revision 525fe93dc7487a1e63a90f6a2b956abc601963c1)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/adc/rockchip-saradc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Rockchip Successive Approximation Register (SAR) A/D Converter
8
9maintainers:
10  - Heiko Stuebner <heiko@sntech.de>
11
12properties:
13  compatible:
14    oneOf:
15      - const: rockchip,saradc
16      - const: rockchip,rk3066-tsadc
17      - const: rockchip,rk3399-saradc
18      - items:
19          - enum:
20              - rockchip,px30-saradc
21              - rockchip,rk3308-saradc
22              - rockchip,rk3328-saradc
23              - rockchip,rk3568-saradc
24              - rockchip,rv1108-saradc
25              - rockchip,rv1126-saradc
26          - const: rockchip,rk3399-saradc
27
28  reg:
29    maxItems: 1
30
31  interrupts:
32    maxItems: 1
33
34  clocks:
35    items:
36      - description: converter clock
37      - description: peripheral clock
38
39  clock-names:
40    items:
41      - const: saradc
42      - const: apb_pclk
43
44  resets:
45    maxItems: 1
46
47  reset-names:
48    const: saradc-apb
49
50  vref-supply:
51    description:
52      The regulator supply for the ADC reference voltage.
53
54  "#io-channel-cells":
55    const: 1
56
57required:
58  - compatible
59  - reg
60  - interrupts
61  - clocks
62  - clock-names
63  - vref-supply
64  - "#io-channel-cells"
65
66additionalProperties: false
67
68examples:
69  - |
70    #include <dt-bindings/clock/rk3288-cru.h>
71    #include <dt-bindings/interrupt-controller/arm-gic.h>
72    saradc: saradc@2006c000 {
73      compatible = "rockchip,saradc";
74      reg = <0x2006c000 0x100>;
75      interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
76      clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
77      clock-names = "saradc", "apb_pclk";
78      resets = <&cru SRST_SARADC>;
79      reset-names = "saradc-apb";
80      vref-supply = <&vcc18>;
81      #io-channel-cells = <1>;
82    };
83