<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb/dwc2/params.c, branch v4.10</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>usb: dwc2: use u32 for DT binding parameters</title>
<updated>2017-01-12T08:02:20+00:00</updated>
<author>
<name>Leo Yan</name>
<email>leo.yan@linaro.org</email>
</author>
<published>2017-01-09T21:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b2f92f0ff0a26a6d758ce85167a77d7d1268ca36'/>
<id>b2f92f0ff0a26a6d758ce85167a77d7d1268ca36</id>
<content type='text'>
Commit 05ee799f2021 ("usb: dwc2: Move gadget settings into core_params")
changes to type u16 for DT binding "g-rx-fifo-size" and
"g-np-tx-fifo-size" but use type u32 for "g-tx-fifo-size". Finally the
the first two parameters cannot be passed successfully with wrong data
format. This is found the data transferring broken on 96boards Hikey.

This patch is to change all parameters to u32 type, and verified on
Hikey board the DT parameters can pass successfully.

[johnyoun: minor rebase]

Signed-off-by: Leo Yan &lt;leo.yan@linaro.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Tested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 05ee799f2021 ("usb: dwc2: Move gadget settings into core_params")
changes to type u16 for DT binding "g-rx-fifo-size" and
"g-np-tx-fifo-size" but use type u32 for "g-tx-fifo-size". Finally the
the first two parameters cannot be passed successfully with wrong data
format. This is found the data transferring broken on 96boards Hikey.

This patch is to change all parameters to u32 type, and verified on
Hikey board the DT parameters can pass successfully.

[johnyoun: minor rebase]

Signed-off-by: Leo Yan &lt;leo.yan@linaro.org&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Tested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: fix default value for gadget-dma-desc</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=efc95b2ca42424de222119a3a260624f3a050f8e'/>
<id>efc95b2ca42424de222119a3a260624f3a050f8e</id>
<content type='text'>
The current default for gadget DMA descriptor results on bcm2835 in a
unnecessary error message:

  Invalid value 1 for param gadget-dma-desc

So fix this by using hw-&gt;dma_desc_enable as default value.

Fixes: dec4b55677e ("usb: dwc2: gadget: Add descriptor DMA parameter")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current default for gadget DMA descriptor results on bcm2835 in a
unnecessary error message:

  Invalid value 1 for param gadget-dma-desc

So fix this by using hw-&gt;dma_desc_enable as default value.

Fixes: dec4b55677e ("usb: dwc2: gadget: Add descriptor DMA parameter")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: fix default value for DMA support</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6118d0647b10eaca06b278dee2022602d8f2f07a'/>
<id>6118d0647b10eaca06b278dee2022602d8f2f07a</id>
<content type='text'>
The current defaults for DMA results on a non-DMA platform in a unnecessary
error message:

  Invalid value 0 for param gadget-dma

So fix this by using dma_capable as default value.

Fixes: 9962b62f1be ("usb: dwc2: Deprecate g-use-dma binding")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current defaults for DMA results on a non-DMA platform in a unnecessary
error message:

  Invalid value 0 for param gadget-dma

So fix this by using dma_capable as default value.

Fixes: 9962b62f1be ("usb: dwc2: Deprecate g-use-dma binding")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: fix dwc2_get_device_property for u8 and u16</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de02238d6a7982a71682fe8da2996993a5a5eee7'/>
<id>de02238d6a7982a71682fe8da2996993a5a5eee7</id>
<content type='text'>
According to the Devicetree ePAPR [1] the datatypes u8 and u16 are
not defined. So using device_property_read_u16() would result in
a partial read of a 32-bit big-endian integer which is not intended.
So we better read the complete 32-bit value. This fixes a regression
on bcm2835 where the values for g-rx-fifo-size and g-np-tx-fifo-size
always read as zero:

  Invalid value 0 for param g-rx-fifo-size
  Invalid value 0 for param g-np-tx-fifo-size

[1] - http://elinux.org/images/c/cf/Power_ePAPR_APPROVED_v1.1.pdf

Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the Devicetree ePAPR [1] the datatypes u8 and u16 are
not defined. So using device_property_read_u16() would result in
a partial read of a 32-bit big-endian integer which is not intended.
So we better read the complete 32-bit value. This fixes a regression
on bcm2835 where the values for g-rx-fifo-size and g-np-tx-fifo-size
always read as zero:

  Invalid value 0 for param g-rx-fifo-size
  Invalid value 0 for param g-np-tx-fifo-size

[1] - http://elinux.org/images/c/cf/Power_ePAPR_APPROVED_v1.1.pdf

Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: Do not set host parameter in peripheral mode</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@i2se.com</email>
</author>
<published>2016-11-20T21:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3419735279564d40467ebe4147d8a41cef00685'/>
<id>f3419735279564d40467ebe4147d8a41cef00685</id>
<content type='text'>
Since commit "usb: dwc2: Improve handling of host and device hwparams" the
host mode specific hardware parameter aren't initialized in peripheral mode
from the register settings anymore. So we better do not set them in this
case which avoids the following warnings on bcm2835:

  256 invalid for host_nperio_tx_fifo_size. Check HW configuration.
  512 invalid for host_perio_tx_fifo_size. Check HW configuration.

Fixes: 55e1040e424b ("usb: dwc2: Improve handling of host and device hwparams")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit "usb: dwc2: Improve handling of host and device hwparams" the
host mode specific hardware parameter aren't initialized in peripheral mode
from the register settings anymore. So we better do not set them in this
case which avoids the following warnings on bcm2835:

  256 invalid for host_nperio_tx_fifo_size. Check HW configuration.
  512 invalid for host_perio_tx_fifo_size. Check HW configuration.

Fixes: 55e1040e424b ("usb: dwc2: Improve handling of host and device hwparams")
Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: add amcc,dwc-otg support</title>
<updated>2016-11-18T11:54:51+00:00</updated>
<author>
<name>Christian Lamparter</name>
<email>chunkeey@googlemail.com</email>
</author>
<published>2016-11-15T23:03:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3922fb46f06035a246d31d25869a3276f1a1afa3'/>
<id>3922fb46f06035a246d31d25869a3276f1a1afa3</id>
<content type='text'>
This patch adds support for the "amcc,usb-otg" device
which is found in the PowerPC Canyonlands' dts.

The device definition was added by:

commit c89b3458d8cc ("powerpc/44x: Add USB DWC DTS entry to Canyonlands
board")

but without any driver support as the dwc2 driver wasn't available at
that time.

Note: The system can't use the generic "snps,dwc2" compatible
because of the special ahbcfg configuration. The default
GAHBCFG_HBSTLEN_INCR4 of snps,dwc2 can cause a system hang
when the USB and SATA is used concurrently.

Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for the "amcc,usb-otg" device
which is found in the PowerPC Canyonlands' dts.

The device definition was added by:

commit c89b3458d8cc ("powerpc/44x: Add USB DWC DTS entry to Canyonlands
board")

but without any driver support as the dwc2 driver wasn't available at
that time.

Note: The system can't use the generic "snps,dwc2" compatible
because of the special ahbcfg configuration. The default
GAHBCFG_HBSTLEN_INCR4 of snps,dwc2 can cause a system hang
when the USB and SATA is used concurrently.

Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: fixes host_dma logic</title>
<updated>2016-11-18T11:54:50+00:00</updated>
<author>
<name>Christian Lamparter</name>
<email>chunkeey@googlemail.com</email>
</author>
<published>2016-11-15T12:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4be0080c18fb41a95ab47ba7caff8359582457f9'/>
<id>4be0080c18fb41a95ab47ba7caff8359582457f9</id>
<content type='text'>
This patch moves the the host_dma initialization
before dwc2_set_param_dma_desc_enable() and
dwc2_set_param_dma_desc_fs_enable(). The reason being
that both function need it.

Fixes: 1205489cee75bf39 ("usb: dwc2: Get host DMA device properties")

Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch moves the the host_dma initialization
before dwc2_set_param_dma_desc_enable() and
dwc2_set_param_dma_desc_fs_enable(). The reason being
that both function need it.

Fixes: 1205489cee75bf39 ("usb: dwc2: Get host DMA device properties")

Acked-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: Add new core parameter for low speed</title>
<updated>2016-11-18T11:54:50+00:00</updated>
<author>
<name>Vardan Mikayelyan</name>
<email>mvardan@synopsys.com</email>
</author>
<published>2016-11-15T03:17:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=38e9002b85672352f8693c82192c8029586dd86d'/>
<id>38e9002b85672352f8693c82192c8029586dd86d</id>
<content type='text'>
Added new core param for low speed, which can be used only when SNPSID
is equal to DWC2_CORE_FS_IOT. When LS mode is enabled, we are
restricting ep types and providing to upper layer only INTR and CTRL
endpoints.

Signed-off-by: Vardan Mikayelyan &lt;mvardan@synopsys.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added new core param for low speed, which can be used only when SNPSID
is equal to DWC2_CORE_FS_IOT. When LS mode is enabled, we are
restricting ep types and providing to upper layer only INTR and CTRL
endpoints.

Signed-off-by: Vardan Mikayelyan &lt;mvardan@synopsys.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: gadget: Add IOT device IDs, configure core accordingly</title>
<updated>2016-11-18T11:54:49+00:00</updated>
<author>
<name>Vardan Mikayelyan</name>
<email>mvardan@synopsys.com</email>
</author>
<published>2016-11-15T03:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1e6b98ebd458e63b9effda2feb696e36644d4eed'/>
<id>1e6b98ebd458e63b9effda2feb696e36644d4eed</id>
<content type='text'>
Add new device IDs for IOT gadget. Done changes in probe to
configure core accordingly depending on device ID value.

Signed-off-by: Vardan Mikayelyan &lt;mvardan@synopsys.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new device IDs for IOT gadget. Done changes in probe to
configure core accordingly depending on device ID value.

Signed-off-by: Vardan Mikayelyan &lt;mvardan@synopsys.com&gt;
Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: dwc2: Remove reading in of invalid property</title>
<updated>2016-11-18T11:54:44+00:00</updated>
<author>
<name>John Youn</name>
<email>johnyoun@synopsys.com</email>
</author>
<published>2016-11-15T02:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8ad07335e81183bacdabf080efa5120d573d6f94'/>
<id>8ad07335e81183bacdabf080efa5120d573d6f94</id>
<content type='text'>
This property was mistakenly added, then removed, so don't read it in.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This property was mistakenly added, then removed, so don't read it in.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
