xref: /linux/drivers/of/unittest-data/tests-platform.dtsi (revision b4ada0618eed0fbd1b1630f73deb048c592b06a1)
1// SPDX-License-Identifier: GPL-2.0
2
3/ {
4	testcase-data {
5		platform-tests {
6			#address-cells = <1>;
7			#size-cells = <0>;
8
9			test-device@0 {
10				compatible = "test-device";
11				reg = <0x0>;
12
13				#address-cells = <1>;
14				#size-cells = <0>;
15
16				dev@100 {
17					compatible = "test-sub-device";
18					reg = <0x100>;
19				};
20			};
21
22			test-device@1 {
23				compatible = "test-device";
24				reg = <0x1>;
25
26				#address-cells = <1>;
27				#size-cells = <0>;
28
29				dev@100 {
30					compatible = "test-sub-device",
31						     "test-compat2",
32						     "test-compat3";
33					reg = <0x100>;
34				};
35			};
36
37			test-device@2 {
38				compatible = "test,rust-device";
39				reg = <0x2>;
40
41				test,u32-prop = <0xdeadbeef>;
42				test,i16-array = /bits/ 16 <1 2 (-3) (-4)>;
43
44				ref_child_0: child-0 {
45					test,ref-arg = <&ref_child_1 0x20 0x32>;
46				};
47				ref_child_1: child-1 {
48					test,ref-arg = <&ref_child_0 0x10 0x64>;
49				};
50			};
51		};
52
53		platform-tests-2 {
54			// No #address-cells or #size-cells
55			node {
56				#address-cells = <1>;
57				#size-cells = <1>;
58
59				test-device@100 {
60					compatible = "test-sub-device";
61					reg = <0x100 1>;
62				};
63			};
64		};
65	};
66};
67