Skip to content

Commit 5bc06e8

Browse files
ulfalizernashif
authored andcommitted
doc: release notes: Mention devicetree script changes for 2.0 and 2.1
Added in 2.0, along with some binding format simplifications in 2.1. Bunch of other stuff that could be mentioned, but keep it relatively short. Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 8c69941 commit 5bc06e8

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

doc/guides/dts/index.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,71 @@ Below is a template that shows the format of binding files, stored in
449449
.. literalinclude:: ../../../dts/binding-template.yaml
450450
:language: yaml
451451

452+
.. _legacy_binding_syntax:
453+
454+
Legacy binding syntax
455+
=====================
456+
457+
Various parts of the binding syntax were simplified and generalized for the
458+
Zephyr 2.1 release.
459+
460+
The binding below shows various legacy syntax.
461+
462+
.. code-block:: yaml
463+
464+
title: ...
465+
description: ...
466+
467+
inherits:
468+
!include foo.yaml
469+
470+
parent:
471+
bus: spi
472+
473+
properties:
474+
compatible:
475+
constraint: "company,device"
476+
type: string-array
477+
478+
frequency:
479+
type: int
480+
category: optional
481+
482+
sub-node:
483+
properties:
484+
child-prop:
485+
type: int
486+
category: required
487+
488+
This should now be written like this:
489+
490+
.. code-block:: yaml
491+
492+
title: ...
493+
description: ...
494+
495+
compatible: "company,device"
496+
497+
include: foo.yaml
498+
499+
parent-bus: spi
500+
501+
properties:
502+
frequency:
503+
type: int
504+
required: false
505+
506+
child-node:
507+
title: ...
508+
description: ...
509+
510+
properties:
511+
child-prop:
512+
type: int
513+
required: true
514+
515+
The legacy syntax is still supported for backwards compatibility, but generates
516+
deprecation warnings. Support will be dropped in the Zephyr 2.3 release.
452517

453518
Include files generation
454519
************************

doc/releases/release-notes-2.0.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,27 @@ Bluetooth
448448
Build and Infrastructure
449449
************************
450450

451+
* The devicetree Python scripts have been rewritten to be more robust and
452+
easier to understand and change. The new scripts are these three files:
453+
454+
- :zephyr_file:`scripts/dts/dtlib.py` -- a low-level :file:`.dts` parsing
455+
library
456+
457+
- :zephyr_file:`scripts/dts/edtlib.py` -- a higher-level library that adds
458+
information from bindings
459+
460+
- :zephyr_file:`scripts/dts/gen_defines.py` -- generates a C header from the
461+
devicetree files for the board
462+
463+
The new scripts verify ``category: optional/required`` and ``type:`` settings
464+
given in bindings for nodes, and add some new types, like ``phandle-array``.
465+
Error messages and other output is now more helpful.
466+
467+
See the updated documentation in :zephyr_file:`dts/binding-template.yaml`.
468+
469+
The old scripts are kept around to generate a few deprecated ``#define``\ s.
470+
They will be removed in the Zephyr 2.2 release.
471+
451472
* Changed ARM Embedded toolchain to default to nano variant of newlib
452473

453474

doc/releases/release-notes-2.1.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ Build and Infrastructure
5050
Use new functions that utilize eDTS info such as dt_node_reg_addr.
5151
See :zephyr_file:`scripts/kconfig/kconfigfunctions.py` for details.
5252

53+
* Various parts of the binding format have been simplified. The format is
54+
better documented now too.
55+
56+
See :ref:`legacy_binding_syntax` for more information.
57+
5358
Libraries / Subsystems
5459
***********************
5560

0 commit comments

Comments
 (0)