@@ -367,12 +367,11 @@ If multiple boards are placed in the same board folder, then the file
367367Write your devicetree
368368*********************
369369
370- The devicetree file :file: `boards/<vendor>/plank/plank.dts ` or
371- :file: `boards/<vendor>/plank/plank_<qualifiers>.dts ` describes your board
370+ The devicetree file :file: `boards/<vendor>/plank/plank_<qualifiers>.dts ` describes your board
372371hardware in the Devicetree Source (DTS) format (as usual, change ``plank `` to
373372your board's name). If you're new to devicetree, see :ref: `devicetree-intro `.
374373
375- In general, :file: `plank .dts ` should look like this:
374+ In general, :file: `plank_<qualifiers> .dts ` should look like this:
376375
377376.. code-block :: devicetree
378377
@@ -422,16 +421,9 @@ In general, :file:`plank.dts` should look like this:
422421 status = "okay";
423422 };
424423
425- Only one ``.dts `` file will be used, and the most specific file which exists
426- will be used.
427-
428- This means that if both :file: `plank.dts ` and :file: `plank_soc1_foo.dts ` exist,
429- then when building for ``plank `` / ``plank/soc1 ``, then :file: `plank.dts ` is
430- used. When building for ``plank//foo `` / ``plank/soc1/foo `` the
431- :file: `plank_soc1_foo.dts ` is used.
432-
433- This allows board maintainers to write a base devicetree file for the board
434- or write specific devicetree files for a given board's SoC or variant.
424+ In the case a board has only a single SoC, without any board variants then the dts file can be
425+ named :file: `<plank>.dts ` instead, however this is not recommended due to the file silently be
426+ unused if a variant or other SoC is added to the board.
435427
436428If you're in a hurry, simple hardware can usually be supported by copy/paste
437429followed by trial and error. If you want to understand details, you will need
@@ -516,7 +508,6 @@ files for a board named ``plank``:
516508 ├── Kconfig
517509 ├── Kconfig.plank
518510 ├── Kconfig.defconfig
519- ├── plank_defconfig
520511 └── plank_<qualifiers>_defconfig
521512
522513:file: `Kconfig.plank `
@@ -573,23 +564,28 @@ files for a board named ``plank``:
573564 default y
574565
575566 if NETWORKING
567+
576568 config SOC_ETHERNET_DRIVER
577569 default y
570+
578571 endif # NETWORKING
579572
580573 endif # BOARD_PLANK
581574
582- :file: `plank_defconfig ` / :file: `plank_<qualifiers>_defconfig `
575+ :file: `plank_<qualifiers>_defconfig ` (or :file: `plank_defconfig ` in limited circumstances)
583576 A Kconfig fragment that is merged as-is into the final build directory
584577 :file: `.config ` whenever an application is compiled for your board.
585578
586- If both the common :file: `plank_defconfig ` file and one or more board
587- qualifiers specific :file: `plank_<qualifiers>_defconfig ` files exist, then
588- all matching files will be used.
589- This allows you to place configuration which is common for all board SoCs,
590- CPU clusters, and board variants in the base :file: `plank_defconfig ` and only
591- place the adjustments specific for a given SoC or board variant in the
592- :file: `plank_<qualifiers>_defconfig `.
579+ :file: `plank_defconfig ` can only be used with boards that have no qualifiers, no variants and a
580+ single SoC present, though this style of naming is not recommended due to samples/tests or
581+ downstream usage breaking suddenly without warning if a new SoC or board variant/qualifier is
582+ added to an board in upstream Zephyr.
583+
584+ .. note ::
585+ Multiple files are not merged and there is no fallback mechanism for files, this means if there
586+ is a board with 2 different SoCs and each one has 2 board variants, a :file: `plank_defconfig `
587+ file would be wholly unused, for the first qualifier and variant
588+ :file: `plank_<soc1>_<variant1>_defconfig ` will be used, it will not include other file.
593589
594590 The ``_defconfig `` should contain mandatory settings for your system clock,
595591 console, etc. The results are architecture-specific, but typically look
0 commit comments