linux/drivers/usb/chipidea
Breno Lima c6d580d96f usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection
i.MX8MM cannot detect certain CDP USB HUBs. usbmisc_imx.c driver is not
following CDP timing requirements defined by USB BC 1.2 specification
and section 3.2.4 Detection Timing CDP.

During Primary Detection the i.MX device should turn on VDP_SRC and
IDM_SINK for a minimum of 40ms (TVDPSRC_ON). After a time of TVDPSRC_ON,
the i.MX is allowed to check the status of the D- line. Current
implementation is waiting between 1ms and 2ms, and certain BC 1.2
complaint USB HUBs cannot be detected. Increase delay to 40ms allowing
enough time for primary detection.

During secondary detection the i.MX is required to disable VDP_SRC and
IDM_SNK, and enable VDM_SRC and IDP_SINK for at least 40ms (TVDMSRC_ON).

Current implementation is not disabling VDP_SRC and IDM_SNK, introduce
disable sequence in imx7d_charger_secondary_detection() function.

VDM_SRC and IDP_SINK should be enabled for at least 40ms (TVDMSRC_ON).
Increase delay allowing enough time for detection.

Cc: <stable@vger.kernel.org>
Fixes: 746f316b75 ("usb: chipidea: introduce imx7d USB charger detection")
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Jun Li <jun.li@nxp.com>
Link: https://lore.kernel.org/r/20210614175013.495808-1-breno.lima@nxp.com
Signed-off-by: Peter Chen <peter.chen@kernel.org>
2021-06-16 09:04:22 +08:00
..
bits.h USB: chipidea: Use the correct style for SPDX License Identifier 2020-03-16 11:13:47 +08:00
ci.h usb: chipidea: udc: add software sg list support 2020-05-06 09:42:35 +08:00
ci_hdrc_imx.c usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() 2020-12-28 15:45:53 +01:00
ci_hdrc_imx.h usb: chipidea: imx: add two samsung picophy parameters tuning implementation 2020-08-23 11:40:08 +08:00
ci_hdrc_msm.c usb: chipidea: msm: Ensure proper controller reset using role switch API 2020-05-07 08:46:35 +02:00
ci_hdrc_pci.c usb: chipidea: ci_hdrc_pci: Fix improper use of kerneldoc format 2020-07-09 17:19:56 +02:00
ci_hdrc_tegra.c usb: chipidea: tegra: Silence deferred probe error 2021-03-23 12:50:32 +01:00
ci_hdrc_usb2.c usb: chipidea: usb2: remove unneeded semicolon 2020-04-29 09:47:19 +08:00
core.c usb: chipidea: tegra: Support host mode 2021-01-13 11:26:34 +01:00
debug.c usb: chipidea: debug: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-09 16:46:58 +02:00
host.c usb: chipidea: tegra: fix flexible_array.cocci warnings 2021-03-10 09:37:15 +01:00
host.h usb: chipidea: add inline for ci_hdrc_host_driver_init if host is not defined 2020-01-22 07:54:27 +01:00
Kconfig usb: chipidea: tegra: Support host mode 2021-01-13 11:26:34 +01:00
Makefile usb: chipidea: add tracepoint support for udc 2020-12-10 08:45:26 +08:00
otg.c usb: chipidea: otg: Fix kerneldoc issues relating to description of 'ci' 2020-07-09 16:46:58 +02:00
otg.h USB: chipidea: Use the correct style for SPDX License Identifier 2020-03-16 11:13:47 +08:00
otg_fsm.c USB: move many drivers to use DEVICE_ATTR_WO 2018-01-24 08:49:52 +01:00
otg_fsm.h USB: chipidea: Use the correct style for SPDX License Identifier 2020-03-16 11:13:47 +08:00
trace.c usb: chipidea: add tracepoint support for udc 2020-12-10 08:45:26 +08:00
trace.h usb: chipidea: trace: fix the endian issue 2020-12-10 08:45:26 +08:00
udc.c usb: chipidea: udc: assign interrupt number to USB gadget structure 2021-05-17 10:04:05 +08:00
udc.h usb: chipidea: udc: add software sg list support 2020-05-06 09:42:35 +08:00
ulpi.c usb: chipidea: Always build ULPI code 2018-07-05 14:22:47 +08:00
usbmisc_imx.c usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection 2021-06-16 09:04:22 +08:00