From: <marius.cristea@microchip.com>
To: <jic23@kernel.org>, <lars@metafoo.de>, <robh+dt@kernel.org>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <marius.cristea@microchip.com>
Subject: [PATCH v1 1/2] dt-bindings: iio: adc: adding dt-bindings for PAC193X
Date: Mon, 20 Feb 2023 14:32:31 +0200 [thread overview]
Message-ID: <20230220123232.413029-2-marius.cristea@microchip.com> (raw)
In-Reply-To: <20230220123232.413029-1-marius.cristea@microchip.com>
From: Marius Cristea <marius.cristea@microchip.com>
This is the device tree schema for iio driver for
Microchip PAC193X series of Power Monitors with Accumulator.
Signed-off-by: Marius Cristea <marius.cristea@microchip.com>
---
.../bindings/iio/adc/microchip,pac193x.yaml | 122 ++++++++++++++++++
1 file changed, 122 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml
diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml
new file mode 100644
index 000000000000..e4ea560991e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/microchip,pac193x.yaml
@@ -0,0 +1,122 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/microchip,pac193x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip PAC193X Power Monitors with Accumulator
+
+maintainers:
+ - Marius Cristea <marius.cristea@microchip.com>
+
+properties:
+ compatible:
+ enum:
+ - microchip,pac1934
+ - microchip,pac1933
+ - microchip,pac1932
+ - microchip,pac1931
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ microchip,samp-rate:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Sampling rate for all device's channels.
+ enum: [8, 64, 256, 1024]
+ default: 1024
+
+required:
+ - compatible
+ - reg
+ - microchip,samp-rate
+ - "#address-cells"
+ - "#size-cells"
+
+patternProperties:
+ "^channel([1-4])@[1-4]+$":
+ $ref: "adc.yaml"
+ type: object
+ description: Represents the external channels which are connected to the ADC.
+
+ properties:
+ reg:
+ description: The channel number.
+ It can have up to 4 channels, numbered from 1 to 4.
+ items:
+ - minimum: 1
+ maximum: 4
+
+ microchip,uohms-shunt-res:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Value in micro Ohms of the shunt resistor connected between
+ the SENSE+ and SENSE- inputs, across which the current is measured. Value
+ is needed to compute the scaling of the measured current.
+
+ microchip,rail-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: Name of the monitored power rail.
+
+ microchip,bi-directional:
+ description: Whether the channel is bi-directional.
+ type: boolean
+
+ required:
+ - reg
+ - microchip,uohms-shunt-res
+ - microchip,rail-name
+
+ additionalProperties: false
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pac193x: pac193x@10 {
+ compatible = "microchip,pac1934";
+ reg = <0x10>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ microchip,samp-rate = <64>;
+
+ channel1@1 {
+ reg = <0x1>;
+ microchip,uohms-shunt-res = <24900000>;
+ microchip,rail-name = "CPU";
+ };
+
+ channel2@2 {
+ reg = <0x2>;
+ microchip,uohms-shunt-res = <49900000>;
+ microchip,rail-name = "GPU";
+ };
+
+ channel3@3 {
+ reg = <0x3>;
+ microchip,uohms-shunt-res = <75000000>;
+ microchip,rail-name = "MEM";
+ microchip,bi-directional;
+ };
+
+ channel4@4 {
+ reg = <0x4>;
+ microchip,uohms-shunt-res = <100000000>;
+ microchip,rail-name = "NET";
+ microchip,bi-directional;
+ };
+ };
+ };
+
+...
--
2.34.1
next prev parent reply other threads:[~2023-02-20 12:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 12:32 [PATCH v1 0/2] adding support for Microchip PAC193X Power Monitor marius.cristea
2023-02-20 12:32 ` marius.cristea [this message]
2023-02-21 13:44 ` [PATCH v1 1/2] dt-bindings: iio: adc: adding dt-bindings for PAC193X Krzysztof Kozlowski
2023-02-25 17:17 ` Jonathan Cameron
2023-03-06 13:53 ` Marius.Cristea
2023-03-06 16:09 ` Krzysztof Kozlowski
2023-03-06 16:26 ` Jonathan Cameron
2023-02-20 12:32 ` [PATCH v1 2/2] iio: adc: adding support for pac193x marius.cristea
2023-02-20 20:04 ` kernel test robot
2023-02-20 21:36 ` kernel test robot
2023-02-21 13:46 ` Krzysztof Kozlowski
2023-02-25 17:19 ` Jonathan Cameron
2023-02-25 17:22 ` Jonathan Cameron
2023-03-06 13:56 ` Marius.Cristea
2023-02-25 19:27 ` Jonathan Cameron
2023-03-06 15:42 ` Marius.Cristea
2023-03-12 16:42 ` Jonathan Cameron
2023-03-23 15:15 ` Marius.Cristea
2023-03-25 18:06 ` Jonathan Cameron
2023-02-25 17:11 ` [PATCH v1 0/2] adding support for Microchip PAC193X Power Monitor Jonathan Cameron
2023-03-06 14:03 ` Marius.Cristea
2023-03-12 16:45 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230220123232.413029-2-marius.cristea@microchip.com \
--to=marius.cristea@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).