From 813a95df594053d222fd7930e86a8bfb3d89c21d Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Tue, 1 Aug 2023 07:27:50 +0000 Subject: [PATCH 1/4] refactor gps build system Bug: 290725902 Test: verification test at b/290725902 Change-Id: I931b7f655e0994cab81daa01fd40aaad612b343a --- device-husky.mk | 9 +-------- device-ripcurrent.mk | 9 +-------- device-shiba.mk | 9 +-------- factory_husky.mk | 3 +++ factory_ripcurrent.mk | 3 +++ factory_shiba.mk | 3 +++ 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/device-husky.mk b/device-husky.mk index 5da8623..cfd644b 100644 --- a/device-husky.mk +++ b/device-husky.mk @@ -244,14 +244,7 @@ PRODUCT_SOONG_NAMESPACES += vendor/google_devices/shusky/prebuilts # Location # SDK build system -ifneq ($(BOARD_WITHOUT_RADIO),true) -# Release stable version to factory image -ifneq ($(filter factory_%,$(TARGET_PRODUCT)),) - include device/google/gs-common/gps/brcm/device.mk -else - include device/google/gs-common/gps/brcm/device_v2.mk -endif -endif +include device/google/gs-common/gps/brcm/device.mk PRODUCT_COPY_FILES += \ device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer diff --git a/device-ripcurrent.mk b/device-ripcurrent.mk index 77d5c9b..b74d75e 100644 --- a/device-ripcurrent.mk +++ b/device-ripcurrent.mk @@ -204,14 +204,7 @@ PRODUCT_SOONG_NAMESPACES += vendor/google_devices/shusky/prebuilts # Location # SDK build system -ifneq ($(BOARD_WITHOUT_RADIO),true) -# Release stable version to factory image -ifneq ($(filter factory_%,$(TARGET_PRODUCT)),) - include device/google/gs-common/gps/brcm/device.mk -else - include device/google/gs-common/gps/brcm/device_v2.mk -endif -endif +include device/google/gs-common/gps/brcm/device.mk PRODUCT_COPY_FILES += \ device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer diff --git a/device-shiba.mk b/device-shiba.mk index 5507c89..3dd3119 100644 --- a/device-shiba.mk +++ b/device-shiba.mk @@ -234,14 +234,7 @@ PRODUCT_SOONG_NAMESPACES += vendor/google_devices/shusky/prebuilts # Location # SDK build system -ifneq ($(BOARD_WITHOUT_RADIO),true) -# Release stable version to factory image -ifneq ($(filter factory_%,$(TARGET_PRODUCT)),) - include device/google/gs-common/gps/brcm/device.mk -else - include device/google/gs-common/gps/brcm/device_v2.mk -endif -endif +include device/google/gs-common/gps/brcm/device.mk PRODUCT_COPY_FILES += \ device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer diff --git a/factory_husky.mk b/factory_husky.mk index 54cbdd7..5c2c0ce 100644 --- a/factory_husky.mk +++ b/factory_husky.mk @@ -19,6 +19,9 @@ TARGET_LINUX_KERNEL_VERSION := 5.15 $(call inherit-product, device/google/zuma/factory_common.mk) $(call inherit-product, device/google/shusky/device-husky.mk) include device/google/shusky/audio/husky/factory-audio-tables.mk +# Override to factory SDK +$(call soong_config_set, gpssdk, sdkv1, True) +$(call soong_config_set, gpssdk, gpsmcuversion, gpsv1_$(TARGET_BUILD_VARIANT)) PRODUCT_NAME := factory_husky PRODUCT_DEVICE := husky diff --git a/factory_ripcurrent.mk b/factory_ripcurrent.mk index 37d0f63..b7c64c5 100644 --- a/factory_ripcurrent.mk +++ b/factory_ripcurrent.mk @@ -19,6 +19,9 @@ TARGET_LINUX_KERNEL_VERSION := 5.15 $(call inherit-product, device/google/zuma/factory_common.mk) $(call inherit-product, device/google/shusky/device-ripcurrent.mk) include device/google/shusky/audio/ripcurrent/factory-audio-tables.mk +# Override to factory SDK +$(call soong_config_set, gpssdk, sdkv1, True) +$(call soong_config_set, gpssdk, gpsmcuversion, gpsv1_$(TARGET_BUILD_VARIANT)) PRODUCT_NAME := factory_ripcurrent PRODUCT_DEVICE := ripcurrent diff --git a/factory_shiba.mk b/factory_shiba.mk index 365a2f1..d20f113 100644 --- a/factory_shiba.mk +++ b/factory_shiba.mk @@ -19,6 +19,9 @@ TARGET_LINUX_KERNEL_VERSION := 5.15 $(call inherit-product, device/google/zuma/factory_common.mk) $(call inherit-product, device/google/shusky/device-shiba.mk) include device/google/shusky/audio/shiba/factory-audio-tables.mk +# Override to factory SDK +$(call soong_config_set, gpssdk, sdkv1, True) +$(call soong_config_set, gpssdk, gpsmcuversion, gpsv1_$(TARGET_BUILD_VARIANT)) PRODUCT_NAME := factory_shiba PRODUCT_DEVICE := shiba From f6d2ec958fb764c06454745091952004b2b829be Mon Sep 17 00:00:00 2001 From: Austin Delgado Date: Wed, 16 Aug 2023 15:16:14 -0700 Subject: [PATCH 2/4] Add config_selected_udfps_touch_detection to HK3 Selects touch config for HK3 that lowers target size to .7 Bug: 296225828 Test: TODO Change-Id: I55080254f1cc4e0b988bbcf8af55d27e1e98e52b --- husky/overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/husky/overlay/frameworks/base/core/res/res/values/config.xml b/husky/overlay/frameworks/base/core/res/res/values/config.xml index 64c20b4..53e81f7 100644 --- a/husky/overlay/frameworks/base/core/res/res/values/config.xml +++ b/husky/overlay/frameworks/base/core/res/res/values/config.xml @@ -312,4 +312,7 @@ true + + + 4 From afc8700181df4392dfde0c217a30382662a19974 Mon Sep 17 00:00:00 2001 From: Chris Paulo Date: Mon, 10 Jul 2023 20:57:36 -0700 Subject: [PATCH 3/4] shusky/vibrator: Enable DBC Enable DBC through ro vendor property. This will allow the vibrator HAL to configure dbc parameters through a series of sysfs writes, which the cs40l26 driver will handle. Bug: 266505414 Test: atest VibratorHalCs40l26TestSuite Change-Id: I2471454f6d079720bd7157980214ae17dc3ba335 Signed-off-by: Chris Paulo --- conf/init.husky.rc | 21 +++++++++++++++++++++ conf/init.shiba.rc | 21 +++++++++++++++++++++ device-husky.mk | 9 ++++++++- device-shiba.mk | 9 ++++++++- 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/conf/init.husky.rc b/conf/init.husky.rc index c21c473..1b81446 100644 --- a/conf/init.husky.rc +++ b/conf/init.husky.rc @@ -94,6 +94,27 @@ on property:vendor.all.modules.ready=1 chown system system /sys/bus/i2c/devices/6-0043/default/delay_before_stop_playback_us chown system system /sys/bus/i2c/devices/5-0043/default/delay_before_stop_playback_us chown system system /sys/bus/i2c/devices/4-0043/default/delay_before_stop_playback_us + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_env_rel_coef + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_env_rel_coef + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_env_rel_coef + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_rise_headroom + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_rise_headroom + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_rise_headroom + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_fall_headroom + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_fall_headroom + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_fall_headroom + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_enable + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_enable + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_enable + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_tx_lvl_thresh_fs + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_tx_lvl_thresh_fs + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_tx_lvl_thresh_fs + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_tx_lvl_hold_off_ms + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_tx_lvl_hold_off_ms + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_tx_lvl_hold_off_ms + chown system system /sys/bus/i2c/devices/6-0043/default/pm_active_timeout_ms + chown system system /sys/bus/i2c/devices/5-0043/default/pm_active_timeout_ms + chown system system /sys/bus/i2c/devices/4-0043/default/pm_active_timeout_ms enable vendor.vibrator.cs40l26 diff --git a/conf/init.shiba.rc b/conf/init.shiba.rc index fe53956..e4c97a2 100644 --- a/conf/init.shiba.rc +++ b/conf/init.shiba.rc @@ -90,6 +90,27 @@ on property:vendor.all.modules.ready=1 chown system system /sys/bus/i2c/devices/6-0043/default/delay_before_stop_playback_us chown system system /sys/bus/i2c/devices/5-0043/default/delay_before_stop_playback_us chown system system /sys/bus/i2c/devices/4-0043/default/delay_before_stop_playback_us + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_env_rel_coef + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_env_rel_coef + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_env_rel_coef + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_rise_headroom + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_rise_headroom + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_rise_headroom + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_fall_headroom + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_fall_headroom + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_fall_headroom + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_enable + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_enable + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_enable + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_tx_lvl_thresh_fs + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_tx_lvl_thresh_fs + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_tx_lvl_thresh_fs + chown system system /sys/bus/i2c/devices/6-0043/dbc/dbc_tx_lvl_hold_off_ms + chown system system /sys/bus/i2c/devices/5-0043/dbc/dbc_tx_lvl_hold_off_ms + chown system system /sys/bus/i2c/devices/4-0043/dbc/dbc_tx_lvl_hold_off_ms + chown system system /sys/bus/i2c/devices/6-0043/default/pm_active_timeout_ms + chown system system /sys/bus/i2c/devices/5-0043/default/pm_active_timeout_ms + chown system system /sys/bus/i2c/devices/4-0043/default/pm_active_timeout_ms enable vendor.vibrator.cs40l26 diff --git a/device-husky.mk b/device-husky.mk index 8252d38..7823f63 100644 --- a/device-husky.mk +++ b/device-husky.mk @@ -339,7 +339,14 @@ PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.vibrator.hal.context.scale=60 \ persist.vendor.vibrator.hal.context.fade=true \ persist.vendor.vibrator.hal.context.cooldowntime=1600 \ - persist.vendor.vibrator.hal.context.settlingtime=5000 + persist.vendor.vibrator.hal.context.settlingtime=5000 \ + ro.vendor.vibrator.hal.dbc.enable=true \ + ro.vendor.vibrator.hal.dbc.envrelcoef=8353728 \ + ro.vendor.vibrator.hal.dbc.riseheadroom=1909602 \ + ro.vendor.vibrator.hal.dbc.fallheadroom=1909602 \ + ro.vendor.vibrator.hal.dbc.txlvlthreshfs=2516583 \ + ro.vendor.vibrator.hal.dbc.txlvlholdoffms=0 \ + ro.vendor.vibrator.hal.pm.activetimeout=5 # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ diff --git a/device-shiba.mk b/device-shiba.mk index 543ce77..ec81cf1 100644 --- a/device-shiba.mk +++ b/device-shiba.mk @@ -320,7 +320,14 @@ PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.vibrator.hal.context.scale=60 \ persist.vendor.vibrator.hal.context.fade=true \ persist.vendor.vibrator.hal.context.cooldowntime=1600 \ - persist.vendor.vibrator.hal.context.settlingtime=5000 + persist.vendor.vibrator.hal.context.settlingtime=5000 \ + ro.vendor.vibrator.hal.dbc.enable=true \ + ro.vendor.vibrator.hal.dbc.envrelcoef=8353728 \ + ro.vendor.vibrator.hal.dbc.riseheadroom=1909602 \ + ro.vendor.vibrator.hal.dbc.fallheadroom=1909602 \ + ro.vendor.vibrator.hal.dbc.txlvlthreshfs=2516583 \ + ro.vendor.vibrator.hal.dbc.txlvlholdoffms=0 \ + ro.vendor.vibrator.hal.pm.activetimeout=5 # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ From ff32827267607e2afee4ac177bdef39ea67e59fa Mon Sep 17 00:00:00 2001 From: "Ali K. Zadeh" Date: Thu, 17 Aug 2023 00:11:27 +0000 Subject: [PATCH 4/4] Set DSU min to 820MHz for CAMERA_STREAMING_HIGH use-case Bug: 294814988 Test: Kibbles (https://b.corp.google.com/issues/294814988#comment9) Change-Id: Ia454b8aa08c866c4068ed6676e2438081e30e128 --- perf/powerhint-husky.json | 6 ++++++ perf/powerhint-ripcurrent.json | 6 ++++++ perf/powerhint-shiba.json | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/perf/powerhint-husky.json b/perf/powerhint-husky.json index 86438df..232f5f8 100644 --- a/perf/powerhint-husky.json +++ b/perf/powerhint-husky.json @@ -1565,6 +1565,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "DsuMinFreq", + "Duration": 0, + "Value": "820000" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PMU_LIT_LIMIT_FREQ", diff --git a/perf/powerhint-ripcurrent.json b/perf/powerhint-ripcurrent.json index f745ec0..5c71fa8 100644 --- a/perf/powerhint-ripcurrent.json +++ b/perf/powerhint-ripcurrent.json @@ -1394,6 +1394,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "DsuMinFreq", + "Duration": 0, + "Value": "820000" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PMU_LIT_LIMIT_FREQ", diff --git a/perf/powerhint-shiba.json b/perf/powerhint-shiba.json index 3d56d8b..5e5bc2c 100644 --- a/perf/powerhint-shiba.json +++ b/perf/powerhint-shiba.json @@ -1463,6 +1463,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "DsuMinFreq", + "Duration": 0, + "Value": "820000" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PMU_LIT_LIMIT_FREQ",