summaryrefslogtreecommitdiffstats
path: root/drivers/of/unittest-data/tests-address.dtsi
blob: 3344f15c3755cdc9aaa014b8c98359e50765d9fd (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// SPDX-License-Identifier: GPL-2.0

/ {
	#address-cells = <1>;
	#size-cells = <1>;

	testcase-data {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		address-tests {
			#address-cells = <1>;
			#size-cells = <1>;
			/* ranges here is to make sure we don't use it for
			 * dma-ranges translation */
			ranges = <0x70000000 0x70000000 0x50000000>,
				 <0x00000000 0xd0000000 0x20000000>;
			dma-ranges = <0x0 0x20000000 0x40000000>;

			device@70000000 {
				reg = <0x70000000 0x1000>;
			};

			bus@80000000 {
				#address-cells = <2>;
				#size-cells = <2>;
				ranges = <0x0 0x0 0x80000000 0x0 0x100000>;
				dma-ranges = <0x1 0x0 0x0 0x20 0x0>;

				device@1000 {
					reg = <0x0 0x1000 0x0 0x1000>;
				};
			};

			pci@90000000 {
				device_type = "pci";
				#address-cells = <3>;
				#size-cells = <2>;
				reg = <0x90000000 0x1000>;
				ranges = <0x42000000 0x0 0x40000000 0x40000000 0x0 0x10000000>;
				dma-ranges = <0x42000000 0x0 0x80000000 0x00000000 0x0 0x10000000>,
					     <0x42000000 0x0 0xc0000000 0x20000000 0x0 0x10000000>;
			};

			bus@a0000000 {
				#address-cells = <3>;
				#size-cells = <2>;
				ranges = <0xf00baa 0x0 0x0 0xa0000000 0x0 0x100000>,
					 <0xf00bee 0x1 0x0 0xb0000000 0x0 0x200000>;
			};

		};

		address-tests2 {
			#address-cells = <2>;
			#size-cells = <1>;

			ranges = <0x10000000 0x01000000 0xa0000000 0x01000000>,
				 <0x10000000 0x02000000 0xb0000000 0x01000000>,
				 <0x20000000 0x01000000 0xc0000000 0x01000000>,
				 <0x20000000 0x02000000 0xd0000000 0x01000000>,
				 <0x00000000 0xd1000000 0xd1000000 0x01000000>,
				 <0x00000000 0xe8000000 0xe8000000 0x07f00000>,
				 <0x00000000 0xefff0000 0xefff0000 0x00010000>;

			bus-2cell@10000000 {
				#address-cells = <2>;
				#size-cells = <1>;
				ranges = <0x100000 0x10000 0x10000000 0x1a00000 0x10000>,
					 <0x100000 0x20000 0x10000000 0x1b00000 0x10000>,
					 <0x200000 0x10000 0x20000000 0x1c00000 0x10000>,
					 <0x200000 0x20000 0x20000000 0x2d00000 0x10000>;

				device@100000 {
					reg = <0x100000 0x11000 0x100>,
					      <0x100000 0x12000 0x100>,
					      <0x200000 0x11000 0x100>,
					      <0x200000 0x21000 0x100>;
				};
			};

			bus-3cell@20000000 {
				#address-cells = <3>;
				#size-cells = <1>;
				ranges = <0x1 0x100000 0x10000 0x10000000 0x1a00000 0x10000>,
					 <0x2 0x100000 0x10000 0x10000000 0x1b00000 0x10000>,
					 <0x3 0x200000 0x10000 0x20000000 0x1c00000 0x10000>,
					 <0x4 0x200000 0x20000 0x20000000 0x2d00000 0x10000>;

				local-bus@100000 {
					#address-cells = <1>;
					#size-cells = <1>;
					ranges = <0xf1000000 0x1 0x100000 0x10000 0x10000>,
						 <0xf2000000 0x2 0x100000 0x10000 0x10000>,
						 <0xf3000000 0x3 0x200000 0x10000 0x08000>,
						 <0xf3800000 0x3 0x200000 0x18000 0x08000>,
						 <0xf4000000 0x4 0x200000 0x20000 0x10000>;

					device@f1001000 {
						reg = <0xf1001000 0x100>,
						      <0xf2002000 0x100>,
						      <0xf3001000 0x100>,
						      <0xf3801000 0x100>,
						      <0xf4001000 0x100>;
					};
				};
			};

			pcie@d1070000 {
				#address-cells = <0x03>;
				#size-cells = <0x02>;
				bus-range = <0x00 0xff>;
				device_type = "pci";
				ranges = <0x82000000 0 0xe8000000 0 0xe8000000 0 0x7f00000>,
					 <0x81000000 0 0x00000000 0 0xefff0000 0 0x0010000>;
				reg = <0x00000000 0xd1070000 0x20000>;

				pci@0,0 {
					#address-cells = <0x03>;
					#size-cells = <0x02>;
					bus-range = <0x01 0x01>;
					device_type = "pci";
					ranges = <0x82000000 0 0xe8000000
						  0x82000000 0 0xe8000000
						  0 0x4400000>;
					reg = <0x00 0x00 0x00 0x00 0x00>;

					dev@0,0 {
						#address-cells = <0x03>;
						#size-cells = <0x02>;
						ranges = <0 0 0 0x82010000 0 0xe8000000 0 0x2000000>,
							 <1 0 0 0x82010000 0 0xea000000 0 0x1000000>,
							 <2 0 0 0x82010000 0 0xeb000000 0 0x0800000>,
							 <3 0 0 0x82010000 0 0xeb800000 0 0x0800000>,
							 <4 0 0 0x82010000 0 0xec000000 0 0x0020000>,
							 <5 0 0 0x82010000 0 0xec020000 0 0x0002000>;
						reg = <0x10000 0x00 0x00 0x00 0x00>;

						local-bus@0 {
							#address-cells = <0x01>;
							#size-cells = <0x01>;
							ranges = <0xa0000000 0 0 0 0x2000000>,
								 <0xb0000000 1 0 0 0x1000000>;

							dev@e0000000 {
								reg = <0xa0001000 0x1000>,
								      <0xb0002000 0x2000>;
							};
						};
					};
				};
			};
		};
	};
};