Questions concerning UART drivers for SBC's

22 views
Skip to first unread message

Camden Bruce

unread,
May 20, 2021, 4:36:59 AM5/20/21
to drivers-dev
Hi, I'm just chipping away at my good ol project of running fuchsia on the pi4 again and I've thought of some new problems I do not know how to solve. 

The raspberry pi has GPIO pins that are used for different things as you may know. 5v power and ground ETC

The rpi4's UART pins are listed here, the main UART pins are GPIO 14 (transmit) and 15 (receive). But i'm not entirely sure how I can implement that into my UART driver. 

Thanks, Camden

Andres Oportus

unread,
May 20, 2021, 12:30:04 PM5/20/21
to Camden Bruce, drivers-dev
A basic kernel UART driver for RiP4 can be seen here (works with no change from default GPIO configuration):
https://fuchsia-review.googlesource.com/c/fuchsia/+/406056/6/zircon/kernel/target/arm64/boot-shim/rpi4-uart.c

For UART related GPIO configurations, historically we have relied on HW defaults or bootloader settings and that is the case in that set of RiP4 patches. The better implementation though is for all drivers (kernel or userspace) to always configure the HW and not make any assumptions about their state

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "drivers-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drivers-dev...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/drivers-dev/b7e954c0-ace9-49b9-8a43-b4fb28a5aa8fn%40fuchsia.dev.

Camden Bruce

unread,
May 20, 2021, 7:53:56 PM5/20/21
to drivers-dev, Andres Oportus, drivers-dev, Camden Bruce
Oh I see, thank you very much. 
"The better implementation though is for all drivers (kernel or userspace) to always configure the HW and not make any assumptions about their state"
Yeah, rather than making it a guessing game, giving it the real information on the hardware, is a better idea.
Reply all
Reply to author
Forward
0 new messages