USB: OTG: msm: Fix ACA implementation

Synopsis 28nm PHY has two different circuits for detecting changes on
ID line.  ID_DIG is designed for detecting ID_float vs ID_gnd.  ID_ACA
is designed for detecting RID_A, RID_B, RID_C states.  These are mutually
exclusive and enabling both circuits has undefined behavior.  Enable
ID_ACA upon VBUS high or ID_gnd events to detect further ACA states.

ACA ID_GND threshold range is overlapped with OTG ID_FLOAT threshold range.
Hence PHY ID_DIG circuit can not be used for detecting ACA ID_GND.  Use
PMIC ID circuit for detecting both OTG and ACA ID_GND.

Link controller can not generate PHY_ALT interrupt in host mode. But the
corresponding PHY register reflects the actual ID state.  Hence implement
polling to read PHY register to detect ID_GND --> ID_A, ID_A --> ID_B
transitions.  That means low power mode can not be allowed in host mode.
Also disallow suspending the device attached on the root hub.  Otherwise
PHY is put into suspend state automatically upon setting SUSP bit in PORTSC
register.

Link controller can not generate asynchronous interrupt for ID_ACA changes
in low power mode.  Hence disallow low power mode in ID_B and ID_C states.

USB_MSM_ACA is not selected by default. If it selected, ACA states can be
detected and low power mode is not allowed in host mode.  Writing "enable"
to <debugfs>/msm_otg/aca enables ACA irrespective of USB_MSM_ACA selection.
This is meant for debugging only.

Change-Id: I51e80d803a583c5bdffc8111696943c04958f604
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index 71f36f2..8864f32 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -161,7 +161,7 @@
 config USB_MSM_STANDARD_ACA
 	bool "Support for Standard ACA"
 	depends on USB_MSM_ACA
-	default y
+	default USB_MSM_OTG_72K
 	help
 	  A Standard ACA has a Standard-A receptacle on the Accessory Port,
 	  and can only be attached to a B-device.  RID_A and RID_GND states