From 7d9ea5f98df97a32a568ba4b7c4177cc0cb3ddd4 Mon Sep 17 00:00:00 2001 From: jenkins101 Date: Sun, 5 Oct 2014 21:06:52 +0200 Subject: [PATCH] added package brcmfmac_sdio-firmware linux: added needed drivers for bcm43xx bluetooth devices This is needed to load broadcom bluetooth firmware for bcm43xx chips existing in some arm devices. Signed-off-by: Stephan Raue --- .../brcmfmac_sdio-firmware/package.mk | 34 +++++++++++++++++++ .../system.d/brcmfmac_sdio-firmware@.service | 8 +++++ .../udev.d/80-brcmfmac_sdio.rules | 19 +++++++++++ projects/imx6/linux/linux.arm.conf | 10 +++--- projects/imx6/options | 5 +++ 5 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 packages/linux-firmware/brcmfmac_sdio-firmware/package.mk create mode 100644 packages/linux-firmware/brcmfmac_sdio-firmware/system.d/brcmfmac_sdio-firmware@.service create mode 100644 packages/linux-firmware/brcmfmac_sdio-firmware/udev.d/80-brcmfmac_sdio.rules diff --git a/packages/linux-firmware/brcmfmac_sdio-firmware/package.mk b/packages/linux-firmware/brcmfmac_sdio-firmware/package.mk new file mode 100644 index 0000000000..d2c864107c --- /dev/null +++ b/packages/linux-firmware/brcmfmac_sdio-firmware/package.mk @@ -0,0 +1,34 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# OpenELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC. If not, see . +################################################################################ + +PKG_NAME="brcmfmac_sdio-firmware" +PKG_VERSION="0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/OpenELEC/OpenELEC.tv" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS_TARGET="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="firmware" +PKG_SHORTDESC="brcmfmac_sdio-firmware: firmware for brcm bluetooth devices" +PKG_LONGDESC="Firmware for Broadcom Bluetooth devices and brcm-patchram-plus that downloads a patchram files in the HCD format to the Bluetooth based silicon and combo chips and other utility functions." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + diff --git a/packages/linux-firmware/brcmfmac_sdio-firmware/system.d/brcmfmac_sdio-firmware@.service b/packages/linux-firmware/brcmfmac_sdio-firmware/system.d/brcmfmac_sdio-firmware@.service new file mode 100644 index 0000000000..3515777a33 --- /dev/null +++ b/packages/linux-firmware/brcmfmac_sdio-firmware/system.d/brcmfmac_sdio-firmware@.service @@ -0,0 +1,8 @@ +[Unit] +Description=Broadcom sdio firmware update for %I +ConditionPathExists=/dev/ttymxc3 + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/brcm_patchram_plus --patchram /lib/firmware/brcm/%I.hcd --baudrate 3000000 --use_baudrate_for_download /dev/ttymxc3 --enable_hci --no2bytes --tosleep=50000 diff --git a/packages/linux-firmware/brcmfmac_sdio-firmware/udev.d/80-brcmfmac_sdio.rules b/packages/linux-firmware/brcmfmac_sdio-firmware/udev.d/80-brcmfmac_sdio.rules new file mode 100644 index 0000000000..fd7ada3e68 --- /dev/null +++ b/packages/linux-firmware/brcmfmac_sdio-firmware/udev.d/80-brcmfmac_sdio.rules @@ -0,0 +1,19 @@ +################################################################################ +# udev rules file for loading brcmfmac_sdio-firmware +################################################################################ + +ACTION!="add", GOTO="end" +SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4329", GOTO="begin" +SUBSYSTEMS=="sdio", ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4330", GOTO="begin" +GOTO="end" +LABEL="begin" +### Brodcom bcm4330 bluetooth device +ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4330", \ + ENV{brcm_device}="bcm4330" +### Brodcom bcm4329 bluetooth device +ATTRS{vendor}=="0x02d0", ATTRS{device}=="0x4329", \ + ENV{brcm_device}="bcm4329" + +ENV{brcm_device}=="?*", ACTION=="add", \ + TAG+="systemd", ENV{SYSTEMD_WANTS}+="brcmfmac_sdio-firmware@$env{brcm_device}.service" +LABEL="end" diff --git a/projects/imx6/linux/linux.arm.conf b/projects/imx6/linux/linux.arm.conf index ce66007d7b..c8d8529d86 100644 --- a/projects/imx6/linux/linux.arm.conf +++ b/projects/imx6/linux/linux.arm.conf @@ -887,19 +887,19 @@ CONFIG_BT_HIDP=m # Bluetooth device drivers # CONFIG_BT_HCIBTUSB=m -# CONFIG_BT_HCIBTSDIO is not set +CONFIG_BT_HCIBTSDIO=m CONFIG_BT_HCIUART=m -# CONFIG_BT_HCIUART_H4 is not set -# CONFIG_BT_HCIUART_BCSP is not set +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y CONFIG_BT_HCIUART_ATH3K=y -# CONFIG_BT_HCIUART_LL is not set +CONFIG_BT_HCIUART_LL=y # CONFIG_BT_HCIUART_3WIRE is not set CONFIG_BT_HCIBCM203X=m CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m # CONFIG_BT_HCIVHCI is not set CONFIG_BT_MRVL=m -# CONFIG_BT_MRVL_SDIO is not set +CONFIG_BT_MRVL_SDIO=y CONFIG_BT_ATH3K=m # CONFIG_AF_RXRPC is not set CONFIG_WIRELESS=y diff --git a/projects/imx6/options b/projects/imx6/options index 20b77601b3..1aad303c79 100644 --- a/projects/imx6/options +++ b/projects/imx6/options @@ -111,6 +111,11 @@ # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap) KODIPLAYER_DRIVER="libfslvpuwrap" + # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) + # Space separated list is supported, + # e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware" + FIRMWARE="$FIRMWARE brcmfmac_sdio-firmware" + # Modules to install in initramfs for early boot INITRAMFS_MODULES=""