<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/usb/host, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/'/>
<entry>
<title>usb: dwc2: Avoid delay when initializing USB peripheral by dwc2</title>
<updated>2021-06-09T08:54:26+00:00</updated>
<author>
<name>João Loureiro</name>
<email>joaofl@gmail.com</email>
</author>
<published>2021-03-17T15:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=dcd2bbe0510d7d47d745eeea063496a83cb3b08e'/>
<id>dcd2bbe0510d7d47d745eeea063496a83cb3b08e</id>
<content type='text'>
When `usb start` is called on the terminal, the dwc2 driver will try
to start every USB device as host first, even if it is explicitly
configured as peripheral in the device tree (dr_mode = "peripheral").

So to avoid an unwanted 15 seconds delay when initializing the usb
(one second per channel = 1s x 15), this patch adds a check to the
initialization, and will skip host initialization of the device is
explicitly set as peripheral. The checking is already done similarly
in the `drivers/usb/gadget/dwc2_udc_otg.c` driver.

Signed-off-by: João Loureiro &lt;joaofl@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `usb start` is called on the terminal, the dwc2 driver will try
to start every USB device as host first, even if it is explicitly
configured as peripheral in the device tree (dr_mode = "peripheral").

So to avoid an unwanted 15 seconds delay when initializing the usb
(one second per channel = 1s x 15), this patch adds a check to the
initialization, and will skip host initialization of the device is
explicitly set as peripheral. The checking is already done similarly
in the `drivers/usb/gadget/dwc2_udc_otg.c` driver.

Signed-off-by: João Loureiro &lt;joaofl@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Limit PHY address parsing to !CONFIG_PHY</title>
<updated>2021-04-28T15:16:18+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-04-22T19:06:40+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=53396d67baef4acbcc257c5f2c702935b62cc858'/>
<id>53396d67baef4acbcc257c5f2c702935b62cc858</id>
<content type='text'>
For systems which use generic PHY support and implement USB PHY driver,
the parsing of PHY properties is unnecessary, disable it.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Tested-by: Ying-Chun Liu (PaulLiu) &lt;paul.liu@linaro.org&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For systems which use generic PHY support and implement USB PHY driver,
the parsing of PHY properties is unnecessary, disable it.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Tested-by: Ying-Chun Liu (PaulLiu) &lt;paul.liu@linaro.org&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-hcd: Add IAA handshake for removing async QH</title>
<updated>2021-04-22T19:09:57+00:00</updated>
<author>
<name>Ye Li</name>
<email>ye.li@nxp.com</email>
</author>
<published>2021-03-09T03:26:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=e1769da17ed339bc937d30c49176bc3664b261af'/>
<id>e1769da17ed339bc937d30c49176bc3664b261af</id>
<content type='text'>
According to EHCI spec, software needs to do handshake with HC for
safely removing QH from async list. This handshake is implemented by
setting IAAD (Interrupt on Async Advance Doorbell) bit in USB_USBCMD
register and poll the IAA (Interrupt on Async Advance bit) in the
USB_USBSTS to ensure the HC has released all on-chip state that may
potentially reference one of the data structures just removed.

Current codes only check active status of the last QTD, but this can't
ensure the QH is released from HC. We can meet unrecoverable
"EHCI timed out on TD" errors when running UEFI SCT tests on USB disk.
The USB_ASYNCLISTADDR register is changed to a invalid address when the
issue happens. It is fixed after adding the IAA handshake.

Steps to reproduce the issue:
1. Build the UEFI SCT from https://github.com/tianocore/edk2-test
2. Build the EDK2 UEFI Shell from https://github.com/tianocore/edk2
3. Copy SCT files and Shell.efi to USB disk FAT partition
4. Load the Shell.efi from USB FAT, and run bootefi to execute it
5. After booting into Shell, enter the SCT directory and run "sct -a"
   to execute all tests.
6. Tests run about 1 hour and stop with many EHCI timeout errors like
   EHCI timed out on TD - token=0x801f8c80

Signed-off-by: Ye Li &lt;ye.li@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to EHCI spec, software needs to do handshake with HC for
safely removing QH from async list. This handshake is implemented by
setting IAAD (Interrupt on Async Advance Doorbell) bit in USB_USBCMD
register and poll the IAA (Interrupt on Async Advance bit) in the
USB_USBSTS to ensure the HC has released all on-chip state that may
potentially reference one of the data structures just removed.

Current codes only check active status of the last QTD, but this can't
ensure the QH is released from HC. We can meet unrecoverable
"EHCI timed out on TD" errors when running UEFI SCT tests on USB disk.
The USB_ASYNCLISTADDR register is changed to a invalid address when the
issue happens. It is fixed after adding the IAA handshake.

Steps to reproduce the issue:
1. Build the UEFI SCT from https://github.com/tianocore/edk2-test
2. Build the EDK2 UEFI Shell from https://github.com/tianocore/edk2
3. Copy SCT files and Shell.efi to USB disk FAT partition
4. Load the Shell.efi from USB FAT, and run bootefi to execute it
5. After booting into Shell, enter the SCT directory and run "sct -a"
   to execute all tests.
