Skip to content

Commit 189f364

Browse files
nordicjmcfriedt
authored andcommitted
doc: hardware: porting: soc_porting: Fix inconsistencies
Fixes some errors and inconsistencies to show a fuller example of a Kconfig.soc file Signed-off-by: Jamie McCrae <[email protected]>
1 parent ef2f264 commit 189f364

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

doc/hardware/porting/soc_porting.rst

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,41 @@ files for a SoC:
231231

232232
.. code-block:: kconfig
233233
234-
config SOC_<series name>
234+
config SOC_FAMILY_<SOC_FAMILY_NAME>
235235
bool
236236
237+
config SOC_SERIES_<SOC_SERIES_NAME>
238+
bool
239+
select SOC_FAMILY_<SOC_FAMILY_NAME>
240+
237241
config SOC_<SOC_NAME>
238242
bool
239-
select SOC_SERIES_<series name>
243+
select SOC_SERIES_<SOC_SERIES_NAME>
244+
245+
config SOC_FAMILY
246+
default "<soc_family_name>" if SOC_FAMILY_<SOC_FAMILY_NAME>
247+
248+
config SOC_SERIES
249+
default "<soc_series_name>" if SOC_SERIES_<SOC_SERIES_NAME>
240250
241251
config SOC
242-
default "SoC name" if SOC_<SOC_NAME>
252+
default "<soc_name>" if SOC_<SOC_NAME>
243253
244-
Notice that ``SOC_NAME`` is a pure upper case version of the SoC name.
254+
Notice that ``SOC_NAME`` is a pure uppercase version of the SoC name, ``SOC_SERIES_NAME`` is
255+
a pure uppercase version of SoC series name and ``SOC_FAMILY_NAME`` is a pure uppercase version
256+
of the SoC family name. If these fields do not appear in the :file:`soc.yml` file then they
257+
should not be present in the :file:`Kconfig.soc` file.
245258

246-
The Kconfig ``SOC`` setting is globally defined as a string and therefore the
247-
:file:`Kconfig.soc` file shall only define the default string value and not
248-
the type. Notice that the string value must match the SoC name used in the
259+
The Kconfigs ``SOC``, ``SOC_SERIES`` and ``SOC_FAMILY`` settings are globally defined as
260+
strings and therefore the :file:`Kconfig.soc` file shall only define the default string values
261+
and not the types. Notice that the string values must match the values used in the
249262
:file:`soc.yml` file.
250263

264+
.. note::
265+
The build system supports any variation of case for ``soc_name``, ``soc_series_name`` and
266+
``soc_family_mame``, but when submitting boards for inclusion in Zephyr itself, these must be
267+
purely lowercase versions of the Kconfig names
268+
251269
:file:`Kconfig`
252270
Included by :zephyr_file:`soc/Kconfig`.
253271

0 commit comments

Comments
 (0)