From: Daniel Golle Date: Thu, 14 Jun 2018 15:21:19 +0000 (+0200) Subject: brcm2708: move wifi calibration EEPROMs out of base-files X-Git-Tag: v19.07.0-rc1~3461 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=037ef13a161c6167b328aaf6ca0e259a5b7db037;p=oweals%2Fopenwrt.git brcm2708: move wifi calibration EEPROMs out of base-files Ship EEPROM blobs for specific supported board only and don't have them lurking around in our source tree but rather download them from @github/RPi-Distro/firmware-nonfree upstream. Signed-off-by: Daniel Golle --- diff --git a/package/firmware/brcmfmac-board-rpi/Makefile b/package/firmware/brcmfmac-board-rpi/Makefile new file mode 100644 index 0000000000..4268d9124c --- /dev/null +++ b/package/firmware/brcmfmac-board-rpi/Makefile @@ -0,0 +1,88 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=brcmfmac-board-rpi +PKG_VERSION:=2018-03-12 +PKG_RELEASE:=86e88fbf0345da49555d0ec34c80b4fbae7d0cd3 +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +BRCMFMAC434XX_SDIO_URL:=@GITHUB/RPi-Distro/firmware-nonfree/$(PKG_RELEASE)/brcm/ +BRCMFMAC43430_SDIO_FILE:=brcmfmac43430-sdio-$(PKG_RELEASE) +BRCMFMAC43455_SDIO_FILE:=brcmfmac43455-sdio-$(PKG_RELEASE) + +define Download/brcmfmac43430_sdio_txt + FILE:=$(BRCMFMAC43430_SDIO_FILE).txt + URL:=$(BRCMFMAC434XX_SDIO_URL) + URL_FILE:=brcmfmac43430-sdio.txt + HASH:=e4ce7ad5ce72406f958ed758539b65d958d1c0eb3e46e3f8e9f02b510d88e0b0 +endef +$(eval $(call Download,brcmfmac43430_sdio_txt)) + +define Download/brcmfmac43455_sdio_txt + FILE:=$(BRCMFMAC43455_SDIO_FILE).txt + URL:=$(BRCMFMAC434XX_SDIO_URL) + URL_FILE:=brcmfmac43455-sdio.txt + HASH:=15698c62457bcf25e60d063e6c666d6e1b7dacdf2b03e6d14ebbc619de6da6b7 +endef +$(eval $(call Download,brcmfmac43455_sdio_txt)) + +define Download/brcmfmac43455_sdio_clm_blob + FILE:=$(BRCMFMAC43455_SDIO_FILE).clm_blob + URL:=$(BRCMFMAC434XX_SDIO_URL) + URL_FILE:=brcmfmac43455-sdio.clm_blob + HASH:=8e2250518bc789e53109728c3c0a6124bc3801a75a1cb4966125753cf1f0252e +endef +$(eval $(call Download,brcmfmac43455_sdio_clm_blob)) + +define Package/brcmfmac-board-rpi/Default + SECTION:=firmware + CATEGORY:=Firmware + URL:=https://github.com/RPi-Distro/firmware-nonfree/ + DEPENDS:=@TARGET_brcm2708 + PKGARCH:=all +endef + +define Package/brcmfmac-board-rpi2 + $(call Package/brcmfmac-board-rpi/Default) + TITLE:=BCM43430 RPi SDIO NVRAM +endef + +define Package/brcmfmac-board-rpi2/description + NVRAM for the Broadcom BCM43430 on RPi boards. +endef + +define Package/brcmfmac-board-rpi3 + $(call Package/brcmfmac-board-rpi/Default) + TITLE:=BCM43455 RPi SDIO NVRAM +endef + +define Package/brcmfmac-board-rpi3/description + NVRAM and localisations blob for the Broadcom BCM43455 on RPi boards. +endef + +define Build/Prepare + rm -rf $(PKG_BUILD_DIR) + mkdir -p $(PKG_BUILD_DIR) + cp $(DL_DIR)/$(BRCMFMAC43430_SDIO_FILE).txt $(PKG_BUILD_DIR)/brcmfmac43430-sdio.txt + cp $(DL_DIR)/$(BRCMFMAC43455_SDIO_FILE).txt $(PKG_BUILD_DIR)/brcmfmac43455-sdio.txt + cp $(DL_DIR)/$(BRCMFMAC43455_SDIO_FILE).clm_blob $(PKG_BUILD_DIR)/brcmfmac43455-sdio.clm_blob +endef + +define Build/Compile + true +endef + +define Package/brcmfmac-board-rpi2/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/brcmfmac43430-sdio.txt $(1)/lib/firmware/brcm/ +endef + +define Package/brcmfmac-board-rpi3/install + $(INSTALL_DIR) $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/brcmfmac43455-sdio.txt $(1)/lib/firmware/brcm/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/brcmfmac43455-sdio.clm_blob $(1)/lib/firmware/brcm/ +endef + +$(eval $(call BuildPackage,brcmfmac-board-rpi2)) +$(eval $(call BuildPackage,brcmfmac-board-rpi3)) diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile index 8f3107bf1a..3032b9ffd1 100644 --- a/target/linux/brcm2708/Makefile +++ b/target/linux/brcm2708/Makefile @@ -27,8 +27,7 @@ DEFAULT_PACKAGES += \ kmod-usb-hid \ kmod-sound-core kmod-sound-arm-bcm2835 \ kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \ - brcmfmac-firmware-43430-sdio brcmfmac-firmware-43455-sdio \ - kmod-brcmfmac wpad-mini partx-utils mkf2fs e2fsprogs + partx-utils mkf2fs e2fsprogs KERNELNAME:=Image dtbs diff --git a/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43430-sdio.txt b/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43430-sdio.txt deleted file mode 100644 index ea4f648a18..0000000000 --- a/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43430-sdio.txt +++ /dev/null @@ -1,66 +0,0 @@ -# NVRAM file for BCM943430WLPTH -# 2.4 GHz, 20 MHz BW mode - -# The following parameter values are just placeholders, need to be updated. -manfid=0x2d0 -prodid=0x0727 -vendid=0x14e4 -devid=0x43e2 -boardtype=0x0727 -boardrev=0x1101 -boardnum=22 -macaddr=00:90:4c:c5:12:38 -sromrev=11 -boardflags=0x00404201 -boardflags3=0x08000000 -xtalfreq=37400 -nocrc=1 -ag0=255 -aa2g=1 -ccode=ALL - -pa0itssit=0x20 -extpagain2g=0 -#PA parameters for 2.4GHz, measured at CHIP OUTPUT -pa2ga0=-168,7161,-820 -AvVmid_c0=0x0,0xc8 -cckpwroffset0=5 - -# PPR params -maxp2ga0=84 -txpwrbckof=6 -cckbw202gpo=0 -legofdmbw202gpo=0x66111111 -mcsbw202gpo=0x77711111 -propbw202gpo=0xdd - -# OFDM IIR : -ofdmdigfilttype=18 -ofdmdigfilttypebe=18 -# PAPD mode: -papdmode=1 -papdvalidtest=1 -pacalidx2g=42 -papdepsoffset=-22 -papdendidx=58 - -# LTECX flags -ltecxmux=0 -ltecxpadnum=0x0102 -ltecxfnsel=0x44 -ltecxgcigpio=0x01 - -il0macaddr=00:90:4c:c5:12:38 -wl0id=0x431b - -deadman_to=0xffffffff -# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG -muxenab=0x1 -# CLDO PWM voltage settings - 0x4 - 1.1 volt -#cldo_pwm=0x4 - -#VCO freq 326.4MHz -spurconfig=0x3 - -edonthd20l=-75 -edoffthd20ul=-80 diff --git a/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob b/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob deleted file mode 100644 index 3b9b5bdc15..0000000000 Binary files a/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob and /dev/null differ diff --git a/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43455-sdio.txt b/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43455-sdio.txt deleted file mode 100644 index 260c9299ca..0000000000 --- a/target/linux/brcm2708/base-files/lib/firmware/brcm/brcmfmac43455-sdio.txt +++ /dev/null @@ -1,92 +0,0 @@ -# Cloned from bcm94345wlpagb_p2xx.txt -NVRAMRev=$Rev: 498373 $ -sromrev=11 -vendid=0x14e4 -devid=0x43ab -manfid=0x2d0 -prodid=0x06e4 -#macaddr=00:90:4c:c5:12:38 -macaddr=b8:27:eb:74:f2:6c -nocrc=1 -boardtype=0x6e4 -boardrev=0x1304 - -#XTAL 37.4MHz -xtalfreq=37400 - -btc_mode=1 -#------------------------------------------------------ -#boardflags: 5GHz eTR switch by default -# 2.4GHz eTR switch by default -# bit1 for btcoex -boardflags=0x00480201 -boardflags2=0x40800000 -boardflags3=0x48200100 -phycal_tempdelta=15 -rxchain=1 -txchain=1 -aa2g=1 -aa5g=1 -tssipos5g=1 -tssipos2g=1 -femctrl=0 -AvVmid_c0=1,165,2,100,2,100,2,100,2,100 -pa2ga0=-129,6525,-718 -pa2ga1=-149,4408,-601 -pa5ga0=-185,6836,-815,-186,6838,-815,-184,6859,-815,-184,6882,-818 -pa5ga1=-202,4285,-574,-201,4312,-578,-196,4391,-586,-201,4294,-575 -itrsw=1 -pdoffsetcckma0=2 -pdoffset2gperchan=0,-2,1,0,1,0,1,1,1,0,0,-1,-1,0 -pdoffset2g40ma0=16 -pdoffset40ma0=0x8888 -pdoffset80ma0=0x8888 -extpagain5g=2 -extpagain2g=2 -tworangetssi2g=1 -tworangetssi5g=1 -# LTECX flags -# WCI2 -ltecxmux=0 -ltecxpadnum=0x0504 -ltecxfnsel=0x22 -ltecxgcigpio=0x32 - -maxp2ga0=80 -ofdmlrbw202gpo=0x0022 -dot11agofdmhrbw202gpo=0x4442 -mcsbw202gpo=0x98444422 -mcsbw402gpo=0x98444422 -maxp5ga0=82,82,82,82 -mcsbw205glpo=0xb9555000 -mcsbw205gmpo=0xb9555000 -mcsbw205ghpo=0xb9555000 -mcsbw405glpo=0xb9555000 -mcsbw405gmpo=0xb9555000 -mcsbw405ghpo=0xb9555000 -mcsbw805glpo=0xb9555000 -mcsbw805gmpo=0xb9555000 -mcsbw805ghpo=0xb9555000 - -swctrlmap_2g=0x00000000,0x00000000,0x00000000,0x010000,0x3ff -swctrlmap_5g=0x00100010,0x00200020,0x00200020,0x010000,0x3fe -swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x3 -swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x3 - -vcodivmode=1 -deadman_to=481500000 - -ed_thresh2g=-54 -ed_thresh5g=-54 -eu_edthresh2g=-54 -eu_edthresh5g=-54 -ldo1=4 -rawtempsense=0x1ff -cckPwrIdxCorr=3 -cckTssiDelay=150 -ofdmTssiDelay=150 -txpwr2gAdcScale=1 -txpwr5gAdcScale=1 -dot11b_opts=0x3aa85 -cbfilttype=1 -fdsslevel_ch11=6 diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile index 326ef5a0ee..69c1d83fbf 100644 --- a/target/linux/brcm2708/image/Makefile +++ b/target/linux/brcm2708/image/Makefile @@ -66,6 +66,7 @@ define Device/rpi-2 DEVICE_TITLE := Raspberry Pi 2B/3B/3B+/3CM DEVICE_DTS := bcm2709-rpi-2-b bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3 SUPPORTED_DEVICES := rpi-2-b rpi-3-b rpi-3-b-plus rpi-cm raspberrypi,2-model-b raspberrypi,3-model-b raspberrypi,3-model-b-plus raspberrypi,compute-module-3 + DEVICE_PACKAGES := brcmfmac-firmware-43430-sdio brcmfmac-firmware-43455-sdio brcmfmac-board-rpi2 brcmfmac-board-rpi3 kmod-brcmfmac wpad-mini endef ifeq ($(SUBTARGET),bcm2709) TARGET_DEVICES += rpi-2 @@ -76,6 +77,7 @@ define Device/rpi-3 DEVICE_TITLE := Raspberry Pi 3B/3B+ DEVICE_DTS := broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus SUPPORTED_DEVICES := rpi-3-b rpi-3-b-plus raspberrypi,3-model-b raspberrypi,3-model-b-plus + DEVICE_PACKAGES := brcmfmac-firmware-43455-sdio brcmfmac-board-rpi3 kmod-brcmfmac wpad-mini endef ifeq ($(SUBTARGET),bcm2710) TARGET_DEVICES += rpi-3