Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: crypto: Convert Atmel AES to yaml

Convert Atmel AES documentation to yaml format. With the conversion the
clock and clock-names properties are made mandatory. The driver returns
-EINVAL if "aes_clk" is not found, reflect that in the bindings and make
the clock and clock-names properties mandatory. Update the example to
better describe how one should define the dt node.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220211093922.456634-2-tudor.ambarus@microchip.com

authored by

Tudor Ambarus and committed by
Rob Herring
c8f2ad68 2e8185fc

+66 -20
+66
Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + # Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries 3 + %YAML 1.2 4 + --- 5 + $id: http://devicetree.org/schemas/crypto/atmel,at91sam9g46-aes.yaml# 6 + $schema: http://devicetree.org/meta-schemas/core.yaml# 7 + 8 + title: Atmel Advanced Encryption Standard (AES) HW cryptographic accelerator 9 + 10 + maintainers: 11 + - Tudor Ambarus <tudor.ambarus@microchip.com> 12 + 13 + properties: 14 + compatible: 15 + const: atmel,at91sam9g46-aes 16 + 17 + reg: 18 + maxItems: 1 19 + 20 + interrupts: 21 + maxItems: 1 22 + 23 + clocks: 24 + maxItems: 1 25 + 26 + clock-names: 27 + const: aes_clk 28 + 29 + dmas: 30 + items: 31 + - description: TX DMA Channel 32 + - description: RX DMA Channel 33 + 34 + dma-names: 35 + items: 36 + - const: tx 37 + - const: rx 38 + 39 + required: 40 + - compatible 41 + - reg 42 + - interrupts 43 + - clocks 44 + - clock-names 45 + - dmas 46 + - dma-names 47 + 48 + additionalProperties: false 49 + 50 + examples: 51 + - | 52 + #include <dt-bindings/interrupt-controller/irq.h> 53 + #include <dt-bindings/interrupt-controller/arm-gic.h> 54 + #include <dt-bindings/clock/at91.h> 55 + #include <dt-bindings/dma/at91.h> 56 + 57 + aes: crypto@e1810000 { 58 + compatible = "atmel,at91sam9g46-aes"; 59 + reg = <0xe1810000 0x100>; 60 + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; 61 + clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; 62 + clock-names = "aes_clk"; 63 + dmas = <&dma0 AT91_XDMAC_DT_PERID(1)>, 64 + <&dma0 AT91_XDMAC_DT_PERID(2)>; 65 + dma-names = "tx", "rx"; 66 + };
-20
Documentation/devicetree/bindings/crypto/atmel-crypto.txt
··· 2 2 3 3 These are the HW cryptographic accelerators found on some Atmel products. 4 4 5 - * Advanced Encryption Standard (AES) 6 - 7 - Required properties: 8 - - compatible : Should be "atmel,at91sam9g46-aes". 9 - - reg: Should contain AES registers location and length. 10 - - interrupts: Should contain the IRQ line for the AES. 11 - - dmas: List of two DMA specifiers as described in 12 - atmel-dma.txt and dma.txt files. 13 - - dma-names: Contains one identifier string for each DMA specifier 14 - in the dmas property. 15 - 16 - Example: 17 - aes@f8038000 { 18 - compatible = "atmel,at91sam9g46-aes"; 19 - reg = <0xf8038000 0x100>; 20 - interrupts = <43 4 0>; 21 - dmas = <&dma1 2 18>, 22 - <&dma1 2 19>; 23 - dma-names = "tx", "rx"; 24 - 25 5 * Triple Data Encryption Standard (Triple DES) 26 6 27 7 Required properties: