1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/mxs-lradc.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Freescale MXS Low-Resolution ADC (LRADC) 8 9maintainers: 10 - Dario Binacchi <dario.binacchi@amarulasolutions.com> 11 12description: 13 The LRADC provides 16 physical channels of 12-bit resolution for 14 analog-to-digital conversion and includes an integrated 4-wire/5-wire 15 touchscreen controller. 16 17properties: 18 compatible: 19 items: 20 - enum: 21 - fsl,imx23-lradc 22 - fsl,imx28-lradc 23 24 reg: 25 maxItems: 1 26 27 clocks: 28 minItems: 1 29 30 interrupts: 31 minItems: 9 32 maxItems: 13 33 34 fsl,lradc-touchscreen-wires: 35 $ref: /schemas/types.yaml#/definitions/uint32 36 enum: [4, 5] 37 description: > 38 Number of wires used to connect the touchscreen to LRADC. 39 40 If this property is not present, then the touchscreen is disabled. 41 42 fsl,ave-ctrl: 43 $ref: /schemas/types.yaml#/definitions/uint32 44 minimum: 1 45 maximum: 32 46 default: 4 47 description: 48 Number of samples per direction to calculate an average value. 49 50 fsl,ave-delay: 51 $ref: /schemas/types.yaml#/definitions/uint32 52 minimum: 2 53 maximum: 2048 54 default: 2 55 description: > 56 Delay between consecutive samples. 57 58 It is used if 'fsl,ave-ctrl' > 1, counts at 2 kHz and its default value (2) 59 is 1 ms. 60 61 fsl,settling: 62 $ref: /schemas/types.yaml#/definitions/uint32 63 minimum: 1 64 maximum: 2047 65 default: 10 66 description: > 67 Delay between plate switch to next sample. 68 69 It counts at 2 kHz and its default (10) is 5 ms. 70 71 "#io-channel-cells": 72 const: 1 73 74required: 75 - compatible 76 - reg 77 - clocks 78 - interrupts 79 80if: 81 properties: 82 compatible: 83 contains: 84 enum: 85 - fsl,imx23-lradc 86then: 87 properties: 88 interrupts: 89 items: 90 - description: channel 0 91 - description: channel 1 92 - description: channel 2 93 - description: channel 3 94 - description: channel 4 95 - description: channel 5 96 - description: touchscreen 97 - description: channel 6 98 - description: channel 7 99 fsl,lradc-touchscreen-wires: 100 const: 4 101else: 102 properties: 103 interrupts: 104 items: 105 - description: threshold 0 106 - description: threshold 1 107 - description: channel 0 108 - description: channel 1 109 - description: channel 2 110 - description: channel 3 111 - description: channel 4 112 - description: channel 5 113 - description: button 0 114 - description: button 1 115 - description: touchscreen 116 - description: channel 6 117 - description: channel 7 118 119additionalProperties: false 120 121examples: 122 - | 123 lradc@80050000 { 124 compatible = "fsl,imx23-lradc"; 125 reg = <0x80050000 0x2000>; 126 interrupts = <36>, <37>, <38>, <39>, <40>, 127 <41>, <42>, <43>, <44>; 128 clocks = <&clks 26>; 129 #io-channel-cells = <1>; 130 fsl,lradc-touchscreen-wires = <4>; 131 fsl,ave-ctrl = <4>; 132 fsl,ave-delay = <2>; 133 fsl,settling = <10>; 134 }; 135