Message ID | 20231107155532.3747113-2-clabbe@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | crypto: rockchip: add support for rk3588/rk3568 | expand |
On 07/11/2023 16:55, Corentin Labbe wrote: > Add device tree binding documentation for the Rockchip cryptographic > offloader V2. > > Signed-off-by: Corentin Labbe <clabbe@baylibre.com> > --- > .../crypto/rockchip,rk3588-crypto.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml > > diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml > new file mode 100644 > index 000000000000..07024cf4fb0e > --- /dev/null > +++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml > @@ -0,0 +1,65 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/crypto/rockchip,rk3588-crypto.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Rockchip cryptographic offloader V2 v2? Where is any documentation of this versioning? From where does it come from? > + > +maintainers: > + - Corentin Labbe <clabbe@baylibre.com> > + > +properties: > + compatible: > + enum: > + - rockchip,rk3568-crypto > + - rockchip,rk3588-crypto > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + minItems: 3 You also must describe the items instead. Where do you see any binding using minItems alone? > + > + clock-names: > + items: > + - const: core > + - const: a > + - const: h > + > + resets: > + minItems: 1 No, maxItems. > + > + reset-names: > + items: > + - const: core Drop reset-names, not really needed and not useful. > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - resets > + - reset-names Best regards, Krzysztof
Le Tue, Nov 07, 2023 at 05:40:24PM +0100, Krzysztof Kozlowski a écrit : > On 07/11/2023 16:55, Corentin Labbe wrote: > > Add device tree binding documentation for the Rockchip cryptographic > > offloader V2. > > > > Signed-off-by: Corentin Labbe <clabbe@baylibre.com> > > --- > > .../crypto/rockchip,rk3588-crypto.yaml | 65 +++++++++++++++++++ > > 1 file changed, 65 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml > > > > diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml > > new file mode 100644 > > index 000000000000..07024cf4fb0e > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml > > @@ -0,0 +1,65 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/crypto/rockchip,rk3588-crypto.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Rockchip cryptographic offloader V2 > > v2? Where is any documentation of this versioning? From where does it > come from? > Hello Datasheet/TRM has no naming or codename. But vendor source call it crypto v2, so I kept the name. > > + > > +maintainers: > > + - Corentin Labbe <clabbe@baylibre.com> > > + > > +properties: > > + compatible: > > + enum: > > + - rockchip,rk3568-crypto > > + - rockchip,rk3588-crypto > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + clocks: > > + minItems: 3 > > You also must describe the items instead. > > Where do you see any binding using minItems alone? > > > + > > + clock-names: > > + items: > > + - const: core > > + - const: a > > + - const: h > > + > > + resets: > > + minItems: 1 > > No, maxItems. > > > + > > + reset-names: > > + items: > > + - const: core > > Drop reset-names, not really needed and not useful. > > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + - clock-names > > + - resets > > + - reset-names > > I will fix all thoses problems. Thanks for review. Regards
On 20/11/2023 13:37, Corentin LABBE wrote: >>> diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml >>> new file mode 100644 >>> index 000000000000..07024cf4fb0e >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml >>> @@ -0,0 +1,65 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/crypto/rockchip,rk3588-crypto.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Rockchip cryptographic offloader V2 >> >> v2? Where is any documentation of this versioning? From where does it >> come from? >> > > Hello > > Datasheet/TRM has no naming or codename. > But vendor source call it crypto v2, so I kept the name. I would suggest using information from datasheet/manual or just SoC name, so: Rockchip RK3588 Cryptographic Offloader How can you be sure that downstream source used v2 for hardware, not driver? Poor-quality downstream source is rarely a source of proper solution... Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml new file mode 100644 index 000000000000..07024cf4fb0e --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/rockchip,rk3588-crypto.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip cryptographic offloader V2 + +maintainers: + - Corentin Labbe <clabbe@baylibre.com> + +properties: + compatible: + enum: + - rockchip,rk3568-crypto + - rockchip,rk3588-crypto + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 3 + + clock-names: + items: + - const: core + - const: a + - const: h + + resets: + minItems: 1 + + reset-names: + items: + - const: core + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - reset-names + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/rockchip,rk3588-cru.h> + #include <dt-bindings/reset/rockchip,rk3588-cru.h> + crypto@fe370000 { + compatible = "rockchip,rk3588-crypto"; + reg = <0xfe370000 0x4000>; + interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH 0>; + clocks = <&scmi_clk SCMI_CRYPTO_CORE>, <&scmi_clk SCMI_ACLK_SECURE_NS>, + <&scmi_clk SCMI_HCLK_SECURE_NS>; + clock-names = "core", "a", "h"; + resets = <&scmi_reset SRST_CRYPTO_CORE>; + reset-names = "core"; + };
Add device tree binding documentation for the Rockchip cryptographic offloader V2. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> --- .../crypto/rockchip,rk3588-crypto.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml