From patchwork Tue Feb 25 08:52:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1243934 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48RXkD4CP3z9sPK for ; Tue, 25 Feb 2020 19:52:20 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729205AbgBYIwU (ORCPT ); Tue, 25 Feb 2020 03:52:20 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33456 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726916AbgBYIwT (ORCPT ); Tue, 25 Feb 2020 03:52:19 -0500 Received: by mail-lj1-f196.google.com with SMTP id y6so13148266lji.0; Tue, 25 Feb 2020 00:52:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Gii62aW++pR74nYBt74sL6Yi7EVbnZGVzniidCX/aH4=; b=Aq47jDe0mEDf09kl7pgSrZmoiNaHWKcWgCTNyREtCohkWHv39kHRXKEPd03g/YYhk1 hOYTQuPDQmYu1BjxnQdA70JqAgDKLKxU137iLLcGJm2F6dEmixgoH8Ivhh3aMZbCoL8R QJjRoPRyCiEQmGDCrGYWNwcz9VlIGhSQtK8NUMJ8SKppOM5X/yjZOpxpbs5okCPPbjbo 8afytIX34Ufmv+6VIB1RzZasp4Ii2kp/4vXacAoPflhSZqGOA5qF6at38f/v295ojMp+ yBBhegcHj291dA79waHTG7BGWd8hOEcSntYqA0KFtb8bp4jIJC+DOQr92G99kelc1j55 RrjQ== X-Gm-Message-State: APjAAAUBNu/gtFAHwUA04f0Z8FVlpvyoUEc7p7tJF4wgFOTt3JZ4XRzb b1GjLWKLqq0FHJ2u++5FBuLbISaB X-Google-Smtp-Source: APXvYqxUfGhgbjUVDG3LikTmVkXivuxd1GCNq0KHsfnbXlYUvD3NSfcdPUlha8oxaqoYitrUEYXf6g== X-Received: by 2002:a2e:b5ce:: with SMTP id g14mr30509217ljn.264.1582620737024; Tue, 25 Feb 2020 00:52:17 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id w19sm6966470lfl.55.2020.02.25.00.52.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 00:52:16 -0800 (PST) Date: Tue, 25 Feb 2020 10:52:04 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Sebastian Reichel , Rob Herring , Mark Rutland , Greg Kroah-Hartman , "Rafael J. Wysocki" , Liam Girdwood , Mark Brown , Matti Vaittinen , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Laine , Mikko Mutanen Subject: [PATCH v4 1/9] dt-bindings: battery: add new battery parameters Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add: - trickle-charge-current-microamp: Some chargers have 3 charging stages. First one when battery is almost empty is often called as trickle-charge. Last state when battery has been "woken up" is usually called as fast-charge. In addition to this some chargers have a 'middle state' which ROHM BD99954 data-sheet describes as pre-charge. Some batteries can benefit from this 3-phase charging [citation needed]. Introduce trickle-charge-current-microamp so that batteries can give charging current limit for all three states. - precharge-upper-limit-microvolt: When battery voltage has reached certain limit we change from trickle-charge to next charging state (pre-charge for BD99954). Allow battery to specify this limit. - re-charge-voltage-microvolt: Allow giving a battery specific voltage limit for chargers which can automatically re-start charging when battery has discharghed down to this limit. - over-voltage-threshold-microvolt Allow specifying voltage threshold after which the battery is assumed to be faulty. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring --- Changes from rfc-v3: Fixed typo in commit message battry => battery Documentation/devicetree/bindings/power/supply/battery.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt index 3049cf88bdcf..5e29595edd74 100644 --- a/Documentation/devicetree/bindings/power/supply/battery.txt +++ b/Documentation/devicetree/bindings/power/supply/battery.txt @@ -11,15 +11,21 @@ different type. This prevents unpredictable, potentially harmful, behavior should a replacement that changes the battery type occur without a corresponding update to the dtb. +Please note that not all charger drivers respect all of the properties. + Required Properties: - compatible: Must be "simple-battery" Optional Properties: + - over-voltage-threshold-microvolt: battery over-voltage limit + - re-charge-voltage-microvolt: limit to automatically start charging again - voltage-min-design-microvolt: drained battery voltage - voltage-max-design-microvolt: fully charged battery voltage - energy-full-design-microwatt-hours: battery design energy - charge-full-design-microamp-hours: battery design capacity + - trickle-charge-current-microamp: current for trickle-charge phase - precharge-current-microamp: current for pre-charge phase + - precharge-upper-limit-microvolt: limit when to change to constant charging - charge-term-current-microamp: current for charge termination phase - constant-charge-current-max-microamp: maximum constant input current - constant-charge-voltage-max-microvolt: maximum constant input voltage