-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
clock_control: stm32: Configure MCO through devicetree instead of Kconfig #76556
Conversation
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.
Off with a very good start!
Some points to address or discuss:
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.
Thanks for the work on this long awaited piece of code.
cf99e9d
to
1afa987
Compare
1afa987
to
30e8ed3
Compare
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.
Looks pretty solid!
A few minor points to iron out:
I will rebase this PR and resolve the conflict after the review is finished, so that it is easier to see the updates that are being done. The conflict is trivial to resolve, only adjacent context lines that have been updated. |
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.
One nit from last review remaining, but non-blocking. LGTM otherwise.
Expose the helper function enabled_clock so that it can be used in other clock library sources. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add clock sources PLL2CLK, PLL3CLK and EXT_HSE. Needed to check that these clocks are enabled in MCO code. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add clock sources that can be output by the MCO on the stm32f1x and stm32f10 connectivity line devices. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add MCO select and prescaler macros to set bits in the RCC CFGRx register. The set of supported boards are chosen to replace what is currently supported in Kconfig. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add stm32 microcontroller clock output binding. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add macro for encoding MCO bit values into the CFGR register of RCC. Add macros for decoding and extracting the different fields. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add device driver for STM32 MCO peripheral which takes configures the MCO clock source and prescaler, and outputs it on one of the GPIO pins. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add MCO device nodes to the STM32 boards. The set of supported boards are chosen to replace what is currently supported in Kconfig. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Fix stm32f7 missing the definition for HSE and PLLI2S_R clock source. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add MCO support for the stm32c0xx family. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Update MCO board sample to use devicetree information instead of Kconfig configurations. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add stm32f746g_disco board to MCO sample. This board has 2 MCO instances so useful to show multiple instances as well as checking the implementation. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Deprecate support for configuring the MCO source and prescaler from Kconfig configurations. This is now done by devicetree and an MCO driver instead, which also configures the pin to be used by the MCO peripheral. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Document deprecated stm32 MCO Kconfig options in favour of setting MCO through devicetree. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
bddd41d
5542d35
to
bddd41d
Compare
Addressed last nit and rebased the PR to fix the conflicts. |
Re-running documentation build, failed because of server issues. |
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.
Once again a great thanks!
Deprecated setting MCO source and prescalor in Kconfig in favour of setting it through devicetree.