[RFC PATCH 0/2] Fix second CS35L56 amplifier on Intel LPSS SPI with broken ACPI cs-gpios

From: Khalil

Date: Sun Feb 15 2026 - 08:56:28 EST


To: broonie@xxxxxxxxxx, hdegoede@xxxxxxxxxx, ilpo.jarvinen@xxxxxxxxxxxxxxx
Cc: rf@xxxxxxxxxxxxxxxxxxxxx, linux-spi@xxxxxxxxxxxxxxx,
platform-driver-x86@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx

Hi,

This patch series fixes an issue where the second Cirrus Logic CS35L56
amplifier fails to probe on several HP and ASUS laptops with Intel Lunar
Lake processors. The amplifiers are connected via SPI, and the second
one (CS1) always times out reading HALO_STATE (returns all zeros).
Speakers work correctly in Windows.

The root cause is a broken ACPI DSDT on these machines. The SPI
controller's _DSD declares:

"cs-gpios", Package (0x01) { Zero }

This only defines CS0 (native). The CS1 GPIO entry is missing entirely,
even though the ACPI device node (CSC3556) does define a GpioIo resource
for CS1 and both SpiSerialBusV2 resources correctly specify
DeviceSelection 0 and 1.

This causes two problems:

1. The SPI framework has no GPIO descriptor for CS1, so it never toggles
the actual chip select line to the second amplifier.

2. On Intel LPSS controllers with dynamic clock gating
(cs_clk_stays_gated=true, e.g., Cannon Lake and later), the SPI
clock is gated when no native CS is asserted. With GPIO chip select,
the native CS register is never asserted, so the clock never runs.

The fix is in two parts:

Patch 1 modifies serial-multi-instantiate to acquire the CS GPIO from
the ACPI GpioIo resource and install it on the controller's cs_gpiods
array. Setting it directly on the spi_device doesn't work because
__spi_add_device() unconditionally overwrites spi->cs_gpiod[] from
ctlr->cs_gpiods[cs]. The array is reallocated to accommodate the
additional chip select.

Patch 2 modifies spi-pxa2xx to handle GPIO chip select on LPSS
controllers with dynamic clock gating. When spi_is_csgpiod() is true,
cs_assert asserts the native CS in the control register (to enable the
clock domain) and forces the clock gate on. cs_deassert reverses both.

Tested on HP EliteBook 8 G1i (Intel Core Ultra 7 258V, Lunar Lake-M)
with 2x CS35L56 Rev B0. Both amplifiers now probe successfully, load
calibration and tuning, and produce audio.

Related bug reports:
- https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/2131138
- https://bugzilla.kernel.org/show_bug.cgi?id=221064
- https://github.com/thesofproject/linux/issues/5621

Khalil Laleh (2):
platform/x86: serial-multi-instantiate: Add GPIO chip select support
for SPI devices
spi: pxa2xx: Handle dynamic clock gating for GPIO chip select devices

drivers/platform/x86/serial-multi-instantiate.c | 83 ++++++++++++++++++
drivers/spi/spi-pxa2xx.c | 35 +++++++-
2 files changed, 114 insertions(+), 4 deletions(-)

--