aboutsummaryrefslogtreecommitdiffstats
path: root/dtc/tests/path-references.dts
diff options
context:
space:
mode:
Diffstat (limited to 'dtc/tests/path-references.dts')
-rw-r--r--dtc/tests/path-references.dts28
1 files changed, 28 insertions, 0 deletions
diff --git a/dtc/tests/path-references.dts b/dtc/tests/path-references.dts
new file mode 100644
index 000000000..1fb7d7045
--- /dev/null
+++ b/dtc/tests/path-references.dts
@@ -0,0 +1,28 @@
+/dts-v1/;
+
+/ {
+ rref = &{/};
+ /* Check multiple references case */
+ multiref = &n1 , &n2;
+ n1: node1 {
+ ref = &{/node2}; /* reference precedes target */
+ lref = &n2;
+ };
+ n2: node2 {
+ ref = &{/node1}; /* reference after target */
+ lref = &n1;
+ };
+ /* Check references to nested nodes with common prefix */
+ foobar {
+ n3: baz {
+ ref = &{/foo/baz};
+ lref = start: &n4 end:;
+ };
+ };
+ foo {
+ n4: baz {
+ ref = &{/foobar/baz};
+ lref = &n3;
+ };
+ };
+};