0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/ti,tsc2046.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Texas Instruments TSC2046 touch screen controller.
0008
0009 maintainers:
0010 - Oleksij Rempel <o.rempel@pengutronix.de>
0011
0012 description: |
0013 TSC2046 is a touch screen controller with 8 channels ADC.
0014
0015 properties:
0016 compatible:
0017 enum:
0018 - ti,tsc2046e-adc
0019
0020 reg:
0021 maxItems: 1
0022
0023 interrupts:
0024 maxItems: 1
0025
0026 spi-max-frequency: true
0027
0028 "#io-channel-cells":
0029 const: 1
0030
0031 '#address-cells':
0032 const: 1
0033
0034 '#size-cells':
0035 const: 0
0036
0037 required:
0038 - compatible
0039 - reg
0040
0041 patternProperties:
0042 "^channel@[0-7]$":
0043 $ref: "adc.yaml"
0044 type: object
0045
0046 properties:
0047 reg:
0048 description: |
0049 The channel number. It can have up to 8 channels
0050 items:
0051 minimum: 0
0052 maximum: 7
0053
0054 settling-time-us: true
0055 oversampling-ratio: true
0056
0057 required:
0058 - reg
0059
0060 additionalProperties: false
0061
0062 additionalProperties: false
0063
0064 examples:
0065 - |
0066 #include <dt-bindings/interrupt-controller/irq.h>
0067 spi {
0068 #address-cells = <1>;
0069 #size-cells = <0>;
0070
0071 adc@0 {
0072 compatible = "ti,tsc2046e-adc";
0073 reg = <0>;
0074 spi-max-frequency = <1000000>;
0075 interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
0076 #io-channel-cells = <1>;
0077
0078 #address-cells = <1>;
0079 #size-cells = <0>;
0080
0081 channel@0 {
0082 reg = <0>;
0083 };
0084 channel@1 {
0085 reg = <1>;
0086 settling-time-us = <700>;
0087 oversampling-ratio = <5>;
0088 };
0089 channel@2 {
0090 reg = <2>;
0091 };
0092 channel@3 {
0093 reg = <3>;
0094 settling-time-us = <700>;
0095 oversampling-ratio = <5>;
0096 };
0097 channel@4 {
0098 reg = <4>;
0099 settling-time-us = <700>;
0100 oversampling-ratio = <5>;
0101 };
0102 channel@5 {
0103 reg = <5>;
0104 settling-time-us = <700>;
0105 oversampling-ratio = <5>;
0106 };
0107 channel@6 {
0108 reg = <6>;
0109 };
0110 channel@7 {
0111 reg = <7>;
0112 };
0113 };
0114 };
0115 ...