Skip to content

pcie-32bit-dma overlay breaks I2S and (likely) other RP1 peripherals on Pi 5 #7317

@YanqiHe03

Description

@YanqiHe03

Describe the bug

The pcie-32bit-dma overlay targets pcie1 (RP1 south bridge at /axi/pcie@1000120000), restricting DMA ranges for all RP1 peripherals. This breaks I2S audio. the PCM device appears in arecord -l but cannot be opened (EINVAL at the syscall level). The overlay does make FireWire work on the external PCIe port (pciex1), but more like a side effect rather than a targeted fix. A custom overlay targeting pciex1 directly resolves both FireWire and I2S. Detailed writeup: geerlingguy/raspberry-pi-pcie-devices#811

Steps to reproduce the behaviour

  1. Add dtparam=pciex1, dtoverlay=pcie-32bit-dma, and dtoverlay=adau7002-simple to /boot/firmware/config.txt
  2. Reboot
  3. Run arecord -l — I2S card shows up as card 0: adau7002
  4. Run arecord -D hw:0,0 -c2 -r 48000 -f S32_LE -t wav -d 1 test.wav — fails with audio open error: Invalid argument
  5. Remove dtoverlay=pcie-32bit-dma, reboot — I2S works, but FireWire fails with error -12 (ENOMEM)
  6. Replace with a custom overlay targeting pciex1 instead of pcie1 — both work

Device (s)

Raspberry Pi 5

System

https://pastebin.com/vSRL06nC

Logs

# With pcie-32bit-dma (I2S broken):
$ arecord -D hw:0,0 -c2 -r 48000 -f S32_LE -t wav -d 1 test.wav
arecord: main:850: audio open error: Invalid argument
 
# Without pcie-32bit-dma (FireWire broken):
$ dmesg | grep firewire
firewire_ohci 0001:02:00.0: probe with driver firewire_ohci failed with error -12
 
# With pciex1-targeted overlay (both working):
$ dmesg | grep -iE "firewire|adau"
adau7002 adau7002-codec: supply IOVDD not found, using dummy regulator
firewire_ohci 0001:02:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x2
firewire_core 0001:02:00.0: created device fw0: GUID 7856341278563412, S800

Additional context

Proposed fix — overlay targeting pciex1 directly:

/dts-v1/;
/plugin/;
 
/ {
    compatible = "brcm,bcm2712";
 
    fragment@0 {
        target = <&pciex1>;
        __overlay__ {
            #address-cells = <0x03>;
            #size-cells = <0x02>;
            dma-ranges = <0x03000000 0x00 0x00 0x00 0x00 0x00 0x80000000>;
        };
    };
};

It would be useful to have this as an official overlay (e.g. pciex1-32bit-dma) for users who need 32-bit DMA on the external PCIe port without affecting RP1 peripherals.
Hardware: 52Pi P02 PCIe x1 board, SYBA SY-PEX30016 FireWire card (TI XIO2213B), INMP441 I2S MEMS microphone. Custom kernel with CONFIG_FIREWIRE=m, CONFIG_FIREWIRE_OHCI=m.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions