From patchwork Fri Jun 24 02:26:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chris@lapa.com.au X-Patchwork-Id: 9196419 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 E151A60871 for ; Fri, 24 Jun 2016 02:28:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D21CF2847E for ; Fri, 24 Jun 2016 02:28:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C700128485; Fri, 24 Jun 2016 02:28:09 +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 4B14D2847E for ; Fri, 24 Jun 2016 02:28:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751844AbcFXC02 (ORCPT ); Thu, 23 Jun 2016 22:26:28 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35194 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbcFXC0Z (ORCPT ); Thu, 23 Jun 2016 22:26:25 -0400 Received: by mail-pf0-f193.google.com with SMTP id t190so7988254pfb.2 for ; Thu, 23 Jun 2016 19:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lapa-com-au.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=z3WgUJyMhTdKhD1RRQQOjeUw66qfsSXYy9y0ovzz6s8=; b=Re0yNDlsUXMnbTjRvke4ID0mbhKvq7rElfI+cpmQWExNQmQRQR0FbX7u/EarAiMcYl GzIaBilB/lqlIAcsUf+nTDGhLXWRcnGlx8uqdFeYzJvPHL5SD0itW6qn/mEU3dyDyGJR Hitv+Crd2L9Papl6llGKeQaMq1xn9LRqJ+PrHlN2v3ofi4uPak1OhBoko6OBGzuyDpwq jcpzIwtMeq2ssPSzGkWSANou2c5aYV2eG4R1UnxsxieOiJ3EvovOYW1N1+cvpDdntJar SEMMzA9Gy25M3SArpX4ReIps7tKL7MFJmf9OvtgPMxzIa4URzjU1LHzBZtrCtZnrV24c w+Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=z3WgUJyMhTdKhD1RRQQOjeUw66qfsSXYy9y0ovzz6s8=; b=ha/g7zQyWIKLXCHkJfii/HqYW9cNfOt43idUrEa2WlQ5h/XDUCRJo9huLgdyeT1bDJ wb+ZVpf27GGfNAQIY6gWOel21i19Hd1qa2WDJJoihbW7TNzs6XespZsLEuqs8TyBLUwd YL6fYXl6z1N9BA2zP3u7niH8zbkkY4fCaIary2e2yg6oa0i9CBGp86Q2NbpXm6EAvPQr 7kvQfhEtsEEE5E3akXzC/xrHnyrD5SqXQqrApxmI+mDmqwZ42EybxhZlMwpZPVQUTQt0 AZ3kYbd5Bqbivvrf1a0gWni11bEHjXIGBQ8n3rZ+ilNeuET7p6D32P6Up3IwbRsjhevW +DHg== X-Gm-Message-State: ALyK8tKxifEkiEGNUguAFpSE62cOP3gDJBzm00GMpPLs2NfA5qu4PYKibyKl5n+Ugt6qnQ== X-Received: by 10.98.205.79 with SMTP id o76mr2792358pfg.37.1466735185275; Thu, 23 Jun 2016 19:26:25 -0700 (PDT) Received: from bbb-dev.management.cpd (163.164.70.115.static.exetel.com.au. [115.70.164.163]) by smtp.gmail.com with ESMTPSA id y63sm3094614pfb.13.2016.06.23.19.26.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 19:26:24 -0700 (PDT) From: Chris Lapa X-Google-Original-From: Chris Lapa To: k.kozlowski@samsung.com, dwmw2@infradead.org, dbaryshkov@gmail.com, sre@kernel.org, mark.rutland@arm.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Chris Lapa Subject: [PATCH v5 1/7] max8903: adds documentation for device tree bindings. Date: Fri, 24 Jun 2016 12:26:06 +1000 Message-Id: <1466735172-13372-2-git-send-email-chris@cpdesign.com.au> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466735172-13372-1-git-send-email-chris@cpdesign.com.au> References: <1464849897-21527-3-git-send-email-chris@lapa.com.au> <1466735172-13372-1-git-send-email-chris@cpdesign.com.au> In-Reply-To: <1464849897-21527-3-git-send-email-chris@lapa.com.au> References: <1464849897-21527-3-git-send-email-chris@lapa.com.au> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Chris Lapa Signed-off-by: Chris Lapa --- .../devicetree/bindings/power/max8903-charger.txt | 25 +++++++++++++++ arch/arm/boot/dts/dairytest-servo.dtsi | 36 ++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/max8903-charger.txt create mode 100644 arch/arm/boot/dts/dairytest-servo.dtsi diff --git a/Documentation/devicetree/bindings/power/max8903-charger.txt b/Documentation/devicetree/bindings/power/max8903-charger.txt new file mode 100644 index 0000000..f0f4e12 --- /dev/null +++ b/Documentation/devicetree/bindings/power/max8903-charger.txt @@ -0,0 +1,25 @@ +Maxim Semiconductor MAX8903 Battery Charger bindings + +Required properties: +- compatible: "maxim,max8903" for MAX8903 Battery Charger +- dok-gpios: Valid DC power has been detected (active low, input), optional if uok-gpios is provided +- uok-gpios: Valid USB power has been detected (active low, input), optional if dok-gpios is provided + +Optional properties: +- cen-gpios: Charge enable pin (active low, output) +- chg-gpios: Charger status pin (active low, input) +- flt-gpios: Fault pin (active low, output) +- dcm-gpios: Current limit mode setting (DC=1 or USB=0, output) +- usus-gpios: USB suspend pin (active high, output) + + +Example: + + max8903-charger { + compatible = "maxim,max8903"; + dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; + cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + status = "okay"; + }; diff --git a/arch/arm/boot/dts/dairytest-servo.dtsi b/arch/arm/boot/dts/dairytest-servo.dtsi new file mode 100644 index 0000000..3fbe81d --- /dev/null +++ b/arch/arm/boot/dts/dairytest-servo.dtsi @@ -0,0 +1,36 @@ +#include +#include +#include + +&am33xx_pinmux { + servo_power_pin: pinmux_servo_power_pin{ + pinctrl-single,pins = < + BONE_P9_27 (PIN_OUTPUT| MUX_MODE7) /* ZCZ(C13) - gpio3_19, OUTPUT | MODE7 */ + >; + }; + + ehrpwm2_pin: pinmux_ehrpwm2_pin{ + pinctrl-single,pins = < + BONE_P8_19 (PIN_OUTPUT | MUX_MODE4) /* ZCZ(R1) - ehrpwm2a, OUTPUT | MODE3 */ + >; + }; +}; + +/ { + servo_power { + status = "okay"; + compatible = "pinctrl-single"; + pinctrl-names = "default"; + pinctrl-0 = <&servo_power_pin>; + }; +}; + +&epwmss2 { + status = "okay"; +}; + +&ehrpwm2 { + pinctrl-names = "default"; + pinctrl-0 = <&ehrpwm2_pin>; + status = "okay"; +};