diff options
| author | Andrei Gherzan <andrei@gherzan.ro> | 2019-07-19 16:17:38 +0100 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.ro> | 2019-07-19 16:19:42 +0100 |
| commit | 6531d1d0bb23f390066fe7cead2d95ad6ac4db72 (patch) | |
| tree | 9ff35e976a9ec5f24f46168cd1931e948822e8fe | |
| parent | 03488c61599ddb8efdecd1a48c211d083ce4ea78 (diff) | |
| download | meta-raspberrypi-ag/rpi4-uboot-update.tar.gz | |
u-boot: Update patches for RPi4ag/rpi4-uboot-update
After a review in upstream, some of the patches were modified. Most
notable changes:
1. use directly the dtb passed by the firmware and make sure uboot
doesn't tweak memory/reg
2. remove known unimplemented support (usb, eth etc.)
3. drop patches that are not needed anymore with the new firmware update
(for example 0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch)
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
15 files changed, 258 insertions, 854 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 index 2fe7b9e..788b877 100644 --- 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 | |||
| @@ -1,23 +1,32 @@ | |||
| 1 | From 2a59e8a0d574c5f878e7cf640dd2337ac5721372 Mon Sep 17 00:00:00 2001 | 1 | From e8be20ccd21df9f042e58114b3f5ae7f412a71a8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrei Gherzan <andrei@balena.io> | 2 | From: Andrei Gherzan <andrei@balena.io> |
| 3 | Date: Wed, 17 Jul 2019 15:32:11 +0100 | 3 | Date: Wed, 17 Jul 2019 15:32:11 +0100 |
| 4 | Subject: [PATCH 01/12] configs: rpi4: Add defconfigs for rpi4 (32/64) | 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. | ||
| 5 | 14 | ||
| 6 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | 15 | Signed-off-by: Andrei Gherzan <andrei@balena.io> |
| 7 | Upstream-status: Pending | 16 | Upstream-status: Pending |
| 8 | --- | 17 | --- |
| 9 | configs/rpi_4_32b_defconfig | 41 +++++++++++++++++++++++++++++++++++++ | 18 | configs/rpi_4_32b_defconfig | 33 +++++++++++++++++++++++++++++++++ |
| 10 | configs/rpi_4_defconfig | 41 +++++++++++++++++++++++++++++++++++++ | 19 | configs/rpi_4_defconfig | 33 +++++++++++++++++++++++++++++++++ |
| 11 | 2 files changed, 82 insertions(+) | 20 | 2 files changed, 66 insertions(+) |
| 12 | create mode 100644 configs/rpi_4_32b_defconfig | 21 | create mode 100644 configs/rpi_4_32b_defconfig |
| 13 | create mode 100644 configs/rpi_4_defconfig | 22 | create mode 100644 configs/rpi_4_defconfig |
| 14 | 23 | ||
| 15 | diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig | 24 | diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig |
| 16 | new file mode 100644 | 25 | new file mode 100644 |
| 17 | index 0000000000..3ee33174bc | 26 | index 0000000000..a31a617a5f |
| 18 | --- /dev/null | 27 | --- /dev/null |
| 19 | +++ b/configs/rpi_4_32b_defconfig | 28 | +++ b/configs/rpi_4_32b_defconfig |
| 20 | @@ -0,0 +1,41 @@ | 29 | @@ -0,0 +1,33 @@ |
| 21 | +CONFIG_ARM=y | 30 | +CONFIG_ARM=y |
| 22 | +CONFIG_ARCH_BCM283X=y | 31 | +CONFIG_ARCH_BCM283X=y |
| 23 | +CONFIG_SYS_TEXT_BASE=0x00008000 | 32 | +CONFIG_SYS_TEXT_BASE=0x00008000 |
| @@ -26,6 +35,7 @@ index 0000000000..3ee33174bc | |||
| 26 | +CONFIG_DISTRO_DEFAULTS=y | 35 | +CONFIG_DISTRO_DEFAULTS=y |
| 27 | +CONFIG_NR_DRAM_BANKS=1 | 36 | +CONFIG_NR_DRAM_BANKS=1 |
| 28 | +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set | 37 | +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set |
| 38 | +CONFIG_OF_BOARD=y | ||
| 29 | +CONFIG_OF_BOARD_SETUP=y | 39 | +CONFIG_OF_BOARD_SETUP=y |
| 30 | +CONFIG_MISC_INIT_R=y | 40 | +CONFIG_MISC_INIT_R=y |
| 31 | +# CONFIG_DISPLAY_CPUINFO is not set | 41 | +# CONFIG_DISPLAY_CPUINFO is not set |
| @@ -34,10 +44,7 @@ index 0000000000..3ee33174bc | |||
| 34 | +# CONFIG_CMD_FLASH is not set | 44 | +# CONFIG_CMD_FLASH is not set |
| 35 | +CONFIG_CMD_GPIO=y | 45 | +CONFIG_CMD_GPIO=y |
| 36 | +CONFIG_CMD_MMC=y | 46 | +CONFIG_CMD_MMC=y |
| 37 | +CONFIG_CMD_USB=y | ||
| 38 | +CONFIG_CMD_FS_UUID=y | 47 | +CONFIG_CMD_FS_UUID=y |
| 39 | +CONFIG_OF_EMBED=y | ||
| 40 | +CONFIG_DEFAULT_DEVICE_TREE="bcm2838-rpi-4-b" | ||
| 41 | +CONFIG_ENV_FAT_INTERFACE="mmc" | 48 | +CONFIG_ENV_FAT_INTERFACE="mmc" |
| 42 | +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" | 49 | +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" |
| 43 | +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y | 50 | +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y |
| @@ -45,15 +52,9 @@ index 0000000000..3ee33174bc | |||
| 45 | +CONFIG_DM_MMC=y | 52 | +CONFIG_DM_MMC=y |
| 46 | +CONFIG_MMC_SDHCI=y | 53 | +CONFIG_MMC_SDHCI=y |
| 47 | +CONFIG_MMC_SDHCI_BCM2835=y | 54 | +CONFIG_MMC_SDHCI_BCM2835=y |
| 48 | +CONFIG_PHYLIB=y | ||
| 49 | +CONFIG_DM_ETH=y | ||
| 50 | +CONFIG_PINCTRL=y | 55 | +CONFIG_PINCTRL=y |
| 51 | +# CONFIG_PINCTRL_GENERIC is not set | 56 | +# CONFIG_PINCTRL_GENERIC is not set |
| 52 | +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set | 57 | +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set |
| 53 | +CONFIG_USB=y | ||
| 54 | +CONFIG_DM_USB=y | ||
| 55 | +CONFIG_USB_KEYBOARD=y | ||
| 56 | +CONFIG_USB_HOST_ETHER=y | ||
| 57 | +CONFIG_DM_VIDEO=y | 58 | +CONFIG_DM_VIDEO=y |
| 58 | +CONFIG_SYS_WHITE_ON_BLACK=y | 59 | +CONFIG_SYS_WHITE_ON_BLACK=y |
| 59 | +CONFIG_CONSOLE_SCROLL_LINES=10 | 60 | +CONFIG_CONSOLE_SCROLL_LINES=10 |
| @@ -61,10 +62,10 @@ index 0000000000..3ee33174bc | |||
| 61 | +CONFIG_OF_LIBFDT_OVERLAY=y | 62 | +CONFIG_OF_LIBFDT_OVERLAY=y |
| 62 | diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig | 63 | diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig |
| 63 | new file mode 100644 | 64 | new file mode 100644 |
| 64 | index 0000000000..b91b0869e5 | 65 | index 0000000000..da8c960a2a |
| 65 | --- /dev/null | 66 | --- /dev/null |
| 66 | +++ b/configs/rpi_4_defconfig | 67 | +++ b/configs/rpi_4_defconfig |
| 67 | @@ -0,0 +1,41 @@ | 68 | @@ -0,0 +1,33 @@ |
| 68 | +CONFIG_ARM=y | 69 | +CONFIG_ARM=y |
| 69 | +CONFIG_ARCH_BCM283X=y | 70 | +CONFIG_ARCH_BCM283X=y |
| 70 | +CONFIG_SYS_TEXT_BASE=0x00080000 | 71 | +CONFIG_SYS_TEXT_BASE=0x00080000 |
| @@ -73,6 +74,7 @@ index 0000000000..b91b0869e5 | |||
| 73 | +CONFIG_DISTRO_DEFAULTS=y | 74 | +CONFIG_DISTRO_DEFAULTS=y |
| 74 | +CONFIG_NR_DRAM_BANKS=1 | 75 | +CONFIG_NR_DRAM_BANKS=1 |
| 75 | +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set | 76 | +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set |
| 77 | +CONFIG_OF_BOARD=y | ||
| 76 | +CONFIG_OF_BOARD_SETUP=y | 78 | +CONFIG_OF_BOARD_SETUP=y |
| 77 | +CONFIG_MISC_INIT_R=y | 79 | +CONFIG_MISC_INIT_R=y |
| 78 | +# CONFIG_DISPLAY_CPUINFO is not set | 80 | +# CONFIG_DISPLAY_CPUINFO is not set |
| @@ -81,10 +83,7 @@ index 0000000000..b91b0869e5 | |||
| 81 | +# CONFIG_CMD_FLASH is not set | 83 | +# CONFIG_CMD_FLASH is not set |
| 82 | +CONFIG_CMD_GPIO=y | 84 | +CONFIG_CMD_GPIO=y |
| 83 | +CONFIG_CMD_MMC=y | 85 | +CONFIG_CMD_MMC=y |
| 84 | +CONFIG_CMD_USB=y | ||
| 85 | +CONFIG_CMD_FS_UUID=y | 86 | +CONFIG_CMD_FS_UUID=y |
| 86 | +CONFIG_OF_EMBED=y | ||
| 87 | +CONFIG_DEFAULT_DEVICE_TREE="bcm2838-rpi-4-b" | ||
| 88 | +CONFIG_ENV_FAT_INTERFACE="mmc" | 87 | +CONFIG_ENV_FAT_INTERFACE="mmc" |
| 89 | +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" | 88 | +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" |
| 90 | +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y | 89 | +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y |
| @@ -92,15 +91,9 @@ index 0000000000..b91b0869e5 | |||
| 92 | +CONFIG_DM_MMC=y | 91 | +CONFIG_DM_MMC=y |
| 93 | +CONFIG_MMC_SDHCI=y | 92 | +CONFIG_MMC_SDHCI=y |
| 94 | +CONFIG_MMC_SDHCI_BCM2835=y | 93 | +CONFIG_MMC_SDHCI_BCM2835=y |
| 95 | +CONFIG_PHYLIB=y | ||
| 96 | +CONFIG_DM_ETH=y | ||
| 97 | +CONFIG_PINCTRL=y | 94 | +CONFIG_PINCTRL=y |
| 98 | +# CONFIG_PINCTRL_GENERIC is not set | 95 | +# CONFIG_PINCTRL_GENERIC is not set |
| 99 | +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set | 96 | +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set |
| 100 | +CONFIG_USB=y | ||
| 101 | +CONFIG_DM_USB=y | ||
| 102 | +CONFIG_USB_KEYBOARD=y | ||
| 103 | +CONFIG_USB_HOST_ETHER=y | ||
| 104 | +CONFIG_DM_VIDEO=y | 97 | +CONFIG_DM_VIDEO=y |
| 105 | +CONFIG_SYS_WHITE_ON_BLACK=y | 98 | +CONFIG_SYS_WHITE_ON_BLACK=y |
| 106 | +CONFIG_CONSOLE_SCROLL_LINES=10 | 99 | +CONFIG_CONSOLE_SCROLL_LINES=10 |
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 new file mode 100644 index 0000000..9b91c1b --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | From 3908ffc61426fd35c6f917ba01aae2f138791259 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/0002-dts-Create-a-dtsi-for-BCM2835-6-7-specific-configura.patch b/recipes-bsp/u-boot/u-boot-2019.07/0002-dts-Create-a-dtsi-for-BCM2835-6-7-specific-configura.patch deleted file mode 100644 index eda8b56..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0002-dts-Create-a-dtsi-for-BCM2835-6-7-specific-configura.patch +++ /dev/null | |||
| @@ -1,209 +0,0 @@ | |||
| 1 | From 9ef5ac66aaa8e52d1ed3a6fd6390d7d8d91a537d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrei Gherzan <andrei@balena.io> | ||
| 3 | Date: Wed, 17 Jul 2019 15:32:34 +0100 | ||
| 4 | Subject: [PATCH 02/12] dts: Create a dtsi for BCM2835/6/7 specific | ||
| 5 | configuration | ||
| 6 | |||
| 7 | This follows a similar change in kernel[1]. The change moves | ||
| 8 | configuration that was not applicable for all bcm2835/6/7/8 out of | ||
| 9 | bcm283x.dtsi. The new file is bcm2835-common.dtsi and contains | ||
| 10 | conifguration that is common for bcm2835/6/7 (not bcm2838). | ||
| 11 | |||
| 12 | [1] https://github.com/raspberrypi/linux/commit/769a7330aa5bebcc98b1ff12ecb767db4e5c644d#diff-5979fba23a5bab2cf66dde09db872dfc | ||
| 13 | |||
| 14 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 15 | Upstream-status: Pending | ||
| 16 | --- | ||
| 17 | arch/arm/dts/bcm2835-common.dtsi | 53 ++++++++++++++++++++++++++++++++ | ||
| 18 | arch/arm/dts/bcm2835.dtsi | 1 + | ||
| 19 | arch/arm/dts/bcm2836.dtsi | 1 + | ||
| 20 | arch/arm/dts/bcm2837.dtsi | 1 + | ||
| 21 | arch/arm/dts/bcm283x.dtsi | 45 +-------------------------- | ||
| 22 | 5 files changed, 57 insertions(+), 44 deletions(-) | ||
| 23 | create mode 100644 arch/arm/dts/bcm2835-common.dtsi | ||
| 24 | |||
| 25 | diff --git a/arch/arm/dts/bcm2835-common.dtsi b/arch/arm/dts/bcm2835-common.dtsi | ||
| 26 | new file mode 100644 | ||
| 27 | index 0000000000..17771730a3 | ||
| 28 | --- /dev/null | ||
| 29 | +++ b/arch/arm/dts/bcm2835-common.dtsi | ||
| 30 | @@ -0,0 +1,53 @@ | ||
| 31 | +// SPDX-License-Identifier: GPL-2.0 | ||
| 32 | + | ||
| 33 | +/* This include file covers the common peripherals and configuration between | ||
| 34 | + * bcm2835, bcm2836 and bcm2837 implementations. | ||
| 35 | + */ | ||
| 36 | + | ||
| 37 | +/ { | ||
| 38 | + soc { | ||
| 39 | + timer@7e003000 { | ||
| 40 | + compatible = "brcm,bcm2835-system-timer"; | ||
| 41 | + reg = <0x7e003000 0x1000>; | ||
| 42 | + interrupts = <1 0>, <1 1>, <1 2>, <1 3>; | ||
| 43 | + /* This could be a reference to BCM2835_CLOCK_TIMER, | ||
| 44 | + * but we don't have the driver using the common clock | ||
| 45 | + * support yet. | ||
| 46 | + */ | ||
| 47 | + clock-frequency = <1000000>; | ||
| 48 | + }; | ||
| 49 | + | ||
| 50 | + intc: interrupt-controller@7e00b200 { | ||
| 51 | + compatible = "brcm,bcm2835-armctrl-ic"; | ||
| 52 | + reg = <0x7e00b200 0x200>; | ||
| 53 | + interrupt-controller; | ||
| 54 | + #interrupt-cells = <2>; | ||
| 55 | + }; | ||
| 56 | + | ||
| 57 | + thermal: thermal@7e212000 { | ||
| 58 | + compatible = "brcm,bcm2835-thermal"; | ||
| 59 | + reg = <0x7e212000 0x8>; | ||
| 60 | + clocks = <&clocks BCM2835_CLOCK_TSENS>; | ||
| 61 | + #thermal-sensor-cells = <0>; | ||
| 62 | + status = "disabled"; | ||
| 63 | + }; | ||
| 64 | + | ||
| 65 | + v3d: v3d@7ec00000 { | ||
| 66 | + compatible = "brcm,bcm2835-v3d"; | ||
| 67 | + reg = <0x7ec00000 0x1000>; | ||
| 68 | + interrupts = <1 10>; | ||
| 69 | + }; | ||
| 70 | + }; | ||
| 71 | +}; | ||
| 72 | + | ||
| 73 | +&gpio { | ||
| 74 | + i2c_slave_gpio18: i2c_slave_gpio18 { | ||
| 75 | + brcm,pins = <18 19 20 21>; | ||
| 76 | + brcm,function = <BCM2835_FSEL_ALT3>; | ||
| 77 | + }; | ||
| 78 | + | ||
| 79 | + jtag_gpio4: jtag_gpio4 { | ||
| 80 | + brcm,pins = <4 5 6 12 13>; | ||
| 81 | + brcm,function = <BCM2835_FSEL_ALT5>; | ||
| 82 | + }; | ||
| 83 | +}; | ||
| 84 | diff --git a/arch/arm/dts/bcm2835.dtsi b/arch/arm/dts/bcm2835.dtsi | ||
| 85 | index a5c3824c80..53bf4579cc 100644 | ||
| 86 | --- a/arch/arm/dts/bcm2835.dtsi | ||
| 87 | +++ b/arch/arm/dts/bcm2835.dtsi | ||
| 88 | @@ -1,5 +1,6 @@ | ||
| 89 | // SPDX-License-Identifier: GPL-2.0 | ||
| 90 | #include "bcm283x.dtsi" | ||
| 91 | +#include "bcm2835-common.dtsi" | ||
| 92 | |||
| 93 | / { | ||
| 94 | compatible = "brcm,bcm2835"; | ||
| 95 | diff --git a/arch/arm/dts/bcm2836.dtsi b/arch/arm/dts/bcm2836.dtsi | ||
| 96 | index c933e84138..82d6c4662a 100644 | ||
| 97 | --- a/arch/arm/dts/bcm2836.dtsi | ||
| 98 | +++ b/arch/arm/dts/bcm2836.dtsi | ||
| 99 | @@ -1,5 +1,6 @@ | ||
| 100 | // SPDX-License-Identifier: GPL-2.0 | ||
| 101 | #include "bcm283x.dtsi" | ||
| 102 | +#include "bcm2835-common.dtsi" | ||
| 103 | |||
| 104 | / { | ||
| 105 | compatible = "brcm,bcm2836"; | ||
| 106 | diff --git a/arch/arm/dts/bcm2837.dtsi b/arch/arm/dts/bcm2837.dtsi | ||
| 107 | index beb6c502da..9e95fee78e 100644 | ||
| 108 | --- a/arch/arm/dts/bcm2837.dtsi | ||
| 109 | +++ b/arch/arm/dts/bcm2837.dtsi | ||
| 110 | @@ -1,4 +1,5 @@ | ||
| 111 | #include "bcm283x.dtsi" | ||
| 112 | +#include "bcm2835-common.dtsi" | ||
| 113 | |||
| 114 | / { | ||
| 115 | compatible = "brcm,bcm2837"; | ||
| 116 | diff --git a/arch/arm/dts/bcm283x.dtsi b/arch/arm/dts/bcm283x.dtsi | ||
| 117 | index 9777644c6c..a024727e4d 100644 | ||
| 118 | --- a/arch/arm/dts/bcm283x.dtsi | ||
| 119 | +++ b/arch/arm/dts/bcm283x.dtsi | ||
| 120 | @@ -56,17 +56,6 @@ | ||
| 121 | #address-cells = <1>; | ||
| 122 | #size-cells = <1>; | ||
| 123 | |||
| 124 | - timer@7e003000 { | ||
| 125 | - compatible = "brcm,bcm2835-system-timer"; | ||
| 126 | - reg = <0x7e003000 0x1000>; | ||
| 127 | - interrupts = <1 0>, <1 1>, <1 2>, <1 3>; | ||
| 128 | - /* This could be a reference to BCM2835_CLOCK_TIMER, | ||
| 129 | - * but we don't have the driver using the common clock | ||
| 130 | - * support yet. | ||
| 131 | - */ | ||
| 132 | - clock-frequency = <1000000>; | ||
| 133 | - }; | ||
| 134 | - | ||
| 135 | txp@7e004000 { | ||
| 136 | compatible = "brcm,bcm2835-txp"; | ||
| 137 | reg = <0x7e004000 0x20>; | ||
| 138 | @@ -114,13 +103,6 @@ | ||
| 139 | brcm,dma-channel-mask = <0x7f35>; | ||
| 140 | }; | ||
| 141 | |||
| 142 | - intc: interrupt-controller@7e00b200 { | ||
| 143 | - compatible = "brcm,bcm2835-armctrl-ic"; | ||
| 144 | - reg = <0x7e00b200 0x200>; | ||
| 145 | - interrupt-controller; | ||
| 146 | - #interrupt-cells = <2>; | ||
| 147 | - }; | ||
| 148 | - | ||
| 149 | pm: watchdog@7e100000 { | ||
| 150 | compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt"; | ||
| 151 | #power-domain-cells = <1>; | ||
| 152 | @@ -184,8 +166,7 @@ | ||
| 153 | interrupt-controller; | ||
| 154 | #interrupt-cells = <2>; | ||
| 155 | |||
| 156 | - /* Defines pin muxing groups according to | ||
| 157 | - * BCM2835-ARM-Peripherals.pdf page 102. | ||
| 158 | + /* Defines common pin muxing groups | ||
| 159 | * | ||
| 160 | * While each pin can have its mux selected | ||
| 161 | * for various functions individually, some | ||
| 162 | @@ -263,15 +244,6 @@ | ||
| 163 | brcm,pins = <44 45>; | ||
| 164 | brcm,function = <BCM2835_FSEL_ALT2>; | ||
| 165 | }; | ||
| 166 | - i2c_slave_gpio18: i2c_slave_gpio18 { | ||
| 167 | - brcm,pins = <18 19 20 21>; | ||
| 168 | - brcm,function = <BCM2835_FSEL_ALT3>; | ||
| 169 | - }; | ||
| 170 | - | ||
| 171 | - jtag_gpio4: jtag_gpio4 { | ||
| 172 | - brcm,pins = <4 5 6 12 13>; | ||
| 173 | - brcm,function = <BCM2835_FSEL_ALT5>; | ||
| 174 | - }; | ||
| 175 | jtag_gpio22: jtag_gpio22 { | ||
| 176 | brcm,pins = <22 23 24 25 26 27>; | ||
| 177 | brcm,function = <BCM2835_FSEL_ALT4>; | ||
| 178 | @@ -488,14 +460,6 @@ | ||
| 179 | |||
| 180 | }; | ||
| 181 | |||
| 182 | - thermal: thermal@7e212000 { | ||
| 183 | - compatible = "brcm,bcm2835-thermal"; | ||
| 184 | - reg = <0x7e212000 0x8>; | ||
| 185 | - clocks = <&clocks BCM2835_CLOCK_TSENS>; | ||
| 186 | - #thermal-sensor-cells = <0>; | ||
| 187 | - status = "disabled"; | ||
| 188 | - }; | ||
| 189 | - | ||
| 190 | aux: aux@7e215000 { | ||
| 191 | compatible = "brcm,bcm2835-aux"; | ||
| 192 | #clock-cells = <1>; | ||
| 193 | @@ -635,13 +599,6 @@ | ||
| 194 | phy-names = "usb2-phy"; | ||
| 195 | }; | ||
| 196 | |||
| 197 | - v3d: v3d@7ec00000 { | ||
| 198 | - compatible = "brcm,bcm2835-v3d"; | ||
| 199 | - reg = <0x7ec00000 0x1000>; | ||
| 200 | - interrupts = <1 10>; | ||
| 201 | - power-domains = <&pm BCM2835_POWER_DOMAIN_GRAFX_V3D>; | ||
| 202 | - }; | ||
| 203 | - | ||
| 204 | vc4: gpu { | ||
| 205 | compatible = "brcm,bcm2835-vc4"; | ||
| 206 | }; | ||
| 207 | -- | ||
| 208 | 2.22.0 | ||
| 209 | |||
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 new file mode 100644 index 0000000..5b6361f --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | From 066b17eb645d2779a8fb30bd83d48af9ceae871c 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 | https://github.com/raspberrypi/firmware/issues/1193 | ||
| 13 | |||
| 14 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 15 | Signed-off-by: Matthias Brugger <mbrugger@suse.com> | ||
| 16 | Upstream-status: Pending | ||
| 17 | --- | ||
| 18 | arch/arm/mach-bcm283x/Kconfig | 62 +++++++++++++++++++++++++++++++++++ | ||
| 19 | 1 file changed, 62 insertions(+) | ||
| 20 | |||
| 21 | diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig | ||
| 22 | index 8e69914a83..09a5b42bbb 100644 | ||
| 23 | --- a/arch/arm/mach-bcm283x/Kconfig | ||
| 24 | +++ b/arch/arm/mach-bcm283x/Kconfig | ||
| 25 | @@ -26,6 +26,23 @@ config BCM2837_64B | ||
| 26 | select BCM2837 | ||
| 27 | select ARM64 | ||
| 28 | |||
| 29 | +config BCM2838 | ||
| 30 | + bool "Broadcom BCM2838 SoC support" | ||
| 31 | + depends on ARCH_BCM283X | ||
| 32 | + | ||
| 33 | +config BCM2838_32B | ||
| 34 | + bool "Broadcom BCM2838 SoC 32-bit support" | ||
| 35 | + depends on ARCH_BCM283X | ||
| 36 | + select BCM2838 | ||
| 37 | + select ARMV7_LPAE | ||
| 38 | + select CPU_V7A | ||
| 39 | + | ||
| 40 | +config BCM2838_64B | ||
| 41 | + bool "Broadcom BCM2838 SoC 64-bit support" | ||
| 42 | + depends on ARCH_BCM283X | ||
| 43 | + select BCM2838 | ||
| 44 | + select ARM64 | ||
| 45 | + | ||
| 46 | menu "Broadcom BCM283X family" | ||
| 47 | depends on ARCH_BCM283X | ||
| 48 | |||
| 49 | @@ -127,6 +144,50 @@ config TARGET_RPI_3 | ||
| 50 | This option creates a build targeting the ARMv8/AArch64 ISA. | ||
| 51 | select BCM2837_64B | ||
| 52 | |||
| 53 | +config TARGET_RPI_4_32B | ||
| 54 | + bool "Raspberry Pi 4 32-bit build" | ||
| 55 | + help | ||
| 56 | + Support for all BCM2838-based Raspberry Pi variants, such as | ||
| 57 | + the RPi 4 model B, in AArch32 (32-bit) mode. | ||
| 58 | + | ||
| 59 | + This option assumes the VideoCore firmware is configured to use the | ||
| 60 | + mini UART (rather than PL011) for the serial console. This is the | ||
| 61 | + default on the RPi 4. To enable the UART console, the following non- | ||
| 62 | + default option must be present in config.txt: enable_uart=1. This is | ||
| 63 | + required for U-Boot to operate correctly, even if you only care | ||
| 64 | + about the HDMI/usbkbd console. | ||
| 65 | + | ||
| 66 | + Due to hardware incompatibilities, this can't be used with | ||
| 67 | + BCM283/5/6/7. | ||
| 68 | + | ||
| 69 | + This option creates a build targeting the ARMv7/AArch32 ISA. | ||
| 70 | + select BCM2838_32B | ||
| 71 | + | ||
| 72 | +config TARGET_RPI_4 | ||
| 73 | + bool "Raspberry Pi 4 64-bit build" | ||
| 74 | + help | ||
| 75 | + Support for all BCM2838-based Raspberry Pi variants, such as | ||
| 76 | + the RPi 4 model B, in AArch64 (64-bit) mode. | ||
| 77 | + | ||
| 78 | + This option assumes the VideoCore firmware is configured to use the | ||
| 79 | + mini UART (rather than PL011) for the serial console. This is the | ||
| 80 | + default on the RPi 4. To enable the UART console, the following non- | ||
| 81 | + default option must be present in config.txt: enable_uart=1. This is | ||
| 82 | + required for U-Boot to operate correctly, even if you only care | ||
| 83 | + about the HDMI/usbkbd console. | ||
| 84 | + | ||
| 85 | + Due to hardware incompatibilities, this can't be used with | ||
| 86 | + BCM283/5/6/7. | ||
| 87 | + | ||
| 88 | + Also, due to a bug in firmware, switching to 64bit mode doesn't | ||
| 89 | + happen automatically based on the kernel's image filename. See | ||
| 90 | + https://github.com/raspberrypi/firmware/issues/1193 for more details. | ||
| 91 | + Until that is resolved, the configuration (config.txt) needs to | ||
| 92 | + explicitly set: arm_64bit=1. | ||
| 93 | + | ||
| 94 | + This option creates a build targeting the ARMv8/AArch64 ISA. | ||
| 95 | + select BCM2838_64B | ||
| 96 | + | ||
| 97 | endchoice | ||
| 98 | |||
| 99 | config SYS_BOARD | ||
| 100 | @@ -145,5 +206,6 @@ config BCM283x_BASE | ||
| 101 | hex | ||
| 102 | default "0x20000000" if BCM2835 | ||
| 103 | default "0x3f000000" if BCM2836 || BCM2837 | ||
| 104 | + default "0xfe000000" if BCM2838 | ||
| 105 | |||
| 106 | endmenu | ||
| 107 | -- | ||
| 108 | 2.22.0 | ||
| 109 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0003-dts-Add-initial-support-for-bcm2838.patch b/recipes-bsp/u-boot/u-boot-2019.07/0003-dts-Add-initial-support-for-bcm2838.patch deleted file mode 100644 index b6b8ca7..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0003-dts-Add-initial-support-for-bcm2838.patch +++ /dev/null | |||
| @@ -1,333 +0,0 @@ | |||
| 1 | From 9a6dca219480423f6c9dd5804e5890d434cc11b8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrei Gherzan <andrei@balena.io> | ||
| 3 | Date: Wed, 17 Jul 2019 15:32:46 +0100 | ||
| 4 | Subject: [PATCH 03/12] dts: Add initial support for bcm2838 | ||
| 5 | |||
| 6 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 7 | Upstream-status: Pending | ||
| 8 | --- | ||
| 9 | arch/arm/dts/Makefile | 3 +- | ||
| 10 | arch/arm/dts/bcm2838-rpi-4-b.dts | 52 +++++++ | ||
| 11 | arch/arm/dts/bcm2838.dtsi | 237 +++++++++++++++++++++++++++++++ | ||
| 12 | 3 files changed, 291 insertions(+), 1 deletion(-) | ||
| 13 | create mode 100644 arch/arm/dts/bcm2838-rpi-4-b.dts | ||
| 14 | create mode 100644 arch/arm/dts/bcm2838.dtsi | ||
| 15 | |||
| 16 | diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile | ||
| 17 | index 20dbc2ff84..fdb55f7fde 100644 | ||
| 18 | --- a/arch/arm/dts/Makefile | ||
| 19 | +++ b/arch/arm/dts/Makefile | ||
| 20 | @@ -749,7 +749,8 @@ dtb-$(CONFIG_ARCH_BCM283X) += \ | ||
| 21 | bcm2837-rpi-3-a-plus.dtb \ | ||
| 22 | bcm2837-rpi-3-b.dtb \ | ||
| 23 | bcm2837-rpi-3-b-plus.dtb \ | ||
| 24 | - bcm2837-rpi-cm3-io3.dtb | ||
| 25 | + bcm2837-rpi-cm3-io3.dtb \ | ||
| 26 | + bcm2838-rpi-4-b.dtb | ||
| 27 | |||
| 28 | dtb-$(CONFIG_ARCH_BCM63158) += \ | ||
| 29 | bcm963158.dtb | ||
| 30 | diff --git a/arch/arm/dts/bcm2838-rpi-4-b.dts b/arch/arm/dts/bcm2838-rpi-4-b.dts | ||
| 31 | new file mode 100644 | ||
| 32 | index 0000000000..fa7fcfed9d | ||
| 33 | --- /dev/null | ||
| 34 | +++ b/arch/arm/dts/bcm2838-rpi-4-b.dts | ||
| 35 | @@ -0,0 +1,52 @@ | ||
| 36 | +/dts-v1/; | ||
| 37 | +#include "bcm2838.dtsi" | ||
| 38 | + | ||
| 39 | +/ { | ||
| 40 | + compatible = "raspberrypi,4-model-b","brcm,bcm2838","brcm,bcm2837"; | ||
| 41 | + model = "Raspberry Pi 4 Model B"; | ||
| 42 | + | ||
| 43 | + memory { | ||
| 44 | + reg = <0 0 0x0>; | ||
| 45 | + }; | ||
| 46 | + | ||
| 47 | + leds { | ||
| 48 | + act { | ||
| 49 | + gpios = <&gpio 47 0>; | ||
| 50 | + }; | ||
| 51 | + }; | ||
| 52 | +}; | ||
| 53 | + | ||
| 54 | +/* uart0 communicates with the BT module */ | ||
| 55 | +&uart0 { | ||
| 56 | + pinctrl-names = "default"; | ||
| 57 | + pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; | ||
| 58 | + status = "okay"; | ||
| 59 | +}; | ||
| 60 | + | ||
| 61 | +/* uart1 is mapped to the pin header */ | ||
| 62 | +&uart1 { | ||
| 63 | + pinctrl-names = "default"; | ||
| 64 | + pinctrl-0 = <&uart1_pins>; | ||
| 65 | + status = "okay"; | ||
| 66 | +}; | ||
| 67 | + | ||
| 68 | +&sdhci { | ||
| 69 | + status = "disabled"; | ||
| 70 | +}; | ||
| 71 | + | ||
| 72 | +&sdhost { | ||
| 73 | + status = "disabled"; | ||
| 74 | +}; | ||
| 75 | + | ||
| 76 | +&emmc2 { | ||
| 77 | + compatible = "brcm,bcm2711-emmc2"; | ||
| 78 | + status = "okay"; | ||
| 79 | +}; | ||
| 80 | + | ||
| 81 | +&gpio { | ||
| 82 | + uart1_pins: uart1_pins { | ||
| 83 | + brcm,pins; | ||
| 84 | + brcm,function; | ||
| 85 | + brcm,pull; | ||
| 86 | + }; | ||
| 87 | +}; | ||
| 88 | diff --git a/arch/arm/dts/bcm2838.dtsi b/arch/arm/dts/bcm2838.dtsi | ||
| 89 | new file mode 100644 | ||
| 90 | index 0000000000..19b2d7b905 | ||
| 91 | --- /dev/null | ||
| 92 | +++ b/arch/arm/dts/bcm2838.dtsi | ||
| 93 | @@ -0,0 +1,237 @@ | ||
| 94 | +#include "bcm283x.dtsi" | ||
| 95 | +#include <dt-bindings/interrupt-controller/arm-gic.h> | ||
| 96 | +#include <dt-bindings/power/raspberrypi-power.h> | ||
| 97 | + | ||
| 98 | +/ { | ||
| 99 | + compatible = "brcm,bcm2838"; | ||
| 100 | + | ||
| 101 | + #address-cells = <2>; | ||
| 102 | + #size-cells = <1>; | ||
| 103 | + | ||
| 104 | + interrupt-parent = <&gic>; | ||
| 105 | + | ||
| 106 | + soc { | ||
| 107 | + ranges = <0x7e000000 0x0 0xfe000000 0x01800000>, | ||
| 108 | + <0x7c000000 0x0 0xfc000000 0x02000000>, | ||
| 109 | + <0x40000000 0x0 0xff800000 0x00800000>; | ||
| 110 | + dma-ranges = <0xc0000000 0x0 0x00000000 0x3c000000>; | ||
| 111 | + | ||
| 112 | + gic: gic400@40041000 { | ||
| 113 | + interrupt-controller; | ||
| 114 | + #interrupt-cells = <3>; | ||
| 115 | + compatible = "arm,gic-400"; | ||
| 116 | + reg = <0x40041000 0x1000>, | ||
| 117 | + <0x40042000 0x2000>, | ||
| 118 | + <0x40044000 0x2000>, | ||
| 119 | + <0x40046000 0x2000>; | ||
| 120 | + }; | ||
| 121 | + | ||
| 122 | + thermal: thermal@7d5d2200 { | ||
| 123 | + compatible = "brcm,avs-tmon-bcm2838"; | ||
| 124 | + reg = <0x7d5d2200 0x2c>; | ||
| 125 | + interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>; | ||
| 126 | + interrupt-names = "tmon"; | ||
| 127 | + clocks = <&clocks BCM2835_CLOCK_TSENS>; | ||
| 128 | + #thermal-sensor-cells = <0>; | ||
| 129 | + status = "okay"; | ||
| 130 | + }; | ||
| 131 | + | ||
| 132 | + spi@7e204000 { | ||
| 133 | + reg = <0x7e204000 0x0200>; | ||
| 134 | + interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>; | ||
| 135 | + }; | ||
| 136 | + | ||
| 137 | + pixelvalve@7e206000 { | ||
| 138 | + interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; | ||
| 139 | + }; | ||
| 140 | + | ||
| 141 | + pixelvalve@7e207000 { | ||
| 142 | + interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; | ||
| 143 | + }; | ||
| 144 | + | ||
| 145 | + hvs@7e400000 { | ||
| 146 | + interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; | ||
| 147 | + }; | ||
| 148 | + | ||
| 149 | + emmc2: emmc2@7e340000 { | ||
| 150 | + compatible = "brcm,bcm2711-emmc2"; | ||
| 151 | + status = "okay"; | ||
| 152 | + interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>; | ||
| 153 | + clocks = <&clocks BCM2838_CLOCK_EMMC2>; | ||
| 154 | + reg = <0x7e340000 0x100>; | ||
| 155 | + }; | ||
| 156 | + | ||
| 157 | + pixelvalve@7e807000 { | ||
| 158 | + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; | ||
| 159 | + }; | ||
| 160 | + | ||
| 161 | + }; | ||
| 162 | + | ||
| 163 | + arm-pmu { | ||
| 164 | + /* | ||
| 165 | + * N.B. the A72 PMU support only exists in arch/arm64, hence | ||
| 166 | + * the fallback to the A53 version. | ||
| 167 | + */ | ||
| 168 | + compatible = "arm,cortex-a72-pmu", "arm,cortex-a53-pmu"; | ||
| 169 | + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>, | ||
| 170 | + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, | ||
| 171 | + <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, | ||
| 172 | + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; | ||
| 173 | + }; | ||
| 174 | + | ||
| 175 | + timer { | ||
| 176 | + compatible = "arm,armv7-timer"; | ||
| 177 | + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | | ||
| 178 | + IRQ_TYPE_LEVEL_LOW)>, | ||
| 179 | + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | | ||
| 180 | + IRQ_TYPE_LEVEL_LOW)>, | ||
| 181 | + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | | ||
| 182 | + IRQ_TYPE_LEVEL_LOW)>, | ||
| 183 | + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | | ||
| 184 | + IRQ_TYPE_LEVEL_LOW)>; | ||
| 185 | + arm,cpu-registers-not-fw-configured; | ||
| 186 | + always-on; | ||
| 187 | + }; | ||
| 188 | + | ||
| 189 | + cpus: cpus { | ||
| 190 | + #address-cells = <1>; | ||
| 191 | + #size-cells = <0>; | ||
| 192 | + enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit | ||
| 193 | + | ||
| 194 | + cpu0: cpu@0 { | ||
| 195 | + device_type = "cpu"; | ||
| 196 | + compatible = "arm,cortex-a72"; | ||
| 197 | + reg = <0>; | ||
| 198 | + enable-method = "spin-table"; | ||
| 199 | + cpu-release-addr = <0x0 0x000000d8>; | ||
| 200 | + }; | ||
| 201 | + | ||
| 202 | + cpu1: cpu@1 { | ||
| 203 | + device_type = "cpu"; | ||
| 204 | + compatible = "arm,cortex-a72"; | ||
| 205 | + reg = <1>; | ||
| 206 | + enable-method = "spin-table"; | ||
| 207 | + cpu-release-addr = <0x0 0x000000e0>; | ||
| 208 | + }; | ||
| 209 | + | ||
| 210 | + cpu2: cpu@2 { | ||
| 211 | + device_type = "cpu"; | ||
| 212 | + compatible = "arm,cortex-a72"; | ||
| 213 | + reg = <2>; | ||
| 214 | + enable-method = "spin-table"; | ||
| 215 | + cpu-release-addr = <0x0 0x000000e8>; | ||
| 216 | + }; | ||
| 217 | + | ||
| 218 | + cpu3: cpu@3 { | ||
| 219 | + device_type = "cpu"; | ||
| 220 | + compatible = "arm,cortex-a72"; | ||
| 221 | + reg = <3>; | ||
| 222 | + enable-method = "spin-table"; | ||
| 223 | + cpu-release-addr = <0x0 0x000000f0>; | ||
| 224 | + }; | ||
| 225 | + }; | ||
| 226 | +}; | ||
| 227 | + | ||
| 228 | +&clk_osc { | ||
| 229 | + clock-frequency = <54000000>; | ||
| 230 | +}; | ||
| 231 | + | ||
| 232 | +&clocks { | ||
| 233 | + compatible = "brcm,bcm2838-cprman"; | ||
| 234 | +}; | ||
| 235 | + | ||
| 236 | +&cpu_thermal { | ||
| 237 | + coefficients = <(-487) 410040>; | ||
| 238 | +}; | ||
| 239 | + | ||
| 240 | +&dsi0 { | ||
| 241 | + interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; | ||
| 242 | +}; | ||
| 243 | + | ||
| 244 | +&dsi1 { | ||
| 245 | + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; | ||
| 246 | +}; | ||
| 247 | + | ||
| 248 | +&gpio { | ||
| 249 | + compatible = "brcm,bcm2838-gpio", "brcm,bcm2835-gpio"; | ||
| 250 | + interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, | ||
| 251 | + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, | ||
| 252 | + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, | ||
| 253 | + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>; | ||
| 254 | +}; | ||
| 255 | + | ||
| 256 | +&vec { | ||
| 257 | + interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; | ||
| 258 | +}; | ||
| 259 | + | ||
| 260 | +&usb { | ||
| 261 | + interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; | ||
| 262 | +}; | ||
| 263 | + | ||
| 264 | +&hdmi { | ||
| 265 | + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, | ||
| 266 | + <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>; | ||
| 267 | +}; | ||
| 268 | + | ||
| 269 | +&uart1 { | ||
| 270 | + interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; | ||
| 271 | +}; | ||
| 272 | + | ||
| 273 | +&spi1 { | ||
| 274 | + interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; | ||
| 275 | +}; | ||
| 276 | + | ||
| 277 | +&spi2 { | ||
| 278 | + interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; | ||
| 279 | +}; | ||
| 280 | + | ||
| 281 | +&i2c0 { | ||
| 282 | + interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; | ||
| 283 | +}; | ||
| 284 | + | ||
| 285 | +&i2c1 { | ||
| 286 | + interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; | ||
| 287 | +}; | ||
| 288 | + | ||
| 289 | +&i2c2 { | ||
| 290 | + interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; | ||
| 291 | +}; | ||
| 292 | + | ||
| 293 | +&mailbox { | ||
| 294 | + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; | ||
| 295 | +}; | ||
| 296 | + | ||
| 297 | +&sdhost { | ||
| 298 | + interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; | ||
| 299 | +}; | ||
| 300 | + | ||
| 301 | +&uart0 { | ||
| 302 | + interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>; | ||
| 303 | +}; | ||
| 304 | + | ||
| 305 | +&dma { | ||
| 306 | + reg = <0x7e007000 0xb00>; | ||
| 307 | + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>, | ||
| 308 | + <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>, | ||
| 309 | + <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>, | ||
| 310 | + <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>, | ||
| 311 | + <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>, | ||
| 312 | + <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>, | ||
| 313 | + <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>, | ||
| 314 | + <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>, /* dmalite 7 */ | ||
| 315 | + <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>, /* dmalite 8 */ | ||
| 316 | + <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>, /* dmalite 9 */ | ||
| 317 | + <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>; /* dmalite 10 */ | ||
| 318 | + interrupt-names = "dma0", | ||
| 319 | + "dma1", | ||
| 320 | + "dma2", | ||
| 321 | + "dma3", | ||
| 322 | + "dma4", | ||
| 323 | + "dma5", | ||
| 324 | + "dma6", | ||
| 325 | + "dma7", | ||
| 326 | + "dma8", | ||
| 327 | + "dma9", | ||
| 328 | + "dma10"; | ||
| 329 | + brcm,dma-channel-mask = <0x07f5>; | ||
| 330 | +}; | ||
| 331 | -- | ||
| 332 | 2.22.0 | ||
| 333 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0004-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch b/recipes-bsp/u-boot/u-boot-2019.07/0004-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch deleted file mode 100644 index ce2a664..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0004-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | From a343e3755ff8b85f453800fe165624687e4d5879 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 04/12] arm: mach-bcm283x: Define configs for RaspberryPi 4 | ||
| 5 | |||
| 6 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 7 | Upstream-status: Pending | ||
| 8 | --- | ||
| 9 | arch/arm/mach-bcm283x/Kconfig | 35 +++++++++++++++++++++++++++++++++++ | ||
| 10 | 1 file changed, 35 insertions(+) | ||
| 11 | |||
| 12 | diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig | ||
| 13 | index 3eb5a9a897..d5069fe688 100644 | ||
| 14 | --- a/arch/arm/mach-bcm283x/Kconfig | ||
| 15 | +++ b/arch/arm/mach-bcm283x/Kconfig | ||
| 16 | @@ -26,6 +26,23 @@ config BCM2837_64B | ||
| 17 | select BCM2837 | ||
| 18 | select ARM64 | ||
| 19 | |||
| 20 | +config BCM2838 | ||
| 21 | + bool "Broadcom BCM2838 SoC support" | ||
| 22 | + depends on ARCH_BCM283X | ||
| 23 | + | ||
| 24 | +config BCM2838_32B | ||
| 25 | + bool "Broadcom BCM2838 SoC 32-bit support" | ||
| 26 | + depends on ARCH_BCM283X | ||
| 27 | + select BCM2838 | ||
| 28 | + select ARMV7_LPAE | ||
| 29 | + select CPU_V7A | ||
| 30 | + | ||
| 31 | +config BCM2838_64B | ||
| 32 | + bool "Broadcom BCM2838 SoC 64-bit support" | ||
| 33 | + depends on ARCH_BCM283X | ||
| 34 | + select BCM2838 | ||
| 35 | + select ARM64 | ||
| 36 | + | ||
| 37 | menu "Broadcom BCM283X family" | ||
| 38 | depends on ARCH_BCM283X | ||
| 39 | |||
| 40 | @@ -127,6 +144,24 @@ config TARGET_RPI_3 | ||
| 41 | This option creates a build targeting the ARMv8/AArch64 ISA. | ||
| 42 | select BCM2837_64B | ||
| 43 | |||
| 44 | +config TARGET_RPI_4 | ||
| 45 | + bool "Raspberry Pi 4 64-bit build" | ||
| 46 | + help | ||
| 47 | + Support for all BCM2838-based Raspberry Pi variants, such as | ||
| 48 | + the RPi 4 model B, in AArch64 (64-bit) mode. | ||
| 49 | + | ||
| 50 | + This option creates a build targeting the ARMv8/AArch64 ISA. | ||
| 51 | + select BCM2838_64B | ||
| 52 | + | ||
| 53 | +config TARGET_RPI_4_32B | ||
| 54 | + bool "Raspberry Pi 4 32-bit build" | ||
| 55 | + help | ||
| 56 | + Support for all BCM2838-based Raspberry Pi variants, such as | ||
| 57 | + the RPi 4 model B, in AArch32 (32-bit) mode. | ||
| 58 | + | ||
| 59 | + This option creates a build targeting the ARMv7/AArch32 ISA. | ||
| 60 | + select BCM2838_32B | ||
| 61 | + | ||
| 62 | endchoice | ||
| 63 | |||
| 64 | config SYS_BOARD | ||
| 65 | -- | ||
| 66 | 2.22.0 | ||
| 67 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0006-rpi-Add-rpi_model-entry-for-RaspberryPi-4.patch b/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch index b279d11..3eb5b33 100644 --- a/recipes-bsp/u-boot/u-boot-2019.07/0006-rpi-Add-rpi_model-entry-for-RaspberryPi-4.patch +++ b/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 8a8e6c7364d41bbd3eb20dc7e4ec1c0a3e3b5259 Mon Sep 17 00:00:00 2001 | 1 | From 33adefd1a3a8ad644b0f38258723c17672029cfa Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrei Gherzan <andrei@balena.io> | 2 | From: Andrei Gherzan <andrei@balena.io> |
| 3 | Date: Wed, 17 Jul 2019 15:34:18 +0100 | 3 | Date: Wed, 17 Jul 2019 15:34:18 +0100 |
| 4 | Subject: [PATCH 06/12] rpi: Add rpi_model entry for RaspberryPi 4 | 4 | Subject: [PATCH 4/7] rpi: Add entry for Raspberry Pi 4 model B |
| 5 | 5 | ||
| 6 | The Raspebrry Pi 4 uses the new revision code scheme as documented by | 6 | The Raspebrry Pi 4 uses the new revision code scheme as documented by |
| 7 | the foundation[1]. This change adds an entry for this board as well. | 7 | the foundation[1]. This change adds an entry for this board as well. |
| @@ -15,7 +15,7 @@ Upstream-status: Pending | |||
| 15 | 1 file changed, 5 insertions(+) | 15 | 1 file changed, 5 insertions(+) |
| 16 | 16 | ||
| 17 | diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c | 17 | diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c |
| 18 | index 617c892dde..6d6f1ef39a 100644 | 18 | index 617c892dde..92c6534da6 100644 |
| 19 | --- a/board/raspberrypi/rpi/rpi.c | 19 | --- a/board/raspberrypi/rpi/rpi.c |
| 20 | +++ b/board/raspberrypi/rpi/rpi.c | 20 | +++ b/board/raspberrypi/rpi/rpi.c |
| 21 | @@ -148,6 +148,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { | 21 | @@ -148,6 +148,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { |
| @@ -24,7 +24,7 @@ index 617c892dde..6d6f1ef39a 100644 | |||
| 24 | }, | 24 | }, |
| 25 | + [0x11] = { | 25 | + [0x11] = { |
| 26 | + "4 Model B", | 26 | + "4 Model B", |
| 27 | + DTB_DIR "bcm2711-rpi-4-b.dtb", | 27 | + DTB_DIR "bcm2838-rpi-4-b.dtb", |
| 28 | + true, | 28 | + true, |
| 29 | + }, | 29 | + }, |
| 30 | }; | 30 | }; |
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0008-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 index 546e786..8732762 100644 --- a/recipes-bsp/u-boot/u-boot-2019.07/0008-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 | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From cb85ecba76fde3c96007eae9eda58a083f177333 Mon Sep 17 00:00:00 2001 | 1 | From 89171b0aa2e0f02e9e56d1f47ac7722246c68bbd Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrei Gherzan <andrei@balena.io> | 2 | From: Andrei Gherzan <andrei@balena.io> |
| 3 | Date: Fri, 12 Jul 2019 11:26:10 +0100 | 3 | Date: Fri, 12 Jul 2019 11:26:10 +0100 |
| 4 | Subject: [PATCH 08/12] arm: bcm283x: Include definition for additional emmc | 4 | Subject: [PATCH 5/7] arm: bcm283x: Include definition for additional emmc |
| 5 | clock | 5 | clock |
| 6 | 6 | ||
| 7 | This clock has a different mbox ID[1] so have this included in the | 7 | This clock has a different mbox ID[1] so have this included in the |
| @@ -16,10 +16,10 @@ Upstream-status: Pending | |||
| 16 | 1 file changed, 1 insertion(+) | 16 | 1 file changed, 1 insertion(+) |
| 17 | 17 | ||
| 18 | diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h | 18 | diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h |
| 19 | index 2d711daaa8..cad035e8cd 100644 | 19 | index e44c7577da..f2a98acddd 100644 |
| 20 | --- a/arch/arm/mach-bcm283x/include/mach/mbox.h | 20 | --- a/arch/arm/mach-bcm283x/include/mach/mbox.h |
| 21 | +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h | 21 | +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h |
| 22 | @@ -239,6 +239,7 @@ struct bcm2835_mbox_tag_set_power_state { | 22 | @@ -230,6 +230,7 @@ struct bcm2835_mbox_tag_set_power_state { |
| 23 | #define BCM2835_MBOX_CLOCK_ID_SDRAM 8 | 23 | #define BCM2835_MBOX_CLOCK_ID_SDRAM 8 |
| 24 | #define BCM2835_MBOX_CLOCK_ID_PIXEL 9 | 24 | #define BCM2835_MBOX_CLOCK_ID_PIXEL 9 |
| 25 | #define BCM2835_MBOX_CLOCK_ID_PWM 10 | 25 | #define BCM2835_MBOX_CLOCK_ID_PWM 10 |
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-mach-bcm283x-Define-mbox-address-for-BCM2838.patch b/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-mach-bcm283x-Define-mbox-address-for-BCM2838.patch deleted file mode 100644 index a7def93..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-mach-bcm283x-Define-mbox-address-for-BCM2838.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | From 32546abed12ff4c9b8b1480b31e6306bec876218 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrei Gherzan <andrei@balena.io> | ||
| 3 | Date: Wed, 17 Jul 2019 15:34:07 +0100 | ||
| 4 | Subject: [PATCH 05/12] arm: mach-bcm283x: Define mbox address for BCM2838 | ||
| 5 | |||
| 6 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 7 | Upstream-status: Pending | ||
| 8 | --- | ||
| 9 | arch/arm/mach-bcm283x/include/mach/mbox.h | 5 +++++ | ||
| 10 | 1 file changed, 5 insertions(+) | ||
| 11 | |||
| 12 | diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
| 13 | index e3a893e49c..2d711daaa8 100644 | ||
| 14 | --- a/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
| 15 | +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
| 16 | @@ -38,11 +38,16 @@ | ||
| 17 | /* Raw mailbox HW */ | ||
| 18 | |||
| 19 | #ifndef CONFIG_BCM2835 | ||
| 20 | +#ifdef CONFIG_BCM2838 | ||
| 21 | +#define BCM2835_MBOX_PHYSADDR 0xfe00b880 | ||
| 22 | +#else | ||
| 23 | #define BCM2835_MBOX_PHYSADDR 0x3f00b880 | ||
| 24 | +#endif | ||
| 25 | #else | ||
| 26 | #define BCM2835_MBOX_PHYSADDR 0x2000b880 | ||
| 27 | #endif | ||
| 28 | |||
| 29 | + | ||
| 30 | struct bcm2835_mbox_regs { | ||
| 31 | u32 read; | ||
| 32 | u32 rsvd0[5]; | ||
| 33 | -- | ||
| 34 | 2.22.0 | ||
| 35 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0009-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 index 762cb7e..bbd7679 100644 --- a/recipes-bsp/u-boot/u-boot-2019.07/0009-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 | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 8fd71dfaeab0ae350c8fa56b039eaafd577a1787 Mon Sep 17 00:00:00 2001 | 1 | From 8db873f8b0c8c0881fe4154163824da67bee41ae Mon Sep 17 00:00:00 2001 |
| 2 | From: Matthias Brugger <mbrugger@suse.com> | 2 | From: Matthias Brugger <mbrugger@suse.com> |
| 3 | Date: Wed, 10 Jul 2019 13:24:36 +0200 | 3 | Date: Wed, 10 Jul 2019 13:24:36 +0200 |
| 4 | Subject: [PATCH 09/12] mmc: bcm2835_sdhci: Add support for bcm2711 device | 4 | Subject: [PATCH 6/7] mmc: bcm2835_sdhci: Add support for bcm2711 device |
| 5 | 5 | ||
| 6 | The bcm2711 has two emmc controller. The difference is the clocks | 6 | The bcm2711 has two emmc controller. The difference is the clocks |
| 7 | they use. Add support for the second emmc contoller. | 7 | they use. Add support for the second emmc contoller. |
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0007-dt-bindings-Define-BCM2838_CLOCK_EMMC2-needed-for-Ra.patch b/recipes-bsp/u-boot/u-boot-2019.07/0007-dt-bindings-Define-BCM2838_CLOCK_EMMC2-needed-for-Ra.patch deleted file mode 100644 index 597b492..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0007-dt-bindings-Define-BCM2838_CLOCK_EMMC2-needed-for-Ra.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | From 8ba1934b184fcdb967c5046ddace112bf3be21f1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrei Gherzan <andrei@balena.io> | ||
| 3 | Date: Wed, 17 Jul 2019 15:34:28 +0100 | ||
| 4 | Subject: [PATCH 07/12] dt-bindings: Define BCM2838_CLOCK_EMMC2 needed for | ||
| 5 | RaspberryPi 4 | ||
| 6 | |||
| 7 | On BCM2838 there is an additional clock. This clock was added in the | ||
| 8 | same bcm2835-cprman driver and is used by the emmc2 dt node. | ||
| 9 | |||
| 10 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 11 | Upstream-status: Pending | ||
| 12 | --- | ||
| 13 | include/dt-bindings/clock/bcm2835.h | 1 + | ||
| 14 | 1 file changed, 1 insertion(+) | ||
| 15 | |||
| 16 | diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h | ||
| 17 | index 2cec01f968..b75031abb1 100644 | ||
| 18 | --- a/include/dt-bindings/clock/bcm2835.h | ||
| 19 | +++ b/include/dt-bindings/clock/bcm2835.h | ||
| 20 | @@ -58,3 +58,4 @@ | ||
| 21 | #define BCM2835_CLOCK_DSI1E 48 | ||
| 22 | #define BCM2835_CLOCK_DSI0P 49 | ||
| 23 | #define BCM2835_CLOCK_DSI1P 50 | ||
| 24 | +#define BCM2838_CLOCK_EMMC2 51 | ||
| 25 | -- | ||
| 26 | 2.22.0 | ||
| 27 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch b/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch index b2d25d0..af1af7d 100644 --- a/recipes-bsp/u-boot/u-boot-2019.07/0011-rpi-Add-memory-map-for-bcm2838.patch +++ b/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | From ab0137601cea84296f607da22d27f0bbf1265e1a Mon Sep 17 00:00:00 2001 | 1 | From e9b0fcf3d311999df5c112fbe66b2c9cde632778 Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrei Gherzan <andrei@balena.io> | 2 | From: Andrei Gherzan <andrei@balena.io> |
| 3 | Date: Fri, 12 Jul 2019 14:27:31 +0100 | 3 | Date: Fri, 12 Jul 2019 14:27:31 +0100 |
| 4 | Subject: [PATCH 11/12] rpi: Add memory map for bcm2838 | 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[1]. | ||
| 8 | |||
| 9 | [1] https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/bcm2838.dtsi | ||
| 5 | 10 | ||
| 6 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | 11 | Signed-off-by: Andrei Gherzan <andrei@balena.io> |
| 7 | Upstream-status: Pending | 12 | Upstream-status: Pending |
| @@ -10,7 +15,7 @@ Upstream-status: Pending | |||
| 10 | 1 file changed, 24 insertions(+), 3 deletions(-) | 15 | 1 file changed, 24 insertions(+), 3 deletions(-) |
| 11 | 16 | ||
| 12 | diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c | 17 | diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c |
| 13 | index 6d6f1ef39a..1c4fae9166 100644 | 18 | index 92c6534da6..bddf2a578d 100644 |
| 14 | --- a/board/raspberrypi/rpi/rpi.c | 19 | --- a/board/raspberrypi/rpi/rpi.c |
| 15 | +++ b/board/raspberrypi/rpi/rpi.c | 20 | +++ b/board/raspberrypi/rpi/rpi.c |
| 16 | @@ -249,7 +249,8 @@ static uint32_t rev_type; | 21 | @@ -249,7 +249,8 @@ static uint32_t rev_type; |
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0010-arm-bcm283x-Define-device-base-addresses-for-bcm2835.patch b/recipes-bsp/u-boot/u-boot-2019.07/0010-arm-bcm283x-Define-device-base-addresses-for-bcm2835.patch deleted file mode 100644 index bfba764..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0010-arm-bcm283x-Define-device-base-addresses-for-bcm2835.patch +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | From 1f7bbd8ee6f4781473d87f6194ad2f815b1c1a19 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrei Gherzan <andrei@balena.io> | ||
| 3 | Date: Fri, 12 Jul 2019 11:38:11 +0100 | ||
| 4 | Subject: [PATCH 10/12] arm: bcm283x: Define device base addresses for bcm2835 | ||
| 5 | |||
| 6 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 7 | Upstream-status: Pending | ||
| 8 | --- | ||
| 9 | arch/arm/mach-bcm283x/include/mach/sdhci.h | 4 ++++ | ||
| 10 | arch/arm/mach-bcm283x/include/mach/timer.h | 4 ++++ | ||
| 11 | arch/arm/mach-bcm283x/include/mach/wdog.h | 4 ++++ | ||
| 12 | 3 files changed, 12 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h | ||
| 15 | index 5cb6ec3340..262b016a1b 100644 | ||
| 16 | --- a/arch/arm/mach-bcm283x/include/mach/sdhci.h | ||
| 17 | +++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h | ||
| 18 | @@ -7,7 +7,11 @@ | ||
| 19 | #define _BCM2835_SDHCI_H_ | ||
| 20 | |||
| 21 | #ifndef CONFIG_BCM2835 | ||
| 22 | +#ifdef CONFIG_BCM2838 | ||
| 23 | +#define BCM2835_SDHCI_BASE 0xfe300000 | ||
| 24 | +#else | ||
| 25 | #define BCM2835_SDHCI_BASE 0x3f300000 | ||
| 26 | +#endif | ||
| 27 | #else | ||
| 28 | #define BCM2835_SDHCI_BASE 0x20300000 | ||
| 29 | #endif | ||
| 30 | diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h | ||
| 31 | index 56b0c356bb..dc3ed98879 100644 | ||
| 32 | --- a/arch/arm/mach-bcm283x/include/mach/timer.h | ||
| 33 | +++ b/arch/arm/mach-bcm283x/include/mach/timer.h | ||
| 34 | @@ -7,7 +7,11 @@ | ||
| 35 | #define _BCM2835_TIMER_H | ||
| 36 | |||
| 37 | #ifndef CONFIG_BCM2835 | ||
| 38 | +#ifdef CONFIG_BCM2838 | ||
| 39 | +#define BCM2835_TIMER_PHYSADDR 0xfe003000 | ||
| 40 | +#else | ||
| 41 | #define BCM2835_TIMER_PHYSADDR 0x3f003000 | ||
| 42 | +#endif | ||
| 43 | #else | ||
| 44 | #define BCM2835_TIMER_PHYSADDR 0x20003000 | ||
| 45 | #endif | ||
| 46 | diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h | ||
| 47 | index 99c88e5df7..ef040f385d 100644 | ||
| 48 | --- a/arch/arm/mach-bcm283x/include/mach/wdog.h | ||
| 49 | +++ b/arch/arm/mach-bcm283x/include/mach/wdog.h | ||
| 50 | @@ -7,7 +7,11 @@ | ||
| 51 | #define _BCM2835_WDOG_H | ||
| 52 | |||
| 53 | #ifndef CONFIG_BCM2835 | ||
| 54 | +#ifdef CONFIG_BCM2838 | ||
| 55 | +#define BCM2835_WDOG_PHYSADDR 0xfe100000 | ||
| 56 | +#else | ||
| 57 | #define BCM2835_WDOG_PHYSADDR 0x3f100000 | ||
| 58 | +#endif | ||
| 59 | #else | ||
| 60 | #define BCM2835_WDOG_PHYSADDR 0x20100000 | ||
| 61 | #endif | ||
| 62 | -- | ||
| 63 | 2.22.0 | ||
| 64 | |||
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch b/recipes-bsp/u-boot/u-boot-2019.07/0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch deleted file mode 100644 index 47d443b..0000000 --- a/recipes-bsp/u-boot/u-boot-2019.07/0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | From 29f48584f6c4b40124396c77547e34febc015a36 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Fabian Vogt <fvogt@suse.com> | ||
| 3 | Date: Fri, 28 Jun 2019 14:25:53 +0200 | ||
| 4 | Subject: [PATCH 12/12] bcm283x mbox: Correctly wait for space to send | ||
| 5 | |||
| 6 | For sending, the second mailbox is used, but previously the status register of | ||
| 7 | the first one was read. | ||
| 8 | |||
| 9 | Signed-off-by: Andrei Gherzan <andrei@balena.io> | ||
| 10 | Upstream-status: Submitted [https://lists.denx.de/pipermail/u-boot/2019-July/376774.html] | ||
| 11 | --- | ||
| 12 | arch/arm/mach-bcm283x/include/mach/mbox.h | 7 +++++-- | ||
| 13 | arch/arm/mach-bcm283x/mbox.c | 6 +++--- | ||
| 14 | 2 files changed, 8 insertions(+), 5 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
| 17 | index cad035e8cd..cd78966150 100644 | ||
| 18 | --- a/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
| 19 | +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h | ||
| 20 | @@ -51,9 +51,12 @@ | ||
| 21 | struct bcm2835_mbox_regs { | ||
| 22 | u32 read; | ||
| 23 | u32 rsvd0[5]; | ||
| 24 | - u32 status; | ||
| 25 | - u32 config; | ||
| 26 | + u32 status_r; | ||
| 27 | + u32 config_r; | ||
| 28 | u32 write; | ||
| 29 | + u32 rsvd1[5]; | ||
| 30 | + u32 status_w; | ||
| 31 | + u32 config_w; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #define BCM2835_MBOX_STATUS_WR_FULL 0x80000000 | ||
| 35 | diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c | ||
| 36 | index 1642ebd103..f7483bf423 100644 | ||
| 37 | --- a/arch/arm/mach-bcm283x/mbox.c | ||
| 38 | +++ b/arch/arm/mach-bcm283x/mbox.c | ||
| 39 | @@ -27,7 +27,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) | ||
| 40 | /* Drain any stale responses */ | ||
| 41 | |||
| 42 | for (;;) { | ||
| 43 | - val = readl(®s->status); | ||
| 44 | + val = readl(®s->status_r); | ||
| 45 | if (val & BCM2835_MBOX_STATUS_RD_EMPTY) | ||
| 46 | break; | ||
| 47 | if (get_timer(0) >= endtime) { | ||
| 48 | @@ -40,7 +40,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) | ||
| 49 | /* Wait for space to send */ | ||
| 50 | |||
| 51 | for (;;) { | ||
| 52 | - val = readl(®s->status); | ||
| 53 | + val = readl(®s->status_w); | ||
| 54 | if (!(val & BCM2835_MBOX_STATUS_WR_FULL)) | ||
| 55 | break; | ||
| 56 | if (get_timer(0) >= endtime) { | ||
| 57 | @@ -58,7 +58,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) | ||
| 58 | /* Wait for the response */ | ||
| 59 | |||
| 60 | for (;;) { | ||
| 61 | - val = readl(®s->status); | ||
| 62 | + val = readl(®s->status_r); | ||
| 63 | if (!(val & BCM2835_MBOX_STATUS_RD_EMPTY)) | ||
| 64 | break; | ||
| 65 | if (get_timer(0) >= endtime) { | ||
| 66 | -- | ||
| 67 | 2.22.0 | ||
| 68 | |||
diff --git a/recipes-bsp/u-boot/u-boot_2019.07.bbappend b/recipes-bsp/u-boot/u-boot_2019.07.bbappend index f39db10..7cd8d66 100644 --- a/recipes-bsp/u-boot/u-boot_2019.07.bbappend +++ b/recipes-bsp/u-boot/u-boot_2019.07.bbappend | |||
| @@ -1,17 +1,12 @@ | |||
| 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" |
| 2 | UBOOT_RPI4_SUPPORT_PATCHES = " \ | 2 | UBOOT_RPI4_SUPPORT_PATCHES = " \ |
| 3 | file://0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch \ | 3 | file://0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch \ |
| 4 | file://0002-dts-Create-a-dtsi-for-BCM2835-6-7-specific-configura.patch \ | 4 | file://0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch \ |
| 5 | file://0003-dts-Add-initial-support-for-bcm2838.patch \ | 5 | file://0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch \ |
| 6 | file://0004-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-mach-bcm283x-Define-mbox-address-for-BCM2838.patch \ | 7 | file://0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch \ |
| 8 | file://0006-rpi-Add-rpi_model-entry-for-RaspberryPi-4.patch \ | 8 | file://0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch \ |
| 9 | file://0007-dt-bindings-Define-BCM2838_CLOCK_EMMC2-needed-for-Ra.patch \ | 9 | file://0007-rpi-Add-memory-map-for-bcm2838.patch \ |
| 10 | file://0008-arm-bcm283x-Include-definition-for-additional-emmc-c.patch \ | ||
| 11 | file://0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch \ | ||
| 12 | file://0010-arm-bcm283x-Define-device-base-addresses-for-bcm2835.patch \ | ||
| 13 | file://0011-rpi-Add-memory-map-for-bcm2838.patch \ | ||
| 14 | file://0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch \ | ||
| 15 | " | 10 | " |
| 16 | 11 | ||
| 17 | SRC_URI_append_raspberrypi4 = "${UBOOT_RPI4_SUPPORT_PATCHES}" | 12 | SRC_URI_append_raspberrypi4 = "${UBOOT_RPI4_SUPPORT_PATCHES}" |
