/device-tree
Device tree skill for Linux hardware description. Use when writing DTS/DTSI, bindings, overlays, phandles, or debugging OF platform probe failures. Activates on queries about device tree, DTS syntax, phandle, devicetree bindings, DT overlay, or OF graph.
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill device-tree --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/device-tree
Context preview
The summary Claude sees to decide when to auto-load this skill.
Device tree skill for Linux hardware description. Use when writing DTS/DTSI, bindings, overlays, phandles, or debugging OF platform probe failures. Activates on queries about device tree, DTS syntax, phandle, devicetree bindings, DT overlay, or OF graph.
SKILL.md
device-tree.SKILL.mdname: device-tree
description: Device tree skill for Linux hardware description. Use when writing DTS/DTSI, bindings, overlays, phandles, or debugging OF platform probe failures. Activates on queries about device tree, DTS syntax, phandle, devicetree bindings, DT overlay, or OF graph.
Device Tree (Devicetree)
Purpose
Guide agents through Linux device tree source (DTS): syntax, bindings, phandles, overlays, and how the kernel OF (Open Firmware) layer parses hardware description into `platform_device` instances.
When to Use
- Platform driver not probing — DT mismatch
- Adding a new board `.dts` or fragment overlay
- Understanding `compatible`, `reg`, `interrupts`, `clocks` properties
- Cross-checking hardware with `skills/kernel-dev/platform-device-model`
Workflow
1. DTS structure
/dts-v1/;
#include "soc.dtsi"
/ {
model = "My Board";
compatible = "vendor,my-board", "vendor,soc-family";
soc {
uart0: serial@40011000 {
compatible = "vendor,uart";
reg = <0x40011000 0x400>;
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_uart0>;
status = "okay";
};
};
};2. Key properties
| Property | Meaning | |----------|---------| | `compatible` | Driver match string (most specific first) | | `reg` | MMIO address + length ( `#address-cells`, `#size-cells` ) | | `interrupts` | IRQ specifier (interrupt parent defines cells) | | `clocks` / `clock-names` | phandle to clock provider | | `status` | `"disabled"` skips probe |
3. Phandles
clk_uart0: clock-uart {
compatible = "vendor,clk";
#clock-cells = <0>;
};
serial@... {
clocks = <&clk_uart0>; /* phandle reference */
};4. Kernel parsing
OF core reads DTB at boot
├── of_platform_populate() creates platform_devices
└── driver `.of_match_table` matches `compatible`
static const struct of_device_id my_of_match[] = {
{ .compatible = "vendor,uart" },
{ }
};
MODULE_DEVICE_TABLE(of, my_of_match);5. Compile and inspect
dtc -I dts -O dtb -o board.dtb board.dts
dtc -I fs -O dts /proc/device-tree 2>/dev/null | less
ls /sys/firmware/devicetree/base/
Bindings live at [devicetree.org](https://www.devicetree.org/) — always cite binding name in commits.
6. Overlays (configfs)
# Runtime overlay apply (when CONFIG_OF_OVERLAY)
mkdir -p /config/device-tree/overlays/my-overlay
cat my-overlay.dtbo > /config/device-tree/overlays/my-overlay/dtbo
7. Agent usage
/device-tree Write DTS fragment for I2C sensor on i2c1 with interrupt on GPIO5
Common Problems
| Symptom | Cause | Fix | |---------|-------|-----| | Driver not bound | `compatible` typo | Match driver's `of_match_table` | | Wrong MMIO | `#address-cells` mismatch | Follow SoC `.dtsi` | | IRQ not firing | Wrong interrupt parent/cells | Copy from working board DTS | | Probe defer loop | Clock/regulator missing | `-EPROBE_DEFER` supplier in DT | | Overlay fails | Symbol unresolved | `__fixups__` / label exports |
Related Skills
- `skills/kernel-dev/platform-device-model` — probe and sysfs
- `skills/kernel/device-drivers` — `devm_of_iomap`
- `skills/baremetal/datasheet-and-refmanual-reading` — HW to DT mapping
- `skills/embedded/zephyr` — Zephyr devicetree (different tooling)
- `skills/kernel-dev/bus-drivers-i2c-spi` — bus node children
Read more
name: device-tree description: Device tree skill for Linux hardware description. Use when writing DTS/DTSI, bindings, overlays, phandles, or debugging OF platform probe failures. Activates on queries about device tree, DTS syntax, phandle, devicetree bindings, DT overlay, or OF graph.
Device Tree (Devicetree)
Purpose
Guide agents through Linux device tree source (DTS): syntax, bindings, phandles, overlays, and how the kernel OF (Open Firmware) layer parses hardware description into `platform_device` instances.
When to Use
- Platform driver not probing — DT mismatch
- Adding a new board `.dts` or fragment overlay
- Understanding `compatible`, `reg`, `interrupts`, `clocks` properties
- Cross-checking hardware with `skills/kernel-dev/platform-device-model`
Workflow
1. DTS structure
/dts-v1/;
#include "soc.dtsi"
/ {
model = "My Board";
compatible = "vendor,my-board", "vendor,soc-family";
soc {
uart0: serial@40011000 {
compatible = "vendor,uart";
reg = <0x40011000 0x400>;
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk_uart0>;
status = "okay";
};
};
};2. Key properties
| Property | Meaning | |----------|---------| | `compatible` | Driver match string (most specific first) | | `reg` | MMIO address + length ( `#address-cells`, `#size-cells` ) | | `interrupts` | IRQ specifier (interrupt parent defines cells) | | `clocks` / `clock-names` | phandle to clock provider | | `status` | `"disabled"` skips probe |
3. Phandles
clk_uart0: clock-uart {
compatible = "vendor,clk";
#clock-cells = <0>;
};
serial@... {
clocks = <&clk_uart0>; /* phandle reference */
};4. Kernel parsing
OF core reads DTB at boot ├── of_platform_populate() creates platform_devices └── driver `.of_match_table` matches `compatible`
static const struct of_device_id my_of_match[] = {
{ .compatible = "vendor,uart" },
{ }
};
MODULE_DEVICE_TABLE(of, my_of_match);5. Compile and inspect
dtc -I dts -O dtb -o board.dtb board.dts dtc -I fs -O dts /proc/device-tree 2>/dev/null | less ls /sys/firmware/devicetree/base/
Bindings live at [devicetree.org](https://www.devicetree.org/) — always cite binding name in commits.
6. Overlays (configfs)
# Runtime overlay apply (when CONFIG_OF_OVERLAY) mkdir -p /config/device-tree/overlays/my-overlay cat my-overlay.dtbo > /config/device-tree/overlays/my-overlay/dtbo
7. Agent usage
/device-tree Write DTS fragment for I2C sensor on i2c1 with interrupt on GPIO5
Common Problems
| Symptom | Cause | Fix | |---------|-------|-----| | Driver not bound | `compatible` typo | Match driver's `of_match_table` | | Wrong MMIO | `#address-cells` mismatch | Follow SoC `.dtsi` | | IRQ not firing | Wrong interrupt parent/cells | Copy from working board DTS | | Probe defer loop | Clock/regulator missing | `-EPROBE_DEFER` supplier in DT | | Overlay fails | Symbol unresolved | `__fixups__` / label exports |
Related Skills
- `skills/kernel-dev/platform-device-model` — probe and sysfs
- `skills/kernel/device-drivers` — `devm_of_iomap`
- `skills/baremetal/datasheet-and-refmanual-reading` — HW to DT mapping
- `skills/embedded/zephyr` — Zephyr devicetree (different tooling)
- `skills/kernel-dev/bus-drivers-i2c-spi` — bus node children
A curated suite of AI agent skills for systems and low-level programming — C/C++, Rust, Zig, GPU, bare-metal firmware, Linux kernel/driver development, computer architecture, compiler internals, HPC, and more.
Repo: mohitmishra786/low-level-dev-skills
Other skills on low-level-dev-skills.
- /custom-allocators
Custom allocator skill for memory allocation strategies. Use when implementing pool/slab/arena allocators, tuning jemalloc/mimalloc, writing Rust GlobalAlloc, or benchmarking allocator performance. Activates on queries about jemalloc, mimalloc, tcmalloc, arena allocator,
Open skill - /numa-programming
NUMA programming skill for multi-socket memory locality. Use when detecting NUMA topology, binding processes with numactl, using libnuma API, building NUMA-aware data structures, or measuring remote access penalties. Activates on queries about numactl, libnuma, NUMA topology,
Open skill - /af-xdp
AF_XDP skill for high-performance XDP sockets. Use when creating AF_XDP sockets, configuring UMEM and XSK rings, XDP_REDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AF_XDP, xsk_umem, XDP_REDIRECT, libbpf xsk, or zero-copy XDP.
Open skill - /dpdk
DPDK skill for userspace packet I/O. Use when initializing EAL, configuring PMD drivers, using mbuf pools and rte_ring, setting up huge pages, RSS, or testpmd validation. Activates on queries about DPDK, EAL, rte_eth_rx_burst, hugepages, PMD, or testpmd.
Open skill - /io-uring
io_uring skill for Linux async I/O. Use when building high-performance servers with liburing, multi-shot operations, provided buffers, fixed files, zero-copy send, or tokio-uring. Activates on queries about io_uring, SQE/CQE, liburing, IORING_OP_PROVIDE_BUFFERS, or io_uring vs
Open skill - /adc-dac-baremetal
Bare-metal ADC and DAC skill. Use when configuring analog sampling, DMA-driven ADC, calibration, or DAC output on MCUs. Activates on queries about ADC bare-metal, sampling time, DMA ADC, or DAC channel setup.
Open skill

