From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F156BC433E0 for ; Fri, 15 Jan 2021 01:49:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB26023A5B for ; Fri, 15 Jan 2021 01:49:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731671AbhAOBtT (ORCPT ); Thu, 14 Jan 2021 20:49:19 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:32577 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731536AbhAOBtS (ORCPT ); Thu, 14 Jan 2021 20:49:18 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 10F1fQeI052501; Fri, 15 Jan 2021 09:41:26 +0800 (GMT-8) (envelope-from troy_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 09:46:31 +0800 Date: Fri, 15 Jan 2021 01:46:31 +0000 From: Troy Lee To: Rob Herring CC: "openbmc@lists.ozlabs.org" , Jean Delvare , Guenter Roeck , Joel Stanley , Andrew Jeffery , Jonathan Corbet , Philipp Zabel , Ryan Chen , "open list:HARDWARE MONITORING" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "open list:DOCUMENTATION" , ChiaWei Wang , "leetroy@gmail.com" Subject: Re: [PATCH v2 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Message-ID: <20210115014631.GA1391@aspeedtech.com> References: <20210113070850.1184506-1-troy_lee@aspeedtech.com> <20210113070850.1184506-2-troy_lee@aspeedtech.com> <20210114141317.GA2823834@robh.at.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20210114141317.GA2823834@robh.at.kernel.org> X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 10F1fQeI052501 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Hi Rob, Thanks for reviewing. The 01/14/2021 22:13, Rob Herring wrote: > On Wed, Jan 13, 2021 at 07:08:45AM +0000, Troy Lee wrote: > > We add binding for supporting a new AST2600 PWM/Fan hwmon driver. > > > > Changes since v1: > > - dt binding with DT schema format > > > > Signed-off-by: Troy Lee > > --- > > .../hwmon/aspeed,ast2600-pwm-tachometer.yaml | 137 ++++++++++++++++++ > > 1 file changed, 137 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..b84076a4a338 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/hwmon/aspeed,ast2600-pwm-tachometer.yaml > > @@ -0,0 +1,137 @@ > > +# 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 > > + > > +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: > > + description: > > + Address and length of the register set for the device. > > No need for generic descriptions. That's every 'reg'. > > What you need is how many entries and what each one is if more than 1. > If only 1, then just 'maxItems: 1' > > > + > > + clocks: > > + description: > > + phandle to clock provider with the clock number in the second cell > > Same here. > > > + > > + resets: > > + description: > > + phandle to reset controller with the reset number in the second cell > > And here. > > > + > > +patternProperties: > > + "@[0-9]+$": > > If every node is a fan and there are up to 16: > > ^fan@[0-9a-f]$ > I will update these in v3 patch set. > > + 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: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + default: 25000 > > + minimum: 24 > > + maximum: 780000 > > + description: > > + Specify the frequency of PWM. > > Units? Use a unit suffix and then drop the $ref. > I'll change it to pwm-freq-hz. > > + > > + aspeed,inverse-pin: > > + type: boolean > > + description: > > + Inverse PWM output signal. > > + > > + aspeed,falling-point: > > + $ref: /schemas/types.yaml#/definitions/uint8 > > + default: 10 > > + minimum: 0 > > + maximum: 255 > > 0-255 is already the range of uint8, so drop. > I'll drop it in v3. Thanks, Troy Lee > > + 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 = <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 = <25000>; > > + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; > > + fan-tach-ch = /bits/ 8 <0x01>; > > + pulses-per-revolution = <2>; > > + }; > > + }; > > +... > > -- > > 2.25.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78AC3C433E0 for ; Fri, 15 Jan 2021 01:49:28 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C73DF23A5B for ; Fri, 15 Jan 2021 01:49:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C73DF23A5B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4DH3yF2NpjzDsXx for ; Fri, 15 Jan 2021 12:49:25 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=fail (SPF fail - not authorized) smtp.mailfrom=aspeedtech.com (client-ip=211.20.114.71; helo=twspam01.aspeedtech.com; envelope-from=troy_lee@aspeedtech.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DH3wQ61NVzDsWr; Fri, 15 Jan 2021 12:47:49 +1100 (AEDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 10F1fQeI052501; Fri, 15 Jan 2021 09:41:26 +0800 (GMT-8) (envelope-from troy_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 09:46:31 +0800 Date: Fri, 15 Jan 2021 01:46:31 +0000 From: Troy Lee To: Rob Herring Subject: Re: [PATCH v2 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Message-ID: <20210115014631.GA1391@aspeedtech.com> References: <20210113070850.1184506-1-troy_lee@aspeedtech.com> <20210113070850.1184506-2-troy_lee@aspeedtech.com> <20210114141317.GA2823834@robh.at.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20210114141317.GA2823834@robh.at.kernel.org> X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 10F1fQeI052501 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:HARDWARE MONITORING" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Jean Delvare , Ryan Chen , "moderated list:ARM/ASPEED MACHINE SUPPORT" , Jonathan Corbet , Andrew Jeffery , "openbmc@lists.ozlabs.org" , "open list:DOCUMENTATION" , open list , "leetroy@gmail.com" , Philipp Zabel , ChiaWei Wang , Guenter Roeck , "moderated list:ARM/ASPEED MACHINE SUPPORT" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" Hi Rob, Thanks for reviewing. The 01/14/2021 22:13, Rob Herring wrote: > On Wed, Jan 13, 2021 at 07:08:45AM +0000, Troy Lee wrote: > > We add binding for supporting a new AST2600 PWM/Fan hwmon driver. > > > > Changes since v1: > > - dt binding with DT schema format > > > > Signed-off-by: Troy Lee > > --- > > .../hwmon/aspeed,ast2600-pwm-tachometer.yaml | 137 ++++++++++++++++++ > > 1 file changed, 137 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..b84076a4a338 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/hwmon/aspeed,ast2600-pwm-tachometer.yaml > > @@ -0,0 +1,137 @@ > > +# 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 > > + > > +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: > > + description: > > + Address and length of the register set for the device. > > No need for generic descriptions. That's every 'reg'. > > What you need is how many entries and what each one is if more than 1. > If only 1, then just 'maxItems: 1' > > > + > > + clocks: > > + description: > > + phandle to clock provider with the clock number in the second cell > > Same here. > > > + > > + resets: > > + description: > > + phandle to reset controller with the reset number in the second cell > > And here. > > > + > > +patternProperties: > > + "@[0-9]+$": > > If every node is a fan and there are up to 16: > > ^fan@[0-9a-f]$ > I will update these in v3 patch set. > > + 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: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + default: 25000 > > + minimum: 24 > > + maximum: 780000 > > + description: > > + Specify the frequency of PWM. > > Units? Use a unit suffix and then drop the $ref. > I'll change it to pwm-freq-hz. > > + > > + aspeed,inverse-pin: > > + type: boolean > > + description: > > + Inverse PWM output signal. > > + > > + aspeed,falling-point: > > + $ref: /schemas/types.yaml#/definitions/uint8 > > + default: 10 > > + minimum: 0 > > + maximum: 255 > > 0-255 is already the range of uint8, so drop. > I'll drop it in v3. Thanks, Troy Lee > > + 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 = <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 = <25000>; > > + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; > > + fan-tach-ch = /bits/ 8 <0x01>; > > + pulses-per-revolution = <2>; > > + }; > > + }; > > +... > > -- > > 2.25.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CC99C433DB for ; Fri, 15 Jan 2021 01:49:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A350023A58 for ; Fri, 15 Jan 2021 01:49:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A350023A58 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fUkmb4NT0ANE0CXirUNLUWOOa0E3KW7i2Ks1Gy+a870=; b=vz2OoysRrqJ4MghncaruYIAQA ZJsBDyUse3O+n1eK9PdGulgednHFvmqufJ77rWKOh51uY+3PdGonwvYQ4gq69WU64F/xFeTIODg+G igRvA+r4NUgL8xOJI8RB127mmZrujvIFQDUEEhZiN87RR1/1SpQSRpnzslp7utyXGukcgktLj1NXz w8DXOaJ45wEl1lRnAOSfU8wGkrPJFDtQKFuEsx+LJ5uzmCfEN7mRmVwhuZiqgIB3cEgjKXEDmCe7Y UBJdO5q6R0ywZ/D+aV9+5kfr5lJB1a6hguC3tUOGwmOLx/niMxiCqbsX2hG4hQ3E/PMCOTlvvh8Nm fdpC68ZCQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0EDJ-0005VB-Qa; Fri, 15 Jan 2021 01:47:45 +0000 Received: from twspam01.aspeedtech.com ([211.20.114.71]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0EDF-0005U6-IO for linux-arm-kernel@lists.infradead.org; Fri, 15 Jan 2021 01:47:43 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 10F1fQeI052501; Fri, 15 Jan 2021 09:41:26 +0800 (GMT-8) (envelope-from troy_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 Jan 2021 09:46:31 +0800 Date: Fri, 15 Jan 2021 01:46:31 +0000 From: Troy Lee To: Rob Herring Subject: Re: [PATCH v2 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Message-ID: <20210115014631.GA1391@aspeedtech.com> References: <20210113070850.1184506-1-troy_lee@aspeedtech.com> <20210113070850.1184506-2-troy_lee@aspeedtech.com> <20210114141317.GA2823834@robh.at.kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210114141317.GA2823834@robh.at.kernel.org> X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 10F1fQeI052501 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210114_204741_994905_370DE3C7 X-CRM114-Status: GOOD ( 28.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:HARDWARE MONITORING" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Jean Delvare , Ryan Chen , "moderated list:ARM/ASPEED MACHINE SUPPORT" , Jonathan Corbet , Andrew Jeffery , "openbmc@lists.ozlabs.org" , "open list:DOCUMENTATION" , open list , "leetroy@gmail.com" , Joel Stanley , Philipp Zabel , ChiaWei Wang , Guenter Roeck , "moderated list:ARM/ASPEED MACHINE SUPPORT" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Rob, Thanks for reviewing. The 01/14/2021 22:13, Rob Herring wrote: > On Wed, Jan 13, 2021 at 07:08:45AM +0000, Troy Lee wrote: > > We add binding for supporting a new AST2600 PWM/Fan hwmon driver. > > > > Changes since v1: > > - dt binding with DT schema format > > > > Signed-off-by: Troy Lee > > --- > > .../hwmon/aspeed,ast2600-pwm-tachometer.yaml | 137 ++++++++++++++++++ > > 1 file changed, 137 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..b84076a4a338 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/hwmon/aspeed,ast2600-pwm-tachometer.yaml > > @@ -0,0 +1,137 @@ > > +# 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 > > + > > +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: > > + description: > > + Address and length of the register set for the device. > > No need for generic descriptions. That's every 'reg'. > > What you need is how many entries and what each one is if more than 1. > If only 1, then just 'maxItems: 1' > > > + > > + clocks: > > + description: > > + phandle to clock provider with the clock number in the second cell > > Same here. > > > + > > + resets: > > + description: > > + phandle to reset controller with the reset number in the second cell > > And here. > > > + > > +patternProperties: > > + "@[0-9]+$": > > If every node is a fan and there are up to 16: > > ^fan@[0-9a-f]$ > I will update these in v3 patch set. > > + 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: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + default: 25000 > > + minimum: 24 > > + maximum: 780000 > > + description: > > + Specify the frequency of PWM. > > Units? Use a unit suffix and then drop the $ref. > I'll change it to pwm-freq-hz. > > + > > + aspeed,inverse-pin: > > + type: boolean > > + description: > > + Inverse PWM output signal. > > + > > + aspeed,falling-point: > > + $ref: /schemas/types.yaml#/definitions/uint8 > > + default: 10 > > + minimum: 0 > > + maximum: 255 > > 0-255 is already the range of uint8, so drop. > I'll drop it in v3. Thanks, Troy Lee > > + 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 = <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 = <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