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