[V2] nitrogen6x-lite: Add Broadcom firmware

Submitted by Eric Nelson on Oct. 7, 2013, 10:20 p.m.

Details

Message ID 1381184459-14339-1-git-send-email-eric.nelson@boundarydevices.com
State Accepted, archived
Delegated to: Otavio Salvador
Headers show

Commit Message

Eric Nelson Oct. 7, 2013, 10:20 p.m.
The Nitrogen6-Lite board supports Wi-fi with a daughterboard
with the Broadcom 4330 ABGN chip.

This patch adds the driver, firmware, and calibration (nvram)
files to the build using the broadcom-nvram-config recipe.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
V2 uses the broadcom-nvram-config recipe to do this, adds
support for the nvram file, and updates the kernel configuration
to specify the location of both the firmware and nvram files.

Requires Luca's patch set adding nitrogen6x-lite support:
	http://patches.openembedded.org/patch/59323/

 conf/machine/nitrogen6x-lite.conf                  |  1 +
 .../broadcom-nvram-config/broadcom-nvram-config.bb |  3 +-
 .../files/nitrogen6x-lite/nvram.txt                | 80 ++++++++++++++++++++++
 .../nitrogen6x-lite/defconfig                      |  4 +-
 4 files changed, 85 insertions(+), 3 deletions(-)
 create mode 100644 recipes-bsp/broadcom-nvram-config/files/nitrogen6x-lite/nvram.txt

Patch hide | download patch | download mbox

diff --git a/conf/machine/nitrogen6x-lite.conf b/conf/machine/nitrogen6x-lite.conf
index a394dfb..ff58715 100644
--- a/conf/machine/nitrogen6x-lite.conf
+++ b/conf/machine/nitrogen6x-lite.conf
@@ -24,4 +24,5 @@  UBOOT_MACHINE ?= "nit6xlite_config"
 
 SERIAL_CONSOLE = "115200 ttymxc1"
 
+MACHINE_EXTRA_RRECOMMENDS += " broadcom-nvram-config"
 MACHINE_FEATURES += " pci wifi bluetooth"
diff --git a/recipes-bsp/broadcom-nvram-config/broadcom-nvram-config.bb b/recipes-bsp/broadcom-nvram-config/broadcom-nvram-config.bb
index 7566b74..501cc20 100644
--- a/recipes-bsp/broadcom-nvram-config/broadcom-nvram-config.bb
+++ b/recipes-bsp/broadcom-nvram-config/broadcom-nvram-config.bb
@@ -22,9 +22,10 @@  FILES_${PN} = " \
   /lib/firmware/brcm/brcmfmac-sdio.txt \
 "
 BROADCOM_FIRMWARE = "INVALID"
+BROADCOM_FIRMWARE_nitrogen6x-lite = "bcm4330"
 BROADCOM_FIRMWARE_wandboard-dual = "bcm4329"
 BROADCOM_FIRMWARE_wandboard-quad = "bcm4329"
 
 RDEPENDS_${PN} = "linux-firmware-${BROADCOM_FIRMWARE}"
 
-COMPATIBLE_MACHINE = "(wandboard-dual|wandboard-quad)"
+COMPATIBLE_MACHINE = "(nitrogen6x-lite|wandboard-dual|wandboard-quad)"
diff --git a/recipes-bsp/broadcom-nvram-config/files/nitrogen6x-lite/nvram.txt b/recipes-bsp/broadcom-nvram-config/files/nitrogen6x-lite/nvram.txt
new file mode 100644
index 0000000..6183cca
--- /dev/null
+++ b/recipes-bsp/broadcom-nvram-config/files/nitrogen6x-lite/nvram.txt
@@ -0,0 +1,80 @@ 
+#
+# Board configuration for Boundary Devices Nitrogen6-Lite
+#
+manfid=0x2d0
+prodid=0x0547
+vendid=0x14e4
+devid=0x4360
+boardtype=0x05e1
+boardrev=0x1202
+boardflags=0x0080200
+nocrc=1
+xtalfreq=37400
+boardnum=22
+ag0=254
+aa2g=1
+ccode=ALL
+pa0itssit=0x20
+pa0b0=5367
+pa0b1=-633
+pa0b2=-158
+rssismf2g=0xa
+rssismc2g=0x3
+rssisav2g=0x7
+#rssi params for 5GHz
+rssismf5g=0x4
+rssismc5g=0x3
+rssisav5g=0x7
+#PA parameters for lower a-band
+pa1lob0=4378
+pa1lob1=-596
+pa1lob2=-180
+#PA parameters for midband
+pa1b0=4672
+pa1b1=-603
+pa1b2=-172
+#PA parameters for high band
+pa1hib0=4752
+pa1hib1=-609
+pa1hib2=-173
+rxpo5g=0
+maxp2ga0=76
+maxp5ga0=0x42
+maxp5gla0=0x42
+maxp5gha0=0x42
+# 2.4G Tx Power offsets
+cck2gpo=0x4444
+ofdm2gpo=0x66666666
+mcs2gpo0=0x8888
+mcs2gpo1=0x8888
+# 5G Tx Power offsets
+ofdm5gpo=0x44444444
+ofdm5glpo=0x44444444
+ofdm5ghpo=0x44444444
+mcs5gpo0=0x6666
+mcs5gpo1=0x6666
+mcs5glpo0=0x6666
+mcs5glpo1=0x6666
+mcs5ghpo0=0x6666
+mcs5ghpo1=0x46666
+sromrev=3
+# il0macaddr=00:90:4c:c5:12:38
+wl0id=0x431b
+cckPwrOffset=4
+swctrlmap_2g=0x44844484,0x42824282,0x40804484,0x18282,0x1ff
+triso5g=0
+swctrlmap_5g=0x00100010,0x20202020,0x20202020,0x14202,0x0f0
+rfreg033=0x19
+rfreg033_cck=0x1f
+dacrate2g=160
+dacrate5g=160
+txalpfbyp2g=1
+bphyscale=17
+cckPwrIdxCorr=-15
+pacalidx2g=50
+#pacalidx5g=20
+noise_cal_ref_2g=53
+noise_cal_po_2g=0
+noise_cal_ref_5g=52
+noise_cal_po_5g=5,0,0
+
diff --git a/recipes-kernel/linux/linux-boundary-3.0.35/nitrogen6x-lite/defconfig b/recipes-kernel/linux/linux-boundary-3.0.35/nitrogen6x-lite/defconfig
index 1b9b181..ad0795d 100644
--- a/recipes-kernel/linux/linux-boundary-3.0.35/nitrogen6x-lite/defconfig
+++ b/recipes-kernel/linux/linux-boundary-3.0.35/nitrogen6x-lite/defconfig
@@ -114,8 +114,8 @@  CONFIG_FEC_NAPI=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 CONFIG_BCMDHD=m
-CONFIG_BCMDHD_FW_PATH="/lib/firmware/fw_bcmdhd.bin"
-CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/bcmdhd.cal"
+CONFIG_BCMDHD_FW_PATH="/lib/firmware/brcm/brcmfmac-sdio.bin"
+CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/brcm/brcmfmac-sdio.txt"
 CONFIG_INPUT_POLLDEV=y
 CONFIG_INPUT_EVDEV=y
 CONFIG_KEYBOARD_GPIO=y