1# Copyright (c) 2020 Vestas Wind Systems A/S
2# Copyright (c) 2024 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5description: |
6  NXP Kinetis ACMP (Analog CoMParator)
7
8  The following example displays the minimum node layout:
9
10    acmp0: acmp@deadbeef {
11            compatible = "nxp,kinetis-acmp";
12            reg = <0xdeadbeef 0x1000>;
13            interrupts = <0 0>;
14            clocks = <&scg KINETIS_SCG_BUS_CLK>;
15            status = "disabled";
16    };
17
18  Enabling the comparator node requires setting the minimum default
19  configuration of the comparator. This includes selecting the
20  positive and negative inputs, and routing them using pinctrl:
21
22    &pinctrl {
23            acmp0_default: acmp0_default {
24                    group0 {
25                            ...
26                    };
27            };
28    };
29
30    &acmp0 {
31            status = "okay";
32            pinctrl-0 = <&acmp0_default>;
33            pinctrl-names = "default";
34
35            positive-mux-input = "IN0";
36            negative-mux-input = "IN1";
37    };
38
39compatible: "nxp,kinetis-acmp"
40
41include:
42  - base.yaml
43  - pinctrl-device.yaml
44
45properties:
46  interrupts:
47    required: true
48
49  reg:
50    required: true
51
52  nxp,enable-output-pin:
53    type: boolean
54    deprecated: true
55    description: Deprecated. Please use enable-pin-out instead
56
57  nxp,use-unfiltered-output:
58    type: boolean
59    deprecated: true
60    description: Deprecated. Please use use-unfiltered-output instead
61
62  nxp,high-speed-mode:
63    type: boolean
64    deprecated: true
65    description: Deprecated. Please use enable-high-speed-mode instead
66
67  nxp,enable-sample:
68    type: boolean
69    deprecated: true
70    description: Deprecated. Please use filter-enable-sample instead
71
72  nxp,filter-count:
73    type: int
74    deprecated: true
75    description: Deprecated. Please use filter-count instead
76
77  nxp,filter-period:
78    type: int
79    deprecated: true
80    description: Deprecated. Please use filter-period instead
81
82  nxp,window-mode:
83    type: boolean
84    deprecated: true
85    description: Deprecated. Please use enable-window-mode instead
86
87  offset-mode:
88    type: string
89    enum:
90      - "LEVEL0"
91      - "LEVEL1"
92
93  hysteresis-mode:
94    type: string
95    enum:
96      - "LEVEL0"
97      - "LEVEL1"
98      - "LEVEL2"
99      - "LEVEL3"
100
101  enable-high-speed-mode:
102    type: boolean
103
104  invert-output:
105    type: boolean
106
107  use-unfiltered-output:
108    type: boolean
109
110  enable-pin-out:
111    type: boolean
112
113  enable-window-mode:
114    type: boolean
115
116  positive-mux-input:
117    type: string
118    enum:
119      - IN0
120      - IN1
121      - IN2
122      - IN3
123      - IN4
124      - IN5
125      - IN6
126      - IN7
127
128  negative-mux-input:
129    type: string
130    enum:
131      - IN0
132      - IN1
133      - IN2
134      - IN3
135      - IN4
136      - IN5
137      - IN6
138      - IN7
139
140  positive-port-input:
141    type: string
142    enum:
143      - DAC
144      - MUX
145
146  negative-port-input:
147    type: string
148    enum:
149      - DAC
150      - MUX
151
152  filter-enable-sample:
153    type: boolean
154
155  filter-count:
156    type: int
157    description: Filter sample count (0 to 7).
158
159  filter-period:
160    type: int
161    description: Filter sample period in bus clock cycles (0 to 255).
162
163  dac-vref-source:
164    type: string
165    enum:
166      - "VIN1"
167      - "VIN2"
168
169  dac-value:
170    type: int
171
172  dac-enable:
173    type: boolean
174
175  dac-enable-high-speed:
176    type: boolean
177
178  discrete-mode-enable-positive-channel:
179    type: boolean
180
181  discrete-mode-enable-negative-channel:
182    type: boolean
183
184  discrete-mode-enable-resistor-divider:
185    type: boolean
186
187  discrete-mode-clock-source:
188    type: string
189    enum:
190      - "SLOW"
191      - "FAST"
192
193  discrete-mode-sample-time:
194    type: string
195    enum:
196      - "T1"
197      - "T2"
198      - "T4"
199      - "T8"
200      - "T16"
201      - "T32"
202      - "T64"
203      - "T256"
204
205  discrete-mode-phase1-time:
206    type: string
207    enum:
208      - "ALT0"
209      - "ALT1"
210      - "ALT2"
211      - "ALT3"
212      - "ALT4"
213      - "ALT5"
214      - "ALT6"
215      - "ALT7"
216
217  discrete-mode-phase2-time:
218    type: string
219    enum:
220      - "ALT0"
221      - "ALT1"
222      - "ALT2"
223      - "ALT3"
224      - "ALT4"
225      - "ALT5"
226      - "ALT6"
227      - "ALT7"
228