select BCM2837
select CPU_V7
+config TARGET_RPI_3
+ bool "Raspberry Pi 3 64-bit build"
+ select ARM64
+ select BCM2837
+
endchoice
config SYS_BOARD
default "rpi" if TARGET_RPI
default "rpi_2" if TARGET_RPI_2
default "rpi_3_32b" if TARGET_RPI_3_32B
+ default "rpi_3" if TARGET_RPI_3
config SYS_VENDOR
default "raspberrypi"
default "rpi" if TARGET_RPI
default "rpi_2" if TARGET_RPI_2
default "rpi_3_32b" if TARGET_RPI_3_32B
+ default "rpi_3" if TARGET_RPI_3
endmenu
#include <asm/global_data.h>
#include <dm/platform_data/serial_pl01x.h>
#include <dm/platform_data/serial_bcm283x_mu.h>
+#ifdef CONFIG_ARM64
+#include <asm/armv8/mmu.h>
+#endif
DECLARE_GLOBAL_DATA_PTR;
static uint32_t rev_type;
static const struct rpi_model *model;
+#ifdef CONFIG_ARM64
+static struct mm_region bcm2837_mem_map[] = {
+ {
+ .base = 0x00000000UL,
+ .size = 0x3f000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+ PTE_BLOCK_INNER_SHARE
+ }, {
+ .base = 0x3f000000UL,
+ .size = 0x01000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+ PTE_BLOCK_NON_SHARE |
+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
+ }, {
+ /* List terminator */
+ 0,
+ }
+};
+
+struct mm_region *mem_map = bcm2837_mem_map;
+#endif
+
int dram_init(void)
{
ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_arm_mem, msg, 1);
--- /dev/null
+RPI_3_BOARD
+M: Stephen Warren <swarren@wwwdotorg.org>
+S: Maintained
+F: board/raspberrypi/rpi_3/
+F: include/configs/rpi_3.h
+F: configs/rpi_3_defconfig
--- /dev/null
+#
+# (C) Copyright 2012-2016 Stephen Warren <swarren@wwwdotorg.org>
+#
+# SPDX-License-Identifier: GPL-2.0
+#
+
+obj-y := ../rpi/rpi.o
--- /dev/null
+CONFIG_ARM=y
+CONFIG_ARCH_BCM283X=y
+CONFIG_TARGET_RPI_3=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_SYS_PROMPT="U-Boot> "
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_PHYS_TO_BUS=y
+CONFIG_OF_LIBFDT=y
/* Architecture, CPU, etc.*/
#define CONFIG_ARCH_CPU_INIT
+/* Use SoC timer for AArch32, but architected timer for AArch64 */
+#ifndef CONFIG_ARM64
#define CONFIG_SYS_TIMER_RATE 1000000
#define CONFIG_SYS_TIMER_COUNTER \
(&((struct bcm2835_timer_regs *)BCM2835_TIMER_PHYSADDR)->clo)
+#endif
/*
* 2835 is a SKU in a series for which the 2708 is the first or primary SoC,
--- /dev/null
+/*
+ * (C) Copyright 2012-2016 Stephen Warren <swarren@wwwdotorg.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_SYS_CACHELINE_SIZE 64
+
+#include "rpi-common.h"
+
+#endif