Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp163568ybj; Fri, 8 May 2020 08:49:05 -0700 (PDT) X-Google-Smtp-Source: APiQypLECdaLvuuHyMH41bQEu7+Bt7YeF0ZGp6+VsOXQ8t+ZHjmBF7B/KVFsz64uKlCSl+26mPuK X-Received: by 2002:a50:f390:: with SMTP id g16mr2549340edm.211.1588952945174; Fri, 08 May 2020 08:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588952945; cv=none; d=google.com; s=arc-20160816; b=ugMDMxh8fhDPJRGdrOs1i5PuNiVOeYf4Rj2bfFoeBEcn06PIVYXqlwx+8yOSu6v5/v pKsNdzyEmQSid5Vb2UrkHgC/3tT/+cXpMn1GK6/C9+9ef+f74n9xwFhyAOQMXB9EWfx5 pbJHYB47OfpywZGK+hAnU+vbGm4p9XtzLj5dnrd5g/8/qTLg0UfjgNTIwjI2I0mSuX5r dkQzEyDNlpIqgF3QpelY61uMsLmWzN5F3xxWgcZ6wmnlY87EmfN7qI4swJfLZgeEgNg9 wVFOflxWJu35IRKyJzRrZZvTielGIScyT1LYD6jsw1SbbB9vRwMSLZXoJO0N9uTxp1sF +nmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KprKeb/h9kjW27OoSf2ZZ4Ya0v6rQT0g3k0Y7DumGOM=; b=KvKZ+FReD+kx7yLzZigriRHmQgE1GhHOBVFUPVKY1JNJ9xxTVnropGlV+KYeREbF97 n0xlT0TzqY6Qp2UoO2wUW3wca3sJsAqAGXK2TfZAk5POWZjkTGEtUW6mrvC+fiXcCWym WlbFMcBcdzZIwfsqQURVk5bWtx9jT6QE8OL9XZ9ezmX5XrKY0e7koUaCH458R+lkEV1m fZLL5NM627kP9wL7P8zKdy8vacItx1lS5Yj4v4spD/iKWKFVM4ofDkrvlEmmojnKAX+p v1CNHqbiEfio5l1guvvOAm32DrjgOB1Vn+Tep6veDyUwnOvQivUOaEX/jofmYdDW+5C0 TVnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc26si478196edb.32.2020.05.08.08.48.42; Fri, 08 May 2020 08:49:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728300AbgEHPrK (ORCPT + 99 others); Fri, 8 May 2020 11:47:10 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35070 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728188AbgEHPrJ (ORCPT ); Fri, 8 May 2020 11:47:09 -0400 Received: by mail-lf1-f67.google.com with SMTP id x73so1791408lfa.2; Fri, 08 May 2020 08:47:06 -0700 (PDT) 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=KprKeb/h9kjW27OoSf2ZZ4Ya0v6rQT0g3k0Y7DumGOM=; b=W8JBZwKyvLMp+6zKoGup3yCa2Rn+91vUGmkVfdLrAtu7xhv0/CJhCPVYOR05at8pT7 4KN5kCjl8CSWAJeOBN/HoFMIOXzVtJJvf1MpUt7Du+SmpRpUAEIuB1A1QXC8p+Ru70o8 zH4XB1mqGr6Rf0rZoviQaabQDRsWlVIUjtYMaKXmxwfRsoa6WX1ojt8TWIMUH/7Ol3Ev AiT3hfSH7b7e0nt3E8bVUU7CD2KmKmtpAjA5LCT+2MDdI9i7XsVr1xALwnR+ixaMSkJE Ufl/R7DVuYdo134JxkRc9QNrsNiImR/64HPvBUZqcEW/h1jbYKwV2Cd/MYkSAct2pMV+ jpUg== X-Gm-Message-State: AOAM532dOb4EN4AabgnOZow190MxVMStvYaymbhDVad6gnxM/VBJih6g /cKXYzrdR2zXwMpDFQDUIao= X-Received: by 2002:a19:7d02:: with SMTP id y2mr2274606lfc.146.1588952825594; Fri, 08 May 2020 08:47:05 -0700 (PDT) Received: from localhost.localdomain (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id p13sm1447163ljg.103.2020.05.08.08.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 08:47:04 -0700 (PDT) Date: Fri, 8 May 2020 18:46:17 +0300 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: lgirdwood@gmail.com, broonie@kernel.org, sre@kernel.org, brendanhiggins@google.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v12 06/11] dt-bindings: battery: add new battery parameters Message-ID: <6cfb1a37acc763143927b9541744b7bb66fbd2d8.1588944082.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 Reviewed-by: Sebastian Reichel --- 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 -- 2.21.0 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =]