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