xref: /linux/drivers/of/unittest-data/tests-platform.dtsi (revision 2fbe82037ab2513275b9d97fe4fd9947df26e960)
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		};
45
46		platform-tests-2 {
47			// No #address-cells or #size-cells
48			node {
49				#address-cells = <1>;
50				#size-cells = <1>;
51
52				test-device@100 {
53					compatible = "test-sub-device";
54					reg = <0x100 1>;
55				};
56			};
57		};
58	};
59};
60