diff mbox series

[v4,RESEND,1/4] dt-bindings: Add Rockchip rk817 battery charger support

Message ID 20210916194208.10387-2-macroalpha82@gmail.com
State New
Headers show
Series [v4,RESEND,1/4] dt-bindings: Add Rockchip rk817 battery charger support | expand

Commit Message

Chris Morgan Sept. 16, 2021, 7:42 p.m. UTC
From: Chris Morgan <macromorgan@hotmail.com>

Create dt-binding documentation to document rk817 battery and charger
usage. New device-tree properties have been added.

- rockchip,resistor-sense-micro-ohms: The value in microohms of the
                                      sample resistor.
- rockchip,sleep-enter-current-microamp: The value in microamps of the
                                         sleep enter current.
- rockchip,sleep-filter-current: The value in microamps of the sleep
                                 filter current.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
---
 .../devicetree/bindings/mfd/rk808.txt         | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)

Comments

Rob Herring Sept. 22, 2021, 7:19 p.m. UTC | #1
On Thu, Sep 16, 2021 at 02:42:05PM -0500, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>

> 

> Create dt-binding documentation to document rk817 battery and charger

> usage. New device-tree properties have been added.

> 

> - rockchip,resistor-sense-micro-ohms: The value in microohms of the

>                                       sample resistor.

> - rockchip,sleep-enter-current-microamp: The value in microamps of the

>                                          sleep enter current.

> - rockchip,sleep-filter-current: The value in microamps of the sleep

>                                  filter current.

> 

> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>

> ---

>  .../devicetree/bindings/mfd/rk808.txt         | 38 +++++++++++++++++++

>  1 file changed, 38 insertions(+)


You've also submitted converting this to schema. Please make the 
dependencies explicit. 

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/rk808.txt b/Documentation/devicetree/bindings/mfd/rk808.txt
index 23a17a6663ec..6e1b9fb1f64a 100644
--- a/Documentation/devicetree/bindings/mfd/rk808.txt
+++ b/Documentation/devicetree/bindings/mfd/rk808.txt
@@ -77,6 +77,37 @@  Optional RK817 properties:
 - rockchip,mic-in-differential: Telling if the microphone uses differential
 				mode. Should be under the codec child node.
 
+- battery:	The child node for the charger to hold additional properties.
+		If a battery is not in use, this node can be omitted. If a
+		battery node is used, the following values are required in the
+		battery node itself:
+		rockchip,resistor-sense-micro-ohms,
+		rockchip,sleep-enter-current-microamp,
+		rockchip,sleep-filter-current-microamp,
+		Additionally, a phandle to a monitored-battery node that
+		contains the following is also required:
+		charge-full-design-microamp-hours,
+		charge-term-current-microamp,
+		constant-charge-current-max-microamp,
+		constant-charge-voltage-max-microvolt,
+		voltage-max-design-microvolt,
+		voltage-min-design-microvolt,
+		and a valid ocv-capacity table.
+- rockchip,resistor-sense-micro-ohms: Value in microohms of the battery sense
+				      resistor. The PMIC only supports values
+				      of either 10000 or 20000. This value is
+				      used by the driver to set the correct
+				      divisor value to translate ADC readings
+				      into the proper units of measure.
+- rockchip,sleep-enter-current-microamp: Value in microamps of the sleep enter
+					 current for the charger. Value is used
+					 by the driver to calibrate the relax
+					 threshold.
+- rockchip,sleep-filter-current-microamp: Value in microamps of the sleep
+					  filter current for the charger.
+					  Value is used by the driver to derive
+					  the sleep sample current.
+
 Optional RK818 properties:
 - vcc1-supply:  The input supply for DCDC_REG1
 - vcc2-supply:  The input supply for DCDC_REG2
@@ -459,6 +490,13 @@  Example:
 			};
 		};
 
+		rk817_battery: battery {
+			monitored-battery = <&battery_cell>;
+			rockchip,resistor-sense-micro-ohms = <10000>;
+			rockchip,sleep-enter-current-microamp = <300000>;
+			rockchip,sleep-filter-current-microamp = <100000>;
+		};
+
 		rk817_codec: codec {
 			rockchip,mic-in-differential;
 		};