[RFC PATCH 1/3] dt_bindings: ROHM BD99954 Charger

From: Matti Vaittinen
Date: Mon Feb 10 2020 - 07:12:05 EST


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@xxxxxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxxxxx>
+ - Markus Laine <markus.laine@xxxxxxxxxxxxxxxxx>
+ - Mikko Mutanen <mikko.mutanen@xxxxxxxxxxxxxxxxx>
+
+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 =]