xref: /linux/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml (revision 06d07429858317ded2db7986113a9e0129cd599b)
1b356ceb3SKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0
2b356ceb3SKrzysztof Kozlowski%YAML 1.2
3b356ceb3SKrzysztof Kozlowski---
4b356ceb3SKrzysztof Kozlowski$id: http://devicetree.org/schemas/iio/adc/samsung,exynos-adc.yaml#
5b356ceb3SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6b356ceb3SKrzysztof Kozlowski
7b356ceb3SKrzysztof Kozlowskititle: Samsung Exynos Analog to Digital Converter (ADC)
8b356ceb3SKrzysztof Kozlowski
9b356ceb3SKrzysztof Kozlowskimaintainers:
10b356ceb3SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
11b356ceb3SKrzysztof Kozlowski
12b356ceb3SKrzysztof Kozlowskiproperties:
13b356ceb3SKrzysztof Kozlowski  compatible:
14*b709ff4dSKrzysztof Kozlowski    oneOf:
15*b709ff4dSKrzysztof Kozlowski      - enum:
16b356ceb3SKrzysztof Kozlowski          - samsung,exynos-adc-v1                 # Exynos5250
17b356ceb3SKrzysztof Kozlowski          - samsung,exynos-adc-v2
18b356ceb3SKrzysztof Kozlowski          - samsung,exynos3250-adc
19b356ceb3SKrzysztof Kozlowski          - samsung,exynos4212-adc                # Exynos4212 and Exynos4412
20b356ceb3SKrzysztof Kozlowski          - samsung,exynos7-adc
21b356ceb3SKrzysztof Kozlowski          - samsung,s3c2410-adc
22b356ceb3SKrzysztof Kozlowski          - samsung,s3c2416-adc
23b356ceb3SKrzysztof Kozlowski          - samsung,s3c2440-adc
24b356ceb3SKrzysztof Kozlowski          - samsung,s3c2443-adc
25b356ceb3SKrzysztof Kozlowski          - samsung,s3c6410-adc
26b356ceb3SKrzysztof Kozlowski          - samsung,s5pv210-adc
27*b709ff4dSKrzysztof Kozlowski      - items:
28*b709ff4dSKrzysztof Kozlowski          - enum:
29*b709ff4dSKrzysztof Kozlowski              - samsung,exynos5433-adc
30*b709ff4dSKrzysztof Kozlowski          - const: samsung,exynos7-adc
31b356ceb3SKrzysztof Kozlowski
32b356ceb3SKrzysztof Kozlowski  reg:
339dacf8b5SKrzysztof Kozlowski    maxItems: 1
34b356ceb3SKrzysztof Kozlowski
35b356ceb3SKrzysztof Kozlowski  clocks:
36b356ceb3SKrzysztof Kozlowski    description:
37b356ceb3SKrzysztof Kozlowski      Phandle to ADC bus clock. For Exynos3250 additional clock is needed.
38b356ceb3SKrzysztof Kozlowski    minItems: 1
39b356ceb3SKrzysztof Kozlowski    maxItems: 2
40b356ceb3SKrzysztof Kozlowski
41b356ceb3SKrzysztof Kozlowski  clock-names:
42b356ceb3SKrzysztof Kozlowski    description:
43b356ceb3SKrzysztof Kozlowski      Must contain clock names (adc, sclk) matching phandles in clocks
44b356ceb3SKrzysztof Kozlowski      property.
45b356ceb3SKrzysztof Kozlowski    minItems: 1
46b356ceb3SKrzysztof Kozlowski    maxItems: 2
47b356ceb3SKrzysztof Kozlowski
48b356ceb3SKrzysztof Kozlowski  interrupts:
493b17dd22SKrzysztof Kozlowski    description:
503b17dd22SKrzysztof Kozlowski      ADC interrupt followed by optional touchscreen interrupt.
513b17dd22SKrzysztof Kozlowski    minItems: 1
523b17dd22SKrzysztof Kozlowski    maxItems: 2
53b356ceb3SKrzysztof Kozlowski
54b356ceb3SKrzysztof Kozlowski  "#io-channel-cells":
55b356ceb3SKrzysztof Kozlowski    const: 1
56b356ceb3SKrzysztof Kozlowski
57f3dde260SRob Herring  vdd-supply: true
58b356ceb3SKrzysztof Kozlowski
59b356ceb3SKrzysztof Kozlowski  samsung,syscon-phandle:
6034d1e754SKrzysztof Kozlowski    $ref: /schemas/types.yaml#/definitions/phandle
61b356ceb3SKrzysztof Kozlowski    description:
62b356ceb3SKrzysztof Kozlowski      Phandle to the PMU system controller node (to access the ADC_PHY
639dacf8b5SKrzysztof Kozlowski      register on Exynos3250/4x12/5250/5420/5800).
64b356ceb3SKrzysztof Kozlowski
65b356ceb3SKrzysztof Kozlowski  has-touchscreen:
66b356ceb3SKrzysztof Kozlowski    description:
67b356ceb3SKrzysztof Kozlowski      If present, indicates that a touchscreen is connected and usable.
68b356ceb3SKrzysztof Kozlowski    type: boolean
69b356ceb3SKrzysztof Kozlowski
70b356ceb3SKrzysztof Kozlowskirequired:
71b356ceb3SKrzysztof Kozlowski  - compatible
72b356ceb3SKrzysztof Kozlowski  - reg
73b356ceb3SKrzysztof Kozlowski  - clocks
74b356ceb3SKrzysztof Kozlowski  - clock-names
75b356ceb3SKrzysztof Kozlowski  - interrupts
76b356ceb3SKrzysztof Kozlowski  - "#io-channel-cells"
77b356ceb3SKrzysztof Kozlowski  - vdd-supply
78b356ceb3SKrzysztof Kozlowski
796a0e321eSRob HerringadditionalProperties:
806a0e321eSRob Herring  type: object
816a0e321eSRob Herring
82b356ceb3SKrzysztof KozlowskiallOf:
83b356ceb3SKrzysztof Kozlowski  - if:
84b356ceb3SKrzysztof Kozlowski      properties:
85b356ceb3SKrzysztof Kozlowski        compatible:
86b356ceb3SKrzysztof Kozlowski          contains:
87b356ceb3SKrzysztof Kozlowski            enum:
88b356ceb3SKrzysztof Kozlowski              - samsung,exynos-adc-v1
89b356ceb3SKrzysztof Kozlowski              - samsung,exynos-adc-v2
90b356ceb3SKrzysztof Kozlowski              - samsung,exynos3250-adc
91b356ceb3SKrzysztof Kozlowski              - samsung,exynos4212-adc
92b356ceb3SKrzysztof Kozlowski    then:
93b356ceb3SKrzysztof Kozlowski      required:
94b356ceb3SKrzysztof Kozlowski        - samsung,syscon-phandle
95b356ceb3SKrzysztof Kozlowski
96b356ceb3SKrzysztof Kozlowski  - if:
97b356ceb3SKrzysztof Kozlowski      properties:
98b356ceb3SKrzysztof Kozlowski        compatible:
99b356ceb3SKrzysztof Kozlowski          contains:
100b356ceb3SKrzysztof Kozlowski            enum:
101b356ceb3SKrzysztof Kozlowski              - samsung,exynos3250-adc
102b356ceb3SKrzysztof Kozlowski    then:
103b356ceb3SKrzysztof Kozlowski      properties:
104b356ceb3SKrzysztof Kozlowski        clocks:
105b356ceb3SKrzysztof Kozlowski          minItems: 2
106b356ceb3SKrzysztof Kozlowski          maxItems: 2
107b356ceb3SKrzysztof Kozlowski        clock-names:
108b356ceb3SKrzysztof Kozlowski          items:
109b356ceb3SKrzysztof Kozlowski            - const: adc
110b356ceb3SKrzysztof Kozlowski            - const: sclk
111b356ceb3SKrzysztof Kozlowski    else:
112b356ceb3SKrzysztof Kozlowski      properties:
113b356ceb3SKrzysztof Kozlowski        clocks:
114b356ceb3SKrzysztof Kozlowski          minItems: 1
115b356ceb3SKrzysztof Kozlowski          maxItems: 1
116b356ceb3SKrzysztof Kozlowski        clock-names:
117b356ceb3SKrzysztof Kozlowski          items:
118b356ceb3SKrzysztof Kozlowski            - const: adc
119b356ceb3SKrzysztof Kozlowski
1203b17dd22SKrzysztof Kozlowski  - if:
1213b17dd22SKrzysztof Kozlowski      required:
1223b17dd22SKrzysztof Kozlowski        - has-touchscreen
1233b17dd22SKrzysztof Kozlowski    then:
1243b17dd22SKrzysztof Kozlowski      properties:
1253b17dd22SKrzysztof Kozlowski        interrupts:
1263b17dd22SKrzysztof Kozlowski          minItems: 2
1273b17dd22SKrzysztof Kozlowski          maxItems: 2
1283b17dd22SKrzysztof Kozlowski
129b356ceb3SKrzysztof Kozlowskiexamples:
130b356ceb3SKrzysztof Kozlowski  - |
131b356ceb3SKrzysztof Kozlowski    adc: adc@12d10000 {
132b356ceb3SKrzysztof Kozlowski        compatible = "samsung,exynos-adc-v1";
133b356ceb3SKrzysztof Kozlowski        reg = <0x12d10000 0x100>;
134b356ceb3SKrzysztof Kozlowski        interrupts = <0 106 0>;
135b356ceb3SKrzysztof Kozlowski        #io-channel-cells = <1>;
136b356ceb3SKrzysztof Kozlowski
137b356ceb3SKrzysztof Kozlowski        clocks = <&clock 303>;
138b356ceb3SKrzysztof Kozlowski        clock-names = "adc";
139b356ceb3SKrzysztof Kozlowski
140b356ceb3SKrzysztof Kozlowski        vdd-supply = <&buck5_reg>;
141b356ceb3SKrzysztof Kozlowski        samsung,syscon-phandle = <&pmu_system_controller>;
142b356ceb3SKrzysztof Kozlowski
143b356ceb3SKrzysztof Kozlowski        /* NTC thermistor is a hwmon device */
144cc5faf26SGeert Uytterhoeven        thermistor {
145b356ceb3SKrzysztof Kozlowski            compatible = "murata,ncp15wb473";
146b356ceb3SKrzysztof Kozlowski            pullup-uv = <1800000>;
147b356ceb3SKrzysztof Kozlowski            pullup-ohm = <47000>;
148b356ceb3SKrzysztof Kozlowski            pulldown-ohm = <0>;
149b356ceb3SKrzysztof Kozlowski            io-channels = <&adc 4>;
150b356ceb3SKrzysztof Kozlowski        };
151b356ceb3SKrzysztof Kozlowski    };
152b356ceb3SKrzysztof Kozlowski
153b356ceb3SKrzysztof Kozlowski  - |
1546eda6f6dSKrzysztof Kozlowski    #include <dt-bindings/clock/exynos3250.h>
1556eda6f6dSKrzysztof Kozlowski
156b356ceb3SKrzysztof Kozlowski    adc@126c0000 {
157b356ceb3SKrzysztof Kozlowski        compatible = "samsung,exynos3250-adc";
15857b73eb9SKrzysztof Kozlowski        reg = <0x126c0000 0x100>;
159b356ceb3SKrzysztof Kozlowski        interrupts = <0 137 0>;
160b356ceb3SKrzysztof Kozlowski        #io-channel-cells = <1>;
161b356ceb3SKrzysztof Kozlowski
1626eda6f6dSKrzysztof Kozlowski        clocks = <&cmu CLK_TSADC>,
1636eda6f6dSKrzysztof Kozlowski                 <&cmu CLK_SCLK_TSADC>;
164b356ceb3SKrzysztof Kozlowski        clock-names = "adc", "sclk";
165b356ceb3SKrzysztof Kozlowski
166b356ceb3SKrzysztof Kozlowski        vdd-supply = <&buck5_reg>;
167b356ceb3SKrzysztof Kozlowski        samsung,syscon-phandle = <&pmu_system_controller>;
168b356ceb3SKrzysztof Kozlowski    };
169