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: 145753 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2239583ljw; Mon, 3 Sep 2018 01:56:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdakCsZQXPuno9EmiNkVzALNQe8+hB8IEIDNPPYWr8qXeiubAnjgB93+oDwe8eL0UyjLSgc6 X-Received: by 2002:a17:902:904c:: with SMTP id w12-v6mr27426295plz.95.1535964966601; Mon, 03 Sep 2018 01:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535964966; cv=none; d=google.com; s=arc-20160816; b=k1udfQHPOjQPDW9efvsuhR1M2W3zgzl/vNiZSSDdpSP5rHUHk/PLpsc9UB/nvudqth +QDhfywpDhUj+R4ULy7MPVplcvsfijRdTgb8hHEyCwilEst36t3YPJ/Djk+9X+NBQrpQ MTKWiYI5Zlt9Om6W9c6Q82YSpVAtENEcriMmIDWOEUEhj183tWolm0410lsSDm3zTygk Ean8ZmC1OfPlaJx2rJgcfPAqdOFj+JkVHP65tJZVMsMqBLAefbE0GwhU3CLOGWh75DNg By41XYK9usR8oOsa26b3Y2S3juD6CQe14TrEIlKgdl3YkwElh/6fVxo1Z1Xiye/I+dUV 96zg== 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:arc-authentication-results; bh=RP2dGVi+GSbhLrin1RGeUIkqc6qmpzko54taxrj7LGQ=; b=xl75nxMi4D/m+M7W5KoiMG5CxCP3O5gG0AF/c2ZS5CCSe8F417C8oLFj6WXX9vP7dK p1Ds93ZdPQSqFm90VD7XuxebNYIrnpdbRbUAnLPHweVGnTDnWuiTWycj/GmsY8UgzL7V +xPyLTLlDfgbuCSoVc3c9UMFn+WjkO1DAbS+XyjmJzo8OsG4N9YLFKp/tIgHH9yCTFuG LdPc2nRBoa6wc6nDg0AHlETE862CeRPQOrXzZgjxiNpGuLWhJM5QYr3CTJ2QwVeVuR7I FMciBkLqySAcERABncQoDD4wxLX1HfPyuECEb0abVEIsmCcC7/NT2Q3egGPuFw7Y4tlO 41gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GPt1NDz8; 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 m13-v6si17055055pgk.251.2018.09.03.01.56.06; Mon, 03 Sep 2018 01:56:06 -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=GPt1NDz8; 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 S1726160AbeICNPP (ORCPT + 6 others); Mon, 3 Sep 2018 09:15:15 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:46907 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbeICNPO (ORCPT ); Mon, 3 Sep 2018 09:15:14 -0400 Received: by mail-pg1-f194.google.com with SMTP id b129-v6so8301570pga.13 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=TPpA+NR6P3sd8ZiyY+xKbwruCF8ufbvBmig1BuL82r8/1FuqYt2JhZydBn2pQVpppq F9MG0pmC4Y/25y71kaSS7E5UbChAPHlcqizLKSJwR2BnqpKFsBjrYwl/IzjKpJ2Wi/k0 RXdU5APWzDSokx31R9LO9QdSgYmC1AilSbFF9Zf4I5nIo9Nj5lIbehmwEcZlRTHjZkmt eecrvXNVBUJM4XMV3RajnkR0x/kFl9w85ZSXm/f3sXk+PokprXvGDpTQQqFBVPIVfhaF uzvLoBt3FrFs+pGcLK2Pz2MP0aOnmh39+H2rD0Yu8F45g1Y9PgviZHl1m6oQJLfIGtvj 4ywQ== X-Gm-Message-State: APzg51BTshxBSVC+BEgiwNkgVwU5CJjAVgfj4F6wudRf/HDnxr8s7+uW MuSYVPb9Gj9Hs0kKmDPwxES+4A== 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: 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 --- 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.7.9.5 Reviewed-by: Krzysztof Kozlowski 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>; + }; + };