2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __SYSTEM_LOCAL_H_INCLUDED__
16 #define __SYSTEM_LOCAL_H_INCLUDED__
18 #ifdef HRT_ISP_CSS_CUSTOM_HOST
19 #ifndef HRT_USE_VIR_ADDRS
20 #define HRT_USE_VIR_ADDRS
22 /* This interface is deprecated */
23 /*#include "hive_isp_css_custom_host_hrt.h"*/
26 #include "system_global.h"
28 #define HRT_ADDRESS_WIDTH 64 /* Surprise, this is a local property */
30 /* This interface is deprecated */
31 #include "hive_types.h"
34 * Cell specific address maps
36 #if HRT_ADDRESS_WIDTH == 64
38 #define GP_FIFO_BASE ((hrt_address)0x0000000000090104) /* This is NOT a base address */
41 static const hrt_address DDR_BASE[N_DDR_ID] = {
46 static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
50 static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
54 static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
58 static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
59 0x00000000001C0000ULL,
60 0x00000000001D0000ULL,
64 static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
69 static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
73 static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
78 #if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
80 * MMU0_ID: The data MMU
81 * MMU1_ID: The icache MMU
83 static const hrt_address MMU_BASE[N_MMU_ID] = {
84 0x0000000000070000ULL,
88 #error "system_local.h: SYSTEM must be one of {2400, 2401 }"
92 static const hrt_address DMA_BASE[N_DMA_ID] = {
96 static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
101 static const hrt_address IRQ_BASE[N_IRQ_ID] = {
102 0x0000000000000500ULL,
103 0x0000000000030A00ULL,
104 0x000000000008C000ULL,
105 0x0000000000090200ULL
109 0x0000000000000500ULL};
113 static const hrt_address GDC_BASE[N_GDC_ID] = {
114 0x0000000000050000ULL,
115 0x0000000000060000ULL
118 /* FIFO_MONITOR (not a subset of GP_DEVICE) */
119 static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
120 0x0000000000000000ULL
124 static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
125 0x0000000000000000ULL};
127 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
128 0x0000000000090000ULL};
131 /* GP_DEVICE (single base for all separate GP_REG instances) */
132 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
133 0x0000000000000000ULL
136 /*GP TIMER , all timer registers are inter-twined,
137 * so, having multiple base addresses for
138 * different timers does not help*/
139 static const hrt_address GP_TIMER_BASE =
140 (hrt_address)0x0000000000000600ULL;
143 static const hrt_address GPIO_BASE[N_GPIO_ID] = {
144 0x0000000000000400ULL
148 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
149 0x0000000000000100ULL
152 /* INPUT_FORMATTER */
153 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
154 0x0000000000030000ULL,
155 0x0000000000030200ULL,
156 0x0000000000030400ULL,
157 0x0000000000030600ULL
161 static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
162 0x0000000000080000ULL
165 /* 0x0000000000081000ULL, */ /* capture A */
166 /* 0x0000000000082000ULL, */ /* capture B */
167 /* 0x0000000000083000ULL, */ /* capture C */
168 /* 0x0000000000084000ULL, */ /* Acquisition */
169 /* 0x0000000000085000ULL, */ /* DMA */
170 /* 0x0000000000089000ULL, */ /* ctrl */
171 /* 0x000000000008A000ULL, */ /* GP regs */
172 /* 0x000000000008B000ULL, */ /* FIFO */
173 /* 0x000000000008C000ULL, */ /* IRQ */
175 /* RX, the MIPI lane control regs start at offset 0 */
176 static const hrt_address RX_BASE[N_RX_ID] = {
177 0x0000000000080100ULL
180 /* IBUF_CTRL, part of the Input System 2401 */
181 static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
182 0x00000000000C1800ULL, /* ibuf controller A */
183 0x00000000000C3800ULL, /* ibuf controller B */
184 0x00000000000C5800ULL /* ibuf controller C */
187 /* ISYS IRQ Controllers, part of the Input System 2401 */
188 static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
189 0x00000000000C1400ULL, /* port a */
190 0x00000000000C3400ULL, /* port b */
191 0x00000000000C5400ULL /* port c */
194 /* CSI FE, part of the Input System 2401 */
195 static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
196 0x00000000000C0400ULL, /* csi fe controller A */
197 0x00000000000C2400ULL, /* csi fe controller B */
198 0x00000000000C4400ULL /* csi fe controller C */
201 /* CSI BE, part of the Input System 2401 */
202 static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
203 0x00000000000C0800ULL, /* csi be controller A */
204 0x00000000000C2800ULL, /* csi be controller B */
205 0x00000000000C4800ULL /* csi be controller C */
208 /* PIXEL Generator, part of the Input System 2401 */
209 static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
210 0x00000000000C1000ULL, /* pixel gen controller A */
211 0x00000000000C3000ULL, /* pixel gen controller B */
212 0x00000000000C5000ULL /* pixel gen controller C */
215 /* Stream2MMIO, part of the Input System 2401 */
216 static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
217 0x00000000000C0C00ULL, /* stream2mmio controller A */
218 0x00000000000C2C00ULL, /* stream2mmio controller B */
219 0x00000000000C4C00ULL /* stream2mmio controller C */
221 #elif HRT_ADDRESS_WIDTH == 32
223 #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */
225 /* DDR : Attention, this value not defined in 32-bit */
226 static const hrt_address DDR_BASE[N_DDR_ID] = {
231 static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
235 static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
239 static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
243 static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
249 static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
254 static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
258 static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
263 #if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
265 * MMU0_ID: The data MMU
266 * MMU1_ID: The icache MMU
268 static const hrt_address MMU_BASE[N_MMU_ID] = {
273 #error "system_local.h: SYSTEM must be one of {2400, 2401 }"
277 static const hrt_address DMA_BASE[N_DMA_ID] = {
281 static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
286 static const hrt_address IRQ_BASE[N_IRQ_ID] = {
298 static const hrt_address GDC_BASE[N_GDC_ID] = {
303 /* FIFO_MONITOR (not a subset of GP_DEVICE) */
304 static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
309 static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
312 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
316 /* GP_DEVICE (single base for all separate GP_REG instances) */
317 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
321 /*GP TIMER , all timer registers are inter-twined,
322 * so, having multiple base addresses for
323 * different timers does not help*/
324 static const hrt_address GP_TIMER_BASE =
325 (hrt_address)0x00000600UL;
327 static const hrt_address GPIO_BASE[N_GPIO_ID] = {
332 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
336 /* INPUT_FORMATTER */
337 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
343 /* 0x00030600UL, */ /* memcpy() */
346 static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
350 /* 0x00081000UL, */ /* capture A */
351 /* 0x00082000UL, */ /* capture B */
352 /* 0x00083000UL, */ /* capture C */
353 /* 0x00084000UL, */ /* Acquisition */
354 /* 0x00085000UL, */ /* DMA */
355 /* 0x00089000UL, */ /* ctrl */
356 /* 0x0008A000UL, */ /* GP regs */
357 /* 0x0008B000UL, */ /* FIFO */
358 /* 0x0008C000UL, */ /* IRQ */
360 /* RX, the MIPI lane control regs start at offset 0 */
361 static const hrt_address RX_BASE[N_RX_ID] = {
365 /* IBUF_CTRL, part of the Input System 2401 */
366 static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
367 0x000C1800UL, /* ibuf controller A */
368 0x000C3800UL, /* ibuf controller B */
369 0x000C5800UL /* ibuf controller C */
372 /* ISYS IRQ Controllers, part of the Input System 2401 */
373 static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
374 0x000C1400ULL, /* port a */
375 0x000C3400ULL, /* port b */
376 0x000C5400ULL /* port c */
379 /* CSI FE, part of the Input System 2401 */
380 static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
381 0x000C0400UL, /* csi fe controller A */
382 0x000C2400UL, /* csi fe controller B */
383 0x000C4400UL /* csi fe controller C */
386 /* CSI BE, part of the Input System 2401 */
387 static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
388 0x000C0800UL, /* csi be controller A */
389 0x000C2800UL, /* csi be controller B */
390 0x000C4800UL /* csi be controller C */
393 /* PIXEL Generator, part of the Input System 2401 */
394 static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
395 0x000C1000UL, /* pixel gen controller A */
396 0x000C3000UL, /* pixel gen controller B */
397 0x000C5000UL /* pixel gen controller C */
400 /* Stream2MMIO, part of the Input System 2401 */
401 static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
402 0x000C0C00UL, /* stream2mmio controller A */
403 0x000C2C00UL, /* stream2mmio controller B */
404 0x000C4C00UL /* stream2mmio controller C */
408 #error "system_local.h: HRT_ADDRESS_WIDTH must be one of {32,64}"
411 #endif /* __SYSTEM_LOCAL_H_INCLUDED__ */