From: joakim.zhang@cixtech.com
To: lgirdwood@gmail.com, broonie@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, perex@perex.cz,
tiwai@suse.com, p.zabel@pengutronix.de
Cc: cix-kernel-upstream@cixtech.com, linux-sound@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Joakim Zhang <joakim.zhang@cixtech.com>
Subject: [PATCH v5 0/4] ASoC: cdns: Add Cadence I2S-SC and I2S-MC controller support
Date: Fri, 6 Nov 2026 18:52:04 +0800 [thread overview]
Message-ID: <20261106105208.1246554-1-joakim.zhang@cixtech.com> (raw)
From: Joakim Zhang <joakim.zhang@cixtech.com>
This series adds support for the Cadence I2S-SC and I2S-MC controllers
integrated in the CIX SKY1 audio subsystem, together with their DT
bindings.
I2S-SC provides full-duplex stereo playback and capture in standard
I2S, left/right-justified and DSP modes, along with TDM operation
supporting up to 16 slots. I2S-MC provides multi-channel playback and
capture through a configurable set of its 8 data pins, described by
cix,pin-out-num, cix,pin-rx-mask and cix,pin-tx-mask, and exposes a
transmit DAI and a receive DAI.
Both drivers register the dmaengine PCM helper, select the audio
reference clock parent for the 8 kHz or 11.025 kHz sample rate family
and keep the minimum functional-clock to bit-clock ratio required for
safe clock domain crossing.
The two binding patches are unchanged since v4 and keep Rob's
Reviewed-by tags.
Changes in v5:
- I2S-MC: fix the DSP_A/DSP_B mapping in set_fmt(). The DATA_WS_DEL bit
was assigned to the wrong format: per the controller implementation
specification, data aligned with the word-select strobe (DSP_B) is
DATA_WS_DEL set, and data delayed by one bit clock after the strobe
(DSP_A) is DATA_WS_DEL clear. Swap the assignment for both the
transmitter and the receiver.
- I2S-MC: return -EBUSY from hw_params() when the sample-rate family of
the new stream needs a different i2s clock parent than the one already
in use, since the transmit and receive DAIs share the clk_i2s parent
mux; the parent is compared with clk_is_match().
- I2S-SC: let set_tdm_slot() switch TDM mode off when called with zero
slots, which is how machine drivers return a DAI to standard I2S
operation, while still rejecting negative slot counts.
- Both: rework the probe and teardown runtime PM handling. Enable
runtime PM only after the IRQ is requested, unwind the clocks and the
runtime PM state through a single error path, and gate the clocks in
the new remove() callback when the device is still runtime-active;
this also covers module removal with CONFIG_PM=n, where nothing else
would disable the clocks.
Changes in v4:
- Enforce the dma-names order in the bindings: a single "tx" or "rx"
name is still allowed for single-direction instances, but a pair must
be "tx", "rx".
- Drop the DMA controller stub node from the binding examples.
- Select REGMAP_MMIO; a COMPILE_TEST build without it would fail to
link the regmap MMIO users.
- Include the transmitter and receiver synchronizing-unit reset bits in
the masked register write of the I2S-MC DAI probe, so that the write
actually programs the state its comment describes.
Changes in v3:
- Add the explicit <linux/bitfield.h> include, which a W=1 build of the
FIELD_PREP() sites needs (both drivers).
- Fix the probe error paths: disable the manually enabled clocks and
drop the runtime PM usage count on every failure path, unwinding
through a single goto label (both drivers).
- Return dev_err_probe() directly instead of logging with it and then
returning the error separately (both drivers).
Changes in v2:
- Move the IRQ request after the clocks are enabled and the reset is
released, so the handler never runs against unclocked hardware.
- Disable the IRQ before switching the regcache to cache-only mode on
suspend, and re-enable it only after the cache is synced on resume;
check the status read in the ISR (both drivers).
- Replace the manual runtime PM bookkeeping with devm_pm_runtime_enable()
and drop the remove() callbacks (both drivers).
- Switch to RUNTIME_PM_OPS()/SYSTEM_SLEEP_PM_OPS() wrapped in pm_ptr()
and drop the __maybe_unused annotations (both drivers).
- Serialize the shared transceiver clock state in prepare() against the
trigger() state machine with the existing spinlock (I2S-SC).
- Disable clocks in the reverse order of enablement (both drivers).
- Sort the cdns/ entry into the vendor list in sound/soc/Makefile and
switch sound/soc/cdns/Makefile to the '-y' object syntax.
- Clean up the includes and initializer style (both drivers).
- Add a NULL check for the match data in probe (both drivers).
- Factor the MC transmitter and receiver configuration into a shared
helper.
- Drop the compatible string from the DMAC stub node in the binding
examples.
Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com>
Joakim Zhang (4):
ASoC: dt-bindings: Add Cadence I2S-SC controller
ASoC: cdns: Add Cadence I2S-SC controller driver
ASoC: dt-bindings: Add Cadence I2S-MC controller
ASoC: cdns: Add Cadence I2S-MC controller driver
.../bindings/sound/cix,sky1-i2s-mc.yaml | 119 ++
.../bindings/sound/cix,sky1-i2s-sc.yaml | 89 ++
sound/soc/Kconfig | 1 +
sound/soc/Makefile | 1 +
sound/soc/cdns/Kconfig | 23 +
sound/soc/cdns/Makefile | 7 +
sound/soc/cdns/cdns-i2s-mc.c | 1152 ++++++++++++++++
sound/soc/cdns/cdns-i2s-sc.c | 1171 +++++++++++++++++
8 files changed, 2563 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/cix,sky1-i2s-mc.yaml
create mode 100644 Documentation/devicetree/bindings/sound/cix,sky1-i2s-sc.yaml
create mode 100644 sound/soc/cdns/Kconfig
create mode 100644 sound/soc/cdns/Makefile
create mode 100644 sound/soc/cdns/cdns-i2s-mc.c
create mode 100644 sound/soc/cdns/cdns-i2s-sc.c
--
2.50.1
next reply other threads:[~2026-11-06 10:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 10:52 joakim.zhang [this message]
2026-11-06 10:52 ` [PATCH v5 1/4] ASoC: dt-bindings: Add Cadence I2S-SC controller joakim.zhang
2026-11-06 10:52 ` [PATCH v5 2/4] ASoC: cdns: Add Cadence I2S-SC controller driver joakim.zhang
2026-11-06 10:52 ` [PATCH v5 3/4] ASoC: dt-bindings: Add Cadence I2S-MC controller joakim.zhang
2026-11-06 10:52 ` [PATCH v5 4/4] ASoC: cdns: Add Cadence I2S-MC controller driver joakim.zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261106105208.1246554-1-joakim.zhang@cixtech.com \
--to=joakim.zhang@cixtech.com \
--cc=broonie@kernel.org \
--cc=cix-kernel-upstream@cixtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®