* [PATCH v5 1/3] dt-bindings: arm: cpus: Add brcm,bca-smp enable method
2026-11-05 13:24 [PATCH v5 0/3] ARM: bcm: Enable CFE SMP on BCMBCA Linus Walleij
@ 2026-11-05 13:24 ` Linus Walleij
2026-11-06 14:25 ` Rob Herring (Arm)
2026-11-10 19:07 ` Florian Fainelli
2026-11-05 13:24 ` [PATCH v5 2/3] ARM: bcm: Add CFE SMP support for BCMBCA Linus Walleij
2026-11-05 13:39 ` [PATCH v5 3/3] ARM: dts: broadcom: Use CFE CPU bring-up on the XG6846B Linus Walleij
2 siblings, 2 replies; 8+ messages in thread
From: Linus Walleij @ 2026-11-05 13:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lorenzo Pieralisi,
Florian Fainelli, Broadcom internal kernel review list,
Russell King, William Zhang, Anand Gore, Kursad Oney,
Rafał Miłecki
Cc: devicetree, linux-arm-kernel, Linus Walleij
BCMBCA systems booted through CFE can release a secondary CPU by
writing its ARM-state entry address to a 32-bit MMIO mailbox and
sending a wakeup interrupt.
Document brcm,bca-smp and its single-cell cpu-release-addr property.
Require the mailbox address on CPU1, which CFE leaves in a holding pen.
CPU0 is already running and does not need a release address. Add a
Cortex-A7 example with the mailbox address only on CPU1.
Suggested-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Documentation/devicetree/bindings/arm/cpus.yaml | 46 +++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml
index 96136b70dacd..b83c7785f656 100644
--- a/Documentation/devicetree/bindings/arm/cpus.yaml
+++ b/Documentation/devicetree/bindings/arm/cpus.yaml
@@ -263,6 +263,7 @@ properties:
- amlogic,meson8b-smp
- arm,realview-smp
- aspeed,ast2600-smp
+ - brcm,bca-smp
- brcm,bcm11351-cpu-method
- brcm,bcm23550
- brcm,bcm2836-smp
@@ -479,6 +480,30 @@ allOf:
then:
required:
- secondary-boot-reg
+ - if:
+ properties:
+ enable-method:
+ const: brcm,bca-smp
+ required:
+ - enable-method
+ then:
+ properties:
+ cpu-release-addr:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Physical address of the 32-bit MMIO mailbox read by CFE after
+ a wakeup interrupt. Required on CPU1, which CFE leaves in
+ a holding pen. The kernel writes the ARM-state entry address
+ before sending the interrupt. CPU0 is already running.
+ if:
+ properties:
+ reg:
+ items:
+ - items:
+ - const: 1
+ then:
+ required:
+ - cpu-release-addr
- if:
properties:
enable-method:
@@ -720,4 +745,25 @@ examples:
cpu-release-addr = <0 0x20000000>;
};
};
+ - |
+ // Example 5 (Broadcom BCMBCA with CFE):
+ cpus {
+ #size-cells = <0>;
+ #address-cells = <1>;
+
+ cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a7";
+ reg = <0>;
+ enable-method = "brcm,bca-smp";
+ };
+
+ cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a7";
+ reg = <1>;
+ enable-method = "brcm,bca-smp";
+ cpu-release-addr = <0xff800568>;
+ };
+ };
...
--
2.56.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v5 1/3] dt-bindings: arm: cpus: Add brcm,bca-smp enable method
2026-11-05 13:24 ` [PATCH v5 1/3] dt-bindings: arm: cpus: Add brcm,bca-smp enable method Linus Walleij
@ 2026-11-06 14:25 ` Rob Herring (Arm)
2026-11-10 19:07 ` Florian Fainelli
1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2026-11-06 14:25 UTC (permalink / raw)
To: Linus Walleij
Cc: Lorenzo Pieralisi, Broadcom internal kernel review list,
Rafał Miłecki, Anand Gore, Kursad Oney,
Krzysztof Kozlowski, Conor Dooley, devicetree, Russell King,
William Zhang, linux-arm-kernel, Florian Fainelli
On Thu, 05 Nov 2026 14:24:46 +0100, Linus Walleij wrote:
> BCMBCA systems booted through CFE can release a secondary CPU by
> writing its ARM-state entry address to a 32-bit MMIO mailbox and
> sending a wakeup interrupt.
>
> Document brcm,bca-smp and its single-cell cpu-release-addr property.
> Require the mailbox address on CPU1, which CFE leaves in a holding pen.
> CPU0 is already running and does not need a release address. Add a
> Cortex-A7 example with the mailbox address only on CPU1.
>
> Suggested-by: William Zhang <william.zhang@broadcom.com>
> Reviewed-by: William Zhang <william.zhang@broadcom.com>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
> Documentation/devicetree/bindings/arm/cpus.yaml | 46 +++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v5 1/3] dt-bindings: arm: cpus: Add brcm,bca-smp enable method
2026-11-05 13:24 ` [PATCH v5 1/3] dt-bindings: arm: cpus: Add brcm,bca-smp enable method Linus Walleij
2026-11-06 14:25 ` Rob Herring (Arm)
@ 2026-11-10 19:07 ` Florian Fainelli
1 sibling, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-11-10 19:07 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lorenzo Pieralisi,
Florian Fainelli, Russell King, William Zhang, Anand Gore,
Kursad Oney, Rafał Miłecki
Cc: Florian Fainelli, devicetree, linux-arm-kernel
From: Florian Fainelli <f.fainelli@gmail.com>
On Thu, 05 Nov 2026 14:24:46 +0100, Linus Walleij <linusw@kernel.org> wrote:
> BCMBCA systems booted through CFE can release a secondary CPU by
> writing its ARM-state entry address to a 32-bit MMIO mailbox and
> sending a wakeup interrupt.
>
> Document brcm,bca-smp and its single-cell cpu-release-addr property.
> Require the mailbox address on CPU1, which CFE leaves in a holding pen.
> CPU0 is already running and does not need a release address. Add a
> Cortex-A7 example with the mailbox address only on CPU1.
>
> Suggested-by: William Zhang <william.zhang@broadcom.com>
> Reviewed-by: William Zhang <william.zhang@broadcom.com>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/soc/next, thanks!
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v5 2/3] ARM: bcm: Add CFE SMP support for BCMBCA
2026-11-05 13:24 [PATCH v5 0/3] ARM: bcm: Enable CFE SMP on BCMBCA Linus Walleij
2026-11-05 13:24 ` [PATCH v5 1/3] dt-bindings: arm: cpus: Add brcm,bca-smp enable method Linus Walleij
@ 2026-11-05 13:24 ` Linus Walleij
2026-11-10 19:07 ` Florian Fainelli
2026-11-05 13:39 ` [PATCH v5 3/3] ARM: dts: broadcom: Use CFE CPU bring-up on the XG6846B Linus Walleij
2 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2026-11-05 13:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lorenzo Pieralisi,
Florian Fainelli, Broadcom internal kernel review list,
Russell King, William Zhang, Anand Gore, Kursad Oney,
Rafał Miłecki
Cc: devicetree, linux-arm-kernel, Linus Walleij
The XG6846B CFE bootloader powers up CPU1 and leaves it in a holding pen
waiting for an interrupt. After waking, the stub reads the GPIO
GeneralPurpose register at 0xff800568 and branches to the stored address
in ARM state. The vendor kernel uses this mailbox and a wakeup IPI.
Implement the brcm,bca-smp CPU enable-method for BCMBCA systems
booted through CFE.
Read the mailbox address from the secondary CPU's cpu-release-addr
property. Map it as device memory, write secondary_startup_arm and
complete the write before sending the wakeup IPI. CPU1 is already
running, so no power or reset sequence is needed. Using the ARM entry
also supports kernels built in Thumb-2 mode. Clear any Thumb function
pointer tag before programming this ARM entry address.
Register the operations with CPU_METHOD_OF_DECLARE() so the CPU
nodes select CFE bring-up explicitly. Build the BCMBCA machine
description independently of DEBUG_BCMBCA, keeping the debug UART
mapping conditional. The generic ARM startup code retains PSCI priority.
Suggested-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
arch/arm/mach-bcm/Makefile | 2 +-
arch/arm/mach-bcm/board_bcmbca.c | 56 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile
index 6baedf4c6304..fcc4e0174adc 100644
--- a/arch/arm/mach-bcm/Makefile
+++ b/arch/arm/mach-bcm/Makefile
@@ -58,6 +58,6 @@ endif
# BCMBCA
ifeq ($(CONFIG_ARCH_BCMBCA),y)
-obj-$(CONFIG_DEBUG_BCMBCA) += board_bcmbca.o
+obj-y += board_bcmbca.o
obj-$(CONFIG_SMP) += bcm63xx_smp.o bcm63xx_pmb.o
endif
diff --git a/arch/arm/mach-bcm/board_bcmbca.c b/arch/arm/mach-bcm/board_bcmbca.c
index b510d959870a..248b8bd77645 100644
--- a/arch/arm/mach-bcm/board_bcmbca.c
+++ b/arch/arm/mach-bcm/board_bcmbca.c
@@ -1,9 +1,15 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2024 Linus Walleij <linus.walleij@linaro.org>
+#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/smp.h>
+
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+#include <asm/smp_plat.h>
+#ifdef CONFIG_DEBUG_BCMBCA
/* This is needed for LL-debug/earlyprintk/debug-macro.S */
static struct map_desc bcmbca_io_desc[] __initdata = {
{
@@ -13,12 +19,62 @@ static struct map_desc bcmbca_io_desc[] __initdata = {
.type = MT_DEVICE,
},
};
+#endif
static void __init bcmbca_map_io(void)
{
+#ifdef CONFIG_DEBUG_BCMBCA
iotable_init(bcmbca_io_desc, ARRAY_SIZE(bcmbca_io_desc));
+#endif
}
+#ifdef CONFIG_SMP
+static int bcmbca_boot_secondary(unsigned int cpu, struct task_struct *idle)
+{
+ struct device_node *np;
+ void __iomem *mailbox;
+ u32 release_addr;
+ int ret;
+
+ /* CFE has already powered up CPU1 and left it waiting in WFI. */
+ if (cpu_logical_map(cpu) != 1)
+ return -EINVAL;
+
+ np = of_get_cpu_node(cpu, NULL);
+ if (!np)
+ return -ENODEV;
+
+ ret = of_property_read_u32(np, "cpu-release-addr", &release_addr);
+ of_node_put(np);
+ if (ret) {
+ pr_err("CPU%u: missing or invalid cpu-release-addr property\n", cpu);
+ return ret;
+ }
+
+ mailbox = ioremap(release_addr, sizeof(u32));
+ if (!mailbox)
+ return -ENOMEM;
+
+ /*
+ * The CFE stub reads GPIO GeneralPurpose after an interrupt and
+ * branches to it in ARM state. Clear any Thumb function pointer
+ * tag and complete the MMIO write before sending the wakeup IPI.
+ */
+ writel(__pa_symbol(secondary_startup_arm) & ~1, mailbox);
+ dsb(sy);
+ arch_send_wakeup_ipi_mask(cpumask_of(cpu));
+ iounmap(mailbox);
+
+ return 0;
+}
+
+static const struct smp_operations bcmbca_smp_ops __initconst = {
+ .smp_boot_secondary = bcmbca_boot_secondary,
+};
+
+CPU_METHOD_OF_DECLARE(bcmbca_smp, "brcm,bca-smp", &bcmbca_smp_ops);
+#endif
+
static const char * const bcmbca_dt_compat[] = {
/* TODO: Add other BCMBCA SoCs here to get debug UART support */
"brcm,bcm6846",
--
2.56.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v5 2/3] ARM: bcm: Add CFE SMP support for BCMBCA
2026-11-05 13:24 ` [PATCH v5 2/3] ARM: bcm: Add CFE SMP support for BCMBCA Linus Walleij
@ 2026-11-10 19:07 ` Florian Fainelli
0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-11-10 19:07 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lorenzo Pieralisi,
Florian Fainelli, Russell King, William Zhang, Anand Gore,
Kursad Oney, Rafał Miłecki
Cc: Florian Fainelli, devicetree, linux-arm-kernel
From: Florian Fainelli <f.fainelli@gmail.com>
On Thu, 05 Nov 2026 14:24:47 +0100, Linus Walleij <linusw@kernel.org> wrote:
> The XG6846B CFE bootloader powers up CPU1 and leaves it in a holding pen
> waiting for an interrupt. After waking, the stub reads the GPIO
> GeneralPurpose register at 0xff800568 and branches to the stored address
> in ARM state. The vendor kernel uses this mailbox and a wakeup IPI.
>
> Implement the brcm,bca-smp CPU enable-method for BCMBCA systems
> booted through CFE.
> Read the mailbox address from the secondary CPU's cpu-release-addr
> property. Map it as device memory, write secondary_startup_arm and
> complete the write before sending the wakeup IPI. CPU1 is already
> running, so no power or reset sequence is needed. Using the ARM entry
> also supports kernels built in Thumb-2 mode. Clear any Thumb function
> pointer tag before programming this ARM entry address.
>
> Register the operations with CPU_METHOD_OF_DECLARE() so the CPU
> nodes select CFE bring-up explicitly. Build the BCMBCA machine
> description independently of DEBUG_BCMBCA, keeping the debug UART
> mapping conditional. The generic ARM startup code retains PSCI priority.
>
> Suggested-by: William Zhang <william.zhang@broadcom.com>
> Reviewed-by: William Zhang <william.zhang@broadcom.com>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/soc/next, thanks!
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v5 3/3] ARM: dts: broadcom: Use CFE CPU bring-up on the XG6846B
2026-11-05 13:24 [PATCH v5 0/3] ARM: bcm: Enable CFE SMP on BCMBCA Linus Walleij
2026-11-05 13:24 ` [PATCH v5 1/3] dt-bindings: arm: cpus: Add brcm,bca-smp enable method Linus Walleij
2026-11-05 13:24 ` [PATCH v5 2/3] ARM: bcm: Add CFE SMP support for BCMBCA Linus Walleij
@ 2026-11-05 13:39 ` Linus Walleij
2026-11-10 19:07 ` Florian Fainelli
2 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2026-11-05 13:39 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lorenzo Pieralisi,
Florian Fainelli, Broadcom internal kernel review list,
Russell King, William Zhang, Anand Gore, Kursad Oney,
Rafał Miłecki
Cc: Linus Walleij, devicetree, linux-arm-kernel
The XG6846B boots through CFE, which parks CPU1 in a holding pen and does
not provide PSCI. Starting Linux from CFE does not install a PSCI
implementation either. The working PSCI interface in newer GenXOS
firmware belongs to a different boot stack.
Disable the inherited PSCI node on this board so Linux does not issue
SMCs to an interface that is absent. Set the CPUs' enable-method to
brcm,bca-smp to select the BCMBCA CFE SMP operations. Describe the CFE
mailbox only in CPU1's cpu-release-addr property, since CPU0 is already
running. Keep both CPU nodes enabled and leave the SoC's PSCI defaults
available to other boards.
Also remove no-map from the secondary-boot reservation. Its overlap
with ARM's initial page tables otherwise causes the reservation to be
rejected, leaving CFE's holding pen unprotected.
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts b/arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts
index a3616fb7b3a8..45d4df523110 100644
--- a/arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts
+++ b/arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts
@@ -34,7 +34,7 @@ reserved-memory {
ranges;
secondary-boot@0 {
- no-map;
+ /* Includes the kernel's initial page tables. */
reg = <0x00000000 0x00008000>;
};
pmc3-firmware@8000 {
@@ -56,6 +56,20 @@ button-restart {
};
};
+/* CFE parks CPU1 in its holding pen and does not provide PSCI. */
+&{/psci} {
+ status = "disabled";
+};
+
+&CA7_0 {
+ enable-method = "brcm,bca-smp";
+};
+
+&CA7_1 {
+ enable-method = "brcm,bca-smp";
+ cpu-release-addr = <0xff800568>;
+};
+
&gpio0 {
status = "okay";
};
--
2.56.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v5 3/3] ARM: dts: broadcom: Use CFE CPU bring-up on the XG6846B
2026-11-05 13:39 ` [PATCH v5 3/3] ARM: dts: broadcom: Use CFE CPU bring-up on the XG6846B Linus Walleij
@ 2026-11-10 19:07 ` Florian Fainelli
0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2026-11-10 19:07 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Linus Walleij, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lorenzo Pieralisi,
Florian Fainelli, Russell King, William Zhang, Anand Gore,
Kursad Oney, Rafał Miłecki
Cc: Florian Fainelli, devicetree, linux-arm-kernel
From: Florian Fainelli <f.fainelli@gmail.com>
On Thu, 5 Nov 2026 14:39:47 +0100, Linus Walleij <linusw@kernel.org> wrote:
> The XG6846B boots through CFE, which parks CPU1 in a holding pen and does
> not provide PSCI. Starting Linux from CFE does not install a PSCI
> implementation either. The working PSCI interface in newer GenXOS
> firmware belongs to a different boot stack.
>
> Disable the inherited PSCI node on this board so Linux does not issue
> SMCs to an interface that is absent. Set the CPUs' enable-method to
> brcm,bca-smp to select the BCMBCA CFE SMP operations. Describe the CFE
> mailbox only in CPU1's cpu-release-addr property, since CPU0 is already
> running. Keep both CPU nodes enabled and leave the SoC's PSCI defaults
> available to other boards.
>
> Also remove no-map from the secondary-boot reservation. Its overlap
> with ARM's initial page tables otherwise causes the reservation to be
> rejected, leaving CFE's holding pen unprotected.
>
> Reviewed-by: William Zhang <william.zhang@broadcom.com>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/soc/next, thanks!
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread