[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [RFC PATCH 14/14] hw/arm/raspi: Add the Raspberry Pi 4B board
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-arm] [RFC PATCH 14/14] hw/arm/raspi: Add the Raspberry Pi 4B board |
Date: |
Wed, 4 Sep 2019 19:13:15 +0200 |
The Raspberry Pi 4 uses a BCM2711 SoC (based on a BCM2838).
The SoC can handle up to 8GiB of SDRAM, but we limit it to 4GiB
(no 8GiB models in the market yet).
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/arm/raspi.c | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index b4db39661f..59ee2f82b4 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -39,11 +39,13 @@ enum BoardIdChip {
C_BCM2835 = 0,
C_BCM2836 = 1,
C_BCM2837 = 2,
+ C_BCM2711 = 3,
};
enum BoardIdType {
T_2B = 0x04,
T_3B = 0x08,
+ T_4B = 0x11,
};
enum BoardIdRevision {
@@ -56,6 +58,7 @@ enum BoardIdRevision {
static const char *processor_typename[] = {
[C_BCM2836] = TYPE_BCM2836,
[C_BCM2837] = TYPE_BCM2837,
+ [C_BCM2711] = TYPE_BCM2838,
};
typedef struct BoardInfo BoardInfo;
@@ -90,6 +93,12 @@ static const BoardInfo bcm283x_boards[] = {
.ram_size_min = 1 * GiB,
.ram_size_max = 1 * GiB,
},
+ [4] = {
+ .board_id = 0xc42,
+ .board_rev = { T_4B, R_1_1, C_BCM2711, M_SONY_UK },
+ .ram_size_min = 1 * GiB,
+ .ram_size_max = 4 * GiB,
+ },
};
typedef struct RasPiState {
@@ -336,4 +345,24 @@ static void raspi3_machine_init(MachineClass *mc)
mc->default_ram_size = 1 * GiB;
}
DEFINE_MACHINE("raspi3", raspi3_machine_init)
-#endif
+
+static void raspi4_init(MachineState *machine)
+{
+ raspi_init(machine, 4);
+}
+
+static void raspi4_machine_init(MachineClass *mc)
+{
+ mc->desc = "Raspberry Pi 4B";
+ mc->init = raspi4_init;
+ mc->block_default_type = IF_SD;
+ mc->no_parallel = 1;
+ mc->no_floppy = 1;
+ mc->no_cdrom = 1;
+ mc->max_cpus = BCM283X_NCPUS;
+ mc->min_cpus = BCM283X_NCPUS;
+ mc->default_cpus = BCM283X_NCPUS;
+ mc->default_ram_size = 1 * GiB;
+}
+DEFINE_MACHINE("raspi4", raspi4_machine_init)
+#endif /* TARGET_AARCH64 */
--
2.20.1
- [Qemu-arm] [PATCH 09/14] hw/arm/raspi: Make the board code modular, (continued)
- [Qemu-arm] [PATCH 09/14] hw/arm/raspi: Make the board code modular, Philippe Mathieu-Daudé, 2019/09/04
- [Qemu-arm] [PATCH 11/14] hw/arm/bcm2835_peripherals: Map various BCM2838 blocks, Philippe Mathieu-Daudé, 2019/09/04
- [Qemu-arm] [PATCH 10/14] hw/arm/raspi: Define various blocks base addresses, Philippe Mathieu-Daudé, 2019/09/04
- [Qemu-arm] [RFC PATCH 12/14] hw/arm/bcm2836: Add the BCM2838 which uses a GICv2, Philippe Mathieu-Daudé, 2019/09/04
- [Qemu-arm] [RFC PATCH 13/14] hw/arm/bcm2838: Map the PCIe memory space, Philippe Mathieu-Daudé, 2019/09/04
- [Qemu-arm] [RFC PATCH 14/14] hw/arm/raspi: Add the Raspberry Pi 4B board,
Philippe Mathieu-Daudé <=
- RE: [Qemu-arm] [RFC PATCH 00/14] hw/arm: Add the Raspberry Pi 4B, Stewart Hildebrand, 2019/09/21