Configuring devicetree

nRF Connect for VS Code is the recommended tool for editing Hardware-related configuration. The extension offers several layers of Devicetree integration, ranging from summarizing devicetree settings in a menu and providing devicetree language support in the editor, to the Devicetree Visual Editor, a GUI tool for editing devicetree files. Follow the steps in How to create devicetree files and use one of the following options to edit the .dts, .dtsi, and .overlay files:

Like Kconfig fragment files, devicetree files can also be provided as overlays. The devicetree overlay files use the normalized board target name and the file extension .overlay (for example, nrf54h20dk/nrf54h20/cpuapp becomes nrf54h20dk_nrf54h20_cpuapp.overlay). When they are placed in the boards folder and the devicetree overlay file name matches the board target (after normalization), the build system automatically selects and applies the overlay. To select them manually, see Providing CMake options.

The following guides provide information about configuring specific aspects of hardware support related to devicetree. Read them together with Zephyr’s Hardware Support and Devicetree Guide guides, and the official Devicetree Specification. In particular, Set devicetree overlays explains how the base devicetree files are selected.

Note

If you want to go through dedicated training related to some of the topics covered here, enroll in the courses in the Nordic Developer Academy. For example, nRF Connect SDK Fundamentals course describes devicetree in Lesson 2.