1// Clusters definitions
2cluster0: CPU.Cluster @ sysbus
3
4cluster1: CPU.Cluster @ sysbus
5
6// APU
7
8apu0: CPU.ARMv8A @ cluster0
9    cpuType: "cortex-a53"
10    cpuId: 0
11    genericInterruptController: apuGic
12
13apu1: CPU.ARMv8A @ cluster0
14    cpuType: "cortex-a53"
15    cpuId: 1
16    genericInterruptController: apuGic
17    init:
18        IsHalted true
19
20apu2: CPU.ARMv8A @ cluster0
21    cpuType: "cortex-a53"
22    cpuId: 2
23    genericInterruptController: apuGic
24    init:
25        IsHalted true
26
27apu3: CPU.ARMv8A @ cluster0
28    cpuType: "cortex-a53"
29    cpuId: 3
30    genericInterruptController: apuGic
31    init:
32        IsHalted true
33
34apu0Timer: Timers.ARM_GenericTimer @ apu0
35    frequency: 100000000
36    NonSecureEL2PhysicalTimerIRQ -> apuGic#0@29
37    EL1PhysicalTimerIRQ -> apuGic#0@30
38    EL1VirtualTimerIRQ -> apuGic#0@27
39    EL3PhysicalTimerIRQ -> apuGic#0@26
40
41apu1Timer: Timers.ARM_GenericTimer @ apu1
42    frequency: 100000000
43    NonSecureEL2PhysicalTimerIRQ -> apuGic#1@29
44    EL1PhysicalTimerIRQ -> apuGic#1@30
45    EL1VirtualTimerIRQ -> apuGic#1@27
46    EL3PhysicalTimerIRQ -> apuGic#1@26
47
48apu2Timer: Timers.ARM_GenericTimer @ apu2
49    frequency: 100000000
50    NonSecureEL2PhysicalTimerIRQ -> apuGic#2@29
51    EL1PhysicalTimerIRQ -> apuGic#2@30
52    EL1VirtualTimerIRQ -> apuGic#2@27
53    EL3PhysicalTimerIRQ -> apuGic#2@26
54
55apu3Timer: Timers.ARM_GenericTimer @ apu3
56    frequency: 100000000
57    NonSecureEL2PhysicalTimerIRQ -> apuGic#3@29
58    EL1PhysicalTimerIRQ -> apuGic#3@30
59    EL1VirtualTimerIRQ -> apuGic#3@27
60    EL3PhysicalTimerIRQ -> apuGic#3@26
61
62apuGic: IRQControllers.ARM_GenericInterruptController @ {
63        sysbus new Bus.BusMultiRegistration { address: 0xf9010000; size: 0x010000; region: "distributor" };
64        sysbus new Bus.BusMultiRegistration { address: 0xf9020000; size: 0x010000; region: "cpuInterface" }
65    }
66    [0-3] -> apu0@[0-3]
67    [4-7] -> apu1@[0-3]
68    [8-11]  -> apu2@[0-3]
69    [12-15] -> apu3@[0-3]
70    architectureVersion: IRQControllers.ARM_GenericInterruptControllerVersion.GICv2
71
72// RPU
73
74rpu0: CPU.ARMv7R @ cluster1
75    cpuType: "cortex-r5f"
76    // Aff1: 1, Aff0: 0
77    cpuId: 0x100
78    genericInterruptController: rpuGic
79    numberOfMPURegions: 16
80    init:
81        //                             interface region
82        RegisterTCMRegion sysbus.atcm0 1         0
83        RegisterTCMRegion sysbus.btcm0 0         0
84
85rpu1: CPU.ARMv7R @ cluster1
86    cpuType: "cortex-r5f"
87    // Aff1: 1, Aff0: 1
88    cpuId: 0x101
89    genericInterruptController: rpuGic
90    numberOfMPURegions: 16
91    init:
92        //                             interface region
93        RegisterTCMRegion sysbus.atcm1 1         0
94        RegisterTCMRegion sysbus.btcm1 0         0
95
96rpuGic: IRQControllers.ARM_GenericInterruptController @ {
97        sysbus new Bus.BusMultiRegistration { address: 0xf9000000; size: 0x1000; region: "distributor" };
98        sysbus new Bus.BusMultiRegistration { address: 0xf9001000; size: 0x100; region: "cpuInterface" }
99    }
100    [0-1] -> rpu0@[0-1]
101    [4-5] -> rpu1@[0-1]
102    architectureVersion: IRQControllers.ARM_GenericInterruptControllerVersion.GICv1
103
104// MEMORY
105
106atcm0: Memory.MappedMemory @ {
107        sysbus new Bus.BusPointRegistration { address: 0x0; cpu: rpu0 };
108        sysbus 0xffe00000
109    }
110    size: 0x10000
111
112btcm0: Memory.MappedMemory @ {
113        sysbus new Bus.BusPointRegistration { address: 0x20000; cpu: rpu0 };
114        sysbus 0xffe20000
115    }
116    size: 0x20000
117
118ddrLowRpu: Memory.MappedMemory @ {
119        sysbus new Bus.BusPointRegistration { address: 0x10000; cluster: cluster1 }
120    }
121    size: 0x10000
122
123atcm1: Memory.MappedMemory @ {
124        sysbus new Bus.BusPointRegistration { address: 0x0; cpu: rpu1 };
125        sysbus 0xffe90000
126    }
127    size: 0x10000
128
129btcm1: Memory.MappedMemory @ {
130        sysbus new Bus.BusPointRegistration { address: 0x20000; cpu: rpu1 };
131        sysbus 0xffeb0000
132    }
133    size: 0x10000
134
135ddrLowApu: Memory.MappedMemory @ {
136        sysbus new Bus.BusPointRegistration { address: 0x0; cluster: cluster0 }
137    }
138    size: 0x30000
139
140ddrLowCommon: Memory.MappedMemory @ sysbus 0x30000
141    size: 0x7ffd0000
142
143quadSpiFlash: Memory.MappedMemory @ sysbus 0xc0000000
144    size: 0x2000000
145
146ocm: Memory.MappedMemory @ sysbus 0xfffc0000
147    size: 0x40000
148
149ddrHigh: Memory.MappedMemory @ {
150        sysbus new Bus.BusPointRegistration { address: 0x800000000; cluster: cluster0 }
151    }
152    size: 0x80000000
153
154rpu_control: Memory.MappedMemory @ sysbus 0xff9a0000
155    size: 0x1000
156
157// I/O MAPPED PERIPHERALS
158
159uart0: UART.Cadence_UART @ sysbus 0xff000000
160    -> apuGic@21 | rpuGic@21
161
162uart1: UART.Cadence_UART @ sysbus 0xff010000
163    -> apuGic@22 | rpuGic@22
164
165i2c0: I2C.Cadence_I2C @ sysbus <0xff020000, +0x1000>
166    -> apuGic@17 | rpuGic@17
167
168i2c1: I2C.Cadence_I2C @ sysbus <0xff030000, +0x1000>
169    -> apuGic@18 | rpuGic@17
170
171ttc0: Timers.Cadence_TTC @ sysbus 0xff110000
172    [0-2] -> apuGic@[36-38] | rpuGic@[36-38]
173
174ttc1: Timers.Cadence_TTC @ sysbus 0xff120000
175    [0-2] -> apuGic@[39-41] | rpuGic@[39-41]
176
177ttc2: Timers.Cadence_TTC @ sysbus 0xff130000
178    [0-2] -> apuGic@[42-44] | rpuGic@[42-44]
179
180ttc3: Timers.Cadence_TTC @ sysbus 0xff140000
181    [0-2] -> apuGic@[45-47] | rpuGic@[45-47]
182
183gem0: Network.CadenceGEM @ sysbus 0xff0b0000
184    -> apuGic@57 | rpuGic@57
185
186gem1: Network.CadenceGEM @ sysbus 0xff0c0000
187    -> apuGic@59 | rpuGic@59
188
189gem2: Network.CadenceGEM @ sysbus 0xff0d0000
190    -> apuGic@61 | rpuGic@61
191
192gem3: Network.CadenceGEM @ sysbus 0xff0e0000
193    -> apuGic@63 | rpuGic@63
194
195gpio: GPIOPort.XilinxGPIOPS @ sysbus <0xff0a0000, +0x1000>
196    numberOfGpioBanks: 6
197
198ipi: Miscellaneous.ZynqMP_IPI @ sysbus 0xff300000
199    mailbox: ipiMailbox
200    0 -> apuGic@35 | rpuGic@35
201    [1-2] -> apuGic@[33-34] | rpuGic@[33-34]
202    [3-6] -> platformManagementUnit@[0-3]
203    [7-10] -> apuGic@[29-32] | rpuGic@[29-32]
204
205ipiMailbox: Memory.MappedMemory @ sysbus 0xff990000
206    size: 0x1000
207
208rtc: Timers.ZynqMP_RTC @ sysbus 0xffa60000
209    SecondIRQ -> apuGic@26 | rpuGic@26
210    AlarmIRQ -> apuGic@27 | rpuGic@27
211
212platformManagementUnit: Miscellaneous.ZynqMP_PlatformManagementUnit @ ipi
213    apu0: apu0
214    apu1: apu1
215    apu2: apu2
216    apu3: apu3
217    rpu0: rpu0
218    rpu1: rpu1
219
220pmu0: Miscellaneous.ArmPerformanceMonitoringUnit @ rpu0
221    -> rpuGic@5
222
223sysbus:
224    init:
225        Tag <0xff260020 0x4> "counter_frequency" 0x5F5E100
226        Tag <0xfd6e0fe0 0x4> "cci_part_number_lo" 0x20
227        Tag <0xfd6e0fe4 0x4> "cci_part_number_hi" 0x04
228