18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/iio/adc/fsl,imx25-gcq.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: Freescale ADC GCQ device
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cidescription:
108c2ecf20Sopenharmony_ci  This is a generic conversion queue device that can convert any of the
118c2ecf20Sopenharmony_ci  analog inputs using the ADC unit of the i.MX25.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cimaintainers:
148c2ecf20Sopenharmony_ci  - Jonathan Cameron <jic23@kernel.org>
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciproperties:
178c2ecf20Sopenharmony_ci  compatible:
188c2ecf20Sopenharmony_ci    const: fsl,imx25-gcq
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci  reg:
218c2ecf20Sopenharmony_ci    maxItems: 1
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci  interrupts:
248c2ecf20Sopenharmony_ci    maxItems: 1
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci  vref-ext-supply:
278c2ecf20Sopenharmony_ci    description:
288c2ecf20Sopenharmony_ci      The regulator supplying the ADC reference voltage.
298c2ecf20Sopenharmony_ci      Required when at least one subnode uses the this reference.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci  vref-xp-supply:
328c2ecf20Sopenharmony_ci    description:
338c2ecf20Sopenharmony_ci      The regulator supplying the ADC reference voltage on pin XP.
348c2ecf20Sopenharmony_ci      Required when at least one subnode uses this reference.
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci  vref-yp-supply:
378c2ecf20Sopenharmony_ci    description:
388c2ecf20Sopenharmony_ci      The regulator supplying the ADC reference voltage on pin YP.
398c2ecf20Sopenharmony_ci      Required when at least one subnode uses this reference.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci  "#io-channel-cells":
428c2ecf20Sopenharmony_ci    const: 1
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci  "#address-cells":
458c2ecf20Sopenharmony_ci    const: 1
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci  "#size-cells":
488c2ecf20Sopenharmony_ci    const: 0
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_cirequired:
518c2ecf20Sopenharmony_ci  - compatible
528c2ecf20Sopenharmony_ci  - reg
538c2ecf20Sopenharmony_ci  - interrupts
548c2ecf20Sopenharmony_ci  - "#address-cells"
558c2ecf20Sopenharmony_ci  - "#size-cells"
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_cipatternProperties:
588c2ecf20Sopenharmony_ci  "[a-z][a-z0-9]+@[0-9a-f]+$":
598c2ecf20Sopenharmony_ci    type: object
608c2ecf20Sopenharmony_ci    description:
618c2ecf20Sopenharmony_ci      Child nodes used to define the reference voltages used for each channel
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci    properties:
648c2ecf20Sopenharmony_ci      reg:
658c2ecf20Sopenharmony_ci        description: |
668c2ecf20Sopenharmony_ci          Number of the analog input.
678c2ecf20Sopenharmony_ci          0: xp
688c2ecf20Sopenharmony_ci          1: yp
698c2ecf20Sopenharmony_ci          2: xn
708c2ecf20Sopenharmony_ci          3: yn
718c2ecf20Sopenharmony_ci          4: wiper
728c2ecf20Sopenharmony_ci          5: inaux0
738c2ecf20Sopenharmony_ci          6: inaux1
748c2ecf20Sopenharmony_ci          7: inaux2
758c2ecf20Sopenharmony_ci        items:
768c2ecf20Sopenharmony_ci          - minimum: 0
778c2ecf20Sopenharmony_ci            maximum: 7
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci      fsl,adc-refp:
808c2ecf20Sopenharmony_ci        $ref: /schemas/types.yaml#/definitions/uint32
818c2ecf20Sopenharmony_ci        description: |
828c2ecf20Sopenharmony_ci          Specifies the positive reference input as defined in
838c2ecf20Sopenharmony_ci          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
848c2ecf20Sopenharmony_ci          0: YP voltage reference
858c2ecf20Sopenharmony_ci          1: XP voltage reference
868c2ecf20Sopenharmony_ci          2: External voltage reference
878c2ecf20Sopenharmony_ci          3: Internal voltage reference (default)
888c2ecf20Sopenharmony_ci        minimum: 0
898c2ecf20Sopenharmony_ci        maximum: 3
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci      fsl,adc-refn:
928c2ecf20Sopenharmony_ci        $ref: /schemas/types.yaml#/definitions/uint32
938c2ecf20Sopenharmony_ci        description: |
948c2ecf20Sopenharmony_ci          Specifies the negative reference input as defined in
958c2ecf20Sopenharmony_ci          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
968c2ecf20Sopenharmony_ci          0: XN ground reference
978c2ecf20Sopenharmony_ci          1: YN ground reference
988c2ecf20Sopenharmony_ci          2: Internal ground reference
998c2ecf20Sopenharmony_ci          3: External ground reference (default)
1008c2ecf20Sopenharmony_ci        minimum: 0
1018c2ecf20Sopenharmony_ci        maximum: 3
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci    required:
1048c2ecf20Sopenharmony_ci      - reg
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci    additionalProperties: false
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ciadditionalProperties: false
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ciexamples:
1118c2ecf20Sopenharmony_ci  - |
1128c2ecf20Sopenharmony_ci    #include <dt-bindings/iio/adc/fsl-imx25-gcq.h>
1138c2ecf20Sopenharmony_ci    soc {
1148c2ecf20Sopenharmony_ci        #address-cells = <1>;
1158c2ecf20Sopenharmony_ci        #size-cells = <1>;
1168c2ecf20Sopenharmony_ci        adc@50030800 {
1178c2ecf20Sopenharmony_ci            compatible = "fsl,imx25-gcq";
1188c2ecf20Sopenharmony_ci            reg = <0x50030800 0x60>;
1198c2ecf20Sopenharmony_ci            interrupt-parent = <&tscadc>;
1208c2ecf20Sopenharmony_ci            interrupts = <1>;
1218c2ecf20Sopenharmony_ci            #address-cells = <1>;
1228c2ecf20Sopenharmony_ci            #size-cells = <0>;
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci            inaux@5 {
1258c2ecf20Sopenharmony_ci                reg = <5>;
1268c2ecf20Sopenharmony_ci                fsl,adc-refp = <MX25_ADC_REFP_INT>;
1278c2ecf20Sopenharmony_ci                fsl,adc-refn = <MX25_ADC_REFN_NGND>;
1288c2ecf20Sopenharmony_ci            };
1298c2ecf20Sopenharmony_ci        };
1308c2ecf20Sopenharmony_ci    };
1318c2ecf20Sopenharmony_ci...
132