xref: /linux/Documentation/devicetree/bindings/iio/adc/microchip,pac1934.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/adc/microchip,pac1934.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Microchip PAC1934 Power Monitors with Accumulator
8
9maintainers:
10  - Marius Cristea <marius.cristea@microchip.com>
11
12description: |
13  This device is part of the Microchip family of Power Monitors with
14  Accumulator.
15  The datasheet for PAC1931, PAC1932, PAC1933 and PAC1934 can be found here:
16    https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/PAC1931-Family-Data-Sheet-DS20005850E.pdf
17
18properties:
19  compatible:
20    enum:
21      - microchip,pac1931
22      - microchip,pac1932
23      - microchip,pac1933
24      - microchip,pac1934
25
26  reg:
27    maxItems: 1
28
29  "#address-cells":
30    const: 1
31
32  "#size-cells":
33    const: 0
34
35  interrupts:
36    maxItems: 1
37
38  slow-io-gpios:
39    description:
40      A GPIO used to trigger a change is sampling rate (lowering the chip power
41      consumption). If configured in SLOW mode, if this pin is forced high,
42      sampling rate is forced to eight samples/second. When it is forced low,
43      the sampling rate is 1024 samples/second unless a different sample rate
44      has been programmed.
45
46patternProperties:
47  "^channel@[1-4]+$":
48    type: object
49    $ref: adc.yaml
50    description:
51      Represents the external channels which are connected to the ADC.
52
53    properties:
54      reg:
55        items:
56          minimum: 1
57          maximum: 4
58
59      shunt-resistor-micro-ohms:
60        description:
61          Value in micro Ohms of the shunt resistor connected between
62          the SENSE+ and SENSE- inputs, across which the current is measured.
63          Value is needed to compute the scaling of the measured current.
64
65    required:
66      - reg
67      - shunt-resistor-micro-ohms
68
69    unevaluatedProperties: false
70
71required:
72  - compatible
73  - reg
74  - "#address-cells"
75  - "#size-cells"
76
77additionalProperties: false
78
79examples:
80  - |
81    i2c {
82        #address-cells = <1>;
83        #size-cells = <0>;
84
85        power-monitor@10 {
86            compatible = "microchip,pac1934";
87            reg = <0x10>;
88
89            #address-cells = <1>;
90            #size-cells = <0>;
91
92            channel@1 {
93                reg = <0x1>;
94                shunt-resistor-micro-ohms = <24900000>;
95                label = "CPU";
96            };
97
98            channel@2 {
99                reg = <0x2>;
100                shunt-resistor-micro-ohms = <49900000>;
101                label = "GPU";
102            };
103
104            channel@3 {
105                reg = <0x3>;
106                shunt-resistor-micro-ohms = <75000000>;
107                label = "MEM";
108                bipolar;
109            };
110
111            channel@4 {
112                reg = <0x4>;
113                shunt-resistor-micro-ohms = <100000000>;
114                label = "NET";
115                bipolar;
116            };
117        };
118    };
119
120...
121