Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp548220pxu; Fri, 11 Dec 2020 08:25:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRqUDm9VR6UvkO+C7XsR7FGE/G7eHhc1l2nNMBxHtlJdNUfkhtpDNk95sb1yG69HJ540mD X-Received: by 2002:aa7:d511:: with SMTP id y17mr12719975edq.249.1607703953403; Fri, 11 Dec 2020 08:25:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607703953; cv=none; d=google.com; s=arc-20160816; b=uIlTGnnaQnhzhoZw3OWvLEKWb26qWfUn2uiFEhnVtvmfXD+IJ39tVrmCu4K50PY0Pe RdMUbBeyf6vO6ihRxlXSYBLGp8AMlEi58kuED+JSTN63L0RMHZOhz6K14oDfciot800B Peg6blA4+pECa3bd8GMLIYA7/89daKeX4/Q0LeSWFBGfeOj7B41pQpcBdvgA6yiHNj3E fPU9IoStBdm6UT42U9Hq/vVWaypqFEHpflm0/0muvAHozIcmXreJUewqx/t0D7HOvN65 J8ir+5fP/mWz1bY0hzux8WjPPrOxM0acj93WLEiP07f0ywluj6evXwGY36iCquz3vzq2 4Ilw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=FQJ0xYZsg9VuDPNWynmVTQgQAdgxX+zz3aAN9OxOmEM=; b=C5riWUPPU+z2qKRPiy/7bxDsI9OLoap9DwCC+NGksHLn1bXUTQEWUYKw7wcutlVTmD 98r6a3WhOeeYGAoc0p5W5aV885oIl5gfPyRpuCAW52DrSsGtATy0UA5lnW4AQfgSl1+K lQxEp75KrqDNMsm0EL/y1yBdKezox+SqhrVUkhX6uhtInXb9dHW+xXS8xGniLqeGvK/s 0h6rwl4BIC2FjwMFTOUwTy47Dq5IDOgQkCSd29asyfAIiGp46imYc3uX6qECp4KIpLcG +oIiO9xRO1GdRGgukM2FZcSLsDCHdakaYCO7pyur01tNdTth1iBL7bW4ea6Mt7rX2TeI GjGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si4834603edd.415.2020.12.11.08.25.30; Fri, 11 Dec 2020 08:25:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395071AbgLKD1J (ORCPT + 99 others); Thu, 10 Dec 2020 22:27:09 -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-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-kernel@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 >