Message ID | ae40859b82494d75e9ad7bf616b3264138ad1f6a.1695754856.git.lukas@wunner.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] dt-bindings: reset: Add Infineon SLB9670 TPM reset driver | expand |
On Tue, 26 Sep 2023 21:09:35 +0200, Lukas Wunner wrote: > A new reset driver is about to be added to perform the reset sequence of > the Infineon SLB9670 Trusted Platform Module. > > Document its device tree bindings. > > Signed-off-by: Lukas Wunner <lukas@wunner.de> > --- > .../bindings/reset/infineon,slb9670-reset.yaml | 68 ++++++++++++++++++++++ > 1 file changed, 68 insertions(+) > create mode 100644 Documentation/devicetree/bindings/reset/infineon,slb9670-reset.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: ./Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml:29:111: [warning] line too long (124 > 110 characters) (line-length) dtschema/dtc warnings/errors: Documentation/devicetree/bindings/reset/infineon,slb9670-reset.example.dtb: /example-0/spi/tpm@0: failed to match any schema with compatible: ['infineon,slb9670'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/ae40859b82494d75e9ad7bf616b3264138ad1f6a.1695754856.git.lukas@wunner.de The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. 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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Tue, Sep 26, 2023 at 03:37:07PM -0500, Rob Herring wrote: > On Tue, 26 Sep 2023 21:09:35 +0200, Lukas Wunner wrote: > > A new reset driver is about to be added to perform the reset sequence of > > the Infineon SLB9670 Trusted Platform Module. > > > > Document its device tree bindings. > > 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/reset/infineon,slb9670-reset.yaml:29:111: [warning] line too long (124 > 110 characters) (line-length) That's the following line: [1] https://www.infineon.com/dgdl/Infineon-SLB%209670VQ2.0-DataSheet-v01_04-EN.pdf?fileId=5546d4626fc1ce0b016fc78270350cd6 I'm not sure what to do about it. Use an URL shortener? I did see the warning when running static checks before submission, but it seemed like a false positive to me. > dtschema/dtc warnings/errors: > Documentation/devicetree/bindings/reset/infineon,slb9670-reset.example.dtb: /example-0/spi/tpm@0: failed to match any schema with compatible: ['infineon,slb9670'] The TPM DT bindings in Documentation/devicetree/bindings/security/tpm/ haven't been converted to YAML yet, hence the warning/error. Is it a prerequisite that I consolidate and convert them before this patch is acceptable? Thanks, Lukas
On 26/09/2023 21:09, Lukas Wunner wrote: > A new reset driver is about to be added to perform the reset sequence of > the Infineon SLB9670 Trusted Platform Module. > > Document its device tree bindings. > > Signed-off-by: Lukas Wunner <lukas@wunner.de> > --- > .../bindings/reset/infineon,slb9670-reset.yaml | 68 ++++++++++++++++++++++ > 1 file changed, 68 insertions(+) > create mode 100644 Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml > > diff --git a/Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml b/Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml > new file mode 100644 > index 00000000..b1e23d47 > --- /dev/null > +++ b/Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml > @@ -0,0 +1,68 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/reset/infineon,slb9670-reset.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Infineon SLB9670 TPM Reset Driver Sorry, bindings are for hardware, not for drivers. > + > +maintainers: > + - Lukas Wunner <lukas@wunner.de> > + > +description: | > + The Infineon SLB9670 Trusted Platform Module requires a specific reset > + sequence on its RST# pin which is documented in sections 5.4 and 5.5 of > + the datasheet [1]. This driver performs the reset sequence using a GPIO. Sorry, bindings are for hardware, not for drivers. I don't see the point for this binding, especially that you refer to drivers. Why it cannot be just part of other device? > + > + The sequence with minimum wait intervals is as follows: > + deassert RST# > + wait at least 60 ms > + assert RST# > + wait at least 2 usecs > + deassert RST# > + wait at least 60 ms > + assert RST# > + wait at least 2 usecs > + deassert RST# > + wait at least 60 ms before issuing the first TPM command > + > + [1] https://www.infineon.com/dgdl/Infineon-SLB%209670VQ2.0-DataSheet-v01_04-EN.pdf?fileId=5546d4626fc1ce0b016fc78270350cd6 > + > +properties: > + compatible: > + enum: > + - infineon,slb9670-reset > + > + reset-gpios: > + maxItems: 1 > + description: Reference to the GPIO connected to the RST# pin. > + > + "#reset-cells": > + const: 0 > + > +required: > + - compatible > + - reset-gpios > + - "#reset-cells" > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + tpm_reset: reset-controller { No need for label. > + compatible = "infineon,slb9670-reset"; > + #reset-cells = <0>; > + reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>; > + }; > + > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + tpm@0 { > + compatible = "infineon,slb9670"; Drop node, not related to the binding. We never keep consumers in binding providers. > + reg = <0>; > + resets = <&tpm_reset>; > + }; > + }; Best regards, Krzysztof
On Wed, Sep 27, 2023 at 08:31:16AM +0200, Lukas Wunner wrote: > On Tue, Sep 26, 2023 at 03:37:07PM -0500, Rob Herring wrote: > > On Tue, 26 Sep 2023 21:09:35 +0200, Lukas Wunner wrote: > > > A new reset driver is about to be added to perform the reset sequence of > > > the Infineon SLB9670 Trusted Platform Module. > > > > > > Document its device tree bindings. > > > > 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/reset/infineon,slb9670-reset.yaml:29:111: [warning] line too long (124 > 110 characters) (line-length) > > That's the following line: > > [1] https://www.infineon.com/dgdl/Infineon-SLB%209670VQ2.0-DataSheet-v01_04-EN.pdf?fileId=5546d4626fc1ce0b016fc78270350cd6 > > I'm not sure what to do about it. Use an URL shortener? The link doesn't even work for me. > I did see the warning when running static checks before submission, > but it seemed like a false positive to me. I suppose we could bump the limit by 1 as I think it is set to 110. > > > dtschema/dtc warnings/errors: > > Documentation/devicetree/bindings/reset/infineon,slb9670-reset.example.dtb: /example-0/spi/tpm@0: failed to match any schema with compatible: ['infineon,slb9670'] > > The TPM DT bindings in Documentation/devicetree/bindings/security/tpm/ > haven't been converted to YAML yet, hence the warning/error. Yes, there's been multiple attempts. Everyone disappears when I say work together and consolidate the efforts. > Is it a prerequisite that I consolidate and convert them before > this patch is acceptable? Yes. Can't have warnings. Rob
diff --git a/Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml b/Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml new file mode 100644 index 00000000..b1e23d47 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reset/infineon,slb9670-reset.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Infineon SLB9670 TPM Reset Driver + +maintainers: + - Lukas Wunner <lukas@wunner.de> + +description: | + The Infineon SLB9670 Trusted Platform Module requires a specific reset + sequence on its RST# pin which is documented in sections 5.4 and 5.5 of + the datasheet [1]. This driver performs the reset sequence using a GPIO. + + The sequence with minimum wait intervals is as follows: + deassert RST# + wait at least 60 ms + assert RST# + wait at least 2 usecs + deassert RST# + wait at least 60 ms + assert RST# + wait at least 2 usecs + deassert RST# + wait at least 60 ms before issuing the first TPM command + + [1] https://www.infineon.com/dgdl/Infineon-SLB%209670VQ2.0-DataSheet-v01_04-EN.pdf?fileId=5546d4626fc1ce0b016fc78270350cd6 + +properties: + compatible: + enum: + - infineon,slb9670-reset + + reset-gpios: + maxItems: 1 + description: Reference to the GPIO connected to the RST# pin. + + "#reset-cells": + const: 0 + +required: + - compatible + - reset-gpios + - "#reset-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + tpm_reset: reset-controller { + compatible = "infineon,slb9670-reset"; + #reset-cells = <0>; + reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + spi { + #address-cells = <1>; + #size-cells = <0>; + + tpm@0 { + compatible = "infineon,slb9670"; + reg = <0>; + resets = <&tpm_reset>; + }; + };
A new reset driver is about to be added to perform the reset sequence of the Infineon SLB9670 Trusted Platform Module. Document its device tree bindings. Signed-off-by: Lukas Wunner <lukas@wunner.de> --- .../bindings/reset/infineon,slb9670-reset.yaml | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/infineon,slb9670-reset.yaml