1 From c03f551cab8fe38de8f0e1781f0e2e339419b003 Mon Sep 17 00:00:00 2001
2 From: Andrei Gherzan <andrei@balena.io>
3 Date: Wed, 17 Jul 2019 15:33:01 +0100
4 Subject: [PATCH 3/7] arm: mach-bcm283x: Define configs for RaspberryPi 4
6 Define two target configs for Raspberry Pi 4 (32 and 64bit) and the
7 corresponding BCM2838* configs.
9 Be aware of the current limitation in firmware which requires an
10 explicit configuration to force the arm in 64bit mode when the
11 respective target is used.
13 Signed-off-by: Andrei Gherzan <andrei@balena.io>
14 Signed-off-by: Matthias Brugger <mbrugger@suse.com>
15 Upstream-status: Pending
17 arch/arm/mach-bcm283x/Kconfig | 62 +++++++++++++++++++++++++++++++++++
18 1 file changed, 62 insertions(+)
20 diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
21 index 8e69914a83..09a5b42bbb 100644
22 --- a/arch/arm/mach-bcm283x/Kconfig
23 +++ b/arch/arm/mach-bcm283x/Kconfig
24 @@ -26,6 +26,23 @@ config BCM2837_64B
29 + bool "Broadcom BCM2838 SoC support"
30 + depends on ARCH_BCM283X
33 + bool "Broadcom BCM2838 SoC 32-bit support"
34 + depends on ARCH_BCM283X
40 + bool "Broadcom BCM2838 SoC 64-bit support"
41 + depends on ARCH_BCM283X
45 menu "Broadcom BCM283X family"
46 depends on ARCH_BCM283X
48 @@ -127,6 +144,50 @@ config TARGET_RPI_3
49 This option creates a build targeting the ARMv8/AArch64 ISA.
52 +config TARGET_RPI_4_32B
53 + bool "Raspberry Pi 4 32-bit build"
55 + Support for all BCM2838-based Raspberry Pi variants, such as
56 + the RPi 4 model B, in AArch32 (32-bit) mode.
58 + This option assumes the VideoCore firmware is configured to use the
59 + mini UART (rather than PL011) for the serial console. This is the
60 + default on the RPi 4. To enable the UART console, the following non-
61 + default option must be present in config.txt: enable_uart=1. This is
62 + required for U-Boot to operate correctly, even if you only care
63 + about the HDMI/usbkbd console.
65 + Due to hardware incompatibilities, this can't be used with
68 + This option creates a build targeting the ARMv7/AArch32 ISA.
72 + bool "Raspberry Pi 4 64-bit build"
74 + Support for all BCM2838-based Raspberry Pi variants, such as
75 + the RPi 4 model B, in AArch64 (64-bit) mode.
77 + This option assumes the VideoCore firmware is configured to use the
78 + mini UART (rather than PL011) for the serial console. This is the
79 + default on the RPi 4. To enable the UART console, the following non-
80 + default option must be present in config.txt: enable_uart=1. This is
81 + required for U-Boot to operate correctly, even if you only care
82 + about the HDMI/usbkbd console.
84 + Due to hardware incompatibilities, this can't be used with
87 + Also, due to a bug in firmware, switching to 64bit mode doesn't
88 + happen automatically based on the kernel's image filename. See
89 + https://github.com/raspberrypi/firmware/issues/1193 for more details.
90 + Until that is resolved, the configuration (config.txt) needs to
91 + explicitly set: arm_64bit=1.
93 + This option creates a build targeting the ARMv8/AArch64 ISA.
99 @@ -145,5 +206,6 @@ config BCM283x_BASE
101 default "0x20000000" if BCM2835
102 default "0x3f000000" if BCM2836 || BCM2837
103 + default "0xfe000000" if BCM2838