From: Troy Lee <troy_lee@aspeedtech.com>
To: <openbmc@lists.ozlabs.org>, Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@aj.id.au>,
Philipp Zabel <p.zabel@pengutronix.de>,
open list <linux-kernel@vger.kernel.org>,
"moderated list:ARM/ASPEED MACHINE SUPPORT"
<linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/ASPEED MACHINE SUPPORT"
<linux-aspeed@lists.ozlabs.org>
Cc: chiawei_wang@aspeedtech.com, troy_lee@aspeedtech.com,
ryan_chen@aspeedtech.com, leetroy@gmail.com
Subject: [PATCH v3 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan
Date: Mon, 18 Jan 2021 06:50:49 +0000 [thread overview]
Message-ID: <20210118065059.2478078-2-troy_lee@aspeedtech.com> (raw)
In-Reply-To: <20210118065059.2478078-1-troy_lee@aspeedtech.com>
We add binding for supporting a new AST2600 PWM/Fan hwmon driver.
Changes since v2:
- Fixed yamllint warnings/errors
Changes since v1:
- dt binding with DT schema format
Signed-off-by: Troy Lee <troy_lee@aspeedtech.com>
Reported-by: Rob Herring <robh@kernel.org>
---
.../hwmon/aspeed,ast2600-pwm-tachometer.yaml | 131 ++++++++++++++++++
1 file changed, 131 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,ast2600-pwm-tachometer.yaml
diff --git a/Documentation/devicetree/bindings/hwmon/aspeed,ast2600-pwm-tachometer.yaml b/Documentation/devicetree/bindings/hwmon/aspeed,ast2600-pwm-tachometer.yaml
new file mode 100644
index 000000000000..fa5340f5a43f
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/aspeed,ast2600-pwm-tachometer.yaml
@@ -0,0 +1,131 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/aspeed,ast2600-pwm-tachometer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASPEED AST2600 PWM and Fan Tacho controller device driver
+
+maintainers:
+ - Ryan Chen <ryan_chen@aspeedtech.com>
+
+description: |
+ The ASPEED PWM controller can support upto 16 PWM outputs. The ASPEED Fan Tacho
+ controller can support upto 16 Fan tachometer inputs.
+ There can be upto 16 fans supported. Each fan can have one PWM output and
+ one Fan tach inputs.
+
+properties:
+ compatible:
+ const: aspeed,ast2600-pwm-tachometer
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ "#cooling-cells":
+ const: 2
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+patternProperties:
+ "^fan@[0-9a-f]$":
+ type: object
+ description:
+ Under fan subnode there can upto 16 child nodes, with each child node
+ representing a fan. There are 16 fans each fan can have one PWM port and one
+ Fan tach inputs.
+ For PWM port can be configured cooling-levels to create cooling device.
+ Cooling device could be bound to a thermal zone for the thermal control.
+
+ properties:
+ reg:
+ minimum: 0
+ maximum: 15
+ description:
+ This property identify the PWM control channel of this fan.
+
+ fan-tach-ch:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ minimum: 0
+ maximum: 15
+ description:
+ This property identify the fan tach input channel.
+
+ pulses-per-revolution:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 2
+ minimum: 1
+ description:
+ Specify tacho pulse per revolution of the fan.
+
+ cooling-levels:
+ description:
+ PWM duty cycle values in a range from 0 to 255
+ which correspond to thermal cooling states.
+
+ aspeed,pwm-freq-hz:
+ default: 25000
+ minimum: 24
+ maximum: 780000
+ description:
+ Specify the frequency of PWM.
+
+ aspeed,inverse-pin:
+ type: boolean
+ description:
+ Inverse PWM output signal.
+
+ aspeed,falling-point:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ default: 10
+ description:
+ Initialize the pulse width.
+
+ required:
+ - fan-tach-ch
+ - reg
+
+ additionalProperties: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ pwm_tacho: pwm-tacho-controller@1e610000 {
+ compatible = "aspeed,ast2600-pwm-tachometer";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1e610000 0x100>;
+
+ fan@1 {
+ reg = <0x00>;
+ aspeed,pwm-freq-hz = <25000>;
+ cooling-levels = /bits/ 8 <125 151 177 203 229 255>;
+ fan-tach-ch = /bits/ 8 <0x00>;
+ pulses-per-revolution = <2>;
+ };
+
+ fan@2 {
+ reg = <0x01>;
+ aspeed,pwm-freq-hz = <25000>;
+ cooling-levels = /bits/ 8 <125 151 177 203 229 255>;
+ fan-tach-ch = /bits/ 8 <0x01>;
+ pulses-per-revolution = <2>;
+ };
+ };
+...
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-01-18 6:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 6:50 [PATCH v3 0/4] hwmon: aspeed2600-pwm-tacho: Add driver support Troy Lee
2021-01-18 6:50 ` Troy Lee [this message]
2021-01-22 4:26 ` [PATCH v3 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Andrew Jeffery
2021-01-18 6:50 ` [PATCH v3 2/4] hwmon: Add Aspeed AST2600 support Troy Lee
2021-01-18 6:50 ` [PATCH v3 3/4] ARM: dts: aspeed: Add Aspeed AST2600 PWM/Fan node in devicetree Troy Lee
2021-01-18 6:50 ` [PATCH v3 4/4] hwmon: Support Aspeed AST2600 PWM/Fan tachometer Troy Lee
2021-01-20 5:16 ` Andrew Jeffery
2021-01-20 5:23 ` Ryan Chen
2021-01-20 6:37 ` Andrew Jeffery
2021-01-22 4:38 ` Andrew Jeffery
2021-01-26 10:05 ` Troy Lee
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=20210118065059.2478078-2-troy_lee@aspeedtech.com \
--to=troy_lee@aspeedtech.com \
--cc=andrew@aj.id.au \
--cc=chiawei_wang@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=leetroy@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=p.zabel@pengutronix.de \
--cc=ryan_chen@aspeedtech.com \
/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).