diff mbox series

[2/2] usb: cdns3: gadget: Fix full-speed mode

Message ID 20191007121601.25996-3-rogerq@ti.com
State Accepted
Commit ac9099e10a603f02f52f583fba78dd54c52b5542
Headers show
Series [1/2] usb: cdns3: fix cdns3_core_init_role() | expand

Commit Message

Roger Quadros Oct. 7, 2019, 12:16 p.m. UTC
We need to disable USB3 PHY for full-speed mode else
gadget mode is broken.

Signed-off-by: Roger Quadros <rogerq@ti.com>

Signed-off-by: Sekhar Nori <nsekhar@ti.com>

---
 drivers/usb/cdns3/gadget.c | 1 +
 1 file changed, 1 insertion(+)

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Comments

Peter Chen Oct. 8, 2019, 8:07 a.m. UTC | #1
On 19-10-07 15:16:01, Roger Quadros wrote:
> We need to disable USB3 PHY for full-speed mode else

> gadget mode is broken.

> 

> Signed-off-by: Roger Quadros <rogerq@ti.com>

> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

> ---

>  drivers/usb/cdns3/gadget.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c

> index 228cdc4ab886..157536753b8c 100644

> --- a/drivers/usb/cdns3/gadget.c

> +++ b/drivers/usb/cdns3/gadget.c

> @@ -2571,6 +2571,7 @@ static int cdns3_gadget_start(struct cdns3 *cdns)

>  	switch (max_speed) {

>  	case USB_SPEED_FULL:

>  		writel(USB_CONF_SFORCE_FS, &priv_dev->regs->usb_conf);

> +		writel(USB_CONF_USB3DIS, &priv_dev->regs->usb_conf);

>  		break;

>  	case USB_SPEED_HIGH:

>  		writel(USB_CONF_USB3DIS, &priv_dev->regs->usb_conf);


Reviewed-by: Peter Chen <peter.chen@nxp.com>


-- 

Thanks,
Peter Chen
Pawel Laszczak Oct. 16, 2019, 4:35 a.m. UTC | #2
>On 19-10-07 15:16:01, Roger Quadros wrote:

>> We need to disable USB3 PHY for full-speed mode else

>> gadget mode is broken.

>>

>> Signed-off-by: Roger Quadros <rogerq@ti.com>

>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

>> ---

>>  drivers/usb/cdns3/gadget.c | 1 +

>>  1 file changed, 1 insertion(+)

>>

>> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c

>> index 228cdc4ab886..157536753b8c 100644

>> --- a/drivers/usb/cdns3/gadget.c

>> +++ b/drivers/usb/cdns3/gadget.c

>> @@ -2571,6 +2571,7 @@ static int cdns3_gadget_start(struct cdns3 *cdns)

>>  	switch (max_speed) {

>>  	case USB_SPEED_FULL:

>>  		writel(USB_CONF_SFORCE_FS, &priv_dev->regs->usb_conf);

>> +		writel(USB_CONF_USB3DIS, &priv_dev->regs->usb_conf);

>>  		break;

>>  	case USB_SPEED_HIGH:

>>  		writel(USB_CONF_USB3DIS, &priv_dev->regs->usb_conf);

>

>Reviewed-by: Peter Chen <peter.chen@nxp.com>


Reviewed-by: Pawel Laszczak <pawell@cadence.com>

>

>--

>

>Thanks,

>Peter Chen


Regards,
Pawell
diff mbox series

Patch

diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 228cdc4ab886..157536753b8c 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -2571,6 +2571,7 @@  static int cdns3_gadget_start(struct cdns3 *cdns)
 	switch (max_speed) {
 	case USB_SPEED_FULL:
 		writel(USB_CONF_SFORCE_FS, &priv_dev->regs->usb_conf);
+		writel(USB_CONF_USB3DIS, &priv_dev->regs->usb_conf);
 		break;
 	case USB_SPEED_HIGH:
 		writel(USB_CONF_USB3DIS, &priv_dev->regs->usb_conf);