diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-07-12 13:38:53 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-07-14 02:15:55 +0100 |
commit | 4f2f66a280534c249ad8624e1492610355cfc60c (patch) | |
tree | eb63a1a6ca458b7f4787767c0f73bcf9445456c5 /plat/rpi3/rpi3_hw.h | |
parent | 42ba8f747b154fbc349bfbccd47b5fdd6b4f6d81 (diff) | |
download | platform_external_arm-trusted-firmware-4f2f66a280534c249ad8624e1492610355cfc60c.tar.gz platform_external_arm-trusted-firmware-4f2f66a280534c249ad8624e1492610355cfc60c.tar.bz2 platform_external_arm-trusted-firmware-4f2f66a280534c249ad8624e1492610355cfc60c.zip |
rpi3: Detect board revision
Implement VideoCore mailbox interface driver and use it to get the board
revision identifier.
For now it is only used to print the model for debug purposes.
This wiki contains the documentation of the mailbox interface:
https://github.com/raspberrypi/firmware/wiki
Change-Id: I11943b99b52cc1409f4a195ebe58eb44ae5b1d6c
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'plat/rpi3/rpi3_hw.h')
-rw-r--r-- | plat/rpi3/rpi3_hw.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plat/rpi3/rpi3_hw.h b/plat/rpi3/rpi3_hw.h index f411acbca..a83a0ad16 100644 --- a/plat/rpi3/rpi3_hw.h +++ b/plat/rpi3/rpi3_hw.h @@ -17,6 +17,27 @@ #define RPI3_IO_SIZE ULL(0x01000000) /* + * ARM <-> VideoCore mailboxes + */ +#define RPI3_MBOX_OFFSET ULL(0x0000B880) +#define RPI3_MBOX_BASE (RPI3_IO_BASE + RPI3_MBOX_OFFSET) +/* VideoCore -> ARM */ +#define RPI3_MBOX0_READ_OFFSET ULL(0x00000000) +#define RPI3_MBOX0_PEEK_OFFSET ULL(0x00000010) +#define RPI3_MBOX0_SENDER_OFFSET ULL(0x00000014) +#define RPI3_MBOX0_STATUS_OFFSET ULL(0x00000018) +#define RPI3_MBOX0_CONFIG_OFFSET ULL(0x0000001C) +/* ARM -> VideoCore */ +#define RPI3_MBOX1_WRITE_OFFSET ULL(0x00000020) +#define RPI3_MBOX1_PEEK_OFFSET ULL(0x00000030) +#define RPI3_MBOX1_SENDER_OFFSET ULL(0x00000034) +#define RPI3_MBOX1_STATUS_OFFSET ULL(0x00000038) +#define RPI3_MBOX1_CONFIG_OFFSET ULL(0x0000003C) +/* Mailbox status constants */ +#define RPI3_MBOX_STATUS_FULL_MASK U(0x80000000) /* Set if full */ +#define RPI3_MBOX_STATUS_EMPTY_MASK U(0x40000000) /* Set if empty */ + +/* * Power management, reset controller, watchdog. */ #define RPI3_IO_PM_OFFSET ULL(0x00100000) |