usb: Expose persistent vendor property for USB-C Dp Alt Mode

The change exposes persist.vendor.usb.displayport.enabled
to enable/disable USB-C Dp Alt Mode i.e. DisplayPort over USB-C.

By default persist.vendor.usb.displayport.enabled is to 0 in
user builds and 1 in all other build variants.

Test: manual verification on device
Bug: 297286558
Change-Id: I596d3af52f2a813f5f78c4f9b77b6ae3dd8a161b
(cherry picked from commit 2173dc37da793599239a974d8f7bc40b2bf1ee80)
Signed-off-by: RD Babiera <rdbabiera@google.com>
This commit is contained in:
RD Babiera 2023-09-08 21:01:08 +00:00
parent fe0c40802e
commit 652ddfaf39
2 changed files with 14 additions and 0 deletions

View file

@ -192,3 +192,9 @@ on property:sys.usb.config=charger && property:sys.usb.configfs=1
on property:ro.bootmode=usbuwb
setprop persist.vendor.usb.usbradio.config uwb_acm
on property:persist.vendor.usb.displayport.enabled=1
write /sys/class/typec/port0/port0.0/mode1/active "yes"
on property:persist.vendor.usb.displayport.enabled=0
write /sys/class/typec/port0/port0.0/mode1/active "no"

View file

@ -198,6 +198,14 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PROPERTY_OVERRIDES += \
telephony.active_modems.max_count=2
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=1
else
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=0
endif
USE_LASSEN_OEMHOOK := true
# Use for GRIL