-
Notifications
You must be signed in to change notification settings - Fork 8k
Enhance Microchip UART G1 Driver #96597
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
base: main
Are you sure you want to change the base?
Enhance Microchip UART G1 Driver #96597
Conversation
Could you amend the commit summary from |
Add more functionality in uart driver. Add bindings for sercom in n and p SOC variants. Signed-off-by: Sunil Abraham <[email protected]>
Add more functionality in uart driver. Implement interrupt API. Signed-off-by: Sunil Abraham <[email protected]>
e9e9723
to
3d5ff98
Compare
|
Yes, I have updated the commit summary as per your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the Microchip UART G1 driver by implementing interrupt-driven UART functionality and expanding device tree support for SERCOM modules across different SoC variants.
- Adds comprehensive interrupt-driven API implementation including TX/RX interrupt handling, FIFO operations, and error management
- Introduces device tree bindings for SERCOM6 and SERCOM7 modules in both 'n' and 'p' SoC variants
- Adds new
run-in-standby-en
property to control UART behavior in standby sleep mode
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
dts/bindings/serial/microchip,sercom-g1-uart.yaml | Adds run-in-standby-en property for standby mode configuration |
dts/arm/microchip/sam/sam_d5x_e5x/common/samd5xe5x_p.dtsi | Defines SERCOM6/7 modules for 'p' variant SoCs |
dts/arm/microchip/sam/sam_d5x_e5x/common/samd5xe5x_n.dtsi | Defines SERCOM6/7 modules for 'n' variant SoCs |
Multiple .dtsi files | Include appropriate variant-specific SERCOM definitions |
drivers/serial/uart_mchp_sercom_g1.c | Implements interrupt-driven API and runtime configuration support |
drivers/serial/Kconfig.mchp | Enables interrupt support for the driver |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
int retval = UART_SUCCESS; | ||
|
||
do { | ||
uart_enable(regs, clock_external, false, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function call passes false
for the run_in_standby
parameter, but this should use the configuration value (cfg->run_in_standby_en == 1) ? true : false
to maintain consistency with the initialization function.
uart_enable(regs, clock_external, false, false); | |
uart_enable(regs, clock_external, (cfg->run_in_standby_en == 1) ? true : false, false); |
Copilot uses AI. Check for mistakes.
* @param clock_external Boolean to check external or internal clock | ||
* @param run_in_standby Boolean to check if run_in_standby is configured. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing documentation for the new run_in_standby
parameter in the function's docstring.
* @param clock_external Boolean to check external or internal clock | |
* @param run_in_standby Boolean to check if run_in_standby is configured. | |
* @param clock_external Boolean to check external or internal clock. | |
* @param run_in_standby Boolean to enable UART operation in standby mode. |
Copilot uses AI. Check for mistakes.
This update introduces more functionality to UART G1 driver, including implementation of interrupt API.
Additionally, Device Tree bindings are added to support SERCOM modules in both 'n' and 'p' SoC variants.