Skip to content
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

drivers: serial: rpi_pico: Migrate to pl011 driver #71074

Merged
merged 5 commits into from
Apr 10, 2024

Conversation

soburi
Copy link
Member

@soburi soburi commented Apr 4, 2024

The serial device of rpi_pico is pl011.
Since there is already a driver for pl011, the uart_rpi_pico driver is a duplicate implementation.
Considering long-term maintenance, it is better to unify them.

@soburi soburi force-pushed the pico_pl011 branch 5 times, most recently from 8a207c8 to 02185d6 Compare April 4, 2024 07:51
@soburi soburi changed the title use pl011 driver for rpi_pico drivers: serial: rpi_pico: Migrate to pl011 driver Apr 4, 2024
@soburi soburi marked this pull request as ready for review April 4, 2024 07:57
@soburi soburi requested a review from yonsch as a code owner April 4, 2024 07:57
@zephyrbot zephyrbot added platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico) platform: Ambiq Ambiq area: UART Universal Asynchronous Receiver-Transmitter labels Apr 4, 2024
@soburi soburi marked this pull request as draft April 4, 2024 09:04
… code

Introduce the `COMPAT_SPECIFIC_...` macros to determine the function name
from the compatible name.
These macros allow the isolation of device-dependent code in a generic way.

For example, if the compatible name is `ambiq,uart`,
The `COMPAT_SPECIFIC_DEFINE` macro is replaced by `AMBIQ_UART_DEFINE`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Reset the device on initializing if the node inherits
`reset-device.yaml`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
If a clock control device is set in the `clocks` property,
it is used to determine the frequency.
If `fixed-clock` is set for the clocks, we use that value as is.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Implementing err_check function by porting from
rpi_pico implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
RaspberryPi Pico's UART can be operated with the pl011 driver.
Replace it with this.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
@soburi soburi marked this pull request as ready for review April 7, 2024 09:14
@soburi
Copy link
Member Author

soburi commented Apr 8, 2024

@yonsch May I have your opinion?

Copy link
Contributor

@yonsch yonsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@carlescufi carlescufi merged commit e678a62 into zephyrproject-rtos:main Apr 10, 2024
22 checks passed
@soburi soburi deleted the pico_pl011 branch April 30, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UART Universal Asynchronous Receiver-Transmitter platform: Ambiq Ambiq platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants