[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250129-vagabond-scrupulous-scorpion-b57db9@krzk-bin>
Date: Wed, 29 Jan 2025 09:13:05 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Andrei Simion <andrei.simion@...rochip.com>
Cc: claudiu.beznea@...on.dev, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, broonie@...nel.org, nicolas.ferre@...rochip.com,
alexandre.belloni@...tlin.com, linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: misc: atmel,at91-ssc: Convert to YAML
format
On Tue, Jan 28, 2025 at 06:18:43PM +0200, Andrei Simion wrote:
> Convert devicetree binding atmel-ssc.txt to YAML format.
>
> Signed-off-by: Andrei Simion <andrei.simion@...rochip.com>
> ---
> .../bindings/misc/atmel,at91-ssc.yaml | 111 ++++++++++++++++++
> .../devicetree/bindings/misc/atmel-ssc.txt | 50 --------
> 2 files changed, 111 insertions(+), 50 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/misc/atmel,at91-ssc.yaml
Please place it in sound directory. Or soc if this is not ASoC, but
including dai-common is clear indication.
> delete mode 100644 Documentation/devicetree/bindings/misc/atmel-ssc.txt
>
> diff --git a/Documentation/devicetree/bindings/misc/atmel,at91-ssc.yaml b/Documentation/devicetree/bindings/misc/atmel,at91-ssc.yaml
> new file mode 100644
> index 0000000000000..a37ee5e58fa58
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/atmel,at91-ssc.yaml
> @@ -0,0 +1,111 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/atmel,at91-ssc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel Serial Synchronous Serial (SSC)
> +
> +maintainers:
> + - Andrei Simion <andrei.simion@...rochip.com>
> +
> +description:
> + The Atmel Synchronous Serial Controller (SSC) provides a versatile
> + synchronous communication link for audio and telecom applications,
> + supporting protocols like I2S, Short Frame Sync, and Long Frame Sync.
> +
> +properties:
> + compatible:
> + oneOf:
> + - enum:
> + - atmel,at91rm9200-ssc
> + - atmel,at91sam9g45-ssc
> + - items:
> + - const: microchip,sam9x7-ssc
This wasn't in the binding and your commit msg is silent. You need to
explain all changes done to the binding during conversion.
> + - const: atmel,at91sam9g45-ssc
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + items:
> + - const: pclk
> +
> + dmas:
> + items:
> + - description: TX DMA Channel
> + - description: RX DMA Channel
> +
> + dma-names:
> + description: Names of the DMA channels.
Drop description
> + items:
> + - const: tx
> + - const: rx
> +
> + atmel,clk-from-rk-pin:
> + description:
> + Specify the clock source for the SSC (Synchronous Serial Controller)
> + when operating in slave mode. By default, the clock is sourced from
> + the TK pin. Set this property to true to source the clock from
You cannot set this property to true. This can be present or can be
missing
> + the RK pin instead, based on your hardware design requirements.
> + type: boolean
> +
Missing dai-cells. Old binding said 0, now you say anything...
Missing required block
> +allOf:
> + - $ref: ../sound/dai-common.yaml#
Full path, so /schemas/
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - atmel,at91sam9g45-ssc
> + then:
> + required:
> + - compatible
> + - reg
> + - interrupts
> + - dmas
> + - dma-names
So only dmas?
> + - clocks
> + - clock-names
> + else:
> + required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
Drop entire required:
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/at91.h>
> + #include <dt-bindings/dma/at91.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + ssc@...000 {
> + compatible = "atmel,at91sam9g45-ssc";
> + reg = <0x100000 0x4000>;
> + interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
> + dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
> + AT91_XDMAC_DT_PERID(38))>,
> + <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
> + AT91_XDMAC_DT_PERID(39))>;
> + dma-names = "tx", "rx";
> + clocks = <&pmc PMC_TYPE_PERIPHERAL 28>;
> + clock-names = "pclk";
Make the binding complee - dai properties.
Best regards,
Krzysztof
Powered by blists - more mailing lists