1#
2# Copyright (C) 2021 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
17ifdef RELEASE_GOOGLE_KOMODO_RADIO_DIR
18RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_KOMODO_RADIO_DIR)
19endif
20ifdef RELEASE_GOOGLE_KOMODO_RADIOCFG_DIR
21RELEASE_GOOGLE_PRODUCT_RADIOCFG_DIR := $(RELEASE_GOOGLE_KOMODO_RADIOCFG_DIR)
22endif
23RELEASE_GOOGLE_BOOTLOADER_KOMODO_DIR ?= 24D1# Keep this for pdk TODO: b/327119000
24RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_KOMODO_DIR)
25$(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_KOMODO_DIR))
26
27ifdef RELEASE_KERNEL_KOMODO_DIR
28TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_KOMODO_DIR)
29TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_KOMODO_DIR)/kernel-headers
30else
31TARGET_KERNEL_DIR ?= device/google/caimito-kernels/6.1/24D1
32TARGET_BOARD_KERNEL_HEADERS ?= device/google/caimito-kernels/6.1/24D1/kernel-headers
33endif
34
35LOCAL_PATH := device/google/caimito
36
37ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
38    USE_UWBFIELDTESTQM := true
39endif
40ifeq ($(filter factory_komodo, $(TARGET_PRODUCT)),)
41    include device/google/caimito/komodo/uwb/uwb_calibration.mk
42endif
43
44$(call inherit-product-if-exists, vendor/google_devices/caimito/prebuilts/device-vendor-komodo.mk)
45$(call inherit-product-if-exists, vendor/google_devices/zumapro/prebuilts/device-vendor.mk)
46$(call inherit-product-if-exists, vendor/google_devices/zumapro/proprietary/device-vendor.mk)
47$(call inherit-product-if-exists, vendor/google_devices/komodo/proprietary/device-vendor.mk)
48$(call inherit-product-if-exists, vendor/google_devices/caimito/proprietary/komodo/device-vendor-komodo.mk)
49$(call inherit-product-if-exists, vendor/qorvo/uwb/qm35-hal/Device.mk)
50
51ifeq ($(filter factory_komodo, $(TARGET_PRODUCT)),)
52    $(call inherit-product-if-exists, vendor/google_devices/caimito/proprietary/WallpapersKomodo.mk)
53endif
54
55# display
56DEVICE_PACKAGE_OVERLAYS += device/google/caimito/komodo/overlay
57
58ifeq ($(RELEASE_PIXEL_AIDL_AUDIO_HAL),true)
59USE_AUDIO_HAL_AIDL := true
60endif
61
62include device/google/caimito/audio/komodo/audio-tables.mk
63include device/google/zumapro/device-shipping-common.mk
64include hardware/google/pixel/vibrator/cs40l26/device.mk
65include device/google/gs-common/bcmbt/bluetooth.mk
66include device/google/gs-common/touch/gti/predump_gti.mk
67include device/google/caimito/fingerprint/ultrasonic_udfps.mk
68include device/google/gs-common/modem/radio_ext/radio_ext.mk
69include device/google/gs-common/pixelsupport/pixelsupport.mk
70
71# Increment the SVN for any official public releases
72ifdef RELEASE_SVN_KOMODO
73TARGET_SVN ?= $(RELEASE_SVN_KOMODO)
74else
75# Set this for older releases that don't use build flag
76TARGET_SVN ?= 04
77endif
78
79PRODUCT_VENDOR_PROPERTIES += \
80    ro.vendor.build.svn=$(TARGET_SVN)
81
82# go/lyric-soong-variables
83$(call soong_config_set,lyric,camera_hardware,komodo)
84$(call soong_config_set,lyric,tuning_product,komodo)
85$(call soong_config_set,google3a_config,target_device,komodo)
86
87# Display RRS default Config
88PRODUCT_DEFAULT_PROPERTY_OVERRIDES += persist.vendor.display.primary.boot_config=1008x2244@120:120
89PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.preferred_mode=1008x2244@120:120
90
91ifeq ($(filter factory_komodo, $(TARGET_PRODUCT)),)
92    PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.xrr.version=2.1
93    PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.blocking_zone.min_refresh_rate_by_nits=:1
94    PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.vrr.expected_present.headsup_ns=30000000
95    PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.vrr.expected_present.timeout_ns=500000000
96endif
97
98PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.ignore_hdr_camera_layers=true
99
100# Display fixed TE2
101PRODUCT_VENDOR_PROPERTIES += vendor.primarydisplay.fixed_te2.default_rate_hz=120
102
103# Init files
104PRODUCT_COPY_FILES += \
105	device/google/caimito/conf/init.komodo.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.komodo.rc
106
107# Recovery files
108PRODUCT_COPY_FILES += \
109        device/google/caimito/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.komodo.rc
110
111# NFC
112PRODUCT_COPY_FILES += \
113	frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
114	frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
115	frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
116	frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
117	frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
118	device/google/caimito/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
119	device/google/caimito/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
120
121PRODUCT_PACKAGES += \
122	$(RELEASE_PACKAGE_NFC_STACK) \
123	Tag \
124	android.hardware.nfc-service.st \
125	NfcOverlayKomodo
126
127# SecureElement
128PRODUCT_PACKAGES += \
129	android.hardware.secure_element-service.thales
130
131PRODUCT_COPY_FILES += \
132	frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
133	frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
134	device/google/caimito/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf
135
136# Bluetooth HAL
137PRODUCT_COPY_FILES += \
138	device/google/caimito/bluetooth/bt_vendor_overlay_komodo.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
139PRODUCT_PROPERTY_OVERRIDES += \
140    ro.bluetooth.a2dp_offload.supported=true \
141    persist.bluetooth.a2dp_offload.disabled=false \
142    persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-opus
143
144# Coex Config
145PRODUCT_SOONG_NAMESPACES += device/google/caimito/radio/komodo/coex
146PRODUCT_PACKAGES += \
147    camera_front_mipi_coex_table \
148    camera_rear_main_dbr_coex_table \
149    camera_rear_main_mipi_coex_table \
150    camera_rear_tele_mipi_coex_table \
151    camera_rear_wide_mipi_coex_table \
152    display_primary_mipi_coex_table \
153    display_primary_ssc_coex_table
154
155# Bluetooth Tx power caps
156PRODUCT_COPY_FILES += \
157        $(LOCAL_PATH)/bluetooth/bluetooth_power_limits_komodo.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \
158        $(LOCAL_PATH)/bluetooth/bluetooth_power_limits_komodo_JP.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_JP.csv \
159        $(LOCAL_PATH)/bluetooth/bluetooth_power_limits_komodo_CA.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_CA.csv \
160        $(LOCAL_PATH)/bluetooth/bluetooth_power_limits_komodo_EU.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_EU.csv \
161        $(LOCAL_PATH)/bluetooth/bluetooth_power_limits_komodo_US.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_US.csv
162
163# DCK properties based on target
164PRODUCT_PROPERTY_OVERRIDES += \
165    ro.gms.dck.eligible_wcc=3 \
166    ro.gms.dck.se_capability=1
167
168# POF
169PRODUCT_PRODUCT_PROPERTIES += \
170    ro.bluetooth.finder.supported=true
171
172# Spatial Audio
173PRODUCT_PACKAGES += \
174	libspatialaudio
175
176# declare use of spatial audio
177PRODUCT_PROPERTY_OVERRIDES += \
178       ro.audio.spatializer_enabled=true
179
180# declare use of stereo spatialization
181PRODUCT_PROPERTY_OVERRIDES += \
182    ro.audio.stereo_spatialization_enabled=true
183
184ifneq ($(USE_AUDIO_HAL_AIDL),true)
185# HIDL Sound Dose
186PRODUCT_PACKAGES += \
187	android.hardware.audio.sounddose-vendor-impl \
188	audio_sounddose_aoc
189endif
190
191# HdMic Audio
192PRODUCT_SOONG_NAMESPACES += device/google/caimito/audio/komodo/prebuilt/libspeechenhancer
193PRODUCT_PROPERTY_OVERRIDES += \
194    persist.vendor.app.audio.gsenet.version=1
195PRODUCT_PACKAGES += \
196    libspeechenhancer
197
198# Audio CCA property
199PRODUCT_PROPERTY_OVERRIDES += \
200	persist.vendor.audio.cca.enabled=false
201
202# Bluetooth hci_inject test tool
203PRODUCT_PACKAGES_DEBUG += \
204    hci_inject
205
206# Bluetooth OPUS codec
207PRODUCT_PRODUCT_PROPERTIES += \
208    persist.bluetooth.opus.enabled=true
209
210# Bluetooth SAR test tool
211PRODUCT_PACKAGES_DEBUG += \
212    sar_test
213
214# Bluetooth EWP test tool
215PRODUCT_PACKAGES_DEBUG += \
216    ewp_tool
217
218# Bluetooth AAC VBR
219PRODUCT_PRODUCT_PROPERTIES += \
220    persist.bluetooth.a2dp_aac.vbr_supported=true
221
222# Bluetooth Super Wide Band
223PRODUCT_PRODUCT_PROPERTIES += \
224    bluetooth.hfp.swb.supported=true
225
226# Override BQR mask to enable LE Audio Choppy report, remove BTRT logging
227ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
228PRODUCT_PRODUCT_PROPERTIES += \
229    persist.bluetooth.bqr.event_mask=295006 \
230    persist.bluetooth.bqr.vnd_quality_mask=29 \
231    persist.bluetooth.bqr.vnd_trace_mask=0 \
232    persist.bluetooth.vendor.btsnoop=true
233else
234PRODUCT_PRODUCT_PROPERTIES += \
235    persist.bluetooth.bqr.event_mask=295006 \
236    persist.bluetooth.bqr.vnd_quality_mask=16 \
237    persist.bluetooth.bqr.vnd_trace_mask=0 \
238    persist.bluetooth.vendor.btsnoop=false
239endif
240
241# default BDADDR for EVB only
242PRODUCT_PROPERTY_OVERRIDES += \
243	ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
244
245# Spatial Audio
246PRODUCT_PACKAGES += \
247	libspatialaudio \
248	librondo
249
250# Keymaster HAL
251#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
252
253# Gatekeeper HAL
254#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software
255
256
257# Gatekeeper
258# PRODUCT_PACKAGES += \
259# 	android.hardware.gatekeeper@1.0-service.software
260
261# Keymint replaces Keymaster
262# PRODUCT_PACKAGES += \
263# 	android.hardware.security.keymint-service
264
265# Keymaster
266#PRODUCT_PACKAGES += \
267#	android.hardware.keymaster@4.0-impl \
268#	android.hardware.keymaster@4.0-service
269
270#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote
271#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote
272#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service
273#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
274
275# PRODUCT_PROPERTY_OVERRIDES += \
276# 	ro.hardware.keystore_desede=true \
277# 	ro.hardware.keystore=software \
278# 	ro.hardware.gatekeeper=software
279
280# PowerStats HAL
281PRODUCT_SOONG_NAMESPACES += \
282    device/google/caimito/powerstats/komodo
283
284# WiFi Overlay
285PRODUCT_PACKAGES += \
286    WifiOverlay2024
287
288# Settings Overlay
289PRODUCT_PACKAGES += \
290    SettingsKomodoOverlay
291
292# Trusty liboemcrypto.so
293PRODUCT_SOONG_NAMESPACES += vendor/google_devices/caimito/prebuilts
294
295# UWB
296PRODUCT_SOONG_NAMESPACES += \
297    device/google/caimito/komodo/uwb
298
299# Location
300PRODUCT_SOONG_NAMESPACES += device/google/caimito/location/komodo
301$(call soong_config_set, gpssdk, buildtype, $(TARGET_BUILD_VARIANT))
302PRODUCT_PACKAGES += gps.cfg
303# For GPS property
304PRODUCT_VENDOR_PROPERTIES += ro.vendor.gps.pps.enabled=true
305
306# Display LBE
307PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.lbe.supported=1
308
309# Display ACL
310PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.0.brightness.acl.default=1
311
312#Thermal VT estimator
313PRODUCT_PACKAGES += \
314    libthermal_tflite_wrapper
315
316PRODUCT_VENDOR_PROPERTIES += \
317	persist.device_config.configuration.disable_rescue_party=true
318
319PRODUCT_VENDOR_PROPERTIES += \
320    persist.vendor.udfps.als_feed_forward_supported=true \
321    persist.vendor.udfps.lhbm_controlled_in_hal_supported=true
322
323# OIS with system imu
324PRODUCT_VENDOR_PROPERTIES += \
325    persist.vendor.camera.ois_with_system_imu=true
326
327# Allow external binning setting
328PRODUCT_VENDOR_PROPERTIES += \
329    persist.vendor.camera.allow_external_binning_setting=true
330
331# Camera Vendor property
332PRODUCT_VENDOR_PROPERTIES += \
333    persist.vendor.camera.front_720P_always_binning=true
334
335# Enable camera exif model/make reporting
336PRODUCT_VENDOR_PROPERTIES += \
337    persist.vendor.camera.exif_reveal_make_model=true
338
339# Media Performance Class 14
340PRODUCT_PRODUCT_PROPERTIES += ro.odm.build.media_performance_class=34
341
342# Vibrator HAL
343$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION)))
344ACTUATOR_MODEL := luxshare_ict_081545
345ADAPTIVE_HAPTICS_FEATURE := adaptive_haptics_v1
346PRODUCT_VENDOR_PROPERTIES += \
347    ro.vendor.vibrator.hal.chirp.enabled=1 \
348    ro.vendor.vibrator.hal.device.mass=0.222 \
349    ro.vendor.vibrator.hal.loc.coeff=2.8 \
350    persist.vendor.vibrator.hal.context.enable=false \
351    persist.vendor.vibrator.hal.context.scale=60 \
352    persist.vendor.vibrator.hal.context.fade=true \
353    persist.vendor.vibrator.hal.context.cooldowntime=1600 \
354    persist.vendor.vibrator.hal.context.settlingtime=5000 \
355    ro.vendor.vibrator.hal.pm.activetimeout=5
356
357# PKVM Memory Reclaim
358PRODUCT_VENDOR_PROPERTIES += \
359    hypervisor.memory_reclaim.supported=1
360
361# Bluetooth LE Audio
362# Unicast
363PRODUCT_PRODUCT_PROPERTIES += \
364	bluetooth.profile.bap.unicast.client.enabled=true \
365	bluetooth.profile.csip.set_coordinator.enabled=true \
366	bluetooth.profile.hap.client.enabled=true \
367	bluetooth.profile.mcp.server.enabled=true \
368	bluetooth.profile.ccp.server.enabled=true \
369	bluetooth.profile.vcp.controller.enabled=true
370
371ifeq ($(RELEASE_PIXEL_BROADCAST_ENABLED), true)
372PRODUCT_PRODUCT_PROPERTIES += \
373	bluetooth.profile.bap.broadcast.assist.enabled=true \
374	bluetooth.profile.bap.broadcast.source.enabled=true
375endif
376
377# LE Audio switcher in developer options
378PRODUCT_PRODUCT_PROPERTIES += \
379	ro.bluetooth.leaudio_switcher.supported=true \
380
381# Enable hardware offloading
382PRODUCT_PRODUCT_PROPERTIES += \
383	ro.bluetooth.leaudio_offload.supported=true \
384	persist.bluetooth.leaudio_offload.disabled=false
385
386# Bluetooth LE Audio CIS handover to SCO
387# Set the property only for the controller couldn't support CIS/SCO simultaneously. More detailed in b/242908683.
388PRODUCT_PRODUCT_PROPERTIES += \
389	persist.bluetooth.leaudio.notify.idle.during.call=true
390
391# LE Audio Offload Capabilities setting
392PRODUCT_COPY_FILES += \
393    device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml
394
395# Disable LE Audio dual mic SWB call support
396# This may depend on the BT controller capability or the launch strategy
397# For example, P22 BT chip is not able to support 32k dual mic
398# P23a disabled the 32k dual mic as it is not in the phase 2 launch plan
399PRODUCT_PRODUCT_PROPERTIES += \
400    bluetooth.leaudio.dual_bidirection_swb.supported=true
401
402# LE Audio Unicast Allowlist
403PRODUCT_PRODUCT_PROPERTIES += \
404   persist.bluetooth.leaudio.allow_list=SM-R510
405
406# Support LE & Classic concurrent encryption (b/330704060)
407PRODUCT_PRODUCT_PROPERTIES += \
408    bluetooth.ble.allow_enc_with_bredr=true
409
410# Exynos RIL and telephony
411# Support RIL Domain-selection
412SUPPORT_RIL_DOMAIN_SELECTION := true
413
414# Set support one-handed mode
415PRODUCT_PRODUCT_PROPERTIES += \
416    ro.support_one_handed_mode=true
417
418# Keyboard height ratio and bottom padding in dp for portrait mode
419PRODUCT_PRODUCT_PROPERTIES += \
420          ro.com.google.ime.kb_pad_port_b=9.6 \
421          ro.com.google.ime.height_ratio=1.13
422
423# Enable Bluetooth AutoOn feature
424PRODUCT_PRODUCT_PROPERTIES += \
425    bluetooth.server.automatic_turn_on=true
426
427# Window Extensions
428$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
429
430# ETM
431ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
432$(call inherit-product-if-exists, device/google/common/etm/device-userdebug-modules.mk)
433endif
434
435# Connectivity Resources Overlay
436PRODUCT_PACKAGES += \
437    ConnectivityResourcesOverlayCaimitoOverride
438
439#Component Override for Pixel Troubleshooting App
440PRODUCT_COPY_FILES += \
441    device/google/caimito/komodo/komodo-component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/komodo-component-overrides.xml
442
443PRODUCT_PRODUCT_PROPERTIES += \
444    persist.bluetooth.thread_dispatcher.enabled=true
445