Skip to content

Commit

Permalink
bacon: Add initial device tree
Browse files Browse the repository at this point in the history
Change-Id: I0d41c6469702844d4a7f3dcd760c049bd45c4cf2
  • Loading branch information
intervigilium committed Jun 9, 2014
1 parent 7d62b31 commit e6dc82c
Show file tree
Hide file tree
Showing 19 changed files with 527 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# Copyright (C) 2014 The CyanogenMod 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 := $(call my-dir)

ifeq ($(TARGET_DEVICE),bacon)

include $(call all-makefiles-under,$(LOCAL_PATH))

endif
6 changes: 6 additions & 0 deletions AndroidBoard.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
LOCAL_PATH := $(call my-dir)

#----------------------------------------------------------------------
# extra images
#----------------------------------------------------------------------
include build/core/generate_extra_images.mk
40 changes: 40 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Copyright (C) 2014 The CyanogenMod 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.
#

# Inherit from MSM8974 common
-include device/oppo/msm8974-common/BoardConfigCommon.mk

# Kernel
TARGET_KERNEL_CONFIG := cyanogenmod_bacon_defconfig

# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/oneplus/bacon/bluetooth

# Camera
USE_DEVICE_SPECIFIC_CAMERA := true
COMMON_GLOBAL_CFLAGS += -DOPPO_CAMERA_HARDWARE

# Filesystem
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
BOARD_CACHEIMAGE_PARTITION_SIZE := 536870912
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 16777216
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824
BOARD_USERDATAIMAGE_PARTITION_SIZE := 13747929088 # 13747945472 - 16384 for crypto footer
#BOARD_USERDATAIMAGE_PARTITION_SIZE := 3221225472

# inherit from the proprietary version
-include vendor/oneplus/bacon/BoardConfigVendor.mk
Empty file added MODULE_LICENSE_APACHE2
Empty file.
29 changes: 29 additions & 0 deletions bacon.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Copyright (C) 2014 The CyanogenMod 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.
#

# overlays
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay

# Keylayouts
PRODUCT_PACKAGES += \
$(LOCAL_PATH)/keylayout/atmel_mxt_ts.kl:system/usr/keylayout/atmel_mxt_ts.kl \
$(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl

# call the proprietary setup
$(call inherit-product-if-exists, vendor/oneplus/bacon/bacon-vendor.mk)

# Inherit from msm8974-common
$(call inherit-product, device/oppo/msm8974-common/msm8974.mk)
28 changes: 28 additions & 0 deletions bluetooth/bdroid_buildcfg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2014 The CyanogenMod 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.
*/

#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H

#define BTM_DEF_LOCAL_NAME "One+ One"
// Enables Interleave scan
#define BTA_HOST_INTERLEAVE_SEARCH TRUE
// Disables read remote device feature
#define BTA_SKIP_BLE_READ_REMOTE_FEAT TRUE
#define MAX_L2CAP_CHANNELS 14
// skips conn update at conn completion
#define BTA_BLE_SKIP_CONN_UPD TRUE
#endif
18 changes: 18 additions & 0 deletions cm.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"repository": "android_device_oppo_common",
"target_path": "device/oppo/common"
},
{
"repository": "android_kernel_oppo_msm8974",
"target_path": "kernel/oppo/msm8974"
},
{
"repository": "android_hardware_qcom_display-caf-new",
"target_path": "hardware/qcom/display-caf-new"
},
{
"repository": "android_hardware_qcom_media-caf-new",
"target_path": "hardware/qcom/media-caf-new"
}
]
15 changes: 15 additions & 0 deletions cm.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$(call inherit-product, device/oneplus/bacon/full_bacon.mk)

# Inherit some common CM stuff
$(call inherit-product, vendor/cm/config/gsm.mk)

# Enhanced NFC
$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)

# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

PRODUCT_NAME := cm_bacon
PRODUCT_DEVICE := bacon

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_FINGERPRINT=4.3/JLS36C/1390381364:user/release-keys PRIVATE_BUILD_DESC="msm8974-user 4.3 JLS36C eng.root.20140122.170107 release-keys"
Empty file added device-proprietary-files.txt
Empty file.
7 changes: 7 additions & 0 deletions extract-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

export VENDOR=oneplus
export DEVICE=bacon
./../../oppo/msm8974-common/extract-files.sh $@
26 changes: 26 additions & 0 deletions full_bacon.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2014 The CyanogenMod 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.

# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Inherit from bacon device
$(call inherit-product, device/oneplus/bacon/bacon.mk)

# Discard inherited values and use our own instead.
PRODUCT_NAME := full_bacon
PRODUCT_DEVICE := bacon
PRODUCT_BRAND := One+
PRODUCT_MANUFACTURER := One+
PRODUCT_MODEL := bacon
106 changes: 106 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2013, 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.
*/
-->

