xref: /freebsd/sys/contrib/device-tree/Bindings/iio/adc/ti,ads7924.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*cb7aa33aSEmmanuel Vadot%YAML 1.2
3*cb7aa33aSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/ti,ads7924.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: TI ADS7924 4 channels 12 bits I2C analog to digital converter
8*cb7aa33aSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadotmaintainers:
10*cb7aa33aSEmmanuel Vadot  - Hugo Villeneuve <hvilleneuve@dimonoff.com>
11*cb7aa33aSEmmanuel Vadot
12*cb7aa33aSEmmanuel Vadotdescription: |
13*cb7aa33aSEmmanuel Vadot  Texas Instruments ADS7924 4 channels 12 bits I2C analog to digital converter
14*cb7aa33aSEmmanuel Vadot
15*cb7aa33aSEmmanuel Vadot  Specifications:
16*cb7aa33aSEmmanuel Vadot    https://www.ti.com/lit/gpn/ads7924
17*cb7aa33aSEmmanuel Vadot
18*cb7aa33aSEmmanuel Vadotproperties:
19*cb7aa33aSEmmanuel Vadot  compatible:
20*cb7aa33aSEmmanuel Vadot    const: ti,ads7924
21*cb7aa33aSEmmanuel Vadot
22*cb7aa33aSEmmanuel Vadot  reg:
23*cb7aa33aSEmmanuel Vadot    maxItems: 1
24*cb7aa33aSEmmanuel Vadot
25*cb7aa33aSEmmanuel Vadot  vref-supply:
26*cb7aa33aSEmmanuel Vadot    description:
27*cb7aa33aSEmmanuel Vadot      The regulator supply for the ADC reference voltage (AVDD)
28*cb7aa33aSEmmanuel Vadot
29*cb7aa33aSEmmanuel Vadot  reset-gpios:
30*cb7aa33aSEmmanuel Vadot    maxItems: 1
31*cb7aa33aSEmmanuel Vadot
32*cb7aa33aSEmmanuel Vadot  interrupts:
33*cb7aa33aSEmmanuel Vadot    maxItems: 1
34*cb7aa33aSEmmanuel Vadot
35*cb7aa33aSEmmanuel Vadot  "#address-cells":
36*cb7aa33aSEmmanuel Vadot    const: 1
37*cb7aa33aSEmmanuel Vadot
38*cb7aa33aSEmmanuel Vadot  "#size-cells":
39*cb7aa33aSEmmanuel Vadot    const: 0
40*cb7aa33aSEmmanuel Vadot
41*cb7aa33aSEmmanuel Vadot  "#io-channel-cells":
42*cb7aa33aSEmmanuel Vadot    const: 1
43*cb7aa33aSEmmanuel Vadot
44*cb7aa33aSEmmanuel VadotpatternProperties:
45*cb7aa33aSEmmanuel Vadot  "^channel@[0-3]+$":
46*cb7aa33aSEmmanuel Vadot    $ref: adc.yaml
47*cb7aa33aSEmmanuel Vadot
48*cb7aa33aSEmmanuel Vadot    description: |
49*cb7aa33aSEmmanuel Vadot      Represents the external channels which are connected to the ADC.
50*cb7aa33aSEmmanuel Vadot
51*cb7aa33aSEmmanuel Vadot    properties:
52*cb7aa33aSEmmanuel Vadot      reg:
53*cb7aa33aSEmmanuel Vadot        description: |
54*cb7aa33aSEmmanuel Vadot          The channel number. It can have up to 4 channels numbered from 0 to 3.
55*cb7aa33aSEmmanuel Vadot        items:
56*cb7aa33aSEmmanuel Vadot          - minimum: 0
57*cb7aa33aSEmmanuel Vadot            maximum: 3
58*cb7aa33aSEmmanuel Vadot
59*cb7aa33aSEmmanuel Vadot      label: true
60*cb7aa33aSEmmanuel Vadot
61*cb7aa33aSEmmanuel Vadot    required:
62*cb7aa33aSEmmanuel Vadot      - reg
63*cb7aa33aSEmmanuel Vadot
64*cb7aa33aSEmmanuel Vadot    additionalProperties: false
65*cb7aa33aSEmmanuel Vadot
66*cb7aa33aSEmmanuel VadotadditionalProperties: false
67*cb7aa33aSEmmanuel Vadot
68*cb7aa33aSEmmanuel Vadotrequired:
69*cb7aa33aSEmmanuel Vadot  - compatible
70*cb7aa33aSEmmanuel Vadot  - reg
71*cb7aa33aSEmmanuel Vadot  - vref-supply
72*cb7aa33aSEmmanuel Vadot  - "#address-cells"
73*cb7aa33aSEmmanuel Vadot  - "#size-cells"
74*cb7aa33aSEmmanuel Vadot
75*cb7aa33aSEmmanuel Vadotexamples:
76*cb7aa33aSEmmanuel Vadot  - |
77*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
78*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
79*cb7aa33aSEmmanuel Vadot    i2c {
80*cb7aa33aSEmmanuel Vadot        #address-cells = <1>;
81*cb7aa33aSEmmanuel Vadot        #size-cells = <0>;
82*cb7aa33aSEmmanuel Vadot
83*cb7aa33aSEmmanuel Vadot        adc@48 {
84*cb7aa33aSEmmanuel Vadot            compatible = "ti,ads7924";
85*cb7aa33aSEmmanuel Vadot            reg = <0x48>;
86*cb7aa33aSEmmanuel Vadot            vref-supply = <&ads7924_reg>;
87*cb7aa33aSEmmanuel Vadot            reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
88*cb7aa33aSEmmanuel Vadot            interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
89*cb7aa33aSEmmanuel Vadot            interrupt-parent = <&gpio>;
90*cb7aa33aSEmmanuel Vadot            #address-cells = <1>;
91*cb7aa33aSEmmanuel Vadot            #size-cells = <0>;
92*cb7aa33aSEmmanuel Vadot            channel@0 {
93*cb7aa33aSEmmanuel Vadot                reg = <0>;
94*cb7aa33aSEmmanuel Vadot                label = "CH0";
95*cb7aa33aSEmmanuel Vadot            };
96*cb7aa33aSEmmanuel Vadot            channel@1 {
97*cb7aa33aSEmmanuel Vadot                reg = <1>;
98*cb7aa33aSEmmanuel Vadot                label = "CH1";
99*cb7aa33aSEmmanuel Vadot            };
100*cb7aa33aSEmmanuel Vadot            channel@2 {
101*cb7aa33aSEmmanuel Vadot                reg = <2>;
102*cb7aa33aSEmmanuel Vadot                label = "CH2";
103*cb7aa33aSEmmanuel Vadot            };
104*cb7aa33aSEmmanuel Vadot            channel@3 {
105*cb7aa33aSEmmanuel Vadot                reg = <3>;
106*cb7aa33aSEmmanuel Vadot                label = "CH3";
107*cb7aa33aSEmmanuel Vadot            };
108*cb7aa33aSEmmanuel Vadot        };
109*cb7aa33aSEmmanuel Vadot    };
110*cb7aa33aSEmmanuel Vadot...
111