2022-04-26 10:21:47

by Changming Huang

[permalink] [raw]
Subject: [PATCH 1/3 v5] dt-bindings: dspi: added for MikcroBus socket

Signed-off-by: Changming Huang <[email protected]>
---
changes in v5:
- rename compatible name to mikcroe,mikcroe-socket
changes in v4:
- rename example node, adjust description
changes in v3:
- add the dt-bindings

.../bindings/spi/mikcroe,mikcroe-socket.yaml | 50 +++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml

diff --git a/Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml b/Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml
new file mode 100644
index 000000000000..2b0abf7f1d84
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/mikcroe,mikcroe-spi#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MikcroBus SPI device bindings
+
+maintainers:
+ - Changming Huang <[email protected]>
+
+allOf:
+ - $ref: "spi-controller.yaml"
+
+properties:
+ compatible:
+ const: mikcroe,mikcroe-socket
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency: true
+
+ fsl,spi-cs-sck-delay: true
+
+ fsl,spi-sck-cs-delay: true
+
+required:
+ - compatible
+ - reg
+ - spi-max-frequency
+
+additionalProperties: false
+
+examples:
+ - |
+ &dspi2 {
+ bus-num = <2>;
+ status = "okay";
+
+ spi@0 {
+ compatible = "mikcroe,mikcroe-socket";
+ reg = <0>;
+ spi-max-frequency = <2000000>;
+ fsl,spi-cs-sck-delay = <1000000>;
+ fsl,spi-sck-cs-delay = <50>;
+ };
+ };
+
+...
--
2.25.1


2022-04-26 15:37:13

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/3 v5] dt-bindings: dspi: added for MikcroBus socket

On Tue, 26 Apr 2022 10:24:11 +0800, Changming Huang wrote:
> Signed-off-by: Changming Huang <[email protected]>
> ---
> changes in v5:
> - rename compatible name to mikcroe,mikcroe-socket
> changes in v4:
> - rename example node, adjust description
> changes in v3:
> - add the dt-bindings
>
> .../bindings/spi/mikcroe,mikcroe-socket.yaml | 50 +++++++++++++++++++
> 1 file changed, 50 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml
>

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:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml: $id: 'http://devicetree.org/schemas/spi/mikcroe,mikcroe-spi#' does not match 'http://devicetree.org/schemas/.*\\.yaml#'
from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml: properties:fsl,spi-cs-sck-delay: True is not of type 'object'
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/spi/mikcroe,mikcroe-socket.yaml: properties:fsl,spi-cs-sck-delay: More than one condition true in oneOf schema:
{'description': 'Vendor specific properties must have a type and '
'description unless they have a defined, common '
'suffix.',
'oneOf': [{'additionalProperties': False,
'description': 'A vendor boolean property can use "type: '
'boolean"',
'properties': {'deprecated': True,
'description': True,
'type': {'const': 'boolean'}},
'required': ['type', 'description']},
{'additionalProperties': False,
'description': 'A vendor string property with exact values '
'has an implicit type',
'oneOf': [{'required': ['enum']}, {'required': ['const']}],
'properties': {'const': {'type': 'string'},
'deprecated': True,
'description': True,
'enum': {'items': {'type': 'string'}}},
'required': ['description']},
{'description': 'A vendor property needs a $ref to '
'types.yaml',
'oneOf': [{'required': ['$ref']}, {'required': ['allOf']}],
'properties': {'$ref': {'pattern': 'types.yaml#/definitions/'},
'allOf': {'items': [{'properties': {'$ref': {'pattern': 'types.yaml#/definitions/'}},
'required': ['$ref']}]}},
'required': ['description']},
{'description': 'A vendor property can have a $ref to a a '
'$defs schema',
'properties': {'$ref': {'pattern': '^#/(definitions|$defs)/'}},
'required': ['$ref']}],
'type': 'object'}
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/spi/mikcroe,mikcroe-socket.yaml: properties:fsl,spi-sck-cs-delay: True is not of type 'object'
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/spi/mikcroe,mikcroe-socket.yaml: properties:fsl,spi-sck-cs-delay: More than one condition true in oneOf schema:
{'description': 'Vendor specific properties must have a type and '
'description unless they have a defined, common '
'suffix.',
'oneOf': [{'additionalProperties': False,
'description': 'A vendor boolean property can use "type: '
'boolean"',
'properties': {'deprecated': True,
'description': True,
'type': {'const': 'boolean'}},
'required': ['type', 'description']},
{'additionalProperties': False,
'description': 'A vendor string property with exact values '
'has an implicit type',
'oneOf': [{'required': ['enum']}, {'required': ['const']}],
'properties': {'const': {'type': 'string'},
'deprecated': True,
'description': True,
'enum': {'items': {'type': 'string'}}},
'required': ['description']},
{'description': 'A vendor property needs a $ref to '
'types.yaml',
'oneOf': [{'required': ['$ref']}, {'required': ['allOf']}],
'properties': {'$ref': {'pattern': 'types.yaml#/definitions/'},
'allOf': {'items': [{'properties': {'$ref': {'pattern': 'types.yaml#/definitions/'}},
'required': ['$ref']}]}},
'required': ['description']},
{'description': 'A vendor property can have a $ref to a a '
'$defs schema',
'properties': {'$ref': {'pattern': '^#/(definitions|$defs)/'}},
'required': ['$ref']}],
'type': 'object'}
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#
./Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml: $id: relative path/filename doesn't match actual path or filename
expected: http://devicetree.org/schemas/spi/mikcroe,mikcroe-socket.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.yaml: ignoring, error in schema: $id
Error: Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.example.dts:20.9-15 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:364: Documentation/devicetree/bindings/spi/mikcroe,mikcroe-socket.example.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1401: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

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

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.

2022-04-27 09:26:47

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 1/3 v5] dt-bindings: dspi: added for MikcroBus socket

On Mon, Apr 25, 2022 at 9:24 PM Changming Huang <[email protected]> wrote:
>
> Signed-off-by: Changming Huang <[email protected]>
> ---
> changes in v5:
> - rename compatible name to mikcroe,mikcroe-socket

This is not right. The mikrobus socket is more than just SPI which was
already pointed out. I also sketched out how I think it needs to look.
Maybe it ends up looking a bit different, but fundamentally, how you
remap I2C, SPI, GPIO, PWM, etc. thru a connector in order to have
overlays which are independent of the base platform has to be solved.
So far, we have done interrupts and GPIOs.

Rob

2022-04-27 11:37:21

by Michael Walle

[permalink] [raw]
Subject: Re: [PATCH 1/3 v5] dt-bindings: dspi: added for MikcroBus socket

Hi,

> Signed-off-by: Changming Huang <[email protected]>
> ---
> changes in v5:
> - rename compatible name to mikcroe,mikcroe-socket
> changes in v4:
> - rename example node, adjust description
> changes in v3:
> - add the dt-bindings

Please keep people who reply to your patches on CC in the next versions.

Thanks,
-michael