Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
USB HS support fixes on STM32U5 #80249
USB HS support fixes on STM32U5 #80249
Changes from all commits
50a3173
e21b99c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
There are various ways to provide a default value:
COND_CODE_1(DT_NODE_HAS_PROP
: See examples https://github.com/search?q=repo%3Azephyrproject-rtos%2Fzephyr%20COND_CODE_1(DT_NODE_HAS_PROP&type=code)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.
Or the property could be marked
required: true
with no default value provided to force user to input the correct value. Maybe this is the best course of action here.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.
Indeed, this is even better as this depends on each board implementation.
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.
Though
STM32_SRC_HSI48
is not used by the driver (only second cell is used to configure clock, i.e.OTGHS_SEL(0)
), it is confusing to leave it like that sinceOTGHS_SEL(0)
selectHSE
and notHSI48
as input clock.Switching that to
STM32_SRC_HSE
seems the way to go. However, we need to disableCONFIG_USB_DC_STM32_CLOCK_CHECK
so it won't complain about 48MHz frequency. Or we can update that check (it won't be easy to cover all cases, so I guess we can leave that as future enhancement).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.
Please document values in the description to allow rendering in documentation.
See https://docs.zephyrproject.org/latest/build/dts/api/bindings/timer/st%2Cstm32-timers.html#dtbinding-st-stm32-timers as example
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.
I think it makes more sense to define list of possible frequencies:
here. That way it will still be pretty straightforward to select specific configuration in devicetree, e.g. with
DT_FREQ_M(16)
, while being able to dropinclude/zephyr/dt-bindings/phy/stm32u5_otg_hs_phy.h
entirely.