From patchwork Wed Sep 4 17:13:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11131145 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAF3D14E5 for ; Wed, 4 Sep 2019 17:24:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B22092087E for ; Wed, 4 Sep 2019 17:24:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dGyo3sSR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B22092087E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Z1F-0003Ij-9A for patchwork-qemu-devel@patchwork.kernel.org; Wed, 04 Sep 2019 13:24:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48631) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Yqo-0001lf-0N for qemu-devel@nongnu.org; Wed, 04 Sep 2019 13:13:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Yql-0007BO-Rz for qemu-devel@nongnu.org; Wed, 04 Sep 2019 13:13:45 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54461) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5Yql-0007Am-EV; Wed, 04 Sep 2019 13:13:43 -0400 Received: by mail-wm1-x344.google.com with SMTP id k2so4122799wmj.4; Wed, 04 Sep 2019 10:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S7qhLshgv8PC8yoBGkMqEzXE2knLg4gMrxiA4d+K3Q4=; b=dGyo3sSR6uVtDir2QlRv6W4C/7BKr7vf0E/P/R5Hn4SRjQZ1GWlLhy9QRhIhMzIUZB izQwPHqe+gcqBElAT5hxOlkorLat4II+sM5Gh0Vgcu2WUwky+JK1gDzDXCLmRPi7leeA zcynqY2BObh8zN1IKSa7NxVtUknIf81gMd2K9qwTB8IQUjBNsYE23LWiK4NDIsTDYBVB IoIr2Ws3dF5KsI2S3Une0Go/ZPahwWsg1yq42Ynr3NqqVntsbWc4qyHNCmGhxZIurVDi z9q2sDDDyRy74iMnvVV9x5N7kZdQ+S/5nD8LnbzewYdgV0yKxp9Gmu1MHr3+unbqx6op 38hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=S7qhLshgv8PC8yoBGkMqEzXE2knLg4gMrxiA4d+K3Q4=; b=bvDCGagMDdahgpiONJdAS5PT7BwwNXDY8xi/tQNkGg10nMZvyCINMNjgrL+MUJO7Sj OEt2+RQ+7TN6YErPKphl9ZnzmiG8Y8ActoSeMIbi+0KiaRcCvHXtsfxq/66rmlNd3CV2 RqTP+IFxj6NTzPDOz3ySp9W1hNRd1AGgZbvx3nuvBuH9ZrvPgUEHuQkGUKHHbGQxgNjj Ec9jUFPuMNZJl5mh6f1vgZMmNil9v5V2hpviDv1cyFo6Ry4YvZNgszyXp+h9FTtv1mAG WfiJRhQlsgxJHTLzUBMlVVwvDDDyh4xT0mRr+U7b6ejDfwF3e2V383JgIFvekqFDzs9J mqOQ== X-Gm-Message-State: APjAAAWxNRhWS5JdMmJft1707mIHtkc9xslysXTAGv/2qSaxXQhsyiG9 UrlUqAUpsfQt7TZMN8Xlfi4= X-Google-Smtp-Source: APXvYqwb+qEXd9UBIbhWFdBp7a2PntQMMVxI+YBAKS6LSrEv/iCIhobmuvObBkPJ5JNlXx4E0J5IRg== X-Received: by 2002:a1c:4b11:: with SMTP id y17mr5254736wma.2.1567617222530; Wed, 04 Sep 2019 10:13:42 -0700 (PDT) Received: from x1w.redhat.com ([195.166.127.210]) by smtp.gmail.com with ESMTPSA id p19sm2339512wmg.31.2019.09.04.10.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 10:13:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Esteban Bosse , Andrew Baumann , qemu-devel@nongnu.org, Pekka Enberg , =?utf-8?q?Zolt=C3=A1n_Baldaszti?= Date: Wed, 4 Sep 2019 19:13:15 +0200 Message-Id: <20190904171315.8354-15-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190904171315.8354-1-f4bug@amsat.org> References: <20190904171315.8354-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [RFC PATCH 14/14] hw/arm/raspi: Add the Raspberry Pi 4B board X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, Clement Deschamps , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Luc Michel Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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é Reviewed-by: Esteban Bosse Reviewed-by: Esteban Bosse --- 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 */