[PATCH 1/3] ASoC: dt-bindings: xlnx,spdif: describe AXI4-Stream and audio clocks

Dhanunjanrao Katta katta.dhanunjanrao at amd.com
Tue Nov 17 00:57:37 PST 2026


The SPDIF IP is fed by three clocks: the audio clock used at the
SPDIF/AES3 interface, the AXI4-Lite control clock and the AXI4-Stream
data clock. So far the binding described only two of them and carried
the audio clock frequency in the custom "xlnx,aud_clk_i" property.

Describe the AXI4-Stream clock and pick its name from the IP mode,
s_axis_aclk for the transmitter and m_axis_aclk for the receiver. The
minimum clock count stays at two, so that device trees written against
the earlier binding keep validating and the third clock is effectively
optional.

Mark "xlnx,aud_clk_i" deprecated instead of removing it. The frequency
it carries is available from the rate of the audio clock, but the
property is part of the published binding and device trees in the field
still pass it. As the binding sets "additionalProperties: false",
removing the property outright would make those device trees fail
validation.

Make "xlnx,spdif-mode" required. The conditional that selects the
AXI4-Stream clock name keys on that property, and a conditional with no
"required" entry of its own also matches when the property is absent.
A device tree omitting the mode would therefore have been held to the
transmitter clock name by default. Requiring the property turns the
omission into a clear validation failure instead.

Signed-off-by: Dhanunjanrao Katta <katta.dhanunjanrao at amd.com>
---
 .../devicetree/bindings/sound/xlnx,spdif.yaml | 54 +++++++++++++++----
 1 file changed, 44 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml b/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
index a45d8a0755fe..a4abca2027d3 100644
--- a/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
+++ b/Documentation/devicetree/bindings/sound/xlnx,spdif.yaml
@@ -14,6 +14,28 @@ maintainers:
 
 allOf:
   - $ref: dai-common.yaml#
+  - if:
+      properties:
+        xlnx,spdif-mode:
+          const: 1
+      required:
+        - xlnx,spdif-mode
+    then:
+      properties:
+        clock-names:
+          minItems: 2
+          items:
+            - const: aud_clk_i
+            - const: s_axi_aclk
+            - const: s_axis_aclk
+    else:
+      properties:
+        clock-names:
+          minItems: 2
+          items:
+            - const: aud_clk_i
+            - const: s_axi_aclk
+            - const: m_axis_aclk
 
 properties:
   compatible:
@@ -28,15 +50,15 @@ properties:
       - description: SPDIF audio interrupt
 
   clock-names:
-    items:
-      - const: aud_clk_i
-      - const: s_axi_aclk
+    minItems: 2
+    maxItems: 3
 
   clocks:
-    minItems: 1
+    minItems: 2
     items:
-      - description: input audio clock
-      - description: clock for the AXI data stream
+      - description: Audio clock input used at the SPDIF/AES3 interface
+      - description: AXI4-Lite clock
+      - description: AXI4-Stream clock
 
   xlnx,spdif-mode:
     $ref: /schemas/types.yaml#/definitions/uint32
@@ -49,8 +71,10 @@ properties:
 
   xlnx,aud_clk_i:
     $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
     description:
-      Input audio clock frequency. It affects the sampling rate.
+      Frequency of the audio clock input. Superseded by the rate of the
+      clock named aud_clk_i.
 
 required:
   - compatible
@@ -58,6 +82,7 @@ required:
   - interrupts
   - clock-names
   - clocks
+  - xlnx,spdif-mode
 
 additionalProperties: false
 
@@ -66,12 +91,21 @@ examples:
     spdif at 80010000 {
       compatible = "xlnx,spdif-2.0";
       reg = <0x80010000 0x10000>;
-      clock-names = "aud_clk_i", "s_axi_aclk";
-      clocks = <&misc_clk_0>, <&clk 71>;
+      clock-names = "aud_clk_i", "s_axi_aclk", "s_axis_aclk";
+      clocks = <&misc_clk_0>, <&clk 71>, <&misc_clk_0>;
       interrupt-parent = <&gic>;
       interrupts = <0 91 4>;
       xlnx,spdif-mode = <1>;
-      xlnx,aud_clk_i = <49152913>;
+    };
+  - |
+    spdif at 80090000 {
+      compatible = "xlnx,spdif-2.0";
+      reg = <0x80090000 0x10000>;
+      clock-names = "aud_clk_i", "s_axi_aclk", "m_axis_aclk";
+      clocks = <&misc_clk_0>, <&clk 71>, <&clk 71>;
+      interrupt-parent = <&gic>;
+      interrupts = <0 90 4>;
+      xlnx,spdif-mode = <0>;
     };
 
 ...
-- 
2.34.1




More information about the linux-arm-kernel mailing list