diff --git a/audio/cheetah/config/audio_platform_configuration.xml b/audio/cheetah/config/audio_platform_configuration.xml
index c954366..0728198 100644
--- a/audio/cheetah/config/audio_platform_configuration.xml
+++ b/audio/cheetah/config/audio_platform_configuration.xml
@@ -35,6 +35,7 @@
+
@@ -294,6 +295,7 @@
+
diff --git a/audio/cloudripper/config/audio_platform_configuration.xml b/audio/cloudripper/config/audio_platform_configuration.xml
index 7d6985d..b98ba88 100644
--- a/audio/cloudripper/config/audio_platform_configuration.xml
+++ b/audio/cloudripper/config/audio_platform_configuration.xml
@@ -35,6 +35,7 @@
+
@@ -286,5 +287,6 @@
+
diff --git a/audio/panther/config/audio_platform_configuration.xml b/audio/panther/config/audio_platform_configuration.xml
index c954366..0728198 100644
--- a/audio/panther/config/audio_platform_configuration.xml
+++ b/audio/panther/config/audio_platform_configuration.xml
@@ -35,6 +35,7 @@
+
@@ -294,6 +295,7 @@
+
diff --git a/audio/ravenclaw/config/audio_platform_configuration.xml b/audio/ravenclaw/config/audio_platform_configuration.xml
index 5bfa08a..3828a24 100644
--- a/audio/ravenclaw/config/audio_platform_configuration.xml
+++ b/audio/ravenclaw/config/audio_platform_configuration.xml
@@ -35,6 +35,7 @@
+
@@ -287,5 +288,6 @@
+
diff --git a/conf/init.pantah.rc b/conf/init.pantah.rc
index 2b1408d..1e02a66 100644
--- a/conf/init.pantah.rc
+++ b/conf/init.pantah.rc
@@ -54,6 +54,19 @@ on post-fs-data
chown secure_element secure_element /sys/class/st33spi/st33spi/st33spi_state
chmod 0660 /sys/class/st33spi/st33spi/st33spi_state
+# Create thermal symlink in off charging mode
+on charger
+ # Wait for insmod_sh to finish all common modules
+ wait_for_prop vendor.common.modules.ready 1
+
+ # Wait for insmod_sh to finish all device specific modules
+ wait_for_prop vendor.device.modules.ready 1
+
+ mkdir /dev/thermal 0750 system system
+ mkdir /dev/thermal/tz-by-name 0750 system system
+ mkdir /dev/thermal/cdev-by-name 0750 system system
+ restart vendor.thermal.symlinks
+
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1p2p_device=1 \
-m/vendor/etc/wifi/p2p_supplicant.conf \
diff --git a/device-cheetah.mk b/device-cheetah.mk
index 25e42ec..6ad41e1 100644
--- a/device-cheetah.mk
+++ b/device-cheetah.mk
@@ -32,10 +32,7 @@ include hardware/google/pixel/vibrator/cs40l26/device.mk
include device/google/gs101/bluetooth/bluetooth.mk
ifeq ($(filter factory_cheetah, $(TARGET_PRODUCT)),)
-# The ordering of the two uwb makefiles ensures device specific calibration files
-# are used instead of platform (gs101) specific calibration files - b/230787474.
include device/google/pantah/uwb/uwb_calibration.mk
-include device/google/gs101/uwb/uwb.mk
endif
$(call soong_config_set,lyric,tuning_product,cheetah)
diff --git a/powerhint-cheetah-a0.json b/powerhint-cheetah-a0.json
index 8a924f0..1fe3729 100644
--- a/powerhint-cheetah-a0.json
+++ b/powerhint-cheetah-a0.json
@@ -1017,6 +1017,12 @@
"Duration": 0,
"Value": "1"
},
+ {
+ "PowerHint": "CAMERA_STREAMING_STANDARD",
+ "Node": "CDPreferIdle",
+ "Duration": 0,
+ "Value": "0"
+ },
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CPUBigClusterMaxFreq",
diff --git a/powerhint-cheetah.json b/powerhint-cheetah.json
index bc5d41f..67e9845 100644
--- a/powerhint-cheetah.json
+++ b/powerhint-cheetah.json
@@ -537,7 +537,7 @@
"Value": "0"
},
{
- "PowerHint": "LAUNCH_120FPS",
+ "PowerHint": "LAUNCH_GPU",
"Node": "GPUMinFreq",
"Duration": 1000,
"Value": "848000"
@@ -559,6 +559,11 @@
"Type": "DoHint",
"Value": "LAUNCH_120FPS"
},
+ {
+ "PowerHint": "LAUNCH",
+ "Type": "DoHint",
+ "Value": "LAUNCH_GPU"
+ },
{
"PowerHint": "LAUNCH",
"Node": "SFUClampBoost",
@@ -1033,6 +1038,12 @@
"Duration": 0,
"Value": "1"
},
+ {
+ "PowerHint": "CAMERA_STREAMING_STANDARD",
+ "Node": "CDPreferIdle",
+ "Duration": 0,
+ "Value": "0"
+ },
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CPUBigClusterMaxFreq",
diff --git a/powerhint-panther-a0.json b/powerhint-panther-a0.json
index 9e84dab..265960f 100644
--- a/powerhint-panther-a0.json
+++ b/powerhint-panther-a0.json
@@ -1006,6 +1006,12 @@
"Duration": 0,
"Value": "1"
},
+ {
+ "PowerHint": "CAMERA_STREAMING_STANDARD",
+ "Node": "CDPreferIdle",
+ "Duration": 0,
+ "Value": "0"
+ },
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CPUBigClusterMaxFreq",
diff --git a/powerhint-panther.json b/powerhint-panther.json
index 1896925..3bfc4f5 100644
--- a/powerhint-panther.json
+++ b/powerhint-panther.json
@@ -1016,6 +1016,12 @@
"Duration": 0,
"Value": "1"
},
+ {
+ "PowerHint": "CAMERA_STREAMING_STANDARD",
+ "Node": "CDPreferIdle",
+ "Duration": 0,
+ "Value": "0"
+ },
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CPUBigClusterMaxFreq",
diff --git a/uwb/Android.mk b/uwb/Android.mk
new file mode 100644
index 0000000..e6ab7bf
--- /dev/null
+++ b/uwb/Android.mk
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2022 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.
+#
+
+# WARNING: Everything listed here will be built on ALL platforms,
+# including x86, the universal, and the SDK. Modules must be uniquely
+# named (liblights.panda), and must build everywhere, or limit themselves
+# to only building on ARM if they include assembly. Individual makefiles
+# are responsible for having their own logic, for fine-grained control.
+
+LOCAL_PATH:= $(call my-dir)
+LOCAL_UWB_CAL_DIR=$(LOCAL_PATH)
+DEVICE_UWB_CAL_DIR=$(TARGET_OUT_VENDOR)/etc/uwb
+
+$(shell ($(LOCAL_UWB_CAL_DIR)/country_conf_gen.sh $(LOCAL_UWB_CAL_DIR) $(DEVICE_UWB_CAL_DIR)))
diff --git a/uwb/UWB-calibration_ce.conf b/uwb/UWB-calibration_ce.conf
new file mode 100644
index 0000000..d1c1ef5
--- /dev/null
+++ b/uwb/UWB-calibration_ce.conf
@@ -0,0 +1,152 @@
+[CCC]version=2
+[CCC]ant0.ch5.prf64.pdoa_iso_rf2_rf1=0
+[CCC]ant0.ch5.prf64.pdoa_iso_rf1_rf2=0
+[CCC]ant0.ch9.prf64.pdoa_iso_rf2_rf1=0
+[CCC]ant0.ch9.prf64.pdoa_iso_rf1_rf2=0
+[CCC]ant0.ch5.prf64.pdoa_offset=0
+[CCC]ant0.ch9.prf64.pdoa_offset=0
+[CCC]ant0.ch5.prf64.pll_locking_code=0
+[CCC]ant0.ch9.prf64.pll_locking_code=0
+[CCC]id=0
+[CCC]wifi_coex_time_gap=10
+[CCC]ap_coop_mode=1
+[CCC]antenna_selection=4
+ant0.ch5.prf16.ant_delay=16450
+ant0.ch5.prf16.tx_power=0x43433843
+ant0.ch5.prf16.pg_count=0
+ant0.ch5.prf16.pg_delay=0x34
+ant0.ch5.prf64.ant_delay=16450
+ant0.ch5.prf64.tx_power=0x43433843
+ant0.ch5.prf64.pg_count=0
+ant0.ch5.prf64.pg_delay=0x34
+ant0.ch9.prf16.ant_delay=16450
+ant0.ch9.prf16.tx_power=0x4A4A3C4A
+ant0.ch9.prf16.pg_count=0
+ant0.ch9.prf16.pg_delay=0x34
+ant0.ch9.prf64.ant_delay=16450
+ant0.ch9.prf64.tx_power=0x4A4A3C4A
+ant0.ch9.prf64.pg_count=0
+ant0.ch9.prf64.pg_delay=0x34
+ant0.port=0
+ant0.selector_gpio=7
+ant0.selector_gpio_value=0
+ant1.ch5.prf16.ant_delay=16450
+ant1.ch5.prf16.tx_power=0
+ant1.ch5.prf16.pg_count=0
+ant1.ch5.prf16.pg_delay=0
+ant1.ch5.prf64.ant_delay=16450
+ant1.ch5.prf64.tx_power=0
+ant1.ch5.prf64.pg_count=0
+ant1.ch5.prf64.pg_delay=0
+ant1.ch9.prf16.ant_delay=16450
+ant1.ch9.prf16.tx_power=0x3E3E303E
+ant1.ch9.prf16.pg_count=0
+ant1.ch9.prf16.pg_delay=0x34
+ant1.ch9.prf64.ant_delay=16450
+ant1.ch9.prf64.tx_power=0x3E3E303E
+ant1.ch9.prf64.pg_count=0
+ant1.ch9.prf64.pg_delay=0x34
+ant1.port=0
+ant1.selector_gpio=7
+ant1.selector_gpio_value=1
+ant2.ch5.prf16.ant_delay=16450
+ant2.ch5.prf16.tx_power=0
+ant2.ch5.prf16.pg_count=0
+ant2.ch5.prf16.pg_delay=0
+ant2.ch5.prf64.ant_delay=16450
+ant2.ch5.prf64.tx_power=0
+ant2.ch5.prf64.pg_count=0
+ant2.ch5.prf64.pg_delay=0
+ant2.ch9.prf16.ant_delay=16450
+ant2.ch9.prf16.tx_power=0
+ant2.ch9.prf16.pg_count=0
+ant2.ch9.prf16.pg_delay=0
+ant2.ch9.prf64.ant_delay=16450
+ant2.ch9.prf64.tx_power=0
+ant2.ch9.prf64.pg_count=0
+ant2.ch9.prf64.pg_delay=0
+ant2.port=1
+ant2.selector_gpio=6
+ant2.selector_gpio_value=0
+ant3.ch5.prf16.ant_delay=16450
+ant3.ch5.prf16.tx_power=0x5B5B4C5B
+ant3.ch5.prf16.pg_count=0
+ant3.ch5.prf16.pg_delay=0x34
+ant3.ch5.prf64.ant_delay=16450
+ant3.ch5.prf64.tx_power=0x5B5B4C5B
+ant3.ch5.prf64.pg_count=0
+ant3.ch5.prf64.pg_delay=0x34
+ant3.ch9.prf16.ant_delay=16450
+ant3.ch9.prf16.tx_power=0
+ant3.ch9.prf16.pg_count=0
+ant3.ch9.prf16.pg_delay=0
+ant3.ch9.prf64.ant_delay=16450
+ant3.ch9.prf64.tx_power=0
+ant3.ch9.prf64.pg_count=0
+ant3.ch9.prf64.pg_delay=0
+ant3.port=1
+ant3.selector_gpio=6
+ant3.selector_gpio_value=1
+ant0.ant1.ch5.pdoa_offset=0
+ant0.ant1.ch9.pdoa_offset=0
+ant0.ant2.ch5.pdoa_offset=0
+ant0.ant2.ch9.pdoa_offset=0
+ant1.ant2.ch5.pdoa_offset=-2520
+ant1.ant2.ch9.pdoa_offset=1874
+ant0.ant3.ch5.pdoa_offset=0
+ant0.ant3.ch9.pdoa_offset=0
+ant1.ant3.ch5.pdoa_offset=-3080
+ant1.ant3.ch9.pdoa_offset=3214
+ant2.ant3.ch5.pdoa_offset=0
+ant2.ant3.ch9.pdoa_offset=0
+ch5.pll_locking_code=0
+ch9.pll_locking_code=0
+ant1.ant2.ch5.pdoa_lut=0a:f4:77:0a:d9:f4:c5:09:c1:f5:12:09:df:f5:60:08:7f:f6:ac:07:dd:f6:fa:06:f2:f6:48:06:89:f7:96:05:d1:f7:e3:04:54:f8:2f:04:f0:f8:7d:03:46:fa:cb:02:b0:fb:19:02:23:fd:64:01:a2:fe:b2:00:00:00:00:00:31:01:4e:ff:a6:02:9c:fe:0a:04:e7:fd:52:05:35:fd:73:06:83:fc:cb:07:d1:fb:be:08:1d:fb:f8:09:6a:fa:39:0b:b8:f9:81:0c:06:f9:1b:0d:54:f8:87:0d:a0:f7:a0:0e:ee:f6:06:0f:3b:f6:2d:0f:89:f5
+ant1.ant2.ch9.pdoa_lut=d7:ec:77:0a:d9:ed:c5:09:73:ee:12:09:58:ef:60:08:73:f0:ac:07:f0:f1:fa:06:d7:f2:48:06:f6:f3:96:05:cf:f5:e3:04:2d:f7:2f:04:23:f8:7d:03:a4:f9:cb:02:4c:fb:19:02:cb:fc:64:01:33:fe:b2:00:00:00:00:00:f6:01:4e:ff:ba:03:9c:fe:83:05:e7:fd:21:07:35:fd:6d:08:83:fc:71:09:d1:fb:ba:0a:1d:fb:c3:0b:6a:fa:f0:0c:b8:f9:c7:0d:06:f9:77:0e:54:f8:42:0f:a0:f7:89:0f:ee:f6:87:10:3b:f6:c7:10:89:f5
+ant1.ant3.ch5.pdoa_lut=89:f4:ac:07:a2:f4:60:08:ae:f4:77:0a:0a:f5:12:09:7d:f5:c5:09:8d:f5:fa:06:0a:f7:48:06:9a:f7:96:05:fa:f7:e3:04:68:f8:2f:04:f0:f9:7d:03:fa:fb:cb:02:6d:fd:19:02:2f:fe:64:01:98:fe:b2:00:00:00:00:00:1d:02:4e:ff:2d:02:e7:fd:33:02:9c:fe:0a:03:35:fd:6f:04:83:fc:db:05:d1:fb:85:07:1d:fb:b0:08:6a:fa:06:09:b8:f9:71:09:06:f9:48:0a:54:f8:4e:0b:a0:f7:58:0c:3b:f6:62:0c:ee:f6:c5:0c:89:f5
+ant1.ant3.ch9.pdoa_lut=4e:ec:77:0a:9c:ee:c5:09:04:f0:12:09:44:f1:60:08:c3:f2:ac:07:54:f3:fa:06:4c:f4:48:06:12:f5:96:05:0a:f6:e3:04:21:f7:2f:04:19:f8:7d:03:79:f9:cb:02:ba:fa:19:02:73:fc:64:01:0e:fe:b2:00:00:00:00:00:d7:00:4e:ff:f6:01:9c:fe:21:04:e7:fd:60:04:35:fd:37:05:83:fc:0a:07:d1:fb:c5:07:1d:fb:fc:07:6a:fa:8f:08:b8:f9:b0:09:06:f9:39:0a:54:f8:c9:0a:a0:f7:58:0b:ee:f6:75:0b:89:f5:83:0b:3b:f6
+xtal_trim=23
+temperature_reference=85
+smart_tx_power=1
+auto_sleep_margin=20000
+restricted_channels=0
+[HAL]aoa_capability=2
+[HAL]ant_sets.ch5.range.rx_ant_set_nonranging = 6
+[HAL]ant_sets.ch5.range.rx_ant_set_ranging = 6
+[HAL]ant_sets.ch5.range.tx_ant_set_nonranging = 6
+[HAL]ant_sets.ch5.range.tx_ant_set_ranging = 6
+[HAL]ant_sets.ch5.azimuth.rx_ant_set_nonranging = 3
+[HAL]ant_sets.ch5.azimuth.rx_ant_set_ranging = 3
+[HAL]ant_sets.ch5.azimuth.tx_ant_set_nonranging = 0
+[HAL]ant_sets.ch5.azimuth.tx_ant_set_ranging = 0
+[HAL]ant_sets.ch9.range.rx_ant_set_nonranging = 6
+[HAL]ant_sets.ch9.range.rx_ant_set_ranging = 6
+[HAL]ant_sets.ch9.range.tx_ant_set_nonranging = 6
+[HAL]ant_sets.ch9.range.tx_ant_set_ranging = 6
+[HAL]ant_sets.ch5.elevation.rx_ant_set_nonranging = 4
+[HAL]ant_sets.ch5.elevation.rx_ant_set_ranging = 4
+[HAL]ant_sets.ch5.elevation.tx_ant_set_nonranging = 0
+[HAL]ant_sets.ch5.elevation.tx_ant_set_ranging = 0
+[HAL]ant_sets.ch9.elevation.rx_ant_set_nonranging = 4
+[HAL]ant_sets.ch9.elevation.rx_ant_set_ranging = 4
+[HAL]ant_sets.ch9.elevation.tx_ant_set_nonranging = 4
+[HAL]ant_sets.ch9.elevation.tx_ant_set_ranging = 4
+[HAL]ant_sets.ch9.azimuth.rx_ant_set_nonranging = 3
+[HAL]ant_sets.ch9.azimuth.rx_ant_set_ranging = 3
+[HAL]ant_sets.ch9.azimuth.tx_ant_set_nonranging = 3
+[HAL]ant_sets.ch9.azimuth.tx_ant_set_ranging = 3
+[HAL]ant_sets.ch5.azimuth_elevation.rx_ant_set_nonranging=3
+[HAL]ant_sets.ch5.azimuth_elevation.rx_ant_set_ranging_azimuth=3
+[HAL]ant_sets.ch5.azimuth_elevation.rx_ant_set_ranging_elevation=4
+[HAL]ant_sets.ch5.azimuth_elevation.tx_ant_set_nonranging=0
+[HAL]ant_sets.ch5.azimuth_elevation.tx_ant_set_ranging=0
+[HAL]ant_sets.ch9.azimuth_elevation.rx_ant_set_nonranging=3
+[HAL]ant_sets.ch9.azimuth_elevation.rx_ant_set_ranging_azimuth=3
+[HAL]ant_sets.ch9.azimuth_elevation.rx_ant_set_ranging_elevation=4
+[HAL]ant_sets.ch9.azimuth_elevation.tx_ant_set_nonranging=3
+[HAL]ant_sets.ch9.azimuth_elevation.tx_ant_set_ranging=3
+[HAL]minimum_system_offset_uwbtime0=500
+coex_gpio=4
+coex_delay_us=1000
+coex_margin_us=500
+coex_interval_us=2000
diff --git a/uwb/UWB-calibration_fcc.conf b/uwb/UWB-calibration_fcc.conf
new file mode 100644
index 0000000..695e076
--- /dev/null
+++ b/uwb/UWB-calibration_fcc.conf
@@ -0,0 +1,152 @@
+[CCC]version=2
+[CCC]ant0.ch5.prf64.pdoa_iso_rf2_rf1=0
+[CCC]ant0.ch5.prf64.pdoa_iso_rf1_rf2=0
+[CCC]ant0.ch9.prf64.pdoa_iso_rf2_rf1=0
+[CCC]ant0.ch9.prf64.pdoa_iso_rf1_rf2=0
+[CCC]ant0.ch5.prf64.pdoa_offset=0
+[CCC]ant0.ch9.prf64.pdoa_offset=0
+[CCC]ant0.ch5.prf64.pll_locking_code=0
+[CCC]ant0.ch9.prf64.pll_locking_code=0
+[CCC]id=0
+[CCC]wifi_coex_time_gap=10
+[CCC]ap_coop_mode=1
+[CCC]antenna_selection=4
+ant0.ch5.prf16.ant_delay=16450
+ant0.ch5.prf16.tx_power=0x4F4F444F
+ant0.ch5.prf16.pg_count=0
+ant0.ch5.prf16.pg_delay=0x26
+ant0.ch5.prf64.ant_delay=16450
+ant0.ch5.prf64.tx_power=0x4F4F444F
+ant0.ch5.prf64.pg_count=0
+ant0.ch5.prf64.pg_delay=0x26
+ant0.ch9.prf16.ant_delay=16450
+ant0.ch9.prf16.tx_power=0x4A4A3C4A
+ant0.ch9.prf16.pg_count=0
+ant0.ch9.prf16.pg_delay=0x26
+ant0.ch9.prf64.ant_delay=16450
+ant0.ch9.prf64.tx_power=0x4A4A3C4A
+ant0.ch9.prf64.pg_count=0
+ant0.ch9.prf64.pg_delay=0x26
+ant0.port=0
+ant0.selector_gpio=7
+ant0.selector_gpio_value=0
+ant1.ch5.prf16.ant_delay=16450
+ant1.ch5.prf16.tx_power=0
+ant1.ch5.prf16.pg_count=0
+ant1.ch5.prf16.pg_delay=0
+ant1.ch5.prf64.ant_delay=16450
+ant1.ch5.prf64.tx_power=0
+ant1.ch5.prf64.pg_count=0
+ant1.ch5.prf64.pg_delay=0
+ant1.ch9.prf16.ant_delay=16450
+ant1.ch9.prf16.tx_power=0x42423442
+ant1.ch9.prf16.pg_count=0
+ant1.ch9.prf16.pg_delay=0x20
+ant1.ch9.prf64.ant_delay=16450
+ant1.ch9.prf64.tx_power=0x42423442
+ant1.ch9.prf64.pg_count=0
+ant1.ch9.prf64.pg_delay=0x20
+ant1.port=0
+ant1.selector_gpio=7
+ant1.selector_gpio_value=1
+ant2.ch5.prf16.ant_delay=16450
+ant2.ch5.prf16.tx_power=0
+ant2.ch5.prf16.pg_count=0
+ant2.ch5.prf16.pg_delay=0
+ant2.ch5.prf64.ant_delay=16450
+ant2.ch5.prf64.tx_power=0
+ant2.ch5.prf64.pg_count=0
+ant2.ch5.prf64.pg_delay=0
+ant2.ch9.prf16.ant_delay=16450
+ant2.ch9.prf16.tx_power=0
+ant2.ch9.prf16.pg_count=0
+ant2.ch9.prf16.pg_delay=0
+ant2.ch9.prf64.ant_delay=16450
+ant2.ch9.prf64.tx_power=0
+ant2.ch9.prf64.pg_count=0
+ant2.ch9.prf64.pg_delay=0
+ant2.port=1
+ant2.selector_gpio=6
+ant2.selector_gpio_value=0
+ant3.ch5.prf16.ant_delay=16450
+ant3.ch5.prf16.tx_power=0x23231C23
+ant3.ch5.prf16.pg_count=0
+ant3.ch5.prf16.pg_delay=0x20
+ant3.ch5.prf64.ant_delay=16450
+ant3.ch5.prf64.tx_power=0x23231C23
+ant3.ch5.prf64.pg_count=0
+ant3.ch5.prf64.pg_delay=0x20
+ant3.ch9.prf16.ant_delay=16450
+ant3.ch9.prf16.tx_power=0
+ant3.ch9.prf16.pg_count=0
+ant3.ch9.prf16.pg_delay=0
+ant3.ch9.prf64.ant_delay=16450
+ant3.ch9.prf64.tx_power=0
+ant3.ch9.prf64.pg_count=0
+ant3.ch9.prf64.pg_delay=0
+ant3.port=1
+ant3.selector_gpio=6
+ant3.selector_gpio_value=1
+ant0.ant1.ch5.pdoa_offset=0
+ant0.ant1.ch9.pdoa_offset=0
+ant0.ant2.ch5.pdoa_offset=0
+ant0.ant2.ch9.pdoa_offset=0
+ant1.ant2.ch5.pdoa_offset=-2520
+ant1.ant2.ch9.pdoa_offset=1874
+ant0.ant3.ch5.pdoa_offset=0
+ant0.ant3.ch9.pdoa_offset=0
+ant1.ant3.ch5.pdoa_offset=-3080
+ant1.ant3.ch9.pdoa_offset=3214
+ant2.ant3.ch5.pdoa_offset=0
+ant2.ant3.ch9.pdoa_offset=0
+ch5.pll_locking_code=0
+ch9.pll_locking_code=0
+ant1.ant2.ch5.pdoa_lut=0a:f4:77:0a:d9:f4:c5:09:c1:f5:12:09:df:f5:60:08:7f:f6:ac:07:dd:f6:fa:06:f2:f6:48:06:89:f7:96:05:d1:f7:e3:04:54:f8:2f:04:f0:f8:7d:03:46:fa:cb:02:b0:fb:19:02:23:fd:64:01:a2:fe:b2:00:00:00:00:00:31:01:4e:ff:a6:02:9c:fe:0a:04:e7:fd:52:05:35:fd:73:06:83:fc:cb:07:d1:fb:be:08:1d:fb:f8:09:6a:fa:39:0b:b8:f9:81:0c:06:f9:1b:0d:54:f8:87:0d:a0:f7:a0:0e:ee:f6:06:0f:3b:f6:2d:0f:89:f5
+ant1.ant2.ch9.pdoa_lut=d7:ec:77:0a:d9:ed:c5:09:73:ee:12:09:58:ef:60:08:73:f0:ac:07:f0:f1:fa:06:d7:f2:48:06:f6:f3:96:05:cf:f5:e3:04:2d:f7:2f:04:23:f8:7d:03:a4:f9:cb:02:4c:fb:19:02:cb:fc:64:01:33:fe:b2:00:00:00:00:00:f6:01:4e:ff:ba:03:9c:fe:83:05:e7:fd:21:07:35:fd:6d:08:83:fc:71:09:d1:fb:ba:0a:1d:fb:c3:0b:6a:fa:f0:0c:b8:f9:c7:0d:06:f9:77:0e:54:f8:42:0f:a0:f7:89:0f:ee:f6:87:10:3b:f6:c7:10:89:f5
+ant1.ant3.ch5.pdoa_lut=89:f4:ac:07:a2:f4:60:08:ae:f4:77:0a:0a:f5:12:09:7d:f5:c5:09:8d:f5:fa:06:0a:f7:48:06:9a:f7:96:05:fa:f7:e3:04:68:f8:2f:04:f0:f9:7d:03:fa:fb:cb:02:6d:fd:19:02:2f:fe:64:01:98:fe:b2:00:00:00:00:00:1d:02:4e:ff:2d:02:e7:fd:33:02:9c:fe:0a:03:35:fd:6f:04:83:fc:db:05:d1:fb:85:07:1d:fb:b0:08:6a:fa:06:09:b8:f9:71:09:06:f9:48:0a:54:f8:4e:0b:a0:f7:58:0c:3b:f6:62:0c:ee:f6:c5:0c:89:f5
+ant1.ant3.ch9.pdoa_lut=4e:ec:77:0a:9c:ee:c5:09:04:f0:12:09:44:f1:60:08:c3:f2:ac:07:54:f3:fa:06:4c:f4:48:06:12:f5:96:05:0a:f6:e3:04:21:f7:2f:04:19:f8:7d:03:79:f9:cb:02:ba:fa:19:02:73:fc:64:01:0e:fe:b2:00:00:00:00:00:d7:00:4e:ff:f6:01:9c:fe:21:04:e7:fd:60:04:35:fd:37:05:83:fc:0a:07:d1:fb:c5:07:1d:fb:fc:07:6a:fa:8f:08:b8:f9:b0:09:06:f9:39:0a:54:f8:c9:0a:a0:f7:58:0b:ee:f6:75:0b:89:f5:83:0b:3b:f6
+xtal_trim=23
+temperature_reference=85
+smart_tx_power=1
+auto_sleep_margin=20000
+restricted_channels=0
+[HAL]aoa_capability=2
+[HAL]ant_sets.ch5.range.rx_ant_set_nonranging = 6
+[HAL]ant_sets.ch5.range.rx_ant_set_ranging = 6
+[HAL]ant_sets.ch5.range.tx_ant_set_nonranging = 6
+[HAL]ant_sets.ch5.range.tx_ant_set_ranging = 6
+[HAL]ant_sets.ch5.azimuth.rx_ant_set_nonranging = 3
+[HAL]ant_sets.ch5.azimuth.rx_ant_set_ranging = 3
+[HAL]ant_sets.ch5.azimuth.tx_ant_set_nonranging = 0
+[HAL]ant_sets.ch5.azimuth.tx_ant_set_ranging = 0
+[HAL]ant_sets.ch9.range.rx_ant_set_nonranging = 6
+[HAL]ant_sets.ch9.range.rx_ant_set_ranging = 6
+[HAL]ant_sets.ch9.range.tx_ant_set_nonranging = 6
+[HAL]ant_sets.ch9.range.tx_ant_set_ranging = 6
+[HAL]ant_sets.ch5.elevation.rx_ant_set_nonranging = 4
+[HAL]ant_sets.ch5.elevation.rx_ant_set_ranging = 4
+[HAL]ant_sets.ch5.elevation.tx_ant_set_nonranging = 0
+[HAL]ant_sets.ch5.elevation.tx_ant_set_ranging = 0
+[HAL]ant_sets.ch9.elevation.rx_ant_set_nonranging = 4
+[HAL]ant_sets.ch9.elevation.rx_ant_set_ranging = 4
+[HAL]ant_sets.ch9.elevation.tx_ant_set_nonranging = 4
+[HAL]ant_sets.ch9.elevation.tx_ant_set_ranging = 4
+[HAL]ant_sets.ch9.azimuth.rx_ant_set_nonranging = 3
+[HAL]ant_sets.ch9.azimuth.rx_ant_set_ranging = 3
+[HAL]ant_sets.ch9.azimuth.tx_ant_set_nonranging = 3
+[HAL]ant_sets.ch9.azimuth.tx_ant_set_ranging = 3
+[HAL]ant_sets.ch5.azimuth_elevation.rx_ant_set_nonranging=3
+[HAL]ant_sets.ch5.azimuth_elevation.rx_ant_set_ranging_azimuth=3
+[HAL]ant_sets.ch5.azimuth_elevation.rx_ant_set_ranging_elevation=4
+[HAL]ant_sets.ch5.azimuth_elevation.tx_ant_set_nonranging=0
+[HAL]ant_sets.ch5.azimuth_elevation.tx_ant_set_ranging=0
+[HAL]ant_sets.ch9.azimuth_elevation.rx_ant_set_nonranging=3
+[HAL]ant_sets.ch9.azimuth_elevation.rx_ant_set_ranging_azimuth=3
+[HAL]ant_sets.ch9.azimuth_elevation.rx_ant_set_ranging_elevation=4
+[HAL]ant_sets.ch9.azimuth_elevation.tx_ant_set_nonranging=3
+[HAL]ant_sets.ch9.azimuth_elevation.tx_ant_set_ranging=3
+[HAL]minimum_system_offset_uwbtime0=500
+coex_gpio=4
+coex_delay_us=1000
+coex_margin_us=500
+coex_interval_us=2000
diff --git a/uwb/UWB-calibration-jp.conf b/uwb/UWB-calibration_jp.conf
similarity index 100%
rename from uwb/UWB-calibration-jp.conf
rename to uwb/UWB-calibration_jp.conf
diff --git a/uwb/country_conf_gen.sh b/uwb/country_conf_gen.sh
new file mode 100755
index 0000000..3a367a7
--- /dev/null
+++ b/uwb/country_conf_gen.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# This script is used to generate uwb conuntry configuration file,
+# and the PRODUCT_COPY_FILES list in uwb.mk based on uwb_country.conf
+# Bug: 196073172, 233619860
+
+count=1
+
+mkdir -p $2
+
+while read line ; do
+ if [[ "$line" =~ ^"*" ]]; then
+ header=${line:1}
+ elif [[ "$line" =~ ^"\"" ]]; then
+ #line=$(echo ${line/,} | tr -d "\"")
+ country[count]=$(echo $line | cut -d ':' -f1 | tr -d "\"")
+ code[count]=$(echo $line | cut -d ':' -f2 | tr -d "\"" | tr -d " ")
+
+ if [ "$header" = "FCC" ]; then
+ cp $1/UWB-calibration_fcc.conf $2/UWB-calibration-${code[$count]}.conf
+ elif [ "$header" = "CE" ]; then
+ cp $1/UWB-calibration_ce.conf $2/UWB-calibration-${code[$count]}.conf
+ elif [ "$header" = "JP" ]; then
+ cp $1/UWB-calibration_jp.conf $2/UWB-calibration-${code[$count]}.conf
+ fi
+ fi
+((count++))
+done < $1/uwb_country.conf
diff --git a/uwb/uwb_calibration.mk b/uwb/uwb_calibration.mk
index 866a89a..29ac73e 100644
--- a/uwb/uwb_calibration.mk
+++ b/uwb/uwb_calibration.mk
@@ -13,10 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# UWB - ultra wide band
+$(call inherit-product-if-exists, vendor/qorvo/uwb/uwb.mk)
+
LOCAL_UWB_CAL_DIR=device/google/pantah/uwb
PRODUCT_COPY_FILES += \
- $(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration.conf \
- $(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration-unknown.conf \
- $(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration-default.conf \
- $(LOCAL_UWB_CAL_DIR)/UWB-calibration-jp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration-jp.conf \
+ $(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/uwb/UWB-calibration.conf \
+ $(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/uwb/UWB-calibration-unknown.conf \
+ $(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/uwb/UWB-calibration-default.conf \
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml
+
diff --git a/uwb/uwb_country.conf b/uwb/uwb_country.conf
new file mode 100644
index 0000000..d6863f6
--- /dev/null
+++ b/uwb/uwb_country.conf
@@ -0,0 +1,56 @@
+*FCC
+"Argentina": "ar"
+"Armenia": "am"
+"Azerbaijan": "az"
+"Belarus": "by"
+"Indonesia": "id"
+"Kazakhstan": "kz"
+"Kyrgyzstan": "kg"
+"Nepal": "np"
+"Pakistan": "pk"
+"Paraguay": "py"
+"Russia": "ru"
+"Solomon Islands": "sb"
+"Tajikistan": "tj"
+"Turkmenistanr": "tm"
+"Ukraine": "ua"
+"Uzbekistan": "uz"
+
+*CE
+"Austria": "at"
+"Belgium": "be"
+"Bulgaria": "bg"
+"Croatia": "hr"
+"Cyprus": "cy"
+"Czech Republic": "cz"
+"Denmark": "dk"
+"Estonia": "ee"
+"Finland": "fi"
+"France": "fr"
+"Germany": "de"
+"Greece": "gr"
+"Hungary": "hu"
+"Ireland Republic of (EIRE)": "ie"
+"Italy": "it"
+"Latvia": "lv"
+"Lithuania": "lt"
+"Luxembourg": "lu"
+"Malta": "mt"
+"Netherlands": "nl"
+"Poland": "pl"
+"Portugal": "pt"
+"Romania": "ro"
+"Slovakia": "sk"
+"Slovenia": "si"
+"Spain": "es"
+"Sweden": "se"
+"United Kingdom (Great Britain)": "gb"
+"Northern Ireland": "ni"
+"Iceland": "is"
+"Liechtenstein": "li"
+"Norway": "no"
+"Switzerland": "ch"
+
+*JP
+"Japan": "jp"
+"Taiwan": "tw"