6. Tests run about 1 hour and stop with many EHCI timeout errors like
   EHCI timed out on TD - token=0x801f8c80

Signed-off-by: Ye Li &lt;ye.li@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Add iMX8M support</title>
<updated>2021-04-18T02:29:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-04-02T12:07:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=5e7e2a8e4f1e6d480f66822270bbf14c045aace0'/>
<id>5e7e2a8e4f1e6d480f66822270bbf14c045aace0</id>
<content type='text'>
The iMX8M uses nop PHY, select PHY and NOP_PHY automatically.
Otherwise, the DM capable driver is now perfectly compatible.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The iMX8M uses nop PHY, select PHY and NOP_PHY automatically.
Otherwise, the DM capable driver is now perfectly compatible.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Fix aarch64 build warnings</title>
<updated>2021-04-18T02:29:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-04-06T18:37:16+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=f444f8986b4c74b63cbf421635387df120d3cb4f'/>
<id>f444f8986b4c74b63cbf421635387df120d3cb4f</id>
<content type='text'>
Fix cast from pointer to integer of different size by casting the
pointer to uintptr_t instead of uint32_t, the former has correct
size on both 32bit and 64bit architectures.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix cast from pointer to integer of different size by casting the
pointer to uintptr_t instead of uint32_t, the former has correct
size on both 32bit and 64bit architectures.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Add fsl,imx7d-usb compatible string</title>
<updated>2021-04-18T02:29:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-04-02T11:07:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=e87015ff05d49b8e18367d05658cc092b5f94cc8'/>
<id>e87015ff05d49b8e18367d05658cc092b5f94cc8</id>
<content type='text'>
Add new compatible string, used by some more up-to-date DTs.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new compatible string, used by some more up-to-date DTs.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Set default CONFIG_MXC_USB_PORTSC if not defined</title>
<updated>2021-04-18T02:29:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-04-10T14:03:04+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=1aae8a35a202d4400adbb7780e1b384aa7aada37'/>
<id>1aae8a35a202d4400adbb7780e1b384aa7aada37</id>
<content type='text'>
There is now multiple copies of CONFIG_MXC_USB_PORTSC in configs set to
PORT_PTS_UTMI | PORT_PTS_PTW, which is in fact the default register value
for MX6, MX7 and MX7ULP. Define the default value of CONFIG_MXC_USB_PORTSC
in the driver and use it in case CONFIG_MXC_USB_PORTSC is not defined in
config, to reduce the duplication.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is now multiple copies of CONFIG_MXC_USB_PORTSC in configs set to
PORT_PTS_UTMI | PORT_PTS_PTW, which is in fact the default register value
for MX6, MX7 and MX7ULP. Define the default value of CONFIG_MXC_USB_PORTSC
in the driver and use it in case CONFIG_MXC_USB_PORTSC is not defined in
config, to reduce the duplication.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Add generic EHCI PHY support</title>
<updated>2021-04-18T02:29:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-04-02T11:07:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=50d0146cb70abc76ac3c363cd0e30b8ea4e91d1d'/>
<id>50d0146cb70abc76ac3c363cd0e30b8ea4e91d1d</id>
<content type='text'>
In case PHY support is enabled, use the generic EHCI PHY support
to start and stop the PHY.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case PHY support is enabled, use the generic EHCI PHY support
to start and stop the PHY.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Use portnr from DT in DM case</title>
<updated>2021-04-18T02:29:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-04-02T11:56:28+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=6443a3bc40d247f0a02376e763f6e03085528631'/>
<id>6443a3bc40d247f0a02376e763f6e03085528631</id>
<content type='text'>
In case the platform uses DM, determine port number, which is
used as offset in USBMISC registers, from PHY node DT aliases,
just like Linux does.

Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case the platform uses DM, determine port number, which is
used as offset in USBMISC registers, from PHY node DT aliases,
just like Linux does.

Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: ehci-mx6: Pass MISC address to usb_oc_config()</title>
<updated>2021-04-18T02:29:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-03-31T21:24:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ausil/public_git/u-boot.git/commit/?id=668646995fbde99b6c96c523c0e94e5deb029fe0'/>
<id>668646995fbde99b6c96c523c0e94e5deb029fe0</id>
<content type='text'>
Instead of passing ad-hoc sequence number to usb_oc_config(), pass in
the USB MISC address itself. The USB MISC address comes from DT in DM
case, and from the old method using controller index in non-DM case.

Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of passing ad-hoc sequence number to usb_oc_config(), pass in
the USB MISC address itself. The USB MISC address comes from DT in DM
case, and from the old method using controller index in non-DM case.

Fixes: 4de51cc25b5 ("usb: ehci-mx6: Drop assignment of sequence number")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: uboot-imx &lt;uboot-imx@nxp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
