pinctrl: rp1: enable strict pinmux mode - #7522
Open
nbuchwitz wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
Candidate for #5870 |
pelwell
added a commit
to pelwell/linux
that referenced
this pull request
Jul 28, 2026
This is a less invasive solution to the problem that requesting that a GPIO be used as an interrupt from Device Tree (not going via gpio descriptors) does not automatically make it an input. This can lead to interrupt storms. It relies on there being an implementation of the function_is_gpio method, hence the inclusion of Nicolai's patch from raspberrypi#7522. See: raspberrypi#7520 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
nbuchwitz
force-pushed
the
devel/rp1-pinmux-strict
branch
from
July 28, 2026 20:25
fd1e347 to
e46c9d0
Compare
The spi0 and spi8 CS groups mux their pins to the peripheral function while the pins are actually driven via cs-gpios. Under strict pinmux the overlapping function and GPIO claims are rejected and the SPI host fails to probe. Mux them as GPIO to match how they are used. Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
Pins claimed for a peripheral function can be taken over through the GPIO chardev, which rewrites FUNCSEL. On Pi 5 reading the USB overcurrent pin this way trips the overcurrent latch and disables all USB ports, and requesting GPIO 42 as output cuts VBUS entirely. Enable strict pinmux so GPIO requests on function pins are rejected. Implement function_is_gpio so pins muxed as GPIO, including hogs and legacy brcm,function maps, stay requestable. This matches the BCM2712 pinctrl-brcmstb driver. Link: raspberrypi#5870 Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
nbuchwitz
force-pushed
the
devel/rp1-pinmux-strict
branch
from
July 28, 2026 20:29
e46c9d0 to
98ef53c
Compare
Drop the leaked rp1_node reference and test of_iomap() for NULL instead of IS_ERR(), which never matches its return value. Fixes: df868dc ("pinctrl: Reinstate the downstream pinctrl-rp1 driver") Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pins claimed for a peripheral function can be taken over through the GPIO chardev, which rewrites FUNCSEL. On Pi 5 reading the USB overcurrent pin this way trips the overcurrent latch and disables all USB ports, and requesting GPIO 42 as output cuts VBUS entirely.
Enable strict pinmux so GPIO requests on function pins are rejected. Implement function_is_gpio so pins muxed as GPIO, including hogs and legacy brcm,function maps, stay requestable. This matches the BCM2712 pinctrl-brcmstb driver.
Link: #5870