SAMV7 Ethernet+USB Updates
This commit is contained in:
parent
459bf9e885
commit
66670c1738
@ -1041,7 +1041,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv)
|
|||||||
priv->xfrq[0].txdesc = priv->attr->tx0desc;
|
priv->xfrq[0].txdesc = priv->attr->tx0desc;
|
||||||
priv->xfrq[0].ntxbuffers = priv->attr->ntxbuffers;
|
priv->xfrq[0].ntxbuffers = priv->attr->ntxbuffers;
|
||||||
priv->xfrq[0].rxdesc = priv->attr->rx0desc;
|
priv->xfrq[0].rxdesc = priv->attr->rx0desc;
|
||||||
priv->xfrq[0].nrxbuffers = priv->attr->rtxbuffers;
|
priv->xfrq[0].nrxbuffers = priv->attr->nrxbuffers;
|
||||||
|
|
||||||
priv->xfrq[0].txbuffer = priv->attr->tx0buffer;
|
priv->xfrq[0].txbuffer = priv->attr->tx0buffer;
|
||||||
priv->xfrq[0].txbufsize = EMAC_TX_UNITSIZE;
|
priv->xfrq[0].txbufsize = EMAC_TX_UNITSIZE;
|
||||||
@ -1602,7 +1602,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid)
|
|||||||
{
|
{
|
||||||
if (rxndx == priv->xfrq[qid].rxndx)
|
if (rxndx == priv->xfrq[qid].rxndx)
|
||||||
{
|
{
|
||||||
nllvdbg("ERROR: No EOF (Invalid of buffers too small)\n");
|
nllvdbg("ERROR: No EOF (Invalid or buffers too small)\n");
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Give ownership back to the EMAC */
|
/* Give ownership back to the EMAC */
|
||||||
@ -1624,6 +1624,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (rxndx != priv->xfrq[qid].rxndx);
|
while (rxndx != priv->xfrq[qid].rxndx);
|
||||||
|
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4209,7 +4209,7 @@ static int sam_pullup(FAR struct usbdev_s *dev, bool enable)
|
|||||||
{
|
{
|
||||||
/* DETACH=1: USBHS is detached, UTMI transceiver is suspended. */
|
/* DETACH=1: USBHS is detached, UTMI transceiver is suspended. */
|
||||||
|
|
||||||
regval = sam_getreg(SAM_USBHS_DEVCTRL);
|
regval = sam_getreg(SAM_USBHS_DEVCTRL);
|
||||||
regval |= USBHS_DEVCTRL_DETACH;
|
regval |= USBHS_DEVCTRL_DETACH;
|
||||||
sam_putreg(regval, SAM_USBHS_DEVCTRL);
|
sam_putreg(regval, SAM_USBHS_DEVCTRL);
|
||||||
|
|
||||||
@ -4533,13 +4533,20 @@ static void sam_hw_shutdown(struct sam_usbdev_s *priv)
|
|||||||
|
|
||||||
sam_putreg(USBHS_DEVINT_ALL, SAM_USBHS_DEVICR);
|
sam_putreg(USBHS_DEVINT_ALL, SAM_USBHS_DEVICR);
|
||||||
|
|
||||||
/* Disconnect the device */
|
/* DETACH=1: USBHS is detached, UTMI transceiver is suspended. */
|
||||||
|
|
||||||
sam_pullup(&priv->usbdev, false);
|
regval = sam_getreg(SAM_USBHS_DEVCTRL);
|
||||||
|
regval |= USBHS_DEVCTRL_DETACH;
|
||||||
|
sam_putreg(regval, SAM_USBHS_DEVCTRL);
|
||||||
|
|
||||||
|
/* Freeze clocking */
|
||||||
|
|
||||||
|
regval = sam_getreg(SAM_USBHS_CTRL);
|
||||||
|
regval |= USBHS_CTRL_FRZCLK;
|
||||||
|
sam_putreg(regval, SAM_USBHS_CTRL);
|
||||||
|
|
||||||
/* Disable USB hardware */
|
/* Disable USB hardware */
|
||||||
|
|
||||||
regval = sam_getreg(SAM_USBHS_CTRL);
|
|
||||||
regval &= ~USBHS_CTRL_USBE;
|
regval &= ~USBHS_CTRL_USBE;
|
||||||
sam_putreg(regval, SAM_USBHS_CTRL);
|
sam_putreg(regval, SAM_USBHS_CTRL);
|
||||||
|
|
||||||
|
@ -83,15 +83,25 @@ The BASIC nsh configuration is fully function (as desribed below under
|
|||||||
(of course with appropriate mounting and unmounting). I all not sure
|
(of course with appropriate mounting and unmounting). I all not sure
|
||||||
of this and need to do more testing to characterize if the issue.
|
of this and need to do more testing to characterize if the issue.
|
||||||
|
|
||||||
5. There is not yet any support for the following board features: QSPI, USB,
|
5. There is not yet any support for the following board features: QSPI or WM8904.
|
||||||
EMAC, AT24, or WM8904 nor for any non-board features). Most of these
|
Many drivers will port easily from either the SAM3/4 or from the SAMA5Dx.
|
||||||
drivers will port easily from either the SAM3/4 or from the SAMA5Dx.
|
|
||||||
So there is still plenty to be done.
|
So there is still plenty to be done.
|
||||||
|
|
||||||
6. There has been a quick'n'dirty port of the SAMA5D4-EK Ethernet logic
|
6. There has been a quick'n'dirty port of the SAMA5D4-EK Ethernet logic
|
||||||
for the SAMV71-XULT. There are still some cache-related issues to
|
for the SAMV71-XULT. It does not work properly. Data on the line
|
||||||
be verified. No testing has yet been performed and so the driver should
|
appears to be corrupted, probably at the level of the PHY.
|
||||||
be considered non-functional.
|
|
||||||
|
7. The USBHS device controller driver (DCD) is complete but non-functional.
|
||||||
|
At this point, work has stopped because I am stuck. The problem is that
|
||||||
|
bus events are not occurring: Nothing is detected by the USBHS when the
|
||||||
|
host is connected; no activity is seen on the bus by a USB analyzer when
|
||||||
|
the host is connected. Possibilities: (1) the pullups on DM and DP are
|
||||||
|
not working. This would prevent the host from detecting the presence of
|
||||||
|
the device. the DETACH bit is, however, being correctly cleared or (2)
|
||||||
|
some issue with clocking or configuration of the UTMI. I see nothing
|
||||||
|
wrong this this case. I have done extensive comparison of the Atmel
|
||||||
|
sample code and study of the data sheet, but I have not found the key to
|
||||||
|
solving this.
|
||||||
|
|
||||||
Serial Console
|
Serial Console
|
||||||
==============
|
==============
|
||||||
@ -926,3 +936,7 @@ Configuration sub-directories
|
|||||||
|
|
||||||
# CONFIG_ARMV7M_ITCM is not set : Support not yet in place
|
# CONFIG_ARMV7M_ITCM is not set : Support not yet in place
|
||||||
# CONFIG_ARMV7M_DTCM is not set : Support not yet in place
|
# CONFIG_ARMV7M_DTCM is not set : Support not yet in place
|
||||||
|
|
||||||
|
Stack sizes are also large to simplify the bring-up and should be
|
||||||
|
tuned for better memory usages.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user