Openwrt/target/linux/bcm63xx/patches-5.4
Daniel González Cabanelas a0e0e621ca bcm63xx: sprom: override the PCI device ID
The PCI device ID detected by the wifi drivers on devices using a fallback
SPROM is wrong. Currently the chipnum is used for this parameter.

Most SSB based Broadcom wifi chips are 2.4 and 5GHz capable. But on
devices without a physical SPROM, the only one way to detect if the device
suports both bands or only the 5GHz band, is by reading the device ID from
the fallback SPROM.

In some devices, this may lead to a non working wifi on a 5GHz-only card,
or in the best case a working 2.4GHz-only in a dual band wifi card.

The offset for the deviceid in SSB SPROMs is 0x0008, whereas in BCMA is
0x0060. This is true for any SPROM version.

Override the PCI device ID with the one defined at the fallback SPROM, to
detect the correct wifi card model and allow using the 5GHz band if
supported.

The patch has been tested with the following wifi radios:

BCM43222: b43: both 2.4/5GHz working
          brcm-wl: both 2.4/5GHz working

BCM43225: b43: 2.4GHz, working
	 brcmsmac: working
	 brcm-wl: it lacks support

BCM43217: b43: 2.4GHz, working
	 brcmsmac: it lacks support
	 brcm-wl: it lacks support

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
[amend commit description, rework patch to avoid using a new global variable
and keep ssb sprom extraction code as close to ssb/pci.c as possible]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-02 20:40:31 +01:00
..
010-v5.8-MIPS-BCM63xx-fix-6328-boot-selection-bit.patch
021-v5.8-mtd-rawnand-brcmnand-improve-hamming-oob-layout.patch
023-v5.8-mtd-rawnand-brcmnand-rename-v4-registers.patch
025-v5.8-mtd-rawnand-brcmnand-rename-page-sizes.patch
026-v5.8-mtd-rawnand-brcmnand-support-v2.1-v2.2-controllers.patch
030-v5.9-leds-bcm6328-support-second-hw-blinking-interval.patch
031-v5.9-MIPS-BCM63xx-add-endif-comments.patch
032-v5.9-MIPS-BCM63xx-improve-CFE-version-detection.patch
033-v5.9-mtd-parsers-bcm63xx-simplify-CFE-detection.patch
040-v5.12-bcm63xx_enet-batch-process-rx-path.patch
041-v5.12-bcm63xx_enet-add-BQL-support.patch
042-v5.12-bcm63xx_enet-add-xmit_more-support.patch
043-v5.12-bcm63xx_enet-alloc-rx-skb-with-NET_IP_ALIGN.patch
044-v5.12-bcm63xx_enet-consolidate-rx-SKB-ring-cleanup-code.patch
045-v5.12-bcm63xx_enet-convert-to-build_skb.patch
046-v5.12-bcm63xx_enet-improve-rx-loop.patch
047-bcm63xx_enet-fix-kernel-panic.patch bcm63xx: fix bcm63xx ethernet kernel panics 2021-01-28 12:01:14 +01:00
100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch
101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch
102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch
103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch
104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch
105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch
106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch
107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch
108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch
109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch
110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch
130-pinctrl-add-bcm63xx-base-code.patch
131-Documentation-add-BCM6328-pincontroller-binding-docu.patch
132-pinctrl-add-a-pincontrol-driver-for-BCM6328.patch
133-Documentation-add-BCM6348-pincontroller-binding-docu.patch
134-pinctrl-add-a-pincontrol-driver-for-BCM6348.patch
135-Documentation-add-BCM6358-pincontroller-binding-docu.patch
136-pinctrl-add-a-pincontrol-driver-for-BCM6358.patch
137-Documentation-add-BCM6362-pincontroller-binding-docu.patch
138-pinctrl-add-a-pincontrol-driver-for-BCM6362.patch
139-Documentation-add-BCM6368-pincontroller-binding-docu.patch
140-pinctrl-add-a-pincontrol-driver-for-BCM6368.patch
141-Documentation-add-BCM63268-pincontroller-binding-doc.patch
142-pinctrl-add-a-pincontrol-driver-for-BCM63268.patch
143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
144-add-removed-syscon_regmap_lookup_by_pdevname.patch
145-pinctrl-BCM6362-fix-gpio-mode.patch
206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch kernel: bump 5.4 to 5.4.93 2021-01-29 14:22:09 +01:00
207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch
208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch
320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
321-irqchip-add-support-for-bcm6345-style-external-inter.patch
322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch
323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch
324-irqchip-bcm6345-periph-fix-block-uninitialized.patch
325-irqchip-bcm6345-external-fix-base-uninitialized.patch
326-irqchip-bcm6345-report-eff-affinity.patch
327-irqchip-bcm6345-periph-clear-on-init.patch
330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
331-MIPS-BCM63XX-define-variant-id-field.patch
332-MIPS-BCM63XX-detect-BCM6328-variants.patch
333-MIPS-BCM63XX-detect-BCM6362-variants.patch
334-MIPS-BCM63XX-detect-BCM6368-variants.patch
335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch
336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch
337-MIPS-BCM63XX-widen-cpuid-field.patch
338-MIPS-BCM63XX-increase-number-of-IRQs.patch
339-MIPS-BCM63XX-add-support-for-BCM63268.patch
340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch
341-MIPS-BCM63XX-add-support-for-BCM6318.patch
342-MIPS-BCM63XX-split-PCIe-reset-signals.patch
343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch
344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch
345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch
346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch
347-MIPS-BCM6318-USB-support.patch
348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch
349-MIPS-BCM63XX-add-BCM63268-USB-support.patch
350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch
351-set-board-usbh-ports.patch
354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch
355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch
356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch
357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch
358-MIPS-BCM63XX-make-fallback-sprom-optional.patch
359-MIPS-BCM63XX-allow-different-types-of-sprom.patch
360-MIPS-BCM63XX-add-support-for-raw-sproms.patch bcm63xx: backport upstream SSB SPROM extraction 2021-02-02 20:40:29 +01:00
361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch bcm63xx: backport upstream SSB SPROM extraction 2021-02-02 20:40:29 +01:00
362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch bcm63xx: backport upstream SSB SPROM extraction 2021-02-02 20:40:29 +01:00
363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch bcm63xx: backport upstream SSB SPROM extraction 2021-02-02 20:40:29 +01:00
364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch bcm63xx: backport upstream SSB SPROM extraction 2021-02-02 20:40:29 +01:00
365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch bcm63xx: backport upstream SSB SPROM extraction 2021-02-02 20:40:29 +01:00
366-MIPS-BCM63XX-fallback-sprom-override-devid.patch bcm63xx: sprom: override the PCI device ID 2021-02-02 20:40:31 +01:00
367-MIPS-BCM63XX-add-support-for-loading-DTB.patch
368-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch
371_add_of_node_available_by_alias.patch
372_dont_register_pflash_when_available_in_dtb.patch
373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch
374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch
375-MIPS-BCM63XX-switch-to-new-gpio-driver.patch
377-MIPS-BCM63XX-register-lookup-for-ephy-reset-gpio.patch
378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch
379-MIPS-BCM63XX-provide-a-gpio-lookup-for-the-pcmcia-re.patch
380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch
381-Documentation-add-BCM6318-pincontroller-binding-docu.patch
382-pinctrl-add-a-pincontrol-driver-for-BCM6318.patch
383-bcm63xx_select_pinctrl.patch
389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch
390-MIPS-BCM63XX-do-not-register-SPI-controllers.patch
391-MIPS-BCM63XX-do-not-register-uart.patch
392-MIPS-BCM63XX-remove-leds-and-buttons.patch
400-bcm963xx_flashmap.patch
401-bcm963xx_real_rootfs_length.patch
402_bcm63xx_enet_vlan_incoming_fixed.patch bcm63xx: fix bcm63xx ethernet kernel panics 2021-01-28 12:01:14 +01:00
403-6358-enet1-external-mii-clk.patch
404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch bcm63xx: fix bcm63xx ethernet kernel panics 2021-01-28 12:01:14 +01:00
408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch bcm63xx: fix bcm63xx ethernet kernel panics 2021-01-28 12:01:14 +01:00
411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
415-MIPS-BCM63XX-export-the-attached-flash-type.patch
416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
420-BCM63XX-add-endian-check-for-ath9k.patch
421-BCM63XX-add-led-pin-for-ath9k.patch
422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
423-bcm63xx_enet_add_b53_support.patch bcm63xx: fix bcm63xx ethernet kernel panics 2021-01-28 12:01:14 +01:00
424-bcm63xx_enet_no_request_mem_region.patch bcm63xx: fix bcm63xx ethernet kernel panics 2021-01-28 12:01:14 +01:00
427-boards_probe_switch.patch
428-bcm63xx_enet-rgmii-ctrl-fix.patch bcm63xx: fix bcm63xx ethernet kernel panics 2021-01-28 12:01:14 +01:00
430-MIPS-BCM63XX-add-nand-clocks.patch
431-MIPS-BCM63XX-add-nand-rset.patch
432-MIPS-BCM63XX-detect-nand-nvram.patch
433-MIPS-BCM63XX-enable-nand-support.patch
434-nand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch
500-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
501-board_bcm6328-extend-96328avng-reference-board.patch
502-board-bcm6358-DWV-S0_fixes.patch
511-board_bcm6318.patch
512-board_bcm6328.patch
513-board-bcm6338.patch
514-board_bcm6345.patch
515-board-bcm6348.patch
516-board-bcm6358.patch
517-board_bcm6362.patch
518-board_bcm6368.patch
519-board_bcm63268.patch
531-board_bcm6348-bt-voyager-2500v-bb.patch
532-MIPS-BCM63XX-add-inventel-Livebox-support.patch
800-wl_exports.patch
801-ssb_export_fallback_sprom.patch bcm63xx: sprom: override the PCI device ID 2021-02-02 20:40:31 +01:00
802-rtl8367r_fix_RGMII_support.patch
803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch