gen_defines: infer bindings for /zephyr,user
Tell the EDT instance that properties of the /zephyr,user node should
be generated based on the binding types inferred from the property
content.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
diff --git a/scripts/dts/gen_defines.py b/scripts/dts/gen_defines.py
index be725e4..3bf91f3 100755
--- a/scripts/dts/gen_defines.py
+++ b/scripts/dts/gen_defines.py
@@ -39,7 +39,8 @@
# Suppress this warning if it's suppressed in dtc
warn_reg_unit_address_mismatch=
"-Wno-simple_bus_reg" not in args.dtc_flags,
- default_prop_types=True)
+ default_prop_types=True,
+ infer_binding_for_paths=["/zephyr,user"])
except edtlib.EDTError as e:
sys.exit(f"devicetree error: {e}")
@@ -178,10 +179,16 @@
"""
if node.matching_compat:
- s += f"""
+ if node.binding_path:
+ s += f"""
Binding (compatible = {node.matching_compat}):
{relativize(node.binding_path)}
"""
+ else:
+ s += f"""
+Binding (compatible = {node.matching_compat}):
+ No yaml (bindings inferred from properties)
+"""
s += f"\nDependency Ordinal: {node.dep_ordinal}\n"