diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-10-22 14:03:43 +0200 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2019-10-23 11:35:53 +0100 |
commit | 4776ecc5325978c09d3c9c92379693797db9de78 (patch) | |
tree | 5373e44f97a7e43123cb6879005e42fbc44dee6c | |
parent | cee2557dc872ddaf721e6badb981c7772503f8ea (diff) | |
download | meta-raspberrypi-4776ecc5325978c09d3c9c92379693797db9de78.tar.gz |
u-boot: drop patches for RPi4 merged upstream.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
10 files changed, 0 insertions, 511 deletions
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch b/recipes-bsp/u-boot/u-boot-2019.07/0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch deleted file mode 100644 index 391b26a..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | From 5bf85d04b440ce874310e701abded823dc1864bc Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei@balena.io> | ||
3 | Date: Wed, 17 Jul 2019 15:32:11 +0100 | ||
4 | Subject: [PATCH 1/7] configs: rpi4: Add defconfigs for rpi4 (32/64) | ||
5 | |||
6 | This defines a minimum defconfig for each of the two Raspberry Pi 4 | ||
7 | variants. One notable difference is that we don't have a embedded dt for | ||
8 | this board given that the fw supplies us with one which we can reuse. | ||
9 | Furthermore, the ram size is not queryable through mbox interface as the | ||
10 | maximum reported size is 1G. The fw patches the dt with the right | ||
11 | memory configuration and uboot uses it as it is. We avoid u-boot | ||
12 | touching this configuration by making sure CONFIG_ARCH_FIXUP_FDT_MEMORY | ||
13 | is deactivated. | ||
14 | |||
15 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
16 | Upstream-status: Pending | ||
17 | --- | ||
18 | configs/rpi_4_32b_defconfig | 33 +++++++++++++++++++++++++++++++++ | ||
19 | configs/rpi_4_defconfig | 33 +++++++++++++++++++++++++++++++++ | ||
20 | 2 files changed, 66 insertions(+) | ||
21 | create mode 100644 configs/rpi_4_32b_defconfig | ||
22 | create mode 100644 configs/rpi_4_defconfig | ||
23 | |||
24 | diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig | ||
25 | new file mode 100644 | ||
26 | index 0000000000..a31a617a5f | ||
27 | --- /dev/null | ||
28 | +++ b/configs/rpi_4_32b_defconfig | ||
29 | @@ -0,0 +1,33 @@ | ||
30 | +CONFIG_ARM=y | ||
31 | +CONFIG_ARCH_BCM283X=y | ||
32 | +CONFIG_SYS_TEXT_BASE=0x00008000 | ||
33 | +CONFIG_TARGET_RPI_4_32B=y | ||
34 | +CONFIG_SYS_MALLOC_F_LEN=0x2000 | ||
35 | +CONFIG_DISTRO_DEFAULTS=y | ||
36 | +CONFIG_NR_DRAM_BANKS=1 | ||
37 | +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set | ||
38 | +CONFIG_OF_BOARD=y | ||
39 | +CONFIG_OF_BOARD_SETUP=y | ||
40 | +CONFIG_MISC_INIT_R=y | ||
41 | +# CONFIG_DISPLAY_CPUINFO is not set | ||
42 | +# CONFIG_DISPLAY_BOARDINFO is not set | ||
43 | +CONFIG_SYS_PROMPT="U-Boot> " | ||
44 | +# CONFIG_CMD_FLASH is not set | ||
45 | +CONFIG_CMD_GPIO=y | ||
46 | +CONFIG_CMD_MMC=y | ||
47 | +CONFIG_CMD_FS_UUID=y | ||
48 | +CONFIG_ENV_FAT_INTERFACE="mmc" | ||
49 | +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" | ||
50 | +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y | ||
51 | +CONFIG_DM_KEYBOARD=y | ||
52 | +CONFIG_DM_MMC=y | ||
53 | +CONFIG_MMC_SDHCI=y | ||
54 | +CONFIG_MMC_SDHCI_BCM2835=y | ||
55 | +CONFIG_PINCTRL=y | ||
56 | +# CONFIG_PINCTRL_GENERIC is not set | ||
57 | +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set | ||
58 | +CONFIG_DM_VIDEO=y | ||
59 | +CONFIG_SYS_WHITE_ON_BLACK=y | ||
60 | +CONFIG_CONSOLE_SCROLL_LINES=10 | ||
61 | +CONFIG_PHYS_TO_BUS=y | ||
62 | +CONFIG_OF_LIBFDT_OVERLAY=y | ||
63 | diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig | ||
64 | new file mode 100644 | ||
65 | index 0000000000..da8c960a2a | ||
66 | --- /dev/null | ||
67 | +++ b/configs/rpi_4_defconfig | ||
68 | @@ -0,0 +1,33 @@ | ||
69 | +CONFIG_ARM=y | ||
70 | +CONFIG_ARCH_BCM283X=y | ||
71 | +CONFIG_SYS_TEXT_BASE=0x00080000 | ||
72 | +CONFIG_TARGET_RPI_4=y | ||
73 | +CONFIG_SYS_MALLOC_F_LEN=0x2000 | ||
74 | +CONFIG_DISTRO_DEFAULTS=y | ||
75 | +CONFIG_NR_DRAM_BANKS=1 | ||
76 | +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set | ||
77 | +CONFIG_OF_BOARD=y | ||
78 | +CONFIG_OF_BOARD_SETUP=y | ||
79 | +CONFIG_MISC_INIT_R=y | ||
80 | +# CONFIG_DISPLAY_CPUINFO is not set | ||
81 | +# CONFIG_DISPLAY_BOARDINFO is not set | ||
82 | +CONFIG_SYS_PROMPT="U-Boot> " | ||
83 | +# CONFIG_CMD_FLASH is not set | ||
84 | +CONFIG_CMD_GPIO=y | ||
85 | +CONFIG_CMD_MMC=y | ||
86 | +CONFIG_CMD_FS_UUID=y | ||
87 | +CONFIG_ENV_FAT_INTERFACE="mmc" | ||
88 | +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" | ||
89 | +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y | ||
90 | +CONFIG_DM_KEYBOARD=y | ||
91 | +CONFIG_DM_MMC=y | ||
92 | +CONFIG_MMC_SDHCI=y | ||
93 | +CONFIG_MMC_SDHCI_BCM2835=y | ||
94 | +CONFIG_PINCTRL=y | ||
95 | +# CONFIG_PINCTRL_GENERIC is not set | ||
96 | +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set | ||
97 | +CONFIG_DM_VIDEO=y | ||
98 | +CONFIG_SYS_WHITE_ON_BLACK=y | ||
99 | +CONFIG_CONSOLE_SCROLL_LINES=10 | ||
100 | +CONFIG_PHYS_TO_BUS=y | ||
101 | +CONFIG_OF_LIBFDT_OVERLAY=y | ||
102 | -- | ||
103 | 2.22.0 | ||
104 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch b/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch deleted file mode 100644 index fcf91a6..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | From df2aa4c6be33b468adc09de337a055556d1f37fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Matthias Brugger <mbrugger@suse.com> | ||
3 | Date: Fri, 12 Jul 2019 18:20:53 +0200 | ||
4 | Subject: [PATCH 2/7] ARM: bcm283x: Add BCM283x_BASE define | ||
5 | |||
6 | Devices of bcm283x have different base address, depending if they are on | ||
7 | bcm2835 or bcm2836/7. Use BCM283x_BASE depending on the SoC you want to | ||
8 | build and only add the offset in the header files. | ||
9 | |||
10 | Signed-off-by: Matthias Brugger <mbrugger@suse.com> | ||
11 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
12 | Upstream-status: Pending | ||
13 | --- | ||
14 | arch/arm/mach-bcm283x/Kconfig | 5 +++++ | ||
15 | arch/arm/mach-bcm283x/include/mach/mbox.h | 6 +----- | ||
16 | arch/arm/mach-bcm283x/include/mach/sdhci.h | 6 +----- | ||
17 | arch/arm/mach-bcm283x/include/mach/timer.h | 6 +----- | ||
18 | arch/arm/mach-bcm283x/include/mach/wdog.h | 6 +----- | ||
19 | 5 files changed, 9 insertions(+), 20 deletions(-) | ||
20 | |||
21 | diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig | ||
22 | index 3eb5a9a897..8e69914a83 100644 | ||
23 | --- a/arch/arm/mach-bcm283x/Kconfig | ||
24 | +++ b/arch/arm/mach-bcm283x/Kconfig | ||
25 | @@ -141,4 +141,9 @@ config SYS_SOC | ||
26 | config SYS_CONFIG_NAME | ||
27 | default "rpi" | ||
28 | |||
29 | +config BCM283x_BASE | ||
30 | + hex | ||
31 | + default "0x20000000" if BCM2835 | ||
32 | + default "0x3f000000" if BCM2836 || BCM2837 | ||
33 | + | ||
34 | endmenu | ||
35 | diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
36 | index e3a893e49c..e44c7577da 100644 | ||
37 | --- a/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
38 | +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
39 | @@ -37,11 +37,7 @@ | ||
40 | |||
41 | /* Raw mailbox HW */ | ||
42 | |||
43 | -#ifndef CONFIG_BCM2835 | ||
44 | -#define BCM2835_MBOX_PHYSADDR 0x3f00b880 | ||
45 | -#else | ||
46 | -#define BCM2835_MBOX_PHYSADDR 0x2000b880 | ||
47 | -#endif | ||
48 | +#define BCM2835_MBOX_PHYSADDR (CONFIG_BCM283x_BASE + 0x0000b880) | ||
49 | |||
50 | struct bcm2835_mbox_regs { | ||
51 | u32 read; | ||
52 | diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h | ||
53 | index 5cb6ec3340..b443c379d8 100644 | ||
54 | --- a/arch/arm/mach-bcm283x/include/mach/sdhci.h | ||
55 | +++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h | ||
56 | @@ -6,11 +6,7 @@ | ||
57 | #ifndef _BCM2835_SDHCI_H_ | ||
58 | #define _BCM2835_SDHCI_H_ | ||
59 | |||
60 | -#ifndef CONFIG_BCM2835 | ||
61 | -#define BCM2835_SDHCI_BASE 0x3f300000 | ||
62 | -#else | ||
63 | -#define BCM2835_SDHCI_BASE 0x20300000 | ||
64 | -#endif | ||
65 | +#define BCM2835_SDHCI_BASE (CONFIG_BCM283x_BASE + 0x00300000) | ||
66 | |||
67 | int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq); | ||
68 | |||
69 | diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h | ||
70 | index 56b0c356bb..014355e759 100644 | ||
71 | --- a/arch/arm/mach-bcm283x/include/mach/timer.h | ||
72 | +++ b/arch/arm/mach-bcm283x/include/mach/timer.h | ||
73 | @@ -6,11 +6,7 @@ | ||
74 | #ifndef _BCM2835_TIMER_H | ||
75 | #define _BCM2835_TIMER_H | ||
76 | |||
77 | -#ifndef CONFIG_BCM2835 | ||
78 | -#define BCM2835_TIMER_PHYSADDR 0x3f003000 | ||
79 | -#else | ||
80 | -#define BCM2835_TIMER_PHYSADDR 0x20003000 | ||
81 | -#endif | ||
82 | +#define BCM2835_TIMER_PHYSADDR (CONFIG_BCM283x_BASE + 0x00003000) | ||
83 | |||
84 | #define BCM2835_TIMER_CS_M3 (1 << 3) | ||
85 | #define BCM2835_TIMER_CS_M2 (1 << 2) | ||
86 | diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h | ||
87 | index 99c88e5df7..00b5e06c3a 100644 | ||
88 | --- a/arch/arm/mach-bcm283x/include/mach/wdog.h | ||
89 | +++ b/arch/arm/mach-bcm283x/include/mach/wdog.h | ||
90 | @@ -6,11 +6,7 @@ | ||
91 | #ifndef _BCM2835_WDOG_H | ||
92 | #define _BCM2835_WDOG_H | ||
93 | |||
94 | -#ifndef CONFIG_BCM2835 | ||
95 | -#define BCM2835_WDOG_PHYSADDR 0x3f100000 | ||
96 | -#else | ||
97 | -#define BCM2835_WDOG_PHYSADDR 0x20100000 | ||
98 | -#endif | ||
99 | +#define BCM2835_WDOG_PHYSADDR (CONFIG_BCM283x_BASE + 0x00100000) | ||
100 | |||
101 | struct bcm2835_wdog_regs { | ||
102 | u32 unknown0[7]; | ||
103 | -- | ||
104 | 2.22.0 | ||
105 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch b/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch deleted file mode 100644 index 029cac4..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
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 | ||
5 | |||
6 | Define two target configs for Raspberry Pi 4 (32 and 64bit) and the | ||
7 | corresponding BCM2838* configs. | ||
8 | |||
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. | ||
12 | |||
13 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
14 | Signed-off-by: Matthias Brugger <mbrugger@suse.com> | ||
15 | Upstream-status: Pending | ||
16 | --- | ||
17 | arch/arm/mach-bcm283x/Kconfig | 62 +++++++++++++++++++++++++++++++++++ | ||
18 | 1 file changed, 62 insertions(+) | ||
19 | |||
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 | ||
25 | select BCM2837 | ||
26 | select ARM64 | ||
27 | |||
28 | +config BCM2838 | ||
29 | + bool "Broadcom BCM2838 SoC support" | ||
30 | + depends on ARCH_BCM283X | ||
31 | + | ||
32 | +config BCM2838_32B | ||
33 | + bool "Broadcom BCM2838 SoC 32-bit support" | ||
34 | + depends on ARCH_BCM283X | ||
35 | + select BCM2838 | ||
36 | + select ARMV7_LPAE | ||
37 | + select CPU_V7A | ||
38 | + | ||
39 | +config BCM2838_64B | ||
40 | + bool "Broadcom BCM2838 SoC 64-bit support" | ||
41 | + depends on ARCH_BCM283X | ||
42 | + select BCM2838 | ||
43 | + select ARM64 | ||
44 | + | ||
45 | menu "Broadcom BCM283X family" | ||
46 | depends on ARCH_BCM283X | ||
47 | |||
48 | @@ -127,6 +144,50 @@ config TARGET_RPI_3 | ||
49 | This option creates a build targeting the ARMv8/AArch64 ISA. | ||
50 | select BCM2837_64B | ||
51 | |||
52 | +config TARGET_RPI_4_32B | ||
53 | + bool "Raspberry Pi 4 32-bit build" | ||
54 | + help | ||
55 | + Support for all BCM2838-based Raspberry Pi variants, such as | ||
56 | + the RPi 4 model B, in AArch32 (32-bit) mode. | ||
57 | + | ||
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. | ||
64 | + | ||
65 | + Due to hardware incompatibilities, this can't be used with | ||
66 | + BCM283/5/6/7. | ||
67 | + | ||
68 | + This option creates a build targeting the ARMv7/AArch32 ISA. | ||
69 | + select BCM2838_32B | ||
70 | + | ||
71 | +config TARGET_RPI_4 | ||
72 | + bool "Raspberry Pi 4 64-bit build" | ||
73 | + help | ||
74 | + Support for all BCM2838-based Raspberry Pi variants, such as | ||
75 | + the RPi 4 model B, in AArch64 (64-bit) mode. | ||
76 | + | ||
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. | ||
83 | + | ||
84 | + Due to hardware incompatibilities, this can't be used with | ||
85 | + BCM283/5/6/7. | ||
86 | + | ||
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. | ||
92 | + | ||
93 | + This option creates a build targeting the ARMv8/AArch64 ISA. | ||
94 | + select BCM2838_64B | ||
95 | + | ||
96 | endchoice | ||
97 | |||
98 | config SYS_BOARD | ||
99 | @@ -145,5 +206,6 @@ config BCM283x_BASE | ||
100 | hex | ||
101 | default "0x20000000" if BCM2835 | ||
102 | default "0x3f000000" if BCM2836 || BCM2837 | ||
103 | + default "0xfe000000" if BCM2838 | ||
104 | |||
105 | endmenu | ||
106 | -- | ||
107 | 2.22.0 | ||
108 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch b/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch deleted file mode 100644 index 7309d2b..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 12fbbd5bc12e225b19d3b4cb193a1bf3d9fa752a Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei@balena.io> | ||
3 | Date: Wed, 17 Jul 2019 15:34:18 +0100 | ||
4 | Subject: [PATCH 4/7] rpi: Add entry for Raspberry Pi 4 model B | ||
5 | |||
6 | The Raspebrry Pi 4 uses the new revision code scheme as documented by | ||
7 | the foundation. This change adds an entry for this board as well. | ||
8 | |||
9 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
10 | Upstream-status: Pending | ||
11 | --- | ||
12 | board/raspberrypi/rpi/rpi.c | 5 +++++ | ||
13 | 1 file changed, 5 insertions(+) | ||
14 | |||
15 | diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c | ||
16 | index 617c892dde..92c6534da6 100644 | ||
17 | --- a/board/raspberrypi/rpi/rpi.c | ||
18 | +++ b/board/raspberrypi/rpi/rpi.c | ||
19 | @@ -148,6 +148,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { | ||
20 | DTB_DIR "bcm2837-rpi-cm3.dtb", | ||
21 | false, | ||
22 | }, | ||
23 | + [0x11] = { | ||
24 | + "4 Model B", | ||
25 | + DTB_DIR "bcm2838-rpi-4-b.dtb", | ||
26 | + true, | ||
27 | + }, | ||
28 | }; | ||
29 | |||
30 | static const struct rpi_model rpi_models_old_scheme[] = { | ||
31 | -- | ||
32 | 2.22.0 | ||
33 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch b/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch deleted file mode 100644 index 44847e0..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From fd99a249e6faf234066a6b5da2ed34aaead3d6d9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei@balena.io> | ||
3 | Date: Fri, 12 Jul 2019 11:26:10 +0100 | ||
4 | Subject: [PATCH 5/7] arm: bcm283x: Include definition for additional emmc | ||
5 | clock | ||
6 | |||
7 | This clock has a different mbox ID so have this included in the relevant | ||
8 | header file. | ||
9 | |||
10 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
11 | Upstream-status: Pending | ||
12 | --- | ||
13 | arch/arm/mach-bcm283x/include/mach/mbox.h | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
17 | index e44c7577da..f2a98acddd 100644 | ||
18 | --- a/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
19 | +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
20 | @@ -230,6 +230,7 @@ struct bcm2835_mbox_tag_set_power_state { | ||
21 | #define BCM2835_MBOX_CLOCK_ID_SDRAM 8 | ||
22 | #define BCM2835_MBOX_CLOCK_ID_PIXEL 9 | ||
23 | #define BCM2835_MBOX_CLOCK_ID_PWM 10 | ||
24 | +#define BCM2835_MBOX_CLOCK_ID_EMMC2 12 | ||
25 | |||
26 | struct bcm2835_mbox_tag_get_clock_rate { | ||
27 | struct bcm2835_mbox_tag_hdr tag_hdr; | ||
28 | -- | ||
29 | 2.22.0 | ||
30 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch b/recipes-bsp/u-boot/u-boot-2019.07/0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch deleted file mode 100644 index d9de5c4..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 1f42758fe69648340cfae6cae98e667b88923cf6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Matthias Brugger <mbrugger@suse.com> | ||
3 | Date: Wed, 10 Jul 2019 13:24:36 +0200 | ||
4 | Subject: [PATCH 6/7] mmc: bcm2835_sdhci: Add support for bcm2711 device | ||
5 | |||
6 | The bcm2711 has two emmc controller. The difference is the clocks | ||
7 | they use. Add support for the second emmc contoller. | ||
8 | |||
9 | Signed-off-by: Matthias Brugger <mbrugger@suse.com> | ||
10 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
11 | Upstream-status: Pending | ||
12 | --- | ||
13 | drivers/mmc/bcm2835_sdhci.c | 12 ++++++++++-- | ||
14 | 1 file changed, 10 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c | ||
17 | index 08bddd410e..e68dec3be7 100644 | ||
18 | --- a/drivers/mmc/bcm2835_sdhci.c | ||
19 | +++ b/drivers/mmc/bcm2835_sdhci.c | ||
20 | @@ -178,12 +178,13 @@ static int bcm2835_sdhci_probe(struct udevice *dev) | ||
21 | fdt_addr_t base; | ||
22 | int emmc_freq; | ||
23 | int ret; | ||
24 | + int clock_id = (int)dev_get_driver_data(dev); | ||
25 | |||
26 | base = devfdt_get_addr(dev); | ||
27 | if (base == FDT_ADDR_T_NONE) | ||
28 | return -EINVAL; | ||
29 | |||
30 | - ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC); | ||
31 | + ret = bcm2835_get_mmc_clock(clock_id); | ||
32 | if (ret < 0) { | ||
33 | debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret); | ||
34 | return ret; | ||
35 | @@ -228,7 +229,14 @@ static int bcm2835_sdhci_probe(struct udevice *dev) | ||
36 | } | ||
37 | |||
38 | static const struct udevice_id bcm2835_sdhci_match[] = { | ||
39 | - { .compatible = "brcm,bcm2835-sdhci" }, | ||
40 | + { | ||
41 | + .compatible = "brcm,bcm2835-sdhci", | ||
42 | + .data = BCM2835_MBOX_CLOCK_ID_EMMC | ||
43 | + }, | ||
44 | + { | ||
45 | + .compatible = "brcm,bcm2711-emmc2", | ||
46 | + .data = BCM2835_MBOX_CLOCK_ID_EMMC2 | ||
47 | + }, | ||
48 | { /* sentinel */ } | ||
49 | }; | ||
50 | |||
51 | -- | ||
52 | 2.22.0 | ||
53 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch b/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch deleted file mode 100644 index 1d23d9f..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From 76b656349a6786fa81cf69ac7762c31675cd567e Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei@balena.io> | ||
3 | Date: Fri, 12 Jul 2019 14:27:31 +0100 | ||
4 | Subject: [PATCH 7/7] rpi: Add memory map for bcm2838 | ||
5 | |||
6 | Define the memory map for the BCM2838 based on the dt configuration | ||
7 | available in the Raspberry Pi kernel fork. | ||
8 | |||
9 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
10 | Upstream-status: Pending | ||
11 | --- | ||
12 | board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++--- | ||
13 | 1 file changed, 24 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c | ||
16 | index 92c6534da6..bddf2a578d 100644 | ||
17 | --- a/board/raspberrypi/rpi/rpi.c | ||
18 | +++ b/board/raspberrypi/rpi/rpi.c | ||
19 | @@ -249,7 +249,8 @@ static uint32_t rev_type; | ||
20 | static const struct rpi_model *model; | ||
21 | |||
22 | #ifdef CONFIG_ARM64 | ||
23 | -static struct mm_region bcm2837_mem_map[] = { | ||
24 | +#ifndef CONFIG_BCM2838 | ||
25 | +static struct mm_region bcm283x_mem_map[] = { | ||
26 | { | ||
27 | .virt = 0x00000000UL, | ||
28 | .phys = 0x00000000UL, | ||
29 | @@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = { | ||
30 | 0, | ||
31 | } | ||
32 | }; | ||
33 | - | ||
34 | -struct mm_region *mem_map = bcm2837_mem_map; | ||
35 | +#else | ||
36 | +static struct mm_region bcm283x_mem_map[] = { | ||
37 | + { | ||
38 | + .virt = 0x00000000UL, | ||
39 | + .phys = 0x00000000UL, | ||
40 | + .size = 0xfe000000UL, | ||
41 | + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | | ||
42 | + PTE_BLOCK_INNER_SHARE | ||
43 | + }, { | ||
44 | + .virt = 0xfe000000UL, | ||
45 | + .phys = 0xfe000000UL, | ||
46 | + .size = 0x01800000UL, | ||
47 | + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | | ||
48 | + PTE_BLOCK_NON_SHARE | | ||
49 | + PTE_BLOCK_PXN | PTE_BLOCK_UXN | ||
50 | + }, { | ||
51 | + /* List terminator */ | ||
52 | + 0, | ||
53 | + } | ||
54 | +}; | ||
55 | +#endif | ||
56 | +struct mm_region *mem_map = bcm283x_mem_map; | ||
57 | #endif | ||
58 | |||
59 | int dram_init(void) | ||
60 | -- | ||
61 | 2.22.0 | ||
62 | |||
diff --git a/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bbappend b/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bbappend deleted file mode 100644 index 3daf157..0000000 --- a/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bbappend +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # Apply the same patches for rpi4 as u-boot recipe | ||
2 | require u-boot-rpi4-${PV}.inc | ||
diff --git a/recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc b/recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc deleted file mode 100644 index 2ce55a2..0000000 --- a/recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend_raspberrypi4 := "${THISDIR}/u-boot-2019.07:" | ||
2 | UBOOT_RPI4_SUPPORT_PATCHES = " \ | ||
3 | file://0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch \ | ||
4 | file://0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch \ | ||
5 | file://0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch \ | ||
6 | file://0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch \ | ||
7 | file://0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch \ | ||
8 | file://0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch \ | ||
9 | file://0007-rpi-Add-memory-map-for-bcm2838.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI_append_raspberrypi4 = "${UBOOT_RPI4_SUPPORT_PATCHES}" | ||
diff --git a/recipes-bsp/u-boot/u-boot_2019.07.bbappend b/recipes-bsp/u-boot/u-boot_2019.07.bbappend deleted file mode 100644 index 3daf157..0000000 --- a/recipes-bsp/u-boot/u-boot_2019.07.bbappend +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # Apply the same patches for rpi4 as u-boot recipe | ||
2 | require u-boot-rpi4-${PV}.inc | ||