# Practical Zephyr - Devicetree basics (Part 3) | Interrupt

**URL:** <https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808>\
**Category:** Blog\
**Created:** [February 1, 2024, 3:52pm UTC](https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808 "2024-02-01T15:52:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.memfault.com/discobot/32/1_2.png) [@discobot](https://community.memfault.com/u/discobot)\
**Post date:** [February 1, 2024, 3:52pm UTC](https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808/1 "2024-02-01T15:52:56Z")

</div>

In the [previous article](https://interrupt.memfault.com/blog/practical_zephyr_kconfig), we configured _software_ using the [kernel configuration tool Kconfig](https://docs.zephyrproject.org/latest/build/kconfig/index.html#configuration-system-kconfig), and we’ve silently assumed that there’s a UART interface on our board that is configurable and used for logging.

* * *
This is a companion discussion topic for the original entry at [https://interrupt.memfault.com/blog/practical\_zephyr\_dt](https://interrupt.memfault.com/blog/practical_zephyr_dt)

---

<div class="post-metadata">

**Author:** ![cdwilson](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.memfault.com/cdwilson/32/219_2.png) [@cdwilson](https://community.memfault.com/u/cdwilson)\
**Post date:** [May 24, 2024, 11:48pm UTC](https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808/2 "2024-05-24T23:48:54Z")

</div>

@martin do you know if there any convention or preference for **node names** regarding the use of underscores (`pwm_led_0`) vs. dashes (`pwm-led-0`) as word separators?

The Linux kernel [Devicetree Sources (DTS) Coding Style](https://www.kernel.org/doc/html/next/devicetree/bindings/dts-coding-style.html#naming-and-valid-characters) restricts node names to use dashes only. There also appears to be an [effort to require dashes in property names](https://github.com/zephyrproject-rtos/zephyr/issues/53506), but I haven’t seen a similar proposal for node names in Zephyr. I’m wondering if you know any history as to why Zephyr allows underscores in node names, and whether it is actually preferred in Zephyr to use underscores instead of dashes (I feel like I see underscores used more often than dashes in Zephyr). Is this just a style preference thing, or is there any benefit of using dashes vs. underscores in node names?

---

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.memfault.com/discobot/32/1_2.png) [@discobot](https://community.memfault.com/u/discobot)\
**Post date:** [May 24, 2024, 11:48pm UTC](https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808/3 "2024-05-24T23:48:54Z")

</div>



---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://community.memfault.com/u/martin)\
**Post date:** [May 26, 2024, 12:41pm UTC](https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808/4 "2024-05-26T12:41:33Z")

</div>

I’m not aware of a particular naming convention for DTS in Zephyr. In fact, dashes are used a lot in Zephyr’s devicetree files. You could stick to an underscore-only convention if you wanted to, and it might even make sense since for the devicetree API you need to use the lowercase-and-underscore form anyhow and thus all dashes are transformed into underscores.

---

<div class="post-metadata">

**Author:** ![Strooom](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.memfault.com/strooom/32/297_2.png) [@Strooom](https://community.memfault.com/u/Strooom)\
**Post date:** [February 9, 2026, 3:33pm UTC](https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808/5 "2026-02-09T15:33:43Z")

</div>

small remark/update : in recent zephyr releases (using 4.3.99) the file `devicetree_generated.h` is found in `build/zephyr/include/generated/zephyr/devicetree_generated.h`

---

<div class="post-metadata">

**Author:** ![Strooom](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.memfault.com/strooom/32/297_2.png) [@Strooom](https://community.memfault.com/u/Strooom)\
**Post date:** [February 9, 2026, 7:26pm UTC](https://community.memfault.com/t/practical-zephyr-devicetree-basics-part-3-interrupt/808/6 "2026-02-09T19:26:36Z")

</div>

Small typo (i think)

> Just like _Kconfig_, in your future Zephyr projects, _Kconfig_ will become especially important once you’re starting to build your own device drivers. With this article, I hope I can give you an easy start and I hope to see you in the next article about Devicetree _bindings_!

should be

Just like _Kconfig_, in your future Zephyr projects, **devicetree** will become especially important once you’re starting to build your own device drivers. With this article, I hope I can give you an easy start and I hope to see you in the next article about Devicetree _bindings_!
