HiKey960: Add sys.usb.controller override for newer kernels
From: Yu Chen <chenyu56@huawei.com>
With the usb rework going on against mainline kernels, Android
sometimes gets confused as to which device to use for usb-gadget
functionality.
Thus this adds:
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += sys.usb.controller=ff100000.dwc3
To make sure the right device is selected.
Without this, if we boot using host mode and then plug in the
gadget connection, the system will not setup the gadget device
and adb will not function.
Additionally, this should not have any side-effects on older
kernels. Yu Chen clarifies: the property of "sys.usb.controller"
should always be "ff100000.dwc3" on hikey960. Previously we did
not use the code from drivers/usb/dwc3/drd.c to handle the
data-role-switch" in our older code, and the dwc3 udc always
exists in "/sys/class/udc" in older kernels.
Change-Id: Ic21da64ab1b7cba452ca0ec9580ba90ca59f5d0c
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/hikey960/device-hikey960.mk b/hikey960/device-hikey960.mk
index f96d77a..65ae7ed 100644
--- a/hikey960/device-hikey960.mk
+++ b/hikey960/device-hikey960.mk
@@ -52,6 +52,8 @@
PRODUCT_PACKAGES += power.hikey960
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += sys.usb.controller=ff100000.dwc3
+
PRODUCT_PACKAGES += sensors.hikey960
# Unfortunately inherit-product doesn't export build variables from the