xref: /linux/drivers/of/unittest-data/tests-phandle.dtsi (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1// SPDX-License-Identifier: GPL-2.0
2
3/ {
4	aliases {
5		testcase-alias = &testcase;
6	};
7
8	testcase: testcase-data {
9		security-password = "password";
10		duplicate-name = "duplicate";
11
12		duplicate-name { };
13
14		phandle-tests {
15			provider0: provider0 {
16				#phandle-cells = <0>;
17			};
18
19			provider1: provider1 {
20				#phandle-cells = <1>;
21			};
22
23			provider2: provider2 {
24				#phandle-cells = <2>;
25			};
26
27			provider3: provider3 {
28				#phandle-cells = <3>;
29			};
30
31			provider4: provider4 {
32				#phandle-cells = <2>;
33				phandle-map = <0 1 &provider1 3>,
34					      <4 0 &provider0>,
35					      <16 5 &provider3 3 5 0>,
36					      <200 8 &provider2 23 6>,
37					      <19 0 &provider2 15 0>,
38					      <2 3 &provider3 2 5 3>;
39				phandle-map-mask = <0xff 0xf>;
40				phandle-map-pass-thru = <0x0 0xf0>;
41			};
42
43			provider5: provider5 {
44				#phandle-cells = <2>;
45				phandle-map = <2 7 &provider4 2 3>;
46				phandle-map-mask = <0xff 0xf>;
47				phandle-map-pass-thru = <0x0 0xf0>;
48			};
49
50			consumer-a {
51				phandle-list =	<&provider1 1>,
52						<&provider2 2 0>,
53						<0>,
54						<&provider3 4 4 3>,
55						<&provider2 5 100>,
56						<&provider0>,
57						<&provider1 7>;
58				phandle-list-names = "first", "second", "third";
59
60				phandle-list-bad-phandle = <12345678 0 0>;
61				phandle-list-bad-args = <&provider2 1 0>,
62							<&provider3 0>;
63				empty-property;
64				string-property = "foobar";
65				unterminated-string = [40 41 42 43];
66				unterminated-string-list = "first", "second", [40 41 42 43];
67			};
68
69			consumer-b {
70				phandle-list =	<&provider1 1>,
71						<&provider4 2 3>,
72						<0>,
73						<&provider4 4 0x100>,
74						<&provider4 0 0x61>,
75						<&provider0>,
76						<&provider4 19 0x20>,
77						<&provider5 2 7>;
78				phandle-list-bad-phandle = <12345678 0 0>;
79				phandle-list-bad-args = <&provider2 1 0>,
80							<&provider4 0>;
81			};
82		};
83	};
84};
85