XenevaOS
Loading...
Searching...
No Matches
rpi3.h
Go to the documentation of this file.
1
29#ifndef __RPI_3_H__
30#define __RPI_3_H__
31
32#ifdef __TARGET_BOARD_RPI3__
33
34#define RPI_MMIO_BASE 0x3F000000
35/* GIC related informations*/
36#define GIC_DIST 0x40041000
37#define GIC_CPU 0x40042000
38#define GIC_V2M 0x40046000
39#define GIC_HYP 0x40044000
40#define GIC_VCPU 0x08040000
41#define GIC_ITS 0x08080000
42#define GIC_REDIST 0x080A0000
43
44#define GPIO (RPI_MMIO_BASE + 0x200000)
45#define SPI0 (RPI_MMIO_BASE + 0x204000)
46#define UART0 (RPI_MMIO_BASE + 0x201000)
47#define UART1 0x09040000
48#define RTC 0x09010000
49#define SMMU 0x09050000
50#define VIRT_MMIO 0x0a000000
51#define FW_CFG 0x09020000
52#define PCIE_MMIO 0x10000000
53#define PCIE_PIP 0x3eff0000
54#define PCIE_ECAM 0x3f000000
55
56/* IRQ Mappings to GIC*/
57#define UART0_IRQ 1
58#define RTC_IRQ 2
59#define PCIE_IRQ 3
60#define GPIO_IRQ 7
61#define UART1_IRQ 8
62#define ACPI_GED 9
63
64#define VIDEOCORE_MBOX (RPI_MMIO_BASE + 0x00b880)
65
66#define MBOX_RESPONSE 0x80000000
67#define MBOX_FULL 0x80000000
68#define MBOX_EMPTY 0x40000000
69
70#define MBOX_REQUEST 0
71#define MBOX_CH_POWER 0
72#define MBOX_CH_FB 1
73#define MBOX_CH_VUART 2
74#define MBOX_CH_VCHIQ 3
75#define MBOX_CH_LEDS 4
76#define MBOX_CH_BTNS 5
77#define MBOX_CH_TOUCH 6
78#define MBOX_CH_COUNT 7
79#define MBOX_CH_PROP 8
80
81#define MBOX_TAG_GETSERIAL 0x1004
82#define MBOX_TAG_SETCLKRATE 0x38002
83#define MBOX_TAG_LAST 0
84
85#define PCIE_ECAM 0x10000000ULL
86
87#define UART0_DR ((volatile uint32_t*)(UART0 + 0x00))
88#define UART0_FR ((volatile uint32_t*)(UART0 + 0x18))
89
90#endif
91
92#endif