dtfmt is a Devicetree Source formatter. It uses tree-sitter-devicetree as a parser. The default style is based on the Linux kernel style guide.
Format all Devictree Source files (in-place) under a directory:
dtfmt -i $(find /path/to/dts/files -iregex ".+\.dts[io]?$")
cargo install dtfmt
cargo build --release
Copyright (C) 2026 Waqar Hameed and the dtfmt contributors.