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: 146860 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4181277ljw; Mon, 17 Sep 2018 13:04:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYA1wfbBSrhbMHVD8rpG2K3Xm0aN+VUGZ03P9eSYsmxGHopy92FNAZYc1rEVsfPC2UyhEdC X-Received: by 2002:a17:902:bd98:: with SMTP id q24-v6mr10555168pls.22.1537214686788; Mon, 17 Sep 2018 13:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537214686; cv=none; d=google.com; s=arc-20160816; b=oxOYOut5ODdqdrK78brYUj1twamLD1SvBuZ9sZFNavn/4a1q896zMLnyOSI5XLFcna 0gYFtWQxwnwzCuDck453SUH8cdWdXJMUCaHvFpe6MvAqBBMU+I/LFkV9n1Fn8jdhHXrD Z6nCJfyqGfsswXRBrG70xy8GMKe6cY+1Cu8haJG7WKCwrVm/wfAEv5TCrXDc3A02qR6j aXLHIxd+6XeURD9z9LkPtfE9b4+IdbHFR6BiqD4cX8O11YBF5/tstv2sgnrcqlV0Mp0I Ei7v6+guyJzotSpMYT4u+9moCot0tuIRpL66OqVKYCyJTf/i0cxwmByU9e+EFWx7REKt vJGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=k/EUF7VmhBSTJxxqmSwmngNlcIJOOfxS5CmPMMG7NJA=; b=DnNNL3oMb/rvhhwptePkby6kQ6emEny3H2z0xG3zVASdmpTuflIGNB/FpoR9SLSKrb eYWwv2+lOtPnHcbCu9TqO3ybDcEcneOAVAhr6SSTOwW/IcPgAjUJQgaQsWt/8OoD4hUP bJp7SFmVOK4CTq1yL/Cz0GuPfAke4/g3QdT89vu4KmPGWKCSgTX4F2U7QY5f6+szQk4c 8IWufzjwpOc8G2f7faJTEc+XAH0ByHbgTykrE2PnCRFnNIvOOqKfo1sxyY6zMG22Txya CcKU+Ax/QWwiVv89HQBmnKIi5ZcXpxYzAe8dVRiK8XWDllBv3gS1XuArhCD2Z+WK5Qgy PdFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YT2uEH3O; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17-v6si15056795pgc.464.2018.09.17.13.04.46; Mon, 17 Sep 2018 13:04:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YT2uEH3O; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727832AbeIRBdf (ORCPT + 6 others); Mon, 17 Sep 2018 21:33:35 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41927 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727673AbeIRBdf (ORCPT ); Mon, 17 Sep 2018 21:33:35 -0400 Received: by mail-pg1-f195.google.com with SMTP id s15-v6so8172217pgv.8 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=iD+OmiPEHG4HLUVj2u0H8DAw79yoXLzaaSfd5sLgZqzTMtjgxuvVGeXwhzAOrTRUFA 1PDV2wfVv+SnHQkulYDv04BVwlVxKnHyHiMV8Qr2E22b3xjftRpvcLP1GrzCbKVaNPss xe06GjAxVzP7v+u0fP0xcAS9qg7uSXnor6chwUhB5NpUcrYKkmCkOr0pqZ9UZPDiERDo 1zq1o67dMPL67+alAQ1niLvs95XWM5yxmuOoRcOl4jBh1HS3jzk75Ry/LVbLdNxzLJPu pjbupB/zVSo9LCDs9DQ7pGZbBl9C5xIguBWX/vEzH6URI6IUlB5ZnmLuB2DY5/uLcxk8 qzUQ== X-Gm-Message-State: APzg51BQ/+jrKPhSecAVfvH6AxZY6P1ECfSmMNWRrIt1ru7yPRsjOTin vjHQMEy/Up+WLScq5xFx55JWtQ== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 -- 1.9.1 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>; + }; + };