mcp23s08: invalid spi-present-mask in 6.18.39
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- c, linux
- Domain
- embedded-iot, operating-systems
Research direction
Start by inspecting the linked commit 3fdcca838f971 and the mcp23s08 driver code that reports “invalid spi-present-mask.” Reproduce the behavior with the supplied device-tree values on a Raspberry Pi 4, then verify that the original mask is accepted and both GPIO expanders work without the dmesg error.
Written by the indexing model from the issue text.
Description
Describe the bug
After upgrading from 6.18.34 to 6.18.39, my 2 mcp23s08 gpio expanders are not working anymore.
In dmesg I get this:
[ 6.025048] mcp23s08 spi0.0: invalid spi-present-mask
/proc/device-tree/soc/spi@7e204000/mcp23s08@0 $ xxd < microchip,spi-present-mask
00000000: 0000 0003
The mcp23s08 part of my dts file, looks like this:
mcp23s08@0 {
compatible = "microchip,mcp23s08";
microchip,spi-present-mask = <3>;
gpio-controller;
#gpio-cells = <2>;
interrupt-parent = <&gpio>;
interrupts = <23 2>;
interrupt-controller;
#interrupt-cells = <2>;
reg = <0>;
spi-max-frequency = <10000000>;
};
If I change spi-present-mask, to this:
microchip,spi-present-mask = <0x03000000>;
/proc/device-tree/soc/spi@7e204000/mcp23s08@0 $ xxd < microchip,spi-present-mask
00000000: 0300 0000
It works again.
The problem seems to be this commit:
https://github.com/raspberrypi/linux/commit/3fdcca838f971
Steps to reproduce the behaviour
Upgrade from 6.18.34 to 6.18.39
Device (s)
Raspberry Pi 4 Mod. B
System
$ cat /etc/rpi-issue
Raspberry Pi reference 2025-12-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 4997bf4e4e49bc3305eb182a4a08bd023529da04, stage2
$ vcgencmd version
May 21 2026 11:20:25
Copyright (c) 2012 Broadcom
version 288930ab4712b99596f32732664aaaeb881ef1e0 (clean) (release) (start)
$ uname -a
Linux prod-test 6.18.39+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.18.39-1+rpt1 (2026-07-29) aarch64 GNU/Linux
Logs
[ 6.025048] mcp23s08 spi0.0: invalid spi-present-mask
Additional context
https://lore.kernel.org/all/CAD++jLkmOHF8sPa2OMW9QF3+MHaFWtmpsZje0UU2q0EaN4OExA@mail.gmail.com/
- Dominant language
- C
- Stars
- 13.3k
- Forks
- 5.5k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 31
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace appOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7770 ·
Maintainers usually reply within 1 day
All issues in raspberrypi/linux
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
slice
Difficulty 2/5 Under an hour Newbie friendliness 72/100
Life-Framework/Life-Framework#3465 ·
Maintainers usually reply within 1 day