1
2/ {
3	testcase-data {
4		overlay-node {
5
6			/* test bus */
7			unittestbus: test-bus {
8				compatible = "simple-bus";
9				#address-cells = <1>;
10				#size-cells = <0>;
11
12				unittest100: test-unittest100 {
13					compatible = "unittest";
14					status = "okay";
15					reg = <100>;
16				};
17
18				unittest101: test-unittest101 {
19					compatible = "unittest";
20					status = "disabled";
21					reg = <101>;
22				};
23
24				unittest0: test-unittest0 {
25					compatible = "unittest";
26					status = "disabled";
27					reg = <0>;
28				};
29
30				unittest1: test-unittest1 {
31					compatible = "unittest";
32					status = "okay";
33					reg = <1>;
34				};
35
36				unittest2: test-unittest2 {
37					compatible = "unittest";
38					status = "disabled";
39					reg = <2>;
40				};
41
42				unittest3: test-unittest3 {
43					compatible = "unittest";
44					status = "okay";
45					reg = <3>;
46				};
47
48				unittest5: test-unittest5 {
49					compatible = "unittest";
50					status = "disabled";
51					reg = <5>;
52				};
53
54				unittest6: test-unittest6 {
55					compatible = "unittest";
56					status = "disabled";
57					reg = <6>;
58				};
59
60				unittest7: test-unittest7 {
61					compatible = "unittest";
62					status = "disabled";
63					reg = <7>;
64				};
65
66				unittest8: test-unittest8 {
67					compatible = "unittest";
68					status = "disabled";
69					reg = <8>;
70				};
71
72				i2c-test-bus {
73					compatible = "unittest-i2c-bus";
74					status = "okay";
75					reg = <50>;
76
77					#address-cells = <1>;
78					#size-cells = <0>;
79
80					test-unittest12 {
81						reg = <8>;
82						compatible = "unittest-i2c-dev";
83						status = "disabled";
84					};
85
86					test-unittest13 {
87						reg = <9>;
88						compatible = "unittest-i2c-dev";
89						status = "okay";
90					};
91
92					test-unittest14 {
93						reg = <10>;
94						compatible = "unittest-i2c-mux";
95						status = "okay";
96
97						#address-cells = <1>;
98						#size-cells = <0>;
99
100						i2c@0 {
101							#address-cells = <1>;
102							#size-cells = <0>;
103							reg = <0>;
104
105							test-mux-dev {
106								reg = <32>;
107								compatible = "unittest-i2c-dev";
108								status = "okay";
109							};
110						};
111					};
112				};
113			};
114		};
115
116		/* test enable using absolute target path */
117		overlay0 {
118			fragment@0 {
119				target-path = "/testcase-data/overlay-node/test-bus/test-unittest0";
120				__overlay__ {
121					status = "okay";
122				};
123			};
124		};
125
126		/* test disable using absolute target path */
127		overlay1 {
128			fragment@0 {
129				target-path = "/testcase-data/overlay-node/test-bus/test-unittest1";
130				__overlay__ {
131					status = "disabled";
132				};
133			};
134		};
135
136		/* test enable using label */
137		overlay2 {
138			fragment@0 {
139				target = <&unittest2>;
140				__overlay__ {
141					status = "okay";
142				};
143			};
144		};
145
146		/* test disable using label */
147		overlay3 {
148			fragment@0 {
149				target = <&unittest3>;
150				__overlay__ {
151					status = "disabled";
152				};
153			};
154		};
155
156		/* test insertion of a full node */
157		overlay4 {
158			fragment@0 {
159				target = <&unittestbus>;
160				__overlay__ {
161
162					/* suppress DTC warning */
163					#address-cells = <1>;
164					#size-cells = <0>;
165
166					test-unittest4 {
167						compatible = "unittest";
168						status = "okay";
169						reg = <4>;
170					};
171				};
172			};
173		};
174
175		/* test overlay apply revert */
176		overlay5 {
177			fragment@0 {
178				target-path = "/testcase-data/overlay-node/test-bus/test-unittest5";
179				__overlay__ {
180					status = "okay";
181				};
182			};
183		};
184
185		/* test overlays application and removal in sequence */
186		overlay6 {
187			fragment@0 {
188				target-path = "/testcase-data/overlay-node/test-bus/test-unittest6";
189				__overlay__ {
190					status = "okay";
191				};
192			};
193		};
194		overlay7 {
195			fragment@0 {
196				target-path = "/testcase-data/overlay-node/test-bus/test-unittest7";
197				__overlay__ {
198					status = "okay";
199				};
200			};
201		};
202
203		/* test overlays application and removal in bad sequence */
204		overlay8 {
205			fragment@0 {
206				target-path = "/testcase-data/overlay-node/test-bus/test-unittest8";
207				__overlay__ {
208					status = "okay";
209				};
210			};
211		};
212		overlay9 {
213			fragment@0 {
214				target-path = "/testcase-data/overlay-node/test-bus/test-unittest8";
215				__overlay__ {
216					property-foo = "bar";
217				};
218			};
219		};
220
221		overlay10 {
222			fragment@0 {
223				target-path = "/testcase-data/overlay-node/test-bus";
224				__overlay__ {
225
226					/* suppress DTC warning */
227					#address-cells = <1>;
228					#size-cells = <0>;
229
230					test-unittest10 {
231						compatible = "unittest";
232						status = "okay";
233						reg = <10>;
234
235						#address-cells = <1>;
236						#size-cells = <0>;
237
238						test-unittest101 {
239							compatible = "unittest";
240							status = "okay";
241							reg = <1>;
242						};
243
244					};
245				};
246			};
247		};
248
249		overlay11 {
250			fragment@0 {
251				target-path = "/testcase-data/overlay-node/test-bus";
252				__overlay__ {
253
254					/* suppress DTC warning */
255					#address-cells = <1>;
256					#size-cells = <0>;
257
258					test-unittest11 {
259						compatible = "unittest";
260						status = "okay";
261						reg = <11>;
262
263						#address-cells = <1>;
264						#size-cells = <0>;
265
266						test-unittest111 {
267							compatible = "unittest";
268							status = "okay";
269							reg = <1>;
270						};
271
272					};
273				};
274			};
275		};
276
277		/* test enable using absolute target path (i2c) */
278		overlay12 {
279			fragment@0 {
280				target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest12";
281				__overlay__ {
282					status = "okay";
283				};
284			};
285		};
286
287		/* test disable using absolute target path (i2c) */
288		overlay13 {
289			fragment@0 {
290				target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest13";
291				__overlay__ {
292					status = "disabled";
293				};
294			};
295		};
296
297		/* test mux overlay */
298		overlay15 {
299			fragment@0 {
300				target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus";
301				__overlay__ {
302					#address-cells = <1>;
303					#size-cells = <0>;
304					test-unittest15 {
305						reg = <11>;
306						compatible = "unittest-i2c-mux";
307						status = "okay";
308
309						#address-cells = <1>;
310						#size-cells = <0>;
311
312						i2c@0 {
313							#address-cells = <1>;
314							#size-cells = <0>;
315							reg = <0>;
316
317							test-mux-dev {
318								reg = <32>;
319								compatible = "unittest-i2c-dev";
320								status = "okay";
321							};
322						};
323					};
324				};
325			};
326		};
327
328	};
329};
330