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=-15.3 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, USER_AGENT_SANE_1 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 5BF25C4361B for ; Tue, 15 Dec 2020 14:08:10 +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 04025224D2 for ; Tue, 15 Dec 2020 14:08:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04025224D2 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=AGxn9/fLLol0njtPcYGQbbTsGggm3rQcR4ybSa66tXA=; b=3k/S0nnDYraNkVFT695Lmo559 /Z+rReCCI9/UlTkaG4LQry4oMqnpTZKnO/uHgHJsMJPtebqhh6mritceuZnh+XHfQdzfyycPDu0fy LyNLh8JyEQ/QLOTsFw9kwYpua7vBQJeH+lwoekfeA9UJf2kxlF6LmnMzTyl5/usCirq5rssnFauHT 6AfTeGDRszTpOQIGOtysKLfgrMFjO+hdkMTU5rChxkMp1AnGxflclZSK5GRRqtRzUUu43WG3Ow6jw 0PJTisrAtEnpUnDWN2L/B9NrXi3UtH7rdzBUmpFNetwp7pzyknoDQn3v7/kq3x5QSHbLI1zJXU0j0 psHwMoDXQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpAyL-0005ui-28; Tue, 15 Dec 2020 14:06:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpAyI-0005uZ-Sv for linux-arm-kernel@merlin.infradead.org; Tue, 15 Dec 2020 14:06:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CEvWtgDAAatekWgxK6qAWloBQkxidw/m0Aa1vyWLybA=; b=uQOMoiJRkUDDWArBiKnoC47I+Q JW9+h6Znhx5nim6ZDT5oyt43XiB/Lk67c+XQGXeifHjr/j6JjGoS077wl3qM7fnxF3QunX+oPr8Oh lYfNJFiIGfFtb7E8kDwd4fBJ+XlvB3vK//lrn0tcXt7mlL8Gsljv2K48SnGiY5VAxzUMmdqIh6b9f raCp20HfjLwWf7mzv3D8WfrpBluTceHXiU54pFrOzxUrZREOPlg4C0Dy1Nk/15jMFMTJMxZQM0rwf 8WP0IRa3xShCw1MhXDhPHmLOLktROQEkZpahXk5vA44fX2dEyrjlIHoOsJO65CZJDVY8cR/3TMNEi Hqj5/9Rw==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kp6c3-0006zJ-IZ for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2020 09:27:23 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 0BF9MoOT076087; Tue, 15 Dec 2020 17:22:50 +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; Tue, 15 Dec 2020 17:26:06 +0800 Date: Tue, 15 Dec 2020 17:25:46 +0800 From: Troy Lee To: Rob Herring Subject: Re: [PATCH 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Message-ID: <20201215092545.GA24903@aspeedtech.com> References: <20201209075921.26689-1-troy_lee@aspeedtech.com> <20201209075921.26689-2-troy_lee@aspeedtech.com> <20201211032612.GA3565720@robh.at.kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201211032612.GA3565720@robh.at.kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) 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 0BF9MoOT076087 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201215_092720_195956_A9775C85 X-CRM114-Status: GOOD ( 28.43 ) 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 , Billy Tsai , "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 The 12/11/2020 11:26, Rob Herring wrote: > 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. > I'll submit a new binding with DT schema. > > 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. > OK. > > + > > +- 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. > OK. > Really, all these should be in a common fan schema that you reference. > Are you suggesting that I should also update these properties into pwm-fan.txt with a separeated patch, perhaps? > > + > > +Examples: > > + > > +&pwm_tacho { > > + status = "okay"; > > Don't show status in examples. > Understood, it will be removed in v2. > > + 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