Skip to content

hwmv2: Mismatch between SOC_SERIES name and value #69317

@nordicjm

Description

@nordicjm

For hwmv2, there should be a match between the names and values of SoCs, this should take the form of:

config SOC_SERIES
        default "nrf51" if SOC_SERIES_NRF51
        default "nrf52" if SOC_SERIES_NRF52

As it stands today without any exceptions, the following would be wrong:

config SOC_SERIES
        default "nrf51" if SOC_SERIES_NRF51X
        default "nrf52" if SOC_SERIES_NRF52X

The reason for needing alignment in SOC_SERIES and SOC names/values is so that CI checks can be added for spotting typos, as there currently is with boards in hwmv2 now. An example hwmv2 Kconfig.<board> file:

config BOARD_V2M_BEETLE
        select SOC_BEETLE_R0

and corresponding board.yml file:

board:
  name: v2m_beetle
  vendor: ARM
  socs:
  - name: beetle_r0

If there is a typo in a board name, the following illustrates how a mismatch is now detected in hwmv2 which would not be caught had the bool prompt be left:

config BOARD_V2M_BEETLE
        bool
        select SOC_BEETLE_R0

config BOARD_V8M_BEETLE
        bool
        select SOC_BEETLE_R0

There is similar checking which has been added for SOC_PART_NUMBER whereby issues have been found and corrected.

This checking can be expanded to SOC_SERIES and SOC, as of right now the aim is for the values of these to match the name without any rules or exceptions but this is not currently adhered to by all converted hwmv2 SoCs.

@manuargue has helpfully put together a script which lists the current mismatches for SOC_SERIES:

  • soc/andes/ae350/Kconfig.soc @nordicjm soc: andestech: Fix Kconfig naming #102310
    • default string != option name ('ae350', 'ANDES_AE350')
  • soc/nordic_nrf/Kconfig.soc @nordicjm soc: nordic: Replace SOC_SERIES_NRF* Kconfigs without X suffix #102298
    • default string != option name ('nrf51', 'NRF51X')
    • default string != option name ('nrf52', 'NRF52X')
    • default string != option name ('nrf53', 'NRF53X')
    • default string != option name ('nrf54h', 'NRF54HX')
    • default string != option name ('nrf54l', 'NRF54LX')
    • default string != option name ('nrf91', 'NRF91X')
  • soc/st/stm32/stm32f0/Kconfig.soc @erwango
    • default string != option name ('stm32f0', 'STM32F0X')
  • soc/st/stm32/stm32u5/Kconfig.soc @erwango
    • default string != option name ('stm32u5', 'STM32U5X')
  • soc/st/stm32/stm32h5/Kconfig.soc @erwango
    • default string != option name ('stm32h5', 'STM32H5X')
  • soc/st/stm32/stm32l4/Kconfig.soc @erwango
    • default string != option name ('stm32l4', 'STM32L4X')
  • soc/st/stm32/stm32l5/Kconfig.soc @erwango
    • default string != option name ('stm32l5', 'STM32L5X')
  • soc/st/stm32/stm32wl/Kconfig.soc @erwango
    • default string != option name ('stm32wl', 'STM32WLX')
  • soc/st/stm32/stm32h7/Kconfig.soc @erwango
    • default string != option name ('stm32h7', 'STM32H7X')
  • soc/st/stm32/stm32c0/Kconfig.soc @erwango
    • default string != option name ('stm32c0', 'STM32C0X')
  • soc/st/stm32/stm32l1/Kconfig.soc @erwango
    • default string != option name ('stm32l1', 'STM32L1X')
  • soc/st/stm32/stm32g4/Kconfig.soc @erwango
    • default string != option name ('stm32g4', 'STM32G4X')
  • soc/st/stm32/stm32f1/Kconfig.soc @erwango
    • default string != option name ('stm32f1', 'STM32F1X')
  • soc/st/stm32/stm32f3/Kconfig.soc @erwango
    • default string != option name ('stm32f3', 'STM32F3X')
  • soc/st/stm32/stm32f4/Kconfig.soc @erwango
    • default string != option name ('stm32f4', 'STM32F4X')
  • soc/st/stm32/stm32f2/Kconfig.soc @erwango
    • default string != option name ('stm32f2', 'STM32F2X')
  • soc/st/stm32/stm32wb/Kconfig.soc @erwango
    • default string != option name ('stm32wb', 'STM32WBX')
  • soc/st/stm32/stm32mp1/Kconfig.soc @erwango
    • default string != option name ('stm32mp1', 'STM32MP1X')
  • soc/st/stm32/stm32f7/Kconfig.soc @erwango
    • default string != option name ('stm32f7', 'STM32F7X')
  • soc/st/stm32/stm32l0/Kconfig.soc @erwango
    • default string != option name ('stm32l0', 'STM32L0X')
  • soc/st/stm32/stm32g0/Kconfig.soc @erwango
    • default string != option name ('stm32g0', 'STM32G0X')
  • soc/st/stm32/stm32wba/Kconfig.soc @erwango
    • default string != option name ('stm32wba', 'STM32WBAX')
  • soc/microchip/mec/Kconfig @fabiobaltieri @jvasanth1
    • default string != option name ('mec152x', 'MEC1501X')
  • soc/raspberry_pi/rp2/Kconfig.soc @nordicjm
    • default string != option name ('rp2', 'RP2XXX')
    • default string != option name ('rp2040', 'RP2XXX')
  • soc/intel/intel_adsp/ace/Kconfig.soc @golowanow
    • default string != option name ('ace', 'INTEL_ACE')
  • soc/intel/intel_adsp/cavs/Kconfig.soc @golowanow
    • default string != option name ('cavs', 'INTEL_ADSP_CAVS')
  • soc/xilinx/zynq7000/xc7zxxx/Kconfig.soc @nordicjm
    • default string != option name ('xc7zxxx', 'XILINX_XC7ZXXX')
    • default string != option name ('xc7zxxxs', 'XILINX_XC7ZXXXS')
  • soc/nxp/s32/s32k1/Kconfig.soc @manuargue
    • default string != option name ('s32k1', 'S32K1XX')
  • soc/nxp/s32/s32k3/Kconfig.soc @manuargue
    • default string != option name ('s32k3', 'S32K3XX')
  • soc/nxp/kinetis/k2x/Kconfig.soc @dleach02
    • default string != option name ('k2x', 'KINETIS_K2X')
  • soc/nxp/kinetis/ke1xf/Kconfig.soc @dleach02
    • default string != option name ('ke1xf', 'KINETIS_KE1XF')
  • soc/nxp/kinetis/k8x/Kconfig.soc @dleach02
    • default string != option name ('k8x', 'KINETIS_K8X')
  • soc/nxp/kinetis/kwx/Kconfig.soc @dleach02
    • default string != option name ('kwx', 'KINETIS_KWX')
  • soc/nxp/kinetis/k6x/Kconfig.soc @dleach02
    • default string != option name ('k6x', 'KINETIS_K6X')
  • soc/nxp/kinetis/kl2x/Kconfig.soc @dleach02
    • default string != option name ('kl2x', 'KINETIS_KL2X')
  • soc/nxp/kinetis/kv5x/Kconfig.soc @dleach02
    • default string != option name ('kv5x', 'KINETIS_KV5X')
  • soc/arm/designstart/Kconfig.soc @nordicjm
    • default string != option name ('designstart', 'ARM_DESIGNSTART')

