forked from AOSPA/android_vendor_qcom-opensource_usb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vendor_product.mk
78 lines (68 loc) · 2.83 KB
/
vendor_product.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Default property overrides for various function configurations
# These can be further overridden at runtime in init*.rc files as needed
#
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.rndis.func.name=gsi
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.rmnet.func.name=gsi
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.rmnet.inst.name=rmnet
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.dpl.inst.name=dpl
ifneq ($(filter bengal monaco trinket,$(TARGET_BOARD_PLATFORM)),)
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.controller=4e00000.dwc3
ifneq ($(filter bengal trinket,$(TARGET_BOARD_PLATFORM)),)
PRODUCT_SYSTEM_PROPERTIES += ro.boot.usb.dwc3_msm=4e00000.ssusb
else
PRODUCT_SYSTEM_PROPERTIES += ro.boot.usb.dwc3_msm=4e00000.hsusb
endif
else ifneq ($(filter msm8998 sdm660,$(TARGET_BOARD_PLATFORM)),)
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.controller=a800000.dwc3
else ifneq ($(filter msm8953,$(TARGET_BOARD_PLATFORM)),)
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.controller=7000000.dwc3
else ifeq ($(filter msm8937,$(TARGET_BOARD_PLATFORM)),)
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.controller=a600000.dwc3
endif
# QDSS uses SW path on these targets
ifneq ($(filter lahaina taro bengal kalama monaco kona crow trinket,$(TARGET_BOARD_PLATFORM)),)
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.qdss.inst.name=qdss_sw
else
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.qdss.inst.name=qdss
endif
ifeq ($(TARGET_HAS_DIAG_ROUTER),true)
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.diag.func.name=ffs
else
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.diag.func.name=diag
endif
ifneq ($(TARGET_KERNEL_VERSION),$(filter $(TARGET_KERNEL_VERSION),4.9 4.14 4.19))
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.use_ffs_mtp=1
PRODUCT_PROPERTY_OVERRIDES += sys.usb.mtp.batchcancel=1
else
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.use_ffs_mtp=0
endif
ifneq ($(TARGET_KERNEL_VERSION),$(filter $(TARGET_KERNEL_VERSION),3.18 4.4 4.9 4.14))
PRODUCT_PACKAGES += [email protected]
endif
USB_USES_QMAA = $(TARGET_USES_QMAA)
ifeq ($(TARGET_USES_QMAA_OVERRIDE_USB),true)
USB_USES_QMAA = false
endif
# USB init scripts
ifeq ($(USB_USES_QMAA),true)
PRODUCT_PACKAGES += init.qti.usb.qmaa.rc
else
PRODUCT_PACKAGES += init.qcom.usb.rc init.qcom.usb.sh
#
# USB Gadget HAL is enabled on newer targets and takes the place
# of the init-based configfs rules for setting USB compositions
#
ifeq ($(PRODUCT_HAS_GADGET_HAL),true)
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.use_gadget_hal=1
PRODUCT_PACKAGES += [email protected]
PRODUCT_PACKAGES += usb_compositions.conf
else
PRODUCT_PROPERTY_OVERRIDES += vendor.usb.use_gadget_hal=0
endif
endif
# additional debugging on userdebug/eng builds
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += init.qti.usb.debug.sh
PRODUCT_PACKAGES += init.qti.usb.debug.rc
endif