Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp761398pxb; Thu, 21 Jan 2021 20:59:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzt7KfETkMGgYlOiOUMyzGAXgD7O8CiNlhhiZWJpsI3tNXfI2X9BnKDj/+Lkm3cU1hgyGp3 X-Received: by 2002:aa7:c88a:: with SMTP id p10mr1824121eds.204.1611291598439; Thu, 21 Jan 2021 20:59:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611291598; cv=none; d=google.com; s=arc-20160816; b=uPlylC7TqaFcX7MEChc/RshVsoDF+Q/qGj5sUDF61XOzhUwLlbFIqt7GOXrLetmICr jd/1HScEwRvntMgh00EMGMgsfor4A5EspVReVyMksJ+OcVJDPXQE2QJe7g+geAx54HUc c/Q6SG/B7dy8zC0CJy5P0AIhPZ0cm0WkFEx6thuC9d0N1AAPm/3/oQ9zE73fAFtWvfk9 1eryPNU3oFxwtPkNPGzZPpX0Z90SlewEMdODoyhKAwNj/LahxqAQOMWr8Kxo7WOxytEL MOftXt1LyG4KIELmpbKObFMLa38dXXgbtq/boeK+HAlu6VhHZG6J27QdyQwV1DVcY32t g0mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature:dkim-signature; bh=U7g9k3PvYt9UgcoB3XFDaqENiCMcd2hUzwa4zVgQbjY=; b=ttkxhNfCaMS9D5qFP4zugjUPUneDo8mJ8xjcep51D2Cp7cM6csNF8L5HeqGA94ixdR U3zzH8d4wijIRMZOYTiA03GdmvYGJ5rVrjLk1GztBoaunA8wZc7M6h4SoRcaQX9VIWkw 6xvxLtpFWPFhogyJPb95PX8mA6FIWkGpD04aSt4leT2pbrajlzymy63oOeYv+mTz2WAT FMekRQttXZnJe0Um5hITbiPuUsKkGfPX6+czPho0tgIPbJ7pbhLcZEZ8yFAPKxch6MoC kHoYh2WM0Dq7TyMaSMIysm4RlSHlonTRVJaTbZTnhlNroqw3kbMD3EpSOPRybP55kP+c egFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm1 header.b="ZeZ4jq/X"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=hbB0bMoi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si3159290edm.503.2021.01.21.20.59.21; Thu, 21 Jan 2021 20:59:58 -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; dkim=pass header.i=@aj.id.au header.s=fm1 header.b="ZeZ4jq/X"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=hbB0bMoi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726581AbhAVE20 (ORCPT + 99 others); Thu, 21 Jan 2021 23:28:26 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:54295 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbhAVE2Z (ORCPT ); Thu, 21 Jan 2021 23:28:25 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id C82BB580569; Thu, 21 Jan 2021 23:27:18 -0500 (EST) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Thu, 21 Jan 2021 23:27:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=U7g9k3PvYt9UgcoB3XFDaqENiCMcd2h Uzwa4zVgQbjY=; b=ZeZ4jq/XYIdPXNjIuTtcT9lE1GqpKRjf9M7NbsSbfo8rDIV rBruB4VeqwlCo7LzT4wWn0DapnJHsgEpzly9/Q4rC5PQp3QdGmeVTDbEGae0S5Vr YyTBZ2R6PS2tqVMinjdbRP9NHbwSv6q7SWgac7tkJzNNpRPvR2G/xjJFDj7VZRFl bJ93/fKsy2b/SWR2ArP/M6XrvaePZKF502R0ATIMVkG8MUNddw/ewU8aZvqru+fO yIJCBWJ5IJUrwqBszKALkpQVnJbeLfLnYKh2pa7sB0GjDAYe7f61gxbuug2BGvXn wVhRAuTUqz5NE+QTlHnlF1YvzHRFOPy9fD3xs1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=U7g9k3 PvYt9UgcoB3XFDaqENiCMcd2hUzwa4zVgQbjY=; b=hbB0bMoiisltKMA4+XhPyb lHFS+MKVnrhlFupaGRRCpuprgHaMJ8JINdugKvzgk24wxqTQpxRAaFcNo8PrR8MU 9+WDf1uaxLyg+VVzYo4Pz52ANAX9TIoctPbKWfNt6wZqphyjzyqfevGWfmWQhA1q 8qyul/ZVF1Laym4mP4GbKP0jWKlTd1pQ1+ojZO1h1MBaPEg1k/Mzprqld1VFwUzP qtFndVUGppwVqBlFWCEoUxz322qmEXc9rJAbx3qPOytQr9c08psYlq8bpFbPqKeg fW9dV8zQ7Zg5Nun65G6SfgJYDdNZqE/1Y0GbGsTvgCqBb9jMuiWQlX1vPxSW81Nw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudehgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedftehnughr vgifucflvghffhgvrhihfdcuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucggtffrrg htthgvrhhnpeekkeejveejfffhtddtteejtefhkeekvefhfeeihedtgffgleegleffkeej tdffjeenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvgifsegrjhdrihgu rdgruh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 819F4A0005D; Thu, 21 Jan 2021 23:27:17 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-78-g36b56e88ef-fm-20210120.001-g36b56e88 Mime-Version: 1.0 Message-Id: <647428e4-49fb-4e2b-9291-895488c9c7f5@www.fastmail.com> In-Reply-To: <20210118065059.2478078-2-troy_lee@aspeedtech.com> References: <20210118065059.2478078-1-troy_lee@aspeedtech.com> <20210118065059.2478078-2-troy_lee@aspeedtech.com> Date: Fri, 22 Jan 2021 14:56:44 +1030 From: "Andrew Jeffery" To: "Troy Lee" , openbmc@lists.ozlabs.org, "Joel Stanley" , "Philipp Zabel" , "open list" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" Cc: "Ryan Chen" , "Chia-Wei, Wang" , "Troy Lee" , "Rob Herring" Subject: Re: [PATCH v3 1/4] dt-bindings: hwmon: Add Aspeed AST2600 PWM/Fan Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Jan 2021, at 17:20, Troy Lee wrote: > 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 > Reported-by: Rob Herring > --- > .../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 > + > +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. What about using 'bus-frequency' instead? > + > + aspeed,inverse-pin: > + type: boolean > + description: > + Inverse PWM output signal. What's the benefit? I know the hardware provides the function, but do we need to expose it? > + > + aspeed,falling-point: > + $ref: /schemas/types.yaml#/definitions/uint8 > + default: 10 I feel like it probably shouldn't have a default value. > + description: > + Initialize the pulse width. Then can we make the property name a bit more intuitive? 'pwm-duty'? Alternatively, [1] calls the duty "cooling-levels", can we use something in that vein instead? [1] Documentation/devicetree/bindings/hwmon/pwm-fan.txt Andrew