Devicetree
 help / color / mirror / Atom feed
* [PATCH v4 0/5] bcma: support the BCM6362 integrated WLAN backplane
@ 2026-11-04 19:30 Alessio Ferri
  2026-11-04 19:30 ` [PATCH v4 1/5] dt-bindings: bus: add Broadcom BCM6362 WLAN AXI backplane Alessio Ferri
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Alessio Ferri @ 2026-11-04 19:30 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Rafał Miłecki, Philipp Zabel, Florian Fainelli,
	Broadcom internal kernel review list, Thomas Bogendoerfer,
	Jonas Gorski
  Cc: linux-wireless, devicetree, linux-kernel, linux-mips,
	Alessio Ferri

The BCM6362 integrates a WLAN macro (802.11n core) on its own 
bcma backplane. The backplane differs from the ones bcma supports 
because: 1) its registers are big-endian, 2) none of its cores has 
a wrapper and make bcma loop crash, and 3) the macro has to be 
clocked, taken out of reset and enabled through a SoC-level WLAN
control block before the backplane can be accessed.

Patches 2 and 3 add two opt-in bus flags to the scan code for the
endianness and for wrapper-less cores. Patch 4 adds a dedicated host
driver that brings the macro up, provides big-endian ops and emulates
the agent registers on top of the WLAN control block. Patches 1 and 5
add the binding and the SoC dtsi node.

My router run with this series backported to kernel 6.12, and has a 
bcm4352 and the integrated wlan targeted by this patch; bcma scans both 
without problems, both chips transmit just fine. The bcm4352 is pcie and
has a normal backplane, so the changes are tested as non-breaking.

This is a small module and i have plenty of hardware to test it (3x 
6362), I am able to maintain it as long as my hardware allows. 
It is also low risk: the flags that change the behaviour of bcma are 
opt-in and it is "complete", at least for the 6362.
Further code is only expected if the bcm63168, that i also have in high 
numbers (5 routers), requires it.

Proof that it scan and works (macs edited):

bcma-sprom bcm6362-sprom: patching SPROM with 38 fixups...
bcma-sprom bcm6362-sprom: mtd mac X
bcma-sprom bcm6362-sprom: registered SPROM for SoC bcma [bus]
bcma-sprom bcm4352-sprom: patching SPROM with 35 fixups...
bcma-sprom bcm4352-sprom: mtd mac X
bcma-sprom bcm4352-sprom: registered SPROM for [1:0]
bcma-host-soc-bcm6362 10004000.bus: bus0: Found chip with id 0x6362, rev 0x01 and package 0x00
bcma-host-soc-bcm6362 10004000.bus: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x23, class 0x0)
bcma-host-soc-bcm6362 10004000.bus: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x16, class 0x0)
bcma-host-soc-bcm6362 10004000.bus: bus0: Core 2 found: SHIM (manuf 0x4BF, id 0x837, rev 0x01, class 0x0)
bcma-host-soc-bcm6362 10004000.bus: bus0: Found rev 6 PMU (capabilities 0x084C2806)
bcma-host-soc-bcm6362 10004000.bus: bus0: Flash type not supported
bcma-sprom bcm6362-sprom: requested by SoC bcma [bus]
bcma-host-soc-bcm6362 10004000.bus: bus0: Using SPROM revision 8 provided by platform.
bcma-host-soc-bcm6362 10004000.bus: bus0: PMU res mask pre-write: min=0x0000005d max=0x0000ffff
bcma-host-soc-bcm6362 10004000.bus: bus0: Bus registered
bcma-pci-bridge 0000:01:00.0: enabling device (0000 -> 0002)
bcma-pci-bridge 0000:01:00.0: bus1: Found chip with id 0x4352, rev 0x03 and package 0x01
bcma-pci-bridge 0000:01:00.0: bus1: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2B, class 0x0)
bcma-pci-bridge 0000:01:00.0: bus1: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x2A, class 0x0)
bcma-pci-bridge 0000:01:00.0: bus1: Core 2 found: ARM CR4 (manuf 0x4BF, id 0x83E, rev 0x02, class 0x0)
bcma-pci-bridge 0000:01:00.0: bus1: Core 3 found: PCIe Gen2 (manuf 0x4BF, id 0x83C, rev 0x01, class 0x0)
bcma-pci-bridge 0000:01:00.0: bus1: Core 4 found: USB 2.0 Device (manuf 0x4BF, id 0x81A, rev 0x11, class 0x0)
bcma-pci-bridge 0000:01:00.0: bus1: Found rev 17 PMU (capabilities 0x10A22B11)
bcma-pci-bridge 0000:01:00.0: bus1: Found SPROM revision 11
bcma-pci-bridge 0000:01:00.0: bus1: PMU PLL pre-write: ctl2=0x00000c31 ctl3=0x0000100e
bcma-pci-bridge 0000:01:00.0: bus1: PMU res mask pre-write: min=0x000007fb max=0x000007ff
bcma-pci-bridge 0000:01:00.0: bus1: Bus registered

br-lan: port 5(phy0-ap0) entered blocking state
br-lan: port 5(phy0-ap0) entered disabled state
b43 bcma0:1 phy0-ap0: entered allmulticast mode
b43 bcma0:1 phy0-ap0: entered promiscuous mode
hostapd: phy0-ap0: interface state UNINITIALIZED->COUNTRY_UPDATE
bcma-host-soc-bcm6362 10004000.bus: bus0: Unknown spuravoidance settings for chip 0x6362, not changing PLL
br-lan: port 5(phy0-ap0) entered blocking state
br-lan: port 5(phy0-ap0) entered forwarding state
netifd: Network device 'phy0-ap0' link is up
hostapd: phy0-ap0: interface state COUNTRY_UPDATE->ENABLED
hostapd: phy0-ap0: AP-ENABLED
hostapd: phy0-ap0: STA Y IEEE 802.11: authenticated
hostapd: phy0-ap0: STA Y IEEE 802.11: associated (aid 1)
hostapd: phy0-ap0: AP-STA-CONNECTED Y auth_alg=open

Signed-off-by: Alessio Ferri <alessio.ferri@mythread.it>
---
Changes in v4:
- Incorporated Philipp Zebel suggestion about reset handling
- Link to v3: https://lore.kernel.org/r/20261104-bcm6362-wlan-v3-0-e46562b2ac12@mythread.it

Changes in v3:
- Restricted interrupt mask
- Link to v2: https://lore.kernel.org/r/20261012-bcm6362-wlan-v2-0-4752da7e0982@mythread.it

Changes in v2:
- Replace the drivers/bus bridge driver and the host_soc platform_data
  quirks with a dedicated bcma host driver, drivers/bcma/host_soc_bcm6362.c;
  host_soc.c is left untouched
- DT: describe the WLAN backplane with a single
  "brcm,bcm6362-wlan-bus-axi" node instead of a bridge node with a
  brcm,bus-axi child; add the node to bcm6362.dtsi
- Drop the "SHIM" naming: reg-names "chipcommon"/"wlan-ctrl",
  reset-names "wlan"/"wlan-ubus", bus flag "wrapperless"
- Split the scan changes into two opt-in bus flags (big_endian,
  wrapperless)
- Move the MAINTAINERS entry to the new driver and binding
- Link to v1: https://lore.kernel.org/r/20260529-add-bcm6362-wlan-v1-0-722242777f58@gmail.com

---
Alessio Ferri (5):
      dt-bindings: bus: add Broadcom BCM6362 WLAN AXI backplane
      bcma: scan: support big-endian backplanes
      bcma: scan: accept wrapper-less cores on wrapper-less backplanes
      bcma: add host driver for the BCM6362 integrated WLAN backplane
      MIPS: dts: bcm6362: add the integrated WLAN backplane

 .../bindings/bus/brcm,bcm6362-wlan-bus-axi.yaml    | 109 ++++++
 MAINTAINERS                                        |   7 +
 arch/mips/boot/dts/brcm/bcm6362.dtsi               |  20 +
 drivers/bcma/Kconfig                               |  12 +
 drivers/bcma/Makefile                              |   1 +
 drivers/bcma/bcma_private.h                        |  15 +
 drivers/bcma/host_soc_bcm6362.c                    | 423 +++++++++++++++++++++
 drivers/bcma/main.c                                |   6 +
 drivers/bcma/scan.c                                |  10 +-
 include/linux/bcma/bcma.h                          |   5 +
 10 files changed, 607 insertions(+), 1 deletion(-)
---
base-commit: d6d3455d8751854e0d1820f14184682e23ac4475
change-id: 20261011-bcm6362-wlan-d4473bd1f2e0

Best regards,
-- 
Alessio Ferri <alessio.ferri@mythread.it>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-04 20:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 19:30 [PATCH v4 0/5] bcma: support the BCM6362 integrated WLAN backplane Alessio Ferri
2026-11-04 19:30 ` [PATCH v4 1/5] dt-bindings: bus: add Broadcom BCM6362 WLAN AXI backplane Alessio Ferri
2026-11-04 19:30 ` [PATCH v4 2/5] bcma: scan: support big-endian backplanes Alessio Ferri
2026-11-04 19:30 ` [PATCH v4 3/5] bcma: scan: accept wrapper-less cores on wrapper-less backplanes Alessio Ferri
2026-11-04 19:30 ` [PATCH v4 4/5] bcma: add host driver for the BCM6362 integrated WLAN backplane Alessio Ferri
2026-11-04 20:07   ` sashiko-bot
2026-11-04 19:30 ` [PATCH v4 5/5] MIPS: dts: bcm6362: add the " Alessio Ferri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox