-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
smartbond UART power management #62190
smartbond UART power management #62190
Conversation
6d7dced
to
c907740
Compare
@andrzej-kaczmarek @dcpleung please take a look |
Just reminder that this requires #61857 |
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.
(clicked the wrong button.)
c907740
to
bd69ca1
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Still waiting for #61857 to be processed |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Still waiting for #61857 to be accepted |
needs rebase |
drivers/serial/uart_smartbond.c
Outdated
|
||
ret = gpio_add_callback(config->rx_wake_gpio.port, &data->rx_wake_cb); | ||
if (ret < 0) { | ||
return ret; |
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.
Should we call da1469x_pd_release(MCU_PD_DOMAIN_COM);
before returning?
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.
@ydamigos you are right, code will be changed not to return here. If add callback fails (unlikely) timeout will not be configured and UART will work except timeout functionality will be inactive
UART2 and UART3 (unlink UART) do support hardware flow control. This simply add necessary flag that is already handled in the code. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This is initial version that implements device power management support when configured in Kconfig files. Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This change allows to wake up UART from sleep mode when low level on inactive UART is detected during platform sleep. Timeout can be specified for each UART separately in device tree. If one of the UARTs is selected as console sleep timeout is taken from Kconfig same way other platform configure same functionality using CONFIG_UART_CONSOLE_INPUT_EXPIRED_TIMEOUT Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This change allows to use DTR line driven from external serial port that when active (low) will prevent UART device from going to sleep. It will also wake up platform when DTR line becomes active. DTR line is often activated in serial port connected to host computer when operating system opens serial device like COMx for Windows or /dev/ttyACMx /dev/ttyUSBx for Linux based systems. DTR line (specified in device tree) will be used by WAKEUP and PDC controllers (via GPIO driver) to handle DTR line changes. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
bd69ca1
to
7b34296
Compare
rebased to fix conflicts and @ydamigos comment addressed |
This adds power management functionality to SmartBond(tm) serial driver.
With this PR:
This change requires #61857 and #61844 and #61941
Signed-off-by: Jerzy Kasenberg jerzy.kasenberg@codecoup.pl