From patchwork Sat Mar 11 01:53:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jaghathiswari Rankappagounder Natarajan X-Patchwork-Id: 9618315 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 A7B31604DD for ; Sat, 11 Mar 2017 01:54:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99074287AD for ; Sat, 11 Mar 2017 01:54:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DC01287B4; Sat, 11 Mar 2017 01:54:28 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 121ED287AD for ; Sat, 11 Mar 2017 01:54:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933798AbdCKByL (ORCPT ); Fri, 10 Mar 2017 20:54:11 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:35133 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755610AbdCKBx7 (ORCPT ); Fri, 10 Mar 2017 20:53:59 -0500 Received: by mail-pg0-f48.google.com with SMTP id b129so44929949pgc.2 for ; Fri, 10 Mar 2017 17:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BpplqzoAafGSDP5Yujow0JoNlqlZi+gDijFG5DulOIc=; b=odzNrAVv+3iFaNVkZW8m6R5kgfLWjh4eq90xZVb/kerGXnk9mQVJ7LQj2JMJBYa55x XT+4rqkXv1nJQwI5h39Ww1HxCLOIS5LmGIGNSQs41wT5QkCFkVy6raeGm3eCO/BZiAPa onKGs+86kUb/GA4/Yix1rHQAXxswSoYEhkUYeYodfbILsFVq6CAkO+Z56z29IwTr/HD0 RCDJR2tMQXXm0SR7jsKRpgIOgsHUOwtp+H3/v0vWHGQXQI8z3/xVK2m0aPwhDJAv0oYL TQsp4WdGDFb7OQlaf4SQTCVg+pwILPcGcabAoQ+WWFNCtlafTF9tB+Iv0d7AnK1swVYk BLjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BpplqzoAafGSDP5Yujow0JoNlqlZi+gDijFG5DulOIc=; b=SSSn8e/2TI+LL9UVKpPQ9DY0i+qLpoXZcSKNQQ7BqmYf5whsEG+41iqLLRvV2JpEIt MJuldt8ItNl2/IN5Cx+bpC3bqNeKw05+NtyDYs5uTz2a2kHKSivTQ41YAkemRB6Z2M7a 1yWcIXMPRJRBVo9P6xTEHbRYfM8ztdPDScS4vgXkw0ldcjIKd2/gp/GirkeqVoK1gFMM CxNI+GBkY+mZDqIaf/fmEtFvdeVE/hE9wJzT0H2Q410+QPh/ljL/X3Bfnl8hSXpMBxRY uAn2sCL+NwFYLJRN+WxyRSnXPwEsnvQzZp5YWmrvVqobSTdurjxqRHuzNNzCX8wzG90D ApIA== X-Gm-Message-State: AMke39kmXQqaUjyv/PInlSGi0AliN2sAQBUqtk5A0xN3WKJ/sVH6ywXIZBNrZZKI5Z7TnKrw X-Received: by 10.99.98.6 with SMTP id w6mr23736025pgb.223.1489197238164; Fri, 10 Mar 2017 17:53:58 -0800 (PST) Received: from jaghu22.svl.corp.google.com ([100.123.242.38]) by smtp.gmail.com with ESMTPSA id w131sm20818216pfd.34.2017.03.10.17.53.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Mar 2017 17:53:57 -0800 (PST) From: Jaghathiswari Rankappagounder Natarajan To: joel@jms.id.au, jdelvare@suse.com, linux@roeck-us.net, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, corbet@lwn.net, linux-doc@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org Cc: Jaghathiswari Rankappagounder Natarajan Subject: [PATCH linux v4 1/2] Documentation: dt-bindings: Document bindings for ASPEED AST2400/AST2500 PWM and Fan tach controller device driver Date: Fri, 10 Mar 2017 17:53:50 -0800 Message-Id: <20170311015351.23092-2-jaghu@google.com> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170311015351.23092-1-jaghu@google.com> References: <20170311015351.23092-1-jaghu@google.com> MIME-Version: 1.0 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 This binding provides interface for adding values related to ASPEED AST2400/2500 PWM and Fan tach controller support. The PWM controller can support upto 8 PWM output ports. The Fan tach controller can support upto 16 tachometer inputs. Signed-off-by: Jaghathiswari Rankappagounder Natarajan --- v4: - Used 'reg' v3: - Made the structure more common v2: - Removed '_' in node and property names - Gave some explanation for the properties used .../devicetree/bindings/hwmon/aspeed-pwm-tacho.txt | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt -- 2.12.0.246.ga2ecc84866-goog -- To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt b/Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt new file mode 100644 index 000000000000..0dfd2841ace3 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt @@ -0,0 +1,86 @@ +ASPEED AST2400/AST2500 PWM and Fan Tacho controller device driver + +The ASPEED PWM controller can support upto 8 PWM outputs. The ASPEED Fan Tacho +controller can support upto 16 Fan tachometer inputs. + +There can be upto 8 fans supported. Each fan can have one PWM output and +one/two Fan tach inputs. + +Required properties for pwm-tacho node: +- #address-cells : should be 1. + +- #size-cells : should be 1. + +- 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,aspeed2400-pwm-tacho" for AST2400 or + "aspeed,aspeed2500-pwm-tacho" for AST2500. + +- clocks : a fixed clock providing input clock frequency(PWM + and Fan Tach clock) + +fan subnode format: +=================== +Under fan subnode there can upto 8 child nodes, with each child node +representing a fan. If there are 8 fans each fan can have one PWM port and +one/two Fan tach inputs. + +Required properties for each child node: +- reg : should specify PWM source port. + integer value in the range 0 to 7 with 0 indicating PWM port A and + 7 indicating PWM port H. + + Atleast one tach subnode is required. Each tach subnode represents a fan + tach input. + tach subnode format: + -------------------- + Required properties for each child node: + - fan-ctrl-gpios : should specify the tachometer input GPIO pin on the hardware. + Fan Tachometer function can only work when GPIO is in + ”input mode”. + + - 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. + +Examples: + +pwmtachofixedclk: fixedclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; +} + +pwmtacho: pwmtachocontroller@1e786000 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0x1E786000 0x1000>; + compatible = "aspeed,aspeed2500-pwm-tacho"; + clocks = <&pwmtachofixedclk>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>; + + fan0 { + reg = /bits/ 8 <0x00>; + tach0 { + fan-ctrl-gpios = <&gpio ASPEED_GPIO(O, 0) GPIO_ACTIVE_HIGH>; + fan-tach-ch = /bits/ 8 <0x00>; + }; + }; + + fan1 { + reg = /bits/ 8 <0x01>; + tach0 { + fan-ctrl-gpios = <&gpio ASPEED_GPIO(O, 1) GPIO_ACTIVE_HIGH>; + fan-tach-ch = /bits/ 8 <0x01>; + }; + tach1 { + fan-ctrl-gpios = <&gpio ASPEED_GPIO(O, 2) GPIO_ACTIVE_HIGH>; + fan-tach-ch = /bits/ 8 <0x02>; + }; + }; +};