From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Thu, 10 Dec 2020 21:26:12 -0600 Subject: [PATCH 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan In-Reply-To: <20201209075921.26689-2-troy_lee@aspeedtech.com> References: <20201209075921.26689-1-troy_lee@aspeedtech.com> <20201209075921.26689-2-troy_lee@aspeedtech.com> Message-ID: <20201211032612.GA3565720@robh.at.kernel.org> List-Id: To: linux-aspeed@lists.ozlabs.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Dec 09, 2020 at 03:59:17PM +0800, Troy Lee wrote: > For supporting a new AST2600 PWM/Fan hwmon driver, we add a new binding. > > Signed-off-by: Troy Lee > --- > .../bindings/hwmon/aspeed2600-pwm-tacho.txt | 69 +++++++++++++++++++ Bindings are in DT schema format now. > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > > diff --git a/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > new file mode 100644 > index 000000000000..61b11914352f > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > @@ -0,0 +1,69 @@ > +ASPEED AST2600 PWM and Fan Tacho controller device driver > + > +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. > + > +Required properties for pwm-tacho node: > +- #address-cells : should be 1. > + > +- #size-cells : should be 0. > + > +- #cooling-cells: should be 2. > + > +- reg : address and length of the register set for the device. > + > +- pinctrl-names : a pinctrl state named "default" must be defined. > + > +- pinctrl-0 : phandle referencing pin configuration of the PWM ports. > + > +- compatible : should be "aspeed,ast2600-pwm-tachometer". > + > +- clocks : phandle to clock provider with the clock number in the second cell > + > +- resets : phandle to reset controller with the reset number in the second cell > + > +fan subnode format: > +=================== > +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. > + > +Required properties for each child node: > +- reg : should specify PWM source port. > + integer value in the range 0x00 to 0x0f with 0x00 indicating PWM port 0 > + and 0x0f indicating PWM port F. > + > +- cooling-levels: PWM duty cycle values in a range from 0 to 255 > + which correspond to thermal cooling states. > + > +- aspeed,fan-tach-ch : should specify the Fan tach input channel. > + integer value in the range 0 through 15, with 0 indicating > + Fan tach channel 0 and 15 indicating Fan tach channel 15. > + Atleast one Fan tach input channel is required. Already has 'fan-tach-ch' in npcm750-pwm-fan.txt. > + > +- aspeed,target-pwm : Specify the frequency of PWM. The value range from 24 to > + 780000. Default value will be set to 25000. > + > +- aspeed,pulse-pr : Specify tacho pulse per revolution of the fan. A general > + parameter of pulse-pr is 2. Already have 'pulses-per-revolution' property in pwm-fan.txt. Use that. Really, all these should be in a common fan schema that you reference. > + > +Examples: > + > +&pwm_tacho { > + status = "okay"; Don't show status in examples. > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_tach0_default>; > + > + fan at 0 { > + reg = <0x00>; > + aspeed,target-pwm = <25000>; > + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; > + aspeed,fan-tach-ch = /bits/ 8 <0x00>; > + aspeed,pulse-pr = <2>; > + }; > +}; > -- > 2.17.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,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 D37B6C4361B for ; Fri, 11 Dec 2020 03:27:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 992D623E54 for ; Fri, 11 Dec 2020 03:27:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387865AbgLKD1E (ORCPT ); Thu, 10 Dec 2020 22:27:04 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:40456 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395060AbgLKD04 (ORCPT ); Thu, 10 Dec 2020 22:26:56 -0500 Received: by mail-ot1-f68.google.com with SMTP id j12so7053412ota.7; Thu, 10 Dec 2020 19:26:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FQJ0xYZsg9VuDPNWynmVTQgQAdgxX+zz3aAN9OxOmEM=; b=d/f4UNFeg0HHbmHPFOpSsLhZ9EWrx8IATokW+ttdpaInc0tihLkboJyMoWdypXYVQ0 e1oQQzpvWFcIehMgATMxRFx3jmP21mQlO/tjE8Itgf21AJ+09B1Xlp0hkP4SUTZ2yfdK q24kNiN/cBNxqqsBzFDA4OHVRU398RLpds7y1NeDzbguj6cK+foFdpOuIyHRXQWdpwtz WsrJCF7GW1x8tEVEbOjAPhYwaKdKIUlpMgo4y3i78RNBetsLKHri1ybEjybBJpS0e18d LM/QD66ukI/Kq6ssr7Tx1pkc3uIcsrpkJfBUZu8k1Ek1Msl3ZBK0mzEEGvECNcxt9E0x 73NQ== X-Gm-Message-State: AOAM531WnLt9PsoIFBA7vepOA7QiGBUJcI5csXNY8H8mndYS4gZI8XWH n56wo/mBI8Ma4IdziSgjEA== X-Google-Smtp-Source: ABdhPJzKUGBasM7BAwLTxygGxXIuMZ4ml/wcGxyjJSYLcS6Bmb5p1q1zlC+Ak1f0+07k0olzZmbmgg== X-Received: by 2002:a9d:3a2:: with SMTP id f31mr8646104otf.216.1607657175132; Thu, 10 Dec 2020 19:26:15 -0800 (PST) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id x66sm1498750oig.56.2020.12.10.19.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 19:26:14 -0800 (PST) Received: (nullmailer pid 3574126 invoked by uid 1000); Fri, 11 Dec 2020 03:26:12 -0000 Date: Thu, 10 Dec 2020 21:26:12 -0600 From: Rob Herring To: Troy Lee Cc: openbmc@lists.ozlabs.org, Jean Delvare , Guenter Roeck , Joel Stanley , Andrew Jeffery , Jonathan Corbet , Philipp Zabel , "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" , leetroy@gmail.com, ryan_chen@aspeedtech.com, chiawei_wang@aspeedtech.com, billy_tsai@aspeedtech.com Subject: Re: [PATCH 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Message-ID: <20201211032612.GA3565720@robh.at.kernel.org> References: <20201209075921.26689-1-troy_lee@aspeedtech.com> <20201209075921.26689-2-troy_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201209075921.26689-2-troy_lee@aspeedtech.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Wed, Dec 09, 2020 at 03:59:17PM +0800, Troy Lee wrote: > For supporting a new AST2600 PWM/Fan hwmon driver, we add a new binding. > > Signed-off-by: Troy Lee > --- > .../bindings/hwmon/aspeed2600-pwm-tacho.txt | 69 +++++++++++++++++++ Bindings are in DT schema format now. > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > > diff --git a/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > new file mode 100644 > index 000000000000..61b11914352f > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > @@ -0,0 +1,69 @@ > +ASPEED AST2600 PWM and Fan Tacho controller device driver > + > +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. > + > +Required properties for pwm-tacho node: > +- #address-cells : should be 1. > + > +- #size-cells : should be 0. > + > +- #cooling-cells: should be 2. > + > +- reg : address and length of the register set for the device. > + > +- pinctrl-names : a pinctrl state named "default" must be defined. > + > +- pinctrl-0 : phandle referencing pin configuration of the PWM ports. > + > +- compatible : should be "aspeed,ast2600-pwm-tachometer". > + > +- clocks : phandle to clock provider with the clock number in the second cell > + > +- resets : phandle to reset controller with the reset number in the second cell > + > +fan subnode format: > +=================== > +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. > + > +Required properties for each child node: > +- reg : should specify PWM source port. > + integer value in the range 0x00 to 0x0f with 0x00 indicating PWM port 0 > + and 0x0f indicating PWM port F. > + > +- cooling-levels: PWM duty cycle values in a range from 0 to 255 > + which correspond to thermal cooling states. > + > +- aspeed,fan-tach-ch : should specify the Fan tach input channel. > + integer value in the range 0 through 15, with 0 indicating > + Fan tach channel 0 and 15 indicating Fan tach channel 15. > + Atleast one Fan tach input channel is required. Already has 'fan-tach-ch' in npcm750-pwm-fan.txt. > + > +- aspeed,target-pwm : Specify the frequency of PWM. The value range from 24 to > + 780000. Default value will be set to 25000. > + > +- aspeed,pulse-pr : Specify tacho pulse per revolution of the fan. A general > + parameter of pulse-pr is 2. Already have 'pulses-per-revolution' property in pwm-fan.txt. Use that. Really, all these should be in a common fan schema that you reference. > + > +Examples: > + > +&pwm_tacho { > + status = "okay"; Don't show status in examples. > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_tach0_default>; > + > + fan@0 { > + reg = <0x00>; > + aspeed,target-pwm = <25000>; > + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; > + aspeed,fan-tach-ch = /bits/ 8 <0x00>; > + aspeed,pulse-pr = <2>; > + }; > +}; > -- > 2.17.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,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 8EAE5C4361B for ; Fri, 11 Dec 2020 03:27:44 +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 E1A3D23E54 for ; Fri, 11 Dec 2020 03:27:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1A3D23E54 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 4Csbnn3fd7zDqv4 for ; Fri, 11 Dec 2020 14:27:41 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.210.68; helo=mail-ot1-f68.google.com; envelope-from=robherring2@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from mail-ot1-f68.google.com (mail-ot1-f68.google.com [209.85.210.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CsbmD2TTczDqsX; Fri, 11 Dec 2020 14:26:17 +1100 (AEDT) Received: by mail-ot1-f68.google.com with SMTP id f16so7031931otl.11; Thu, 10 Dec 2020 19:26:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FQJ0xYZsg9VuDPNWynmVTQgQAdgxX+zz3aAN9OxOmEM=; b=IS0m7MInW7+Trr41uIYVR6Za9fhSoBbXjjgjx53ii+9KKcWAUy0emAXjJGyNc9mAUe GIg1lSfzbuWsfK6z0Jr7hI/u0nykKkznJl+Ajk8CvobMIOTQ5d5tV7KoF4O7irw9+wr5 NIksm91T9v59PAFPzdaR2k1qm9OChFNlqsnzhWJajibh/FXGkv6JtbEn3YocvtdxzVvA 1YwH1xLwMtS0/793cXfSSe/mwbrNU6v15slmCqOb/FW2o8fVxCUjrqUW8MgHa90OWuFr +dEkV9XChgDAJWkn82OlN5fFG4fhIhBMuyGpPLPH7DUcNtXUUJHsl+DLGSJmD4D9wlMZ VXgg== X-Gm-Message-State: AOAM533R+USl595pwn7r99+c1rtiLv9AdOZI8EGi/razYeQfXxupZgzj k38Kqc2EFvXVsXn9q3E4bvgXKXDN0A== X-Google-Smtp-Source: ABdhPJzKUGBasM7BAwLTxygGxXIuMZ4ml/wcGxyjJSYLcS6Bmb5p1q1zlC+Ak1f0+07k0olzZmbmgg== X-Received: by 2002:a9d:3a2:: with SMTP id f31mr8646104otf.216.1607657175132; Thu, 10 Dec 2020 19:26:15 -0800 (PST) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id x66sm1498750oig.56.2020.12.10.19.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 19:26:14 -0800 (PST) Received: (nullmailer pid 3574126 invoked by uid 1000); Fri, 11 Dec 2020 03:26:12 -0000 Date: Thu, 10 Dec 2020 21:26:12 -0600 From: Rob Herring To: Troy Lee Subject: Re: [PATCH 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Message-ID: <20201211032612.GA3565720@robh.at.kernel.org> References: <20201209075921.26689-1-troy_lee@aspeedtech.com> <20201209075921.26689-2-troy_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201209075921.26689-2-troy_lee@aspeedtech.com> 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@aspeedtech.com, "moderated list:ARM/ASPEED MACHINE SUPPORT" , Jonathan Corbet , Andrew Jeffery , openbmc@lists.ozlabs.org, "open list:DOCUMENTATION" , open list , billy_tsai@aspeedtech.com, leetroy@gmail.com, Philipp Zabel , chiawei_wang@aspeedtech.com, Guenter Roeck , "moderated list:ARM/ASPEED MACHINE SUPPORT" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Wed, Dec 09, 2020 at 03:59:17PM +0800, Troy Lee wrote: > For supporting a new AST2600 PWM/Fan hwmon driver, we add a new binding. > > Signed-off-by: Troy Lee > --- > .../bindings/hwmon/aspeed2600-pwm-tacho.txt | 69 +++++++++++++++++++ Bindings are in DT schema format now. > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > > diff --git a/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > new file mode 100644 > index 000000000000..61b11914352f > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > @@ -0,0 +1,69 @@ > +ASPEED AST2600 PWM and Fan Tacho controller device driver > + > +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. > + > +Required properties for pwm-tacho node: > +- #address-cells : should be 1. > + > +- #size-cells : should be 0. > + > +- #cooling-cells: should be 2. > + > +- reg : address and length of the register set for the device. > + > +- pinctrl-names : a pinctrl state named "default" must be defined. > + > +- pinctrl-0 : phandle referencing pin configuration of the PWM ports. > + > +- compatible : should be "aspeed,ast2600-pwm-tachometer". > + > +- clocks : phandle to clock provider with the clock number in the second cell > + > +- resets : phandle to reset controller with the reset number in the second cell > + > +fan subnode format: > +=================== > +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. > + > +Required properties for each child node: > +- reg : should specify PWM source port. > + integer value in the range 0x00 to 0x0f with 0x00 indicating PWM port 0 > + and 0x0f indicating PWM port F. > + > +- cooling-levels: PWM duty cycle values in a range from 0 to 255 > + which correspond to thermal cooling states. > + > +- aspeed,fan-tach-ch : should specify the Fan tach input channel. > + integer value in the range 0 through 15, with 0 indicating > + Fan tach channel 0 and 15 indicating Fan tach channel 15. > + Atleast one Fan tach input channel is required. Already has 'fan-tach-ch' in npcm750-pwm-fan.txt. > + > +- aspeed,target-pwm : Specify the frequency of PWM. The value range from 24 to > + 780000. Default value will be set to 25000. > + > +- aspeed,pulse-pr : Specify tacho pulse per revolution of the fan. A general > + parameter of pulse-pr is 2. Already have 'pulses-per-revolution' property in pwm-fan.txt. Use that. Really, all these should be in a common fan schema that you reference. > + > +Examples: > + > +&pwm_tacho { > + status = "okay"; Don't show status in examples. > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_tach0_default>; > + > + fan@0 { > + reg = <0x00>; > + aspeed,target-pwm = <25000>; > + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; > + aspeed,fan-tach-ch = /bits/ 8 <0x00>; > + aspeed,pulse-pr = <2>; > + }; > +}; > -- > 2.17.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,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 D09A5C4361B for ; Fri, 11 Dec 2020 03:27:37 +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 78E4E23EB1 for ; Fri, 11 Dec 2020 03:27:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78E4E23EB1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=m7vyTVapFgu/TtuVVeQjoN5rkjjNpjvX2MZtF7ajvkw=; b=ROEXWzTei9xTrh6NFUkZfZuMj QETGKS1sfTKQh08qq9bxWngnsYzuo0/q6a9//oURH2anUQlmONHiUC5IqR2AFDbTm2foVRX0vPuST TgmhaqiOgYxJciYxnnCK0dofcNQgiZ0/5J6UmNi3GNg1cayOarCYODL+hHg6OiEROcpeex5gbRIE6 NEC5eM74YR3ZucH/qfE9Av89Mo2Qj41056XJWEUniym6n+oISfkZDseoiniX50/33d/hErYgKE6YJ 5s0Kz2o2ECVOtXZeOwDrTVB58lteDULVs2y8mEmU+An76npkysA7X5CCRhVBsgODBRWvFg7Ktvai8 lp4Z+MHYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knZ4U-00043A-V8; Fri, 11 Dec 2020 03:26:18 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knZ4S-00042Y-1S for linux-arm-kernel@lists.infradead.org; Fri, 11 Dec 2020 03:26:17 +0000 Received: by mail-ot1-f66.google.com with SMTP id b18so7070588ots.0 for ; Thu, 10 Dec 2020 19:26:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FQJ0xYZsg9VuDPNWynmVTQgQAdgxX+zz3aAN9OxOmEM=; b=r+luxl3O/3xxKL8aMMYJ5Zm8pq5Qhl1FvoGjqLlPRN181aHK4D3srw3RIKFSmwxXh5 FFE5Q45982n+vsmKRzI7mDKQglrtV+8g8wm1xYX2L0eAs7sAUBA/QO0xl3GeZHSAfPvf w45lQvV3kyiLLOImdljxEchgNtzXywiH11pj7c8n+yPYyVoxGOdAV5KDQIuO1KNkkrIA THsmC1oAcCFsSFtb8ulZlslDmQJYCmTOt+sk8LrvtQrhWd98FH2E2eOAC04LiB+blc3n 2XNWux1Lm/ubsbte76K75d7kGTV1E2SN7VgZ0XqpCjxkLIm4WVbpoNhuhRrKScRrggOD Favg== X-Gm-Message-State: AOAM530PpdJq7GOVI1q9S/pCVw7J8d+0EkHFcLWt7hjHljhCNXESuLVG IcVfQOJm/Qxn4MF+suOZpA== X-Google-Smtp-Source: ABdhPJzKUGBasM7BAwLTxygGxXIuMZ4ml/wcGxyjJSYLcS6Bmb5p1q1zlC+Ak1f0+07k0olzZmbmgg== X-Received: by 2002:a9d:3a2:: with SMTP id f31mr8646104otf.216.1607657175132; Thu, 10 Dec 2020 19:26:15 -0800 (PST) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id x66sm1498750oig.56.2020.12.10.19.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 19:26:14 -0800 (PST) Received: (nullmailer pid 3574126 invoked by uid 1000); Fri, 11 Dec 2020 03:26:12 -0000 Date: Thu, 10 Dec 2020 21:26:12 -0600 From: Rob Herring To: Troy Lee Subject: Re: [PATCH 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Message-ID: <20201211032612.GA3565720@robh.at.kernel.org> References: <20201209075921.26689-1-troy_lee@aspeedtech.com> <20201209075921.26689-2-troy_lee@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201209075921.26689-2-troy_lee@aspeedtech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201210_222616_130735_0B77D0F5 X-CRM114-Status: GOOD ( 26.65 ) 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@aspeedtech.com, "moderated list:ARM/ASPEED MACHINE SUPPORT" , Jonathan Corbet , Andrew Jeffery , openbmc@lists.ozlabs.org, "open list:DOCUMENTATION" , open list , billy_tsai@aspeedtech.com, leetroy@gmail.com, Joel Stanley , Philipp Zabel , chiawei_wang@aspeedtech.com, 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 On Wed, Dec 09, 2020 at 03:59:17PM +0800, Troy Lee wrote: > For supporting a new AST2600 PWM/Fan hwmon driver, we add a new binding. > > Signed-off-by: Troy Lee > --- > .../bindings/hwmon/aspeed2600-pwm-tacho.txt | 69 +++++++++++++++++++ Bindings are in DT schema format now. > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > > diff --git a/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > new file mode 100644 > index 000000000000..61b11914352f > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/aspeed2600-pwm-tacho.txt > @@ -0,0 +1,69 @@ > +ASPEED AST2600 PWM and Fan Tacho controller device driver > + > +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. > + > +Required properties for pwm-tacho node: > +- #address-cells : should be 1. > + > +- #size-cells : should be 0. > + > +- #cooling-cells: should be 2. > + > +- reg : address and length of the register set for the device. > + > +- pinctrl-names : a pinctrl state named "default" must be defined. > + > +- pinctrl-0 : phandle referencing pin configuration of the PWM ports. > + > +- compatible : should be "aspeed,ast2600-pwm-tachometer". > + > +- clocks : phandle to clock provider with the clock number in the second cell > + > +- resets : phandle to reset controller with the reset number in the second cell > + > +fan subnode format: > +=================== > +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. > + > +Required properties for each child node: > +- reg : should specify PWM source port. > + integer value in the range 0x00 to 0x0f with 0x00 indicating PWM port 0 > + and 0x0f indicating PWM port F. > + > +- cooling-levels: PWM duty cycle values in a range from 0 to 255 > + which correspond to thermal cooling states. > + > +- aspeed,fan-tach-ch : should specify the Fan tach input channel. > + integer value in the range 0 through 15, with 0 indicating > + Fan tach channel 0 and 15 indicating Fan tach channel 15. > + Atleast one Fan tach input channel is required. Already has 'fan-tach-ch' in npcm750-pwm-fan.txt. > + > +- aspeed,target-pwm : Specify the frequency of PWM. The value range from 24 to > + 780000. Default value will be set to 25000. > + > +- aspeed,pulse-pr : Specify tacho pulse per revolution of the fan. A general > + parameter of pulse-pr is 2. Already have 'pulses-per-revolution' property in pwm-fan.txt. Use that. Really, all these should be in a common fan schema that you reference. > + > +Examples: > + > +&pwm_tacho { > + status = "okay"; Don't show status in examples. > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_tach0_default>; > + > + fan@0 { > + reg = <0x00>; > + aspeed,target-pwm = <25000>; > + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; > + aspeed,fan-tach-ch = /bits/ 8 <0x00>; > + aspeed,pulse-pr = <2>; > + }; > +}; > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel