From patchwork Mon Sep 3 08:55:45 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: 10585617 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 2CAFF920 for ; Mon, 3 Sep 2018 08:56:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C0FC29188 for ; Mon, 3 Sep 2018 08:56:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 000A92951A; Mon, 3 Sep 2018 08:56:07 +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 9964029188 for ; Mon, 3 Sep 2018 08:56:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727100AbeICNPP (ORCPT ); Mon, 3 Sep 2018 09:15:15 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39173 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726160AbeICNPO (ORCPT ); Mon, 3 Sep 2018 09:15:14 -0400 Received: by mail-pg1-f193.google.com with SMTP id i190-v6so1270491pgc.6 for ; Mon, 03 Sep 2018 01:56:04 -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=RP2dGVi+GSbhLrin1RGeUIkqc6qmpzko54taxrj7LGQ=; b=GPt1NDz8GX1mmOkqk/R2MZZz7/G8K9x6yGjldgOGHi1Oxzuyy05ppv0JGCTusil+iI bBAx5qEuEtZi1C+eEglRw/HDRoqGW+b0TGrwtbPZcbs6YI4yRcY44PqscaU6enI6rSQG 66iWtJwmkFZgvzMPM+nt9V2r/5VW1NirZwYAo= 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=RP2dGVi+GSbhLrin1RGeUIkqc6qmpzko54taxrj7LGQ=; b=FgdmLwYmRf12+aQQic26AAIiSYij4ST3B3xAA7px+R1MALi07KDUQZyUMsp30OClmp okXIOmzeftX9yz/LP9+yqjyvbZn4Yd8np1z3VsdmOMIBjV6SO0A20t3M/OWxWS+GQtw4 3V/JFR0KaZa3G3QK4t2d/gXeAjCc87ca3eslXw0w4z4lZcq2rQXoZ6Ie5xHWTVzGsYGN sly7rmf7c4ilq7RjcGSwfO0iiabD80nO0JBN/EjHyJPHNQeRjU3SImAV0ValjFaq/TwM MlBaIQu0tgRog3nDCyUisknQvZaV8XUXJmfj+68Vvhu095uvkbFf125WI8E6uAaXJ8kP /ZFQ== X-Gm-Message-State: APzg51BfxXPZ8dPxpoztKy0/+KLuaRK67/a3RZeQOXWFBAmXic5wrCRz J/Jw81KghpIyZKxSUbdcg784GA== X-Google-Smtp-Source: ANB0VdbpGulqbnehFFV3/6x7+zuEiGluEPLjIfnulCvVkK2Gmcm1GKXcDcGppcxvofGp/Ja4HYoxTA== X-Received: by 2002:aa7:86cb:: with SMTP id h11-v6mr28075561pfo.58.1535964964007; Mon, 03 Sep 2018 01:56:04 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id 87-v6sm30984814pfn.103.2018.09.03.01.56.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Sep 2018 01:56:03 -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, yuanjiang.yu@unisoc.com, baolin.wang@linaro.org, broonie@kernel.org, krzk@kernel.org Subject: [PATCH v2 1/2] dt-bindings: power: Add Spreadtrum SC2731 charger documentation Date: Mon, 3 Sep 2018 16:55:45 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 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 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>; + }; + };