[PATCH 0/3] ASoC: xlnx: spdif: switch to the common clock framework

From: Dhanunjanrao Katta

Date: Tue Nov 17 2026 - 03:58:05 EST


The Xilinx SPDIF/AES3 IP is fed by three clocks, but the binding
described only two of them and the driver requested only one. The audio
clock frequency was instead passed as a plain number in the custom
"xlnx,aud_clk_i" property, and the driver relied on the firmware to
leave the audio and AXI4-Stream clocks running.

This series describes the third clock, requests the audio and
AXI4-Stream clocks through the common clock framework, and reads the
audio rate with clk_get_rate() so that the SPDIF divider follows the
rate actually in effect. A tidy-up of the register defines and of the
divider values comes first so that the clock change is easy to read.

Patch 1 describes the AXI4-Stream clock and selects its name from the IP
mode. The minimum clock count stays at two and "xlnx,aud_clk_i" is kept
as deprecated rather than removed, so that device trees written against
the earlier binding keep validating. "xlnx,spdif-mode" becomes required,
because the conditional that picks the clock name keys on it and would
otherwise also match when the property is absent.

Patch 2 names each register-field define after the register it belongs
to, prefixes the remaining driver constants, and replaces the bare
clock-divider values with an enum.

Patch 3 requests the audio clock and the mode-specific AXI4-Stream clock
through the common clock framework. The stream clock is requested as
optional so that existing two-clock device trees still probe, and a zero
audio rate is now rejected with a diagnostic instead of falling through
the divider switch. "xlnx,aud_clk_i" is no longer read.

Dhanunjanrao Katta (3):
ASoC: dt-bindings: xlnx,spdif: describe AXI4-Stream and audio clocks
ASoC: xlnx: spdif: namespace register macros and use a divider enum
ASoC: xlnx: spdif: get clocks through the common clock framework

.../devicetree/bindings/sound/xlnx,spdif.yaml | 54 +++++++--
sound/soc/xilinx/xlnx_spdif.c | 108 +++++++++++-------
2 files changed, 113 insertions(+), 49 deletions(-)


base-commit: 7cd6b1fd8f9c1fcb1da1b761d502649f50b9800f
--
2.34.1