summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-04Snap for 11526323 from 18fe8410b7ee6b2dfe6cb1e34845b7569b6862f7 to ↵simpleperf-releaseAndroid Build Coastguard Worker
simpleperf-release Change-Id: I1f3fa6f061e071172054e75f2d222836ca916683
2024-03-01Bugfix: pass country code to Config even it's invalid.Ikjoon Jang
When country code is switching between invalid(00) and valid. UWB should be toggled between enabled/disable accordingly. But it didn't happen as Config detect it hasn't changed. To fix this, always pass country code even if it's invalid ones, so Config detects it was changed. And forcing uwb disabled whenever the country code is invalid in COUNTRY_CODE_CAPS and ExtCal handlings. Bug: 327504423 Test: Check uwb status with country switching 'KR-00-KR' Change-Id: I50ab874bf640b2cd20d1f05a6da7b7831d1d8da1
2024-03-01Add is_valid_country_code() helper functionIkjoon Jang
Bug: 321604848 Test: None Change-Id: I4fb9699cdbd7a6d0109492a0c18b78067e1c382c
2024-02-28Snap for 11510257 from 2c670102040f512107cdbd14bbb1b3ae3af1260f to ↵Android Build Coastguard Worker
simpleperf-release Change-Id: I899f4f09ab75a3ce7bdf924371f8f3dde843e805
2024-02-19Add le_bytes_to_cpu() helper macroIkjoon Jang
For converting between native numeric type and byte array in little endian. Bug: 321604848 Test: None Change-Id: Id5aef36ffb60d19796582c949257d621ca4d4592
2024-02-19Bugfix: reset region code on config deinitIkjoon Jang
Remembered region code should be invalidated on deinit path. Bug: 324966526 Test: cmd uwb disable-uwb; cmd uwb enable-uwb Change-Id: Ib06958ac9c01b34208ed1f3341e5e2053ebbebf7
2024-02-08cleanup: move set-country-code handler into one placeIkjoon Jang
1. Move set-country-code handlings into one place phNxpUciHal_handle_set_country_code() 2. Skip per-country calibrations if the given country is same with the current one. Bug: 323275554 Test: multiple runs of `cmd uwb force-country-code enabled XX` Change-Id: If170dba7189c8277beb1bf4b3ff0979652fdcd3c
2024-02-08Config: NxpConfig_SetCountryCode() do not reload config for the same regionIkjoon Jang
1. The function should return true only when the new per-country confinguration was loaded. It returns false when given country code is the same one with current loaded country/region code. 2. remove unnecessary C linkage option from phNxpConfig. Bug: 323275554 Test: multiple runs of `cmd uwb force-country-code enable XX` Change-Id: I22a0f3cfd450bf2d8068d20c8050ebc0bb394440
2024-02-08Merge "vbat and overtemprature handling" into mainIkjoon Jang
2024-02-08Merge "Low power mode - uci file path configured statically" into mainIkjoon Jang
2024-02-08Merge "waiting for close complete sem post before clearing memory" into mainIkjoon Jang
2024-02-08Merge "Change endianess of COUTRY_CODE_CAPS tx_power_offset(0x5)" into mainIkjoon Jang
2024-02-08Merge "coverity fix" into mainIkjoon Jang
2024-02-08Change endianess of COUTRY_CODE_CAPS tx_power_offset(0x5)Bhautik Ardeshana
Calib Value for RMS Value in TX Power Per Antenna Calibration Bug: 322728262 Test: Manually test TX power settings Change-Id: I572e218dfda850eb8486087da0b7fffc060c0d54
2024-02-08coverity fixBhautik Ardeshana
- check return value of NxpConfig_GetNum() - use std::move explictly for string copy in phNxpConfig.cc Bug: 322728262 Test: Manually test Change-Id: I5a1579e058f814c0e98b76a9fd6182312ea7ad3a
2024-02-08Merge "enable dpd entry timeout and GPIO config usage at HAL" into mainIkjoon Jang
2024-02-08Snap for 11421525 from 712fd121b346ac4694b09b58e0fb3ee2cc1c41ab to ↵Android Build Coastguard Worker
simpleperf-release Change-Id: I3717a5927595c88b968128a48ef68d1720462aa5
2024-02-06vbat and overtemprature handlingBhautik Ardeshana
Bug: 322728262 Test: Manually testing thermal runway Change-Id: I88cc70da5a8415181f5a26393f610e7b5314111a
2024-02-05[DON'T BLOCK] Test ownership migration rulesAditya Choudhary
This CL is created as a best effort to migrate test targets to the new android ownership model. If you find incorrect or unnecessary attribution in this CL, please create a separate CL to fix that. For more details please refer to the link below, go/new-android-ownership-model Bug: 304529413 Test: N/A Change-Id: I4e5ffeb0d21c7fcd8ba1783857707ad7e0517ddc
2024-02-02Snap for 11400057 from bfb56fa945104b62ad17302739dc667930d9b8d5 to ↵Android Build Coastguard Worker
simpleperf-release Change-Id: I7425cd6669345e8331694ee3bc1768bc60afd1f1
2024-02-02enable dpd entry timeout and GPIO config usage at HALBhautik Ardeshana
Bug: 322728262 Test: Manually testing GPIO config and dpd settings Change-Id: I2955689099c88940ecce111c0885cc49d8e1b744
2024-01-29Low power mode - uci file path configured staticallyBhautik Ardeshana
Bug: 322728262 Test: Manually testing Uwb init-deinit Change-Id: If08d411ef228d52a05bfc4933cebc6dce8f2ef76
2024-01-29waiting for close complete sem post before clearing memoryBhautik Ardeshana
Bug: 322728262 Test: Manually testing UWB init-deinit Change-Id: Ic4c6474bb7d071b1573a8832ddf29347d96321ee
2024-01-18Execute SE binding during UWB init only if it is enabledBhautik Ardeshana
Bug: 307842325 Test: Manually testing UWB init Change-Id: Ib402845742e42f21163f97988b3291f3eb4fcd47
2023-12-18Use uint8_t instead of enumIkjoon Jang
No functional changes, just to avoid compile time warning: hardware/nxp/uwb/halimpl/fwd/sr1xx/phNxpUciHal_fwd.cc:157:31: warning: bitwise operation between different enumeration types ('phHbci_Class' and 'phHbci_SubClass') is deprecated [-Wdeprecated-enum-enum-conversion] Bug: None Test: check fw downloading Change-Id: Ie0c12b4fdf287f8d5a05eeecea43969099f30c21
2023-12-15Remove uwb_debug_enabled for debug loggingIkjoon Jang
We can control log level by property or configuration file instead. Bug: 316321584 Test: check logcat Change-Id: Id038ef1f475e0e0b80963efd42bbf5ae952fe087
2023-12-15Adjust log level of configuration filesIkjoon Jang
No functional changes, - Use ALOGV() in NxpConfig instead of using uwb_debug_enabled - Do not use error log level in applying calibration parameters Bug: 316321584 Test: check logcat Change-Id: I4bcc6856439c591484cb9f4f42f3d0be064f82e1
2023-12-14config: reset configuration parameters on hal_closeIkjoon Jang
Loaded configuration files should be invalidated on hal_close(). Bug: 316274283 Test: `cmd uwb disable-uwb; cmd uwb enable-uwb` and check logcat Change-Id: Iab5a31c712d54c4374fc10e6ba1ca48b0cc2984f
2023-11-22Snap for 11135399 from 6719ee3a60864f90d4cf3135dbbc82c786a1443b to ↵Android Build Coastguard Worker
simpleperf-release Change-Id: I257c6b78f2ab7db8285edecb11d29dfe238d7ab8
2023-11-21config: support loading configuration files upon 'cal.sku' property am: ↵Ikjoon Jang
6719ee3a60 Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2836207 Change-Id: I6996b0e3ba174148e7db076e6bb58b92576c8872 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-20config: support loading configuration files upon 'cal.sku' propertyIkjoon Jang
Users can specify additional variations in EXTRA_CONF_PATH_[N]. If the system has 'persist.vendor.uwb.cal.sku' property, '<sku>' part in the EXTRA_CONF_PATH_[N] will be replaced with the value of a property. For example, if property "persist.vendor.uwb.cal.sku" has "modelA", it evaluates EXTRA_CONFI_PATH "/vendor/etc/uwb/cal-<sku>.conf" as "/vendor/etc/uwb/cal-modelA.conf" Bug: 312075890 Bug: 277025402 Test: check logcat with different property values Change-Id: Ie7f577b6a63b159a7c2b54c808b7c36ea87b5cd6
2023-11-15cleanup: remove unnecessary malloc() and global variables in fw downloading ↵Ikjoon Jang
am: 6c02cce940 Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2827313 Change-Id: I8db931613c04c85dd8ac2478d45c9398b8e638d0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15cleanup: do not use malloc for device node string am: cbd39dad89Ikjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2827312 Change-Id: Ib1f2bbc32f56661c5ed85866d7b4062b3b503ce6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15extra calibrations: apply per-country restrictions am: 684e80acf0Ikjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2807278 Change-Id: Iee0b91720897e726ba51956d2d267129d474df16 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15Clean ups for handling UWB_COUNTRY_CODE_CAPS + extra calibrations am: ad5230a15fIkjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2807277 Change-Id: Iff4113bbc30ebf1aaea4bb53fafa8c8311cbe97e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15extra calibrations: apply per-country calibrations on set-country-code am: ↵Ikjoon Jang
0aa6fa0d70 Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2807276 Change-Id: Ic94834e7ad6cfb45f3a63eefabeb29c7a16b911b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15extra calibrations: add per-country parameters am: e687a7900fIkjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2807275 Change-Id: Iba3e8d94af6ce24580375299f6d02e7a60afe2bd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15extra calibration: split chip dependent logics am: 2e2199149aIkjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2799678 Change-Id: Ie2b5aece1a2827978819eaff1a1a6f440b00250e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15nxp uwb hal: Do not check the status code when PBF=1 am: be9a0ea92fIkjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2796006 Change-Id: I10f167c4a964004056a0dbeeb4da18435febbc5d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15Bugfix in handling antenna delay endianness am: b7cd147bd4Ikjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2827311 Change-Id: I24f93f24d3e59bc7f2791f4282d43595a7163367 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-14cleanup: remove unnecessary malloc() and global variables in fw downloadingIkjoon Jang
No functional changes, just for cleanups. - use std::string instead of malloc/free - Reduce using global variables in fw downloading Bug: 307201532 Test: check logcat of fw downlading Change-Id: I3c2ff24be5165c2a66a645c0ee3336f7cf0d49a2
2023-11-14cleanup: do not use malloc for device node stringIkjoon Jang
No functional changes, just for cleanups. Bug: 307201532 Test: check logcat in opening device node Change-Id: Ia28b13e42f33bc3421b149ba87a885af6d537478
2023-11-14extra calibrations: apply per-country restrictionsIkjoon Jang
Apply `cal.restricted_channels` and `cal.uwb_disable` from set-country-code handler. extra calibrations of `cal.xxx` are only applied when COUNTRY_CODE_CAPS is not supplied. Define restricted_channel_mask instead of two boolean values for channel 5 and 9 restrictions in phNxpUciHal_Runtime_Settings_t. Bug: 277025402 Test: check logcat Change-Id: I06ad38547cadf812f57d9705a9a5d1432cbbddd0
2023-11-14Clean ups for handling UWB_COUNTRY_CODE_CAPS + extra calibrationsIkjoon Jang
Preliminary step for integrating per-country setting between extra calibration + UWB_COUNTRY_CODE_CAPS: - Define phNxpUciHal_Runtime_Settings_t type for saving per-country settings instead of using global variables (uwb_enable, conf_tx_power, channel_X_support) and rename variable name 'conf_tx_power' to 'tx_power_offset'. - Bugfix in parsing COUNTRY_CODE_CAPS: TX_POWER value should be in little endian.. - Do not use malloc() for internal packet buffer (gtx_power and gRMS_tx_power) - Rename phNxpUciHal_getCountryCaps() to phNxpUciHal_applyCountryCaps() called by phNxpUciHal_handle_set_country_code() path. - Minor bugfix in phNxpUciHal_parseCoreDeviceInfoRsp()'s reading DEVICE_NAME_PARAM_ID Bug: 277025402 Bug: 307201532 Test: apply UWB_COUNTRY_CODE_CAPS and check log cat with different countries Change-Id: I17b2293b9bca58e6ac052a6f63ce6db1f0b540d6
2023-11-14extra calibrations: apply per-country calibrations on set-country-codeIkjoon Jang
Apply per-country calibrations on set-country-code calls. These are only executed when UWB_COUNTRY_CODE_CAPS is not provided by configuration files. Move the existing codes for applying UWB_COUNTRY_CODE_cAPS into phNxpUciHal_handle_set_country_code() from CasecadeConfig::setCountryCode(). Bug: 277025402 Test: check logcat with `cmd uwb force-country-code enabled ...` Change-Id: Ib7efd4e083e73aa22b7b1a2db1315fb2ddb35856
2023-11-14extra calibrations: add per-country parametersIkjoon Jang
Add per-country calibration parameters - cal.tx_power - cal.tx_pulse_shape - cal.ddfs_enable - cal.dc_supress - cal.ddfs_tone_config Internal parameters were newly defined as: - EXTCAL_PARAM_TX_POWER - EXTCAL_PARAM_TX_PULSE_SHAPE - EXTCAL_PARAM_TX_BASE_BAND_CONTROL - EXTCAL_PARAM_DDFS_TONE_CONFIG Each configuration group is handled by its own internal functions - named extcal_do_xxx() - some of them are called from coreinit() only while other per-country functions are called from country code handlings. phNxpUciHal_handle_set_country_code() is newly added for applying those parameters - no yet called by anywhere. Documentation on configuration files (README.md) was also updated. Bug: 277025402 Test: check logcat Change-Id: Id0efefa6fb6b00e9c03a28ed127133dc0d6775eb
2023-11-14extra calibration: split chip dependent logicsIkjoon Jang
Add sr1xx_apply_calibration() and sr1xx_read_otp() and move the existing codes into the new functions. Also define the SW data format for each calibration parameter. Each chipset should translate the data type into its own HW format. Currently only two parameters - CLK_ACCURACY and RX_ANT_DELAY were defined. Also fixed a bug in handling RX_ANT_DELAY_CALIB data endianness. Bug: 277025402 Test: `cmd uwb start-fira-ranging-session` Change-Id: Ieb91d29393eb05f82f310c447b722a32006fe19b
2023-11-14nxp uwb hal: Do not check the status code when PBF=1Ikjoon Jang
HAL shouldn't check the status code for a non-header packet when the packets are fragmented with PBF=1. ``` NxpUciR : len = 259 > 510400FF00... NxpUciR : len = 73 > 4104004545... ... NxpUwbHal: command failed! status = 0x45 NxpUwbHal: Response Status = 0xff ``` This patch simply skips checking status code when it's not from phNxpUciHal_send_ext_cmd() path handling internal command packets, assuming PBF is always zero when it's phNxpUciHal_send_ext_cmd() path. Also remove unnecessary debug function phNxpUciHal_print_response_status(), users can check the status code from NxpUciR or upper layer's logs. Bug: 307208367 Test: `cmd uwb start-fira-ranging-session` Change-Id: Id5bacd97c5c3487e286c6db5b3b72f61d12d9e07
2023-11-14Bugfix in handling antenna delay endiannessIkjoon Jang
16 bit delay number in Q14.2 should be in little endian format. Bug: 310270099 Test: Check logcat contains RX_ANT_DELAY_CALIB Change-Id: Ifa81af3804e64ca9745c40b649b968bc95e73258
2023-10-31Remove TX_ADAPTIVE_PAYLOAD_POWER from SESSION_SET_APP_CONFIG_CMD am: d378337655Ikjoon Jang
Original change: https://android-review.googlesource.com/c/platform/hardware/nxp/uwb/+/2807279 Change-Id: I597fa1918eada50bb629448f98bc21358f04e927 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>