Re: [EXTERNAL] Re: [PATCH v3 1/2] dt-bindings: power: Add the bq256xx dt bindings

2020-09-22 Thread Ricardo Rivera-Matos

Dan

On 9/22/20 8:05 PM, Dan Murphy wrote:

RIcardo

On 9/22/20 5:56 PM, Ricardo Rivera-Matos wrote:

Rob

On 9/22/20 5:22 PM, Rob Herring wrote:

On Thu, Sep 10, 2020 at 11:45:33AM -0500, Ricardo Rivera-Matos wrote:

Add the bindings for the bq256xx series of battery charging ICs.

Datasheets:
- https://www.ti.com/lit/ds/symlink/bq25600.pdf
- https://www.ti.com/lit/ds/symlink/bq25601.pdf
- https://www.ti.com/lit/ds/symlink/bq25600d.pdf
- https://www.ti.com/lit/ds/symlink/bq25601d.pdf
- https://www.ti.com/lit/ds/symlink/bq25611d.pdf
- https://www.ti.com/lit/ds/symlink/bq25618.pdf
- https://www.ti.com/lit/ds/symlink/bq25619.pdf

Signed-off-by: Ricardo Rivera-Matos 
---
  .../bindings/power/supply/bq256xx.yaml    | 97 
+++

  1 file changed, 97 insertions(+)
  create mode 100644 
Documentation/devicetree/bindings/power/supply/bq256xx.yaml


diff --git 
a/Documentation/devicetree/bindings/power/supply/bq256xx.yaml 
b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml

new file mode 100644
index ..8cc2242f7df0
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# Copyright (C) 2020 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/bq256xx.yaml#;
+$schema: "http://devicetree.org/meta-schemas/core.yaml#;
+
+title: TI bq256xx Switch Mode Buck Charger
+
+maintainers:
+  - Ricardo Rivera-Matos 
+
+description: |
+  The bq256xx devices are a family of highly-integrated battery 
charge
+  management and system power management ICs for single cell 
Li-ion and Li-

+  polymer batteries.
+
+  Datasheets:
+    - https://www.ti.com/lit/ds/symlink/bq25600.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25601.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25600d.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25601d.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25611d.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25618.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25619.pdf
+
+properties:
+  compatible:
+    enum:
+  - ti,bq25600
+  - ti,bq25601
+  - ti,bq25600d
+  - ti,bq25601d
+  - ti,bq25611d
+  - ti,bq25618
+  - ti,bq25619
+
+  reg:
+    maxItems: 1
+
+  ti,watchdog-timer:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+  Watchdog timer in ms. 0 (default) disables the watchdog
+    minimum: 0
+    maximum: 16
+    enum: [ 0, 4, 8, 16]
+
+  input-voltage-limit-microvolt:
+    description: |
+   Minimum input voltage limit in µV with a 10 µV step
+    minimum: 390
+    maximum: 540
+
+  input-current-limit-microamp:
+    description: |
+   Maximum input current limit in µA with a 10 µA step
+    minimum: 10
+    maximum: 320
+
+required:
+  - compatible
+  - reg
+  - monitored-battery

additionalProperties: false

And then fix what breaks in the example.
ACK. I will document the monitored-battery and interrupts properties 
and fix the example. Is ti,watchdog-timer okay as it is currently 
documented?


For TI consistency please use ti,watchdog-timeout-ms

ACK, thanks.


Dan

Ricardo




Re: [EXTERNAL] Re: [PATCH v3 1/2] dt-bindings: power: Add the bq256xx dt bindings

2020-09-22 Thread Dan Murphy

RIcardo

On 9/22/20 5:56 PM, Ricardo Rivera-Matos wrote:

Rob

On 9/22/20 5:22 PM, Rob Herring wrote:

On Thu, Sep 10, 2020 at 11:45:33AM -0500, Ricardo Rivera-Matos wrote:

Add the bindings for the bq256xx series of battery charging ICs.

Datasheets:
- https://www.ti.com/lit/ds/symlink/bq25600.pdf
- https://www.ti.com/lit/ds/symlink/bq25601.pdf
- https://www.ti.com/lit/ds/symlink/bq25600d.pdf
- https://www.ti.com/lit/ds/symlink/bq25601d.pdf
- https://www.ti.com/lit/ds/symlink/bq25611d.pdf
- https://www.ti.com/lit/ds/symlink/bq25618.pdf
- https://www.ti.com/lit/ds/symlink/bq25619.pdf

Signed-off-by: Ricardo Rivera-Matos 
---
  .../bindings/power/supply/bq256xx.yaml    | 97 
+++

  1 file changed, 97 insertions(+)
  create mode 100644 
Documentation/devicetree/bindings/power/supply/bq256xx.yaml


diff --git 
a/Documentation/devicetree/bindings/power/supply/bq256xx.yaml 
b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml

new file mode 100644
index ..8cc2242f7df0
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# Copyright (C) 2020 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/bq256xx.yaml#;
+$schema: "http://devicetree.org/meta-schemas/core.yaml#;
+
+title: TI bq256xx Switch Mode Buck Charger
+
+maintainers:
+  - Ricardo Rivera-Matos 
+
+description: |
+  The bq256xx devices are a family of highly-integrated battery charge
+  management and system power management ICs for single cell Li-ion 
and Li-

