-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux serial tty driver for Raspberry Pi firmware UART #6502
Merged
Conversation
This file contains 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
Add VideoCore mailbox definitions for the new RPi firmware UART. Signed-off-by: Tim Gover <[email protected]>
Assign a new serial core number for the RPi firmware UART. Signed-off-by: Tim Gover <[email protected]>
timg236
force-pushed
the
tim/rpi-fw-uart
branch
2 times, most recently
from
December 2, 2024 17:08
38ef634
to
b72023c
Compare
On Raspberry Pi 4 and earlier models the firmware provides a low speed (up to 115200 baud) bit-bashed UART on arbitrary GPIOs using the second VPU core. The firmware driver is designed to support 19200 baud. Higher rates up to 115200 seem to work but there may be more jitter. This can be useful for debug or managing additional low speed peripherals if the hardware PL011 and 8250 hardware UARTs are already used for console / bluetooth. The firmware driver requires a fixed core clock frequency and also requires the VPU PWM audio driver to be disabled (dtparam=audio=off) Runtime configuration is handled via the vc-mailbox APIs with the FIFO buffers being allocated in uncached VPU addressable memory. The FIFO pointers are stored in spare VideoCore multi-core sync registers in order to reduce the number of uncached SDRAM accesses thereby reducing jitter. Signed-off-by: Tim Gover <[email protected]>
Enable the RPi firmware driver for Raspberry Pi4 and earlier models. Signed-off-by: Tim Gover <[email protected]>
Add a device-tree overlay to configure the GPIOs for the Raspberry Pi firmware UART. Example config.txt dtoverlay=rpi-fw-uart,txd0_pin=20,rxd0_pin=21 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Tim Gover <[email protected]>
timg236
force-pushed
the
tim/rpi-fw-uart
branch
from
December 2, 2024 17:13
b72023c
to
0f46014
Compare
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Dec 3, 2024
See: raspberrypi/linux#6502 kernel: RP1 clocks See: raspberrypi/linux#6459 kernel: dts: bcm2712-rpi: For CM5IO, i2c_csi_dsi needs to be CAM/DISP1 See: raspberrypi/linux#6495 kernel: drm: vc4: dsi: Handle the different command FIFO widths See: raspberrypi/linux#6481
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Dec 3, 2024
See: raspberrypi/linux#6502 kernel: RP1 clocks See: raspberrypi/linux#6459 kernel: dts: bcm2712-rpi: For CM5IO, i2c_csi_dsi needs to be CAM/DISP1 See: raspberrypi/linux#6495 kernel: drm: vc4: dsi: Handle the different command FIFO widths See: raspberrypi/linux#6481
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Dec 5, 2024
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Dec 5, 2024
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.
The latest Raspberry Pi firmware (not released yet) adds support for a simple software UART on arbitrary GPIO pins. The implementation supports Pi4 family and older and requires exclusive access to the second VPU core.
Create a Linux driver for this using device-tree to configure the GPIOs
Firmware feature support
Recommended
config.txt
settings