mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zev Weiss <zev@bewilderbeest.net>
To: Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Cc: Zev Weiss <zev@bewilderbeest.net>,
	Guenter Roeck <linux@roeck-us.net>,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	openbmc@lists.ozlabs.org
Subject: [PATCH 1/2] dt-bindings: hwmon: Add Nuvoton NCT7362Y binding
Date: Wed,  7 Jun 2023 03:18:29 -0700	[thread overview]
Message-ID: <20230607101827.8544-5-zev@bewilderbeest.net> (raw)
In-Reply-To: <20230607101827.8544-4-zev@bewilderbeest.net>

This binding describes the NCT7362Y, a 16-channel fan/GPIO controller.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
 .../bindings/hwmon/nuvoton,nct7362.yaml       | 123 ++++++++++++++++++
 1 file changed, 123 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml

diff --git a/Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml b/Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml
new file mode 100644
index 000000000000..630dcce7a14c
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/nuvoton,nct7362.yaml
@@ -0,0 +1,123 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/nuvoton,nct7362.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NCT7362Y fan controller
+
+maintainers:
+  - Zev Weiss <zev@bewilderbeest.net>
+
+description: |
+  The Nuvoton NCT7362Y is an I2C fan controller with 16 pins that can
+  be independently configured for PWM, fan tach, or GPIO
+  functionality.  Each pin's functionality is represented by a child
+  node.
+
+  The datasheet is not publicly available but can be requested from
+  Nuvoton via their web site.
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,nct7362
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  gpio-controller: true
+
+  "#gpio-cells":
+    const: 2
+
+  gpio-line-names:
+    minItems: 1
+    maxItems: 16
+
+patternProperties:
+  "^tach@([1-8]|1[0-7])$":
+    type: object
+    properties:
+      reg:
+        maxItems: 1
+        description: The pin number.
+
+      nuvoton,pulses-per-revolution:
+        description: |
+          The number of tach pulses per revolution of the fan.
+        $ref: /schemas/types.yaml#/definitions/uint32
+        minimum: 1
+        default: 2
+
+    required:
+      - reg
+
+  "^pwm@([1-8]|1[0-7])$":
+    type: object
+    properties:
+      reg:
+        maxItems: 1
+        description: The pin number.
+    required:
+      - reg
+
+  "^gpio@([1-8]|1[0-7])$":
+    type: object
+    properties:
+      reg:
+        maxItems: 1
+        description: The pin number.
+    required:
+      - reg
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      fanctl@22 {
+        compatible = "nuvoton,nct7362";
+        gpio-controller;
+        #gpio-cells = <2>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+        reg = <0x22>;
+        gpio-line-names = "", "", "", "", "", "", "", "",
+          "", "", "", "", "", "", "led1", "led2";
+
+        tach@1 {
+          reg = <1>;
+        };
+        tach@2 {
+          reg = <2>;
+          nuvoton,pulses-per-revolution = <1>;
+        };
+        pwm@10 {
+          reg = <10>;
+        };
+        pwm@11 {
+          reg = <11>;
+        };
+        gpio@16 {
+          reg = <16>;
+        };
+        gpio@17 {
+          reg = <17>;
+        };
+      };
+    };
-- 
2.40.0.5.gf6e3b97ba6d2.dirty


  reply	other threads:[~2023-06-07 10:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 10:18 [PATCH 0/2] Nuvoton NCT7362 driver & dt-binding Zev Weiss
2023-06-07 10:18 ` Zev Weiss [this message]
2023-06-07 18:24   ` [PATCH 1/2] dt-bindings: hwmon: Add Nuvoton NCT7362Y binding Krzysztof Kozlowski
2023-06-14 22:57   ` Rob Herring
2023-06-07 10:18 ` [PATCH 2/2] hwmon: (nct7362) Add nct7362 driver Zev Weiss
2023-06-07 18:00   ` Guenter Roeck
2023-06-07 19:33     ` Zev Weiss

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=20230607101827.8544-5-zev@bewilderbeest.net \
    --to=zev@bewilderbeest.net \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=openbmc@lists.ozlabs.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

all inboxes | Powered by JetHome®