diff mbox series

[v2,2/4] dt-bindings: power: supply: maxim,max14577: convert to dtschema

Message ID 20220111174337.223320-3-krzysztof.kozlowski@canonical.com
State New
Headers show
Series mfd/power/regulators: dt-bindings: max14577: convert to dtschema | expand

Commit Message

Krzysztof Kozlowski Jan. 11, 2022, 5:43 p.m. UTC
Convert the Charger bindings of Maxim MAX14577/MAX77836 MUIC to DT
schema format.  The existing bindings were defined in
../bindings/mfd/max14577.txt.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/power/supply/maxim,max14577.yaml | 84 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 85 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml

Comments

Sebastian Reichel Jan. 12, 2022, 11:29 a.m. UTC | #1
Hi,

On Tue, Jan 11, 2022 at 06:43:35PM +0100, Krzysztof Kozlowski wrote:
> Convert the Charger bindings of Maxim MAX14577/MAX77836 MUIC to DT
> schema format.  The existing bindings were defined in
> ../bindings/mfd/max14577.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---

I expect this to be merged through MFD:

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

>  .../bindings/power/supply/maxim,max14577.yaml | 84 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 85 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
> new file mode 100644
> index 000000000000..3978b48299de
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
> @@ -0,0 +1,84 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/supply/maxim,max14577.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC Charger
> +
> +maintainers:
> +  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> +
> +description: |
> +  This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
> +  Integrated Circuit (MUIC).
> +
> +  See also Documentation/devicetree/bindings/mfd/maxim,max14577.yaml for
> +  additional information and example.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - maxim,max14577-charger
> +      - maxim,max77836-charger
> +
> +  maxim,constant-uvolt:
> +    description:
> +      Battery Constant Voltage in uV
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 4000000
> +    maximum: 4350000
> +
> +  maxim,eoc-uamp:
> +    description: |
> +      Current in uA for End-Of-Charge mode.
> +      MAX14577: 50000-20000
> +      MAX77836: 5000-100000
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  maxim,fast-charge-uamp:
> +    description: |
> +      Current in uA for Fast Charge
> +      MAX14577: 90000-950000
> +      MAX77836: 45000-475000
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  maxim,ovp-uvolt:
> +    description:
> +      OverVoltage Protection Threshold in uV; In an overvoltage condition, INT
> +      asserts and charging stops.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [6000000, 6500000, 7000000, 7500000]
> +
> +required:
> +  - compatible
> +  - maxim,constant-uvolt
> +  - maxim,eoc-uamp
> +  - maxim,fast-charge-uamp
> +  - maxim,ovp-uvolt
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: maxim,max14577-charger
> +    then:
> +      properties:
> +        maxim,eoc-uamp:
> +          minimum: 50000
> +          maximum: 200000
> +        maxim,fast-charge-uamp:
> +          minimum: 90000
> +          maximum: 950000
> +    else:
> +      # max77836
> +      properties:
> +        maxim,eoc-uamp:
> +          minimum: 5000
> +          maximum: 100000
> +        maxim,fast-charge-uamp:
> +          minimum: 45000
> +          maximum: 475000
> +
> +additionalProperties: false
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d1f8f312f322..13e21c229c5d 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11681,6 +11681,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>  M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>  L:	linux-pm@vger.kernel.org
>  S:	Supported
> +F:	Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
>  F:	Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
>  F:	drivers/power/supply/max14577_charger.c
>  F:	drivers/power/supply/max77693_charger.c
> -- 
> 2.32.0
>
Lee Jones Feb. 14, 2022, 2:17 p.m. UTC | #2
On Wed, 12 Jan 2022, Sebastian Reichel wrote:

> Hi,
> 
> On Tue, Jan 11, 2022 at 06:43:35PM +0100, Krzysztof Kozlowski wrote:
> > Convert the Charger bindings of Maxim MAX14577/MAX77836 MUIC to DT
> > schema format.  The existing bindings were defined in
> > ../bindings/mfd/max14577.txt.
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > ---
> 
> I expect this to be merged through MFD:
> 
> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

Do you need a PR?
Sebastian Reichel Feb. 14, 2022, 4:37 p.m. UTC | #3
Hi Lee,

On Mon, Feb 14, 2022 at 02:17:37PM +0000, Lee Jones wrote:
> On Wed, 12 Jan 2022, Sebastian Reichel wrote:
> > On Tue, Jan 11, 2022 at 06:43:35PM +0100, Krzysztof Kozlowski wrote:
> > > Convert the Charger bindings of Maxim MAX14577/MAX77836 MUIC to DT
> > > schema format.  The existing bindings were defined in
> > > ../bindings/mfd/max14577.txt.
> > > 
> > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> > > Reviewed-by: Rob Herring <robh@kernel.org>
> > > ---
> > 
> > I expect this to be merged through MFD:
> > 
> > Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> 
> Do you need a PR?

No, Not needed.

-- Sebastian
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
new file mode 100644
index 000000000000..3978b48299de
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
@@ -0,0 +1,84 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/maxim,max14577.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC Charger
+
+maintainers:
+  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+description: |
+  This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
+  Integrated Circuit (MUIC).
+
+  See also Documentation/devicetree/bindings/mfd/maxim,max14577.yaml for
+  additional information and example.
+
+properties:
+  compatible:
+    enum:
+      - maxim,max14577-charger
+      - maxim,max77836-charger
+
+  maxim,constant-uvolt:
+    description:
+      Battery Constant Voltage in uV
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 4000000
+    maximum: 4350000
+
+  maxim,eoc-uamp:
+    description: |
+      Current in uA for End-Of-Charge mode.
+      MAX14577: 50000-20000
+      MAX77836: 5000-100000
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  maxim,fast-charge-uamp:
+    description: |
+      Current in uA for Fast Charge
+      MAX14577: 90000-950000
+      MAX77836: 45000-475000
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  maxim,ovp-uvolt:
+    description:
+      OverVoltage Protection Threshold in uV; In an overvoltage condition, INT
+      asserts and charging stops.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [6000000, 6500000, 7000000, 7500000]
+
+required:
+  - compatible
+  - maxim,constant-uvolt
+  - maxim,eoc-uamp
+  - maxim,fast-charge-uamp
+  - maxim,ovp-uvolt
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: maxim,max14577-charger
+    then:
+      properties:
+        maxim,eoc-uamp:
+          minimum: 50000
+          maximum: 200000
+        maxim,fast-charge-uamp:
+          minimum: 90000
+          maximum: 950000
+    else:
+      # max77836
+      properties:
+        maxim,eoc-uamp:
+          minimum: 5000
+          maximum: 100000
+        maxim,fast-charge-uamp:
+          minimum: 45000
+          maximum: 475000
+
+additionalProperties: false
diff --git a/MAINTAINERS b/MAINTAINERS
index d1f8f312f322..13e21c229c5d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11681,6 +11681,7 @@  M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
 M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 L:	linux-pm@vger.kernel.org
 S:	Supported
+F:	Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
 F:	Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
 F:	drivers/power/supply/max14577_charger.c
 F:	drivers/power/supply/max77693_charger.c