diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2016-01-25 18:36:39 +0800 |
---|---|---|
committer | leozwang <leozwang@google.com> | 2016-02-02 21:28:04 -0800 |
commit | fefb08edcc8d2d8bca6bf4d2c4e1bff578360c57 (patch) | |
tree | bd5003939446731c74f6829d73efa51afefa0c00 | |
parent | 7961b7102b78af54a97c2c6f63529fa2be88584c (diff) | |
download | rockchip-fefb08edcc8d2d8bca6bf4d2c4e1bff578360c57.tar.gz |
kylin: Add ap6212 bluetooth
Bug: 26807594
Change-Id: I121776b3604790cbdbc76b89224e5db6e8df3f87
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
-rw-r--r-- | peripheral/bluetooth/ap6212/Android.mk | 28 | ||||
-rw-r--r-- | peripheral/bluetooth/ap6212/bt_ap6212.rc | 31 | ||||
-rw-r--r-- | peripheral/bluetooth/ap6212/bt_vendor.conf | 7 | ||||
-rw-r--r-- | peripheral/bluetooth/ap6212/peripheral.mk | 27 | ||||
-rw-r--r-- | peripheral/bluetooth/ap6212/vnd_kylin.txt | 12 |
5 files changed, 105 insertions, 0 deletions
diff --git a/peripheral/bluetooth/ap6212/Android.mk b/peripheral/bluetooth/ap6212/Android.mk new file mode 100644 index 0000000..f6757cb --- /dev/null +++ b/peripheral/bluetooth/ap6212/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_ap6212 +LOCAL_MODULE_TAGS := optional +LOCAL_REQUIRED_MODULES := \ + libbt-vendor \ + bluetooth.default \ + bluetooth-cli \ + bluetoothtbd \ + net_bdtool +LOCAL_INIT_RC := bt_ap6212.rc +include $(BUILD_PHONY_PACKAGE) + diff --git a/peripheral/bluetooth/ap6212/bt_ap6212.rc b/peripheral/bluetooth/ap6212/bt_ap6212.rc new file mode 100644 index 0000000..62c9f09 --- /dev/null +++ b/peripheral/bluetooth/ap6212/bt_ap6212.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/ap6212/bt_vendor.conf b/peripheral/bluetooth/ap6212/bt_vendor.conf new file mode 100644 index 0000000..b5755f5 --- /dev/null +++ b/peripheral/bluetooth/ap6212/bt_vendor.conf @@ -0,0 +1,7 @@ +# Default configuration for Broadcom combo on Rockchip products +# UART device port where Bluetooth controller is attached +UartPort = /dev/ttyS0 + +# Firmware patch file location +FwPatchFilePath = /vendor/firmware/ +FwPatchFileName = bcm43438a0.hcd diff --git a/peripheral/bluetooth/ap6212/peripheral.mk b/peripheral/bluetooth/ap6212/peripheral.mk new file mode 100644 index 0000000..7960289 --- /dev/null +++ b/peripheral/bluetooth/ap6212/peripheral.mk @@ -0,0 +1,27 @@ +# +# 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. +# + +AP6212_BT_SRC := hardware/bsp/rockchip/peripheral/bluetooth/ap6212 +AP6212_BT_FW_SRC := vendor/bsp/rockchip/peripheral/bluetooth/ap6212_firmware +AP6212_BT_FW_DST := system/vendor/firmware + +PRODUCT_COPY_FILES += \ + $(AP6212_BT_FW_SRC)/bcm43438a0.hcd:$(AP6212_BT_FW_DST)/bcm43438a0.hcd \ + $(AP6212_BT_SRC)/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf + +#BCM bluetooth +BOARD_HAVE_BLUETOOTH_BCM := true +BOARD_CUSTOM_BT_CONFIG := $(AP6212_BT_SRC)/vnd_kylin.txt diff --git a/peripheral/bluetooth/ap6212/vnd_kylin.txt b/peripheral/bluetooth/ap6212/vnd_kylin.txt new file mode 100644 index 0000000..5860205 --- /dev/null +++ b/peripheral/bluetooth/ap6212/vnd_kylin.txt @@ -0,0 +1,12 @@ +BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS0" +FW_PATCHFILE_LOCATION = "/vendor/firmware/" +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 |