.../platform/x86/serial-multi-instantiate.c | 168 ++++++++++++++++++ drivers/spi/spi-pxa2xx.c | 45 ++++- drivers/spi/spi.c | 3 +- 3 files changed, 211 insertions(+), 5 deletions(-)
v3 of the patch series fixing dual CS35L56 amplifiers on HP laptops
with Intel Lunar Lake and broken ACPI cs-gpios.
Changes since v2:
- Rebased onto broonie/spi for-next (commit b00c00f7dc)
- No code changes
Changes since RFC v1 (addressing feedback from Richard Fitzgerald):
- Added DMI quirk table: GPIO CS fixup is now only applied on known
affected platforms (HP EliteBook 8 G1i, board 8D8A), not generically
for all devices with CS > 0.
- Fixed chip select range check: only chip selects outside the
controller's num_chipselect range are fixed up. A NULL cs_gpiods[cs]
within range means "native chip select", not broken.
- Removed ASUS reference (GU605C was fixed by BIOS update).
- Added Patch 1/3 (spi core): __spi_add_device() now preserves preset
cs_gpiod on the device instead of unconditionally overwriting from
ctlr->cs_gpiods. Suggested by Richard Fitzgerald.
- Patch 2/3 (serial-multi-instantiate): Extracted GPIO fixup into a
dedicated helper function with DMI-based quirk table.
- Patch 3/3 (spi-pxa2xx): Handles clock gating on Intel LPSS
controllers when GPIO chip select is active.
Tested on HP EliteBook 8 G1i 16 inch (Intel Core Ultra 7 258V,
Lunar Lake-M) with 2x CS35L56 Rev B0. Both amplifiers 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 (3):
spi: Preserve preset cs_gpiod in __spi_add_device()
platform/x86: serial-multi-instantiate: Fix SPI chip select on
platforms with incomplete ACPI cs-gpios
spi: pxa2xx: Handle clock gating for GPIO chip select devices
.../platform/x86/serial-multi-instantiate.c | 168 ++++++++++++++++++
drivers/spi/spi-pxa2xx.c | 45 ++++-
drivers/spi/spi.c | 3 +-
3 files changed, 211 insertions(+), 5 deletions(-)
--
2.43.0
On Tue, 1 Sep 2026 21:26:22 +0200, Khalil wrote: > v3 of the patch series fixing dual CS35L56 amplifiers on HP laptops Following up on my earlier reply, where I had only run the earlier gist version: I have now tested v3 on the same machine. HP EliteBook 8 G1i 14 inch, DMI board 8D8A, SKU D75TQET#ABE BIOS X91 Ver. 01.05.02 2x Cirrus Logic CS35L54 Rev B0 OTP4 fw:3.4.4, ACPI HID CSC3554 Kernel: linux-omarchy 7.2.5 (v7.2.5 plus the patch set of Omarchy, an Arch-based distribution) What was tested: 2/3 and 3/3, built out of tree as modules against that kernel's headers. The distribution kernel carries a sound backport that also touches serial-multi-instantiate.c; 2/3 applies on top of it with --fuzz=0. 1/3 was not applied, because CONFIG_SPI=y there. Looking at why the result still worked: on this path 2/3 installs the descriptor in ctlr->cs_gpiods and never presets spi->cs_gpiod, spi_alloc_device() zero-allocates, and __spi_add_device() is the only place the device's cs_gpiod is assigned. So the new check in 1/3 is always true here and does not change behaviour on this platform. I may be missing a case where 2/3 relies on it, but on this machine 2/3 + 3/3 alone were sufficient. Log from reloading the modules at runtime: Serial bus multi instantiate pseudo device driver CSC3554:00: Applying CS GPIO quirk for HP EliteBook 8 G1i 16 inch Serial bus multi instantiate pseudo device driver CSC3554:00: Extending num_chipselect from 1 to 2 for CS1 Serial bus multi instantiate pseudo device driver CSC3554:00: Acquired CS GPIO for CS1 from ACPI GpioIo[0] Serial bus multi instantiate pseudo device driver CSC3554:00: Installed GPIO CS on controller for CS1 cs35l56-hda spi1-CSC3554:00-cs35l54-hda.0: DSP system name: '103C8D8F', amp name: 'AMP1' cs35l56-hda spi1-CSC3554:00-cs35l54-hda.1: DSP system name: '103C8D8F', amp name: 'AMP2' cs35l56-hda spi1-CSC3554:00-cs35l54-hda.0: Calibration applied cs35l56-hda spi1-CSC3554:00-cs35l54-hda.1: Calibration applied A cold boot shows the same quirk, GPIO, AMP1/AMP2 and calibration lines. Both amplifiers bind to the codec and the internal speakers play in stereo. One small note on the quirk table: the entry's .ident is "HP EliteBook 8 G1i 16 inch", but this 14 inch model reports the same DMI board name 8D8A (and has CS35L54 rather than CS35L56 amplifiers), so it matches too. Only the label is narrower than the match. I'll send Tested-by on 2/3 and 3/3 individually, since 1/3 was not part of what I ran. The offer to test HP's fixed BIOS still stands. Juan Jimenez Carrero
On 16/9/26 22:23, Juan Jimenez Carrero wrote: > On Tue, 1 Sep 2026 21:26:22 +0200, Khalil wrote: >> v3 of the patch series fixing dual CS35L56 amplifiers on HP laptops > > Following up on my earlier reply, where I had only run the earlier > gist version: I have now tested v3 on the same machine. > > HP EliteBook 8 G1i 14 inch, DMI board 8D8A, SKU D75TQET#ABE > BIOS X91 Ver. 01.05.02 > 2x Cirrus Logic CS35L54 Rev B0 OTP4 fw:3.4.4, ACPI HID CSC3554 > Kernel: linux-omarchy 7.2.5 (v7.2.5 plus the patch set of Omarchy, > an Arch-based distribution) The latest BIOS (01.06.02) is reported to fix the problem: https://bugzilla.kernel.org/show_bug.cgi?id=221064#c23
On Thu, 17 Sep 2026 14:42:18 +0100, Richard Fitzgerald wrote:
> The latest BIOS (01.06.02) is reported to fix the problem:
> https://bugzilla.kernel.org/show_bug.cgi?id=221064#c23
Thanks, Richard. Confirmed on the same machine as my earlier report:
HP EliteBook 8 G1i 14 inch, DMI board 8D8A, SKU D75TQET#ABE
BIOS X91 Ver. 01.05.02 -> X91 Ver. 01.06.02 (dated 07/22/2026)
I dumped the ACPI tables before and after the update. The only change
in Scope (\_SB.PC00.SPI0) is the cs-gpios property:
"cs-gpios",
-Package (0x01)
+Package (0x05)
{
+ Zero,
+ GSPK,
+ Zero,
+ Zero,
Zero
}
CS0 stays on the native chip select and CS1 becomes GpioIo resource 0
of GSPK, which is the same GPIO that 2/3 installs. Device (GSPK) is
unchanged between the two versions.
On 01.06.02 with an unpatched kernel (7.2.5, no out-of-tree modules,
taint 0) both amplifiers probe, the calibration is applied and the
speakers play. The "cs1 >= max 1" error is gone.
With 2/3 and 3/3 still loaded on 01.06.02, the quirk matches the DMI
entry but returns early because cs < num_chipselect, so the series
does no harm on the fixed firmware. On 01.05.02 it is still needed,
and my earlier Tested-by stands for that case.
One small detail in case there is a v4: the DMI entry's .ident says
"HP EliteBook 8 G1i 16 inch", but board 8D8A is also the 14 inch model
I tested on.
Thanks,
Juan
On 01/09/2026 8:26 pm, Khalil wrote: > v3 of the patch series fixing dual CS35L56 amplifiers on HP laptops > with Intel Lunar Lake and broken ACPI cs-gpios. HP told us they have a BIOS with the cs-gpios fixed, and they can make that available early if you post a support request for it. Can you test that new BIOS? It would avoid the messy SPI workarounds.
On 03/09/2026 10:21 am, Richard Fitzgerald wrote:
> HP told us they have a BIOS with the cs-gpios fixed, and they can make
> that available early if you post a support request for it.
>
> Can you test that new BIOS? It would avoid the messy SPI workarounds.
I have affected hardware. I could raise a support request and
test that BIOS, if a second machine doing so is useful:
HP EliteBook 8 G1i 14 inch, SKU D75TQET#ABE
BIOS X91 Ver. 01.05.02, 05/03/2026
Intel Core Ultra 5 238V (Lunar Lake-M)
SPI controller 8086:a827 (LPSS_CNL_SSP via tgl_spi_info)
Realtek ALC245, SSID 103c:8d8f
2x Cirrus Logic CS35L54 Rev B0 OTP4 fw:3.4.4, ACPI HID CSC3554
This is the CS35L54 variant rather than CS35L56, so it may be a useful
extra data point either way. The DSDT defect is identical:
Scope (_SB.PC00.SPI0)
{
Name (_DSD, Package (0x02)
{
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package (0x01)
{
Package (0x02) { "cs-gpios", Package (0x01) { Zero } }
}
})
}
while GSPK._CRS declares SpiSerialBusV2 with DeviceSelection 0x0000 and
0x0001, plus a GpioIo for the CS1 line.
One difference from the cover letter's description: on this machine
neither amplifier is instantiated on a stock kernel, not only the
second. spi_add_device() rejects CS1 and serial-multi-instantiate then
unwinds the whole set:
pxa2xx-spi pxa2xx-spi.3: cs1 >= max 1
spi_master spi1: error -EINVAL: failed to add SPI device CSC3554:00 from ACPI
Serial bus multi instantiate pseudo device driver CSC3554:00: probe with
driver Serial bus multi instantiate pseudo device driver failed with error -22
For reference, the LPSS capability register on this board reads
caps[0xfc] = 0x220, so CS_EN (bits 12:9) is 0x1 and ffz() yields
num_chipselect = 1, while ACPI describes two chip selects. The TYPE
field of the same register reads 2 (LPSS_DEV_SPI), so the read itself
is valid. (Obtained with a dev_info() added to spi-pxa2xx.c; the
register is not reachable from userspace with CONFIG_IO_STRICT_DEVMEM)
I have run the earlier two-patch version from your gist
(serial-multi-instantiate + spi-pxa2xx), built out-of-tree as a DKMS
module against 7.1.9. With those applied both amplifiers probe, load
firmware and calibration, and bind to the codec. Internal speakers work
across a cold boot:
serial-multi-instantiate CSC3554:00: Increasing num_chipselect from 1 to 2 for CS1
serial-multi-instantiate CSC3554:00: Got CS GPIO for amp CS1
cs35l56-hda spi1-CSC3554:00-cs35l54-hda.0: DSP system name: '103C8D8F', amp name: 'AMP1'
cs35l56-hda spi1-CSC3554:00-cs35l54-hda.1: DSP system name: '103C8D8F', amp name: 'AMP2'
snd_hda_codec_alc269 ehdaudio0D0: bound spi1-CSC3554:00-cs35l54-hda.0
snd_hda_codec_alc269 ehdaudio0D0: bound spi1-CSC3554:00-cs35l54-hda.1
cs35l56-hda spi1-CSC3554:00-cs35l54-hda.0: Calibration applied
cs35l56-hda spi1-CSC3554:00-cs35l54-hda.1: Calibration applied
I have not tested v3, so I am deliberately not offering a Tested-by for
it. I can test v3, the new BIOS or both on this machine (whichever is
more useful).
Juan Jimenez Carrero
© 2016 - 2026 Red Hat, Inc.