Skip to content

include: zephyr: dt-bindings: Fix USB_SEL mask #92876

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jurenat
Copy link
Contributor

@jurenat jurenat commented Jul 9, 2025

Selecting the clock source for USB is only a bit value in the CCIPR2 register.
See RM0490 chapter 6.4.21 page 159.

@github-actions github-actions bot added size: XS A PR changing only a single line of code area: Clock Control labels Jul 9, 2025
@github-actions github-actions bot requested a review from nordic-krch July 9, 2025 07:03
mathieuchopstm
mathieuchopstm previously approved these changes Jul 9, 2025
@mathieuchopstm mathieuchopstm added the platform: STM32 ST Micro STM32 label Jul 9, 2025
@mathieuchopstm mathieuchopstm added this to the v4.2.0 milestone Jul 9, 2025
@erwango erwango self-requested a review July 9, 2025 14:41
@erwango erwango assigned erwango and unassigned nordic-krch Jul 9, 2025
@jurenat
Copy link
Contributor Author

jurenat commented Jul 10, 2025

I also needed the MCO feature to make the USB work, and I noticed the mask was not correct for it. Would it be desirable also to add a new header file like this? Perhaps I should squash these changes into one commit?

@jurenat jurenat requested a review from mathieuchopstm July 11, 2025 07:30
Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Nitpicking and non-blocking: could you fix the RefMan reference in the commit message body
(for commit "include: zephyr: dt-bindings: Fix MCOx_yyy masks"): it's RM0490 instead of RM490?

Also it would be nice to give the manual revision number (currently "Rev 5") in case a new revision comes and section or page numbering changes. (Would apply to both commits).

jurenat added 2 commits July 15, 2025 15:19
Selecting the clock source for USB is only a bit value in the CCIPR2
register.
See RM0490 Rev 5 chapter 6.4.21 page 159.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Macros MCO1_SEL, MCO1_PRE, MCO2_SEL, MCO2_PRE uses 4 bits wide masks as
defined in the RM0490 Rev 5 section 6.4.3, page 136

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
@jurenat jurenat force-pushed the fix-stm32c071-usb_sel-mask branch from ee9302f to 2bf7744 Compare July 15, 2025 13:20
Copy link

@etienne-lms
Copy link
Contributor

I also needed the MCO feature to make the USB work, and I noticed the mask was not correct for it. Would it be desirable also to add a new header file like this? Perhaps I should squash these changes into one commit?

I think your 2 commits are perfect as they are.

@danieldegrasse danieldegrasse added the backport-v4.2-branch Request backport to the v4.2-branch label Jul 15, 2025
@danieldegrasse danieldegrasse removed this from the v4.2.0 milestone Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Clock Control backport-v4.2-branch Request backport to the v4.2-branch platform: STM32 ST Micro STM32 size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants