All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mx8mm: usb: chipidea: Fix Battery Charger 1.2 CDP detection
@ 2021-06-11  1:47 ` Breno Lima
  0 siblings, 0 replies; 6+ messages in thread
From: Breno Lima @ 2021-06-11  1:47 UTC (permalink / raw)
  To: peter.chen
  Cc: gregkh, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-usb, linux-arm-kernel, linux-kernel, brenomatheus, jun.li,
	Breno Lima

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 PD 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 PD 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.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Jun Li <jun.li@nxp.com>
---
 drivers/usb/chipidea/usbmisc_imx.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 4545b23bda3f..bac0f5458cab 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -686,6 +686,16 @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data)
 	int val;
 	unsigned long flags;
 
+	/* Clear VDATSRCENB0 to disable VDP_SRC and IDM_SNK required by BC 1.2 spec */
+	spin_lock_irqsave(&usbmisc->lock, flags);
+	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
+	val &= ~MX7D_USB_OTG_PHY_CFG2_CHRG_VDATSRCENB0;
+	writel(val, usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
+	spin_unlock_irqrestore(&usbmisc->lock, flags);
+
+	/* TVDMSRC_DIS */
+	msleep(20);
+
 	/* VDM_SRC is connected to D- and IDP_SINK is connected to D+ */
 	spin_lock_irqsave(&usbmisc->lock, flags);
 	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
@@ -695,7 +705,8 @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data)
 				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
 	spin_unlock_irqrestore(&usbmisc->lock, flags);
 
-	usleep_range(1000, 2000);
+	/* TVDMSRC_ON */
+	msleep(40);
 
 	/*
 	 * Per BC 1.2, check voltage of D+:
@@ -798,7 +809,8 @@ static int imx7d_charger_primary_detection(struct imx_usbmisc_data *data)
 				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
 	spin_unlock_irqrestore(&usbmisc->lock, flags);
 
-	usleep_range(1000, 2000);
+	/* TVDPSRC_ON */
+	msleep(40);
 
 	/* Check if D- is less than VDAT_REF to determine an SDP per BC 1.2 */
 	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_STATUS);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mx8mm: usb: chipidea: Fix Battery Charger 1.2 CDP detection
@ 2021-06-11  1:47 ` Breno Lima
  0 siblings, 0 replies; 6+ messages in thread
From: Breno Lima @ 2021-06-11  1:47 UTC (permalink / raw)
  To: peter.chen
  Cc: gregkh, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-usb, linux-arm-kernel, linux-kernel, brenomatheus, jun.li,
	Breno Lima

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 PD 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 PD 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.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Jun Li <jun.li@nxp.com>
---
 drivers/usb/chipidea/usbmisc_imx.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 4545b23bda3f..bac0f5458cab 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -686,6 +686,16 @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data)
 	int val;
 	unsigned long flags;
 
+	/* Clear VDATSRCENB0 to disable VDP_SRC and IDM_SNK required by BC 1.2 spec */
+	spin_lock_irqsave(&usbmisc->lock, flags);
+	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
+	val &= ~MX7D_USB_OTG_PHY_CFG2_CHRG_VDATSRCENB0;
+	writel(val, usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
+	spin_unlock_irqrestore(&usbmisc->lock, flags);
+
+	/* TVDMSRC_DIS */
+	msleep(20);
+
 	/* VDM_SRC is connected to D- and IDP_SINK is connected to D+ */
 	spin_lock_irqsave(&usbmisc->lock, flags);
 	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
@@ -695,7 +705,8 @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data)
 				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
 	spin_unlock_irqrestore(&usbmisc->lock, flags);
 
-	usleep_range(1000, 2000);
+	/* TVDMSRC_ON */
+	msleep(40);
 
 	/*
 	 * Per BC 1.2, check voltage of D+:
@@ -798,7 +809,8 @@ static int imx7d_charger_primary_detection(struct imx_usbmisc_data *data)
 				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
 	spin_unlock_irqrestore(&usbmisc->lock, flags);
 
-	usleep_range(1000, 2000);
+	/* TVDPSRC_ON */
+	msleep(40);
 
 	/* Check if D- is less than VDAT_REF to determine an SDP per BC 1.2 */
 	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_STATUS);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH] mx8mm: usb: chipidea: Fix Battery Charger 1.2 CDP detection
  2021-06-11  1:47 ` Breno Lima
@ 2021-06-11  6:24   ` Jun Li
  -1 siblings, 0 replies; 6+ messages in thread
From: Jun Li @ 2021-06-11  6:24 UTC (permalink / raw)
  To: Breno Matheus Lima, peter.chen
  Cc: gregkh, shawnguo, s.hauer, kernel, festevam, dl-linux-imx,
	linux-usb, linux-arm-kernel, linux-kernel, brenomatheus


> -----Original Message-----
> From: Breno Matheus Lima <breno.lima@nxp.com>
> Sent: Friday, June 11, 2021 9:48 AM
> To: peter.chen@kernel.org
> Cc: gregkh@linuxfoundation.org; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> dl-linux-imx <linux-imx@nxp.com>; linux-usb@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
> brenomatheus@gmail.com; Jun Li <jun.li@nxp.com>; Breno Matheus Lima
> <breno.lima@nxp.com>
> Subject: [PATCH] mx8mm: usb: chipidea: 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 PD 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 PD 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.
> 

Fixes: 746f316b753a ("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>
> ---
>  drivers/usb/chipidea/usbmisc_imx.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/usbmisc_imx.c
> b/drivers/usb/chipidea/usbmisc_imx.c
> index 4545b23bda3f..bac0f5458cab 100644
> --- a/drivers/usb/chipidea/usbmisc_imx.c
> +++ b/drivers/usb/chipidea/usbmisc_imx.c
> @@ -686,6 +686,16 @@ static int imx7d_charger_secondary_detection(struct
> imx_usbmisc_data *data)
>  	int val;
>  	unsigned long flags;
> 
> +	/* Clear VDATSRCENB0 to disable VDP_SRC and IDM_SNK required by BC 1.2
> spec */
> +	spin_lock_irqsave(&usbmisc->lock, flags);
> +	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
> +	val &= ~MX7D_USB_OTG_PHY_CFG2_CHRG_VDATSRCENB0;
> +	writel(val, usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
> +	spin_unlock_irqrestore(&usbmisc->lock, flags);
> +
> +	/* TVDMSRC_DIS */
> +	msleep(20);
> +
>  	/* VDM_SRC is connected to D- and IDP_SINK is connected to D+ */
>  	spin_lock_irqsave(&usbmisc->lock, flags);
>  	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2); @@ -695,7 +705,8
> @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data
> *data)
>  				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
>  	spin_unlock_irqrestore(&usbmisc->lock, flags);
> 
> -	usleep_range(1000, 2000);
> +	/* TVDMSRC_ON */
> +	msleep(40);
> 
>  	/*
>  	 * Per BC 1.2, check voltage of D+:
> @@ -798,7 +809,8 @@ static int imx7d_charger_primary_detection(struct
> imx_usbmisc_data *data)
>  				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
>  	spin_unlock_irqrestore(&usbmisc->lock, flags);
> 
> -	usleep_range(1000, 2000);
> +	/* TVDPSRC_ON */
> +	msleep(40);
> 
>  	/* Check if D- is less than VDAT_REF to determine an SDP per BC 1.2 */
>  	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_STATUS);
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] mx8mm: usb: chipidea: Fix Battery Charger 1.2 CDP detection
@ 2021-06-11  6:24   ` Jun Li
  0 siblings, 0 replies; 6+ messages in thread
From: Jun Li @ 2021-06-11  6:24 UTC (permalink / raw)
  To: Breno Matheus Lima, peter.chen
  Cc: gregkh, shawnguo, s.hauer, kernel, festevam, dl-linux-imx,
	linux-usb, linux-arm-kernel, linux-kernel, brenomatheus


> -----Original Message-----
> From: Breno Matheus Lima <breno.lima@nxp.com>
> Sent: Friday, June 11, 2021 9:48 AM
> To: peter.chen@kernel.org
> Cc: gregkh@linuxfoundation.org; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> dl-linux-imx <linux-imx@nxp.com>; linux-usb@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
> brenomatheus@gmail.com; Jun Li <jun.li@nxp.com>; Breno Matheus Lima
> <breno.lima@nxp.com>
> Subject: [PATCH] mx8mm: usb: chipidea: 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 PD 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 PD 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.
> 

Fixes: 746f316b753a ("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>
> ---
>  drivers/usb/chipidea/usbmisc_imx.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/usbmisc_imx.c
> b/drivers/usb/chipidea/usbmisc_imx.c
> index 4545b23bda3f..bac0f5458cab 100644
> --- a/drivers/usb/chipidea/usbmisc_imx.c
> +++ b/drivers/usb/chipidea/usbmisc_imx.c
> @@ -686,6 +686,16 @@ static int imx7d_charger_secondary_detection(struct
> imx_usbmisc_data *data)
>  	int val;
>  	unsigned long flags;
> 
> +	/* Clear VDATSRCENB0 to disable VDP_SRC and IDM_SNK required by BC 1.2
> spec */
> +	spin_lock_irqsave(&usbmisc->lock, flags);
> +	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
> +	val &= ~MX7D_USB_OTG_PHY_CFG2_CHRG_VDATSRCENB0;
> +	writel(val, usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
> +	spin_unlock_irqrestore(&usbmisc->lock, flags);
> +
> +	/* TVDMSRC_DIS */
> +	msleep(20);
> +
>  	/* VDM_SRC is connected to D- and IDP_SINK is connected to D+ */
>  	spin_lock_irqsave(&usbmisc->lock, flags);
>  	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG2); @@ -695,7 +705,8
> @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data
> *data)
>  				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
>  	spin_unlock_irqrestore(&usbmisc->lock, flags);
> 
> -	usleep_range(1000, 2000);
> +	/* TVDMSRC_ON */
> +	msleep(40);
> 
>  	/*
>  	 * Per BC 1.2, check voltage of D+:
> @@ -798,7 +809,8 @@ static int imx7d_charger_primary_detection(struct
> imx_usbmisc_data *data)
>  				usbmisc->base + MX7D_USB_OTG_PHY_CFG2);
>  	spin_unlock_irqrestore(&usbmisc->lock, flags);
> 
> -	usleep_range(1000, 2000);
> +	/* TVDPSRC_ON */
> +	msleep(40);
> 
>  	/* Check if D- is less than VDAT_REF to determine an SDP per BC 1.2 */
>  	val = readl(usbmisc->base + MX7D_USB_OTG_PHY_STATUS);
> --
> 2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mx8mm: usb: chipidea: Fix Battery Charger 1.2 CDP detection
  2021-06-11  6:24   ` Jun Li
@ 2021-06-11 14:57     ` Breno Matheus Lima
  -1 siblings, 0 replies; 6+ messages in thread
From: Breno Matheus Lima @ 2021-06-11 14:57 UTC (permalink / raw)
  To: Jun Li
  Cc: Breno Matheus Lima, peter.chen, gregkh, shawnguo, s.hauer,
	kernel, festevam, dl-linux-imx, linux-usb, linux-arm-kernel,
	linux-kernel

Hi Jun,

Em sex., 11 de jun. de 2021 às 02:24, Jun Li <jun.li@nxp.com> escreveu:
>
>
> > -----Original Message-----
> > From: Breno Matheus Lima <breno.lima@nxp.com>
> > Sent: Friday, June 11, 2021 9:48 AM
> > To: peter.chen@kernel.org
> > Cc: gregkh@linuxfoundation.org; shawnguo@kernel.org;
> > s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> > dl-linux-imx <linux-imx@nxp.com>; linux-usb@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
> > brenomatheus@gmail.com; Jun Li <jun.li@nxp.com>; Breno Matheus Lima
> > <breno.lima@nxp.com>
> > Subject: [PATCH] mx8mm: usb: chipidea: 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 PD 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 PD 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.
> >
>
> Fixes: 746f316b753a ("usb: chipidea: introduce imx7d USB charger detection")
>

Thanks for pointing this out, I have just sent another version.

Best regards,
Breno Lima

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mx8mm: usb: chipidea: Fix Battery Charger 1.2 CDP detection
@ 2021-06-11 14:57     ` Breno Matheus Lima
  0 siblings, 0 replies; 6+ messages in thread
From: Breno Matheus Lima @ 2021-06-11 14:57 UTC (permalink / raw)
  To: Jun Li
  Cc: Breno Matheus Lima, peter.chen, gregkh, shawnguo, s.hauer,
	kernel, festevam, dl-linux-imx, linux-usb, linux-arm-kernel,
	linux-kernel

Hi Jun,

Em sex., 11 de jun. de 2021 às 02:24, Jun Li <jun.li@nxp.com> escreveu:
>
>
> > -----Original Message-----
> > From: Breno Matheus Lima <breno.lima@nxp.com>
> > Sent: Friday, June 11, 2021 9:48 AM
> > To: peter.chen@kernel.org
> > Cc: gregkh@linuxfoundation.org; shawnguo@kernel.org;
> > s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> > dl-linux-imx <linux-imx@nxp.com>; linux-usb@vger.kernel.org;
> > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
> > brenomatheus@gmail.com; Jun Li <jun.li@nxp.com>; Breno Matheus Lima
> > <breno.lima@nxp.com>
> > Subject: [PATCH] mx8mm: usb: chipidea: 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 PD 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 PD 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.
> >
>
> Fixes: 746f316b753a ("usb: chipidea: introduce imx7d USB charger detection")
>

Thanks for pointing this out, I have just sent another version.

Best regards,
Breno Lima

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-11 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11  1:47 [PATCH] mx8mm: usb: chipidea: Fix Battery Charger 1.2 CDP detection Breno Lima
2021-06-11  1:47 ` Breno Lima
2021-06-11  6:24 ` Jun Li
2021-06-11  6:24   ` Jun Li
2021-06-11 14:57   ` Breno Matheus Lima
2021-06-11 14:57     ` Breno Matheus Lima

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.