Antonio Nino Diaz | ae6779e | 2017-11-06 14:49:04 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef __RPI3_HW__ |
| 8 | #define __RPI3_HW__ |
| 9 | |
| 10 | #include <utils_def.h> |
| 11 | |
| 12 | /* |
| 13 | * Peripherals |
| 14 | */ |
| 15 | |
| 16 | #define RPI3_IO_BASE ULL(0x3F000000) |
| 17 | #define RPI3_IO_SIZE ULL(0x01000000) |
| 18 | |
| 19 | /* |
| 20 | * Serial port (called 'Mini UART' in the BCM docucmentation). |
| 21 | */ |
| 22 | #define RPI3_IO_MINI_UART_OFFSET ULL(0x00215040) |
| 23 | #define RPI3_MINI_UART_BASE (RPI3_IO_BASE + RPI3_IO_MINI_UART_OFFSET) |
| 24 | #define RPI3_MINI_UART_CLK_IN_HZ ULL(500000000) |
| 25 | |
| 26 | /* |
| 27 | * Power management, reset controller, watchdog. |
| 28 | */ |
| 29 | #define RPI3_IO_PM_OFFSET ULL(0x00100000) |
| 30 | #define RPI3_PM_BASE (RPI3_IO_BASE + RPI3_IO_PM_OFFSET) |
| 31 | /* Registers on top of RPI3_PM_BASE. */ |
| 32 | #define RPI3_PM_RSTC_OFFSET ULL(0x0000001C) |
| 33 | #define RPI3_PM_WDOG_OFFSET ULL(0x00000024) |
| 34 | /* Watchdog constants */ |
| 35 | #define RPI3_PM_PASSWORD ULL(0x5A000000) |
| 36 | #define RPI3_PM_RSTC_WRCFG_MASK ULL(0x00000030) |
| 37 | #define RPI3_PM_RSTC_WRCFG_FULL_RESET ULL(0x00000020) |
| 38 | |
| 39 | /* |
| 40 | * Local interrupt controller |
| 41 | */ |
| 42 | #define RPI3_INTC_BASE_ADDRESS ULL(0x40000000) |
| 43 | /* Registers on top of RPI3_INTC_BASE_ADDRESS */ |
| 44 | #define RPI3_INTC_CONTROL_OFFSET ULL(0x00000000) |
| 45 | #define RPI3_INTC_PRESCALER_OFFSET ULL(0x00000008) |
| 46 | #define RPI3_INTC_MBOX_CONTROL_OFFSET ULL(0x00000050) |
| 47 | #define RPI3_INTC_MBOX_CONTROL_SLOT3_FIQ ULL(0x00000080) |
| 48 | #define RPI3_INTC_PENDING_FIQ_OFFSET ULL(0x00000070) |
| 49 | #define RPI3_INTC_PENDING_FIQ_MBOX3 ULL(0x00000080) |
| 50 | |
| 51 | #endif /* __RPI3_HW__ */ |