From patchwork Thu Jul 27 08:45:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 9866443 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 549A7603FA for ; Thu, 27 Jul 2017 08:47:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4200F287F8 for ; Thu, 27 Jul 2017 08:47:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3561128769; Thu, 27 Jul 2017 08:47:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A411E287F9 for ; Thu, 27 Jul 2017 08:47:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751566AbdG0Iqo (ORCPT ); Thu, 27 Jul 2017 04:46:44 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:42797 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbdG0Iqi (ORCPT ); Thu, 27 Jul 2017 04:46:38 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C31C320899; Thu, 27 Jul 2017 04:46:37 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 27 Jul 2017 04:46:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=Qm6FSZ o8ibVuHyj92sqzUm+zQtGawmUgl+KKvlZphqM=; b=CheCshGFe6n0lB8iaA93qq FggZgjmff/AJ1qf5ymoCd76m9gbQ6fM1xoFog0L8kFH5c6xPBylZP2ZQy6os8a2M y3UAqxR4siJ281zJ/yLBaLRUegafJDjLG6YHlXaqDhiWx6d/2PV3sBH2Hz4zez+h 7UTe3gfANaN0FO8Uj2ex2uTrXT8umI5Ve+aq/Apy7ZSXBhdNQRLPl29RBOwzlNqW 8tOQ70mapk/x9JoASnkbOxgda2bWSKQbQe5C1qApZRC2R14abPPmssBuWOfVBk4z ZAgkTJIdvBxxaP7QVjlXnFe5xWqAje9uvHUQ3nLX+vqKq710++ak4WGLZCQxGJEQ == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=Qm6FSZo8ibVuHyj92sqzUm+zQtGawmUgl+KKvlZph qM=; b=mDuEr3mNvu1SVcsVniQz881BUs/OtWBFfvEJZMuLiOOr78Fv4UzqlNWft UHRvnvw2wzHlSLz8jGKvYdRmaIpHDLy9F9NKt5n35SXf34TWFwidFb8tLYfbvFQ3 GvqsFC/0nVDGAAvIbwzBUZLBr8R638UUOHQqIbPvirm6i8Qip48D35497lclh9c6 mv1VG+GU7VGJI2Mckg5rjHh9yQ7d3eC1kSQQHIIdMOdAY/GSSN/v/EiN51M+HDNt vIA46bPl2XG5kAR4nFkNQ4PxTNrkn79MnfJ5Z2y8IjtKmV+SKrBZI5QSPDWEKjjn VSfOQNVYSiTXHJdsSssASm0UOKz9g== X-ME-Sender: X-Sasl-enc: HqC5yz92ji96QU1e+Uaw65IHBlnioanRGaXYRV8rLWsx 1501145196 Received: from keelia.aj.id.au (ppp118-210-176-216.bras2.adl6.internode.on.net [118.210.176.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 0BC9F24287; Thu, 27 Jul 2017 04:46:32 -0400 (EDT) From: Andrew Jeffery To: linux@roeck-us.net, linux-hwmon@vger.kernel.org Cc: Andrew Jeffery , robh+dt@kernel.org, mark.rutland@arm.com, jdelvare@suse.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, joel@jms.id.au, mspinler@linux.vnet.ibm.com, msbarth@linux.vnet.ibm.com, openbmc@lists.ozlabs.org Subject: [PATCH 1/3] dt-bindings: hwmon: pmbus: Add Maxim MAX31785 documentation Date: Thu, 27 Jul 2017 18:15:52 +0930 Message-Id: <20170727084554.8794-2-andrew@aj.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170727084554.8794-1-andrew@aj.id.au> References: <20170727084554.8794-1-andrew@aj.id.au> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Andrew Jeffery --- .../devicetree/bindings/hwmon/pmbus/max31785.txt | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/max31785.txt diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/max31785.txt b/Documentation/devicetree/bindings/hwmon/pmbus/max31785.txt new file mode 100644 index 000000000000..96e705434a59 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/pmbus/max31785.txt @@ -0,0 +1,117 @@ +Bindings for the Maxim MAX31785 Intelligent Fan Controller +========================================================== + +Reference: +[1] https://datasheets.maximintegrated.com/en/ds/MAX31785.pdf + +Required properties: +- compatible : One of "maxim,max31785" or "maxim,max31785a" +- reg : I2C address, one of 0x52, 0x53, 0x54, 0x55. +- #address-cells : Must be 1 +- #size-cells : Must be 0 + +Capabilities are configured through subnodes of the controller's node. + +Fans +---- + +Only fans with subnodes present will be marked as installed. + +Required subnode properties: +- compatible : Must be "pmbus-fan" +- reg : The PMBus page the properties apply to. +- maxim,fan-rotor-input : The type of rotor measurement provided to the + controller. Must be either "tach" for tachometer + pulses or "lock" for a locked-rotor signal. +- maxim,fan-lock-polarity: Required iff maxim,fan-rotor-input is "lock". Valid + values are "low" for active low, "high" for active + high. + +Optional subnode properties: +- fan-mode : "rpm" or "pwm". Default value is "pwm". +- tach-pulses : Tachometer pulses per revolution. Valid values are + 1, 2, 3 or 4. The default is 1. +- maxim,fan-no-fault-ramp: Do not ramp the fan to 100% PWM duty on detecting a + fan fault +- maxim,fan-startup : The number of rotations required before taking + emergency action for an unresponsive fan and driving + it with 100% or 0% PWM duty, depending on the state + of maxim,fan-no-fault-ramp. Valid values are 0 + (automatic spin-up disabled), 2, 4, or 8. Default + value is 0. +- maxim,fan-health : Enable automated fan health check +- maxim,fan-ramp : Configures how fast the device ramps the PWM duty + cycle from one value to another. Valid values are 0 + to 7 inclusive, with values 0 - 2 configuring a + 1000ms update rate and 1 - 3% duty respective duty + increase, and 3 - 7 a 200ms update rate with a 1 - + 5% respective duty increase. Default value is 0. +- maxim,fan-no-watchdog : Do not ramp fan to 100% PWM duty on failure to + update desired fan rate inside 10s. This implies + maxim,tmp-no-fault-ramp +- maxim,tmp-no-fault-ramp: Do not ramp fan to 100% PWM duty on temperature + sensor fault detection. This implies + maxim,fan-no-watchdog +- maxim,tmp-hysteresis : The temperature hysteresis used to determine + transitions to lower fan speed bands in the + temperature/fan rate lookup table. Valid values are + 2, 4, 6 or 8 (degrees celcius). Default value is 2. +- maxim,fan-dual-tach : Enable dual tachometer functionality +- maxim,fan-pwm-freq : The PWM frequency. Valid values are 30, 50, 100, 150 + and 25000 (Hz). Default value is 30Hz. +- maxim,fan-lookup-table : A 16-element cell array of alternating temperature + and rate values representing the look up table. The + rate units are set through the fan-mode property. +- maxim,fan-fault-pin-mon: Ramp fans to 100% PWM duty when the FAULT pin is + asserted + +Temperature +----------- + +Required subnode properties: +- compatible : Must be "pmbus-temperature" +- reg : The PMBus page the properties apply to. + +Optional subnode properties: +- maxim,tmp-offset : Valid values are 0 - 30 (degrees celcius) inclusive. + Default value is 0. +- maxim,tmp-fans : An array of fan indexes whose fans are controlled by + the current temperature sensor. Fans are indexed from + zero. The valid values are 0 - 5 inclusive. + +Example: + fan-max31785: max31785@52 { + reg = <0x52>; + compatible = "maxim,max31785"; + #address-cells = <1>; + #size-cells = <0>; + + fan@0 { + compatible = "pmbus-fan"; + reg = <0>; + mode = "rpm"; + tach-pulses = <1>; + maxim,fan-rotor-input = "tach"; + maxim,fan-dual-tach; + }; + + fan@1 { + compatible = "pmbus-fan"; + reg = <1>; + mode = "rpm"; + tach-pulses = <1>; + maxim,fan-rotor-input = "tach"; + maxim,tmp-hysteresis = <2>; + maxim,fan-lookup-table = < + /* Temperature RPM */ + 0 1000 + 10 2000 + 20 3000 + 30 4000 + 40 5000 + 50 6000 + 60 7000 + 70 8000 + >; + }; + };