2021-11-23 12:19:52

by Adam Ward

[permalink] [raw]
Subject: [PATCH 1/2] DA9121: add DA914x binding info

Signed-off-by: Adam Ward <[email protected]>
---
.../bindings/regulator/dlg,da9121.yaml | 85 ++++++++++++-------
1 file changed, 53 insertions(+), 32 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
index 228018c87bea..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 DA9140
- | /DA9130 /DA9131 /DA9132
- -----------------------------------------------------------------------------
- Output current / channel | 10000000 5000000 3000000 6000000 40000000
- Output current / phase | 5000000 5000000 3000000 3000000 9500000
- -----------------------------------------------------------------------------
- Min regulator-min-microvolt| 300000 300000 300000 300000 500000
- Max regulator-max-microvolt| 1900000 1900000 1900000 1900000 1000000
- Device hardware default | 1000000 1000000 1000000 1000000 1000000
- -----------------------------------------------------------------------------
- Min regulator-min-microamp | 7000000 3500000 3500000 7000000 26000000
- Max regulator-max-microamp | 20000000 10000000 6000000 12000000 78000000
- Device hardware default | 15000000 7500000 5500000 11000000 58000000
+ 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,7 +63,8 @@ properties:
- dlg,da9130
- dlg,da9131
- dlg,da9132
- - dlg,da9140
+ - dlg,da9141
+ - dlg,da9142

reg:
maxItems: 1
@@ -70,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:
@@ -98,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



2021-11-23 12:30:21

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/2] DA9121: add DA914x binding info

On Tue, Nov 23, 2021 at 12:19:27PM +0000, Adam Ward wrote:

> - dlg,da9132
> - - dlg,da9140
> + - dlg,da9141
> + - dlg,da9142

This is removing the existing DA9140 compatible?


Attachments:
(No filename) (198.00 B)
signature.asc (488.00 B)
Download all attachments

2021-11-23 13:06:33

by Adam Ward

[permalink] [raw]
Subject: RE: [PATCH 1/2] DA9121: add DA914x binding info

> On Tue, Nov 23, 2021 at 12:30PM +0000, Mark Brown wrote:
>
> This is removing the existing DA9140 compatible?

No. It's never been recognised in the driver itself and shouldn't have been there.
Detritus from an obsolete test.


2021-11-23 13:16:15

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/2] DA9121: add DA914x binding info

On Tue, Nov 23, 2021 at 01:06:23PM +0000, Adam Ward wrote:
> > On Tue, Nov 23, 2021 at 12:30PM +0000, Mark Brown wrote:

> > This is removing the existing DA9140 compatible?

> No. It's never been recognised in the driver itself and shouldn't have been there.
> Detritus from an obsolete test.

So by "no" you mean "yes" then? In any case you shouldn't be putting a
change like this in the middle of an unrelated commit without mentioning
it in the commit log, if you feel the need to remove this compatible you
should make a commit doing so. Please see submitting-patches.rst for
details on splitting changes up.


Attachments:
(No filename) (616.00 B)
signature.asc (488.00 B)
Download all attachments

2021-11-23 16:35:01

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 1/2] DA9121: add DA914x binding info

On Tue, 23 Nov 2021 12:19:27 +0000, Adam Ward wrote:
> Signed-off-by: Adam Ward <[email protected]>
> ---
> .../bindings/regulator/dlg,da9121.yaml | 85 ++++++++++++-------
> 1 file changed, 53 insertions(+), 32 deletions(-)
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/regulator/dlg,da9121.yaml:103:46: [error] empty value in block mapping (empty-values)
./Documentation/devicetree/bindings/regulator/dlg,da9121.yaml:106:23: [error] syntax error: mapping values are not allowed here (syntax)

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/regulator/dlg,da9121.yaml: mapping values are not allowed in this context
in "<unicode string>", line 106, column 23
make[1]: *** Deleting file 'Documentation/devicetree/bindings/regulator/dlg,da9121.example.dts'
Traceback (most recent call last):
File "/usr/local/bin/dt-extract-example", line 45, in <module>
binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 434, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 119, in get_single_data
node = self.composer.get_single_node()
File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 891, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.scanner.ScannerError: mapping values are not allowed in this context
in "<unicode string>", line 106, column 23
make[1]: *** [Documentation/devicetree/bindings/Makefile:25: Documentation/devicetree/bindings/regulator/dlg,da9121.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs....
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml: ignoring, error parsing file
warning: no schema found in file: ./Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
make: *** [Makefile:1413: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1558524

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.