NXP SoCs like the iMX8QM, iMX8QXP or iMX8DXP use power domains for
resource management.
Allow specifying them for such SoCs.
Signed-off-by: John Ernberg <john.ernberg@actia.se>
---
v2:
- Adjust commit message (Frank Li)
- Only allow power-domains when compatible with imx8qm (Frank Li)
---
.../bindings/crypto/fsl,sec-v4.0.yaml | 36 +++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml b/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml
index 75afa441e019..a3c938eb553e 100644
--- a/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml
+++ b/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml
@@ -48,6 +48,9 @@ properties:
- fsl,imx6ul-caam
- fsl,sec-v5.0
- const: fsl,sec-v4.0
+ - items:
+ - const: fsl,imx8qm-caam
+ - const: fsl,sec-v4.0
- const: fsl,sec-v4.0
reg:
@@ -77,6 +80,9 @@ properties:
interrupts:
maxItems: 1
+ power-domains:
+ maxItems: 1
+
fsl,sec-era:
description: Defines the 'ERA' of the SEC device.
$ref: /schemas/types.yaml#/definitions/uint32
@@ -108,6 +114,9 @@ patternProperties:
- items:
- const: fsl,sec-v5.0-job-ring
- const: fsl,sec-v4.0-job-ring
+ - items:
+ - const: fsl,imx8qm-job-ring
+ - const: fsl,sec-v4.0-job-ring
- const: fsl,sec-v4.0-job-ring
reg:
@@ -116,6 +125,9 @@ patternProperties:
interrupts:
maxItems: 1
+ power-domains:
+ maxItems: 1
+
fsl,liodn:
description:
Specifies the LIODN to be used in conjunction with the ppid-to-liodn
@@ -126,6 +138,18 @@ patternProperties:
items:
- maximum: 0xfff
+ if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx8qm-job-ring
+ then:
+ required:
+ - power-domains
+ else:
+ properties:
+ power-domains: false
+
'^rtic@[0-9a-f]+$':
type: object
additionalProperties: false
@@ -212,6 +236,18 @@ required:
- reg
- ranges
+if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx8qm-caam
+then:
+ required:
+ - power-domains
+else:
+ properties:
+ power-domains: false
+
additionalProperties: false
examples:
--
2.49.0
On Tue, 27 May 2025 07:16:03 +0000, John Ernberg wrote: > NXP SoCs like the iMX8QM, iMX8QXP or iMX8DXP use power domains for > resource management. > > Allow specifying them for such SoCs. > > Signed-off-by: John Ernberg <john.ernberg@actia.se> > > --- > > v2: > - Adjust commit message (Frank Li) > - Only allow power-domains when compatible with imx8qm (Frank Li) > --- > .../bindings/crypto/fsl,sec-v4.0.yaml | 36 +++++++++++++++++++ > 1 file changed, 36 insertions(+) > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml: patternProperties:^jr@[0-9a-f]+$: 'if' is not one of ['type', 'description', 'dependencies', 'dependentRequired', 'dependentSchemas', 'properties', 'patternProperties', 'additionalProperties', 'unevaluatedProperties', 'deprecated', 'required', 'not', 'allOf', 'anyOf', 'oneOf', '$ref'] from schema $id: http://devicetree.org/meta-schemas/nodes.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml: patternProperties:^jr@[0-9a-f]+$: 'then' is not one of ['type', 'description', 'dependencies', 'dependentRequired', 'dependentSchemas', 'properties', 'patternProperties', 'additionalProperties', 'unevaluatedProperties', 'deprecated', 'required', 'not', 'allOf', 'anyOf', 'oneOf', '$ref'] from schema $id: http://devicetree.org/meta-schemas/nodes.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml: patternProperties:^jr@[0-9a-f]+$: 'else' is not one of ['type', 'description', 'dependencies', 'dependentRequired', 'dependentSchemas', 'properties', 'patternProperties', 'additionalProperties', 'unevaluatedProperties', 'deprecated', 'required', 'not', 'allOf', 'anyOf', 'oneOf', '$ref'] from schema $id: http://devicetree.org/meta-schemas/nodes.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250527071552.1424997-4-john.ernberg@actia.se 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 27/05/2025 09:16, John Ernberg wrote: > > diff --git a/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml b/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml > index 75afa441e019..a3c938eb553e 100644 > --- a/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml > +++ b/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml > @@ -48,6 +48,9 @@ properties: > - fsl,imx6ul-caam > - fsl,sec-v5.0 > - const: fsl,sec-v4.0 > + - items: > + - const: fsl,imx8qm-caam That's part of previous enum, no? > + - const: fsl,sec-v4.0 > - const: fsl,sec-v4.0 > > reg: > @@ -77,6 +80,9 @@ properties: > interrupts: > maxItems: 1 > > + power-domains: > + maxItems: 1 > + > fsl,sec-era: > description: Defines the 'ERA' of the SEC device. > $ref: /schemas/types.yaml#/definitions/uint32 > @@ -108,6 +114,9 @@ patternProperties: > - items: > - const: fsl,sec-v5.0-job-ring > - const: fsl,sec-v4.0-job-ring > + - items: > + - const: fsl,imx8qm-job-ring Combine with previous entry into enum. > + - const: fsl,sec-v4.0-job-ring > - const: fsl,sec-v4.0-job-ring > Best regards, Krzysztof
Hi Krzysztof, On Tue, May 27, 2025 at 09:19:22AM +0200, Krzysztof Kozlowski wrote: > On 27/05/2025 09:16, John Ernberg wrote: > > > > diff --git a/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml b/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml > > index 75afa441e019..a3c938eb553e 100644 > > --- a/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml > > +++ b/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0.yaml > > @@ -48,6 +48,9 @@ properties: > > - fsl,imx6ul-caam > > - fsl,sec-v5.0 > > - const: fsl,sec-v4.0 > > + - items: > > + - const: fsl,imx8qm-caam > > That's part of previous enum, no? > > > + - const: fsl,sec-v4.0 > > - const: fsl,sec-v4.0 > > > > reg: > > @@ -77,6 +80,9 @@ properties: > > interrupts: > > maxItems: 1 > > > > + power-domains: > > + maxItems: 1 > > + > > fsl,sec-era: > > description: Defines the 'ERA' of the SEC device. > > $ref: /schemas/types.yaml#/definitions/uint32 > > @@ -108,6 +114,9 @@ patternProperties: > > - items: > > - const: fsl,sec-v5.0-job-ring > > - const: fsl,sec-v4.0-job-ring > > + - items: > > + - const: fsl,imx8qm-job-ring > > Combine with previous entry into enum. > I think I managed to confuse myself around how compatible enums work first time around, thanks for prompting me to look again, I hopefully understand better now. Will take care of this for V3. Thanks! // John Ernberg
© 2016 - 2025 Red Hat, Inc.