1#
2# Copyright (C) 2020 The Android Open-Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# Restrict the visibility of Android.bp files to improve build analysis time
18$(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk)
19
20TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_RAVEN_VERSION)
21# Keeps flexibility for kasan and ufs builds
22TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_RAVEN_DIR)
23TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_RAVEN_DIR)/kernel-headers
24
25$(call inherit-product, device/google/raviole/uwb/uwb_calibration_country.mk)
26$(call inherit-product-if-exists, vendor/google_devices/raviole/prebuilts/device-vendor-raven.mk)
27$(call inherit-product-if-exists, vendor/google_devices/gs101/prebuilts/device-vendor.mk)
28$(call inherit-product-if-exists, vendor/google_devices/gs101/proprietary/device-vendor.mk)
29$(call inherit-product-if-exists, vendor/google_devices/raven/proprietary/device-vendor.mk)
30$(call inherit-product-if-exists, vendor/google_devices/raviole/proprietary/raven/device-vendor-raven.mk)
31$(call inherit-product-if-exists, vendor/google/camera/devices/raviole/raven/device-vendor.mk)
32$(call inherit-product-if-exists, vendor/google_devices/raviole/proprietary/WallpapersRaven.mk)
33
34DEVICE_PACKAGE_OVERLAYS += device/google/raviole/raven/overlay
35
36include device/google/raviole/audio/raven/audio-tables.mk
37include device/google/gs101/device-shipping-common.mk
38include device/google/gs101/telephony/pktrouter.mk
39include device/google/gs-common/bcmbt/bluetooth.mk
40include device/google/gs-common/touch/lsi/lsi.mk
41
42# Fingerprint HAL
43GOODIX_CONFIG_BUILD_VERSION := g6_trusty
44$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_common.mk)
45ifeq ($(filter factory%, $(TARGET_PRODUCT)),)
46$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_shipping.mk)
47else
48$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_factory.mk)
49endif
50
51ifeq ($(filter factory_raven, $(TARGET_PRODUCT)),)
52include device/google/raviole/uwb/uwb_calibration.mk
53endif
54
55include hardware/google/pixel/vibrator/cs40l25/device.mk
56
57# go/lyric-soong-variables
58$(call soong_config_set,lyric,camera_hardware,raven)
59$(call soong_config_set,lyric,tuning_product,raven)
60$(call soong_config_set,google3a_config,target_device,raven)
61
62PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_timer=true
63PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.enable_frame_rate_override=true
64
65# Init files
66PRODUCT_COPY_FILES += \
67	device/google/raviole/conf/init.raviole.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.raviole.rc \
68	device/google/raviole/conf/init.raven.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.raven.rc
69
70# Recovery files
71PRODUCT_COPY_FILES += \
72	device/google/gs101/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.raven.rc
73
74# insmod files
75PRODUCT_COPY_FILES += \
76	device/google/raviole/init.insmod.raven.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.raven.cfg
77
78# Thermal Config
79PRODUCT_COPY_FILES += \
80	device/google/raviole/thermal_info_config_raven.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
81	device/google/raviole/thermal_info_config_charge_raven.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json
82
83# Power HAL config
84PRODUCT_COPY_FILES += \
85	device/google/raviole/powerhint-raven.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json \
86	device/google/raviole/powerhint-raven-mainline.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint-mainline.json
87
88PRODUCT_PACKAGES += \
89      UwbOverlayR4
90
91# Bluetooth sepolicy
92include device/google/gs101-sepolicy/raven-sepolicy.mk
93
94# Bluetooth
95PRODUCT_PRODUCT_PROPERTIES += \
96    persist.bluetooth.a2dp_aac.vbr_supported=true \
97    persist.bluetooth.firmware.selection=BCM.hcd
98
99# Bluetooth Tx power caps for raven
100PRODUCT_COPY_FILES += \
101    device/google/raviole/bluetooth_power_limits_raven.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \
102    device/google/raviole/bluetooth_power_limits_raven_us.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_US.csv \
103    device/google/raviole/bluetooth_power_limits_raven_eu.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_EU.csv \
104    device/google/raviole/bluetooth_power_limits_raven_jp.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_JP.csv
105
106# Bluetooth HAL
107PRODUCT_COPY_FILES += \
108	device/google/raviole/bluetooth/bt_vendor_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
109
110# Bluetooth Hal Extension test tools
111PRODUCT_PACKAGES_DEBUG += \
112    sar_test \
113    hci_inject
114
115# userdebug specific
116ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
117# Bluetooth LE Audio Hardware offload
118PRODUCT_PRODUCT_PROPERTIES += \
119    ro.bluetooth.leaudio_offload.supported=true \
120    persist.bluetooth.leaudio_offload.disabled=true \
121    persist.bluetooth.le_audio_test=false
122endif
123
124# MIPI Coex Configs
125PRODUCT_COPY_FILES += \
126	device/google/raviole/radio/raven_camera_rear_tele_mipi_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/camera_rear_tele_mipi_coex_table.csv
127
128# Camera
129PRODUCT_COPY_FILES += \
130	device/google/raviole/media_profiles_raven.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
131
132# Display Config
133PRODUCT_COPY_FILES += \
134	device/google/raviole/raven/display_golden_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_golden_cal0.pb \
135	device/google/raviole/raven/display_colordata_dev_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_dev_cal0.pb
136
137#config of display brightness dimming
138PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.0.brightness.dimming.usage=1
139
140# NFC
141PRODUCT_COPY_FILES += \
142	frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
143	frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
144	frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
145	frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
146	frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.uicc.xml \
147	frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
148	device/google/raviole/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
149	device/google/raviole/nfc/libnfc-nci-raven.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
150
151PRODUCT_PACKAGES += \
152	$(RELEASE_PACKAGE_NFC_STACK) \
153	Tag \
154	android.hardware.nfc-service.st \
155	NfcOverlayRaven
156
157# SecureElement
158PRODUCT_PACKAGES += \
159	android.hardware.secure_element@1.2-service-gto \
160	android.hardware.secure_element@1.2-service-gto-ese2
161
162PRODUCT_COPY_FILES += \
163	frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
164	frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
165	device/google/raviole/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf \
166	device/google/raviole/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf
167
168DEVICE_MANIFEST_FILE += \
169	device/google/raviole/nfc/manifest_se.xml
170
171
172# Vibrator HAL
173PRODUCT_PRODUCT_PROPERTIES +=\
174    ro.vendor.vibrator.hal.long.frequency.shift=15 \
175    ro.vendor.vibrator.hal.device.mass=0.21 \
176    ro.vendor.vibrator.hal.loc.coeff=2.5 \
177    persist.vendor.vibrator.hal.chirp.enabled=0
178
179ACTUATOR_MODEL := luxshare_ict_081545
180
181# Display LBE
182PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.lbe.supported=1
183
184# Media Performance Class 12
185PRODUCT_PROPERTY_OVERRIDES += ro.odm.build.media_performance_class=31
186
187# PowerStats HAL
188PRODUCT_SOONG_NAMESPACES += \
189    device/google/raviole/powerstats/raven \
190    device/google/raviole
191
192
193# userdebug specific
194ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
195    PRODUCT_COPY_FILES += \
196        device/google/gs101/init.hardware.wlc.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wlc.rc
197endif
198
199# Increment the SVN for any official public releases
200ifdef RELEASE_SVN_RAVEN
201TARGET_SVN ?= $(RELEASE_SVN_RAVEN)
202else
203# Set this for older releases that don't use build flag
204TARGET_SVN ?= 85
205endif
206
207PRODUCT_VENDOR_PROPERTIES += \
208    ro.vendor.build.svn=$(TARGET_SVN)
209
210# Set support hide display cutout feature
211PRODUCT_PRODUCT_PROPERTIES += \
212    ro.support_hide_display_cutout=true
213
214# Hide cutout overlays
215PRODUCT_PACKAGES += \
216    NoCutoutOverlay \
217    AvoidAppsInCutoutOverlay
218
219# Android DeviceAsWebcam specific overlay
220PRODUCT_PACKAGES += \
221    DeviceAsWebcamRaven
222
223# Fingerprint antispoof property
224PRODUCT_PRODUCT_PROPERTIES +=\
225    persist.vendor.fingerprint.disable.fake.override=none
226
227# Fingerprint HAL
228PRODUCT_VENDOR_PROPERTIES += \
229    persist.vendor.udfps.lhbm_controlled_in_hal_supported=true \
230    persist.vendor.udfps.als_feed_forward_supported=true
231
232
233# Keyboard side padding in dp for portrait mode
234PRODUCT_PRODUCT_PROPERTIES += ro.com.google.ime.kb_pad_port_r=11
235PRODUCT_PRODUCT_PROPERTIES += ro.com.google.ime.kb_pad_port_l=11
236
237# DCK properties based on target
238PRODUCT_PROPERTY_OVERRIDES += \
239    ro.gms.dck.eligible_wcc=3 \
240    ro.gms.dck.se_capability=1
241
242# SKU specific RROs
243PRODUCT_PACKAGES += \
244    SettingsOverlayGF5KQ \
245    SettingsOverlayGLU0G \
246    SettingsOverlayG8V0U
247
248# Trusty liboemcrypto.so
249PRODUCT_SOONG_NAMESPACES += vendor/google_devices/raviole/prebuilts
250
251# Set support one-handed mode
252PRODUCT_PRODUCT_PROPERTIES += \
253    ro.support_one_handed_mode=true
254
255# Enable camera exif model/make reporting
256PRODUCT_VENDOR_PROPERTIES += \
257    persist.vendor.camera.exif_reveal_make_model=true
258
259# tetheroffload HAL
260PRODUCT_PACKAGES += \
261	vendor.samsung_slsi.hardware.tetheroffload@1.1-service
262
263# Override default distortion output gain according to UX experiments
264PRODUCT_PRODUCT_PROPERTIES += \
265    vendor.audio.hapticgenerator.distortion.output.gain=0.5
266
267# RKPD
268PRODUCT_PRODUCT_PROPERTIES += \
269    remote_provisioning.hostname=remoteprovisioning.googleapis.com \
270
271# Set zram size
272PRODUCT_VENDOR_PROPERTIES += \
273    vendor.zram.size=3g
274
275# This device is shipped with 31 (Android S)
276PRODUCT_SHIPPING_API_LEVEL := 31
277
278# declare use of spatial audio
279PRODUCT_PROPERTY_OVERRIDES += \
280    ro.audio.spatializer_enabled=true
281
282# optimize spatializer effect
283PRODUCT_PROPERTY_OVERRIDES += \
284    audio.spatializer.effect.util_clamp_min=300
285
286PRODUCT_PACKAGES += \
287	libspatialaudio
288
289# Device features
290PRODUCT_COPY_FILES += \
291    frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
292
293# Display RRS default Config
294PRODUCT_DEFAULT_PROPERTY_OVERRIDES += persist.vendor.display.primary.boot_config=1440x3120@120
295
296# Bluetooth OPUS codec
297PRODUCT_PRODUCT_PROPERTIES += \
298    persist.bluetooth.opus.enabled=true
299
300# Location
301ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
302        PRODUCT_COPY_FILES += \
303		device/google/raviole/location/gps.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
304else
305        PRODUCT_COPY_FILES += \
306		device/google/raviole/location/gps_user.xml.raven:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
307endif
308
309# Enable DeviceAsWebcam support
310PRODUCT_VENDOR_PROPERTIES += \
311    ro.usb.uvc.enabled=true
312# Quick Start device-specific settings
313PRODUCT_PRODUCT_PROPERTIES += \
314    ro.quick_start.oem_id=00e0 \
315    ro.quick_start.device_id=raven
316
317# Disable AVF Remote Attestation
318PRODUCT_AVF_REMOTE_ATTESTATION_DISABLED := true
319