Skip to content
Back to skills

Devicetree

ASecurity

Devicetree management for Zephyr RTOS. Covers syntax, bindings, overlays, Hardware Model v2 (HWMv2), and advanced node/property deletion patterns. Trigger when defining hardware topology, creating overlays, or mapping pins and peripherals.

  • 63 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 1, 2026
ai-agentsgonode

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 1, 2026

npx -y skills add beriberikix/zephyr-agent-skills --skill devicetree --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Devicetree?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Devicetree
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/beriberikix-devicetree/badge)](https://www.skillsdirectory.com/skills/beriberikix-devicetree)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: devicetree
description: Devicetree management for Zephyr RTOS. Covers syntax, bindings, overlays, Hardware Model v2 (HWMv2), and advanced node/property deletion patterns. Trigger when defining hardware topology, creating overlays, or mapping pins and peripherals.
---

# Zephyr Devicetree

The Devicetree (DT) is the source of truth for your hardware topology in Zephyr.

## Core Workflows

### 1. Understanding Syntax & Nodes
Nodes, properties, and phandles form the hierarchy.
- **Reference**: **[dt_syntax.md](references/dt_syntax.md)**
- **Key Tools**: Labels (`&label`), Properties (`reg`, `status`, `compatible`).

### 2. Working with Bindings
Mapping hardware descriptions to driver schemas.
- **Reference**: **[dt_bindings.md](references/dt_bindings.md)**
- **Key Tools**: YAML bindings, compatible strings, `pinctrl`.

### 3. Application Overlays & HWMv2
Modifying board behavior for specific application needs.
- **Reference**: **[dt_overlays.md](references/dt_overlays.md)**
- **Key Tools**: `.overlay` files, `zephyr,chosen`, variant-specific overlays.

### 4. Advanced Hardware Modification
Deleting and redefining nodes/properties for product variants.
- **Reference**: **[dt_overlays.md](references/dt_overlays.md#advanced-customization-from-golioth)**
- **Key Tools**: `/delete-node/`, `/delete-property/`.

## Quick Start (Overlay)
```dts
/* app.overlay */
&i2c1 {
  status = "okay";
};

&uart0 {
  status = "disabled";
};
```

## Tooling & Validation

- `west build -t rom_report`: See how devicetree definitions impact memory.
- `build/zephyr/zephyr.dts`: Inspect the FINAL resolved devicetree after all overlays are applied.
- `build/zephyr/include/generated/zephyr/devicetree_generated.h`: Inspect generated DT macros consumed by C code.

## Automation Tools
- **[overlay_include_check.py](scripts/overlay_include_check.py)**: Run basic sanity checks on `.overlay` files.

## Examples & Templates
- **[app_overlay_template.overlay](assets/app_overlay_template.overlay)**: Starter overlay with common node status changes.

## Validation Checklist
- [ ] Overlay compiles with no DTS syntax errors during `west build`.
- [ ] Expected node status/properties are present in `build/zephyr/zephyr.dts`.
- [ ] Expected DT macros exist in `build/zephyr/include/generated/zephyr/devicetree_generated.h`.
- [ ] Application runs with peripherals enabled/disabled exactly as described by the overlay.

## Resources

- **[References](references/)**:
  - `dt_syntax.md`: Core syntax and properties.
  - `dt_bindings.md`: Binding definitions and compatible mapping.
  - `dt_overlays.md`: Overlays, HWMv2, and deletion patterns.
- **[Scripts](scripts/)**:
  - `overlay_include_check.py`: Overlay sanity checker.
- **[Assets](assets/)**:
  - `app_overlay_template.overlay`: Baseline overlay template.

Files in this skill

  • SKILL.md2.7 KB
  • assets/app_overlay_template.overlay161 B
  • references/dt_bindings.md1 KB
  • references/dt_overlays.md1.4 KB
  • references/dt_syntax.md1.6 KB
  • scripts/overlay_include_check.py1.4 KB
  • skill-meta.yaml452 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.