[PATCH v2] spi: atmel: convert spi_atmel to json-schema
Claudiu.Beznea at microchip.com
Claudiu.Beznea at microchip.com
Mon Jul 4 06:13:50 PDT 2022
On 04.07.2022 15:52, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 04/07/2022 10:31, Sergiu Moga wrote:
>> Convert SPI DT binding for Atmel/Microchip SoCs to YAML schema.
>>
>> Signed-off-by: Sergiu Moga <sergiu.moga at microchip.com>
>> ---
>>
>> v1 -> v2:
>> - change subject headline prefix from "dt-bindings: spi" to "spi: atmel"
>
> Should be:
> spi: dt-bindings: atmel,spi: convert to json-schema
> (or to DT schema)
>
>
>> - change maintainer
>> - kept the compatbile as items (instead of switching to enums) and at91rm9200
>> as fallback for sam9x60, since the evolution of IP's is incremental.
>> - removed unnecessay "cs-gpios" property and descriptions
>> - added min/max for fifo-size property.
>>
>>
>> .../devicetree/bindings/spi/atmel,spi.yaml | 77 +++++++++++++++++++
Regarding file name, shouldn't it be atmel,at91rm9200-spi.yaml or something
similar?
>> .../devicetree/bindings/spi/spi_atmel.txt | 36 ---------
>> 2 files changed, 77 insertions(+), 36 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/spi/atmel,spi.yaml
>> delete mode 100644 Documentation/devicetree/bindings/spi/spi_atmel.txt
>>
>> diff --git a/Documentation/devicetree/bindings/spi/atmel,spi.yaml b/Documentation/devicetree/bindings/spi/atmel,spi.yaml
>> new file mode 100644
>> index 000000000000..d627fc9315bc
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/spi/atmel,spi.yaml
>> @@ -0,0 +1,77 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/spi/atmel,spi.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel SPI device
>> +
>> +maintainers:
>> + - Tudor Ambarus <tudor.ambarus at microchip.com>
>> +
>> +allOf:
>> + - $ref: spi-controller.yaml#
>> +
>> +properties:
>> + compatible:
>> + oneOf:
>> + - items:
>> + - const: atmel,at91rm9200-spi
>> + - items:
>> + - const: microchip,sam9x60-spi
>> + - const: atmel,at91rm9200-spi
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + clock-names:
>> + contains:
>> + const: spi_clk
>> +
>> + clocks:
>> + maxItems: 1
>> +
>> + atmel,fifo-size:
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + description: |
>> + Maximum number of data the RX and TX FIFOs can store for FIFO
>> + capable SPI controllers.
>> + minimum: 16
>> + maximum: 32
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - interrupts
>> + - clock-names
>> + - clocks
>
> In properties it's clock-names followed by clocks, so better to keep
> same order here.
>
>> +
>> +unevaluatedProperties: false
>> +
>
>
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
>
> Best regards,
> Krzysztof
More information about the linux-arm-kernel
mailing list