From patchwork Mon Sep 17 20:03:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10603299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44D6C13AD for ; Mon, 17 Sep 2018 20:04:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37B1A26530 for ; Mon, 17 Sep 2018 20:04:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 294E22A3B6; Mon, 17 Sep 2018 20:04:47 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 BBB2626530 for ; Mon, 17 Sep 2018 20:04:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727673AbeIRBdf (ORCPT ); Mon, 17 Sep 2018 21:33:35 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39700 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727792AbeIRBdf (ORCPT ); Mon, 17 Sep 2018 21:33:35 -0400 Received: by mail-pg1-f196.google.com with SMTP id i190-v6so8179608pgc.6 for ; Mon, 17 Sep 2018 13:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=k/EUF7VmhBSTJxxqmSwmngNlcIJOOfxS5CmPMMG7NJA=; b=YT2uEH3O3HxGre6reGIb3IZJt0bzA3FT2Aptmm9ZY9ck36uPLWX9jwD8SpAUErUHPv DUROomB4Js909oAhmd9vIfXqeTfnPDlR/D4Ngl04o3hDw3I7ssJneSBwS6mw6mNud9q/ kelh4BnXUBEj8D/QDGeBq+AyxGjq95fB2ZD/I= 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; bh=k/EUF7VmhBSTJxxqmSwmngNlcIJOOfxS5CmPMMG7NJA=; b=hcLU3KEBuoRPM/1KlUjq2w1nXW7HHsxreS722icBUXXy2VPbzKqqhXOMNXIT8zTnAN BRq6Pb0ORpGheGUpUS0ioFO8kHKJ2qouhOW6F09NgA4W1UPXhGMQbNWczbSm5AN+gT2O f36UwWOqIhlkmpfLgfFxhWbSC0wWzARD31cvX54qw33IFvddtTizjeNC+OLU7avMD6ec Yjn/vmlEGHF8oX4sN7Uuk+uXmNPLHmVN0Z4h3WEM+6lSLN2nYHBitm0WE7i6tT6J5r4w YAcKm7iNJ8dEiQiHJR46AM8JA0g580S5RUKL8VBJpMin3t94xMD0AHzgD4U0mNbT/Bzw slpA== X-Gm-Message-State: APzg51CmRG1I87Jbe3IhZ0xrBnzp/tDP5ClWebqcCtvHa66kagt81nvz gyrQTGxoZ+agiuxmKLNv5HYeTw== X-Google-Smtp-Source: ANB0VdZr79/KikVjfzGSEBLszURWfP/8yHD4OLvGv29rLE/O05+s3bakbelkngNcfSreZ1SwhOgGSw== X-Received: by 2002:a62:b2d3:: with SMTP id z80-v6mr27918689pfl.79.1537214684796; Mon, 17 Sep 2018 13:04:44 -0700 (PDT) Received: from ubuntu.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id i3-v6sm16965857pgq.35.2018.09.17.13.04.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Sep 2018 13:04:44 -0700 (PDT) From: Baolin Wang To: sre@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org, broonie@kernel.org, yuanjiang.yu@spreadtrum.com, krzk@kernel.org Subject: [PATCH v3 1/2] dt-bindings: power: Add Spreadtrum SC2731 charger documentation Date: Mon, 17 Sep 2018 13:03:30 -0700 Message-Id: <8a8d31119bc723a0012afa8e517015dbba68fee9.1537214465.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.9.1 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 This patch adds the binding documentation for Spreadtrum SC2731 charger device. Signed-off-by: Baolin Wang Reviewed-by: Krzysztof Kozlowski --- Changes from v2: - Add reviewed tag from Krzysztof. Changes from v1: - Add parent node. - Add some battery standard properties. --- .../bindings/power/supply/sc2731_charger.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/sc2731_charger.txt diff --git a/Documentation/devicetree/bindings/power/supply/sc2731_charger.txt b/Documentation/devicetree/bindings/power/supply/sc2731_charger.txt new file mode 100644 index 0000000..5266fab --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/sc2731_charger.txt @@ -0,0 +1,40 @@ +Spreadtrum SC2731 PMIC battery charger binding + +Required properties: + - compatible: Should be "sprd,sc2731-charger". + - reg: Address offset of charger register. + - phys: Contains a phandle to the USB phy. + +Optional Properties: +- monitored-battery: phandle of battery characteristics devicetree node. + The charger uses the following battery properties: +- charge-term-current-microamp: current for charge termination phase. +- constant-charge-voltage-max-microvolt: maximum constant input voltage. + See Documentation/devicetree/bindings/power/supply/battery.txt + +Example: + + bat: battery { + compatible = "simple-battery"; + charge-term-current-microamp = <120000>; + constant-charge-voltage-max-microvolt = <4350000>; + ...... + }; + + sc2731_pmic: pmic@0 { + compatible = "sprd,sc2731"; + reg = <0>; + spi-max-frequency = <26000000>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <2>; + #address-cells = <1>; + #size-cells = <0>; + + charger@0 { + compatible = "sprd,sc2731-charger"; + reg = <0x0>; + phys = <&ssphy>; + monitored-battery = <&bat>; + }; + };