kernel: bump 5.4 to 5.4.48
[oweals/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0379-ARM-bcm-Backport-BCM2711-support-from-upstream.patch
1 From 88dacbcd946d2e0cd06337ab3f393064ab6aba82 Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <wahrenst@gmx.net>
3 Date: Fri, 27 Dec 2019 11:40:56 +0100
4 Subject: [PATCH] ARM: bcm: Backport BCM2711 support from upstream
5
6 Make the BCM2711 a different machine, but keep it in board_bcm2835.
7
8 Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
9 ---
10  arch/arm/mach-bcm/Kconfig         |  4 ++--
11  arch/arm/mach-bcm/board_bcm2835.c | 17 +++++++++++++++--
12  arch/arm64/Kconfig.platforms      |  5 +++--
13  3 files changed, 20 insertions(+), 6 deletions(-)
14
15 --- a/arch/arm/mach-bcm/Kconfig
16 +++ b/arch/arm/mach-bcm/Kconfig
17 @@ -161,7 +161,7 @@ config ARCH_BCM2835
18         select GPIOLIB
19         select ARM_AMBA
20         select ARM_ERRATA_411920 if ARCH_MULTI_V6
21 -       select ARM_GIC
22 +       select ARM_GIC if ARCH_MULTI_V7
23         select ARM_TIMER_SP804
24         select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7
25         select TIMER_OF
26 @@ -175,7 +175,7 @@ config ARCH_BCM2835
27         select ZONE_DMA if ARM_LPAE
28         select MFD_CORE
29         help
30 -         This enables support for the Broadcom BCM2835 and BCM2836 SoCs.
31 +         This enables support for the Broadcom BCM2711 and BCM283x SoCs.
32           This SoC is used in the Raspberry Pi and Roku 2 devices.
33  
34  config ARCH_BCM_53573
35 --- a/arch/arm/mach-bcm/board_bcm2835.c
36 +++ b/arch/arm/mach-bcm/board_bcm2835.c
37 @@ -109,17 +109,30 @@ static const char * const bcm2835_compat
38  #ifdef CONFIG_ARCH_MULTI_V7
39         "brcm,bcm2836",
40         "brcm,bcm2837",
41 -       "brcm,bcm2711",
42  #endif
43         NULL
44  };
45  
46  DT_MACHINE_START(BCM2835, "BCM2835")
47 +       .map_io = bcm2835_map_io,
48 +       .init_machine = bcm2835_init,
49 +       .dt_compat = bcm2835_compat,
50 +       .smp = smp_ops(bcm2836_smp_ops),
51 +MACHINE_END
52 +
53 +static const char * const bcm2711_compat[] = {
54 +#ifdef CONFIG_ARCH_MULTI_V7
55 +       "brcm,bcm2711",
56 +#endif
57 +       NULL
58 +};
59 +
60 +DT_MACHINE_START(BCM2711, "BCM2711")
61  #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
62         .dma_zone_size  = SZ_1G,
63  #endif
64         .map_io = bcm2835_map_io,
65         .init_machine = bcm2835_init,
66 -       .dt_compat = bcm2835_compat,
67 +       .dt_compat = bcm2711_compat,
68         .smp = smp_ops(bcm2836_smp_ops),
69  MACHINE_END
70 --- a/arch/arm64/Kconfig.platforms
71 +++ b/arch/arm64/Kconfig.platforms
72 @@ -37,11 +37,12 @@ config ARCH_BCM2835
73         select PINCTRL
74         select PINCTRL_BCM2835
75         select ARM_AMBA
76 +       select ARM_GIC
77         select ARM_TIMER_SP804
78         select HAVE_ARM_ARCH_TIMER
79         help
80 -         This enables support for the Broadcom BCM2837 SoC.
81 -         This SoC is used in the Raspberry Pi 3 device.
82 +         This enables support for the Broadcom BCM2837 and BCM2711 SoC.
83 +         These SoCs are used in the Raspberry Pi 3 and 4 devices.
84  
85  config ARCH_BCM_IPROC
86         bool "Broadcom iProc SoC Family"