<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/usb/dwc2/platform.c, branch dev-4.6</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-03-04T13:14:47+00:00</updated>
<entry>
<title>usb: dwc2: Add support for Lantiq ARX and XRX SoCs</title>
<updated>2016-03-04T13:14:47+00:00</updated>
<author>
<name>Antti Seppälä</name>
<email>a.seppala@gmail.com</email>
</author>
<published>2016-02-27T10:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf'/>
<id>urn:sha1:6c0c0951bbf8c2c216675fe277fba4c42aa0a2bf</id>
<content type='text'>
Add support for Lantiq ARX and XRX SoC families to the dwc2 driver.

Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Antti Seppälä &lt;a.seppala@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: host: Set host_rx_fifo_size to 525 for rk3066</title>
<updated>2016-03-04T13:14:39+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2016-01-29T02:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=098c1ef8fe6bcdfed7905cea1debdd3a0ff9a16f'/>
<id>urn:sha1:098c1ef8fe6bcdfed7905cea1debdd3a0ff9a16f</id>
<content type='text'>
As documented in dwc2_calculate_dynamic_fifo(), host_rx_fifo_size should
really be:
 2 * ((Largest Packet size / 4) + 1 + 1) + n
 with n = number of host channel.

We have 9 host channels, so
 2 * ((1024/4) + 2) + 9 = 516 + 9 = 525

We've got 960 / 972 total_fifo_size on rk3288 (and presumably on
rk3066) and 525 + 128 + 256 = 909 so we're still under on both ports
even when we increment by 5.

In the future, it would be nice if dwc2_calculate_dynamic_fifo() could
handle the "too small" FIFO case and come up with something more
dynamically.  When we do that we can figure out how to allocate the
extra 48 / 60 bytes of FIFO that we're currently wasting.

NOTE: no known bugs are fixed by this patch, but it seems like a simple
fix and ought to fix someone.

Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: rockchip: Make the max_transfer_size automatic</title>
<updated>2016-03-04T13:14:39+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2016-01-29T02:19:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=40eed7d78378f1f609680a8a891a50cce12ed612'/>
<id>urn:sha1:40eed7d78378f1f609680a8a891a50cce12ed612</id>
<content type='text'>
Previously we needed to set the max_transfer_size to explicitly be 65535
because the old driver would detect that our hardware could support much
bigger transfers and then would try to do them.  This wouldn't work
since the DMA alignment code couldn't support it.

Later in commit e8f8c14d9da7 ("usb: dwc2: clip max_transfer_size to
65535") upstream added support for clipping this automatically.  Since
that commit it has been OK to just use "-1" (default), but nobody
bothered to change it.

Let's change it to default now for two reasons:
- It's nice to use autodetected params.
- If we can remove the 65535 limit, we can transfer more!

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "usb: dwc2: Move reset into dwc2_get_hwparams()"</title>
<updated>2016-02-03T18:15:19+00:00</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2016-01-12T00:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=03b32e4c9bd1b52fcf1e4304e7a704aa0315e398'/>
<id>urn:sha1:03b32e4c9bd1b52fcf1e4304e7a704aa0315e398</id>
<content type='text'>
This reverts commit 263b7fb557f7 ("usb: dwc2: Move reset into
dwc2_get_hwparams()") due to regression found on bcm2835 platform. USB
ethernet fails, due to being unable to pick up proper parameters when
performing a plain reset before reading hw params.

Below shows the results of the gnptxfsiz and hptxfsiz with and before
and after reverting this (from Stefan Wahren):

So here is the probe result before Patch 1 is applied:

[    1.283148] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host
[    1.313894] dwc2 20980000.usb: gnptxfsiz=00201000
[    1.314104] dwc2 20980000.usb: hptxfsiz=00000000
[    1.353908] dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size. Check HW configuration.
[    1.354262] dwc2 20980000.usb: 512 invalid for host_perio_tx_fifo_size. Check HW configuration.
[    1.394249] dwc2 20980000.usb: DWC OTG Controller
[    1.394561] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    1.394917] dwc2 20980000.usb: irq 33, io mem 0x00000000

And here is the probe result after Patch 1 is applied:

[    1.280107] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host
[    1.353949] dwc2 20980000.usb: gnptxfsiz=01001000
[    1.354166] dwc2 20980000.usb: hptxfsiz=02002000
[    1.434301] dwc2 20980000.usb: DWC OTG Controller
[    1.434616] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    1.434973] dwc2 20980000.usb: irq 33, io mem 0x00000000

Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Tested-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Reported-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Reported-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Tested-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Tested-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: add shutdown callback to platform variant</title>
<updated>2015-12-22T18:12:51+00:00</updated>
<author>
<name>Heiko Stübner</name>
<email>heiko.stuebner@collabora.com</email>
</author>
<published>2015-12-18T18:30:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=a40a00318c7fcdd23e73cfffac0e33430a43a3e3'/>
<id>urn:sha1:a40a00318c7fcdd23e73cfffac0e33430a43a3e3</id>
<content type='text'>
In specific conditions (involving usb hubs) dwc2 devices can create a
lot of interrupts, even to the point of overwhelming devices running
at low frequencies. Some devices need to do special clock handling
at shutdown-time which may bring the system clock below the threshold
of being able to handle the dwc2 interrupts. Disabling dwc2-irqs
in a shutdown callbacks prevents reboots/poweroffs from getting stuck
in such cases.

