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_RIPCURRENTPRO_RADIO_DIR
18RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_RIPCURRENTPRO_RADIO_DIR)
19endif
20ifdef RELEASE_GOOGLE_RIPCURRENTPRO_RADIOCFG_DIR
21RELEASE_GOOGLE_PRODUCT_RADIOCFG_DIR := $(RELEASE_GOOGLE_RIPCURRENTPRO_RADIOCFG_DIR)
22endif
23RELEASE_GOOGLE_BOOTLOADER_RIPCURRENTPRO_DIR ?= 24D1# Keep this for pdk TODO: b/327119000
24RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENTPRO_DIR)
25$(call soong_config_set,caimito_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENTPRO_DIR))
26
27ifdef RELEASE_KERNEL_RIPCURRENTPRO_DIR
28TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_RIPCURRENTPRO_DIR)
29TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_RIPCURRENTPRO_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
35USE_SWIFTSHADER := false
36BOARD_USES_SWIFTSHADER := false
37
38$(call inherit-product-if-exists, vendor/google_devices/caimito/prebuilts/device-vendor-ripcurrentpro.mk)
39$(call inherit-product-if-exists, vendor/google_devices/zumapro/prebuilts/device-vendor.mk)
40$(call inherit-product-if-exists, vendor/google_devices/zumapro/proprietary/device-vendor.mk)
41$(call inherit-product-if-exists, vendor/google_devices/caimito/proprietary/ripcurrentpro/device-vendor-ripcurrentpro.mk)
42$(call inherit-product-if-exists, vendor/qorvo/uwb/qm35-hal/Device.mk)
43
44include device/google/caimito/audio/ripcurrentpro/audio-tables.mk
45include device/google/zumapro/device-shipping-common.mk
46include hardware/google/pixel/vibrator/cs40l26/device-stereo.mk
47include device/google/gs-common/bcmbt/bluetooth.mk
48include device/google/gs-common/touch/stm/stm20.mk
49include device/google/caimito/fingerprint/ultrasonic_udfps.mk
50
51# go/lyric-soong-variables
52$(call soong_config_set,lyric,camera_hardware,ripcurrentpro)
53$(call soong_config_set,lyric,tuning_product,ripcurrentpro)
54$(warning target_device set to zuma on zumapro target)
55$(call soong_config_set,google3a_config,target_device,ripcurrent)
56
57# display
58DEVICE_PACKAGE_OVERLAYS += device/google/caimito/ripcurrentpro/overlay
59
60# Init files
61PRODUCT_COPY_FILES += \
62	device/google/caimito/conf/init.ripcurrentpro.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ripcurrentpro.rc
63
64# Recovery files
65PRODUCT_COPY_FILES += \
66        device/google/caimito/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.ripcurrentpro.rc
67
68# NFC
69PRODUCT_COPY_FILES += \
70	frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
71	frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
72	frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
73	frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
74	frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
75	device/google/caimito/nfc/libnfc-hal-st-disable.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
76	device/google/caimito/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st-enable.conf \
77	device/google/caimito/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
78
79PRODUCT_PACKAGES += \
80	$(RELEASE_PACKAGE_NFC_STACK) \
81	Tag \
82	android.hardware.nfc-service.st
83
84# SecureElement
85PRODUCT_PACKAGES += \
86	android.hardware.secure_element-service.thales
87
88PRODUCT_COPY_FILES += \
89	frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
90	frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
91	device/google/caimito/nfc/libse-gto-hal-disable.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf
92
93# Bluetooth HAL
94PRODUCT_COPY_FILES += \
95	device/google/caimito/bluetooth/bt_vendor_overlay_ripcurrentpro.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
96PRODUCT_PROPERTY_OVERRIDES += \
97    ro.bluetooth.a2dp_offload.supported=true \
98    persist.bluetooth.a2dp_offload.disabled=false \
99    persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-opus
100
101# POF
102PRODUCT_PRODUCT_PROPERTIES += \
103    ro.bluetooth.finder.supported=true
104
105# Spatial Audio
106PRODUCT_PACKAGES += \
107	libspatialaudio
108
109# declare use of spatial audio
110PRODUCT_PROPERTY_OVERRIDES += \
111       ro.audio.spatializer_enabled=true
112
113# declare use of stereo spatialization
114PRODUCT_PROPERTY_OVERRIDES += \
115    ro.audio.stereo_spatialization_enabled=true
116
117# Bluetooth hci_inject test tool
118PRODUCT_PACKAGES_DEBUG += \
119    hci_inject
120
121# Bluetooth OPUS codec
122PRODUCT_PRODUCT_PROPERTIES += \
123    persist.bluetooth.opus.enabled=true
124
125# Bluetooth SAR test tool
126PRODUCT_PACKAGES_DEBUG += \
127    sar_test
128
129# Bluetooth EWP test tool
130PRODUCT_PACKAGES_DEBUG += \
131    ewp_tool
132
133# Bluetooth AAC VBR
134PRODUCT_PRODUCT_PROPERTIES += \
135    persist.bluetooth.a2dp_aac.vbr_supported=true
136
137# Override BQR mask to enable LE Audio Choppy report, remove BTRT logging
138ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
139PRODUCT_PRODUCT_PROPERTIES += \
140    persist.bluetooth.bqr.event_mask=262238
141else
142PRODUCT_PRODUCT_PROPERTIES += \
143    persist.bluetooth.bqr.event_mask=94
144endif
145
146# default BDADDR for EVB only
147PRODUCT_PROPERTY_OVERRIDES += \
148	ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
149
150# Spatial Audio
151PRODUCT_PACKAGES += \
152	libspatialaudio \
153	librondo
154
155# Bluetooth LE Audio
156PRODUCT_PRODUCT_PROPERTIES += \
157	ro.bluetooth.leaudio_switcher.supported=true \
158	bluetooth.profile.bap.unicast.client.enabled=true \
159	bluetooth.profile.csip.set_coordinator.enabled=true \
160	bluetooth.profile.hap.client.enabled=true \
161	bluetooth.profile.mcp.server.enabled=true \
162	bluetooth.profile.ccp.server.enabled=true \
163	bluetooth.profile.vcp.controller.enabled=true
164
165ifeq ($(RELEASE_PIXEL_BROADCAST_ENABLED), true)
166PRODUCT_PRODUCT_PROPERTIES += \
167	bluetooth.profile.bap.broadcast.assist.enabled=true \
168	bluetooth.profile.bap.broadcast.source.enabled=true
169endif
170
171# Bluetooth LE Audio enable hardware offloading
172PRODUCT_PRODUCT_PROPERTIES += \
173	ro.bluetooth.leaudio_offload.supported=true \
174	persist.bluetooth.leaudio_offload.disabled=false \
175
176# Bluetooth LE Auido offload capabilities setting
177PRODUCT_COPY_FILES += \
178	device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml
179
180# Keymaster HAL
181#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
182
183# Gatekeeper HAL
184#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software
185
186
187# Gatekeeper
188# PRODUCT_PACKAGES += \
189# 	android.hardware.gatekeeper@1.0-service.software
190
191# Keymint replaces Keymaster
192# PRODUCT_PACKAGES += \
193# 	android.hardware.security.keymint-service
194
195# Keymaster
196#PRODUCT_PACKAGES += \
197#	android.hardware.keymaster@4.0-impl \
198#	android.hardware.keymaster@4.0-service
199
200#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote
201#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote
202#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service
203#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
204
205# PRODUCT_PROPERTY_OVERRIDES += \
206# 	ro.hardware.keystore_desede=true \
207# 	ro.hardware.keystore=software \
208# 	ro.hardware.gatekeeper=software
209
210# PowerStats HAL
211PRODUCT_SOONG_NAMESPACES += \
212    device/google/caimito/powerstats/ripcurrentpro
213
214# WiFi Overlay
215PRODUCT_PACKAGES += \
216    WifiOverlay2024
217
218# Trusty liboemcrypto.so
219PRODUCT_SOONG_NAMESPACES += vendor/google_devices/caimito/prebuilts
220
221# Location
222PRODUCT_SOONG_NAMESPACES += device/google/caimito/location/ripcurrentpro
223$(call soong_config_set, gpssdk, buildtype, $(TARGET_BUILD_VARIANT))
224PRODUCT_PACKAGES += gps.cfg
225# For GPS property
226PRODUCT_VENDOR_PROPERTIES += ro.vendor.gps.pps.enabled=true
227
228PRODUCT_VENDOR_PROPERTIES += \
229	persist.device_config.configuration.disable_rescue_party=true
230
231PRODUCT_VENDOR_PROPERTIES += \
232    persist.vendor.udfps.als_feed_forward_supported=true \
233    persist.vendor.udfps.lhbm_controlled_in_hal_supported=true
234
235# Vibrator HAL
236$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION)))
237ACTUATOR_MODEL := luxshare_ict_081545
238PRODUCT_VENDOR_PROPERTIES += \
239    ro.vendor.vibrator.hal.chirp.enabled=1 \
240    ro.vendor.vibrator.hal.device.mass=0.222 \
241    ro.vendor.vibrator.hal.loc.coeff=2.8
242
243# PKVM Memory Reclaim
244PRODUCT_VENDOR_PROPERTIES += \
245    hypervisor.memory_reclaim.supported=1
246