* [PATCH 1/3] xlnx: dt-bindings: xlnx,i2s: Convert to json-schema
2024-12-13 16:52 [PATCH 0/3] xlnx: dt-bindings: Convert to json-schema Vincenzo Frascino
@ 2024-12-13 16:52 ` Vincenzo Frascino
2024-12-13 18:41 ` Rob Herring (Arm)
2024-12-14 10:24 ` Krzysztof Kozlowski
2024-12-13 16:52 ` [PATCH 2/3] xlnx: dt-bindings: xlnx,audio-formatter: " Vincenzo Frascino
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Vincenzo Frascino @ 2024-12-13 16:52 UTC (permalink / raw)
To: devicetree, linux-kernel, vincenzo.frascino
Cc: Maruthi Srinivas Bayyavarapu, Sudeep Holla, Rob Herring
Convert the Xilinx I2S device tree binding documentation to json-schema.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
.../devicetree/bindings/sound/xlnx,i2s.txt | 28 -------
.../devicetree/bindings/sound/xlnx,i2s.yaml | 79 +++++++++++++++++++
2 files changed, 79 insertions(+), 28 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.txt
create mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
diff --git a/Documentation/devicetree/bindings/sound/xlnx,i2s.txt b/Documentation/devicetree/bindings/sound/xlnx,i2s.txt
deleted file mode 100644
index 5e7c7d5bb60a..000000000000
--- a/Documentation/devicetree/bindings/sound/xlnx,i2s.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Device-Tree bindings for Xilinx I2S PL block
-
-The IP supports I2S based playback/capture audio
-
-Required property:
- - compatible: "xlnx,i2s-transmitter-1.0" for playback and
- "xlnx,i2s-receiver-1.0" for capture
-
-Required property common to both I2S playback and capture:
- - reg: Base address and size of the IP core instance.
- - xlnx,dwidth: sample data width. Can be any of 16, 24.
- - xlnx,num-channels: Number of I2S streams. Can be any of 1, 2, 3, 4.
- supported channels = 2 * xlnx,num-channels
-
-Example:
-
- i2s_receiver@a0080000 {
- compatible = "xlnx,i2s-receiver-1.0";
- reg = <0x0 0xa0080000 0x0 0x10000>;
- xlnx,dwidth = <0x18>;
- xlnx,num-channels = <1>;
- };
- i2s_transmitter@a0090000 {
- compatible = "xlnx,i2s-transmitter-1.0";
- reg = <0x0 0xa0090000 0x0 0x10000>;
- xlnx,dwidth = <0x18>;
- xlnx,num-channels = <1>;
- };
diff --git a/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml b/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
new file mode 100644
index 000000000000..b8bda7c28d37
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/xlnx,i2s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Device-Tree bindings for Xilinx I2S PL block
+
+description: |
+ The IP supports I2S based playback/capture audio.
+
+maintainers:
+ - Vincenzo Frascino <vincenzo.frascino@arm.com>
+ - Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - const: xlnx,i2s-receiver-1.0
+ - const: xlnx,i2s-transmitter-1.0
+
+ reg:
+ maxItems: 1
+ description: |
+ Base address and size of the IP core instance.
+
+ "#sound-dai-cells":
+ const: 0
+
+ "#address-cells":
+ maxItems: 1
+
+ "#size-cells":
+ maxItems: 1
+
+ xlnx,dwidth:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maxItems: 1
+ oneOf:
+ - const: 16
+ - const: 24
+ description: |
+ Sample data width. Can be any of 16, 24.
+
+ xlnx,num-channels:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maxItems: 1
+ description: |
+ Number of I2S streams.
+ minimum: 1
+ maximum: 4
+
+required:
+ - compatible
+ - reg
+ - xlnx,dwidth
+ - xlnx,num-channels
+
+additionalProperties: false
+
+examples:
+ - |
+ i2s_receiver@a0080000 {
+ compatible = "xlnx,i2s-receiver-1.0";
+ reg = <0x0 0xa0080000 0x0 0x10000>;
+ xlnx,dwidth = <0x18>;
+ xlnx,num-channels = <1>;
+ };
+ i2s_transmitter@a0090000 {
+ compatible = "xlnx,i2s-transmitter-1.0";
+ reg = <0x0 0xa0090000 0x0 0x10000>;
+ xlnx,dwidth = <0x18>;
+ xlnx,num-channels = <1>;
+ };
+
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 1/3] xlnx: dt-bindings: xlnx,i2s: Convert to json-schema
2024-12-13 16:52 ` [PATCH 1/3] xlnx: dt-bindings: xlnx,i2s: " Vincenzo Frascino
@ 2024-12-13 18:41 ` Rob Herring (Arm)
2024-12-14 10:24 ` Krzysztof Kozlowski
1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2024-12-13 18:41 UTC (permalink / raw)
To: Vincenzo Frascino
Cc: Maruthi Srinivas Bayyavarapu, devicetree, linux-kernel,
Sudeep Holla
On Fri, 13 Dec 2024 16:52:38 +0000, Vincenzo Frascino wrote:
> Convert the Xilinx I2S device tree binding documentation to json-schema.
>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> .../devicetree/bindings/sound/xlnx,i2s.txt | 28 -------
> .../devicetree/bindings/sound/xlnx,i2s.yaml | 79 +++++++++++++++++++
> 2 files changed, 79 insertions(+), 28 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.txt
> create mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
>
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/sound/xlnx,i2s.yaml: properties:xlnx,num-channels: 'minimum' should not be valid under {'enum': ['const', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'minimum', 'maximum', 'multipleOf', 'pattern']}
hint: Scalar and array keywords cannot be mixed
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: properties:xlnx,num-channels: 'maximum' should not be valid under {'enum': ['const', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'minimum', 'maximum', 'multipleOf', 'pattern']}
hint: Scalar and array keywords cannot be mixed
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: properties:xlnx,num-channels:maxItems: False schema does not allow 1
hint: Scalar properties should not have array keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: properties:compatible:oneOf: [{'const': 'xlnx,i2s-receiver-1.0'}, {'const': 'xlnx,i2s-transmitter-1.0'}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
hint: Use 'enum' rather than 'oneOf' + 'const' entries
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: properties:xlnx,dwidth:oneOf: [{'const': 16}, {'const': 24}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
hint: Use 'enum' rather than 'oneOf' + 'const' entries
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: properties:xlnx,dwidth:maxItems: False schema does not allow 1
hint: Scalar properties should not have array keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: title: 'Device-Tree bindings for Xilinx I2S PL block' should not be valid under {'pattern': '([Bb]inding| [Ss]chema)'}
hint: Everything is a binding/schema, no need to say it. Describe what hardware the binding is for.
from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: properties:#address-cells: 'maxItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf']
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml: properties:#size-cells: 'maxItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf']
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.example.dtb: i2s_receiver@a0080000: reg: [[0, 2684878848], [0, 65536]] is too long
from schema $id: http://devicetree.org/schemas/sound/xlnx,i2s.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,i2s.example.dtb: i2s_transmitter@a0090000: reg: [[0, 2684944384], [0, 65536]] is too long
from schema $id: http://devicetree.org/schemas/sound/xlnx,i2s.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241213165240.3652961-2-vincenzo.frascino@arm.com
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.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 1/3] xlnx: dt-bindings: xlnx,i2s: Convert to json-schema
2024-12-13 16:52 ` [PATCH 1/3] xlnx: dt-bindings: xlnx,i2s: " Vincenzo Frascino
2024-12-13 18:41 ` Rob Herring (Arm)
@ 2024-12-14 10:24 ` Krzysztof Kozlowski
1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-14 10:24 UTC (permalink / raw)
To: Vincenzo Frascino, devicetree, linux-kernel
Cc: Maruthi Srinivas Bayyavarapu, Sudeep Holla, Rob Herring
On 13/12/2024 17:52, Vincenzo Frascino wrote:
> Convert the Xilinx I2S device tree binding documentation to json-schema.
>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
<form letter>
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC (and consider --no-git-fallback argument, so you will
not CC people just because they made one commit years ago). It might
happen, that command when run on an older kernel, gives you outdated
entries. Therefore please be sure you base your patches on recent Linux
kernel.
Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline) or work on fork of kernel
(don't, instead use mainline). Just use b4 and everything should be
fine, although remember about `b4 prep --auto-to-cc` if you added new
patches to the patchset.
</form letter>
> ---
> .../devicetree/bindings/sound/xlnx,i2s.txt | 28 -------
> .../devicetree/bindings/sound/xlnx,i2s.yaml | 79 +++++++++++++++++++
> 2 files changed, 79 insertions(+), 28 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.txt
> create mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching. For bindings, the preferred subjects are
explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
>
> diff --git a/Documentation/devicetree/bindings/sound/xlnx,i2s.txt b/Documentation/devicetree/bindings/sound/xlnx,i2s.txt
> deleted file mode 100644
> index 5e7c7d5bb60a..000000000000
> --- a/Documentation/devicetree/bindings/sound/xlnx,i2s.txt
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -Device-Tree bindings for Xilinx I2S PL block
> -
> -The IP supports I2S based playback/capture audio
> -
> -Required property:
> - - compatible: "xlnx,i2s-transmitter-1.0" for playback and
> - "xlnx,i2s-receiver-1.0" for capture
> -
> -Required property common to both I2S playback and capture:
> - - reg: Base address and size of the IP core instance.
> - - xlnx,dwidth: sample data width. Can be any of 16, 24.
> - - xlnx,num-channels: Number of I2S streams. Can be any of 1, 2, 3, 4.
> - supported channels = 2 * xlnx,num-channels
> -
> -Example:
> -
> - i2s_receiver@a0080000 {
> - compatible = "xlnx,i2s-receiver-1.0";
> - reg = <0x0 0xa0080000 0x0 0x10000>;
> - xlnx,dwidth = <0x18>;
> - xlnx,num-channels = <1>;
> - };
> - i2s_transmitter@a0090000 {
> - compatible = "xlnx,i2s-transmitter-1.0";
> - reg = <0x0 0xa0090000 0x0 0x10000>;
> - xlnx,dwidth = <0x18>;
> - xlnx,num-channels = <1>;
> - };
> diff --git a/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml b/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
> new file mode 100644
> index 000000000000..b8bda7c28d37
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
> @@ -0,0 +1,79 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/xlnx,i2s.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Device-Tree bindings for Xilinx I2S PL block
There is never "Device-tree bindings for" in the title. Please start
bindings from some existing sources or example-schema.
It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Maybe you need to update your dtschema and yamllint. Don't rely on
distro packages for dtschema and be sure you are using the latest
released dtschema.
> +
> +description: |
> + The IP supports I2S based playback/capture audio.
> +
> +maintainers:
> + - Vincenzo Frascino <vincenzo.frascino@arm.com>
> + - Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
> +
> +allOf:
> + - $ref: dai-common.yaml#
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: xlnx,i2s-receiver-1.0
> + - const: xlnx,i2s-transmitter-1.0
> +
> + reg:
> + maxItems: 1
> + description: |
> + Base address and size of the IP core instance.
> +
> + "#sound-dai-cells":
> + const: 0
> +
> + "#address-cells":
> + maxItems: 1
no, drop or explain. There was nothing like that in old bindingg.
> +
> + "#size-cells":
> + maxItems: 1
Drop
> +
> + xlnx,dwidth:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + maxItems: 1
Drop
> + oneOf:
> + - const: 16
> + - const: 24
That's just enum.
> + description: |
> + Sample data width. Can be any of 16, 24.
> +
> + xlnx,num-channels:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + maxItems: 1
Drop
> + description: |
Do not need '|' unless you need to preserve formatting.
> + Number of I2S streams.
> + minimum: 1
> + maximum: 4
> +
> +required:
> + - compatible
> + - reg
> + - xlnx,dwidth
> + - xlnx,num-channels
> +
> +additionalProperties: false
unevaluatedProperties instead
> +
> +examples:
> + - |
> + i2s_receiver@a0080000 {
i2s@
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "xlnx,i2s-receiver-1.0";
> + reg = <0x0 0xa0080000 0x0 0x10000>;
> + xlnx,dwidth = <0x18>;
> + xlnx,num-channels = <1>;
> + };
> + i2s_transmitter@a0090000 {
> + compatible = "xlnx,i2s-transmitter-1.0";
Drop the node, one example is enough since they do not differ.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] xlnx: dt-bindings: xlnx,audio-formatter: Convert to json-schema
2024-12-13 16:52 [PATCH 0/3] xlnx: dt-bindings: Convert to json-schema Vincenzo Frascino
2024-12-13 16:52 ` [PATCH 1/3] xlnx: dt-bindings: xlnx,i2s: " Vincenzo Frascino
@ 2024-12-13 16:52 ` Vincenzo Frascino
2024-12-13 18:41 ` Rob Herring (Arm)
2024-12-13 16:52 ` [PATCH 3/3] xlnx: dt-bindings: xlnx,spdif: " Vincenzo Frascino
2025-02-21 17:20 ` [PATCH 0/3] xlnx: dt-bindings: " Vincenzo Frascino
3 siblings, 1 reply; 9+ messages in thread
From: Vincenzo Frascino @ 2024-12-13 16:52 UTC (permalink / raw)
To: devicetree, linux-kernel, vincenzo.frascino
Cc: Maruthi Srinivas Bayyavarapu, Sudeep Holla, Rob Herring
Convert the Xilinx Audio Formatter 1.0 device tree binding documentation
to json-schema.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
.../bindings/sound/xlnx,audio-formatter.txt | 29 -------
.../bindings/sound/xlnx,audio-formatter.yaml | 84 +++++++++++++++++++
2 files changed, 84 insertions(+), 29 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,audio-formatter.txt
create mode 100644 Documentation/devicetree/bindings/sound/xlnx,audio-formatter.yaml
diff --git a/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.txt b/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.txt
deleted file mode 100644
index cbc93c8f4963..000000000000
--- a/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Device-Tree bindings for Xilinx PL audio formatter
-
-The IP core supports DMA, data formatting(AES<->PCM conversion)
-of audio samples.
-
-Required properties:
- - compatible: "xlnx,audio-formatter-1.0"
- - interrupt-names: Names specified to list of interrupts in same
- order mentioned under "interrupts".
- List of supported interrupt names are:
- "irq_mm2s" : interrupt from MM2S block
- "irq_s2mm" : interrupt from S2MM block
- - interrupts-parent: Phandle for interrupt controller.
- - interrupts: List of Interrupt numbers.
- - reg: Base address and size of the IP core instance.
- - clock-names: List of input clocks.
- Required elements: "s_axi_lite_aclk", "aud_mclk"
- - clocks: Input clock specifier. Refer to common clock bindings.
-
-Example:
- audio_ss_0_audio_formatter_0: audio_formatter@80010000 {
- compatible = "xlnx,audio-formatter-1.0";
- interrupt-names = "irq_mm2s", "irq_s2mm";
- interrupt-parent = <&gic>;
- interrupts = <0 104 4>, <0 105 4>;
- reg = <0x0 0x80010000 0x0 0x1000>;
- clock-names = "s_axi_lite_aclk", "aud_mclk";
- clocks = <&clk 71>, <&clk_wiz_1 0>;
- };
diff --git a/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.yaml b/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.yaml
new file mode 100644
index 000000000000..d599ee34c8b7
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/xlnx,audio-formatter.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Device-Tree bindings for Xilinx PL audio formatter
+
+description: |
+ The IP core supports DMA, data formatting(AES<->PCM conversion)
+ of audio samples.
+
+maintainers:
+ - Vincenzo Frascino <vincenzo.frascino@arm.com>
+ - Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: xlnx,audio-formatter-1.0
+
+ reg:
+ maxItems: 1
+ description: |
+ Base address and size of the IP core instance.
+
+ "#sound-dai-cells":
+ const: 0
+
+ interrupt-names:
+ minItems: 1
+ maxItems: 3
+ description: |
+ Names specified to list of interrupts in same order mentioned under
+ "interrupts".
+
+ interrupts-parent:
+ $ref: /schemas/types.yaml#/definitions/string
+ maxItems: 1
+ description: |
+ Phandle for interrupt controller.
+
+ interrupts:
+ minItems: 1
+ maxItems: 3
+ description: |
+ List of Interrupt numbers.
+
+ clock-names:
+ minItems: 2
+ maxItems: 3
+ description: |
+ List of input clocks.
+
+ clocks:
+ minItems: 2
+ maxItems: 3
+ description: |
+ Input clock specifier. Refer to common clock bindings.
+
+required:
+ - compatible
+ - reg
+ - interrupt-names
+ - interrupts
+ - clock-names
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ audio_ss_0_audio_formatter_0: audio_formatter@80010000 {
+ compatible = "xlnx,audio-formatter-1.0";
+ interrupt-names = "irq_mm2s", "irq_s2mm";
+ interrupts-parent = <&gic>;
+ interrupts = <0 104 4>, <0 105 4>;
+ reg = <0x0 0x80010000 0x0 0x1000>;
+ clock-names = "s_axi_lite_aclk", "aud_mclk";
+ clocks = <&clk 71>, <&clk_wiz_1 0>;
+ };
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 2/3] xlnx: dt-bindings: xlnx,audio-formatter: Convert to json-schema
2024-12-13 16:52 ` [PATCH 2/3] xlnx: dt-bindings: xlnx,audio-formatter: " Vincenzo Frascino
@ 2024-12-13 18:41 ` Rob Herring (Arm)
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2024-12-13 18:41 UTC (permalink / raw)
To: Vincenzo Frascino
Cc: devicetree, Sudeep Holla, linux-kernel,
Maruthi Srinivas Bayyavarapu
On Fri, 13 Dec 2024 16:52:39 +0000, Vincenzo Frascino wrote:
> Convert the Xilinx Audio Formatter 1.0 device tree binding documentation
> to json-schema.
>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> .../bindings/sound/xlnx,audio-formatter.txt | 29 -------
> .../bindings/sound/xlnx,audio-formatter.yaml | 84 +++++++++++++++++++
> 2 files changed, 84 insertions(+), 29 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,audio-formatter.txt
> create mode 100644 Documentation/devicetree/bindings/sound/xlnx,audio-formatter.yaml
>
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/sound/xlnx,audio-formatter.yaml: title: 'Device-Tree bindings for Xilinx PL audio formatter' should not be valid under {'pattern': '([Bb]inding| [Ss]chema)'}
hint: Everything is a binding/schema, no need to say it. Describe what hardware the binding is for.
from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.example.dtb: audio_formatter@80010000: reg: [[0, 2147549184], [0, 4096]] is too long
from schema $id: http://devicetree.org/schemas/sound/xlnx,audio-formatter.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.example.dtb: audio_formatter@80010000: interrupts-parent: b'\xff\xff\xff\xff' is not of type 'array'
from schema $id: http://devicetree.org/schemas/sound/xlnx,audio-formatter.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,audio-formatter.example.dtb: audio_formatter@80010000: interrupts-parent: b'\xff\xff\xff\xff' is not of type 'object', 'integer', 'array', 'boolean', 'null'
from schema $id: http://devicetree.org/schemas/dt-core.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241213165240.3652961-3-vincenzo.frascino@arm.com
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] xlnx: dt-bindings: xlnx,spdif: Convert to json-schema
2024-12-13 16:52 [PATCH 0/3] xlnx: dt-bindings: Convert to json-schema Vincenzo Frascino
2024-12-13 16:52 ` [PATCH 1/3] xlnx: dt-bindings: xlnx,i2s: " Vincenzo Frascino
2024-12-13 16:52 ` [PATCH 2/3] xlnx: dt-bindings: xlnx,audio-formatter: " Vincenzo Frascino
@ 2024-12-13 16:52 ` Vincenzo Frascino
2024-12-13 18:41 ` Rob Herring (Arm)
2025-02-21 17:20 ` [PATCH 0/3] xlnx: dt-bindings: " Vincenzo Frascino
3 siblings, 1 reply; 9+ messages in thread
From: Vincenzo Frascino @ 2024-12-13 16:52 UTC (permalink / raw)
To: devicetree, linux-kernel, vincenzo.frascino
Cc: Maruthi Srinivas Bayyavarapu, Sudeep Holla, Rob Herring
Convert the Xilinx SPDIF 2.0 device tree binding documentation to
json-schema.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
.../devicetree/bindings/sound/xlnx,spdif.txt | 28 -----
.../devicetree/bindings/sound/xlnx,spdif.yaml | 100 ++++++++++++++++++
2 files changed, 100 insertions(+), 28 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,spdif.txt
create mode 100644 Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
diff --git a/Documentation/devicetree/bindings/sound/xlnx,spdif.txt b/Documentation/devicetree/bindings/sound/xlnx,spdif.txt
deleted file mode 100644
index 15c2d64d247c..000000000000
--- a/Documentation/devicetree/bindings/sound/xlnx,spdif.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Device-Tree bindings for Xilinx SPDIF IP
-
-The IP supports playback and capture of SPDIF audio
-
-Required properties:
- - compatible: "xlnx,spdif-2.0"
- - clock-names: List of input clocks.
- Required elements: "s_axi_aclk", "aud_clk_i"
- - clocks: Input clock specifier. Refer to common clock bindings.
- - reg: Base address and address length of the IP core instance.
- - interrupts-parent: Phandle for interrupt controller.
- - interrupts: List of Interrupt numbers.
- - xlnx,spdif-mode: 0 :- receiver mode
- 1 :- transmitter mode
- - xlnx,aud_clk_i: input audio clock value.
-
-Example:
- spdif_0: spdif@80010000 {
- clock-names = "aud_clk_i", "s_axi_aclk";
- clocks = <&misc_clk_0>, <&clk 71>;
- compatible = "xlnx,spdif-2.0";
- interrupt-names = "spdif_interrupt";
- interrupt-parent = <&gic>;
- interrupts = <0 91 4>;
- reg = <0x0 0x80010000 0x0 0x10000>;
- xlnx,spdif-mode = <1>;
- xlnx,aud_clk_i = <49152913>;
- };
diff --git a/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml b/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
new file mode 100644
index 000000000000..5f585157c0d2
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/xlnx,spdif.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Device-Tree bindings for Xilinx SPDIF IP
+
+description: |
+ The IP supports playback and capture of SPDIF audio.
+
+maintainers:
+ - Vincenzo Frascino <vincenzo.frascino@arm.com>
+ - Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: xlnx,spdif-2.0
+
+ reg:
+ maxItems: 1
+ description: |
+ Base address and size of the IP core instance.
+
+ "#sound-dai-cells":
+ const: 0
+
+ interrupt-names:
+ minItems: 1
+ maxItems: 3
+ description: |
+ Names specified to list of interrupts in same order mentioned under
+ "interrupts".
+
+ interrupts-parent:
+ $ref: /schemas/types.yaml#/definitions/string
+ maxItems: 1
+ description: |
+ Phandle for interrupt controller.
+
+ interrupts:
+ minItems: 1
+ maxItems: 3
+ description: |
+ List of Interrupt numbers.
+
+ clock-names:
+ minItems: 2
+ maxItems: 3
+ description: |
+ List of input clocks.
+
+ clocks:
+ minItems: 2
+ maxItems: 3
+ description: |
+ Input clock specifier. Refer to common clock bindings.
+
+ xlnx,spdif-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ maxItems: 1
+ minimum: 0
+ maximum: 1
+ description: |
+ 0 - receiver
+ 1 - transmitter
+
+ xlnx,aud_clk_i:
+ maxItems: 1
+ description: |
+ Input audio clock value.
+
+required:
+ - compatible
+ - reg
+ - interrupt-names
+ - interrupts
+ - clock-names
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ spdif_0: spdif@80010000 {
+ clock-names = "aud_clk_i", "s_axi_aclk";
+ clocks = <&misc_clk_0>, <&clk 71>;
+ compatible = "xlnx,spdif-2.0";
+ interrupt-names = "spdif_interrupt";
+ interrupt-parent = <&gic>;
+ interrupts = <0 91 4>;
+ reg = <0x0 0x80010000 0x0 0x10000>;
+ xlnx,spdif-mode = <1>;
+ xlnx,aud_clk_i = <49152913>;
+ };
+
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 3/3] xlnx: dt-bindings: xlnx,spdif: Convert to json-schema
2024-12-13 16:52 ` [PATCH 3/3] xlnx: dt-bindings: xlnx,spdif: " Vincenzo Frascino
@ 2024-12-13 18:41 ` Rob Herring (Arm)
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2024-12-13 18:41 UTC (permalink / raw)
To: Vincenzo Frascino
Cc: Maruthi Srinivas Bayyavarapu, Sudeep Holla, linux-kernel,
devicetree
On Fri, 13 Dec 2024 16:52:40 +0000, Vincenzo Frascino wrote:
> Convert the Xilinx SPDIF 2.0 device tree binding documentation to
> json-schema.
>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> .../devicetree/bindings/sound/xlnx,spdif.txt | 28 -----
> .../devicetree/bindings/sound/xlnx,spdif.yaml | 100 ++++++++++++++++++
> 2 files changed, 100 insertions(+), 28 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,spdif.txt
> create mode 100644 Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
>
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/sound/xlnx,spdif.yaml: xlnx,aud_clk_i: missing type definition
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml: properties:xlnx,spdif-mode: 'minimum' should not be valid under {'enum': ['const', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'minimum', 'maximum', 'multipleOf', 'pattern']}
hint: Scalar and array keywords cannot be mixed
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml: properties:xlnx,spdif-mode: 'maximum' should not be valid under {'enum': ['const', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'minimum', 'maximum', 'multipleOf', 'pattern']}
hint: Scalar and array keywords cannot be mixed
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml: properties:xlnx,spdif-mode:maxItems: False schema does not allow 1
hint: Scalar properties should not have array keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml: title: 'Device-Tree bindings for Xilinx SPDIF IP' should not be valid under {'pattern': '([Bb]inding| [Ss]chema)'}
hint: Everything is a binding/schema, no need to say it. Describe what hardware the binding is for.
from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/xlnx,spdif.example.dtb: spdif@80010000: reg: [[0, 2147549184], [0, 65536]] is too long
from schema $id: http://devicetree.org/schemas/sound/xlnx,spdif.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241213165240.3652961-4-vincenzo.frascino@arm.com
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] xlnx: dt-bindings: Convert to json-schema
2024-12-13 16:52 [PATCH 0/3] xlnx: dt-bindings: Convert to json-schema Vincenzo Frascino
` (2 preceding siblings ...)
2024-12-13 16:52 ` [PATCH 3/3] xlnx: dt-bindings: xlnx,spdif: " Vincenzo Frascino
@ 2025-02-21 17:20 ` Vincenzo Frascino
3 siblings, 0 replies; 9+ messages in thread
From: Vincenzo Frascino @ 2025-02-21 17:20 UTC (permalink / raw)
To: devicetree, linux-kernel
Cc: Maruthi Srinivas Bayyavarapu, Sudeep Holla, Rob Herring,
Krzysztof Kozlowski
Hi all,
Since I did not hear from Srinivas for more then two months, I am going to post
the following addition to the MAINTAINERS file as part of my next re-spin of
this series later today:
+XILINX SOUND DRIVERS
+M: Vincenzo Frascino <vincenzo.frascino@arm.com>
+S: Maintained
+F: Documentation/devicetree/bindings/sound/xlnx,i2s.txt
+F: Documentation/devicetree/bindings/sound/xlnx,audio-formatter.txt
+F: Documentation/devicetree/bindings/sound/xlnx,spdif.txt
+F: sound/soc/xilinx/*
Please let me know if there is any concern with it.
Thanks and Regards,
Vincenzo
On 13/12/2024 16:52, Vincenzo Frascino wrote:
> This series converts the folling Xilinx device tree binding documentation:
> - xlnx,i2s
> - xlnx,audio-formatter
> - xlnx,spdif
> to json-schema.
>
> To simplify the testing a linux tree rebased on 6.13-rc1 is accessible
> at [1].
>
> [1] https://codeberg.org/vincenzo/linux/src/branch/xlnx/dt-bindings/v1
>
> Cc: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu@xilinx.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>
> Vincenzo Frascino (3):
> xlnx: dt-bindings: xlnx,i2s: Convert to json-schema
> xlnx: dt-bindings: xlnx,audio-formatter: Convert to json-schema
> xlnx: dt-bindings: xlnx,spdif: Convert to json-schema
>
> .../bindings/sound/xlnx,audio-formatter.txt | 29 -----
> .../bindings/sound/xlnx,audio-formatter.yaml | 84 +++++++++++++++
> .../devicetree/bindings/sound/xlnx,i2s.txt | 28 -----
> .../devicetree/bindings/sound/xlnx,i2s.yaml | 79 ++++++++++++++
> .../devicetree/bindings/sound/xlnx,spdif.txt | 28 -----
> .../devicetree/bindings/sound/xlnx,spdif.yaml | 100 ++++++++++++++++++
> 6 files changed, 263 insertions(+), 85 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,audio-formatter.txt
> create mode 100644 Documentation/devicetree/bindings/sound/xlnx,audio-formatter.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.txt
> create mode 100644 Documentation/devicetree/bindings/sound/xlnx,i2s.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/xlnx,spdif.txt
> create mode 100644 Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
>
--
Regards,
Vincenzo
^ permalink raw reply [flat|nested] 9+ messages in thread