Repository navigation
RP1 PIO support - #6470
Merged
Merged
RP1 PIO support#6470
Conversation
Attempting to start a non-idle channel causes an error message to be logged, and is inefficient. Test for emptiness of the desc_issued list before doing so. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
pelwell
force-pushed
the
piorp1
branch
4 times, most recently
from
November 15, 2024 13:21
83e590f to
8b43487
Compare
The Raspberry Pi RP1 includes 2 M3 cores running firmware. This driver adds a mailbox communication channel to them via a doorbell and some shared memory. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
The RP1 firmware runs a simple communications channel over some shared memory and a mailbox. This driver provides access to that channel. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Provide remote access to the PIO hardware in RP1. There is a single instance, with 4 state machines. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Declare the communications channel to RP1. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Declare the device that proxies RP1's PIO hardware. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
The header file linux/pio_rp1.h adds a pico-sdk-like interface to the RP1 PIO subsystem for other drivers. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Use the PIO hardware on RP1 to implement a PWM interface. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Enable building of the pwm-pio-rp1 driver, which is Pi 5-specific. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Add an overlay to enable a single-channel PIO-assisted PWM interface on any header pin. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Contributor
Author
|
Note: I think there's a problem running on the 32-bit OS - probably the missing CONFIG_COMPAT support. |
|
and when compiling: https://paste.armbian.de/yufeboteja |
Contributor
Author
|
That doesn't look like a regular build error - are you installing headers? |
Armbian build automation throws those errors out after this commit. I haven't look closer, but yes, it looks like headers are being installed in the process, line 20030 of paste. And I think they have to work. |
Contributor
Author
|
Does the patch in #6472 solve the problem? |
Contributor
Author
|
32-bit OS support now resolved by #6476. |
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Nov 18, 2024
kernel: fixup! misc: Add RP1 PIO driver kernel: misc: rp1-pio: Add compat_ioctl method See: raspberrypi/linux#6470 kernel: configs: enable driver for Vertexcom MSE102X See: raspberrypi/linux#6474 kernel: Add GPS avoidance option to IMX477 See: raspberrypi/linux#6468 kernel: can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration See: raspberrypi/linux#6466
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Nov 18, 2024
kernel: fixup! misc: Add RP1 PIO driver kernel: misc: rp1-pio: Add compat_ioctl method See: raspberrypi/linux#6470 kernel: configs: enable driver for Vertexcom MSE102X See: raspberrypi/linux#6474 kernel: Add GPS avoidance option to IMX477 See: raspberrypi/linux#6468 kernel: can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration See: raspberrypi/linux#6466
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Nov 20, 2024
See: raspberrypi/linux#6463 kernel: dtoverlays: enable SPI CS active-high See: raspberrypi/linux#6477 kernel: drivers: media: pci: Update Hailo accelerator device driver to v4.19 See: raspberrypi/linux#6478 kernel: misc: rp1-pio: Add FIFO-related methods See: raspberrypi/linux#6470
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Nov 20, 2024
See: raspberrypi/linux#6463 kernel: dtoverlays: enable SPI CS active-high See: raspberrypi/linux#6477 kernel: drivers: media: pci: Update Hailo accelerator device driver to v4.19 See: raspberrypi/linux#6478 kernel: misc: rp1-pio: Add FIFO-related methods See: raspberrypi/linux#6470
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.
This patch set provides support for accessing the PIO hardware in RP1. Aside from the data FIFOs, the registers are inaccessible over PCIe, so all interactions must be proxied via the RP1 firmware.
The included pwm-pio driver and overlay provides up to 4 PWM channels on arbitrary header pins, and acts as an example of in-kernel usage.
Requires the latest Pi 5 EEPROM image. User-space support and some more examples can be found in the utils repo: raspberrypi/utils#102
(Incorporates #6464.)