Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yishai1999
Copy link
Contributor

Made some order in the Kconfig's for silabs series 2 socs.

@zephyrbot zephyrbot added the platform: Silabs Silicon Labs label Jul 21, 2025
@yishai1999 yishai1999 force-pushed the silabs-soc-order branch 2 times, most recently from 80270f9 to 17aa5d2 Compare July 21, 2025 16:34
Comment on lines 10 to 14
config SOC_SERIES_EFR32MG21
bool
select SOC_SERIES_XG21
help
Silicon Labs EFR32MG21 (Mighty Gecko) Series MCU
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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)

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's unfortunate. @asmellby, What's your take on this? I think there should be some way to consolidate some of the kconfig options by utilizing the xg2y grouping

Copy link
Contributor

@asmellby asmellby Jul 22, 2025

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?

Copy link
Contributor Author

@yishai1999 yishai1999 Jul 22, 2025

Choose a reason for hiding this comment

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

I'm not sure I understood what you mean? Would be enough to just change the current name from SOC_SERIES_XG21 to SOC_SILABS_XG21? I made the changes under that assumption, LMK what you think about it @asmellby @nordicjm

Copy link
Contributor

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

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 <yishai1999@gmail.com>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants