Message ID | 20200121192405.25382-1-sravanhome@gmail.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | [v7] dt-bindings: regulator: add document bindings for mpq7920 | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/dt-meta-schema | fail | build log |
On Tue, 21 Jan 2020 20:24:05 +0100, Saravanan Sekar wrote: > Add device tree binding information for mpq7920 regulator driver. > Example bindings for mpq7920 are added. > > Signed-off-by: Saravanan Sekar <sravanhome@gmail.com> > --- > > Notes: > Changes on v7 : > - added regualtors child-node under patternProperties, added required > - mps,buck-ovp-disable is not common property, regulator subsystem provides > only over current protection support. > > .../bindings/regulator/mps,mpq7920.yaml | 118 ++++++++++++++++++ > 1 file changed, 118 insertions(+) > create mode 100644 Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml > My bot found errors running 'make dt_binding_check' on your patch: warning: no schema found in file: Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: ignoring, error in schema: properties: regulators: properties: mps,switch-freq Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:properties:mps,switch-freq: {'$ref': '/schemas/types.yaml#/definitions/uint8', 'enum': [0, 1, 2, 3], 'default': 2, 'description': 'switching frequency must be one of following corresponding value\n1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz\n'} is not valid under any of the given schemas (Possible causes of the failure): /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:properties:mps,switch-freq: 'not' is a required property /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:properties:mps,switch-freq:enum:0: 0 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:properties:mps,switch-freq:enum:1: 1 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:properties:mps,switch-freq:enum:2: 2 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:properties:mps,switch-freq:enum:3: 3 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-softstart: {'$ref': '/schemas/types.yaml#/definitions/uint8', 'enum': [0, 1, 2, 3], 'description': 'defines the soft start time of this buck, must be one of the following\ncorresponding values 150us, 300us, 610us, 920us\n'} is not valid under any of the given schemas (Possible causes of the failure): /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-softstart: 'not' is a required property /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-softstart:enum:0: 0 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-softstart:enum:1: 1 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-softstart:enum:2: 2 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-softstart:enum:3: 3 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-phase-delay: {'$ref': '/schemas/types.yaml#/definitions/uint8', 'enum': [0, 1, 2, 3], 'description': 'defines the phase delay of this buck, must be one of the following\ncorresponding values 0deg, 90deg, 180deg, 270deg\n'} is not valid under any of the given schemas (Possible causes of the failure): /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-phase-delay: 'not' is a required property /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-phase-delay:enum:0: 0 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-phase-delay:enum:1: 1 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-phase-delay:enum:2: 2 is not of type 'string' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml: properties:regulators:patternProperties:^buck[1-4]$:properties:mps,buck-phase-delay:enum:3: 3 is not of type 'string' Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/regulator/mps,mpq7920.example.dts' failed make[1]: *** [Documentation/devicetree/bindings/regulator/mps,mpq7920.example.dts] Error 1 Makefile:1263: recipe for target 'dt_binding_check' failed make: *** [dt_binding_check] Error 2 See https://patchwork.ozlabs.org/patch/1226717 Please check and re-submit. The errors are too helpful here. The problem appears to be that '$ref' has to be under an 'allOf' if there are other constraints. Rob
diff --git a/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml new file mode 100644 index 000000000000..d853690f34c4 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml @@ -0,0 +1,118 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mps,mpq7920.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Monolithic Power System MPQ7920 PMIC + +maintainers: + - Saravanan Sekar <sravanhome@gmail.com> + +properties: + $nodename: + pattern: "pmic@[0-9a-f]{1,2}" + compatible: + enum: + - mps,mpq7920 + + reg: + maxItems: 1 + + regulators: + type: object + allOf: + - $ref: regulator.yaml# + description: | + list of regulators provided by this controller, must be named + after their hardware counterparts BUCK[1-4], one LDORTC, and LDO[2-5] + + properties: + mps,switch-freq: + $ref: "/schemas/types.yaml#/definitions/uint8" + enum: [ 0, 1, 2, 3 ] + default: 2 + description: | + switching frequency must be one of following corresponding value + 1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz + + patternProperties: + "^ldo[1-4]$": + type: object + allOf: + - $ref: regulator.yaml# + + "^ldortc$": + type: object + allOf: + - $ref: regulator.yaml# + + "^buck[1-4]$": + type: object + allOf: + - $ref: regulator.yaml# + + properties: + mps,buck-softstart: + $ref: "/schemas/types.yaml#/definitions/uint8" + enum: [ 0, 1, 2, 3 ] + description: | + defines the soft start time of this buck, must be one of the following + corresponding values 150us, 300us, 610us, 920us + + mps,buck-phase-delay: + $ref: "/schemas/types.yaml#/definitions/uint8" + enum: [ 0, 1, 2, 3 ] + description: | + defines the phase delay of this buck, must be one of the following + corresponding values 0deg, 90deg, 180deg, 270deg + + mps,buck-ovp-disable: + type: boolean + description: | + disables over voltage protection of this buck + + additionalProperties: false + additionalProperties: false + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@69 { + compatible = "mps,mpq7920"; + reg = <0x69>; + + regulators { + mps,switch-freq = <1>; + + buck1 { + regulator-name = "buck1"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <3587500>; + regulator-min-microamp = <460000>; + regulator-max-microamp = <7600000>; + regulator-boot-on; + mps,buck-ovp-disable; + mps,buck-phase-delay = /bits/ 8 <2>; + mps,buck-softstart = /bits/ 8 <1>; + }; + + ldo2 { + regulator-name = "ldo2"; + regulator-min-microvolt = <650000>; + regulator-max-microvolt = <3587500>; + }; + }; + }; + }; +...
Add device tree binding information for mpq7920 regulator driver. Example bindings for mpq7920 are added. Signed-off-by: Saravanan Sekar <sravanhome@gmail.com> --- Notes: Changes on v7 : - added regualtors child-node under patternProperties, added required - mps,buck-ovp-disable is not common property, regulator subsystem provides only over current protection support. .../bindings/regulator/mps,mpq7920.yaml | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml