summaryrefslogtreecommitdiffstats
path: root/drivers/of/unittest-data/tests-phandle.dtsi
blob: 554a996b2ef18e46074ed0d30228b766a47914b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// SPDX-License-Identifier: GPL-2.0

/ {
	aliases {
		testcase-alias = &testcase;
	};

	testcase: testcase-data {
		security-password = "password";
		duplicate-name = "duplicate";

		duplicate-name { };

		phandle-tests {
			provider0: provider0 {
				#phandle-cells = <0>;
			};

			provider1: provider1 {
				#phandle-cells = <1>;
			};

			provider2: provider2 {
				#phandle-cells = <2>;
			};

			provider3: provider3 {
				#phandle-cells = <3>;
			};

			provider4: provider4 {
				#phandle-cells = <2>;
				phandle-map = <0 1 &provider1 3>,
					      <4 0 &provider0>,
					      <16 5 &provider3 3 5 0>,
					      <200 8 &provider2 23 6>,
					      <19 0 &provider2 15 0>,
					      <2 3 &provider3 2 5 3>;
				phandle-map-mask = <0xff 0xf>;
				phandle-map-pass-thru = <0x0 0xf0>;
			};

			provider5: provider5 {
				#phandle-cells = <2>;
				phandle-map = <2 7 &provider4 2 3>;
				phandle-map-mask = <0xff 0xf>;
				phandle-map-pass-thru = <0x0 0xf0>;
			};

			consumer-a {
				phandle-list =	<&provider1 1>,
						<&provider2 2 0>,
						<0>,
						<&provider3 4 4 3>,
						<&provider2 5 100>,
						<&provider0>,
						<&provider1 7>;
				phandle-list-names = "first", "second", "third";

				phandle-list-bad-phandle = <12345678 0 0>;
				phandle-list-bad-args = <&provider2 1 0>,
							<&provider3 0>;
				empty-property;
				string-property = "foobar";
				unterminated-string = [40 41 42 43];
				unterminated-string-list = "first", "second", [40 41 42 43];
			};

			consumer-b {
				phandle-list =	<&provider1 1>,
						<&provider4 2 3>,
						<0>,
						<&provider4 4 0x100>,
						<&provider4 0 0x61>,
						<&provider0>,
						<&provider4 19 0x20>,
						<&provider5 2 7>;
				phandle-list-bad-phandle = <12345678 0 0>;
				phandle-list-bad-args = <&provider2 1 0>,
							<&provider4 0>;
			};
		};
	};
};