xref: /linux/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml (revision be239684b18e1cdcafcf8c7face4a2f562c745ad)
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      - const: rockchip,rk3588-saradc
19      - items:
20          - enum:
21              - rockchip,px30-saradc
22              - rockchip,rk3308-saradc
23              - rockchip,rk3328-saradc
24              - rockchip,rk3568-saradc
25              - rockchip,rv1108-saradc
26              - rockchip,rv1126-saradc
27          - const: rockchip,rk3399-saradc
28
29  reg:
30    maxItems: 1
31
32  interrupts:
33    maxItems: 1
34
35  clocks:
36    items:
37      - description: converter clock
38      - description: peripheral clock
39
40  clock-names:
41    items:
42      - const: saradc
43      - const: apb_pclk
44
45  resets:
46    maxItems: 1
47
48  reset-names:
49    const: saradc-apb
50
51  vref-supply:
52    description:
53      The regulator supply for the ADC reference voltage.
54
55  "#io-channel-cells":
56    const: 1
57
58required:
59  - compatible
60  - reg
61  - interrupts
62  - clocks
63  - clock-names
64  - vref-supply
65  - "#io-channel-cells"
66
67additionalProperties: false
68
69examples:
70  - |
71    #include <dt-bindings/clock/rk3288-cru.h>
72    #include <dt-bindings/interrupt-controller/arm-gic.h>
73    saradc: saradc@2006c000 {
74      compatible = "rockchip,saradc";
75      reg = <0x2006c000 0x100>;
76      interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
77      clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
78      clock-names = "saradc", "apb_pclk";
79      resets = <&cru SRST_SARADC>;
80      reset-names = "saradc-apb";
81      vref-supply = <&vcc18>;
82      #io-channel-cells = <1>;
83    };
84