Message ID | 20240301132936.621238-18-avromanov@salutedevices.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Herbert Xu |
Headers | show |
Series | Support more Amlogic SoC families in crypto driver | expand |
On 01/03/2024 14:29, Alexey Romanov wrote: > Now crypto module available at G12A/G12B/S4/A1/SM1/AXG. > > @@ -11,8 +11,16 @@ maintainers: > > properties: > compatible: > - items: > - - const: amlogic,gxl-crypto > + oneOf: > + - items: > + - enum: > + - amlogic,s4-crypto > + - const: amlogic,a1-crypto > + - enum: > + - amlogic,gxl-crypto > + - amlogic,axg-crypto > + - amlogic,g12a-crypto > + - amlogic,a1-crypto > > reg: > maxItems: 1 > @@ -21,10 +29,14 @@ properties: > items: > - description: Interrupt for flow 0 > - description: Interrupt for flow 1 > + minItems: 1 > > clocks: > maxItems: 1 > > + power-domains: > + maxItems: 1 > + Don't break the order. names always follow given entry. > clock-names: > const: blkmv > > @@ -32,8 +44,24 @@ required: > - compatible > - reg > - interrupts > - - clocks > - - clock-names > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: amlogic,gxl-crypto > + then: > + required: > + - clocks > + - clock-names > + properties: First properties, then required. > + interrupts: > + maxItems: 2 > + else: > + properties: > + interrupts: > + maxItems: 1 clocks: false clock-names: false > Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml b/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml index 948e11ebe4ee..2aafd7390c40 100644 --- a/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml +++ b/Documentation/devicetree/bindings/crypto/amlogic,gxl-crypto.yaml @@ -11,8 +11,16 @@ maintainers: properties: compatible: - items: - - const: amlogic,gxl-crypto + oneOf: + - items: + - enum: + - amlogic,s4-crypto + - const: amlogic,a1-crypto + - enum: + - amlogic,gxl-crypto + - amlogic,axg-crypto + - amlogic,g12a-crypto + - amlogic,a1-crypto reg: maxItems: 1 @@ -21,10 +29,14 @@ properties: items: - description: Interrupt for flow 0 - description: Interrupt for flow 1 + minItems: 1 clocks: maxItems: 1 + power-domains: + maxItems: 1 + clock-names: const: blkmv @@ -32,8 +44,24 @@ required: - compatible - reg - interrupts - - clocks - - clock-names + +allOf: + - if: + properties: + compatible: + contains: + const: amlogic,gxl-crypto + then: + required: + - clocks + - clock-names + properties: + interrupts: + maxItems: 2 + else: + properties: + interrupts: + maxItems: 1 additionalProperties: false
Now crypto module available at G12A/G12B/S4/A1/SM1/AXG. 1. Add new compatibles: - amlogic,g12a-crypto - amlogic,axg-crypto - amlogic,a1-crypto - amlogic,s4-crypto (uses a1-crypto as fallback) 2. All SoC's, exclude GXL, doesn't take a clock input for Crypto IP. Make it required only for amlogic,gxl-crypto. 3. All SoC's, exclude GXL, uses only one interrupt flow for Crypto IP. 4. Add power-domains in schema. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> --- .../bindings/crypto/amlogic,gxl-crypto.yaml | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-)