From 32a84c9e02674a594229e739836ebc38939b52a5 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:07 +0100 Subject: RPI: Add entry for Raspberry Pi 4 model B The Raspebrry Pi 4 uses the new revision code scheme as documented by the foundation. This change adds an entry for this board as well. Signed-off-by: Andrei Gherzan Signed-off-by: Matthias Brugger --- board/raspberrypi/rpi/rpi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board') diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 7a6ca8f..b57df21 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -148,6 +148,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { DTB_DIR "bcm2837-rpi-cm3.dtb", false, }, + [0x11] = { + "4 Model B", + DTB_DIR "bcm2711-rpi-4-b.dtb", + true, + }, }; static const struct rpi_model rpi_models_old_scheme[] = { -- cgit v1.1 From c796140ff363c0a5c8914e94c984791b55746268 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:10 +0100 Subject: RPI: Add memory map for bcm2711 Define the memory map for the BCM2711 based on the dt configuration available in the Raspberry Pi kernel fork. Signed-off-by: Andrei Gherzan [mb: BCM2838 -> BCM2711] Signed-off-by: Matthias Brugger --- board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'board') diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index b57df21..fa57d50 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -249,7 +249,8 @@ static uint32_t rev_type; static const struct rpi_model *model; #ifdef CONFIG_ARM64 -static struct mm_region bcm2837_mem_map[] = { +#ifndef CONFIG_BCM2711 +static struct mm_region bcm283x_mem_map[] = { { .virt = 0x00000000UL, .phys = 0x00000000UL, @@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = { 0, } }; - -struct mm_region *mem_map = bcm2837_mem_map; +#else +static struct mm_region bcm283x_mem_map[] = { + { + .virt = 0x00000000UL, + .phys = 0x00000000UL, + .size = 0xfe000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + .virt = 0xfe000000UL, + .phys = 0xfe000000UL, + .size = 0x01800000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN + }, { + /* List terminator */ + 0, + } +}; +#endif +struct mm_region *mem_map = bcm283x_mem_map; #endif int dram_init(void) -- cgit v1.1