From 231a75f14a8a4fb471397dd363a2c7b909b8a683 Mon Sep 17 00:00:00 2001 From: Rex Lin Date: Mon, 1 Aug 2022 15:16:20 +0800 Subject: [PATCH 1/3] uwb: support per device calibration for R4 Bug: 240199018 Test: Build pass Change-Id: I45512bba1e0821b4ba32a324aebc7e6b4ec15532 --- device-raven.mk | 1 - uwb/init.uwb.calib.xtal.sh | 26 ++++++++++++++++++++++++++ uwb/uwb_calibration.mk | 7 +++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 uwb/init.uwb.calib.xtal.sh diff --git a/device-raven.mk b/device-raven.mk index 53bbfcd..97fb567 100644 --- a/device-raven.mk +++ b/device-raven.mk @@ -41,7 +41,6 @@ include device/google/gs101/fingerprint/udfps_factory.mk endif ifeq ($(filter factory_raven, $(TARGET_PRODUCT)),) -include device/google/gs101/uwb/uwb.mk include device/google/raviole/uwb/uwb_calibration.mk endif diff --git a/uwb/init.uwb.calib.xtal.sh b/uwb/init.uwb.calib.xtal.sh new file mode 100644 index 0000000..1fcb876 --- /dev/null +++ b/uwb/init.uwb.calib.xtal.sh @@ -0,0 +1,26 @@ +#!/vendor/bin/sh +# only use xtal_trim from factory calibration +if [ -z "$2" ] +then + echo "usage is $0 input-calibration output_calibration" + exit 0 +fi +OUTPUT_CALIB="$2" +if [ ! -f "$OUTPUT_CALIB" ]; then + touch $OUTPUT_CALIB + chmod 0644 $OUTPUT_CALIB + file="$1" + while IFS=, read -r f1 f2 + do + case $f1 in + "UWB_cal_tx_xtal_reg_final_value") + if [ $((0x$f2)) -gt 63 ]; then + f2=63 + fi + echo 'xtal_trim=0x'$f2 >> $OUTPUT_CALIB + ;; + esac + done <"$file" + exit 0 +fi + diff --git a/uwb/uwb_calibration.mk b/uwb/uwb_calibration.mk index e29bea2..2661ad1 100644 --- a/uwb/uwb_calibration.mk +++ b/uwb/uwb_calibration.mk @@ -13,9 +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/raviole/uwb PRODUCT_COPY_FILES += \ $(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 \ + $(LOCAL_UWB_CAL_DIR)/init.uwb.calib.xtal.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.uwb.calib.sh \ + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.uwb.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.uwb.xml From 9ac564fbd01c885b15fbd96a46ec5b96602ee1d5 Mon Sep 17 00:00:00 2001 From: Steve Berbary Date: Tue, 16 Aug 2022 03:26:17 +0000 Subject: [PATCH 2/3] Update oriole SVN to 38 Bug: 242323332 Change-Id: I6dff900e91090b39fc8ed13c935c1a3349be553b --- device-oriole.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-oriole.mk b/device-oriole.mk index 5302e26..59a9d63 100644 --- a/device-oriole.mk +++ b/device-oriole.mk @@ -168,7 +168,7 @@ endif # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=37 + ro.vendor.build.svn=38 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ From f045ccd24a1d1b9ffac0c0951b2f158258563b0b Mon Sep 17 00:00:00 2001 From: Steve Berbary Date: Tue, 16 Aug 2022 03:27:48 +0000 Subject: [PATCH 3/3] Update raven SVN to 38 Bug: 242323332 Change-Id: Ib18dd0e90128a5023d3956a6442747736464595f --- device-raven.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-raven.mk b/device-raven.mk index d63decc..059ed83 100644 --- a/device-raven.mk +++ b/device-raven.mk @@ -178,7 +178,7 @@ endif # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=37 + ro.vendor.build.svn=38 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \