xref: /openbmc/qemu/include/hw/arm/raspi_platform.h (revision 74de7145)
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
23d8e53d7bSPhilippe Mathieu-Daudé  *
24d8e53d7bSPhilippe Mathieu-Daudé  * Various undocumented addresses and names come from Herman Hermitage's VC4
25d8e53d7bSPhilippe Mathieu-Daudé  * documentation:
26d8e53d7bSPhilippe Mathieu-Daudé  * https://github.com/hermanhermitage/videocoreiv/wiki/MMIO-Register-map
277c62aeb8SAndrew Baumann  */
287c62aeb8SAndrew Baumann 
29f91005e1SMarkus Armbruster #ifndef HW_ARM_RASPI_PLATFORM_H
30f91005e1SMarkus Armbruster #define HW_ARM_RASPI_PLATFORM_H
31f91005e1SMarkus Armbruster 
325cd436f9SPhilippe Mathieu-Daudé #define MSYNC_OFFSET            0x0000   /* Multicore Sync Block */
33d8e53d7bSPhilippe Mathieu-Daudé #define CCPT_OFFSET             0x1000   /* Compact Camera Port 2 TX */
34d8e53d7bSPhilippe Mathieu-Daudé #define INTE_OFFSET             0x2000   /* VC Interrupt controller */
357c62aeb8SAndrew Baumann #define ST_OFFSET               0x3000   /* System Timer */
36d8e53d7bSPhilippe Mathieu-Daudé #define TXP_OFFSET              0x4000   /* Transposer */
37d8e53d7bSPhilippe Mathieu-Daudé #define JPEG_OFFSET             0x5000
387c62aeb8SAndrew Baumann #define MPHI_OFFSET             0x6000   /* Message-based Parallel Host Intf. */
397c62aeb8SAndrew Baumann #define DMA_OFFSET              0x7000   /* DMA controller, channels 0-14 */
40d8e53d7bSPhilippe Mathieu-Daudé #define ARBA_OFFSET             0x9000
41d8e53d7bSPhilippe Mathieu-Daudé #define BRDG_OFFSET             0xa000
42d8e53d7bSPhilippe Mathieu-Daudé #define ARM_OFFSET              0xB000   /* ARM control block */
437c62aeb8SAndrew Baumann #define ARMCTRL_OFFSET          (ARM_OFFSET + 0x000)
447c62aeb8SAndrew Baumann #define ARMCTRL_IC_OFFSET       (ARM_OFFSET + 0x200) /* Interrupt controller */
45d8e53d7bSPhilippe Mathieu-Daudé #define ARMCTRL_TIMER0_1_OFFSET (ARM_OFFSET + 0x400) /* Timer 0 and 1 (SP804) */
467c62aeb8SAndrew Baumann #define ARMCTRL_0_SBM_OFFSET    (ARM_OFFSET + 0x800) /* User 0 (ARM) Semaphores
477c62aeb8SAndrew Baumann                                                       * Doorbells & Mailboxes */
48*74de7145SLuc Michel #define PM_OFFSET               0x100000 /* Power Management */
49*74de7145SLuc Michel #define CPRMAN_OFFSET           0x101000 /* Clock Management */
5000cbd5bdSPhilippe Mathieu-Daudé #define AVS_OFFSET              0x103000 /* Audio Video Standard */
517c62aeb8SAndrew Baumann #define RNG_OFFSET              0x104000
527c62aeb8SAndrew Baumann #define GPIO_OFFSET             0x200000
53d8e53d7bSPhilippe Mathieu-Daudé #define UART0_OFFSET            0x201000 /* PL011 */
54d8e53d7bSPhilippe Mathieu-Daudé #define MMCI0_OFFSET            0x202000 /* Legacy MMC */
55d8e53d7bSPhilippe Mathieu-Daudé #define I2S_OFFSET              0x203000 /* PCM */
56d8e53d7bSPhilippe Mathieu-Daudé #define SPI0_OFFSET             0x204000 /* SPI master */
577c62aeb8SAndrew Baumann #define BSC0_OFFSET             0x205000 /* BSC0 I2C/TWI */
58d8e53d7bSPhilippe Mathieu-Daudé #define PIXV0_OFFSET            0x206000
59d8e53d7bSPhilippe Mathieu-Daudé #define PIXV1_OFFSET            0x207000
60d8e53d7bSPhilippe Mathieu-Daudé #define DPI_OFFSET              0x208000
61d8e53d7bSPhilippe Mathieu-Daudé #define DSI0_OFFSET             0x209000 /* Display Serial Interface */
62d8e53d7bSPhilippe Mathieu-Daudé #define PWM_OFFSET              0x20c000
63d8e53d7bSPhilippe Mathieu-Daudé #define PERM_OFFSET             0x20d000
64d8e53d7bSPhilippe Mathieu-Daudé #define TEC_OFFSET              0x20e000
6500cbd5bdSPhilippe Mathieu-Daudé #define OTP_OFFSET              0x20f000
66d8e53d7bSPhilippe Mathieu-Daudé #define SLIM_OFFSET             0x210000 /* SLIMbus */
67d8e53d7bSPhilippe Mathieu-Daudé #define CPG_OFFSET              0x211000
68d442d95fSPhilippe Mathieu-Daudé #define THERMAL_OFFSET          0x212000
69d8e53d7bSPhilippe Mathieu-Daudé #define AVSP_OFFSET             0x213000
70d8e53d7bSPhilippe Mathieu-Daudé #define BSC_SL_OFFSET           0x214000 /* SPI slave (bootrom) */
715cd436f9SPhilippe Mathieu-Daudé #define AUX_OFFSET              0x215000 /* AUX: UART1/SPI1/SPI2 */
725cd436f9SPhilippe Mathieu-Daudé #define EMMC1_OFFSET            0x300000
73d8e53d7bSPhilippe Mathieu-Daudé #define EMMC2_OFFSET            0x340000
74d8e53d7bSPhilippe Mathieu-Daudé #define HVS_OFFSET              0x400000
757c62aeb8SAndrew Baumann #define SMI_OFFSET              0x600000
76d8e53d7bSPhilippe Mathieu-Daudé #define DSI1_OFFSET             0x700000
77d8e53d7bSPhilippe Mathieu-Daudé #define UCAM_OFFSET             0x800000
78d8e53d7bSPhilippe Mathieu-Daudé #define CMI_OFFSET              0x802000
797c62aeb8SAndrew Baumann #define BSC1_OFFSET             0x804000 /* BSC1 I2C/TWI */
8000cbd5bdSPhilippe Mathieu-Daudé #define BSC2_OFFSET             0x805000 /* BSC2 I2C/TWI */
81d8e53d7bSPhilippe Mathieu-Daudé #define VECA_OFFSET             0x806000
82d8e53d7bSPhilippe Mathieu-Daudé #define PIXV2_OFFSET            0x807000
83d8e53d7bSPhilippe Mathieu-Daudé #define HDMI_OFFSET             0x808000
84d8e53d7bSPhilippe Mathieu-Daudé #define HDCP_OFFSET             0x809000
85d8e53d7bSPhilippe Mathieu-Daudé #define ARBR0_OFFSET            0x80a000
8600cbd5bdSPhilippe Mathieu-Daudé #define DBUS_OFFSET             0x900000
8700cbd5bdSPhilippe Mathieu-Daudé #define AVE0_OFFSET             0x910000
885cd436f9SPhilippe Mathieu-Daudé #define USB_OTG_OFFSET          0x980000 /* DTC_OTG USB controller */
89d8e53d7bSPhilippe Mathieu-Daudé #define V3D_OFFSET              0xc00000
9000cbd5bdSPhilippe Mathieu-Daudé #define SDRAMC_OFFSET           0xe00000
91d8e53d7bSPhilippe Mathieu-Daudé #define L2CC_OFFSET             0xe01000 /* Level 2 Cache controller */
92d8e53d7bSPhilippe Mathieu-Daudé #define L1CC_OFFSET             0xe02000 /* Level 1 Cache controller */
93d8e53d7bSPhilippe Mathieu-Daudé #define ARBR1_OFFSET            0xe04000
947c62aeb8SAndrew Baumann #define DMA15_OFFSET            0xE05000 /* DMA controller, channel 15 */
95d8e53d7bSPhilippe Mathieu-Daudé #define DCRC_OFFSET             0xe07000
96d8e53d7bSPhilippe Mathieu-Daudé #define AXIP_OFFSET             0xe08000
977c62aeb8SAndrew Baumann 
987c62aeb8SAndrew Baumann /* GPU interrupts */
997c62aeb8SAndrew Baumann #define INTERRUPT_TIMER0               0
1007c62aeb8SAndrew Baumann #define INTERRUPT_TIMER1               1
1017c62aeb8SAndrew Baumann #define INTERRUPT_TIMER2               2
1027c62aeb8SAndrew Baumann #define INTERRUPT_TIMER3               3
1037c62aeb8SAndrew Baumann #define INTERRUPT_CODEC0               4
1047c62aeb8SAndrew Baumann #define INTERRUPT_CODEC1               5
1057c62aeb8SAndrew Baumann #define INTERRUPT_CODEC2               6
1067c62aeb8SAndrew Baumann #define INTERRUPT_JPEG                 7
1077c62aeb8SAndrew Baumann #define INTERRUPT_ISP                  8
1087c62aeb8SAndrew Baumann #define INTERRUPT_USB                  9
1097c62aeb8SAndrew Baumann #define INTERRUPT_3D                   10
1107c62aeb8SAndrew Baumann #define INTERRUPT_TRANSPOSER           11
1117c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC0       12
1127c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC1       13
1137c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC2       14
1147c62aeb8SAndrew Baumann #define INTERRUPT_MULTICORESYNC3       15
1157c62aeb8SAndrew Baumann #define INTERRUPT_DMA0                 16
1167c62aeb8SAndrew Baumann #define INTERRUPT_DMA1                 17
1177c62aeb8SAndrew Baumann #define INTERRUPT_DMA2                 18
1187c62aeb8SAndrew Baumann #define INTERRUPT_DMA3                 19
1197c62aeb8SAndrew Baumann #define INTERRUPT_DMA4                 20
1207c62aeb8SAndrew Baumann #define INTERRUPT_DMA5                 21
1217c62aeb8SAndrew Baumann #define INTERRUPT_DMA6                 22
1227c62aeb8SAndrew Baumann #define INTERRUPT_DMA7                 23
1237c62aeb8SAndrew Baumann #define INTERRUPT_DMA8                 24
1247c62aeb8SAndrew Baumann #define INTERRUPT_DMA9                 25
1257c62aeb8SAndrew Baumann #define INTERRUPT_DMA10                26
1267c62aeb8SAndrew Baumann #define INTERRUPT_DMA11                27
1277c62aeb8SAndrew Baumann #define INTERRUPT_DMA12                28
1287c62aeb8SAndrew Baumann #define INTERRUPT_AUX                  29
1297c62aeb8SAndrew Baumann #define INTERRUPT_ARM                  30
1307c62aeb8SAndrew Baumann #define INTERRUPT_VPUDMA               31
1317c62aeb8SAndrew Baumann #define INTERRUPT_HOSTPORT             32
1327c62aeb8SAndrew Baumann #define INTERRUPT_VIDEOSCALER          33
1337c62aeb8SAndrew Baumann #define INTERRUPT_CCP2TX               34
1347c62aeb8SAndrew Baumann #define INTERRUPT_SDC                  35
1357c62aeb8SAndrew Baumann #define INTERRUPT_DSI0                 36
1367c62aeb8SAndrew Baumann #define INTERRUPT_AVE                  37
1377c62aeb8SAndrew Baumann #define INTERRUPT_CAM0                 38
1387c62aeb8SAndrew Baumann #define INTERRUPT_CAM1                 39
1397c62aeb8SAndrew Baumann #define INTERRUPT_HDMI0                40
1407c62aeb8SAndrew Baumann #define INTERRUPT_HDMI1                41
1417c62aeb8SAndrew Baumann #define INTERRUPT_PIXELVALVE1          42
1427c62aeb8SAndrew Baumann #define INTERRUPT_I2CSPISLV            43
1437c62aeb8SAndrew Baumann #define INTERRUPT_DSI1                 44
1447c62aeb8SAndrew Baumann #define INTERRUPT_PWA0                 45
1457c62aeb8SAndrew Baumann #define INTERRUPT_PWA1                 46
1467c62aeb8SAndrew Baumann #define INTERRUPT_CPR                  47
1477c62aeb8SAndrew Baumann #define INTERRUPT_SMI                  48
1487c62aeb8SAndrew Baumann #define INTERRUPT_GPIO0                49
1497c62aeb8SAndrew Baumann #define INTERRUPT_GPIO1                50
1507c62aeb8SAndrew Baumann #define INTERRUPT_GPIO2                51
1517c62aeb8SAndrew Baumann #define INTERRUPT_GPIO3                52
1527c62aeb8SAndrew Baumann #define INTERRUPT_I2C                  53
1537c62aeb8SAndrew Baumann #define INTERRUPT_SPI                  54
1547c62aeb8SAndrew Baumann #define INTERRUPT_I2SPCM               55
1557c62aeb8SAndrew Baumann #define INTERRUPT_SDIO                 56
1565cd436f9SPhilippe Mathieu-Daudé #define INTERRUPT_UART0                57
1577c62aeb8SAndrew Baumann #define INTERRUPT_SLIMBUS              58
1587c62aeb8SAndrew Baumann #define INTERRUPT_VEC                  59
1597c62aeb8SAndrew Baumann #define INTERRUPT_CPG                  60
1607c62aeb8SAndrew Baumann #define INTERRUPT_RNG                  61
1617c62aeb8SAndrew Baumann #define INTERRUPT_ARASANSDIO           62
1627c62aeb8SAndrew Baumann #define INTERRUPT_AVSPMON              63
1637c62aeb8SAndrew Baumann 
1647c62aeb8SAndrew Baumann /* ARM CPU IRQs use a private number space */
1657c62aeb8SAndrew Baumann #define INTERRUPT_ARM_TIMER            0
1667c62aeb8SAndrew Baumann #define INTERRUPT_ARM_MAILBOX          1
1677c62aeb8SAndrew Baumann #define INTERRUPT_ARM_DOORBELL_0       2
1687c62aeb8SAndrew Baumann #define INTERRUPT_ARM_DOORBELL_1       3
1697c62aeb8SAndrew Baumann #define INTERRUPT_VPU0_HALTED          4
1707c62aeb8SAndrew Baumann #define INTERRUPT_VPU1_HALTED          5
1717c62aeb8SAndrew Baumann #define INTERRUPT_ILLEGAL_TYPE0        6
1727c62aeb8SAndrew Baumann #define INTERRUPT_ILLEGAL_TYPE1        7
173f91005e1SMarkus Armbruster 
174f91005e1SMarkus Armbruster #endif
175