xref: /openbmc/qemu/include/hw/arm/raspi_platform.h (revision d442d95f)
17c62aeb8SAndrew Baumann /*
27c62aeb8SAndrew Baumann  * bcm2708 aka bcm2835/2836 aka Raspberry Pi/Pi2 SoC platform defines
37c62aeb8SAndrew Baumann  *
47c62aeb8SAndrew Baumann  * These definitions are derived from those in Raspbian Linux at
57c62aeb8SAndrew Baumann  * arch/arm/mach-{bcm2708,bcm2709}/include/mach/platform.h
67c62aeb8SAndrew Baumann  * where they carry the following notice:
77c62aeb8SAndrew Baumann  *
87c62aeb8SAndrew Baumann  * Copyright (C) 2010 Broadcom
97c62aeb8SAndrew Baumann  *
107c62aeb8SAndrew Baumann  * This program is free software; you can redistribute it and/or modify
117c62aeb8SAndrew Baumann  * it under the terms of the GNU General Public License as published by
127c62aeb8SAndrew Baumann  * the Free Software Foundation; either version 2 of the License, or
137c62aeb8SAndrew Baumann  * (at your option) any later version.
147c62aeb8SAndrew Baumann  *
157c62aeb8SAndrew Baumann  * This program is distributed in the hope that it will be useful,
167c62aeb8SAndrew Baumann  * but WITHOUT ANY WARRANTY; without even the implied warranty of
177c62aeb8SAndrew Baumann  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
187c62aeb8SAndrew Baumann  * GNU General Public License for more details.
197c62aeb8SAndrew Baumann  *
207c62aeb8SAndrew Baumann  * You should have received a copy of the GNU General Public License
217c62aeb8SAndrew Baumann  * along with this program; if not, write to the Free Software
227c62aeb8SAndrew Baumann  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
237c62aeb8SAndrew Baumann  */
247c62aeb8SAndrew Baumann 
25f91005e1SMarkus Armbruster #ifndef HW_ARM_RASPI_PLATFORM_H
26f91005e1SMarkus Armbruster #define HW_ARM_RASPI_PLATFORM_H
27f91005e1SMarkus Armbruster 
285cd436f9SPhilippe Mathieu-Daudé #define MSYNC_OFFSET            0x0000   /* Multicore Sync Block */
297c62aeb8SAndrew Baumann #define IC0_OFFSET              0x2000
307c62aeb8SAndrew Baumann #define ST_OFFSET               0x3000   /* System Timer */
317c62aeb8SAndrew Baumann #define MPHI_OFFSET             0x6000   /* Message-based Parallel Host Intf. */
327c62aeb8SAndrew Baumann #define DMA_OFFSET              0x7000   /* DMA controller, channels 0-14 */
337c62aeb8SAndrew Baumann #define ARM_OFFSET              0xB000   /* BCM2708 ARM control block */
347c62aeb8SAndrew Baumann #define ARMCTRL_OFFSET          (ARM_OFFSET + 0x000)
357c62aeb8SAndrew Baumann #define ARMCTRL_IC_OFFSET       (ARM_OFFSET + 0x200) /* Interrupt controller */
367c62aeb8SAndrew Baumann #define ARMCTRL_TIMER0_1_OFFSET (ARM_OFFSET + 0x400) /* Timer 0 and 1 */
377c62aeb8SAndrew Baumann #define ARMCTRL_0_SBM_OFFSET    (ARM_OFFSET + 0x800) /* User 0 (ARM) Semaphores
387c62aeb8SAndrew Baumann                                                       * Doorbells & Mailboxes */
395cd436f9SPhilippe Mathieu-Daudé #define CPRMAN_OFFSET           0x100000 /* Power Management, Watchdog */
405cd436f9SPhilippe Mathieu-Daudé #define CM_OFFSET               0x101000 /* Clock Management */
4100cbd5bdSPhilippe Mathieu-Daudé #define A2W_OFFSET              0x102000 /* Reset controller */
4200cbd5bdSPhilippe Mathieu-Daudé #define AVS_OFFSET              0x103000 /* Audio Video Standard */
437c62aeb8SAndrew Baumann #define RNG_OFFSET              0x104000
447c62aeb8SAndrew Baumann #define GPIO_OFFSET             0x200000
457c62aeb8SAndrew Baumann #define UART0_OFFSET            0x201000
467c62aeb8SAndrew Baumann #define MMCI0_OFFSET            0x202000
477c62aeb8SAndrew Baumann #define I2S_OFFSET              0x203000
487c62aeb8SAndrew Baumann #define SPI0_OFFSET             0x204000
497c62aeb8SAndrew Baumann #define BSC0_OFFSET             0x205000 /* BSC0 I2C/TWI */
5000cbd5bdSPhilippe Mathieu-Daudé #define OTP_OFFSET              0x20f000
51*d442d95fSPhilippe Mathieu-Daudé #define THERMAL_OFFSET          0x212000
5200cbd5bdSPhilippe Mathieu-Daudé #define BSC_SL_OFFSET           0x214000 /* SPI slave */
535cd436f9SPhilippe Mathieu-Daudé #define AUX_OFFSET              0x215000 /* AUX: UART1/SPI1/SPI2 */
545cd436f9SPhilippe Mathieu-Daudé #define EMMC1_OFFSET            0x300000
557c62aeb8SAndrew Baumann #define SMI_OFFSET              0x600000
567c62aeb8SAndrew Baumann #define BSC1_OFFSET             0x804000 /* BSC1 I2C/TWI */
5700cbd5bdSPhilippe Mathieu-Daudé #define BSC2_OFFSET             0x805000 /* BSC2 I2C/TWI */
5800cbd5bdSPhilippe Mathieu-Daudé #define DBUS_OFFSET             0x900000
5900cbd5bdSPhilippe Mathieu-Daudé #define AVE0_OFFSET             0x910000
605cd436f9SPhilippe Mathieu-Daudé #define USB_OTG_OFFSET          0x980000 /* DTC_OTG USB controller */
6100cbd5bdSPhilippe Mathieu-Daudé #define SDRAMC_OFFSET           0xe00000
627c62aeb8SAndrew Baumann #define DMA15_OFFSET            0xE05000 /* DMA controller, channel 15 */
637c62aeb8SAndrew Baumann 
647c62aeb8SAndrew Baumann /* GPU interrupts */
657c62aeb8SAndrew Baumann #define INTERRUPT_TIMER0               0
667c62aeb8SAndrew Baumann #define INTERRUPT_TIMER1               1
677c62aeb8SAndrew Baumann #define INTERRUPT_TIMER2               2
687c62aeb8SAndrew Baumann #define INTERRUPT_TIMER3               3
697c62aeb8SAndrew Baumann #define INTERRUPT_CODEC0               4
707c62aeb8SAndrew Baumann #define INTERRUPT_CODEC1               5
717c62aeb8SAndrew Baumann #define INTERRUPT_CODEC2               6
727c62aeb8SAndrew Baumann #define INTERRUPT_JPEG                 7
737c62aeb8SAndrew Baumann #define INTERRUPT_ISP                  8
747c62aeb8SAndrew Baumann #define INTERRUPT_USB                  9
757c62aeb8SAndrew Baumann #define INTERRUPT_3D                   10
767c62aeb8SAndrew Baumann #define INTERRUPT_TRANSPOSER           11
777c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC0       12
787c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC1       13
797c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC2       14
807c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC3       15
817c62aeb8SAndrew Baumann #define INTERRUPT_DMA0                 16
827c62aeb8SAndrew Baumann #define INTERRUPT_DMA1                 17
837c62aeb8SAndrew Baumann #define INTERRUPT_DMA2                 18
847c62aeb8SAndrew Baumann #define INTERRUPT_DMA3                 19
857c62aeb8SAndrew Baumann #define INTERRUPT_DMA4                 20
867c62aeb8SAndrew Baumann #define INTERRUPT_DMA5                 21
877c62aeb8SAndrew Baumann #define INTERRUPT_DMA6                 22
887c62aeb8SAndrew Baumann #define INTERRUPT_DMA7                 23
897c62aeb8SAndrew Baumann #define INTERRUPT_DMA8                 24
907c62aeb8SAndrew Baumann #define INTERRUPT_DMA9                 25
917c62aeb8SAndrew Baumann #define INTERRUPT_DMA10                26
927c62aeb8SAndrew Baumann #define INTERRUPT_DMA11                27
937c62aeb8SAndrew Baumann #define INTERRUPT_DMA12                28
947c62aeb8SAndrew Baumann #define INTERRUPT_AUX                  29
957c62aeb8SAndrew Baumann #define INTERRUPT_ARM                  30
967c62aeb8SAndrew Baumann #define INTERRUPT_VPUDMA               31
977c62aeb8SAndrew Baumann #define INTERRUPT_HOSTPORT             32
987c62aeb8SAndrew Baumann #define INTERRUPT_VIDEOSCALER          33
997c62aeb8SAndrew Baumann #define INTERRUPT_CCP2TX               34
1007c62aeb8SAndrew Baumann #define INTERRUPT_SDC                  35
1017c62aeb8SAndrew Baumann #define INTERRUPT_DSI0                 36
1027c62aeb8SAndrew Baumann #define INTERRUPT_AVE                  37
1037c62aeb8SAndrew Baumann #define INTERRUPT_CAM0                 38
1047c62aeb8SAndrew Baumann #define INTERRUPT_CAM1                 39
1057c62aeb8SAndrew Baumann #define INTERRUPT_HDMI0                40
1067c62aeb8SAndrew Baumann #define INTERRUPT_HDMI1                41
1077c62aeb8SAndrew Baumann #define INTERRUPT_PIXELVALVE1          42
1087c62aeb8SAndrew Baumann #define INTERRUPT_I2CSPISLV            43
1097c62aeb8SAndrew Baumann #define INTERRUPT_DSI1                 44
1107c62aeb8SAndrew Baumann #define INTERRUPT_PWA0                 45
1117c62aeb8SAndrew Baumann #define INTERRUPT_PWA1                 46
1127c62aeb8SAndrew Baumann #define INTERRUPT_CPR                  47
1137c62aeb8SAndrew Baumann #define INTERRUPT_SMI                  48
1147c62aeb8SAndrew Baumann #define INTERRUPT_GPIO0                49
1157c62aeb8SAndrew Baumann #define INTERRUPT_GPIO1                50
1167c62aeb8SAndrew Baumann #define INTERRUPT_GPIO2                51
1177c62aeb8SAndrew Baumann #define INTERRUPT_GPIO3                52
1187c62aeb8SAndrew Baumann #define INTERRUPT_I2C                  53
1197c62aeb8SAndrew Baumann #define INTERRUPT_SPI                  54
1207c62aeb8SAndrew Baumann #define INTERRUPT_I2SPCM               55
1217c62aeb8SAndrew Baumann #define INTERRUPT_SDIO                 56
1225cd436f9SPhilippe Mathieu-Daudé #define INTERRUPT_UART0                57
1237c62aeb8SAndrew Baumann #define INTERRUPT_SLIMBUS              58
1247c62aeb8SAndrew Baumann #define INTERRUPT_VEC                  59
1257c62aeb8SAndrew Baumann #define INTERRUPT_CPG                  60
1267c62aeb8SAndrew Baumann #define INTERRUPT_RNG                  61
1277c62aeb8SAndrew Baumann #define INTERRUPT_ARASANSDIO           62
1287c62aeb8SAndrew Baumann #define INTERRUPT_AVSPMON              63
1297c62aeb8SAndrew Baumann 
1307c62aeb8SAndrew Baumann /* ARM CPU IRQs use a private number space */
1317c62aeb8SAndrew Baumann #define INTERRUPT_ARM_TIMER            0
1327c62aeb8SAndrew Baumann #define INTERRUPT_ARM_MAILBOX          1
1337c62aeb8SAndrew Baumann #define INTERRUPT_ARM_DOORBELL_0       2
1347c62aeb8SAndrew Baumann #define INTERRUPT_ARM_DOORBELL_1       3
1357c62aeb8SAndrew Baumann #define INTERRUPT_VPU0_HALTED          4
1367c62aeb8SAndrew Baumann #define INTERRUPT_VPU1_HALTED          5
1377c62aeb8SAndrew Baumann #define INTERRUPT_ILLEGAL_TYPE0        6
1387c62aeb8SAndrew Baumann #define INTERRUPT_ILLEGAL_TYPE1        7
139f91005e1SMarkus Armbruster 
140f91005e1SMarkus Armbruster #endif
141