diff mbox series

[v3,3/5] dt-bindings: usb: dwc3: add reference clock period fractional adjustment

Message ID 20220110201936.1371891-4-robert.hancock@calian.com
State Superseded
Headers show
Series [v3,1/5] usb: dwc3: xilinx: Fix PIPE clock selection for USB2.0 mode | expand

Commit Message

Robert Hancock Jan. 10, 2022, 8:19 p.m. UTC
Document the new snps,ref-clock-fladj property which can be used to set
the fractional portion of the reference clock period.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Rob Herring Jan. 11, 2022, 3:14 p.m. UTC | #1
On Mon, 10 Jan 2022 14:19:34 -0600, Robert Hancock wrote:
> Document the new snps,ref-clock-fladj property which can be used to set
> the fractional portion of the reference clock period.
> 
> Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> ---
>  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 

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:

dtschema/dtc warnings/errors:
schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-clock-fladj
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be fixed:
	'type' is a required property
		hint: A vendor boolean property can use "type: boolean"
	Additional properties are not allowed ('minimum', 'maximum' were unexpected)
		hint: A vendor boolean property can use "type: boolean"
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be fixed:
		'enum' is a required property
		'const' is a required property
		hint: A vendor string property with exact values has an implicit type
		from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be fixed:
		'$ref' is a required property
		'allOf' is a required property
		hint: A vendor property needs a $ref to types.yaml
		from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
	hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
	from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-clock-fladj
