From patchwork Wed Jul 24 14:39:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Gherzan X-Patchwork-Id: 1136372 X-Patchwork-Delegate: matthias.bgg@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=balena.io Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45tyl70FC2z9s3l for ; Thu, 25 Jul 2019 00:43:30 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A8034C21DF3; Wed, 24 Jul 2019 14:40:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4C777C21DCA; Wed, 24 Jul 2019 14:40:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 474FDC21D74; Wed, 24 Jul 2019 14:39:39 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by lists.denx.de (Postfix) with ESMTPS id 55C9DC21D4A for ; Wed, 24 Jul 2019 14:39:37 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id s15so20507009wmj.3 for ; Wed, 24 Jul 2019 07:39:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pWvZ588J48xOgvZOVW9fhkWibsiRtNBVuM4VBynrLQw=; b=Am1Me0M/J3HedD2FzOBBvEpBhsNfG5psGW0Lap+uSDun9LynEo+RqAgmLAAp3KtUFD vUkieSMQZAjAIyzy8ySvUjuVA8iEUPN8wbo55HZ+3X5HfhgsbMwu70KZDA9UBw1T4v6V CE1pyL9enGgcwdDiTcXztZo57iM/vq1B6HilY8J27ZJFb9fJNH4L7IxE4O/febLJ4ljc micbK/014Ibg6DqlmHbBh4akENSDlXOrQLqMC8FdK0lsJIP7EH9Xqc6MubvgCzyhvS89 xPFsmuRVAZVvpnQ6+mcSidfeiyYCMXh2IE8wgKExlyysSAjkZPC8Z+1H2qOnvOz+XEjX GVrg== X-Gm-Message-State: APjAAAVcUgx+4UkyQKJDr3/tCu0zV2vBZk5reX2ukIrxHlkjQSBTYuSa Napy/FHrIjVsWObEdv0xTsrwwqT8 X-Google-Smtp-Source: APXvYqz1dOMBUWbTH/jK138AvmFcmCjdMc9s6oLE6NbSPeUiM4M0S3istSFU+IBlBRGqC2zlitzAQg== X-Received: by 2002:a7b:cc86:: with SMTP id p6mr69114900wma.123.1563979176511; Wed, 24 Jul 2019 07:39:36 -0700 (PDT) Received: from localhost.localdomain ([212.36.34.46]) by smtp.gmail.com with ESMTPSA id n14sm84860651wra.75.2019.07.24.07.39.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 07:39:35 -0700 (PDT) From: Andrei Gherzan To: u-boot@lists.denx.de Date: Wed, 24 Jul 2019 15:39:06 +0100 Message-Id: <20190724143911.29770-4-andrei@balena.io> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724143911.29770-1-andrei@balena.io> References: <20190716133803.1174-1-andrei@gherzan.ro> <20190724143911.29770-1-andrei@balena.io> MIME-Version: 1.0 Cc: mbrugger@suse.com, Andrei Gherzan Subject: [U-Boot] [PATCH v2 3/8] ARM: bcm283x: Define configs for RaspberryPi 4 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Define two target configs for Raspberry Pi 4 (32 and 64bit) and the corresponding BCM2838* configs. Be aware of the current limitation in firmware which requires an explicit configuration to force the arm in 64bit mode when the respective target is used. Signed-off-by: Andrei Gherzan Signed-off-by: Matthias Brugger --- arch/arm/mach-bcm283x/Kconfig | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig index 8e69914a83..09a5b42bbb 100644 --- a/arch/arm/mach-bcm283x/Kconfig +++ b/arch/arm/mach-bcm283x/Kconfig @@ -26,6 +26,23 @@ config BCM2837_64B select BCM2837 select ARM64 +config BCM2838 + bool "Broadcom BCM2838 SoC support" + depends on ARCH_BCM283X + +config BCM2838_32B + bool "Broadcom BCM2838 SoC 32-bit support" + depends on ARCH_BCM283X + select BCM2838 + select ARMV7_LPAE + select CPU_V7A + +config BCM2838_64B + bool "Broadcom BCM2838 SoC 64-bit support" + depends on ARCH_BCM283X + select BCM2838 + select ARM64 + menu "Broadcom BCM283X family" depends on ARCH_BCM283X @@ -127,6 +144,50 @@ config TARGET_RPI_3 This option creates a build targeting the ARMv8/AArch64 ISA. select BCM2837_64B +config TARGET_RPI_4_32B + bool "Raspberry Pi 4 32-bit build" + help + Support for all BCM2838-based Raspberry Pi variants, such as + the RPi 4 model B, in AArch32 (32-bit) mode. + + This option assumes the VideoCore firmware is configured to use the + mini UART (rather than PL011) for the serial console. This is the + default on the RPi 4. To enable the UART console, the following non- + default option must be present in config.txt: enable_uart=1. This is + required for U-Boot to operate correctly, even if you only care + about the HDMI/usbkbd console. + + Due to hardware incompatibilities, this can't be used with + BCM283/5/6/7. + + This option creates a build targeting the ARMv7/AArch32 ISA. + select BCM2838_32B + +config TARGET_RPI_4 + bool "Raspberry Pi 4 64-bit build" + help + Support for all BCM2838-based Raspberry Pi variants, such as + the RPi 4 model B, in AArch64 (64-bit) mode. + + This option assumes the VideoCore firmware is configured to use the + mini UART (rather than PL011) for the serial console. This is the + default on the RPi 4. To enable the UART console, the following non- + default option must be present in config.txt: enable_uart=1. This is + required for U-Boot to operate correctly, even if you only care + about the HDMI/usbkbd console. + + Due to hardware incompatibilities, this can't be used with + BCM283/5/6/7. + + Also, due to a bug in firmware, switching to 64bit mode doesn't + happen automatically based on the kernel's image filename. See + https://github.com/raspberrypi/firmware/issues/1193 for more details. + Until that is resolved, the configuration (config.txt) needs to + explicitly set: arm_64bit=1. + + This option creates a build targeting the ARMv8/AArch64 ISA. + select BCM2838_64B + endchoice config SYS_BOARD @@ -145,5 +206,6 @@ config BCM283x_BASE hex default "0x20000000" if BCM2835 default "0x3f000000" if BCM2836 || BCM2837 + default "0xfe000000" if BCM2838 endmenu