xref: /openbmc/qemu/include/hw/arm/raspi_platform.h (revision 5cd436f9)
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 
28*5cd436f9SPhilippe 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 */
39*5cd436f9SPhilippe Mathieu-Daudé #define CPRMAN_OFFSET           0x100000 /* Power Management, Watchdog */
40*5cd436f9SPhilippe Mathieu-Daudé #define CM_OFFSET               0x101000 /* Clock Management */
417c62aeb8SAndrew Baumann #define RNG_OFFSET              0x104000
427c62aeb8SAndrew Baumann #define GPIO_OFFSET             0x200000
437c62aeb8SAndrew Baumann #define UART0_OFFSET            0x201000
447c62aeb8SAndrew Baumann #define MMCI0_OFFSET            0x202000
457c62aeb8SAndrew Baumann #define I2S_OFFSET              0x203000
467c62aeb8SAndrew Baumann #define SPI0_OFFSET             0x204000
477c62aeb8SAndrew Baumann #define BSC0_OFFSET             0x205000 /* BSC0 I2C/TWI */
48*5cd436f9SPhilippe Mathieu-Daudé #define AUX_OFFSET              0x215000 /* AUX: UART1/SPI1/SPI2 */
49*5cd436f9SPhilippe Mathieu-Daudé #define EMMC1_OFFSET            0x300000
507c62aeb8SAndrew Baumann #define SMI_OFFSET              0x600000
517c62aeb8SAndrew Baumann #define BSC1_OFFSET             0x804000 /* BSC1 I2C/TWI */
52*5cd436f9SPhilippe Mathieu-Daudé #define USB_OTG_OFFSET          0x980000 /* DTC_OTG USB controller */
537c62aeb8SAndrew Baumann #define DMA15_OFFSET            0xE05000 /* DMA controller, channel 15 */
547c62aeb8SAndrew Baumann 
557c62aeb8SAndrew Baumann /* GPU interrupts */
567c62aeb8SAndrew Baumann #define INTERRUPT_TIMER0               0
577c62aeb8SAndrew Baumann #define INTERRUPT_TIMER1               1
587c62aeb8SAndrew Baumann #define INTERRUPT_TIMER2               2
597c62aeb8SAndrew Baumann #define INTERRUPT_TIMER3               3
607c62aeb8SAndrew Baumann #define INTERRUPT_CODEC0               4
617c62aeb8SAndrew Baumann #define INTERRUPT_CODEC1               5
627c62aeb8SAndrew Baumann #define INTERRUPT_CODEC2               6
637c62aeb8SAndrew Baumann #define INTERRUPT_JPEG                 7
647c62aeb8SAndrew Baumann #define INTERRUPT_ISP                  8
657c62aeb8SAndrew Baumann #define INTERRUPT_USB                  9
667c62aeb8SAndrew Baumann #define INTERRUPT_3D                   10
677c62aeb8SAndrew Baumann #define INTERRUPT_TRANSPOSER           11
687c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC0       12
697c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC1       13
707c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC2       14
717c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC3       15
727c62aeb8SAndrew Baumann #define INTERRUPT_DMA0                 16
737c62aeb8SAndrew Baumann #define INTERRUPT_DMA1                 17
747c62aeb8SAndrew Baumann #define INTERRUPT_DMA2                 18
757c62aeb8SAndrew Baumann #define INTERRUPT_DMA3                 19
767c62aeb8SAndrew Baumann #define INTERRUPT_DMA4                 20
777c62aeb8SAndrew Baumann #define INTERRUPT_DMA5                 21
787c62aeb8SAndrew Baumann #define INTERRUPT_DMA6                 22
797c62aeb8SAndrew Baumann #define INTERRUPT_DMA7                 23
807c62aeb8SAndrew Baumann #define INTERRUPT_DMA8                 24
817c62aeb8SAndrew Baumann #define INTERRUPT_DMA9                 25
827c62aeb8SAndrew Baumann #define INTERRUPT_DMA10                26
837c62aeb8SAndrew Baumann #define INTERRUPT_DMA11                27
847c62aeb8SAndrew Baumann #define INTERRUPT_DMA12                28
857c62aeb8SAndrew Baumann #define INTERRUPT_AUX                  29
867c62aeb8SAndrew Baumann #define INTERRUPT_ARM                  30
877c62aeb8SAndrew Baumann #define INTERRUPT_VPUDMA               31
887c62aeb8SAndrew Baumann #define INTERRUPT_HOSTPORT             32
897c62aeb8SAndrew Baumann #define INTERRUPT_VIDEOSCALER          33
907c62aeb8SAndrew Baumann #define INTERRUPT_CCP2TX               34
917c62aeb8SAndrew Baumann #define INTERRUPT_SDC                  35
927c62aeb8SAndrew Baumann #define INTERRUPT_DSI0                 36
937c62aeb8SAndrew Baumann #define INTERRUPT_AVE                  37
947c62aeb8SAndrew Baumann #define INTERRUPT_CAM0                 38
957c62aeb8SAndrew Baumann #define INTERRUPT_CAM1                 39
967c62aeb8SAndrew Baumann #define INTERRUPT_HDMI0                40
977c62aeb8SAndrew Baumann #define INTERRUPT_HDMI1                41
987c62aeb8SAndrew Baumann #define INTERRUPT_PIXELVALVE1          42
997c62aeb8SAndrew Baumann #define INTERRUPT_I2CSPISLV            43
1007c62aeb8SAndrew Baumann #define INTERRUPT_DSI1                 44
1017c62aeb8SAndrew Baumann #define INTERRUPT_PWA0                 45
1027c62aeb8SAndrew Baumann #define INTERRUPT_PWA1                 46
1037c62aeb8SAndrew Baumann #define INTERRUPT_CPR                  47
1047c62aeb8SAndrew Baumann #define INTERRUPT_SMI                  48
1057c62aeb8SAndrew Baumann #define INTERRUPT_GPIO0                49
1067c62aeb8SAndrew Baumann #define INTERRUPT_GPIO1                50
1077c62aeb8SAndrew Baumann #define INTERRUPT_GPIO2                51
1087c62aeb8SAndrew Baumann #define INTERRUPT_GPIO3                52
1097c62aeb8SAndrew Baumann #define INTERRUPT_I2C                  53
1107c62aeb8SAndrew Baumann #define INTERRUPT_SPI                  54
1117c62aeb8SAndrew Baumann #define INTERRUPT_I2SPCM               55
1127c62aeb8SAndrew Baumann #define INTERRUPT_SDIO                 56
113*5cd436f9SPhilippe Mathieu-Daudé #define INTERRUPT_UART0                57
1147c62aeb8SAndrew Baumann #define INTERRUPT_SLIMBUS              58
1157c62aeb8SAndrew Baumann #define INTERRUPT_VEC                  59
1167c62aeb8SAndrew Baumann #define INTERRUPT_CPG                  60
1177c62aeb8SAndrew Baumann #define INTERRUPT_RNG                  61
1187c62aeb8SAndrew Baumann #define INTERRUPT_ARASANSDIO           62
1197c62aeb8SAndrew Baumann #define INTERRUPT_AVSPMON              63
1207c62aeb8SAndrew Baumann 
1217c62aeb8SAndrew Baumann /* ARM CPU IRQs use a private number space */
1227c62aeb8SAndrew Baumann #define INTERRUPT_ARM_TIMER            0
1237c62aeb8SAndrew Baumann #define INTERRUPT_ARM_MAILBOX          1
1247c62aeb8SAndrew Baumann #define INTERRUPT_ARM_DOORBELL_0       2
1257c62aeb8SAndrew Baumann #define INTERRUPT_ARM_DOORBELL_1       3
1267c62aeb8SAndrew Baumann #define INTERRUPT_VPU0_HALTED          4
1277c62aeb8SAndrew Baumann #define INTERRUPT_VPU1_HALTED          5
1287c62aeb8SAndrew Baumann #define INTERRUPT_ILLEGAL_TYPE0        6
1297c62aeb8SAndrew Baumann #define INTERRUPT_ILLEGAL_TYPE1        7
130f91005e1SMarkus Armbruster 
131f91005e1SMarkus Armbruster #endif
132