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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/atmel,sama9260-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AT91 sama9260 and similar Analog to Digital Converter (ADC)
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>
properties:
compatible:
enum:
- atmel,at91sam9260-adc
- atmel,at91sam9rl-adc
- atmel,at91sam9g45-adc
- atmel,at91sam9x5-adc
- atmel,at91sama5d3-adc
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
minItems: 2
maxItems: 2
clock-names:
items:
- const: adc_clk
- const: adc_op_clk
atmel,adc-channels-used:
$ref: /schemas/types.yaml#/definitions/uint32
description: Bitmask of the channels muxed and enabled for this device
atmel,adc-startup-time:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Startup Time of the ADC in microseconds as defined in the datasheet
atmel,adc-vref:
$ref: /schemas/types.yaml#/definitions/uint32
description: Reference voltage in millivolts for the conversions
atmel,adc-use-external-triggers:
$ref: /schemas/types.yaml#/definitions/flag
description: Enable the external triggers
atmel,adc-use-res:
$ref: /schemas/types.yaml#/definitions/string
description:
String corresponding to an identifier from atmel,adc-res-names property.
If not specified, the highest resolution will be used.
enum:
- "lowres"
- "highres"
atmel,adc-sleep-mode:
$ref: /schemas/types.yaml#/definitions/flag
description: Enable sleep mode when no conversion
atmel,adc-sample-hold-time:
$ref: /schemas/types.yaml#/definitions/uint32
description: Sample and Hold Time in microseconds
atmel,adc-ts-wires:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Number of touchscreen wires. Must be set to enable touchscreen.
NOTE: when adc touchscreen is enabled, the adc hardware trigger will be
disabled. Since touchscreen will occupy the trigger register.
enum:
- 4
- 5
atmel,adc-ts-pressure-threshold:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Pressure threshold for touchscreen.
"#io-channel-cells":
const: 1
additionalProperties: false
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- atmel,adc-channels-used
- atmel,adc-startup-time
- atmel,adc-vref
patternProperties:
"^(trigger)[0-9]$":
type: object
description: Child node to describe a trigger exposed to the user.
properties:
trigger-name:
$ref: /schemas/types.yaml#/definitions/string
description: Identifying name.
trigger-value:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Value to put in the Trigger register to activate this trigger
trigger-external:
$ref: /schemas/types.yaml#/definitions/flag
description: This trigger is provided from an external pin.
additionalProperties: false
required:
- trigger-name
- trigger-value
examples:
- |
#include <dt-bindings/dma/at91.h>
#include <dt-bindings/interrupt-controller/irq.h>
soc {
#address-cells = <1>;
#size-cells = <1>;
adc@fffb0000 {
compatible = "atmel,at91sam9260-adc";
reg = <0xfffb0000 0x100>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&adc_clk>, <&adc_op_clk>;
clock-names = "adc_clk", "adc_op_clk";
atmel,adc-channels-used = <0xff>;
atmel,adc-startup-time = <40>;
atmel,adc-use-external-triggers;
atmel,adc-vref = <3300>;
atmel,adc-use-res = "lowres";
trigger0 {
trigger-name = "external-rising";
trigger-value = <0x1>;
trigger-external;
};
trigger1 {
trigger-name = "external-falling";
trigger-value = <0x2>;
trigger-external;
};
trigger2 {
trigger-name = "external-any";
trigger-value = <0x3>;
trigger-external;
};
trigger3 {
trigger-name = "continuous";
trigger-value = <0x6>;
};
};
};
...
|