<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
The N entries of this array define N 1 zones as follows:
Zone 0: 0 <= LUX < array[0]
Zone 1: array[0] <= LUX < array[1]
...
Zone N: array[N - 1] <= LUX < array[N]
Zone N + 1 array[N] <= LUX < infinity
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
<item>10</item>
<item>50</item>
<item>100</item>
<item>200</item>
<item>400</item>
<item>500</item>
<item>800</item>
<item>1000</item>
<item>1600</item>
<item>3000</item>
<item>10000</item>
</integer-array>

<!-- Array of output values for LCD backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>14</item> <!-- 0-10 -->
<item>28</item> <!-- 10-50 -->
<item>37</item> <!-- 50-100 -->
<item>51</item> <!-- 100-200 -->
<item>71</item> <!-- 200-400 -->
<item>80</item> <!-- 400-500 -->
<item>96</item> <!-- 500-800 -->
<item>108</item> <!-- 800-1000 -->
<item>144</item> <!-- 1000-1600 -->
<item>181</item> <!-- 1600-3000 -->
<item>254</item> <!-- 3000-10000 -->
<item>255</item> <!-- 10000+ -->
</integer-array>

<!-- Array of output values for button backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>14</item> <!-- 0-10 -->
<item>28</item> <!-- 10-50 -->
<item>37</item> <!-- 50-100 -->
<item>51</item> <!-- 100-200 -->
<item>71</item> <!-- 200-400 -->
<item>80</item> <!-- 400-500 -->
<item>96</item> <!-- 500-800 -->
<item>108</item> <!-- 800-1000 -->
<item>144</item> <!-- 1000-1600 -->
<item>181</item> <!-- 1600-3000 -->
<item>254</item> <!-- 3000-10000 -->
<item>255</item> <!-- 10000+ -->
</integer-array>

<!-- Minimum screen brightness setting allowed by the power manager.
The user is forbidden from setting the brightness below this level. -->
<integer name="config_screenBrightnessSettingMinimum">2</integer>

<!-- Maximum screen brightness allowed by the power manager.
The user is forbidden from setting the brightness above this level. -->
<integer name="config_screenBrightnessSettingMaximum">255</integer>

<!-- Default screen brightness setting.
Must be in the range specified by minimum and maximum. -->
<integer name="config_screenBrightnessSettingDefault">255</integer>

<!-- Screen brightness used to dim the screen when the user activity
timeout expires. May be less than the minimum allowed brightness setting
that can be set by the user. -->
<integer name="config_screenBrightnessDim">20</integer>

<!-- Indicate whether closing the lid causes the device to go to sleep and opening
it causes the device to wake up.
The default is false. -->
<bool name="config_lidControlsSleep">true</bool>

</resources>
77 changes: 77 additions & 0 deletions overlay/frameworks/base/core/res/res/xml/power_profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2009, 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.
*/
-->

<device name="Android">
<!-- All values are in mAh except as noted -->
<item name="none">0</item>
<item name="screen.on">42.4</item>
<item name="screen.full">211.6</item>
<item name="bluetooth.active">59.22</item>
<item name="bluetooth.on">0.7</item>
<item name="wifi.on">1.38</item>
<item name="wifi.active">62.09</item>
<item name="wifi.scan">52.1</item>
<item name="dsp.audio">0.1</item>
<item name="dsp.video">0.1</item>
<item name="gps.on">20.9</item>
<!-- The current consumed by the radio when it is scanning for a signal -->
<item name="radio.active">185.6</item>
<item name="radio.scanning">122.68</item>
<!-- Current consumed by the radio at different signal strengths, when paging -->
<array name="radio.on"> <!-- Strength 0 to BINS-1 -->
<value>1.16</value>
<value>2.15</value>
</array>
<!-- Different CPU speeds as reported in
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state -->
<array name="cpu.speeds">
<value>384000</value>
<value>486000</value>
<value>594000</value>
<value>702000</value>
<value>810000</value>
<value>918000</value>
<value>1026000</value>
<value>1134000</value>
<value>1242000</value>
<value>1350000</value>
<value>1458000</value>
<value>1512000</value>
</array>
<!-- Power consumption when CPU is idle -->
<item name="cpu.idle">3.5</item>
<item name="cpu.awake">10.43</item>
<!-- Power consumption at different speeds -->
<array name="cpu.active">
<value>92.6</value>
<value>108.6</value>
<value>118.8</value>
<value>121.4</value>
<value>127.3</value>
<value>133.1</value>
<value>173.3</value>
<value>209.5</value>
<value>216.5</value>
<value>228.5</value>
<value>236.0</value>
<value>239.7</value>
</array>
<!-- This is the battery capacity in mAh -->
<item name="battery.capacity">2500</item>
</device>
Loading

0 comments on commit e6dc82c

Please sign in to comment.