The hsotg struct already contains an unused irq element, so we can
just use it to store the irq number for the shutdown callback.

Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko.stuebner@collabora.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Remove redundant reset in probe</title>
<updated>2015-12-22T18:02:34+00:00</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2015-12-17T19:18:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=25362d318371e1e271dda24995ceabb8457b3b7c'/>
<id>urn:sha1:25362d318371e1e271dda24995ceabb8457b3b7c</id>
<content type='text'>
Reset already happens before this so just force the dr_mode.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Move reset into dwc2_get_hwparams()</title>
<updated>2015-12-22T17:58:34+00:00</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2015-12-17T19:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=263b7fb557f797d9d4d1dcf93fb6bb2efc3f1d46'/>
<id>urn:sha1:263b7fb557f797d9d4d1dcf93fb6bb2efc3f1d46</id>
<content type='text'>
The reset is required to get reset values of the hardware parameters but
the force mode is not. Move the base reset into dwc2_get_hwparams() and
do the reset and force mode afterwards.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Fix dr_mode validation</title>
<updated>2015-12-22T17:57:35+00:00</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2015-12-17T19:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5268ed9d2e3b52f703f3661eef14cecbb2b572d4'/>
<id>urn:sha1:5268ed9d2e3b52f703f3661eef14cecbb2b572d4</id>
<content type='text'>
The dr_mode parameter was being checked against how the dwc2 module
was being configured at compile time. But it wasn't checked against
the hardware capabilities, nor were the hardware capabilities checked
against the compilation parameters.

This commit adds those checks and adjusts dr_mode to an appropriate
value, if needed. If the hardware capabilities and module compilation
do not match then we fail as it wouldn't be possible to run properly.

The hardware, module, and dr_mode, can each be set to host, device,
or otg. Check that all these values are compatible and adjust the
value of dr_mode if possible.

The following table summarizes the behavior:

                     actual
   HW  MOD dr_mode   dr_mode
 ------------------------------
  HST  HST  any    :  HST
  HST  DEV  any    :  ---
  HST  OTG  any    :  HST

  DEV  HST  any    :  ---
  DEV  DEV  any    :  DEV
  DEV  OTG  any    :  DEV

  OTG  HST  any    :  HST
  OTG  DEV  any    :  DEV
  OTG  OTG  any    :  dr_mode

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: Rename dwc2_core_reset()</title>
<updated>2015-12-22T17:55:21+00:00</updated>
<author>
<name>John Youn</name>
<email>John.Youn@synopsys.com</email>
</author>
<published>2015-12-17T19:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6d58f346a61ff50eda740e6216e9829e572d75c8'/>
<id>urn:sha1:6d58f346a61ff50eda740e6216e9829e572d75c8</id>
<content type='text'>
Renamed dwc2_core_reset() to dwc2_core_reset_and_force_dr_mode(). This
describes what it is doing more accurately. This is in preparation of
introducing a plain dwc2_core_reset() function that only performs the
reset and doesn't force the mode.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc2: reset dwc2 core before dwc2_get_hwparams()</title>
<updated>2015-12-22T17:51:45+00:00</updated>
<author>
<name>Yunzhi Li</name>
<email>lyz@rock-chips.com</email>
</author>
<published>2015-12-17T19:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=cebfdbf329ae929ccb71632888a7c2100c3d1eeb'/>
<id>urn:sha1:cebfdbf329ae929ccb71632888a7c2100c3d1eeb</id>
<content type='text'>
We initiate dwc2 usb controller in BIOS, dwc2_core_reset() should
be called before dwc2_get_hwparams() to reset core registers to
default value. Without this the FIFO setting might be incorrect
because calculating FIFO size need power-on value of
GRXFSIZ/GNPTXFSIZ/HPTXFSIZ registers.

This patch could avoid warnning massage like in rk3288 platform:
[    2.074764] dwc2 ff580000.usb: 256 invalid for
host_perio_tx_fifo_size. Check HW configuration.

Signed-off-by: Yunzhi Li &lt;lyz@rock-chips.com&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
</feed>
