forked from apache/nuttx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: liaoao <[email protected]>
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
==================== | ||
Device Tree | ||
==================== | ||
|
||
Overview | ||
-------- | ||
|
||
Currently, NuttX supports parsing of FDT(Flattened Device Tree) using libfdt, a | ||
utility library for reading and manipulating the binary format: | ||
|
||
https://github.com/dgibson/dtc/ | ||
|
||
Based on that, NuttX has implemented some common functions to get properties. | ||
Device Tree support in NuttX will reduce the configuration of chips/boards, | ||
it is not used in NuttX kernel framework yet. | ||
|
||
How to use | ||
----------- | ||
|
||
1. Enable Device Tree and libfdt | ||
|
||
Enable the Kconfig settings: | ||
|
||
.. code-block:: console | ||
CONFIG_DEVICE_TREE=y /* Enable Device Tree */ | ||
CONFIG_LIBFDT=y /* Enable utility library */ | ||
2. Register the DTB address | ||
|
||
Use fdt_register to set the DTB Address in NuttX | ||
|
||
3. Parse the DTB | ||
|
||
Chip/board will use fdt_get to get the DTB Address, and then use fdt_* APIs to | ||
parse the DTB properties. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,4 @@ Guides | |
stackrecord.rst | ||
etcromfs.rst | ||
thread_local_storage.rst | ||
devicetree.rst |