-
Notifications
You must be signed in to change notification settings - Fork 7.7k
soc: silabs: s2: make order in soc Kconfig's #93456
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
Conversation
80270f9
to
17aa5d2
Compare
config SOC_SERIES_EFR32MG21 | ||
bool | ||
select SOC_SERIES_XG21 | ||
help | ||
Silicon Labs EFR32MG21 (Mighty Gecko) Series MCU |
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.
no this is not how soc series Kconfigs work, they do not select each other, only one is selected
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.
Ok. Do you have a suggestion of what to call it instead? They hierarchy is efr32mg21 < xg21 < silbas_s2
so I'm not sure how to refer to each? Series? Family? What additional term can I use?
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.
family: silabs_s2
- series: xg21
- name: efr32mg21 (assuming this is the name of the soc)
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.
No, the soc would be efr32mg21a020f1024im32
for example so efr32mg21a020f1024im32 < efr32mg21 < xg21 < silbas_s2
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.
then one of those is going to need to be dropped, it is described on https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#hardware-support-hierarchy
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.
As I see it, the following information is needed:
efr32mg21
in order to construct the CMSIS-Device include path in hal_silabs ("device family" in CMSIS and Silabs terms, currently mapped to "series" in hwmv2)xg21
in order to have a single symbol to use to avoid complex expressions when multiple device families share a platform ("generic family" in Silabs terms)silabs_s2
for the umbrella of platforms in the same generation ("series" in Silabs terms, currently mapped to "family" in hwmv2)
IMO the easiest way out might be to not try to make xg21
be part of the hwmv2 model, and instead declare it like architecture/cpu is done: by doing the definition and select
in Kconfig, not Kconfig.soc, and guarding it behind SOC_FAMILY_SILABS_S2
. I'm not sure what the symbol should be called, though -- "generic family" doesn't work since family/series has the opposite meaning in Zephyr. Maybe simply SOC_SILABS_XG21
?
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 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 idea is that in future there will be no selections of these symbols (i.e. other than selecting a SOC_MY_SOC
from a board - perhaps, or this might be done automatically too) and all SOC_* symbols will be automatically selected by the build system, so adding that does not fit in to that but would need to wait for @tejlmand to get back from vacation to comment on the suitability because the automatic build system parts is his idea
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.
@yishai1999 Yeah, this was what I was thinking (alternatively also moving it to Kconfig
, since it isn't used for hwmv2, but I don't know if that's important -- the docs say "This file selects the SoC family and series in the Kconfig tree and potential other SoC related Kconfig").
There is prior art for this in the tree for STM32: soc/st/stm32/stm32f1x/Kconfig.soc#L40. This one does it the same way as you've done here now, and for exactly the same reason -- to produce a generic symbol that is then used in a clock control driver header: include/zephyr/drivers/clock_control/stm32_clock_control.h#L20
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.
basing it on the stm32 example is ok yes
17aa5d2
to
39cba63
Compare
Made some order in the Kconfig's for silabs series 2 socs. Made a distinction between silabs "generic family" (e.g. xg21) and silabs "device family" (e.g. efr32mg21). Signed-off-by: Yishai Jaffe <[email protected]>
39cba63
to
9a128cb
Compare
|
@nordicjm Do you have any additional required changes now that the "series" duplication is resolved, or can this PR be made ready to merge? |
Remember to re-request review in the top right when you want reviewers to look at a PR |
Made some order in the Kconfig's for silabs series 2 socs.