mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-08 03:23:32 -04:00
USB:gadget:designware Support high speed
This patch adds the support for usb device high speed for designware peripheral. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com>
This commit is contained in:
parent
dc3e773918
commit
23b0e6946b
@ -566,8 +566,13 @@ int udc_init(void)
|
|||||||
writel(~0x0, &udc_regs_p->dev_int_mask);
|
writel(~0x0, &udc_regs_p->dev_int_mask);
|
||||||
writel(~0x0, &udc_regs_p->endp_int_mask);
|
writel(~0x0, &udc_regs_p->endp_int_mask);
|
||||||
|
|
||||||
|
#ifndef CONFIG_USBD_HS
|
||||||
writel(DEV_CONF_FS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW |
|
writel(DEV_CONF_FS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW |
|
||||||
DEV_CONF_PHYINT_16, &udc_regs_p->dev_conf);
|
DEV_CONF_PHYINT_16, &udc_regs_p->dev_conf);
|
||||||
|
#else
|
||||||
|
writel(DEV_CONF_HS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW |
|
||||||
|
DEV_CONF_PHYINT_16, &udc_regs_p->dev_conf);
|
||||||
|
#endif
|
||||||
|
|
||||||
writel(DEV_CNTL_SOFTDISCONNECT, &udc_regs_p->dev_cntl);
|
writel(DEV_CNTL_SOFTDISCONNECT, &udc_regs_p->dev_cntl);
|
||||||
|
|
||||||
@ -577,6 +582,11 @@ int udc_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int is_usbd_high_speed(void)
|
||||||
|
{
|
||||||
|
return (readl(&udc_regs_p->dev_stat) & DEV_STAT_ENUM) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* udc_setup_ep - setup endpoint
|
* udc_setup_ep - setup endpoint
|
||||||
* Associate a physical endpoint with endpoint_instance
|
* Associate a physical endpoint with endpoint_instance
|
||||||
|
@ -197,6 +197,7 @@ struct udcfifo_regs {
|
|||||||
#define UDC_INT_PACKET_SIZE 64
|
#define UDC_INT_PACKET_SIZE 64
|
||||||
#define UDC_OUT_ENDPOINT 2
|
#define UDC_OUT_ENDPOINT 2
|
||||||
#define UDC_BULK_PACKET_SIZE 64
|
#define UDC_BULK_PACKET_SIZE 64
|
||||||
|
#define UDC_BULK_HS_PACKET_SIZE 512
|
||||||
#define UDC_IN_ENDPOINT 3
|
#define UDC_IN_ENDPOINT 3
|
||||||
#define UDC_OUT_PACKET_SIZE 64
|
#define UDC_OUT_PACKET_SIZE 64
|
||||||
#define UDC_IN_PACKET_SIZE 64
|
#define UDC_IN_PACKET_SIZE 64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user