As of 2026:

  • sifive soc: sifive: sifive_freedom: Fix SoC Kconfig naming and issues #102365
  • arm musca/mps2/mps3/mps4 soc: arm: musca/mps*: Fix SoC Kconfig naming #102364
  • intel @dcpleung soc: intel_adsp: rename CONFIG_SOC_* to follow HWMv2 guideline #102421
    • soc/intel/intel_adsp/ace/Kconfig.soc: default "ace30" if SOC_INTEL_ACE30
    • soc/intel/intel_adsp/ace/Kconfig.soc: default "ace40" if SOC_INTEL_ACE40
    • soc/intel/intel_adsp/cavs/Kconfig.soc: default "cavs25" if SOC_INTEL_CAVS_V25
    • (likely others, please check)
  • amd @michalsimek
    • soc/amd/acp_6_0/Kconfig.soc: default "amd_acp_6_0_adsp" if SOC_ACP_6_0
    • (likely others, please check)
  • xilinx @michalsimek
    • soc/xlnx/zynq7000/xc7zxxxs/Kconfig.soc: default "xc7z007s" if SOC_XILINX_XC7Z007S
    • soc/xlnx/zynq7000/xc7zxxxs/Kconfig.soc: default "xc7z012s" if SOC_XILINX_XC7Z012S
    • soc/xlnx/zynq7000/xc7zxxxs/Kconfig.soc: default "xc7z014s" if SOC_XILINX_XC7Z014S
    • soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc: default "xc7z010" if SOC_XILINX_XC7Z010
    • soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc: default "xc7z015" if SOC_XILINX_XC7Z015
    • soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc: default "xc7z020" if SOC_XILINX_XC7Z020
    • soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc: default "xc7z030" if SOC_XILINX_XC7Z030
    • soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc: default "xc7z035" if SOC_XILINX_XC7Z035
    • soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc: default "xc7z045" if SOC_XILINX_XC7Z045
    • soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc: default "xc7z100" if SOC_XILINX_XC7Z100
    • (possibly others, please check)

Boards/socs must be fixed so that the value in soc.yml matches the text string of the Kconfig which matches (in UPPER CASE) of the Kconfig symbol. E.g. if soc.yml has:

family:
- name: arm
  series:
  - name: mps2
    socs:
    - name: an383

then the Kconfigs must be:

config SOC_FAMILY_ARM
...

config SOC_FAMILY
        default "arm" if SOC_FAMILY_ARM

config SOC_SERIES_MPS2
...

config SOC_SERIES
        default "mps2" if SOC_SERIES_MPS2

config SOC_AN383
...

config SOC
        default "an383" if SOC_AN383

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions