mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adam Ward <Adam.Ward.opensource@diasemi.com>
To: Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	Support Opensource <support.opensource@diasemi.com>
Subject: [PATCH V2 2/3] DA9121: add DA914x binding info
Date: Tue, 23 Nov 2021 15:09:25 +0000	[thread overview]
Message-ID: <d3f89b99dfc40ba459e20cd7203b88d18da72834.1637679551.git.Adam.Ward.opensource@diasemi.com> (raw)
In-Reply-To: <cover.1637679551.git.Adam.Ward.opensource@diasemi.com>

Signed-off-by: Adam Ward <Adam.Ward.opensource@diasemi.com>
---
 .../bindings/regulator/dlg,da9121.yaml        | 84 ++++++++++++-------
 1 file changed, 53 insertions(+), 31 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
index 0aee5fcd6093..8441f630a84d 100644
--- a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
+++ b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
@@ -17,27 +17,39 @@ description: |
   Dialog Semiconductor DA9130 Single-channel 10A double-phase buck converter
   Dialog Semiconductor DA9131 Double-channel  5A single-phase buck converter
   Dialog Semiconductor DA9132 Double-channel  3A single-phase buck converter
-
-  Current limits
-
-  This is PER PHASE, and the current limit setting in the devices reflect
-  that with a maximum 10A limit. Allowing for transients at/near double
-  the rated current, this translates across the device range to per
-  channel figures as so...
-
-                               | DA9121    DA9122     DA9220    DA9217
-                               | /DA9130   /DA9131    /DA9132
-    -------------------------------------------------------------------
-    Output current / channel   | 10000000   5000000   3000000   6000000
-    Output current / phase     |  5000000   5000000   3000000   3000000
-    -------------------------------------------------------------------
-    Min regulator-min-microvolt|   300000    300000    300000    300000
-    Max regulator-max-microvolt|  1900000   1900000   1900000   1900000
-    Device hardware default    |  1000000   1000000   1000000   1000000
-    -------------------------------------------------------------------
-    Min regulator-min-microamp |  7000000   3500000   3500000   7000000
-    Max regulator-max-microamp | 20000000  10000000   6000000  12000000
-    Device hardware default    | 15000000   7500000   5500000  11000000
+  Dialog Semiconductor DA9141 Single-channel 40A   quad-phase buck converter
+  Dialog Semiconductor DA9142 Single-channel 20A double-phase buck converter
+
+  Device parameter ranges
+
+  The current limits can be set to at/near double the rated current per channel
+  to allow for transient peaks.
+  Current limit changes when the output is enabled are not supported, as a
+  precaution against undefined behaviour.
+
+  |----------------------------------------------|
+  |               | range & reset default value  |
+  | Device        |------------------------------|
+  |               | microvolt    | microamp      |
+  |----------------------------------------------|
+  | DA9121/DA9130 | Min:  300000 | Min:  7000000 |
+  |               | Max: 1900000 | Max: 20000000 |
+  |----------------------------------------------|
+  | DA9121/DA9131 | Min:  300000 | Min:  3500000 |
+  |               | Max: 1900000 | Max: 10000000 |
+  |----------------------------------------------|
+  | DA9121/DA9131 | Min:  300000 | Min:  3500000 |
+  |               | Max: 1900000 | Max:  6000000 |
+  |----------------------------------------------|
+  | DA9217        | Min:  300000 | Min:  7000000 |
+  |               | Max: 1900000 | Max: 12000000 |
+  |----------------------------------------------|
+  | DA9141        | Min:  300000 | Min: 26000000 |
+  |               | Max: 1300000 | Max: 78000000 |
+  |----------------------------------------------|
+  | DA9142        | Min:  300000 | Min: 13000000 |
+  |               | Max: 1300000 | Max: 39000000 |
+  |----------------------------------------------|
 
 properties:
   $nodename:
@@ -51,6 +63,8 @@ properties:
       - dlg,da9130
       - dlg,da9131
       - dlg,da9132
+      - dlg,da9141
+      - dlg,da9142
 
   reg:
     maxItems: 1
@@ -69,26 +83,33 @@ properties:
 
   regulators:
     type: object
-    $ref: regulator.yaml#
+    maxItems: 2
     description: |
-      This node defines the settings for the BUCK. The content of the
-      sub-node is defined by the standard binding for regulators; see regulator.yaml.
-      The DA9121 regulator is bound using their names listed below
-      buck1 - BUCK1
-      buck2 - BUCK2       //DA9122, DA9220, DA9131, DA9132 only
+      List of regulators provided by the device
 
     patternProperties:
       "^buck([1-2])$":
         type: object
         $ref: regulator.yaml#
+        description: |
+          List of regulators provided by the device
+          This node defines the settings for the BUCK. The content of the
+          sub-node is defined by the standard binding for regulators; see regulator.yaml.
+          The DA9121 regulator is bound using their names listed below
+          buck1 - BUCK1
+          buck2 - BUCK2       //DA9122, DA9220, DA9131, DA9132 only
 
         properties:
-          regulator-mode:
-            maxItems: 1
-            description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
+          regulator-state-(standby|mem|disk):
+          type: object
+
+            properties:
+              regulator-mode:
+              enum: [ 0, 1, 2, 3 ]
+              description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
 
           regulator-initial-mode:
-            maxItems: 1
+            enum: [ 0, 1, 2, 3 ]
             description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
 
           enable-gpios:
@@ -97,6 +118,7 @@ properties:
 
           dlg,ripple-cancel:
             $ref: "/schemas/types.yaml#/definitions/uint32"
+            enum: [ 0, 1, 2, 3 ]
             description: |
               Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
               Only present on multi-channel devices (DA9122, DA9220, DA9131, DA9132)
-- 
2.25.1


  parent reply	other threads:[~2021-11-23 15:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 15:09 [PATCH V2 0/3] regulator: da9121: add DA914x support Adam Ward
2021-11-23 15:09 ` [PATCH V2 1/3] DA9121: remove erroneous compatible from binding Adam Ward
2021-11-23 15:09 ` Adam Ward [this message]
2021-11-23 15:09 ` [PATCH V2 3/3] DA9121: add DA914x support Adam Ward
2021-11-23 16:21   ` Mark Brown

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=d3f89b99dfc40ba459e20cd7203b88d18da72834.1637679551.git.Adam.Ward.opensource@diasemi.com \
    --to=adam.ward.opensource@diasemi.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=support.opensource@diasemi.com \
    /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

all inboxes | Powered by JetHome®