summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
blob: f46de17c08788d185fa7f1dd1aba148178f99a14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/samsung,exynos-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung Exynos Analog to Digital Converter (ADC)

maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

properties:
  compatible:
    enum:
      - samsung,exynos-adc-v1                 # Exynos5250
      - samsung,exynos-adc-v2
      - samsung,exynos3250-adc
      - samsung,exynos4212-adc                # Exynos4212 and Exynos4412
      - samsung,exynos7-adc
      - samsung,s3c2410-adc
      - samsung,s3c2416-adc
      - samsung,s3c2440-adc
      - samsung,s3c2443-adc
      - samsung,s3c6410-adc
      - samsung,s5pv210-adc

  reg:
    maxItems: 1

  clocks:
    description:
      Phandle to ADC bus clock. For Exynos3250 additional clock is needed.
    minItems: 1
    maxItems: 2

  clock-names:
    description:
      Must contain clock names (adc, sclk) matching phandles in clocks
      property.
    minItems: 1
    maxItems: 2

  interrupts:
    maxItems: 1

  "#io-channel-cells":
    const: 1

  vdd-supply: true

  samsung,syscon-phandle:
    $ref: '/schemas/types.yaml#/definitions/phandle'
    description:
      Phandle to the PMU system controller node (to access the ADC_PHY
      register on Exynos3250/4x12/5250/5420/5800).

  has-touchscreen:
    description:
      If present, indicates that a touchscreen is connected and usable.
    type: boolean

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts
  - "#io-channel-cells"
  - vdd-supply

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos-adc-v1
              - samsung,exynos-adc-v2
              - samsung,exynos3250-adc
              - samsung,exynos4212-adc
              - samsung,s5pv210-adc
    then:
      required:
        - samsung,syscon-phandle

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos3250-adc
    then:
      properties:
        clocks:
          minItems: 2
          maxItems: 2
        clock-names:
          items:
            - const: adc
            - const: sclk
    else:
      properties:
        clocks:
          minItems: 1
          maxItems: 1
        clock-names:
          items:
            - const: adc

examples:
  - |
    adc: adc@12d10000 {
        compatible = "samsung,exynos-adc-v1";
        reg = <0x12d10000 0x100>;
        interrupts = <0 106 0>;
        #io-channel-cells = <1>;
        io-channel-ranges;

        clocks = <&clock 303>;
        clock-names = "adc";

        vdd-supply = <&buck5_reg>;
        samsung,syscon-phandle = <&pmu_system_controller>;

        /* NTC thermistor is a hwmon device */
        ncp15wb473@0 {
            compatible = "murata,ncp15wb473";
            pullup-uv = <1800000>;
            pullup-ohm = <47000>;
            pulldown-ohm = <0>;
            io-channels = <&adc 4>;
          };
    };

  - |
    #include <dt-bindings/clock/exynos3250.h>

    adc@126c0000 {
        compatible = "samsung,exynos3250-adc";
        reg = <0x126C0000 0x100>;
        interrupts = <0 137 0>;
        #io-channel-cells = <1>;
        io-channel-ranges;

        clocks = <&cmu CLK_TSADC>,
                 <&cmu CLK_SCLK_TSADC>;
        clock-names = "adc", "sclk";

        vdd-supply = <&buck5_reg>;
        samsung,syscon-phandle = <&pmu_system_controller>;
    };