linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com
Cc: mikko.mutanen@fi.rohmeurope.com, markus.laine@fi.rohmeurope.com,
	Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH 1/3] dt_bindings: ROHM BD99954 Charger
Date: Mon, 10 Feb 2020 14:11:52 +0200	[thread overview]
Message-ID: <fc866eb870e1980fd2a5cd37cf02cde5e8fb3d06.1581327762.git.matti.vaittinen@fi.rohmeurope.com> (raw)
In-Reply-To: <cover.1581327762.git.matti.vaittinen@fi.rohmeurope.com>

The ROHM BD99954 is a Battery Management LSI for 1-4 cell Lithium-Ion
secondary battery. Intended to be used in space-constraint equipment such
as Low profile Notebook PC, Tablets and other applications. BD99954
provides a Dual-source Battery Charger, two port BC1.2 detection and a
Battery Monitor.

Document the DT bindings for BD99954

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
---
I think these properties could probably be generic and not
vendor specific, right? If so, then I could try adding parser
function(s) for them in power/supply framework. How do you
guys see this?

 .../bindings/power/supply/rohm,bd9995x.yaml   | 118 ++++++++++++++++++
 1 file changed, 118 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/rohm,bd9995x.yaml

diff --git a/Documentation/devicetree/bindings/power/supply/rohm,bd9995x.yaml b/Documentation/devicetree/bindings/power/supply/rohm,bd9995x.yaml
new file mode 100644
index 000000000000..ba9fe1dc3f2f
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/rohm,bd9995x.yaml
@@ -0,0 +1,118 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/rohm,bd9995x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ROHM BD99954 Battery charger driver
+
+maintainers:
+  - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
+  - Markus Laine <markus.laine@fi.rohmeurope.com>
+  - Mikko Mutanen <mikko.mutanen@fi.rohmeurope.com>
+
+description: |
+  The ROHM BD99954 is a Battery Management LSI for 1-4 cell Lithium-Ion
+  secondary battery intended to be used in space-constraint equipment such
+  as Low profile Notebook PC, Tablets and other applications. BD99954
+  provides a Dual-source Battery Charger, two port BC1.2 detection and a
+  Battery Monitor.
+
+properties:
+  compatible:
+    const: rohm,bd9995x-charger
+
+  rohm,vbus-input-current-limit-microamp:
+    description:
+      system specific VBUS input current limit (in microamps).
+    minimum: 32000
+    maximum: 16352000
+    multipleOf: 32000
+
+  rohm,vcc-input-current-limit-microamp:
+    description:
+      system specific VCC/VACP input current limit (in microamps).
+    minimum: 32000
+    maximum: 16352000
+    multipleOf: 32000
+
+  rohm,trickle-charging-current-microamp:
+    description:
+      battery specific value for trickle-charging current.
+    minimum: 64000
+    maximum: 1024000
+    multipleOf: 64000
+
+  rohm,pre-charging-current-microamp:
+    description:
+      battery specific value for pre-charging current.
+    minimum: 64000
+    maximum: 1024000
+    multipleOf: 64000
+
+  rohm,fast-charging-regulation-microvolt:
+    description:
+      battery/system specific upper limit for battry/system voltage.
+    minimum: 2560000
+    maximum: 19200000
+    multipleOf: 16000
+
+  rohm,vsys-regulation-microvolt:
+    description:
+      system specific lower limit for system voltage.
+    minimum: 2560000
+    maximum: 19200000
+    multipleOf: 64000
+
+  rohm,pre-charge-voltage-threshold-microvolt:
+    description:
+      voltage limit for changing from trickle to pre-charging.
+    minimum: 2048000
+    maximum: 19200000
+    multipleOf: 64000
+
+  rohm,re-charge-battery-voltage-microvolt:
+    description:
+      voltage limit for automatically re-starting the battery charging.
+    minimum: 2560000
+    maximum: 19200000
+    multipleOf: 16000
+
+  rohm,battery-over-voltage-threshold-microvolt:
+    description:
+      voltage limit for detecting battery over voltage.
+    minimum: 2560000
+    maximum: 19200000
+    multipleOf: 16000
+
+required:
+  - compatible
+  - rohm,vbus-input-current-limit-microamp
+  - rohm,vcc-input-current-limit-microamp
+  - rohm,trickle-charging-current-microamp
+  - rohm,pre-charging-current-microamp
+  - rohm,fast-charging-regulation-microvolt
+  - rohm,vsys-regulation-microvolt
+  - rohm,pre-charge-voltage-threshold-microvolt
+  - rohm,re-charge-battery-voltage-microvolt
+  - rohm,battery-over-voltage-threshold-microvolt
+
+examples:
+  - |
+    i2c {
+        charger@9 {
+            compatible = "rohm,bd9995x-charger";
+            reg = <0x9>;
+            interrupt-parent = <&gpio1>;
+            interrupts = <29 8>;
+            rohm,vsys-regulation-microvolt = <8960000>;
+            rohm,vbus-input-current-limit-microamp = <1472000>;
+            rohm,vcc-input-current-limit-microamp = <1472000>;
+            rohm,trickle-charging-current-microamp = <256000>;
+            rohm,pre-charging-current-microamp = <256000>;
+            rohm,fast-charging-regulation-microvolt = <8400000>;
+            rohm,pre-charge-voltage-threshold-microvolt = <2048000>;
+            rohm,re-charge-battery-voltage-microvolt = <8112000>;
+            rohm,battery-over-voltage-threshold-microvolt = <8912000>;
+        };
+    };
-- 
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 =] 

  reply	other threads:[~2020-02-10 12:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 12:11 [RFC PATCH 0/3] Support ROHM BD99954 charger IC Matti Vaittinen
2020-02-10 12:11 ` Matti Vaittinen [this message]
2020-02-10 13:00   ` [RFC PATCH 1/3] dt_bindings: ROHM BD99954 Charger Vaittinen, Matti
2020-02-10 12:13 ` [RFC PATCH 2/3] power: (regmap:) Add linear_range helper Matti Vaittinen
2020-02-11 19:06   ` Mark Brown
2020-02-12  6:56     ` Vaittinen, Matti
2020-02-14 11:47       ` Mark Brown
2020-02-14 12:32         ` Vaittinen, Matti
2020-02-18  7:23           ` Vaittinen, Matti
2020-02-18 13:49             ` Mark Brown
2020-02-19  8:14               ` Vaittinen, Matti
2020-02-10 12:13 ` [RFC PATCH 3/3] power: supply: Support ROHM bd99954 charger Matti Vaittinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc866eb870e1980fd2a5cd37cf02cde5e8fb3d06.1581327762.git.matti.vaittinen@fi.rohmeurope.com \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=markus.laine@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=mikko.mutanen@fi.rohmeurope.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).