From: John Meyer <jmeyer@fdma.com>
To: linux-sound@vger.kernel.org, patches@opensource.cirrus.com
Cc: ckeepax@opensource.cirrus.com, rf@opensource.cirrus.com,
david.rhodes@cirrus.com, John Meyer <jmeyer@fdma.com>
Subject: [PATCH 1/1] mfd: cs42l43: Add CS42L45 SoundWire codec support
Date: Wed, 1 Apr 2026 20:10:45 -0400 [thread overview]
Message-ID: <20260402001045.16933-1-jmeyer@fdma.com> (raw)
The CS42L45 is a SoundWire SDCA codec from Cirrus Logic that shares
register layout and firmware infrastructure with the CS42L43. Add
support for it to the cs42l43 MFD driver.
Add the CS42L45 part ID (0x4245, mfr 0x01FA) to the SoundWire device
ID table so the kernel binds this driver to the hardware.
Add the CS42L45 DEVID constant (0x00042A45) and accept it alongside the
CS42L43 in the boot_work DEVID check. Store the detected devid in
struct cs42l43 so downstream code can distinguish chip variants.
Handle an unexpected boot status on CS42L45: the chip reports a value
outside the normal stage 1-4 range when already operational (observed:
0x60c10609 on Dell XPS 14 DA14260 / Panther Lake). Treat any
unrecognised boot status as "device ready" for CS42L45 instead of
returning -EINVAL.
Tested on Dell XPS 14 DA14260 (Panther Lake, kernel 6.18.20).
Signed-off-by: John Meyer <jmeyer@fdma.com>
---
drivers/mfd/cs42l43-sdw.c | 1 +
drivers/mfd/cs42l43.c | 10 +++++++++-
include/linux/mfd/cs42l43-regs.h | 1 +
include/linux/mfd/cs42l43.h | 2 ++
4 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/cs42l43-sdw.c b/drivers/mfd/cs42l43-sdw.c
--- a/drivers/mfd/cs42l43-sdw.c
+++ b/drivers/mfd/cs42l43-sdw.c
@@ -189,6 +189,7 @@
static const struct sdw_device_id cs42l43_sdw_id[] = {
SDW_SLAVE_ENTRY(0x01FA, 0x4243, 0),
+ SDW_SLAVE_ENTRY(0x01FA, 0x4245, 0),
{}
};
MODULE_DEVICE_TABLE(sdw, cs42l43_sdw_id);
diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
--- a/drivers/mfd/cs42l43.c
+++ b/drivers/mfd/cs42l43.c
@@ -827,6 +827,12 @@
case CS42L43_MCU_BOOT_STAGE4:
return 0;
default:
+ if (cs42l43->devid == CS42L45_DEVID_VAL) {
+ dev_dbg(cs42l43->dev,
+ "CS42L45 boot status 0x%x, assuming ready\n",
+ boot_status);
+ return 0;
+ }
dev_err(cs42l43->dev, "Invalid boot status: %d\n", boot_status);
return -EINVAL;
}
@@ -918,6 +924,7 @@
switch (devid) {
case CS42L43_DEVID_VAL:
+ case CS42L45_DEVID_VAL:
break;
default:
dev_err(cs42l43->dev, "Unrecognised devid: 0x%06x\n", devid);
@@ -936,6 +943,8 @@
goto err;
}
+ cs42l43->devid = devid;
+
dev_info(cs42l43->dev,
"devid: 0x%06x, rev: 0x%02x, otp: 0x%02x\n", devid, revid, otp);
diff --git a/include/linux/mfd/cs42l43-regs.h b/include/linux/mfd/cs42l43-regs.h
--- a/include/linux/mfd/cs42l43-regs.h
+++ b/include/linux/mfd/cs42l43-regs.h
@@ -259,6 +259,7 @@
/* CS42L43_DEVID */
#define CS42L43_DEVID_VAL 0x00042A43
+#define CS42L45_DEVID_VAL 0x00042A45
/* CS42L43_GEN_INT_STAT_1 */
#define CS42L43_INT_STAT_GEN1_MASK 0x00000001
diff --git a/include/linux/mfd/cs42l43.h b/include/linux/mfd/cs42l43.h
--- a/include/linux/mfd/cs42l43.h
+++ b/include/linux/mfd/cs42l43.h
@@ -98,6 +98,8 @@
bool sdw_pll_active;
bool attached;
bool hw_lock;
+
+ unsigned int devid;
};
#endif /* CS42L43_CORE_EXT_H */
--
2.49.0
next reply other threads:[~2026-04-02 0:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 0:10 John Meyer [this message]
2026-04-02 8:48 ` [PATCH 1/1] mfd: cs42l43: Add CS42L45 SoundWire codec support Richard Fitzgerald
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=20260402001045.16933-1-jmeyer@fdma.com \
--to=jmeyer@fdma.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=david.rhodes@cirrus.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rf@opensource.cirrus.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