From bd111ccd4b4932ea94ba7c66007840cb88e3b4a7 Mon Sep 17 00:00:00 2001 From: Vdragon Date: Thu, 20 Nov 2025 21:01:20 +0100 Subject: [PATCH] zephyr: Allow a custom dts. Allows using custom DTS things such as bindings. Signed-off-by: Vdragon --- ports/zephyr/CMakeLists.txt | 2 ++ ports/zephyr/dts/bindings/vendor-prefixes.txt | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 ports/zephyr/dts/bindings/vendor-prefixes.txt diff --git a/ports/zephyr/CMakeLists.txt b/ports/zephyr/CMakeLists.txt index 9db0a95c66..cf35ba73da 100644 --- a/ports/zephyr/CMakeLists.txt +++ b/ports/zephyr/CMakeLists.txt @@ -35,6 +35,8 @@ string(TOUPPER ZEPHYR_${BOARD} MICROPY_BOARD) include(${MICROPY_DIR}/py/py.cmake) include(${MICROPY_DIR}/extmod/extmod.cmake) +list(APPEND DTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/dts) + if (CONFIG_MICROPY_FROZEN_MODULES) cmake_path(ABSOLUTE_PATH CONFIG_MICROPY_FROZEN_MANIFEST BASE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) set(MICROPY_FROZEN_MANIFEST ${CONFIG_MICROPY_FROZEN_MANIFEST}) diff --git a/ports/zephyr/dts/bindings/vendor-prefixes.txt b/ports/zephyr/dts/bindings/vendor-prefixes.txt new file mode 100644 index 0000000000..f2dc741d99 --- /dev/null +++ b/ports/zephyr/dts/bindings/vendor-prefixes.txt @@ -0,0 +1,15 @@ +# Device tree binding vendor prefix registry. Keep this list in +# alphabetical order. +# +# This isn't an exhaustive list, but you should add new prefixes to it +# before using them to avoid name-space collisions. +# +# The contents of this file are parsed during documentation generation. +# Anything that starts with a '#' is treated as a comment and ignored. +# Non-empty lines should be in this format: +# +# + +# zephyr-keep-sorted-start +micropython MicroPython Project +# zephyr-keep-sorted-stop