0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/atmel,sama9260-adc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: AT91 sama9260 and similar Analog to Digital Converter (ADC)
0008
0009 maintainers:
0010 - Alexandre Belloni <alexandre.belloni@bootlin.com>
0011
0012 properties:
0013 compatible:
0014 enum:
0015 - atmel,at91sam9260-adc
0016 - atmel,at91sam9rl-adc
0017 - atmel,at91sam9g45-adc
0018 - atmel,at91sam9x5-adc
0019 - atmel,at91sama5d3-adc
0020
0021 reg:
0022 maxItems: 1
0023
0024 interrupts:
0025 maxItems: 1
0026
0027 clocks:
0028 minItems: 2
0029 maxItems: 2
0030
0031 clock-names:
0032 items:
0033 - const: adc_clk
0034 - const: adc_op_clk
0035
0036 atmel,adc-channels-used:
0037 $ref: /schemas/types.yaml#/definitions/uint32
0038 description: Bitmask of the channels muxed and enabled for this device
0039
0040 atmel,adc-startup-time:
0041 $ref: /schemas/types.yaml#/definitions/uint32
0042 description:
0043 Startup Time of the ADC in microseconds as defined in the datasheet
0044
0045 atmel,adc-vref:
0046 $ref: /schemas/types.yaml#/definitions/uint32
0047 description: Reference voltage in millivolts for the conversions
0048
0049 atmel,adc-use-external-triggers:
0050 $ref: /schemas/types.yaml#/definitions/flag
0051 description: Enable the external triggers
0052
0053 atmel,adc-use-res:
0054 $ref: /schemas/types.yaml#/definitions/string
0055 description:
0056 String corresponding to an identifier from atmel,adc-res-names property.
0057 If not specified, the highest resolution will be used.
0058 enum:
0059 - "lowres"
0060 - "highres"
0061
0062 atmel,adc-sleep-mode:
0063 $ref: /schemas/types.yaml#/definitions/flag
0064 description: Enable sleep mode when no conversion
0065
0066 atmel,adc-sample-hold-time:
0067 $ref: /schemas/types.yaml#/definitions/uint32
0068 description: Sample and Hold Time in microseconds
0069
0070 atmel,adc-ts-wires:
0071 $ref: /schemas/types.yaml#/definitions/uint32
0072 description: |
0073 Number of touchscreen wires. Must be set to enable touchscreen.
0074 NOTE: when adc touchscreen is enabled, the adc hardware trigger will be
0075 disabled. Since touchscreen will occupy the trigger register.
0076 enum:
0077 - 4
0078 - 5
0079
0080 atmel,adc-ts-pressure-threshold:
0081 $ref: /schemas/types.yaml#/definitions/uint32
0082 description:
0083 Pressure threshold for touchscreen.
0084
0085 "#io-channel-cells":
0086 const: 1
0087
0088 additionalProperties: false
0089
0090 required:
0091 - compatible
0092 - reg
0093 - interrupts
0094 - clocks
0095 - clock-names
0096 - atmel,adc-channels-used
0097 - atmel,adc-startup-time
0098 - atmel,adc-vref
0099
0100 examples:
0101 - |
0102 #include <dt-bindings/dma/at91.h>
0103 #include <dt-bindings/interrupt-controller/irq.h>
0104 soc {
0105 #address-cells = <1>;
0106 #size-cells = <1>;
0107
0108 adc@fffb0000 {
0109 compatible = "atmel,at91sam9260-adc";
0110 reg = <0xfffb0000 0x100>;
0111 interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
0112 clocks = <&adc_clk>, <&adc_op_clk>;
0113 clock-names = "adc_clk", "adc_op_clk";
0114 atmel,adc-channels-used = <0xff>;
0115 atmel,adc-startup-time = <40>;
0116 atmel,adc-use-external-triggers;
0117 atmel,adc-vref = <3300>;
0118 atmel,adc-use-res = "lowres";
0119 };
0120 };
0121 ...