xref: /freebsd/sys/contrib/device-tree/Bindings/iio/adc/xlnx,zynqmp-ams.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e67e8565SEmmanuel Vadot%YAML 1.2
3e67e8565SEmmanuel Vadot---
4e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/xlnx,zynqmp-ams.yaml#
5e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6e67e8565SEmmanuel Vadot
7e67e8565SEmmanuel Vadottitle: Xilinx Zynq Ultrascale AMS controller
8e67e8565SEmmanuel Vadot
9e67e8565SEmmanuel Vadotmaintainers:
10e67e8565SEmmanuel Vadot  - Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
11e67e8565SEmmanuel Vadot
12e67e8565SEmmanuel Vadotdescription: |
13e67e8565SEmmanuel Vadot  The AMS (Analog Monitoring System) includes an ADC as well as on-chip sensors
14e67e8565SEmmanuel Vadot  that can be used to sample external voltages and monitor on-die operating
15e67e8565SEmmanuel Vadot  conditions, such as temperature and supply voltage levels.
16e67e8565SEmmanuel Vadot  The AMS has two SYSMON blocks which are PL (Programmable Logic) SYSMON and
17e67e8565SEmmanuel Vadot  PS (Processing System) SYSMON.
18e67e8565SEmmanuel Vadot  All designs should have AMS registers, but PS and PL are optional. The
19e67e8565SEmmanuel Vadot  AMS controller can work with only PS, only PL and both PS and PL
20e67e8565SEmmanuel Vadot  configurations. Please specify registers according to your design. Devicetree
21e67e8565SEmmanuel Vadot  should always have AMS module property. Providing PS & PL module is optional.
22e67e8565SEmmanuel Vadot
23e67e8565SEmmanuel Vadot  AMS Channel Details
24e67e8565SEmmanuel Vadot  ```````````````````
25e67e8565SEmmanuel Vadot  Sysmon Block  |Channel|                       Details                                 |Measurement
26e67e8565SEmmanuel Vadot                |Number |                                                               |Type
27e67e8565SEmmanuel Vadot  ---------------------------------------------------------------------------------------------------------
28e67e8565SEmmanuel Vadot  AMS CTRL      |0      |System PLLs voltage measurement, VCC_PSPLL.                    |Voltage
29e67e8565SEmmanuel Vadot                |1      |Battery voltage measurement, VCC_PSBATT.                       |Voltage
30e67e8565SEmmanuel Vadot                |2      |PL Internal voltage measurement, VCCINT.                       |Voltage
31e67e8565SEmmanuel Vadot                |3      |Block RAM voltage measurement, VCCBRAM.                        |Voltage
32e67e8565SEmmanuel Vadot                |4      |PL Aux voltage measurement, VCCAUX.                            |Voltage
33e67e8565SEmmanuel Vadot                |5      |Voltage measurement for six DDR I/O PLLs, VCC_PSDDR_PLL.       |Voltage
34e67e8565SEmmanuel Vadot                |6      |VCC_PSINTFP_DDR voltage measurement.                           |Voltage
35e67e8565SEmmanuel Vadot  ---------------------------------------------------------------------------------------------------------
36e67e8565SEmmanuel Vadot  PS Sysmon     |7      |LPD temperature measurement.                                   |Temperature
37e67e8565SEmmanuel Vadot                |8      |FPD temperature measurement (REMOTE).                          |Temperature
38e67e8565SEmmanuel Vadot                |9      |VCC PS LPD voltage measurement (supply1).                      |Voltage
39e67e8565SEmmanuel Vadot                |10     |VCC PS FPD voltage measurement (supply2).                      |Voltage
40e67e8565SEmmanuel Vadot                |11     |PS Aux voltage reference (supply3).                            |Voltage
41e67e8565SEmmanuel Vadot                |12     |DDR I/O VCC voltage measurement.                               |Voltage
42e67e8565SEmmanuel Vadot                |13     |PS IO Bank 503 voltage measurement (supply5).                  |Voltage
43e67e8565SEmmanuel Vadot                |14     |PS IO Bank 500 voltage measurement (supply6).                  |Voltage
44e67e8565SEmmanuel Vadot                |15     |VCCO_PSIO1 voltage measurement.                                |Voltage
45e67e8565SEmmanuel Vadot                |16     |VCCO_PSIO2 voltage measurement.                                |Voltage
46e67e8565SEmmanuel Vadot                |17     |VCC_PS_GTR voltage measurement (VPS_MGTRAVCC).                 |Voltage
47e67e8565SEmmanuel Vadot                |18     |VTT_PS_GTR voltage measurement (VPS_MGTRAVTT).                 |Voltage
48e67e8565SEmmanuel Vadot                |19     |VCC_PSADC voltage measurement.                                 |Voltage
49e67e8565SEmmanuel Vadot  ---------------------------------------------------------------------------------------------------------
50e67e8565SEmmanuel Vadot  PL Sysmon     |20     |PL temperature measurement.                                    |Temperature
51e67e8565SEmmanuel Vadot                |21     |PL Internal voltage measurement, VCCINT.                       |Voltage
52e67e8565SEmmanuel Vadot                |22     |PL Auxiliary voltage measurement, VCCAUX.                      |Voltage
53e67e8565SEmmanuel Vadot                |23     |ADC Reference P+ voltage measurement.                          |Voltage
54e67e8565SEmmanuel Vadot                |24     |ADC Reference N- voltage measurement.                          |Voltage
55e67e8565SEmmanuel Vadot                |25     |PL Block RAM voltage measurement, VCCBRAM.                     |Voltage
56e67e8565SEmmanuel Vadot                |26     |LPD Internal voltage measurement, VCC_PSINTLP (supply4).       |Voltage
57e67e8565SEmmanuel Vadot                |27     |FPD Internal voltage measurement, VCC_PSINTFP (supply5).       |Voltage
58e67e8565SEmmanuel Vadot                |28     |PS Auxiliary voltage measurement (supply6).                    |Voltage
59e67e8565SEmmanuel Vadot                |29     |PL VCCADC voltage measurement (vccams).                        |Voltage
60*aa1a8ff2SEmmanuel Vadot                |30     |Differential analog input signal voltage measurement.          |Voltage
61e67e8565SEmmanuel Vadot                |31     |VUser0 voltage measurement (supply7).                          |Voltage
62e67e8565SEmmanuel Vadot                |32     |VUser1 voltage measurement (supply8).                          |Voltage
63e67e8565SEmmanuel Vadot                |33     |VUser2 voltage measurement (supply9).                          |Voltage
64e67e8565SEmmanuel Vadot                |34     |VUser3 voltage measurement (supply10).                         |Voltage
65e67e8565SEmmanuel Vadot                |35     |Auxiliary ch 0 voltage measurement (VAux0).                    |Voltage
66e67e8565SEmmanuel Vadot                |36     |Auxiliary ch 1 voltage measurement (VAux1).                    |Voltage
67e67e8565SEmmanuel Vadot                |37     |Auxiliary ch 2 voltage measurement (VAux2).                    |Voltage
68e67e8565SEmmanuel Vadot                |38     |Auxiliary ch 3 voltage measurement (VAux3).                    |Voltage
69e67e8565SEmmanuel Vadot                |39     |Auxiliary ch 4 voltage measurement (VAux4).                    |Voltage
70e67e8565SEmmanuel Vadot                |40     |Auxiliary ch 5 voltage measurement (VAux5).                    |Voltage
71e67e8565SEmmanuel Vadot                |41     |Auxiliary ch 6 voltage measurement (VAux6).                    |Voltage
72e67e8565SEmmanuel Vadot                |42     |Auxiliary ch 7 voltage measurement (VAux7).                    |Voltage
73e67e8565SEmmanuel Vadot                |43     |Auxiliary ch 8 voltage measurement (VAux8).                    |Voltage
74e67e8565SEmmanuel Vadot                |44     |Auxiliary ch 9 voltage measurement (VAux9).                    |Voltage
75e67e8565SEmmanuel Vadot                |45     |Auxiliary ch 10 voltage measurement (VAux10).                  |Voltage
76e67e8565SEmmanuel Vadot                |46     |Auxiliary ch 11 voltage measurement (VAux11).                  |Voltage
77e67e8565SEmmanuel Vadot                |47     |Auxiliary ch 12 voltage measurement (VAux12).                  |Voltage
78e67e8565SEmmanuel Vadot                |48     |Auxiliary ch 13 voltage measurement (VAux13).                  |Voltage
79e67e8565SEmmanuel Vadot                |49     |Auxiliary ch 14 voltage measurement (VAux14).                  |Voltage
80e67e8565SEmmanuel Vadot                |50     |Auxiliary ch 15 voltage measurement (VAux15).                  |Voltage
81e67e8565SEmmanuel Vadot  --------------------------------------------------------------------------------------------------------
82e67e8565SEmmanuel Vadot
83e67e8565SEmmanuel Vadotproperties:
84e67e8565SEmmanuel Vadot  compatible:
85e67e8565SEmmanuel Vadot    enum:
86e67e8565SEmmanuel Vadot      - xlnx,zynqmp-ams
87e67e8565SEmmanuel Vadot
88e67e8565SEmmanuel Vadot  interrupts:
89e67e8565SEmmanuel Vadot    maxItems: 1
90e67e8565SEmmanuel Vadot
91e67e8565SEmmanuel Vadot  reg:
92e67e8565SEmmanuel Vadot    description: AMS Controller register space
93e67e8565SEmmanuel Vadot    maxItems: 1
94e67e8565SEmmanuel Vadot
95c9ccf3a3SEmmanuel Vadot  clocks:
96c9ccf3a3SEmmanuel Vadot    items:
97c9ccf3a3SEmmanuel Vadot      - description: AMS reference clock
98c9ccf3a3SEmmanuel Vadot
99e67e8565SEmmanuel Vadot  ranges:
100e67e8565SEmmanuel Vadot    description:
101e67e8565SEmmanuel Vadot      Maps the child address space for PS and/or PL.
102e67e8565SEmmanuel Vadot    maxItems: 1
103e67e8565SEmmanuel Vadot
104e67e8565SEmmanuel Vadot  '#address-cells':
105e67e8565SEmmanuel Vadot    const: 1
106e67e8565SEmmanuel Vadot
107e67e8565SEmmanuel Vadot  '#size-cells':
108e67e8565SEmmanuel Vadot    const: 1
109e67e8565SEmmanuel Vadot
110e67e8565SEmmanuel Vadot  '#io-channel-cells':
111e67e8565SEmmanuel Vadot    const: 1
112e67e8565SEmmanuel Vadot
113e67e8565SEmmanuel Vadot  ams-ps@0:
114e67e8565SEmmanuel Vadot    type: object
115e67e8565SEmmanuel Vadot    description: |
116e67e8565SEmmanuel Vadot      PS (Processing System) SYSMON is memory mapped to PS. This block has
117e67e8565SEmmanuel Vadot      built-in alarm generation logic that is used to interrupt the processor
118e67e8565SEmmanuel Vadot      based on condition set.
119e67e8565SEmmanuel Vadot
120e67e8565SEmmanuel Vadot    properties:
121e67e8565SEmmanuel Vadot      compatible:
122e67e8565SEmmanuel Vadot        enum:
123e67e8565SEmmanuel Vadot          - xlnx,zynqmp-ams-ps
124e67e8565SEmmanuel Vadot
125e67e8565SEmmanuel Vadot      reg:
126e67e8565SEmmanuel Vadot        description: Register Space for PS-SYSMON
127e67e8565SEmmanuel Vadot        maxItems: 1
128e67e8565SEmmanuel Vadot
129e67e8565SEmmanuel Vadot    required:
130e67e8565SEmmanuel Vadot      - compatible
131e67e8565SEmmanuel Vadot      - reg
132e67e8565SEmmanuel Vadot
133e67e8565SEmmanuel Vadot    additionalProperties: false
134e67e8565SEmmanuel Vadot
135e67e8565SEmmanuel Vadot  ams-pl@400:
136e67e8565SEmmanuel Vadot    type: object
1377ef62cebSEmmanuel Vadot    additionalProperties: false
138e67e8565SEmmanuel Vadot    description:
139e67e8565SEmmanuel Vadot      PL-SYSMON is capable of monitoring off chip voltage and temperature.
140e67e8565SEmmanuel Vadot      PL-SYSMON block has DRP, JTAG and I2C interface to enable monitoring
141e67e8565SEmmanuel Vadot      from external master. Out of this interface currently only DRP is
142e67e8565SEmmanuel Vadot      supported. This block has alarm generation logic that is used to
143e67e8565SEmmanuel Vadot      interrupt the processor based on condition set.
144e67e8565SEmmanuel Vadot
145e67e8565SEmmanuel Vadot    properties:
146e67e8565SEmmanuel Vadot      compatible:
147e67e8565SEmmanuel Vadot        items:
148e67e8565SEmmanuel Vadot          - enum:
149e67e8565SEmmanuel Vadot              - xlnx,zynqmp-ams-pl
150e67e8565SEmmanuel Vadot
151e67e8565SEmmanuel Vadot      reg:
152e67e8565SEmmanuel Vadot        description: Register Space for PL-SYSMON.
153e67e8565SEmmanuel Vadot        maxItems: 1
154e67e8565SEmmanuel Vadot
155e67e8565SEmmanuel Vadot      '#address-cells':
156e67e8565SEmmanuel Vadot        const: 1
157e67e8565SEmmanuel Vadot
158e67e8565SEmmanuel Vadot      '#size-cells':
159e67e8565SEmmanuel Vadot        const: 0
160e67e8565SEmmanuel Vadot
161e67e8565SEmmanuel Vadot    patternProperties:
162e67e8565SEmmanuel Vadot      "^channel@([2-4][0-9]|50)$":
163e67e8565SEmmanuel Vadot        type: object
164e67e8565SEmmanuel Vadot        description:
165e67e8565SEmmanuel Vadot          Describes the external channels connected.
166e67e8565SEmmanuel Vadot
167e67e8565SEmmanuel Vadot        properties:
168e67e8565SEmmanuel Vadot          reg:
169e67e8565SEmmanuel Vadot            description:
170e67e8565SEmmanuel Vadot              Pair of pins the channel is connected to. This value is
171e67e8565SEmmanuel Vadot              same as Channel Number for a particular channel.
172e67e8565SEmmanuel Vadot            minimum: 20
173e67e8565SEmmanuel Vadot            maximum: 50
174e67e8565SEmmanuel Vadot
175e67e8565SEmmanuel Vadot          xlnx,bipolar:
176e67e8565SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/flag
177e67e8565SEmmanuel Vadot            type: boolean
178e67e8565SEmmanuel Vadot            description:
179e67e8565SEmmanuel Vadot              If the set channel is used in bipolar mode.
180e67e8565SEmmanuel Vadot
181e67e8565SEmmanuel Vadot        required:
182e67e8565SEmmanuel Vadot          - reg
183e67e8565SEmmanuel Vadot
184e67e8565SEmmanuel Vadot        additionalProperties: false
185e67e8565SEmmanuel Vadot
186e67e8565SEmmanuel Vadotrequired:
187e67e8565SEmmanuel Vadot  - compatible
188e67e8565SEmmanuel Vadot  - reg
189c9ccf3a3SEmmanuel Vadot  - clocks
190e67e8565SEmmanuel Vadot  - ranges
191e67e8565SEmmanuel Vadot
192e67e8565SEmmanuel VadotadditionalProperties: false
193e67e8565SEmmanuel Vadot
194e67e8565SEmmanuel Vadotexamples:
195e67e8565SEmmanuel Vadot  - |
196c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/clock/xlnx-zynqmp-clk.h>
197c9ccf3a3SEmmanuel Vadot
198e67e8565SEmmanuel Vadot    bus {
199e67e8565SEmmanuel Vadot        #address-cells = <2>;
200e67e8565SEmmanuel Vadot        #size-cells = <2>;
201e67e8565SEmmanuel Vadot
202e67e8565SEmmanuel Vadot        xilinx_ams: ams@ffa50000 {
203e67e8565SEmmanuel Vadot            compatible = "xlnx,zynqmp-ams";
204e67e8565SEmmanuel Vadot            interrupt-parent = <&gic>;
205e67e8565SEmmanuel Vadot            interrupts = <0 56 4>;
206e67e8565SEmmanuel Vadot            reg = <0x0 0xffa50000 0x0 0x800>;
207c9ccf3a3SEmmanuel Vadot            clocks = <&zynqmp_clk AMS_REF>;
208e67e8565SEmmanuel Vadot            #address-cells = <1>;
209e67e8565SEmmanuel Vadot            #size-cells = <1>;
210e67e8565SEmmanuel Vadot            #io-channel-cells = <1>;
211e67e8565SEmmanuel Vadot            ranges = <0 0 0xffa50800 0x800>;
212e67e8565SEmmanuel Vadot
213e67e8565SEmmanuel Vadot            ams_ps: ams-ps@0 {
214e67e8565SEmmanuel Vadot                compatible = "xlnx,zynqmp-ams-ps";
215e67e8565SEmmanuel Vadot                reg = <0 0x400>;
216e67e8565SEmmanuel Vadot            };
217e67e8565SEmmanuel Vadot
218e67e8565SEmmanuel Vadot            ams_pl: ams-pl@400 {
219e67e8565SEmmanuel Vadot                compatible = "xlnx,zynqmp-ams-pl";
220e67e8565SEmmanuel Vadot                reg = <0x400 0x400>;
221e67e8565SEmmanuel Vadot                #address-cells = <1>;
222e67e8565SEmmanuel Vadot                #size-cells = <0>;
223e67e8565SEmmanuel Vadot                channel@30 {
224e67e8565SEmmanuel Vadot                    reg = <30>;
225e67e8565SEmmanuel Vadot                    xlnx,bipolar;
226e67e8565SEmmanuel Vadot                };
227e67e8565SEmmanuel Vadot                channel@31 {
228e67e8565SEmmanuel Vadot                    reg = <31>;
229e67e8565SEmmanuel Vadot                };
230e67e8565SEmmanuel Vadot                channel@38 {
231e67e8565SEmmanuel Vadot                    reg = <38>;
232e67e8565SEmmanuel Vadot                    xlnx,bipolar;
233e67e8565SEmmanuel Vadot                };
234e67e8565SEmmanuel Vadot            };
235e67e8565SEmmanuel Vadot        };
236e67e8565SEmmanuel Vadot    };
237