clover: Intial Device-Tree for Mi PAD 4
This commit is contained in:
commit
49b8598877
8 changed files with 330 additions and 0 deletions
19
Android.bp
Normal file
19
Android.bp
Normal file
|
@ -0,0 +1,19 @@
|
|||
//#
|
||||
//# Copyright 2018 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.
|
||||
//#
|
||||
|
||||
subdirs = [
|
||||
"*"
|
||||
]
|
22
Android.mk
Normal file
22
Android.mk
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Copyright 2018 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 := $(call my-dir)
|
||||
|
||||
ifeq ($(TARGET_DEVICE),clover)
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
||||
include $(CLEAR_VARS)
|
27
BoardConfig.mk
Normal file
27
BoardConfig.mk
Normal file
|
@ -0,0 +1,27 @@
|
|||
#
|
||||
# Copyright 2018 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.
|
||||
#
|
||||
|
||||
include device/xiaomi/sdm660-common/PlatformConfig.mk
|
||||
|
||||
DEVICE_PATH := device/xiaomi/clover
|
||||
|
||||
# Platform
|
||||
BOARD_VENDOR_PLATFORM := xiaomi-sdm660
|
||||
|
||||
# Kernel
|
||||
TARGET_KERNEL_SOURCE := kernel/xiaomi/clover
|
||||
TARGET_KERNEL_CONFIG := clover-perf_defconfig
|
||||
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz-dtb
|
25
README.md
Normal file
25
README.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
Copyright 2018 The Android Open Source Project
|
||||
|
||||
The MI PAD 4 (codenamed _"clover"_) are high-end mid-range tablet from Xiaomi.
|
||||
|
||||
Xiaomi MI PAD 4 was announced and released in June 2018.
|
||||
|
||||
## Device specifications
|
||||
|
||||
| Device | Xiaomi MI PAD 4 / Xiaomi MI PAD 4 PLUS |
|
||||
| -----------: | :---------------------------------------------- |
|
||||
| SoC | Qualcomm SDM660 Snapdragon 660 |
|
||||
| CPU | 8x Qualcomm® Kryo™ 260 up to 2.2GHz |
|
||||
| GPU | Adreno 512 |
|
||||
| Memory | 3GB / 4GM RAM (LPDDR4X) |
|
||||
| Shipped Android version | 8.1.0 |
|
||||
| Storage | 64GB eMMC 5.1 flash storage |
|
||||
| Battery | Non-removable Li-Po 6000 mAh |
|
||||
| Dimensions | 200.2 x 120.3 x 7.9 mm |
|
||||
| Display | 1920 x 1200 (16:10), 8.0 inch or 10.1 inch |
|
||||
| Rear camera | 13MP, f/2.0 1080p 30 fps video|
|
||||
| Front camera | 5MP, f/2.0|
|
||||
|
||||
## Device picture
|
||||
|
||||
![Xiaomi MI PAD 4](http://i8.mifile.cn/a1/pms_1529843020.73617168!560x560.jpg)
|
45
device.mk
Normal file
45
device.mk
Normal file
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# Copyright 2018 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.
|
||||
#
|
||||
|
||||
# Inherit the fusion-common definitions
|
||||
$(call inherit-product, device/xiaomi/sdm660-common/platform.mk)
|
||||
|
||||
# setup dalvik vm configs
|
||||
$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
|
||||
|
||||
# setup HWUI configs
|
||||
$(call inherit-product, frameworks/native/build/phone-xxhdpi-3072-hwui-memory.mk)
|
||||
|
||||
DEVICE_PATH := device/xiaomi/clover
|
||||
|
||||
# These are the hardware-specific features
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/tablet_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/tablet_core_hardware.xml
|
||||
|
||||
# Device is a Tablet
|
||||
PRODUCT_AAPT_CONFIG := normal large
|
||||
PRODUCT_AAPT_PREF_CONFIG := hdpi
|
||||
|
||||
# Boot animation
|
||||
TARGET_SCREEN_HEIGHT := 1920
|
||||
TARGET_SCREEN_WIDTH := 1200
|
||||
|
||||
# Set those variables here to overwrite the inherited values.
|
||||
PRODUCT_NAME := aosp_clover
|
||||
PRODUCT_DEVICE := clover
|
||||
PRODUCT_MODEL := Mi PAD 4 (AOSP)
|
||||
PRODUCT_BRAND := Xiaomi
|
||||
PRODUCT_MANUFACTURER := Xiaomi
|
115
overlay/frameworks/base/core/res/res/values/config.xml
Executable file
115
overlay/frameworks/base/core/res/res/values/config.xml
Executable file
|
@ -0,0 +1,115 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- #
|
||||
#
|
||||
# Copyright 2018 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">
|
||||
|
||||
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
|
||||
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
|
||||
<bool name="config_automatic_brightness_available">true</bool>
|
||||
|
||||
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
|
||||
The N entries of this array define N + 1 control points as follows:
|
||||
(1-based arrays)
|
||||
|
||||
Point 1: (0, value[1]): lux <= 0
|
||||
Point 2: (level[1], value[2]): 0 < lux <= level[1]
|
||||
Point 3: (level[2], value[3]): level[2] < lux <= level[3]
|
||||
...
|
||||
Point N+1: (level[N], value[N+1]): level[N] < lux
|
||||
|
||||
The control points must be strictly increasing. Each control point
|
||||
corresponds to an entry in the brightness backlight values arrays.
|
||||
For example, if LUX == level[1] (first element of the levels array)
|
||||
then the brightness will be determined by value[2] (second element
|
||||
of the brightness values array).
|
||||
|
||||
Spline interpolation is used to determine the auto-brightness
|
||||
backlight values for LUX levels between these control points.
|
||||
|
||||
Must be overridden in platform specific overlays -->
|
||||
<integer-array name="config_autoBrightnessLevels">
|
||||
<item>10</item>
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
<item>100</item>
|
||||
<item>150</item>
|
||||
<item>210</item>
|
||||
<item>255</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.
|
||||
The brightness values must be between 0 and 255 and be non-decreasing.
|
||||
This must be overridden in platform specific overlays -->
|
||||
<integer-array name="config_autoBrightnessLcdBacklightValues">
|
||||
<item>10</item>
|
||||
<item>20</item>
|
||||
<item>40</item>
|
||||
<item>70</item>
|
||||
<item>110</item>
|
||||
<item>160</item>
|
||||
<item>200</item>
|
||||
<item>255</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- Stability requirements in milliseconds for accepting a new brightness level. This is used
|
||||
for debouncing the light sensor. Different constants are used to debounce the light sensor
|
||||
when adapting to brighter or darker environments. This parameter controls how quickly
|
||||
brightness changes occur in response to an observed change in light level that exceeds the
|
||||
hysteresis threshold. -->
|
||||
<integer name="config_autoBrightnessBrighteningLightDebounce">2000</integer>
|
||||
<integer name="config_autoBrightnessDarkeningLightDebounce">6000</integer>
|
||||
|
||||
<!-- The maximum range of gamma adjustment possible using the screen
|
||||
auto-brightness adjustment setting. -->
|
||||
<fraction name="config_autoBrightnessAdjustmentMaxGamma">200%</fraction>
|
||||
|
||||
<!-- Period of time in which to consider light samples in milliseconds. -->
|
||||
<integer name="config_autoBrightnessAmbientLightHorizon">16000</integer>
|
||||
|
||||
<!-- Minimum screen brightness allowed by the power manager. -->
|
||||
<integer name="config_screenBrightnessDim">1</integer>
|
||||
|
||||
<!-- Minimum screen brightness setting allowed by the power manager.
|
||||
The user is forbidden from setting the brightness below this level. -->
|
||||
<integer name="config_screenBrightnessSettingMinimum">1</integer>
|
||||
|
||||
<!-- Screen brightness used to dim the screen while dozing in a very low power state.
|
||||
May be less than the minimum allowed brightness setting
|
||||
that can be set by the user. -->
|
||||
<integer name="config_screenBrightnessDoze">17</integer>
|
||||
|
||||
<!-- Configure mobile tcp buffer sizes in the form:
|
||||
rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
|
||||
If no value is found for the rat-name in use, the system default will be applied.
|
||||
-->
|
||||
<string-array name="config_mobile_tcp_buffers">
|
||||
<item>"lte:2097152,4194304,8388608,262144,524288,1048576"</item>
|
||||
<item>"lte_ca:2097152,4194304,8388608,4096,1048576,2097152"</item>
|
||||
<item>"umts:4094,87380,1220608,4096,16384,1220608"</item>
|
||||
<item>"hspa:4094,87380,1220608,4096,16384,1220608"</item>
|
||||
<item>"hsupa:4094,87380,1220608,4096,16384,1220608"</item>
|
||||
<item>"hsdpa:4094,87380,1220608,4096,16384,1220608"</item>
|
||||
<item>"hspap:4094,87380,1220608,4096,16384,1220608"</item>
|
||||
<item>"edge:4093,26280,35040,4096,16384,35040"</item>
|
||||
<item>"gprs:4092,8760,11680,4096,8760,11680"</item>
|
||||
<item>"evdo:4094,87380,524288,4096,16384,262144"</item>
|
||||
</string-array>
|
||||
</resources>
|
58
overlay/frameworks/base/core/res/res/xml/power_profile.xml
Executable file
58
overlay/frameworks/base/core/res/res/xml/power_profile.xml
Executable file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<device name="Android">
|
||||
<item name="none">0</item>
|
||||
<item name="screen.on">88</item>
|
||||
<item name="screen.full">300</item>
|
||||
<array name="cpu.clusters.cores">
|
||||
<value>4</value>
|
||||
<value>4</value>
|
||||
</array>
|
||||
<array name="cpu.speeds.cluster0">
|
||||
<value>633600</value>
|
||||
<value>902400</value>
|
||||
<value>1113600</value>
|
||||
<value>1401600</value>
|
||||
<value>1536000</value>
|
||||
<value>1612800</value>
|
||||
</array>
|
||||
<array name="cpu.active.cluster0">
|
||||
<value>11</value>
|
||||
<value>18</value>
|
||||
<value>34</value>
|
||||
<value>45</value>
|
||||
<value>52</value>
|
||||
<value>56</value>
|
||||
</array>
|
||||
<array name="cpu.speeds.cluster1">
|
||||
<value>1113600</value>
|
||||
<value>1401600</value>
|
||||
<value>1747200</value>
|
||||
<value>1804800</value>
|
||||
</array>
|
||||
<array name="cpu.active.cluster1">
|
||||
<value>75</value>
|
||||
<value>108</value>
|
||||
<value>170</value>
|
||||
<value>193</value>
|
||||
</array>
|
||||
<item name="cpu.awake">4</item>
|
||||
<item name="cpu.idle">3</item>
|
||||
<item name="battery.capacity">4000</item>
|
||||
<item name="bluetooth.active">80</item>
|
||||
<item name="bluetooth.at">2</item>
|
||||
<item name="bluetooth.on">2</item>
|
||||
<item name="wifi.on">2</item>
|
||||
<item name="wifi.active">175</item>
|
||||
<item name="wifi.scan">180</item>
|
||||
<item name="dsp.audio">45</item>
|
||||
<item name="dsp.video">60</item>
|
||||
<item name="camera.flashlight">200</item>
|
||||
<item name="camera.avg">550</item>
|
||||
<item name="gps.on">100</item>
|
||||
<item name="radio.active">140</item>
|
||||
<item name="radio.scanning">45</item>
|
||||
<array name="radio.on">
|
||||
<value>8</value>
|
||||
<value>6</value>
|
||||
</array>
|
||||
</device>
|
19
vendorsetup.sh
Normal file
19
vendorsetup.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# Copyright 2018 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.
|
||||
#
|
||||
|
||||
add_lunch_combo aosp_clover-eng
|
||||
add_lunch_combo aosp_clover-userdebug
|
||||
add_lunch_combo aosp_clover-user
|
Loading…
Reference in a new issue