make[1]: *** Deleting file 'Documentation/devicetree/bindings/usb/qcom,dwc3.example.dt.yaml'
schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-clock-fladj
Traceback (most recent call last):
  File "/usr/local/bin/dt-validate", line 170, in <module>
    sg.check_trees(filename, testtree)
  File "/usr/local/bin/dt-validate", line 119, in check_trees
    self.check_subtree(dt, subtree, False, "/", "/", filename)
  File "/usr/local/bin/dt-validate", line 110, in check_subtree
    self.check_subtree(tree, value, disabled, name, fullname + name, filename)
  File "/usr/local/bin/dt-validate", line 110, in check_subtree
    self.check_subtree(tree, value, disabled, name, fullname + name, filename)
  File "/usr/local/bin/dt-validate", line 110, in check_subtree
    self.check_subtree(tree, value, disabled, name, fullname + name, filename)
  File "/usr/local/bin/dt-validate", line 105, in check_subtree
    self.check_node(tree, subtree, disabled, nodename, fullname, filename)
  File "/usr/local/bin/dt-validate", line 49, in check_node
    errors = sorted(dtschema.DTValidator(schema).iter_errors(node), key=lambda e: e.linecol)
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 226, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py", line 25, in patternProperties
    yield from validator.descend(
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 242, in descend
    for error in self.evolve(schema=schema).iter_errors(instance):
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 226, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py", line 298, in ref
    yield from validator.descend(instance, resolved)
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 242, in descend
    for error in self.evolve(schema=schema).iter_errors(instance):
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 216, in iter_errors
    scope = id_of(_schema)
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 93, in _id_of
    return schema.get("$id", "")
AttributeError: 'NoneType' object has no attribute 'get'
make[1]: *** [scripts/Makefile.lib:373: Documentation/devicetree/bindings/usb/qcom,dwc3.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** Deleting file 'Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.example.dt.yaml'
schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-clock-fladj
Traceback (most recent call last):
  File "/usr/local/bin/dt-validate", line 170, in <module>
    sg.check_trees(filename, testtree)
  File "/usr/local/bin/dt-validate", line 119, in check_trees
    self.check_subtree(dt, subtree, False, "/", "/", filename)
  File "/usr/local/bin/dt-validate", line 110, in check_subtree
    self.check_subtree(tree, value, disabled, name, fullname + name, filename)
  File "/usr/local/bin/dt-validate", line 110, in check_subtree
    self.check_subtree(tree, value, disabled, name, fullname + name, filename)
  File "/usr/local/bin/dt-validate", line 105, in check_subtree
    self.check_node(tree, subtree, disabled, nodename, fullname, filename)
  File "/usr/local/bin/dt-validate", line 49, in check_node
    errors = sorted(dtschema.DTValidator(schema).iter_errors(node), key=lambda e: e.linecol)
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 226, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py", line 25, in patternProperties
    yield from validator.descend(
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 242, in descend
    for error in self.evolve(schema=schema).iter_errors(instance):
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 226, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py", line 298, in ref
    yield from validator.descend(instance, resolved)
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 242, in descend
    for error in self.evolve(schema=schema).iter_errors(instance):
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 216, in iter_errors
    scope = id_of(_schema)
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 93, in _id_of
    return schema.get("$id", "")
AttributeError: 'NoneType' object has no attribute 'get'
make[1]: *** [scripts/Makefile.lib:373: Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.example.dt.yaml] Error 1
make[1]: *** Deleting file 'Documentation/devicetree/bindings/usb/intel,keembay-dwc3.example.dt.yaml'
schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-clock-fladj
Traceback (most recent call last):
  File "/usr/local/bin/dt-validate", line 170, in <module>
    sg.check_trees(filename, testtree)
  File "/usr/local/bin/dt-validate", line 119, in check_trees
    self.check_subtree(dt, subtree, False, "/", "/", filename)
  File "/usr/local/bin/dt-validate", line 110, in check_subtree
    self.check_subtree(tree, value, disabled, name, fullname + name, filename)
  File "/usr/local/bin/dt-validate", line 110, in check_subtree
    self.check_subtree(tree, value, disabled, name, fullname + name, filename)
  File "/usr/local/bin/dt-validate", line 105, in check_subtree
    self.check_node(tree, subtree, disabled, nodename, fullname, filename)
  File "/usr/local/bin/dt-validate", line 49, in check_node
    errors = sorted(dtschema.DTValidator(schema).iter_errors(node), key=lambda e: e.linecol)
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 226, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py", line 25, in patternProperties
    yield from validator.descend(
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 242, in descend
    for error in self.evolve(schema=schema).iter_errors(instance):
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 226, in iter_errors
    for error in errors:
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py", line 298, in ref
    yield from validator.descend(instance, resolved)
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 242, in descend
    for error in self.evolve(schema=schema).iter_errors(instance):
  File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in iter_errors
    for error in super().iter_errors(instance, _schema):
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 216, in iter_errors
    scope = id_of(_schema)
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 93, in _id_of
    return schema.get("$id", "")
AttributeError: 'NoneType' object has no attribute 'get'
make[1]: *** [scripts/Makefile.lib:373: Documentation/devicetree/bindings/usb/intel,keembay-dwc3.example.dt.yaml] Error 1
make: *** [Makefile:1413: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

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

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.
Robert Hancock Jan. 12, 2022, 4:53 p.m. UTC | #2
On Tue, 2022-01-11 at 09:14 -0600, Rob Herring wrote:
> On Mon, 10 Jan 2022 14:19:34 -0600, Robert Hancock wrote:
> > Document the new snps,ref-clock-fladj property which can be used to set
> > the fractional portion of the reference clock period.
> > 
> > Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> > ---
> >  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> 
> 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:
> 
> dtschema/dtc warnings/errors:
> schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-
> clock-fladj

I'm assuming this schema file needs to be updated, but I'm not sure where it
lives? I don't see such a file in the devicetree-org/dt-schema repo?

> /builds/robherring/linux-dt-
> review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml:
> properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be
> fixed:
> 	'type' is a required property
> 		hint: A vendor boolean property can use "type: boolean"
> 	Additional properties are not allowed ('minimum', 'maximum' were
> unexpected)
> 		hint: A vendor boolean property can use "type: boolean"
> 	/builds/robherring/linux-dt-
> review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml:
> properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be
> fixed:
> 		'enum' is a required property
> 		'const' is a required property
> 		hint: A vendor string property with exact values has an
> implicit type
> 		from schema $id: 
> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/vendor-props.yaml*__;Iw!!IOGos0k!22HR18vQNpccp4Fe5xDTXtAO4G0fx0WhklLyKtGpjxDp2x3vJVRk7_o5zjwAxz-pCbw$
>  
> 	/builds/robherring/linux-dt-
> review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml:
> properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be
> fixed:
> 		'$ref' is a required property
> 		'allOf' is a required property
> 		hint: A vendor property needs a $ref to types.yaml
> 		from schema $id: 
> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/vendor-props.yaml*__;Iw!!IOGos0k!22HR18vQNpccp4Fe5xDTXtAO4G0fx0WhklLyKtGpjxDp2x3vJVRk7_o5zjwAxz-pCbw$
>  
> 	hint: Vendor specific properties must have a type and description
> unless they have a defined, common suffix.
> 	from schema $id: 
> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/vendor-props.yaml*__;Iw!!IOGos0k!22HR18vQNpccp4Fe5xDTXtAO4G0fx0WhklLyKtGpjxDp2x3vJVRk7_o5zjwAxz-pCbw$
>  
> /builds/robherring/linux-dt-
> review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml: ignoring, error
> in schema: properties: snps,ref-clock-fladj
> make[1]: *** Deleting file
> 'Documentation/devicetree/bindings/usb/qcom,dwc3.example.dt.yaml'
> schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-
> clock-fladj
> Traceback (most recent call last):
>   File "/usr/local/bin/dt-validate", line 170, in <module>
>     sg.check_trees(filename, testtree)
>   File "/usr/local/bin/dt-validate", line 119, in check_trees
>     self.check_subtree(dt, subtree, False, "/", "/", filename)
>   File "/usr/local/bin/dt-validate", line 110, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name,
> filename)
>   File "/usr/local/bin/dt-validate", line 110, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name,
> filename)
>   File "/usr/local/bin/dt-validate", line 110, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name,
> filename)
>   File "/usr/local/bin/dt-validate", line 105, in check_subtree
>     self.check_node(tree, subtree, disabled, nodename, fullname, filename)
>   File "/usr/local/bin/dt-validate", line 49, in check_node
>     errors = sorted(dtschema.DTValidator(schema).iter_errors(node),
> key=lambda e: e.linecol)
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 226, in iter_errors
>     for error in errors:
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py",
> line 25, in patternProperties
>     yield from validator.descend(
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 242, in descend
>     for error in self.evolve(schema=schema).iter_errors(instance):
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 226, in iter_errors
>     for error in errors:
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py",
> line 298, in ref
>     yield from validator.descend(instance, resolved)
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 242, in descend
>     for error in self.evolve(schema=schema).iter_errors(instance):
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 216, in iter_errors
>     scope = id_of(_schema)
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 93, in _id_of
>     return schema.get("$id", "")
> AttributeError: 'NoneType' object has no attribute 'get'
> make[1]: *** [scripts/Makefile.lib:373:
> Documentation/devicetree/bindings/usb/qcom,dwc3.example.dt.yaml] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: *** Deleting file 'Documentation/devicetree/bindings/usb/fsl,imx8mp-
> dwc3.example.dt.yaml'
> schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-
> clock-fladj
> Traceback (most recent call last):
>   File "/usr/local/bin/dt-validate", line 170, in <module>
>     sg.check_trees(filename, testtree)
>   File "/usr/local/bin/dt-validate", line 119, in check_trees
>     self.check_subtree(dt, subtree, False, "/", "/", filename)
>   File "/usr/local/bin/dt-validate", line 110, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name,
> filename)
>   File "/usr/local/bin/dt-validate", line 110, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name,
> filename)
>   File "/usr/local/bin/dt-validate", line 105, in check_subtree
>     self.check_node(tree, subtree, disabled, nodename, fullname, filename)
>   File "/usr/local/bin/dt-validate", line 49, in check_node
>     errors = sorted(dtschema.DTValidator(schema).iter_errors(node),
> key=lambda e: e.linecol)
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 226, in iter_errors
>     for error in errors:
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py",
> line 25, in patternProperties
>     yield from validator.descend(
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 242, in descend
>     for error in self.evolve(schema=schema).iter_errors(instance):
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 226, in iter_errors
>     for error in errors:
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py",
> line 298, in ref
>     yield from validator.descend(instance, resolved)
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 242, in descend
>     for error in self.evolve(schema=schema).iter_errors(instance):
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 216, in iter_errors
>     scope = id_of(_schema)
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 93, in _id_of
>     return schema.get("$id", "")
> AttributeError: 'NoneType' object has no attribute 'get'
> make[1]: *** [scripts/Makefile.lib:373:
> Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.example.dt.yaml] Error
> 1
> make[1]: *** Deleting file
> 'Documentation/devicetree/bindings/usb/intel,keembay-dwc3.example.dt.yaml'
> schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-
> clock-fladj
> Traceback (most recent call last):
>   File "/usr/local/bin/dt-validate", line 170, in <module>
>     sg.check_trees(filename, testtree)
>   File "/usr/local/bin/dt-validate", line 119, in check_trees
>     self.check_subtree(dt, subtree, False, "/", "/", filename)
>   File "/usr/local/bin/dt-validate", line 110, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name,
> filename)
>   File "/usr/local/bin/dt-validate", line 110, in check_subtree
>     self.check_subtree(tree, value, disabled, name, fullname + name,
> filename)
>   File "/usr/local/bin/dt-validate", line 105, in check_subtree
>     self.check_node(tree, subtree, disabled, nodename, fullname, filename)
>   File "/usr/local/bin/dt-validate", line 49, in check_node
>     errors = sorted(dtschema.DTValidator(schema).iter_errors(node),
> key=lambda e: e.linecol)
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 226, in iter_errors
>     for error in errors:
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py",
> line 25, in patternProperties
>     yield from validator.descend(
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 242, in descend
>     for error in self.evolve(schema=schema).iter_errors(instance):
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 226, in iter_errors
>     for error in errors:
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/_validators.py",
> line 298, in ref
>     yield from validator.descend(instance, resolved)
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 242, in descend
>     for error in self.evolve(schema=schema).iter_errors(instance):
>   File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 768, in
> iter_errors
>     for error in super().iter_errors(instance, _schema):
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 216, in iter_errors
>     scope = id_of(_schema)
>   File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py",
> line 93, in _id_of
>     return schema.get("$id", "")
> AttributeError: 'NoneType' object has no attribute 'get'
> make[1]: *** [scripts/Makefile.lib:373:
> Documentation/devicetree/bindings/usb/intel,keembay-dwc3.example.dt.yaml]
> Error 1
> make: *** [Makefile:1413: dt_binding_check] Error 2
> 
> doc reference errors (make refcheckdocs):
> 
> See 
> https://urldefense.com/v3/__https://patchwork.ozlabs.org/patch/1578106__;!!IOGos0k!22HR18vQNpccp4Fe5xDTXtAO4G0fx0WhklLyKtGpjxDp2x3vJVRk7_o5zjwAw07olIs$
>  
> 
> 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.
>
Rob Herring Jan. 12, 2022, 7:46 p.m. UTC | #3
On Wed, Jan 12, 2022 at 10:54 AM Robert Hancock
<robert.hancock@calian.com> wrote:
>
> On Tue, 2022-01-11 at 09:14 -0600, Rob Herring wrote:
> > On Mon, 10 Jan 2022 14:19:34 -0600, Robert Hancock wrote:
> > > Document the new snps,ref-clock-fladj property which can be used to set
> > > the fractional portion of the reference clock period.
> > >
> > > Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> > > ---
> > >  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++
> > >  1 file changed, 12 insertions(+)
> > >
> >
> > 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:
> >
> > dtschema/dtc warnings/errors:
> > schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-
> > clock-fladj
>
> I'm assuming this schema file needs to be updated, but I'm not sure where it
> lives? I don't see such a file in the devicetree-org/dt-schema repo?

Try Documentation/devicetree/bindings/usb/snps,dwc3.yaml
Robert Hancock Jan. 13, 2022, 5:58 p.m. UTC | #4
On Wed, 2022-01-12 at 13:46 -0600, Rob Herring wrote:
> On Wed, Jan 12, 2022 at 10:54 AM Robert Hancock
> <robert.hancock@calian.com> wrote:
> > On Tue, 2022-01-11 at 09:14 -0600, Rob Herring wrote:
> > > On Mon, 10 Jan 2022 14:19:34 -0600, Robert Hancock wrote:
> > > > Document the new snps,ref-clock-fladj property which can be used to set
> > > > the fractional portion of the reference clock period.
> > > > 
> > > > Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++
> > > >  1 file changed, 12 insertions(+)
> > > > 
> > > 
> > > 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:
> > > 
> > > dtschema/dtc warnings/errors:
> > > schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties:
> > > snps,ref-
> > > clock-fladj
> > 
> > I'm assuming this schema file needs to be updated, but I'm not sure where
> > it
> > lives? I don't see such a file in the devicetree-org/dt-schema repo?
> 
> Try Documentation/devicetree/bindings/usb/snps,dwc3.yaml

That's the one I'm patching, but it seems like it is comparing that to another
schema file that I can't find, and is unhappy because the new property I'm
adding isn't there? The way it's defined in the bindings file itself seems no
different from the others:

dtschema/dtc warnings/errors:
schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-
clock-fladj
/builds/robherring/linux-dt-
review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml:
properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be fixed:
Rob Herring Jan. 14, 2022, 2:18 a.m. UTC | #5
On Thu, Jan 13, 2022 at 11:58 AM Robert Hancock
<robert.hancock@calian.com> wrote:
>
> On Wed, 2022-01-12 at 13:46 -0600, Rob Herring wrote:
> > On Wed, Jan 12, 2022 at 10:54 AM Robert Hancock
> > <robert.hancock@calian.com> wrote:
> > > On Tue, 2022-01-11 at 09:14 -0600, Rob Herring wrote:
> > > > On Mon, 10 Jan 2022 14:19:34 -0600, Robert Hancock wrote:
> > > > > Document the new snps,ref-clock-fladj property which can be used to set
> > > > > the fractional portion of the reference clock period.
> > > > >
> > > > > Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> > > > > ---
> > > > >  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++
> > > > >  1 file changed, 12 insertions(+)
> > > > >
> > > >
> > > > 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:
> > > >
> > > > dtschema/dtc warnings/errors:
> > > > schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties:
> > > > snps,ref-
> > > > clock-fladj
> > >
> > > I'm assuming this schema file needs to be updated, but I'm not sure where
> > > it
> > > lives? I don't see such a file in the devicetree-org/dt-schema repo?
> >
> > Try Documentation/devicetree/bindings/usb/snps,dwc3.yaml
>
> That's the one I'm patching, but it seems like it is comparing that to another
> schema file that I can't find, and is unhappy because the new property I'm
> adding isn't there? The way it's defined in the bindings file itself seems no
> different from the others:

The problem is in Documentation/devicetree/bindings/usb/snps,dwc3.yaml
with the property you added. It is as simple as that. It's failing on
the meta-schema vendor-props.yaml which is in the dtschema repo (and
also on your computer where dtschema is installed).

Just run:

dt-doc-validate -u Documentation/devicetree/bindings/
Documentation/devicetree/bindings/usb/snps,dwc3.yaml

>
> dtschema/dtc warnings/errors:
> schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties: snps,ref-
> clock-fladj
> /builds/robherring/linux-dt-
> review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml:
> properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be fixed:

The important parts are what came after the above. Read the 'hints'.

Rob
Robert Hancock Jan. 14, 2022, 4:30 a.m. UTC | #6
On Thu, 2022-01-13 at 20:18 -0600, Rob Herring wrote:
> On Thu, Jan 13, 2022 at 11:58 AM Robert Hancock
> <robert.hancock@calian.com> wrote:
> > On Wed, 2022-01-12 at 13:46 -0600, Rob Herring wrote:
> > > On Wed, Jan 12, 2022 at 10:54 AM Robert Hancock
> > > <robert.hancock@calian.com> wrote:
> > > > On Tue, 2022-01-11 at 09:14 -0600, Rob Herring wrote:
> > > > > On Mon, 10 Jan 2022 14:19:34 -0600, Robert Hancock wrote:
> > > > > > Document the new snps,ref-clock-fladj property which can be used to
> > > > > > set
> > > > > > the fractional portion of the reference clock period.
> > > > > > 
> > > > > > Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> > > > > > ---
> > > > > >  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12
> > > > > > ++++++++++++
> > > > > >  1 file changed, 12 insertions(+)
> > > > > > 
> > > > > 
> > > > > 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:
> > > > > 
> > > > > dtschema/dtc warnings/errors:
> > > > > schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties:
> > > > > snps,ref-
> > > > > clock-fladj
> > > > 
> > > > I'm assuming this schema file needs to be updated, but I'm not sure
> > > > where
> > > > it
> > > > lives? I don't see such a file in the devicetree-org/dt-schema repo?
> > > 
> > > Try Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> > 
> > That's the one I'm patching, but it seems like it is comparing that to
> > another
> > schema file that I can't find, and is unhappy because the new property I'm
> > adding isn't there? The way it's defined in the bindings file itself seems
> > no
> > different from the others:
> 
> The problem is in Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> with the property you added. It is as simple as that. It's failing on
> the meta-schema vendor-props.yaml which is in the dtschema repo (and
> also on your computer where dtschema is installed).
> 
> Just run:
> 
> dt-doc-validate -u Documentation/devicetree/bindings/
> Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> 
> > dtschema/dtc warnings/errors:
> > schemas/usb/snps,dwc3.yaml: ignoring, error in schema: properties:
> > snps,ref-
> > clock-fladj
> > /builds/robherring/linux-dt-
> > review/Documentation/devicetree/bindings/usb/snps,dwc3.yaml:
> > properties:snps,ref-clock-fladj: 'oneOf' conditional failed, one must be
> > fixed:
> 
> The important parts are what came after the above. Read the 'hints'.

Indeed, looks like it was missing the $ref to specify the type. I think my
confusion was because the immediately preceding parameter in the
file, snps,ref-clock-period-ns, was also missing $ref with no complaints, I
guess because it has the -ns suffix.. Will update in the next version.

> 
> Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
index 25ac2c93dc6c..88d8d831e04a 100644
--- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
@@ -260,6 +260,18 @@  properties:
     minimum: 1
     maximum: 0x3ff
 
+  snps,ref-clock-fladj:
+    description:
+      Value for GFLADJ_REFCLK_FLADJ field of GFLADJ register for the
+      fractional portion of the reference clock period in nanoseconds,
+      when the hardware set default does not match the actual
+      clock. Calculated via
+      ((125000/ref_clk_period_integer)-(125000/ref_clk_period)) * ref_clk_period
+      where ref_clk_period_integer is the period specified in GUCTL_REFCLKPER and
+      ref_clk_period is the period including fractional value.
+    minimum: 0
+    maximum: 124999
+
   snps,rx-thr-num-pkt-prd:
     description:
       Periodic ESS RX packet threshold count (host mode only). Set this and