diff options
author | Haoran Wang <Haoran.Wang@freescale.com> | 2016-02-19 12:25:21 +0800 |
---|---|---|
committer | leozwang <leozwang@google.com> | 2016-02-25 12:18:23 -0800 |
commit | 7257a2a3f1610b2b894e80a72c83da9f83598356 (patch) | |
tree | dc2bdb155c94913a3fcab84278734e2dcbcd0cd3 | |
parent | 678dce005c323eb9f3bbcdc387ddf49b0eecfa78 (diff) | |
download | freescale-7257a2a3f1610b2b894e80a72c83da9f83598356.tar.gz |
Enable BCM4339 Bluetooth on Brillo
Added Bluetooth configuration files for BCM4339.
Change-Id: Ib4b527793812216a889836aea361cc0a3362291a
Signed-off-by: Haoran Wang <Haoran.Wang@freescale.com>
-rw-r--r-- | peripheral/bluetooth/bcm4339/Android.mk | 28 | ||||
-rw-r--r-- | peripheral/bluetooth/bcm4339/bt_bcm4339.rc | 31 | ||||
-rw-r--r-- | peripheral/bluetooth/bcm4339/bt_vendor.conf | 6 | ||||
-rw-r--r-- | peripheral/bluetooth/bcm4339/peripheral.mk | 31 | ||||
-rw-r--r-- | peripheral/bluetooth/bcm4339/vnd_picoimx.txt | 12 |
5 files changed, 108 insertions, 0 deletions
diff --git a/peripheral/bluetooth/bcm4339/Android.mk b/peripheral/bluetooth/bcm4339/Android.mk new file mode 100644 index 0000000..d6a48d7 --- /dev/null +++ b/peripheral/bluetooth/bcm4339/Android.mk @@ -0,0 +1,28 @@ +# Copyright (C) 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH := $(my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE := bt_bcm_bcm4339.imx +LOCAL_MODULE_TAGS := optional +LOCAL_REQUIRED_MODULES := \ + libbt-vendor \ + bluetooth.default \ + bluetooth-cli \ + bluetoothtbd \ + net_bdtool +LOCAL_INIT_RC := bt_bcm4339.rc +include $(BUILD_PHONY_PACKAGE) + diff --git a/peripheral/bluetooth/bcm4339/bt_bcm4339.rc b/peripheral/bluetooth/bcm4339/bt_bcm4339.rc new file mode 100644 index 0000000..62c9f09 --- /dev/null +++ b/peripheral/bluetooth/bcm4339/bt_bcm4339.rc @@ -0,0 +1,31 @@ +######################################################## +# BLUETOOTH CONFIGURATION - BROADCOM SPECIFIC +######################################################## + +on fs + mkdir /config/bt 0770 system bluetooth + setprop ro.bt.bdaddr_path /config/bt/bd_addr.conf + +on early-boot + chmod 0644 /config/bt/bd_addr.conf + +on post-fs-data + # Bluetooth + write /sys/class/rfkill/rfkill0/state 1 + chmod 0660 /sys/class/rfkill/rfkill0/state + chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state + chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type + +######################################################## + +service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL + class main + group bluetooth wifi system dhcp + disabled + oneshot + +service iprenew_bt-pan /system/bin/dhcpcd -n + group bluetooth system dhcp + disabled + oneshot + diff --git a/peripheral/bluetooth/bcm4339/bt_vendor.conf b/peripheral/bluetooth/bcm4339/bt_vendor.conf new file mode 100644 index 0000000..3f3cb94 --- /dev/null +++ b/peripheral/bluetooth/bcm4339/bt_vendor.conf @@ -0,0 +1,6 @@ +# UART device port where Bluetooth controller is attached +UartPort = /dev/ttymxc4 + +# Firmware patch file location +FwPatchFilePath = /vendor/firmware/bluetooth/bcm4339 +FwPatchFileName = BCM4335C0.ZP.hcd diff --git a/peripheral/bluetooth/bcm4339/peripheral.mk b/peripheral/bluetooth/bcm4339/peripheral.mk new file mode 100644 index 0000000..40edb0a --- /dev/null +++ b/peripheral/bluetooth/bcm4339/peripheral.mk @@ -0,0 +1,31 @@ +# +# Copyright 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# BCM4339 WIFI Firmware +BCM4339_BT_SRC := hardware/bsp/freescale/peripheral/bluetooth/bcm4339 +BCM4339_BT_FIRMWARE := hardware/bsp/freescale/peripheral/wifi/bcm4339/bcmdhd/firmware/ZP_BCM4339 +BCM4339_BT_FW_DST := system/vendor/firmware/bluetooth/bcm4339 + +PRODUCT_COPY_FILES += \ + $(BCM4339_BT_FIRMWARE)/BCM4335C0.ZP.hcd:$(BCM4339_BT_FW_DST)/BCM4335C0.ZP.hcd \ + $(BCM4339_BT_SRC)/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf + +# BCM Bluetooth +BOARD_HAVE_BLUETOOTH_BCM := true +BOARD_CUSTOM_BT_CONFIG := $(BCM4339_BT_SRC)/vnd_picoimx.txt + +DEVICE_PACKAGES += \ + bt_bcm_bcm4339.imx diff --git a/peripheral/bluetooth/bcm4339/vnd_picoimx.txt b/peripheral/bluetooth/bcm4339/vnd_picoimx.txt new file mode 100644 index 0000000..7656697 --- /dev/null +++ b/peripheral/bluetooth/bcm4339/vnd_picoimx.txt @@ -0,0 +1,12 @@ +BLUETOOTH_UART_DEVICE_PORT = "/dev/ttymxc4" +FW_PATCHFILE_LOCATION = "/vendor/firmware/bluetooth/bcm4339/" +BT_WAKE_VIA_PROC = FALSE +BT_WAKE_VIA_USERIAL_IOCTL = FALSE +LPM_IDLE_TIMEOUT_MULTIPLE = 5 +BTVND_DBG = TRUE +BTHW_DBG = TRUE +VNDUSERIAL_DBG = TRUE +UPIO_DBG = TRUE +SCO_PCM_IF_CLOCK_RATE = 2 +USE_CONTROLLER_BDADDR = FALSE +UART_TARGET_BAUD_RATE = 115200 |