forked from Xilinx/qemu-devicetrees
-
Notifications
You must be signed in to change notification settings - Fork 0
/
versal-pmc-npi.dtsi
263 lines (239 loc) · 7.84 KB
/
versal-pmc-npi.dtsi
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
/*
* Versal PMC NPI
*
* Copyright (c) 2016, Xilinx Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "versal.dtsh"
#define GEN_NMU(N) \
npi_noc_nmu_ ## N: npi_noc_nmu_## N@MM_NPI_NOC_NMU_ ## N { \
doc-ignore = <1>; \
doc-status = "partial"; \
doc-comments = "A stub including minimal setup."; \
compatible = "xlnx,noc-nmu"; \
reg = <0x0 MM_NPI_NOC_NMU_ ## N 0x0 MM_NPI_NOC_NMU_ ## N ## _SIZE 0x0>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
};
#define GEN_NSU(N) \
npi_noc_nsu_ ## N: npi_noc_nsu_## N@MM_NPI_NOC_NSU_ ## N { \
doc-ignore = <1>; \
doc-status = "partial"; \
doc-comments = "A stub including minimal setup."; \
compatible = "xlnx,noc-nsu"; \
reg = <0x0 MM_NPI_NOC_NSU_ ## N 0x0 MM_NPI_NOC_NSU_ ## N ## _SIZE 0x0>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
};
#define GEN_NPS(N) \
npi_noc_nps_ ## N: npi_noc_nps_## N@MM_NPI_NOC_NPS_ ## N { \
doc-ignore = <1>; \
doc-status = "partial"; \
doc-comments = "A stub including minimal setup."; \
compatible = "xlnx,noc-nps"; \
reg = <0x0 MM_NPI_NOC_NPS_ ## N 0x0 MM_NPI_NOC_NPS_ ## N ## _SIZE 0x0>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
};
#define GEN_DDRMC_UB(N) \
npi_ddrmc_ub ## N: npi_ddrmc_ub ## N@MM_NPI_DDRMC_UB_ ## N { \
doc-limitations = "Only the uB rst is supported"; \
compatible = "xlnx,versal-ddrmc-ub"; \
reg = <0x0 MM_NPI_DDRMC_UB_ ## N 0x0 \
MM_NPI_DDRMC_UB_ ## N ## _SIZE 0x0>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
#gpio-cells = <1>; \
gpio-controller; \
}
#define GEN_DDRMC_MAIN(N) \
npi_ddrmc_main ## N: npi_ddrmc_main ## N@MM_NPI_DDRMC_MAIN_ ## N { \
doc-limitations = "Just a stub"; \
compatible = "xlnx,versal-ddrmc-main"; \
reg = <0x0 MM_NPI_DDRMC_MAIN_ ## N 0x0 \
MM_NPI_DDRMC_MAIN_ ## N ## _SIZE 0x0>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
}
/* NOC overlaps with UB regs, for the moment we map NOC as lower prio. */
#define GEN_DDRMC_NOC(N) \
npi_ddrmc_noc ## N: npi_ddrmc_noc ## N@MM_NPI_DDRMC_NOC_ ## N { \
doc-limitations = "Just a stub"; \
compatible = "xlnx,versal-ddrmc-noc"; \
reg = <0x0 MM_NPI_DDRMC_NOC_ ## N 0x0 \
MM_NPI_DDRMC_NOC_ ## N ## _SIZE 0xffffffff>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
}
/*
* On hardware, DDRMC_XMPU is contained inside DDRMC_NOC so
* give it higher priority
*/
#define GEN_DDRMC_XMPU(N, addr) \
npi_ddrmc_xmpu ## N: npi_ddrmc_xmpu ## N@addr { \
compatible = "xlnx,versal-ddrmc-xmpu"; \
reg-extended = < \
&amba_pmc_pl 0x0 addr 0x0 0x10000 0x1 \
&amba 0x0 0x0 0x0 0x80000000 0x0 \
>; \
protected-mr = <&ddr>; \
mr-0 = <&amba>; \
protected-base = <0x0>; \
}
#define GEN_GTY_NPI(N) \
npi_gty ## N: npi_gty ## N@MM_NPI_GTY_NPI_SLAVE_ ## N { \
doc-limitations = "Just a stub"; \
compatible = "xlnx,versal-gty-npi"; \
reg = <0x0 MM_NPI_GTY_NPI_SLAVE_ ## N 0x0 \
MM_NPI_GTY_NPI_SLAVE_ ## N ## _SIZE 0xffffffff>;\
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
}
#define GEN_XPIO_DCI(N) \
npi_xpio ## N: npi_xpio ## N@MM_NPI_XPIO_DCI_COMPONENT_ ## N { \
doc-limitations = "Just a stub"; \
compatible = "xlnx,versal-xpio-dci"; \
reg = <0x0 MM_NPI_XPIO_DCI_COMPONENT_ ## N 0x0 \
MM_NPI_XPIO_DCI_COMPONENT_ ## N ## _SIZE 0xffffffff>;\
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
}
#define GEN_CMT_XPLL(N) \
npi_cmt_xpll ## N: npi_cmt_xpll ## N@MM_NPI_CMT_XPLL_ ## N {\
doc-limitations = "Just a stub"; \
compatible = "xlnx,versal-cmt-xpll"; \
reg = <0x0 MM_NPI_CMT_XPLL_ ## N 0x0 \
MM_NPI_CMT_XPLL_ ## N ## _SIZE 0xffffffff>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
}
#define GEN_CMT_DPLL(N) \
npi_cmt_dpll ## N: npi_cmt_dpll ## N@MM_NPI_CMT_DPLL_ ## N {\
doc-limitations = "Just a stub"; \
compatible = "xlnx,versal-cmt-dpll"; \
reg = <0x0 MM_NPI_CMT_DPLL_ ## N 0x0 \
MM_NPI_CMT_DPLL_ ## N ## _SIZE 0xffffffff>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
}
#define GEN_CMT_MMCM(N) \
npi_cmt_mmcm ## N: npi_cmt_mmcm ## N@MM_NPI_CMT_MMCM_ ## N {\
doc-limitations = "Just a stub"; \
compatible = "xlnx,versal-cmt-mmcm"; \
reg = <0x0 MM_NPI_CMT_MMCM_ ## N 0x0 \
MM_NPI_CMT_MMCM_ ## N ## _SIZE 0xffffffff>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >; \
}
#define GEN_NOC_NCRB(N) \
noc_ncrb ## N: noc_ncrb ## N@MM_NPI_NOC_NCRB_ ## N {\
doc-limitations = "just a stub"; \
compatible = "xlnx,noc_ncrb"; \
reg = <0x0 MM_NPI_NOC_NCRB_ ## N 0x0 \
MM_NPI_NOC_NCRB_ ## N ## _SIZE 0xffffffff>; \
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI>; \
}
&amba_pmc_pl {
#include "versal-pmc-npi-nxx.dtsi"
npi_me: npi_me@MM_NPI_ME_NPI_0 {
compatible = "xlnx,me-npi";
reg = <0x0 MM_NPI_ME_NPI_0 0x0 MM_NPI_ME_NPI_0_SIZE 0x0>;
reset-gpios = <&pmc_clk_rst CRP_RST_NONPS_NPI >;
};
/* DDRMC NPI registers. */
GEN_DDRMC_UB(0);
GEN_DDRMC_UB(1);
GEN_DDRMC_UB(2);
GEN_DDRMC_UB(3);
GEN_DDRMC_MAIN(0);
GEN_DDRMC_MAIN(1);
GEN_DDRMC_MAIN(2);
GEN_DDRMC_MAIN(3);
GEN_DDRMC_NOC(0);
GEN_DDRMC_NOC(1);
GEN_DDRMC_NOC(2);
GEN_DDRMC_NOC(3);
GEN_DDRMC_XMPU(0, 0xf6080000);
GEN_GTY_NPI(0);
GEN_GTY_NPI(1);
GEN_GTY_NPI(2);
GEN_GTY_NPI(3);
GEN_GTY_NPI(4);
GEN_GTY_NPI(5);
GEN_GTY_NPI(6);
GEN_GTY_NPI(7);
GEN_GTY_NPI(8);
GEN_GTY_NPI(9);
GEN_GTY_NPI(10);
GEN_XPIO_DCI(0);
GEN_XPIO_DCI(1);
GEN_XPIO_DCI(2);
GEN_XPIO_DCI(3);
GEN_XPIO_DCI(4);
GEN_XPI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