+  polymer batteries.
+
+  Datasheets:
+    - https://www.ti.com/lit/ds/symlink/bq25600.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25601.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25600d.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25601d.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25611d.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25618.pdf
+    - https://www.ti.com/lit/ds/symlink/bq25619.pdf
+
+properties:
+  compatible:
+    enum:
+  - ti,bq25600
+  - ti,bq25601
+  - ti,bq25600d
+  - ti,bq25601d
+  - ti,bq25611d
+  - ti,bq25618
+  - ti,bq25619
+
+  reg:
+    maxItems: 1
+
+  ti,watchdog-timer:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+  Watchdog timer in ms. 0 (default) disables the watchdog
+    minimum: 0
+    maximum: 16
+    enum: [ 0, 4, 8, 16]
+
+  input-voltage-limit-microvolt:
+    description: |
+   Minimum input voltage limit in µV with a 10 µV step
+    minimum: 390
+    maximum: 540
+
+  input-current-limit-microamp:
+    description: |
+   Maximum input current limit in µA with a 10 µA step
+    minimum: 10
+    maximum: 320
+
+required:
+  - compatible
+  - reg
+  - monitored-battery

additionalProperties: false

And then fix what breaks in the example.
ACK. I will document the monitored-battery and interrupts properties 
and fix the example. Is ti,watchdog-timer okay as it is currently 
documented?


For TI consistency please use ti,watchdog-timeout-ms

Dan




Re: [EXTERNAL] Re: [PATCH v3 1/2] dt-bindings: power: Add the bq256xx dt bindings

2020-09-22 Thread Ricardo Rivera-Matos

Rob

On 9/22/20 5:22 PM, Rob Herring wrote:

On Thu, Sep 10, 2020 at 11:45:33AM -0500, Ricardo Rivera-Matos wrote:

Add the bindings for the bq256xx series of battery charging ICs.

Datasheets:
- https://www.ti.com/lit/ds/symlink/bq25600.pdf
- https://www.ti.com/lit/ds/symlink/bq25601.pdf
- https://www.ti.com/lit/ds/symlink/bq25600d.pdf
- https://www.ti.com/lit/ds/symlink/bq25601d.pdf
- https://www.ti.com/lit/ds/symlink/bq25611d.pdf
- https://www.ti.com/lit/ds/symlink/bq25618.pdf
- https://www.ti.com/lit/ds/symlink/bq25619.pdf

Signed-off-by: Ricardo Rivera-Matos 
---
  .../bindings/power/supply/bq256xx.yaml| 97 +++
  1 file changed, 97 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/power/supply/bq256xx.yaml

diff --git a/Documentation/devicetree/bindings/power/supply/bq256xx.yaml 
b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml
new file mode 100644
index ..8cc2242f7df0
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+# Copyright (C) 2020 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/bq256xx.yaml#;
+$schema: "http://devicetree.org/meta-schemas/core.yaml#;
+
+title: TI bq256xx Switch Mode Buck Charger
+
+maintainers:
+  - Ricardo Rivera-Matos 
+
+description: |
+  The bq256xx devices are a family of highly-integrated battery charge
+  management and system power management ICs for single cell Li-ion and Li-
+  polymer batteries.
+
+  Datasheets:
+- https://www.ti.com/lit/ds/symlink/bq25600.pdf
+- https://www.ti.com/lit/ds/symlink/bq25601.pdf
+- https://www.ti.com/lit/ds/symlink/bq25600d.pdf
+- https://www.ti.com/lit/ds/symlink/bq25601d.pdf
+- https://www.ti.com/lit/ds/symlink/bq25611d.pdf
+- https://www.ti.com/lit/ds/symlink/bq25618.pdf
+- https://www.ti.com/lit/ds/symlink/bq25619.pdf
+
+properties:
+  compatible:
+enum:
+  - ti,bq25600
+  - ti,bq25601
+  - ti,bq25600d
+  - ti,bq25601d
+  - ti,bq25611d
+  - ti,bq25618
+  - ti,bq25619
+
+  reg:
+maxItems: 1
+
+  ti,watchdog-timer:
+$ref: /schemas/types.yaml#/definitions/uint32
+description: |
+  Watchdog timer in ms. 0 (default) disables the watchdog
+minimum: 0
+maximum: 16
+enum: [ 0, 4, 8, 16]
+
+  input-voltage-limit-microvolt:
+description: |
+   Minimum input voltage limit in µV with a 10 µV step
+minimum: 390
+maximum: 540
+
+  input-current-limit-microamp:
+description: |
+   Maximum input current limit in µA with a 10 µA step
+minimum: 10
+maximum: 320
+
+required:
+  - compatible
+  - reg
+  - monitored-battery

additionalProperties: false

And then fix what breaks in the example.
ACK. I will document the monitored-battery and interrupts properties and 
fix the example. Is ti,watchdog-timer okay as it is currently documented?



+
+examples:
+  - |
+bat: battery {
+  compatible = "simple-battery";
+  constant-charge-current-max-microamp = <204>;
+  constant-charge-voltage-max-microvolt = <4352000>;
+  precharge-current-microamp = <18>;
+  charge-term-current-microamp = <18>;
+};
+#include 
+#include 
+i2c {
+
+  clock-frequency = <40>;
+
+  #address-cells = <1>;
+  #size-cells = <0>;
+
+  charger@6b {
+compatible = "ti,bq25601";
+reg = <0x6b>;
+monitored-battery = <>;
+
+interrupt-parent = <>;
+interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+watchdog-timer = <4>;
+
+input-voltage-limit-microvolt = <450>;
+input-current-limit-microamp = <240>;
+   };
+};
+...
--
2.28.0


Ricardo