public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mfd: cs42l43: Add CS42L45 SoundWire codec support
@ 2026-04-02  0:10 John Meyer
  2026-04-02  8:48 ` Richard Fitzgerald
  0 siblings, 1 reply; 2+ messages in thread
From: John Meyer @ 2026-04-02  0:10 UTC (permalink / raw)
  To: linux-sound, patches; +Cc: ckeepax, rf, david.rhodes, John Meyer

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] mfd: cs42l43: Add CS42L45 SoundWire codec support
  2026-04-02  0:10 [PATCH 1/1] mfd: cs42l43: Add CS42L45 SoundWire codec support John Meyer
@ 2026-04-02  8:48 ` Richard Fitzgerald
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Fitzgerald @ 2026-04-02  8:48 UTC (permalink / raw)
  To: John Meyer, linux-sound, patches; +Cc: ckeepax, david.rhodes

On 02/04/2026 1:10 am, John Meyer wrote:
> 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.
No.

The CS42L45 is already supported by the ASoC SDCA class driver.

Where did you get the idea that it has the same register layout?

And it doesn't share firmware infrastructure with the CS42L43.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-02  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02  0:10 [PATCH 1/1] mfd: cs42l43: Add CS42L45 SoundWire codec support John Meyer
2026-04-02  8:48 ` Richard Fitzgerald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox