Skip to content

Pi 3b+ and Pi zero 2 W with Debian 12 do not honor dtoverlay=spi0-0cs #5835

Closed
@jp-bennett

Description

@jp-bennett

Describe the bug

The spi0-0cs device tree overlay isn't properly configuring the SPI driver. It shouldn't claim any Chip Select lines out of the GPIO pool, but it still claims CS0.

Steps to reproduce the behaviour

In /boot/config.txt set the following lines:

dtparam=spi=on
dtoverlay=spi0-0cs

Reboot, and run gpioinfo. It's expected that neither CS0 nor CS1 will be claimed, but CS0 is getting claimed by the SPI driver.

Device (s)

Raspberry Pi Zero 2 W, Raspberry Pi 3 Mod. B+

System

cat /etc/rpi-issue
Raspberry Pi reference 2023-12-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 2acf7afcba7d11500313a7b93bb55a2aae20b2d6, stage2

Oct 17 2023 15:42:39
Copyright (c) 2012 Broadcom
version 30f0c5e4d076da3ab4f341d88e7d505760b93ad7 (clean) (release) (start)

Linux zero 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

Logs

Relevant dmesg:
[ 4.381258] spi-bcm2835 3f204000.spi: there is not valid maps for state default
[ 4.394056] spi spi0.0: setting up native-CS0 to use GPIO

And from gpioinfo:
gpiochip0 - 54 lines:
line 0: "ID_SDA" unused input active-high
line 1: "ID_SCL" unused input active-high
line 2: "SDA1" unused input active-high
line 3: "SCL1" unused input active-high
line 4: "GPIO_GCLK" unused input active-high
line 5: "GPIO5" unused input active-high
line 6: "GPIO6" unused input active-high
line 7: "SPI_CE1_N" unused input active-high
line 8: "SPI_CE0_N" "spi-bcm2835" output active-high [used]
line 9: "SPI_MISO" unused input active-high
line 10: "SPI_MOSI" unused input active-high
line 11: "SPI_SCLK" unused input active-high
line 12: "GPIO12" unused input active-high
line 13: "GPIO13" unused input active-high
line 14: "TXD1" unused input active-high
line 15: "RXD1" unused input active-high
line 16: "GPIO16" unused input active-high
line 17: "GPIO17" unused input active-high
line 18: "GPIO18" unused input active-high
line 19: "GPIO19" unused input active-high
line 20: "GPIO20" unused input active-high

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions